├── .gitignore ├── .mailmap ├── CODEOWNERS ├── Gopkg.lock ├── Gopkg.toml ├── Jenkinsfile ├── Makefile ├── README.md ├── a └── init.go ├── agent ├── agent.go ├── console │ ├── console.go │ └── types.go ├── container │ └── restoreState.go ├── discovery │ └── discovery.go ├── executer │ ├── executer.go │ └── types.go ├── monitor │ └── collect.go ├── util │ ├── cache.go │ ├── http.go │ ├── ssl.go │ └── util.go └── vars │ └── vars.go ├── cli ├── attach.go ├── batch.go ├── cdn.go ├── clone.go ├── common.go ├── config.go ├── destroy.go ├── encrypt.go ├── export.go ├── hostname.go ├── import.go ├── info.go ├── list.go ├── map.go ├── metrics.go ├── preconditions.go ├── quota.go ├── restart.go ├── restore.go ├── snapshot.go ├── start.go ├── stop.go ├── tunnel.go ├── update.go └── vxlan.go ├── config └── config.go ├── db ├── db2.go └── types.go ├── debian ├── changelog ├── compat ├── control ├── copyright ├── postinst ├── rules ├── source │ └── format ├── subutai-bootcheck.service ├── subutai-cop.service ├── subutai-cop.timer ├── subutai-forwarding.service ├── subutai-le.service ├── subutai-le.timer ├── subutai-rng.service ├── subutai-roaming.service ├── subutai.service └── tree │ ├── agent.conf │ ├── bash-completion │ └── subutai │ ├── libexec │ ├── check-karaf-boot │ ├── cop │ ├── renew-le-certs │ ├── restore-forwarding │ └── roaming │ ├── lxc-default-subutai │ ├── sbin │ └── subutai-init │ ├── ssh.pem │ └── subutai.conf ├── lib ├── common │ └── util.go ├── container │ └── lxc.go ├── exec │ └── command.go ├── fs │ ├── file.go │ ├── tgz.go │ └── zfs.go ├── gpg │ └── gpg.go ├── net │ └── net.go └── proxy │ └── proxy.go ├── log └── log.go ├── main.go └── vendor ├── github.com ├── alecthomas │ ├── template │ │ ├── LICENSE │ │ ├── README.md │ │ ├── doc.go │ │ ├── exec.go │ │ ├── funcs.go │ │ ├── helper.go │ │ ├── parse │ │ │ ├── lex.go │ │ │ ├── node.go │ │ │ └── parse.go │ │ └── template.go │ └── units │ │ ├── COPYING │ │ ├── README.md │ │ ├── bytes.go │ │ ├── doc.go │ │ ├── si.go │ │ └── util.go ├── asdine │ └── storm │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bucket.go │ │ ├── codec │ │ ├── codec.go │ │ └── json │ │ │ └── json.go │ │ ├── errors.go │ │ ├── extract.go │ │ ├── finder.go │ │ ├── index │ │ ├── errors.go │ │ ├── indexes.go │ │ ├── list.go │ │ ├── options.go │ │ └── unique.go │ │ ├── internal │ │ └── boltdb.go │ │ ├── kv.go │ │ ├── metadata.go │ │ ├── node.go │ │ ├── options.go │ │ ├── q │ │ ├── compare.go │ │ ├── fieldmatcher.go │ │ ├── regexp.go │ │ └── tree.go │ │ ├── query.go │ │ ├── scan.go │ │ ├── sink.go │ │ ├── sink_sorter_swap.go │ │ ├── sink_sorter_swap_go1.8.go │ │ ├── store.go │ │ ├── storm.go │ │ ├── transaction.go │ │ └── version.go ├── cavaliercoder │ └── grab │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── client.go │ │ ├── doc.go │ │ ├── error.go │ │ ├── grab.go │ │ ├── rate_limiter.go │ │ ├── request.go │ │ ├── response.go │ │ ├── states.wsd │ │ ├── transfer.go │ │ └── util.go ├── fromkeith │ └── gossdp │ │ ├── README.md │ │ ├── broadcast_unix.go │ │ ├── broadcast_windows.go │ │ ├── client.go │ │ └── ssdp.go ├── influxdata │ └── influxdb │ │ ├── LICENSE │ │ ├── LICENSE_OF_DEPENDENCIES.md │ │ ├── client │ │ └── v2 │ │ │ ├── client.go │ │ │ └── udp.go │ │ ├── models │ │ ├── consistency.go │ │ ├── inline_fnv.go │ │ ├── inline_strconv_parse.go │ │ ├── points.go │ │ ├── rows.go │ │ ├── statistic.go │ │ ├── time.go │ │ └── uint_support.go │ │ └── pkg │ │ └── escape │ │ ├── bytes.go │ │ └── strings.go ├── jhoonb │ └── archivex │ │ ├── LICENSE │ │ ├── README.md │ │ └── archivex.go ├── konsorten │ └── go-windows-terminal-sequences │ │ ├── LICENSE │ │ ├── README.md │ │ ├── go.mod │ │ └── sequences.go ├── mattn │ └── go-runewidth │ │ ├── LICENSE │ │ ├── README.mkd │ │ ├── runewidth.go │ │ ├── runewidth_js.go │ │ ├── runewidth_posix.go │ │ └── runewidth_windows.go ├── nightlyone │ └── lockfile │ │ ├── LICENSE │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── lockfile.go │ │ ├── lockfile_unix.go │ │ └── lockfile_windows.go ├── pkg │ └── errors │ │ ├── LICENSE │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── errors.go │ │ └── stack.go ├── sirupsen │ └── logrus │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── alt_exit.go │ │ ├── appveyor.yml │ │ ├── doc.go │ │ ├── entry.go │ │ ├── exported.go │ │ ├── formatter.go │ │ ├── go.mod │ │ ├── go.sum │ │ ├── hooks.go │ │ ├── hooks │ │ └── syslog │ │ │ ├── README.md │ │ │ └── syslog.go │ │ ├── json_formatter.go │ │ ├── logger.go │ │ ├── logrus.go │ │ ├── terminal_check_appengine.go │ │ ├── terminal_check_js.go │ │ ├── terminal_check_notappengine.go │ │ ├── terminal_check_windows.go │ │ ├── terminal_notwindows.go │ │ ├── terminal_windows.go │ │ ├── text_formatter.go │ │ └── writer.go └── wunderlist │ └── ttlcache │ ├── LICENSE │ ├── Readme.md │ ├── cache.go │ └── item.go ├── go.etcd.io └── bbolt │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── appveyor.yml │ ├── bolt_386.go │ ├── bolt_amd64.go │ ├── bolt_arm.go │ ├── bolt_arm64.go │ ├── bolt_linux.go │ ├── bolt_openbsd.go │ ├── bolt_ppc.go │ ├── bolt_ppc64.go │ ├── bolt_ppc64le.go │ ├── bolt_s390x.go │ ├── bolt_unix.go │ ├── bolt_unix_solaris.go │ ├── bolt_windows.go │ ├── boltsync_unix.go │ ├── bucket.go │ ├── cursor.go │ ├── db.go │ ├── doc.go │ ├── errors.go │ ├── freelist.go │ ├── node.go │ ├── page.go │ └── tx.go ├── golang.org └── x │ ├── crypto │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ └── ssh │ │ └── terminal │ │ ├── terminal.go │ │ ├── util.go │ │ ├── util_bsd.go │ │ ├── util_linux.go │ │ ├── util_plan9.go │ │ ├── util_solaris.go │ │ └── util_windows.go │ ├── net │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── bpf │ │ ├── asm.go │ │ ├── constants.go │ │ ├── doc.go │ │ ├── instructions.go │ │ ├── setter.go │ │ ├── vm.go │ │ └── vm_instructions.go │ ├── internal │ │ ├── iana │ │ │ ├── const.go │ │ │ └── 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 │ │ │ ├── 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_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 │ └── sys │ ├── AUTHORS │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── unix │ ├── 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 │ ├── mkerrors.sh │ ├── mkpost.go │ ├── mksyscall.pl │ ├── 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_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 │ ├── 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.go │ ├── zsyscall_darwin_amd64.go │ ├── zsyscall_darwin_arm.go │ ├── zsyscall_darwin_arm64.go │ ├── 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 │ └── windows │ ├── aliases.go │ ├── asm_windows_386.s │ ├── asm_windows_amd64.s │ ├── asm_windows_arm.s │ ├── dll_windows.go │ ├── env_windows.go │ ├── eventlog.go │ ├── exec_windows.go │ ├── memory_windows.go │ ├── mksyscall.go │ ├── race.go │ ├── race0.go │ ├── security_windows.go │ ├── service.go │ ├── str.go │ ├── syscall.go │ ├── syscall_windows.go │ ├── types_windows.go │ ├── types_windows_386.go │ ├── types_windows_amd64.go │ ├── types_windows_arm.go │ └── zsyscall_windows.go └── gopkg.in ├── alecthomas └── kingpin.v2 │ ├── COPYING │ ├── README.md │ ├── actions.go │ ├── app.go │ ├── args.go │ ├── cmd.go │ ├── completions.go │ ├── doc.go │ ├── envar.go │ ├── flags.go │ ├── global.go │ ├── guesswidth.go │ ├── guesswidth_unix.go │ ├── model.go │ ├── parser.go │ ├── parsers.go │ ├── templates.go │ ├── usage.go │ ├── values.go │ ├── values.json │ └── values_generated.go ├── cheggaaa └── pb.v1 │ ├── LICENSE │ ├── README.md │ ├── format.go │ ├── pb.go │ ├── pb_appengine.go │ ├── pb_win.go │ ├── pb_x.go │ ├── pool.go │ ├── pool_win.go │ ├── pool_x.go │ ├── reader.go │ ├── runecount.go │ ├── termios_bsd.go │ └── termios_sysv.go ├── gcfg.v1 ├── LICENSE ├── README ├── doc.go ├── errors.go ├── read.go ├── scanner │ ├── errors.go │ └── scanner.go ├── set.go ├── token │ ├── position.go │ ├── serialize.go │ └── token.go └── types │ ├── bool.go │ ├── doc.go │ ├── enum.go │ ├── int.go │ └── scan.go ├── lxc └── go-lxc.v2 │ ├── AUTHORS │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── cgo_1.12.go │ ├── container.go │ ├── doc.go │ ├── error.go │ ├── linking_dynamic.go │ ├── linking_static.go │ ├── lxc-binding.c │ ├── lxc-binding.go │ ├── lxc-binding.h │ ├── options.go │ ├── type.go │ └── util.go └── warnings.v0 ├── LICENSE ├── README └── warnings.go /CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @dilshat 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### Subutai Agent 2 | 3 | [![Build Status](https://jenkins.subutai.io/buildStatus/icon?job=agent.subutai-io.pipeline/dev)](https://jenkins.subutai.io/job/agent.subutai-io.pipeline/job/dev/)[![GoDoc](https://godoc.org/github.com/subutai-io/agent?status.svg)](https://godoc.org/github.com/subutai-io/agent) 4 | 5 | Subutai Agent is a daemon written in Golang whose main task is to receive commands from the Subutai Social management server and execute them on Resource Hosts. 6 | 7 | Behind such a seemingly simple task are complex procedures like bidirectional ssl communication, gpg message encryption, different health and security checks, etc. 8 | 9 | Please visit https://subutai.io for more information 10 | -------------------------------------------------------------------------------- /a/init.go: -------------------------------------------------------------------------------- 1 | package a 2 | 3 | import ( 4 | "os" 5 | "github.com/subutai-io/agent/log" 6 | ) 7 | 8 | func init(){ 9 | if os.Getuid() != 0 { 10 | log.Error("Please run as root") 11 | } 12 | } -------------------------------------------------------------------------------- /agent/container/restoreState.go: -------------------------------------------------------------------------------- 1 | package container 2 | 3 | import ( 4 | "time" 5 | 6 | "github.com/subutai-io/agent/db" 7 | "github.com/subutai-io/agent/lib/container" 8 | "github.com/subutai-io/agent/log" 9 | ) 10 | 11 | func StateRestore() { 12 | for { 13 | doRestore() 14 | time.Sleep(time.Second * 30) 15 | } 16 | } 17 | 18 | func doRestore() { 19 | active := getContainersSupposedToBeRunning() 20 | 21 | for _, v := range active { 22 | if container.State(v.Name) != container.Running { 23 | log.Debug("Starting container " + v.Name) 24 | 25 | startErr := container.Start(v.Name) 26 | 27 | if startErr != nil { 28 | log.Warn("Failed to start container " + v.Name + ": " + startErr.Error()) 29 | } 30 | } 31 | } 32 | } 33 | 34 | func getContainersSupposedToBeRunning() []db.Container { 35 | list, err := db.FindContainers("", container.Running, "") 36 | 37 | if !log.Check(log.WarnLevel, "Getting list of running containers", err) { 38 | return list 39 | } 40 | 41 | return []db.Container{} 42 | } 43 | -------------------------------------------------------------------------------- /agent/util/cache.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "github.com/wunderlist/ttlcache" 5 | "time" 6 | ) 7 | 8 | type Calculate func() string 9 | 10 | func GetCache(ttl time.Duration) *ttlcache.Cache { 11 | return ttlcache.NewCache(ttl) 12 | } 13 | 14 | func GetFromCacheOrCalculate(cache *ttlcache.Cache, cacheKey string, calc Calculate) string { 15 | value, exists := cache.Get(cacheKey) 16 | 17 | if exists { 18 | return value 19 | } else { 20 | value = calc() 21 | if value != "" { 22 | cache.Set(cacheKey, value) 23 | } 24 | return value 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /agent/vars/vars.go: -------------------------------------------------------------------------------- 1 | package vars 2 | 3 | var ( 4 | IsDaemon bool 5 | 6 | Version string 7 | ) 8 | 9 | const DAEMON_PORT = "7070" 10 | -------------------------------------------------------------------------------- /cli/common.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import ( 4 | "github.com/subutai-io/agent/agent/console" 5 | "github.com/subutai-io/agent/agent/vars" 6 | "net/http" 7 | "github.com/subutai-io/agent/log" 8 | ) 9 | 10 | var ( 11 | consol console.Console 12 | ) 13 | 14 | func init() { 15 | consol = console.GetConsole() 16 | } 17 | 18 | func sendHeartbeat() { 19 | if consol.IsRegistered() { 20 | //trigger heartbeat via REST to agent 21 | resp, err := http.Get("http://localhost:" + vars.DAEMON_PORT + "/heartbeat") 22 | if !log.Check(log.WarnLevel, "Triggering heartbeat", err) { 23 | consol.Close(resp) 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /cli/preconditions.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import ( 4 | "fmt" 5 | "github.com/subutai-io/agent/log" 6 | "reflect" 7 | ) 8 | 9 | func checkArgument(condition bool, errMsg string, vals ...interface{}) { 10 | checkState(condition, errMsg, vals...) 11 | } 12 | 13 | func checkNotNil(object interface{}, errMsg string, vals ...interface{}) { 14 | checkState(!IsZeroOfUnderlyingType(object), errMsg, vals...) 15 | } 16 | 17 | func checkState(condition bool, errMsg string, vals ...interface{}) { 18 | checkCondition(condition, func() { 19 | log.Error(fmt.Sprintf(errMsg, vals...)) 20 | }) 21 | } 22 | 23 | func checkCondition(condition bool, fallback func()) { 24 | if !condition { 25 | fallback() 26 | } 27 | } 28 | 29 | func IsZeroOfUnderlyingType(x interface{}) bool { 30 | return x == nil || reflect.DeepEqual(x, reflect.Zero(reflect.TypeOf(x)).Interface()) 31 | } 32 | -------------------------------------------------------------------------------- /cli/restart.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import ( 4 | "github.com/subutai-io/agent/lib/container" 5 | "github.com/subutai-io/agent/log" 6 | ) 7 | 8 | func LxcRestart(names ...string) { 9 | needHeartBeat := false 10 | defer func() { 11 | if needHeartBeat { 12 | sendHeartbeat() 13 | } 14 | }() 15 | 16 | for _, name := range names { 17 | if container.LxcInstanceExists(name) { 18 | err := container.Restart(name) 19 | 20 | if err != nil { 21 | if len(names) > 0 { 22 | log.Warn(name + " restart failed") 23 | } else { 24 | log.Error(name + " restart failed") 25 | } 26 | } else { 27 | needHeartBeat = true 28 | log.Info(name + " restarted") 29 | } 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /cli/start.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import ( 4 | "time" 5 | 6 | "github.com/subutai-io/agent/lib/container" 7 | "github.com/subutai-io/agent/log" 8 | ) 9 | 10 | // LxcStart starts a Subutai container and checks if container state changed to "running" or "starting". 11 | // If state is not changing for 60 seconds, then the "start" operation is considered to have failed. 12 | func LxcStart(names ...string) { 13 | needHeartBeat := false 14 | defer func() { 15 | if needHeartBeat { 16 | sendHeartbeat() 17 | } 18 | }() 19 | 20 | for _, name := range names { 21 | if container.LxcInstanceExists(name) && container.State(name) == container.Stopped { 22 | startErr := container.Start(name) 23 | for i := 0; i < 60 && startErr != nil; i++ { 24 | log.Info("Waiting for container start (60 sec)") 25 | startErr = container.Start(name) 26 | time.Sleep(time.Second) 27 | } 28 | if startErr != nil { 29 | if len(names) > 0 { 30 | log.Warn(name + " start failed") 31 | } else { 32 | log.Error(name + " start failed") 33 | } 34 | } else { 35 | needHeartBeat = true 36 | log.Info(name + " started") 37 | } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /cli/stop.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import ( 4 | "github.com/subutai-io/agent/lib/container" 5 | "github.com/subutai-io/agent/log" 6 | ) 7 | 8 | // LxcStop stops a Subutai container with an additional state check. 9 | func LxcStop(names ...string) { 10 | needHeartBeat := false 11 | defer func() { 12 | if needHeartBeat { 13 | sendHeartbeat() 14 | } 15 | }() 16 | 17 | for _, name := range names { 18 | if container.LxcInstanceExists(name) && container.State(name) == container.Running { 19 | defer sendHeartbeat() 20 | stopErr := container.Stop(name) 21 | for i := 0; i < 60 && stopErr != nil; i++ { 22 | log.Info("Waiting for container stop (60 sec)") 23 | stopErr = container.Stop(name) 24 | } 25 | if stopErr != nil { 26 | if len(names) > 0 { 27 | log.Warn(name + " stop failed") 28 | } else { 29 | log.Error(name + " stop failed") 30 | } 31 | } else { 32 | needHeartBeat = true 33 | log.Info(name + " stopped") 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | subutai-agent (6.4.12+201804260+nosnap-0) unstable; urgency=medium 2 | 3 | * New version 4 | 5 | -- Aron Xu Tue, 24 Apr 2018 14:37:41 +0800 6 | 7 | subutai-agent (6.4.12+20180420+nosnap-0) unstable; urgency=medium 8 | 9 | * Initial release. 10 | 11 | -- Aron Xu Sat, 31 Mar 2018 17:03:46 +0800 12 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 10 2 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: subutai-agent 2 | Section: utils 3 | Priority: optional 4 | Maintainer: Lars Boegild Thomsen 5 | Build-Depends: debhelper (>= 10), 6 | dh-golang, 7 | golang-any 8 | Standards-Version: 4.1.3 9 | Homepage: http://github.com/subutai-io/agent 10 | XS-Go-Import-Path: github.com/subutai-io/agent 11 | 12 | Package: subutai 13 | Architecture: any 14 | Depends: gnupg1 | gnupg (<< 2.0.0~), 15 | lxc (>= 3.0.0), 16 | nsexec, 17 | rng-tools, 18 | subutai-nginx, 19 | subutai-ovs, 20 | subutai-p2p, 21 | zfsutils-linux, 22 | certbot, 23 | ${misc:Depends}, 24 | ${shlibs:Depends} 25 | Conflicts: uidmap 26 | Description: subutai agent 27 | project allows to turn a host into subutai peer and is used together with subutai console 28 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Upstream-Name: subutai 3 | Source: https://github.com/subutai-io/agent 4 | 5 | Files: * 6 | Copyright: 2018 OptDyn Coporation 7 | License: GPL-3 8 | 9 | License: GPL-3 10 | This program is free software; you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation; either version 3 of the License. 13 | . 14 | This program is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | . 19 | You should have received a copy of the GNU General Public License 20 | along with this program; if not, write to the 21 | Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, 22 | MA 02110-1301, USA. 23 | . 24 | On Debian systems, the full text of GPL-3 could be found at 25 | `/usr/share/common-licenses/GPL-3'. 26 | -------------------------------------------------------------------------------- /debian/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #DEBHELPER# 4 | 5 | LASTVERSION=8.1.2~ 6 | case "$1" in 7 | install|upgrade) 8 | if dpkg --compare-versions "$2" le "$LASTVERSION"; then 9 | #sed -i '/Kurjun/d;/AppDataPrefix/d;s/SSLPort.*/SSLPort = 443/;s/cdn.subutai.io/bazaar.subutai.io/' /etc/subutai/agent.conf 10 | cp /usr/lib/subutai/etc/agent.conf /etc/subutai/ 11 | fi 12 | esac 13 | 14 | if systemctl is-active --quiet ipfs.service; then 15 | export IPFS_PATH=/var/lib/ipfs/node 16 | ipfs bootstrap add /dnsaddr/eu1.s.optdyn.com/ipfs/QmUZFuJ31ctYGxYFDtKzDBXmpmiBQWZGyqQChL7RwQNitV 17 | ipfs bootstrap add /dnsaddr/us1.s.optdyn.com/ipfs/QmdL6K8gqGT2BRUEGtcnRGTCyGVV5H7QiYqPLzvgMcLpxo 18 | fi 19 | 20 | # Create empty profile for apparmor 21 | touch /etc/apparmor.d/lxc/lxc-default-subutai 22 | 23 | # Restart apparmor 24 | systemctl restart apparmor 25 | 26 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /debian/subutai-bootcheck.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Subutai Karaf Boot Check Service 3 | After=subutai.service 4 | 5 | [Service] 6 | Type=simple 7 | ExecStart=/usr/lib/subutai/libexec/check-karaf-boot 8 | OnFailure=subutai-cop.service 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | -------------------------------------------------------------------------------- /debian/subutai-cop.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Subutai Service Healthcheck 3 | After=subutai.service 4 | After=subutai-p2p.service 5 | 6 | [Service] 7 | Type=oneshot 8 | ExecStart=/usr/lib/subutai/libexec/cop 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | -------------------------------------------------------------------------------- /debian/subutai-cop.timer: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Subutai Service Healthcheck 3 | 4 | [Timer] 5 | OnUnitActiveSec=1h 6 | RandomizedDelaySec=120 7 | Unit=subutai-cop.service 8 | 9 | [Install] 10 | WantedBy=multi-user.target 11 | -------------------------------------------------------------------------------- /debian/subutai-forwarding.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Subutai Port Forward Service 3 | Requires=subutai-ovs.service 4 | 5 | [Service] 6 | Type=simple 7 | ExecStart=/usr/lib/subutai/libexec/restore-forwarding 8 | OnFailure=subutai-cop.service 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | -------------------------------------------------------------------------------- /debian/subutai-le.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=LetsEncrypt certificates updater service 3 | 4 | [Service] 5 | Type=oneshot 6 | ExecStart=/usr/lib/subutai/libexec/renew-le-certs 7 | 8 | [Install] 9 | WantedBy=multi-user.target 10 | -------------------------------------------------------------------------------- /debian/subutai-le.timer: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=LetsEncrypt certificates updater timer 3 | 4 | [Timer] 5 | OnBootSec=1h 6 | OnUnitActiveSec=1d 7 | 8 | [Install] 9 | WantedBy=timers.target 10 | -------------------------------------------------------------------------------- /debian/subutai-rng.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Subutai RNG Startup 3 | After=rng-tools.service 4 | 5 | [Service] 6 | Type=forking 7 | ExecStart=/bin/bash -c "/bin/systemctl is-active --quiet rng-tools.service || /usr/sbin/rngd -r /dev/urandom" 8 | Restart=always 9 | OnFailure=subutai-cop.service 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | Alias=subutai-rng.service 14 | -------------------------------------------------------------------------------- /debian/subutai-roaming.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Subutai Roaming Service 3 | Requires=subutai-ovs.service 4 | 5 | [Service] 6 | Type=simple 7 | ExecStart=/usr/lib/subutai/libexec/roaming 8 | OnFailure=subutai-cop.service 9 | 10 | [Install] 11 | WantedBy=multi-user.target 12 | -------------------------------------------------------------------------------- /debian/subutai.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Subutai Daemon 3 | 4 | [Service] 5 | Type=simple 6 | ExecStart=/usr/bin/subutai daemon 7 | KillMode=process 8 | Restart=always 9 | OnFailure=subutai-cop.service 10 | 11 | [Install] 12 | WantedBy=multi-user.target 13 | Alias=subutai-agent.service 14 | -------------------------------------------------------------------------------- /debian/tree/agent.conf: -------------------------------------------------------------------------------- 1 | [Agent] 2 | Debug = true 3 | GpgUser = 4 | GpgPassword = 12345678 5 | GpgHome = 6 | DataPrefix = /var/lib/subutai/ 7 | LxcPrefix = /var/lib/lxc/ 8 | Dataset = subutai/fs 9 | CacheDir = /var/cache/subutai 10 | SshJumpServer = @sshJumpServer@ 11 | LeStaging=@leStaging@ 12 | 13 | [Management] 14 | Host = 15 | Port = 8443 16 | Secret = secret 17 | GpgUser = 18 | RestPublicKey = /rest/v1/security/keyman/getpublickeyring 19 | Fingerprint = 20 | AllowInsecure = true 21 | 22 | [Influxdb] 23 | Db = metrics 24 | User = root 25 | Pass = root 26 | 27 | [CDN] 28 | URL = @cdnHost@ 29 | SslPort = 443 30 | IpfsPath = /var/lib/ipfs/node 31 | TemplateDownloadUrl = https://ipfs.subutai.io/ipfs/{ID} 32 | AllowInsecure = false 33 | -------------------------------------------------------------------------------- /debian/tree/bash-completion/subutai: -------------------------------------------------------------------------------- 1 | _subutai() 2 | { 3 | local cur prev opts 4 | COMPREPLY=() 5 | cur="${COMP_WORDS[COMP_CWORD]}" 6 | prev="${COMP_WORDS[COMP_CWORD-1]}" 7 | opts="attach batch cleanup clone config daemon destroy export help hostname import info list map metrics proxy quota start stop tunnel update vxlan" 8 | case "${prev}" in 9 | import) 10 | COMPREPLY=( $(compgen -W "debian-stretch management ubuntu-xenial" -- ${cur}) ) 11 | return 0 12 | ;; 13 | clone | export) 14 | COMPREPLY=( $(compgen -W "$(subutai list t | tail -n +3)" -- ${cur}) ) 15 | return 0 16 | ;; 17 | start | stop | attach) 18 | COMPREPLY=( $(compgen -W "$(subutai list c | tail -n +3)" -- ${cur}) ) 19 | return 0 20 | ;; 21 | destroy) 22 | COMPREPLY=( $(compgen -W "$(subutai list a | tail -n +3)" -- ${cur}) ) 23 | return 0 24 | ;; 25 | *) 26 | ;; 27 | esac 28 | 29 | COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) 30 | } 31 | complete -F _subutai subutai 32 | -------------------------------------------------------------------------------- /debian/tree/libexec/check-karaf-boot: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # this script checks if Karaf has booted properly 4 | # in rare cases some of OSGi modules might fail to load properly causing all dependent modules to fail 5 | # this script restarts Karaf in such cases to attempt to fix problems caused by improper boot 6 | 7 | function checkNReboot(){ 8 | 9 | # make sure that management container is present and running 10 | subutai ls i -n management | grep RUNNING > /dev/null 11 | 12 | if [ $? -eq 0 ]; then 13 | 14 | # check status of Karaf boot 15 | statusCode=$(curl -so /dev/null -k -w "%{http_code}" https://localhost:8443/rest/health/ready) 16 | 17 | # http code 500 means that Karaf booting failed 18 | if [ "$statusCode" == 500 ]; then 19 | 20 | # restart management service 21 | subutai attach management "service management restart" 22 | fi 23 | fi 24 | } 25 | 26 | 27 | while true; do 28 | 29 | checkNReboot; 30 | 31 | sleep 300 32 | 33 | done 34 | -------------------------------------------------------------------------------- /debian/tree/libexec/renew-le-certs: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #this script renews letsencrypt certificates 4 | 5 | certbot renew --config-dir /var/lib/subutai/letsencrypt --email hostmaster@subutai.io --agree-tos 6 | 7 | systemctl reload subutai-nginx -------------------------------------------------------------------------------- /debian/tree/lxc-default-subutai: -------------------------------------------------------------------------------- 1 | # Do not load this file. Rather, load /etc/apparmor.d/lxc-containers, which 2 | # will source all profiles under /etc/apparmor.d/lxc 3 | 4 | profile lxc-container-default-subutai flags=(attach_disconnected,mediate_deleted) { 5 | #include 6 | #include 7 | deny mount fstype=devpts, 8 | mount fstype=cgroup -> /sys/fs/cgroup/**, 9 | mount fstype=cgroup2 -> /sys/fs/cgroup/**, 10 | mount options=(rw,bind), 11 | mount options=(rw,rbind), 12 | mount options=(rw,rshared), 13 | mount options=(ro,nosuid,noexec,remount,bind,strictatime), 14 | } 15 | -------------------------------------------------------------------------------- /debian/tree/subutai.conf: -------------------------------------------------------------------------------- 1 | # This derives from the global common config 2 | lxc.include = /usr/share/lxc/config/common.conf 3 | 4 | # Doesn't support consoles in /dev/lxc/ 5 | lxc.tty.dir = 6 | 7 | # When using LXC with apparmor, the container will be confined by default. 8 | # If you wish for it to instead run unconfined, copy the following line 9 | # (uncommented) to the container's configuration file. 10 | #lxc.apparmor.profile = unconfined 11 | lxc.apparmor.profile = lxc-container-default-subutai 12 | 13 | # If you wish to allow mounting block filesystems, then use the following 14 | # line instead, and make sure to grant access to the block device and/or loop 15 | # devices below in lxc.cgroup.devices.allow. 16 | #lxc.apparmor.profile = lxc-container-default-with-mounting 17 | lxc.mount.entry = /dev/fuse dev/fuse none bind,create=file 18 | 19 | # Extra cgroup device access 20 | ## rtc 21 | lxc.cgroup.devices.allow = c 254:0 rm 22 | ## tun 23 | lxc.cgroup.devices.allow = c 10:200 rwm 24 | ## hpet 25 | lxc.cgroup.devices.allow = c 10:228 rwm 26 | ## kvm 27 | lxc.cgroup.devices.allow = c 10:232 rwm 28 | ## To use loop devices, copy the following line to the container's 29 | ## configuration file (uncommented). 30 | #lxc.cgroup.devices.allow = b 7:* rwm 31 | -------------------------------------------------------------------------------- /vendor/github.com/alecthomas/template/README.md: -------------------------------------------------------------------------------- 1 | # Go's `text/template` package with newline elision 2 | 3 | This is a fork of Go 1.4's [text/template](http://golang.org/pkg/text/template/) package with one addition: a backslash immediately after a closing delimiter will delete all subsequent newlines until a non-newline. 4 | 5 | eg. 6 | 7 | ``` 8 | {{if true}}\ 9 | hello 10 | {{end}}\ 11 | ``` 12 | 13 | Will result in: 14 | 15 | ``` 16 | hello\n 17 | ``` 18 | 19 | Rather than: 20 | 21 | ``` 22 | \n 23 | hello\n 24 | \n 25 | ``` 26 | -------------------------------------------------------------------------------- /vendor/github.com/alecthomas/units/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (C) 2014 Alec Thomas 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | 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 THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/github.com/alecthomas/units/README.md: -------------------------------------------------------------------------------- 1 | # Units - Helpful unit multipliers and functions for Go 2 | 3 | The goal of this package is to have functionality similar to the [time](http://golang.org/pkg/time/) package. 4 | 5 | It allows for code like this: 6 | 7 | ```go 8 | n, err := ParseBase2Bytes("1KB") 9 | // n == 1024 10 | n = units.Mebibyte * 512 11 | ``` 12 | -------------------------------------------------------------------------------- /vendor/github.com/alecthomas/units/doc.go: -------------------------------------------------------------------------------- 1 | // Package units provides helpful unit multipliers and functions for Go. 2 | // 3 | // The goal of this package is to have functionality similar to the time [1] package. 4 | // 5 | // 6 | // [1] http://golang.org/pkg/time/ 7 | // 8 | // It allows for code like this: 9 | // 10 | // n, err := ParseBase2Bytes("1KB") 11 | // // n == 1024 12 | // n = units.Mebibyte * 512 13 | package units 14 | -------------------------------------------------------------------------------- /vendor/github.com/alecthomas/units/si.go: -------------------------------------------------------------------------------- 1 | package units 2 | 3 | // SI units. 4 | type SI int64 5 | 6 | // SI unit multiples. 7 | const ( 8 | Kilo SI = 1000 9 | Mega = Kilo * 1000 10 | Giga = Mega * 1000 11 | Tera = Giga * 1000 12 | Peta = Tera * 1000 13 | Exa = Peta * 1000 14 | ) 15 | 16 | func MakeUnitMap(suffix, shortSuffix string, scale int64) map[string]float64 { 17 | return map[string]float64{ 18 | shortSuffix: 1, 19 | "K" + suffix: float64(scale), 20 | "M" + suffix: float64(scale * scale), 21 | "G" + suffix: float64(scale * scale * scale), 22 | "T" + suffix: float64(scale * scale * scale * scale), 23 | "P" + suffix: float64(scale * scale * scale * scale * scale), 24 | "E" + suffix: float64(scale * scale * scale * scale * scale * scale), 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/asdine/storm/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) [2017] [Asdine El Hrychy] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/asdine/storm/codec/codec.go: -------------------------------------------------------------------------------- 1 | // Package codec contains sub-packages with different codecs that can be used 2 | // to encode and decode entities in Storm. 3 | package codec 4 | 5 | // MarshalUnmarshaler represents a codec used to marshal and unmarshal entities. 6 | type MarshalUnmarshaler interface { 7 | Marshal(v interface{}) ([]byte, error) 8 | Unmarshal(b []byte, v interface{}) error 9 | // name of this codec 10 | Name() string 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/asdine/storm/codec/json/json.go: -------------------------------------------------------------------------------- 1 | // Package json contains a codec to encode and decode entities in JSON format 2 | package json 3 | 4 | import ( 5 | "encoding/json" 6 | ) 7 | 8 | const name = "json" 9 | 10 | // Codec that encodes to and decodes from JSON. 11 | var Codec = new(jsonCodec) 12 | 13 | type jsonCodec int 14 | 15 | func (j jsonCodec) Marshal(v interface{}) ([]byte, error) { 16 | return json.Marshal(v) 17 | } 18 | 19 | func (j jsonCodec) Unmarshal(b []byte, v interface{}) error { 20 | return json.Unmarshal(b, v) 21 | } 22 | 23 | func (j jsonCodec) Name() string { 24 | return name 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/asdine/storm/index/errors.go: -------------------------------------------------------------------------------- 1 | package index 2 | 3 | import "errors" 4 | 5 | var ( 6 | // ErrNotFound is returned when the specified record is not saved in the bucket. 7 | ErrNotFound = errors.New("not found") 8 | 9 | // ErrAlreadyExists is returned uses when trying to set an existing value on a field that has a unique index. 10 | ErrAlreadyExists = errors.New("already exists") 11 | 12 | // ErrNilParam is returned when the specified param is expected to be not nil. 13 | ErrNilParam = errors.New("param must not be nil") 14 | ) 15 | -------------------------------------------------------------------------------- /vendor/github.com/asdine/storm/index/indexes.go: -------------------------------------------------------------------------------- 1 | // Package index contains Index engines used to store values and their corresponding IDs 2 | package index 3 | 4 | // Index interface 5 | type Index interface { 6 | Add(value []byte, targetID []byte) error 7 | Remove(value []byte) error 8 | RemoveID(id []byte) error 9 | Get(value []byte) []byte 10 | All(value []byte, opts *Options) ([][]byte, error) 11 | AllRecords(opts *Options) ([][]byte, error) 12 | Range(min []byte, max []byte, opts *Options) ([][]byte, error) 13 | Prefix(prefix []byte, opts *Options) ([][]byte, error) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/asdine/storm/index/options.go: -------------------------------------------------------------------------------- 1 | package index 2 | 3 | // NewOptions creates initialized Options 4 | func NewOptions() *Options { 5 | return &Options{ 6 | Limit: -1, 7 | } 8 | } 9 | 10 | // Options are used to customize queries 11 | type Options struct { 12 | Limit int 13 | Skip int 14 | Reverse bool 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/asdine/storm/sink_sorter_swap.go: -------------------------------------------------------------------------------- 1 | // +build !go1.8 2 | 3 | package storm 4 | 5 | import "reflect" 6 | 7 | func (s *sorter) Swap(i, j int) { 8 | // skip if we encountered an earlier error 9 | select { 10 | case <-s.done: 11 | return 12 | default: 13 | } 14 | 15 | if ssink, ok := s.sink.(sliceSink); ok { 16 | x, y := ssink.slice().Index(i).Interface(), ssink.slice().Index(j).Interface() 17 | ssink.slice().Index(i).Set(reflect.ValueOf(y)) 18 | ssink.slice().Index(j).Set(reflect.ValueOf(x)) 19 | } else { 20 | s.list[i], s.list[j] = s.list[j], s.list[i] 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/asdine/storm/sink_sorter_swap_go1.8.go: -------------------------------------------------------------------------------- 1 | // +build go1.8 2 | 3 | package storm 4 | 5 | import "reflect" 6 | 7 | func (s *sorter) Swap(i, j int) { 8 | // skip if we encountered an earlier error 9 | select { 10 | case <-s.done: 11 | return 12 | default: 13 | } 14 | 15 | if ssink, ok := s.sink.(sliceSink); ok { 16 | reflect.Swapper(ssink.slice().Interface())(i, j) 17 | } else { 18 | s.list[i], s.list[j] = s.list[j], s.list[i] 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/asdine/storm/transaction.go: -------------------------------------------------------------------------------- 1 | package storm 2 | 3 | import bolt "go.etcd.io/bbolt" 4 | 5 | // Tx is a transaction. 6 | type Tx interface { 7 | // Commit writes all changes to disk. 8 | Commit() error 9 | 10 | // Rollback closes the transaction and ignores all previous updates. 11 | Rollback() error 12 | } 13 | 14 | // Begin starts a new transaction. 15 | func (n node) Begin(writable bool) (Node, error) { 16 | var err error 17 | 18 | n.tx, err = n.s.Bolt.Begin(writable) 19 | if err != nil { 20 | return nil, err 21 | } 22 | 23 | return &n, nil 24 | } 25 | 26 | // Rollback closes the transaction and ignores all previous updates. 27 | func (n *node) Rollback() error { 28 | if n.tx == nil { 29 | return ErrNotInTransaction 30 | } 31 | 32 | err := n.tx.Rollback() 33 | if err == bolt.ErrTxClosed { 34 | return ErrNotInTransaction 35 | } 36 | 37 | return err 38 | } 39 | 40 | // Commit writes all changes to disk. 41 | func (n *node) Commit() error { 42 | if n.tx == nil { 43 | return ErrNotInTransaction 44 | } 45 | 46 | err := n.tx.Commit() 47 | if err == bolt.ErrTxClosed { 48 | return ErrNotInTransaction 49 | } 50 | 51 | return err 52 | } 53 | -------------------------------------------------------------------------------- /vendor/github.com/asdine/storm/version.go: -------------------------------------------------------------------------------- 1 | package storm 2 | 3 | // Version of Storm 4 | const Version = "2.0.0" 5 | -------------------------------------------------------------------------------- /vendor/github.com/cavaliercoder/grab/Makefile: -------------------------------------------------------------------------------- 1 | GO = go 2 | GOGET = $(GO) get -u 3 | 4 | all: check lint 5 | 6 | check: 7 | cd cmd/grab && $(MAKE) -B all 8 | $(GO) test -cover -race ./... 9 | 10 | install: 11 | $(GO) install -v ./... 12 | 13 | clean: 14 | $(GO) clean -x ./... 15 | rm -rvf ./.test* 16 | 17 | lint: 18 | gofmt -l -e -s . || : 19 | go vet . || : 20 | golint . || : 21 | gocyclo -over 15 . || : 22 | misspell ./* || : 23 | 24 | deps: 25 | $(GOGET) github.com/golang/lint/golint 26 | $(GOGET) github.com/fzipp/gocyclo 27 | $(GOGET) github.com/client9/misspell/cmd/misspell 28 | 29 | .PHONY: all check install clean lint deps 30 | -------------------------------------------------------------------------------- /vendor/github.com/cavaliercoder/grab/rate_limiter.go: -------------------------------------------------------------------------------- 1 | package grab 2 | 3 | import "context" 4 | 5 | // RateLimiter is an interface that must be satisfied by any third-party rate 6 | // limiters that may be used to limit download transfer speeds. 7 | // 8 | // A recommended token bucket implementation can be found at 9 | // https://godoc.org/golang.org/x/time/rate#Limiter. 10 | type RateLimiter interface { 11 | WaitN(ctx context.Context, n int) (err error) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013-2016 Errplane Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/models/inline_fnv.go: -------------------------------------------------------------------------------- 1 | package models // import "github.com/influxdata/influxdb/models" 2 | 3 | // from stdlib hash/fnv/fnv.go 4 | const ( 5 | prime64 = 1099511628211 6 | offset64 = 14695981039346656037 7 | ) 8 | 9 | // InlineFNV64a is an alloc-free port of the standard library's fnv64a. 10 | // See https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function. 11 | type InlineFNV64a uint64 12 | 13 | // NewInlineFNV64a returns a new instance of InlineFNV64a. 14 | func NewInlineFNV64a() InlineFNV64a { 15 | return offset64 16 | } 17 | 18 | // Write adds data to the running hash. 19 | func (s *InlineFNV64a) Write(data []byte) (int, error) { 20 | hash := uint64(*s) 21 | for _, c := range data { 22 | hash ^= uint64(c) 23 | hash *= prime64 24 | } 25 | *s = InlineFNV64a(hash) 26 | return len(data), nil 27 | } 28 | 29 | // Sum64 returns the uint64 of the current resulting hash. 30 | func (s *InlineFNV64a) Sum64() uint64 { 31 | return uint64(*s) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/models/uint_support.go: -------------------------------------------------------------------------------- 1 | // +build uint uint64 2 | 3 | package models 4 | 5 | func init() { 6 | EnableUintSupport() 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/influxdata/influxdb/pkg/escape/strings.go: -------------------------------------------------------------------------------- 1 | package escape 2 | 3 | import "strings" 4 | 5 | var ( 6 | escaper = strings.NewReplacer(`,`, `\,`, `"`, `\"`, ` `, `\ `, `=`, `\=`) 7 | unescaper = strings.NewReplacer(`\,`, `,`, `\"`, `"`, `\ `, ` `, `\=`, `=`) 8 | ) 9 | 10 | // UnescapeString returns unescaped version of in. 11 | func UnescapeString(in string) string { 12 | if strings.IndexByte(in, '\\') == -1 { 13 | return in 14 | } 15 | return unescaper.Replace(in) 16 | } 17 | 18 | // String returns the escaped version of in. 19 | func String(in string) string { 20 | return escaper.Replace(in) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/jhoonb/archivex/README.md: -------------------------------------------------------------------------------- 1 | archivex 2 | ======== 3 | 4 | archivex is a golang package that archives folders (recursively) and files to zip and tar formats. 5 | 6 | Originally written by Jhonathan Paulo Banczek here: https://github.com/jhoonb/archivex 7 | 8 | Note: The code is heavily modified, so the original interface is no longer compatible. 9 | -------------------------------------------------------------------------------- /vendor/github.com/konsorten/go-windows-terminal-sequences/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2017 marvin + konsorten GmbH (open-source@konsorten.de) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /vendor/github.com/konsorten/go-windows-terminal-sequences/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/konsorten/go-windows-terminal-sequences 2 | -------------------------------------------------------------------------------- /vendor/github.com/konsorten/go-windows-terminal-sequences/sequences.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package sequences 4 | 5 | import ( 6 | "syscall" 7 | "unsafe" 8 | ) 9 | 10 | var ( 11 | kernel32Dll *syscall.LazyDLL = syscall.NewLazyDLL("Kernel32.dll") 12 | setConsoleMode *syscall.LazyProc = kernel32Dll.NewProc("SetConsoleMode") 13 | ) 14 | 15 | func EnableVirtualTerminalProcessing(stream syscall.Handle, enable bool) error { 16 | const ENABLE_VIRTUAL_TERMINAL_PROCESSING uint32 = 0x4 17 | 18 | var mode uint32 19 | err := syscall.GetConsoleMode(syscall.Stdout, &mode) 20 | if err != nil { 21 | return err 22 | } 23 | 24 | if enable { 25 | mode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING 26 | } else { 27 | mode &^= ENABLE_VIRTUAL_TERMINAL_PROCESSING 28 | } 29 | 30 | ret, _, err := setConsoleMode.Call(uintptr(unsafe.Pointer(stream)), uintptr(mode)) 31 | if ret == 0 { 32 | return err 33 | } 34 | 35 | return nil 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Yasuhiro Matsumoto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/README.mkd: -------------------------------------------------------------------------------- 1 | go-runewidth 2 | ============ 3 | 4 | [![Build Status](https://travis-ci.org/mattn/go-runewidth.png?branch=master)](https://travis-ci.org/mattn/go-runewidth) 5 | [![Coverage Status](https://coveralls.io/repos/mattn/go-runewidth/badge.png?branch=HEAD)](https://coveralls.io/r/mattn/go-runewidth?branch=HEAD) 6 | [![GoDoc](https://godoc.org/github.com/mattn/go-runewidth?status.svg)](http://godoc.org/github.com/mattn/go-runewidth) 7 | [![Go Report Card](https://goreportcard.com/badge/github.com/mattn/go-runewidth)](https://goreportcard.com/report/github.com/mattn/go-runewidth) 8 | 9 | Provides functions to get fixed width of the character or string. 10 | 11 | Usage 12 | ----- 13 | 14 | ```go 15 | runewidth.StringWidth("つのだ☆HIRO") == 12 16 | ``` 17 | 18 | 19 | Author 20 | ------ 21 | 22 | Yasuhiro Matsumoto 23 | 24 | License 25 | ------- 26 | 27 | under the MIT License: http://mattn.mit-license.org/2013 28 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/runewidth_js.go: -------------------------------------------------------------------------------- 1 | // +build js 2 | 3 | package runewidth 4 | 5 | func IsEastAsian() bool { 6 | // TODO: Implement this for the web. Detect east asian in a compatible way, and return true. 7 | return false 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-runewidth/runewidth_windows.go: -------------------------------------------------------------------------------- 1 | package runewidth 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | var ( 8 | kernel32 = syscall.NewLazyDLL("kernel32") 9 | procGetConsoleOutputCP = kernel32.NewProc("GetConsoleOutputCP") 10 | ) 11 | 12 | // IsEastAsian return true if the current locale is CJK 13 | func IsEastAsian() bool { 14 | r1, _, _ := procGetConsoleOutputCP.Call() 15 | if r1 == 0 { 16 | return false 17 | } 18 | 19 | switch int(r1) { 20 | case 932, 51932, 936, 949, 950: 21 | return true 22 | } 23 | 24 | return false 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/nightlyone/lockfile/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Ingo Oeser 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/nightlyone/lockfile/appveyor.yml: -------------------------------------------------------------------------------- 1 | clone_folder: c:\gopath\src\github.com\nightlyone\lockfile 2 | 3 | environment: 4 | GOPATH: c:\gopath 5 | 6 | install: 7 | - go version 8 | - go env 9 | - go get -v -t ./... 10 | 11 | build_script: 12 | - go test -v ./... 13 | -------------------------------------------------------------------------------- /vendor/github.com/nightlyone/lockfile/lockfile_unix.go: -------------------------------------------------------------------------------- 1 | // +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris aix 2 | 3 | package lockfile 4 | 5 | import ( 6 | "os" 7 | "syscall" 8 | ) 9 | 10 | func isRunning(pid int) (bool, error) { 11 | proc, err := os.FindProcess(pid) 12 | if err != nil { 13 | return false, err 14 | } 15 | 16 | if err := proc.Signal(syscall.Signal(0)); err != nil { 17 | return false, nil 18 | } 19 | return true, nil 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/nightlyone/lockfile/lockfile_windows.go: -------------------------------------------------------------------------------- 1 | package lockfile 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | //For some reason these consts don't exist in syscall. 8 | const ( 9 | error_invalid_parameter = 87 10 | code_still_active = 259 11 | ) 12 | 13 | func isRunning(pid int) (bool, error) { 14 | procHnd, err := syscall.OpenProcess(syscall.PROCESS_QUERY_INFORMATION, true, uint32(pid)) 15 | if err != nil { 16 | if scerr, ok := err.(syscall.Errno); ok { 17 | if uintptr(scerr) == error_invalid_parameter { 18 | return false, nil 19 | } 20 | } 21 | } 22 | 23 | var code uint32 24 | err = syscall.GetExitCodeProcess(procHnd, &code) 25 | if err != nil { 26 | return false, err 27 | } 28 | 29 | return code == code_still_active, nil 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: build-{build}.{branch} 2 | 3 | clone_folder: C:\gopath\src\github.com\pkg\errors 4 | shallow_clone: true # for startup speed 5 | 6 | environment: 7 | GOPATH: C:\gopath 8 | 9 | platform: 10 | - x64 11 | 12 | # http://www.appveyor.com/docs/installed-software 13 | install: 14 | # some helpful output for debugging builds 15 | - go version 16 | - go env 17 | # pre-installed MinGW at C:\MinGW is 32bit only 18 | # but MSYS2 at C:\msys64 has mingw64 19 | - set PATH=C:\msys64\mingw64\bin;%PATH% 20 | - gcc --version 21 | - g++ --version 22 | 23 | build_script: 24 | - go install -v ./... 25 | 26 | test_script: 27 | - set PATH=C:\gopath\bin;%PATH% 28 | - go test -v ./... 29 | 30 | #artifacts: 31 | # - path: '%GOPATH%\bin\*.exe' 32 | deploy: off 33 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Simon Eskildsen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | platform: x64 3 | clone_folder: c:\gopath\src\github.com\sirupsen\logrus 4 | environment: 5 | GOPATH: c:\gopath 6 | branches: 7 | only: 8 | - master 9 | install: 10 | - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% 11 | - go version 12 | build_script: 13 | - go get -t 14 | - go test 15 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package logrus is a structured logger for Go, completely API compatible with the standard library logger. 3 | 4 | 5 | The simplest way to use Logrus is simply the package-level exported logger: 6 | 7 | package main 8 | 9 | import ( 10 | log "github.com/sirupsen/logrus" 11 | ) 12 | 13 | func main() { 14 | log.WithFields(log.Fields{ 15 | "animal": "walrus", 16 | "number": 1, 17 | "size": 10, 18 | }).Info("A walrus appears") 19 | } 20 | 21 | Output: 22 | time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 23 | 24 | For a full guide visit https://github.com/sirupsen/logrus 25 | */ 26 | package logrus 27 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/sirupsen/logrus 2 | 3 | require ( 4 | github.com/davecgh/go-spew v1.1.1 // indirect 5 | github.com/konsorten/go-windows-terminal-sequences v1.0.1 6 | github.com/pmezard/go-difflib v1.0.0 // indirect 7 | github.com/stretchr/objx v0.1.1 // indirect 8 | github.com/stretchr/testify v1.2.2 9 | golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 10 | golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/hooks/syslog/README.md: -------------------------------------------------------------------------------- 1 | # Syslog Hooks for Logrus :walrus: 2 | 3 | ## Usage 4 | 5 | ```go 6 | import ( 7 | "log/syslog" 8 | "github.com/sirupsen/logrus" 9 | lSyslog "github.com/sirupsen/logrus/hooks/syslog" 10 | ) 11 | 12 | func main() { 13 | log := logrus.New() 14 | hook, err := lSyslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") 15 | 16 | if err == nil { 17 | log.Hooks.Add(hook) 18 | } 19 | } 20 | ``` 21 | 22 | If you want to connect to local syslog (Ex. "/dev/log" or "/var/run/syslog" or "/var/run/log"). Just assign empty string to the first two parameters of `NewSyslogHook`. It should look like the following. 23 | 24 | ```go 25 | import ( 26 | "log/syslog" 27 | "github.com/sirupsen/logrus" 28 | lSyslog "github.com/sirupsen/logrus/hooks/syslog" 29 | ) 30 | 31 | func main() { 32 | log := logrus.New() 33 | hook, err := lSyslog.NewSyslogHook("", "", syslog.LOG_INFO, "") 34 | 35 | if err == nil { 36 | log.Hooks.Add(hook) 37 | } 38 | } 39 | ``` 40 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return true 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_js.go: -------------------------------------------------------------------------------- 1 | // +build js 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | ) 8 | 9 | func checkIfTerminal(w io.Writer) bool { 10 | return false 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,!windows 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | 9 | "golang.org/x/crypto/ssh/terminal" 10 | ) 11 | 12 | func checkIfTerminal(w io.Writer) bool { 13 | switch v := w.(type) { 14 | case *os.File: 15 | return terminal.IsTerminal(int(v.Fd())) 16 | default: 17 | return false 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_check_windows.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,windows 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | "syscall" 9 | ) 10 | 11 | func checkIfTerminal(w io.Writer) bool { 12 | switch v := w.(type) { 13 | case *os.File: 14 | var mode uint32 15 | err := syscall.GetConsoleMode(syscall.Handle(v.Fd()), &mode) 16 | return err == nil 17 | default: 18 | return false 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_notwindows.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package logrus 4 | 5 | import "io" 6 | 7 | func initTerminal(w io.Writer) { 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/sirupsen/logrus/terminal_windows.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,!js,windows 2 | 3 | package logrus 4 | 5 | import ( 6 | "io" 7 | "os" 8 | "syscall" 9 | 10 | sequences "github.com/konsorten/go-windows-terminal-sequences" 11 | ) 12 | 13 | func initTerminal(w io.Writer) { 14 | switch v := w.(type) { 15 | case *os.File: 16 | sequences.EnableVirtualTerminalProcessing(syscall.Handle(v.Fd()), true) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/wunderlist/ttlcache/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Microsoft GmbH 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/wunderlist/ttlcache/Readme.md: -------------------------------------------------------------------------------- 1 | ## TTLCache - an in-memory LRU cache with expiration 2 | 3 | TTLCache is a minimal wrapper over a string map in golang, entries of which are 4 | 5 | 1. Thread-safe 6 | 2. Auto-Expiring after a certain time 7 | 3. Auto-Extending expiration on `Get`s 8 | 9 | [![Build Status](https://travis-ci.org/wunderlist/ttlcache.svg)](https://travis-ci.org/wunderlist/ttlcache) 10 | 11 | #### Usage 12 | ```go 13 | import ( 14 | "time" 15 | "github.com/wunderlist/ttlcache" 16 | ) 17 | 18 | func main () { 19 | cache := ttlcache.NewCache(time.Second) 20 | cache.Set("key", "value") 21 | value, exists := cache.Get("key") 22 | count := cache.Count() 23 | } 24 | ``` -------------------------------------------------------------------------------- /vendor/github.com/wunderlist/ttlcache/item.go: -------------------------------------------------------------------------------- 1 | package ttlcache 2 | 3 | import ( 4 | "sync" 5 | "time" 6 | ) 7 | 8 | // Item represents a record in the cache map 9 | type Item struct { 10 | sync.RWMutex 11 | data string 12 | expires *time.Time 13 | } 14 | 15 | func (item *Item) touch(duration time.Duration) { 16 | item.Lock() 17 | expiration := time.Now().Add(duration) 18 | item.expires = &expiration 19 | item.Unlock() 20 | } 21 | 22 | func (item *Item) expired() bool { 23 | var value bool 24 | item.RLock() 25 | if item.expires == nil { 26 | value = true 27 | } else { 28 | value = item.expires.Before(time.Now()) 29 | } 30 | item.RUnlock() 31 | return value 32 | } 33 | -------------------------------------------------------------------------------- /vendor/go.etcd.io/bbolt/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Ben Johnson 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /vendor/go.etcd.io/bbolt/Makefile: -------------------------------------------------------------------------------- 1 | BRANCH=`git rev-parse --abbrev-ref HEAD` 2 | COMMIT=`git rev-parse --short HEAD` 3 | GOLDFLAGS="-X main.branch $(BRANCH) -X main.commit $(COMMIT)" 4 | 5 | default: build 6 | 7 | race: 8 | @go test -v -race -test.run="TestSimulate_(100op|1000op)" 9 | 10 | # go get github.com/kisielk/errcheck 11 | errcheck: 12 | @errcheck -ignorepkg=bytes -ignore=os:Remove github.com/boltdb/bolt 13 | 14 | test: 15 | @go test -v -cover . 16 | @go test -v ./cmd/bolt 17 | 18 | .PHONY: fmt test 19 | -------------------------------------------------------------------------------- /vendor/go.etcd.io/bbolt/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | 3 | os: Windows Server 2012 R2 4 | 5 | clone_folder: c:\gopath\src\github.com\boltdb\bolt 6 | 7 | environment: 8 | GOPATH: c:\gopath 9 | 10 | install: 11 | - echo %PATH% 12 | - echo %GOPATH% 13 | - go version 14 | - go env 15 | - go get -v -t ./... 16 | 17 | build_script: 18 | - go test -v ./... 19 | -------------------------------------------------------------------------------- /vendor/go.etcd.io/bbolt/bolt_386.go: -------------------------------------------------------------------------------- 1 | package bolt 2 | 3 | // maxMapSize represents the largest mmap size supported by Bolt. 4 | const maxMapSize = 0x7FFFFFFF // 2GB 5 | 6 | // maxAllocSize is the size used when creating array pointers. 7 | const maxAllocSize = 0xFFFFFFF 8 | -------------------------------------------------------------------------------- /vendor/go.etcd.io/bbolt/bolt_amd64.go: -------------------------------------------------------------------------------- 1 | package bolt 2 | 3 | // maxMapSize represents the largest mmap size supported by Bolt. 4 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB 5 | 6 | // maxAllocSize is the size used when creating array pointers. 7 | const maxAllocSize = 0x7FFFFFFF 8 | -------------------------------------------------------------------------------- /vendor/go.etcd.io/bbolt/bolt_arm.go: -------------------------------------------------------------------------------- 1 | package bolt 2 | 3 | // maxMapSize represents the largest mmap size supported by Bolt. 4 | const maxMapSize = 0x7FFFFFFF // 2GB 5 | 6 | // maxAllocSize is the size used when creating array pointers. 7 | const maxAllocSize = 0xFFFFFFF 8 | -------------------------------------------------------------------------------- /vendor/go.etcd.io/bbolt/bolt_arm64.go: -------------------------------------------------------------------------------- 1 | // +build arm64 2 | 3 | package bolt 4 | 5 | // maxMapSize represents the largest mmap size supported by Bolt. 6 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB 7 | 8 | // maxAllocSize is the size used when creating array pointers. 9 | const maxAllocSize = 0x7FFFFFFF 10 | -------------------------------------------------------------------------------- /vendor/go.etcd.io/bbolt/bolt_linux.go: -------------------------------------------------------------------------------- 1 | package bolt 2 | 3 | import ( 4 | "syscall" 5 | ) 6 | 7 | // fdatasync flushes written data to a file descriptor. 8 | func fdatasync(db *DB) error { 9 | return syscall.Fdatasync(int(db.file.Fd())) 10 | } 11 | -------------------------------------------------------------------------------- /vendor/go.etcd.io/bbolt/bolt_openbsd.go: -------------------------------------------------------------------------------- 1 | package bolt 2 | 3 | import ( 4 | "syscall" 5 | "unsafe" 6 | ) 7 | 8 | const ( 9 | msAsync = 1 << iota // perform asynchronous writes 10 | msSync // perform synchronous writes 11 | msInvalidate // invalidate cached data 12 | ) 13 | 14 | func msync(db *DB) error { 15 | _, _, errno := syscall.Syscall(syscall.SYS_MSYNC, uintptr(unsafe.Pointer(db.data)), uintptr(db.datasz), msInvalidate) 16 | if errno != 0 { 17 | return errno 18 | } 19 | return nil 20 | } 21 | 22 | func fdatasync(db *DB) error { 23 | if db.data != nil { 24 | return msync(db) 25 | } 26 | return db.file.Sync() 27 | } 28 | -------------------------------------------------------------------------------- /vendor/go.etcd.io/bbolt/bolt_ppc.go: -------------------------------------------------------------------------------- 1 | // +build ppc 2 | 3 | package bolt 4 | 5 | // maxMapSize represents the largest mmap size supported by Bolt. 6 | const maxMapSize = 0x7FFFFFFF // 2GB 7 | 8 | // maxAllocSize is the size used when creating array pointers. 9 | const maxAllocSize = 0xFFFFFFF 10 | -------------------------------------------------------------------------------- /vendor/go.etcd.io/bbolt/bolt_ppc64.go: -------------------------------------------------------------------------------- 1 | // +build ppc64 2 | 3 | package bolt 4 | 5 | // maxMapSize represents the largest mmap size supported by Bolt. 6 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB 7 | 8 | // maxAllocSize is the size used when creating array pointers. 9 | const maxAllocSize = 0x7FFFFFFF 10 | -------------------------------------------------------------------------------- /vendor/go.etcd.io/bbolt/bolt_ppc64le.go: -------------------------------------------------------------------------------- 1 | // +build ppc64le 2 | 3 | package bolt 4 | 5 | // maxMapSize represents the largest mmap size supported by Bolt. 6 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB 7 | 8 | // maxAllocSize is the size used when creating array pointers. 9 | const maxAllocSize = 0x7FFFFFFF 10 | -------------------------------------------------------------------------------- /vendor/go.etcd.io/bbolt/bolt_s390x.go: -------------------------------------------------------------------------------- 1 | // +build s390x 2 | 3 | package bolt 4 | 5 | // maxMapSize represents the largest mmap size supported by Bolt. 6 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB 7 | 8 | // maxAllocSize is the size used when creating array pointers. 9 | const maxAllocSize = 0x7FFFFFFF 10 | -------------------------------------------------------------------------------- /vendor/go.etcd.io/bbolt/boltsync_unix.go: -------------------------------------------------------------------------------- 1 | // +build !windows,!plan9,!linux,!openbsd 2 | 3 | package bolt 4 | 5 | // fdatasync flushes written data to a file descriptor. 6 | func fdatasync(db *DB) error { 7 | return db.file.Sync() 8 | } 9 | -------------------------------------------------------------------------------- /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/ssh/terminal/util_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 terminal 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const ioctlReadTermios = unix.TIOCGETA 12 | const ioctlWriteTermios = unix.TIOCSETA 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/ssh/terminal/util_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 terminal 6 | 7 | import "golang.org/x/sys/unix" 8 | 9 | const ioctlReadTermios = unix.TCGETS 10 | const ioctlWriteTermios = unix.TCSETS 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/bpf/setter.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package bpf 6 | 7 | // A Setter is a type which can attach a compiled BPF filter to itself. 8 | type Setter interface { 9 | SetBPF(filter []RawInstruction) error 10 | } 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/internal/socket/cmsghdr.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +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_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/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 "unsafe" 10 | 11 | func probeProtocolStack() int { 12 | var p uintptr 13 | return int(unsafe.Sizeof(p)) 14 | } 15 | -------------------------------------------------------------------------------- /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_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/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_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_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_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_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_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/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/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/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_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_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 <= 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 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/windows/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | // +build go1.9 7 | 8 | package windows 9 | 10 | import "syscall" 11 | 12 | type Errno = syscall.Errno 13 | type SysProcAttr = syscall.SysProcAttr 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/asm_windows_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 | // 6 | // System calls for 386, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-16 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-12 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/asm_windows_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 | // 6 | // System calls for amd64, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-32 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-24 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/asm_windows_arm.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 | #include "textflag.h" 6 | 7 | TEXT ·getprocaddress(SB),NOSPLIT,$0 8 | B syscall·getprocaddress(SB) 9 | 10 | TEXT ·loadlibrary(SB),NOSPLIT,$0 11 | B syscall·loadlibrary(SB) 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/env_windows.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 | // Windows environment variables. 6 | 7 | package windows 8 | 9 | import "syscall" 10 | 11 | func Getenv(key string) (value string, found bool) { 12 | return syscall.Getenv(key) 13 | } 14 | 15 | func Setenv(key, value string) error { 16 | return syscall.Setenv(key, value) 17 | } 18 | 19 | func Clearenv() { 20 | syscall.Clearenv() 21 | } 22 | 23 | func Environ() []string { 24 | return syscall.Environ() 25 | } 26 | 27 | func Unsetenv(key string) error { 28 | return syscall.Unsetenv(key) 29 | } 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/eventlog.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package windows 8 | 9 | const ( 10 | EVENTLOG_SUCCESS = 0 11 | EVENTLOG_ERROR_TYPE = 1 12 | EVENTLOG_WARNING_TYPE = 2 13 | EVENTLOG_INFORMATION_TYPE = 4 14 | EVENTLOG_AUDIT_SUCCESS = 8 15 | EVENTLOG_AUDIT_FAILURE = 16 16 | ) 17 | 18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW 19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource 20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/memory_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 windows 6 | 7 | const ( 8 | MEM_COMMIT = 0x00001000 9 | MEM_RESERVE = 0x00002000 10 | MEM_DECOMMIT = 0x00004000 11 | MEM_RELEASE = 0x00008000 12 | MEM_RESET = 0x00080000 13 | MEM_TOP_DOWN = 0x00100000 14 | MEM_WRITE_WATCH = 0x00200000 15 | MEM_PHYSICAL = 0x00400000 16 | MEM_RESET_UNDO = 0x01000000 17 | MEM_LARGE_PAGES = 0x20000000 18 | 19 | PAGE_NOACCESS = 0x01 20 | PAGE_READONLY = 0x02 21 | PAGE_READWRITE = 0x04 22 | PAGE_WRITECOPY = 0x08 23 | PAGE_EXECUTE_READ = 0x20 24 | PAGE_EXECUTE_READWRITE = 0x40 25 | PAGE_EXECUTE_WRITECOPY = 0x80 26 | ) 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mksyscall.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,race 6 | 7 | package windows 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows,!race 6 | 7 | package windows 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package windows 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + itoa(-val) 12 | } 13 | var buf [32]byte // big enough for int64 14 | i := len(buf) - 1 15 | for val >= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | -------------------------------------------------------------------------------- /vendor/gopkg.in/alecthomas/kingpin.v2/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (C) 2014 Alec Thomas 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | 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 THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendor/gopkg.in/alecthomas/kingpin.v2/actions.go: -------------------------------------------------------------------------------- 1 | package kingpin 2 | 3 | // Action callback executed at various stages after all values are populated. 4 | // The application, commands, arguments and flags all have corresponding 5 | // actions. 6 | type Action func(*ParseContext) error 7 | 8 | type actionMixin struct { 9 | actions []Action 10 | preActions []Action 11 | } 12 | 13 | type actionApplier interface { 14 | applyActions(*ParseContext) error 15 | applyPreActions(*ParseContext) error 16 | } 17 | 18 | func (a *actionMixin) addAction(action Action) { 19 | a.actions = append(a.actions, action) 20 | } 21 | 22 | func (a *actionMixin) addPreAction(action Action) { 23 | a.preActions = append(a.preActions, action) 24 | } 25 | 26 | func (a *actionMixin) applyActions(context *ParseContext) error { 27 | for _, action := range a.actions { 28 | if err := action(context); err != nil { 29 | return err 30 | } 31 | } 32 | return nil 33 | } 34 | 35 | func (a *actionMixin) applyPreActions(context *ParseContext) error { 36 | for _, preAction := range a.preActions { 37 | if err := preAction(context); err != nil { 38 | return err 39 | } 40 | } 41 | return nil 42 | } 43 | -------------------------------------------------------------------------------- /vendor/gopkg.in/alecthomas/kingpin.v2/completions.go: -------------------------------------------------------------------------------- 1 | package kingpin 2 | 3 | // HintAction is a function type who is expected to return a slice of possible 4 | // command line arguments. 5 | type HintAction func() []string 6 | type completionsMixin struct { 7 | hintActions []HintAction 8 | builtinHintActions []HintAction 9 | } 10 | 11 | func (a *completionsMixin) addHintAction(action HintAction) { 12 | a.hintActions = append(a.hintActions, action) 13 | } 14 | 15 | // Allow adding of HintActions which are added internally, ie, EnumVar 16 | func (a *completionsMixin) addHintActionBuiltin(action HintAction) { 17 | a.builtinHintActions = append(a.builtinHintActions, action) 18 | } 19 | 20 | func (a *completionsMixin) resolveCompletions() []string { 21 | var hints []string 22 | 23 | options := a.builtinHintActions 24 | if len(a.hintActions) > 0 { 25 | // User specified their own hintActions. Use those instead. 26 | options = a.hintActions 27 | } 28 | 29 | for _, hintAction := range options { 30 | hints = append(hints, hintAction()...) 31 | } 32 | return hints 33 | } 34 | -------------------------------------------------------------------------------- /vendor/gopkg.in/alecthomas/kingpin.v2/envar.go: -------------------------------------------------------------------------------- 1 | package kingpin 2 | 3 | import ( 4 | "os" 5 | "regexp" 6 | ) 7 | 8 | var ( 9 | envVarValuesSeparator = "\r?\n" 10 | envVarValuesTrimmer = regexp.MustCompile(envVarValuesSeparator + "$") 11 | envVarValuesSplitter = regexp.MustCompile(envVarValuesSeparator) 12 | ) 13 | 14 | type envarMixin struct { 15 | envar string 16 | noEnvar bool 17 | } 18 | 19 | func (e *envarMixin) HasEnvarValue() bool { 20 | return e.GetEnvarValue() != "" 21 | } 22 | 23 | func (e *envarMixin) GetEnvarValue() string { 24 | if e.noEnvar || e.envar == "" { 25 | return "" 26 | } 27 | return os.Getenv(e.envar) 28 | } 29 | 30 | func (e *envarMixin) GetSplitEnvarValue() []string { 31 | values := make([]string, 0) 32 | 33 | envarValue := e.GetEnvarValue() 34 | if envarValue == "" { 35 | return values 36 | } 37 | 38 | // Split by new line to extract multiple values, if any. 39 | trimmed := envVarValuesTrimmer.ReplaceAllString(envarValue, "") 40 | for _, value := range envVarValuesSplitter.Split(trimmed, -1) { 41 | values = append(values, value) 42 | } 43 | 44 | return values 45 | } 46 | -------------------------------------------------------------------------------- /vendor/gopkg.in/alecthomas/kingpin.v2/guesswidth.go: -------------------------------------------------------------------------------- 1 | // +build appengine !linux,!freebsd,!darwin,!dragonfly,!netbsd,!openbsd 2 | 3 | package kingpin 4 | 5 | import "io" 6 | 7 | func guessWidth(w io.Writer) int { 8 | return 80 9 | } 10 | -------------------------------------------------------------------------------- /vendor/gopkg.in/alecthomas/kingpin.v2/guesswidth_unix.go: -------------------------------------------------------------------------------- 1 | // +build !appengine,linux freebsd darwin dragonfly netbsd openbsd 2 | 3 | package kingpin 4 | 5 | import ( 6 | "io" 7 | "os" 8 | "strconv" 9 | "syscall" 10 | "unsafe" 11 | ) 12 | 13 | func guessWidth(w io.Writer) int { 14 | // check if COLUMNS env is set to comply with 15 | // http://pubs.opengroup.org/onlinepubs/009604499/basedefs/xbd_chap08.html 16 | colsStr := os.Getenv("COLUMNS") 17 | if colsStr != "" { 18 | if cols, err := strconv.Atoi(colsStr); err == nil { 19 | return cols 20 | } 21 | } 22 | 23 | if t, ok := w.(*os.File); ok { 24 | fd := t.Fd() 25 | var dimensions [4]uint16 26 | 27 | if _, _, err := syscall.Syscall6( 28 | syscall.SYS_IOCTL, 29 | uintptr(fd), 30 | uintptr(syscall.TIOCGWINSZ), 31 | uintptr(unsafe.Pointer(&dimensions)), 32 | 0, 0, 0, 33 | ); err == 0 { 34 | return int(dimensions[1]) 35 | } 36 | } 37 | return 80 38 | } 39 | -------------------------------------------------------------------------------- /vendor/gopkg.in/cheggaaa/pb.v1/pb_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package pb 4 | 5 | import "errors" 6 | 7 | // terminalWidth returns width of the terminal, which is not supported 8 | // and should always failed on appengine classic which is a sandboxed PaaS. 9 | func terminalWidth() (int, error) { 10 | return 0, errors.New("Not supported") 11 | } 12 | -------------------------------------------------------------------------------- /vendor/gopkg.in/cheggaaa/pb.v1/pool_win.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package pb 4 | 5 | import ( 6 | "fmt" 7 | "log" 8 | ) 9 | 10 | func (p *Pool) print(first bool) bool { 11 | p.m.Lock() 12 | defer p.m.Unlock() 13 | var out string 14 | if !first { 15 | coords, err := getCursorPos() 16 | if err != nil { 17 | log.Panic(err) 18 | } 19 | coords.Y -= int16(p.lastBarsCount) 20 | if coords.Y < 0 { 21 | coords.Y = 0 22 | } 23 | coords.X = 0 24 | 25 | err = setCursorPos(coords) 26 | if err != nil { 27 | log.Panic(err) 28 | } 29 | } 30 | isFinished := true 31 | for _, bar := range p.bars { 32 | if !bar.IsFinished() { 33 | isFinished = false 34 | } 35 | bar.Update() 36 | out += fmt.Sprintf("\r%s\n", bar.String()) 37 | } 38 | if p.Output != nil { 39 | fmt.Fprint(p.Output, out) 40 | } else { 41 | fmt.Print(out) 42 | } 43 | p.lastBarsCount = len(p.bars) 44 | return isFinished 45 | } 46 | -------------------------------------------------------------------------------- /vendor/gopkg.in/cheggaaa/pb.v1/pool_x.go: -------------------------------------------------------------------------------- 1 | // +build linux darwin freebsd netbsd openbsd solaris dragonfly 2 | 3 | package pb 4 | 5 | import "fmt" 6 | 7 | func (p *Pool) print(first bool) bool { 8 | p.m.Lock() 9 | defer p.m.Unlock() 10 | var out string 11 | if !first { 12 | out = fmt.Sprintf("\033[%dA", p.lastBarsCount) 13 | } 14 | isFinished := true 15 | for _, bar := range p.bars { 16 | if !bar.IsFinished() { 17 | isFinished = false 18 | } 19 | bar.Update() 20 | out += fmt.Sprintf("\r%s\n", bar.String()) 21 | } 22 | if p.Output != nil { 23 | fmt.Fprint(p.Output, out) 24 | } else { 25 | fmt.Print(out) 26 | } 27 | p.lastBarsCount = len(p.bars) 28 | return isFinished 29 | } 30 | -------------------------------------------------------------------------------- /vendor/gopkg.in/cheggaaa/pb.v1/reader.go: -------------------------------------------------------------------------------- 1 | package pb 2 | 3 | import ( 4 | "io" 5 | ) 6 | 7 | // It's proxy reader, implement io.Reader 8 | type Reader struct { 9 | io.Reader 10 | bar *ProgressBar 11 | } 12 | 13 | func (r *Reader) Read(p []byte) (n int, err error) { 14 | n, err = r.Reader.Read(p) 15 | r.bar.Add(n) 16 | return 17 | } 18 | 19 | // Close the reader when it implements io.Closer 20 | func (r *Reader) Close() (err error) { 21 | if closer, ok := r.Reader.(io.Closer); ok { 22 | return closer.Close() 23 | } 24 | return 25 | } 26 | -------------------------------------------------------------------------------- /vendor/gopkg.in/cheggaaa/pb.v1/runecount.go: -------------------------------------------------------------------------------- 1 | package pb 2 | 3 | import ( 4 | "github.com/mattn/go-runewidth" 5 | "regexp" 6 | ) 7 | 8 | // Finds the control character sequences (like colors) 9 | var ctrlFinder = regexp.MustCompile("\x1b\x5b[0-9]+\x6d") 10 | 11 | func escapeAwareRuneCountInString(s string) int { 12 | n := runewidth.StringWidth(s) 13 | for _, sm := range ctrlFinder.FindAllString(s, -1) { 14 | n -= runewidth.StringWidth(sm) 15 | } 16 | return n 17 | } 18 | -------------------------------------------------------------------------------- /vendor/gopkg.in/cheggaaa/pb.v1/termios_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd netbsd openbsd dragonfly 2 | // +build !appengine 3 | 4 | package pb 5 | 6 | import "syscall" 7 | 8 | const ioctlReadTermios = syscall.TIOCGETA 9 | const ioctlWriteTermios = syscall.TIOCSETA 10 | -------------------------------------------------------------------------------- /vendor/gopkg.in/cheggaaa/pb.v1/termios_sysv.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 linux solaris 6 | // +build !appengine 7 | 8 | package pb 9 | 10 | import "golang.org/x/sys/unix" 11 | 12 | const ioctlReadTermios = unix.TCGETS 13 | const ioctlWriteTermios = unix.TCSETS 14 | -------------------------------------------------------------------------------- /vendor/gopkg.in/gcfg.v1/README: -------------------------------------------------------------------------------- 1 | Gcfg reads INI-style configuration files into Go structs; 2 | supports user-defined types and subsections. 3 | 4 | Package docs: https://godoc.org/gopkg.in/gcfg.v1 5 | -------------------------------------------------------------------------------- /vendor/gopkg.in/gcfg.v1/types/bool.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | // BoolValues defines the name and value mappings for ParseBool. 4 | var BoolValues = map[string]interface{}{ 5 | "true": true, "yes": true, "on": true, "1": true, 6 | "false": false, "no": false, "off": false, "0": false, 7 | } 8 | 9 | var boolParser = func() *EnumParser { 10 | ep := &EnumParser{} 11 | ep.AddVals(BoolValues) 12 | return ep 13 | }() 14 | 15 | // ParseBool parses bool values according to the definitions in BoolValues. 16 | // Parsing is case-insensitive. 17 | func ParseBool(s string) (bool, error) { 18 | v, err := boolParser.Parse(s) 19 | if err != nil { 20 | return false, err 21 | } 22 | return v.(bool), nil 23 | } 24 | -------------------------------------------------------------------------------- /vendor/gopkg.in/gcfg.v1/types/doc.go: -------------------------------------------------------------------------------- 1 | // Package types defines helpers for type conversions. 2 | // 3 | // The API for this package is not finalized yet. 4 | package types 5 | -------------------------------------------------------------------------------- /vendor/gopkg.in/gcfg.v1/types/enum.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import ( 4 | "fmt" 5 | "reflect" 6 | "strings" 7 | ) 8 | 9 | // EnumParser parses "enum" values; i.e. a predefined set of strings to 10 | // predefined values. 11 | type EnumParser struct { 12 | Type string // type name; if not set, use type of first value added 13 | CaseMatch bool // if true, matching of strings is case-sensitive 14 | // PrefixMatch bool 15 | vals map[string]interface{} 16 | } 17 | 18 | // AddVals adds strings and values to an EnumParser. 19 | func (ep *EnumParser) AddVals(vals map[string]interface{}) { 20 | if ep.vals == nil { 21 | ep.vals = make(map[string]interface{}) 22 | } 23 | for k, v := range vals { 24 | if ep.Type == "" { 25 | ep.Type = reflect.TypeOf(v).Name() 26 | } 27 | if !ep.CaseMatch { 28 | k = strings.ToLower(k) 29 | } 30 | ep.vals[k] = v 31 | } 32 | } 33 | 34 | // Parse parses the string and returns the value or an error. 35 | func (ep EnumParser) Parse(s string) (interface{}, error) { 36 | if !ep.CaseMatch { 37 | s = strings.ToLower(s) 38 | } 39 | v, ok := ep.vals[s] 40 | if !ok { 41 | return false, fmt.Errorf("failed to parse %s %#q", ep.Type, s) 42 | } 43 | return v, nil 44 | } 45 | -------------------------------------------------------------------------------- /vendor/gopkg.in/gcfg.v1/types/scan.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import ( 4 | "fmt" 5 | "io" 6 | "reflect" 7 | ) 8 | 9 | // ScanFully uses fmt.Sscanf with verb to fully scan val into ptr. 10 | func ScanFully(ptr interface{}, val string, verb byte) error { 11 | t := reflect.ValueOf(ptr).Elem().Type() 12 | // attempt to read extra bytes to make sure the value is consumed 13 | var b []byte 14 | n, err := fmt.Sscanf(val, "%"+string(verb)+"%s", ptr, &b) 15 | switch { 16 | case n < 1 || n == 1 && err != io.EOF: 17 | return fmt.Errorf("failed to parse %q as %v: %v", val, t, err) 18 | case n > 1: 19 | return fmt.Errorf("failed to parse %q as %v: extra characters %q", val, t, string(b)) 20 | } 21 | // n == 1 && err == io.EOF 22 | return nil 23 | } 24 | -------------------------------------------------------------------------------- /vendor/gopkg.in/lxc/go-lxc.v2/AUTHORS: -------------------------------------------------------------------------------- 1 | # This is the official list of Go-LXC authors for copyright purposes. 2 | 3 | # Names should be added to this file as 4 | #Name or Organization 5 | # The email address is not required for organizations. 6 | 7 | # Please keep the list sorted. 8 | 9 | David Cramer 10 | Fatih Arslan 11 | Kelsey Hightower 12 | S.Çağlar Onur 13 | Serge Hallyn 14 | Stéphane Graber 15 | Syed 16 | Tycho Andersen 17 | -------------------------------------------------------------------------------- /vendor/gopkg.in/lxc/go-lxc.v2/cgo_1.12.go: -------------------------------------------------------------------------------- 1 | // Copyright © 2013, 2014, The Go-LXC Authors. All rights reserved. 2 | // Use of this source code is governed by a LGPLv2.1 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build >go1.10,linux,cgo 6 | 7 | package lxc 8 | 9 | // #cgo CFLAGS: -fvisibility=hidden 10 | import "C" 11 | -------------------------------------------------------------------------------- /vendor/gopkg.in/lxc/go-lxc.v2/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package lxc provides Go Bindings for LXC (Linux Containers) C API. 3 | 4 | LXC (LinuX Containers) is an operating system–level virtualization method for running multiple isolated Linux systems (containers) on a single control host. 5 | 6 | LXC combines cgroups and namespace support to provide an isolated environment for applications. 7 | */ 8 | package lxc 9 | -------------------------------------------------------------------------------- /vendor/gopkg.in/lxc/go-lxc.v2/linking_dynamic.go: -------------------------------------------------------------------------------- 1 | // Copyright © 2013, 2014, The Go-LXC Authors. All rights reserved. 2 | // Use of this source code is governed by a LGPLv2.1 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,cgo,!static_build 6 | 7 | package lxc 8 | 9 | // #cgo CFLAGS: -std=gnu11 -Wvla -Werror 10 | // #cgo pkg-config: lxc 11 | import "C" 12 | -------------------------------------------------------------------------------- /vendor/gopkg.in/lxc/go-lxc.v2/linking_static.go: -------------------------------------------------------------------------------- 1 | // Copyright © 2013, 2014, The Go-LXC Authors. All rights reserved. 2 | // Use of this source code is governed by a LGPLv2.1 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux,cgo,static_build 6 | 7 | package lxc 8 | 9 | // #cgo CFLAGS: -std=gnu11 -Wvla -Werror 10 | // #cgo pkg-config: --static lxc 11 | // #cgo LDFLAGS: -static 12 | import "C" 13 | --------------------------------------------------------------------------------