├── .github └── ISSUE_TEMPLATE ├── .gitignore ├── .travis.yml ├── 0x2e4b43ab3d0983da282592571eef61ae5e60f726.png ├── Dockerfile ├── FEC.png ├── LICENSE.md ├── README.md ├── build-release-cgo.sh ├── build-release.sh ├── bw.png ├── client ├── args.go ├── config.go ├── dial.go ├── dial_android.go ├── log.go ├── log_android.go ├── main.go ├── signal.go ├── utils.go └── utils_android.go ├── examples ├── kcptun.service ├── local.json └── server.json ├── fast.png ├── flame.png ├── generic ├── comp.go ├── copy.go ├── multiport.go ├── multiport_test.go └── snmp.go ├── go.mod ├── go.sum ├── kcptun.png ├── kcptun.spec ├── layeredparams.png ├── logo-small.png ├── logo.png ├── server ├── args.go ├── config.go ├── main.go └── signal.go └── vendor ├── github.com ├── coreos │ └── go-iptables │ │ ├── LICENSE │ │ ├── NOTICE │ │ └── iptables │ │ ├── iptables.go │ │ └── lock.go ├── golang │ └── snappy │ │ ├── .gitignore │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── README │ │ ├── decode.go │ │ ├── decode_amd64.go │ │ ├── decode_amd64.s │ │ ├── decode_other.go │ │ ├── encode.go │ │ ├── encode_amd64.go │ │ ├── encode_amd64.s │ │ ├── encode_other.go │ │ ├── go.mod │ │ └── snappy.go ├── google │ └── gopacket │ │ ├── .gitignore │ │ ├── .travis.gofmt.sh │ │ ├── .travis.golint.sh │ │ ├── .travis.govet.sh │ │ ├── .travis.install.sh │ │ ├── .travis.script.sh │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── base.go │ │ ├── decode.go │ │ ├── doc.go │ │ ├── flows.go │ │ ├── gc │ │ ├── go.mod │ │ ├── go.sum │ │ ├── layerclass.go │ │ ├── layers │ │ ├── .lint_blacklist │ │ ├── arp.go │ │ ├── base.go │ │ ├── bfd.go │ │ ├── cdp.go │ │ ├── ctp.go │ │ ├── dhcpv4.go │ │ ├── dhcpv6.go │ │ ├── dhcpv6_options.go │ │ ├── dns.go │ │ ├── doc.go │ │ ├── dot11.go │ │ ├── dot1q.go │ │ ├── eap.go │ │ ├── eapol.go │ │ ├── endpoints.go │ │ ├── enums.go │ │ ├── enums_generated.go │ │ ├── etherip.go │ │ ├── ethernet.go │ │ ├── fddi.go │ │ ├── gen_linted.sh │ │ ├── geneve.go │ │ ├── gre.go │ │ ├── gtp.go │ │ ├── iana_ports.go │ │ ├── icmp4.go │ │ ├── icmp6.go │ │ ├── icmp6msg.go │ │ ├── igmp.go │ │ ├── ip4.go │ │ ├── ip6.go │ │ ├── ipsec.go │ │ ├── layertypes.go │ │ ├── lcm.go │ │ ├── linux_sll.go │ │ ├── llc.go │ │ ├── lldp.go │ │ ├── loopback.go │ │ ├── mldv1.go │ │ ├── mldv2.go │ │ ├── modbustcp.go │ │ ├── mpls.go │ │ ├── ndp.go │ │ ├── ntp.go │ │ ├── ospf.go │ │ ├── pflog.go │ │ ├── ports.go │ │ ├── ppp.go │ │ ├── pppoe.go │ │ ├── prism.go │ │ ├── radiotap.go │ │ ├── rudp.go │ │ ├── sctp.go │ │ ├── sflow.go │ │ ├── sip.go │ │ ├── stp.go │ │ ├── tcp.go │ │ ├── tcpip.go │ │ ├── test_creator.py │ │ ├── tls.go │ │ ├── tls_alert.go │ │ ├── tls_appdata.go │ │ ├── tls_cipherspec.go │ │ ├── tls_handshake.go │ │ ├── udp.go │ │ ├── udplite.go │ │ ├── usb.go │ │ ├── vrrp.go │ │ └── vxlan.go │ │ ├── layertype.go │ │ ├── packet.go │ │ ├── parser.go │ │ ├── time.go │ │ └── writer.go ├── klauspost │ ├── cpuid │ │ └── v2 │ │ │ ├── .gitignore │ │ │ ├── .goreleaser.yml │ │ │ ├── CONTRIBUTING.txt │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── cpuid.go │ │ │ ├── cpuid_386.s │ │ │ ├── cpuid_amd64.s │ │ │ ├── cpuid_arm64.s │ │ │ ├── detect_arm64.go │ │ │ ├── detect_ref.go │ │ │ ├── detect_x86.go │ │ │ ├── featureid_string.go │ │ │ ├── go.mod │ │ │ ├── os_darwin_arm64.go │ │ │ ├── os_linux_arm64.go │ │ │ ├── os_other_arm64.go │ │ │ ├── os_safe_linux_arm64.go │ │ │ ├── os_unsafe_linux_arm64.go │ │ │ └── test-architectures.sh │ └── reedsolomon │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── galois.go │ │ ├── galoisAvx512_amd64.go │ │ ├── galoisAvx512_amd64.s │ │ ├── galois_amd64.go │ │ ├── galois_amd64.s │ │ ├── galois_arm64.go │ │ ├── galois_arm64.s │ │ ├── galois_gen_amd64.go │ │ ├── galois_gen_amd64.s │ │ ├── galois_gen_none.go │ │ ├── galois_gen_switch_amd64.go │ │ ├── galois_noasm.go │ │ ├── galois_notamd64.go │ │ ├── galois_ppc64le.go │ │ ├── galois_ppc64le.s │ │ ├── go.mod │ │ ├── go.sum │ │ ├── inversion_tree.go │ │ ├── matrix.go │ │ ├── options.go │ │ ├── reedsolomon.go │ │ └── streaming.go ├── pkg │ └── errors │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── errors.go │ │ ├── go113.go │ │ └── stack.go ├── templexxx │ ├── cpu │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── cpu.go │ │ ├── cpu_386.go │ │ ├── cpu_amd64.go │ │ ├── cpu_amd64p32.go │ │ ├── cpu_arm.go │ │ ├── cpu_arm64.go │ │ ├── cpu_mips.go │ │ ├── cpu_mips64.go │ │ ├── cpu_mips64le.go │ │ ├── cpu_mipsle.go │ │ ├── cpu_no_init.go │ │ ├── cpu_ppc64x.go │ │ ├── cpu_s390x.go │ │ ├── cpu_s390x.s │ │ ├── cpu_wasm.go │ │ ├── cpu_x86.go │ │ └── cpu_x86.s │ └── xorsimd │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── go.mod │ │ ├── go.sum │ │ ├── xor.go │ │ ├── xor_amd64.go │ │ ├── xor_generic.go │ │ ├── xoravx2_amd64.s │ │ ├── xoravx512_amd64.s │ │ ├── xorbytes_amd64.s │ │ └── xorsse2_amd64.s ├── tjfoc │ └── gmsm │ │ ├── LICENSE │ │ └── sm4 │ │ ├── sm4.go │ │ ├── sm4_gcm.go │ │ └── utils.go ├── urfave │ └── cli │ │ ├── .flake8 │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── CODE_OF_CONDUCT.md │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── MAINTAINERS.md │ │ ├── README.md │ │ ├── app.go │ │ ├── appveyor.yml │ │ ├── category.go │ │ ├── cli.go │ │ ├── command.go │ │ ├── context.go │ │ ├── errors.go │ │ ├── flag-types.json │ │ ├── flag.go │ │ ├── flag_generated.go │ │ ├── funcs.go │ │ ├── generate-flag-types │ │ ├── go.mod │ │ ├── go.sum │ │ ├── help.go │ │ ├── runtests │ │ └── sort.go └── xtaci │ ├── kcp-go │ └── v5 │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── autotune.go │ │ ├── batchconn.go │ │ ├── crypt.go │ │ ├── donate.png │ │ ├── entropy.go │ │ ├── fec.go │ │ ├── flame.png │ │ ├── frame.png │ │ ├── go.mod │ │ ├── go.sum │ │ ├── kcp-go.png │ │ ├── kcp.go │ │ ├── readloop.go │ │ ├── readloop_generic.go │ │ ├── readloop_linux.go │ │ ├── sess.go │ │ ├── snmp.go │ │ ├── timedsched.go │ │ ├── tx.go │ │ ├── tx_generic.go │ │ ├── tx_linux.go │ │ └── wechat_donate.jpg │ ├── smux │ ├── .gitignore │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── alloc.go │ ├── curve.jpg │ ├── frame.go │ ├── go.mod │ ├── go.sum │ ├── mux.go │ ├── mux.jpg │ ├── session.go │ ├── shaper.go │ ├── smux.png │ └── stream.go │ └── tcpraw │ ├── .gitignore │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── tcp_linux.go │ └── tcp_stub.go ├── golang.org └── x │ ├── crypto │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── blowfish │ │ ├── block.go │ │ ├── cipher.go │ │ └── const.go │ ├── cast5 │ │ └── cast5.go │ ├── internal │ │ └── subtle │ │ │ ├── aliasing.go │ │ │ └── aliasing_purego.go │ ├── pbkdf2 │ │ └── pbkdf2.go │ ├── salsa20 │ │ ├── salsa │ │ │ ├── hsalsa20.go │ │ │ ├── salsa208.go │ │ │ ├── salsa20_amd64.go │ │ │ ├── salsa20_amd64.s │ │ │ ├── salsa20_noasm.go │ │ │ └── salsa20_ref.go │ │ └── salsa20.go │ ├── tea │ │ └── cipher.go │ ├── twofish │ │ └── twofish.go │ └── xtea │ │ ├── block.go │ │ └── cipher.go │ ├── net │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── bpf │ │ ├── asm.go │ │ ├── constants.go │ │ ├── doc.go │ │ ├── instructions.go │ │ ├── setter.go │ │ ├── vm.go │ │ └── vm_instructions.go │ ├── internal │ │ ├── iana │ │ │ └── const.go │ │ └── socket │ │ │ ├── cmsghdr.go │ │ │ ├── cmsghdr_bsd.go │ │ │ ├── cmsghdr_linux_32bit.go │ │ │ ├── cmsghdr_linux_64bit.go │ │ │ ├── cmsghdr_solaris_64bit.go │ │ │ ├── cmsghdr_stub.go │ │ │ ├── cmsghdr_unix.go │ │ │ ├── cmsghdr_zos_s390x.go │ │ │ ├── complete_dontwait.go │ │ │ ├── complete_nodontwait.go │ │ │ ├── empty.s │ │ │ ├── error_unix.go │ │ │ ├── error_windows.go │ │ │ ├── iovec_32bit.go │ │ │ ├── iovec_64bit.go │ │ │ ├── iovec_solaris_64bit.go │ │ │ ├── iovec_stub.go │ │ │ ├── mmsghdr_stub.go │ │ │ ├── mmsghdr_unix.go │ │ │ ├── msghdr_bsd.go │ │ │ ├── msghdr_bsdvar.go │ │ │ ├── msghdr_linux.go │ │ │ ├── msghdr_linux_32bit.go │ │ │ ├── msghdr_linux_64bit.go │ │ │ ├── msghdr_openbsd.go │ │ │ ├── msghdr_solaris_64bit.go │ │ │ ├── msghdr_stub.go │ │ │ ├── msghdr_zos_s390x.go │ │ │ ├── norace.go │ │ │ ├── race.go │ │ │ ├── rawconn.go │ │ │ ├── rawconn_mmsg.go │ │ │ ├── rawconn_msg.go │ │ │ ├── rawconn_nommsg.go │ │ │ ├── rawconn_nomsg.go │ │ │ ├── socket.go │ │ │ ├── sys.go │ │ │ ├── sys_bsd.go │ │ │ ├── sys_const_unix.go │ │ │ ├── sys_linux.go │ │ │ ├── sys_linux_386.go │ │ │ ├── sys_linux_386.s │ │ │ ├── sys_linux_amd64.go │ │ │ ├── sys_linux_arm.go │ │ │ ├── sys_linux_arm64.go │ │ │ ├── sys_linux_loong64.go │ │ │ ├── sys_linux_mips.go │ │ │ ├── sys_linux_mips64.go │ │ │ ├── sys_linux_mips64le.go │ │ │ ├── sys_linux_mipsle.go │ │ │ ├── sys_linux_ppc.go │ │ │ ├── sys_linux_ppc64.go │ │ │ ├── sys_linux_ppc64le.go │ │ │ ├── sys_linux_riscv64.go │ │ │ ├── sys_linux_s390x.go │ │ │ ├── sys_linux_s390x.s │ │ │ ├── sys_netbsd.go │ │ │ ├── sys_posix.go │ │ │ ├── sys_stub.go │ │ │ ├── sys_unix.go │ │ │ ├── sys_windows.go │ │ │ ├── sys_zos_s390x.go │ │ │ ├── sys_zos_s390x.s │ │ │ ├── zsys_aix_ppc64.go │ │ │ ├── zsys_darwin_386.go │ │ │ ├── zsys_darwin_amd64.go │ │ │ ├── zsys_darwin_arm.go │ │ │ ├── zsys_darwin_arm64.go │ │ │ ├── zsys_dragonfly_amd64.go │ │ │ ├── zsys_freebsd_386.go │ │ │ ├── zsys_freebsd_amd64.go │ │ │ ├── zsys_freebsd_arm.go │ │ │ ├── zsys_freebsd_arm64.go │ │ │ ├── zsys_linux_386.go │ │ │ ├── zsys_linux_amd64.go │ │ │ ├── zsys_linux_arm.go │ │ │ ├── zsys_linux_arm64.go │ │ │ ├── zsys_linux_loong64.go │ │ │ ├── zsys_linux_mips.go │ │ │ ├── zsys_linux_mips64.go │ │ │ ├── zsys_linux_mips64le.go │ │ │ ├── zsys_linux_mipsle.go │ │ │ ├── zsys_linux_ppc.go │ │ │ ├── zsys_linux_ppc64.go │ │ │ ├── zsys_linux_ppc64le.go │ │ │ ├── zsys_linux_riscv64.go │ │ │ ├── zsys_linux_s390x.go │ │ │ ├── zsys_netbsd_386.go │ │ │ ├── zsys_netbsd_amd64.go │ │ │ ├── zsys_netbsd_arm.go │ │ │ ├── zsys_netbsd_arm64.go │ │ │ ├── zsys_openbsd_386.go │ │ │ ├── zsys_openbsd_amd64.go │ │ │ ├── zsys_openbsd_arm.go │ │ │ ├── zsys_openbsd_arm64.go │ │ │ ├── zsys_openbsd_mips64.go │ │ │ ├── zsys_solaris_amd64.go │ │ │ └── zsys_zos_s390x.go │ ├── ipv4 │ │ ├── batch.go │ │ ├── control.go │ │ ├── control_bsd.go │ │ ├── control_pktinfo.go │ │ ├── control_stub.go │ │ ├── control_unix.go │ │ ├── control_windows.go │ │ ├── control_zos.go │ │ ├── dgramopt.go │ │ ├── doc.go │ │ ├── endpoint.go │ │ ├── genericopt.go │ │ ├── header.go │ │ ├── helper.go │ │ ├── iana.go │ │ ├── icmp.go │ │ ├── icmp_linux.go │ │ ├── icmp_stub.go │ │ ├── packet.go │ │ ├── payload.go │ │ ├── payload_cmsg.go │ │ ├── payload_nocmsg.go │ │ ├── sockopt.go │ │ ├── sockopt_posix.go │ │ ├── sockopt_stub.go │ │ ├── sys_aix.go │ │ ├── sys_asmreq.go │ │ ├── sys_asmreq_stub.go │ │ ├── sys_asmreqn.go │ │ ├── sys_asmreqn_stub.go │ │ ├── sys_bpf.go │ │ ├── sys_bpf_stub.go │ │ ├── sys_bsd.go │ │ ├── sys_darwin.go │ │ ├── sys_dragonfly.go │ │ ├── sys_freebsd.go │ │ ├── sys_linux.go │ │ ├── sys_solaris.go │ │ ├── sys_ssmreq.go │ │ ├── sys_ssmreq_stub.go │ │ ├── sys_stub.go │ │ ├── sys_windows.go │ │ ├── sys_zos.go │ │ ├── zsys_aix_ppc64.go │ │ ├── zsys_darwin.go │ │ ├── zsys_dragonfly.go │ │ ├── zsys_freebsd_386.go │ │ ├── zsys_freebsd_amd64.go │ │ ├── zsys_freebsd_arm.go │ │ ├── zsys_freebsd_arm64.go │ │ ├── zsys_linux_386.go │ │ ├── zsys_linux_amd64.go │ │ ├── zsys_linux_arm.go │ │ ├── zsys_linux_arm64.go │ │ ├── zsys_linux_loong64.go │ │ ├── zsys_linux_mips.go │ │ ├── zsys_linux_mips64.go │ │ ├── zsys_linux_mips64le.go │ │ ├── zsys_linux_mipsle.go │ │ ├── zsys_linux_ppc.go │ │ ├── zsys_linux_ppc64.go │ │ ├── zsys_linux_ppc64le.go │ │ ├── zsys_linux_riscv64.go │ │ ├── zsys_linux_s390x.go │ │ ├── zsys_netbsd.go │ │ ├── zsys_openbsd.go │ │ ├── zsys_solaris.go │ │ └── zsys_zos_s390x.go │ └── ipv6 │ │ ├── batch.go │ │ ├── control.go │ │ ├── control_rfc2292_unix.go │ │ ├── control_rfc3542_unix.go │ │ ├── control_stub.go │ │ ├── control_unix.go │ │ ├── control_windows.go │ │ ├── dgramopt.go │ │ ├── doc.go │ │ ├── endpoint.go │ │ ├── genericopt.go │ │ ├── header.go │ │ ├── helper.go │ │ ├── iana.go │ │ ├── icmp.go │ │ ├── icmp_bsd.go │ │ ├── icmp_linux.go │ │ ├── icmp_solaris.go │ │ ├── icmp_stub.go │ │ ├── icmp_windows.go │ │ ├── icmp_zos.go │ │ ├── payload.go │ │ ├── payload_cmsg.go │ │ ├── payload_nocmsg.go │ │ ├── sockopt.go │ │ ├── sockopt_posix.go │ │ ├── sockopt_stub.go │ │ ├── sys_aix.go │ │ ├── sys_asmreq.go │ │ ├── sys_asmreq_stub.go │ │ ├── sys_bpf.go │ │ ├── sys_bpf_stub.go │ │ ├── sys_bsd.go │ │ ├── sys_darwin.go │ │ ├── sys_freebsd.go │ │ ├── sys_linux.go │ │ ├── sys_solaris.go │ │ ├── sys_ssmreq.go │ │ ├── sys_ssmreq_stub.go │ │ ├── sys_stub.go │ │ ├── sys_windows.go │ │ ├── sys_zos.go │ │ ├── zsys_aix_ppc64.go │ │ ├── zsys_darwin.go │ │ ├── zsys_dragonfly.go │ │ ├── zsys_freebsd_386.go │ │ ├── zsys_freebsd_amd64.go │ │ ├── zsys_freebsd_arm.go │ │ ├── zsys_freebsd_arm64.go │ │ ├── zsys_linux_386.go │ │ ├── zsys_linux_amd64.go │ │ ├── zsys_linux_arm.go │ │ ├── zsys_linux_arm64.go │ │ ├── zsys_linux_loong64.go │ │ ├── zsys_linux_mips.go │ │ ├── zsys_linux_mips64.go │ │ ├── zsys_linux_mips64le.go │ │ ├── zsys_linux_mipsle.go │ │ ├── zsys_linux_ppc.go │ │ ├── zsys_linux_ppc64.go │ │ ├── zsys_linux_ppc64le.go │ │ ├── zsys_linux_riscv64.go │ │ ├── zsys_linux_s390x.go │ │ ├── zsys_netbsd.go │ │ ├── zsys_openbsd.go │ │ ├── zsys_solaris.go │ │ └── zsys_zos_s390x.go │ └── sys │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── internal │ └── unsafeheader │ │ └── unsafeheader.go │ ├── unix │ ├── .gitignore │ ├── README.md │ ├── affinity_linux.go │ ├── aliases.go │ ├── asm_aix_ppc64.s │ ├── asm_bsd_386.s │ ├── asm_bsd_amd64.s │ ├── asm_bsd_arm.s │ ├── asm_bsd_arm64.s │ ├── asm_linux_386.s │ ├── asm_linux_amd64.s │ ├── asm_linux_arm.s │ ├── asm_linux_arm64.s │ ├── asm_linux_loong64.s │ ├── asm_linux_mips64x.s │ ├── asm_linux_mipsx.s │ ├── asm_linux_ppc64x.s │ ├── asm_linux_riscv64.s │ ├── asm_linux_s390x.s │ ├── asm_openbsd_mips64.s │ ├── asm_solaris_amd64.s │ ├── asm_zos_s390x.s │ ├── bluetooth_linux.go │ ├── cap_freebsd.go │ ├── constants.go │ ├── dev_aix_ppc.go │ ├── dev_aix_ppc64.go │ ├── dev_darwin.go │ ├── dev_dragonfly.go │ ├── dev_freebsd.go │ ├── dev_linux.go │ ├── dev_netbsd.go │ ├── dev_openbsd.go │ ├── dev_zos.go │ ├── dirent.go │ ├── endian_big.go │ ├── endian_little.go │ ├── env_unix.go │ ├── epoll_zos.go │ ├── errors_freebsd_386.go │ ├── errors_freebsd_amd64.go │ ├── errors_freebsd_arm.go │ ├── errors_freebsd_arm64.go │ ├── fcntl.go │ ├── fcntl_darwin.go │ ├── fcntl_linux_32bit.go │ ├── fdset.go │ ├── fstatfs_zos.go │ ├── gccgo.go │ ├── gccgo_c.c │ ├── gccgo_linux_amd64.go │ ├── ifreq_linux.go │ ├── ioctl.go │ ├── ioctl_linux.go │ ├── ioctl_zos.go │ ├── mkall.sh │ ├── mkerrors.sh │ ├── pagesize_unix.go │ ├── pledge_openbsd.go │ ├── ptrace_darwin.go │ ├── ptrace_ios.go │ ├── race.go │ ├── race0.go │ ├── readdirent_getdents.go │ ├── readdirent_getdirentries.go │ ├── sockcmsg_dragonfly.go │ ├── sockcmsg_linux.go │ ├── sockcmsg_unix.go │ ├── sockcmsg_unix_other.go │ ├── str.go │ ├── syscall.go │ ├── syscall_aix.go │ ├── syscall_aix_ppc.go │ ├── syscall_aix_ppc64.go │ ├── syscall_bsd.go │ ├── syscall_darwin.1_12.go │ ├── syscall_darwin.1_13.go │ ├── syscall_darwin.go │ ├── syscall_darwin_amd64.go │ ├── syscall_darwin_arm64.go │ ├── syscall_darwin_libSystem.go │ ├── syscall_dragonfly.go │ ├── syscall_dragonfly_amd64.go │ ├── syscall_freebsd.go │ ├── syscall_freebsd_386.go │ ├── syscall_freebsd_amd64.go │ ├── syscall_freebsd_arm.go │ ├── syscall_freebsd_arm64.go │ ├── syscall_illumos.go │ ├── syscall_linux.go │ ├── syscall_linux_386.go │ ├── syscall_linux_alarm.go │ ├── syscall_linux_amd64.go │ ├── syscall_linux_amd64_gc.go │ ├── syscall_linux_arm.go │ ├── syscall_linux_arm64.go │ ├── syscall_linux_gc.go │ ├── syscall_linux_gc_386.go │ ├── syscall_linux_gc_arm.go │ ├── syscall_linux_gccgo_386.go │ ├── syscall_linux_gccgo_arm.go │ ├── syscall_linux_loong64.go │ ├── syscall_linux_mips64x.go │ ├── syscall_linux_mipsx.go │ ├── syscall_linux_ppc.go │ ├── syscall_linux_ppc64x.go │ ├── syscall_linux_riscv64.go │ ├── syscall_linux_s390x.go │ ├── syscall_linux_sparc64.go │ ├── syscall_netbsd.go │ ├── syscall_netbsd_386.go │ ├── syscall_netbsd_amd64.go │ ├── syscall_netbsd_arm.go │ ├── syscall_netbsd_arm64.go │ ├── syscall_openbsd.go │ ├── syscall_openbsd_386.go │ ├── syscall_openbsd_amd64.go │ ├── syscall_openbsd_arm.go │ ├── syscall_openbsd_arm64.go │ ├── syscall_openbsd_mips64.go │ ├── syscall_solaris.go │ ├── syscall_solaris_amd64.go │ ├── syscall_unix.go │ ├── syscall_unix_gc.go │ ├── syscall_unix_gc_ppc64x.go │ ├── syscall_zos_s390x.go │ ├── sysvshm_linux.go │ ├── sysvshm_unix.go │ ├── sysvshm_unix_other.go │ ├── timestruct.go │ ├── unveil_openbsd.go │ ├── xattr_bsd.go │ ├── zerrors_aix_ppc.go │ ├── zerrors_aix_ppc64.go │ ├── zerrors_darwin_amd64.go │ ├── zerrors_darwin_arm64.go │ ├── zerrors_dragonfly_amd64.go │ ├── zerrors_freebsd_386.go │ ├── zerrors_freebsd_amd64.go │ ├── zerrors_freebsd_arm.go │ ├── zerrors_freebsd_arm64.go │ ├── zerrors_linux.go │ ├── zerrors_linux_386.go │ ├── zerrors_linux_amd64.go │ ├── zerrors_linux_arm.go │ ├── zerrors_linux_arm64.go │ ├── zerrors_linux_loong64.go │ ├── zerrors_linux_mips.go │ ├── zerrors_linux_mips64.go │ ├── zerrors_linux_mips64le.go │ ├── zerrors_linux_mipsle.go │ ├── zerrors_linux_ppc.go │ ├── zerrors_linux_ppc64.go │ ├── zerrors_linux_ppc64le.go │ ├── zerrors_linux_riscv64.go │ ├── zerrors_linux_s390x.go │ ├── zerrors_linux_sparc64.go │ ├── zerrors_netbsd_386.go │ ├── zerrors_netbsd_amd64.go │ ├── zerrors_netbsd_arm.go │ ├── zerrors_netbsd_arm64.go │ ├── zerrors_openbsd_386.go │ ├── zerrors_openbsd_amd64.go │ ├── zerrors_openbsd_arm.go │ ├── zerrors_openbsd_arm64.go │ ├── zerrors_openbsd_mips64.go │ ├── zerrors_solaris_amd64.go │ ├── zerrors_zos_s390x.go │ ├── zptrace_armnn_linux.go │ ├── zptrace_linux_arm64.go │ ├── zptrace_mipsnn_linux.go │ ├── zptrace_mipsnnle_linux.go │ ├── zptrace_x86_linux.go │ ├── zsyscall_aix_ppc.go │ ├── zsyscall_aix_ppc64.go │ ├── zsyscall_aix_ppc64_gc.go │ ├── zsyscall_aix_ppc64_gccgo.go │ ├── zsyscall_darwin_amd64.1_13.go │ ├── zsyscall_darwin_amd64.1_13.s │ ├── zsyscall_darwin_amd64.go │ ├── zsyscall_darwin_amd64.s │ ├── zsyscall_darwin_arm64.1_13.go │ ├── zsyscall_darwin_arm64.1_13.s │ ├── zsyscall_darwin_arm64.go │ ├── zsyscall_darwin_arm64.s │ ├── zsyscall_dragonfly_amd64.go │ ├── zsyscall_freebsd_386.go │ ├── zsyscall_freebsd_amd64.go │ ├── zsyscall_freebsd_arm.go │ ├── zsyscall_freebsd_arm64.go │ ├── zsyscall_illumos_amd64.go │ ├── zsyscall_linux.go │ ├── zsyscall_linux_386.go │ ├── zsyscall_linux_amd64.go │ ├── zsyscall_linux_arm.go │ ├── zsyscall_linux_arm64.go │ ├── zsyscall_linux_loong64.go │ ├── zsyscall_linux_mips.go │ ├── zsyscall_linux_mips64.go │ ├── zsyscall_linux_mips64le.go │ ├── zsyscall_linux_mipsle.go │ ├── zsyscall_linux_ppc.go │ ├── zsyscall_linux_ppc64.go │ ├── zsyscall_linux_ppc64le.go │ ├── zsyscall_linux_riscv64.go │ ├── zsyscall_linux_s390x.go │ ├── zsyscall_linux_sparc64.go │ ├── zsyscall_netbsd_386.go │ ├── zsyscall_netbsd_amd64.go │ ├── zsyscall_netbsd_arm.go │ ├── zsyscall_netbsd_arm64.go │ ├── zsyscall_openbsd_386.go │ ├── zsyscall_openbsd_amd64.go │ ├── zsyscall_openbsd_arm.go │ ├── zsyscall_openbsd_arm64.go │ ├── zsyscall_openbsd_mips64.go │ ├── zsyscall_solaris_amd64.go │ ├── zsyscall_zos_s390x.go │ ├── zsysctl_openbsd_386.go │ ├── zsysctl_openbsd_amd64.go │ ├── zsysctl_openbsd_arm.go │ ├── zsysctl_openbsd_arm64.go │ ├── zsysctl_openbsd_mips64.go │ ├── zsysnum_darwin_amd64.go │ ├── zsysnum_darwin_arm64.go │ ├── zsysnum_dragonfly_amd64.go │ ├── zsysnum_freebsd_386.go │ ├── zsysnum_freebsd_amd64.go │ ├── zsysnum_freebsd_arm.go │ ├── zsysnum_freebsd_arm64.go │ ├── zsysnum_linux_386.go │ ├── zsysnum_linux_amd64.go │ ├── zsysnum_linux_arm.go │ ├── zsysnum_linux_arm64.go │ ├── zsysnum_linux_loong64.go │ ├── zsysnum_linux_mips.go │ ├── zsysnum_linux_mips64.go │ ├── zsysnum_linux_mips64le.go │ ├── zsysnum_linux_mipsle.go │ ├── zsysnum_linux_ppc.go │ ├── zsysnum_linux_ppc64.go │ ├── zsysnum_linux_ppc64le.go │ ├── zsysnum_linux_riscv64.go │ ├── zsysnum_linux_s390x.go │ ├── zsysnum_linux_sparc64.go │ ├── zsysnum_netbsd_386.go │ ├── zsysnum_netbsd_amd64.go │ ├── zsysnum_netbsd_arm.go │ ├── zsysnum_netbsd_arm64.go │ ├── zsysnum_openbsd_386.go │ ├── zsysnum_openbsd_amd64.go │ ├── zsysnum_openbsd_arm.go │ ├── zsysnum_openbsd_arm64.go │ ├── zsysnum_openbsd_mips64.go │ ├── zsysnum_zos_s390x.go │ ├── ztypes_aix_ppc.go │ ├── ztypes_aix_ppc64.go │ ├── ztypes_darwin_amd64.go │ ├── ztypes_darwin_arm64.go │ ├── ztypes_dragonfly_amd64.go │ ├── ztypes_freebsd_386.go │ ├── ztypes_freebsd_amd64.go │ ├── ztypes_freebsd_arm.go │ ├── ztypes_freebsd_arm64.go │ ├── ztypes_illumos_amd64.go │ ├── ztypes_linux.go │ ├── ztypes_linux_386.go │ ├── ztypes_linux_amd64.go │ ├── ztypes_linux_arm.go │ ├── ztypes_linux_arm64.go │ ├── ztypes_linux_loong64.go │ ├── ztypes_linux_mips.go │ ├── ztypes_linux_mips64.go │ ├── ztypes_linux_mips64le.go │ ├── ztypes_linux_mipsle.go │ ├── ztypes_linux_ppc.go │ ├── ztypes_linux_ppc64.go │ ├── ztypes_linux_ppc64le.go │ ├── ztypes_linux_riscv64.go │ ├── ztypes_linux_s390x.go │ ├── ztypes_linux_sparc64.go │ ├── ztypes_netbsd_386.go │ ├── ztypes_netbsd_amd64.go │ ├── ztypes_netbsd_arm.go │ ├── ztypes_netbsd_arm64.go │ ├── ztypes_openbsd_386.go │ ├── ztypes_openbsd_amd64.go │ ├── ztypes_openbsd_arm.go │ ├── ztypes_openbsd_arm64.go │ ├── ztypes_openbsd_mips64.go │ ├── ztypes_solaris_amd64.go │ └── ztypes_zos_s390x.go │ └── windows │ ├── aliases.go │ ├── dll_windows.go │ ├── empty.s │ ├── env_windows.go │ ├── eventlog.go │ ├── exec_windows.go │ ├── memory_windows.go │ ├── mkerrors.bash │ ├── mkknownfolderids.bash │ ├── mksyscall.go │ ├── race.go │ ├── race0.go │ ├── security_windows.go │ ├── service.go │ ├── setupapi_windows.go │ ├── str.go │ ├── syscall.go │ ├── syscall_windows.go │ ├── types_windows.go │ ├── types_windows_386.go │ ├── types_windows_amd64.go │ ├── types_windows_arm.go │ ├── types_windows_arm64.go │ ├── zerrors_windows.go │ ├── zknownfolderids_windows.go │ └── zsyscall_windows.go └── modules.txt /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | client/client 26 | server/server 27 | build/* 28 | .DS_Store 29 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.13.x 4 | before_install: 5 | - go get github.com/mattn/goveralls 6 | - go get golang.org/x/tools/cmd/cover 7 | install: 8 | - env GO111MODULE=on go get github.com/xtaci/kcptun/client 9 | - env GO111MODULE=on go get github.com/xtaci/kcptun/server 10 | before_script: 11 | script: 12 | - cd $HOME/gopath/src/github.com/xtaci/kcptun/client 13 | - env GO111MODULE=on $HOME/gopath/bin/goveralls -service=travis-ci 14 | - cd $HOME/gopath/src/github.com/xtaci/kcptun/server 15 | - env GO111MODULE=on $HOME/gopath/bin/goveralls -service=travis-ci 16 | - exit 0 17 | -------------------------------------------------------------------------------- /0x2e4b43ab3d0983da282592571eef61ae5e60f726.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowsocks/kcptun/5668f180546c1c6cb3a8c19e1b8b670d17dca0a6/0x2e4b43ab3d0983da282592571eef61ae5e60f726.png -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.14.9-alpine3.11 as builder 2 | MAINTAINER xtaci 3 | ENV GO111MODULE=on 4 | RUN apk update && \ 5 | apk upgrade && \ 6 | apk add git gcc libc-dev linux-headers 7 | RUN go get -ldflags "-X main.VERSION=$(date -u +%Y%m%d) -s -w" github.com/xtaci/kcptun/client && go get -ldflags "-X main.VERSION=$(date -u +%Y%m%d) -s -w" github.com/xtaci/kcptun/server 8 | 9 | FROM alpine:3.11 10 | RUN apk add --no-cache iptables 11 | COPY --from=builder /go/bin /bin 12 | EXPOSE 29900/udp 13 | EXPOSE 12948 14 | -------------------------------------------------------------------------------- /FEC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowsocks/kcptun/5668f180546c1c6cb3a8c19e1b8b670d17dca0a6/FEC.png -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Daniel Fu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /bw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowsocks/kcptun/5668f180546c1c6cb3a8c19e1b8b670d17dca0a6/bw.png -------------------------------------------------------------------------------- /client/dial.go: -------------------------------------------------------------------------------- 1 | //go:build !android 2 | // +build !android 3 | 4 | package main 5 | 6 | import ( 7 | "crypto/rand" 8 | "encoding/binary" 9 | "fmt" 10 | 11 | "github.com/pkg/errors" 12 | kcp "github.com/xtaci/kcp-go/v5" 13 | "github.com/xtaci/kcptun/generic" 14 | "github.com/xtaci/tcpraw" 15 | ) 16 | 17 | func dial(config *Config, block kcp.BlockCrypt) (*kcp.UDPSession, error) { 18 | mp, err := generic.ParseMultiPort(config.RemoteAddr) 19 | if err != nil { 20 | return nil, err 21 | } 22 | 23 | var randport uint64 24 | err = binary.Read(rand.Reader, binary.LittleEndian, &randport) 25 | if err != nil { 26 | return nil, err 27 | } 28 | 29 | remoteAddr := fmt.Sprintf("%v:%v", mp.Host, uint64(mp.MinPort)+randport%uint64(mp.MaxPort-mp.MinPort+1)) 30 | 31 | if config.TCP { 32 | conn, err := tcpraw.Dial("tcp", remoteAddr) 33 | if err != nil { 34 | return nil, errors.Wrap(err, "tcpraw.Dial()") 35 | } 36 | return kcp.NewConn(remoteAddr, block, config.DataShard, config.ParityShard, conn) 37 | } 38 | return kcp.DialWithOptions(remoteAddr, block, config.DataShard, config.ParityShard) 39 | 40 | } 41 | -------------------------------------------------------------------------------- /client/log.go: -------------------------------------------------------------------------------- 1 | //go:build !android 2 | // +build !android 3 | 4 | package main 5 | 6 | func logInit() { 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /client/signal.go: -------------------------------------------------------------------------------- 1 | // +build linux darwin freebsd 2 | 3 | package main 4 | 5 | import ( 6 | "log" 7 | "os" 8 | "os/signal" 9 | "syscall" 10 | 11 | kcp "github.com/xtaci/kcp-go/v5" 12 | ) 13 | 14 | func init() { 15 | go sigHandler() 16 | } 17 | 18 | func sigHandler() { 19 | ch := make(chan os.Signal, 1) 20 | signal.Notify(ch, syscall.SIGUSR1) 21 | signal.Ignore(syscall.SIGPIPE) 22 | 23 | for { 24 | switch <-ch { 25 | case syscall.SIGUSR1: 26 | log.Printf("KCP SNMP:%+v", kcp.DefaultSnmp.Copy()) 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /client/utils.go: -------------------------------------------------------------------------------- 1 | // +build !android 2 | 3 | package main 4 | 5 | import "github.com/xtaci/kcp-go" 6 | 7 | func DialKCP(raddr string, block kcp.BlockCrypt, dataShards, parityShards int) (*kcp.UDPSession, error) { 8 | return kcp.DialWithOptions(raddr, block, dataShards, parityShards) 9 | } 10 | 11 | func log_init() { 12 | } 13 | -------------------------------------------------------------------------------- /examples/kcptun.service: -------------------------------------------------------------------------------- 1 | [unit] 2 | Description=kcptun 3 | 4 | Wants=network.target 5 | After=syslog.target network-online.target 6 | 7 | [Service] 8 | Type=simple 9 | Environment=GOGC=20 10 | ExecStart=/home/user/client_linux_amd64 -c /home/user/local.json 11 | Restart=on-failure 12 | RestartSec=10 13 | KillMode=process 14 | LimitNOFILE=65536 15 | 16 | [Install] 17 | WantedBy=multi-user.target 18 | -------------------------------------------------------------------------------- /examples/local.json: -------------------------------------------------------------------------------- 1 | { 2 | "localaddr": ":2000", 3 | "remoteaddr": "11.22.33.44:2000", 4 | "key": "PASSWORD", 5 | "crypt": "aes-128", 6 | "mode": "fast3", 7 | "mtu": 1400, 8 | "sndwnd": 128, 9 | "rcvwnd": 1024, 10 | "datashard": 10, 11 | "parityshard": 3, 12 | "dscp": 46, 13 | "nocomp": true, 14 | "acknodelay": false, 15 | "nodelay": 1, 16 | "interval": 40, 17 | "resend": 2, 18 | "nc": 1, 19 | "sockbuf": 16777217, 20 | "smuxver": 1, 21 | "smuxbuf": 16777217, 22 | "streambuf": 2097152, 23 | "keepalive": 10, 24 | "autoexpire": 1800, 25 | "quiet": false, 26 | "tcp": false 27 | } 28 | -------------------------------------------------------------------------------- /examples/server.json: -------------------------------------------------------------------------------- 1 | { 2 | "listen": ":2000", 3 | "target": "127.0.0.1:9999", 4 | "key": "PASSWORD", 5 | "crypt": "aes-128", 6 | "mode": "fast3", 7 | "mtu": 1400, 8 | "sndwnd": 2048, 9 | "rcvwnd": 2048, 10 | "datashard": 10, 11 | "parityshard": 3, 12 | "dscp": 46, 13 | "nocomp": true, 14 | "acknodelay": false, 15 | "nodelay": 1, 16 | "interval": 40, 17 | "resend": 2, 18 | "nc": 1, 19 | "sockbuf": 16777217, 20 | "smuxver": 1, 21 | "smuxbuf": 16777217, 22 | "streambuf": 2097152, 23 | "keepalive": 10, 24 | "pprof":false, 25 | "quiet":false, 26 | "tcp":false 27 | } 28 | -------------------------------------------------------------------------------- /fast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowsocks/kcptun/5668f180546c1c6cb3a8c19e1b8b670d17dca0a6/fast.png -------------------------------------------------------------------------------- /flame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowsocks/kcptun/5668f180546c1c6cb3a8c19e1b8b670d17dca0a6/flame.png -------------------------------------------------------------------------------- /generic/copy.go: -------------------------------------------------------------------------------- 1 | package generic 2 | 3 | import ( 4 | "io" 5 | ) 6 | 7 | const bufSize = 4096 8 | 9 | // Memory optimized io.Copy function specified for this library 10 | func Copy(dst io.Writer, src io.Reader) (written int64, err error) { 11 | // If the reader has a WriteTo method, use it to do the copy. 12 | // Avoids an allocation and a copy. 13 | if wt, ok := src.(io.WriterTo); ok { 14 | return wt.WriteTo(dst) 15 | } 16 | // Similarly, if the writer has a ReadFrom method, use it to do the copy. 17 | if rt, ok := dst.(io.ReaderFrom); ok { 18 | return rt.ReadFrom(src) 19 | } 20 | 21 | // fallback to standard io.CopyBuffer 22 | buf := make([]byte, bufSize) 23 | return io.CopyBuffer(dst, src, buf) 24 | } 25 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/xtaci/kcptun 2 | 3 | require ( 4 | github.com/coreos/go-iptables v0.4.2 // indirect 5 | github.com/golang/snappy v0.0.1 6 | github.com/google/gopacket v1.1.17 // indirect 7 | github.com/klauspost/reedsolomon v1.10.0 // indirect 8 | github.com/pkg/errors v0.9.1 9 | github.com/tjfoc/gmsm v1.4.1 // indirect 10 | github.com/urfave/cli v1.21.0 11 | github.com/xtaci/kcp-go/v5 v5.6.1 12 | github.com/xtaci/smux v1.5.16 13 | github.com/xtaci/tcpraw v1.2.25 14 | golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d 15 | golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect 16 | golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect 17 | ) 18 | 19 | go 1.14 20 | -------------------------------------------------------------------------------- /kcptun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowsocks/kcptun/5668f180546c1c6cb3a8c19e1b8b670d17dca0a6/kcptun.png -------------------------------------------------------------------------------- /layeredparams.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowsocks/kcptun/5668f180546c1c6cb3a8c19e1b8b670d17dca0a6/layeredparams.png -------------------------------------------------------------------------------- /logo-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowsocks/kcptun/5668f180546c1c6cb3a8c19e1b8b670d17dca0a6/logo-small.png -------------------------------------------------------------------------------- /logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowsocks/kcptun/5668f180546c1c6cb3a8c19e1b8b670d17dca0a6/logo.png -------------------------------------------------------------------------------- /server/signal.go: -------------------------------------------------------------------------------- 1 | // +build linux darwin freebsd 2 | 3 | package main 4 | 5 | import ( 6 | "log" 7 | "os" 8 | "os/signal" 9 | "syscall" 10 | 11 | kcp "github.com/xtaci/kcp-go/v5" 12 | ) 13 | 14 | func init() { 15 | go sigHandler() 16 | } 17 | 18 | func sigHandler() { 19 | ch := make(chan os.Signal, 1) 20 | signal.Notify(ch, syscall.SIGUSR1) 21 | signal.Ignore(syscall.SIGPIPE) 22 | 23 | for { 24 | switch <-ch { 25 | case syscall.SIGUSR1: 26 | log.Printf("KCP SNMP:%+v", kcp.DefaultSnmp.Copy()) 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/coreos/go-iptables/NOTICE: -------------------------------------------------------------------------------- 1 | CoreOS Project 2 | Copyright 2018 CoreOS, Inc 3 | 4 | This product includes software developed at CoreOS, Inc. 5 | (http://www.coreos.com/). 6 | -------------------------------------------------------------------------------- /vendor/github.com/golang/snappy/.gitignore: -------------------------------------------------------------------------------- 1 | cmd/snappytool/snappytool 2 | testdata/bench 3 | 4 | # These explicitly listed benchmark data files are for an obsolete version of 5 | # snappy_test.go. 6 | testdata/alice29.txt 7 | testdata/asyoulik.txt 8 | testdata/fireworks.jpeg 9 | testdata/geo.protodata 10 | testdata/html 11 | testdata/html_x_4 12 | testdata/kppkn.gtb 13 | testdata/lcet10.txt 14 | testdata/paper-100k.pdf 15 | testdata/plrabn12.txt 16 | testdata/urls.10K 17 | -------------------------------------------------------------------------------- /vendor/github.com/golang/snappy/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of Snappy-Go authors for copyright purposes. 2 | # This file is distinct from the CONTRIBUTORS files. 3 | # See the latter for an explanation. 4 | 5 | # Names should be added to this file as 6 | # Name or Organization 7 | # The email address is not required for organizations. 8 | 9 | # Please keep the list sorted. 10 | 11 | Damian Gryski 12 | Google Inc. 13 | Jan Mercl <0xjnml@gmail.com> 14 | Rodolfo Carvalho 15 | Sebastien Binet 16 | -------------------------------------------------------------------------------- /vendor/github.com/golang/snappy/decode_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Snappy-Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !appengine 6 | // +build gc 7 | // +build !noasm 8 | 9 | package snappy 10 | 11 | // decode has the same semantics as in decode_other.go. 12 | // 13 | //go:noescape 14 | func decode(dst, src []byte) int 15 | -------------------------------------------------------------------------------- /vendor/github.com/golang/snappy/encode_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Snappy-Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !appengine 6 | // +build gc 7 | // +build !noasm 8 | 9 | package snappy 10 | 11 | // emitLiteral has the same semantics as in encode_other.go. 12 | // 13 | //go:noescape 14 | func emitLiteral(dst, lit []byte) int 15 | 16 | // emitCopy has the same semantics as in encode_other.go. 17 | // 18 | //go:noescape 19 | func emitCopy(dst []byte, offset, length int) int 20 | 21 | // extendMatch has the same semantics as in encode_other.go. 22 | // 23 | //go:noescape 24 | func extendMatch(src []byte, i, j int) int 25 | 26 | // encodeBlock has the same semantics as in encode_other.go. 27 | // 28 | //go:noescape 29 | func encodeBlock(dst, src []byte) (d int) 30 | -------------------------------------------------------------------------------- /vendor/github.com/golang/snappy/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/golang/snappy 2 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | #* 24 | *~ 25 | 26 | # examples binaries 27 | examples/synscan/synscan 28 | examples/pfdump/pfdump 29 | examples/pcapdump/pcapdump 30 | examples/httpassembly/httpassembly 31 | examples/statsassembly/statsassembly 32 | examples/arpscan/arpscan 33 | examples/bidirectional/bidirectional 34 | examples/bytediff/bytediff 35 | examples/reassemblydump/reassemblydump 36 | layers/gen 37 | macs/gen 38 | pcap/pcap_tester 39 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/.travis.gofmt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "$(dirname $0)" 4 | if [ -n "$(go fmt ./...)" ]; then 5 | echo "Go code is not formatted, run 'go fmt github.com/google/stenographer/...'" >&2 6 | exit 1 7 | fi 8 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/.travis.golint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "$(dirname $0)" 4 | 5 | go get golang.org/x/lint/golint 6 | DIRS=". tcpassembly tcpassembly/tcpreader ip4defrag reassembly macs pcapgo pcap afpacket pfring routing defrag/lcmdefrag" 7 | # Add subdirectories here as we clean up golint on each. 8 | for subdir in $DIRS; do 9 | pushd $subdir 10 | if golint | 11 | grep -v CannotSetRFMon | # pcap exported error name 12 | grep -v DataLost | # tcpassembly/tcpreader exported error name 13 | grep .; then 14 | exit 1 15 | fi 16 | popd 17 | done 18 | 19 | pushd layers 20 | for file in *.go; do 21 | if cat .lint_blacklist | grep -q $file; then 22 | echo "Skipping lint of $file due to .lint_blacklist" 23 | elif golint $file | grep .; then 24 | echo "Lint error in file $file" 25 | exit 1 26 | fi 27 | done 28 | popd 29 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/.travis.govet.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd "$(dirname $0)" 4 | DIRS=". layers pcap pcapgo tcpassembly tcpassembly/tcpreader routing ip4defrag bytediff macs defrag/lcmdefrag" 5 | set -e 6 | for subdir in $DIRS; do 7 | pushd $subdir 8 | go vet 9 | popd 10 | done 11 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/.travis.install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ev 4 | 5 | go get github.com/google/gopacket 6 | go get github.com/google/gopacket/layers 7 | go get github.com/google/gopacket/tcpassembly 8 | go get github.com/google/gopacket/reassembly 9 | go get github.com/google/gopacket/pcapgo 10 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/.travis.script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ev 4 | 5 | go test github.com/google/gopacket 6 | go test github.com/google/gopacket/layers 7 | go test github.com/google/gopacket/tcpassembly 8 | go test github.com/google/gopacket/reassembly 9 | go test github.com/google/gopacket/pcapgo 10 | go test github.com/google/gopacket/pcap 11 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/README.md: -------------------------------------------------------------------------------- 1 | # GoPacket 2 | 3 | This library provides packet decoding capabilities for Go. 4 | See [godoc](https://godoc.org/github.com/google/gopacket) for more details. 5 | 6 | [![Build Status](https://travis-ci.org/google/gopacket.svg?branch=master)](https://travis-ci.org/google/gopacket) 7 | [![GoDoc](https://godoc.org/github.com/google/gopacket?status.svg)](https://godoc.org/github.com/google/gopacket) 8 | 9 | Minimum Go version required is 1.5 except for pcapgo/EthernetHandle, afpacket, and bsdbpf which need at least 1.7 due to x/sys/unix dependencies. 10 | 11 | Originally forked from the gopcap project written by Andreas 12 | Krennmair (http://github.com/akrennmair/gopcap). 13 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/google/gopacket 2 | 3 | go 1.12 4 | 5 | require ( 6 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 7 | golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/go.sum: -------------------------------------------------------------------------------- 1 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 2 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ= 3 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 4 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 5 | golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67 h1:1Fzlr8kkDLQwqMP8GxrhptBLqZG/EDpiATneiZHY998= 6 | golang.org/x/sys v0.0.0-20190405154228-4b34438f7a67/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 7 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 8 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/layers/.lint_blacklist: -------------------------------------------------------------------------------- 1 | dot11.go 2 | eap.go 3 | endpoints.go 4 | enums_generated.go 5 | enums.go 6 | ethernet.go 7 | geneve.go 8 | icmp4.go 9 | icmp6.go 10 | igmp.go 11 | ip4.go 12 | ip6.go 13 | layertypes.go 14 | linux_sll.go 15 | llc.go 16 | lldp.go 17 | mpls.go 18 | ndp.go 19 | ntp.go 20 | ospf.go 21 | pflog.go 22 | pppoe.go 23 | prism.go 24 | radiotap.go 25 | rudp.go 26 | sctp.go 27 | sflow.go 28 | tcp.go 29 | tcpip.go 30 | tls.go 31 | tls_alert.go 32 | tls_appdata.go 33 | tls_cipherspec.go 34 | tls_hanshake.go 35 | tls_test.go 36 | udp.go 37 | udplite.go 38 | usb.go 39 | vrrp.go 40 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/layers/gen_linted.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for i in *.go; do golint $i | grep -q . || echo $i; done > .linted 4 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/layers/stp.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Google, Inc. All rights reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license 4 | // that can be found in the LICENSE file in the root of the source 5 | // tree. 6 | 7 | package layers 8 | 9 | import ( 10 | "github.com/google/gopacket" 11 | ) 12 | 13 | // STP decode spanning tree protocol packets to transport BPDU (bridge protocol data unit) message. 14 | type STP struct { 15 | BaseLayer 16 | } 17 | 18 | // LayerType returns gopacket.LayerTypeSTP. 19 | func (s *STP) LayerType() gopacket.LayerType { return LayerTypeSTP } 20 | 21 | func decodeSTP(data []byte, p gopacket.PacketBuilder) error { 22 | stp := &STP{} 23 | stp.Contents = data[:] 24 | // TODO: parse the STP protocol into actual subfields. 25 | p.AddLayer(stp) 26 | return nil 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/layers/tls_appdata.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The GoPacket Authors. All rights reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license 4 | // that can be found in the LICENSE file in the root of the source 5 | // tree. 6 | 7 | package layers 8 | 9 | import ( 10 | "errors" 11 | 12 | "github.com/google/gopacket" 13 | ) 14 | 15 | // TLSAppDataRecord contains all the information that each AppData Record types should have 16 | type TLSAppDataRecord struct { 17 | TLSRecordHeader 18 | Payload []byte 19 | } 20 | 21 | // DecodeFromBytes decodes the slice into the TLS struct. 22 | func (t *TLSAppDataRecord) decodeFromBytes(h TLSRecordHeader, data []byte, df gopacket.DecodeFeedback) error { 23 | // TLS Record Header 24 | t.ContentType = h.ContentType 25 | t.Version = h.Version 26 | t.Length = h.Length 27 | 28 | if len(data) != int(t.Length) { 29 | return errors.New("TLS Application Data length mismatch") 30 | } 31 | 32 | t.Payload = data 33 | return nil 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/google/gopacket/layers/tls_handshake.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The GoPacket Authors. All rights reserved. 2 | // 3 | // Use of this source code is governed by a BSD-style license 4 | // that can be found in the LICENSE file in the root of the source 5 | // tree. 6 | 7 | package layers 8 | 9 | import ( 10 | "github.com/google/gopacket" 11 | ) 12 | 13 | // TLSHandshakeRecord defines the structure of a Handshare Record 14 | type TLSHandshakeRecord struct { 15 | TLSRecordHeader 16 | } 17 | 18 | // DecodeFromBytes decodes the slice into the TLS struct. 19 | func (t *TLSHandshakeRecord) decodeFromBytes(h TLSRecordHeader, data []byte, df gopacket.DecodeFeedback) error { 20 | // TLS Record Header 21 | t.ContentType = h.ContentType 22 | t.Version = h.Version 23 | t.Length = h.Length 24 | 25 | // TODO 26 | 27 | return nil 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/cpuid/v2/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/cpuid/v2/cpuid_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file. 2 | 3 | //+build arm64,!gccgo,!noasm,!appengine 4 | 5 | // See https://www.kernel.org/doc/Documentation/arm64/cpu-feature-registers.txt 6 | 7 | // func getMidr 8 | TEXT ·getMidr(SB), 7, $0 9 | WORD $0xd5380000 // mrs x0, midr_el1 /* Main ID Register */ 10 | MOVD R0, midr+0(FP) 11 | RET 12 | 13 | // func getProcFeatures 14 | TEXT ·getProcFeatures(SB), 7, $0 15 | WORD $0xd5380400 // mrs x0, id_aa64pfr0_el1 /* Processor Feature Register 0 */ 16 | MOVD R0, procFeatures+0(FP) 17 | RET 18 | 19 | // func getInstAttributes 20 | TEXT ·getInstAttributes(SB), 7, $0 21 | WORD $0xd5380600 // mrs x0, id_aa64isar0_el1 /* Instruction Set Attribute Register 0 */ 22 | WORD $0xd5380621 // mrs x1, id_aa64isar1_el1 /* Instruction Set Attribute Register 1 */ 23 | MOVD R0, instAttrReg0+0(FP) 24 | MOVD R1, instAttrReg1+8(FP) 25 | RET 26 | 27 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/cpuid/v2/detect_ref.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file. 2 | 3 | //go:build (!amd64 && !386 && !arm64) || gccgo || noasm || appengine 4 | // +build !amd64,!386,!arm64 gccgo noasm appengine 5 | 6 | package cpuid 7 | 8 | func initCPU() { 9 | cpuid = func(uint32) (a, b, c, d uint32) { return 0, 0, 0, 0 } 10 | cpuidex = func(x, y uint32) (a, b, c, d uint32) { return 0, 0, 0, 0 } 11 | xgetbv = func(uint32) (a, b uint32) { return 0, 0 } 12 | rdtscpAsm = func() (a, b, c, d uint32) { return 0, 0, 0, 0 } 13 | } 14 | 15 | func addInfo(info *CPUInfo, safe bool) {} 16 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/cpuid/v2/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/klauspost/cpuid/v2 2 | 3 | go 1.15 4 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/cpuid/v2/os_darwin_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020 Klaus Post, released under MIT License. See LICENSE file. 2 | 3 | package cpuid 4 | 5 | import "runtime" 6 | 7 | func detectOS(c *CPUInfo) bool { 8 | // There are no hw.optional sysctl values for the below features on Mac OS 11.0 9 | // to detect their supported state dynamically. Assume the CPU features that 10 | // Apple Silicon M1 supports to be available as a minimal set of features 11 | // to all Go programs running on darwin/arm64. 12 | // TODO: Add more if we know them. 13 | c.featureSet.setIf(runtime.GOOS != "ios", AESARM, PMULL, SHA1, SHA2) 14 | c.PhysicalCores = runtime.NumCPU() 15 | // For now assuming 1 thread per core... 16 | c.ThreadsPerCore = 1 17 | c.LogicalCores = c.PhysicalCores 18 | return true 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/cpuid/v2/os_other_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020 Klaus Post, released under MIT License. See LICENSE file. 2 | 3 | //go:build arm64 && !linux && !darwin 4 | // +build arm64,!linux,!darwin 5 | 6 | package cpuid 7 | 8 | import "runtime" 9 | 10 | func detectOS(c *CPUInfo) bool { 11 | c.PhysicalCores = runtime.NumCPU() 12 | // For now assuming 1 thread per core... 13 | c.ThreadsPerCore = 1 14 | c.LogicalCores = c.PhysicalCores 15 | return false 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/cpuid/v2/os_safe_linux_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021 Klaus Post, released under MIT License. See LICENSE file. 2 | 3 | //go:build nounsafe 4 | // +build nounsafe 5 | 6 | package cpuid 7 | 8 | var hwcap uint 9 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/cpuid/v2/os_unsafe_linux_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2021 Klaus Post, released under MIT License. See LICENSE file. 2 | 3 | //go:build !nounsafe 4 | // +build !nounsafe 5 | 6 | package cpuid 7 | 8 | import _ "unsafe" // needed for go:linkname 9 | 10 | //go:linkname hwcap internal/cpu.HWCap 11 | var hwcap uint 12 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/cpuid/v2/test-architectures.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | go tool dist list | while IFS=/ read os arch; do 6 | echo "Checking $os/$arch..." 7 | echo " normal" 8 | GOARCH=$arch GOOS=$os go build -o /dev/null . 9 | echo " noasm" 10 | GOARCH=$arch GOOS=$os go build -tags noasm -o /dev/null . 11 | echo " appengine" 12 | GOARCH=$arch GOOS=$os go build -tags appengine -o /dev/null . 13 | echo " noasm,appengine" 14 | GOARCH=$arch GOOS=$os go build -tags 'appengine noasm' -o /dev/null . 15 | done 16 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/reedsolomon/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | 26 | .idea -------------------------------------------------------------------------------- /vendor/github.com/klauspost/reedsolomon/galois_gen_none.go: -------------------------------------------------------------------------------- 1 | //go:build !amd64 || noasm || appengine || gccgo || nogen 2 | // +build !amd64 noasm appengine gccgo nogen 3 | 4 | package reedsolomon 5 | 6 | const maxAvx2Inputs = 1 7 | const maxAvx2Outputs = 1 8 | const minAvx2Size = 1 9 | const avxSizeMask = 0 10 | const avx2CodeGen = false 11 | 12 | func galMulSlicesAvx2(matrix []byte, in, out [][]byte, start, stop int) int { 13 | panic("avx2 codegen not available") 14 | } 15 | 16 | func galMulSlicesAvx2Xor(matrix []byte, in, out [][]byte, start, stop int) int { 17 | panic("avx2 codegen not available") 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/reedsolomon/galois_notamd64.go: -------------------------------------------------------------------------------- 1 | //go:build !amd64 || noasm || appengine || gccgo 2 | // +build !amd64 noasm appengine gccgo 3 | 4 | // Copyright 2020, Klaus Post, see LICENSE for details. 5 | 6 | package reedsolomon 7 | 8 | func (r *reedSolomon) codeSomeShardsAvx512(matrixRows, inputs, outputs [][]byte, byteCount int) { 9 | panic("codeSomeShardsAvx512 should not be called if built without asm") 10 | } 11 | 12 | func (r *reedSolomon) codeSomeShardsAvx512P(matrixRows, inputs, outputs [][]byte, byteCount int) { 13 | panic("codeSomeShardsAvx512P should not be called if built without asm") 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/reedsolomon/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/klauspost/reedsolomon 2 | 3 | go 1.15 4 | 5 | require github.com/klauspost/cpuid/v2 v2.0.14 6 | -------------------------------------------------------------------------------- /vendor/github.com/klauspost/reedsolomon/go.sum: -------------------------------------------------------------------------------- 1 | github.com/klauspost/cpuid/v2 v2.0.14 h1:QRqdp6bb9M9S5yyKeYteXKuoKE4p0tGlra81fKOpWH8= 2 | github.com/klauspost/cpuid/v2 v2.0.14/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= 3 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/pkg/errors 3 | go: 4 | - 1.11.x 5 | - 1.12.x 6 | - 1.13.x 7 | - tip 8 | 9 | script: 10 | - make check 11 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/Makefile: -------------------------------------------------------------------------------- 1 | PKGS := github.com/pkg/errors 2 | SRCDIRS := $(shell go list -f '{{.Dir}}' $(PKGS)) 3 | GO := go 4 | 5 | check: test vet gofmt misspell unconvert staticcheck ineffassign unparam 6 | 7 | test: 8 | $(GO) test $(PKGS) 9 | 10 | vet: | test 11 | $(GO) vet $(PKGS) 12 | 13 | staticcheck: 14 | $(GO) get honnef.co/go/tools/cmd/staticcheck 15 | staticcheck -checks all $(PKGS) 16 | 17 | misspell: 18 | $(GO) get github.com/client9/misspell/cmd/misspell 19 | misspell \ 20 | -locale GB \ 21 | -error \ 22 | *.md *.go 23 | 24 | unconvert: 25 | $(GO) get github.com/mdempsky/unconvert 26 | unconvert -v $(PKGS) 27 | 28 | ineffassign: 29 | $(GO) get github.com/gordonklaus/ineffassign 30 | find $(SRCDIRS) -name '*.go' | xargs ineffassign 31 | 32 | pedantic: check errcheck 33 | 34 | unparam: 35 | $(GO) get mvdan.cc/unparam 36 | unparam ./... 37 | 38 | errcheck: 39 | $(GO) get github.com/kisielk/errcheck 40 | errcheck $(PKGS) 41 | 42 | gofmt: 43 | @echo Checking code is gofmted 44 | @test -z "$(shell gofmt -s -l -d -e $(SRCDIRS) | tee /dev/stderr)" 45 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: build-{build}.{branch} 2 | 3 | clone_folder: C:\gopath\src\github.com\pkg\errors 4 | shallow_clone: true # for startup speed 5 | 6 | environment: 7 | GOPATH: C:\gopath 8 | 9 | platform: 10 | - x64 11 | 12 | # http://www.appveyor.com/docs/installed-software 13 | install: 14 | # some helpful output for debugging builds 15 | - go version 16 | - go env 17 | # pre-installed MinGW at C:\MinGW is 32bit only 18 | # but MSYS2 at C:\msys64 has mingw64 19 | - set PATH=C:\msys64\mingw64\bin;%PATH% 20 | - gcc --version 21 | - g++ --version 22 | 23 | build_script: 24 | - go install -v ./... 25 | 26 | test_script: 27 | - set PATH=C:\gopath\bin;%PATH% 28 | - go test -v ./... 29 | 30 | #artifacts: 31 | # - path: '%GOPATH%\bin\*.exe' 32 | deploy: off 33 | -------------------------------------------------------------------------------- /vendor/github.com/templexxx/cpu/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, build with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | -------------------------------------------------------------------------------- /vendor/github.com/templexxx/cpu/README.md: -------------------------------------------------------------------------------- 1 | # cpu 2 | internal/cpu(in Go standard lib) with these detections: 3 | 4 | >- AVX512 5 | > 6 | >- Cache Size 7 | > 8 | >- Invariant TSC 9 | > 10 | 11 | It also provides: 12 | 13 | >- False sharing range, see `X86FalseSharingRange` for X86 platform. 14 | > 15 | >- TSC frequency 16 | > 17 | >- Name 18 | > 19 | >- Family & Model 20 | 21 | # Acknowledgement 22 | 23 | [klauspost/cpuid](https://github.com/klauspost/cpuid) -------------------------------------------------------------------------------- /vendor/github.com/templexxx/cpu/cpu_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cpu 6 | 7 | const GOARCH = "386" 8 | -------------------------------------------------------------------------------- /vendor/github.com/templexxx/cpu/cpu_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cpu 6 | 7 | const GOARCH = "amd64" 8 | -------------------------------------------------------------------------------- /vendor/github.com/templexxx/cpu/cpu_amd64p32.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cpu 6 | 7 | const GOARCH = "amd64p32" 8 | -------------------------------------------------------------------------------- /vendor/github.com/templexxx/cpu/cpu_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cpu 6 | 7 | const CacheLineSize = 32 8 | -------------------------------------------------------------------------------- /vendor/github.com/templexxx/cpu/cpu_mips.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cpu 6 | 7 | const CacheLineSize = 32 8 | -------------------------------------------------------------------------------- /vendor/github.com/templexxx/cpu/cpu_mips64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cpu 6 | 7 | const CacheLineSize = 32 8 | -------------------------------------------------------------------------------- /vendor/github.com/templexxx/cpu/cpu_mips64le.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cpu 6 | 7 | const CacheLineSize = 32 8 | -------------------------------------------------------------------------------- /vendor/github.com/templexxx/cpu/cpu_mipsle.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cpu 6 | 7 | const CacheLineSize = 32 8 | -------------------------------------------------------------------------------- /vendor/github.com/templexxx/cpu/cpu_no_init.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !386 6 | // +build !amd64 7 | // +build !amd64p32 8 | // +build !arm64 9 | // +build !ppc64 10 | // +build !ppc64le 11 | // +build !s390x 12 | 13 | package cpu 14 | 15 | func doinit() { 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/templexxx/cpu/cpu_wasm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cpu 6 | 7 | const CacheLineSize = 64 8 | -------------------------------------------------------------------------------- /vendor/github.com/templexxx/cpu/cpu_x86.s: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386 amd64 amd64p32 6 | 7 | #include "textflag.h" 8 | 9 | // func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) 10 | TEXT ·cpuid(SB), NOSPLIT, $0-24 11 | MOVL eaxArg+0(FP), AX 12 | MOVL ecxArg+4(FP), CX 13 | CPUID 14 | MOVL AX, eax+8(FP) 15 | MOVL BX, ebx+12(FP) 16 | MOVL CX, ecx+16(FP) 17 | MOVL DX, edx+20(FP) 18 | RET 19 | 20 | // func xgetbv() (eax, edx uint32) 21 | TEXT ·xgetbv(SB),NOSPLIT,$0-8 22 | #ifdef GOOS_nacl 23 | // nacl does not support XGETBV. 24 | MOVL $0, eax+0(FP) 25 | MOVL $0, edx+4(FP) 26 | #else 27 | MOVL $0, CX 28 | XGETBV 29 | MOVL AX, eax+0(FP) 30 | MOVL DX, edx+4(FP) 31 | #endif 32 | RET 33 | -------------------------------------------------------------------------------- /vendor/github.com/templexxx/xorsimd/.gitattributes: -------------------------------------------------------------------------------- 1 | *.s linguist-language=go:x 2 | -------------------------------------------------------------------------------- /vendor/github.com/templexxx/xorsimd/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, build with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | .idea 14 | -------------------------------------------------------------------------------- /vendor/github.com/templexxx/xorsimd/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/templexxx/xorsimd 2 | 3 | require github.com/templexxx/cpu v0.0.1 4 | 5 | go 1.13 6 | -------------------------------------------------------------------------------- /vendor/github.com/templexxx/xorsimd/go.sum: -------------------------------------------------------------------------------- 1 | github.com/templexxx/cpu v0.0.1 h1:hY4WdLOgKdc8y13EYklu9OUTXik80BkxHoWvTO6MQQY= 2 | github.com/templexxx/cpu v0.0.1/go.mod h1:w7Tb+7qgcAlIyX4NhLuDKt78AHA5SzPmq0Wj6HiEnnk= 3 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | max-line-length = 120 3 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/.gitignore: -------------------------------------------------------------------------------- 1 | *.coverprofile 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | dist: trusty 4 | osx_image: xcode8.3 5 | go: 1.11.x 6 | 7 | os: 8 | - linux 9 | - osx 10 | 11 | cache: 12 | directories: 13 | - node_modules 14 | 15 | before_script: 16 | - go get github.com/urfave/gfmrun/... || true 17 | - go get golang.org/x/tools/cmd/goimports 18 | - if [ ! -f node_modules/.bin/markdown-toc ] ; then 19 | npm install markdown-toc ; 20 | fi 21 | 22 | script: 23 | - ./runtests gen 24 | - ./runtests vet 25 | - ./runtests test 26 | - ./runtests gfmrun 27 | - ./runtests toc 28 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | **NOTE**: the primary maintainer(s) may be found in 4 | [./MAINTAINERS.md](./MAINTAINERS.md). 5 | 6 | Feel free to put up a pull request to fix a bug or maybe add a feature. I will 7 | give it a code review and make sure that it does not break backwards 8 | compatibility. If I or any other collaborators agree that it is in line with 9 | the vision of the project, we will work with you to get the code into 10 | a mergeable state and merge it into the master branch. 11 | 12 | If you have contributed something significant to the project, we will most 13 | likely add you as a collaborator. As a collaborator you are given the ability 14 | to merge others pull requests. It is very important that new code does not 15 | break existing code, so be careful about what code you do choose to merge. 16 | 17 | If you feel like you have contributed to the project but have not yet been added 18 | as a collaborator, we probably forgot to add you :sweat_smile:. Please open an 19 | issue! 20 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Jeremy Saenz & Contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | - @meatballhat 2 | - @lynncyrin 3 | - @AudriusButkevicius 4 | - @asahasrabuddhe 5 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | 3 | os: Windows Server 2016 4 | 5 | image: Visual Studio 2017 6 | 7 | clone_folder: c:\gopath\src\github.com\urfave\cli 8 | 9 | environment: 10 | GOPATH: C:\gopath 11 | GOVERSION: 1.8.x 12 | PYTHON: C:\Python36-x64 13 | PYTHON_VERSION: 3.6.x 14 | PYTHON_ARCH: 64 15 | 16 | install: 17 | - set PATH=%GOPATH%\bin;C:\go\bin;%PATH% 18 | - go version 19 | - go env 20 | - go get github.com/urfave/gfmrun/... 21 | - go get -v -t ./... 22 | 23 | build_script: 24 | - python runtests vet 25 | - python runtests test 26 | - python runtests gfmrun 27 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/cli.go: -------------------------------------------------------------------------------- 1 | // Package cli provides a minimal framework for creating and organizing command line 2 | // Go applications. cli is designed to be easy to understand and write, the most simple 3 | // cli application can be written as follows: 4 | // func main() { 5 | // cli.NewApp().Run(os.Args) 6 | // } 7 | // 8 | // Of course this application does not do much, so let's make this an actual application: 9 | // func main() { 10 | // app := cli.NewApp() 11 | // app.Name = "greet" 12 | // app.Usage = "say a greeting" 13 | // app.Action = func(c *cli.Context) error { 14 | // println("Greetings") 15 | // return nil 16 | // } 17 | // 18 | // app.Run(os.Args) 19 | // } 20 | package cli 21 | 22 | //go:generate python ./generate-flag-types cli -i flag-types.json -o flag_generated.go 23 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/urfave/cli 2 | 3 | go 1.12 4 | 5 | require ( 6 | github.com/BurntSushi/toml v0.3.1 7 | gopkg.in/yaml.v2 v2.2.2 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/go.sum: -------------------------------------------------------------------------------- 1 | github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= 2 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 3 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= 4 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 5 | gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= 6 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 7 | -------------------------------------------------------------------------------- /vendor/github.com/urfave/cli/sort.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import "unicode" 4 | 5 | // lexicographicLess compares strings alphabetically considering case. 6 | func lexicographicLess(i, j string) bool { 7 | iRunes := []rune(i) 8 | jRunes := []rune(j) 9 | 10 | lenShared := len(iRunes) 11 | if lenShared > len(jRunes) { 12 | lenShared = len(jRunes) 13 | } 14 | 15 | for index := 0; index < lenShared; index++ { 16 | ir := iRunes[index] 17 | jr := jRunes[index] 18 | 19 | if lir, ljr := unicode.ToLower(ir), unicode.ToLower(jr); lir != ljr { 20 | return lir < ljr 21 | } 22 | 23 | if ir != jr { 24 | return ir < jr 25 | } 26 | } 27 | 28 | return i < j 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/xtaci/kcp-go/v5/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | /vendor/ 10 | 11 | # Architecture specific extensions/prefixes 12 | *.[568vq] 13 | [568vq].out 14 | 15 | *.cgo1.go 16 | *.cgo2.c 17 | _cgo_defun.c 18 | _cgo_gotypes.go 19 | _cgo_export.* 20 | 21 | _testmain.go 22 | 23 | *.exe 24 | *.test 25 | *.prof 26 | -------------------------------------------------------------------------------- /vendor/github.com/xtaci/kcp-go/v5/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.11.x 4 | - 1.12.x 5 | - 1.13.x 6 | 7 | env: 8 | - GO111MODULE=on 9 | 10 | before_install: 11 | - go get -t -v ./... 12 | 13 | install: 14 | - go get github.com/xtaci/kcp-go 15 | 16 | script: 17 | - go test -coverprofile=coverage.txt -covermode=atomic -bench . -timeout 10m 18 | 19 | after_success: 20 | - bash <(curl -s https://codecov.io/bash) 21 | -------------------------------------------------------------------------------- /vendor/github.com/xtaci/kcp-go/v5/batchconn.go: -------------------------------------------------------------------------------- 1 | package kcp 2 | 3 | import "golang.org/x/net/ipv4" 4 | 5 | const ( 6 | batchSize = 16 7 | ) 8 | 9 | type batchConn interface { 10 | WriteBatch(ms []ipv4.Message, flags int) (int, error) 11 | ReadBatch(ms []ipv4.Message, flags int) (int, error) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/xtaci/kcp-go/v5/donate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowsocks/kcptun/5668f180546c1c6cb3a8c19e1b8b670d17dca0a6/vendor/github.com/xtaci/kcp-go/v5/donate.png -------------------------------------------------------------------------------- /vendor/github.com/xtaci/kcp-go/v5/flame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowsocks/kcptun/5668f180546c1c6cb3a8c19e1b8b670d17dca0a6/vendor/github.com/xtaci/kcp-go/v5/flame.png -------------------------------------------------------------------------------- /vendor/github.com/xtaci/kcp-go/v5/frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowsocks/kcptun/5668f180546c1c6cb3a8c19e1b8b670d17dca0a6/vendor/github.com/xtaci/kcp-go/v5/frame.png -------------------------------------------------------------------------------- /vendor/github.com/xtaci/kcp-go/v5/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/xtaci/kcp-go/v5 2 | 3 | require ( 4 | github.com/klauspost/cpuid v1.3.1 // indirect 5 | github.com/klauspost/reedsolomon v1.9.9 6 | github.com/mmcloughlin/avo v0.0.0-20200803215136-443f81d77104 // indirect 7 | github.com/pkg/errors v0.9.1 8 | github.com/stretchr/testify v1.6.1 9 | github.com/templexxx/cpu v0.0.7 // indirect 10 | github.com/templexxx/xorsimd v0.4.1 11 | github.com/tjfoc/gmsm v1.3.2 12 | github.com/xtaci/lossyconn v0.0.0-20190602105132-8df528c0c9ae 13 | golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de 14 | golang.org/x/net v0.0.0-20200707034311-ab3426394381 15 | golang.org/x/sys v0.0.0-20200808120158-1030fc2bf1d9 // indirect 16 | golang.org/x/tools v0.0.0-20200808161706-5bf02b21f123 // indirect 17 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect 18 | ) 19 | 20 | go 1.13 21 | -------------------------------------------------------------------------------- /vendor/github.com/xtaci/kcp-go/v5/kcp-go.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowsocks/kcptun/5668f180546c1c6cb3a8c19e1b8b670d17dca0a6/vendor/github.com/xtaci/kcp-go/v5/kcp-go.png -------------------------------------------------------------------------------- /vendor/github.com/xtaci/kcp-go/v5/readloop.go: -------------------------------------------------------------------------------- 1 | package kcp 2 | 3 | import ( 4 | "sync/atomic" 5 | 6 | "github.com/pkg/errors" 7 | ) 8 | 9 | func (s *UDPSession) defaultReadLoop() { 10 | buf := make([]byte, mtuLimit) 11 | var src string 12 | for { 13 | if n, addr, err := s.conn.ReadFrom(buf); err == nil { 14 | // make sure the packet is from the same source 15 | if src == "" { // set source address 16 | src = addr.String() 17 | } else if addr.String() != src { 18 | atomic.AddUint64(&DefaultSnmp.InErrs, 1) 19 | continue 20 | } 21 | s.packetInput(buf[:n]) 22 | } else { 23 | s.notifyReadError(errors.WithStack(err)) 24 | return 25 | } 26 | } 27 | } 28 | 29 | func (l *Listener) defaultMonitor() { 30 | buf := make([]byte, mtuLimit) 31 | for { 32 | if n, from, err := l.conn.ReadFrom(buf); err == nil { 33 | l.packetInput(buf[:n], from) 34 | } else { 35 | l.notifyReadError(errors.WithStack(err)) 36 | return 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/xtaci/kcp-go/v5/readloop_generic.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package kcp 4 | 5 | func (s *UDPSession) readLoop() { 6 | s.defaultReadLoop() 7 | } 8 | 9 | func (l *Listener) monitor() { 10 | l.defaultMonitor() 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/xtaci/kcp-go/v5/tx.go: -------------------------------------------------------------------------------- 1 | package kcp 2 | 3 | import ( 4 | "sync/atomic" 5 | 6 | "github.com/pkg/errors" 7 | "golang.org/x/net/ipv4" 8 | ) 9 | 10 | func (s *UDPSession) defaultTx(txqueue []ipv4.Message) { 11 | nbytes := 0 12 | npkts := 0 13 | for k := range txqueue { 14 | if n, err := s.conn.WriteTo(txqueue[k].Buffers[0], txqueue[k].Addr); err == nil { 15 | nbytes += n 16 | npkts++ 17 | } else { 18 | s.notifyWriteError(errors.WithStack(err)) 19 | break 20 | } 21 | } 22 | atomic.AddUint64(&DefaultSnmp.OutPkts, uint64(npkts)) 23 | atomic.AddUint64(&DefaultSnmp.OutBytes, uint64(nbytes)) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/xtaci/kcp-go/v5/tx_generic.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package kcp 4 | 5 | import ( 6 | "golang.org/x/net/ipv4" 7 | ) 8 | 9 | func (s *UDPSession) tx(txqueue []ipv4.Message) { 10 | s.defaultTx(txqueue) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/xtaci/kcp-go/v5/wechat_donate.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowsocks/kcptun/5668f180546c1c6cb3a8c19e1b8b670d17dca0a6/vendor/github.com/xtaci/kcp-go/v5/wechat_donate.jpg -------------------------------------------------------------------------------- /vendor/github.com/xtaci/smux/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/github.com/xtaci/smux/.travis.yml: -------------------------------------------------------------------------------- 1 | arch: 2 | - amd64 3 | - ppc64le 4 | language: go 5 | go: 6 | - 1.9.x 7 | - 1.10.x 8 | - 1.11.x 9 | 10 | before_install: 11 | - go get -t -v ./... 12 | 13 | install: 14 | - go get github.com/xtaci/smux 15 | 16 | script: 17 | - go test -coverprofile=coverage.txt -covermode=atomic -bench . 18 | 19 | after_success: 20 | - bash <(curl -s https://codecov.io/bash) 21 | -------------------------------------------------------------------------------- /vendor/github.com/xtaci/smux/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016-2017 Daniel Fu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/xtaci/smux/curve.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowsocks/kcptun/5668f180546c1c6cb3a8c19e1b8b670d17dca0a6/vendor/github.com/xtaci/smux/curve.jpg -------------------------------------------------------------------------------- /vendor/github.com/xtaci/smux/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/xtaci/smux 2 | 3 | go 1.13 4 | -------------------------------------------------------------------------------- /vendor/github.com/xtaci/smux/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowsocks/kcptun/5668f180546c1c6cb3a8c19e1b8b670d17dca0a6/vendor/github.com/xtaci/smux/go.sum -------------------------------------------------------------------------------- /vendor/github.com/xtaci/smux/mux.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowsocks/kcptun/5668f180546c1c6cb3a8c19e1b8b670d17dca0a6/vendor/github.com/xtaci/smux/mux.jpg -------------------------------------------------------------------------------- /vendor/github.com/xtaci/smux/shaper.go: -------------------------------------------------------------------------------- 1 | package smux 2 | 3 | func _itimediff(later, earlier uint32) int32 { 4 | return (int32)(later - earlier) 5 | } 6 | 7 | type shaperHeap []writeRequest 8 | 9 | func (h shaperHeap) Len() int { return len(h) } 10 | func (h shaperHeap) Less(i, j int) bool { return _itimediff(h[j].prio, h[i].prio) > 0 } 11 | func (h shaperHeap) Swap(i, j int) { h[i], h[j] = h[j], h[i] } 12 | func (h *shaperHeap) Push(x interface{}) { *h = append(*h, x.(writeRequest)) } 13 | 14 | func (h *shaperHeap) Pop() interface{} { 15 | old := *h 16 | n := len(old) 17 | x := old[n-1] 18 | *h = old[0 : n-1] 19 | return x 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/xtaci/smux/smux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shadowsocks/kcptun/5668f180546c1c6cb3a8c19e1b8b670d17dca0a6/vendor/github.com/xtaci/smux/smux.png -------------------------------------------------------------------------------- /vendor/github.com/xtaci/tcpraw/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, build with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | -------------------------------------------------------------------------------- /vendor/github.com/xtaci/tcpraw/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: required 3 | go: 4 | - 1.10.x 5 | - 1.11.x 6 | - 1.12.x 7 | 8 | before_install: 9 | - go get -t -v ./... 10 | 11 | install: 12 | - go get github.com/xtaci/tcpraw 13 | 14 | script: 15 | - sudo -E env "PATH=$PATH" go test -coverprofile=coverage.txt -covermode=atomic -bench . 16 | 17 | after_success: 18 | - bash <(curl -s https://codecov.io/bash) 19 | -------------------------------------------------------------------------------- /vendor/github.com/xtaci/tcpraw/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 xtaci 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/xtaci/tcpraw/tcp_stub.go: -------------------------------------------------------------------------------- 1 | // +build !linux 2 | 3 | package tcpraw 4 | 5 | import ( 6 | "errors" 7 | "net" 8 | ) 9 | 10 | type TCPConn struct{ *net.UDPConn } 11 | 12 | // Dial connects to the remote TCP port, 13 | // and returns a single packet-oriented connection 14 | func Dial(network, address string) (*TCPConn, error) { 15 | return nil, errors.New("os not supported") 16 | } 17 | 18 | func Listen(network, address string) (*TCPConn, error) { 19 | return nil, errors.New("os not supported") 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at https://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at https://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && !purego && gc 6 | // +build amd64,!purego,gc 7 | 8 | package salsa 9 | 10 | //go:noescape 11 | 12 | // salsa2020XORKeyStream is implemented in salsa20_amd64.s. 13 | func salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *byte) 14 | 15 | // XORKeyStream crypts bytes from in to out using the given key and counters. 16 | // In and out must overlap entirely or not at all. Counter 17 | // contains the raw salsa20 counter bytes (both nonce and block counter). 18 | func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) { 19 | if len(in) == 0 { 20 | return 21 | } 22 | _ = out[len(in)-1] 23 | salsa2020XORKeyStream(&out[0], &in[0], uint64(len(in)), &counter[0], &key[0]) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/salsa20/salsa/salsa20_noasm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !amd64 || purego || !gc 6 | // +build !amd64 purego !gc 7 | 8 | package salsa 9 | 10 | // XORKeyStream crypts bytes from in to out using the given key and counters. 11 | // In and out must overlap entirely or not at all. Counter 12 | // contains the raw salsa20 counter bytes (both nonce and block counter). 13 | func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) { 14 | genericXORKeyStream(out, in, counter, key) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/bpf/setter.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package bpf 6 | 7 | // A Setter is a type which can attach a compiled BPF filter to itself. 8 | type Setter interface { 9 | SetBPF(filter []RawInstruction) error 10 | } 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/cmsghdr.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos 7 | 8 | package socket 9 | 10 | func (h *cmsghdr) len() int { return int(h.Len) } 11 | func (h *cmsghdr) lvl() int { return int(h.Level) } 12 | func (h *cmsghdr) typ() int { return int(h.Type) } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || netbsd || openbsd 6 | // +build aix darwin dragonfly freebsd netbsd openbsd 7 | 8 | package socket 9 | 10 | func (h *cmsghdr) set(l, lvl, typ int) { 11 | h.Len = uint32(l) 12 | h.Level = int32(lvl) 13 | h.Type = int32(typ) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (arm || mips || mipsle || 386 || ppc) && linux 6 | // +build arm mips mipsle 386 ppc 7 | // +build linux 8 | 9 | package socket 10 | 11 | func (h *cmsghdr) set(l, lvl, typ int) { 12 | h.Len = uint32(l) 13 | h.Level = int32(lvl) 14 | h.Type = int32(typ) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (arm64 || amd64 || loong64 || ppc64 || ppc64le || mips64 || mips64le || riscv64 || s390x) && linux 6 | // +build arm64 amd64 loong64 ppc64 ppc64le mips64 mips64le riscv64 s390x 7 | // +build linux 8 | 9 | package socket 10 | 11 | func (h *cmsghdr) set(l, lvl, typ int) { 12 | h.Len = uint64(l) 13 | h.Level = int32(lvl) 14 | h.Type = int32(typ) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && solaris 6 | // +build amd64,solaris 7 | 8 | package socket 9 | 10 | func (h *cmsghdr) set(l, lvl, typ int) { 11 | h.Len = uint32(l) 12 | h.Level = int32(lvl) 13 | h.Type = int32(typ) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !zos 6 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos 7 | 8 | package socket 9 | 10 | func controlHeaderLen() int { 11 | return 0 12 | } 13 | 14 | func controlMessageLen(dataLen int) int { 15 | return 0 16 | } 17 | 18 | func controlMessageSpace(dataLen int) int { 19 | return 0 20 | } 21 | 22 | type cmsghdr struct{} 23 | 24 | func (h *cmsghdr) len() int { return 0 } 25 | func (h *cmsghdr) lvl() int { return 0 } 26 | func (h *cmsghdr) typ() int { return 0 } 27 | 28 | func (h *cmsghdr) set(l, lvl, typ int) {} 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/cmsghdr_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos 7 | 8 | package socket 9 | 10 | import "golang.org/x/sys/unix" 11 | 12 | func controlHeaderLen() int { 13 | return unix.CmsgLen(0) 14 | } 15 | 16 | func controlMessageLen(dataLen int) int { 17 | return unix.CmsgLen(dataLen) 18 | } 19 | 20 | func controlMessageSpace(dataLen int) int { 21 | return unix.CmsgSpace(dataLen) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/cmsghdr_zos_s390x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package socket 6 | 7 | func (h *cmsghdr) set(l, lvl, typ int) { 8 | h.Len = int32(l) 9 | h.Level = int32(lvl) 10 | h.Type = int32(typ) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/complete_dontwait.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris 6 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 7 | 8 | package socket 9 | 10 | import ( 11 | "syscall" 12 | ) 13 | 14 | // ioComplete checks the flags and result of a syscall, to be used as return 15 | // value in a syscall.RawConn.Read or Write callback. 16 | func ioComplete(flags int, operr error) bool { 17 | if flags&syscall.MSG_DONTWAIT != 0 { 18 | // Caller explicitly said don't wait, so always return immediately. 19 | return true 20 | } 21 | if operr == syscall.EAGAIN || operr == syscall.EWOULDBLOCK { 22 | // No data available, block for I/O and try again. 23 | return false 24 | } 25 | return true 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/complete_nodontwait.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || windows || zos 6 | // +build aix windows zos 7 | 8 | package socket 9 | 10 | import ( 11 | "syscall" 12 | ) 13 | 14 | // ioComplete checks the flags and result of a syscall, to be used as return 15 | // value in a syscall.RawConn.Read or Write callback. 16 | func ioComplete(flags int, operr error) bool { 17 | if operr == syscall.EAGAIN || operr == syscall.EWOULDBLOCK { 18 | // No data available, block for I/O and try again. 19 | return false 20 | } 21 | return true 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/empty.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin && go1.12 6 | // +build darwin,go1.12 7 | 8 | // This exists solely so we can linkname in symbols from syscall. 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/error_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos 7 | 8 | package socket 9 | 10 | import "syscall" 11 | 12 | var ( 13 | errEAGAIN error = syscall.EAGAIN 14 | errEINVAL error = syscall.EINVAL 15 | errENOENT error = syscall.ENOENT 16 | ) 17 | 18 | // errnoErr returns common boxed Errno values, to prevent allocations 19 | // at runtime. 20 | func errnoErr(errno syscall.Errno) error { 21 | switch errno { 22 | case 0: 23 | return nil 24 | case syscall.EAGAIN: 25 | return errEAGAIN 26 | case syscall.EINVAL: 27 | return errEINVAL 28 | case syscall.ENOENT: 29 | return errENOENT 30 | } 31 | return errno 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/error_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package socket 6 | 7 | import "syscall" 8 | 9 | var ( 10 | errERROR_IO_PENDING error = syscall.ERROR_IO_PENDING 11 | errEINVAL error = syscall.EINVAL 12 | ) 13 | 14 | // errnoErr returns common boxed Errno values, to prevent allocations 15 | // at runtime. 16 | func errnoErr(errno syscall.Errno) error { 17 | switch errno { 18 | case 0: 19 | return nil 20 | case syscall.ERROR_IO_PENDING: 21 | return errERROR_IO_PENDING 22 | case syscall.EINVAL: 23 | return errEINVAL 24 | } 25 | return errno 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/iovec_32bit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (arm || mips || mipsle || 386 || ppc) && (darwin || dragonfly || freebsd || linux || netbsd || openbsd) 6 | // +build arm mips mipsle 386 ppc 7 | // +build darwin dragonfly freebsd linux netbsd openbsd 8 | 9 | package socket 10 | 11 | import "unsafe" 12 | 13 | func (v *iovec) set(b []byte) { 14 | l := len(b) 15 | if l == 0 { 16 | return 17 | } 18 | v.Base = (*byte)(unsafe.Pointer(&b[0])) 19 | v.Len = uint32(l) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/iovec_64bit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (arm64 || amd64 || loong64 || ppc64 || ppc64le || mips64 || mips64le || riscv64 || s390x) && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || zos) 6 | // +build arm64 amd64 loong64 ppc64 ppc64le mips64 mips64le riscv64 s390x 7 | // +build aix darwin dragonfly freebsd linux netbsd openbsd zos 8 | 9 | package socket 10 | 11 | import "unsafe" 12 | 13 | func (v *iovec) set(b []byte) { 14 | l := len(b) 15 | if l == 0 { 16 | return 17 | } 18 | v.Base = (*byte)(unsafe.Pointer(&b[0])) 19 | v.Len = uint64(l) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/iovec_solaris_64bit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && solaris 6 | // +build amd64,solaris 7 | 8 | package socket 9 | 10 | import "unsafe" 11 | 12 | func (v *iovec) set(b []byte) { 13 | l := len(b) 14 | if l == 0 { 15 | return 16 | } 17 | v.Base = (*int8)(unsafe.Pointer(&b[0])) 18 | v.Len = uint64(l) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/iovec_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !zos 6 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos 7 | 8 | package socket 9 | 10 | type iovec struct{} 11 | 12 | func (v *iovec) set(b []byte) {} 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !aix && !linux && !netbsd 6 | // +build !aix,!linux,!netbsd 7 | 8 | package socket 9 | 10 | import "net" 11 | 12 | type mmsghdr struct{} 13 | 14 | type mmsghdrs []mmsghdr 15 | 16 | func (hs mmsghdrs) pack(ms []Message, parseFn func([]byte, string) (net.Addr, error), marshalFn func(net.Addr) []byte) error { 17 | return nil 18 | } 19 | 20 | func (hs mmsghdrs) unpack(ms []Message, parseFn func([]byte, string) (net.Addr, error), hint string) error { 21 | return nil 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/msghdr_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || netbsd || openbsd 6 | // +build aix darwin dragonfly freebsd netbsd openbsd 7 | 8 | package socket 9 | 10 | import "unsafe" 11 | 12 | func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) { 13 | for i := range vs { 14 | vs[i].set(bs[i]) 15 | } 16 | h.setIov(vs) 17 | if len(oob) > 0 { 18 | h.Control = (*byte)(unsafe.Pointer(&oob[0])) 19 | h.Controllen = uint32(len(oob)) 20 | } 21 | if sa != nil { 22 | h.Name = (*byte)(unsafe.Pointer(&sa[0])) 23 | h.Namelen = uint32(len(sa)) 24 | } 25 | } 26 | 27 | func (h *msghdr) name() []byte { 28 | if h.Name != nil && h.Namelen > 0 { 29 | return (*[sizeofSockaddrInet6]byte)(unsafe.Pointer(h.Name))[:h.Namelen] 30 | } 31 | return nil 32 | } 33 | 34 | func (h *msghdr) controllen() int { 35 | return int(h.Controllen) 36 | } 37 | 38 | func (h *msghdr) flags() int { 39 | return int(h.Flags) 40 | } 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || netbsd 6 | // +build aix darwin dragonfly freebsd netbsd 7 | 8 | package socket 9 | 10 | func (h *msghdr) setIov(vs []iovec) { 11 | l := len(vs) 12 | if l == 0 { 13 | return 14 | } 15 | h.Iov = &vs[0] 16 | h.Iovlen = int32(l) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/msghdr_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package socket 6 | 7 | import "unsafe" 8 | 9 | func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) { 10 | for i := range vs { 11 | vs[i].set(bs[i]) 12 | } 13 | h.setIov(vs) 14 | if len(oob) > 0 { 15 | h.setControl(oob) 16 | } 17 | if sa != nil { 18 | h.Name = (*byte)(unsafe.Pointer(&sa[0])) 19 | h.Namelen = uint32(len(sa)) 20 | } else { 21 | h.Name = nil 22 | h.Namelen = 0 23 | } 24 | } 25 | 26 | func (h *msghdr) name() []byte { 27 | if h.Name != nil && h.Namelen > 0 { 28 | return (*[sizeofSockaddrInet6]byte)(unsafe.Pointer(h.Name))[:h.Namelen] 29 | } 30 | return nil 31 | } 32 | 33 | func (h *msghdr) controllen() int { 34 | return int(h.Controllen) 35 | } 36 | 37 | func (h *msghdr) flags() int { 38 | return int(h.Flags) 39 | } 40 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/msghdr_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (arm || mips || mipsle || 386 || ppc) && linux 6 | // +build arm mips mipsle 386 ppc 7 | // +build linux 8 | 9 | package socket 10 | 11 | import "unsafe" 12 | 13 | func (h *msghdr) setIov(vs []iovec) { 14 | l := len(vs) 15 | if l == 0 { 16 | return 17 | } 18 | h.Iov = &vs[0] 19 | h.Iovlen = uint32(l) 20 | } 21 | 22 | func (h *msghdr) setControl(b []byte) { 23 | h.Control = (*byte)(unsafe.Pointer(&b[0])) 24 | h.Controllen = uint32(len(b)) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (arm64 || amd64 || loong64 || ppc64 || ppc64le || mips64 || mips64le || riscv64 || s390x) && linux 6 | // +build arm64 amd64 loong64 ppc64 ppc64le mips64 mips64le riscv64 s390x 7 | // +build linux 8 | 9 | package socket 10 | 11 | import "unsafe" 12 | 13 | func (h *msghdr) setIov(vs []iovec) { 14 | l := len(vs) 15 | if l == 0 { 16 | return 17 | } 18 | h.Iov = &vs[0] 19 | h.Iovlen = uint64(l) 20 | } 21 | 22 | func (h *msghdr) setControl(b []byte) { 23 | h.Control = (*byte)(unsafe.Pointer(&b[0])) 24 | h.Controllen = uint64(len(b)) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/msghdr_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package socket 6 | 7 | func (h *msghdr) setIov(vs []iovec) { 8 | l := len(vs) 9 | if l == 0 { 10 | return 11 | } 12 | h.Iov = &vs[0] 13 | h.Iovlen = uint32(l) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && solaris 6 | // +build amd64,solaris 7 | 8 | package socket 9 | 10 | import "unsafe" 11 | 12 | func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) { 13 | for i := range vs { 14 | vs[i].set(bs[i]) 15 | } 16 | if len(vs) > 0 { 17 | h.Iov = &vs[0] 18 | h.Iovlen = int32(len(vs)) 19 | } 20 | if len(oob) > 0 { 21 | h.Accrights = (*int8)(unsafe.Pointer(&oob[0])) 22 | h.Accrightslen = int32(len(oob)) 23 | } 24 | if sa != nil { 25 | h.Name = (*byte)(unsafe.Pointer(&sa[0])) 26 | h.Namelen = uint32(len(sa)) 27 | } 28 | } 29 | 30 | func (h *msghdr) controllen() int { 31 | return int(h.Accrightslen) 32 | } 33 | 34 | func (h *msghdr) flags() int { 35 | return int(NativeEndian.Uint32(h.Pad_cgo_2[:])) 36 | } 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/msghdr_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !zos 6 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos 7 | 8 | package socket 9 | 10 | type msghdr struct{} 11 | 12 | func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) {} 13 | func (h *msghdr) name() []byte { return nil } 14 | func (h *msghdr) controllen() int { return 0 } 15 | func (h *msghdr) flags() int { return 0 } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/msghdr_zos_s390x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build s390x && zos 6 | // +build s390x,zos 7 | 8 | package socket 9 | 10 | import "unsafe" 11 | 12 | func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) { 13 | for i := range vs { 14 | vs[i].set(bs[i]) 15 | } 16 | if len(vs) > 0 { 17 | h.Iov = &vs[0] 18 | h.Iovlen = int32(len(vs)) 19 | } 20 | if len(oob) > 0 { 21 | h.Control = (*byte)(unsafe.Pointer(&oob[0])) 22 | h.Controllen = uint32(len(oob)) 23 | } 24 | if sa != nil { 25 | h.Name = (*byte)(unsafe.Pointer(&sa[0])) 26 | h.Namelen = uint32(len(sa)) 27 | } 28 | } 29 | 30 | func (h *msghdr) controllen() int { 31 | return int(h.Controllen) 32 | } 33 | 34 | func (h *msghdr) flags() int { 35 | return int(h.Flags) 36 | } 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/norace.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !race 6 | // +build !race 7 | 8 | package socket 9 | 10 | func (m *Message) raceRead() { 11 | } 12 | func (m *Message) raceWrite() { 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build race 6 | // +build race 7 | 8 | package socket 9 | 10 | import ( 11 | "runtime" 12 | "unsafe" 13 | ) 14 | 15 | // This package reads and writes the Message buffers using a 16 | // direct system call, which the race detector can't see. 17 | // These functions tell the race detector what is going on during the syscall. 18 | 19 | func (m *Message) raceRead() { 20 | for _, b := range m.Buffers { 21 | if len(b) > 0 { 22 | runtime.RaceReadRange(unsafe.Pointer(&b[0]), len(b)) 23 | } 24 | } 25 | if b := m.OOB; len(b) > 0 { 26 | runtime.RaceReadRange(unsafe.Pointer(&b[0]), len(b)) 27 | } 28 | } 29 | func (m *Message) raceWrite() { 30 | for _, b := range m.Buffers { 31 | if len(b) > 0 { 32 | runtime.RaceWriteRange(unsafe.Pointer(&b[0]), len(b)) 33 | } 34 | } 35 | if b := m.OOB; len(b) > 0 { 36 | runtime.RaceWriteRange(unsafe.Pointer(&b[0]), len(b)) 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux 6 | // +build !linux 7 | 8 | package socket 9 | 10 | func (c *Conn) recvMsgs(ms []Message, flags int) (int, error) { 11 | return 0, errNotImplemented 12 | } 13 | 14 | func (c *Conn) sendMsgs(ms []Message, flags int) (int, error) { 15 | return 0, errNotImplemented 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos 6 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos 7 | 8 | package socket 9 | 10 | func (c *Conn) recvMsg(m *Message, flags int) error { 11 | return errNotImplemented 12 | } 13 | 14 | func (c *Conn) sendMsg(m *Message, flags int) error { 15 | return errNotImplemented 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package socket 6 | 7 | import ( 8 | "encoding/binary" 9 | "unsafe" 10 | ) 11 | 12 | // NativeEndian is the machine native endian implementation of ByteOrder. 13 | var NativeEndian binary.ByteOrder 14 | 15 | func init() { 16 | i := uint32(1) 17 | b := (*[4]byte)(unsafe.Pointer(&i)) 18 | if b[0] == 1 { 19 | NativeEndian = binary.LittleEndian 20 | } else { 21 | NativeEndian = binary.BigEndian 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || openbsd || solaris 6 | // +build aix darwin dragonfly freebsd openbsd solaris 7 | 8 | package socket 9 | 10 | func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { 11 | return 0, errNotImplemented 12 | } 13 | 14 | func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { 15 | return 0, errNotImplemented 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_const_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos 7 | 8 | package socket 9 | 10 | import "golang.org/x/sys/unix" 11 | 12 | const ( 13 | sysAF_UNSPEC = unix.AF_UNSPEC 14 | sysAF_INET = unix.AF_INET 15 | sysAF_INET6 = unix.AF_INET6 16 | 17 | sysSOCK_RAW = unix.SOCK_RAW 18 | 19 | sizeofSockaddrInet4 = unix.SizeofSockaddrInet4 20 | sizeofSockaddrInet6 = unix.SizeofSockaddrInet6 21 | ) 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && !s390x && !386 6 | // +build linux,!s390x,!386 7 | 8 | package socket 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { 16 | n, _, errno := syscall.Syscall6(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) 17 | return int(n), errnoErr(errno) 18 | } 19 | 20 | func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { 21 | n, _, errno := syscall.Syscall6(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) 22 | return int(n), errnoErr(errno) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_linux_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package socket 6 | 7 | import ( 8 | "syscall" 9 | "unsafe" 10 | ) 11 | 12 | const ( 13 | sysRECVMMSG = 0x13 14 | sysSENDMMSG = 0x14 15 | ) 16 | 17 | func socketcall(call, a0, a1, a2, a3, a4, a5 uintptr) (uintptr, syscall.Errno) 18 | func rawsocketcall(call, a0, a1, a2, a3, a4, a5 uintptr) (uintptr, syscall.Errno) 19 | 20 | func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { 21 | n, errno := socketcall(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) 22 | return int(n), errnoErr(errno) 23 | } 24 | 25 | func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { 26 | n, errno := socketcall(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) 27 | return int(n), errnoErr(errno) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_linux_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | TEXT ·socketcall(SB),NOSPLIT,$0-36 8 | JMP syscall·socketcall(SB) 9 | 10 | TEXT ·rawsocketcall(SB),NOSPLIT,$0-36 11 | JMP syscall·rawsocketcall(SB) 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package socket 6 | 7 | const ( 8 | sysRECVMMSG = 0x12b 9 | sysSENDMMSG = 0x133 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_linux_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package socket 6 | 7 | const ( 8 | sysRECVMMSG = 0x16d 9 | sysSENDMMSG = 0x176 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_linux_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package socket 6 | 7 | const ( 8 | sysRECVMMSG = 0xf3 9 | sysSENDMMSG = 0x10d 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_linux_loong64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build loong64 6 | // +build loong64 7 | 8 | package socket 9 | 10 | const ( 11 | sysRECVMMSG = 0xf3 12 | sysSENDMMSG = 0x10d 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_linux_mips.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package socket 6 | 7 | const ( 8 | sysRECVMMSG = 0x10ef 9 | sysSENDMMSG = 0x10f7 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_linux_mips64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package socket 6 | 7 | const ( 8 | sysRECVMMSG = 0x14ae 9 | sysSENDMMSG = 0x14b6 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_linux_mips64le.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package socket 6 | 7 | const ( 8 | sysRECVMMSG = 0x14ae 9 | sysSENDMMSG = 0x14b6 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_linux_mipsle.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package socket 6 | 7 | const ( 8 | sysRECVMMSG = 0x10ef 9 | sysSENDMMSG = 0x10f7 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_linux_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package socket 6 | 7 | const ( 8 | sysRECVMMSG = 0x157 9 | sysSENDMMSG = 0x15d 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_linux_ppc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package socket 6 | 7 | const ( 8 | sysRECVMMSG = 0x157 9 | sysSENDMMSG = 0x15d 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_linux_ppc64le.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package socket 6 | 7 | const ( 8 | sysRECVMMSG = 0x157 9 | sysSENDMMSG = 0x15d 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_linux_riscv64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build riscv64 6 | // +build riscv64 7 | 8 | package socket 9 | 10 | const ( 11 | sysRECVMMSG = 0xf3 12 | sysSENDMMSG = 0x10d 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_linux_s390x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package socket 6 | 7 | import ( 8 | "syscall" 9 | "unsafe" 10 | ) 11 | 12 | const ( 13 | sysRECVMMSG = 0x13 14 | sysSENDMMSG = 0x14 15 | ) 16 | 17 | func socketcall(call, a0, a1, a2, a3, a4, a5 uintptr) (uintptr, syscall.Errno) 18 | func rawsocketcall(call, a0, a1, a2, a3, a4, a5 uintptr) (uintptr, syscall.Errno) 19 | 20 | func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { 21 | n, errno := socketcall(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) 22 | return int(n), errnoErr(errno) 23 | } 24 | 25 | func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { 26 | n, errno := socketcall(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) 27 | return int(n), errnoErr(errno) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_linux_s390x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | TEXT ·socketcall(SB),NOSPLIT,$0-72 8 | JMP syscall·socketcall(SB) 9 | 10 | TEXT ·rawsocketcall(SB),NOSPLIT,$0-72 11 | JMP syscall·rawsocketcall(SB) 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_netbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package socket 6 | 7 | import ( 8 | "syscall" 9 | "unsafe" 10 | ) 11 | 12 | const ( 13 | sysRECVMMSG = 0x1db 14 | sysSENDMMSG = 0x1dc 15 | ) 16 | 17 | func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { 18 | n, _, errno := syscall.Syscall6(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) 19 | return int(n), errnoErr(errno) 20 | } 21 | 22 | func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { 23 | n, _, errno := syscall.Syscall6(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) 24 | return int(n), errnoErr(errno) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_zos_s390x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | #include "textflag.h" 6 | 7 | TEXT ·syscall_syscall(SB),NOSPLIT,$0 8 | JMP syscall·_syscall(SB) 9 | 10 | TEXT ·syscall_syscall6(SB),NOSPLIT,$0 11 | JMP syscall·_syscall6(SB) 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_aix_ppc64.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_aix.go 3 | 4 | // Added for go1.11 compatibility 5 | //go:build aix 6 | // +build aix 7 | 8 | package socket 9 | 10 | type iovec struct { 11 | Base *byte 12 | Len uint64 13 | } 14 | 15 | type msghdr struct { 16 | Name *byte 17 | Namelen uint32 18 | Iov *iovec 19 | Iovlen int32 20 | Control *byte 21 | Controllen uint32 22 | Flags int32 23 | } 24 | 25 | type mmsghdr struct { 26 | Hdr msghdr 27 | Len uint32 28 | Pad_cgo_0 [4]byte 29 | } 30 | 31 | type cmsghdr struct { 32 | Len uint32 33 | Level int32 34 | Type int32 35 | } 36 | 37 | const ( 38 | sizeofIovec = 0x10 39 | sizeofMsghdr = 0x30 40 | ) 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_darwin_386.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_darwin.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint32 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Iov *iovec 15 | Iovlen int32 16 | Control *byte 17 | Controllen uint32 18 | Flags int32 19 | } 20 | 21 | type cmsghdr struct { 22 | Len uint32 23 | Level int32 24 | Type int32 25 | } 26 | 27 | const ( 28 | sizeofIovec = 0x8 29 | sizeofMsghdr = 0x1c 30 | ) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_darwin.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint64 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Pad_cgo_0 [4]byte 15 | Iov *iovec 16 | Iovlen int32 17 | Pad_cgo_1 [4]byte 18 | Control *byte 19 | Controllen uint32 20 | Flags int32 21 | } 22 | 23 | type cmsghdr struct { 24 | Len uint32 25 | Level int32 26 | Type int32 27 | } 28 | 29 | const ( 30 | sizeofIovec = 0x10 31 | sizeofMsghdr = 0x30 32 | ) 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_darwin_arm.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_darwin.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint32 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Iov *iovec 15 | Iovlen int32 16 | Control *byte 17 | Controllen uint32 18 | Flags int32 19 | } 20 | 21 | type cmsghdr struct { 22 | Len uint32 23 | Level int32 24 | Type int32 25 | } 26 | 27 | const ( 28 | sizeofIovec = 0x8 29 | sizeofMsghdr = 0x1c 30 | ) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_darwin_arm64.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_darwin.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint64 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Pad_cgo_0 [4]byte 15 | Iov *iovec 16 | Iovlen int32 17 | Pad_cgo_1 [4]byte 18 | Control *byte 19 | Controllen uint32 20 | Flags int32 21 | } 22 | 23 | type cmsghdr struct { 24 | Len uint32 25 | Level int32 26 | Type int32 27 | } 28 | 29 | const ( 30 | sizeofIovec = 0x10 31 | sizeofMsghdr = 0x30 32 | ) 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_dragonfly.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint64 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Pad_cgo_0 [4]byte 15 | Iov *iovec 16 | Iovlen int32 17 | Pad_cgo_1 [4]byte 18 | Control *byte 19 | Controllen uint32 20 | Flags int32 21 | } 22 | 23 | type cmsghdr struct { 24 | Len uint32 25 | Level int32 26 | Type int32 27 | } 28 | 29 | const ( 30 | sizeofIovec = 0x10 31 | sizeofMsghdr = 0x30 32 | ) 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_freebsd.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint32 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Iov *iovec 15 | Iovlen int32 16 | Control *byte 17 | Controllen uint32 18 | Flags int32 19 | } 20 | 21 | type cmsghdr struct { 22 | Len uint32 23 | Level int32 24 | Type int32 25 | } 26 | 27 | const ( 28 | sizeofIovec = 0x8 29 | sizeofMsghdr = 0x1c 30 | ) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_freebsd.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint64 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Pad_cgo_0 [4]byte 15 | Iov *iovec 16 | Iovlen int32 17 | Pad_cgo_1 [4]byte 18 | Control *byte 19 | Controllen uint32 20 | Flags int32 21 | } 22 | 23 | type cmsghdr struct { 24 | Len uint32 25 | Level int32 26 | Type int32 27 | } 28 | 29 | const ( 30 | sizeofIovec = 0x10 31 | sizeofMsghdr = 0x30 32 | ) 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_freebsd.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint32 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Iov *iovec 15 | Iovlen int32 16 | Control *byte 17 | Controllen uint32 18 | Flags int32 19 | } 20 | 21 | type cmsghdr struct { 22 | Len uint32 23 | Level int32 24 | Type int32 25 | } 26 | 27 | const ( 28 | sizeofIovec = 0x8 29 | sizeofMsghdr = 0x1c 30 | ) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_freebsd.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint64 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Pad_cgo_0 [4]byte 15 | Iov *iovec 16 | Iovlen int32 17 | Pad_cgo_1 [4]byte 18 | Control *byte 19 | Controllen uint32 20 | Flags int32 21 | } 22 | 23 | type cmsghdr struct { 24 | Len uint32 25 | Level int32 26 | Type int32 27 | } 28 | 29 | const ( 30 | sizeofIovec = 0x10 31 | sizeofMsghdr = 0x30 32 | ) 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_386.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_linux.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint32 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Iov *iovec 15 | Iovlen uint32 16 | Control *byte 17 | Controllen uint32 18 | Flags int32 19 | } 20 | 21 | type mmsghdr struct { 22 | Hdr msghdr 23 | Len uint32 24 | } 25 | 26 | type cmsghdr struct { 27 | Len uint32 28 | Level int32 29 | Type int32 30 | } 31 | 32 | const ( 33 | sizeofIovec = 0x8 34 | sizeofMsghdr = 0x1c 35 | ) 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_linux.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint64 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Pad_cgo_0 [4]byte 15 | Iov *iovec 16 | Iovlen uint64 17 | Control *byte 18 | Controllen uint64 19 | Flags int32 20 | Pad_cgo_1 [4]byte 21 | } 22 | 23 | type mmsghdr struct { 24 | Hdr msghdr 25 | Len uint32 26 | Pad_cgo_0 [4]byte 27 | } 28 | 29 | type cmsghdr struct { 30 | Len uint64 31 | Level int32 32 | Type int32 33 | } 34 | 35 | const ( 36 | sizeofIovec = 0x10 37 | sizeofMsghdr = 0x38 38 | ) 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_linux.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint32 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Iov *iovec 15 | Iovlen uint32 16 | Control *byte 17 | Controllen uint32 18 | Flags int32 19 | } 20 | 21 | type mmsghdr struct { 22 | Hdr msghdr 23 | Len uint32 24 | } 25 | 26 | type cmsghdr struct { 27 | Len uint32 28 | Level int32 29 | Type int32 30 | } 31 | 32 | const ( 33 | sizeofIovec = 0x8 34 | sizeofMsghdr = 0x1c 35 | ) 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_linux.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint64 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Pad_cgo_0 [4]byte 15 | Iov *iovec 16 | Iovlen uint64 17 | Control *byte 18 | Controllen uint64 19 | Flags int32 20 | Pad_cgo_1 [4]byte 21 | } 22 | 23 | type mmsghdr struct { 24 | Hdr msghdr 25 | Len uint32 26 | Pad_cgo_0 [4]byte 27 | } 28 | 29 | type cmsghdr struct { 30 | Len uint64 31 | Level int32 32 | Type int32 33 | } 34 | 35 | const ( 36 | sizeofIovec = 0x10 37 | sizeofMsghdr = 0x38 38 | ) 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_loong64.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_linux.go 3 | 4 | //go:build loong64 5 | // +build loong64 6 | 7 | package socket 8 | 9 | type iovec struct { 10 | Base *byte 11 | Len uint64 12 | } 13 | 14 | type msghdr struct { 15 | Name *byte 16 | Namelen uint32 17 | Iov *iovec 18 | Iovlen uint64 19 | Control *byte 20 | Controllen uint64 21 | Flags int32 22 | Pad_cgo_0 [4]byte 23 | } 24 | 25 | type mmsghdr struct { 26 | Hdr msghdr 27 | Len uint32 28 | Pad_cgo_0 [4]byte 29 | } 30 | 31 | type cmsghdr struct { 32 | Len uint64 33 | Level int32 34 | Type int32 35 | } 36 | 37 | const ( 38 | sizeofIovec = 0x10 39 | sizeofMsghdr = 0x38 40 | ) 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_linux.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint32 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Iov *iovec 15 | Iovlen uint32 16 | Control *byte 17 | Controllen uint32 18 | Flags int32 19 | } 20 | 21 | type mmsghdr struct { 22 | Hdr msghdr 23 | Len uint32 24 | } 25 | 26 | type cmsghdr struct { 27 | Len uint32 28 | Level int32 29 | Type int32 30 | } 31 | 32 | const ( 33 | sizeofIovec = 0x8 34 | sizeofMsghdr = 0x1c 35 | ) 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_linux.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint64 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Pad_cgo_0 [4]byte 15 | Iov *iovec 16 | Iovlen uint64 17 | Control *byte 18 | Controllen uint64 19 | Flags int32 20 | Pad_cgo_1 [4]byte 21 | } 22 | 23 | type mmsghdr struct { 24 | Hdr msghdr 25 | Len uint32 26 | Pad_cgo_0 [4]byte 27 | } 28 | 29 | type cmsghdr struct { 30 | Len uint64 31 | Level int32 32 | Type int32 33 | } 34 | 35 | const ( 36 | sizeofIovec = 0x10 37 | sizeofMsghdr = 0x38 38 | ) 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_linux.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint64 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Pad_cgo_0 [4]byte 15 | Iov *iovec 16 | Iovlen uint64 17 | Control *byte 18 | Controllen uint64 19 | Flags int32 20 | Pad_cgo_1 [4]byte 21 | } 22 | 23 | type mmsghdr struct { 24 | Hdr msghdr 25 | Len uint32 26 | Pad_cgo_0 [4]byte 27 | } 28 | 29 | type cmsghdr struct { 30 | Len uint64 31 | Level int32 32 | Type int32 33 | } 34 | 35 | const ( 36 | sizeofIovec = 0x10 37 | sizeofMsghdr = 0x38 38 | ) 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_linux.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint32 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Iov *iovec 15 | Iovlen uint32 16 | Control *byte 17 | Controllen uint32 18 | Flags int32 19 | } 20 | 21 | type mmsghdr struct { 22 | Hdr msghdr 23 | Len uint32 24 | } 25 | 26 | type cmsghdr struct { 27 | Len uint32 28 | Level int32 29 | Type int32 30 | } 31 | 32 | const ( 33 | sizeofIovec = 0x8 34 | sizeofMsghdr = 0x1c 35 | ) 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_ppc.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_linux.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint32 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Iov *iovec 15 | Iovlen uint32 16 | Control *byte 17 | Controllen uint32 18 | Flags int32 19 | } 20 | 21 | type mmsghdr struct { 22 | Hdr msghdr 23 | Len uint32 24 | } 25 | 26 | type cmsghdr struct { 27 | Len uint32 28 | Level int32 29 | Type int32 30 | } 31 | 32 | const ( 33 | sizeofIovec = 0x8 34 | sizeofMsghdr = 0x1c 35 | ) 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_linux.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint64 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Pad_cgo_0 [4]byte 15 | Iov *iovec 16 | Iovlen uint64 17 | Control *byte 18 | Controllen uint64 19 | Flags int32 20 | Pad_cgo_1 [4]byte 21 | } 22 | 23 | type mmsghdr struct { 24 | Hdr msghdr 25 | Len uint32 26 | Pad_cgo_0 [4]byte 27 | } 28 | 29 | type cmsghdr struct { 30 | Len uint64 31 | Level int32 32 | Type int32 33 | } 34 | 35 | const ( 36 | sizeofIovec = 0x10 37 | sizeofMsghdr = 0x38 38 | ) 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_linux.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint64 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Pad_cgo_0 [4]byte 15 | Iov *iovec 16 | Iovlen uint64 17 | Control *byte 18 | Controllen uint64 19 | Flags int32 20 | Pad_cgo_1 [4]byte 21 | } 22 | 23 | type mmsghdr struct { 24 | Hdr msghdr 25 | Len uint32 26 | Pad_cgo_0 [4]byte 27 | } 28 | 29 | type cmsghdr struct { 30 | Len uint64 31 | Level int32 32 | Type int32 33 | } 34 | 35 | const ( 36 | sizeofIovec = 0x10 37 | sizeofMsghdr = 0x38 38 | ) 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_riscv64.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_linux.go 3 | 4 | //go:build riscv64 5 | // +build riscv64 6 | 7 | package socket 8 | 9 | type iovec struct { 10 | Base *byte 11 | Len uint64 12 | } 13 | 14 | type msghdr struct { 15 | Name *byte 16 | Namelen uint32 17 | Iov *iovec 18 | Iovlen uint64 19 | Control *byte 20 | Controllen uint64 21 | Flags int32 22 | Pad_cgo_0 [4]byte 23 | } 24 | 25 | type mmsghdr struct { 26 | Hdr msghdr 27 | Len uint32 28 | Pad_cgo_0 [4]byte 29 | } 30 | 31 | type cmsghdr struct { 32 | Len uint64 33 | Level int32 34 | Type int32 35 | } 36 | 37 | const ( 38 | sizeofIovec = 0x10 39 | sizeofMsghdr = 0x38 40 | ) 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_linux.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint64 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Pad_cgo_0 [4]byte 15 | Iov *iovec 16 | Iovlen uint64 17 | Control *byte 18 | Controllen uint64 19 | Flags int32 20 | Pad_cgo_1 [4]byte 21 | } 22 | 23 | type mmsghdr struct { 24 | Hdr msghdr 25 | Len uint32 26 | Pad_cgo_0 [4]byte 27 | } 28 | 29 | type cmsghdr struct { 30 | Len uint64 31 | Level int32 32 | Type int32 33 | } 34 | 35 | const ( 36 | sizeofIovec = 0x10 37 | sizeofMsghdr = 0x38 38 | ) 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_netbsd.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint32 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Iov *iovec 15 | Iovlen int32 16 | Control *byte 17 | Controllen uint32 18 | Flags int32 19 | } 20 | 21 | type mmsghdr struct { 22 | Hdr msghdr 23 | Len uint32 24 | } 25 | 26 | type cmsghdr struct { 27 | Len uint32 28 | Level int32 29 | Type int32 30 | } 31 | 32 | const ( 33 | sizeofIovec = 0x8 34 | sizeofMsghdr = 0x1c 35 | ) 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_netbsd.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint64 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Pad_cgo_0 [4]byte 15 | Iov *iovec 16 | Iovlen int32 17 | Pad_cgo_1 [4]byte 18 | Control *byte 19 | Controllen uint32 20 | Flags int32 21 | } 22 | 23 | type mmsghdr struct { 24 | Hdr msghdr 25 | Len uint32 26 | Pad_cgo_0 [4]byte 27 | } 28 | 29 | type cmsghdr struct { 30 | Len uint32 31 | Level int32 32 | Type int32 33 | } 34 | 35 | const ( 36 | sizeofIovec = 0x10 37 | sizeofMsghdr = 0x30 38 | ) 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_netbsd.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint32 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Iov *iovec 15 | Iovlen int32 16 | Control *byte 17 | Controllen uint32 18 | Flags int32 19 | } 20 | 21 | type mmsghdr struct { 22 | Hdr msghdr 23 | Len uint32 24 | } 25 | 26 | type cmsghdr struct { 27 | Len uint32 28 | Level int32 29 | Type int32 30 | } 31 | 32 | const ( 33 | sizeofIovec = 0x8 34 | sizeofMsghdr = 0x1c 35 | ) 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_netbsd.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint64 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Pad_cgo_0 [4]byte 15 | Iov *iovec 16 | Iovlen int32 17 | Pad_cgo_1 [4]byte 18 | Control *byte 19 | Controllen uint32 20 | Flags int32 21 | } 22 | 23 | type mmsghdr struct { 24 | Hdr msghdr 25 | Len uint32 26 | Pad_cgo_0 [4]byte 27 | } 28 | 29 | type cmsghdr struct { 30 | Len uint32 31 | Level int32 32 | Type int32 33 | } 34 | 35 | const ( 36 | sizeofIovec = 0x10 37 | sizeofMsghdr = 0x30 38 | ) 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_openbsd.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint32 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Iov *iovec 15 | Iovlen uint32 16 | Control *byte 17 | Controllen uint32 18 | Flags int32 19 | } 20 | 21 | type cmsghdr struct { 22 | Len uint32 23 | Level int32 24 | Type int32 25 | } 26 | 27 | const ( 28 | sizeofIovec = 0x8 29 | sizeofMsghdr = 0x1c 30 | ) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_openbsd.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint64 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Pad_cgo_0 [4]byte 15 | Iov *iovec 16 | Iovlen uint32 17 | Pad_cgo_1 [4]byte 18 | Control *byte 19 | Controllen uint32 20 | Flags int32 21 | } 22 | 23 | type cmsghdr struct { 24 | Len uint32 25 | Level int32 26 | Type int32 27 | } 28 | 29 | const ( 30 | sizeofIovec = 0x10 31 | sizeofMsghdr = 0x30 32 | ) 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_openbsd.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint32 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Iov *iovec 15 | Iovlen uint32 16 | Control *byte 17 | Controllen uint32 18 | Flags int32 19 | } 20 | 21 | type cmsghdr struct { 22 | Len uint32 23 | Level int32 24 | Type int32 25 | } 26 | 27 | const ( 28 | sizeofIovec = 0x8 29 | sizeofMsghdr = 0x1c 30 | ) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_openbsd.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint64 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Pad_cgo_0 [4]byte 15 | Iov *iovec 16 | Iovlen uint32 17 | Pad_cgo_1 [4]byte 18 | Control *byte 19 | Controllen uint32 20 | Flags int32 21 | } 22 | 23 | type cmsghdr struct { 24 | Len uint32 25 | Level int32 26 | Type int32 27 | } 28 | 29 | const ( 30 | sizeofIovec = 0x10 31 | sizeofMsghdr = 0x30 32 | ) 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_openbsd_mips64.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_openbsd.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *byte 8 | Len uint64 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Iov *iovec 15 | Iovlen uint32 16 | Control *byte 17 | Controllen uint32 18 | Flags int32 19 | } 20 | 21 | type cmsghdr struct { 22 | Len uint32 23 | Level int32 24 | Type int32 25 | } 26 | 27 | const ( 28 | sizeofIovec = 0x10 29 | sizeofMsghdr = 0x30 30 | ) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_solaris.go 3 | 4 | package socket 5 | 6 | type iovec struct { 7 | Base *int8 8 | Len uint64 9 | } 10 | 11 | type msghdr struct { 12 | Name *byte 13 | Namelen uint32 14 | Pad_cgo_0 [4]byte 15 | Iov *iovec 16 | Iovlen int32 17 | Pad_cgo_1 [4]byte 18 | Accrights *int8 19 | Accrightslen int32 20 | Pad_cgo_2 [4]byte 21 | } 22 | 23 | type cmsghdr struct { 24 | Len uint32 25 | Level int32 26 | Type int32 27 | } 28 | 29 | const ( 30 | sizeofIovec = 0x10 31 | sizeofMsghdr = 0x30 32 | ) 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_zos_s390x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package socket 6 | 7 | type iovec struct { 8 | Base *byte 9 | Len uint64 10 | } 11 | 12 | type msghdr struct { 13 | Name *byte 14 | Iov *iovec 15 | Control *byte 16 | Flags int32 17 | Namelen uint32 18 | Iovlen int32 19 | Controllen uint32 20 | } 21 | 22 | type cmsghdr struct { 23 | Len int32 24 | Level int32 25 | Type int32 26 | } 27 | 28 | const sizeofCmsghdr = 12 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/control_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos 6 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos 7 | 8 | package ipv4 9 | 10 | import "golang.org/x/net/internal/socket" 11 | 12 | func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error { 13 | return errNotImplemented 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/control_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package ipv4 6 | 7 | import "golang.org/x/net/internal/socket" 8 | 9 | func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error { 10 | // TODO(mikio): implement this 11 | return errNotImplemented 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/icmp_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package ipv4 6 | 7 | func (f *icmpFilter) accept(typ ICMPType) { 8 | f.Data &^= 1 << (uint32(typ) & 31) 9 | } 10 | 11 | func (f *icmpFilter) block(typ ICMPType) { 12 | f.Data |= 1 << (uint32(typ) & 31) 13 | } 14 | 15 | func (f *icmpFilter) setAll(block bool) { 16 | if block { 17 | f.Data = 1<<32 - 1 18 | } else { 19 | f.Data = 0 20 | } 21 | } 22 | 23 | func (f *icmpFilter) willBlock(typ ICMPType) bool { 24 | return f.Data&(1<<(uint32(typ)&31)) != 0 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/icmp_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux 6 | // +build !linux 7 | 8 | package ipv4 9 | 10 | const sizeofICMPFilter = 0x0 11 | 12 | type icmpFilter struct { 13 | } 14 | 15 | func (f *icmpFilter) accept(typ ICMPType) { 16 | } 17 | 18 | func (f *icmpFilter) block(typ ICMPType) { 19 | } 20 | 21 | func (f *icmpFilter) setAll(block bool) { 22 | } 23 | 24 | func (f *icmpFilter) willBlock(typ ICMPType) bool { 25 | return false 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/payload.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package ipv4 6 | 7 | import ( 8 | "net" 9 | 10 | "golang.org/x/net/internal/socket" 11 | ) 12 | 13 | // BUG(mikio): On Windows, the ControlMessage for ReadFrom and WriteTo 14 | // methods of PacketConn is not implemented. 15 | 16 | // A payloadHandler represents the IPv4 datagram payload handler. 17 | type payloadHandler struct { 18 | net.PacketConn 19 | *socket.Conn 20 | rawOpt 21 | } 22 | 23 | func (c *payloadHandler) ok() bool { return c != nil && c.PacketConn != nil && c.Conn != nil } 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/sys_asmreq_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !aix && !darwin && !dragonfly && !freebsd && !netbsd && !openbsd && !solaris && !windows 6 | // +build !aix,!darwin,!dragonfly,!freebsd,!netbsd,!openbsd,!solaris,!windows 7 | 8 | package ipv4 9 | 10 | import ( 11 | "net" 12 | 13 | "golang.org/x/net/internal/socket" 14 | ) 15 | 16 | func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { 17 | return errNotImplemented 18 | } 19 | 20 | func (so *sockOpt) getMulticastIf(c *socket.Conn) (*net.Interface, error) { 21 | return nil, errNotImplemented 22 | } 23 | 24 | func (so *sockOpt) setMulticastIf(c *socket.Conn, ifi *net.Interface) error { 25 | return errNotImplemented 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/sys_asmreqn_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !darwin && !freebsd && !linux 6 | // +build !darwin,!freebsd,!linux 7 | 8 | package ipv4 9 | 10 | import ( 11 | "net" 12 | 13 | "golang.org/x/net/internal/socket" 14 | ) 15 | 16 | func (so *sockOpt) getIPMreqn(c *socket.Conn) (*net.Interface, error) { 17 | return nil, errNotImplemented 18 | } 19 | 20 | func (so *sockOpt) setIPMreqn(c *socket.Conn, ifi *net.Interface, grp net.IP) error { 21 | return errNotImplemented 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/sys_bpf.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux 6 | // +build linux 7 | 8 | package ipv4 9 | 10 | import ( 11 | "unsafe" 12 | 13 | "golang.org/x/net/bpf" 14 | "golang.org/x/net/internal/socket" 15 | "golang.org/x/sys/unix" 16 | ) 17 | 18 | func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error { 19 | prog := unix.SockFprog{ 20 | Len: uint16(len(f)), 21 | Filter: (*unix.SockFilter)(unsafe.Pointer(&f[0])), 22 | } 23 | b := (*[unix.SizeofSockFprog]byte)(unsafe.Pointer(&prog))[:unix.SizeofSockFprog] 24 | return so.Set(c, b) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/sys_bpf_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux 6 | // +build !linux 7 | 8 | package ipv4 9 | 10 | import ( 11 | "golang.org/x/net/bpf" 12 | "golang.org/x/net/internal/socket" 13 | ) 14 | 15 | func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error { 16 | return errNotImplemented 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/sys_ssmreq_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !darwin && !freebsd && !linux && !solaris 6 | // +build !darwin,!freebsd,!linux,!solaris 7 | 8 | package ipv4 9 | 10 | import ( 11 | "net" 12 | 13 | "golang.org/x/net/internal/socket" 14 | ) 15 | 16 | func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { 17 | return errNotImplemented 18 | } 19 | 20 | func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error { 21 | return errNotImplemented 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/sys_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos 6 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos 7 | 8 | package ipv4 9 | 10 | var ( 11 | ctlOpts = [ctlMax]ctlOpt{} 12 | 13 | sockOpts = map[int]*sockOpt{} 14 | ) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/zsys_aix_ppc64.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_aix.go 3 | 4 | // Added for go1.11 compatibility 5 | //go:build aix 6 | // +build aix 7 | 8 | package ipv4 9 | 10 | const ( 11 | sizeofIPMreq = 0x8 12 | ) 13 | 14 | type ipMreq struct { 15 | Multiaddr [4]byte /* in_addr */ 16 | Interface [4]byte /* in_addr */ 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/zsys_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_dragonfly.go 3 | 4 | package ipv4 5 | 6 | const ( 7 | sizeofIPMreq = 0x8 8 | ) 9 | 10 | type ipMreq struct { 11 | Multiaddr [4]byte /* in_addr */ 12 | Interface [4]byte /* in_addr */ 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/zsys_netbsd.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_netbsd.go 3 | 4 | package ipv4 5 | 6 | const ( 7 | sizeofIPMreq = 0x8 8 | ) 9 | 10 | type ipMreq struct { 11 | Multiaddr [4]byte /* in_addr */ 12 | Interface [4]byte /* in_addr */ 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/zsys_openbsd.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_openbsd.go 3 | 4 | package ipv4 5 | 6 | const ( 7 | sizeofIPMreq = 0x8 8 | ) 9 | 10 | type ipMreq struct { 11 | Multiaddr [4]byte /* in_addr */ 12 | Interface [4]byte /* in_addr */ 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv6/control_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos 6 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos 7 | 8 | package ipv6 9 | 10 | import "golang.org/x/net/internal/socket" 11 | 12 | func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error { 13 | return errNotImplemented 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv6/control_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package ipv6 6 | 7 | import "golang.org/x/net/internal/socket" 8 | 9 | func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error { 10 | // TODO(mikio): implement this 11 | return errNotImplemented 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv6/icmp_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || netbsd || openbsd 6 | // +build aix darwin dragonfly freebsd netbsd openbsd 7 | 8 | package ipv6 9 | 10 | func (f *icmpv6Filter) accept(typ ICMPType) { 11 | f.Filt[typ>>5] |= 1 << (uint32(typ) & 31) 12 | } 13 | 14 | func (f *icmpv6Filter) block(typ ICMPType) { 15 | f.Filt[typ>>5] &^= 1 << (uint32(typ) & 31) 16 | } 17 | 18 | func (f *icmpv6Filter) setAll(block bool) { 19 | for i := range f.Filt { 20 | if block { 21 | f.Filt[i] = 0 22 | } else { 23 | f.Filt[i] = 1<<32 - 1 24 | } 25 | } 26 | } 27 | 28 | func (f *icmpv6Filter) willBlock(typ ICMPType) bool { 29 | return f.Filt[typ>>5]&(1<<(uint32(typ)&31)) == 0 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv6/icmp_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package ipv6 6 | 7 | func (f *icmpv6Filter) accept(typ ICMPType) { 8 | f.Data[typ>>5] &^= 1 << (uint32(typ) & 31) 9 | } 10 | 11 | func (f *icmpv6Filter) block(typ ICMPType) { 12 | f.Data[typ>>5] |= 1 << (uint32(typ) & 31) 13 | } 14 | 15 | func (f *icmpv6Filter) setAll(block bool) { 16 | for i := range f.Data { 17 | if block { 18 | f.Data[i] = 1<<32 - 1 19 | } else { 20 | f.Data[i] = 0 21 | } 22 | } 23 | } 24 | 25 | func (f *icmpv6Filter) willBlock(typ ICMPType) bool { 26 | return f.Data[typ>>5]&(1<<(uint32(typ)&31)) != 0 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv6/icmp_solaris.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package ipv6 6 | 7 | func (f *icmpv6Filter) accept(typ ICMPType) { 8 | f.X__icmp6_filt[typ>>5] |= 1 << (uint32(typ) & 31) 9 | } 10 | 11 | func (f *icmpv6Filter) block(typ ICMPType) { 12 | f.X__icmp6_filt[typ>>5] &^= 1 << (uint32(typ) & 31) 13 | } 14 | 15 | func (f *icmpv6Filter) setAll(block bool) { 16 | for i := range f.X__icmp6_filt { 17 | if block { 18 | f.X__icmp6_filt[i] = 0 19 | } else { 20 | f.X__icmp6_filt[i] = 1<<32 - 1 21 | } 22 | } 23 | } 24 | 25 | func (f *icmpv6Filter) willBlock(typ ICMPType) bool { 26 | return f.X__icmp6_filt[typ>>5]&(1<<(uint32(typ)&31)) == 0 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv6/icmp_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos 6 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos 7 | 8 | package ipv6 9 | 10 | type icmpv6Filter struct { 11 | } 12 | 13 | func (f *icmpv6Filter) accept(typ ICMPType) { 14 | } 15 | 16 | func (f *icmpv6Filter) block(typ ICMPType) { 17 | } 18 | 19 | func (f *icmpv6Filter) setAll(block bool) { 20 | } 21 | 22 | func (f *icmpv6Filter) willBlock(typ ICMPType) bool { 23 | return false 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv6/icmp_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package ipv6 6 | 7 | func (f *icmpv6Filter) accept(typ ICMPType) { 8 | // TODO(mikio): implement this 9 | } 10 | 11 | func (f *icmpv6Filter) block(typ ICMPType) { 12 | // TODO(mikio): implement this 13 | } 14 | 15 | func (f *icmpv6Filter) setAll(block bool) { 16 | // TODO(mikio): implement this 17 | } 18 | 19 | func (f *icmpv6Filter) willBlock(typ ICMPType) bool { 20 | // TODO(mikio): implement this 21 | return false 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv6/icmp_zos.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package ipv6 6 | 7 | func (f *icmpv6Filter) accept(typ ICMPType) { 8 | f.Filt[typ>>5] |= 1 << (uint32(typ) & 31) 9 | 10 | } 11 | 12 | func (f *icmpv6Filter) block(typ ICMPType) { 13 | f.Filt[typ>>5] &^= 1 << (uint32(typ) & 31) 14 | 15 | } 16 | 17 | func (f *icmpv6Filter) setAll(block bool) { 18 | for i := range f.Filt { 19 | if block { 20 | f.Filt[i] = 0 21 | } else { 22 | f.Filt[i] = 1<<32 - 1 23 | } 24 | } 25 | } 26 | 27 | func (f *icmpv6Filter) willBlock(typ ICMPType) bool { 28 | return f.Filt[typ>>5]&(1<<(uint32(typ)&31)) == 0 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv6/payload.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package ipv6 6 | 7 | import ( 8 | "net" 9 | 10 | "golang.org/x/net/internal/socket" 11 | ) 12 | 13 | // BUG(mikio): On Windows, the ControlMessage for ReadFrom and WriteTo 14 | // methods of PacketConn is not implemented. 15 | 16 | // A payloadHandler represents the IPv6 datagram payload handler. 17 | type payloadHandler struct { 18 | net.PacketConn 19 | *socket.Conn 20 | rawOpt 21 | } 22 | 23 | func (c *payloadHandler) ok() bool { return c != nil && c.PacketConn != nil && c.Conn != nil } 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv6/sys_asmreq.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows 7 | 8 | package ipv6 9 | 10 | import ( 11 | "net" 12 | "unsafe" 13 | 14 | "golang.org/x/net/internal/socket" 15 | ) 16 | 17 | func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { 18 | var mreq ipv6Mreq 19 | copy(mreq.Multiaddr[:], grp) 20 | if ifi != nil { 21 | mreq.setIfindex(ifi.Index) 22 | } 23 | b := (*[sizeofIPv6Mreq]byte)(unsafe.Pointer(&mreq))[:sizeofIPv6Mreq] 24 | return so.Set(c, b) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv6/sys_asmreq_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows 6 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows 7 | 8 | package ipv6 9 | 10 | import ( 11 | "net" 12 | 13 | "golang.org/x/net/internal/socket" 14 | ) 15 | 16 | func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { 17 | return errNotImplemented 18 | } 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv6/sys_bpf.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux 6 | // +build linux 7 | 8 | package ipv6 9 | 10 | import ( 11 | "unsafe" 12 | 13 | "golang.org/x/net/bpf" 14 | "golang.org/x/net/internal/socket" 15 | "golang.org/x/sys/unix" 16 | ) 17 | 18 | func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error { 19 | prog := unix.SockFprog{ 20 | Len: uint16(len(f)), 21 | Filter: (*unix.SockFilter)(unsafe.Pointer(&f[0])), 22 | } 23 | b := (*[unix.SizeofSockFprog]byte)(unsafe.Pointer(&prog))[:unix.SizeofSockFprog] 24 | return so.Set(c, b) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv6/sys_bpf_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux 6 | // +build !linux 7 | 8 | package ipv6 9 | 10 | import ( 11 | "golang.org/x/net/bpf" 12 | "golang.org/x/net/internal/socket" 13 | ) 14 | 15 | func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error { 16 | return errNotImplemented 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv6/sys_ssmreq_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !aix && !darwin && !freebsd && !linux && !solaris && !zos 6 | // +build !aix,!darwin,!freebsd,!linux,!solaris,!zos 7 | 8 | package ipv6 9 | 10 | import ( 11 | "net" 12 | 13 | "golang.org/x/net/internal/socket" 14 | ) 15 | 16 | func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { 17 | return errNotImplemented 18 | } 19 | 20 | func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error { 21 | return errNotImplemented 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv6/sys_stub.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos 6 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos 7 | 8 | package ipv6 9 | 10 | var ( 11 | ctlOpts = [ctlMax]ctlOpt{} 12 | 13 | sockOpts = map[int]*sockOpt{} 14 | ) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv6/zsys_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_dragonfly.go 3 | 4 | package ipv6 5 | 6 | const ( 7 | sizeofSockaddrInet6 = 0x1c 8 | sizeofInet6Pktinfo = 0x14 9 | sizeofIPv6Mtuinfo = 0x20 10 | 11 | sizeofIPv6Mreq = 0x14 12 | 13 | sizeofICMPv6Filter = 0x20 14 | ) 15 | 16 | type sockaddrInet6 struct { 17 | Len uint8 18 | Family uint8 19 | Port uint16 20 | Flowinfo uint32 21 | Addr [16]byte /* in6_addr */ 22 | Scope_id uint32 23 | } 24 | 25 | type inet6Pktinfo struct { 26 | Addr [16]byte /* in6_addr */ 27 | Ifindex uint32 28 | } 29 | 30 | type ipv6Mtuinfo struct { 31 | Addr sockaddrInet6 32 | Mtu uint32 33 | } 34 | 35 | type ipv6Mreq struct { 36 | Multiaddr [16]byte /* in6_addr */ 37 | Interface uint32 38 | } 39 | 40 | type icmpv6Filter struct { 41 | Filt [8]uint32 42 | } 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv6/zsys_netbsd.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_netbsd.go 3 | 4 | package ipv6 5 | 6 | const ( 7 | sizeofSockaddrInet6 = 0x1c 8 | sizeofInet6Pktinfo = 0x14 9 | sizeofIPv6Mtuinfo = 0x20 10 | 11 | sizeofIPv6Mreq = 0x14 12 | 13 | sizeofICMPv6Filter = 0x20 14 | ) 15 | 16 | type sockaddrInet6 struct { 17 | Len uint8 18 | Family uint8 19 | Port uint16 20 | Flowinfo uint32 21 | Addr [16]byte /* in6_addr */ 22 | Scope_id uint32 23 | } 24 | 25 | type inet6Pktinfo struct { 26 | Addr [16]byte /* in6_addr */ 27 | Ifindex uint32 28 | } 29 | 30 | type ipv6Mtuinfo struct { 31 | Addr sockaddrInet6 32 | Mtu uint32 33 | } 34 | 35 | type ipv6Mreq struct { 36 | Multiaddr [16]byte /* in6_addr */ 37 | Interface uint32 38 | } 39 | 40 | type icmpv6Filter struct { 41 | Filt [8]uint32 42 | } 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv6/zsys_openbsd.go: -------------------------------------------------------------------------------- 1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT. 2 | // cgo -godefs defs_openbsd.go 3 | 4 | package ipv6 5 | 6 | const ( 7 | sizeofSockaddrInet6 = 0x1c 8 | sizeofInet6Pktinfo = 0x14 9 | sizeofIPv6Mtuinfo = 0x20 10 | 11 | sizeofIPv6Mreq = 0x14 12 | 13 | sizeofICMPv6Filter = 0x20 14 | ) 15 | 16 | type sockaddrInet6 struct { 17 | Len uint8 18 | Family uint8 19 | Port uint16 20 | Flowinfo uint32 21 | Addr [16]byte /* in6_addr */ 22 | Scope_id uint32 23 | } 24 | 25 | type inet6Pktinfo struct { 26 | Addr [16]byte /* in6_addr */ 27 | Ifindex uint32 28 | } 29 | 30 | type ipv6Mtuinfo struct { 31 | Addr sockaddrInet6 32 | Mtu uint32 33 | } 34 | 35 | type ipv6Mreq struct { 36 | Multiaddr [16]byte /* in6_addr */ 37 | Interface uint32 38 | } 39 | 40 | type icmpv6Filter struct { 41 | Filt [8]uint32 42 | } 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/internal/unsafeheader/unsafeheader.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package unsafeheader contains header declarations for the Go runtime's 6 | // slice and string implementations. 7 | // 8 | // This package allows x/sys to use types equivalent to 9 | // reflect.SliceHeader and reflect.StringHeader without introducing 10 | // a dependency on the (relatively heavy) "reflect" package. 11 | package unsafeheader 12 | 13 | import ( 14 | "unsafe" 15 | ) 16 | 17 | // Slice is the runtime representation of a slice. 18 | // It cannot be used safely or portably and its representation may change in a later release. 19 | type Slice struct { 20 | Data unsafe.Pointer 21 | Len int 22 | Cap int 23 | } 24 | 25 | // String is the runtime representation of a string. 26 | // It cannot be used safely or portably and its representation may change in a later release. 27 | type String struct { 28 | Data unsafe.Pointer 29 | Len int 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) && go1.9 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos 7 | // +build go1.9 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | type Signal = syscall.Signal 14 | type Errno = syscall.Errno 15 | type SysProcAttr = syscall.SysProcAttr 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | // +build gc 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 12 | // 13 | 14 | TEXT ·syscall6(SB),NOSPLIT,$0-88 15 | JMP syscall·syscall6(SB) 16 | 17 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 18 | JMP syscall·rawSyscall6(SB) 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (freebsd || netbsd || openbsd) && gc 6 | // +build freebsd netbsd openbsd 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // System call support for 386 BSD 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc 6 | // +build darwin dragonfly freebsd netbsd openbsd 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // System call support for AMD64 BSD 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (freebsd || netbsd || openbsd) && gc 6 | // +build freebsd netbsd openbsd 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // System call support for ARM BSD 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | // +build darwin freebsd netbsd openbsd 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // System call support for ARM64 BSD 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | // +build gc 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for mips64, OpenBSD 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-56 18 | JMP syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | JMP syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 24 | JMP syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 27 | JMP syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 30 | JMP syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | // +build gc 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 12 | // 13 | 14 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 15 | JMP syscall·sysvicall6(SB) 16 | 17 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 18 | JMP syscall·rawSysvicall6(SB) 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | HCI_CHANNEL_LOGGING = 4 27 | ) 28 | 29 | // Socketoption Level 30 | const ( 31 | SOL_BLUETOOTH = 0x112 32 | SOL_HCI = 0x0 33 | SOL_L2CAP = 0x6 34 | SOL_RFCOMM = 0x12 35 | SOL_SCO = 0x11 36 | ) 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos 7 | 8 | package unix 9 | 10 | const ( 11 | R_OK = 0x4 12 | W_OK = 0x2 13 | X_OK = 0x1 14 | ) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc 6 | // +build aix,ppc 7 | 8 | // Functions to access/create device major and minor numbers matching the 9 | // encoding used by AIX. 10 | 11 | package unix 12 | 13 | // Major returns the major component of a Linux device number. 14 | func Major(dev uint64) uint32 { 15 | return uint32((dev >> 16) & 0xffff) 16 | } 17 | 18 | // Minor returns the minor component of a Linux device number. 19 | func Minor(dev uint64) uint32 { 20 | return uint32(dev & 0xffff) 21 | } 22 | 23 | // Mkdev returns a Linux device number generated from the given major and minor 24 | // components. 25 | func Mkdev(major, minor uint32) uint64 { 26 | return uint64(((major) << 16) | (minor)) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc64 6 | // +build aix,ppc64 7 | 8 | // Functions to access/create device major and minor numbers matching the 9 | // encoding used AIX. 10 | 11 | package unix 12 | 13 | // Major returns the major component of a Linux device number. 14 | func Major(dev uint64) uint32 { 15 | return uint32((dev & 0x3fffffff00000000) >> 32) 16 | } 17 | 18 | // Minor returns the minor component of a Linux device number. 19 | func Minor(dev uint64) uint32 { 20 | return uint32((dev & 0x00000000ffffffff) >> 0) 21 | } 22 | 23 | // Mkdev returns a Linux device number generated from the given major and minor 24 | // components. 25 | func Mkdev(major, minor uint32) uint64 { 26 | var DEVNO64 uint64 27 | DEVNO64 = 0x8000000000000000 28 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64) 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Darwin's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a Darwin device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev >> 24) & 0xff) 13 | } 14 | 15 | // Minor returns the minor component of a Darwin device number. 16 | func Minor(dev uint64) uint32 { 17 | return uint32(dev & 0xffffff) 18 | } 19 | 20 | // Mkdev returns a Darwin device number generated from the given major and minor 21 | // components. 22 | func Mkdev(major, minor uint32) uint64 { 23 | return (uint64(major) << 24) | uint64(minor) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Dragonfly's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a DragonFlyBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a DragonFlyBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a DragonFlyBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_freebsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in FreeBSD's sys/types.h header. 7 | // 8 | // The information below is extracted and adapted from sys/types.h: 9 | // 10 | // Minor gives a cookie instead of an index since in order to avoid changing the 11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for 12 | // devices that don't use them. 13 | 14 | package unix 15 | 16 | // Major returns the major component of a FreeBSD device number. 17 | func Major(dev uint64) uint32 { 18 | return uint32((dev >> 8) & 0xff) 19 | } 20 | 21 | // Minor returns the minor component of a FreeBSD device number. 22 | func Minor(dev uint64) uint32 { 23 | return uint32(dev & 0xffff00ff) 24 | } 25 | 26 | // Mkdev returns a FreeBSD device number generated from the given major and 27 | // minor components. 28 | func Mkdev(major, minor uint32) uint64 { 29 | return (uint64(major) << 8) | uint64(minor) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_netbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in NetBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a NetBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x000fff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of a NetBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xfff00000) >> 12) 19 | return minor 20 | } 21 | 22 | // Mkdev returns a NetBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x000fff00 26 | dev |= (uint64(minor) << 12) & 0xfff00000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_openbsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in OpenBSD's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of an OpenBSD device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev & 0x0000ff00) >> 8) 13 | } 14 | 15 | // Minor returns the minor component of an OpenBSD device number. 16 | func Minor(dev uint64) uint32 { 17 | minor := uint32((dev & 0x000000ff) >> 0) 18 | minor |= uint32((dev & 0xffff0000) >> 8) 19 | return minor 20 | } 21 | 22 | // Mkdev returns an OpenBSD device number generated from the given major and minor 23 | // components. 24 | func Mkdev(major, minor uint32) uint64 { 25 | dev := (uint64(major) << 8) & 0x0000ff00 26 | dev |= (uint64(minor) << 8) & 0xffff0000 27 | dev |= (uint64(minor) << 0) & 0x000000ff 28 | return dev 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_zos.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build zos && s390x 6 | // +build zos,s390x 7 | 8 | // Functions to access/create device major and minor numbers matching the 9 | // encoding used by z/OS. 10 | // 11 | // The information below is extracted and adapted from macros. 12 | 13 | package unix 14 | 15 | // Major returns the major component of a z/OS device number. 16 | func Major(dev uint64) uint32 { 17 | return uint32((dev >> 16) & 0x0000FFFF) 18 | } 19 | 20 | // Minor returns the minor component of a z/OS device number. 21 | func Minor(dev uint64) uint32 { 22 | return uint32(dev & 0x0000FFFF) 23 | } 24 | 25 | // Mkdev returns a z/OS device number generated from the given major and minor 26 | // components. 27 | func Mkdev(major, minor uint32) uint64 { 28 | return (uint64(major) << 16) | uint64(minor) 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 6 | // +build armbe arm64be m68k mips mips64 mips64p32 ppc ppc64 s390 s390x shbe sparc sparc64 7 | 8 | package unix 9 | 10 | const isBigEndian = true 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh 6 | // +build 386 amd64 amd64p32 alpha arm arm64 loong64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh 7 | 8 | package unix 9 | 10 | const isBigEndian = false 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos 7 | 8 | // Unix environment variables. 9 | 10 | package unix 11 | 12 | import "syscall" 13 | 14 | func Getenv(key string) (value string, found bool) { 15 | return syscall.Getenv(key) 16 | } 17 | 18 | func Setenv(key, value string) error { 19 | return syscall.Setenv(key, value) 20 | } 21 | 22 | func Clearenv() { 23 | syscall.Clearenv() 24 | } 25 | 26 | func Environ() []string { 27 | return syscall.Environ() 28 | } 29 | 30 | func Unsetenv(key string) error { 31 | return syscall.Unsetenv(key) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/errors_freebsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Constants that were deprecated or moved to enums in the FreeBSD headers. Keep 6 | // them here for backwards compatibility. 7 | 8 | package unix 9 | 10 | const ( 11 | DLT_HHDLC = 0x79 12 | IPV6_MIN_MEMBERSHIPS = 0x1f 13 | IP_MAX_SOURCE_FILTER = 0x400 14 | IP_MIN_MEMBERSHIPS = 0x1f 15 | RT_CACHING_CONTEXT = 0x1 16 | RT_NORTREF = 0x2 17 | ) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | import "unsafe" 8 | 9 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 10 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 11 | return fcntl(int(fd), cmd, arg) 12 | } 13 | 14 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 15 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 16 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk)))) 17 | return err 18 | } 19 | 20 | // FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command. 21 | func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error { 22 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore)))) 23 | return err 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc) 6 | // +build linux,386 linux,arm linux,mips linux,mipsle linux,ppc 7 | 8 | package unix 9 | 10 | func init() { 11 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 12 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 13 | fcntl64Syscall = SYS_FCNTL64 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fdset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos 7 | 8 | package unix 9 | 10 | // Set adds fd to the set fds. 11 | func (fds *FdSet) Set(fd int) { 12 | fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS)) 13 | } 14 | 15 | // Clear removes fd from the set fds. 16 | func (fds *FdSet) Clear(fd int) { 17 | fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS)) 18 | } 19 | 20 | // IsSet returns whether fd is in the set fds. 21 | func (fds *FdSet) IsSet(fd int) bool { 22 | return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0 23 | } 24 | 25 | // Zero clears the set fds. 26 | func (fds *FdSet) Zero() { 27 | for i := range fds.Bits { 28 | fds.Bits[i] = 0 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gccgo && linux && amd64 6 | // +build gccgo,linux,amd64 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | //extern gettimeofday 13 | func realGettimeofday(*Timeval, *byte) int32 14 | 15 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 16 | r := realGettimeofday(tv, nil) 17 | if r < 0 { 18 | return syscall.GetErrno() 19 | } 20 | return 0 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/pagesize_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 7 | 8 | // For Unix, get the pagesize from the runtime. 9 | 10 | package unix 11 | 12 | import "syscall" 13 | 14 | func Getpagesize() int { 15 | return syscall.Getpagesize() 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin && !ios 6 | // +build darwin,!ios 7 | 8 | package unix 9 | 10 | func ptrace(request int, pid int, addr uintptr, data uintptr) error { 11 | return ptrace1(request, pid, addr, data) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_ios.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ios 6 | // +build ios 7 | 8 | package unix 9 | 10 | func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 11 | return ENOTSUP 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin && race) || (linux && race) || (freebsd && race) 6 | // +build darwin,race linux,race freebsd,race 7 | 8 | package unix 9 | 10 | import ( 11 | "runtime" 12 | "unsafe" 13 | ) 14 | 15 | const raceenabled = true 16 | 17 | func raceAcquire(addr unsafe.Pointer) { 18 | runtime.RaceAcquire(addr) 19 | } 20 | 21 | func raceReleaseMerge(addr unsafe.Pointer) { 22 | runtime.RaceReleaseMerge(addr) 23 | } 24 | 25 | func raceReadRange(addr unsafe.Pointer, len int) { 26 | runtime.RaceReadRange(addr, len) 27 | } 28 | 29 | func raceWriteRange(addr unsafe.Pointer, len int) { 30 | runtime.RaceWriteRange(addr, len) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos 6 | // +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly zos 7 | 8 | package unix 9 | 10 | import ( 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = false 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | } 18 | 19 | func raceReleaseMerge(addr unsafe.Pointer) { 20 | } 21 | 22 | func raceReadRange(addr unsafe.Pointer, len int) { 23 | } 24 | 25 | func raceWriteRange(addr unsafe.Pointer, len int) { 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdents.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd 6 | // +build aix dragonfly freebsd linux netbsd openbsd 7 | 8 | package unix 9 | 10 | // ReadDirent reads directory entries from fd and writes them into buf. 11 | func ReadDirent(fd int, buf []byte) (n int, err error) { 12 | return Getdents(fd, buf) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdirentries.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin 6 | // +build darwin 7 | 8 | package unix 9 | 10 | import "unsafe" 11 | 12 | // ReadDirent reads directory entries from fd and writes them into buf. 13 | func ReadDirent(fd int, buf []byte) (n int, err error) { 14 | // Final argument is (basep *uintptr) and the syscall doesn't take nil. 15 | // 64 bits should be enough. (32 bits isn't even on 386). Since the 16 | // actual system call is getdirentries64, 64 is a good guess. 17 | // TODO(rsc): Can we use a single global basep for all calls? 18 | var base = (*uintptr)(unsafe.Pointer(new(uint64))) 19 | return Getdirentries(fd, buf, base) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | // Round the length of a raw sockaddr up to align it properly. 8 | func cmsgAlignOf(salen int) int { 9 | salign := SizeofPtr 10 | if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) { 11 | // 64-bit Dragonfly before the September 2019 ABI changes still requires 12 | // 32-bit aligned access to network subsystem. 13 | salign = 4 14 | } 15 | return (salen + salign - 1) & ^(salign - 1) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 7 | 8 | package unix 9 | 10 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 11 | if val < 0 { 12 | return "-" + uitoa(uint(-val)) 13 | } 14 | return uitoa(uint(val)) 15 | } 16 | 17 | func uitoa(val uint) string { 18 | var buf [32]byte // big enough for int64 19 | i := len(buf) - 1 20 | for val >= 10 { 21 | buf[i] = byte(val%10 + '0') 22 | i-- 23 | val /= 10 24 | } 25 | buf[i] = byte(val + '0') 26 | return string(buf[i:]) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin && go1.12 && !go1.13 6 | // +build darwin,go1.12,!go1.13 7 | 8 | package unix 9 | 10 | import ( 11 | "unsafe" 12 | ) 13 | 14 | const _SYS_GETDIRENTRIES64 = 344 15 | 16 | func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { 17 | // To implement this using libSystem we'd need syscall_syscallPtr for 18 | // fdopendir. However, syscallPtr was only added in Go 1.13, so we fall 19 | // back to raw syscalls for this func on Go 1.12. 20 | var p unsafe.Pointer 21 | if len(buf) > 0 { 22 | p = unsafe.Pointer(&buf[0]) 23 | } else { 24 | p = unsafe.Pointer(&_zero) 25 | } 26 | r0, _, e1 := Syscall6(_SYS_GETDIRENTRIES64, uintptr(fd), uintptr(p), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) 27 | n = int(r0) 28 | if e1 != 0 { 29 | return n, errnoErr(e1) 30 | } 31 | return n, nil 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_alarm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64) 6 | // +build linux 7 | // +build 386 amd64 mips mipsle mips64 mipsle ppc64 ppc64le ppc s390x sparc64 8 | 9 | package unix 10 | 11 | // SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH 12 | // values. 13 | 14 | //sys Alarm(seconds uint) (remaining uint, err error) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && linux && gc 6 | // +build amd64,linux,gc 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | //go:noescape 13 | func gettimeofday(tv *Timeval) (err syscall.Errno) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc 6 | // +build linux,gc 7 | 8 | package unix 9 | 10 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail. 11 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 12 | 13 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't 14 | // fail. 15 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc && 386 6 | // +build linux,gc,386 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | // Underlying system call writes to newoffset via pointer. 13 | // Implemented in assembly to avoid allocation. 14 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 15 | 16 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 17 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && gc && linux 6 | // +build arm,gc,linux 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | // Underlying system call writes to newoffset via pointer. 13 | // Implemented in assembly to avoid allocation. 14 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gccgo && 386 6 | // +build linux,gccgo,386 7 | 8 | package unix 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 16 | var newoffset int64 17 | offsetLow := uint32(offset & 0xffffffff) 18 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 19 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 20 | return newoffset, err 21 | } 22 | 23 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 24 | fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 25 | return int(fd), err 26 | } 27 | 28 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 29 | fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 30 | return int(fd), err 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gccgo && arm 6 | // +build linux,gccgo,arm 7 | 8 | package unix 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 16 | var newoffset int64 17 | offsetLow := uint32(offset & 0xffffffff) 18 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 19 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 20 | return newoffset, err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build 386 && netbsd 6 | // +build 386,netbsd 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: int32(nsec)} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: int32(usec)} 16 | } 17 | 18 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 19 | k.Ident = uint32(fd) 20 | k.Filter = uint32(mode) 21 | k.Flags = uint32(flags) 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint32(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = int32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && netbsd 6 | // +build amd64,netbsd 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: nsec} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: int32(usec)} 16 | } 17 | 18 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 19 | k.Ident = uint64(fd) 20 | k.Filter = uint32(mode) 21 | k.Flags = uint32(flags) 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint64(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = int32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && netbsd 6 | // +build arm,netbsd 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: int32(nsec)} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: int32(usec)} 16 | } 17 | 18 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 19 | k.Ident = uint32(fd) 20 | k.Filter = uint32(mode) 21 | k.Flags = uint32(flags) 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint32(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = int32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm64 && netbsd 6 | // +build arm64,netbsd 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: nsec} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: int32(usec)} 16 | } 17 | 18 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 19 | k.Ident = uint64(fd) 20 | k.Filter = uint32(mode) 21 | k.Flags = uint32(flags) 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint64(length) 26 | } 27 | 28 | func (msghdr *Msghdr) SetControllen(length int) { 29 | msghdr.Controllen = uint32(length) 30 | } 31 | 32 | func (msghdr *Msghdr) SetIovlen(length int) { 33 | msghdr.Iovlen = int32(length) 34 | } 35 | 36 | func (cmsg *Cmsghdr) SetLen(length int) { 37 | cmsg.Len = uint32(length) 38 | } 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_mips64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | func setTimespec(sec, nsec int64) Timespec { 8 | return Timespec{Sec: sec, Nsec: nsec} 9 | } 10 | 11 | func setTimeval(sec, usec int64) Timeval { 12 | return Timeval{Sec: sec, Usec: usec} 13 | } 14 | 15 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 16 | k.Ident = uint64(fd) 17 | k.Filter = int16(mode) 18 | k.Flags = uint16(flags) 19 | } 20 | 21 | func (iov *Iovec) SetLen(length int) { 22 | iov.Len = uint64(length) 23 | } 24 | 25 | func (msghdr *Msghdr) SetControllen(length int) { 26 | msghdr.Controllen = uint32(length) 27 | } 28 | 29 | func (cmsg *Cmsghdr) SetLen(length int) { 30 | cmsg.Len = uint32(length) 31 | } 32 | 33 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 34 | // of OpenBSD the syscall is called sysctl instead of __sysctl. 35 | const SYS___SYSCTL = SYS_SYSCTL 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && solaris 6 | // +build amd64,solaris 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: nsec} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: usec} 16 | } 17 | 18 | func (iov *Iovec) SetLen(length int) { 19 | iov.Len = uint64(length) 20 | } 21 | 22 | func (msghdr *Msghdr) SetIovlen(length int) { 23 | msghdr.Iovlen = int32(length) 24 | } 25 | 26 | func (cmsg *Cmsghdr) SetLen(length int) { 27 | cmsg.Len = uint32(length) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris) && gc && !ppc64le && !ppc64 6 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 7 | // +build gc 8 | // +build !ppc64le 9 | // +build !ppc64 10 | 11 | package unix 12 | 13 | import "syscall" 14 | 15 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 16 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 17 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 18 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (ppc64le || ppc64) && gc 6 | // +build linux 7 | // +build ppc64le ppc64 8 | // +build gc 9 | 10 | package unix 11 | 12 | import "syscall" 13 | 14 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 15 | return syscall.Syscall(trap, a1, a2, a3) 16 | } 17 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 18 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6) 19 | } 20 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 21 | return syscall.RawSyscall(trap, a1, a2, a3) 22 | } 23 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 24 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux 6 | // +build linux 7 | 8 | package unix 9 | 10 | import "runtime" 11 | 12 | // SysvShmCtl performs control operations on the shared memory segment 13 | // specified by id. 14 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 15 | if runtime.GOARCH == "arm" || 16 | runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" { 17 | cmd |= ipc_64 18 | } 19 | 20 | return shmctl(id, cmd, desc) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sysvshm_unix_other.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin && !ios 6 | // +build darwin,!ios 7 | 8 | package unix 9 | 10 | // SysvShmCtl performs control operations on the shared memory segment 11 | // specified by id. 12 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) { 13 | return shmctl(id, cmd, desc) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT. 2 | 3 | package unix 4 | 5 | import "unsafe" 6 | 7 | // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries. 8 | func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error { 9 | iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))} 10 | return ptrace(PTRACE_GETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec))) 11 | } 12 | 13 | // PtraceSetRegSetArm64 sets the registers used by arm64 binaries. 14 | func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error { 15 | iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))} 16 | return ptrace(PTRACE_SETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec))) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s: -------------------------------------------------------------------------------- 1 | // go run mkasm_darwin.go amd64 2 | // Code generated by the command above; DO NOT EDIT. 3 | 4 | //go:build go1.13 5 | // +build go1.13 6 | 7 | #include "textflag.h" 8 | 9 | TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0 10 | JMP libc_fdopendir(SB) 11 | 12 | GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8 13 | DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB) 14 | 15 | TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0 16 | JMP libc_closedir(SB) 17 | 18 | GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8 19 | DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB) 20 | 21 | TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0 22 | JMP libc_readdir_r(SB) 23 | 24 | GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8 25 | DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB) 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s: -------------------------------------------------------------------------------- 1 | // go run mkasm_darwin.go arm64 2 | // Code generated by the command above; DO NOT EDIT. 3 | 4 | //go:build go1.13 5 | // +build go1.13 6 | 7 | #include "textflag.h" 8 | 9 | TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0 10 | JMP libc_fdopendir(SB) 11 | 12 | GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8 13 | DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB) 14 | 15 | TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0 16 | JMP libc_closedir(SB) 17 | 18 | GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8 19 | DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB) 20 | 21 | TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0 22 | JMP libc_readdir_r(SB) 23 | 24 | GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8 25 | DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB) 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go: -------------------------------------------------------------------------------- 1 | // cgo -godefs types_illumos.go | go run mkpost.go 2 | // Code generated by the command above; see README.md. DO NOT EDIT. 3 | 4 | //go:build amd64 && illumos 5 | // +build amd64,illumos 6 | 7 | package unix 8 | 9 | const ( 10 | TUNNEWPPA = 0x540001 11 | TUNSETPPA = 0x540002 12 | 13 | I_STR = 0x5308 14 | I_POP = 0x5303 15 | I_PUSH = 0x5302 16 | I_LINK = 0x530c 17 | I_UNLINK = 0x530d 18 | I_PLINK = 0x5316 19 | I_PUNLINK = 0x5317 20 | 21 | IF_UNITSEL = -0x7ffb8cca 22 | ) 23 | 24 | type strbuf struct { 25 | Maxlen int32 26 | Len int32 27 | Buf *int8 28 | } 29 | 30 | type Strioctl struct { 31 | Cmd int32 32 | Timout int32 33 | Len int32 34 | Dp *int8 35 | } 36 | 37 | type Lifreq struct { 38 | Name [32]int8 39 | Lifru1 [4]byte 40 | Type uint32 41 | Lifru [336]byte 42 | } 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows && go1.9 6 | // +build windows,go1.9 7 | 8 | package windows 9 | 10 | import "syscall" 11 | 12 | type Errno = syscall.Errno 13 | type SysProcAttr = syscall.SysProcAttr 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/empty.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !go1.12 6 | // +build !go1.12 7 | 8 | // This file is here to allow bodyless functions with go:linkname for Go 1.11 9 | // and earlier (see https://golang.org/issue/23311). 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/eventlog.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | // +build windows 7 | 8 | package windows 9 | 10 | const ( 11 | EVENTLOG_SUCCESS = 0 12 | EVENTLOG_ERROR_TYPE = 1 13 | EVENTLOG_WARNING_TYPE = 2 14 | EVENTLOG_INFORMATION_TYPE = 4 15 | EVENTLOG_AUDIT_SUCCESS = 8 16 | EVENTLOG_AUDIT_FAILURE = 16 17 | ) 18 | 19 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW 20 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource 21 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build generate 6 | // +build generate 7 | 8 | package windows 9 | 10 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go setupapi_windows.go 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows && race 6 | // +build windows,race 7 | 8 | package windows 9 | 10 | import ( 11 | "runtime" 12 | "unsafe" 13 | ) 14 | 15 | const raceenabled = true 16 | 17 | func raceAcquire(addr unsafe.Pointer) { 18 | runtime.RaceAcquire(addr) 19 | } 20 | 21 | func raceReleaseMerge(addr unsafe.Pointer) { 22 | runtime.RaceReleaseMerge(addr) 23 | } 24 | 25 | func raceReadRange(addr unsafe.Pointer, len int) { 26 | runtime.RaceReadRange(addr, len) 27 | } 28 | 29 | func raceWriteRange(addr unsafe.Pointer, len int) { 30 | runtime.RaceWriteRange(addr, len) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows && !race 6 | // +build windows,!race 7 | 8 | package windows 9 | 10 | import ( 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = false 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | } 18 | 19 | func raceReleaseMerge(addr unsafe.Pointer) { 20 | } 21 | 22 | func raceReadRange(addr unsafe.Pointer, len int) { 23 | } 24 | 25 | func raceWriteRange(addr unsafe.Pointer, len int) { 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build windows 6 | // +build windows 7 | 8 | package windows 9 | 10 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 11 | if val < 0 { 12 | return "-" + itoa(-val) 13 | } 14 | var buf [32]byte // big enough for int64 15 | i := len(buf) - 1 16 | for val >= 10 { 17 | buf[i] = byte(val%10 + '0') 18 | i-- 19 | val /= 10 20 | } 21 | buf[i] = byte(val + '0') 22 | return string(buf[i:]) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | _ uint32 // pad to 8 byte boundary 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | _ uint32 // pad to 8 byte boundary 35 | } 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | 24 | type JOBOBJECT_BASIC_LIMIT_INFORMATION struct { 25 | PerProcessUserTimeLimit int64 26 | PerJobUserTimeLimit int64 27 | LimitFlags uint32 28 | MinimumWorkingSetSize uintptr 29 | MaximumWorkingSetSize uintptr 30 | ActiveProcessLimit uint32 31 | Affinity uintptr 32 | PriorityClass uint32 33 | SchedulingClass uint32 34 | } 35 | --------------------------------------------------------------------------------