├── .gitignore ├── .goreleaser.yml ├── Dockerfile ├── Gopkg.lock ├── Gopkg.toml ├── README.md ├── app.conf ├── config └── config.go ├── hosts ├── main.go ├── server └── server.go ├── source ├── from_api.go ├── from_file.go └── getip.go └── vendor ├── github.com ├── astaxie │ └── beego │ │ ├── LICENSE │ │ ├── config │ │ ├── config.go │ │ ├── fake.go │ │ ├── ini.go │ │ └── json.go │ │ └── utils │ │ └── captcha │ │ └── LICENSE ├── fsnotify │ └── fsnotify │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── CHANGELOG.md │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── fen.go │ │ ├── fsnotify.go │ │ ├── inotify.go │ │ ├── inotify_poller.go │ │ ├── kqueue.go │ │ ├── open_mode_bsd.go │ │ ├── open_mode_darwin.go │ │ └── windows.go ├── google │ └── go-querystring │ │ ├── LICENSE │ │ └── query │ │ └── encode.go ├── levigross │ └── grequests │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── base.go │ │ ├── file_upload.go │ │ ├── request.go │ │ ├── response.go │ │ ├── session.go │ │ └── utils.go └── miekg │ └── dns │ ├── .codecov.yml │ ├── .gitignore │ ├── .travis.yml │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── COPYRIGHT │ ├── Gopkg.lock │ ├── Gopkg.toml │ ├── LICENSE │ ├── Makefile.fuzz │ ├── Makefile.release │ ├── README.md │ ├── acceptfunc.go │ ├── client.go │ ├── clientconfig.go │ ├── dane.go │ ├── defaults.go │ ├── dns.go │ ├── dnssec.go │ ├── dnssec_keygen.go │ ├── dnssec_keyscan.go │ ├── dnssec_privkey.go │ ├── doc.go │ ├── duplicate.go │ ├── duplicate_generate.go │ ├── edns.go │ ├── format.go │ ├── fuzz.go │ ├── generate.go │ ├── labels.go │ ├── listen_go111.go │ ├── listen_go_not111.go │ ├── msg.go │ ├── msg_generate.go │ ├── msg_helpers.go │ ├── nsecx.go │ ├── privaterr.go │ ├── reverse.go │ ├── sanitize.go │ ├── scan.go │ ├── scan_rr.go │ ├── serve_mux.go │ ├── server.go │ ├── sig0.go │ ├── singleinflight.go │ ├── smimea.go │ ├── tlsa.go │ ├── tsig.go │ ├── types.go │ ├── types_generate.go │ ├── udp.go │ ├── udp_windows.go │ ├── update.go │ ├── version.go │ ├── xfr.go │ ├── zduplicate.go │ ├── zmsg.go │ └── ztypes.go └── golang.org └── x ├── crypto ├── AUTHORS ├── CONTRIBUTORS ├── LICENSE ├── PATENTS └── ed25519 │ ├── ed25519.go │ └── internal │ └── edwards25519 │ ├── const.go │ └── edwards25519.go ├── net ├── AUTHORS ├── CONTRIBUTORS ├── LICENSE ├── PATENTS ├── bpf │ ├── asm.go │ ├── constants.go │ ├── doc.go │ ├── instructions.go │ ├── setter.go │ ├── vm.go │ └── vm_instructions.go ├── idna │ ├── idna.go │ ├── punycode.go │ ├── tables.go │ ├── trie.go │ └── trieval.go ├── internal │ ├── iana │ │ ├── const.go │ │ └── gen.go │ └── socket │ │ ├── cmsghdr.go │ │ ├── cmsghdr_bsd.go │ │ ├── cmsghdr_linux_32bit.go │ │ ├── cmsghdr_linux_64bit.go │ │ ├── cmsghdr_solaris_64bit.go │ │ ├── cmsghdr_stub.go │ │ ├── defs_darwin.go │ │ ├── defs_dragonfly.go │ │ ├── defs_freebsd.go │ │ ├── defs_linux.go │ │ ├── defs_netbsd.go │ │ ├── defs_openbsd.go │ │ ├── defs_solaris.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 │ │ ├── rawconn.go │ │ ├── rawconn_mmsg.go │ │ ├── rawconn_msg.go │ │ ├── rawconn_nommsg.go │ │ ├── rawconn_nomsg.go │ │ ├── rawconn_stub.go │ │ ├── reflect.go │ │ ├── socket.go │ │ ├── sys.go │ │ ├── sys_bsd.go │ │ ├── sys_bsdvar.go │ │ ├── sys_darwin.go │ │ ├── sys_dragonfly.go │ │ ├── sys_go1_11_darwin.go │ │ ├── sys_go1_12_darwin.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_mips.go │ │ ├── sys_linux_mips64.go │ │ ├── sys_linux_mips64le.go │ │ ├── sys_linux_mipsle.go │ │ ├── sys_linux_ppc64.go │ │ ├── sys_linux_ppc64le.go │ │ ├── sys_linux_s390x.go │ │ ├── sys_linux_s390x.s │ │ ├── sys_netbsd.go │ │ ├── sys_posix.go │ │ ├── sys_solaris.go │ │ ├── sys_solaris_amd64.s │ │ ├── sys_stub.go │ │ ├── sys_unix.go │ │ ├── sys_windows.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_linux_386.go │ │ ├── zsys_linux_amd64.go │ │ ├── zsys_linux_arm.go │ │ ├── zsys_linux_arm64.go │ │ ├── zsys_linux_mips.go │ │ ├── zsys_linux_mips64.go │ │ ├── zsys_linux_mips64le.go │ │ ├── zsys_linux_mipsle.go │ │ ├── zsys_linux_ppc64.go │ │ ├── zsys_linux_ppc64le.go │ │ ├── zsys_linux_s390x.go │ │ ├── zsys_netbsd_386.go │ │ ├── zsys_netbsd_amd64.go │ │ ├── zsys_netbsd_arm.go │ │ ├── zsys_openbsd_386.go │ │ ├── zsys_openbsd_amd64.go │ │ ├── zsys_openbsd_arm.go │ │ └── zsys_solaris_amd64.go ├── ipv4 │ ├── batch.go │ ├── control.go │ ├── control_bsd.go │ ├── control_pktinfo.go │ ├── control_stub.go │ ├── control_unix.go │ ├── control_windows.go │ ├── defs_darwin.go │ ├── defs_dragonfly.go │ ├── defs_freebsd.go │ ├── defs_linux.go │ ├── defs_netbsd.go │ ├── defs_openbsd.go │ ├── defs_solaris.go │ ├── dgramopt.go │ ├── doc.go │ ├── endpoint.go │ ├── gen.go │ ├── genericopt.go │ ├── header.go │ ├── helper.go │ ├── iana.go │ ├── icmp.go │ ├── icmp_linux.go │ ├── icmp_stub.go │ ├── packet.go │ ├── packet_go1_8.go │ ├── packet_go1_9.go │ ├── payload.go │ ├── payload_cmsg.go │ ├── payload_cmsg_go1_8.go │ ├── payload_cmsg_go1_9.go │ ├── payload_nocmsg.go │ ├── sockopt.go │ ├── sockopt_posix.go │ ├── sockopt_stub.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 │ ├── zsys_darwin.go │ ├── zsys_dragonfly.go │ ├── zsys_freebsd_386.go │ ├── zsys_freebsd_amd64.go │ ├── zsys_freebsd_arm.go │ ├── zsys_linux_386.go │ ├── zsys_linux_amd64.go │ ├── zsys_linux_arm.go │ ├── zsys_linux_arm64.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_s390x.go │ ├── zsys_netbsd.go │ ├── zsys_openbsd.go │ └── zsys_solaris.go ├── ipv6 │ ├── batch.go │ ├── control.go │ ├── control_rfc2292_unix.go │ ├── control_rfc3542_unix.go │ ├── control_stub.go │ ├── control_unix.go │ ├── control_windows.go │ ├── defs_darwin.go │ ├── defs_dragonfly.go │ ├── defs_freebsd.go │ ├── defs_linux.go │ ├── defs_netbsd.go │ ├── defs_openbsd.go │ ├── defs_solaris.go │ ├── dgramopt.go │ ├── doc.go │ ├── endpoint.go │ ├── gen.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 │ ├── payload.go │ ├── payload_cmsg.go │ ├── payload_cmsg_go1_8.go │ ├── payload_cmsg_go1_9.go │ ├── payload_nocmsg.go │ ├── sockopt.go │ ├── sockopt_posix.go │ ├── sockopt_stub.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 │ ├── zsys_darwin.go │ ├── zsys_dragonfly.go │ ├── zsys_freebsd_386.go │ ├── zsys_freebsd_amd64.go │ ├── zsys_freebsd_arm.go │ ├── zsys_linux_386.go │ ├── zsys_linux_amd64.go │ ├── zsys_linux_arm.go │ ├── zsys_linux_arm64.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_s390x.go │ ├── zsys_netbsd.go │ ├── zsys_openbsd.go │ └── zsys_solaris.go └── publicsuffix │ ├── gen.go │ ├── list.go │ └── table.go ├── sys ├── AUTHORS ├── CONTRIBUTORS ├── LICENSE ├── PATENTS └── unix │ ├── .gitignore │ ├── README.md │ ├── affinity_linux.go │ ├── aliases.go │ ├── asm_aix_ppc64.s │ ├── asm_darwin_386.s │ ├── asm_darwin_amd64.s │ ├── asm_darwin_arm.s │ ├── asm_darwin_arm64.s │ ├── asm_dragonfly_amd64.s │ ├── asm_freebsd_386.s │ ├── asm_freebsd_amd64.s │ ├── asm_freebsd_arm.s │ ├── asm_linux_386.s │ ├── asm_linux_amd64.s │ ├── asm_linux_arm.s │ ├── asm_linux_arm64.s │ ├── asm_linux_mips64x.s │ ├── asm_linux_mipsx.s │ ├── asm_linux_ppc64x.s │ ├── asm_linux_s390x.s │ ├── asm_netbsd_386.s │ ├── asm_netbsd_amd64.s │ ├── asm_netbsd_arm.s │ ├── asm_openbsd_386.s │ ├── asm_openbsd_amd64.s │ ├── asm_openbsd_arm.s │ ├── asm_solaris_amd64.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 │ ├── dirent.go │ ├── endian_big.go │ ├── endian_little.go │ ├── env_unix.go │ ├── errors_freebsd_386.go │ ├── errors_freebsd_amd64.go │ ├── errors_freebsd_arm.go │ ├── fcntl.go │ ├── fcntl_linux_32bit.go │ ├── gccgo.go │ ├── gccgo_c.c │ ├── gccgo_linux_amd64.go │ ├── ioctl.go │ ├── mkall.sh │ ├── mkasm_darwin.go │ ├── mkerrors.sh │ ├── mkpost.go │ ├── mksyscall.go │ ├── mksyscall_aix_ppc.pl │ ├── mksyscall_aix_ppc64.pl │ ├── mksyscall_solaris.pl │ ├── mksysctl_openbsd.pl │ ├── mksysnum_darwin.pl │ ├── mksysnum_dragonfly.pl │ ├── mksysnum_freebsd.pl │ ├── mksysnum_netbsd.pl │ ├── mksysnum_openbsd.pl │ ├── openbsd_pledge.go │ ├── openbsd_unveil.go │ ├── pagesize_unix.go │ ├── race.go │ ├── race0.go │ ├── sockcmsg_linux.go │ ├── sockcmsg_unix.go │ ├── str.go │ ├── syscall.go │ ├── syscall_aix.go │ ├── syscall_aix_ppc.go │ ├── syscall_aix_ppc64.go │ ├── syscall_bsd.go │ ├── syscall_darwin.go │ ├── syscall_darwin_386.go │ ├── syscall_darwin_amd64.go │ ├── syscall_darwin_arm.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_linux.go │ ├── syscall_linux_386.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_gccgo_386.go │ ├── syscall_linux_gccgo_arm.go │ ├── syscall_linux_mips64x.go │ ├── syscall_linux_mipsx.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_openbsd.go │ ├── syscall_openbsd_386.go │ ├── syscall_openbsd_amd64.go │ ├── syscall_openbsd_arm.go │ ├── syscall_solaris.go │ ├── syscall_solaris_amd64.go │ ├── syscall_unix.go │ ├── syscall_unix_gc.go │ ├── syscall_unix_gc_ppc64x.go │ ├── timestruct.go │ ├── types_aix.go │ ├── types_darwin.go │ ├── types_dragonfly.go │ ├── types_freebsd.go │ ├── types_netbsd.go │ ├── types_openbsd.go │ ├── types_solaris.go │ ├── xattr_bsd.go │ ├── zerrors_aix_ppc.go │ ├── zerrors_aix_ppc64.go │ ├── zerrors_darwin_386.go │ ├── zerrors_darwin_amd64.go │ ├── zerrors_darwin_arm.go │ ├── zerrors_darwin_arm64.go │ ├── zerrors_dragonfly_amd64.go │ ├── zerrors_freebsd_386.go │ ├── zerrors_freebsd_amd64.go │ ├── zerrors_freebsd_arm.go │ ├── zerrors_linux_386.go │ ├── zerrors_linux_amd64.go │ ├── zerrors_linux_arm.go │ ├── zerrors_linux_arm64.go │ ├── zerrors_linux_mips.go │ ├── zerrors_linux_mips64.go │ ├── zerrors_linux_mips64le.go │ ├── zerrors_linux_mipsle.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_openbsd_386.go │ ├── zerrors_openbsd_amd64.go │ ├── zerrors_openbsd_arm.go │ ├── zerrors_solaris_amd64.go │ ├── zptrace386_linux.go │ ├── zptracearm_linux.go │ ├── zptracemips_linux.go │ ├── zptracemipsle_linux.go │ ├── zsyscall_aix_ppc.go │ ├── zsyscall_aix_ppc64.go │ ├── zsyscall_aix_ppc64_gc.go │ ├── zsyscall_aix_ppc64_gccgo.go │ ├── zsyscall_darwin_386.1_11.go │ ├── zsyscall_darwin_386.go │ ├── zsyscall_darwin_386.s │ ├── zsyscall_darwin_amd64.1_11.go │ ├── zsyscall_darwin_amd64.go │ ├── zsyscall_darwin_amd64.s │ ├── zsyscall_darwin_arm.1_11.go │ ├── zsyscall_darwin_arm.go │ ├── zsyscall_darwin_arm.s │ ├── zsyscall_darwin_arm64.1_11.go │ ├── 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_linux_386.go │ ├── zsyscall_linux_amd64.go │ ├── zsyscall_linux_arm.go │ ├── zsyscall_linux_arm64.go │ ├── zsyscall_linux_mips.go │ ├── zsyscall_linux_mips64.go │ ├── zsyscall_linux_mips64le.go │ ├── zsyscall_linux_mipsle.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_openbsd_386.go │ ├── zsyscall_openbsd_amd64.go │ ├── zsyscall_openbsd_arm.go │ ├── zsyscall_solaris_amd64.go │ ├── zsysctl_openbsd_386.go │ ├── zsysctl_openbsd_amd64.go │ ├── zsysctl_openbsd_arm.go │ ├── zsysnum_darwin_386.go │ ├── zsysnum_darwin_amd64.go │ ├── zsysnum_darwin_arm.go │ ├── zsysnum_darwin_arm64.go │ ├── zsysnum_dragonfly_amd64.go │ ├── zsysnum_freebsd_386.go │ ├── zsysnum_freebsd_amd64.go │ ├── zsysnum_freebsd_arm.go │ ├── zsysnum_linux_386.go │ ├── zsysnum_linux_amd64.go │ ├── zsysnum_linux_arm.go │ ├── zsysnum_linux_arm64.go │ ├── zsysnum_linux_mips.go │ ├── zsysnum_linux_mips64.go │ ├── zsysnum_linux_mips64le.go │ ├── zsysnum_linux_mipsle.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_openbsd_386.go │ ├── zsysnum_openbsd_amd64.go │ ├── zsysnum_openbsd_arm.go │ ├── ztypes_aix_ppc.go │ ├── ztypes_aix_ppc64.go │ ├── ztypes_darwin_386.go │ ├── ztypes_darwin_amd64.go │ ├── ztypes_darwin_arm.go │ ├── ztypes_darwin_arm64.go │ ├── ztypes_dragonfly_amd64.go │ ├── ztypes_freebsd_386.go │ ├── ztypes_freebsd_amd64.go │ ├── ztypes_freebsd_arm.go │ ├── ztypes_linux_386.go │ ├── ztypes_linux_amd64.go │ ├── ztypes_linux_arm.go │ ├── ztypes_linux_arm64.go │ ├── ztypes_linux_mips.go │ ├── ztypes_linux_mips64.go │ ├── ztypes_linux_mips64le.go │ ├── ztypes_linux_mipsle.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_openbsd_386.go │ ├── ztypes_openbsd_amd64.go │ ├── ztypes_openbsd_arm.go │ └── ztypes_solaris_amd64.go └── text ├── AUTHORS ├── CONTRIBUTORS ├── LICENSE ├── PATENTS ├── collate ├── build │ ├── builder.go │ ├── colelem.go │ ├── contract.go │ ├── order.go │ ├── table.go │ └── trie.go ├── collate.go ├── index.go ├── maketables.go ├── option.go ├── sort.go └── tables.go ├── internal ├── colltab │ ├── collelem.go │ ├── colltab.go │ ├── contract.go │ ├── iter.go │ ├── numeric.go │ ├── table.go │ ├── trie.go │ └── weighter.go ├── gen │ ├── code.go │ └── gen.go ├── tag │ └── tag.go ├── triegen │ ├── compact.go │ ├── print.go │ └── triegen.go └── ucd │ └── ucd.go ├── language ├── Makefile ├── common.go ├── coverage.go ├── doc.go ├── gen.go ├── gen_common.go ├── gen_index.go ├── go1_1.go ├── go1_2.go ├── index.go ├── language.go ├── lookup.go ├── match.go ├── parse.go ├── tables.go └── tags.go ├── secure └── bidirule │ ├── bidirule.go │ ├── bidirule10.0.0.go │ └── bidirule9.0.0.go ├── transform └── transform.go └── unicode ├── bidi ├── bidi.go ├── bracket.go ├── core.go ├── gen.go ├── gen_ranges.go ├── gen_trieval.go ├── prop.go ├── tables10.0.0.go ├── tables9.0.0.go └── trieval.go ├── cldr ├── base.go ├── cldr.go ├── collate.go ├── decode.go ├── makexml.go ├── resolve.go ├── slice.go └── xml.go ├── norm ├── composition.go ├── forminfo.go ├── input.go ├── iter.go ├── maketables.go ├── normalize.go ├── readwriter.go ├── tables10.0.0.go ├── tables9.0.0.go ├── transform.go ├── trie.go └── triegen.go └── rangetable ├── gen.go ├── merge.go ├── rangetable.go ├── tables10.0.0.go └── tables9.0.0.go /.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 | .idea/ 24 | devops-api* 25 | dist 26 | upload 27 | *.db 28 | data 29 | logs 30 | static 31 | keys 32 | .DS_Store 33 | devops-dns-server* 34 | -------------------------------------------------------------------------------- /.goreleaser.yml: -------------------------------------------------------------------------------- 1 | release: 2 | github: 3 | owner: chanyipiaomiao 4 | name: devops-dns-server 5 | name_template: '{{.Tag}}' 6 | draft: true 7 | builds: 8 | - main: main.go 9 | binary: devops-dns-server 10 | goos: 11 | - windows 12 | - darwin 13 | - linux 14 | goarch: 15 | - amd64 16 | - 386 17 | env: 18 | - CGO_ENABLED=0 19 | archive: 20 | format: tar.gz 21 | wrap_in_directory: true 22 | replacements: 23 | amd64: 64-bit 24 | darwin: macos 25 | linux: linux 26 | files: 27 | - README.md 28 | - app.conf 29 | - hosts 30 | format_overrides: 31 | - goos: windows 32 | format: zip -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # BUILD 阶段 3 | # 4 | FROM golang:1.11 AS build 5 | 6 | # 设置我们应用程序的工作目录 7 | WORKDIR /go/src/devops-dns-server 8 | 9 | # 添加所有需要编译的应用代码 10 | ADD . . 11 | 12 | # 编译一个静态的go应用(在二进制构建中包含C语言依赖库) 13 | RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo . 14 | 15 | ADD app.conf . 16 | ADD hosts . 17 | 18 | EXPOSE 53 19 | 20 | 21 | # 设置我们应用程序的启动命令 22 | CMD ["./devops-dns-server"] 23 | 24 | 25 | 26 | # 27 | # 生产阶段 28 | # 29 | FROM scratch AS prod 30 | 31 | # 设置我们应用程序的工作目录 32 | WORKDIR /devops-dns-server 33 | 34 | # 从buil阶段拷贝二进制文件 35 | COPY --from=build /go/src/devops-dns-server/devops-dns-server . 36 | 37 | ADD app.conf . 38 | ADD hosts . 39 | 40 | EXPOSE 53 41 | 42 | CMD ["./devops-dns-server"] 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Gopkg.toml: -------------------------------------------------------------------------------- 1 | # Gopkg.toml example 2 | # 3 | # Refer to https://golang.github.io/dep/docs/Gopkg.toml.html 4 | # for detailed Gopkg.toml documentation. 5 | # 6 | # required = ["github.com/user/thing/cmd/thing"] 7 | # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] 8 | # 9 | # [[constraint]] 10 | # name = "github.com/user/project" 11 | # version = "1.0.0" 12 | # 13 | # [[constraint]] 14 | # name = "github.com/user/project2" 15 | # branch = "dev" 16 | # source = "github.com/myfork/project2" 17 | # 18 | # [[override]] 19 | # name = "github.com/x/y" 20 | # version = "2.4.0" 21 | # 22 | # [prune] 23 | # non-go = false 24 | # go-tests = true 25 | # unused-packages = true 26 | 27 | 28 | [[constraint]] 29 | name = "github.com/astaxie/beego" 30 | version = "1.11.1" 31 | 32 | [[constraint]] 33 | name = "github.com/fsnotify/fsnotify" 34 | version = "1.4.7" 35 | 36 | [[constraint]] 37 | name = "github.com/levigross/grequests" 38 | version = "0.10.0" 39 | 40 | [[constraint]] 41 | name = "github.com/miekg/dns" 42 | version = "1.1.1" 43 | 44 | [prune] 45 | go-tests = true 46 | unused-packages = true 47 | -------------------------------------------------------------------------------- /app.conf: -------------------------------------------------------------------------------- 1 | [server] 2 | # 本服务器的监听地址 3 | # 192.168.1.1:53 只监听该地址 192.168.1.1 的53 4 | # :53 所有接口地址都监听53端口 5 | # 首先从环境变量中获取 DEVOPS_DNS_SERVER_LISTEN 的值 如果没有该值则使用默认的 :53 6 | listen = "${DEVOPS_DNS_SERVER_LISTEN||:53}" 7 | 8 | # 当本服务器无法解析的时候会向这个服务器转发DNS查询 9 | nameserver = "${DEVOPS_DNS_SERVER_NAMESERVER||223.5.5.5:53}" 10 | 11 | [source] 12 | # 解析的顺序,可以这样设置 13 | # fromFile: 只从文件获取IP 14 | # fromAPI: 只从API获取IP 15 | # fromFile,fromAPI: 首先从文件获取 如果文件里面没有再从API获取 16 | order = "${DEVOPS_DNS_SERVER_ORDER||fromFile}" 17 | 18 | [fromAPI] 19 | # api的url地址, 返回的json数据格式如下: 20 | # 必须包含data字段 21 | #{ 22 | # "data": "ip地址" 23 | # ... 24 | #} 25 | url = "${DEVOPS_DNS_SERVER_FROMAPI_URL||http://192.168.2.116:30080/host/ucloud/findIPByName?WENBA_DEVOPS_API_CENTER_TOKEN=zDgZUVjP3PTSZ3tD2vZQKuspMoUdxDVe}" 26 | 27 | [fromFile] 28 | # 文件格式必须要和/etc/hosts格式一样 29 | filepath = "${DEVOPS_DNS_SERVER_FROMFILE||hosts}" 30 | 31 | # 是否要监控该文件,一有修改就重新读取 32 | watch = "${DEVOPS_DNS_SERVER_FROMFILE_WATCH||yes}" 33 | 34 | # 间隔多久重新读取文件,默认是3s 35 | interval = 3 -------------------------------------------------------------------------------- /config/config.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | import ( 4 | beegoConfig "github.com/astaxie/beego/config" 5 | "log" 6 | "os" 7 | "path" 8 | ) 9 | 10 | var ( 11 | iniConf beegoConfig.Configer 12 | ) 13 | 14 | func init() { 15 | confPath := path.Join(path.Dir(os.Args[0]), "app.conf") 16 | var err error 17 | iniConf, err = beegoConfig.NewConfig("ini", confPath) 18 | if err != nil { 19 | log.Fatalf("%s", err) 20 | } 21 | } 22 | 23 | func GetConfig() beegoConfig.Configer { 24 | return iniConf 25 | } 26 | -------------------------------------------------------------------------------- /hosts: -------------------------------------------------------------------------------- 1 | 1.1.1.1 a.com 2 | 2.2.2.2 devops_dns_server 3 | 3.3.3.3 b.com 4 | 4.4.4.4 c.com 5 | 4.4.4.4 d.com -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "devops-dns-server/server" 4 | 5 | func main() { 6 | server.Listen() 7 | } 8 | -------------------------------------------------------------------------------- /source/from_api.go: -------------------------------------------------------------------------------- 1 | package source 2 | 3 | // 从CMDB或者其他的数据源中获取 4 | 5 | import ( 6 | "devops-dns-server/config" 7 | "github.com/levigross/grequests" 8 | "log" 9 | ) 10 | 11 | type Data struct { 12 | Data string `json:"data"` 13 | EntryType string `json:"entryType,omitempty"` 14 | Error string `json:"error,omitempty"` 15 | StatusCode int `json:"statusCode,omitempty"` 16 | } 17 | 18 | func FromAPI(hostname string) string { 19 | resp, err := grequests.Get(config.GetConfig().String("fromAPI::url"), &grequests.RequestOptions{ 20 | Params: map[string]string{"name": hostname}, 21 | }) 22 | if err != nil { 23 | log.Printf("访问API地址出错了: %s\n", err) 24 | return "" 25 | } 26 | var data Data 27 | err = resp.JSON(&data) 28 | if err != nil { 29 | log.Printf("解析API JSON出错了: %s\n", err) 30 | return "" 31 | } 32 | 33 | return data.Data 34 | } 35 | -------------------------------------------------------------------------------- /source/getip.go: -------------------------------------------------------------------------------- 1 | package source 2 | 3 | import ( 4 | "devops-dns-server/config" 5 | "log" 6 | "strings" 7 | ) 8 | 9 | var ( 10 | conf = config.GetConfig() 11 | ) 12 | 13 | func GetIP(hostname string) string { 14 | var ( 15 | order string 16 | orderS []string 17 | address string 18 | ) 19 | 20 | hostname = strings.TrimRight(hostname, ".") 21 | 22 | order = conf.String("source::order") 23 | orderS = strings.Split(order, ",") 24 | 25 | for _, src := range orderS { 26 | 27 | switch src { 28 | case "fromAPI": 29 | address = FromAPI(hostname) 30 | case "fromFile": 31 | address = FromFile(hostname) 32 | default: 33 | log.Println("not support data source: ", src) 34 | continue 35 | } 36 | 37 | if address != "" { 38 | return address 39 | } 40 | 41 | } 42 | 43 | return address 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/astaxie/beego/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2014 astaxie 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. -------------------------------------------------------------------------------- /vendor/github.com/astaxie/beego/utils/captcha/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-2014 Dmitry Chestnykh 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = tab 5 | indent_size = 4 6 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/.gitignore: -------------------------------------------------------------------------------- 1 | # Setup a Global .gitignore for OS and editor generated files: 2 | # https://help.github.com/articles/ignoring-files 3 | # git config --global core.excludesfile ~/.gitignore_global 4 | 5 | .vagrant 6 | *.sublime-project 7 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | 4 | go: 5 | - 1.8.x 6 | - 1.9.x 7 | - tip 8 | 9 | matrix: 10 | allow_failures: 11 | - go: tip 12 | fast_finish: true 13 | 14 | before_script: 15 | - go get -u github.com/golang/lint/golint 16 | 17 | script: 18 | - go test -v --race ./... 19 | 20 | after_script: 21 | - test -z "$(gofmt -s -l -w . | tee /dev/stderr)" 22 | - test -z "$(golint ./... | tee /dev/stderr)" 23 | - go vet ./... 24 | 25 | os: 26 | - linux 27 | - osx 28 | 29 | notifications: 30 | email: false 31 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/fen.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 | // +build solaris 6 | 7 | package fsnotify 8 | 9 | import ( 10 | "errors" 11 | ) 12 | 13 | // Watcher watches a set of files, delivering events to a channel. 14 | type Watcher struct { 15 | Events chan Event 16 | Errors chan error 17 | } 18 | 19 | // NewWatcher establishes a new watcher with the underlying OS and begins waiting for events. 20 | func NewWatcher() (*Watcher, error) { 21 | return nil, errors.New("FEN based watcher not yet supported for fsnotify\n") 22 | } 23 | 24 | // Close removes all watches and closes the events channel. 25 | func (w *Watcher) Close() error { 26 | return nil 27 | } 28 | 29 | // Add starts watching the named file or directory (non-recursively). 30 | func (w *Watcher) Add(name string) error { 31 | return nil 32 | } 33 | 34 | // Remove stops watching the the named file or directory (non-recursively). 35 | func (w *Watcher) Remove(name string) error { 36 | return nil 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/open_mode_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 | // +build freebsd openbsd netbsd dragonfly 6 | 7 | package fsnotify 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const openMode = unix.O_NONBLOCK | unix.O_RDONLY 12 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/open_mode_darwin.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 | // +build darwin 6 | 7 | package fsnotify 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | // note: this constant is not defined on BSD 12 | const openMode = unix.O_EVTONLY 13 | -------------------------------------------------------------------------------- /vendor/github.com/levigross/grequests/.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/ 27 | *.iml 28 | -------------------------------------------------------------------------------- /vendor/github.com/levigross/grequests/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | matrix: 4 | fast_finish: true 5 | include: 6 | - go: 1.7 7 | - go: 1.8 8 | - go: 1.9 9 | - go: "1.10" 10 | - go: master 11 | allow_failures: 12 | - go: master 13 | before_install: 14 | - go get -u -v github.com/axw/gocov/gocov 15 | - go get -u -v github.com/mattn/goveralls 16 | - go get -u -v github.com/golang/lint/golint 17 | 18 | script: 19 | - diff -u <(echo -n) <(gofmt -s -d ./) 20 | - diff -u <(echo -n) <(go vet ./...) 21 | - diff -u <(echo -n) <(golint ./...) 22 | - go test -v -race -covermode=atomic -coverprofile=coverage.out 23 | 24 | after_success: 25 | - goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN 26 | -------------------------------------------------------------------------------- /vendor/github.com/miekg/dns/.codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | status: 3 | project: 4 | default: 5 | target: 40% 6 | threshold: null 7 | patch: false 8 | changes: false 9 | -------------------------------------------------------------------------------- /vendor/github.com/miekg/dns/.gitignore: -------------------------------------------------------------------------------- 1 | *.6 2 | tags 3 | test.out 4 | a.out 5 | -------------------------------------------------------------------------------- /vendor/github.com/miekg/dns/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | go: 5 | - 1.10.x 6 | - 1.11.x 7 | - tip 8 | 9 | before_install: 10 | # don't use the miekg/dns when testing forks 11 | - mkdir -p $GOPATH/src/github.com/miekg 12 | - ln -s $TRAVIS_BUILD_DIR $GOPATH/src/github.com/miekg/ || true 13 | 14 | script: 15 | - go test -race -v -bench=. -coverprofile=coverage.txt -covermode=atomic ./... 16 | 17 | after_success: 18 | - bash <(curl -s https://codecov.io/bash) 19 | -------------------------------------------------------------------------------- /vendor/github.com/miekg/dns/AUTHORS: -------------------------------------------------------------------------------- 1 | Miek Gieben 2 | -------------------------------------------------------------------------------- /vendor/github.com/miekg/dns/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | Alex A. Skinner 2 | Andrew Tunnell-Jones 3 | Ask Bjørn Hansen 4 | Dave Cheney 5 | Dusty Wilson 6 | Marek Majkowski 7 | Peter van Dijk 8 | Omri Bahumi 9 | Alex Sergeyev 10 | James Hartig 11 | -------------------------------------------------------------------------------- /vendor/github.com/miekg/dns/COPYRIGHT: -------------------------------------------------------------------------------- 1 | Copyright 2009 The Go Authors. All rights reserved. Use of this source code 2 | is governed by a BSD-style license that can be found in the LICENSE file. 3 | Extensions of the original work are copyright (c) 2011 Miek Gieben 4 | 5 | Copyright 2011 Miek Gieben. All rights reserved. Use of this source code is 6 | governed by a BSD-style license that can be found in the LICENSE file. 7 | 8 | Copyright 2014 CloudFlare. All rights reserved. Use of this source code is 9 | governed by a BSD-style license that can be found in the LICENSE file. 10 | -------------------------------------------------------------------------------- /vendor/github.com/miekg/dns/Gopkg.toml: -------------------------------------------------------------------------------- 1 | 2 | # Gopkg.toml example 3 | # 4 | # Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md 5 | # for detailed Gopkg.toml documentation. 6 | # 7 | # required = ["github.com/user/thing/cmd/thing"] 8 | # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] 9 | # 10 | # [[constraint]] 11 | # name = "github.com/user/project" 12 | # version = "1.0.0" 13 | # 14 | # [[constraint]] 15 | # name = "github.com/user/project2" 16 | # branch = "dev" 17 | # source = "github.com/myfork/project2" 18 | # 19 | # [[override]] 20 | # name = "github.com/x/y" 21 | # version = "2.4.0" 22 | 23 | 24 | [[constraint]] 25 | branch = "master" 26 | name = "golang.org/x/crypto" 27 | 28 | [[constraint]] 29 | branch = "master" 30 | name = "golang.org/x/net" 31 | 32 | [[constraint]] 33 | branch = "master" 34 | name = "golang.org/x/sys" 35 | 36 | [[constraint]] 37 | branch = "master" 38 | name = "golang.org/x/sync" 39 | -------------------------------------------------------------------------------- /vendor/github.com/miekg/dns/Makefile.fuzz: -------------------------------------------------------------------------------- 1 | # Makefile for fuzzing 2 | # 3 | # Use go-fuzz and needs the tools installed. 4 | # See https://blog.cloudflare.com/dns-parser-meet-go-fuzzer/ 5 | # 6 | # Installing go-fuzz: 7 | # $ make -f Makefile.fuzz get 8 | # Installs: 9 | # * github.com/dvyukov/go-fuzz/go-fuzz 10 | # * get github.com/dvyukov/go-fuzz/go-fuzz-build 11 | 12 | all: build 13 | 14 | .PHONY: build 15 | build: 16 | go-fuzz-build -tags fuzz github.com/miekg/dns 17 | 18 | .PHONY: build-newrr 19 | build-newrr: 20 | go-fuzz-build -func FuzzNewRR -tags fuzz github.com/miekg/dns 21 | 22 | .PHONY: fuzz 23 | fuzz: 24 | go-fuzz -bin=dns-fuzz.zip -workdir=fuzz 25 | 26 | .PHONY: get 27 | get: 28 | go get github.com/dvyukov/go-fuzz/go-fuzz 29 | go get github.com/dvyukov/go-fuzz/go-fuzz-build 30 | 31 | .PHONY: clean 32 | clean: 33 | rm *-fuzz.zip 34 | -------------------------------------------------------------------------------- /vendor/github.com/miekg/dns/Makefile.release: -------------------------------------------------------------------------------- 1 | # Makefile for releasing. 2 | # 3 | # The release is controlled from version.go. The version found there is 4 | # used to tag the git repo, we're not building any artifects so there is nothing 5 | # to upload to github. 6 | # 7 | # * Up the version in version.go 8 | # * Run: make -f Makefile.release release 9 | # * will *commit* your change with 'Release $VERSION' 10 | # * push to github 11 | # 12 | 13 | define GO 14 | //+build ignore 15 | 16 | package main 17 | 18 | import ( 19 | "fmt" 20 | 21 | "github.com/miekg/dns" 22 | ) 23 | 24 | func main() { 25 | fmt.Println(dns.Version.String()) 26 | } 27 | endef 28 | 29 | $(file > version_release.go,$(GO)) 30 | VERSION:=$(shell go run version_release.go) 31 | TAG="v$(VERSION)" 32 | 33 | all: 34 | @echo Use the \'release\' target to start a release $(VERSION) 35 | rm -f version_release.go 36 | 37 | .PHONY: release 38 | release: commit push 39 | @echo Released $(VERSION) 40 | rm -f version_release.go 41 | 42 | .PHONY: commit 43 | commit: 44 | @echo Committing release $(VERSION) 45 | git commit -am"Release $(VERSION)" 46 | git tag $(TAG) 47 | 48 | .PHONY: push 49 | push: 50 | @echo Pushing release $(VERSION) to master 51 | git push --tags 52 | git push 53 | -------------------------------------------------------------------------------- /vendor/github.com/miekg/dns/dane.go: -------------------------------------------------------------------------------- 1 | package dns 2 | 3 | import ( 4 | "crypto/sha256" 5 | "crypto/sha512" 6 | "crypto/x509" 7 | "encoding/hex" 8 | "errors" 9 | ) 10 | 11 | // CertificateToDANE converts a certificate to a hex string as used in the TLSA or SMIMEA records. 12 | func CertificateToDANE(selector, matchingType uint8, cert *x509.Certificate) (string, error) { 13 | switch matchingType { 14 | case 0: 15 | switch selector { 16 | case 0: 17 | return hex.EncodeToString(cert.Raw), nil 18 | case 1: 19 | return hex.EncodeToString(cert.RawSubjectPublicKeyInfo), nil 20 | } 21 | case 1: 22 | h := sha256.New() 23 | switch selector { 24 | case 0: 25 | h.Write(cert.Raw) 26 | return hex.EncodeToString(h.Sum(nil)), nil 27 | case 1: 28 | h.Write(cert.RawSubjectPublicKeyInfo) 29 | return hex.EncodeToString(h.Sum(nil)), nil 30 | } 31 | case 2: 32 | h := sha512.New() 33 | switch selector { 34 | case 0: 35 | h.Write(cert.Raw) 36 | return hex.EncodeToString(h.Sum(nil)), nil 37 | case 1: 38 | h.Write(cert.RawSubjectPublicKeyInfo) 39 | return hex.EncodeToString(h.Sum(nil)), nil 40 | } 41 | } 42 | return "", errors.New("dns: bad MatchingType or Selector") 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/miekg/dns/duplicate.go: -------------------------------------------------------------------------------- 1 | package dns 2 | 3 | //go:generate go run duplicate_generate.go 4 | 5 | // IsDuplicate checks of r1 and r2 are duplicates of each other, excluding the TTL. 6 | // So this means the header data is equal *and* the RDATA is the same. Return true 7 | // is so, otherwise false. 8 | // It's is a protocol violation to have identical RRs in a message. 9 | func IsDuplicate(r1, r2 RR) bool { 10 | if r1.Header().Class != r2.Header().Class { 11 | return false 12 | } 13 | if r1.Header().Rrtype != r2.Header().Rrtype { 14 | return false 15 | } 16 | if !isDulicateName(r1.Header().Name, r2.Header().Name) { 17 | return false 18 | } 19 | // ignore TTL 20 | 21 | return isDuplicateRdata(r1, r2) 22 | } 23 | 24 | // isDulicateName checks if the domain names s1 and s2 are equal. 25 | func isDulicateName(s1, s2 string) bool { return equal(s1, s2) } 26 | -------------------------------------------------------------------------------- /vendor/github.com/miekg/dns/fuzz.go: -------------------------------------------------------------------------------- 1 | // +build fuzz 2 | 3 | package dns 4 | 5 | func Fuzz(data []byte) int { 6 | msg := new(Msg) 7 | 8 | if err := msg.Unpack(data); err != nil { 9 | return 0 10 | } 11 | if _, err := msg.Pack(); err != nil { 12 | return 0 13 | } 14 | 15 | return 1 16 | } 17 | 18 | func FuzzNewRR(data []byte) int { 19 | if _, err := NewRR(string(data)); err != nil { 20 | return 0 21 | } 22 | return 1 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/miekg/dns/listen_go111.go: -------------------------------------------------------------------------------- 1 | // +build go1.11 2 | // +build aix darwin dragonfly freebsd linux netbsd openbsd 3 | 4 | package dns 5 | 6 | import ( 7 | "context" 8 | "net" 9 | "syscall" 10 | 11 | "golang.org/x/sys/unix" 12 | ) 13 | 14 | const supportsReusePort = true 15 | 16 | func reuseportControl(network, address string, c syscall.RawConn) error { 17 | var opErr error 18 | err := c.Control(func(fd uintptr) { 19 | opErr = unix.SetsockoptInt(int(fd), unix.SOL_SOCKET, unix.SO_REUSEPORT, 1) 20 | }) 21 | if err != nil { 22 | return err 23 | } 24 | 25 | return opErr 26 | } 27 | 28 | func listenTCP(network, addr string, reuseport bool) (net.Listener, error) { 29 | var lc net.ListenConfig 30 | if reuseport { 31 | lc.Control = reuseportControl 32 | } 33 | 34 | return lc.Listen(context.Background(), network, addr) 35 | } 36 | 37 | func listenUDP(network, addr string, reuseport bool) (net.PacketConn, error) { 38 | var lc net.ListenConfig 39 | if reuseport { 40 | lc.Control = reuseportControl 41 | } 42 | 43 | return lc.ListenPacket(context.Background(), network, addr) 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/miekg/dns/listen_go_not111.go: -------------------------------------------------------------------------------- 1 | // +build !go1.11 !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd 2 | 3 | package dns 4 | 5 | import "net" 6 | 7 | const supportsReusePort = false 8 | 9 | func listenTCP(network, addr string, reuseport bool) (net.Listener, error) { 10 | if reuseport { 11 | // TODO(tmthrgd): return an error? 12 | } 13 | 14 | return net.Listen(network, addr) 15 | } 16 | 17 | func listenUDP(network, addr string, reuseport bool) (net.PacketConn, error) { 18 | if reuseport { 19 | // TODO(tmthrgd): return an error? 20 | } 21 | 22 | return net.ListenPacket(network, addr) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/miekg/dns/reverse.go: -------------------------------------------------------------------------------- 1 | package dns 2 | 3 | // StringToType is the reverse of TypeToString, needed for string parsing. 4 | var StringToType = reverseInt16(TypeToString) 5 | 6 | // StringToClass is the reverse of ClassToString, needed for string parsing. 7 | var StringToClass = reverseInt16(ClassToString) 8 | 9 | // StringToOpcode is a map of opcodes to strings. 10 | var StringToOpcode = reverseInt(OpcodeToString) 11 | 12 | // StringToRcode is a map of rcodes to strings. 13 | var StringToRcode = reverseInt(RcodeToString) 14 | 15 | func init() { 16 | // Preserve previous NOTIMP typo, see github.com/miekg/dns/issues/733. 17 | StringToRcode["NOTIMPL"] = RcodeNotImplemented 18 | } 19 | 20 | // Reverse a map 21 | func reverseInt8(m map[uint8]string) map[string]uint8 { 22 | n := make(map[string]uint8, len(m)) 23 | for u, s := range m { 24 | n[s] = u 25 | } 26 | return n 27 | } 28 | 29 | func reverseInt16(m map[uint16]string) map[string]uint16 { 30 | n := make(map[string]uint16, len(m)) 31 | for u, s := range m { 32 | n[s] = u 33 | } 34 | return n 35 | } 36 | 37 | func reverseInt(m map[int]string) map[string]int { 38 | n := make(map[string]int, len(m)) 39 | for u, s := range m { 40 | n[s] = u 41 | } 42 | return n 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/miekg/dns/tlsa.go: -------------------------------------------------------------------------------- 1 | package dns 2 | 3 | import ( 4 | "crypto/x509" 5 | "net" 6 | "strconv" 7 | ) 8 | 9 | // Sign creates a TLSA record from an SSL certificate. 10 | func (r *TLSA) Sign(usage, selector, matchingType int, cert *x509.Certificate) (err error) { 11 | r.Hdr.Rrtype = TypeTLSA 12 | r.Usage = uint8(usage) 13 | r.Selector = uint8(selector) 14 | r.MatchingType = uint8(matchingType) 15 | 16 | r.Certificate, err = CertificateToDANE(r.Selector, r.MatchingType, cert) 17 | if err != nil { 18 | return err 19 | } 20 | return nil 21 | } 22 | 23 | // Verify verifies a TLSA record against an SSL certificate. If it is OK 24 | // a nil error is returned. 25 | func (r *TLSA) Verify(cert *x509.Certificate) error { 26 | c, err := CertificateToDANE(r.Selector, r.MatchingType, cert) 27 | if err != nil { 28 | return err // Not also ErrSig? 29 | } 30 | if r.Certificate == c { 31 | return nil 32 | } 33 | return ErrSig // ErrSig, really? 34 | } 35 | 36 | // TLSAName returns the ownername of a TLSA resource record as per the 37 | // rules specified in RFC 6698, Section 3. 38 | func TLSAName(name, service, network string) (string, error) { 39 | if !IsFqdn(name) { 40 | return "", ErrFqdn 41 | } 42 | p, err := net.LookupPort(network, service) 43 | if err != nil { 44 | return "", err 45 | } 46 | return "_" + strconv.Itoa(p) + "._" + network + "." + name, nil 47 | } 48 | -------------------------------------------------------------------------------- /vendor/github.com/miekg/dns/udp_windows.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package dns 4 | 5 | import "net" 6 | 7 | // SessionUDP holds the remote address 8 | type SessionUDP struct { 9 | raddr *net.UDPAddr 10 | } 11 | 12 | // RemoteAddr returns the remote network address. 13 | func (s *SessionUDP) RemoteAddr() net.Addr { return s.raddr } 14 | 15 | // ReadFromSessionUDP acts just like net.UDPConn.ReadFrom(), but returns a session object instead of a 16 | // net.UDPAddr. 17 | // TODO(fastest963): Once go1.10 is released, use ReadMsgUDP. 18 | func ReadFromSessionUDP(conn *net.UDPConn, b []byte) (int, *SessionUDP, error) { 19 | n, raddr, err := conn.ReadFrom(b) 20 | if err != nil { 21 | return n, nil, err 22 | } 23 | session := &SessionUDP{raddr.(*net.UDPAddr)} 24 | return n, session, err 25 | } 26 | 27 | // WriteToSessionUDP acts just like net.UDPConn.WriteTo(), but uses a *SessionUDP instead of a net.Addr. 28 | // TODO(fastest963): Once go1.10 is released, use WriteMsgUDP. 29 | func WriteToSessionUDP(conn *net.UDPConn, b []byte, session *SessionUDP) (int, error) { 30 | n, err := conn.WriteTo(b, session.raddr) 31 | return n, err 32 | } 33 | 34 | // TODO(fastest963): Once go1.10 is released and we can use *MsgUDP methods 35 | // use the standard method in udp.go for these. 36 | func setUDPSocketOptions(*net.UDPConn) error { return nil } 37 | func parseDstFromOOB([]byte, net.IP) net.IP { return nil } 38 | -------------------------------------------------------------------------------- /vendor/github.com/miekg/dns/version.go: -------------------------------------------------------------------------------- 1 | package dns 2 | 3 | import "fmt" 4 | 5 | // Version is current version of this library. 6 | var Version = V{1, 1, 1} 7 | 8 | // V holds the version of this library. 9 | type V struct { 10 | Major, Minor, Patch int 11 | } 12 | 13 | func (v V) String() string { 14 | return fmt.Sprintf("%d.%d.%d", v.Major, v.Minor, v.Patch) 15 | } 16 | -------------------------------------------------------------------------------- /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/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /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/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /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 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package socket 8 | 9 | func (h *cmsghdr) len() int { return int(h.Len) } 10 | func (h *cmsghdr) lvl() int { return int(h.Level) } 11 | func (h *cmsghdr) typ() int { return int(h.Type) } 12 | -------------------------------------------------------------------------------- /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 | // +build darwin dragonfly freebsd netbsd openbsd 6 | 7 | package socket 8 | 9 | func (h *cmsghdr) set(l, lvl, typ int) { 10 | h.Len = uint32(l) 11 | h.Level = int32(lvl) 12 | h.Type = int32(typ) 13 | } 14 | -------------------------------------------------------------------------------- /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 | // +build arm mips mipsle 386 6 | // +build linux 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_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 | // +build arm64 amd64 ppc64 ppc64le mips64 mips64le s390x 6 | // +build linux 7 | 8 | package socket 9 | 10 | func (h *cmsghdr) set(l, lvl, typ int) { 11 | h.Len = uint64(l) 12 | h.Level = int32(lvl) 13 | h.Type = int32(typ) 14 | } 15 | -------------------------------------------------------------------------------- /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 | // +build amd64 6 | // +build 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 | // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris 6 | 7 | package socket 8 | 9 | type cmsghdr struct{} 10 | 11 | const sizeofCmsghdr = 0 12 | 13 | func (h *cmsghdr) len() int { return 0 } 14 | func (h *cmsghdr) lvl() int { return 0 } 15 | func (h *cmsghdr) typ() int { return 0 } 16 | 17 | func (h *cmsghdr) set(l, lvl, typ int) {} 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/defs_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 | // +build ignore 6 | 7 | // +godefs map struct_in_addr [4]byte /* in_addr */ 8 | // +godefs map struct_in6_addr [16]byte /* in6_addr */ 9 | 10 | package socket 11 | 12 | /* 13 | #include 14 | 15 | #include 16 | */ 17 | import "C" 18 | 19 | const ( 20 | sysAF_UNSPEC = C.AF_UNSPEC 21 | sysAF_INET = C.AF_INET 22 | sysAF_INET6 = C.AF_INET6 23 | 24 | sysSOCK_RAW = C.SOCK_RAW 25 | ) 26 | 27 | type iovec C.struct_iovec 28 | 29 | type msghdr C.struct_msghdr 30 | 31 | type cmsghdr C.struct_cmsghdr 32 | 33 | type sockaddrInet C.struct_sockaddr_in 34 | 35 | type sockaddrInet6 C.struct_sockaddr_in6 36 | 37 | const ( 38 | sizeofIovec = C.sizeof_struct_iovec 39 | sizeofMsghdr = C.sizeof_struct_msghdr 40 | sizeofCmsghdr = C.sizeof_struct_cmsghdr 41 | 42 | sizeofSockaddrInet = C.sizeof_struct_sockaddr_in 43 | sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 44 | ) 45 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/defs_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 | // +build ignore 6 | 7 | // +godefs map struct_in_addr [4]byte /* in_addr */ 8 | // +godefs map struct_in6_addr [16]byte /* in6_addr */ 9 | 10 | package socket 11 | 12 | /* 13 | #include 14 | 15 | #include 16 | */ 17 | import "C" 18 | 19 | const ( 20 | sysAF_UNSPEC = C.AF_UNSPEC 21 | sysAF_INET = C.AF_INET 22 | sysAF_INET6 = C.AF_INET6 23 | 24 | sysSOCK_RAW = C.SOCK_RAW 25 | ) 26 | 27 | type iovec C.struct_iovec 28 | 29 | type msghdr C.struct_msghdr 30 | 31 | type cmsghdr C.struct_cmsghdr 32 | 33 | type sockaddrInet C.struct_sockaddr_in 34 | 35 | type sockaddrInet6 C.struct_sockaddr_in6 36 | 37 | const ( 38 | sizeofIovec = C.sizeof_struct_iovec 39 | sizeofMsghdr = C.sizeof_struct_msghdr 40 | sizeofCmsghdr = C.sizeof_struct_cmsghdr 41 | 42 | sizeofSockaddrInet = C.sizeof_struct_sockaddr_in 43 | sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 44 | ) 45 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/defs_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 | // +build ignore 6 | 7 | // +godefs map struct_in_addr [4]byte /* in_addr */ 8 | // +godefs map struct_in6_addr [16]byte /* in6_addr */ 9 | 10 | package socket 11 | 12 | /* 13 | #include 14 | 15 | #include 16 | */ 17 | import "C" 18 | 19 | const ( 20 | sysAF_UNSPEC = C.AF_UNSPEC 21 | sysAF_INET = C.AF_INET 22 | sysAF_INET6 = C.AF_INET6 23 | 24 | sysSOCK_RAW = C.SOCK_RAW 25 | ) 26 | 27 | type iovec C.struct_iovec 28 | 29 | type msghdr C.struct_msghdr 30 | 31 | type cmsghdr C.struct_cmsghdr 32 | 33 | type sockaddrInet C.struct_sockaddr_in 34 | 35 | type sockaddrInet6 C.struct_sockaddr_in6 36 | 37 | const ( 38 | sizeofIovec = C.sizeof_struct_iovec 39 | sizeofMsghdr = C.sizeof_struct_msghdr 40 | sizeofCmsghdr = C.sizeof_struct_cmsghdr 41 | 42 | sizeofSockaddrInet = C.sizeof_struct_sockaddr_in 43 | sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 44 | ) 45 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/defs_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 | // +build ignore 6 | 7 | // +godefs map struct_in_addr [4]byte /* in_addr */ 8 | // +godefs map struct_in6_addr [16]byte /* in6_addr */ 9 | 10 | package socket 11 | 12 | /* 13 | #include 14 | #include 15 | 16 | #define _GNU_SOURCE 17 | #include 18 | */ 19 | import "C" 20 | 21 | const ( 22 | sysAF_UNSPEC = C.AF_UNSPEC 23 | sysAF_INET = C.AF_INET 24 | sysAF_INET6 = C.AF_INET6 25 | 26 | sysSOCK_RAW = C.SOCK_RAW 27 | ) 28 | 29 | type iovec C.struct_iovec 30 | 31 | type msghdr C.struct_msghdr 32 | 33 | type mmsghdr C.struct_mmsghdr 34 | 35 | type cmsghdr C.struct_cmsghdr 36 | 37 | type sockaddrInet C.struct_sockaddr_in 38 | 39 | type sockaddrInet6 C.struct_sockaddr_in6 40 | 41 | const ( 42 | sizeofIovec = C.sizeof_struct_iovec 43 | sizeofMsghdr = C.sizeof_struct_msghdr 44 | sizeofMmsghdr = C.sizeof_struct_mmsghdr 45 | sizeofCmsghdr = C.sizeof_struct_cmsghdr 46 | 47 | sizeofSockaddrInet = C.sizeof_struct_sockaddr_in 48 | sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 49 | ) 50 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/defs_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 | // +build ignore 6 | 7 | // +godefs map struct_in_addr [4]byte /* in_addr */ 8 | // +godefs map struct_in6_addr [16]byte /* in6_addr */ 9 | 10 | package socket 11 | 12 | /* 13 | #include 14 | 15 | #include 16 | */ 17 | import "C" 18 | 19 | const ( 20 | sysAF_UNSPEC = C.AF_UNSPEC 21 | sysAF_INET = C.AF_INET 22 | sysAF_INET6 = C.AF_INET6 23 | 24 | sysSOCK_RAW = C.SOCK_RAW 25 | ) 26 | 27 | type iovec C.struct_iovec 28 | 29 | type msghdr C.struct_msghdr 30 | 31 | type mmsghdr C.struct_mmsghdr 32 | 33 | type cmsghdr C.struct_cmsghdr 34 | 35 | type sockaddrInet C.struct_sockaddr_in 36 | 37 | type sockaddrInet6 C.struct_sockaddr_in6 38 | 39 | const ( 40 | sizeofIovec = C.sizeof_struct_iovec 41 | sizeofMsghdr = C.sizeof_struct_msghdr 42 | sizeofMmsghdr = C.sizeof_struct_mmsghdr 43 | sizeofCmsghdr = C.sizeof_struct_cmsghdr 44 | 45 | sizeofSockaddrInet = C.sizeof_struct_sockaddr_in 46 | sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 47 | ) 48 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/defs_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 | // +build ignore 6 | 7 | // +godefs map struct_in_addr [4]byte /* in_addr */ 8 | // +godefs map struct_in6_addr [16]byte /* in6_addr */ 9 | 10 | package socket 11 | 12 | /* 13 | #include 14 | 15 | #include 16 | */ 17 | import "C" 18 | 19 | const ( 20 | sysAF_UNSPEC = C.AF_UNSPEC 21 | sysAF_INET = C.AF_INET 22 | sysAF_INET6 = C.AF_INET6 23 | 24 | sysSOCK_RAW = C.SOCK_RAW 25 | ) 26 | 27 | type iovec C.struct_iovec 28 | 29 | type msghdr C.struct_msghdr 30 | 31 | type cmsghdr C.struct_cmsghdr 32 | 33 | type sockaddrInet C.struct_sockaddr_in 34 | 35 | type sockaddrInet6 C.struct_sockaddr_in6 36 | 37 | const ( 38 | sizeofIovec = C.sizeof_struct_iovec 39 | sizeofMsghdr = C.sizeof_struct_msghdr 40 | sizeofCmsghdr = C.sizeof_struct_cmsghdr 41 | 42 | sizeofSockaddrInet = C.sizeof_struct_sockaddr_in 43 | sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 44 | ) 45 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/defs_solaris.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 | // +build ignore 6 | 7 | // +godefs map struct_in_addr [4]byte /* in_addr */ 8 | // +godefs map struct_in6_addr [16]byte /* in6_addr */ 9 | 10 | package socket 11 | 12 | /* 13 | #include 14 | 15 | #include 16 | */ 17 | import "C" 18 | 19 | const ( 20 | sysAF_UNSPEC = C.AF_UNSPEC 21 | sysAF_INET = C.AF_INET 22 | sysAF_INET6 = C.AF_INET6 23 | 24 | sysSOCK_RAW = C.SOCK_RAW 25 | ) 26 | 27 | type iovec C.struct_iovec 28 | 29 | type msghdr C.struct_msghdr 30 | 31 | type cmsghdr C.struct_cmsghdr 32 | 33 | type sockaddrInet C.struct_sockaddr_in 34 | 35 | type sockaddrInet6 C.struct_sockaddr_in6 36 | 37 | const ( 38 | sizeofIovec = C.sizeof_struct_iovec 39 | sizeofMsghdr = C.sizeof_struct_msghdr 40 | sizeofCmsghdr = C.sizeof_struct_cmsghdr 41 | 42 | sizeofSockaddrInet = C.sizeof_struct_sockaddr_in 43 | sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 44 | ) 45 | -------------------------------------------------------------------------------- /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 | // +build darwin,go1.12 6 | 7 | // This exists solely so we can linkname in symbols from syscall. 8 | -------------------------------------------------------------------------------- /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 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package socket 8 | 9 | import "syscall" 10 | 11 | var ( 12 | errEAGAIN error = syscall.EAGAIN 13 | errEINVAL error = syscall.EINVAL 14 | errENOENT error = syscall.ENOENT 15 | ) 16 | 17 | // errnoErr returns common boxed Errno values, to prevent allocations 18 | // at runtime. 19 | func errnoErr(errno syscall.Errno) error { 20 | switch errno { 21 | case 0: 22 | return nil 23 | case syscall.EAGAIN: 24 | return errEAGAIN 25 | case syscall.EINVAL: 26 | return errEINVAL 27 | case syscall.ENOENT: 28 | return errENOENT 29 | } 30 | return errno 31 | } 32 | -------------------------------------------------------------------------------- /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 | // +build arm mips mipsle 386 6 | // +build darwin dragonfly freebsd linux netbsd openbsd 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 = (*byte)(unsafe.Pointer(&b[0])) 18 | v.Len = uint32(l) 19 | } 20 | -------------------------------------------------------------------------------- /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 | // +build arm64 amd64 ppc64 ppc64le mips64 mips64le s390x 6 | // +build darwin dragonfly freebsd linux netbsd openbsd 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 = (*byte)(unsafe.Pointer(&b[0])) 18 | v.Len = uint64(l) 19 | } 20 | -------------------------------------------------------------------------------- /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 | // +build amd64 6 | // +build 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 | // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris 6 | 7 | package socket 8 | 9 | type iovec struct{} 10 | 11 | func (v *iovec) set(b []byte) {} 12 | -------------------------------------------------------------------------------- /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 | // +build !linux,!netbsd 6 | 7 | package socket 8 | 9 | import "net" 10 | 11 | type mmsghdr struct{} 12 | 13 | type mmsghdrs []mmsghdr 14 | 15 | func (hs mmsghdrs) pack(ms []Message, parseFn func([]byte, string) (net.Addr, error), marshalFn func(net.Addr) []byte) error { 16 | return nil 17 | } 18 | 19 | func (hs mmsghdrs) unpack(ms []Message, parseFn func([]byte, string) (net.Addr, error), hint string) error { 20 | return nil 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/mmsghdr_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 | // +build linux netbsd 6 | 7 | package socket 8 | 9 | import "net" 10 | 11 | type mmsghdrs []mmsghdr 12 | 13 | func (hs mmsghdrs) pack(ms []Message, parseFn func([]byte, string) (net.Addr, error), marshalFn func(net.Addr) []byte) error { 14 | for i := range hs { 15 | vs := make([]iovec, len(ms[i].Buffers)) 16 | var sa []byte 17 | if parseFn != nil { 18 | sa = make([]byte, sizeofSockaddrInet6) 19 | } 20 | if marshalFn != nil { 21 | sa = marshalFn(ms[i].Addr) 22 | } 23 | hs[i].Hdr.pack(vs, ms[i].Buffers, ms[i].OOB, sa) 24 | } 25 | return nil 26 | } 27 | 28 | func (hs mmsghdrs) unpack(ms []Message, parseFn func([]byte, string) (net.Addr, error), hint string) error { 29 | for i := range hs { 30 | ms[i].N = int(hs[i].Len) 31 | ms[i].NN = hs[i].Hdr.controllen() 32 | ms[i].Flags = hs[i].Hdr.flags() 33 | if parseFn != nil { 34 | var err error 35 | ms[i].Addr, err = parseFn(hs[i].Hdr.name(), hint) 36 | if err != nil { 37 | return err 38 | } 39 | } 40 | } 41 | return nil 42 | } 43 | -------------------------------------------------------------------------------- /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 | // +build darwin dragonfly freebsd netbsd openbsd 6 | 7 | package socket 8 | 9 | import "unsafe" 10 | 11 | func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) { 12 | for i := range vs { 13 | vs[i].set(bs[i]) 14 | } 15 | h.setIov(vs) 16 | if len(oob) > 0 { 17 | h.Control = (*byte)(unsafe.Pointer(&oob[0])) 18 | h.Controllen = uint32(len(oob)) 19 | } 20 | if sa != nil { 21 | h.Name = (*byte)(unsafe.Pointer(&sa[0])) 22 | h.Namelen = uint32(len(sa)) 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_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 | // +build darwin dragonfly freebsd netbsd 6 | 7 | package socket 8 | 9 | func (h *msghdr) setIov(vs []iovec) { 10 | l := len(vs) 11 | if l == 0 { 12 | return 13 | } 14 | h.Iov = &vs[0] 15 | h.Iovlen = int32(l) 16 | } 17 | -------------------------------------------------------------------------------- /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 | } 21 | } 22 | 23 | func (h *msghdr) name() []byte { 24 | if h.Name != nil && h.Namelen > 0 { 25 | return (*[sizeofSockaddrInet6]byte)(unsafe.Pointer(h.Name))[:h.Namelen] 26 | } 27 | return nil 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/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 | // +build arm mips mipsle 386 6 | // +build linux 7 | 8 | package socket 9 | 10 | import "unsafe" 11 | 12 | func (h *msghdr) setIov(vs []iovec) { 13 | l := len(vs) 14 | if l == 0 { 15 | return 16 | } 17 | h.Iov = &vs[0] 18 | h.Iovlen = uint32(l) 19 | } 20 | 21 | func (h *msghdr) setControl(b []byte) { 22 | h.Control = (*byte)(unsafe.Pointer(&b[0])) 23 | h.Controllen = uint32(len(b)) 24 | } 25 | -------------------------------------------------------------------------------- /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 | // +build arm64 amd64 ppc64 ppc64le mips64 mips64le s390x 6 | // +build linux 7 | 8 | package socket 9 | 10 | import "unsafe" 11 | 12 | func (h *msghdr) setIov(vs []iovec) { 13 | l := len(vs) 14 | if l == 0 { 15 | return 16 | } 17 | h.Iov = &vs[0] 18 | h.Iovlen = uint64(l) 19 | } 20 | 21 | func (h *msghdr) setControl(b []byte) { 22 | h.Control = (*byte)(unsafe.Pointer(&b[0])) 23 | h.Controllen = uint64(len(b)) 24 | } 25 | -------------------------------------------------------------------------------- /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 | // +build amd64 6 | // +build 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 | // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris 6 | 7 | package socket 8 | 9 | type msghdr struct{} 10 | 11 | func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) {} 12 | func (h *msghdr) name() []byte { return nil } 13 | func (h *msghdr) controllen() int { return 0 } 14 | func (h *msghdr) flags() int { return 0 } 15 | -------------------------------------------------------------------------------- /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 | // +build go1.9 6 | // +build !linux 7 | 8 | package socket 9 | 10 | import "errors" 11 | 12 | func (c *Conn) recvMsgs(ms []Message, flags int) (int, error) { 13 | return 0, errors.New("not implemented") 14 | } 15 | 16 | func (c *Conn) sendMsgs(ms []Message, flags int) (int, error) { 17 | return 0, errors.New("not implemented") 18 | } 19 | -------------------------------------------------------------------------------- /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 | // +build go1.9 6 | // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows 7 | 8 | package socket 9 | 10 | import "errors" 11 | 12 | func (c *Conn) recvMsg(m *Message, flags int) error { 13 | return errors.New("not implemented") 14 | } 15 | 16 | func (c *Conn) sendMsg(m *Message, flags int) error { 17 | return errors.New("not implemented") 18 | } 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/rawconn_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 | // +build !go1.9 6 | 7 | package socket 8 | 9 | import "errors" 10 | 11 | func (c *Conn) recvMsg(m *Message, flags int) error { 12 | return errors.New("not implemented") 13 | } 14 | 15 | func (c *Conn) sendMsg(m *Message, flags int) error { 16 | return errors.New("not implemented") 17 | } 18 | 19 | func (c *Conn) recvMsgs(ms []Message, flags int) (int, error) { 20 | return 0, errors.New("not implemented") 21 | } 22 | 23 | func (c *Conn) sendMsgs(ms []Message, flags int) (int, error) { 24 | return 0, errors.New("not implemented") 25 | } 26 | -------------------------------------------------------------------------------- /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 | var ( 13 | // NativeEndian is the machine native endian implementation of 14 | // ByteOrder. 15 | NativeEndian binary.ByteOrder 16 | 17 | kernelAlign int 18 | ) 19 | 20 | func init() { 21 | i := uint32(1) 22 | b := (*[4]byte)(unsafe.Pointer(&i)) 23 | if b[0] == 1 { 24 | NativeEndian = binary.LittleEndian 25 | } else { 26 | NativeEndian = binary.BigEndian 27 | } 28 | kernelAlign = probeProtocolStack() 29 | } 30 | 31 | func roundup(l int) int { 32 | return (l + kernelAlign - 1) & ^(kernelAlign - 1) 33 | } 34 | -------------------------------------------------------------------------------- /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 | // +build darwin dragonfly freebsd openbsd 6 | 7 | package socket 8 | 9 | import "errors" 10 | 11 | func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { 12 | return 0, errors.New("not implemented") 13 | } 14 | 15 | func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { 16 | return 0, errors.New("not implemented") 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_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 | // +build freebsd netbsd openbsd 6 | 7 | package socket 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | func probeProtocolStack() int { 15 | if runtime.GOOS == "openbsd" && runtime.GOARCH == "arm" { 16 | return 8 17 | } 18 | var p uintptr 19 | return int(unsafe.Sizeof(p)) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_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 | package socket 6 | 7 | func probeProtocolStack() int { return 4 } 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_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 | package socket 6 | 7 | func probeProtocolStack() int { return 4 } 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_go1_11_darwin.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 !go1.12 6 | 7 | package socket 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func getsockopt(s uintptr, level, name int, b []byte) (int, error) { 15 | l := uint32(len(b)) 16 | _, _, errno := syscall.Syscall6(syscall.SYS_GETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0) 17 | return int(l), errnoErr(errno) 18 | } 19 | 20 | func setsockopt(s uintptr, level, name int, b []byte) error { 21 | _, _, errno := syscall.Syscall6(syscall.SYS_SETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0) 22 | return errnoErr(errno) 23 | } 24 | 25 | func recvmsg(s uintptr, h *msghdr, flags int) (int, error) { 26 | n, _, errno := syscall.Syscall(syscall.SYS_RECVMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags)) 27 | return int(n), errnoErr(errno) 28 | } 29 | 30 | func sendmsg(s uintptr, h *msghdr, flags int) (int, error) { 31 | n, _, errno := syscall.Syscall(syscall.SYS_SENDMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags)) 32 | return int(n), errnoErr(errno) 33 | } 34 | -------------------------------------------------------------------------------- /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 | // +build linux,!s390x,!386 6 | 7 | package socket 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func probeProtocolStack() int { 15 | var p uintptr 16 | return int(unsafe.Sizeof(p)) 17 | } 18 | 19 | func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { 20 | n, _, errno := syscall.Syscall6(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) 21 | return int(n), errnoErr(errno) 22 | } 23 | 24 | func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) { 25 | n, _, errno := syscall.Syscall6(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0) 26 | return int(n), errnoErr(errno) 27 | } 28 | -------------------------------------------------------------------------------- /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_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_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_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_solaris_amd64.s: -------------------------------------------------------------------------------- 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 | #include "textflag.h" 6 | 7 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 8 | JMP syscall·sysvicall6(SB) 9 | 10 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 11 | JMP syscall·rawSysvicall6(SB) 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/sys_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 | // +build dragonfly freebsd linux,!s390x,!386 netbsd openbsd 6 | 7 | package socket 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func getsockopt(s uintptr, level, name int, b []byte) (int, error) { 15 | l := uint32(len(b)) 16 | _, _, errno := syscall.Syscall6(syscall.SYS_GETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0) 17 | return int(l), errnoErr(errno) 18 | } 19 | 20 | func setsockopt(s uintptr, level, name int, b []byte) error { 21 | _, _, errno := syscall.Syscall6(syscall.SYS_SETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0) 22 | return errnoErr(errno) 23 | } 24 | 25 | func recvmsg(s uintptr, h *msghdr, flags int) (int, error) { 26 | n, _, errno := syscall.Syscall(syscall.SYS_RECVMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags)) 27 | return int(n), errnoErr(errno) 28 | } 29 | 30 | func sendmsg(s uintptr, h *msghdr, flags int) (int, error) { 31 | n, _, errno := syscall.Syscall(syscall.SYS_SENDMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags)) 32 | return int(n), errnoErr(errno) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_darwin_386.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_darwin.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0x1e 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint32 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Iov *iovec 23 | Iovlen int32 24 | Control *byte 25 | Controllen uint32 26 | Flags int32 27 | } 28 | 29 | type cmsghdr struct { 30 | Len uint32 31 | Level int32 32 | Type int32 33 | } 34 | 35 | type sockaddrInet struct { 36 | Len uint8 37 | Family uint8 38 | Port uint16 39 | Addr [4]byte /* in_addr */ 40 | Zero [8]int8 41 | } 42 | 43 | type sockaddrInet6 struct { 44 | Len uint8 45 | Family uint8 46 | Port uint16 47 | Flowinfo uint32 48 | Addr [16]byte /* in6_addr */ 49 | Scope_id uint32 50 | } 51 | 52 | const ( 53 | sizeofIovec = 0x8 54 | sizeofMsghdr = 0x1c 55 | sizeofCmsghdr = 0xc 56 | 57 | sizeofSockaddrInet = 0x10 58 | sizeofSockaddrInet6 = 0x1c 59 | ) 60 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_darwin.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0x1e 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint64 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Pad_cgo_0 [4]byte 23 | Iov *iovec 24 | Iovlen int32 25 | Pad_cgo_1 [4]byte 26 | Control *byte 27 | Controllen uint32 28 | Flags int32 29 | } 30 | 31 | type cmsghdr struct { 32 | Len uint32 33 | Level int32 34 | Type int32 35 | } 36 | 37 | type sockaddrInet struct { 38 | Len uint8 39 | Family uint8 40 | Port uint16 41 | Addr [4]byte /* in_addr */ 42 | Zero [8]int8 43 | } 44 | 45 | type sockaddrInet6 struct { 46 | Len uint8 47 | Family uint8 48 | Port uint16 49 | Flowinfo uint32 50 | Addr [16]byte /* in6_addr */ 51 | Scope_id uint32 52 | } 53 | 54 | const ( 55 | sizeofIovec = 0x10 56 | sizeofMsghdr = 0x30 57 | sizeofCmsghdr = 0xc 58 | 59 | sizeofSockaddrInet = 0x10 60 | sizeofSockaddrInet6 = 0x1c 61 | ) 62 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_darwin_arm.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_darwin.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0x1e 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint32 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Iov *iovec 23 | Iovlen int32 24 | Control *byte 25 | Controllen uint32 26 | Flags int32 27 | } 28 | 29 | type cmsghdr struct { 30 | Len uint32 31 | Level int32 32 | Type int32 33 | } 34 | 35 | type sockaddrInet struct { 36 | Len uint8 37 | Family uint8 38 | Port uint16 39 | Addr [4]byte /* in_addr */ 40 | Zero [8]int8 41 | } 42 | 43 | type sockaddrInet6 struct { 44 | Len uint8 45 | Family uint8 46 | Port uint16 47 | Flowinfo uint32 48 | Addr [16]byte /* in6_addr */ 49 | Scope_id uint32 50 | } 51 | 52 | const ( 53 | sizeofIovec = 0x8 54 | sizeofMsghdr = 0x1c 55 | sizeofCmsghdr = 0xc 56 | 57 | sizeofSockaddrInet = 0x10 58 | sizeofSockaddrInet6 = 0x1c 59 | ) 60 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_darwin_arm64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_darwin.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0x1e 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint64 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Pad_cgo_0 [4]byte 23 | Iov *iovec 24 | Iovlen int32 25 | Pad_cgo_1 [4]byte 26 | Control *byte 27 | Controllen uint32 28 | Flags int32 29 | } 30 | 31 | type cmsghdr struct { 32 | Len uint32 33 | Level int32 34 | Type int32 35 | } 36 | 37 | type sockaddrInet struct { 38 | Len uint8 39 | Family uint8 40 | Port uint16 41 | Addr [4]byte /* in_addr */ 42 | Zero [8]int8 43 | } 44 | 45 | type sockaddrInet6 struct { 46 | Len uint8 47 | Family uint8 48 | Port uint16 49 | Flowinfo uint32 50 | Addr [16]byte /* in6_addr */ 51 | Scope_id uint32 52 | } 53 | 54 | const ( 55 | sizeofIovec = 0x10 56 | sizeofMsghdr = 0x30 57 | sizeofCmsghdr = 0xc 58 | 59 | sizeofSockaddrInet = 0x10 60 | sizeofSockaddrInet6 = 0x1c 61 | ) 62 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_dragonfly.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0x1c 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint64 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Pad_cgo_0 [4]byte 23 | Iov *iovec 24 | Iovlen int32 25 | Pad_cgo_1 [4]byte 26 | Control *byte 27 | Controllen uint32 28 | Flags int32 29 | } 30 | 31 | type cmsghdr struct { 32 | Len uint32 33 | Level int32 34 | Type int32 35 | } 36 | 37 | type sockaddrInet struct { 38 | Len uint8 39 | Family uint8 40 | Port uint16 41 | Addr [4]byte /* in_addr */ 42 | Zero [8]int8 43 | } 44 | 45 | type sockaddrInet6 struct { 46 | Len uint8 47 | Family uint8 48 | Port uint16 49 | Flowinfo uint32 50 | Addr [16]byte /* in6_addr */ 51 | Scope_id uint32 52 | } 53 | 54 | const ( 55 | sizeofIovec = 0x10 56 | sizeofMsghdr = 0x30 57 | sizeofCmsghdr = 0xc 58 | 59 | sizeofSockaddrInet = 0x10 60 | sizeofSockaddrInet6 = 0x1c 61 | ) 62 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_freebsd.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0x1c 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint32 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Iov *iovec 23 | Iovlen int32 24 | Control *byte 25 | Controllen uint32 26 | Flags int32 27 | } 28 | 29 | type cmsghdr struct { 30 | Len uint32 31 | Level int32 32 | Type int32 33 | } 34 | 35 | type sockaddrInet struct { 36 | Len uint8 37 | Family uint8 38 | Port uint16 39 | Addr [4]byte /* in_addr */ 40 | Zero [8]int8 41 | } 42 | 43 | type sockaddrInet6 struct { 44 | Len uint8 45 | Family uint8 46 | Port uint16 47 | Flowinfo uint32 48 | Addr [16]byte /* in6_addr */ 49 | Scope_id uint32 50 | } 51 | 52 | const ( 53 | sizeofIovec = 0x8 54 | sizeofMsghdr = 0x1c 55 | sizeofCmsghdr = 0xc 56 | 57 | sizeofSockaddrInet = 0x10 58 | sizeofSockaddrInet6 = 0x1c 59 | ) 60 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_freebsd.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0x1c 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint64 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Pad_cgo_0 [4]byte 23 | Iov *iovec 24 | Iovlen int32 25 | Pad_cgo_1 [4]byte 26 | Control *byte 27 | Controllen uint32 28 | Flags int32 29 | } 30 | 31 | type cmsghdr struct { 32 | Len uint32 33 | Level int32 34 | Type int32 35 | } 36 | 37 | type sockaddrInet struct { 38 | Len uint8 39 | Family uint8 40 | Port uint16 41 | Addr [4]byte /* in_addr */ 42 | Zero [8]int8 43 | } 44 | 45 | type sockaddrInet6 struct { 46 | Len uint8 47 | Family uint8 48 | Port uint16 49 | Flowinfo uint32 50 | Addr [16]byte /* in6_addr */ 51 | Scope_id uint32 52 | } 53 | 54 | const ( 55 | sizeofIovec = 0x10 56 | sizeofMsghdr = 0x30 57 | sizeofCmsghdr = 0xc 58 | 59 | sizeofSockaddrInet = 0x10 60 | sizeofSockaddrInet6 = 0x1c 61 | ) 62 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_freebsd.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0x1c 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint32 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Iov *iovec 23 | Iovlen int32 24 | Control *byte 25 | Controllen uint32 26 | Flags int32 27 | } 28 | 29 | type cmsghdr struct { 30 | Len uint32 31 | Level int32 32 | Type int32 33 | } 34 | 35 | type sockaddrInet struct { 36 | Len uint8 37 | Family uint8 38 | Port uint16 39 | Addr [4]byte /* in_addr */ 40 | Zero [8]int8 41 | } 42 | 43 | type sockaddrInet6 struct { 44 | Len uint8 45 | Family uint8 46 | Port uint16 47 | Flowinfo uint32 48 | Addr [16]byte /* in6_addr */ 49 | Scope_id uint32 50 | } 51 | 52 | const ( 53 | sizeofIovec = 0x8 54 | sizeofMsghdr = 0x1c 55 | sizeofCmsghdr = 0xc 56 | 57 | sizeofSockaddrInet = 0x10 58 | sizeofSockaddrInet6 = 0x1c 59 | ) 60 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_386.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_linux.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0xa 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint32 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Iov *iovec 23 | Iovlen uint32 24 | Control *byte 25 | Controllen uint32 26 | Flags int32 27 | } 28 | 29 | type mmsghdr struct { 30 | Hdr msghdr 31 | Len uint32 32 | } 33 | 34 | type cmsghdr struct { 35 | Len uint32 36 | Level int32 37 | Type int32 38 | } 39 | 40 | type sockaddrInet struct { 41 | Family uint16 42 | Port uint16 43 | Addr [4]byte /* in_addr */ 44 | X__pad [8]uint8 45 | } 46 | 47 | type sockaddrInet6 struct { 48 | Family uint16 49 | Port uint16 50 | Flowinfo uint32 51 | Addr [16]byte /* in6_addr */ 52 | Scope_id uint32 53 | } 54 | 55 | const ( 56 | sizeofIovec = 0x8 57 | sizeofMsghdr = 0x1c 58 | sizeofMmsghdr = 0x20 59 | sizeofCmsghdr = 0xc 60 | 61 | sizeofSockaddrInet = 0x10 62 | sizeofSockaddrInet6 = 0x1c 63 | ) 64 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_linux.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0xa 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint64 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Pad_cgo_0 [4]byte 23 | Iov *iovec 24 | Iovlen uint64 25 | Control *byte 26 | Controllen uint64 27 | Flags int32 28 | Pad_cgo_1 [4]byte 29 | } 30 | 31 | type mmsghdr struct { 32 | Hdr msghdr 33 | Len uint32 34 | Pad_cgo_0 [4]byte 35 | } 36 | 37 | type cmsghdr struct { 38 | Len uint64 39 | Level int32 40 | Type int32 41 | } 42 | 43 | type sockaddrInet struct { 44 | Family uint16 45 | Port uint16 46 | Addr [4]byte /* in_addr */ 47 | X__pad [8]uint8 48 | } 49 | 50 | type sockaddrInet6 struct { 51 | Family uint16 52 | Port uint16 53 | Flowinfo uint32 54 | Addr [16]byte /* in6_addr */ 55 | Scope_id uint32 56 | } 57 | 58 | const ( 59 | sizeofIovec = 0x10 60 | sizeofMsghdr = 0x38 61 | sizeofMmsghdr = 0x40 62 | sizeofCmsghdr = 0x10 63 | 64 | sizeofSockaddrInet = 0x10 65 | sizeofSockaddrInet6 = 0x1c 66 | ) 67 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_linux.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0xa 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint32 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Iov *iovec 23 | Iovlen uint32 24 | Control *byte 25 | Controllen uint32 26 | Flags int32 27 | } 28 | 29 | type mmsghdr struct { 30 | Hdr msghdr 31 | Len uint32 32 | } 33 | 34 | type cmsghdr struct { 35 | Len uint32 36 | Level int32 37 | Type int32 38 | } 39 | 40 | type sockaddrInet struct { 41 | Family uint16 42 | Port uint16 43 | Addr [4]byte /* in_addr */ 44 | X__pad [8]uint8 45 | } 46 | 47 | type sockaddrInet6 struct { 48 | Family uint16 49 | Port uint16 50 | Flowinfo uint32 51 | Addr [16]byte /* in6_addr */ 52 | Scope_id uint32 53 | } 54 | 55 | const ( 56 | sizeofIovec = 0x8 57 | sizeofMsghdr = 0x1c 58 | sizeofMmsghdr = 0x20 59 | sizeofCmsghdr = 0xc 60 | 61 | sizeofSockaddrInet = 0x10 62 | sizeofSockaddrInet6 = 0x1c 63 | ) 64 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_linux.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0xa 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint64 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Pad_cgo_0 [4]byte 23 | Iov *iovec 24 | Iovlen uint64 25 | Control *byte 26 | Controllen uint64 27 | Flags int32 28 | Pad_cgo_1 [4]byte 29 | } 30 | 31 | type mmsghdr struct { 32 | Hdr msghdr 33 | Len uint32 34 | Pad_cgo_0 [4]byte 35 | } 36 | 37 | type cmsghdr struct { 38 | Len uint64 39 | Level int32 40 | Type int32 41 | } 42 | 43 | type sockaddrInet struct { 44 | Family uint16 45 | Port uint16 46 | Addr [4]byte /* in_addr */ 47 | X__pad [8]uint8 48 | } 49 | 50 | type sockaddrInet6 struct { 51 | Family uint16 52 | Port uint16 53 | Flowinfo uint32 54 | Addr [16]byte /* in6_addr */ 55 | Scope_id uint32 56 | } 57 | 58 | const ( 59 | sizeofIovec = 0x10 60 | sizeofMsghdr = 0x38 61 | sizeofMmsghdr = 0x40 62 | sizeofCmsghdr = 0x10 63 | 64 | sizeofSockaddrInet = 0x10 65 | sizeofSockaddrInet6 = 0x1c 66 | ) 67 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_linux.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0xa 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint32 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Iov *iovec 23 | Iovlen uint32 24 | Control *byte 25 | Controllen uint32 26 | Flags int32 27 | } 28 | 29 | type mmsghdr struct { 30 | Hdr msghdr 31 | Len uint32 32 | } 33 | 34 | type cmsghdr struct { 35 | Len uint32 36 | Level int32 37 | Type int32 38 | } 39 | 40 | type sockaddrInet struct { 41 | Family uint16 42 | Port uint16 43 | Addr [4]byte /* in_addr */ 44 | X__pad [8]uint8 45 | } 46 | 47 | type sockaddrInet6 struct { 48 | Family uint16 49 | Port uint16 50 | Flowinfo uint32 51 | Addr [16]byte /* in6_addr */ 52 | Scope_id uint32 53 | } 54 | 55 | const ( 56 | sizeofIovec = 0x8 57 | sizeofMsghdr = 0x1c 58 | sizeofMmsghdr = 0x20 59 | sizeofCmsghdr = 0xc 60 | 61 | sizeofSockaddrInet = 0x10 62 | sizeofSockaddrInet6 = 0x1c 63 | ) 64 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_linux.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0xa 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint64 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Pad_cgo_0 [4]byte 23 | Iov *iovec 24 | Iovlen uint64 25 | Control *byte 26 | Controllen uint64 27 | Flags int32 28 | Pad_cgo_1 [4]byte 29 | } 30 | 31 | type mmsghdr struct { 32 | Hdr msghdr 33 | Len uint32 34 | Pad_cgo_0 [4]byte 35 | } 36 | 37 | type cmsghdr struct { 38 | Len uint64 39 | Level int32 40 | Type int32 41 | } 42 | 43 | type sockaddrInet struct { 44 | Family uint16 45 | Port uint16 46 | Addr [4]byte /* in_addr */ 47 | X__pad [8]uint8 48 | } 49 | 50 | type sockaddrInet6 struct { 51 | Family uint16 52 | Port uint16 53 | Flowinfo uint32 54 | Addr [16]byte /* in6_addr */ 55 | Scope_id uint32 56 | } 57 | 58 | const ( 59 | sizeofIovec = 0x10 60 | sizeofMsghdr = 0x38 61 | sizeofMmsghdr = 0x40 62 | sizeofCmsghdr = 0x10 63 | 64 | sizeofSockaddrInet = 0x10 65 | sizeofSockaddrInet6 = 0x1c 66 | ) 67 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_linux.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0xa 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint64 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Pad_cgo_0 [4]byte 23 | Iov *iovec 24 | Iovlen uint64 25 | Control *byte 26 | Controllen uint64 27 | Flags int32 28 | Pad_cgo_1 [4]byte 29 | } 30 | 31 | type mmsghdr struct { 32 | Hdr msghdr 33 | Len uint32 34 | Pad_cgo_0 [4]byte 35 | } 36 | 37 | type cmsghdr struct { 38 | Len uint64 39 | Level int32 40 | Type int32 41 | } 42 | 43 | type sockaddrInet struct { 44 | Family uint16 45 | Port uint16 46 | Addr [4]byte /* in_addr */ 47 | X__pad [8]uint8 48 | } 49 | 50 | type sockaddrInet6 struct { 51 | Family uint16 52 | Port uint16 53 | Flowinfo uint32 54 | Addr [16]byte /* in6_addr */ 55 | Scope_id uint32 56 | } 57 | 58 | const ( 59 | sizeofIovec = 0x10 60 | sizeofMsghdr = 0x38 61 | sizeofMmsghdr = 0x40 62 | sizeofCmsghdr = 0x10 63 | 64 | sizeofSockaddrInet = 0x10 65 | sizeofSockaddrInet6 = 0x1c 66 | ) 67 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_linux.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0xa 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint32 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Iov *iovec 23 | Iovlen uint32 24 | Control *byte 25 | Controllen uint32 26 | Flags int32 27 | } 28 | 29 | type mmsghdr struct { 30 | Hdr msghdr 31 | Len uint32 32 | } 33 | 34 | type cmsghdr struct { 35 | Len uint32 36 | Level int32 37 | Type int32 38 | } 39 | 40 | type sockaddrInet struct { 41 | Family uint16 42 | Port uint16 43 | Addr [4]byte /* in_addr */ 44 | X__pad [8]uint8 45 | } 46 | 47 | type sockaddrInet6 struct { 48 | Family uint16 49 | Port uint16 50 | Flowinfo uint32 51 | Addr [16]byte /* in6_addr */ 52 | Scope_id uint32 53 | } 54 | 55 | const ( 56 | sizeofIovec = 0x8 57 | sizeofMsghdr = 0x1c 58 | sizeofMmsghdr = 0x20 59 | sizeofCmsghdr = 0xc 60 | 61 | sizeofSockaddrInet = 0x10 62 | sizeofSockaddrInet6 = 0x1c 63 | ) 64 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_linux.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0xa 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint64 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Pad_cgo_0 [4]byte 23 | Iov *iovec 24 | Iovlen uint64 25 | Control *byte 26 | Controllen uint64 27 | Flags int32 28 | Pad_cgo_1 [4]byte 29 | } 30 | 31 | type mmsghdr struct { 32 | Hdr msghdr 33 | Len uint32 34 | Pad_cgo_0 [4]byte 35 | } 36 | 37 | type cmsghdr struct { 38 | Len uint64 39 | Level int32 40 | Type int32 41 | } 42 | 43 | type sockaddrInet struct { 44 | Family uint16 45 | Port uint16 46 | Addr [4]byte /* in_addr */ 47 | X__pad [8]uint8 48 | } 49 | 50 | type sockaddrInet6 struct { 51 | Family uint16 52 | Port uint16 53 | Flowinfo uint32 54 | Addr [16]byte /* in6_addr */ 55 | Scope_id uint32 56 | } 57 | 58 | const ( 59 | sizeofIovec = 0x10 60 | sizeofMsghdr = 0x38 61 | sizeofMmsghdr = 0x40 62 | sizeofCmsghdr = 0x10 63 | 64 | sizeofSockaddrInet = 0x10 65 | sizeofSockaddrInet6 = 0x1c 66 | ) 67 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_linux.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0xa 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint64 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Pad_cgo_0 [4]byte 23 | Iov *iovec 24 | Iovlen uint64 25 | Control *byte 26 | Controllen uint64 27 | Flags int32 28 | Pad_cgo_1 [4]byte 29 | } 30 | 31 | type mmsghdr struct { 32 | Hdr msghdr 33 | Len uint32 34 | Pad_cgo_0 [4]byte 35 | } 36 | 37 | type cmsghdr struct { 38 | Len uint64 39 | Level int32 40 | Type int32 41 | } 42 | 43 | type sockaddrInet struct { 44 | Family uint16 45 | Port uint16 46 | Addr [4]byte /* in_addr */ 47 | X__pad [8]uint8 48 | } 49 | 50 | type sockaddrInet6 struct { 51 | Family uint16 52 | Port uint16 53 | Flowinfo uint32 54 | Addr [16]byte /* in6_addr */ 55 | Scope_id uint32 56 | } 57 | 58 | const ( 59 | sizeofIovec = 0x10 60 | sizeofMsghdr = 0x38 61 | sizeofMmsghdr = 0x40 62 | sizeofCmsghdr = 0x10 63 | 64 | sizeofSockaddrInet = 0x10 65 | sizeofSockaddrInet6 = 0x1c 66 | ) 67 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_linux.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0xa 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint64 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Pad_cgo_0 [4]byte 23 | Iov *iovec 24 | Iovlen uint64 25 | Control *byte 26 | Controllen uint64 27 | Flags int32 28 | Pad_cgo_1 [4]byte 29 | } 30 | 31 | type mmsghdr struct { 32 | Hdr msghdr 33 | Len uint32 34 | Pad_cgo_0 [4]byte 35 | } 36 | 37 | type cmsghdr struct { 38 | Len uint64 39 | Level int32 40 | Type int32 41 | } 42 | 43 | type sockaddrInet struct { 44 | Family uint16 45 | Port uint16 46 | Addr [4]byte /* in_addr */ 47 | X__pad [8]uint8 48 | } 49 | 50 | type sockaddrInet6 struct { 51 | Family uint16 52 | Port uint16 53 | Flowinfo uint32 54 | Addr [16]byte /* in6_addr */ 55 | Scope_id uint32 56 | } 57 | 58 | const ( 59 | sizeofIovec = 0x10 60 | sizeofMsghdr = 0x38 61 | sizeofMmsghdr = 0x40 62 | sizeofCmsghdr = 0x10 63 | 64 | sizeofSockaddrInet = 0x10 65 | sizeofSockaddrInet6 = 0x1c 66 | ) 67 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_netbsd.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0x18 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint32 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Iov *iovec 23 | Iovlen int32 24 | Control *byte 25 | Controllen uint32 26 | Flags int32 27 | } 28 | 29 | type mmsghdr struct { 30 | Hdr msghdr 31 | Len uint32 32 | } 33 | 34 | type cmsghdr struct { 35 | Len uint32 36 | Level int32 37 | Type int32 38 | } 39 | 40 | type sockaddrInet struct { 41 | Len uint8 42 | Family uint8 43 | Port uint16 44 | Addr [4]byte /* in_addr */ 45 | Zero [8]int8 46 | } 47 | 48 | type sockaddrInet6 struct { 49 | Len uint8 50 | Family uint8 51 | Port uint16 52 | Flowinfo uint32 53 | Addr [16]byte /* in6_addr */ 54 | Scope_id uint32 55 | } 56 | 57 | const ( 58 | sizeofIovec = 0x8 59 | sizeofMsghdr = 0x1c 60 | sizeofMmsghdr = 0x20 61 | sizeofCmsghdr = 0xc 62 | 63 | sizeofSockaddrInet = 0x10 64 | sizeofSockaddrInet6 = 0x1c 65 | ) 66 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_netbsd.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0x18 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint64 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Pad_cgo_0 [4]byte 23 | Iov *iovec 24 | Iovlen int32 25 | Pad_cgo_1 [4]byte 26 | Control *byte 27 | Controllen uint32 28 | Flags int32 29 | } 30 | 31 | type mmsghdr struct { 32 | Hdr msghdr 33 | Len uint32 34 | Pad_cgo_0 [4]byte 35 | } 36 | 37 | type cmsghdr struct { 38 | Len uint32 39 | Level int32 40 | Type int32 41 | } 42 | 43 | type sockaddrInet struct { 44 | Len uint8 45 | Family uint8 46 | Port uint16 47 | Addr [4]byte /* in_addr */ 48 | Zero [8]int8 49 | } 50 | 51 | type sockaddrInet6 struct { 52 | Len uint8 53 | Family uint8 54 | Port uint16 55 | Flowinfo uint32 56 | Addr [16]byte /* in6_addr */ 57 | Scope_id uint32 58 | } 59 | 60 | const ( 61 | sizeofIovec = 0x10 62 | sizeofMsghdr = 0x30 63 | sizeofMmsghdr = 0x40 64 | sizeofCmsghdr = 0xc 65 | 66 | sizeofSockaddrInet = 0x10 67 | sizeofSockaddrInet6 = 0x1c 68 | ) 69 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_netbsd.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0x18 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint32 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Iov *iovec 23 | Iovlen int32 24 | Control *byte 25 | Controllen uint32 26 | Flags int32 27 | } 28 | 29 | type mmsghdr struct { 30 | Hdr msghdr 31 | Len uint32 32 | } 33 | 34 | type cmsghdr struct { 35 | Len uint32 36 | Level int32 37 | Type int32 38 | } 39 | 40 | type sockaddrInet struct { 41 | Len uint8 42 | Family uint8 43 | Port uint16 44 | Addr [4]byte /* in_addr */ 45 | Zero [8]int8 46 | } 47 | 48 | type sockaddrInet6 struct { 49 | Len uint8 50 | Family uint8 51 | Port uint16 52 | Flowinfo uint32 53 | Addr [16]byte /* in6_addr */ 54 | Scope_id uint32 55 | } 56 | 57 | const ( 58 | sizeofIovec = 0x8 59 | sizeofMsghdr = 0x1c 60 | sizeofMmsghdr = 0x20 61 | sizeofCmsghdr = 0xc 62 | 63 | sizeofSockaddrInet = 0x10 64 | sizeofSockaddrInet6 = 0x1c 65 | ) 66 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_openbsd.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0x18 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint32 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Iov *iovec 23 | Iovlen uint32 24 | Control *byte 25 | Controllen uint32 26 | Flags int32 27 | } 28 | 29 | type cmsghdr struct { 30 | Len uint32 31 | Level int32 32 | Type int32 33 | } 34 | 35 | type sockaddrInet struct { 36 | Len uint8 37 | Family uint8 38 | Port uint16 39 | Addr [4]byte /* in_addr */ 40 | Zero [8]int8 41 | } 42 | 43 | type sockaddrInet6 struct { 44 | Len uint8 45 | Family uint8 46 | Port uint16 47 | Flowinfo uint32 48 | Addr [16]byte /* in6_addr */ 49 | Scope_id uint32 50 | } 51 | 52 | const ( 53 | sizeofIovec = 0x8 54 | sizeofMsghdr = 0x1c 55 | sizeofCmsghdr = 0xc 56 | 57 | sizeofSockaddrInet = 0x10 58 | sizeofSockaddrInet6 = 0x1c 59 | ) 60 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_openbsd.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0x18 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint64 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Pad_cgo_0 [4]byte 23 | Iov *iovec 24 | Iovlen uint32 25 | Pad_cgo_1 [4]byte 26 | Control *byte 27 | Controllen uint32 28 | Flags int32 29 | } 30 | 31 | type cmsghdr struct { 32 | Len uint32 33 | Level int32 34 | Type int32 35 | } 36 | 37 | type sockaddrInet struct { 38 | Len uint8 39 | Family uint8 40 | Port uint16 41 | Addr [4]byte /* in_addr */ 42 | Zero [8]int8 43 | } 44 | 45 | type sockaddrInet6 struct { 46 | Len uint8 47 | Family uint8 48 | Port uint16 49 | Flowinfo uint32 50 | Addr [16]byte /* in6_addr */ 51 | Scope_id uint32 52 | } 53 | 54 | const ( 55 | sizeofIovec = 0x10 56 | sizeofMsghdr = 0x30 57 | sizeofCmsghdr = 0xc 58 | 59 | sizeofSockaddrInet = 0x10 60 | sizeofSockaddrInet6 = 0x1c 61 | ) 62 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_openbsd.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0x18 10 | 11 | sysSOCK_RAW = 0x3 12 | ) 13 | 14 | type iovec struct { 15 | Base *byte 16 | Len uint32 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Iov *iovec 23 | Iovlen uint32 24 | Control *byte 25 | Controllen uint32 26 | Flags int32 27 | } 28 | 29 | type cmsghdr struct { 30 | Len uint32 31 | Level int32 32 | Type int32 33 | } 34 | 35 | type sockaddrInet struct { 36 | Len uint8 37 | Family uint8 38 | Port uint16 39 | Addr [4]byte /* in_addr */ 40 | Zero [8]int8 41 | } 42 | 43 | type sockaddrInet6 struct { 44 | Len uint8 45 | Family uint8 46 | Port uint16 47 | Flowinfo uint32 48 | Addr [16]byte /* in6_addr */ 49 | Scope_id uint32 50 | } 51 | 52 | const ( 53 | sizeofIovec = 0x8 54 | sizeofMsghdr = 0x1c 55 | sizeofCmsghdr = 0xc 56 | 57 | sizeofSockaddrInet = 0x10 58 | sizeofSockaddrInet6 = 0x1c 59 | ) 60 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_solaris.go 3 | 4 | package socket 5 | 6 | const ( 7 | sysAF_UNSPEC = 0x0 8 | sysAF_INET = 0x2 9 | sysAF_INET6 = 0x1a 10 | 11 | sysSOCK_RAW = 0x4 12 | ) 13 | 14 | type iovec struct { 15 | Base *int8 16 | Len uint64 17 | } 18 | 19 | type msghdr struct { 20 | Name *byte 21 | Namelen uint32 22 | Pad_cgo_0 [4]byte 23 | Iov *iovec 24 | Iovlen int32 25 | Pad_cgo_1 [4]byte 26 | Accrights *int8 27 | Accrightslen int32 28 | Pad_cgo_2 [4]byte 29 | } 30 | 31 | type cmsghdr struct { 32 | Len uint32 33 | Level int32 34 | Type int32 35 | } 36 | 37 | type sockaddrInet struct { 38 | Family uint16 39 | Port uint16 40 | Addr [4]byte /* in_addr */ 41 | Zero [8]int8 42 | } 43 | 44 | type sockaddrInet6 struct { 45 | Family uint16 46 | Port uint16 47 | Flowinfo uint32 48 | Addr [16]byte /* in6_addr */ 49 | Scope_id uint32 50 | X__sin6_src_id uint32 51 | } 52 | 53 | const ( 54 | sizeofIovec = 0x10 55 | sizeofMsghdr = 0x30 56 | sizeofCmsghdr = 0xc 57 | 58 | sizeofSockaddrInet = 0x10 59 | sizeofSockaddrInet6 = 0x20 60 | ) 61 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/control_bsd.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 | // +build darwin dragonfly freebsd netbsd openbsd 6 | 7 | package ipv4 8 | 9 | import ( 10 | "net" 11 | "syscall" 12 | "unsafe" 13 | 14 | "golang.org/x/net/internal/iana" 15 | "golang.org/x/net/internal/socket" 16 | ) 17 | 18 | func marshalDst(b []byte, cm *ControlMessage) []byte { 19 | m := socket.ControlMessage(b) 20 | m.MarshalHeader(iana.ProtocolIP, sysIP_RECVDSTADDR, net.IPv4len) 21 | return m.Next(net.IPv4len) 22 | } 23 | 24 | func parseDst(cm *ControlMessage, b []byte) { 25 | if len(cm.Dst) < net.IPv4len { 26 | cm.Dst = make(net.IP, net.IPv4len) 27 | } 28 | copy(cm.Dst, b[:net.IPv4len]) 29 | } 30 | 31 | func marshalInterface(b []byte, cm *ControlMessage) []byte { 32 | m := socket.ControlMessage(b) 33 | m.MarshalHeader(iana.ProtocolIP, sysIP_RECVIF, syscall.SizeofSockaddrDatalink) 34 | return m.Next(syscall.SizeofSockaddrDatalink) 35 | } 36 | 37 | func parseInterface(cm *ControlMessage, b []byte) { 38 | sadl := (*syscall.SockaddrDatalink)(unsafe.Pointer(&b[0])) 39 | cm.IfIndex = int(sadl.Index) 40 | } 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/control_pktinfo.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 | // +build darwin linux solaris 6 | 7 | package ipv4 8 | 9 | import ( 10 | "net" 11 | "unsafe" 12 | 13 | "golang.org/x/net/internal/iana" 14 | "golang.org/x/net/internal/socket" 15 | ) 16 | 17 | func marshalPacketInfo(b []byte, cm *ControlMessage) []byte { 18 | m := socket.ControlMessage(b) 19 | m.MarshalHeader(iana.ProtocolIP, sysIP_PKTINFO, sizeofInetPktinfo) 20 | if cm != nil { 21 | pi := (*inetPktinfo)(unsafe.Pointer(&m.Data(sizeofInetPktinfo)[0])) 22 | if ip := cm.Src.To4(); ip != nil { 23 | copy(pi.Spec_dst[:], ip) 24 | } 25 | if cm.IfIndex > 0 { 26 | pi.setIfindex(cm.IfIndex) 27 | } 28 | } 29 | return m.Next(sizeofInetPktinfo) 30 | } 31 | 32 | func parsePacketInfo(cm *ControlMessage, b []byte) { 33 | pi := (*inetPktinfo)(unsafe.Pointer(&b[0])) 34 | cm.IfIndex = int(pi.Ifindex) 35 | if len(cm.Dst) < net.IPv4len { 36 | cm.Dst = make(net.IP, net.IPv4len) 37 | } 38 | copy(cm.Dst, pi.Addr[:]) 39 | } 40 | -------------------------------------------------------------------------------- /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 | // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows 6 | 7 | package ipv4 8 | 9 | import "golang.org/x/net/internal/socket" 10 | 11 | func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error { 12 | return errOpNoSupport 13 | } 14 | -------------------------------------------------------------------------------- /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 ( 8 | "syscall" 9 | 10 | "golang.org/x/net/internal/socket" 11 | ) 12 | 13 | func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error { 14 | // TODO(mikio): implement this 15 | return syscall.EWINDOWS 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/defs_dragonfly.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 | // +build ignore 6 | 7 | // +godefs map struct_in_addr [4]byte /* in_addr */ 8 | 9 | package ipv4 10 | 11 | /* 12 | #include 13 | */ 14 | import "C" 15 | 16 | const ( 17 | sysIP_OPTIONS = C.IP_OPTIONS 18 | sysIP_HDRINCL = C.IP_HDRINCL 19 | sysIP_TOS = C.IP_TOS 20 | sysIP_TTL = C.IP_TTL 21 | sysIP_RECVOPTS = C.IP_RECVOPTS 22 | sysIP_RECVRETOPTS = C.IP_RECVRETOPTS 23 | sysIP_RECVDSTADDR = C.IP_RECVDSTADDR 24 | sysIP_RETOPTS = C.IP_RETOPTS 25 | sysIP_RECVIF = C.IP_RECVIF 26 | sysIP_RECVTTL = C.IP_RECVTTL 27 | 28 | sysIP_MULTICAST_IF = C.IP_MULTICAST_IF 29 | sysIP_MULTICAST_TTL = C.IP_MULTICAST_TTL 30 | sysIP_MULTICAST_LOOP = C.IP_MULTICAST_LOOP 31 | sysIP_MULTICAST_VIF = C.IP_MULTICAST_VIF 32 | sysIP_ADD_MEMBERSHIP = C.IP_ADD_MEMBERSHIP 33 | sysIP_DROP_MEMBERSHIP = C.IP_DROP_MEMBERSHIP 34 | 35 | sizeofIPMreq = C.sizeof_struct_ip_mreq 36 | ) 37 | 38 | type ipMreq C.struct_ip_mreq 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/defs_netbsd.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 | // +build ignore 6 | 7 | // +godefs map struct_in_addr [4]byte /* in_addr */ 8 | 9 | package ipv4 10 | 11 | /* 12 | #include 13 | */ 14 | import "C" 15 | 16 | const ( 17 | sysIP_OPTIONS = C.IP_OPTIONS 18 | sysIP_HDRINCL = C.IP_HDRINCL 19 | sysIP_TOS = C.IP_TOS 20 | sysIP_TTL = C.IP_TTL 21 | sysIP_RECVOPTS = C.IP_RECVOPTS 22 | sysIP_RECVRETOPTS = C.IP_RECVRETOPTS 23 | sysIP_RECVDSTADDR = C.IP_RECVDSTADDR 24 | sysIP_RETOPTS = C.IP_RETOPTS 25 | sysIP_RECVIF = C.IP_RECVIF 26 | sysIP_RECVTTL = C.IP_RECVTTL 27 | 28 | sysIP_MULTICAST_IF = C.IP_MULTICAST_IF 29 | sysIP_MULTICAST_TTL = C.IP_MULTICAST_TTL 30 | sysIP_MULTICAST_LOOP = C.IP_MULTICAST_LOOP 31 | sysIP_ADD_MEMBERSHIP = C.IP_ADD_MEMBERSHIP 32 | sysIP_DROP_MEMBERSHIP = C.IP_DROP_MEMBERSHIP 33 | 34 | sizeofIPMreq = C.sizeof_struct_ip_mreq 35 | ) 36 | 37 | type ipMreq C.struct_ip_mreq 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/defs_openbsd.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 | // +build ignore 6 | 7 | // +godefs map struct_in_addr [4]byte /* in_addr */ 8 | 9 | package ipv4 10 | 11 | /* 12 | #include 13 | */ 14 | import "C" 15 | 16 | const ( 17 | sysIP_OPTIONS = C.IP_OPTIONS 18 | sysIP_HDRINCL = C.IP_HDRINCL 19 | sysIP_TOS = C.IP_TOS 20 | sysIP_TTL = C.IP_TTL 21 | sysIP_RECVOPTS = C.IP_RECVOPTS 22 | sysIP_RECVRETOPTS = C.IP_RECVRETOPTS 23 | sysIP_RECVDSTADDR = C.IP_RECVDSTADDR 24 | sysIP_RETOPTS = C.IP_RETOPTS 25 | sysIP_RECVIF = C.IP_RECVIF 26 | sysIP_RECVTTL = C.IP_RECVTTL 27 | 28 | sysIP_MULTICAST_IF = C.IP_MULTICAST_IF 29 | sysIP_MULTICAST_TTL = C.IP_MULTICAST_TTL 30 | sysIP_MULTICAST_LOOP = C.IP_MULTICAST_LOOP 31 | sysIP_ADD_MEMBERSHIP = C.IP_ADD_MEMBERSHIP 32 | sysIP_DROP_MEMBERSHIP = C.IP_DROP_MEMBERSHIP 33 | 34 | sizeofIPMreq = C.sizeof_struct_ip_mreq 35 | ) 36 | 37 | type ipMreq C.struct_ip_mreq 38 | -------------------------------------------------------------------------------- /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 | // +build !linux 6 | 7 | package ipv4 8 | 9 | const sizeofICMPFilter = 0x0 10 | 11 | type icmpFilter struct { 12 | } 13 | 14 | func (f *icmpFilter) accept(typ ICMPType) { 15 | } 16 | 17 | func (f *icmpFilter) block(typ ICMPType) { 18 | } 19 | 20 | func (f *icmpFilter) setAll(block bool) { 21 | } 22 | 23 | func (f *icmpFilter) willBlock(typ ICMPType) bool { 24 | return false 25 | } 26 | -------------------------------------------------------------------------------- /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/payload_cmsg.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 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package ipv4 8 | 9 | import "net" 10 | 11 | // ReadFrom reads a payload of the received IPv4 datagram, from the 12 | // endpoint c, copying the payload into b. It returns the number of 13 | // bytes copied into b, the control message cm and the source address 14 | // src of the received datagram. 15 | func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) { 16 | if !c.ok() { 17 | return 0, nil, nil, errInvalidConn 18 | } 19 | return c.readFrom(b) 20 | } 21 | 22 | // WriteTo writes a payload of the IPv4 datagram, to the destination 23 | // address dst through the endpoint c, copying the payload from b. It 24 | // returns the number of bytes written. The control message cm allows 25 | // the datagram path and the outgoing interface to be specified. 26 | // Currently only Darwin and Linux support this. The cm may be nil if 27 | // control of the outgoing datagram is not required. 28 | func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) { 29 | if !c.ok() { 30 | return 0, errInvalidConn 31 | } 32 | return c.writeTo(b, cm, dst) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/sockopt_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 | // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows 6 | 7 | package ipv4 8 | 9 | import ( 10 | "net" 11 | 12 | "golang.org/x/net/bpf" 13 | "golang.org/x/net/internal/socket" 14 | ) 15 | 16 | func (so *sockOpt) getMulticastInterface(c *socket.Conn) (*net.Interface, error) { 17 | return nil, errOpNoSupport 18 | } 19 | 20 | func (so *sockOpt) setMulticastInterface(c *socket.Conn, ifi *net.Interface) error { 21 | return errOpNoSupport 22 | } 23 | 24 | func (so *sockOpt) getICMPFilter(c *socket.Conn) (*ICMPFilter, error) { 25 | return nil, errOpNoSupport 26 | } 27 | 28 | func (so *sockOpt) setICMPFilter(c *socket.Conn, f *ICMPFilter) error { 29 | return errOpNoSupport 30 | } 31 | 32 | func (so *sockOpt) setGroup(c *socket.Conn, ifi *net.Interface, grp net.IP) error { 33 | return errOpNoSupport 34 | } 35 | 36 | func (so *sockOpt) setSourceGroup(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error { 37 | return errOpNoSupport 38 | } 39 | 40 | func (so *sockOpt) setBPF(c *socket.Conn, f []bpf.RawInstruction) error { 41 | return errOpNoSupport 42 | } 43 | -------------------------------------------------------------------------------- /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 | // +build !darwin,!dragonfly,!freebsd,!netbsd,!openbsd,!solaris,!windows 6 | 7 | package ipv4 8 | 9 | import ( 10 | "net" 11 | 12 | "golang.org/x/net/internal/socket" 13 | ) 14 | 15 | func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { 16 | return errOpNoSupport 17 | } 18 | 19 | func (so *sockOpt) getMulticastIf(c *socket.Conn) (*net.Interface, error) { 20 | return nil, errOpNoSupport 21 | } 22 | 23 | func (so *sockOpt) setMulticastIf(c *socket.Conn, ifi *net.Interface) error { 24 | return errOpNoSupport 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/sys_asmreqn.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 | // +build darwin freebsd linux 6 | 7 | package ipv4 8 | 9 | import ( 10 | "net" 11 | "unsafe" 12 | 13 | "golang.org/x/net/internal/socket" 14 | ) 15 | 16 | func (so *sockOpt) getIPMreqn(c *socket.Conn) (*net.Interface, error) { 17 | b := make([]byte, so.Len) 18 | if _, err := so.Get(c, b); err != nil { 19 | return nil, err 20 | } 21 | mreqn := (*ipMreqn)(unsafe.Pointer(&b[0])) 22 | if mreqn.Ifindex == 0 { 23 | return nil, nil 24 | } 25 | ifi, err := net.InterfaceByIndex(int(mreqn.Ifindex)) 26 | if err != nil { 27 | return nil, err 28 | } 29 | return ifi, nil 30 | } 31 | 32 | func (so *sockOpt) setIPMreqn(c *socket.Conn, ifi *net.Interface, grp net.IP) error { 33 | var mreqn ipMreqn 34 | if ifi != nil { 35 | mreqn.Ifindex = int32(ifi.Index) 36 | } 37 | if grp != nil { 38 | mreqn.Multiaddr = [4]byte{grp[0], grp[1], grp[2], grp[3]} 39 | } 40 | b := (*[sizeofIPMreqn]byte)(unsafe.Pointer(&mreqn))[:sizeofIPMreqn] 41 | return so.Set(c, b) 42 | } 43 | -------------------------------------------------------------------------------- /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 | // +build !darwin,!freebsd,!linux 6 | 7 | package ipv4 8 | 9 | import ( 10 | "net" 11 | 12 | "golang.org/x/net/internal/socket" 13 | ) 14 | 15 | func (so *sockOpt) getIPMreqn(c *socket.Conn) (*net.Interface, error) { 16 | return nil, errOpNoSupport 17 | } 18 | 19 | func (so *sockOpt) setIPMreqn(c *socket.Conn, ifi *net.Interface, grp net.IP) error { 20 | return errOpNoSupport 21 | } 22 | -------------------------------------------------------------------------------- /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 | // +build linux 6 | 7 | package ipv4 8 | 9 | import ( 10 | "unsafe" 11 | 12 | "golang.org/x/net/bpf" 13 | "golang.org/x/net/internal/socket" 14 | ) 15 | 16 | func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error { 17 | prog := sockFProg{ 18 | Len: uint16(len(f)), 19 | Filter: (*sockFilter)(unsafe.Pointer(&f[0])), 20 | } 21 | b := (*[sizeofSockFprog]byte)(unsafe.Pointer(&prog))[:sizeofSockFprog] 22 | return so.Set(c, b) 23 | } 24 | -------------------------------------------------------------------------------- /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 | // +build !linux 6 | 7 | package ipv4 8 | 9 | import ( 10 | "golang.org/x/net/bpf" 11 | "golang.org/x/net/internal/socket" 12 | ) 13 | 14 | func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error { 15 | return errOpNoSupport 16 | } 17 | -------------------------------------------------------------------------------- /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 | // +build !darwin,!freebsd,!linux,!solaris 6 | 7 | package ipv4 8 | 9 | import ( 10 | "net" 11 | 12 | "golang.org/x/net/internal/socket" 13 | ) 14 | 15 | func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { 16 | return errOpNoSupport 17 | } 18 | 19 | func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error { 20 | return errOpNoSupport 21 | } 22 | -------------------------------------------------------------------------------- /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 | // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows 6 | 7 | package ipv4 8 | 9 | var ( 10 | ctlOpts = [ctlMax]ctlOpt{} 11 | 12 | sockOpts = map[int]*sockOpt{} 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/zsys_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_dragonfly.go 3 | 4 | package ipv4 5 | 6 | const ( 7 | sysIP_OPTIONS = 0x1 8 | sysIP_HDRINCL = 0x2 9 | sysIP_TOS = 0x3 10 | sysIP_TTL = 0x4 11 | sysIP_RECVOPTS = 0x5 12 | sysIP_RECVRETOPTS = 0x6 13 | sysIP_RECVDSTADDR = 0x7 14 | sysIP_RETOPTS = 0x8 15 | sysIP_RECVIF = 0x14 16 | sysIP_RECVTTL = 0x41 17 | 18 | sysIP_MULTICAST_IF = 0x9 19 | sysIP_MULTICAST_TTL = 0xa 20 | sysIP_MULTICAST_LOOP = 0xb 21 | sysIP_MULTICAST_VIF = 0xe 22 | sysIP_ADD_MEMBERSHIP = 0xc 23 | sysIP_DROP_MEMBERSHIP = 0xd 24 | 25 | sizeofIPMreq = 0x8 26 | ) 27 | 28 | type ipMreq struct { 29 | Multiaddr [4]byte /* in_addr */ 30 | Interface [4]byte /* in_addr */ 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/zsys_netbsd.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_netbsd.go 3 | 4 | package ipv4 5 | 6 | const ( 7 | sysIP_OPTIONS = 0x1 8 | sysIP_HDRINCL = 0x2 9 | sysIP_TOS = 0x3 10 | sysIP_TTL = 0x4 11 | sysIP_RECVOPTS = 0x5 12 | sysIP_RECVRETOPTS = 0x6 13 | sysIP_RECVDSTADDR = 0x7 14 | sysIP_RETOPTS = 0x8 15 | sysIP_RECVIF = 0x14 16 | sysIP_RECVTTL = 0x17 17 | 18 | sysIP_MULTICAST_IF = 0x9 19 | sysIP_MULTICAST_TTL = 0xa 20 | sysIP_MULTICAST_LOOP = 0xb 21 | sysIP_ADD_MEMBERSHIP = 0xc 22 | sysIP_DROP_MEMBERSHIP = 0xd 23 | 24 | sizeofIPMreq = 0x8 25 | ) 26 | 27 | type ipMreq struct { 28 | Multiaddr [4]byte /* in_addr */ 29 | Interface [4]byte /* in_addr */ 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv4/zsys_openbsd.go: -------------------------------------------------------------------------------- 1 | // Created by cgo -godefs - DO NOT EDIT 2 | // cgo -godefs defs_openbsd.go 3 | 4 | package ipv4 5 | 6 | const ( 7 | sysIP_OPTIONS = 0x1 8 | sysIP_HDRINCL = 0x2 9 | sysIP_TOS = 0x3 10 | sysIP_TTL = 0x4 11 | sysIP_RECVOPTS = 0x5 12 | sysIP_RECVRETOPTS = 0x6 13 | sysIP_RECVDSTADDR = 0x7 14 | sysIP_RETOPTS = 0x8 15 | sysIP_RECVIF = 0x1e 16 | sysIP_RECVTTL = 0x1f 17 | 18 | sysIP_MULTICAST_IF = 0x9 19 | sysIP_MULTICAST_TTL = 0xa 20 | sysIP_MULTICAST_LOOP = 0xb 21 | sysIP_ADD_MEMBERSHIP = 0xc 22 | sysIP_DROP_MEMBERSHIP = 0xd 23 | 24 | sizeofIPMreq = 0x8 25 | ) 26 | 27 | type ipMreq struct { 28 | Multiaddr [4]byte /* in_addr */ 29 | Interface [4]byte /* in_addr */ 30 | } 31 | -------------------------------------------------------------------------------- /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 | // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows 6 | 7 | package ipv6 8 | 9 | import "golang.org/x/net/internal/socket" 10 | 11 | func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error { 12 | return errOpNoSupport 13 | } 14 | -------------------------------------------------------------------------------- /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 ( 8 | "syscall" 9 | 10 | "golang.org/x/net/internal/socket" 11 | ) 12 | 13 | func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error { 14 | // TODO(mikio): implement this 15 | return syscall.EWINDOWS 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv6/helper.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 | "errors" 9 | "net" 10 | ) 11 | 12 | var ( 13 | errInvalidConn = errors.New("invalid connection") 14 | errMissingAddress = errors.New("missing address") 15 | errHeaderTooShort = errors.New("header too short") 16 | errInvalidConnType = errors.New("invalid conn type") 17 | errOpNoSupport = errors.New("operation not supported") 18 | errNoSuchInterface = errors.New("no such interface") 19 | ) 20 | 21 | func boolint(b bool) int { 22 | if b { 23 | return 1 24 | } 25 | return 0 26 | } 27 | 28 | func netAddrToIP16(a net.Addr) net.IP { 29 | switch v := a.(type) { 30 | case *net.UDPAddr: 31 | if ip := v.IP.To16(); ip != nil && ip.To4() == nil { 32 | return ip 33 | } 34 | case *net.IPAddr: 35 | if ip := v.IP.To16(); ip != nil && ip.To4() == nil { 36 | return ip 37 | } 38 | } 39 | return nil 40 | } 41 | 42 | func opAddr(a net.Addr) net.Addr { 43 | switch a.(type) { 44 | case *net.TCPAddr: 45 | if a == nil { 46 | return nil 47 | } 48 | case *net.UDPAddr: 49 | if a == nil { 50 | return nil 51 | } 52 | case *net.IPAddr: 53 | if a == nil { 54 | return nil 55 | } 56 | } 57 | return a 58 | } 59 | -------------------------------------------------------------------------------- /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 | // +build darwin dragonfly freebsd netbsd openbsd 6 | 7 | package ipv6 8 | 9 | func (f *icmpv6Filter) accept(typ ICMPType) { 10 | f.Filt[typ>>5] |= 1 << (uint32(typ) & 31) 11 | } 12 | 13 | func (f *icmpv6Filter) block(typ ICMPType) { 14 | f.Filt[typ>>5] &^= 1 << (uint32(typ) & 31) 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/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 | // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows 6 | 7 | package ipv6 8 | 9 | type icmpv6Filter struct { 10 | } 11 | 12 | func (f *icmpv6Filter) accept(typ ICMPType) { 13 | } 14 | 15 | func (f *icmpv6Filter) block(typ ICMPType) { 16 | } 17 | 18 | func (f *icmpv6Filter) setAll(block bool) { 19 | } 20 | 21 | func (f *icmpv6Filter) willBlock(typ ICMPType) bool { 22 | return false 23 | } 24 | -------------------------------------------------------------------------------- /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/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/payload_cmsg.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 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package ipv6 8 | 9 | import "net" 10 | 11 | // ReadFrom reads a payload of the received IPv6 datagram, from the 12 | // endpoint c, copying the payload into b. It returns the number of 13 | // bytes copied into b, the control message cm and the source address 14 | // src of the received datagram. 15 | func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) { 16 | if !c.ok() { 17 | return 0, nil, nil, errInvalidConn 18 | } 19 | return c.readFrom(b) 20 | } 21 | 22 | // WriteTo writes a payload of the IPv6 datagram, to the destination 23 | // address dst through the endpoint c, copying the payload from b. It 24 | // returns the number of bytes written. The control message cm allows 25 | // the IPv6 header fields and the datagram path to be specified. The 26 | // cm may be nil if control of the outgoing datagram is not required. 27 | func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) { 28 | if !c.ok() { 29 | return 0, errInvalidConn 30 | } 31 | return c.writeTo(b, cm, dst) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/ipv6/sockopt_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 | // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows 6 | 7 | package ipv6 8 | 9 | import ( 10 | "net" 11 | 12 | "golang.org/x/net/bpf" 13 | "golang.org/x/net/internal/socket" 14 | ) 15 | 16 | func (so *sockOpt) getMulticastInterface(c *socket.Conn) (*net.Interface, error) { 17 | return nil, errOpNoSupport 18 | } 19 | 20 | func (so *sockOpt) setMulticastInterface(c *socket.Conn, ifi *net.Interface) error { 21 | return errOpNoSupport 22 | } 23 | 24 | func (so *sockOpt) getICMPFilter(c *socket.Conn) (*ICMPFilter, error) { 25 | return nil, errOpNoSupport 26 | } 27 | 28 | func (so *sockOpt) setICMPFilter(c *socket.Conn, f *ICMPFilter) error { 29 | return errOpNoSupport 30 | } 31 | 32 | func (so *sockOpt) getMTUInfo(c *socket.Conn) (*net.Interface, int, error) { 33 | return nil, 0, errOpNoSupport 34 | } 35 | 36 | func (so *sockOpt) setGroup(c *socket.Conn, ifi *net.Interface, grp net.IP) error { 37 | return errOpNoSupport 38 | } 39 | 40 | func (so *sockOpt) setSourceGroup(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error { 41 | return errOpNoSupport 42 | } 43 | 44 | func (so *sockOpt) setBPF(c *socket.Conn, f []bpf.RawInstruction) error { 45 | return errOpNoSupport 46 | } 47 | -------------------------------------------------------------------------------- /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 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris windows 6 | 7 | package ipv6 8 | 9 | import ( 10 | "net" 11 | "unsafe" 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 | var mreq ipv6Mreq 18 | copy(mreq.Multiaddr[:], grp) 19 | if ifi != nil { 20 | mreq.setIfindex(ifi.Index) 21 | } 22 | b := (*[sizeofIPv6Mreq]byte)(unsafe.Pointer(&mreq))[:sizeofIPv6Mreq] 23 | return so.Set(c, b) 24 | } 25 | -------------------------------------------------------------------------------- /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 | // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows 6 | 7 | package ipv6 8 | 9 | import ( 10 | "net" 11 | 12 | "golang.org/x/net/internal/socket" 13 | ) 14 | 15 | func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { 16 | return errOpNoSupport 17 | } 18 | -------------------------------------------------------------------------------- /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 | // +build linux 6 | 7 | package ipv6 8 | 9 | import ( 10 | "unsafe" 11 | 12 | "golang.org/x/net/bpf" 13 | "golang.org/x/net/internal/socket" 14 | ) 15 | 16 | func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error { 17 | prog := sockFProg{ 18 | Len: uint16(len(f)), 19 | Filter: (*sockFilter)(unsafe.Pointer(&f[0])), 20 | } 21 | b := (*[sizeofSockFprog]byte)(unsafe.Pointer(&prog))[:sizeofSockFprog] 22 | return so.Set(c, b) 23 | } 24 | -------------------------------------------------------------------------------- /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 | // +build !linux 6 | 7 | package ipv6 8 | 9 | import ( 10 | "golang.org/x/net/bpf" 11 | "golang.org/x/net/internal/socket" 12 | ) 13 | 14 | func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error { 15 | return errOpNoSupport 16 | } 17 | -------------------------------------------------------------------------------- /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 | // +build !darwin,!freebsd,!linux,!solaris 6 | 7 | package ipv6 8 | 9 | import ( 10 | "net" 11 | 12 | "golang.org/x/net/internal/socket" 13 | ) 14 | 15 | func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error { 16 | return errOpNoSupport 17 | } 18 | 19 | func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error { 20 | return errOpNoSupport 21 | } 22 | -------------------------------------------------------------------------------- /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 | // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows 6 | 7 | package ipv6 8 | 9 | var ( 10 | ctlOpts = [ctlMax]ctlOpt{} 11 | 12 | sockOpts = map[int]*sockOpt{} 13 | ) 14 | -------------------------------------------------------------------------------- /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/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /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 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | // +build go1.9 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | type Signal = syscall.Signal 13 | type Errno = syscall.Errno 14 | type SysProcAttr = syscall.SysProcAttr 15 | -------------------------------------------------------------------------------- /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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 11 | // 12 | 13 | TEXT ·syscall6(SB),NOSPLIT,$0-88 14 | JMP syscall·syscall6(SB) 15 | 16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSyscall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_386.s: -------------------------------------------------------------------------------- 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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, Darwin 11 | // 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_darwin_amd64.s: -------------------------------------------------------------------------------- 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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, Darwin 11 | // 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_darwin_arm.s: -------------------------------------------------------------------------------- 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 | // +build !gccgo 6 | // +build arm,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for ARM, Darwin 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-28 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm64.s: -------------------------------------------------------------------------------- 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 | // +build !gccgo 6 | // +build arm64,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for AMD64, Darwin 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 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s: -------------------------------------------------------------------------------- 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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, DragonFly 11 | // 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_freebsd_386.s: -------------------------------------------------------------------------------- 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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, FreeBSD 11 | // 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_freebsd_amd64.s: -------------------------------------------------------------------------------- 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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, FreeBSD 11 | // 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_freebsd_arm.s: -------------------------------------------------------------------------------- 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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, FreeBSD 11 | // 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_linux_arm.s: -------------------------------------------------------------------------------- 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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for arm, Linux 11 | // 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 ·SyscallNoError(SB),NOSPLIT,$0-24 23 | BL runtime·entersyscall(SB) 24 | MOVW trap+0(FP), R7 25 | MOVW a1+4(FP), R0 26 | MOVW a2+8(FP), R1 27 | MOVW a3+12(FP), R2 28 | MOVW $0, R3 29 | MOVW $0, R4 30 | MOVW $0, R5 31 | SWI $0 32 | MOVW R0, r1+16(FP) 33 | MOVW $0, R0 34 | MOVW R0, r2+20(FP) 35 | BL runtime·exitsyscall(SB) 36 | RET 37 | 38 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 39 | B syscall·RawSyscall(SB) 40 | 41 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 42 | B syscall·RawSyscall6(SB) 43 | 44 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24 45 | MOVW trap+0(FP), R7 // syscall entry 46 | MOVW a1+4(FP), R0 47 | MOVW a2+8(FP), R1 48 | MOVW a3+12(FP), R2 49 | SWI $0 50 | MOVW R0, r1+16(FP) 51 | MOVW $0, R0 52 | MOVW R0, r2+20(FP) 53 | RET 54 | 55 | TEXT ·seek(SB),NOSPLIT,$0-28 56 | B syscall·seek(SB) 57 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_arm64.s: -------------------------------------------------------------------------------- 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 | // +build linux 6 | // +build arm64 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | B syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | B syscall·Syscall6(SB) 19 | 20 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 21 | BL runtime·entersyscall(SB) 22 | MOVD a1+8(FP), R0 23 | MOVD a2+16(FP), R1 24 | MOVD a3+24(FP), R2 25 | MOVD $0, R3 26 | MOVD $0, R4 27 | MOVD $0, R5 28 | MOVD trap+0(FP), R8 // syscall entry 29 | SVC 30 | MOVD R0, r1+32(FP) // r1 31 | MOVD R1, r2+40(FP) // r2 32 | BL runtime·exitsyscall(SB) 33 | RET 34 | 35 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 36 | B syscall·RawSyscall(SB) 37 | 38 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 39 | B syscall·RawSyscall6(SB) 40 | 41 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 42 | MOVD a1+8(FP), R0 43 | MOVD a2+16(FP), R1 44 | MOVD a3+24(FP), R2 45 | MOVD $0, R3 46 | MOVD $0, R4 47 | MOVD $0, R5 48 | MOVD trap+0(FP), R8 // syscall entry 49 | SVC 50 | MOVD R0, r1+32(FP) 51 | MOVD R1, r2+40(FP) 52 | RET 53 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_mipsx.s: -------------------------------------------------------------------------------- 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 | // +build linux 6 | // +build mips mipsle 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for mips, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-28 19 | JMP syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 22 | JMP syscall·Syscall6(SB) 23 | 24 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 25 | JMP syscall·Syscall9(SB) 26 | 27 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24 28 | JAL runtime·entersyscall(SB) 29 | MOVW a1+4(FP), R4 30 | MOVW a2+8(FP), R5 31 | MOVW a3+12(FP), R6 32 | MOVW R0, R7 33 | MOVW trap+0(FP), R2 // syscall entry 34 | SYSCALL 35 | MOVW R2, r1+16(FP) // r1 36 | MOVW R3, r2+20(FP) // r2 37 | JAL runtime·exitsyscall(SB) 38 | RET 39 | 40 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 41 | JMP syscall·RawSyscall(SB) 42 | 43 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 44 | JMP syscall·RawSyscall6(SB) 45 | 46 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24 47 | MOVW a1+4(FP), R4 48 | MOVW a2+8(FP), R5 49 | MOVW a3+12(FP), R6 50 | MOVW trap+0(FP), R2 // syscall entry 51 | SYSCALL 52 | MOVW R2, r1+16(FP) 53 | MOVW R3, r2+20(FP) 54 | RET 55 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_ppc64x.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 | // +build linux 6 | // +build ppc64 ppc64le 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for ppc64, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 19 | BL runtime·entersyscall(SB) 20 | MOVD a1+8(FP), R3 21 | MOVD a2+16(FP), R4 22 | MOVD a3+24(FP), R5 23 | MOVD R0, R6 24 | MOVD R0, R7 25 | MOVD R0, R8 26 | MOVD trap+0(FP), R9 // syscall entry 27 | SYSCALL R9 28 | MOVD R3, r1+32(FP) 29 | MOVD R4, r2+40(FP) 30 | BL runtime·exitsyscall(SB) 31 | RET 32 | 33 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 34 | MOVD a1+8(FP), R3 35 | MOVD a2+16(FP), R4 36 | MOVD a3+24(FP), R5 37 | MOVD R0, R6 38 | MOVD R0, R7 39 | MOVD R0, R8 40 | MOVD trap+0(FP), R9 // syscall entry 41 | SYSCALL R9 42 | MOVD R3, r1+32(FP) 43 | MOVD R4, r2+40(FP) 44 | RET 45 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_s390x.s: -------------------------------------------------------------------------------- 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 | // +build s390x 6 | // +build linux 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for s390x, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | BR syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | BR syscall·Syscall6(SB) 23 | 24 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48 25 | BL runtime·entersyscall(SB) 26 | MOVD a1+8(FP), R2 27 | MOVD a2+16(FP), R3 28 | MOVD a3+24(FP), R4 29 | MOVD $0, R5 30 | MOVD $0, R6 31 | MOVD $0, R7 32 | MOVD trap+0(FP), R1 // syscall entry 33 | SYSCALL 34 | MOVD R2, r1+32(FP) 35 | MOVD R3, r2+40(FP) 36 | BL runtime·exitsyscall(SB) 37 | RET 38 | 39 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 40 | BR syscall·RawSyscall(SB) 41 | 42 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 43 | BR syscall·RawSyscall6(SB) 44 | 45 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48 46 | MOVD a1+8(FP), R2 47 | MOVD a2+16(FP), R3 48 | MOVD a3+24(FP), R4 49 | MOVD $0, R5 50 | MOVD $0, R6 51 | MOVD $0, R7 52 | MOVD trap+0(FP), R1 // syscall entry 53 | SYSCALL 54 | MOVD R2, r1+32(FP) 55 | MOVD R3, r2+40(FP) 56 | RET 57 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_386.s: -------------------------------------------------------------------------------- 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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, NetBSD 11 | // 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_netbsd_amd64.s: -------------------------------------------------------------------------------- 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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, NetBSD 11 | // 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_netbsd_arm.s: -------------------------------------------------------------------------------- 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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, NetBSD 11 | // 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_openbsd_386.s: -------------------------------------------------------------------------------- 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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, OpenBSD 11 | // 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_openbsd_amd64.s: -------------------------------------------------------------------------------- 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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, OpenBSD 11 | // 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_arm.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 !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, OpenBSD 11 | // 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_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 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /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 | ) 27 | 28 | // Socketoption Level 29 | const ( 30 | SOL_BLUETOOTH = 0x112 31 | SOL_HCI = 0x0 32 | SOL_L2CAP = 0x6 33 | SOL_RFCOMM = 0x12 34 | SOL_SCO = 0x11 35 | ) 36 | -------------------------------------------------------------------------------- /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 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /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 | // +build aix 6 | // +build 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 | // +build aix 6 | // +build 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/dirent.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 | // +build aix darwin dragonfly freebsd linux nacl netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // ParseDirent parses up to max directory entries in buf, 12 | // appending the names to names. It returns the number of 13 | // bytes consumed from buf, the number of entries added 14 | // to names, and the new names slice. 15 | func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { 16 | return syscall.ParseDirent(buf, max, names) 17 | } 18 | -------------------------------------------------------------------------------- /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 | // +build ppc64 s390x mips mips64 6 | 7 | package unix 8 | 9 | const isBigEndian = true 10 | -------------------------------------------------------------------------------- /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 | // +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le 6 | 7 | package unix 8 | 9 | const isBigEndian = false 10 | -------------------------------------------------------------------------------- /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 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | 29 | func Unsetenv(key string) error { 30 | return syscall.Unsetenv(key) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl.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 | // +build darwin dragonfly freebsd linux netbsd openbsd 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 12 | // systems by flock_linux_32bit.go to be SYS_FCNTL64. 13 | var fcntl64Syscall uintptr = SYS_FCNTL 14 | 15 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument. 16 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) { 17 | valptr, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(arg)) 18 | var err error 19 | if errno != 0 { 20 | err = errno 21 | } 22 | return int(valptr), err 23 | } 24 | 25 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 26 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 27 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 28 | if errno == 0 { 29 | return nil 30 | } 31 | return errno 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // +build linux,386 linux,arm linux,mips linux,mipsle 2 | 3 | // Copyright 2014 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_c.c: -------------------------------------------------------------------------------- 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 | // +build gccgo 6 | // +build !aix 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #define _STRINGIFY2_(x) #x 13 | #define _STRINGIFY_(x) _STRINGIFY2_(x) 14 | #define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__) 15 | 16 | // Call syscall from C code because the gccgo support for calling from 17 | // Go to C does not support varargs functions. 18 | 19 | struct ret { 20 | uintptr_t r; 21 | uintptr_t err; 22 | }; 23 | 24 | struct ret 25 | gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9) 26 | { 27 | struct ret r; 28 | 29 | errno = 0; 30 | r.r = syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9); 31 | r.err = errno; 32 | return r; 33 | } 34 | 35 | uintptr_t 36 | gccgoRealSyscallNoError(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9) 37 | { 38 | return syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9); 39 | } 40 | -------------------------------------------------------------------------------- /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 | // +build gccgo,linux,amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ioctl.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 aix darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | import "runtime" 10 | 11 | // IoctlSetWinsize performs an ioctl on fd with a *Winsize argument. 12 | // 13 | // To change fd's window size, the req argument should be TIOCSWINSZ. 14 | func IoctlSetWinsize(fd int, req uint, value *Winsize) error { 15 | // TODO: if we get the chance, remove the req parameter and 16 | // hardcode TIOCSWINSZ. 17 | err := ioctlSetWinsize(fd, req, value) 18 | runtime.KeepAlive(value) 19 | return err 20 | } 21 | 22 | // IoctlSetTermios performs an ioctl on fd with a *Termios. 23 | // 24 | // The req value will usually be TCSETA or TIOCSETA. 25 | func IoctlSetTermios(fd int, req uint, value *Termios) error { 26 | // TODO: if we get the chance, remove the req parameter. 27 | err := ioctlSetTermios(fd, req, value) 28 | runtime.KeepAlive(value) 29 | return err 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mksysnum_darwin.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | # 6 | # Generate system call table for Darwin from sys/syscall.h 7 | 8 | use strict; 9 | 10 | if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") { 11 | print STDERR "GOARCH or GOOS not defined in environment\n"; 12 | exit 1; 13 | } 14 | 15 | my $command = "mksysnum_darwin.pl " . join(' ', @ARGV); 16 | 17 | print <){ 29 | if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){ 30 | my $name = $1; 31 | my $num = $2; 32 | $name =~ y/a-z/A-Z/; 33 | print " SYS_$name = $num;" 34 | } 35 | } 36 | 37 | print <){ 30 | if(/^([0-9]+)\s+STD\s+({ \S+\s+(\w+).*)$/){ 31 | my $num = $1; 32 | my $proto = $2; 33 | my $name = "SYS_$3"; 34 | $name =~ y/a-z/A-Z/; 35 | 36 | # There are multiple entries for enosys and nosys, so comment them out. 37 | if($name =~ /^SYS_E?NOSYS$/){ 38 | $name = "// $name"; 39 | } 40 | if($name eq 'SYS_SYS_EXIT'){ 41 | $name = 'SYS_EXIT'; 42 | } 43 | 44 | print " $name = $num; // $proto\n"; 45 | } 46 | } 47 | 48 | print <){ 30 | if(/^([0-9]+)\s+\S+\s+(?:NO)?STD\s+({ \S+\s+(\w+).*)$/){ 31 | my $num = $1; 32 | my $proto = $2; 33 | my $name = "SYS_$3"; 34 | $name =~ y/a-z/A-Z/; 35 | 36 | # There are multiple entries for enosys and nosys, so comment them out. 37 | if($name =~ /^SYS_E?NOSYS$/){ 38 | $name = "// $name"; 39 | } 40 | if($name eq 'SYS_SYS_EXIT'){ 41 | $name = 'SYS_EXIT'; 42 | } 43 | 44 | print " $name = $num; // $proto\n"; 45 | } 46 | } 47 | 48 | print <){ 30 | if(/^([0-9]+)\s+STD\s+(NOLOCK\s+)?({ \S+\s+\*?(\w+).*)$/){ 31 | my $num = $1; 32 | my $proto = $3; 33 | my $name = $4; 34 | $name =~ y/a-z/A-Z/; 35 | 36 | # There are multiple entries for enosys and nosys, so comment them out. 37 | if($name =~ /^SYS_E?NOSYS$/){ 38 | $name = "// $name"; 39 | } 40 | if($name eq 'SYS_SYS_EXIT'){ 41 | $name = 'SYS_EXIT'; 42 | } 43 | 44 | print " $name = $num; // $proto\n"; 45 | } 46 | } 47 | 48 | print <= 10 { 20 | buf[i] = byte(val%10 + '0') 21 | i-- 22 | val /= 10 23 | } 24 | buf[i] = byte(val + '0') 25 | return string(buf[i:]) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_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 | // +build aix 6 | // +build ppc 7 | 8 | package unix 9 | 10 | //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64 11 | //sysnb Setrlimit(resource int, rlim *Rlimit) (err error) = setrlimit64 12 | //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64 13 | 14 | //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) 15 | 16 | func setTimespec(sec, nsec int64) Timespec { 17 | return Timespec{Sec: int32(sec), Nsec: int32(nsec)} 18 | } 19 | 20 | func setTimeval(sec, usec int64) Timeval { 21 | return Timeval{Sec: int32(sec), Usec: int32(usec)} 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 (cmsg *Cmsghdr) SetLen(length int) { 33 | cmsg.Len = uint32(length) 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_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 | // +build aix 6 | // +build ppc64 7 | 8 | package unix 9 | 10 | //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) 11 | //sysnb Setrlimit(resource int, rlim *Rlimit) (err error) 12 | //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek 13 | 14 | //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) = mmap64 15 | 16 | func setTimespec(sec, nsec int64) Timespec { 17 | return Timespec{Sec: sec, Nsec: nsec} 18 | } 19 | 20 | func setTimeval(sec, usec int64) Timeval { 21 | return Timeval{Sec: int64(sec), Usec: int32(usec)} 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 (cmsg *Cmsghdr) SetLen(length int) { 33 | cmsg.Len = uint32(length) 34 | } 35 | -------------------------------------------------------------------------------- /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 | // +build amd64,linux 6 | // +build !gccgo 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 | // +build linux,!gccgo 6 | 7 | package unix 8 | 9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail. 10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 11 | 12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't 13 | // fail. 14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 15 | -------------------------------------------------------------------------------- /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 | // +build linux,!gccgo,386 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // Underlying system call writes to newoffset via pointer. 12 | // Implemented in assembly to avoid allocation. 13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 14 | 15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 17 | -------------------------------------------------------------------------------- /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 | // +build linux,gccgo,386 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | 22 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 23 | fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 24 | return int(fd), err 25 | } 26 | 27 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) { 28 | fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0) 29 | return int(fd), err 30 | } 31 | -------------------------------------------------------------------------------- /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 | // +build linux,gccgo,arm 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 15 | var newoffset int64 16 | offsetLow := uint32(offset & 0xffffffff) 17 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 19 | return newoffset, err 20 | } 21 | -------------------------------------------------------------------------------- /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 | // +build 386,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /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 | // +build amd64,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /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 | // +build arm,netbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = uint32(mode) 20 | k.Flags = uint32(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_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 | // +build 386,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | 35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 36 | // of openbsd/386 the syscall is called sysctl instead of __sysctl. 37 | const SYS___SYSCTL = SYS_SYSCTL 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_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 | // +build amd64,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint64(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint64(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | 35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 36 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl. 37 | const SYS___SYSCTL = SYS_SYSCTL 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_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 | // +build arm,openbsd 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: int32(nsec)} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: int32(usec)} 15 | } 16 | 17 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 18 | k.Ident = uint32(fd) 19 | k.Filter = int16(mode) 20 | k.Flags = uint16(flags) 21 | } 22 | 23 | func (iov *Iovec) SetLen(length int) { 24 | iov.Len = uint32(length) 25 | } 26 | 27 | func (msghdr *Msghdr) SetControllen(length int) { 28 | msghdr.Controllen = uint32(length) 29 | } 30 | 31 | func (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | 35 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions 36 | // of openbsd/arm the syscall is called sysctl instead of __sysctl. 37 | const SYS___SYSCTL = SYS_SYSCTL 38 | -------------------------------------------------------------------------------- /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 | // +build amd64,solaris 6 | 7 | package unix 8 | 9 | func setTimespec(sec, nsec int64) Timespec { 10 | return Timespec{Sec: sec, Nsec: nsec} 11 | } 12 | 13 | func setTimeval(sec, usec int64) Timeval { 14 | return Timeval{Sec: sec, Usec: usec} 15 | } 16 | 17 | func (iov *Iovec) SetLen(length int) { 18 | iov.Len = uint64(length) 19 | } 20 | 21 | func (cmsg *Cmsghdr) SetLen(length int) { 22 | cmsg.Len = uint32(length) 23 | } 24 | -------------------------------------------------------------------------------- /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 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | // +build !gccgo,!ppc64le,!ppc64 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 13 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 14 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 15 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 16 | -------------------------------------------------------------------------------- /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 | // +build linux 6 | // +build ppc64le ppc64 7 | // +build !gccgo 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 14 | return syscall.Syscall(trap, a1, a2, a3) 15 | } 16 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 17 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6) 18 | } 19 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 20 | return syscall.RawSyscall(trap, a1, a2, a3) 21 | } 22 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 23 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zptracearm_linux.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtracePair(arm, arm64). DO NOT EDIT. 2 | 3 | // +build linux 4 | // +build arm arm64 5 | 6 | package unix 7 | 8 | import "unsafe" 9 | 10 | // PtraceRegsArm is the registers used by arm binaries. 11 | type PtraceRegsArm struct { 12 | Uregs [18]uint32 13 | } 14 | 15 | // PtraceGetRegsArm fetches the registers used by arm binaries. 16 | func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error { 17 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) 18 | } 19 | 20 | // PtraceSetRegsArm sets the registers used by arm binaries. 21 | func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error { 22 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) 23 | } 24 | 25 | // PtraceRegsArm64 is the registers used by arm64 binaries. 26 | type PtraceRegsArm64 struct { 27 | Regs [31]uint64 28 | Sp uint64 29 | Pc uint64 30 | Pstate uint64 31 | } 32 | 33 | // PtraceGetRegsArm64 fetches the registers used by arm64 binaries. 34 | func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error { 35 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) 36 | } 37 | 38 | // PtraceSetRegsArm64 sets the registers used by arm64 binaries. 39 | func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error { 40 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) 41 | } 42 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/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/text/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/text/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/collate/index.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 collate 6 | 7 | import "golang.org/x/text/internal/colltab" 8 | 9 | const blockSize = 64 10 | 11 | func getTable(t tableIndex) *colltab.Table { 12 | return &colltab.Table{ 13 | Index: colltab.Trie{ 14 | Index0: mainLookup[:][blockSize*t.lookupOffset:], 15 | Values0: mainValues[:][blockSize*t.valuesOffset:], 16 | Index: mainLookup[:], 17 | Values: mainValues[:], 18 | }, 19 | ExpandElem: mainExpandElem[:], 20 | ContractTries: colltab.ContractTrieSet(mainCTEntries[:]), 21 | ContractElem: mainContractElem[:], 22 | MaxContractLen: 18, 23 | VariableTop: varTop, 24 | } 25 | } 26 | 27 | // tableIndex holds information for constructing a table 28 | // for a certain locale based on the main table. 29 | type tableIndex struct { 30 | lookupOffset uint32 31 | valuesOffset uint32 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/internal/colltab/weighter.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 colltab // import "golang.org/x/text/internal/colltab" 6 | 7 | // A Weighter can be used as a source for Collator and Searcher. 8 | type Weighter interface { 9 | // Start finds the start of the segment that includes position p. 10 | Start(p int, b []byte) int 11 | 12 | // StartString finds the start of the segment that includes position p. 13 | StartString(p int, s string) int 14 | 15 | // AppendNext appends Elems to buf corresponding to the longest match 16 | // of a single character or contraction from the start of s. 17 | // It returns the new buf and the number of bytes consumed. 18 | AppendNext(buf []Elem, s []byte) (ce []Elem, n int) 19 | 20 | // AppendNextString appends Elems to buf corresponding to the longest match 21 | // of a single character or contraction from the start of s. 22 | // It returns the new buf and the number of bytes consumed. 23 | AppendNextString(buf []Elem, s string) (ce []Elem, n int) 24 | 25 | // Domain returns a slice of all single characters and contractions for which 26 | // collation elements are defined in this table. 27 | Domain() []string 28 | 29 | // Top returns the highest variable primary value. 30 | Top() uint32 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/Makefile: -------------------------------------------------------------------------------- 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 | CLEANFILES+=maketables 6 | 7 | maketables: maketables.go 8 | go build $^ 9 | 10 | tables: maketables 11 | ./maketables > tables.go 12 | gofmt -w -s tables.go 13 | 14 | # Build (but do not run) maketables during testing, 15 | # just to make sure it still compiles. 16 | testshort: maketables 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/common.go: -------------------------------------------------------------------------------- 1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 | 3 | package language 4 | 5 | // This file contains code common to the maketables.go and the package code. 6 | 7 | // langAliasType is the type of an alias in langAliasMap. 8 | type langAliasType int8 9 | 10 | const ( 11 | langDeprecated langAliasType = iota 12 | langMacro 13 | langLegacy 14 | 15 | langAliasTypeUnknown langAliasType = -1 16 | ) 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/gen_common.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 | // +build ignore 6 | 7 | package main 8 | 9 | // This file contains code common to the maketables.go and the package code. 10 | 11 | // langAliasType is the type of an alias in langAliasMap. 12 | type langAliasType int8 13 | 14 | const ( 15 | langDeprecated langAliasType = iota 16 | langMacro 17 | langLegacy 18 | 19 | langAliasTypeUnknown langAliasType = -1 20 | ) 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/go1_1.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 | // +build !go1.2 6 | 7 | package language 8 | 9 | import "sort" 10 | 11 | func sortStable(s sort.Interface) { 12 | ss := stableSort{ 13 | s: s, 14 | pos: make([]int, s.Len()), 15 | } 16 | for i := range ss.pos { 17 | ss.pos[i] = i 18 | } 19 | sort.Sort(&ss) 20 | } 21 | 22 | type stableSort struct { 23 | s sort.Interface 24 | pos []int 25 | } 26 | 27 | func (s *stableSort) Len() int { 28 | return len(s.pos) 29 | } 30 | 31 | func (s *stableSort) Less(i, j int) bool { 32 | return s.s.Less(i, j) || !s.s.Less(j, i) && s.pos[i] < s.pos[j] 33 | } 34 | 35 | func (s *stableSort) Swap(i, j int) { 36 | s.s.Swap(i, j) 37 | s.pos[i], s.pos[j] = s.pos[j], s.pos[i] 38 | } 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/go1_2.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 | // +build go1.2 6 | 7 | package language 8 | 9 | import "sort" 10 | 11 | var sortStable = sort.Stable 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.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 | // +build go1.10 6 | 7 | package bidirule 8 | 9 | func (t *Transformer) isFinal() bool { 10 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.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 | // +build !go1.10 6 | 7 | package bidirule 8 | 9 | func (t *Transformer) isFinal() bool { 10 | if !t.isRTL() { 11 | return true 12 | } 13 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial 14 | } 15 | --------------------------------------------------------------------------------