├── .github
└── workflows
│ ├── release.yml
│ └── test.yml
├── .gitignore
├── Dockerfile
├── LICENSE
├── Makefile
├── README.md
├── api
├── auth
│ └── auth.go
├── manager
│ ├── device.go
│ ├── dns.go
│ ├── manager.go
│ ├── trust_ipset.go
│ ├── user.go
│ └── wg.go
└── system
│ └── system.go
├── cmd
├── bootstrap-trust-ipset
│ └── main.go
├── managercli
│ └── main.go
└── service
│ └── main.go
├── config.example
├── config.go
├── femanager
├── fe.go
├── spa
│ ├── index.gohtml
│ ├── index.html
│ ├── jsconfig.json
│ ├── package-lock.json
│ ├── package.json
│ ├── postcss.config.cjs
│ ├── src
│ │ ├── App
│ │ │ ├── App.svelte
│ │ │ ├── Pages
│ │ │ │ ├── Device
│ │ │ │ │ ├── Components
│ │ │ │ │ │ ├── DeviceActionButton.svelte
│ │ │ │ │ │ ├── DeviceConfigInformation.svelte
│ │ │ │ │ │ ├── DeviceFormCreate.svelte
│ │ │ │ │ │ ├── DeviceFormEdit.svelte
│ │ │ │ │ │ ├── DeviceInformation.svelte
│ │ │ │ │ │ ├── DeviceInformationRow.svelte
│ │ │ │ │ │ ├── DeviceModalRemove.svelte
│ │ │ │ │ │ └── func.js
│ │ │ │ │ ├── Device.svelte
│ │ │ │ │ ├── DeviceCreate.svelte
│ │ │ │ │ ├── DeviceEdit.svelte
│ │ │ │ │ └── func.js
│ │ │ │ ├── Devices
│ │ │ │ │ ├── Devices.svelte
│ │ │ │ │ └── func.js
│ │ │ │ ├── NotFound.svelte
│ │ │ │ ├── Server
│ │ │ │ │ ├── Server.svelte
│ │ │ │ │ ├── TrustedIPSet.svelte
│ │ │ │ │ ├── WireguardInterface.svelte
│ │ │ │ │ ├── WireguardInterfaceRow.svelte
│ │ │ │ │ └── func.js
│ │ │ │ ├── SignIn
│ │ │ │ │ └── SignIn.svelte
│ │ │ │ ├── User
│ │ │ │ │ ├── Components
│ │ │ │ │ │ ├── UserActionButton.svelte
│ │ │ │ │ │ ├── UserDevices.svelte
│ │ │ │ │ │ ├── UserInformation.svelte
│ │ │ │ │ │ ├── UserInformationRow.svelte
│ │ │ │ │ │ ├── UserManagerInformation.svelte
│ │ │ │ │ │ ├── UserModalRemove.svelte
│ │ │ │ │ │ └── func.js
│ │ │ │ │ ├── User.svelte
│ │ │ │ │ ├── UserCreate.svelte
│ │ │ │ │ ├── UserEdit.svelte
│ │ │ │ │ └── func.js
│ │ │ │ └── Users
│ │ │ │ │ ├── Users.svelte
│ │ │ │ │ └── func.js
│ │ │ ├── Shared
│ │ │ │ └── Components
│ │ │ │ │ ├── Button
│ │ │ │ │ ├── Button.svelte
│ │ │ │ │ ├── DangerButton.svelte
│ │ │ │ │ ├── LinkButton.svelte
│ │ │ │ │ ├── PrimaryButton.svelte
│ │ │ │ │ └── SubmitButton.svelte
│ │ │ │ │ ├── CardHeading.svelte
│ │ │ │ │ ├── Header.svelte
│ │ │ │ │ ├── Icon
│ │ │ │ │ ├── Mini
│ │ │ │ │ │ ├── ArchiveBoxArrowDown.svelte
│ │ │ │ │ │ ├── ChevronRight.svelte
│ │ │ │ │ │ ├── ClipboardDocument.svelte
│ │ │ │ │ │ └── ExclamationCircle.svelte
│ │ │ │ │ └── Outline
│ │ │ │ │ │ ├── ComputerDesktop.svelte
│ │ │ │ │ │ ├── ExclamationTriangle.svelte
│ │ │ │ │ │ ├── LockClosed.svelte
│ │ │ │ │ │ └── QRCode.svelte
│ │ │ │ │ ├── Link.svelte
│ │ │ │ │ ├── Nav.svelte
│ │ │ │ │ ├── QRCode.svelte
│ │ │ │ │ ├── Spinner.svelte
│ │ │ │ │ └── Toggle.svelte
│ │ │ ├── state
│ │ │ │ ├── index.js
│ │ │ │ ├── router.js
│ │ │ │ ├── routes.js
│ │ │ │ └── store.js
│ │ │ └── util
│ │ │ │ ├── dom.js
│ │ │ │ └── transition.js
│ │ ├── app.css
│ │ ├── lib
│ │ │ ├── router.js
│ │ │ └── rpcapi.js
│ │ └── main.js
│ ├── tailwind.config.cjs
│ └── vite.config.js
└── templates.go
├── firewall
├── config.go
├── config_linux.go
├── nftables.go
└── nftables_linux.go
├── go.mod
├── go.sum
├── model
├── device.go
├── device_test.go
├── dns.go
├── dns_test.go
├── manager_trust_ipset.go
├── user.go
├── user_session.go
├── user_session_test.go
└── user_test.go
├── pkg
├── cli
│ ├── device.go
│ ├── device_create.go
│ ├── device_edit.go
│ ├── device_remove.go
│ ├── devices.go
│ ├── domain.go
│ ├── domain_a_record_remove.go
│ ├── domain_a_record_set.go
│ ├── domain_cname_record_remove.go
│ ├── domain_cname_record_set.go
│ ├── domain_create.go
│ ├── domain_remove.go
│ ├── domains.go
│ ├── httpclient.go
│ ├── interfaces.go
│ ├── trust_ipset.go
│ ├── trust_ipset_add.go
│ ├── trust_ipset_remove.go
│ ├── user.go
│ ├── user_create.go
│ ├── user_edit.go
│ ├── user_remove.go
│ ├── users.go
│ └── wg_cfg.go
├── envconfig
│ ├── envconfig.go
│ ├── main_test.go
│ ├── t_arr_types_test.go
│ ├── t_base_types_test.go
│ ├── t_embedded_and_sub_struct_test.go
│ ├── t_map_types_test.go
│ ├── t_slice_types_test.go
│ ├── t_time_duration_types_test.go
│ └── utils.go
├── httpapi
│ └── httpapi.go
├── iface
│ ├── iface.go
│ └── iface_linux.go
├── ifconfig
│ └── ifconfig_linux.go
├── ipcalc
│ └── ipcalc.go
├── ipset
│ ├── ipset.go
│ └── ipset_test.go
├── log
│ └── log.go
├── nfutils
│ ├── expr_linux.go
│ ├── helpers_linux.go
│ └── type_linux.go
├── otp
│ ├── otp.go
│ └── otp_test.go
├── pretty
│ ├── table.go
│ ├── table_test.go
│ ├── text.go
│ └── text_test.go
├── rand
│ └── rand.go
├── rpcapi
│ └── rpcapi.go
└── wgmngr
│ ├── peer.go
│ ├── peer_test.go
│ ├── peerset.go
│ ├── peerset_test.go
│ ├── wgctrl.go
│ ├── wgctrl_linux.go
│ └── wgmngr.go
├── resolver
└── handler.go
├── service.go
├── stuff
├── install.sh
└── screenshots
│ ├── 01-auth.png
│ ├── 02-server.png
│ ├── 03-users.png
│ ├── 04-user-create.png
│ ├── 05-user.png
│ ├── 06-devices.png
│ ├── 07-device-create.png
│ └── 08-device.png
├── vendor
├── github.com
│ ├── google
│ │ ├── go-cmp
│ │ │ ├── LICENSE
│ │ │ └── cmp
│ │ │ │ ├── compare.go
│ │ │ │ ├── export_panic.go
│ │ │ │ ├── export_unsafe.go
│ │ │ │ ├── internal
│ │ │ │ ├── diff
│ │ │ │ │ ├── debug_disable.go
│ │ │ │ │ ├── debug_enable.go
│ │ │ │ │ └── diff.go
│ │ │ │ ├── flags
│ │ │ │ │ └── flags.go
│ │ │ │ ├── function
│ │ │ │ │ └── func.go
│ │ │ │ └── value
│ │ │ │ │ ├── name.go
│ │ │ │ │ ├── pointer_purego.go
│ │ │ │ │ ├── pointer_unsafe.go
│ │ │ │ │ └── sort.go
│ │ │ │ ├── options.go
│ │ │ │ ├── path.go
│ │ │ │ ├── report.go
│ │ │ │ ├── report_compare.go
│ │ │ │ ├── report_references.go
│ │ │ │ ├── report_reflect.go
│ │ │ │ ├── report_slices.go
│ │ │ │ ├── report_text.go
│ │ │ │ └── report_value.go
│ │ ├── nftables
│ │ │ ├── CONTRIBUTING.md
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── alignedbuff
│ │ │ │ └── alignedbuff.go
│ │ │ ├── binaryutil
│ │ │ │ └── binaryutil.go
│ │ │ ├── chain.go
│ │ │ ├── conn.go
│ │ │ ├── counter.go
│ │ │ ├── doc.go
│ │ │ ├── expr
│ │ │ │ ├── bitwise.go
│ │ │ │ ├── byteorder.go
│ │ │ │ ├── connlimit.go
│ │ │ │ ├── counter.go
│ │ │ │ ├── ct.go
│ │ │ │ ├── dup.go
│ │ │ │ ├── dynset.go
│ │ │ │ ├── expr.go
│ │ │ │ ├── exthdr.go
│ │ │ │ ├── fib.go
│ │ │ │ ├── flow_offload.go
│ │ │ │ ├── hash.go
│ │ │ │ ├── immediate.go
│ │ │ │ ├── limit.go
│ │ │ │ ├── log.go
│ │ │ │ ├── lookup.go
│ │ │ │ ├── match.go
│ │ │ │ ├── nat.go
│ │ │ │ ├── notrack.go
│ │ │ │ ├── numgen.go
│ │ │ │ ├── objref.go
│ │ │ │ ├── payload.go
│ │ │ │ ├── queue.go
│ │ │ │ ├── quota.go
│ │ │ │ ├── range.go
│ │ │ │ ├── redirect.go
│ │ │ │ ├── reject.go
│ │ │ │ ├── rt.go
│ │ │ │ ├── target.go
│ │ │ │ ├── tproxy.go
│ │ │ │ └── verdict.go
│ │ │ ├── flowtable.go
│ │ │ ├── internal
│ │ │ │ └── parseexprfunc
│ │ │ │ │ └── parseexprfunc.go
│ │ │ ├── obj.go
│ │ │ ├── rule.go
│ │ │ ├── set.go
│ │ │ ├── table.go
│ │ │ ├── util.go
│ │ │ └── xt
│ │ │ │ ├── info.go
│ │ │ │ ├── match_addrtype.go
│ │ │ │ ├── match_conntrack.go
│ │ │ │ ├── match_tcp.go
│ │ │ │ ├── match_udp.go
│ │ │ │ ├── target_dnat.go
│ │ │ │ ├── target_masquerade_ip.go
│ │ │ │ ├── unknown.go
│ │ │ │ ├── util.go
│ │ │ │ └── xt.go
│ │ └── uuid
│ │ │ ├── .travis.yml
│ │ │ ├── CONTRIBUTING.md
│ │ │ ├── CONTRIBUTORS
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── dce.go
│ │ │ ├── doc.go
│ │ │ ├── hash.go
│ │ │ ├── marshal.go
│ │ │ ├── node.go
│ │ │ ├── node_js.go
│ │ │ ├── node_net.go
│ │ │ ├── null.go
│ │ │ ├── sql.go
│ │ │ ├── time.go
│ │ │ ├── util.go
│ │ │ ├── uuid.go
│ │ │ ├── version1.go
│ │ │ └── version4.go
│ ├── josharian
│ │ └── native
│ │ │ ├── doc.go
│ │ │ ├── endian_big.go
│ │ │ ├── endian_generic.go
│ │ │ ├── endian_little.go
│ │ │ ├── license
│ │ │ └── readme.md
│ ├── mdlayher
│ │ ├── genetlink
│ │ │ ├── CHANGELOG.md
│ │ │ ├── LICENSE.md
│ │ │ ├── README.md
│ │ │ ├── conn.go
│ │ │ ├── doc.go
│ │ │ ├── family.go
│ │ │ ├── family_linux.go
│ │ │ ├── family_others.go
│ │ │ ├── fuzz.go
│ │ │ └── message.go
│ │ ├── netlink
│ │ │ ├── .gitignore
│ │ │ ├── CHANGELOG.md
│ │ │ ├── LICENSE.md
│ │ │ ├── README.md
│ │ │ ├── align.go
│ │ │ ├── attribute.go
│ │ │ ├── conn.go
│ │ │ ├── conn_linux.go
│ │ │ ├── conn_others.go
│ │ │ ├── debug.go
│ │ │ ├── doc.go
│ │ │ ├── errors.go
│ │ │ ├── fuzz.go
│ │ │ ├── message.go
│ │ │ ├── nlenc
│ │ │ │ ├── doc.go
│ │ │ │ ├── int.go
│ │ │ │ └── string.go
│ │ │ └── nltest
│ │ │ │ ├── errors_others.go
│ │ │ │ ├── errors_unix.go
│ │ │ │ └── nltest.go
│ │ └── socket
│ │ │ ├── CHANGELOG.md
│ │ │ ├── LICENSE.md
│ │ │ ├── README.md
│ │ │ ├── accept.go
│ │ │ ├── accept4.go
│ │ │ ├── conn.go
│ │ │ ├── conn_linux.go
│ │ │ ├── doc.go
│ │ │ ├── netns_linux.go
│ │ │ ├── netns_others.go
│ │ │ ├── setbuffer_linux.go
│ │ │ ├── setbuffer_others.go
│ │ │ ├── typ_cloexec_nonblock.go
│ │ │ └── typ_none.go
│ ├── miekg
│ │ └── dns
│ │ │ ├── .codecov.yml
│ │ │ ├── .gitignore
│ │ │ ├── AUTHORS
│ │ │ ├── CODEOWNERS
│ │ │ ├── CONTRIBUTORS
│ │ │ ├── COPYRIGHT
│ │ │ ├── LICENSE
│ │ │ ├── Makefile.fuzz
│ │ │ ├── Makefile.release
│ │ │ ├── README.md
│ │ │ ├── acceptfunc.go
│ │ │ ├── client.go
│ │ │ ├── clientconfig.go
│ │ │ ├── dane.go
│ │ │ ├── defaults.go
│ │ │ ├── dns.go
│ │ │ ├── dnssec.go
│ │ │ ├── dnssec_keygen.go
│ │ │ ├── dnssec_keyscan.go
│ │ │ ├── dnssec_privkey.go
│ │ │ ├── doc.go
│ │ │ ├── duplicate.go
│ │ │ ├── edns.go
│ │ │ ├── format.go
│ │ │ ├── fuzz.go
│ │ │ ├── generate.go
│ │ │ ├── hash.go
│ │ │ ├── labels.go
│ │ │ ├── listen_no_reuseport.go
│ │ │ ├── listen_reuseport.go
│ │ │ ├── msg.go
│ │ │ ├── msg_helpers.go
│ │ │ ├── msg_truncate.go
│ │ │ ├── nsecx.go
│ │ │ ├── privaterr.go
│ │ │ ├── reverse.go
│ │ │ ├── sanitize.go
│ │ │ ├── scan.go
│ │ │ ├── scan_rr.go
│ │ │ ├── serve_mux.go
│ │ │ ├── server.go
│ │ │ ├── sig0.go
│ │ │ ├── smimea.go
│ │ │ ├── svcb.go
│ │ │ ├── tlsa.go
│ │ │ ├── tools.go
│ │ │ ├── tsig.go
│ │ │ ├── types.go
│ │ │ ├── udp.go
│ │ │ ├── udp_windows.go
│ │ │ ├── update.go
│ │ │ ├── version.go
│ │ │ ├── xfr.go
│ │ │ ├── zduplicate.go
│ │ │ ├── zmsg.go
│ │ │ └── ztypes.go
│ ├── vishvananda
│ │ ├── netlink
│ │ │ ├── .gitignore
│ │ │ ├── .travis.yml
│ │ │ ├── CHANGELOG.md
│ │ │ ├── LICENSE
│ │ │ ├── Makefile
│ │ │ ├── README.md
│ │ │ ├── addr.go
│ │ │ ├── addr_linux.go
│ │ │ ├── bpf_linux.go
│ │ │ ├── bridge_linux.go
│ │ │ ├── class.go
│ │ │ ├── class_linux.go
│ │ │ ├── conntrack_linux.go
│ │ │ ├── conntrack_unspecified.go
│ │ │ ├── devlink_linux.go
│ │ │ ├── filter.go
│ │ │ ├── filter_linux.go
│ │ │ ├── fou.go
│ │ │ ├── fou_linux.go
│ │ │ ├── fou_unspecified.go
│ │ │ ├── genetlink_linux.go
│ │ │ ├── genetlink_unspecified.go
│ │ │ ├── gtp_linux.go
│ │ │ ├── handle_linux.go
│ │ │ ├── handle_unspecified.go
│ │ │ ├── ioctl_linux.go
│ │ │ ├── link.go
│ │ │ ├── link_linux.go
│ │ │ ├── link_tuntap_linux.go
│ │ │ ├── neigh.go
│ │ │ ├── neigh_linux.go
│ │ │ ├── netlink.go
│ │ │ ├── netlink_linux.go
│ │ │ ├── netlink_unspecified.go
│ │ │ ├── netns_linux.go
│ │ │ ├── netns_unspecified.go
│ │ │ ├── nl
│ │ │ │ ├── addr_linux.go
│ │ │ │ ├── bridge_linux.go
│ │ │ │ ├── conntrack_linux.go
│ │ │ │ ├── devlink_linux.go
│ │ │ │ ├── genetlink_linux.go
│ │ │ │ ├── link_linux.go
│ │ │ │ ├── mpls_linux.go
│ │ │ │ ├── nl_linux.go
│ │ │ │ ├── nl_unspecified.go
│ │ │ │ ├── rdma_link_linux.go
│ │ │ │ ├── route_linux.go
│ │ │ │ ├── seg6_linux.go
│ │ │ │ ├── seg6local_linux.go
│ │ │ │ ├── syscall.go
│ │ │ │ ├── tc_linux.go
│ │ │ │ ├── xfrm_linux.go
│ │ │ │ ├── xfrm_monitor_linux.go
│ │ │ │ ├── xfrm_policy_linux.go
│ │ │ │ └── xfrm_state_linux.go
│ │ │ ├── order.go
│ │ │ ├── protinfo.go
│ │ │ ├── protinfo_linux.go
│ │ │ ├── qdisc.go
│ │ │ ├── qdisc_linux.go
│ │ │ ├── rdma_link_linux.go
│ │ │ ├── route.go
│ │ │ ├── route_linux.go
│ │ │ ├── route_unspecified.go
│ │ │ ├── rule.go
│ │ │ ├── rule_linux.go
│ │ │ ├── socket.go
│ │ │ ├── socket_linux.go
│ │ │ ├── xfrm.go
│ │ │ ├── xfrm_monitor_linux.go
│ │ │ ├── xfrm_policy.go
│ │ │ ├── xfrm_policy_linux.go
│ │ │ ├── xfrm_state.go
│ │ │ └── xfrm_state_linux.go
│ │ └── netns
│ │ │ ├── .golangci.yml
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── doc.go
│ │ │ ├── netns_linux.go
│ │ │ ├── netns_others.go
│ │ │ ├── nshandle_linux.go
│ │ │ └── nshandle_others.go
│ └── zyablitsev
│ │ └── qrencode-go
│ │ ├── COPYING
│ │ └── qrencode
│ │ ├── bits.go
│ │ ├── boolbits.go
│ │ ├── bytebits.go
│ │ ├── content.go
│ │ ├── encode.go
│ │ ├── errorcorrection.go
│ │ ├── int32bits.go
│ │ ├── mode.go
│ │ ├── qrgrid.go
│ │ └── version.go
├── go.etcd.io
│ └── bbolt
│ │ ├── .gitignore
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── bolt_386.go
│ │ ├── bolt_amd64.go
│ │ ├── bolt_arm.go
│ │ ├── bolt_arm64.go
│ │ ├── bolt_linux.go
│ │ ├── bolt_loong64.go
│ │ ├── bolt_mips64x.go
│ │ ├── bolt_mipsx.go
│ │ ├── bolt_openbsd.go
│ │ ├── bolt_ppc.go
│ │ ├── bolt_ppc64.go
│ │ ├── bolt_ppc64le.go
│ │ ├── bolt_riscv64.go
│ │ ├── bolt_s390x.go
│ │ ├── bolt_unix.go
│ │ ├── bolt_unix_aix.go
│ │ ├── bolt_unix_solaris.go
│ │ ├── bolt_windows.go
│ │ ├── boltsync_unix.go
│ │ ├── bucket.go
│ │ ├── compact.go
│ │ ├── cursor.go
│ │ ├── db.go
│ │ ├── doc.go
│ │ ├── errors.go
│ │ ├── freelist.go
│ │ ├── freelist_hmap.go
│ │ ├── mlock_unix.go
│ │ ├── mlock_windows.go
│ │ ├── node.go
│ │ ├── page.go
│ │ ├── tx.go
│ │ ├── tx_check.go
│ │ └── unsafe.go
├── golang.org
│ └── x
│ │ ├── crypto
│ │ ├── LICENSE
│ │ ├── PATENTS
│ │ ├── curve25519
│ │ │ ├── curve25519.go
│ │ │ ├── curve25519_compat.go
│ │ │ ├── curve25519_go120.go
│ │ │ └── internal
│ │ │ │ └── field
│ │ │ │ ├── README
│ │ │ │ ├── fe.go
│ │ │ │ ├── fe_amd64.go
│ │ │ │ ├── fe_amd64.s
│ │ │ │ ├── fe_amd64_noasm.go
│ │ │ │ ├── fe_arm64.go
│ │ │ │ ├── fe_arm64.s
│ │ │ │ ├── fe_arm64_noasm.go
│ │ │ │ ├── fe_generic.go
│ │ │ │ ├── sync.checkpoint
│ │ │ │ └── sync.sh
│ │ └── sha3
│ │ │ ├── doc.go
│ │ │ ├── hashes.go
│ │ │ ├── hashes_generic.go
│ │ │ ├── keccakf.go
│ │ │ ├── keccakf_amd64.go
│ │ │ ├── keccakf_amd64.s
│ │ │ ├── register.go
│ │ │ ├── sha3.go
│ │ │ ├── sha3_s390x.go
│ │ │ ├── sha3_s390x.s
│ │ │ ├── shake.go
│ │ │ ├── shake_generic.go
│ │ │ ├── xor.go
│ │ │ ├── xor_generic.go
│ │ │ └── xor_unaligned.go
│ │ ├── mod
│ │ ├── LICENSE
│ │ ├── PATENTS
│ │ └── semver
│ │ │ └── semver.go
│ │ ├── net
│ │ ├── LICENSE
│ │ ├── PATENTS
│ │ ├── bpf
│ │ │ ├── asm.go
│ │ │ ├── constants.go
│ │ │ ├── doc.go
│ │ │ ├── instructions.go
│ │ │ ├── setter.go
│ │ │ ├── vm.go
│ │ │ └── vm_instructions.go
│ │ ├── internal
│ │ │ ├── iana
│ │ │ │ └── const.go
│ │ │ └── socket
│ │ │ │ ├── cmsghdr.go
│ │ │ │ ├── cmsghdr_bsd.go
│ │ │ │ ├── cmsghdr_linux_32bit.go
│ │ │ │ ├── cmsghdr_linux_64bit.go
│ │ │ │ ├── cmsghdr_solaris_64bit.go
│ │ │ │ ├── cmsghdr_stub.go
│ │ │ │ ├── cmsghdr_unix.go
│ │ │ │ ├── cmsghdr_zos_s390x.go
│ │ │ │ ├── complete_dontwait.go
│ │ │ │ ├── complete_nodontwait.go
│ │ │ │ ├── empty.s
│ │ │ │ ├── error_unix.go
│ │ │ │ ├── error_windows.go
│ │ │ │ ├── iovec_32bit.go
│ │ │ │ ├── iovec_64bit.go
│ │ │ │ ├── iovec_solaris_64bit.go
│ │ │ │ ├── iovec_stub.go
│ │ │ │ ├── mmsghdr_stub.go
│ │ │ │ ├── mmsghdr_unix.go
│ │ │ │ ├── msghdr_bsd.go
│ │ │ │ ├── msghdr_bsdvar.go
│ │ │ │ ├── msghdr_linux.go
│ │ │ │ ├── msghdr_linux_32bit.go
│ │ │ │ ├── msghdr_linux_64bit.go
│ │ │ │ ├── msghdr_openbsd.go
│ │ │ │ ├── msghdr_solaris_64bit.go
│ │ │ │ ├── msghdr_stub.go
│ │ │ │ ├── msghdr_zos_s390x.go
│ │ │ │ ├── norace.go
│ │ │ │ ├── race.go
│ │ │ │ ├── rawconn.go
│ │ │ │ ├── rawconn_mmsg.go
│ │ │ │ ├── rawconn_msg.go
│ │ │ │ ├── rawconn_nommsg.go
│ │ │ │ ├── rawconn_nomsg.go
│ │ │ │ ├── socket.go
│ │ │ │ ├── sys.go
│ │ │ │ ├── sys_bsd.go
│ │ │ │ ├── sys_const_unix.go
│ │ │ │ ├── sys_linux.go
│ │ │ │ ├── sys_linux_386.go
│ │ │ │ ├── sys_linux_386.s
│ │ │ │ ├── sys_linux_amd64.go
│ │ │ │ ├── sys_linux_arm.go
│ │ │ │ ├── sys_linux_arm64.go
│ │ │ │ ├── sys_linux_loong64.go
│ │ │ │ ├── sys_linux_mips.go
│ │ │ │ ├── sys_linux_mips64.go
│ │ │ │ ├── sys_linux_mips64le.go
│ │ │ │ ├── sys_linux_mipsle.go
│ │ │ │ ├── sys_linux_ppc.go
│ │ │ │ ├── sys_linux_ppc64.go
│ │ │ │ ├── sys_linux_ppc64le.go
│ │ │ │ ├── sys_linux_riscv64.go
│ │ │ │ ├── sys_linux_s390x.go
│ │ │ │ ├── sys_linux_s390x.s
│ │ │ │ ├── sys_netbsd.go
│ │ │ │ ├── sys_posix.go
│ │ │ │ ├── sys_stub.go
│ │ │ │ ├── sys_unix.go
│ │ │ │ ├── sys_windows.go
│ │ │ │ ├── sys_zos_s390x.go
│ │ │ │ ├── sys_zos_s390x.s
│ │ │ │ ├── zsys_aix_ppc64.go
│ │ │ │ ├── zsys_darwin_amd64.go
│ │ │ │ ├── zsys_darwin_arm64.go
│ │ │ │ ├── zsys_dragonfly_amd64.go
│ │ │ │ ├── zsys_freebsd_386.go
│ │ │ │ ├── zsys_freebsd_amd64.go
│ │ │ │ ├── zsys_freebsd_arm.go
│ │ │ │ ├── zsys_freebsd_arm64.go
│ │ │ │ ├── zsys_freebsd_riscv64.go
│ │ │ │ ├── zsys_linux_386.go
│ │ │ │ ├── zsys_linux_amd64.go
│ │ │ │ ├── zsys_linux_arm.go
│ │ │ │ ├── zsys_linux_arm64.go
│ │ │ │ ├── zsys_linux_loong64.go
│ │ │ │ ├── zsys_linux_mips.go
│ │ │ │ ├── zsys_linux_mips64.go
│ │ │ │ ├── zsys_linux_mips64le.go
│ │ │ │ ├── zsys_linux_mipsle.go
│ │ │ │ ├── zsys_linux_ppc.go
│ │ │ │ ├── zsys_linux_ppc64.go
│ │ │ │ ├── zsys_linux_ppc64le.go
│ │ │ │ ├── zsys_linux_riscv64.go
│ │ │ │ ├── zsys_linux_s390x.go
│ │ │ │ ├── zsys_netbsd_386.go
│ │ │ │ ├── zsys_netbsd_amd64.go
│ │ │ │ ├── zsys_netbsd_arm.go
│ │ │ │ ├── zsys_netbsd_arm64.go
│ │ │ │ ├── zsys_openbsd_386.go
│ │ │ │ ├── zsys_openbsd_amd64.go
│ │ │ │ ├── zsys_openbsd_arm.go
│ │ │ │ ├── zsys_openbsd_arm64.go
│ │ │ │ ├── zsys_openbsd_mips64.go
│ │ │ │ ├── zsys_openbsd_ppc64.go
│ │ │ │ ├── zsys_openbsd_riscv64.go
│ │ │ │ ├── zsys_solaris_amd64.go
│ │ │ │ └── zsys_zos_s390x.go
│ │ ├── ipv4
│ │ │ ├── batch.go
│ │ │ ├── control.go
│ │ │ ├── control_bsd.go
│ │ │ ├── control_pktinfo.go
│ │ │ ├── control_stub.go
│ │ │ ├── control_unix.go
│ │ │ ├── control_windows.go
│ │ │ ├── control_zos.go
│ │ │ ├── dgramopt.go
│ │ │ ├── doc.go
│ │ │ ├── endpoint.go
│ │ │ ├── genericopt.go
│ │ │ ├── header.go
│ │ │ ├── helper.go
│ │ │ ├── iana.go
│ │ │ ├── icmp.go
│ │ │ ├── icmp_linux.go
│ │ │ ├── icmp_stub.go
│ │ │ ├── packet.go
│ │ │ ├── payload.go
│ │ │ ├── payload_cmsg.go
│ │ │ ├── payload_nocmsg.go
│ │ │ ├── sockopt.go
│ │ │ ├── sockopt_posix.go
│ │ │ ├── sockopt_stub.go
│ │ │ ├── sys_aix.go
│ │ │ ├── sys_asmreq.go
│ │ │ ├── sys_asmreq_stub.go
│ │ │ ├── sys_asmreqn.go
│ │ │ ├── sys_asmreqn_stub.go
│ │ │ ├── sys_bpf.go
│ │ │ ├── sys_bpf_stub.go
│ │ │ ├── sys_bsd.go
│ │ │ ├── sys_darwin.go
│ │ │ ├── sys_dragonfly.go
│ │ │ ├── sys_freebsd.go
│ │ │ ├── sys_linux.go
│ │ │ ├── sys_solaris.go
│ │ │ ├── sys_ssmreq.go
│ │ │ ├── sys_ssmreq_stub.go
│ │ │ ├── sys_stub.go
│ │ │ ├── sys_windows.go
│ │ │ ├── sys_zos.go
│ │ │ ├── zsys_aix_ppc64.go
│ │ │ ├── zsys_darwin.go
│ │ │ ├── zsys_dragonfly.go
│ │ │ ├── zsys_freebsd_386.go
│ │ │ ├── zsys_freebsd_amd64.go
│ │ │ ├── zsys_freebsd_arm.go
│ │ │ ├── zsys_freebsd_arm64.go
│ │ │ ├── zsys_freebsd_riscv64.go
│ │ │ ├── zsys_linux_386.go
│ │ │ ├── zsys_linux_amd64.go
│ │ │ ├── zsys_linux_arm.go
│ │ │ ├── zsys_linux_arm64.go
│ │ │ ├── zsys_linux_loong64.go
│ │ │ ├── zsys_linux_mips.go
│ │ │ ├── zsys_linux_mips64.go
│ │ │ ├── zsys_linux_mips64le.go
│ │ │ ├── zsys_linux_mipsle.go
│ │ │ ├── zsys_linux_ppc.go
│ │ │ ├── zsys_linux_ppc64.go
│ │ │ ├── zsys_linux_ppc64le.go
│ │ │ ├── zsys_linux_riscv64.go
│ │ │ ├── zsys_linux_s390x.go
│ │ │ ├── zsys_netbsd.go
│ │ │ ├── zsys_openbsd.go
│ │ │ ├── zsys_solaris.go
│ │ │ └── zsys_zos_s390x.go
│ │ └── ipv6
│ │ │ ├── batch.go
│ │ │ ├── control.go
│ │ │ ├── control_rfc2292_unix.go
│ │ │ ├── control_rfc3542_unix.go
│ │ │ ├── control_stub.go
│ │ │ ├── control_unix.go
│ │ │ ├── control_windows.go
│ │ │ ├── dgramopt.go
│ │ │ ├── doc.go
│ │ │ ├── endpoint.go
│ │ │ ├── genericopt.go
│ │ │ ├── header.go
│ │ │ ├── helper.go
│ │ │ ├── iana.go
│ │ │ ├── icmp.go
│ │ │ ├── icmp_bsd.go
│ │ │ ├── icmp_linux.go
│ │ │ ├── icmp_solaris.go
│ │ │ ├── icmp_stub.go
│ │ │ ├── icmp_windows.go
│ │ │ ├── icmp_zos.go
│ │ │ ├── payload.go
│ │ │ ├── payload_cmsg.go
│ │ │ ├── payload_nocmsg.go
│ │ │ ├── sockopt.go
│ │ │ ├── sockopt_posix.go
│ │ │ ├── sockopt_stub.go
│ │ │ ├── sys_aix.go
│ │ │ ├── sys_asmreq.go
│ │ │ ├── sys_asmreq_stub.go
│ │ │ ├── sys_bpf.go
│ │ │ ├── sys_bpf_stub.go
│ │ │ ├── sys_bsd.go
│ │ │ ├── sys_darwin.go
│ │ │ ├── sys_freebsd.go
│ │ │ ├── sys_linux.go
│ │ │ ├── sys_solaris.go
│ │ │ ├── sys_ssmreq.go
│ │ │ ├── sys_ssmreq_stub.go
│ │ │ ├── sys_stub.go
│ │ │ ├── sys_windows.go
│ │ │ ├── sys_zos.go
│ │ │ ├── zsys_aix_ppc64.go
│ │ │ ├── zsys_darwin.go
│ │ │ ├── zsys_dragonfly.go
│ │ │ ├── zsys_freebsd_386.go
│ │ │ ├── zsys_freebsd_amd64.go
│ │ │ ├── zsys_freebsd_arm.go
│ │ │ ├── zsys_freebsd_arm64.go
│ │ │ ├── zsys_freebsd_riscv64.go
│ │ │ ├── zsys_linux_386.go
│ │ │ ├── zsys_linux_amd64.go
│ │ │ ├── zsys_linux_arm.go
│ │ │ ├── zsys_linux_arm64.go
│ │ │ ├── zsys_linux_loong64.go
│ │ │ ├── zsys_linux_mips.go
│ │ │ ├── zsys_linux_mips64.go
│ │ │ ├── zsys_linux_mips64le.go
│ │ │ ├── zsys_linux_mipsle.go
│ │ │ ├── zsys_linux_ppc.go
│ │ │ ├── zsys_linux_ppc64.go
│ │ │ ├── zsys_linux_ppc64le.go
│ │ │ ├── zsys_linux_riscv64.go
│ │ │ ├── zsys_linux_s390x.go
│ │ │ ├── zsys_netbsd.go
│ │ │ ├── zsys_openbsd.go
│ │ │ ├── zsys_solaris.go
│ │ │ └── zsys_zos_s390x.go
│ │ ├── sync
│ │ ├── LICENSE
│ │ ├── PATENTS
│ │ └── errgroup
│ │ │ ├── errgroup.go
│ │ │ ├── go120.go
│ │ │ └── pre_go120.go
│ │ ├── sys
│ │ ├── LICENSE
│ │ ├── PATENTS
│ │ ├── cpu
│ │ │ ├── asm_aix_ppc64.s
│ │ │ ├── byteorder.go
│ │ │ ├── cpu.go
│ │ │ ├── cpu_aix.go
│ │ │ ├── cpu_arm.go
│ │ │ ├── cpu_arm64.go
│ │ │ ├── cpu_arm64.s
│ │ │ ├── cpu_gc_arm64.go
│ │ │ ├── cpu_gc_s390x.go
│ │ │ ├── cpu_gc_x86.go
│ │ │ ├── cpu_gccgo_arm64.go
│ │ │ ├── cpu_gccgo_s390x.go
│ │ │ ├── cpu_gccgo_x86.c
│ │ │ ├── cpu_gccgo_x86.go
│ │ │ ├── cpu_linux.go
│ │ │ ├── cpu_linux_arm.go
│ │ │ ├── cpu_linux_arm64.go
│ │ │ ├── cpu_linux_mips64x.go
│ │ │ ├── cpu_linux_noinit.go
│ │ │ ├── cpu_linux_ppc64x.go
│ │ │ ├── cpu_linux_s390x.go
│ │ │ ├── cpu_loong64.go
│ │ │ ├── cpu_mips64x.go
│ │ │ ├── cpu_mipsx.go
│ │ │ ├── cpu_netbsd_arm64.go
│ │ │ ├── cpu_openbsd_arm64.go
│ │ │ ├── cpu_openbsd_arm64.s
│ │ │ ├── cpu_other_arm.go
│ │ │ ├── cpu_other_arm64.go
│ │ │ ├── cpu_other_mips64x.go
│ │ │ ├── cpu_other_ppc64x.go
│ │ │ ├── cpu_other_riscv64.go
│ │ │ ├── cpu_ppc64x.go
│ │ │ ├── cpu_riscv64.go
│ │ │ ├── cpu_s390x.go
│ │ │ ├── cpu_s390x.s
│ │ │ ├── cpu_wasm.go
│ │ │ ├── cpu_x86.go
│ │ │ ├── cpu_x86.s
│ │ │ ├── cpu_zos.go
│ │ │ ├── cpu_zos_s390x.go
│ │ │ ├── endian_big.go
│ │ │ ├── endian_little.go
│ │ │ ├── hwcap_linux.go
│ │ │ ├── parse.go
│ │ │ ├── proc_cpuinfo_linux.go
│ │ │ ├── runtime_auxv.go
│ │ │ ├── runtime_auxv_go121.go
│ │ │ ├── syscall_aix_gccgo.go
│ │ │ └── syscall_aix_ppc64_gc.go
│ │ ├── execabs
│ │ │ ├── execabs.go
│ │ │ ├── execabs_go118.go
│ │ │ └── execabs_go119.go
│ │ ├── internal
│ │ │ └── unsafeheader
│ │ │ │ └── unsafeheader.go
│ │ ├── unix
│ │ │ ├── .gitignore
│ │ │ ├── README.md
│ │ │ ├── affinity_linux.go
│ │ │ ├── aliases.go
│ │ │ ├── asm_aix_ppc64.s
│ │ │ ├── asm_bsd_386.s
│ │ │ ├── asm_bsd_amd64.s
│ │ │ ├── asm_bsd_arm.s
│ │ │ ├── asm_bsd_arm64.s
│ │ │ ├── asm_bsd_ppc64.s
│ │ │ ├── asm_bsd_riscv64.s
│ │ │ ├── asm_linux_386.s
│ │ │ ├── asm_linux_amd64.s
│ │ │ ├── asm_linux_arm.s
│ │ │ ├── asm_linux_arm64.s
│ │ │ ├── asm_linux_loong64.s
│ │ │ ├── asm_linux_mips64x.s
│ │ │ ├── asm_linux_mipsx.s
│ │ │ ├── asm_linux_ppc64x.s
│ │ │ ├── asm_linux_riscv64.s
│ │ │ ├── asm_linux_s390x.s
│ │ │ ├── asm_openbsd_mips64.s
│ │ │ ├── asm_solaris_amd64.s
│ │ │ ├── asm_zos_s390x.s
│ │ │ ├── bluetooth_linux.go
│ │ │ ├── cap_freebsd.go
│ │ │ ├── constants.go
│ │ │ ├── dev_aix_ppc.go
│ │ │ ├── dev_aix_ppc64.go
│ │ │ ├── dev_darwin.go
│ │ │ ├── dev_dragonfly.go
│ │ │ ├── dev_freebsd.go
│ │ │ ├── dev_linux.go
│ │ │ ├── dev_netbsd.go
│ │ │ ├── dev_openbsd.go
│ │ │ ├── dev_zos.go
│ │ │ ├── dirent.go
│ │ │ ├── endian_big.go
│ │ │ ├── endian_little.go
│ │ │ ├── env_unix.go
│ │ │ ├── epoll_zos.go
│ │ │ ├── fcntl.go
│ │ │ ├── fcntl_darwin.go
│ │ │ ├── fcntl_linux_32bit.go
│ │ │ ├── fdset.go
│ │ │ ├── fstatfs_zos.go
│ │ │ ├── gccgo.go
│ │ │ ├── gccgo_c.c
│ │ │ ├── gccgo_linux_amd64.go
│ │ │ ├── ifreq_linux.go
│ │ │ ├── ioctl_linux.go
│ │ │ ├── ioctl_signed.go
│ │ │ ├── ioctl_unsigned.go
│ │ │ ├── ioctl_zos.go
│ │ │ ├── mkall.sh
│ │ │ ├── mkerrors.sh
│ │ │ ├── mremap.go
│ │ │ ├── pagesize_unix.go
│ │ │ ├── pledge_openbsd.go
│ │ │ ├── ptrace_darwin.go
│ │ │ ├── ptrace_ios.go
│ │ │ ├── race.go
│ │ │ ├── race0.go
│ │ │ ├── readdirent_getdents.go
│ │ │ ├── readdirent_getdirentries.go
│ │ │ ├── sockcmsg_dragonfly.go
│ │ │ ├── sockcmsg_linux.go
│ │ │ ├── sockcmsg_unix.go
│ │ │ ├── sockcmsg_unix_other.go
│ │ │ ├── syscall.go
│ │ │ ├── syscall_aix.go
│ │ │ ├── syscall_aix_ppc.go
│ │ │ ├── syscall_aix_ppc64.go
│ │ │ ├── syscall_bsd.go
│ │ │ ├── syscall_darwin.go
│ │ │ ├── syscall_darwin_amd64.go
│ │ │ ├── syscall_darwin_arm64.go
│ │ │ ├── syscall_darwin_libSystem.go
│ │ │ ├── syscall_dragonfly.go
│ │ │ ├── syscall_dragonfly_amd64.go
│ │ │ ├── syscall_freebsd.go
│ │ │ ├── syscall_freebsd_386.go
│ │ │ ├── syscall_freebsd_amd64.go
│ │ │ ├── syscall_freebsd_arm.go
│ │ │ ├── syscall_freebsd_arm64.go
│ │ │ ├── syscall_freebsd_riscv64.go
│ │ │ ├── syscall_hurd.go
│ │ │ ├── syscall_hurd_386.go
│ │ │ ├── syscall_illumos.go
│ │ │ ├── syscall_linux.go
│ │ │ ├── syscall_linux_386.go
│ │ │ ├── syscall_linux_alarm.go
│ │ │ ├── syscall_linux_amd64.go
│ │ │ ├── syscall_linux_amd64_gc.go
│ │ │ ├── syscall_linux_arm.go
│ │ │ ├── syscall_linux_arm64.go
│ │ │ ├── syscall_linux_gc.go
│ │ │ ├── syscall_linux_gc_386.go
│ │ │ ├── syscall_linux_gc_arm.go
│ │ │ ├── syscall_linux_gccgo_386.go
│ │ │ ├── syscall_linux_gccgo_arm.go
│ │ │ ├── syscall_linux_loong64.go
│ │ │ ├── syscall_linux_mips64x.go
│ │ │ ├── syscall_linux_mipsx.go
│ │ │ ├── syscall_linux_ppc.go
│ │ │ ├── syscall_linux_ppc64x.go
│ │ │ ├── syscall_linux_riscv64.go
│ │ │ ├── syscall_linux_s390x.go
│ │ │ ├── syscall_linux_sparc64.go
│ │ │ ├── syscall_netbsd.go
│ │ │ ├── syscall_netbsd_386.go
│ │ │ ├── syscall_netbsd_amd64.go
│ │ │ ├── syscall_netbsd_arm.go
│ │ │ ├── syscall_netbsd_arm64.go
│ │ │ ├── syscall_openbsd.go
│ │ │ ├── syscall_openbsd_386.go
│ │ │ ├── syscall_openbsd_amd64.go
│ │ │ ├── syscall_openbsd_arm.go
│ │ │ ├── syscall_openbsd_arm64.go
│ │ │ ├── syscall_openbsd_libc.go
│ │ │ ├── syscall_openbsd_mips64.go
│ │ │ ├── syscall_openbsd_ppc64.go
│ │ │ ├── syscall_openbsd_riscv64.go
│ │ │ ├── syscall_solaris.go
│ │ │ ├── syscall_solaris_amd64.go
│ │ │ ├── syscall_unix.go
│ │ │ ├── syscall_unix_gc.go
│ │ │ ├── syscall_unix_gc_ppc64x.go
│ │ │ ├── syscall_zos_s390x.go
│ │ │ ├── sysvshm_linux.go
│ │ │ ├── sysvshm_unix.go
│ │ │ ├── sysvshm_unix_other.go
│ │ │ ├── timestruct.go
│ │ │ ├── unveil_openbsd.go
│ │ │ ├── xattr_bsd.go
│ │ │ ├── zerrors_aix_ppc.go
│ │ │ ├── zerrors_aix_ppc64.go
│ │ │ ├── zerrors_darwin_amd64.go
│ │ │ ├── zerrors_darwin_arm64.go
│ │ │ ├── zerrors_dragonfly_amd64.go
│ │ │ ├── zerrors_freebsd_386.go
│ │ │ ├── zerrors_freebsd_amd64.go
│ │ │ ├── zerrors_freebsd_arm.go
│ │ │ ├── zerrors_freebsd_arm64.go
│ │ │ ├── zerrors_freebsd_riscv64.go
│ │ │ ├── zerrors_linux.go
│ │ │ ├── zerrors_linux_386.go
│ │ │ ├── zerrors_linux_amd64.go
│ │ │ ├── zerrors_linux_arm.go
│ │ │ ├── zerrors_linux_arm64.go
│ │ │ ├── zerrors_linux_loong64.go
│ │ │ ├── zerrors_linux_mips.go
│ │ │ ├── zerrors_linux_mips64.go
│ │ │ ├── zerrors_linux_mips64le.go
│ │ │ ├── zerrors_linux_mipsle.go
│ │ │ ├── zerrors_linux_ppc.go
│ │ │ ├── zerrors_linux_ppc64.go
│ │ │ ├── zerrors_linux_ppc64le.go
│ │ │ ├── zerrors_linux_riscv64.go
│ │ │ ├── zerrors_linux_s390x.go
│ │ │ ├── zerrors_linux_sparc64.go
│ │ │ ├── zerrors_netbsd_386.go
│ │ │ ├── zerrors_netbsd_amd64.go
│ │ │ ├── zerrors_netbsd_arm.go
│ │ │ ├── zerrors_netbsd_arm64.go
│ │ │ ├── zerrors_openbsd_386.go
│ │ │ ├── zerrors_openbsd_amd64.go
│ │ │ ├── zerrors_openbsd_arm.go
│ │ │ ├── zerrors_openbsd_arm64.go
│ │ │ ├── zerrors_openbsd_mips64.go
│ │ │ ├── zerrors_openbsd_ppc64.go
│ │ │ ├── zerrors_openbsd_riscv64.go
│ │ │ ├── zerrors_solaris_amd64.go
│ │ │ ├── zerrors_zos_s390x.go
│ │ │ ├── zptrace_armnn_linux.go
│ │ │ ├── zptrace_linux_arm64.go
│ │ │ ├── zptrace_mipsnn_linux.go
│ │ │ ├── zptrace_mipsnnle_linux.go
│ │ │ ├── zptrace_x86_linux.go
│ │ │ ├── zsyscall_aix_ppc.go
│ │ │ ├── zsyscall_aix_ppc64.go
│ │ │ ├── zsyscall_aix_ppc64_gc.go
│ │ │ ├── zsyscall_aix_ppc64_gccgo.go
│ │ │ ├── zsyscall_darwin_amd64.go
│ │ │ ├── zsyscall_darwin_amd64.s
│ │ │ ├── zsyscall_darwin_arm64.go
│ │ │ ├── zsyscall_darwin_arm64.s
│ │ │ ├── zsyscall_dragonfly_amd64.go
│ │ │ ├── zsyscall_freebsd_386.go
│ │ │ ├── zsyscall_freebsd_amd64.go
│ │ │ ├── zsyscall_freebsd_arm.go
│ │ │ ├── zsyscall_freebsd_arm64.go
│ │ │ ├── zsyscall_freebsd_riscv64.go
│ │ │ ├── zsyscall_illumos_amd64.go
│ │ │ ├── zsyscall_linux.go
│ │ │ ├── zsyscall_linux_386.go
│ │ │ ├── zsyscall_linux_amd64.go
│ │ │ ├── zsyscall_linux_arm.go
│ │ │ ├── zsyscall_linux_arm64.go
│ │ │ ├── zsyscall_linux_loong64.go
│ │ │ ├── zsyscall_linux_mips.go
│ │ │ ├── zsyscall_linux_mips64.go
│ │ │ ├── zsyscall_linux_mips64le.go
│ │ │ ├── zsyscall_linux_mipsle.go
│ │ │ ├── zsyscall_linux_ppc.go
│ │ │ ├── zsyscall_linux_ppc64.go
│ │ │ ├── zsyscall_linux_ppc64le.go
│ │ │ ├── zsyscall_linux_riscv64.go
│ │ │ ├── zsyscall_linux_s390x.go
│ │ │ ├── zsyscall_linux_sparc64.go
│ │ │ ├── zsyscall_netbsd_386.go
│ │ │ ├── zsyscall_netbsd_amd64.go
│ │ │ ├── zsyscall_netbsd_arm.go
│ │ │ ├── zsyscall_netbsd_arm64.go
│ │ │ ├── zsyscall_openbsd_386.go
│ │ │ ├── zsyscall_openbsd_386.s
│ │ │ ├── zsyscall_openbsd_amd64.go
│ │ │ ├── zsyscall_openbsd_amd64.s
│ │ │ ├── zsyscall_openbsd_arm.go
│ │ │ ├── zsyscall_openbsd_arm.s
│ │ │ ├── zsyscall_openbsd_arm64.go
│ │ │ ├── zsyscall_openbsd_arm64.s
│ │ │ ├── zsyscall_openbsd_mips64.go
│ │ │ ├── zsyscall_openbsd_mips64.s
│ │ │ ├── zsyscall_openbsd_ppc64.go
│ │ │ ├── zsyscall_openbsd_ppc64.s
│ │ │ ├── zsyscall_openbsd_riscv64.go
│ │ │ ├── zsyscall_openbsd_riscv64.s
│ │ │ ├── zsyscall_solaris_amd64.go
│ │ │ ├── zsyscall_zos_s390x.go
│ │ │ ├── zsysctl_openbsd_386.go
│ │ │ ├── zsysctl_openbsd_amd64.go
│ │ │ ├── zsysctl_openbsd_arm.go
│ │ │ ├── zsysctl_openbsd_arm64.go
│ │ │ ├── zsysctl_openbsd_mips64.go
│ │ │ ├── zsysctl_openbsd_ppc64.go
│ │ │ ├── zsysctl_openbsd_riscv64.go
│ │ │ ├── zsysnum_darwin_amd64.go
│ │ │ ├── zsysnum_darwin_arm64.go
│ │ │ ├── zsysnum_dragonfly_amd64.go
│ │ │ ├── zsysnum_freebsd_386.go
│ │ │ ├── zsysnum_freebsd_amd64.go
│ │ │ ├── zsysnum_freebsd_arm.go
│ │ │ ├── zsysnum_freebsd_arm64.go
│ │ │ ├── zsysnum_freebsd_riscv64.go
│ │ │ ├── zsysnum_linux_386.go
│ │ │ ├── zsysnum_linux_amd64.go
│ │ │ ├── zsysnum_linux_arm.go
│ │ │ ├── zsysnum_linux_arm64.go
│ │ │ ├── zsysnum_linux_loong64.go
│ │ │ ├── zsysnum_linux_mips.go
│ │ │ ├── zsysnum_linux_mips64.go
│ │ │ ├── zsysnum_linux_mips64le.go
│ │ │ ├── zsysnum_linux_mipsle.go
│ │ │ ├── zsysnum_linux_ppc.go
│ │ │ ├── zsysnum_linux_ppc64.go
│ │ │ ├── zsysnum_linux_ppc64le.go
│ │ │ ├── zsysnum_linux_riscv64.go
│ │ │ ├── zsysnum_linux_s390x.go
│ │ │ ├── zsysnum_linux_sparc64.go
│ │ │ ├── zsysnum_netbsd_386.go
│ │ │ ├── zsysnum_netbsd_amd64.go
│ │ │ ├── zsysnum_netbsd_arm.go
│ │ │ ├── zsysnum_netbsd_arm64.go
│ │ │ ├── zsysnum_openbsd_386.go
│ │ │ ├── zsysnum_openbsd_amd64.go
│ │ │ ├── zsysnum_openbsd_arm.go
│ │ │ ├── zsysnum_openbsd_arm64.go
│ │ │ ├── zsysnum_openbsd_mips64.go
│ │ │ ├── zsysnum_openbsd_ppc64.go
│ │ │ ├── zsysnum_openbsd_riscv64.go
│ │ │ ├── zsysnum_zos_s390x.go
│ │ │ ├── ztypes_aix_ppc.go
│ │ │ ├── ztypes_aix_ppc64.go
│ │ │ ├── ztypes_darwin_amd64.go
│ │ │ ├── ztypes_darwin_arm64.go
│ │ │ ├── ztypes_dragonfly_amd64.go
│ │ │ ├── ztypes_freebsd_386.go
│ │ │ ├── ztypes_freebsd_amd64.go
│ │ │ ├── ztypes_freebsd_arm.go
│ │ │ ├── ztypes_freebsd_arm64.go
│ │ │ ├── ztypes_freebsd_riscv64.go
│ │ │ ├── ztypes_linux.go
│ │ │ ├── ztypes_linux_386.go
│ │ │ ├── ztypes_linux_amd64.go
│ │ │ ├── ztypes_linux_arm.go
│ │ │ ├── ztypes_linux_arm64.go
│ │ │ ├── ztypes_linux_loong64.go
│ │ │ ├── ztypes_linux_mips.go
│ │ │ ├── ztypes_linux_mips64.go
│ │ │ ├── ztypes_linux_mips64le.go
│ │ │ ├── ztypes_linux_mipsle.go
│ │ │ ├── ztypes_linux_ppc.go
│ │ │ ├── ztypes_linux_ppc64.go
│ │ │ ├── ztypes_linux_ppc64le.go
│ │ │ ├── ztypes_linux_riscv64.go
│ │ │ ├── ztypes_linux_s390x.go
│ │ │ ├── ztypes_linux_sparc64.go
│ │ │ ├── ztypes_netbsd_386.go
│ │ │ ├── ztypes_netbsd_amd64.go
│ │ │ ├── ztypes_netbsd_arm.go
│ │ │ ├── ztypes_netbsd_arm64.go
│ │ │ ├── ztypes_openbsd_386.go
│ │ │ ├── ztypes_openbsd_amd64.go
│ │ │ ├── ztypes_openbsd_arm.go
│ │ │ ├── ztypes_openbsd_arm64.go
│ │ │ ├── ztypes_openbsd_mips64.go
│ │ │ ├── ztypes_openbsd_ppc64.go
│ │ │ ├── ztypes_openbsd_riscv64.go
│ │ │ ├── ztypes_solaris_amd64.go
│ │ │ └── ztypes_zos_s390x.go
│ │ └── windows
│ │ │ ├── aliases.go
│ │ │ ├── dll_windows.go
│ │ │ ├── empty.s
│ │ │ ├── env_windows.go
│ │ │ ├── eventlog.go
│ │ │ ├── exec_windows.go
│ │ │ ├── memory_windows.go
│ │ │ ├── mkerrors.bash
│ │ │ ├── mkknownfolderids.bash
│ │ │ ├── mksyscall.go
│ │ │ ├── race.go
│ │ │ ├── race0.go
│ │ │ ├── security_windows.go
│ │ │ ├── service.go
│ │ │ ├── setupapi_windows.go
│ │ │ ├── str.go
│ │ │ ├── syscall.go
│ │ │ ├── syscall_windows.go
│ │ │ ├── types_windows.go
│ │ │ ├── types_windows_386.go
│ │ │ ├── types_windows_amd64.go
│ │ │ ├── types_windows_arm.go
│ │ │ ├── types_windows_arm64.go
│ │ │ ├── zerrors_windows.go
│ │ │ ├── zknownfolderids_windows.go
│ │ │ └── zsyscall_windows.go
│ │ └── tools
│ │ ├── LICENSE
│ │ ├── PATENTS
│ │ ├── go
│ │ ├── gcexportdata
│ │ │ ├── gcexportdata.go
│ │ │ └── importer.go
│ │ ├── internal
│ │ │ └── packagesdriver
│ │ │ │ └── sizes.go
│ │ └── packages
│ │ │ ├── doc.go
│ │ │ ├── external.go
│ │ │ ├── golist.go
│ │ │ ├── golist_overlay.go
│ │ │ ├── loadmode_string.go
│ │ │ ├── packages.go
│ │ │ └── visit.go
│ │ └── internal
│ │ ├── event
│ │ ├── core
│ │ │ ├── event.go
│ │ │ ├── export.go
│ │ │ └── fast.go
│ │ ├── doc.go
│ │ ├── event.go
│ │ ├── keys
│ │ │ ├── keys.go
│ │ │ └── standard.go
│ │ ├── label
│ │ │ └── label.go
│ │ └── tag
│ │ │ └── tag.go
│ │ ├── gcimporter
│ │ ├── bimport.go
│ │ ├── exportdata.go
│ │ ├── gcimporter.go
│ │ ├── iexport.go
│ │ ├── iimport.go
│ │ ├── newInterface10.go
│ │ ├── newInterface11.go
│ │ ├── support_go117.go
│ │ ├── support_go118.go
│ │ ├── unified_no.go
│ │ ├── unified_yes.go
│ │ ├── ureader_no.go
│ │ └── ureader_yes.go
│ │ ├── gocommand
│ │ ├── invoke.go
│ │ ├── vendor.go
│ │ └── version.go
│ │ ├── packagesinternal
│ │ └── packages.go
│ │ ├── pkgbits
│ │ ├── codes.go
│ │ ├── decoder.go
│ │ ├── doc.go
│ │ ├── encoder.go
│ │ ├── flags.go
│ │ ├── frames_go1.go
│ │ ├── frames_go17.go
│ │ ├── reloc.go
│ │ ├── support.go
│ │ ├── sync.go
│ │ └── syncmarker_string.go
│ │ ├── tokeninternal
│ │ └── tokeninternal.go
│ │ ├── typeparams
│ │ ├── common.go
│ │ ├── coretype.go
│ │ ├── enabled_go117.go
│ │ ├── enabled_go118.go
│ │ ├── normalize.go
│ │ ├── termlist.go
│ │ ├── typeparams_go117.go
│ │ ├── typeparams_go118.go
│ │ └── typeterm.go
│ │ └── typesinternal
│ │ ├── errorcode.go
│ │ ├── errorcode_string.go
│ │ ├── types.go
│ │ └── types_118.go
├── golang.zx2c4.com
│ └── wireguard
│ │ ├── LICENSE
│ │ ├── ipc
│ │ └── namedpipe
│ │ │ ├── file.go
│ │ │ └── namedpipe.go
│ │ └── wgctrl
│ │ ├── .cibuild.sh
│ │ ├── .gitignore
│ │ ├── CONTRIBUTING.md
│ │ ├── LICENSE.md
│ │ ├── README.md
│ │ ├── client.go
│ │ ├── doc.go
│ │ ├── internal
│ │ ├── wgfreebsd
│ │ │ ├── client_freebsd.go
│ │ │ ├── doc.go
│ │ │ └── internal
│ │ │ │ ├── nv
│ │ │ │ ├── decode.go
│ │ │ │ ├── doc.go
│ │ │ │ ├── encode.go
│ │ │ │ └── types.go
│ │ │ │ └── wgh
│ │ │ │ ├── defs_freebsd_386.go
│ │ │ │ ├── defs_freebsd_amd64.go
│ │ │ │ ├── defs_freebsd_arm.go
│ │ │ │ ├── defs_freebsd_arm64.go
│ │ │ │ ├── doc.go
│ │ │ │ └── generate.sh
│ │ ├── wginternal
│ │ │ ├── client.go
│ │ │ └── doc.go
│ │ ├── wglinux
│ │ │ ├── client_linux.go
│ │ │ ├── configure_linux.go
│ │ │ ├── doc.go
│ │ │ └── parse_linux.go
│ │ ├── wgopenbsd
│ │ │ ├── client_openbsd.go
│ │ │ ├── doc.go
│ │ │ └── internal
│ │ │ │ └── wgh
│ │ │ │ ├── defs_openbsd_386.go
│ │ │ │ ├── defs_openbsd_amd64.go
│ │ │ │ ├── defs_openbsd_arm.go
│ │ │ │ ├── defs_openbsd_arm64.go
│ │ │ │ ├── doc.go
│ │ │ │ └── generate.sh
│ │ ├── wguser
│ │ │ ├── client.go
│ │ │ ├── configure.go
│ │ │ ├── conn_unix.go
│ │ │ ├── conn_windows.go
│ │ │ ├── doc.go
│ │ │ └── parse.go
│ │ └── wgwindows
│ │ │ ├── client_windows.go
│ │ │ └── internal
│ │ │ └── ioctl
│ │ │ ├── configuration_windows.go
│ │ │ └── winipcfg_windows.go
│ │ ├── os_freebsd.go
│ │ ├── os_linux.go
│ │ ├── os_openbsd.go
│ │ ├── os_userspace.go
│ │ ├── os_windows.go
│ │ └── wgtypes
│ │ ├── doc.go
│ │ ├── errors.go
│ │ └── types.go
└── modules.txt
└── wg.go
/.github/workflows/test.yml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 |
8 | jobs:
9 | test:
10 | runs-on: ubuntu-latest
11 |
12 | steps:
13 | - uses: actions/checkout@v3
14 |
15 | - name: 'Set up Go'
16 | uses: actions/setup-go@v3
17 | with:
18 | go-version: '1.19.3'
19 |
20 | - name: 'Test'
21 | run: make test
22 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | bin/
2 | config
3 | *.db
4 | node_modules
5 | dist
6 | logs
7 | *.log
8 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM busybox AS build-env
2 | RUN mkdir -p -m 1755 /foo/tmp
3 |
4 | FROM scratch
5 | ADD bin/wgn-managercli_linux_amd64 /wgn_managercli
6 | ADD bin/wgnetwork_linux_amd64 /wgnetwork
7 | COPY --from=build-env /tmp /tmp
8 |
9 | CMD ["/wgnetwork"]
10 |
--------------------------------------------------------------------------------
/cmd/service/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "context"
5 | "log"
6 | "os/signal"
7 | "syscall"
8 |
9 | "wgnetwork"
10 | )
11 |
12 | func main() {
13 | ctx, cancel := signal.NotifyContext(
14 | context.Background(),
15 | syscall.SIGINT, syscall.SIGTERM)
16 | defer cancel()
17 |
18 | s, err := wgnetwork.Init(ctx)
19 | if err != nil {
20 | log.Fatal(err)
21 | }
22 |
23 | s.Run()
24 | }
25 |
--------------------------------------------------------------------------------
/config.example:
--------------------------------------------------------------------------------
1 | bin_dir=./bin
2 | log_level=debug
3 | db_path=wgnetwork.db
4 | wg_binary=/usr/bin/wg
5 | wg_iface=wg0
6 | wg_port=51820
7 | wg_cidr=172.16.0.1/24
8 | dns_tcp_port=53
9 | dns_udp_port=53
10 | dns_resolver_addrs=8.8.8.8:53,8.8.4.4:53,1.1.1.1:53
11 | dns_zone=wgn.
12 | fe_http_port=8080
13 | api_http_port=8081
14 | api_unix_socket=/tmp/wgmanager.sock
15 | otp_issuer=wgnetwork
16 | httporigin=
17 | session_secret=secret
18 | session_ttl=5m
19 | nft_enabled=false
20 | nft_default_policy=drop
21 | dev_hostname=
22 | dev_authip=
23 |
--------------------------------------------------------------------------------
/femanager/spa/index.gohtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/femanager/spa/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/femanager/spa/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fe",
3 | "version": "0.0.0",
4 | "lockfileVersion": 3,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "fe",
9 | "version": "0.0.0",
10 | "devDependencies": {}
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/femanager/spa/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fe",
3 | "private": true,
4 | "version": "0.0.0",
5 | "type": "module",
6 | "scripts": {
7 | "dev": "vite",
8 | "build": "vite build",
9 | "preview": "vite preview"
10 | },
11 | "devDependencies": {
12 | "@sveltejs/vite-plugin-svelte": "^2.4.2",
13 | "@tailwindcss/forms": "^0.5.3",
14 | "autoprefixer": "^10.4.14",
15 | "postcss": "^8.4.25",
16 | "svelte": "^3.59.2",
17 | "tailwindcss": "^3.3.2",
18 | "vite": "^4.4.2"
19 | },
20 | "dependencies": {
21 | "qr-code-styling": "^1.6.0-rc.1"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/femanager/spa/postcss.config.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {}
5 | },
6 | }
7 |
--------------------------------------------------------------------------------
/femanager/spa/src/App/Shared/Components/CardHeading.svelte:
--------------------------------------------------------------------------------
1 |
8 |
9 |
10 |
11 |
{title}
12 | {#if isLoading}
{/if}
13 |
{description}
14 |
15 |
--------------------------------------------------------------------------------
/femanager/spa/src/App/Shared/Components/Icon/Mini/ArchiveBoxArrowDown.svelte:
--------------------------------------------------------------------------------
1 |
4 |
5 |
8 |
--------------------------------------------------------------------------------
/femanager/spa/src/App/Shared/Components/Icon/Mini/ChevronRight.svelte:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
9 |
--------------------------------------------------------------------------------
/femanager/spa/src/App/Shared/Components/Icon/Mini/ClipboardDocument.svelte:
--------------------------------------------------------------------------------
1 |
4 |
5 |
9 |
--------------------------------------------------------------------------------
/femanager/spa/src/App/Shared/Components/Icon/Mini/ExclamationCircle.svelte:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
9 |
--------------------------------------------------------------------------------
/femanager/spa/src/App/Shared/Components/Icon/Outline/ComputerDesktop.svelte:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
9 |
--------------------------------------------------------------------------------
/femanager/spa/src/App/Shared/Components/Icon/Outline/ExclamationTriangle.svelte:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
9 |
--------------------------------------------------------------------------------
/femanager/spa/src/App/Shared/Components/Icon/Outline/LockClosed.svelte:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
9 |
--------------------------------------------------------------------------------
/femanager/spa/src/App/Shared/Components/Link.svelte:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/femanager/spa/src/App/Shared/Components/QRCode.svelte:
--------------------------------------------------------------------------------
1 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/femanager/spa/src/App/Shared/Components/Spinner.svelte:
--------------------------------------------------------------------------------
1 |
4 |
5 |
9 |
--------------------------------------------------------------------------------
/femanager/spa/src/App/state/index.js:
--------------------------------------------------------------------------------
1 | import routes from './routes.js';
2 | import router from './router.js';
3 | import { moveTo, moveBack } from './router.js';
4 | import { authToken, curPath, curRoute } from './store.js';
5 |
6 | export {
7 | routes, router,
8 | moveTo, moveBack,
9 | authToken, curPath, curRoute,
10 | };
11 |
--------------------------------------------------------------------------------
/femanager/spa/src/App/state/router.js:
--------------------------------------------------------------------------------
1 | "use strict"
2 |
3 | import Router from '../../lib/router.js';
4 | import routes from './routes.js';
5 | import { curPath } from './store.js';
6 |
7 | let router = new Router();
8 | for (let [k, v] of Object.entries(routes)) {
9 | router.Add(v.path, v.name, v.handler);
10 | }
11 |
12 | function moveTo(path) {
13 | curPath.set(path);
14 |
15 | window.history.pushState(
16 | {path: path},
17 | '',
18 | window.location.origin + path);
19 | }
20 |
21 | function moveBack() {
22 | window.history.back();
23 | }
24 |
25 | export default router;
26 | export { moveTo, moveBack };
27 |
--------------------------------------------------------------------------------
/femanager/spa/src/App/state/store.js:
--------------------------------------------------------------------------------
1 | import { writable, derived } from 'svelte/store';
2 |
3 | export const authToken = writable('');
4 | export const curPath = writable('');
5 | export const curRoute = derived(
6 | [curPath, authToken],
7 | ([$curPath, $authToken]) => {
8 | return {"token": $authToken, "path": $curPath};
9 | }
10 | );
11 |
--------------------------------------------------------------------------------
/femanager/spa/src/App/util/dom.js:
--------------------------------------------------------------------------------
1 | "use strict"
2 |
3 | function setHtmlClass(...cssClass) {
4 | let root = document.getElementsByTagName('html');
5 | if (root !== "undefined" && root.length > 0) {
6 | root = root[0];
7 | }
8 | root.className = ''; // remove all classes
9 | root.classList.add(...cssClass);
10 | }
11 |
12 | function setBodyClass(...cssClass) {
13 | document.body.className = ''; // remove all classes
14 | document.body.classList.add(...cssClass);
15 | }
16 |
17 | export {
18 | setHtmlClass,
19 | setBodyClass
20 | };
21 |
--------------------------------------------------------------------------------
/femanager/spa/src/app.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
--------------------------------------------------------------------------------
/femanager/spa/src/main.js:
--------------------------------------------------------------------------------
1 | import './app.css'
2 | import App from './App/App.svelte'
3 |
4 | const app = new App({
5 | target: document.getElementById('app'),
6 | props: {
7 | apiUrl: API_URL,
8 | }
9 | })
10 |
11 | export default app
12 |
--------------------------------------------------------------------------------
/femanager/spa/tailwind.config.cjs:
--------------------------------------------------------------------------------
1 | /** @type {import('tailwindcss').Config} */
2 | module.exports = {
3 | content: ['./src/**/*.{html,js,svelte}'],
4 | theme: {
5 | extend: {},
6 | },
7 | plugins: [
8 | require('@tailwindcss/forms'),
9 | ],
10 | }
11 |
--------------------------------------------------------------------------------
/femanager/spa/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import { svelte } from '@sveltejs/vite-plugin-svelte'
3 |
4 | // https://vitejs.dev/config/
5 | export default defineConfig({
6 | plugins: [svelte()],
7 | build: {
8 | rollupOptions: {
9 | output: {
10 | entryFileNames: `assets/[name].js`,
11 | chunkFileNames: `assets/[name].js`,
12 | assetFileNames: `assets/[name].[ext]`
13 | }
14 | }
15 | }
16 | })
17 |
--------------------------------------------------------------------------------
/firewall/config.go:
--------------------------------------------------------------------------------
1 | package firewall
2 |
3 | // Config for nftables.
4 | type Config struct {
5 | Enabled bool
6 | NetworkNamespace string
7 | DefaultPolicy string
8 | WGIface string
9 | WGPort uint16
10 | Ifaces []string
11 | TrustPorts []uint16
12 | }
13 |
--------------------------------------------------------------------------------
/firewall/config_linux.go:
--------------------------------------------------------------------------------
1 | //go:build linux
2 | // +build linux
3 |
4 | package firewall
5 |
6 | import (
7 | "github.com/google/nftables"
8 | "github.com/google/nftables/binaryutil"
9 | )
10 |
11 | func (c *Config) trustPorts() []nftables.SetElement {
12 | elems := make([]nftables.SetElement, len(c.TrustPorts))
13 | for i, p := range c.TrustPorts {
14 | elems[i] = nftables.SetElement{Key: binaryutil.BigEndian.PutUint16(p)}
15 | }
16 |
17 | return elems
18 | }
19 |
--------------------------------------------------------------------------------
/model/user_session_test.go:
--------------------------------------------------------------------------------
1 | package model
2 |
3 | import (
4 | "testing"
5 | "time"
6 | )
7 |
8 | func TestEnvelope(t *testing.T) {
9 | expires := time.Now().UTC().Add(time.Hour)
10 | secretKey := "app_secret_key"
11 | payload := []string{
12 | "VdjNo8P6dw2mVvqijt8b",
13 | "verify-email",
14 | "forgot-password",
15 | }
16 |
17 | for _, item := range payload {
18 | envelope, err := NewEnvelope(
19 | secretKey,
20 | "182717de-a19f-4d59-a40e-afd5fda729aa",
21 | item,
22 | expires,
23 | )
24 |
25 | parsed, err := ParseEnvelope(envelope.String())
26 | if err != nil {
27 | t.Error(err)
28 | }
29 |
30 | if !parsed.CheckSignature(secretKey) {
31 | t.Errorf("secret not valid")
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/pkg/cli/interfaces.go:
--------------------------------------------------------------------------------
1 | package cli
2 |
3 | // logger desribes interface of log object.
4 | type logger interface {
5 | Debug(...interface{})
6 | Debugf(string, ...interface{})
7 | Info(...interface{})
8 | Infof(string, ...interface{})
9 | Warning(...interface{})
10 | Warningf(string, ...interface{})
11 | Error(...interface{})
12 | Errorf(string, ...interface{})
13 | }
14 |
--------------------------------------------------------------------------------
/pkg/iface/iface.go:
--------------------------------------------------------------------------------
1 | // +build !linux
2 |
3 | package iface
4 |
5 | import "net"
6 |
7 | // Create network link for interface mock.
8 | func Create(
9 | log logger,
10 | iface, linkType string,
11 | ip net.IP, ipNet *net.IPNet,
12 | ) error {
13 | return nil
14 | }
15 |
16 | // Remove network link for interface mock.
17 | func Remove(log logger, iface string) error {
18 | return nil
19 | }
20 |
21 | // logger desribes interface of log object.
22 | type logger interface {
23 | Debugf(string, ...interface{})
24 | }
25 |
--------------------------------------------------------------------------------
/pkg/pretty/table_test.go:
--------------------------------------------------------------------------------
1 | package pretty
2 |
3 | import (
4 | "fmt"
5 | "testing"
6 | )
7 |
8 | func TestTableRender(t *testing.T) {
9 | table := NewTable(5)
10 | table.SetColumnMinSize(0, 8)
11 | table.SetColumnMinSize(1, 7)
12 | table.SetColumnMinSize(2, 7)
13 | table.SetColumnMinSize(3, 10)
14 | table.SetColumnMinSize(4, 8)
15 | table.SetColumnAlign(0, TextAlignRight)
16 | table.SetHeader([]string{"symbol", "low", "high", "date", "time utc"})
17 | table.AddRow([]string{"Item1", "0.2345", "0.2453", "2022-11-28", "14:00:00"})
18 | table.AddRow([]string{"Item2", "0.7988", "0.8311", "2022-11-28", "14:00:00"})
19 | s := table.Render()
20 |
21 | fmt.Printf("%s\n", s)
22 | }
23 |
--------------------------------------------------------------------------------
/pkg/pretty/text_test.go:
--------------------------------------------------------------------------------
1 | package pretty
2 |
3 | import (
4 | "fmt"
5 | "testing"
6 | )
7 |
8 | func TestAlignText(t *testing.T) {
9 | var s string
10 |
11 | s = AlignText("John Snow", 12, TextAlignLeft)
12 | fmt.Printf("%q\n", s)
13 |
14 | s = AlignText("John Snow", 12, TextAlignCenter)
15 | fmt.Printf("%q\n", s)
16 |
17 | s = AlignText("John Snow", 12, TextAlignJustify)
18 | fmt.Printf("%q\n", s)
19 |
20 | s = AlignText("John Snow", 12, TextAlignRight)
21 | fmt.Printf("%q\n", s)
22 |
23 | s = AlignText("John Doe", 12, TextAlignLeft)
24 | fmt.Printf("%q\n", s)
25 |
26 | s = AlignText("John Doe", 12, TextAlignCenter)
27 | fmt.Printf("%q\n", s)
28 |
29 | s = AlignText("John Doe", 12, TextAlignJustify)
30 | fmt.Printf("%q\n", s)
31 |
32 | s = AlignText("John Doe", 12, TextAlignRight)
33 | fmt.Printf("%q\n", s)
34 | }
35 |
--------------------------------------------------------------------------------
/pkg/rand/rand.go:
--------------------------------------------------------------------------------
1 | package rand
2 |
3 | import (
4 | crand "crypto/rand"
5 | "math/rand"
6 | "time"
7 | )
8 |
9 | func init() {
10 | rand.Seed(time.Now().UnixNano())
11 | }
12 |
13 | const letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
14 |
15 | // RandomString generates random string of n characters len.
16 | func RandomString(n int) string {
17 | b := make([]byte, n)
18 | for i := range b {
19 | b[i] = letters[rand.Int63()%int64(len(letters))]
20 | }
21 | return string(b)
22 | }
23 |
24 | // CRandomBytes generates random bytes slice of n characters len.
25 | func CRandomBytes(n int) ([]byte, error) {
26 | b := make([]byte, n)
27 | _, err := crand.Read(b)
28 | if err != nil {
29 | return nil, err
30 | }
31 | return b, nil
32 | }
33 |
--------------------------------------------------------------------------------
/pkg/wgmngr/wgctrl.go:
--------------------------------------------------------------------------------
1 | // +build !linux
2 |
3 | package wgmngr
4 |
5 | import "golang.zx2c4.com/wireguard/wgctrl/wgtypes"
6 |
7 | func configureDevice(iface string, cfg wgtypes.Config) error {
8 | return nil
9 | }
10 |
--------------------------------------------------------------------------------
/pkg/wgmngr/wgctrl_linux.go:
--------------------------------------------------------------------------------
1 | //go:build linux
2 | // +build linux
3 |
4 | package wgmngr
5 |
6 | import (
7 | "golang.zx2c4.com/wireguard/wgctrl"
8 | "golang.zx2c4.com/wireguard/wgctrl/wgtypes"
9 | )
10 |
11 | func configureDevice(iface string, cfg wgtypes.Config) error {
12 | ctrl, err := wgctrl.New()
13 | if err != nil {
14 | return err
15 | }
16 | defer ctrl.Close()
17 |
18 | return ctrl.ConfigureDevice(iface, cfg)
19 | }
20 |
--------------------------------------------------------------------------------
/stuff/screenshots/01-auth.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zyablitsev/wgnetwork/ac381af876574c4ae506826bc51bc69734c12019/stuff/screenshots/01-auth.png
--------------------------------------------------------------------------------
/stuff/screenshots/02-server.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zyablitsev/wgnetwork/ac381af876574c4ae506826bc51bc69734c12019/stuff/screenshots/02-server.png
--------------------------------------------------------------------------------
/stuff/screenshots/03-users.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zyablitsev/wgnetwork/ac381af876574c4ae506826bc51bc69734c12019/stuff/screenshots/03-users.png
--------------------------------------------------------------------------------
/stuff/screenshots/04-user-create.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zyablitsev/wgnetwork/ac381af876574c4ae506826bc51bc69734c12019/stuff/screenshots/04-user-create.png
--------------------------------------------------------------------------------
/stuff/screenshots/05-user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zyablitsev/wgnetwork/ac381af876574c4ae506826bc51bc69734c12019/stuff/screenshots/05-user.png
--------------------------------------------------------------------------------
/stuff/screenshots/06-devices.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zyablitsev/wgnetwork/ac381af876574c4ae506826bc51bc69734c12019/stuff/screenshots/06-devices.png
--------------------------------------------------------------------------------
/stuff/screenshots/07-device-create.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zyablitsev/wgnetwork/ac381af876574c4ae506826bc51bc69734c12019/stuff/screenshots/07-device-create.png
--------------------------------------------------------------------------------
/stuff/screenshots/08-device.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zyablitsev/wgnetwork/ac381af876574c4ae506826bc51bc69734c12019/stuff/screenshots/08-device.png
--------------------------------------------------------------------------------
/vendor/github.com/google/go-cmp/cmp/export_panic.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017, The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build purego
6 | // +build purego
7 |
8 | package cmp
9 |
10 | import "reflect"
11 |
12 | const supportExporters = false
13 |
14 | func retrieveUnexportedField(reflect.Value, reflect.StructField, bool) reflect.Value {
15 | panic("no support for forcibly accessing unexported fields")
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017, The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !cmp_debug
6 | // +build !cmp_debug
7 |
8 | package diff
9 |
10 | var debug debugger
11 |
12 | type debugger struct{}
13 |
14 | func (debugger) Begin(_, _ int, f EqualFunc, _, _ *EditScript) EqualFunc {
15 | return f
16 | }
17 | func (debugger) Update() {}
18 | func (debugger) Finish() {}
19 |
--------------------------------------------------------------------------------
/vendor/github.com/google/go-cmp/cmp/internal/flags/flags.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019, The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package flags
6 |
7 | // Deterministic controls whether the output of Diff should be deterministic.
8 | // This is only used for testing.
9 | var Deterministic bool
10 |
--------------------------------------------------------------------------------
/vendor/github.com/google/nftables/doc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 Google LLC. All Rights Reserved.
2 | //
3 | // Licensed under the Apache License, Version 2.0 (the "License");
4 | // you may not use this file except in compliance with the License.
5 | // You may obtain a copy of the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS,
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | // See the License for the specific language governing permissions and
13 | // limitations under the License.
14 |
15 | // Package nftables manipulates Linux nftables (the iptables successor).
16 | package nftables
17 |
--------------------------------------------------------------------------------
/vendor/github.com/google/nftables/internal/parseexprfunc/parseexprfunc.go:
--------------------------------------------------------------------------------
1 | package parseexprfunc
2 |
3 | import (
4 | "github.com/mdlayher/netlink"
5 | )
6 |
7 | var (
8 | ParseExprBytesFunc func(fam byte, ad *netlink.AttributeDecoder, b []byte) ([]interface{}, error)
9 | ParseExprMsgFunc func(fam byte, b []byte) ([]interface{}, error)
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/github.com/google/nftables/xt/unknown.go:
--------------------------------------------------------------------------------
1 | package xt
2 |
3 | // Unknown represents the bytes Info payload for unknown Info types where no
4 | // dedicated match/target info type has (yet) been defined.
5 | type Unknown []byte
6 |
7 | func (x *Unknown) marshal(fam TableFamily, rev uint32) ([]byte, error) {
8 | // In case of unknown payload we assume its creator knows what she/he does
9 | // and thus we don't do any alignment padding. Just take the payload "as
10 | // is".
11 | return *x, nil
12 | }
13 |
14 | func (x *Unknown) unmarshal(fam TableFamily, rev uint32, data []byte) error {
15 | *x = data
16 | return nil
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/github.com/google/uuid/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | go:
4 | - 1.4.3
5 | - 1.5.3
6 | - tip
7 |
8 | script:
9 | - go test -v ./...
10 |
--------------------------------------------------------------------------------
/vendor/github.com/google/uuid/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # How to contribute
2 |
3 | We definitely welcome patches and contribution to this project!
4 |
5 | ### Legal requirements
6 |
7 | In order to protect both you and ourselves, you will need to sign the
8 | [Contributor License Agreement](https://cla.developers.google.com/clas).
9 |
10 | You may have already signed it for other Google projects.
11 |
--------------------------------------------------------------------------------
/vendor/github.com/google/uuid/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | Paul Borman
2 | bmatsuo
3 | shawnps
4 | theory
5 | jboverfelt
6 | dsymonds
7 | cd1
8 | wallclockbuilder
9 | dansouza
10 |
--------------------------------------------------------------------------------
/vendor/github.com/google/uuid/doc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 Google Inc. All rights reserved.
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 uuid generates and inspects UUIDs.
6 | //
7 | // UUIDs are based on RFC 4122 and DCE 1.1: Authentication and Security
8 | // Services.
9 | //
10 | // A UUID is a 16 byte (128 bit) array. UUIDs may be used as keys to
11 | // maps or compared directly.
12 | package uuid
13 |
--------------------------------------------------------------------------------
/vendor/github.com/google/uuid/node_js.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 Google Inc. All rights reserved.
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 js
6 |
7 | package uuid
8 |
9 | // getHardwareInterface returns nil values for the JS version of the code.
10 | // This remvoves the "net" dependency, because it is not used in the browser.
11 | // Using the "net" library inflates the size of the transpiled JS code by 673k bytes.
12 | func getHardwareInterface(name string) (string, []byte) { return "", nil }
13 |
--------------------------------------------------------------------------------
/vendor/github.com/josharian/native/doc.go:
--------------------------------------------------------------------------------
1 | // Package native provides easy access to native byte order.
2 | //
3 | // Usage: use native.Endian where you need the native binary.ByteOrder.
4 | //
5 | // Please think twice before using this package.
6 | // It can break program portability.
7 | // Native byte order is usually not the right answer.
8 | package native
9 |
--------------------------------------------------------------------------------
/vendor/github.com/josharian/native/endian_big.go:
--------------------------------------------------------------------------------
1 | //go:build mips || mips64 || ppc64 || s390x
2 | // +build mips mips64 ppc64 s390x
3 |
4 | package native
5 |
6 | import "encoding/binary"
7 |
8 | // Endian is the encoding/binary.ByteOrder implementation for the
9 | // current CPU's native byte order.
10 | var Endian = binary.BigEndian
11 |
12 | // IsBigEndian is whether the current CPU's native byte order is big
13 | // endian.
14 | const IsBigEndian = true
15 |
--------------------------------------------------------------------------------
/vendor/github.com/josharian/native/endian_little.go:
--------------------------------------------------------------------------------
1 | //go:build amd64 || 386 || arm || arm64 || loong64 || mipsle || mips64le || ppc64le || riscv64 || wasm
2 | // +build amd64 386 arm arm64 loong64 mipsle mips64le ppc64le riscv64 wasm
3 |
4 | package native
5 |
6 | import "encoding/binary"
7 |
8 | // Endian is the encoding/binary.ByteOrder implementation for the
9 | // current CPU's native byte order.
10 | var Endian = binary.LittleEndian
11 |
12 | // IsBigEndian is whether the current CPU's native byte order is big
13 | // endian.
14 | const IsBigEndian = false
15 |
--------------------------------------------------------------------------------
/vendor/github.com/josharian/native/readme.md:
--------------------------------------------------------------------------------
1 | Package native provides easy access to native byte order.
2 |
3 | `go get github.com/josharian/native`
4 |
5 | Usage: Use `native.Endian` where you need the native binary.ByteOrder.
6 |
7 | Please think twice before using this package.
8 | It can break program portability.
9 | Native byte order is usually not the right answer.
10 |
11 |
--------------------------------------------------------------------------------
/vendor/github.com/mdlayher/genetlink/doc.go:
--------------------------------------------------------------------------------
1 | // Package genetlink implements generic netlink interactions and data types.
2 | //
3 | // If you have any questions or you'd like some guidance, please join us on
4 | // Gophers Slack (https://invite.slack.golangbridge.org) in the #networking
5 | // channel!
6 | package genetlink
7 |
--------------------------------------------------------------------------------
/vendor/github.com/mdlayher/genetlink/family.go:
--------------------------------------------------------------------------------
1 | package genetlink
2 |
3 | // A Family is a generic netlink family.
4 | type Family struct {
5 | ID uint16
6 | Version uint8
7 | Name string
8 | Groups []MulticastGroup
9 | }
10 |
11 | // A MulticastGroup is a generic netlink multicast group, which can be joined
12 | // for notifications from generic netlink families when specific events take
13 | // place.
14 | type MulticastGroup struct {
15 | ID uint32
16 | Name string
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/github.com/mdlayher/genetlink/family_others.go:
--------------------------------------------------------------------------------
1 | //go:build !linux
2 | // +build !linux
3 |
4 | package genetlink
5 |
6 | import (
7 | "fmt"
8 | "runtime"
9 | )
10 |
11 | // errUnimplemented is returned by all functions on platforms that
12 | // cannot make use of generic netlink.
13 | var errUnimplemented = fmt.Errorf("generic netlink not implemented on %s/%s",
14 | runtime.GOOS, runtime.GOARCH)
15 |
16 | // getFamily always returns an error.
17 | func (c *Conn) getFamily(name string) (Family, error) {
18 | return Family{}, errUnimplemented
19 | }
20 |
21 | // listFamilies always returns an error.
22 | func (c *Conn) listFamilies() ([]Family, error) {
23 | return nil, errUnimplemented
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/github.com/mdlayher/genetlink/fuzz.go:
--------------------------------------------------------------------------------
1 | //go:build gofuzz
2 | // +build gofuzz
3 |
4 | package genetlink
5 |
6 | func Fuzz(data []byte) int {
7 | return fuzzMessage(data)
8 | }
9 |
10 | func fuzzMessage(data []byte) int {
11 | var m Message
12 | if err := (&m).UnmarshalBinary(data); err != nil {
13 | return 0
14 | }
15 |
16 | if _, err := m.MarshalBinary(); err != nil {
17 | panic(err)
18 | }
19 |
20 | return 1
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/github.com/mdlayher/netlink/.gitignore:
--------------------------------------------------------------------------------
1 | internal/integration/integration.test
2 | netlink.test
3 | netlink-fuzz.zip
4 | testdata/
5 |
--------------------------------------------------------------------------------
/vendor/github.com/mdlayher/netlink/nlenc/doc.go:
--------------------------------------------------------------------------------
1 | // Package nlenc implements encoding and decoding functions for netlink
2 | // messages and attributes.
3 | package nlenc
4 |
5 | import (
6 | "encoding/binary"
7 |
8 | "github.com/josharian/native"
9 | )
10 |
11 | // NativeEndian returns the native byte order of this system.
12 | func NativeEndian() binary.ByteOrder {
13 | // TODO(mdlayher): consider deprecating and removing this function for v2.
14 | return native.Endian
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/mdlayher/netlink/nlenc/string.go:
--------------------------------------------------------------------------------
1 | package nlenc
2 |
3 | import "bytes"
4 |
5 | // Bytes returns a null-terminated byte slice with the contents of s.
6 | func Bytes(s string) []byte {
7 | return append([]byte(s), 0x00)
8 | }
9 |
10 | // String returns a string with the contents of b from a null-terminated
11 | // byte slice.
12 | func String(b []byte) string {
13 | // If the string has more than one NULL terminator byte, we want to remove
14 | // all of them before returning the string to the caller; hence the use of
15 | // strings.TrimRight instead of strings.TrimSuffix (which previously only
16 | // removed a single NULL).
17 | return string(bytes.TrimRight(b, "\x00"))
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/github.com/mdlayher/netlink/nltest/errors_others.go:
--------------------------------------------------------------------------------
1 | //go:build plan9 || windows
2 | // +build plan9 windows
3 |
4 | package nltest
5 |
6 | func isSyscallError(_ error) bool {
7 | return false
8 | }
9 |
--------------------------------------------------------------------------------
/vendor/github.com/mdlayher/netlink/nltest/errors_unix.go:
--------------------------------------------------------------------------------
1 | //go:build !plan9 && !windows
2 | // +build !plan9,!windows
3 |
4 | package nltest
5 |
6 | import "golang.org/x/sys/unix"
7 |
8 | func isSyscallError(err error) bool {
9 | _, ok := err.(unix.Errno)
10 | return ok
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/mdlayher/socket/accept.go:
--------------------------------------------------------------------------------
1 | //go:build !dragonfly && !freebsd && !illumos && !linux
2 | // +build !dragonfly,!freebsd,!illumos,!linux
3 |
4 | package socket
5 |
6 | import (
7 | "fmt"
8 | "runtime"
9 |
10 | "golang.org/x/sys/unix"
11 | )
12 |
13 | const sysAccept = "accept"
14 |
15 | // accept wraps accept(2).
16 | func accept(fd, flags int) (int, unix.Sockaddr, error) {
17 | if flags != 0 {
18 | // These operating systems have no support for flags to accept(2).
19 | return 0, nil, fmt.Errorf("socket: Conn.Accept flags are ineffective on %s", runtime.GOOS)
20 | }
21 |
22 | return unix.Accept(fd)
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/github.com/mdlayher/socket/accept4.go:
--------------------------------------------------------------------------------
1 | //go:build dragonfly || freebsd || illumos || linux
2 | // +build dragonfly freebsd illumos linux
3 |
4 | package socket
5 |
6 | import (
7 | "golang.org/x/sys/unix"
8 | )
9 |
10 | const sysAccept = "accept4"
11 |
12 | // accept wraps accept4(2).
13 | func accept(fd, flags int) (int, unix.Sockaddr, error) {
14 | return unix.Accept4(fd, flags)
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/mdlayher/socket/doc.go:
--------------------------------------------------------------------------------
1 | // Package socket provides a low-level network connection type which integrates
2 | // with Go's runtime network poller to provide asynchronous I/O and deadline
3 | // support.
4 | //
5 | // This package focuses on UNIX-like operating systems which make use of BSD
6 | // sockets system call APIs. It is meant to be used as a foundation for the
7 | // creation of operating system-specific socket packages, for socket families
8 | // such as Linux's AF_NETLINK, AF_PACKET, or AF_VSOCK. This package should not
9 | // be used directly in end user applications.
10 | //
11 | // Any use of package socket should be guarded by build tags, as one would also
12 | // use when importing the syscall or golang.org/x/sys packages.
13 | package socket
14 |
--------------------------------------------------------------------------------
/vendor/github.com/mdlayher/socket/netns_others.go:
--------------------------------------------------------------------------------
1 | //go:build !linux
2 | // +build !linux
3 |
4 | package socket
5 |
6 | import (
7 | "fmt"
8 | "runtime"
9 | )
10 |
11 | // withNetNS returns an error on non-Linux systems.
12 | func withNetNS(_ int, _ func() (*Conn, error)) (*Conn, error) {
13 | return nil, fmt.Errorf("socket: Linux network namespace support is not available on %s", runtime.GOOS)
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/github.com/mdlayher/socket/setbuffer_linux.go:
--------------------------------------------------------------------------------
1 | //go:build linux
2 | // +build linux
3 |
4 | package socket
5 |
6 | import "golang.org/x/sys/unix"
7 |
8 | // setReadBuffer wraps the SO_RCVBUF{,FORCE} setsockopt(2) options.
9 | func (c *Conn) setReadBuffer(bytes int) error {
10 | err := c.SetsockoptInt(unix.SOL_SOCKET, unix.SO_RCVBUFFORCE, bytes)
11 | if err != nil {
12 | err = c.SetsockoptInt(unix.SOL_SOCKET, unix.SO_RCVBUF, bytes)
13 | }
14 | return err
15 | }
16 |
17 | // setWriteBuffer wraps the SO_SNDBUF{,FORCE} setsockopt(2) options.
18 | func (c *Conn) setWriteBuffer(bytes int) error {
19 | err := c.SetsockoptInt(unix.SOL_SOCKET, unix.SO_SNDBUFFORCE, bytes)
20 | if err != nil {
21 | err = c.SetsockoptInt(unix.SOL_SOCKET, unix.SO_SNDBUF, bytes)
22 | }
23 | return err
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/github.com/mdlayher/socket/setbuffer_others.go:
--------------------------------------------------------------------------------
1 | //go:build !linux
2 | // +build !linux
3 |
4 | package socket
5 |
6 | import "golang.org/x/sys/unix"
7 |
8 | // setReadBuffer wraps the SO_RCVBUF setsockopt(2) option.
9 | func (c *Conn) setReadBuffer(bytes int) error {
10 | return c.SetsockoptInt(unix.SOL_SOCKET, unix.SO_RCVBUF, bytes)
11 | }
12 |
13 | // setWriteBuffer wraps the SO_SNDBUF setsockopt(2) option.
14 | func (c *Conn) setWriteBuffer(bytes int) error {
15 | return c.SetsockoptInt(unix.SOL_SOCKET, unix.SO_SNDBUF, bytes)
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/github.com/mdlayher/socket/typ_cloexec_nonblock.go:
--------------------------------------------------------------------------------
1 | //go:build !darwin
2 | // +build !darwin
3 |
4 | package socket
5 |
6 | import "golang.org/x/sys/unix"
7 |
8 | const (
9 | // These operating systems support CLOEXEC and NONBLOCK socket options.
10 | flagCLOEXEC = true
11 | socketFlags = unix.SOCK_CLOEXEC | unix.SOCK_NONBLOCK
12 | )
13 |
--------------------------------------------------------------------------------
/vendor/github.com/mdlayher/socket/typ_none.go:
--------------------------------------------------------------------------------
1 | //go:build darwin
2 | // +build darwin
3 |
4 | package socket
5 |
6 | const (
7 | // These operating systems do not support CLOEXEC and NONBLOCK socket
8 | // options.
9 | flagCLOEXEC = false
10 | socketFlags = 0
11 | )
12 |
--------------------------------------------------------------------------------
/vendor/github.com/miekg/dns/.codecov.yml:
--------------------------------------------------------------------------------
1 | coverage:
2 | status:
3 | project:
4 | default:
5 | target: 40%
6 | threshold: null
7 | patch: false
8 | changes: false
9 |
--------------------------------------------------------------------------------
/vendor/github.com/miekg/dns/.gitignore:
--------------------------------------------------------------------------------
1 | *.6
2 | tags
3 | test.out
4 | a.out
5 |
--------------------------------------------------------------------------------
/vendor/github.com/miekg/dns/AUTHORS:
--------------------------------------------------------------------------------
1 | Miek Gieben
2 |
--------------------------------------------------------------------------------
/vendor/github.com/miekg/dns/CODEOWNERS:
--------------------------------------------------------------------------------
1 | * @miekg @tmthrgd
2 |
--------------------------------------------------------------------------------
/vendor/github.com/miekg/dns/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | Alex A. Skinner
2 | Andrew Tunnell-Jones
3 | Ask Bjørn Hansen
4 | Dave Cheney
5 | Dusty Wilson
6 | Marek Majkowski
7 | Peter van Dijk
8 | Omri Bahumi
9 | Alex Sergeyev
10 | James Hartig
11 |
--------------------------------------------------------------------------------
/vendor/github.com/miekg/dns/COPYRIGHT:
--------------------------------------------------------------------------------
1 | Copyright 2009 The Go Authors. All rights reserved. Use of this source code
2 | is governed by a BSD-style license that can be found in the LICENSE file.
3 | Extensions of the original work are copyright (c) 2011 Miek Gieben
4 |
5 | Copyright 2011 Miek Gieben. All rights reserved. Use of this source code is
6 | governed by a BSD-style license that can be found in the LICENSE file.
7 |
8 | Copyright 2014 CloudFlare. All rights reserved. Use of this source code is
9 | governed by a BSD-style license that can be found in the LICENSE file.
10 |
--------------------------------------------------------------------------------
/vendor/github.com/miekg/dns/Makefile.fuzz:
--------------------------------------------------------------------------------
1 | # Makefile for fuzzing
2 | #
3 | # Use go-fuzz and needs the tools installed.
4 | # See https://blog.cloudflare.com/dns-parser-meet-go-fuzzer/
5 | #
6 | # Installing go-fuzz:
7 | # $ make -f Makefile.fuzz get
8 | # Installs:
9 | # * github.com/dvyukov/go-fuzz/go-fuzz
10 | # * get github.com/dvyukov/go-fuzz/go-fuzz-build
11 |
12 | all: build
13 |
14 | .PHONY: build
15 | build:
16 | go-fuzz-build -tags fuzz github.com/miekg/dns
17 |
18 | .PHONY: build-newrr
19 | build-newrr:
20 | go-fuzz-build -func FuzzNewRR -tags fuzz github.com/miekg/dns
21 |
22 | .PHONY: fuzz
23 | fuzz:
24 | go-fuzz -bin=dns-fuzz.zip -workdir=fuzz
25 |
26 | .PHONY: get
27 | get:
28 | go get github.com/dvyukov/go-fuzz/go-fuzz
29 | go get github.com/dvyukov/go-fuzz/go-fuzz-build
30 |
31 | .PHONY: clean
32 | clean:
33 | rm *-fuzz.zip
34 |
--------------------------------------------------------------------------------
/vendor/github.com/miekg/dns/fuzz.go:
--------------------------------------------------------------------------------
1 | //go:build fuzz
2 | // +build fuzz
3 |
4 | package dns
5 |
6 | import "strings"
7 |
8 | func Fuzz(data []byte) int {
9 | msg := new(Msg)
10 |
11 | if err := msg.Unpack(data); err != nil {
12 | return 0
13 | }
14 | if _, err := msg.Pack(); err != nil {
15 | return 0
16 | }
17 |
18 | return 1
19 | }
20 |
21 | func FuzzNewRR(data []byte) int {
22 | str := string(data)
23 | // Do not fuzz lines that include the $INCLUDE keyword and hint the fuzzer
24 | // at avoiding them.
25 | // See GH#1025 for context.
26 | if strings.Contains(strings.ToUpper(str), "$INCLUDE") {
27 | return -1
28 | }
29 | if _, err := NewRR(str); err != nil {
30 | return 0
31 | }
32 | return 1
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/github.com/miekg/dns/listen_no_reuseport.go:
--------------------------------------------------------------------------------
1 | //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd
2 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd
3 |
4 | package dns
5 |
6 | import "net"
7 |
8 | const supportsReusePort = false
9 |
10 | func listenTCP(network, addr string, reuseport bool) (net.Listener, error) {
11 | if reuseport {
12 | // TODO(tmthrgd): return an error?
13 | }
14 |
15 | return net.Listen(network, addr)
16 | }
17 |
18 | func listenUDP(network, addr string, reuseport bool) (net.PacketConn, error) {
19 | if reuseport {
20 | // TODO(tmthrgd): return an error?
21 | }
22 |
23 | return net.ListenPacket(network, addr)
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/github.com/miekg/dns/tools.go:
--------------------------------------------------------------------------------
1 | //go:build tools
2 | // +build tools
3 |
4 | // We include our tool dependencies for `go generate` here to ensure they're
5 | // properly tracked by the go tool. See the Go Wiki for the rationale behind this:
6 | // https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module.
7 |
8 | package dns
9 |
10 | import _ "golang.org/x/tools/go/packages"
11 |
--------------------------------------------------------------------------------
/vendor/github.com/miekg/dns/version.go:
--------------------------------------------------------------------------------
1 | package dns
2 |
3 | import "fmt"
4 |
5 | // Version is current version of this library.
6 | var Version = v{1, 1, 55}
7 |
8 | // v holds the version of this library.
9 | type v struct {
10 | Major, Minor, Patch int
11 | }
12 |
13 | func (v v) String() string {
14 | return fmt.Sprintf("%d.%d.%d", v.Major, v.Minor, v.Patch)
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/vishvananda/netlink/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 |
--------------------------------------------------------------------------------
/vendor/github.com/vishvananda/netlink/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - "1.10.x"
4 | - "1.11.x"
5 | - "1.12.x"
6 | before_script:
7 | # make sure we keep path in tact when we sudo
8 | - sudo sed -i -e 's/^Defaults\tsecure_path.*$//' /etc/sudoers
9 | # modprobe ip_gre or else the first gre device can't be deleted
10 | - sudo modprobe ip_gre
11 | # modprobe nf_conntrack for the conntrack testing
12 | - sudo modprobe nf_conntrack
13 | - sudo modprobe nf_conntrack_netlink
14 | - sudo modprobe nf_conntrack_ipv4
15 | - sudo modprobe nf_conntrack_ipv6
16 | - sudo modprobe sch_hfsc
17 | install:
18 | - go get github.com/vishvananda/netns
19 | go_import_path: github.com/vishvananda/netlink
20 |
--------------------------------------------------------------------------------
/vendor/github.com/vishvananda/netlink/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | ## 1.0.0 (2018-03-15)
4 |
5 | Initial release tagging
--------------------------------------------------------------------------------
/vendor/github.com/vishvananda/netlink/fou.go:
--------------------------------------------------------------------------------
1 | package netlink
2 |
3 | import (
4 | "errors"
5 | )
6 |
7 | var (
8 | // ErrAttrHeaderTruncated is returned when a netlink attribute's header is
9 | // truncated.
10 | ErrAttrHeaderTruncated = errors.New("attribute header truncated")
11 | // ErrAttrBodyTruncated is returned when a netlink attribute's body is
12 | // truncated.
13 | ErrAttrBodyTruncated = errors.New("attribute body truncated")
14 | )
15 |
16 | type Fou struct {
17 | Family int
18 | Port int
19 | Protocol int
20 | EncapType int
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/github.com/vishvananda/netlink/fou_unspecified.go:
--------------------------------------------------------------------------------
1 | // +build !linux
2 |
3 | package netlink
4 |
5 | func FouAdd(f Fou) error {
6 | return ErrNotImplemented
7 | }
8 |
9 | func FouDel(f Fou) error {
10 | return ErrNotImplemented
11 | }
12 |
13 | func FouList(fam int) ([]Fou, error) {
14 | return nil, ErrNotImplemented
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/vishvananda/netlink/genetlink_unspecified.go:
--------------------------------------------------------------------------------
1 | // +build !linux
2 |
3 | package netlink
4 |
5 | type GenlOp struct{}
6 |
7 | type GenlMulticastGroup struct{}
8 |
9 | type GenlFamily struct{}
10 |
11 | func (h *Handle) GenlFamilyList() ([]*GenlFamily, error) {
12 | return nil, ErrNotImplemented
13 | }
14 |
15 | func GenlFamilyList() ([]*GenlFamily, error) {
16 | return nil, ErrNotImplemented
17 | }
18 |
19 | func (h *Handle) GenlFamilyGet(name string) (*GenlFamily, error) {
20 | return nil, ErrNotImplemented
21 | }
22 |
23 | func GenlFamilyGet(name string) (*GenlFamily, error) {
24 | return nil, ErrNotImplemented
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/github.com/vishvananda/netlink/link_tuntap_linux.go:
--------------------------------------------------------------------------------
1 | package netlink
2 |
3 | // ideally golang.org/x/sys/unix would define IfReq but it only has
4 | // IFNAMSIZ, hence this minimalistic implementation
5 | const (
6 | SizeOfIfReq = 40
7 | IFNAMSIZ = 16
8 | )
9 |
10 | type ifReq struct {
11 | Name [IFNAMSIZ]byte
12 | Flags uint16
13 | pad [SizeOfIfReq - IFNAMSIZ - 2]byte
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/github.com/vishvananda/netlink/neigh.go:
--------------------------------------------------------------------------------
1 | package netlink
2 |
3 | import (
4 | "fmt"
5 | "net"
6 | )
7 |
8 | // Neigh represents a link layer neighbor from netlink.
9 | type Neigh struct {
10 | LinkIndex int
11 | Family int
12 | State int
13 | Type int
14 | Flags int
15 | IP net.IP
16 | HardwareAddr net.HardwareAddr
17 | LLIPAddr net.IP //Used in the case of NHRP
18 | Vlan int
19 | VNI int
20 | MasterIndex int
21 | }
22 |
23 | // String returns $ip/$hwaddr $label
24 | func (neigh *Neigh) String() string {
25 | return fmt.Sprintf("%s %s", neigh.IP, neigh.HardwareAddr)
26 | }
27 |
28 | // NeighUpdate is sent when a neighbor changes - type is RTM_NEWNEIGH or RTM_DELNEIGH.
29 | type NeighUpdate struct {
30 | Type uint16
31 | Neigh
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/github.com/vishvananda/netlink/netlink_linux.go:
--------------------------------------------------------------------------------
1 | package netlink
2 |
3 | import "github.com/vishvananda/netlink/nl"
4 |
5 | // Family type definitions
6 | const (
7 | FAMILY_ALL = nl.FAMILY_ALL
8 | FAMILY_V4 = nl.FAMILY_V4
9 | FAMILY_V6 = nl.FAMILY_V6
10 | FAMILY_MPLS = nl.FAMILY_MPLS
11 | )
12 |
--------------------------------------------------------------------------------
/vendor/github.com/vishvananda/netlink/netns_unspecified.go:
--------------------------------------------------------------------------------
1 | // +build !linux
2 |
3 | package netlink
4 |
5 | func GetNetNsIdByPid(pid int) (int, error) {
6 | return 0, ErrNotImplemented
7 | }
8 |
9 | func SetNetNsIdByPid(pid, nsid int) error {
10 | return ErrNotImplemented
11 | }
12 |
13 | func GetNetNsIdByFd(fd int) (int, error) {
14 | return 0, ErrNotImplemented
15 | }
16 |
17 | func SetNetNsIdByFd(fd, nsid int) error {
18 | return ErrNotImplemented
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/github.com/vishvananda/netlink/nl/nl_unspecified.go:
--------------------------------------------------------------------------------
1 | // +build !linux
2 |
3 | package nl
4 |
5 | import "encoding/binary"
6 |
7 | var SupportedNlFamilies = []int{}
8 |
9 | func NativeEndian() binary.ByteOrder {
10 | return nil
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/vishvananda/netlink/nl/xfrm_monitor_linux.go:
--------------------------------------------------------------------------------
1 | package nl
2 |
3 | import (
4 | "unsafe"
5 | )
6 |
7 | const (
8 | SizeofXfrmUserExpire = 0xe8
9 | )
10 |
11 | // struct xfrm_user_expire {
12 | // struct xfrm_usersa_info state;
13 | // __u8 hard;
14 | // };
15 |
16 | type XfrmUserExpire struct {
17 | XfrmUsersaInfo XfrmUsersaInfo
18 | Hard uint8
19 | Pad [7]byte
20 | }
21 |
22 | func (msg *XfrmUserExpire) Len() int {
23 | return SizeofXfrmUserExpire
24 | }
25 |
26 | func DeserializeXfrmUserExpire(b []byte) *XfrmUserExpire {
27 | return (*XfrmUserExpire)(unsafe.Pointer(&b[0:SizeofXfrmUserExpire][0]))
28 | }
29 |
30 | func (msg *XfrmUserExpire) Serialize() []byte {
31 | return (*(*[SizeofXfrmUserExpire]byte)(unsafe.Pointer(msg)))[:]
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/github.com/vishvananda/netlink/order.go:
--------------------------------------------------------------------------------
1 | package netlink
2 |
3 | import (
4 | "encoding/binary"
5 |
6 | "github.com/vishvananda/netlink/nl"
7 | )
8 |
9 | var (
10 | native = nl.NativeEndian()
11 | networkOrder = binary.BigEndian
12 | )
13 |
14 | func htonl(val uint32) []byte {
15 | bytes := make([]byte, 4)
16 | binary.BigEndian.PutUint32(bytes, val)
17 | return bytes
18 | }
19 |
20 | func htons(val uint16) []byte {
21 | bytes := make([]byte, 2)
22 | binary.BigEndian.PutUint16(bytes, val)
23 | return bytes
24 | }
25 |
26 | func ntohl(buf []byte) uint32 {
27 | return binary.BigEndian.Uint32(buf)
28 | }
29 |
30 | func ntohs(buf []byte) uint16 {
31 | return binary.BigEndian.Uint16(buf)
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/github.com/vishvananda/netlink/route_unspecified.go:
--------------------------------------------------------------------------------
1 | // +build !linux
2 |
3 | package netlink
4 |
5 | func (r *Route) ListFlags() []string {
6 | return []string{}
7 | }
8 |
9 | func (n *NexthopInfo) ListFlags() []string {
10 | return []string{}
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/vishvananda/netlink/socket.go:
--------------------------------------------------------------------------------
1 | package netlink
2 |
3 | import "net"
4 |
5 | // SocketID identifies a single socket.
6 | type SocketID struct {
7 | SourcePort uint16
8 | DestinationPort uint16
9 | Source net.IP
10 | Destination net.IP
11 | Interface uint32
12 | Cookie [2]uint32
13 | }
14 |
15 | // Socket represents a netlink socket.
16 | type Socket struct {
17 | Family uint8
18 | State uint8
19 | Timer uint8
20 | Retrans uint8
21 | ID SocketID
22 | Expires uint32
23 | RQueue uint32
24 | WQueue uint32
25 | UID uint32
26 | INode uint32
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/vishvananda/netns/.golangci.yml:
--------------------------------------------------------------------------------
1 | run:
2 | timeout: 5m
3 |
--------------------------------------------------------------------------------
/vendor/github.com/vishvananda/netns/doc.go:
--------------------------------------------------------------------------------
1 | // Package netns allows ultra-simple network namespace handling. NsHandles
2 | // can be retrieved and set. Note that the current namespace is thread
3 | // local so actions that set and reset namespaces should use LockOSThread
4 | // to make sure the namespace doesn't change due to a goroutine switch.
5 | // It is best to close NsHandles when you are done with them. This can be
6 | // accomplished via a `defer ns.Close()` on the handle. Changing namespaces
7 | // requires elevated privileges, so in most cases this code needs to be run
8 | // as root.
9 | package netns
10 |
--------------------------------------------------------------------------------
/vendor/go.etcd.io/bbolt/.gitignore:
--------------------------------------------------------------------------------
1 | *.prof
2 | *.test
3 | *.swp
4 | /bin/
5 | cover.out
6 | cover-*.out
7 | /.idea
8 | *.iml
9 | /cmd/bbolt/bbolt
10 |
11 |
--------------------------------------------------------------------------------
/vendor/go.etcd.io/bbolt/bolt_386.go:
--------------------------------------------------------------------------------
1 | package bbolt
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 bbolt
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 bbolt
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 | //go:build arm64
2 | // +build arm64
3 |
4 | package bbolt
5 |
6 | // maxMapSize represents the largest mmap size supported by Bolt.
7 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB
8 |
9 | // maxAllocSize is the size used when creating array pointers.
10 | const maxAllocSize = 0x7FFFFFFF
11 |
--------------------------------------------------------------------------------
/vendor/go.etcd.io/bbolt/bolt_linux.go:
--------------------------------------------------------------------------------
1 | package bbolt
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_loong64.go:
--------------------------------------------------------------------------------
1 | //go:build loong64
2 | // +build loong64
3 |
4 | package bbolt
5 |
6 | // maxMapSize represents the largest mmap size supported by Bolt.
7 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB
8 |
9 | // maxAllocSize is the size used when creating array pointers.
10 | const maxAllocSize = 0x7FFFFFFF
11 |
--------------------------------------------------------------------------------
/vendor/go.etcd.io/bbolt/bolt_mips64x.go:
--------------------------------------------------------------------------------
1 | //go:build mips64 || mips64le
2 | // +build mips64 mips64le
3 |
4 | package bbolt
5 |
6 | // maxMapSize represents the largest mmap size supported by Bolt.
7 | const maxMapSize = 0x8000000000 // 512GB
8 |
9 | // maxAllocSize is the size used when creating array pointers.
10 | const maxAllocSize = 0x7FFFFFFF
11 |
--------------------------------------------------------------------------------
/vendor/go.etcd.io/bbolt/bolt_mipsx.go:
--------------------------------------------------------------------------------
1 | //go:build mips || mipsle
2 | // +build mips mipsle
3 |
4 | package bbolt
5 |
6 | // maxMapSize represents the largest mmap size supported by Bolt.
7 | const maxMapSize = 0x40000000 // 1GB
8 |
9 | // maxAllocSize is the size used when creating array pointers.
10 | const maxAllocSize = 0xFFFFFFF
11 |
--------------------------------------------------------------------------------
/vendor/go.etcd.io/bbolt/bolt_openbsd.go:
--------------------------------------------------------------------------------
1 | package bbolt
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 | //go:build ppc
2 | // +build ppc
3 |
4 | package bbolt
5 |
6 | // maxMapSize represents the largest mmap size supported by Bolt.
7 | const maxMapSize = 0x7FFFFFFF // 2GB
8 |
9 | // maxAllocSize is the size used when creating array pointers.
10 | const maxAllocSize = 0xFFFFFFF
11 |
--------------------------------------------------------------------------------
/vendor/go.etcd.io/bbolt/bolt_ppc64.go:
--------------------------------------------------------------------------------
1 | //go:build ppc64
2 | // +build ppc64
3 |
4 | package bbolt
5 |
6 | // maxMapSize represents the largest mmap size supported by Bolt.
7 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB
8 |
9 | // maxAllocSize is the size used when creating array pointers.
10 | const maxAllocSize = 0x7FFFFFFF
11 |
--------------------------------------------------------------------------------
/vendor/go.etcd.io/bbolt/bolt_ppc64le.go:
--------------------------------------------------------------------------------
1 | //go:build ppc64le
2 | // +build ppc64le
3 |
4 | package bbolt
5 |
6 | // maxMapSize represents the largest mmap size supported by Bolt.
7 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB
8 |
9 | // maxAllocSize is the size used when creating array pointers.
10 | const maxAllocSize = 0x7FFFFFFF
11 |
--------------------------------------------------------------------------------
/vendor/go.etcd.io/bbolt/bolt_riscv64.go:
--------------------------------------------------------------------------------
1 | //go:build riscv64
2 | // +build riscv64
3 |
4 | package bbolt
5 |
6 | // maxMapSize represents the largest mmap size supported by Bolt.
7 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB
8 |
9 | // maxAllocSize is the size used when creating array pointers.
10 | const maxAllocSize = 0x7FFFFFFF
11 |
--------------------------------------------------------------------------------
/vendor/go.etcd.io/bbolt/bolt_s390x.go:
--------------------------------------------------------------------------------
1 | //go:build s390x
2 | // +build s390x
3 |
4 | package bbolt
5 |
6 | // maxMapSize represents the largest mmap size supported by Bolt.
7 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB
8 |
9 | // maxAllocSize is the size used when creating array pointers.
10 | const maxAllocSize = 0x7FFFFFFF
11 |
--------------------------------------------------------------------------------
/vendor/go.etcd.io/bbolt/boltsync_unix.go:
--------------------------------------------------------------------------------
1 | //go:build !windows && !plan9 && !linux && !openbsd
2 | // +build !windows,!plan9,!linux,!openbsd
3 |
4 | package bbolt
5 |
6 | // fdatasync flushes written data to a file descriptor.
7 | func fdatasync(db *DB) error {
8 | return db.file.Sync()
9 | }
10 |
--------------------------------------------------------------------------------
/vendor/go.etcd.io/bbolt/mlock_windows.go:
--------------------------------------------------------------------------------
1 | package bbolt
2 |
3 | // mlock locks memory of db file
4 | func mlock(_ *DB, _ int) error {
5 | panic("mlock is supported only on UNIX systems")
6 | }
7 |
8 | // munlock unlocks memory of db file
9 | func munlock(_ *DB, _ int) error {
10 | panic("munlock is supported only on UNIX systems")
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/internal/field/README:
--------------------------------------------------------------------------------
1 | This package is kept in sync with crypto/ed25519/internal/edwards25519/field in
2 | the standard library.
3 |
4 | If there are any changes in the standard library that need to be synced to this
5 | package, run sync.sh. It will not overwrite any local changes made since the
6 | previous sync, so it's ok to land changes in this package first, and then sync
7 | to the standard library later.
8 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go:
--------------------------------------------------------------------------------
1 | // Code generated by command: go run fe_amd64_asm.go -out ../fe_amd64.s -stubs ../fe_amd64.go -pkg field. DO NOT EDIT.
2 |
3 | //go:build amd64 && gc && !purego
4 | // +build amd64,gc,!purego
5 |
6 | package field
7 |
8 | // feMul sets out = a * b. It works like feMulGeneric.
9 | //
10 | //go:noescape
11 | func feMul(out *Element, a *Element, b *Element)
12 |
13 | // feSquare sets out = a * a. It works like feSquareGeneric.
14 | //
15 | //go:noescape
16 | func feSquare(out *Element, a *Element)
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !amd64 || !gc || purego
6 | // +build !amd64 !gc purego
7 |
8 | package field
9 |
10 | func feMul(v, x, y *Element) { feMulGeneric(v, x, y) }
11 |
12 | func feSquare(v, x *Element) { feSquareGeneric(v, x) }
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build arm64 && gc && !purego
6 | // +build arm64,gc,!purego
7 |
8 | package field
9 |
10 | //go:noescape
11 | func carryPropagate(v *Element)
12 |
13 | func (v *Element) carryPropagate() *Element {
14 | carryPropagate(v)
15 | return v
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !arm64 || !gc || purego
6 | // +build !arm64 !gc purego
7 |
8 | package field
9 |
10 | func (v *Element) carryPropagate() *Element {
11 | return v.carryPropagateGeneric()
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint:
--------------------------------------------------------------------------------
1 | b0c49ae9f59d233526f8934262c5bbbe14d4358d
2 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 | set -euo pipefail
3 |
4 | cd "$(git rev-parse --show-toplevel)"
5 |
6 | STD_PATH=src/crypto/ed25519/internal/edwards25519/field
7 | LOCAL_PATH=curve25519/internal/field
8 | LAST_SYNC_REF=$(cat $LOCAL_PATH/sync.checkpoint)
9 |
10 | git fetch https://go.googlesource.com/go master
11 |
12 | if git diff --quiet $LAST_SYNC_REF:$STD_PATH FETCH_HEAD:$STD_PATH; then
13 | echo "No changes."
14 | else
15 | NEW_REF=$(git rev-parse FETCH_HEAD | tee $LOCAL_PATH/sync.checkpoint)
16 | echo "Applying changes from $LAST_SYNC_REF to $NEW_REF..."
17 | git diff $LAST_SYNC_REF:$STD_PATH FETCH_HEAD:$STD_PATH | \
18 | git apply -3 --directory=$LOCAL_PATH
19 | fi
20 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/sha3/keccakf_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build amd64 && !purego && gc
6 | // +build amd64,!purego,gc
7 |
8 | package sha3
9 |
10 | // This function is implemented in keccakf_amd64.s.
11 |
12 | //go:noescape
13 |
14 | func keccakF1600(a *[25]uint64)
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/sha3/register.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build go1.4
6 | // +build go1.4
7 |
8 | package sha3
9 |
10 | import (
11 | "crypto"
12 | )
13 |
14 | func init() {
15 | crypto.RegisterHash(crypto.SHA3_224, New224)
16 | crypto.RegisterHash(crypto.SHA3_256, New256)
17 | crypto.RegisterHash(crypto.SHA3_384, New384)
18 | crypto.RegisterHash(crypto.SHA3_512, New512)
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/sha3/shake_generic.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !gc || purego || !s390x
6 | // +build !gc purego !s390x
7 |
8 | package sha3
9 |
10 | // newShake128Asm returns an assembly implementation of SHAKE-128 if available,
11 | // otherwise it returns nil.
12 | func newShake128Asm() ShakeHash {
13 | return nil
14 | }
15 |
16 | // newShake256Asm returns an assembly implementation of SHAKE-256 if available,
17 | // otherwise it returns nil.
18 | func newShake256Asm() ShakeHash {
19 | return nil
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/sha3/xor.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (!amd64 && !386 && !ppc64le) || purego
6 | // +build !amd64,!386,!ppc64le purego
7 |
8 | package sha3
9 |
10 | // A storageBuf is an aligned array of maxRate bytes.
11 | type storageBuf [maxRate]byte
12 |
13 | func (b *storageBuf) asBytes() *[maxRate]byte {
14 | return (*[maxRate]byte)(b)
15 | }
16 |
17 | var (
18 | xorIn = xorInGeneric
19 | copyOut = copyOutGeneric
20 | xorInUnaligned = xorInGeneric
21 | copyOutUnaligned = copyOutGeneric
22 | )
23 |
24 | const xorImplementationUnaligned = "generic"
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/crypto/sha3/xor_generic.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 | package sha3
6 |
7 | import "encoding/binary"
8 |
9 | // xorInGeneric xors the bytes in buf into the state; it
10 | // makes no non-portable assumptions about memory layout
11 | // or alignment.
12 | func xorInGeneric(d *state, buf []byte) {
13 | n := len(buf) / 8
14 |
15 | for i := 0; i < n; i++ {
16 | a := binary.LittleEndian.Uint64(buf)
17 | d.a[i] ^= a
18 | buf = buf[8:]
19 | }
20 | }
21 |
22 | // copyOutGeneric copies uint64s to a byte buffer.
23 | func copyOutGeneric(d *state, b []byte) {
24 | for i := 0; len(b) >= 8; i++ {
25 | binary.LittleEndian.PutUint64(b, d.a[i])
26 | b = b[8:]
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/bpf/setter.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package bpf
6 |
7 | // A Setter is a type which can attach a compiled BPF filter to itself.
8 | type Setter interface {
9 | SetBPF(filter []RawInstruction) error
10 | }
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/cmsghdr.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
7 |
8 | package socket
9 |
10 | func (h *cmsghdr) len() int { return int(h.Len) }
11 | func (h *cmsghdr) lvl() int { return int(h.Level) }
12 | func (h *cmsghdr) typ() int { return int(h.Type) }
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || darwin || dragonfly || freebsd || netbsd || openbsd
6 | // +build aix darwin dragonfly freebsd netbsd openbsd
7 |
8 | package socket
9 |
10 | func (h *cmsghdr) set(l, lvl, typ int) {
11 | h.Len = uint32(l)
12 | h.Level = int32(lvl)
13 | h.Type = int32(typ)
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (arm || mips || mipsle || 386 || ppc) && linux
6 | // +build arm mips mipsle 386 ppc
7 | // +build linux
8 |
9 | package socket
10 |
11 | func (h *cmsghdr) set(l, lvl, typ int) {
12 | h.Len = uint32(l)
13 | h.Level = int32(lvl)
14 | h.Type = int32(typ)
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (arm64 || amd64 || loong64 || ppc64 || ppc64le || mips64 || mips64le || riscv64 || s390x) && linux
6 | // +build arm64 amd64 loong64 ppc64 ppc64le mips64 mips64le riscv64 s390x
7 | // +build linux
8 |
9 | package socket
10 |
11 | func (h *cmsghdr) set(l, lvl, typ int) {
12 | h.Len = uint64(l)
13 | h.Level = int32(lvl)
14 | h.Type = int32(typ)
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build amd64 && solaris
6 | // +build amd64,solaris
7 |
8 | package socket
9 |
10 | func (h *cmsghdr) set(l, lvl, typ int) {
11 | h.Len = uint32(l)
12 | h.Level = int32(lvl)
13 | h.Type = int32(typ)
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !zos
6 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
7 |
8 | package socket
9 |
10 | func controlHeaderLen() int {
11 | return 0
12 | }
13 |
14 | func controlMessageLen(dataLen int) int {
15 | return 0
16 | }
17 |
18 | func controlMessageSpace(dataLen int) int {
19 | return 0
20 | }
21 |
22 | type cmsghdr struct{}
23 |
24 | func (h *cmsghdr) len() int { return 0 }
25 | func (h *cmsghdr) lvl() int { return 0 }
26 | func (h *cmsghdr) typ() int { return 0 }
27 |
28 | func (h *cmsghdr) set(l, lvl, typ int) {}
29 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/cmsghdr_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
7 |
8 | package socket
9 |
10 | import "golang.org/x/sys/unix"
11 |
12 | func controlHeaderLen() int {
13 | return unix.CmsgLen(0)
14 | }
15 |
16 | func controlMessageLen(dataLen int) int {
17 | return unix.CmsgLen(dataLen)
18 | }
19 |
20 | func controlMessageSpace(dataLen int) int {
21 | return unix.CmsgSpace(dataLen)
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/cmsghdr_zos_s390x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | func (h *cmsghdr) set(l, lvl, typ int) {
8 | h.Len = int32(l)
9 | h.Level = int32(lvl)
10 | h.Type = int32(typ)
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/complete_nodontwait.go:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || windows || zos
6 | // +build aix windows zos
7 |
8 | package socket
9 |
10 | import (
11 | "syscall"
12 | )
13 |
14 | // ioComplete checks the flags and result of a syscall, to be used as return
15 | // value in a syscall.RawConn.Read or Write callback.
16 | func ioComplete(flags int, operr error) bool {
17 | if operr == syscall.EAGAIN || operr == syscall.EWOULDBLOCK {
18 | // No data available, block for I/O and try again.
19 | return false
20 | }
21 | return true
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/empty.s:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build darwin && go1.12
6 | // +build darwin,go1.12
7 |
8 | // This exists solely so we can linkname in symbols from syscall.
9 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/error_windows.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | import "syscall"
8 |
9 | var (
10 | errERROR_IO_PENDING error = syscall.ERROR_IO_PENDING
11 | errEINVAL error = syscall.EINVAL
12 | )
13 |
14 | // errnoErr returns common boxed Errno values, to prevent allocations
15 | // at runtime.
16 | func errnoErr(errno syscall.Errno) error {
17 | switch errno {
18 | case 0:
19 | return nil
20 | case syscall.ERROR_IO_PENDING:
21 | return errERROR_IO_PENDING
22 | case syscall.EINVAL:
23 | return errEINVAL
24 | }
25 | return errno
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/iovec_32bit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (arm || mips || mipsle || 386 || ppc) && (darwin || dragonfly || freebsd || linux || netbsd || openbsd)
6 | // +build arm mips mipsle 386 ppc
7 | // +build darwin dragonfly freebsd linux netbsd openbsd
8 |
9 | package socket
10 |
11 | import "unsafe"
12 |
13 | func (v *iovec) set(b []byte) {
14 | l := len(b)
15 | if l == 0 {
16 | return
17 | }
18 | v.Base = (*byte)(unsafe.Pointer(&b[0]))
19 | v.Len = uint32(l)
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/iovec_64bit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (arm64 || amd64 || loong64 || ppc64 || ppc64le || mips64 || mips64le || riscv64 || s390x) && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || zos)
6 | // +build arm64 amd64 loong64 ppc64 ppc64le mips64 mips64le riscv64 s390x
7 | // +build aix darwin dragonfly freebsd linux netbsd openbsd zos
8 |
9 | package socket
10 |
11 | import "unsafe"
12 |
13 | func (v *iovec) set(b []byte) {
14 | l := len(b)
15 | if l == 0 {
16 | return
17 | }
18 | v.Base = (*byte)(unsafe.Pointer(&b[0]))
19 | v.Len = uint64(l)
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/iovec_solaris_64bit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build amd64 && solaris
6 | // +build amd64,solaris
7 |
8 | package socket
9 |
10 | import "unsafe"
11 |
12 | func (v *iovec) set(b []byte) {
13 | l := len(b)
14 | if l == 0 {
15 | return
16 | }
17 | v.Base = (*int8)(unsafe.Pointer(&b[0]))
18 | v.Len = uint64(l)
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/iovec_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !zos
6 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
7 |
8 | package socket
9 |
10 | type iovec struct{}
11 |
12 | func (v *iovec) set(b []byte) {}
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !aix && !linux && !netbsd
6 | // +build !aix,!linux,!netbsd
7 |
8 | package socket
9 |
10 | import "net"
11 |
12 | type mmsghdr struct{}
13 |
14 | type mmsghdrs []mmsghdr
15 |
16 | func (hs mmsghdrs) pack(ms []Message, parseFn func([]byte, string) (net.Addr, error), marshalFn func(net.Addr) []byte) error {
17 | return nil
18 | }
19 |
20 | func (hs mmsghdrs) unpack(ms []Message, parseFn func([]byte, string) (net.Addr, error), hint string) error {
21 | return nil
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || darwin || dragonfly || freebsd || netbsd
6 | // +build aix darwin dragonfly freebsd netbsd
7 |
8 | package socket
9 |
10 | func (h *msghdr) setIov(vs []iovec) {
11 | l := len(vs)
12 | if l == 0 {
13 | return
14 | }
15 | h.Iov = &vs[0]
16 | h.Iovlen = int32(l)
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/msghdr_linux_32bit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (arm || mips || mipsle || 386 || ppc) && linux
6 | // +build arm mips mipsle 386 ppc
7 | // +build linux
8 |
9 | package socket
10 |
11 | import "unsafe"
12 |
13 | func (h *msghdr) setIov(vs []iovec) {
14 | l := len(vs)
15 | if l == 0 {
16 | return
17 | }
18 | h.Iov = &vs[0]
19 | h.Iovlen = uint32(l)
20 | }
21 |
22 | func (h *msghdr) setControl(b []byte) {
23 | h.Control = (*byte)(unsafe.Pointer(&b[0]))
24 | h.Controllen = uint32(len(b))
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (arm64 || amd64 || loong64 || ppc64 || ppc64le || mips64 || mips64le || riscv64 || s390x) && linux
6 | // +build arm64 amd64 loong64 ppc64 ppc64le mips64 mips64le riscv64 s390x
7 | // +build linux
8 |
9 | package socket
10 |
11 | import "unsafe"
12 |
13 | func (h *msghdr) setIov(vs []iovec) {
14 | l := len(vs)
15 | if l == 0 {
16 | return
17 | }
18 | h.Iov = &vs[0]
19 | h.Iovlen = uint64(l)
20 | }
21 |
22 | func (h *msghdr) setControl(b []byte) {
23 | h.Control = (*byte)(unsafe.Pointer(&b[0]))
24 | h.Controllen = uint64(len(b))
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/msghdr_openbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | func (h *msghdr) setIov(vs []iovec) {
8 | l := len(vs)
9 | if l == 0 {
10 | return
11 | }
12 | h.Iov = &vs[0]
13 | h.Iovlen = uint32(l)
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/msghdr_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !zos
6 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
7 |
8 | package socket
9 |
10 | type msghdr struct{}
11 |
12 | func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) {}
13 | func (h *msghdr) name() []byte { return nil }
14 | func (h *msghdr) controllen() int { return 0 }
15 | func (h *msghdr) flags() int { return 0 }
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/norace.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !race
6 | // +build !race
7 |
8 | package socket
9 |
10 | func (m *Message) raceRead() {
11 | }
12 | func (m *Message) raceWrite() {
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !linux
6 | // +build !linux
7 |
8 | package socket
9 |
10 | func (c *Conn) recvMsgs(ms []Message, flags int) (int, error) {
11 | return 0, errNotImplemented
12 | }
13 |
14 | func (c *Conn) sendMsgs(ms []Message, flags int) (int, error) {
15 | return 0, errNotImplemented
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
6 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
7 |
8 | package socket
9 |
10 | func (c *Conn) recvMsg(m *Message, flags int) error {
11 | return errNotImplemented
12 | }
13 |
14 | func (c *Conn) sendMsg(m *Message, flags int) error {
15 | return errNotImplemented
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | import (
8 | "encoding/binary"
9 | "unsafe"
10 | )
11 |
12 | // NativeEndian is the machine native endian implementation of ByteOrder.
13 | var NativeEndian binary.ByteOrder
14 |
15 | func init() {
16 | i := uint32(1)
17 | b := (*[4]byte)(unsafe.Pointer(&i))
18 | if b[0] == 1 {
19 | NativeEndian = binary.LittleEndian
20 | } else {
21 | NativeEndian = binary.BigEndian
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_bsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || darwin || dragonfly || freebsd || openbsd || solaris
6 | // +build aix darwin dragonfly freebsd openbsd solaris
7 |
8 | package socket
9 |
10 | func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
11 | return 0, errNotImplemented
12 | }
13 |
14 | func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
15 | return 0, errNotImplemented
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_const_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
7 |
8 | package socket
9 |
10 | import "golang.org/x/sys/unix"
11 |
12 | const (
13 | sysAF_UNSPEC = unix.AF_UNSPEC
14 | sysAF_INET = unix.AF_INET
15 | sysAF_INET6 = unix.AF_INET6
16 |
17 | sysSOCK_RAW = unix.SOCK_RAW
18 |
19 | sizeofSockaddrInet4 = unix.SizeofSockaddrInet4
20 | sizeofSockaddrInet6 = unix.SizeofSockaddrInet6
21 | )
22 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && !s390x && !386
6 | // +build linux,!s390x,!386
7 |
8 | package socket
9 |
10 | import (
11 | "syscall"
12 | "unsafe"
13 | )
14 |
15 | func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
16 | n, _, errno := syscall.Syscall6(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
17 | return int(n), errnoErr(errno)
18 | }
19 |
20 | func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
21 | n, _, errno := syscall.Syscall6(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
22 | return int(n), errnoErr(errno)
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | #include "textflag.h"
6 |
7 | TEXT ·socketcall(SB),NOSPLIT,$0-36
8 | JMP syscall·socketcall(SB)
9 |
10 | TEXT ·rawsocketcall(SB),NOSPLIT,$0-36
11 | JMP syscall·rawsocketcall(SB)
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | const (
8 | sysRECVMMSG = 0x12b
9 | sysSENDMMSG = 0x133
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | const (
8 | sysRECVMMSG = 0x16d
9 | sysSENDMMSG = 0x176
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | const (
8 | sysRECVMMSG = 0xf3
9 | sysSENDMMSG = 0x10d
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_loong64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build loong64
6 | // +build loong64
7 |
8 | package socket
9 |
10 | const (
11 | sysRECVMMSG = 0xf3
12 | sysSENDMMSG = 0x10d
13 | )
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_mips.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | const (
8 | sysRECVMMSG = 0x10ef
9 | sysSENDMMSG = 0x10f7
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_mips64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | const (
8 | sysRECVMMSG = 0x14ae
9 | sysSENDMMSG = 0x14b6
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_mips64le.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | const (
8 | sysRECVMMSG = 0x14ae
9 | sysSENDMMSG = 0x14b6
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_mipsle.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | const (
8 | sysRECVMMSG = 0x10ef
9 | sysSENDMMSG = 0x10f7
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_ppc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | const (
8 | sysRECVMMSG = 0x157
9 | sysSENDMMSG = 0x15d
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | const (
8 | sysRECVMMSG = 0x157
9 | sysSENDMMSG = 0x15d
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64le.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | const (
8 | sysRECVMMSG = 0x157
9 | sysSENDMMSG = 0x15d
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_riscv64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build riscv64
6 | // +build riscv64
7 |
8 | package socket
9 |
10 | const (
11 | sysRECVMMSG = 0xf3
12 | sysSENDMMSG = 0x10d
13 | )
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | #include "textflag.h"
6 |
7 | TEXT ·socketcall(SB),NOSPLIT,$0-72
8 | JMP syscall·socketcall(SB)
9 |
10 | TEXT ·rawsocketcall(SB),NOSPLIT,$0-72
11 | JMP syscall·rawsocketcall(SB)
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_netbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | import (
8 | "syscall"
9 | "unsafe"
10 | )
11 |
12 | const (
13 | sysRECVMMSG = 0x1db
14 | sysSENDMMSG = 0x1dc
15 | )
16 |
17 | func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
18 | n, _, errno := syscall.Syscall6(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
19 | return int(n), errnoErr(errno)
20 | }
21 |
22 | func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
23 | n, _, errno := syscall.Syscall6(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
24 | return int(n), errnoErr(errno)
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/sys_zos_s390x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | #include "textflag.h"
6 |
7 | TEXT ·syscall_syscall(SB),NOSPLIT,$0
8 | JMP syscall·_syscall(SB)
9 |
10 | TEXT ·syscall_syscall6(SB),NOSPLIT,$0
11 | JMP syscall·_syscall6(SB)
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_aix_ppc64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_aix.go
3 |
4 | // Added for go1.11 compatibility
5 | //go:build aix
6 | // +build aix
7 |
8 | package socket
9 |
10 | type iovec struct {
11 | Base *byte
12 | Len uint64
13 | }
14 |
15 | type msghdr struct {
16 | Name *byte
17 | Namelen uint32
18 | Iov *iovec
19 | Iovlen int32
20 | Control *byte
21 | Controllen uint32
22 | Flags int32
23 | }
24 |
25 | type mmsghdr struct {
26 | Hdr msghdr
27 | Len uint32
28 | Pad_cgo_0 [4]byte
29 | }
30 |
31 | type cmsghdr struct {
32 | Len uint32
33 | Level int32
34 | Type int32
35 | }
36 |
37 | const (
38 | sizeofIovec = 0x10
39 | sizeofMsghdr = 0x30
40 | )
41 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_darwin.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen int32
17 | Pad_cgo_1 [4]byte
18 | Control *byte
19 | Controllen uint32
20 | Flags int32
21 | }
22 |
23 | type cmsghdr struct {
24 | Len uint32
25 | Level int32
26 | Type int32
27 | }
28 |
29 | const (
30 | sizeofIovec = 0x10
31 | sizeofMsghdr = 0x30
32 | )
33 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_darwin.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen int32
17 | Pad_cgo_1 [4]byte
18 | Control *byte
19 | Controllen uint32
20 | Flags int32
21 | }
22 |
23 | type cmsghdr struct {
24 | Len uint32
25 | Level int32
26 | Type int32
27 | }
28 |
29 | const (
30 | sizeofIovec = 0x10
31 | sizeofMsghdr = 0x30
32 | )
33 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_dragonfly.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen int32
17 | Pad_cgo_1 [4]byte
18 | Control *byte
19 | Controllen uint32
20 | Flags int32
21 | }
22 |
23 | type cmsghdr struct {
24 | Len uint32
25 | Level int32
26 | Type int32
27 | }
28 |
29 | const (
30 | sizeofIovec = 0x10
31 | sizeofMsghdr = 0x30
32 | )
33 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_freebsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint32
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen int32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type cmsghdr struct {
22 | Len uint32
23 | Level int32
24 | Type int32
25 | }
26 |
27 | const (
28 | sizeofIovec = 0x8
29 | sizeofMsghdr = 0x1c
30 | )
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_freebsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen int32
17 | Pad_cgo_1 [4]byte
18 | Control *byte
19 | Controllen uint32
20 | Flags int32
21 | }
22 |
23 | type cmsghdr struct {
24 | Len uint32
25 | Level int32
26 | Type int32
27 | }
28 |
29 | const (
30 | sizeofIovec = 0x10
31 | sizeofMsghdr = 0x30
32 | )
33 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_freebsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint32
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen int32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type cmsghdr struct {
22 | Len uint32
23 | Level int32
24 | Type int32
25 | }
26 |
27 | const (
28 | sizeofIovec = 0x8
29 | sizeofMsghdr = 0x1c
30 | )
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_freebsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen int32
17 | Pad_cgo_1 [4]byte
18 | Control *byte
19 | Controllen uint32
20 | Flags int32
21 | }
22 |
23 | type cmsghdr struct {
24 | Len uint32
25 | Level int32
26 | Type int32
27 | }
28 |
29 | const (
30 | sizeofIovec = 0x10
31 | sizeofMsghdr = 0x30
32 | )
33 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_freebsd_riscv64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_freebsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen int32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type cmsghdr struct {
22 | Len uint32
23 | Level int32
24 | Type int32
25 | }
26 |
27 | const (
28 | sizeofIovec = 0x10
29 | sizeofMsghdr = 0x30
30 | )
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_linux_386.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_linux.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint32
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen uint32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type mmsghdr struct {
22 | Hdr msghdr
23 | Len uint32
24 | }
25 |
26 | type cmsghdr struct {
27 | Len uint32
28 | Level int32
29 | Type int32
30 | }
31 |
32 | const (
33 | sizeofIovec = 0x8
34 | sizeofMsghdr = 0x1c
35 | )
36 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_linux.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen uint64
17 | Control *byte
18 | Controllen uint64
19 | Flags int32
20 | Pad_cgo_1 [4]byte
21 | }
22 |
23 | type mmsghdr struct {
24 | Hdr msghdr
25 | Len uint32
26 | Pad_cgo_0 [4]byte
27 | }
28 |
29 | type cmsghdr struct {
30 | Len uint64
31 | Level int32
32 | Type int32
33 | }
34 |
35 | const (
36 | sizeofIovec = 0x10
37 | sizeofMsghdr = 0x38
38 | )
39 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_linux.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint32
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen uint32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type mmsghdr struct {
22 | Hdr msghdr
23 | Len uint32
24 | }
25 |
26 | type cmsghdr struct {
27 | Len uint32
28 | Level int32
29 | Type int32
30 | }
31 |
32 | const (
33 | sizeofIovec = 0x8
34 | sizeofMsghdr = 0x1c
35 | )
36 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_linux.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen uint64
17 | Control *byte
18 | Controllen uint64
19 | Flags int32
20 | Pad_cgo_1 [4]byte
21 | }
22 |
23 | type mmsghdr struct {
24 | Hdr msghdr
25 | Len uint32
26 | Pad_cgo_0 [4]byte
27 | }
28 |
29 | type cmsghdr struct {
30 | Len uint64
31 | Level int32
32 | Type int32
33 | }
34 |
35 | const (
36 | sizeofIovec = 0x10
37 | sizeofMsghdr = 0x38
38 | )
39 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_linux_loong64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_linux.go
3 |
4 | //go:build loong64
5 | // +build loong64
6 |
7 | package socket
8 |
9 | type iovec struct {
10 | Base *byte
11 | Len uint64
12 | }
13 |
14 | type msghdr struct {
15 | Name *byte
16 | Namelen uint32
17 | Iov *iovec
18 | Iovlen uint64
19 | Control *byte
20 | Controllen uint64
21 | Flags int32
22 | Pad_cgo_0 [4]byte
23 | }
24 |
25 | type mmsghdr struct {
26 | Hdr msghdr
27 | Len uint32
28 | Pad_cgo_0 [4]byte
29 | }
30 |
31 | type cmsghdr struct {
32 | Len uint64
33 | Level int32
34 | Type int32
35 | }
36 |
37 | const (
38 | sizeofIovec = 0x10
39 | sizeofMsghdr = 0x38
40 | )
41 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_linux.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint32
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen uint32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type mmsghdr struct {
22 | Hdr msghdr
23 | Len uint32
24 | }
25 |
26 | type cmsghdr struct {
27 | Len uint32
28 | Level int32
29 | Type int32
30 | }
31 |
32 | const (
33 | sizeofIovec = 0x8
34 | sizeofMsghdr = 0x1c
35 | )
36 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_linux.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen uint64
17 | Control *byte
18 | Controllen uint64
19 | Flags int32
20 | Pad_cgo_1 [4]byte
21 | }
22 |
23 | type mmsghdr struct {
24 | Hdr msghdr
25 | Len uint32
26 | Pad_cgo_0 [4]byte
27 | }
28 |
29 | type cmsghdr struct {
30 | Len uint64
31 | Level int32
32 | Type int32
33 | }
34 |
35 | const (
36 | sizeofIovec = 0x10
37 | sizeofMsghdr = 0x38
38 | )
39 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_linux.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen uint64
17 | Control *byte
18 | Controllen uint64
19 | Flags int32
20 | Pad_cgo_1 [4]byte
21 | }
22 |
23 | type mmsghdr struct {
24 | Hdr msghdr
25 | Len uint32
26 | Pad_cgo_0 [4]byte
27 | }
28 |
29 | type cmsghdr struct {
30 | Len uint64
31 | Level int32
32 | Type int32
33 | }
34 |
35 | const (
36 | sizeofIovec = 0x10
37 | sizeofMsghdr = 0x38
38 | )
39 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_linux.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint32
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen uint32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type mmsghdr struct {
22 | Hdr msghdr
23 | Len uint32
24 | }
25 |
26 | type cmsghdr struct {
27 | Len uint32
28 | Level int32
29 | Type int32
30 | }
31 |
32 | const (
33 | sizeofIovec = 0x8
34 | sizeofMsghdr = 0x1c
35 | )
36 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_linux.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint32
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen uint32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type mmsghdr struct {
22 | Hdr msghdr
23 | Len uint32
24 | }
25 |
26 | type cmsghdr struct {
27 | Len uint32
28 | Level int32
29 | Type int32
30 | }
31 |
32 | const (
33 | sizeofIovec = 0x8
34 | sizeofMsghdr = 0x1c
35 | )
36 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_linux.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen uint64
17 | Control *byte
18 | Controllen uint64
19 | Flags int32
20 | Pad_cgo_1 [4]byte
21 | }
22 |
23 | type mmsghdr struct {
24 | Hdr msghdr
25 | Len uint32
26 | Pad_cgo_0 [4]byte
27 | }
28 |
29 | type cmsghdr struct {
30 | Len uint64
31 | Level int32
32 | Type int32
33 | }
34 |
35 | const (
36 | sizeofIovec = 0x10
37 | sizeofMsghdr = 0x38
38 | )
39 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_linux.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen uint64
17 | Control *byte
18 | Controllen uint64
19 | Flags int32
20 | Pad_cgo_1 [4]byte
21 | }
22 |
23 | type mmsghdr struct {
24 | Hdr msghdr
25 | Len uint32
26 | Pad_cgo_0 [4]byte
27 | }
28 |
29 | type cmsghdr struct {
30 | Len uint64
31 | Level int32
32 | Type int32
33 | }
34 |
35 | const (
36 | sizeofIovec = 0x10
37 | sizeofMsghdr = 0x38
38 | )
39 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_linux_riscv64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_linux.go
3 |
4 | //go:build riscv64
5 | // +build riscv64
6 |
7 | package socket
8 |
9 | type iovec struct {
10 | Base *byte
11 | Len uint64
12 | }
13 |
14 | type msghdr struct {
15 | Name *byte
16 | Namelen uint32
17 | Iov *iovec
18 | Iovlen uint64
19 | Control *byte
20 | Controllen uint64
21 | Flags int32
22 | Pad_cgo_0 [4]byte
23 | }
24 |
25 | type mmsghdr struct {
26 | Hdr msghdr
27 | Len uint32
28 | Pad_cgo_0 [4]byte
29 | }
30 |
31 | type cmsghdr struct {
32 | Len uint64
33 | Level int32
34 | Type int32
35 | }
36 |
37 | const (
38 | sizeofIovec = 0x10
39 | sizeofMsghdr = 0x38
40 | )
41 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_linux.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen uint64
17 | Control *byte
18 | Controllen uint64
19 | Flags int32
20 | Pad_cgo_1 [4]byte
21 | }
22 |
23 | type mmsghdr struct {
24 | Hdr msghdr
25 | Len uint32
26 | Pad_cgo_0 [4]byte
27 | }
28 |
29 | type cmsghdr struct {
30 | Len uint64
31 | Level int32
32 | Type int32
33 | }
34 |
35 | const (
36 | sizeofIovec = 0x10
37 | sizeofMsghdr = 0x38
38 | )
39 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_netbsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint32
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen int32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type mmsghdr struct {
22 | Hdr msghdr
23 | Len uint32
24 | }
25 |
26 | type cmsghdr struct {
27 | Len uint32
28 | Level int32
29 | Type int32
30 | }
31 |
32 | const (
33 | sizeofIovec = 0x8
34 | sizeofMsghdr = 0x1c
35 | )
36 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_netbsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen int32
17 | Pad_cgo_1 [4]byte
18 | Control *byte
19 | Controllen uint32
20 | Flags int32
21 | }
22 |
23 | type mmsghdr struct {
24 | Hdr msghdr
25 | Len uint32
26 | Pad_cgo_0 [4]byte
27 | }
28 |
29 | type cmsghdr struct {
30 | Len uint32
31 | Level int32
32 | Type int32
33 | }
34 |
35 | const (
36 | sizeofIovec = 0x10
37 | sizeofMsghdr = 0x30
38 | )
39 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_netbsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint32
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen int32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type mmsghdr struct {
22 | Hdr msghdr
23 | Len uint32
24 | }
25 |
26 | type cmsghdr struct {
27 | Len uint32
28 | Level int32
29 | Type int32
30 | }
31 |
32 | const (
33 | sizeofIovec = 0x8
34 | sizeofMsghdr = 0x1c
35 | )
36 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_netbsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen int32
17 | Pad_cgo_1 [4]byte
18 | Control *byte
19 | Controllen uint32
20 | Flags int32
21 | }
22 |
23 | type mmsghdr struct {
24 | Hdr msghdr
25 | Len uint32
26 | Pad_cgo_0 [4]byte
27 | }
28 |
29 | type cmsghdr struct {
30 | Len uint32
31 | Level int32
32 | Type int32
33 | }
34 |
35 | const (
36 | sizeofIovec = 0x10
37 | sizeofMsghdr = 0x30
38 | )
39 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_openbsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint32
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen uint32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type cmsghdr struct {
22 | Len uint32
23 | Level int32
24 | Type int32
25 | }
26 |
27 | const (
28 | sizeofIovec = 0x8
29 | sizeofMsghdr = 0x1c
30 | )
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_openbsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen uint32
17 | Pad_cgo_1 [4]byte
18 | Control *byte
19 | Controllen uint32
20 | Flags int32
21 | }
22 |
23 | type cmsghdr struct {
24 | Len uint32
25 | Level int32
26 | Type int32
27 | }
28 |
29 | const (
30 | sizeofIovec = 0x10
31 | sizeofMsghdr = 0x30
32 | )
33 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_openbsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint32
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen uint32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type cmsghdr struct {
22 | Len uint32
23 | Level int32
24 | Type int32
25 | }
26 |
27 | const (
28 | sizeofIovec = 0x8
29 | sizeofMsghdr = 0x1c
30 | )
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_openbsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen uint32
17 | Pad_cgo_1 [4]byte
18 | Control *byte
19 | Controllen uint32
20 | Flags int32
21 | }
22 |
23 | type cmsghdr struct {
24 | Len uint32
25 | Level int32
26 | Type int32
27 | }
28 |
29 | const (
30 | sizeofIovec = 0x10
31 | sizeofMsghdr = 0x30
32 | )
33 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_openbsd_mips64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_openbsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen uint32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type cmsghdr struct {
22 | Len uint32
23 | Level int32
24 | Type int32
25 | }
26 |
27 | const (
28 | sizeofIovec = 0x10
29 | sizeofMsghdr = 0x30
30 | )
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_openbsd_ppc64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_openbsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen uint32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type cmsghdr struct {
22 | Len uint32
23 | Level int32
24 | Type int32
25 | }
26 |
27 | const (
28 | sizeofIovec = 0x10
29 | sizeofMsghdr = 0x30
30 | )
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_openbsd_riscv64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_openbsd.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *byte
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Iov *iovec
15 | Iovlen uint32
16 | Control *byte
17 | Controllen uint32
18 | Flags int32
19 | }
20 |
21 | type cmsghdr struct {
22 | Len uint32
23 | Level int32
24 | Type int32
25 | }
26 |
27 | const (
28 | sizeofIovec = 0x10
29 | sizeofMsghdr = 0x30
30 | )
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_solaris.go
3 |
4 | package socket
5 |
6 | type iovec struct {
7 | Base *int8
8 | Len uint64
9 | }
10 |
11 | type msghdr struct {
12 | Name *byte
13 | Namelen uint32
14 | Pad_cgo_0 [4]byte
15 | Iov *iovec
16 | Iovlen int32
17 | Pad_cgo_1 [4]byte
18 | Accrights *int8
19 | Accrightslen int32
20 | Pad_cgo_2 [4]byte
21 | }
22 |
23 | type cmsghdr struct {
24 | Len uint32
25 | Level int32
26 | Type int32
27 | }
28 |
29 | const (
30 | sizeofIovec = 0x10
31 | sizeofMsghdr = 0x30
32 | )
33 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/internal/socket/zsys_zos_s390x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package socket
6 |
7 | type iovec struct {
8 | Base *byte
9 | Len uint64
10 | }
11 |
12 | type msghdr struct {
13 | Name *byte
14 | Iov *iovec
15 | Control *byte
16 | Flags int32
17 | Namelen uint32
18 | Iovlen int32
19 | Controllen uint32
20 | }
21 |
22 | type cmsghdr struct {
23 | Len int32
24 | Level int32
25 | Type int32
26 | }
27 |
28 | const sizeofCmsghdr = 12
29 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/control_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
6 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
7 |
8 | package ipv4
9 |
10 | import "golang.org/x/net/internal/socket"
11 |
12 | func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
13 | return errNotImplemented
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/control_windows.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package ipv4
6 |
7 | import "golang.org/x/net/internal/socket"
8 |
9 | func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
10 | // TODO(mikio): implement this
11 | return errNotImplemented
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/icmp_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package ipv4
6 |
7 | func (f *icmpFilter) accept(typ ICMPType) {
8 | f.Data &^= 1 << (uint32(typ) & 31)
9 | }
10 |
11 | func (f *icmpFilter) block(typ ICMPType) {
12 | f.Data |= 1 << (uint32(typ) & 31)
13 | }
14 |
15 | func (f *icmpFilter) setAll(block bool) {
16 | if block {
17 | f.Data = 1<<32 - 1
18 | } else {
19 | f.Data = 0
20 | }
21 | }
22 |
23 | func (f *icmpFilter) willBlock(typ ICMPType) bool {
24 | return f.Data&(1<<(uint32(typ)&31)) != 0
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/icmp_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !linux
6 | // +build !linux
7 |
8 | package ipv4
9 |
10 | const sizeofICMPFilter = 0x0
11 |
12 | type icmpFilter struct {
13 | }
14 |
15 | func (f *icmpFilter) accept(typ ICMPType) {
16 | }
17 |
18 | func (f *icmpFilter) block(typ ICMPType) {
19 | }
20 |
21 | func (f *icmpFilter) setAll(block bool) {
22 | }
23 |
24 | func (f *icmpFilter) willBlock(typ ICMPType) bool {
25 | return false
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/payload.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package ipv4
6 |
7 | import (
8 | "net"
9 |
10 | "golang.org/x/net/internal/socket"
11 | )
12 |
13 | // BUG(mikio): On Windows, the ControlMessage for ReadFrom and WriteTo
14 | // methods of PacketConn is not implemented.
15 |
16 | // A payloadHandler represents the IPv4 datagram payload handler.
17 | type payloadHandler struct {
18 | net.PacketConn
19 | *socket.Conn
20 | rawOpt
21 | }
22 |
23 | func (c *payloadHandler) ok() bool { return c != nil && c.PacketConn != nil && c.Conn != nil }
24 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/sys_asmreqn_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !darwin && !freebsd && !linux
6 | // +build !darwin,!freebsd,!linux
7 |
8 | package ipv4
9 |
10 | import (
11 | "net"
12 |
13 | "golang.org/x/net/internal/socket"
14 | )
15 |
16 | func (so *sockOpt) getIPMreqn(c *socket.Conn) (*net.Interface, error) {
17 | return nil, errNotImplemented
18 | }
19 |
20 | func (so *sockOpt) setIPMreqn(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
21 | return errNotImplemented
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/sys_bpf.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux
6 | // +build linux
7 |
8 | package ipv4
9 |
10 | import (
11 | "unsafe"
12 |
13 | "golang.org/x/net/bpf"
14 | "golang.org/x/net/internal/socket"
15 | "golang.org/x/sys/unix"
16 | )
17 |
18 | func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error {
19 | prog := unix.SockFprog{
20 | Len: uint16(len(f)),
21 | Filter: (*unix.SockFilter)(unsafe.Pointer(&f[0])),
22 | }
23 | b := (*[unix.SizeofSockFprog]byte)(unsafe.Pointer(&prog))[:unix.SizeofSockFprog]
24 | return so.Set(c, b)
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/sys_bpf_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !linux
6 | // +build !linux
7 |
8 | package ipv4
9 |
10 | import (
11 | "golang.org/x/net/bpf"
12 | "golang.org/x/net/internal/socket"
13 | )
14 |
15 | func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error {
16 | return errNotImplemented
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/sys_ssmreq_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !darwin && !freebsd && !linux && !solaris
6 | // +build !darwin,!freebsd,!linux,!solaris
7 |
8 | package ipv4
9 |
10 | import (
11 | "net"
12 |
13 | "golang.org/x/net/internal/socket"
14 | )
15 |
16 | func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
17 | return errNotImplemented
18 | }
19 |
20 | func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
21 | return errNotImplemented
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/sys_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
6 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
7 |
8 | package ipv4
9 |
10 | var (
11 | ctlOpts = [ctlMax]ctlOpt{}
12 |
13 | sockOpts = map[int]*sockOpt{}
14 | )
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/zsys_aix_ppc64.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_aix.go
3 |
4 | // Added for go1.11 compatibility
5 | //go:build aix
6 | // +build aix
7 |
8 | package ipv4
9 |
10 | const (
11 | sizeofIPMreq = 0x8
12 | )
13 |
14 | type ipMreq struct {
15 | Multiaddr [4]byte /* in_addr */
16 | Interface [4]byte /* in_addr */
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/zsys_dragonfly.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_dragonfly.go
3 |
4 | package ipv4
5 |
6 | const (
7 | sizeofIPMreq = 0x8
8 | )
9 |
10 | type ipMreq struct {
11 | Multiaddr [4]byte /* in_addr */
12 | Interface [4]byte /* in_addr */
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/zsys_netbsd.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_netbsd.go
3 |
4 | package ipv4
5 |
6 | const (
7 | sizeofIPMreq = 0x8
8 | )
9 |
10 | type ipMreq struct {
11 | Multiaddr [4]byte /* in_addr */
12 | Interface [4]byte /* in_addr */
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv4/zsys_openbsd.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_openbsd.go
3 |
4 | package ipv4
5 |
6 | const (
7 | sizeofIPMreq = 0x8
8 | )
9 |
10 | type ipMreq struct {
11 | Multiaddr [4]byte /* in_addr */
12 | Interface [4]byte /* in_addr */
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/control_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
6 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
7 |
8 | package ipv6
9 |
10 | import "golang.org/x/net/internal/socket"
11 |
12 | func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
13 | return errNotImplemented
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/control_windows.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package ipv6
6 |
7 | import "golang.org/x/net/internal/socket"
8 |
9 | func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
10 | // TODO(mikio): implement this
11 | return errNotImplemented
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/icmp_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package ipv6
6 |
7 | func (f *icmpv6Filter) accept(typ ICMPType) {
8 | f.Data[typ>>5] &^= 1 << (uint32(typ) & 31)
9 | }
10 |
11 | func (f *icmpv6Filter) block(typ ICMPType) {
12 | f.Data[typ>>5] |= 1 << (uint32(typ) & 31)
13 | }
14 |
15 | func (f *icmpv6Filter) setAll(block bool) {
16 | for i := range f.Data {
17 | if block {
18 | f.Data[i] = 1<<32 - 1
19 | } else {
20 | f.Data[i] = 0
21 | }
22 | }
23 | }
24 |
25 | func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
26 | return f.Data[typ>>5]&(1<<(uint32(typ)&31)) != 0
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/icmp_solaris.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package ipv6
6 |
7 | func (f *icmpv6Filter) accept(typ ICMPType) {
8 | f.X__icmp6_filt[typ>>5] |= 1 << (uint32(typ) & 31)
9 | }
10 |
11 | func (f *icmpv6Filter) block(typ ICMPType) {
12 | f.X__icmp6_filt[typ>>5] &^= 1 << (uint32(typ) & 31)
13 | }
14 |
15 | func (f *icmpv6Filter) setAll(block bool) {
16 | for i := range f.X__icmp6_filt {
17 | if block {
18 | f.X__icmp6_filt[i] = 0
19 | } else {
20 | f.X__icmp6_filt[i] = 1<<32 - 1
21 | }
22 | }
23 | }
24 |
25 | func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
26 | return f.X__icmp6_filt[typ>>5]&(1<<(uint32(typ)&31)) == 0
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/icmp_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
6 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
7 |
8 | package ipv6
9 |
10 | type icmpv6Filter struct {
11 | }
12 |
13 | func (f *icmpv6Filter) accept(typ ICMPType) {
14 | }
15 |
16 | func (f *icmpv6Filter) block(typ ICMPType) {
17 | }
18 |
19 | func (f *icmpv6Filter) setAll(block bool) {
20 | }
21 |
22 | func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
23 | return false
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/icmp_windows.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package ipv6
6 |
7 | func (f *icmpv6Filter) accept(typ ICMPType) {
8 | // TODO(mikio): implement this
9 | }
10 |
11 | func (f *icmpv6Filter) block(typ ICMPType) {
12 | // TODO(mikio): implement this
13 | }
14 |
15 | func (f *icmpv6Filter) setAll(block bool) {
16 | // TODO(mikio): implement this
17 | }
18 |
19 | func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
20 | // TODO(mikio): implement this
21 | return false
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/icmp_zos.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package ipv6
6 |
7 | func (f *icmpv6Filter) accept(typ ICMPType) {
8 | f.Filt[typ>>5] |= 1 << (uint32(typ) & 31)
9 |
10 | }
11 |
12 | func (f *icmpv6Filter) block(typ ICMPType) {
13 | f.Filt[typ>>5] &^= 1 << (uint32(typ) & 31)
14 |
15 | }
16 |
17 | func (f *icmpv6Filter) setAll(block bool) {
18 | for i := range f.Filt {
19 | if block {
20 | f.Filt[i] = 0
21 | } else {
22 | f.Filt[i] = 1<<32 - 1
23 | }
24 | }
25 | }
26 |
27 | func (f *icmpv6Filter) willBlock(typ ICMPType) bool {
28 | return f.Filt[typ>>5]&(1<<(uint32(typ)&31)) == 0
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/payload.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package ipv6
6 |
7 | import (
8 | "net"
9 |
10 | "golang.org/x/net/internal/socket"
11 | )
12 |
13 | // BUG(mikio): On Windows, the ControlMessage for ReadFrom and WriteTo
14 | // methods of PacketConn is not implemented.
15 |
16 | // A payloadHandler represents the IPv6 datagram payload handler.
17 | type payloadHandler struct {
18 | net.PacketConn
19 | *socket.Conn
20 | rawOpt
21 | }
22 |
23 | func (c *payloadHandler) ok() bool { return c != nil && c.PacketConn != nil && c.Conn != nil }
24 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/sys_asmreq.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows
6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
7 |
8 | package ipv6
9 |
10 | import (
11 | "net"
12 | "unsafe"
13 |
14 | "golang.org/x/net/internal/socket"
15 | )
16 |
17 | func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
18 | var mreq ipv6Mreq
19 | copy(mreq.Multiaddr[:], grp)
20 | if ifi != nil {
21 | mreq.setIfindex(ifi.Index)
22 | }
23 | b := (*[sizeofIPv6Mreq]byte)(unsafe.Pointer(&mreq))[:sizeofIPv6Mreq]
24 | return so.Set(c, b)
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/sys_asmreq_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows
6 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
7 |
8 | package ipv6
9 |
10 | import (
11 | "net"
12 |
13 | "golang.org/x/net/internal/socket"
14 | )
15 |
16 | func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
17 | return errNotImplemented
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/sys_bpf.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux
6 | // +build linux
7 |
8 | package ipv6
9 |
10 | import (
11 | "unsafe"
12 |
13 | "golang.org/x/net/bpf"
14 | "golang.org/x/net/internal/socket"
15 | "golang.org/x/sys/unix"
16 | )
17 |
18 | func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error {
19 | prog := unix.SockFprog{
20 | Len: uint16(len(f)),
21 | Filter: (*unix.SockFilter)(unsafe.Pointer(&f[0])),
22 | }
23 | b := (*[unix.SizeofSockFprog]byte)(unsafe.Pointer(&prog))[:unix.SizeofSockFprog]
24 | return so.Set(c, b)
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/sys_bpf_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !linux
6 | // +build !linux
7 |
8 | package ipv6
9 |
10 | import (
11 | "golang.org/x/net/bpf"
12 | "golang.org/x/net/internal/socket"
13 | )
14 |
15 | func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error {
16 | return errNotImplemented
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/sys_ssmreq_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !aix && !darwin && !freebsd && !linux && !solaris && !zos
6 | // +build !aix,!darwin,!freebsd,!linux,!solaris,!zos
7 |
8 | package ipv6
9 |
10 | import (
11 | "net"
12 |
13 | "golang.org/x/net/internal/socket"
14 | )
15 |
16 | func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
17 | return errNotImplemented
18 | }
19 |
20 | func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
21 | return errNotImplemented
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/sys_stub.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
6 | // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
7 |
8 | package ipv6
9 |
10 | var (
11 | ctlOpts = [ctlMax]ctlOpt{}
12 |
13 | sockOpts = map[int]*sockOpt{}
14 | )
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/zsys_netbsd.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_netbsd.go
3 |
4 | package ipv6
5 |
6 | const (
7 | sizeofSockaddrInet6 = 0x1c
8 | sizeofInet6Pktinfo = 0x14
9 | sizeofIPv6Mtuinfo = 0x20
10 |
11 | sizeofIPv6Mreq = 0x14
12 |
13 | sizeofICMPv6Filter = 0x20
14 | )
15 |
16 | type sockaddrInet6 struct {
17 | Len uint8
18 | Family uint8
19 | Port uint16
20 | Flowinfo uint32
21 | Addr [16]byte /* in6_addr */
22 | Scope_id uint32
23 | }
24 |
25 | type inet6Pktinfo struct {
26 | Addr [16]byte /* in6_addr */
27 | Ifindex uint32
28 | }
29 |
30 | type ipv6Mtuinfo struct {
31 | Addr sockaddrInet6
32 | Mtu uint32
33 | }
34 |
35 | type ipv6Mreq struct {
36 | Multiaddr [16]byte /* in6_addr */
37 | Interface uint32
38 | }
39 |
40 | type icmpv6Filter struct {
41 | Filt [8]uint32
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/net/ipv6/zsys_openbsd.go:
--------------------------------------------------------------------------------
1 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
2 | // cgo -godefs defs_openbsd.go
3 |
4 | package ipv6
5 |
6 | const (
7 | sizeofSockaddrInet6 = 0x1c
8 | sizeofInet6Pktinfo = 0x14
9 | sizeofIPv6Mtuinfo = 0x20
10 |
11 | sizeofIPv6Mreq = 0x14
12 |
13 | sizeofICMPv6Filter = 0x20
14 | )
15 |
16 | type sockaddrInet6 struct {
17 | Len uint8
18 | Family uint8
19 | Port uint16
20 | Flowinfo uint32
21 | Addr [16]byte /* in6_addr */
22 | Scope_id uint32
23 | }
24 |
25 | type inet6Pktinfo struct {
26 | Addr [16]byte /* in6_addr */
27 | Ifindex uint32
28 | }
29 |
30 | type ipv6Mtuinfo struct {
31 | Addr sockaddrInet6
32 | Mtu uint32
33 | }
34 |
35 | type ipv6Mreq struct {
36 | Multiaddr [16]byte /* in6_addr */
37 | Interface uint32
38 | }
39 |
40 | type icmpv6Filter struct {
41 | Filt [8]uint32
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sync/errgroup/go120.go:
--------------------------------------------------------------------------------
1 | // Copyright 2023 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build go1.20
6 | // +build go1.20
7 |
8 | package errgroup
9 |
10 | import "context"
11 |
12 | func withCancelCause(parent context.Context) (context.Context, func(error)) {
13 | return context.WithCancelCause(parent)
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sync/errgroup/pre_go120.go:
--------------------------------------------------------------------------------
1 | // Copyright 2023 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !go1.20
6 | // +build !go1.20
7 |
8 | package errgroup
9 |
10 | import "context"
11 |
12 | func withCancelCause(parent context.Context) (context.Context, func(error)) {
13 | ctx, cancel := context.WithCancel(parent)
14 | return ctx, func(error) { cancel() }
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gc
6 | // +build gc
7 |
8 | #include "textflag.h"
9 |
10 | //
11 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go
12 | //
13 |
14 | TEXT ·syscall6(SB),NOSPLIT,$0-88
15 | JMP syscall·syscall6(SB)
16 |
17 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88
18 | JMP syscall·rawSyscall6(SB)
19 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_aix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix
6 | // +build aix
7 |
8 | package cpu
9 |
10 | const (
11 | // getsystemcfg constants
12 | _SC_IMPL = 2
13 | _IMPL_POWER8 = 0x10000
14 | _IMPL_POWER9 = 0x20000
15 | )
16 |
17 | func archInit() {
18 | impl := getsystemcfg(_SC_IMPL)
19 | if impl&_IMPL_POWER8 != 0 {
20 | PPC64.IsPOWER8 = true
21 | }
22 | if impl&_IMPL_POWER9 != 0 {
23 | PPC64.IsPOWER8 = true
24 | PPC64.IsPOWER9 = true
25 | }
26 |
27 | Initialized = true
28 | }
29 |
30 | func getsystemcfg(label int) (n uint64) {
31 | r0, _ := callgetsystemcfg(label)
32 | n = uint64(r0)
33 | return
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gc
6 | // +build gc
7 |
8 | package cpu
9 |
10 | func getisar0() uint64
11 | func getisar1() uint64
12 | func getpfr0() uint64
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gc
6 | // +build gc
7 |
8 | package cpu
9 |
10 | // haveAsmFunctions reports whether the other functions in this file can
11 | // be safely called.
12 | func haveAsmFunctions() bool { return true }
13 |
14 | // The following feature detection functions are defined in cpu_s390x.s.
15 | // They are likely to be expensive to call so the results should be cached.
16 | func stfle() facilityList
17 | func kmQuery() queryResult
18 | func kmcQuery() queryResult
19 | func kmctrQuery() queryResult
20 | func kmaQuery() queryResult
21 | func kimdQuery() queryResult
22 | func klmdQuery() queryResult
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_gc_x86.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (386 || amd64 || amd64p32) && gc
6 | // +build 386 amd64 amd64p32
7 | // +build gc
8 |
9 | package cpu
10 |
11 | // cpuid is implemented in cpu_x86.s for gc compiler
12 | // and in cpu_gccgo.c for gccgo.
13 | func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)
14 |
15 | // xgetbv with ecx = 0 is implemented in cpu_x86.s for gc compiler
16 | // and in cpu_gccgo.c for gccgo.
17 | func xgetbv() (eax, edx uint32)
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gccgo
6 | // +build gccgo
7 |
8 | package cpu
9 |
10 | func getisar0() uint64 { return 0 }
11 | func getisar1() uint64 { return 0 }
12 | func getpfr0() uint64 { return 0 }
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !386 && !amd64 && !amd64p32 && !arm64
6 | // +build !386,!amd64,!amd64p32,!arm64
7 |
8 | package cpu
9 |
10 | func archInit() {
11 | if err := readHWCAP(); err != nil {
12 | return
13 | }
14 | doinit()
15 | Initialized = true
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && (mips64 || mips64le)
6 | // +build linux
7 | // +build mips64 mips64le
8 |
9 | package cpu
10 |
11 | // HWCAP bits. These are exposed by the Linux kernel 5.4.
12 | const (
13 | // CPU features
14 | hwcap_MIPS_MSA = 1 << 1
15 | )
16 |
17 | func doinit() {
18 | // HWCAP feature bits
19 | MIPS64X.HasMSA = isSet(hwCap, hwcap_MIPS_MSA)
20 | }
21 |
22 | func isSet(hwc uint, value uint) bool {
23 | return hwc&value != 0
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x
6 | // +build linux,!arm,!arm64,!mips64,!mips64le,!ppc64,!ppc64le,!s390x
7 |
8 | package cpu
9 |
10 | func doinit() {}
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_loong64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build loong64
6 | // +build loong64
7 |
8 | package cpu
9 |
10 | const cacheLineSize = 64
11 |
12 | func initOptions() {
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_mips64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build mips64 || mips64le
6 | // +build mips64 mips64le
7 |
8 | package cpu
9 |
10 | const cacheLineSize = 32
11 |
12 | func initOptions() {
13 | options = []option{
14 | {Name: "msa", Feature: &MIPS64X.HasMSA},
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_mipsx.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build mips || mipsle
6 | // +build mips mipsle
7 |
8 | package cpu
9 |
10 | const cacheLineSize = 32
11 |
12 | func initOptions() {}
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | #include "textflag.h"
6 |
7 | TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
8 | JMP libc_sysctl(SB)
9 |
10 | GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
11 | DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_other_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !linux && arm
6 | // +build !linux,arm
7 |
8 | package cpu
9 |
10 | func archInit() {}
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !linux && !netbsd && !openbsd && arm64
6 | // +build !linux,!netbsd,!openbsd,arm64
7 |
8 | package cpu
9 |
10 | func doinit() {}
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !linux && (mips64 || mips64le)
6 | // +build !linux
7 | // +build mips64 mips64le
8 |
9 | package cpu
10 |
11 | func archInit() {
12 | Initialized = true
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !aix && !linux && (ppc64 || ppc64le)
6 | // +build !aix
7 | // +build !linux
8 | // +build ppc64 ppc64le
9 |
10 | package cpu
11 |
12 | func archInit() {
13 | PPC64.IsPOWER8 = true
14 | Initialized = true
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_other_riscv64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !linux && riscv64
6 | // +build !linux,riscv64
7 |
8 | package cpu
9 |
10 | func archInit() {
11 | Initialized = true
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_ppc64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build ppc64 || ppc64le
6 | // +build ppc64 ppc64le
7 |
8 | package cpu
9 |
10 | const cacheLineSize = 128
11 |
12 | func initOptions() {
13 | options = []option{
14 | {Name: "darn", Feature: &PPC64.HasDARN},
15 | {Name: "scv", Feature: &PPC64.HasSCV},
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_riscv64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build riscv64
6 | // +build riscv64
7 |
8 | package cpu
9 |
10 | const cacheLineSize = 32
11 |
12 | func initOptions() {}
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_wasm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build wasm
6 | // +build wasm
7 |
8 | package cpu
9 |
10 | // We're compiling the cpu package for an unknown (software-abstracted) CPU.
11 | // Make CacheLinePad an empty struct and hope that the usual struct alignment
12 | // rules are good enough.
13 |
14 | const cacheLineSize = 0
15 |
16 | func initOptions() {}
17 |
18 | func archInit() {}
19 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_x86.s:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (386 || amd64 || amd64p32) && gc
6 | // +build 386 amd64 amd64p32
7 | // +build gc
8 |
9 | #include "textflag.h"
10 |
11 | // func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32)
12 | TEXT ·cpuid(SB), NOSPLIT, $0-24
13 | MOVL eaxArg+0(FP), AX
14 | MOVL ecxArg+4(FP), CX
15 | CPUID
16 | MOVL AX, eax+8(FP)
17 | MOVL BX, ebx+12(FP)
18 | MOVL CX, ecx+16(FP)
19 | MOVL DX, edx+20(FP)
20 | RET
21 |
22 | // func xgetbv() (eax, edx uint32)
23 | TEXT ·xgetbv(SB),NOSPLIT,$0-8
24 | MOVL $0, CX
25 | XGETBV
26 | MOVL AX, eax+0(FP)
27 | MOVL DX, edx+4(FP)
28 | RET
29 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_zos.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cpu
6 |
7 | func archInit() {
8 | doinit()
9 | Initialized = true
10 | }
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/cpu_zos_s390x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cpu
6 |
7 | func initS390Xbase() {
8 | // get the facilities list
9 | facilities := stfle()
10 |
11 | // mandatory
12 | S390X.HasZARCH = facilities.Has(zarch)
13 | S390X.HasSTFLE = facilities.Has(stflef)
14 | S390X.HasLDISP = facilities.Has(ldisp)
15 | S390X.HasEIMM = facilities.Has(eimm)
16 |
17 | // optional
18 | S390X.HasETF3EH = facilities.Has(etf3eh)
19 | S390X.HasDFP = facilities.Has(dfp)
20 | S390X.HasMSA = facilities.Has(msa)
21 | S390X.HasVX = facilities.Has(vx)
22 | if S390X.HasVX {
23 | S390X.HasVXE = facilities.Has(vxe)
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/endian_big.go:
--------------------------------------------------------------------------------
1 | // Copyright 2023 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64
6 | // +build armbe arm64be m68k mips mips64 mips64p32 ppc ppc64 s390 s390x shbe sparc sparc64
7 |
8 | package cpu
9 |
10 | // IsBigEndian records whether the GOARCH's byte order is big endian.
11 | const IsBigEndian = true
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/endian_little.go:
--------------------------------------------------------------------------------
1 | // Copyright 2023 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh || wasm
6 | // +build 386 amd64 amd64p32 alpha arm arm64 loong64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh wasm
7 |
8 | package cpu
9 |
10 | // IsBigEndian records whether the GOARCH's byte order is big endian.
11 | const IsBigEndian = false
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/runtime_auxv.go:
--------------------------------------------------------------------------------
1 | // Copyright 2023 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package cpu
6 |
7 | // getAuxvFn is non-nil on Go 1.21+ (via runtime_auxv_go121.go init)
8 | // on platforms that use auxv.
9 | var getAuxvFn func() []uintptr
10 |
11 | func getAuxv() []uintptr {
12 | if getAuxvFn == nil {
13 | return nil
14 | }
15 | return getAuxvFn()
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go:
--------------------------------------------------------------------------------
1 | // Copyright 2023 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build go1.21
6 | // +build go1.21
7 |
8 | package cpu
9 |
10 | import (
11 | _ "unsafe" // for linkname
12 | )
13 |
14 | //go:linkname runtime_getAuxv runtime.getAuxv
15 | func runtime_getAuxv() []uintptr
16 |
17 | func init() {
18 | getAuxvFn = runtime_getAuxv
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/execabs/execabs_go118.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !go1.19
6 | // +build !go1.19
7 |
8 | package execabs
9 |
10 | import "os/exec"
11 |
12 | func isGo119ErrDot(err error) bool {
13 | return false
14 | }
15 |
16 | func isGo119ErrFieldSet(cmd *exec.Cmd) bool {
17 | return false
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/execabs/execabs_go119.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build go1.19
6 | // +build go1.19
7 |
8 | package execabs
9 |
10 | import (
11 | "errors"
12 | "os/exec"
13 | )
14 |
15 | func isGo119ErrDot(err error) bool {
16 | return errors.Is(err, exec.ErrDot)
17 | }
18 |
19 | func isGo119ErrFieldSet(cmd *exec.Cmd) bool {
20 | return cmd.Err != nil
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/.gitignore:
--------------------------------------------------------------------------------
1 | _obj/
2 | unix.test
3 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/aliases.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) && go1.9
6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
7 | // +build go1.9
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | type Signal = syscall.Signal
14 | type Errno = syscall.Errno
15 | type SysProcAttr = syscall.SysProcAttr
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gc
6 | // +build gc
7 |
8 | #include "textflag.h"
9 |
10 | //
11 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go
12 | //
13 |
14 | TEXT ·syscall6(SB),NOSPLIT,$0-88
15 | JMP syscall·syscall6(SB)
16 |
17 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88
18 | JMP syscall·rawSyscall6(SB)
19 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_bsd_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (freebsd || netbsd || openbsd) && gc
6 | // +build freebsd netbsd openbsd
7 | // +build gc
8 |
9 | #include "textflag.h"
10 |
11 | // System call support for ARM BSD
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | B syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | B syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | B syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gc
6 | // +build gc
7 |
8 | #include "textflag.h"
9 |
10 | //
11 | // System call support for mips64, OpenBSD
12 | //
13 |
14 | // Just jump to package syscall's implementation for all these functions.
15 | // The runtime may know about them.
16 |
17 | TEXT ·Syscall(SB),NOSPLIT,$0-56
18 | JMP syscall·Syscall(SB)
19 |
20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
21 | JMP syscall·Syscall6(SB)
22 |
23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
24 | JMP syscall·Syscall9(SB)
25 |
26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
27 | JMP syscall·RawSyscall(SB)
28 |
29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
30 | JMP syscall·RawSyscall6(SB)
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gc
6 | // +build gc
7 |
8 | #include "textflag.h"
9 |
10 | //
11 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go
12 | //
13 |
14 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88
15 | JMP syscall·sysvicall6(SB)
16 |
17 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88
18 | JMP syscall·rawSysvicall6(SB)
19 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/bluetooth_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Bluetooth sockets and messages
6 |
7 | package unix
8 |
9 | // Bluetooth Protocols
10 | const (
11 | BTPROTO_L2CAP = 0
12 | BTPROTO_HCI = 1
13 | BTPROTO_SCO = 2
14 | BTPROTO_RFCOMM = 3
15 | BTPROTO_BNEP = 4
16 | BTPROTO_CMTP = 5
17 | BTPROTO_HIDP = 6
18 | BTPROTO_AVDTP = 7
19 | )
20 |
21 | const (
22 | HCI_CHANNEL_RAW = 0
23 | HCI_CHANNEL_USER = 1
24 | HCI_CHANNEL_MONITOR = 2
25 | HCI_CHANNEL_CONTROL = 3
26 | HCI_CHANNEL_LOGGING = 4
27 | )
28 |
29 | // Socketoption Level
30 | const (
31 | SOL_BLUETOOTH = 0x112
32 | SOL_HCI = 0x0
33 | SOL_L2CAP = 0x6
34 | SOL_RFCOMM = 0x12
35 | SOL_SCO = 0x11
36 | )
37 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/constants.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
7 |
8 | package unix
9 |
10 | const (
11 | R_OK = 0x4
12 | W_OK = 0x2
13 | X_OK = 0x1
14 | )
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/endian_big.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 | //
5 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64
6 | // +build armbe arm64be m68k mips mips64 mips64p32 ppc ppc64 s390 s390x shbe sparc sparc64
7 |
8 | package unix
9 |
10 | const isBigEndian = true
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/endian_little.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 | //
5 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh
6 | // +build 386 amd64 amd64p32 alpha arm arm64 loong64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh
7 |
8 | package unix
9 |
10 | const isBigEndian = false
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc)
6 | // +build linux,386 linux,arm linux,mips linux,mipsle linux,ppc
7 |
8 | package unix
9 |
10 | func init() {
11 | // On 32-bit Linux systems, the fcntl syscall that matches Go's
12 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL.
13 | fcntl64Syscall = SYS_FCNTL64
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build gccgo && linux && amd64
6 | // +build gccgo,linux,amd64
7 |
8 | package unix
9 |
10 | import "syscall"
11 |
12 | //extern gettimeofday
13 | func realGettimeofday(*Timeval, *byte) int32
14 |
15 | func gettimeofday(tv *Timeval) (err syscall.Errno) {
16 | r := realGettimeofday(tv, nil)
17 | if r < 0 {
18 | return syscall.GetErrno()
19 | }
20 | return 0
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/pagesize_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
7 |
8 | // For Unix, get the pagesize from the runtime.
9 |
10 | package unix
11 |
12 | import "syscall"
13 |
14 | func Getpagesize() int {
15 | return syscall.Getpagesize()
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/ptrace_darwin.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build darwin && !ios
6 | // +build darwin,!ios
7 |
8 | package unix
9 |
10 | import "unsafe"
11 |
12 | func ptrace(request int, pid int, addr uintptr, data uintptr) error {
13 | return ptrace1(request, pid, addr, data)
14 | }
15 |
16 | func ptracePtr(request int, pid int, addr uintptr, data unsafe.Pointer) error {
17 | return ptrace1Ptr(request, pid, addr, data)
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/ptrace_ios.go:
--------------------------------------------------------------------------------
1 | // Copyright 2020 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build ios
6 | // +build ios
7 |
8 | package unix
9 |
10 | import "unsafe"
11 |
12 | func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
13 | return ENOTSUP
14 | }
15 |
16 | func ptracePtr(request int, pid int, addr uintptr, data unsafe.Pointer) (err error) {
17 | return ENOTSUP
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/race.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (darwin && race) || (linux && race) || (freebsd && race)
6 | // +build darwin,race linux,race freebsd,race
7 |
8 | package unix
9 |
10 | import (
11 | "runtime"
12 | "unsafe"
13 | )
14 |
15 | const raceenabled = true
16 |
17 | func raceAcquire(addr unsafe.Pointer) {
18 | runtime.RaceAcquire(addr)
19 | }
20 |
21 | func raceReleaseMerge(addr unsafe.Pointer) {
22 | runtime.RaceReleaseMerge(addr)
23 | }
24 |
25 | func raceReadRange(addr unsafe.Pointer, len int) {
26 | runtime.RaceReadRange(addr, len)
27 | }
28 |
29 | func raceWriteRange(addr unsafe.Pointer, len int) {
30 | runtime.RaceWriteRange(addr, len)
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/race0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos
6 | // +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly zos
7 |
8 | package unix
9 |
10 | import (
11 | "unsafe"
12 | )
13 |
14 | const raceenabled = false
15 |
16 | func raceAcquire(addr unsafe.Pointer) {
17 | }
18 |
19 | func raceReleaseMerge(addr unsafe.Pointer) {
20 | }
21 |
22 | func raceReadRange(addr unsafe.Pointer, len int) {
23 | }
24 |
25 | func raceWriteRange(addr unsafe.Pointer, len int) {
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/readdirent_getdents.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd
6 | // +build aix dragonfly freebsd linux netbsd openbsd
7 |
8 | package unix
9 |
10 | // ReadDirent reads directory entries from fd and writes them into buf.
11 | func ReadDirent(fd int, buf []byte) (n int, err error) {
12 | return Getdents(fd, buf)
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build darwin
6 | // +build darwin
7 |
8 | package unix
9 |
10 | import "unsafe"
11 |
12 | // ReadDirent reads directory entries from fd and writes them into buf.
13 | func ReadDirent(fd int, buf []byte) (n int, err error) {
14 | // Final argument is (basep *uintptr) and the syscall doesn't take nil.
15 | // 64 bits should be enough. (32 bits isn't even on 386). Since the
16 | // actual system call is getdirentries64, 64 is a good guess.
17 | // TODO(rsc): Can we use a single global basep for all calls?
18 | var base = (*uintptr)(unsafe.Pointer(new(uint64)))
19 | return Getdirentries(fd, buf, base)
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package unix
6 |
7 | // Round the length of a raw sockaddr up to align it properly.
8 | func cmsgAlignOf(salen int) int {
9 | salign := SizeofPtr
10 | if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) {
11 | // 64-bit Dragonfly before the September 2019 ABI changes still requires
12 | // 32-bit aligned access to network subsystem.
13 | salign = 4
14 | }
15 | return (salen + salign - 1) & ^(salign - 1)
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_hurd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build hurd
6 | // +build hurd
7 |
8 | package unix
9 |
10 | /*
11 | #include
12 | int ioctl(int, unsigned long int, uintptr_t);
13 | */
14 | import "C"
15 |
16 | func ioctl(fd int, req uint, arg uintptr) (err error) {
17 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg))
18 | if r0 == -1 && er != nil {
19 | err = er
20 | }
21 | return
22 | }
23 |
24 | func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
25 | r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(uintptr(arg)))
26 | if r0 == -1 && er != nil {
27 | err = er
28 | }
29 | return
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_hurd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build 386 && hurd
6 | // +build 386,hurd
7 |
8 | package unix
9 |
10 | const (
11 | TIOCGETA = 0x62251713
12 | )
13 |
14 | type Winsize struct {
15 | Row uint16
16 | Col uint16
17 | Xpixel uint16
18 | Ypixel uint16
19 | }
20 |
21 | type Termios struct {
22 | Iflag uint32
23 | Oflag uint32
24 | Cflag uint32
25 | Lflag uint32
26 | Cc [20]uint8
27 | Ispeed int32
28 | Ospeed int32
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_alarm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && (386 || amd64 || mips || mipsle || mips64 || mipsle || ppc64 || ppc64le || ppc || s390x || sparc64)
6 | // +build linux
7 | // +build 386 amd64 mips mipsle mips64 mipsle ppc64 ppc64le ppc s390x sparc64
8 |
9 | package unix
10 |
11 | // SYS_ALARM is not defined on arm or riscv, but is available for other GOARCH
12 | // values.
13 |
14 | //sys Alarm(seconds uint) (remaining uint, err error)
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build amd64 && linux && gc
6 | // +build amd64,linux,gc
7 |
8 | package unix
9 |
10 | import "syscall"
11 |
12 | //go:noescape
13 | func gettimeofday(tv *Timeval) (err syscall.Errno)
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && gc
6 | // +build linux,gc
7 |
8 | package unix
9 |
10 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail.
11 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
12 |
13 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't
14 | // fail.
15 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && gc && 386
6 | // +build linux,gc,386
7 |
8 | package unix
9 |
10 | import "syscall"
11 |
12 | // Underlying system call writes to newoffset via pointer.
13 | // Implemented in assembly to avoid allocation.
14 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
15 |
16 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
17 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build arm && gc && linux
6 | // +build arm,gc,linux
7 |
8 | package unix
9 |
10 | import "syscall"
11 |
12 | // Underlying system call writes to newoffset via pointer.
13 | // Implemented in assembly to avoid allocation.
14 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux && gccgo && arm
6 | // +build linux,gccgo,arm
7 |
8 | package unix
9 |
10 | import (
11 | "syscall"
12 | "unsafe"
13 | )
14 |
15 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
16 | var newoffset int64
17 | offsetLow := uint32(offset & 0xffffffff)
18 | offsetHigh := uint32((offset >> 32) & 0xffffffff)
19 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
20 | return newoffset, err
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build amd64 && solaris
6 | // +build amd64,solaris
7 |
8 | package unix
9 |
10 | func setTimespec(sec, nsec int64) Timespec {
11 | return Timespec{Sec: sec, Nsec: nsec}
12 | }
13 |
14 | func setTimeval(sec, usec int64) Timeval {
15 | return Timeval{Sec: sec, Usec: usec}
16 | }
17 |
18 | func (iov *Iovec) SetLen(length int) {
19 | iov.Len = uint64(length)
20 | }
21 |
22 | func (msghdr *Msghdr) SetIovlen(length int) {
23 | msghdr.Iovlen = int32(length)
24 | }
25 |
26 | func (cmsg *Cmsghdr) SetLen(length int) {
27 | cmsg.Len = uint32(length)
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_unix_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc
6 | // +build darwin dragonfly freebsd linux,!ppc64,!ppc64le netbsd openbsd solaris
7 | // +build gc
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
14 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
15 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
16 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/sysvshm_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build linux
6 | // +build linux
7 |
8 | package unix
9 |
10 | import "runtime"
11 |
12 | // SysvShmCtl performs control operations on the shared memory segment
13 | // specified by id.
14 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
15 | if runtime.GOARCH == "arm" ||
16 | runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" {
17 | cmd |= ipc_64
18 | }
19 |
20 | return shmctl(id, cmd, desc)
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/sysvshm_unix_other.go:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build darwin && !ios
6 | // +build darwin,!ios
7 |
8 | package unix
9 |
10 | // SysvShmCtl performs control operations on the shared memory segment
11 | // specified by id.
12 | func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
13 | return shmctl(id, cmd, desc)
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go:
--------------------------------------------------------------------------------
1 | // Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT.
2 |
3 | package unix
4 |
5 | import "unsafe"
6 |
7 | // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries.
8 | func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error {
9 | iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))}
10 | return ptracePtr(PTRACE_GETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec))
11 | }
12 |
13 | // PtraceSetRegSetArm64 sets the registers used by arm64 binaries.
14 | func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error {
15 | iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))}
16 | return ptracePtr(PTRACE_SETREGSET, pid, uintptr(addr), unsafe.Pointer(&iovec))
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/aliases.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build windows && go1.9
6 | // +build windows,go1.9
7 |
8 | package windows
9 |
10 | import "syscall"
11 |
12 | type Errno = syscall.Errno
13 | type SysProcAttr = syscall.SysProcAttr
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/empty.s:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !go1.12
6 | // +build !go1.12
7 |
8 | // This file is here to allow bodyless functions with go:linkname for Go 1.11
9 | // and earlier (see https://golang.org/issue/23311).
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/mksyscall.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build generate
6 | // +build generate
7 |
8 | package windows
9 |
10 | //go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go setupapi_windows.go
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/race.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build windows && race
6 | // +build windows,race
7 |
8 | package windows
9 |
10 | import (
11 | "runtime"
12 | "unsafe"
13 | )
14 |
15 | const raceenabled = true
16 |
17 | func raceAcquire(addr unsafe.Pointer) {
18 | runtime.RaceAcquire(addr)
19 | }
20 |
21 | func raceReleaseMerge(addr unsafe.Pointer) {
22 | runtime.RaceReleaseMerge(addr)
23 | }
24 |
25 | func raceReadRange(addr unsafe.Pointer, len int) {
26 | runtime.RaceReadRange(addr, len)
27 | }
28 |
29 | func raceWriteRange(addr unsafe.Pointer, len int) {
30 | runtime.RaceWriteRange(addr, len)
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/race0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build windows && !race
6 | // +build windows,!race
7 |
8 | package windows
9 |
10 | import (
11 | "unsafe"
12 | )
13 |
14 | const raceenabled = false
15 |
16 | func raceAcquire(addr unsafe.Pointer) {
17 | }
18 |
19 | func raceReleaseMerge(addr unsafe.Pointer) {
20 | }
21 |
22 | func raceReadRange(addr unsafe.Pointer, len int) {
23 | }
24 |
25 | func raceWriteRange(addr unsafe.Pointer, len int) {
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/windows/str.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build windows
6 | // +build windows
7 |
8 | package windows
9 |
10 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency
11 | if val < 0 {
12 | return "-" + itoa(-val)
13 | }
14 | var buf [32]byte // big enough for int64
15 | i := len(buf) - 1
16 | for val >= 10 {
17 | buf[i] = byte(val%10 + '0')
18 | i--
19 | val /= 10
20 | }
21 | buf[i] = byte(val + '0')
22 | return string(buf[i:])
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/internal/event/doc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Package event provides a set of packages that cover the main
6 | // concepts of telemetry in an implementation agnostic way.
7 | package event
8 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/internal/gcimporter/newInterface10.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !go1.11
6 | // +build !go1.11
7 |
8 | package gcimporter
9 |
10 | import "go/types"
11 |
12 | func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface {
13 | named := make([]*types.Named, len(embeddeds))
14 | for i, e := range embeddeds {
15 | var ok bool
16 | named[i], ok = e.(*types.Named)
17 | if !ok {
18 | panic("embedding of non-defined interfaces in interfaces is not supported before Go 1.11")
19 | }
20 | }
21 | return types.NewInterface(methods, named)
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/internal/gcimporter/newInterface11.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build go1.11
6 | // +build go1.11
7 |
8 | package gcimporter
9 |
10 | import "go/types"
11 |
12 | func newInterface(methods []*types.Func, embeddeds []types.Type) *types.Interface {
13 | return types.NewInterfaceType(methods, embeddeds)
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/internal/gcimporter/support_go117.go:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !go1.18
6 | // +build !go1.18
7 |
8 | package gcimporter
9 |
10 | import "go/types"
11 |
12 | const iexportVersion = iexportVersionGo1_11
13 |
14 | func additionalPredeclared() []types.Type {
15 | return nil
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/internal/gcimporter/unified_no.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !(go1.18 && goexperiment.unified)
6 | // +build !go1.18 !goexperiment.unified
7 |
8 | package gcimporter
9 |
10 | const unifiedIR = false
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/internal/gcimporter/unified_yes.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build go1.18 && goexperiment.unified
6 | // +build go1.18,goexperiment.unified
7 |
8 | package gcimporter
9 |
10 | const unifiedIR = true
11 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/internal/gcimporter/ureader_no.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !go1.18
6 | // +build !go1.18
7 |
8 | package gcimporter
9 |
10 | import (
11 | "fmt"
12 | "go/token"
13 | "go/types"
14 | )
15 |
16 | func UImportData(fset *token.FileSet, imports map[string]*types.Package, data []byte, path string) (_ int, pkg *types.Package, err error) {
17 | err = fmt.Errorf("go/tools compiled with a Go version earlier than 1.18 cannot read unified IR export data")
18 | return
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/internal/pkgbits/flags.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package pkgbits
6 |
7 | const (
8 | flagSyncMarkers = 1 << iota // file format contains sync markers
9 | )
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/internal/pkgbits/frames_go1.go:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !go1.7
6 | // +build !go1.7
7 |
8 | // TODO(mdempsky): Remove after #44505 is resolved
9 |
10 | package pkgbits
11 |
12 | import "runtime"
13 |
14 | func walkFrames(pcs []uintptr, visit frameVisitor) {
15 | for _, pc := range pcs {
16 | fn := runtime.FuncForPC(pc)
17 | file, line := fn.FileLine(pc)
18 |
19 | visit(file, line, fn.Name(), pc-fn.Entry())
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/internal/pkgbits/frames_go17.go:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build go1.7
6 | // +build go1.7
7 |
8 | package pkgbits
9 |
10 | import "runtime"
11 |
12 | // walkFrames calls visit for each call frame represented by pcs.
13 | //
14 | // pcs should be a slice of PCs, as returned by runtime.Callers.
15 | func walkFrames(pcs []uintptr, visit frameVisitor) {
16 | if len(pcs) == 0 {
17 | return
18 | }
19 |
20 | frames := runtime.CallersFrames(pcs)
21 | for {
22 | frame, more := frames.Next()
23 | visit(frame.File, frame.Line, frame.Function, frame.PC-frame.Entry)
24 | if !more {
25 | return
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/internal/pkgbits/support.go:
--------------------------------------------------------------------------------
1 | // Copyright 2022 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package pkgbits
6 |
7 | import "fmt"
8 |
9 | func assert(b bool) {
10 | if !b {
11 | panic("assertion failed")
12 | }
13 | }
14 |
15 | func errorf(format string, args ...interface{}) {
16 | panic(fmt.Errorf(format, args...))
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/internal/typeparams/enabled_go117.go:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build !go1.18
6 | // +build !go1.18
7 |
8 | package typeparams
9 |
10 | // Enabled reports whether type parameters are enabled in the current build
11 | // environment.
12 | const Enabled = false
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/internal/typeparams/enabled_go118.go:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build go1.18
6 | // +build go1.18
7 |
8 | package typeparams
9 |
10 | // Note: this constant is in a separate file as this is the only acceptable
11 | // diff between the <1.18 API of this package and the 1.18 API.
12 |
13 | // Enabled reports whether type parameters are enabled in the current build
14 | // environment.
15 | const Enabled = true
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/tools/internal/typesinternal/types_118.go:
--------------------------------------------------------------------------------
1 | // Copyright 2021 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | //go:build go1.18
6 | // +build go1.18
7 |
8 | package typesinternal
9 |
10 | import (
11 | "go/types"
12 | )
13 |
14 | func init() {
15 | SetGoVersion = func(conf *types.Config, version string) bool {
16 | conf.GoVersion = version
17 | return true
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/golang.zx2c4.com/wireguard/wgctrl/.gitignore:
--------------------------------------------------------------------------------
1 | cmd/wgctrl/wgctrl
2 | *.test
3 |
--------------------------------------------------------------------------------
/vendor/golang.zx2c4.com/wireguard/wgctrl/doc.go:
--------------------------------------------------------------------------------
1 | // Package wgctrl enables control of WireGuard devices on multiple platforms.
2 | //
3 | // For more information on WireGuard, please see https://www.wireguard.com/.
4 | //
5 | // This package implements WireGuard configuration protocol operations, enabling
6 | // the configuration of existing WireGuard devices. Operations such as creating
7 | // WireGuard devices, or applying IP addresses to those devices, are out of scope
8 | // for this package.
9 | package wgctrl // import "golang.zx2c4.com/wireguard/wgctrl"
10 |
--------------------------------------------------------------------------------
/vendor/golang.zx2c4.com/wireguard/wgctrl/internal/wgfreebsd/doc.go:
--------------------------------------------------------------------------------
1 | // Package wgfreebsd provides internal access to FreeBSD's WireGuard
2 | // ioctl interface.
3 | //
4 | // This package is internal-only and not meant for end users to consume.
5 | // Please use package wgctrl (an abstraction over this package) instead.
6 | package wgfreebsd
7 |
--------------------------------------------------------------------------------
/vendor/golang.zx2c4.com/wireguard/wgctrl/internal/wgfreebsd/internal/nv/doc.go:
--------------------------------------------------------------------------------
1 | // Package nv marshals and unmarshals Go maps to/from FreeBSDs nv(9) name/value lists
2 | // See: https://www.freebsd.org/cgi/man.cgi?query=nv&sektion=9
3 | package nv
4 |
--------------------------------------------------------------------------------
/vendor/golang.zx2c4.com/wireguard/wgctrl/internal/wgfreebsd/internal/nv/types.go:
--------------------------------------------------------------------------------
1 | //go:build freebsd
2 | // +build freebsd
3 |
4 | package nv
5 |
6 | type List map[string]interface{}
7 |
--------------------------------------------------------------------------------
/vendor/golang.zx2c4.com/wireguard/wgctrl/internal/wgfreebsd/internal/wgh/defs_freebsd_386.go:
--------------------------------------------------------------------------------
1 | //go:build freebsd && 386
2 | // +build freebsd,386
3 |
4 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
5 | // cgo -godefs defs.go
6 |
7 | package wgh
8 |
9 | const (
10 | SizeofIfgreq = 0x10
11 |
12 | SIOCGWG = 0xc01869d3
13 | SIOCSWG = 0xc01869d2
14 | )
15 |
16 | type Ifgroupreq struct {
17 | Name [16]byte
18 | Len uint32
19 | Pad1 [0]byte
20 | Groups *Ifgreq
21 | Pad2 [12]byte
22 | }
23 |
24 | type Ifgreq struct {
25 | Ifgrqu [16]byte
26 | }
27 |
28 | type WGDataIO struct {
29 | Name [16]byte
30 | Data *byte
31 | Size uint32
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/golang.zx2c4.com/wireguard/wgctrl/internal/wgfreebsd/internal/wgh/defs_freebsd_amd64.go:
--------------------------------------------------------------------------------
1 | //go:build freebsd && amd64
2 | // +build freebsd,amd64
3 |
4 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
5 | // cgo -godefs defs.go
6 |
7 | package wgh
8 |
9 | const (
10 | SizeofIfgreq = 0x10
11 |
12 | SIOCGWG = 0xc02069d3
13 | SIOCSWG = 0xc02069d2
14 | )
15 |
16 | type Ifgroupreq struct {
17 | Name [16]byte
18 | Len uint32
19 | Pad1 [4]byte
20 | Groups *Ifgreq
21 | Pad2 [8]byte
22 | }
23 |
24 | type Ifgreq struct {
25 | Ifgrqu [16]byte
26 | }
27 |
28 | type WGDataIO struct {
29 | Name [16]byte
30 | Data *byte
31 | Size uint64
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/golang.zx2c4.com/wireguard/wgctrl/internal/wgfreebsd/internal/wgh/defs_freebsd_arm.go:
--------------------------------------------------------------------------------
1 | //go:build freebsd && arm
2 | // +build freebsd,arm
3 |
4 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
5 | // cgo -godefs defs.go
6 |
7 | package wgh
8 |
9 | const (
10 | SizeofIfgreq = 0x10
11 |
12 | SIOCGWG = 0xc01c69d3
13 | SIOCSWG = 0xc01c69d2
14 | )
15 |
16 | type Ifgroupreq struct {
17 | Name [16]byte
18 | Len uint32
19 | Pad1 [0]byte
20 | Groups *Ifgreq
21 | Pad2 [12]byte
22 | }
23 |
24 | type Ifgreq struct {
25 | Ifgrqu [16]byte
26 | }
27 |
28 | type WGDataIO struct {
29 | Name [16]byte
30 | Data *byte
31 | Size uint64
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/golang.zx2c4.com/wireguard/wgctrl/internal/wgfreebsd/internal/wgh/defs_freebsd_arm64.go:
--------------------------------------------------------------------------------
1 | //go:build freebsd && arm64
2 | // +build freebsd,arm64
3 |
4 | // Code generated by cmd/cgo -godefs; DO NOT EDIT.
5 | // cgo -godefs defs.go
6 |
7 | package wgh
8 |
9 | const (
10 | SizeofIfgreq = 0x10
11 |
12 | SIOCGWG = 0xc02069d3
13 | SIOCSWG = 0xc02069d2
14 | )
15 |
16 | type Ifgroupreq struct {
17 | Name [16]byte
18 | Len uint32
19 | Pad1 [4]byte
20 | Groups *Ifgreq
21 | Pad2 [8]byte
22 | }
23 |
24 | type Ifgreq struct {
25 | Ifgrqu [16]byte
26 | }
27 |
28 | type WGDataIO struct {
29 | Name [16]byte
30 | Data *byte
31 | Size uint64
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/golang.zx2c4.com/wireguard/wgctrl/internal/wgfreebsd/internal/wgh/doc.go:
--------------------------------------------------------------------------------
1 | // Package wgh is an auto-generated package which contains constants and
2 | // types used to access WireGuard information using ioctl calls.
3 | package wgh
4 |
--------------------------------------------------------------------------------
/vendor/golang.zx2c4.com/wireguard/wgctrl/internal/wginternal/client.go:
--------------------------------------------------------------------------------
1 | package wginternal
2 |
3 | import (
4 | "errors"
5 | "io"
6 |
7 | "golang.zx2c4.com/wireguard/wgctrl/wgtypes"
8 | )
9 |
10 | // ErrReadOnly indicates that the driver backing a device is read-only. It is
11 | // a sentinel value used in integration tests.
12 | // TODO(mdlayher): consider exposing in API.
13 | var ErrReadOnly = errors.New("driver is read-only")
14 |
15 | // A Client is a type which can control a WireGuard device.
16 | type Client interface {
17 | io.Closer
18 | Devices() ([]*wgtypes.Device, error)
19 | Device(name string) (*wgtypes.Device, error)
20 | ConfigureDevice(name string, cfg wgtypes.Config) error
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/golang.zx2c4.com/wireguard/wgctrl/internal/wginternal/doc.go:
--------------------------------------------------------------------------------
1 | // Package wginternal contains shared internal types for wgctrl.
2 | //
3 | // This package is internal-only and not meant for end users to consume.
4 | // Please use package wgctrl (an abstraction over this package) instead.
5 | package wginternal
6 |
--------------------------------------------------------------------------------
/vendor/golang.zx2c4.com/wireguard/wgctrl/internal/wglinux/doc.go:
--------------------------------------------------------------------------------
1 | // Package wglinux provides internal access to Linux's WireGuard generic
2 | // netlink interface.
3 | //
4 | // This package is internal-only and not meant for end users to consume.
5 | // Please use package wgctrl (an abstraction over this package) instead.
6 | package wglinux
7 |
--------------------------------------------------------------------------------
/vendor/golang.zx2c4.com/wireguard/wgctrl/internal/wgopenbsd/doc.go:
--------------------------------------------------------------------------------
1 | // Package wgopenbsd provides internal access to OpenBSD's WireGuard
2 | // ioctl interface.
3 | //
4 | // This package is internal-only and not meant for end users to consume.
5 | // Please use package wgctrl (an abstraction over this package) instead.
6 | package wgopenbsd
7 |
--------------------------------------------------------------------------------
/vendor/golang.zx2c4.com/wireguard/wgctrl/internal/wgopenbsd/internal/wgh/doc.go:
--------------------------------------------------------------------------------
1 | // Package wgh is an auto-generated package which contains constants and
2 | // types used to access WireGuard information using ioctl calls.
3 | package wgh
4 |
--------------------------------------------------------------------------------
/vendor/golang.zx2c4.com/wireguard/wgctrl/internal/wguser/doc.go:
--------------------------------------------------------------------------------
1 | // Package wguser provides internal access to the userspace WireGuard
2 | // configuration protocol interface.
3 | //
4 | // This package is internal-only and not meant for end users to consume.
5 | // Please use package wgctrl (an abstraction over this package) instead.
6 | package wguser
7 |
--------------------------------------------------------------------------------
/vendor/golang.zx2c4.com/wireguard/wgctrl/os_userspace.go:
--------------------------------------------------------------------------------
1 | //go:build !linux && !openbsd && !windows && !freebsd
2 | // +build !linux,!openbsd,!windows,!freebsd
3 |
4 | package wgctrl
5 |
6 | import (
7 | "golang.zx2c4.com/wireguard/wgctrl/internal/wginternal"
8 | "golang.zx2c4.com/wireguard/wgctrl/internal/wguser"
9 | )
10 |
11 | // newClients configures wginternal.Clients for systems which only support
12 | // userspace WireGuard implementations.
13 | func newClients() ([]wginternal.Client, error) {
14 | c, err := wguser.New()
15 | if err != nil {
16 | return nil, err
17 | }
18 |
19 | return []wginternal.Client{c}, nil
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/golang.zx2c4.com/wireguard/wgctrl/os_windows.go:
--------------------------------------------------------------------------------
1 | //go:build windows
2 | // +build windows
3 |
4 | package wgctrl
5 |
6 | import (
7 | "golang.zx2c4.com/wireguard/wgctrl/internal/wginternal"
8 | "golang.zx2c4.com/wireguard/wgctrl/internal/wguser"
9 | "golang.zx2c4.com/wireguard/wgctrl/internal/wgwindows"
10 | )
11 |
12 | // newClients configures wginternal.Clients for Windows systems.
13 | func newClients() ([]wginternal.Client, error) {
14 | var clients []wginternal.Client
15 |
16 | // Windows has an in-kernel WireGuard implementation.
17 | kc := wgwindows.New()
18 | clients = append(clients, kc)
19 |
20 | uc, err := wguser.New()
21 | if err != nil {
22 | return nil, err
23 | }
24 |
25 | clients = append(clients, uc)
26 | return clients, nil
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/golang.zx2c4.com/wireguard/wgctrl/wgtypes/doc.go:
--------------------------------------------------------------------------------
1 | // Package wgtypes provides shared types for the wgctrl family of packages.
2 | package wgtypes // import "golang.zx2c4.com/wireguard/wgctrl/wgtypes"
3 |
--------------------------------------------------------------------------------
/vendor/golang.zx2c4.com/wireguard/wgctrl/wgtypes/errors.go:
--------------------------------------------------------------------------------
1 | package wgtypes
2 |
3 | import (
4 | "errors"
5 | )
6 |
7 | // ErrUpdateOnlyNotSupported is returned due to missing kernel support of
8 | // the PeerConfig UpdateOnly flag.
9 | var ErrUpdateOnlyNotSupported = errors.New("the UpdateOnly flag is not supported by this platform")
10 |
11 |
--------------------------------------------------------------------------------