From 53312652ae64f2ea9cf587c9a45e5babb5bb9a17 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Mon, 9 Nov 2015 11:38:12 +0000 Subject: [PATCH 1/5] use vendoring Signed-off-by: Vasiliy Tolstov --- README.md | 2 +- fs.go | 441 --- icmp.go | 2 +- internal/gopkg.in/yaml.v1/README.md | 128 - internal/gopkg.in/yaml.v1/decode.go | 566 ---- internal/gopkg.in/yaml.v1/decode_test.go | 703 ----- internal/gopkg.in/yaml.v1/encode.go | 265 -- internal/gopkg.in/yaml.v1/encode_test.go | 433 --- internal/gopkg.in/yaml.v1/resolve.go | 190 -- internal/gopkg.in/yaml.v1/yaml.go | 301 -- internal/gopkg.in/yaml.v2/LICENSE | 188 -- internal/gopkg.in/yaml.v2/LICENSE.libyaml | 31 - internal/gopkg.in/yaml.v2/apic.go | 742 ----- internal/gopkg.in/yaml.v2/emitterc.go | 1685 ---------- internal/gopkg.in/yaml.v2/parserc.go | 1096 ------- internal/gopkg.in/yaml.v2/readerc.go | 391 --- internal/gopkg.in/yaml.v2/scannerc.go | 2710 ----------------- internal/gopkg.in/yaml.v2/sorter.go | 104 - internal/gopkg.in/yaml.v2/suite_test.go | 12 - internal/gopkg.in/yaml.v2/writerc.go | 89 - internal/gopkg.in/yaml.v2/yamlh.go | 716 ----- internal/gopkg.in/yaml.v2/yamlprivateh.go | 173 -- internal/iana/const.go | 184 -- internal/iana/gen.go | 289 -- internal/nettest/error_posix.go | 31 - internal/nettest/error_stub.go | 11 - internal/nettest/interface.go | 94 - internal/nettest/stack.go | 36 - internal/vendor.json | 77 - main.go | 2 +- server.go | 4 +- .../alexzorin/libvirt-go.v2/.drone.yml | 7 - .../alexzorin/libvirt-go.v2/.gitignore | 3 - .../gopkg.in/alexzorin/libvirt-go.v2/LICENSE | 21 - .../alexzorin/libvirt-go.v2/README.md | 49 - .../alexzorin/libvirt-go.v2/cfuncs.go | 96 - .../alexzorin/libvirt-go.v2/constants.go | 385 --- .../alexzorin/libvirt-go.v2/domain.go | 574 ---- .../alexzorin/libvirt-go.v2/domain_test.go | 483 --- .../gopkg.in/alexzorin/libvirt-go.v2/error.go | 504 --- .../alexzorin/libvirt-go.v2/events.go | 321 -- .../libvirt-go.v2/integration_test.go | 962 ------ .../alexzorin/libvirt-go.v2/interface.go | 87 - .../alexzorin/libvirt-go.v2/interface_test.go | 128 - .../alexzorin/libvirt-go.v2/libvirt.go | 878 ------ .../alexzorin/libvirt-go.v2/libvirt_test.go | 873 ------ .../alexzorin/libvirt-go.v2/network.go | 147 - .../alexzorin/libvirt-go.v2/network_test.go | 184 -- .../alexzorin/libvirt-go.v2/nodeinfo.go | 50 - .../alexzorin/libvirt-go.v2/nwfilter.go | 70 - .../alexzorin/libvirt-go.v2/secret.go | 78 - .../alexzorin/libvirt-go.v2/snapshot.go | 95 - .../alexzorin/libvirt-go.v2/storage_pool.go | 210 -- .../libvirt-go.v2/storage_pool_test.go | 292 -- .../alexzorin/libvirt-go.v2/storage_volume.go | 134 - .../libvirt-go.v2/storage_volume_test.go | 157 - .../alexzorin/libvirt-go.v2/stream.go | 79 - .../libvirt-go.v2/vagrant/master/Vagrantfile | 83 - .../vagrant-provision-reboot-plugin.rb | 176 -- third_party/src/gopkg.in/yaml.v2/LICENSE | 188 -- .../src/gopkg.in/yaml.v2/LICENSE.libyaml | 31 - third_party/src/gopkg.in/yaml.v2/README.md | 128 - third_party/src/gopkg.in/yaml.v2/apic.go | 742 ----- third_party/src/gopkg.in/yaml.v2/decode.go | 683 ----- .../src/gopkg.in/yaml.v2/decode_test.go | 966 ------ third_party/src/gopkg.in/yaml.v2/emitterc.go | 1685 ---------- third_party/src/gopkg.in/yaml.v2/encode.go | 306 -- .../src/gopkg.in/yaml.v2/encode_test.go | 501 --- third_party/src/gopkg.in/yaml.v2/parserc.go | 1096 ------- third_party/src/gopkg.in/yaml.v2/readerc.go | 391 --- third_party/src/gopkg.in/yaml.v2/resolve.go | 203 -- third_party/src/gopkg.in/yaml.v2/scannerc.go | 2710 ----------------- third_party/src/gopkg.in/yaml.v2/sorter.go | 104 - .../src/gopkg.in/yaml.v2/suite_test.go | 12 - third_party/src/gopkg.in/yaml.v2/writerc.go | 89 - third_party/src/gopkg.in/yaml.v2/yaml.go | 346 --- third_party/src/gopkg.in/yaml.v2/yamlh.go | 716 ----- .../src/gopkg.in/yaml.v2/yamlprivateh.go | 173 -- udp.go | 6 +- .../github.com/alexzorin/libvirt-go/LICENSE | 0 .../github.com/alexzorin/libvirt-go/README.md | 0 .../alexzorin/libvirt-go/constants.go | 0 .../github.com/alexzorin/libvirt-go/domain.go | 0 .../alexzorin/libvirt-go/domain_test.go | 0 .../alexzorin/libvirt-go/integration_test.go | 0 .../alexzorin/libvirt-go/interface.go | 0 .../alexzorin/libvirt-go/interface_test.go | 0 .../alexzorin/libvirt-go/libvirt.go | 0 .../alexzorin/libvirt-go/libvirt_test.go | 0 .../alexzorin/libvirt-go/network.go | 0 .../alexzorin/libvirt-go/network_test.go | 0 .../alexzorin/libvirt-go/nodeinfo.go | 0 .../alexzorin/libvirt-go/nwfilter.go | 0 .../github.com/alexzorin/libvirt-go/secret.go | 0 .../alexzorin/libvirt-go/snapshot.go | 0 .../alexzorin/libvirt-go/storage_pool.go | 0 .../alexzorin/libvirt-go/storage_pool_test.go | 0 .../alexzorin/libvirt-go/storage_volume.go | 0 .../libvirt-go/storage_volume_test.go | 0 .../github.com/alexzorin/libvirt-go/stream.go | 0 .../vishvananda/netlink/nl/addr_linux.go | 0 .../vishvananda/netlink/nl/addr_linux_test.go | 0 .../vishvananda/netlink/nl/link_linux.go | 0 .../vishvananda/netlink/nl/nl_linux.go | 0 .../vishvananda/netlink/nl/nl_linux_test.go | 0 .../vishvananda/netlink/nl/route_linux.go | 0 .../netlink/nl/route_linux_test.go | 0 .../vishvananda/netlink/nl/xfrm_linux.go | 0 .../vishvananda/netlink/nl/xfrm_linux_test.go | 0 .../netlink/nl/xfrm_policy_linux.go | 0 .../netlink/nl/xfrm_policy_linux_test.go | 0 .../netlink/nl/xfrm_state_linux.go | 0 .../netlink/nl/xfrm_state_linux_test.go | 0 .../github.com/vtolstov/gopacket/AUTHORS | 0 .../github.com/vtolstov/gopacket/CHANGELOG | 0 .../vtolstov/gopacket/CONTRIBUTING.md | 0 .../github.com/vtolstov/gopacket/LICENSE | 0 .../github.com/vtolstov/gopacket/README.mkd | 0 .../github.com/vtolstov/gopacket/base.go | 0 .../vtolstov/gopacket/benchmark_test.go | 0 .../vtolstov/gopacket/bytediff/bytediff.go | 0 .../gopacket/bytediff/bytediff_test.go | 0 .../github.com/vtolstov/gopacket/decode.go | 0 .../github.com/vtolstov/gopacket/doc.go | 0 .../github.com/vtolstov/gopacket/flows.go | 0 .../github.com/vtolstov/gopacket/gc | 0 .../vtolstov/gopacket/layerclass.go | 0 .../vtolstov/gopacket/layers/arp.go | 0 .../vtolstov/gopacket/layers/base.go | 0 .../vtolstov/gopacket/layers/base_test.go | 0 .../vtolstov/gopacket/layers/cdp.go | 0 .../vtolstov/gopacket/layers/ctp.go | 0 .../vtolstov/gopacket/layers/decode_test.go | 0 .../vtolstov/gopacket/layers/dhcpv4.go | 0 .../vtolstov/gopacket/layers/dns.go | 0 .../vtolstov/gopacket/layers/doc.go | 0 .../vtolstov/gopacket/layers/dot11.go | 0 .../vtolstov/gopacket/layers/dot11_test.go | 0 .../vtolstov/gopacket/layers/dot1q.go | 0 .../vtolstov/gopacket/layers/eap.go | 0 .../vtolstov/gopacket/layers/eapol.go | 0 .../vtolstov/gopacket/layers/endpoints.go | 0 .../vtolstov/gopacket/layers/enums.go | 0 .../vtolstov/gopacket/layers/etherip.go | 0 .../vtolstov/gopacket/layers/ethernet.go | 0 .../vtolstov/gopacket/layers/fddi.go | 0 .../vtolstov/gopacket/layers/gen.go | 0 .../vtolstov/gopacket/layers/gre.go | 0 .../vtolstov/gopacket/layers/iana_ports.go | 0 .../vtolstov/gopacket/layers/icmp4.go | 0 .../vtolstov/gopacket/layers/icmp6.go | 0 .../vtolstov/gopacket/layers/icmp6_test.go | 0 .../vtolstov/gopacket/layers/igmp.go | 0 .../vtolstov/gopacket/layers/ip4.go | 0 .../vtolstov/gopacket/layers/ip6.go | 0 .../vtolstov/gopacket/layers/ipsec.go | 0 .../vtolstov/gopacket/layers/ipsec_test.go | 0 .../vtolstov/gopacket/layers/layertypes.go | 0 .../vtolstov/gopacket/layers/linux_sll.go | 0 .../vtolstov/gopacket/layers/llc.go | 0 .../vtolstov/gopacket/layers/lldp.go | 0 .../vtolstov/gopacket/layers/loopback.go | 0 .../vtolstov/gopacket/layers/mpls.go | 0 .../vtolstov/gopacket/layers/ndp.go | 0 .../vtolstov/gopacket/layers/openflow.go | 0 .../vtolstov/gopacket/layers/pflog.go | 0 .../vtolstov/gopacket/layers/ports.go | 0 .../vtolstov/gopacket/layers/ppp.go | 0 .../vtolstov/gopacket/layers/pppoe.go | 0 .../vtolstov/gopacket/layers/radiotap.go | 0 .../vtolstov/gopacket/layers/rudp.go | 0 .../vtolstov/gopacket/layers/sctp.go | 0 .../vtolstov/gopacket/layers/sflow.go | 0 .../vtolstov/gopacket/layers/sflow_test.go | 0 .../vtolstov/gopacket/layers/tcp.go | 0 .../vtolstov/gopacket/layers/tcpip.go | 0 .../vtolstov/gopacket/layers/test_creator.py | 0 .../vtolstov/gopacket/layers/udp.go | 0 .../vtolstov/gopacket/layers/udp_test.go | 0 .../vtolstov/gopacket/layers/udplite.go | 0 .../vtolstov/gopacket/layers/usb.go | 0 .../vtolstov/gopacket/layers/usb_test.go | 0 .../github.com/vtolstov/gopacket/layertype.go | 0 .../github.com/vtolstov/gopacket/packet.go | 0 .../github.com/vtolstov/gopacket/parser.go | 0 .../github.com/vtolstov/gopacket/writer.go | 0 .../vtolstov/gopacket/writer_test.go | 0 .../golang.org/x/net/icmp/dstunreach.go | 0 .../golang.org/x/net/icmp/echo.go | 0 .../golang.org/x/net/icmp/endpoint.go | 0 .../golang.org/x/net/icmp/example_test.go | 0 .../golang.org/x/net/icmp/extension.go | 0 .../golang.org/x/net/icmp/helper_posix.go | 0 .../golang.org/x/net/icmp/ipv4.go | 0 .../golang.org/x/net/icmp/ipv4_test.go | 0 .../golang.org/x/net/icmp/ipv6.go | 0 .../golang.org/x/net/icmp/listen_posix.go | 0 .../golang.org/x/net/icmp/listen_stub.go | 0 .../golang.org/x/net/icmp/message.go | 0 .../golang.org/x/net/icmp/message_test.go | 0 .../golang.org/x/net/icmp/messagebody.go | 0 .../golang.org/x/net/icmp/packettoobig.go | 0 .../golang.org/x/net/icmp/paramprob.go | 0 .../golang.org/x/net/icmp/ping_test.go | 0 .../golang.org/x/net/icmp/sys_freebsd.go | 0 .../golang.org/x/net/icmp/timeexceeded.go | 0 .../golang.org/x/net/ipv4/control.go | 0 .../golang.org/x/net/ipv4/control_bsd.go | 0 .../golang.org/x/net/ipv4/control_pktinfo.go | 0 .../golang.org/x/net/ipv4/control_stub.go | 0 .../golang.org/x/net/ipv4/control_unix.go | 0 .../golang.org/x/net/ipv4/control_windows.go | 0 .../golang.org/x/net/ipv4/defs_darwin.go | 0 .../golang.org/x/net/ipv4/defs_dragonfly.go | 0 .../golang.org/x/net/ipv4/defs_freebsd.go | 0 .../golang.org/x/net/ipv4/defs_linux.go | 0 .../golang.org/x/net/ipv4/defs_netbsd.go | 0 .../golang.org/x/net/ipv4/defs_openbsd.go | 0 .../golang.org/x/net/ipv4/defs_solaris.go | 0 .../golang.org/x/net/ipv4/dgramopt_posix.go | 0 .../golang.org/x/net/ipv4/dgramopt_stub.go | 0 .../golang.org/x/net/ipv4/doc.go | 0 .../golang.org/x/net/ipv4/endpoint.go | 0 .../golang.org/x/net/ipv4/example_test.go | 0 .../golang.org/x/net/ipv4/gen.go | 0 .../golang.org/x/net/ipv4/genericopt_posix.go | 0 .../golang.org/x/net/ipv4/genericopt_stub.go | 0 .../golang.org/x/net/ipv4/header.go | 0 .../golang.org/x/net/ipv4/header_test.go | 0 .../golang.org/x/net/ipv4/helper.go | 0 .../golang.org/x/net/ipv4/helper_stub.go | 0 .../golang.org/x/net/ipv4/helper_unix.go | 0 .../golang.org/x/net/ipv4/helper_windows.go | 0 .../golang.org/x/net/ipv4/iana.go | 0 .../golang.org/x/net/ipv4/icmp.go | 0 .../golang.org/x/net/ipv4/icmp_linux.go | 0 .../golang.org/x/net/ipv4/icmp_stub.go | 0 .../golang.org/x/net/ipv4/icmp_test.go | 0 .../x/net/ipv4/mocktransponder_test.go | 0 .../golang.org/x/net/ipv4/multicast_test.go | 0 .../x/net/ipv4/multicastlistener_test.go | 0 .../x/net/ipv4/multicastsockopt_test.go | 0 .../golang.org/x/net/ipv4/packet.go | 0 .../golang.org/x/net/ipv4/payload.go | 0 .../golang.org/x/net/ipv4/payload_cmsg.go | 0 .../golang.org/x/net/ipv4/payload_nocmsg.go | 0 .../golang.org/x/net/ipv4/readwrite_test.go | 0 .../golang.org/x/net/ipv4/sockopt.go | 0 .../golang.org/x/net/ipv4/sockopt_asmreq.go | 0 .../x/net/ipv4/sockopt_asmreq_stub.go | 0 .../x/net/ipv4/sockopt_asmreq_unix.go | 0 .../x/net/ipv4/sockopt_asmreq_windows.go | 0 .../x/net/ipv4/sockopt_asmreqn_stub.go | 0 .../x/net/ipv4/sockopt_asmreqn_unix.go | 0 .../x/net/ipv4/sockopt_ssmreq_stub.go | 0 .../x/net/ipv4/sockopt_ssmreq_unix.go | 0 .../golang.org/x/net/ipv4/sockopt_stub.go | 0 .../golang.org/x/net/ipv4/sockopt_unix.go | 0 .../golang.org/x/net/ipv4/sockopt_windows.go | 0 .../golang.org/x/net/ipv4/sys_bsd.go | 0 .../golang.org/x/net/ipv4/sys_darwin.go | 0 .../golang.org/x/net/ipv4/sys_freebsd.go | 0 .../golang.org/x/net/ipv4/sys_linux.go | 0 .../golang.org/x/net/ipv4/sys_openbsd.go | 0 .../golang.org/x/net/ipv4/sys_stub.go | 0 .../golang.org/x/net/ipv4/sys_windows.go | 0 .../x/net/ipv4/syscall_linux_386.go | 0 .../golang.org/x/net/ipv4/syscall_unix.go | 0 .../golang.org/x/net/ipv4/thunk_linux_386.s | 0 .../golang.org/x/net/ipv4/unicast_test.go | 0 .../x/net/ipv4/unicastsockopt_test.go | 0 .../golang.org/x/net/ipv4/zsys_darwin.go | 0 .../golang.org/x/net/ipv4/zsys_dragonfly.go | 0 .../golang.org/x/net/ipv4/zsys_freebsd_386.go | 0 .../x/net/ipv4/zsys_freebsd_amd64.go | 0 .../golang.org/x/net/ipv4/zsys_freebsd_arm.go | 0 .../golang.org/x/net/ipv4/zsys_linux_386.go | 0 .../golang.org/x/net/ipv4/zsys_linux_amd64.go | 0 .../golang.org/x/net/ipv4/zsys_linux_arm.go | 0 .../golang.org/x/net/ipv4/zsys_netbsd.go | 0 .../golang.org/x/net/ipv4/zsys_openbsd.go | 0 .../golang.org/x/net/ipv4/zsys_solaris.go | 0 .../golang.org/x/net/ipv6/control.go | 0 .../x/net/ipv6/control_rfc2292_unix.go | 0 .../x/net/ipv6/control_rfc3542_unix.go | 0 .../golang.org/x/net/ipv6/control_stub.go | 0 .../golang.org/x/net/ipv6/control_unix.go | 0 .../golang.org/x/net/ipv6/control_windows.go | 0 .../golang.org/x/net/ipv6/defs_darwin.go | 0 .../golang.org/x/net/ipv6/defs_dragonfly.go | 0 .../golang.org/x/net/ipv6/defs_freebsd.go | 0 .../golang.org/x/net/ipv6/defs_linux.go | 0 .../golang.org/x/net/ipv6/defs_netbsd.go | 0 .../golang.org/x/net/ipv6/defs_openbsd.go | 0 .../golang.org/x/net/ipv6/defs_solaris.go | 0 .../golang.org/x/net/ipv6/dgramopt_posix.go | 0 .../golang.org/x/net/ipv6/dgramopt_stub.go | 0 .../golang.org/x/net/ipv6/doc.go | 0 .../golang.org/x/net/ipv6/endpoint.go | 0 .../golang.org/x/net/ipv6/example_test.go | 0 .../golang.org/x/net/ipv6/gen.go | 0 .../golang.org/x/net/ipv6/genericopt_posix.go | 0 .../golang.org/x/net/ipv6/genericopt_stub.go | 0 .../golang.org/x/net/ipv6/header.go | 0 .../golang.org/x/net/ipv6/header_test.go | 0 .../golang.org/x/net/ipv6/helper.go | 0 .../golang.org/x/net/ipv6/helper_stub.go | 0 .../golang.org/x/net/ipv6/helper_unix.go | 0 .../golang.org/x/net/ipv6/helper_windows.go | 0 .../golang.org/x/net/ipv6/iana.go | 0 .../golang.org/x/net/ipv6/icmp.go | 0 .../golang.org/x/net/ipv6/icmp_bsd.go | 0 .../golang.org/x/net/ipv6/icmp_linux.go | 0 .../golang.org/x/net/ipv6/icmp_solaris.go | 0 .../golang.org/x/net/ipv6/icmp_stub.go | 0 .../golang.org/x/net/ipv6/icmp_test.go | 0 .../golang.org/x/net/ipv6/icmp_windows.go | 0 .../x/net/ipv6/mocktransponder_test.go | 0 .../golang.org/x/net/ipv6/multicast_test.go | 0 .../x/net/ipv6/multicastlistener_test.go | 0 .../x/net/ipv6/multicastsockopt_test.go | 0 .../golang.org/x/net/ipv6/payload.go | 0 .../golang.org/x/net/ipv6/payload_cmsg.go | 0 .../golang.org/x/net/ipv6/payload_nocmsg.go | 0 .../golang.org/x/net/ipv6/readwrite_test.go | 0 .../golang.org/x/net/ipv6/sockopt.go | 0 .../x/net/ipv6/sockopt_asmreq_unix.go | 0 .../x/net/ipv6/sockopt_asmreq_windows.go | 0 .../x/net/ipv6/sockopt_ssmreq_stub.go | 0 .../x/net/ipv6/sockopt_ssmreq_unix.go | 0 .../golang.org/x/net/ipv6/sockopt_stub.go | 0 .../golang.org/x/net/ipv6/sockopt_test.go | 0 .../golang.org/x/net/ipv6/sockopt_unix.go | 0 .../golang.org/x/net/ipv6/sockopt_windows.go | 0 .../golang.org/x/net/ipv6/sys_bsd.go | 0 .../golang.org/x/net/ipv6/sys_darwin.go | 0 .../golang.org/x/net/ipv6/sys_freebsd.go | 0 .../golang.org/x/net/ipv6/sys_linux.go | 0 .../golang.org/x/net/ipv6/sys_stub.go | 0 .../golang.org/x/net/ipv6/sys_windows.go | 0 .../x/net/ipv6/syscall_linux_386.go | 0 .../golang.org/x/net/ipv6/syscall_unix.go | 0 .../golang.org/x/net/ipv6/thunk_linux_386.s | 0 .../golang.org/x/net/ipv6/unicast_test.go | 0 .../x/net/ipv6/unicastsockopt_test.go | 0 .../golang.org/x/net/ipv6/zsys_darwin.go | 0 .../golang.org/x/net/ipv6/zsys_dragonfly.go | 0 .../golang.org/x/net/ipv6/zsys_freebsd_386.go | 0 .../x/net/ipv6/zsys_freebsd_amd64.go | 0 .../golang.org/x/net/ipv6/zsys_freebsd_arm.go | 0 .../golang.org/x/net/ipv6/zsys_linux_386.go | 0 .../golang.org/x/net/ipv6/zsys_linux_amd64.go | 0 .../golang.org/x/net/ipv6/zsys_linux_arm.go | 0 .../golang.org/x/net/ipv6/zsys_netbsd.go | 0 .../golang.org/x/net/ipv6/zsys_openbsd.go | 0 .../golang.org/x/net/ipv6/zsys_solaris.go | 0 .../gopkg.in/yaml.v2}/LICENSE | 0 .../gopkg.in/yaml.v2}/LICENSE.libyaml | 0 .../gopkg.in/yaml.v2/README.md | 0 .../gopkg.in/yaml.v2}/apic.go | 0 .../gopkg.in/yaml.v2/decode.go | 0 .../gopkg.in/yaml.v2/decode_test.go | 0 .../gopkg.in/yaml.v2}/emitterc.go | 0 .../gopkg.in/yaml.v2/encode.go | 0 .../gopkg.in/yaml.v2/encode_test.go | 0 .../gopkg.in/yaml.v2}/parserc.go | 0 .../gopkg.in/yaml.v2}/readerc.go | 0 .../gopkg.in/yaml.v2/resolve.go | 0 .../gopkg.in/yaml.v2}/scannerc.go | 0 .../gopkg.in/yaml.v2}/sorter.go | 0 .../gopkg.in/yaml.v2}/suite_test.go | 0 .../gopkg.in/yaml.v2}/writerc.go | 0 {internal => vendor}/gopkg.in/yaml.v2/yaml.go | 0 .../gopkg.in/yaml.v2}/yamlh.go | 0 .../gopkg.in/yaml.v2}/yamlprivateh.go | 0 375 files changed, 8 insertions(+), 29890 deletions(-) delete mode 100644 fs.go delete mode 100644 internal/gopkg.in/yaml.v1/README.md delete mode 100644 internal/gopkg.in/yaml.v1/decode.go delete mode 100644 internal/gopkg.in/yaml.v1/decode_test.go delete mode 100644 internal/gopkg.in/yaml.v1/encode.go delete mode 100644 internal/gopkg.in/yaml.v1/encode_test.go delete mode 100644 internal/gopkg.in/yaml.v1/resolve.go delete mode 100644 internal/gopkg.in/yaml.v1/yaml.go delete mode 100644 internal/gopkg.in/yaml.v2/LICENSE delete mode 100644 internal/gopkg.in/yaml.v2/LICENSE.libyaml delete mode 100644 internal/gopkg.in/yaml.v2/apic.go delete mode 100644 internal/gopkg.in/yaml.v2/emitterc.go delete mode 100644 internal/gopkg.in/yaml.v2/parserc.go delete mode 100644 internal/gopkg.in/yaml.v2/readerc.go delete mode 100644 internal/gopkg.in/yaml.v2/scannerc.go delete mode 100644 internal/gopkg.in/yaml.v2/sorter.go delete mode 100644 internal/gopkg.in/yaml.v2/suite_test.go delete mode 100644 internal/gopkg.in/yaml.v2/writerc.go delete mode 100644 internal/gopkg.in/yaml.v2/yamlh.go delete mode 100644 internal/gopkg.in/yaml.v2/yamlprivateh.go delete mode 100644 internal/iana/const.go delete mode 100644 internal/iana/gen.go delete mode 100644 internal/nettest/error_posix.go delete mode 100644 internal/nettest/error_stub.go delete mode 100644 internal/nettest/interface.go delete mode 100644 internal/nettest/stack.go delete mode 100755 internal/vendor.json delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/.drone.yml delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/.gitignore delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/LICENSE delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/README.md delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/cfuncs.go delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/constants.go delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/domain.go delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/domain_test.go delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/error.go delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/events.go delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/integration_test.go delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/interface.go delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/interface_test.go delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/libvirt.go delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/libvirt_test.go delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/network.go delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/network_test.go delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/nodeinfo.go delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/nwfilter.go delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/secret.go delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/snapshot.go delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/storage_pool.go delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/storage_pool_test.go delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/storage_volume.go delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/storage_volume_test.go delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/stream.go delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/vagrant/master/Vagrantfile delete mode 100644 third_party/src/gopkg.in/alexzorin/libvirt-go.v2/vagrant/vagrant-provision-reboot-plugin.rb delete mode 100644 third_party/src/gopkg.in/yaml.v2/LICENSE delete mode 100644 third_party/src/gopkg.in/yaml.v2/LICENSE.libyaml delete mode 100644 third_party/src/gopkg.in/yaml.v2/README.md delete mode 100644 third_party/src/gopkg.in/yaml.v2/apic.go delete mode 100644 third_party/src/gopkg.in/yaml.v2/decode.go delete mode 100644 third_party/src/gopkg.in/yaml.v2/decode_test.go delete mode 100644 third_party/src/gopkg.in/yaml.v2/emitterc.go delete mode 100644 third_party/src/gopkg.in/yaml.v2/encode.go delete mode 100644 third_party/src/gopkg.in/yaml.v2/encode_test.go delete mode 100644 third_party/src/gopkg.in/yaml.v2/parserc.go delete mode 100644 third_party/src/gopkg.in/yaml.v2/readerc.go delete mode 100644 third_party/src/gopkg.in/yaml.v2/resolve.go delete mode 100644 third_party/src/gopkg.in/yaml.v2/scannerc.go delete mode 100644 third_party/src/gopkg.in/yaml.v2/sorter.go delete mode 100644 third_party/src/gopkg.in/yaml.v2/suite_test.go delete mode 100644 third_party/src/gopkg.in/yaml.v2/writerc.go delete mode 100644 third_party/src/gopkg.in/yaml.v2/yaml.go delete mode 100644 third_party/src/gopkg.in/yaml.v2/yamlh.go delete mode 100644 third_party/src/gopkg.in/yaml.v2/yamlprivateh.go rename {internal => vendor}/github.com/alexzorin/libvirt-go/LICENSE (100%) rename {internal => vendor}/github.com/alexzorin/libvirt-go/README.md (100%) rename {internal => vendor}/github.com/alexzorin/libvirt-go/constants.go (100%) rename {internal => vendor}/github.com/alexzorin/libvirt-go/domain.go (100%) rename {internal => vendor}/github.com/alexzorin/libvirt-go/domain_test.go (100%) rename {internal => vendor}/github.com/alexzorin/libvirt-go/integration_test.go (100%) rename {internal => vendor}/github.com/alexzorin/libvirt-go/interface.go (100%) rename {internal => vendor}/github.com/alexzorin/libvirt-go/interface_test.go (100%) rename {internal => vendor}/github.com/alexzorin/libvirt-go/libvirt.go (100%) rename {internal => vendor}/github.com/alexzorin/libvirt-go/libvirt_test.go (100%) rename {internal => vendor}/github.com/alexzorin/libvirt-go/network.go (100%) rename {internal => vendor}/github.com/alexzorin/libvirt-go/network_test.go (100%) rename {internal => vendor}/github.com/alexzorin/libvirt-go/nodeinfo.go (100%) rename {internal => vendor}/github.com/alexzorin/libvirt-go/nwfilter.go (100%) rename {internal => vendor}/github.com/alexzorin/libvirt-go/secret.go (100%) rename {internal => vendor}/github.com/alexzorin/libvirt-go/snapshot.go (100%) rename {internal => vendor}/github.com/alexzorin/libvirt-go/storage_pool.go (100%) rename {internal => vendor}/github.com/alexzorin/libvirt-go/storage_pool_test.go (100%) rename {internal => vendor}/github.com/alexzorin/libvirt-go/storage_volume.go (100%) rename {internal => vendor}/github.com/alexzorin/libvirt-go/storage_volume_test.go (100%) rename {internal => vendor}/github.com/alexzorin/libvirt-go/stream.go (100%) rename {internal => vendor}/github.com/vishvananda/netlink/nl/addr_linux.go (100%) rename {internal => vendor}/github.com/vishvananda/netlink/nl/addr_linux_test.go (100%) rename {internal => vendor}/github.com/vishvananda/netlink/nl/link_linux.go (100%) rename {internal => vendor}/github.com/vishvananda/netlink/nl/nl_linux.go (100%) rename {internal => vendor}/github.com/vishvananda/netlink/nl/nl_linux_test.go (100%) rename {internal => vendor}/github.com/vishvananda/netlink/nl/route_linux.go (100%) rename {internal => vendor}/github.com/vishvananda/netlink/nl/route_linux_test.go (100%) rename {internal => vendor}/github.com/vishvananda/netlink/nl/xfrm_linux.go (100%) rename {internal => vendor}/github.com/vishvananda/netlink/nl/xfrm_linux_test.go (100%) rename {internal => vendor}/github.com/vishvananda/netlink/nl/xfrm_policy_linux.go (100%) rename {internal => vendor}/github.com/vishvananda/netlink/nl/xfrm_policy_linux_test.go (100%) rename {internal => vendor}/github.com/vishvananda/netlink/nl/xfrm_state_linux.go (100%) rename {internal => vendor}/github.com/vishvananda/netlink/nl/xfrm_state_linux_test.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/AUTHORS (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/CHANGELOG (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/CONTRIBUTING.md (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/LICENSE (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/README.mkd (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/base.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/benchmark_test.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/bytediff/bytediff.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/bytediff/bytediff_test.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/decode.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/doc.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/flows.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/gc (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layerclass.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/arp.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/base.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/base_test.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/cdp.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/ctp.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/decode_test.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/dhcpv4.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/dns.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/doc.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/dot11.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/dot11_test.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/dot1q.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/eap.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/eapol.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/endpoints.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/enums.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/etherip.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/ethernet.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/fddi.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/gen.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/gre.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/iana_ports.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/icmp4.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/icmp6.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/icmp6_test.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/igmp.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/ip4.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/ip6.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/ipsec.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/ipsec_test.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/layertypes.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/linux_sll.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/llc.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/lldp.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/loopback.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/mpls.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/ndp.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/openflow.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/pflog.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/ports.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/ppp.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/pppoe.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/radiotap.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/rudp.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/sctp.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/sflow.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/sflow_test.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/tcp.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/tcpip.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/test_creator.py (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/udp.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/udp_test.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/udplite.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/usb.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layers/usb_test.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/layertype.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/packet.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/parser.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/writer.go (100%) rename {internal => vendor}/github.com/vtolstov/gopacket/writer_test.go (100%) rename {internal => vendor}/golang.org/x/net/icmp/dstunreach.go (100%) rename {internal => vendor}/golang.org/x/net/icmp/echo.go (100%) rename {internal => vendor}/golang.org/x/net/icmp/endpoint.go (100%) rename {internal => vendor}/golang.org/x/net/icmp/example_test.go (100%) rename {internal => vendor}/golang.org/x/net/icmp/extension.go (100%) rename {internal => vendor}/golang.org/x/net/icmp/helper_posix.go (100%) rename {internal => vendor}/golang.org/x/net/icmp/ipv4.go (100%) rename {internal => vendor}/golang.org/x/net/icmp/ipv4_test.go (100%) rename {internal => vendor}/golang.org/x/net/icmp/ipv6.go (100%) rename {internal => vendor}/golang.org/x/net/icmp/listen_posix.go (100%) rename {internal => vendor}/golang.org/x/net/icmp/listen_stub.go (100%) rename {internal => vendor}/golang.org/x/net/icmp/message.go (100%) rename {internal => vendor}/golang.org/x/net/icmp/message_test.go (100%) rename {internal => vendor}/golang.org/x/net/icmp/messagebody.go (100%) rename {internal => vendor}/golang.org/x/net/icmp/packettoobig.go (100%) rename {internal => vendor}/golang.org/x/net/icmp/paramprob.go (100%) rename {internal => vendor}/golang.org/x/net/icmp/ping_test.go (100%) rename {internal => vendor}/golang.org/x/net/icmp/sys_freebsd.go (100%) rename {internal => vendor}/golang.org/x/net/icmp/timeexceeded.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/control.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/control_bsd.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/control_pktinfo.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/control_stub.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/control_unix.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/control_windows.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/defs_darwin.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/defs_dragonfly.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/defs_freebsd.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/defs_linux.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/defs_netbsd.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/defs_openbsd.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/defs_solaris.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/dgramopt_posix.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/dgramopt_stub.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/doc.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/endpoint.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/example_test.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/gen.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/genericopt_posix.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/genericopt_stub.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/header.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/header_test.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/helper.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/helper_stub.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/helper_unix.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/helper_windows.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/iana.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/icmp.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/icmp_linux.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/icmp_stub.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/icmp_test.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/mocktransponder_test.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/multicast_test.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/multicastlistener_test.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/multicastsockopt_test.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/packet.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/payload.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/payload_cmsg.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/payload_nocmsg.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/readwrite_test.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/sockopt.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/sockopt_asmreq.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/sockopt_asmreq_stub.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/sockopt_asmreq_unix.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/sockopt_asmreq_windows.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/sockopt_asmreqn_stub.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/sockopt_asmreqn_unix.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/sockopt_ssmreq_stub.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/sockopt_ssmreq_unix.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/sockopt_stub.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/sockopt_unix.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/sockopt_windows.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/sys_bsd.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/sys_darwin.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/sys_freebsd.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/sys_linux.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/sys_openbsd.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/sys_stub.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/sys_windows.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/syscall_linux_386.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/syscall_unix.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/thunk_linux_386.s (100%) rename {internal => vendor}/golang.org/x/net/ipv4/unicast_test.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/unicastsockopt_test.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/zsys_darwin.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/zsys_dragonfly.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/zsys_freebsd_386.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/zsys_freebsd_amd64.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/zsys_freebsd_arm.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/zsys_linux_386.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/zsys_linux_amd64.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/zsys_linux_arm.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/zsys_netbsd.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/zsys_openbsd.go (100%) rename {internal => vendor}/golang.org/x/net/ipv4/zsys_solaris.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/control.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/control_rfc2292_unix.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/control_rfc3542_unix.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/control_stub.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/control_unix.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/control_windows.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/defs_darwin.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/defs_dragonfly.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/defs_freebsd.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/defs_linux.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/defs_netbsd.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/defs_openbsd.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/defs_solaris.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/dgramopt_posix.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/dgramopt_stub.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/doc.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/endpoint.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/example_test.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/gen.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/genericopt_posix.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/genericopt_stub.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/header.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/header_test.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/helper.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/helper_stub.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/helper_unix.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/helper_windows.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/iana.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/icmp.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/icmp_bsd.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/icmp_linux.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/icmp_solaris.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/icmp_stub.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/icmp_test.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/icmp_windows.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/mocktransponder_test.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/multicast_test.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/multicastlistener_test.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/multicastsockopt_test.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/payload.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/payload_cmsg.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/payload_nocmsg.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/readwrite_test.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/sockopt.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/sockopt_asmreq_unix.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/sockopt_asmreq_windows.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/sockopt_ssmreq_stub.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/sockopt_ssmreq_unix.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/sockopt_stub.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/sockopt_test.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/sockopt_unix.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/sockopt_windows.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/sys_bsd.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/sys_darwin.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/sys_freebsd.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/sys_linux.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/sys_stub.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/sys_windows.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/syscall_linux_386.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/syscall_unix.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/thunk_linux_386.s (100%) rename {internal => vendor}/golang.org/x/net/ipv6/unicast_test.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/unicastsockopt_test.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/zsys_darwin.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/zsys_dragonfly.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/zsys_freebsd_386.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/zsys_freebsd_amd64.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/zsys_freebsd_arm.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/zsys_linux_386.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/zsys_linux_amd64.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/zsys_linux_arm.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/zsys_netbsd.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/zsys_openbsd.go (100%) rename {internal => vendor}/golang.org/x/net/ipv6/zsys_solaris.go (100%) rename {internal/gopkg.in/yaml.v1 => vendor/gopkg.in/yaml.v2}/LICENSE (100%) rename {internal/gopkg.in/yaml.v1 => vendor/gopkg.in/yaml.v2}/LICENSE.libyaml (100%) rename {internal => vendor}/gopkg.in/yaml.v2/README.md (100%) rename {internal/gopkg.in/yaml.v1 => vendor/gopkg.in/yaml.v2}/apic.go (100%) rename {internal => vendor}/gopkg.in/yaml.v2/decode.go (100%) rename {internal => vendor}/gopkg.in/yaml.v2/decode_test.go (100%) rename {internal/gopkg.in/yaml.v1 => vendor/gopkg.in/yaml.v2}/emitterc.go (100%) rename {internal => vendor}/gopkg.in/yaml.v2/encode.go (100%) rename {internal => vendor}/gopkg.in/yaml.v2/encode_test.go (100%) rename {internal/gopkg.in/yaml.v1 => vendor/gopkg.in/yaml.v2}/parserc.go (100%) rename {internal/gopkg.in/yaml.v1 => vendor/gopkg.in/yaml.v2}/readerc.go (100%) rename {internal => vendor}/gopkg.in/yaml.v2/resolve.go (100%) rename {internal/gopkg.in/yaml.v1 => vendor/gopkg.in/yaml.v2}/scannerc.go (100%) rename {internal/gopkg.in/yaml.v1 => vendor/gopkg.in/yaml.v2}/sorter.go (100%) rename {internal/gopkg.in/yaml.v1 => vendor/gopkg.in/yaml.v2}/suite_test.go (100%) rename {internal/gopkg.in/yaml.v1 => vendor/gopkg.in/yaml.v2}/writerc.go (100%) rename {internal => vendor}/gopkg.in/yaml.v2/yaml.go (100%) rename {internal/gopkg.in/yaml.v1 => vendor/gopkg.in/yaml.v2}/yamlh.go (100%) rename {internal/gopkg.in/yaml.v1 => vendor/gopkg.in/yaml.v2}/yamlprivateh.go (100%) diff --git a/README.md b/README.md index 2e63922..285a430 100644 --- a/README.md +++ b/README.md @@ -4,5 +4,5 @@ simple-virtnet build: ``` -GOPATH=$(pwd)/third_party/ go build -a -x -o svirtnet +go get github.com/vtolstov/svirtnet ``` diff --git a/fs.go b/fs.go deleted file mode 100644 index 1c694b7..0000000 --- a/fs.go +++ /dev/null @@ -1,441 +0,0 @@ -// +build ignore - -package main - -/* -import ( - "crypto/tls" - "encoding/xml" - "fmt" - "io" - "net" - "net/http" - "os" - "os/signal" - "runtime/pprof" - "sync" - "time" - - "log" - - "github.com/vtolstov/svirtnet/internal/github.com/alexzorin/libvirt-go" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/context" - - "github.com/vtolstov/svirtnet/internal/bazil.org/fuse" - "github.com/vtolstov/svirtnet/internal/bazil.org/fuse/fs" -) - -type ISO struct { - Disks []ISODisk `xml:"disk"` -} - -type ISODisk struct { - Type string `xml:"type,attr"` - Device string `xml:"device,attr"` - Driver struct { - Name string `xml:"name,attr"` - Type string `xml:"type,attr"` - } `xml:"driver"` - Source struct { - URL string `xml:"url,attr"` - } `xml:"source"` - Target struct { - Name string `xml:"name,attr"` - } `xml:"target"` -} - -type Metadata struct { - ISO ISO `xml:"iso,omitempty"` -} - -var httpTransport *http.Transport = &http.Transport{ - Dial: (&net.Dialer{DualStack: true}).Dial, - TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, - DisableCompression: true, - DisableKeepAlives: true, -} -var httpClient *http.Client = &http.Client{Transport: httpTransport, Timeout: 100000 * time.Second} - -func printf(msg interface{}) { - log.Printf("%s\n", msg) -} - -type ReadSeekCloser interface { - io.Reader - io.Closer - io.Seeker -} - -type httpReadSeekCloser struct { - u string - - r io.ReadCloser - - offset int64 - size int64 - - pos int64 - - sync.Mutex -} - -func httpReadSeekCloserNew(u string) (*httpReadSeekCloser, error) { - req, err := http.NewRequest("HEAD", u, nil) - if err != nil { - panic(err) - return nil, err - } - - res, err := httpClient.Do(req) - if err != nil { - panic(err) - return nil, err - } - - if res.ContentLength < 1 { - panic("rrrr") - return nil, fmt.Errorf("unknown ContentLength") - } - - req, err = http.NewRequest("GET", u, nil) - if err != nil { - return nil, err - } - - res, err = httpClient.Do(req) - if err != nil { - defer res.Body.Close() - return nil, err - } - - h := &httpReadSeekCloser{u: u, size: res.ContentLength, r: res.Body} - - return h, nil -} - -func (h *httpReadSeekCloser) Read(b []byte) (int, error) { - // h.Lock() - // defer h.Unlock() - - if h.pos == h.offset { - n, err := io.ReadFull(h.r, b) - if err != nil && err != io.EOF { - return n, err - } - h.pos += int64(n) - h.offset = h.pos - if h.pos == h.size { - return n, nil - } - return n, err - } else { - h.r.Close() - req, err := http.NewRequest("GET", h.u, nil) - if err != nil { - return 0, fuse.EIO - } - - // req.Header.Add("Range", fmt.Sprintf("bytes=%d-%d", h.offset, h.offset+int64(len(b)-1))) - req.Header.Add("Range", fmt.Sprintf("bytes=%d-", h.offset)) - res, err := httpClient.Do(req) - if err != nil { - return 0, fuse.EIO - } - n, err := io.ReadFull(res.Body, b) - if err != nil && err != io.EOF { - res.Body.Close() - return n, err - } - h.pos += int64(n) - h.offset = h.pos - h.r = res.Body - if h.pos == h.size { - return n, nil - } - return n, err - } - - return 0, fmt.Errorf("unexpected read error") -} - -func (h *httpReadSeekCloser) Seek(offset int64, whence int) (int64, error) { - switch whence { - case os.SEEK_CUR: - h.offset += offset - case os.SEEK_SET: - h.offset = offset - case os.SEEK_END: - h.size += offset - default: - return 0, fmt.Errorf("unknown whence: %d", whence) - } - return h.offset, nil -} - -func (h *httpReadSeekCloser) Close() error { - if h.r == nil { - return nil - } - return h.r.Close() -} - -func main() { - var err error - - cpuprof, err := os.Create("test.prof") - if err != nil { - log.Printf("failed to create prof %s", err.Error()) - } - pprof.StartCPUProfile(cpuprof) - - c := make(chan os.Signal, 1) - signal.Notify(c, os.Interrupt, os.Kill) - - go func() { - <-c - defer pprof.StopCPUProfile() - - }() - - // fuse.Debug = printf - - fuse.Unmount("/srv/iso") - - _, err = os.Stat("/srv/iso") - if err != nil { - err = os.MkdirAll("/srv/iso", 0770) - if err != nil { - log.Printf("Failed to create dir: %s\n", err.Error()) - os.Exit(1) - } - } - - virconn, err := libvirt.NewVirConnectionReadOnly("qemu:///system") - if err == nil { - defer virconn.UnrefAndCloseConnection() - } else { - log.Printf("failed to connect to libvirt: %s", err.Error()) - os.Exit(1) - } - - fc, err := fuse.Mount("/srv/iso/", fuse.AllowOther(), fuse.FSName("httpfs"), fuse.Subtype("http")) - if err != nil { - log.Printf("Failed to mount fuse : %s\n", err.Error()) - os.Exit(1) - } - - filesystem := &httpFS{virconn: virconn} - if err = fs.Serve(fc, filesystem); err != nil { - log.Printf("Failed to serve fuse : %s\n", err.Error()) - os.Exit(1) - } - -} - -type httpFS struct { - virconn libvirt.VirConnection -} - -type httpDir struct { - virconn libvirt.VirConnection - files []httpFile - name string -} - -type httpFile struct { - name string - url string - size uint64 -} - -var _ fs.FS = (*httpFS)(nil) -var _ fs.Node = (*httpDir)(nil) -var _ = fs.NodeRequestLookuper(&httpDir{}) -var _ = fs.HandleReadDirAller(&httpDir{}) -var _ fs.Node = (*httpFile)(nil) -var _ fs.Handle = (*FileHandle)(nil) -var _ fs.HandleReleaser = (*FileHandle)(nil) -var _ = fs.NodeOpener(&httpFile{}) - -type FileHandle struct { - buf []byte - r ReadSeekCloser -} - -func (fh *FileHandle) Release(ctx context.Context, req *fuse.ReleaseRequest) error { - fh.buf = nil - if fh.r != nil { - return fh.r.Close() - } - return nil -} - -func (f *httpFile) Open(ctx context.Context, req *fuse.OpenRequest, res *fuse.OpenResponse) (fs.Handle, error) { - hr, err := httpReadSeekCloserNew(f.url) - if err != nil { - return nil, fuse.EIO - } - fh := &FileHandle{r: hr} - fh.buf = make([]byte, 4096) - return fh, nil -} - -func (f *httpFile) Size() uint64 { - if f.size != 0 { - return f.size - } - - req, err := http.NewRequest("HEAD", f.url, nil) - if err != nil { - return 0 - } - - res, err := httpClient.Do(req) - if err != nil { - return 0 - } - - if res.ContentLength < 1 { - return 0 - } - - f.size = uint64(res.ContentLength) - return f.size -} - -var _ = fs.HandleReader(&FileHandle{}) - -func (fh *FileHandle) Read(ctx context.Context, req *fuse.ReadRequest, res *fuse.ReadResponse) error { - _, err := fh.r.Seek(req.Offset, os.SEEK_SET) - if err != nil { - log.Printf("seek error: %s", err.Error()) - return fuse.EIO - } - n, err := fh.r.Read(fh.buf) - if err != nil { - log.Printf("seek error: %s", err.Error()) - return fuse.EIO - } - res.Data = fh.buf[:n] - return nil -} - -func (f *httpFile) Attr() fuse.Attr { - return fuse.Attr{ - Size: f.Size(), - Blocks: f.Size() / 512, - Mode: os.FileMode(0444), - Mtime: time.Now(), - Ctime: time.Now(), - Crtime: time.Now(), - Uid: uint32(os.Getuid()), - Gid: uint32(os.Getgid()), - } -} - -func (f *httpFS) Root() (fs.Node, error) { - return &httpDir{virconn: f.virconn}, nil -} - -func (f *httpFS) Init(ctx context.Context, req *fuse.InitRequest, res *fuse.InitResponse) error { - res.Flags |= fuse.InitAsyncRead - // res.MaxReadahead = 4096 - return nil -} - -func (f *httpFS) Statfs(ctx context.Context, req *fuse.StatfsRequest, res *fuse.StatfsResponse) error { - return nil -} - -func (d *httpDir) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error) { - var res []fuse.Dirent - var metadata Metadata - - if d.name == "" { - if ok, err := d.virconn.IsAlive(); !ok || err != nil { - return nil, fmt.Errorf("libvirt not respond") - } - - domains, err := d.virconn.ListDefinedDomains() //ListAllDomains(libvirt.VIR_CONNECT_LIST_DOMAINS_ACTIVE | libvirt.VIR_CONNECT_LIST_DOMAINS_SHUTOFF | libvirt.VIR_CONNECT_LIST_DOMAINS_OTHER | libvirt.VIR_CONNECT_LIST_DOMAINS_INACTIVE) - if err != nil { - return nil, fmt.Errorf("failed to lookup to libvirt: %s", err.Error()) - } - - for _, domain := range domains { - res = append(res, fuse.Dirent{Type: fuse.DT_Dir, Name: domain}) - } - } else { - - domain, err := d.virconn.LookupDomainByName(d.name) - if err != nil { - return nil, fuse.ENOENT - } - - buf, err := domain.GetMetadata(libvirt.VIR_DOMAIN_METADATA_ELEMENT, "http://simplecloud.ru/" , libvirt.VIR_DOMAIN_MEM_CURRENT) - if err != nil { - return nil, fuse.ENOENT - } - - if err = xml.Unmarshal([]byte(buf), &metadata); err != nil { - return nil, fuse.ENOENT - } - - for _, disk := range metadata.ISO.Disks { - res = append(res, fuse.Dirent{Type: fuse.DT_File, Name: disk.Target.Name}) - } - - } - - return res, nil -} - -func (d *httpDir) Attr() fuse.Attr { - return fuse.Attr{ - Mode: os.FileMode(os.ModeDir | 0555), - Uid: uint32(os.Getuid()), - Gid: uint32(os.Getgid()), - Size: 4096, - Blocks: 4096 / 512, - } -} - -func (d *httpDir) Lookup(ctx context.Context, req *fuse.LookupRequest, res *fuse.LookupResponse) (fs.Node, error) { - var metadata Metadata - - name := req.Name - if d.name != "" { - name = d.name - } - - domain, err := d.virconn.LookupDomainByName(name) - if err != nil { - return nil, fuse.ENOENT - } - - buf, err := domain.GetMetadata(libvirt.VIR_DOMAIN_METADATA_ELEMENT, "http://simplecloud.ru/" , libvirt.VIR_DOMAIN_MEM_CURRENT) - if err != nil { - return nil, fuse.ENOENT - } - - if err = xml.Unmarshal([]byte(buf), &metadata); err != nil { - return nil, fuse.ENOENT - } - - dir := &httpDir{name: name, virconn: d.virconn} - for _, disk := range metadata.ISO.Disks { - if d.name != "" { - if disk.Target.Name == req.Name { - return &httpFile{name: disk.Target.Name, url: disk.Source.URL}, nil - } - } else { - dir.files = append(dir.files, httpFile{name: disk.Target.Name, url: disk.Source.URL}) - } - } - - if d.name == "" { - return dir, nil - } - - return nil, fuse.ENOENT -} -*/ diff --git a/icmp.go b/icmp.go index b49009a..7ceed4c 100644 --- a/icmp.go +++ b/icmp.go @@ -10,7 +10,7 @@ import ( "errors" "strconv" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv6" + "golang.org/x/net/ipv6" ) func (s *Server) ListenAndServeICMPv6() { diff --git a/internal/gopkg.in/yaml.v1/README.md b/internal/gopkg.in/yaml.v1/README.md deleted file mode 100644 index af07056..0000000 --- a/internal/gopkg.in/yaml.v1/README.md +++ /dev/null @@ -1,128 +0,0 @@ -# YAML support for the Go language - -Introduction ------------- - -The yaml package enables Go programs to comfortably encode and decode YAML -values. It was developed within [Canonical](https://www.canonical.com) as -part of the [juju](https://juju.ubuntu.com) project, and is based on a -pure Go port of the well-known [libyaml](http://pyyaml.org/wiki/LibYAML) -C library to parse and generate YAML data quickly and reliably. - -Compatibility -------------- - -The yaml package supports most of YAML 1.1 and 1.2, including support for -anchors, tags, map merging, etc. Multi-document unmarshalling is not yet -implemented, and base-60 floats from YAML 1.1 are purposefully not -supported since they're a poor design and are gone in YAML 1.2. - -Installation and usage ----------------------- - -The import path for the package is *gopkg.in/yaml.v1*. - -To install it, run: - - go get gopkg.in/yaml.v1 - -API documentation ------------------ - -If opened in a browser, the import path itself leads to the API documentation: - - * [https://gopkg.in/yaml.v1](https://gopkg.in/yaml.v1) - -API stability -------------- - -The package API for yaml v1 will remain stable as described in [gopkg.in](https://gopkg.in). - - -License -------- - -The yaml package is licensed under the LGPL with an exception that allows it to be linked statically. Please see the LICENSE file for details. - - -Example -------- - -```Go -package main - -import ( - "fmt" - "log" - - "gopkg.in/yaml.v1" -) - -var data = ` -a: Easy! -b: - c: 2 - d: [3, 4] -` - -type T struct { - A string - B struct{C int; D []int ",flow"} -} - -func main() { - t := T{} - - err := yaml.Unmarshal([]byte(data), &t) - if err != nil { - log.Fatalf("error: %v", err) - } - fmt.Printf("--- t:\n%v\n\n", t) - - d, err := yaml.Marshal(&t) - if err != nil { - log.Fatalf("error: %v", err) - } - fmt.Printf("--- t dump:\n%s\n\n", string(d)) - - m := make(map[interface{}]interface{}) - - err = yaml.Unmarshal([]byte(data), &m) - if err != nil { - log.Fatalf("error: %v", err) - } - fmt.Printf("--- m:\n%v\n\n", m) - - d, err = yaml.Marshal(&m) - if err != nil { - log.Fatalf("error: %v", err) - } - fmt.Printf("--- m dump:\n%s\n\n", string(d)) -} -``` - -This example will generate the following output: - -``` ---- t: -{Easy! {2 [3 4]}} - ---- t dump: -a: Easy! -b: - c: 2 - d: [3, 4] - - ---- m: -map[a:Easy! b:map[c:2 d:[3 4]]] - ---- m dump: -a: Easy! -b: - c: 2 - d: - - 3 - - 4 -``` - diff --git a/internal/gopkg.in/yaml.v1/decode.go b/internal/gopkg.in/yaml.v1/decode.go deleted file mode 100644 index a098626..0000000 --- a/internal/gopkg.in/yaml.v1/decode.go +++ /dev/null @@ -1,566 +0,0 @@ -package yaml - -import ( - "encoding/base64" - "fmt" - "reflect" - "strconv" - "time" -) - -const ( - documentNode = 1 << iota - mappingNode - sequenceNode - scalarNode - aliasNode -) - -type node struct { - kind int - line, column int - tag string - value string - implicit bool - children []*node - anchors map[string]*node -} - -// ---------------------------------------------------------------------------- -// Parser, produces a node tree out of a libyaml event stream. - -type parser struct { - parser yaml_parser_t - event yaml_event_t - doc *node -} - -func newParser(b []byte) *parser { - p := parser{} - if !yaml_parser_initialize(&p.parser) { - panic("Failed to initialize YAML emitter") - } - - if len(b) == 0 { - b = []byte{'\n'} - } - - yaml_parser_set_input_string(&p.parser, b) - - p.skip() - if p.event.typ != yaml_STREAM_START_EVENT { - panic("Expected stream start event, got " + strconv.Itoa(int(p.event.typ))) - } - p.skip() - return &p -} - -func (p *parser) destroy() { - if p.event.typ != yaml_NO_EVENT { - yaml_event_delete(&p.event) - } - yaml_parser_delete(&p.parser) -} - -func (p *parser) skip() { - if p.event.typ != yaml_NO_EVENT { - if p.event.typ == yaml_STREAM_END_EVENT { - fail("Attempted to go past the end of stream. Corrupted value?") - } - yaml_event_delete(&p.event) - } - if !yaml_parser_parse(&p.parser, &p.event) { - p.fail() - } -} - -func (p *parser) fail() { - var where string - var line int - if p.parser.problem_mark.line != 0 { - line = p.parser.problem_mark.line - } else if p.parser.context_mark.line != 0 { - line = p.parser.context_mark.line - } - if line != 0 { - where = "line " + strconv.Itoa(line) + ": " - } - var msg string - if len(p.parser.problem) > 0 { - msg = p.parser.problem - } else { - msg = "Unknown problem parsing YAML content" - } - fail(where + msg) -} - -func (p *parser) anchor(n *node, anchor []byte) { - if anchor != nil { - p.doc.anchors[string(anchor)] = n - } -} - -func (p *parser) parse() *node { - switch p.event.typ { - case yaml_SCALAR_EVENT: - return p.scalar() - case yaml_ALIAS_EVENT: - return p.alias() - case yaml_MAPPING_START_EVENT: - return p.mapping() - case yaml_SEQUENCE_START_EVENT: - return p.sequence() - case yaml_DOCUMENT_START_EVENT: - return p.document() - case yaml_STREAM_END_EVENT: - // Happens when attempting to decode an empty buffer. - return nil - default: - panic("Attempted to parse unknown event: " + strconv.Itoa(int(p.event.typ))) - } - panic("unreachable") -} - -func (p *parser) node(kind int) *node { - return &node{ - kind: kind, - line: p.event.start_mark.line, - column: p.event.start_mark.column, - } -} - -func (p *parser) document() *node { - n := p.node(documentNode) - n.anchors = make(map[string]*node) - p.doc = n - p.skip() - n.children = append(n.children, p.parse()) - if p.event.typ != yaml_DOCUMENT_END_EVENT { - panic("Expected end of document event but got " + strconv.Itoa(int(p.event.typ))) - } - p.skip() - return n -} - -func (p *parser) alias() *node { - n := p.node(aliasNode) - n.value = string(p.event.anchor) - p.skip() - return n -} - -func (p *parser) scalar() *node { - n := p.node(scalarNode) - n.value = string(p.event.value) - n.tag = string(p.event.tag) - n.implicit = p.event.implicit - p.anchor(n, p.event.anchor) - p.skip() - return n -} - -func (p *parser) sequence() *node { - n := p.node(sequenceNode) - p.anchor(n, p.event.anchor) - p.skip() - for p.event.typ != yaml_SEQUENCE_END_EVENT { - n.children = append(n.children, p.parse()) - } - p.skip() - return n -} - -func (p *parser) mapping() *node { - n := p.node(mappingNode) - p.anchor(n, p.event.anchor) - p.skip() - for p.event.typ != yaml_MAPPING_END_EVENT { - n.children = append(n.children, p.parse(), p.parse()) - } - p.skip() - return n -} - -// ---------------------------------------------------------------------------- -// Decoder, unmarshals a node into a provided value. - -type decoder struct { - doc *node - aliases map[string]bool -} - -func newDecoder() *decoder { - d := &decoder{} - d.aliases = make(map[string]bool) - return d -} - -// d.setter deals with setters and pointer dereferencing and initialization. -// -// It's a slightly convoluted case to handle properly: -// -// - nil pointers should be initialized, unless being set to nil -// - we don't know at this point yet what's the value to SetYAML() with. -// - we can't separate pointer deref/init and setter checking, because -// a setter may be found while going down a pointer chain. -// -// Thus, here is how it takes care of it: -// -// - out is provided as a pointer, so that it can be replaced. -// - when looking at a non-setter ptr, *out=ptr.Elem(), unless tag=!!null -// - when a setter is found, *out=interface{}, and a set() function is -// returned to call SetYAML() with the value of *out once it's defined. -// -func (d *decoder) setter(tag string, out *reflect.Value, good *bool) (set func()) { - if (*out).Kind() != reflect.Ptr && (*out).CanAddr() { - setter, _ := (*out).Addr().Interface().(Setter) - if setter != nil { - var arg interface{} - *out = reflect.ValueOf(&arg).Elem() - return func() { - *good = setter.SetYAML(shortTag(tag), arg) - } - } - } - again := true - for again { - again = false - setter, _ := (*out).Interface().(Setter) - if tag != yaml_NULL_TAG || setter != nil { - if pv := (*out); pv.Kind() == reflect.Ptr { - if pv.IsNil() { - *out = reflect.New(pv.Type().Elem()).Elem() - pv.Set((*out).Addr()) - } else { - *out = pv.Elem() - } - setter, _ = pv.Interface().(Setter) - again = true - } - } - if setter != nil { - var arg interface{} - *out = reflect.ValueOf(&arg).Elem() - return func() { - *good = setter.SetYAML(shortTag(tag), arg) - } - } - } - return nil -} - -func (d *decoder) unmarshal(n *node, out reflect.Value) (good bool) { - switch n.kind { - case documentNode: - good = d.document(n, out) - case scalarNode: - good = d.scalar(n, out) - case aliasNode: - good = d.alias(n, out) - case mappingNode: - good = d.mapping(n, out) - case sequenceNode: - good = d.sequence(n, out) - default: - panic("Internal error: unknown node kind: " + strconv.Itoa(n.kind)) - } - return -} - -func (d *decoder) document(n *node, out reflect.Value) (good bool) { - if len(n.children) == 1 { - d.doc = n - d.unmarshal(n.children[0], out) - return true - } - return false -} - -func (d *decoder) alias(n *node, out reflect.Value) (good bool) { - an, ok := d.doc.anchors[n.value] - if !ok { - fail("Unknown anchor '" + n.value + "' referenced") - } - if d.aliases[n.value] { - fail("Anchor '" + n.value + "' value contains itself") - } - d.aliases[n.value] = true - good = d.unmarshal(an, out) - delete(d.aliases, n.value) - return good -} - -var zeroValue reflect.Value - -func resetMap(out reflect.Value) { - for _, k := range out.MapKeys() { - out.SetMapIndex(k, zeroValue) - } -} - -var durationType = reflect.TypeOf(time.Duration(0)) - -func (d *decoder) scalar(n *node, out reflect.Value) (good bool) { - var tag string - var resolved interface{} - if n.tag == "" && !n.implicit { - tag = yaml_STR_TAG - resolved = n.value - } else { - tag, resolved = resolve(n.tag, n.value) - if tag == yaml_BINARY_TAG { - data, err := base64.StdEncoding.DecodeString(resolved.(string)) - if err != nil { - fail("!!binary value contains invalid base64 data") - } - resolved = string(data) - } - } - if set := d.setter(tag, &out, &good); set != nil { - defer set() - } - if resolved == nil { - if out.Kind() == reflect.Map && !out.CanAddr() { - resetMap(out) - } else { - out.Set(reflect.Zero(out.Type())) - } - good = true - return - } - switch out.Kind() { - case reflect.String: - if tag == yaml_BINARY_TAG { - out.SetString(resolved.(string)) - good = true - } else if resolved != nil { - out.SetString(n.value) - good = true - } - case reflect.Interface: - if resolved == nil { - out.Set(reflect.Zero(out.Type())) - } else { - out.Set(reflect.ValueOf(resolved)) - } - good = true - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - switch resolved := resolved.(type) { - case int: - if !out.OverflowInt(int64(resolved)) { - out.SetInt(int64(resolved)) - good = true - } - case int64: - if !out.OverflowInt(resolved) { - out.SetInt(resolved) - good = true - } - case float64: - if resolved < 1<<63-1 && !out.OverflowInt(int64(resolved)) { - out.SetInt(int64(resolved)) - good = true - } - case string: - if out.Type() == durationType { - d, err := time.ParseDuration(resolved) - if err == nil { - out.SetInt(int64(d)) - good = true - } - } - } - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - switch resolved := resolved.(type) { - case int: - if resolved >= 0 { - out.SetUint(uint64(resolved)) - good = true - } - case int64: - if resolved >= 0 { - out.SetUint(uint64(resolved)) - good = true - } - case float64: - if resolved < 1<<64-1 && !out.OverflowUint(uint64(resolved)) { - out.SetUint(uint64(resolved)) - good = true - } - } - case reflect.Bool: - switch resolved := resolved.(type) { - case bool: - out.SetBool(resolved) - good = true - } - case reflect.Float32, reflect.Float64: - switch resolved := resolved.(type) { - case int: - out.SetFloat(float64(resolved)) - good = true - case int64: - out.SetFloat(float64(resolved)) - good = true - case float64: - out.SetFloat(resolved) - good = true - } - case reflect.Ptr: - if out.Type().Elem() == reflect.TypeOf(resolved) { - elem := reflect.New(out.Type().Elem()) - elem.Elem().Set(reflect.ValueOf(resolved)) - out.Set(elem) - good = true - } - } - return good -} - -func settableValueOf(i interface{}) reflect.Value { - v := reflect.ValueOf(i) - sv := reflect.New(v.Type()).Elem() - sv.Set(v) - return sv -} - -func (d *decoder) sequence(n *node, out reflect.Value) (good bool) { - if set := d.setter(yaml_SEQ_TAG, &out, &good); set != nil { - defer set() - } - var iface reflect.Value - if out.Kind() == reflect.Interface { - // No type hints. Will have to use a generic sequence. - iface = out - out = settableValueOf(make([]interface{}, 0)) - } - - if out.Kind() != reflect.Slice { - return false - } - et := out.Type().Elem() - - l := len(n.children) - for i := 0; i < l; i++ { - e := reflect.New(et).Elem() - if ok := d.unmarshal(n.children[i], e); ok { - out.Set(reflect.Append(out, e)) - } - } - if iface.IsValid() { - iface.Set(out) - } - return true -} - -func (d *decoder) mapping(n *node, out reflect.Value) (good bool) { - if set := d.setter(yaml_MAP_TAG, &out, &good); set != nil { - defer set() - } - if out.Kind() == reflect.Struct { - return d.mappingStruct(n, out) - } - - if out.Kind() == reflect.Interface { - // No type hints. Will have to use a generic map. - iface := out - out = settableValueOf(make(map[interface{}]interface{})) - iface.Set(out) - } - - if out.Kind() != reflect.Map { - return false - } - outt := out.Type() - kt := outt.Key() - et := outt.Elem() - - if out.IsNil() { - out.Set(reflect.MakeMap(outt)) - } - l := len(n.children) - for i := 0; i < l; i += 2 { - if isMerge(n.children[i]) { - d.merge(n.children[i+1], out) - continue - } - k := reflect.New(kt).Elem() - if d.unmarshal(n.children[i], k) { - kkind := k.Kind() - if kkind == reflect.Interface { - kkind = k.Elem().Kind() - } - if kkind == reflect.Map || kkind == reflect.Slice { - fail(fmt.Sprintf("invalid map key: %#v", k.Interface())) - } - e := reflect.New(et).Elem() - if d.unmarshal(n.children[i+1], e) { - out.SetMapIndex(k, e) - } - } - } - return true -} - -func (d *decoder) mappingStruct(n *node, out reflect.Value) (good bool) { - sinfo, err := getStructInfo(out.Type()) - if err != nil { - panic(err) - } - name := settableValueOf("") - l := len(n.children) - for i := 0; i < l; i += 2 { - ni := n.children[i] - if isMerge(ni) { - d.merge(n.children[i+1], out) - continue - } - if !d.unmarshal(ni, name) { - continue - } - if info, ok := sinfo.FieldsMap[name.String()]; ok { - var field reflect.Value - if info.Inline == nil { - field = out.Field(info.Num) - } else { - field = out.FieldByIndex(info.Inline) - } - d.unmarshal(n.children[i+1], field) - } - } - return true -} - -func (d *decoder) merge(n *node, out reflect.Value) { - const wantMap = "map merge requires map or sequence of maps as the value" - switch n.kind { - case mappingNode: - d.unmarshal(n, out) - case aliasNode: - an, ok := d.doc.anchors[n.value] - if ok && an.kind != mappingNode { - fail(wantMap) - } - d.unmarshal(n, out) - case sequenceNode: - // Step backwards as earlier nodes take precedence. - for i := len(n.children) - 1; i >= 0; i-- { - ni := n.children[i] - if ni.kind == aliasNode { - an, ok := d.doc.anchors[ni.value] - if ok && an.kind != mappingNode { - fail(wantMap) - } - } else if ni.kind != mappingNode { - fail(wantMap) - } - d.unmarshal(ni, out) - } - default: - fail(wantMap) - } -} - -func isMerge(n *node) bool { - return n.kind == scalarNode && n.value == "<<" && (n.implicit == true || n.tag == yaml_MERGE_TAG) -} diff --git a/internal/gopkg.in/yaml.v1/decode_test.go b/internal/gopkg.in/yaml.v1/decode_test.go deleted file mode 100644 index 9081a32..0000000 --- a/internal/gopkg.in/yaml.v1/decode_test.go +++ /dev/null @@ -1,703 +0,0 @@ -package yaml_test - -import ( - . "gopkg.in/check.v1" - "github.com/vtolstov/svirtnet/internal/gopkg.in/yaml.v1" - "math" - "reflect" - "strings" - "time" -) - -var unmarshalIntTest = 123 - -var unmarshalTests = []struct { - data string - value interface{} -}{ - { - "", - &struct{}{}, - }, { - "{}", &struct{}{}, - }, { - "v: hi", - map[string]string{"v": "hi"}, - }, { - "v: hi", map[string]interface{}{"v": "hi"}, - }, { - "v: true", - map[string]string{"v": "true"}, - }, { - "v: true", - map[string]interface{}{"v": true}, - }, { - "v: 10", - map[string]interface{}{"v": 10}, - }, { - "v: 0b10", - map[string]interface{}{"v": 2}, - }, { - "v: 0xA", - map[string]interface{}{"v": 10}, - }, { - "v: 4294967296", - map[string]int64{"v": 4294967296}, - }, { - "v: 0.1", - map[string]interface{}{"v": 0.1}, - }, { - "v: .1", - map[string]interface{}{"v": 0.1}, - }, { - "v: .Inf", - map[string]interface{}{"v": math.Inf(+1)}, - }, { - "v: -.Inf", - map[string]interface{}{"v": math.Inf(-1)}, - }, { - "v: -10", - map[string]interface{}{"v": -10}, - }, { - "v: -.1", - map[string]interface{}{"v": -0.1}, - }, - - // Simple values. - { - "123", - &unmarshalIntTest, - }, - - // Floats from spec - { - "canonical: 6.8523e+5", - map[string]interface{}{"canonical": 6.8523e+5}, - }, { - "expo: 685.230_15e+03", - map[string]interface{}{"expo": 685.23015e+03}, - }, { - "fixed: 685_230.15", - map[string]interface{}{"fixed": 685230.15}, - }, { - "neginf: -.inf", - map[string]interface{}{"neginf": math.Inf(-1)}, - }, { - "fixed: 685_230.15", - map[string]float64{"fixed": 685230.15}, - }, - //{"sexa: 190:20:30.15", map[string]interface{}{"sexa": 0}}, // Unsupported - //{"notanum: .NaN", map[string]interface{}{"notanum": math.NaN()}}, // Equality of NaN fails. - - // Bools from spec - { - "canonical: y", - map[string]interface{}{"canonical": true}, - }, { - "answer: NO", - map[string]interface{}{"answer": false}, - }, { - "logical: True", - map[string]interface{}{"logical": true}, - }, { - "option: on", - map[string]interface{}{"option": true}, - }, { - "option: on", - map[string]bool{"option": true}, - }, - // Ints from spec - { - "canonical: 685230", - map[string]interface{}{"canonical": 685230}, - }, { - "decimal: +685_230", - map[string]interface{}{"decimal": 685230}, - }, { - "octal: 02472256", - map[string]interface{}{"octal": 685230}, - }, { - "hexa: 0x_0A_74_AE", - map[string]interface{}{"hexa": 685230}, - }, { - "bin: 0b1010_0111_0100_1010_1110", - map[string]interface{}{"bin": 685230}, - }, { - "bin: -0b101010", - map[string]interface{}{"bin": -42}, - }, { - "decimal: +685_230", - map[string]int{"decimal": 685230}, - }, - - //{"sexa: 190:20:30", map[string]interface{}{"sexa": 0}}, // Unsupported - - // Nulls from spec - { - "empty:", - map[string]interface{}{"empty": nil}, - }, { - "canonical: ~", - map[string]interface{}{"canonical": nil}, - }, { - "english: null", - map[string]interface{}{"english": nil}, - }, { - "~: null key", - map[interface{}]string{nil: "null key"}, - }, { - "empty:", - map[string]*bool{"empty": nil}, - }, - - // Flow sequence - { - "seq: [A,B]", - map[string]interface{}{"seq": []interface{}{"A", "B"}}, - }, { - "seq: [A,B,C,]", - map[string][]string{"seq": []string{"A", "B", "C"}}, - }, { - "seq: [A,1,C]", - map[string][]string{"seq": []string{"A", "1", "C"}}, - }, { - "seq: [A,1,C]", - map[string][]int{"seq": []int{1}}, - }, { - "seq: [A,1,C]", - map[string]interface{}{"seq": []interface{}{"A", 1, "C"}}, - }, - // Block sequence - { - "seq:\n - A\n - B", - map[string]interface{}{"seq": []interface{}{"A", "B"}}, - }, { - "seq:\n - A\n - B\n - C", - map[string][]string{"seq": []string{"A", "B", "C"}}, - }, { - "seq:\n - A\n - 1\n - C", - map[string][]string{"seq": []string{"A", "1", "C"}}, - }, { - "seq:\n - A\n - 1\n - C", - map[string][]int{"seq": []int{1}}, - }, { - "seq:\n - A\n - 1\n - C", - map[string]interface{}{"seq": []interface{}{"A", 1, "C"}}, - }, - - // Literal block scalar - { - "scalar: | # Comment\n\n literal\n\n \ttext\n\n", - map[string]string{"scalar": "\nliteral\n\n\ttext\n"}, - }, - - // Folded block scalar - { - "scalar: > # Comment\n\n folded\n line\n \n next\n line\n * one\n * two\n\n last\n line\n\n", - map[string]string{"scalar": "\nfolded line\nnext line\n * one\n * two\n\nlast line\n"}, - }, - - // Map inside interface with no type hints. - { - "a: {b: c}", - map[string]interface{}{"a": map[interface{}]interface{}{"b": "c"}}, - }, - - // Structs and type conversions. - { - "hello: world", - &struct{ Hello string }{"world"}, - }, { - "a: {b: c}", - &struct{ A struct{ B string } }{struct{ B string }{"c"}}, - }, { - "a: {b: c}", - &struct{ A *struct{ B string } }{&struct{ B string }{"c"}}, - }, { - "a: {b: c}", - &struct{ A map[string]string }{map[string]string{"b": "c"}}, - }, { - "a: {b: c}", - &struct{ A *map[string]string }{&map[string]string{"b": "c"}}, - }, { - "a:", - &struct{ A map[string]string }{}, - }, { - "a: 1", - &struct{ A int }{1}, - }, { - "a: 1", - &struct{ A float64 }{1}, - }, { - "a: 1.0", - &struct{ A int }{1}, - }, { - "a: 1.0", - &struct{ A uint }{1}, - }, { - "a: [1, 2]", - &struct{ A []int }{[]int{1, 2}}, - }, { - "a: 1", - &struct{ B int }{0}, - }, { - "a: 1", - &struct { - B int "a" - }{1}, - }, { - "a: y", - &struct{ A bool }{true}, - }, - - // Some cross type conversions - { - "v: 42", - map[string]uint{"v": 42}, - }, { - "v: -42", - map[string]uint{}, - }, { - "v: 4294967296", - map[string]uint64{"v": 4294967296}, - }, { - "v: -4294967296", - map[string]uint64{}, - }, - - // Overflow cases. - { - "v: 4294967297", - map[string]int32{}, - }, { - "v: 128", - map[string]int8{}, - }, - - // Quoted values. - { - "'1': '\"2\"'", - map[interface{}]interface{}{"1": "\"2\""}, - }, { - "v:\n- A\n- 'B\n\n C'\n", - map[string][]string{"v": []string{"A", "B\nC"}}, - }, - - // Explicit tags. - { - "v: !!float '1.1'", - map[string]interface{}{"v": 1.1}, - }, { - "v: !!null ''", - map[string]interface{}{"v": nil}, - }, { - "%TAG !y! tag:yaml.org,2002:\n---\nv: !y!int '1'", - map[string]interface{}{"v": 1}, - }, - - // Anchors and aliases. - { - "a: &x 1\nb: &y 2\nc: *x\nd: *y\n", - &struct{ A, B, C, D int }{1, 2, 1, 2}, - }, { - "a: &a {c: 1}\nb: *a", - &struct { - A, B struct { - C int - } - }{struct{ C int }{1}, struct{ C int }{1}}, - }, { - "a: &a [1, 2]\nb: *a", - &struct{ B []int }{[]int{1, 2}}, - }, - - // Bug #1133337 - { - "foo: ''", - map[string]*string{"foo": new(string)}, - }, { - "foo: null", - map[string]string{"foo": ""}, - }, { - "foo: null", - map[string]interface{}{"foo": nil}, - }, - - // Ignored field - { - "a: 1\nb: 2\n", - &struct { - A int - B int "-" - }{1, 0}, - }, - - // Bug #1191981 - { - "" + - "%YAML 1.1\n" + - "--- !!str\n" + - `"Generic line break (no glyph)\n\` + "\n" + - ` Generic line break (glyphed)\n\` + "\n" + - ` Line separator\u2028\` + "\n" + - ` Paragraph separator\u2029"` + "\n", - "" + - "Generic line break (no glyph)\n" + - "Generic line break (glyphed)\n" + - "Line separator\u2028Paragraph separator\u2029", - }, - - // Struct inlining - { - "a: 1\nb: 2\nc: 3\n", - &struct { - A int - C inlineB `yaml:",inline"` - }{1, inlineB{2, inlineC{3}}}, - }, - - // bug 1243827 - { - "a: -b_c", - map[string]interface{}{"a": "-b_c"}, - }, - { - "a: +b_c", - map[string]interface{}{"a": "+b_c"}, - }, - { - "a: 50cent_of_dollar", - map[string]interface{}{"a": "50cent_of_dollar"}, - }, - - // Duration - { - "a: 3s", - map[string]time.Duration{"a": 3 * time.Second}, - }, - - // Issue #24. - { - "a: ", - map[string]string{"a": ""}, - }, - - // Base 60 floats are obsolete and unsupported. - { - "a: 1:1\n", - map[string]string{"a": "1:1"}, - }, - - // Binary data. - { - "a: !!binary gIGC\n", - map[string]string{"a": "\x80\x81\x82"}, - }, { - "a: !!binary |\n " + strings.Repeat("kJCQ", 17) + "kJ\n CQ\n", - map[string]string{"a": strings.Repeat("\x90", 54)}, - }, { - "a: !!binary |\n " + strings.Repeat("A", 70) + "\n ==\n", - map[string]string{"a": strings.Repeat("\x00", 52)}, - }, -} - -type inlineB struct { - B int - inlineC `yaml:",inline"` -} - -type inlineC struct { - C int -} - -func (s *S) TestUnmarshal(c *C) { - for i, item := range unmarshalTests { - t := reflect.ValueOf(item.value).Type() - var value interface{} - switch t.Kind() { - case reflect.Map: - value = reflect.MakeMap(t).Interface() - case reflect.String: - t := reflect.ValueOf(item.value).Type() - v := reflect.New(t) - value = v.Interface() - default: - pt := reflect.ValueOf(item.value).Type() - pv := reflect.New(pt.Elem()) - value = pv.Interface() - } - err := yaml.Unmarshal([]byte(item.data), value) - c.Assert(err, IsNil, Commentf("Item #%d", i)) - if t.Kind() == reflect.String { - c.Assert(*value.(*string), Equals, item.value, Commentf("Item #%d", i)) - } else { - c.Assert(value, DeepEquals, item.value, Commentf("Item #%d", i)) - } - } -} - -func (s *S) TestUnmarshalNaN(c *C) { - value := map[string]interface{}{} - err := yaml.Unmarshal([]byte("notanum: .NaN"), &value) - c.Assert(err, IsNil) - c.Assert(math.IsNaN(value["notanum"].(float64)), Equals, true) -} - -var unmarshalErrorTests = []struct { - data, error string -}{ - {"v: !!float 'error'", "YAML error: cannot decode !!str `error` as a !!float"}, - {"v: [A,", "YAML error: line 1: did not find expected node content"}, - {"v:\n- [A,", "YAML error: line 2: did not find expected node content"}, - {"a: *b\n", "YAML error: Unknown anchor 'b' referenced"}, - {"a: &a\n b: *a\n", "YAML error: Anchor 'a' value contains itself"}, - {"value: -", "YAML error: block sequence entries are not allowed in this context"}, - {"a: !!binary ==", "YAML error: !!binary value contains invalid base64 data"}, - {"{[.]}", `YAML error: invalid map key: \[\]interface \{\}\{"\."\}`}, - {"{{.}}", `YAML error: invalid map key: map\[interface\ \{\}\]interface \{\}\{".":interface \{\}\(nil\)\}`}, -} - -func (s *S) TestUnmarshalErrors(c *C) { - for _, item := range unmarshalErrorTests { - var value interface{} - err := yaml.Unmarshal([]byte(item.data), &value) - c.Assert(err, ErrorMatches, item.error, Commentf("Partial unmarshal: %#v", value)) - } -} - -var setterTests = []struct { - data, tag string - value interface{} -}{ - {"_: {hi: there}", "!!map", map[interface{}]interface{}{"hi": "there"}}, - {"_: [1,A]", "!!seq", []interface{}{1, "A"}}, - {"_: 10", "!!int", 10}, - {"_: null", "!!null", nil}, - {`_: BAR!`, "!!str", "BAR!"}, - {`_: "BAR!"`, "!!str", "BAR!"}, - {"_: !!foo 'BAR!'", "!!foo", "BAR!"}, -} - -var setterResult = map[int]bool{} - -type typeWithSetter struct { - tag string - value interface{} -} - -func (o *typeWithSetter) SetYAML(tag string, value interface{}) (ok bool) { - o.tag = tag - o.value = value - if i, ok := value.(int); ok { - if result, ok := setterResult[i]; ok { - return result - } - } - return true -} - -type setterPointerType struct { - Field *typeWithSetter "_" -} - -type setterValueType struct { - Field typeWithSetter "_" -} - -func (s *S) TestUnmarshalWithPointerSetter(c *C) { - for _, item := range setterTests { - obj := &setterPointerType{} - err := yaml.Unmarshal([]byte(item.data), obj) - c.Assert(err, IsNil) - c.Assert(obj.Field, NotNil, Commentf("Pointer not initialized (%#v)", item.value)) - c.Assert(obj.Field.tag, Equals, item.tag) - c.Assert(obj.Field.value, DeepEquals, item.value) - } -} - -func (s *S) TestUnmarshalWithValueSetter(c *C) { - for _, item := range setterTests { - obj := &setterValueType{} - err := yaml.Unmarshal([]byte(item.data), obj) - c.Assert(err, IsNil) - c.Assert(obj.Field, NotNil, Commentf("Pointer not initialized (%#v)", item.value)) - c.Assert(obj.Field.tag, Equals, item.tag) - c.Assert(obj.Field.value, DeepEquals, item.value) - } -} - -func (s *S) TestUnmarshalWholeDocumentWithSetter(c *C) { - obj := &typeWithSetter{} - err := yaml.Unmarshal([]byte(setterTests[0].data), obj) - c.Assert(err, IsNil) - c.Assert(obj.tag, Equals, setterTests[0].tag) - value, ok := obj.value.(map[interface{}]interface{}) - c.Assert(ok, Equals, true) - c.Assert(value["_"], DeepEquals, setterTests[0].value) -} - -func (s *S) TestUnmarshalWithFalseSetterIgnoresValue(c *C) { - setterResult[2] = false - setterResult[4] = false - defer func() { - delete(setterResult, 2) - delete(setterResult, 4) - }() - - m := map[string]*typeWithSetter{} - data := `{abc: 1, def: 2, ghi: 3, jkl: 4}` - err := yaml.Unmarshal([]byte(data), m) - c.Assert(err, IsNil) - c.Assert(m["abc"], NotNil) - c.Assert(m["def"], IsNil) - c.Assert(m["ghi"], NotNil) - c.Assert(m["jkl"], IsNil) - - c.Assert(m["abc"].value, Equals, 1) - c.Assert(m["ghi"].value, Equals, 3) -} - -// From http://yaml.org/type/merge.html -var mergeTests = ` -anchors: - - &CENTER { "x": 1, "y": 2 } - - &LEFT { "x": 0, "y": 2 } - - &BIG { "r": 10 } - - &SMALL { "r": 1 } - -# All the following maps are equal: - -plain: - # Explicit keys - "x": 1 - "y": 2 - "r": 10 - label: center/big - -mergeOne: - # Merge one map - << : *CENTER - "r": 10 - label: center/big - -mergeMultiple: - # Merge multiple maps - << : [ *CENTER, *BIG ] - label: center/big - -override: - # Override - << : [ *BIG, *LEFT, *SMALL ] - "x": 1 - label: center/big - -shortTag: - # Explicit short merge tag - !!merge "<<" : [ *CENTER, *BIG ] - label: center/big - -longTag: - # Explicit merge long tag - ! "<<" : [ *CENTER, *BIG ] - label: center/big - -inlineMap: - # Inlined map - << : {"x": 1, "y": 2, "r": 10} - label: center/big - -inlineSequenceMap: - # Inlined map in sequence - << : [ *CENTER, {"r": 10} ] - label: center/big -` - -func (s *S) TestMerge(c *C) { - var want = map[interface{}]interface{}{ - "x": 1, - "y": 2, - "r": 10, - "label": "center/big", - } - - var m map[string]interface{} - err := yaml.Unmarshal([]byte(mergeTests), &m) - c.Assert(err, IsNil) - for name, test := range m { - if name == "anchors" { - continue - } - c.Assert(test, DeepEquals, want, Commentf("test %q failed", name)) - } -} - -func (s *S) TestMergeStruct(c *C) { - type Data struct { - X, Y, R int - Label string - } - want := Data{1, 2, 10, "center/big"} - - var m map[string]Data - err := yaml.Unmarshal([]byte(mergeTests), &m) - c.Assert(err, IsNil) - for name, test := range m { - if name == "anchors" { - continue - } - c.Assert(test, Equals, want, Commentf("test %q failed", name)) - } -} - -var unmarshalNullTests = []func() interface{}{ - func() interface{} { var v interface{}; v = "v"; return &v }, - func() interface{} { var s = "s"; return &s }, - func() interface{} { var s = "s"; sptr := &s; return &sptr }, - func() interface{} { var i = 1; return &i }, - func() interface{} { var i = 1; iptr := &i; return &iptr }, - func() interface{} { m := map[string]int{"s": 1}; return &m }, - func() interface{} { m := map[string]int{"s": 1}; return m }, -} - -func (s *S) TestUnmarshalNull(c *C) { - for _, test := range unmarshalNullTests { - item := test() - zero := reflect.Zero(reflect.TypeOf(item).Elem()).Interface() - err := yaml.Unmarshal([]byte("null"), item) - c.Assert(err, IsNil) - if reflect.TypeOf(item).Kind() == reflect.Map { - c.Assert(reflect.ValueOf(item).Interface(), DeepEquals, reflect.MakeMap(reflect.TypeOf(item)).Interface()) - } else { - c.Assert(reflect.ValueOf(item).Elem().Interface(), DeepEquals, zero) - } - } -} - -//var data []byte -//func init() { -// var err error -// data, err = ioutil.ReadFile("/tmp/file.yaml") -// if err != nil { -// panic(err) -// } -//} -// -//func (s *S) BenchmarkUnmarshal(c *C) { -// var err error -// for i := 0; i < c.N; i++ { -// var v map[string]interface{} -// err = yaml.Unmarshal(data, &v) -// } -// if err != nil { -// panic(err) -// } -//} -// -//func (s *S) BenchmarkMarshal(c *C) { -// var v map[string]interface{} -// yaml.Unmarshal(data, &v) -// c.ResetTimer() -// for i := 0; i < c.N; i++ { -// yaml.Marshal(&v) -// } -//} diff --git a/internal/gopkg.in/yaml.v1/encode.go b/internal/gopkg.in/yaml.v1/encode.go deleted file mode 100644 index 0b9048d..0000000 --- a/internal/gopkg.in/yaml.v1/encode.go +++ /dev/null @@ -1,265 +0,0 @@ -package yaml - -import ( - "reflect" - "regexp" - "sort" - "strconv" - "strings" - "time" -) - -type encoder struct { - emitter yaml_emitter_t - event yaml_event_t - out []byte - flow bool -} - -func newEncoder() (e *encoder) { - e = &encoder{} - e.must(yaml_emitter_initialize(&e.emitter)) - yaml_emitter_set_output_string(&e.emitter, &e.out) - e.must(yaml_stream_start_event_initialize(&e.event, yaml_UTF8_ENCODING)) - e.emit() - e.must(yaml_document_start_event_initialize(&e.event, nil, nil, true)) - e.emit() - return e -} - -func (e *encoder) finish() { - e.must(yaml_document_end_event_initialize(&e.event, true)) - e.emit() - e.emitter.open_ended = false - e.must(yaml_stream_end_event_initialize(&e.event)) - e.emit() -} - -func (e *encoder) destroy() { - yaml_emitter_delete(&e.emitter) -} - -func (e *encoder) emit() { - // This will internally delete the e.event value. - if !yaml_emitter_emit(&e.emitter, &e.event) && e.event.typ != yaml_DOCUMENT_END_EVENT && e.event.typ != yaml_STREAM_END_EVENT { - e.must(false) - } -} - -func (e *encoder) must(ok bool) { - if !ok { - msg := e.emitter.problem - if msg == "" { - msg = "Unknown problem generating YAML content" - } - fail(msg) - } -} - -func (e *encoder) marshal(tag string, in reflect.Value) { - if !in.IsValid() { - e.nilv() - return - } - var value interface{} - if getter, ok := in.Interface().(Getter); ok { - tag, value = getter.GetYAML() - tag = longTag(tag) - if value == nil { - e.nilv() - return - } - in = reflect.ValueOf(value) - } - switch in.Kind() { - case reflect.Interface: - if in.IsNil() { - e.nilv() - } else { - e.marshal(tag, in.Elem()) - } - case reflect.Map: - e.mapv(tag, in) - case reflect.Ptr: - if in.IsNil() { - e.nilv() - } else { - e.marshal(tag, in.Elem()) - } - case reflect.Struct: - e.structv(tag, in) - case reflect.Slice: - e.slicev(tag, in) - case reflect.String: - e.stringv(tag, in) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - if in.Type() == durationType { - e.stringv(tag, reflect.ValueOf(in.Interface().(time.Duration).String())) - } else { - e.intv(tag, in) - } - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - e.uintv(tag, in) - case reflect.Float32, reflect.Float64: - e.floatv(tag, in) - case reflect.Bool: - e.boolv(tag, in) - default: - panic("Can't marshal type: " + in.Type().String()) - } -} - -func (e *encoder) mapv(tag string, in reflect.Value) { - e.mappingv(tag, func() { - keys := keyList(in.MapKeys()) - sort.Sort(keys) - for _, k := range keys { - e.marshal("", k) - e.marshal("", in.MapIndex(k)) - } - }) -} - -func (e *encoder) structv(tag string, in reflect.Value) { - sinfo, err := getStructInfo(in.Type()) - if err != nil { - panic(err) - } - e.mappingv(tag, func() { - for _, info := range sinfo.FieldsList { - var value reflect.Value - if info.Inline == nil { - value = in.Field(info.Num) - } else { - value = in.FieldByIndex(info.Inline) - } - if info.OmitEmpty && isZero(value) { - continue - } - e.marshal("", reflect.ValueOf(info.Key)) - e.flow = info.Flow - e.marshal("", value) - } - }) -} - -func (e *encoder) mappingv(tag string, f func()) { - implicit := tag == "" - style := yaml_BLOCK_MAPPING_STYLE - if e.flow { - e.flow = false - style = yaml_FLOW_MAPPING_STYLE - } - e.must(yaml_mapping_start_event_initialize(&e.event, nil, []byte(tag), implicit, style)) - e.emit() - f() - e.must(yaml_mapping_end_event_initialize(&e.event)) - e.emit() -} - -func (e *encoder) slicev(tag string, in reflect.Value) { - implicit := tag == "" - style := yaml_BLOCK_SEQUENCE_STYLE - if e.flow { - e.flow = false - style = yaml_FLOW_SEQUENCE_STYLE - } - e.must(yaml_sequence_start_event_initialize(&e.event, nil, []byte(tag), implicit, style)) - e.emit() - n := in.Len() - for i := 0; i < n; i++ { - e.marshal("", in.Index(i)) - } - e.must(yaml_sequence_end_event_initialize(&e.event)) - e.emit() -} - -// isBase60 returns whether s is in base 60 notation as defined in YAML 1.1. -// -// The base 60 float notation in YAML 1.1 is a terrible idea and is unsupported -// in YAML 1.2 and by this package, but these should be marshalled quoted for -// the time being for compatibility with other parsers. -func isBase60Float(s string) (result bool) { - // Fast path. - if s == "" { - return false - } - c := s[0] - if !(c == '+' || c == '-' || c >= '0' && c <= '9') || strings.IndexByte(s, ':') < 0 { - return false - } - // Do the full match. - return base60float.MatchString(s) -} - -// From http://yaml.org/type/float.html, except the regular expression there -// is bogus. In practice parsers do not enforce the "\.[0-9_]*" suffix. -var base60float = regexp.MustCompile(`^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+(?:\.[0-9_]*)?$`) - -func (e *encoder) stringv(tag string, in reflect.Value) { - var style yaml_scalar_style_t - s := in.String() - rtag, rs := resolve("", s) - if rtag == yaml_BINARY_TAG { - if tag == "" || tag == yaml_STR_TAG { - tag = rtag - s = rs.(string) - } else if tag == yaml_BINARY_TAG { - fail("explicitly tagged !!binary data must be base64-encoded") - } else { - fail("cannot marshal invalid UTF-8 data as " + shortTag(tag)) - } - } - if tag == "" && (rtag != yaml_STR_TAG || isBase60Float(s)) { - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } else if strings.Contains(s, "\n") { - style = yaml_LITERAL_SCALAR_STYLE - } else { - style = yaml_PLAIN_SCALAR_STYLE - } - e.emitScalar(s, "", tag, style) -} - -func (e *encoder) boolv(tag string, in reflect.Value) { - var s string - if in.Bool() { - s = "true" - } else { - s = "false" - } - e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) -} - -func (e *encoder) intv(tag string, in reflect.Value) { - s := strconv.FormatInt(in.Int(), 10) - e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) -} - -func (e *encoder) uintv(tag string, in reflect.Value) { - s := strconv.FormatUint(in.Uint(), 10) - e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) -} - -func (e *encoder) floatv(tag string, in reflect.Value) { - // FIXME: Handle 64 bits here. - s := strconv.FormatFloat(float64(in.Float()), 'g', -1, 32) - switch s { - case "+Inf": - s = ".inf" - case "-Inf": - s = "-.inf" - case "NaN": - s = ".nan" - } - e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) -} - -func (e *encoder) nilv() { - e.emitScalar("null", "", "", yaml_PLAIN_SCALAR_STYLE) -} - -func (e *encoder) emitScalar(value, anchor, tag string, style yaml_scalar_style_t) { - implicit := tag == "" - e.must(yaml_scalar_event_initialize(&e.event, []byte(anchor), []byte(tag), []byte(value), implicit, implicit, style)) - e.emit() -} diff --git a/internal/gopkg.in/yaml.v1/encode_test.go b/internal/gopkg.in/yaml.v1/encode_test.go deleted file mode 100644 index c921796..0000000 --- a/internal/gopkg.in/yaml.v1/encode_test.go +++ /dev/null @@ -1,433 +0,0 @@ -package yaml_test - -import ( - "fmt" - "math" - "strconv" - "strings" - "time" - - . "gopkg.in/check.v1" - "github.com/vtolstov/svirtnet/internal/gopkg.in/yaml.v1" -) - -var marshalIntTest = 123 - -var marshalTests = []struct { - value interface{} - data string -}{ - { - nil, - "null\n", - }, { - &struct{}{}, - "{}\n", - }, { - map[string]string{"v": "hi"}, - "v: hi\n", - }, { - map[string]interface{}{"v": "hi"}, - "v: hi\n", - }, { - map[string]string{"v": "true"}, - "v: \"true\"\n", - }, { - map[string]string{"v": "false"}, - "v: \"false\"\n", - }, { - map[string]interface{}{"v": true}, - "v: true\n", - }, { - map[string]interface{}{"v": false}, - "v: false\n", - }, { - map[string]interface{}{"v": 10}, - "v: 10\n", - }, { - map[string]interface{}{"v": -10}, - "v: -10\n", - }, { - map[string]uint{"v": 42}, - "v: 42\n", - }, { - map[string]interface{}{"v": int64(4294967296)}, - "v: 4294967296\n", - }, { - map[string]int64{"v": int64(4294967296)}, - "v: 4294967296\n", - }, { - map[string]uint64{"v": 4294967296}, - "v: 4294967296\n", - }, { - map[string]interface{}{"v": "10"}, - "v: \"10\"\n", - }, { - map[string]interface{}{"v": 0.1}, - "v: 0.1\n", - }, { - map[string]interface{}{"v": float64(0.1)}, - "v: 0.1\n", - }, { - map[string]interface{}{"v": -0.1}, - "v: -0.1\n", - }, { - map[string]interface{}{"v": math.Inf(+1)}, - "v: .inf\n", - }, { - map[string]interface{}{"v": math.Inf(-1)}, - "v: -.inf\n", - }, { - map[string]interface{}{"v": math.NaN()}, - "v: .nan\n", - }, { - map[string]interface{}{"v": nil}, - "v: null\n", - }, { - map[string]interface{}{"v": ""}, - "v: \"\"\n", - }, { - map[string][]string{"v": []string{"A", "B"}}, - "v:\n- A\n- B\n", - }, { - map[string][]string{"v": []string{"A", "B\nC"}}, - "v:\n- A\n- |-\n B\n C\n", - }, { - map[string][]interface{}{"v": []interface{}{"A", 1, map[string][]int{"B": []int{2, 3}}}}, - "v:\n- A\n- 1\n- B:\n - 2\n - 3\n", - }, { - map[string]interface{}{"a": map[interface{}]interface{}{"b": "c"}}, - "a:\n b: c\n", - }, { - map[string]interface{}{"a": "-"}, - "a: '-'\n", - }, - - // Simple values. - { - &marshalIntTest, - "123\n", - }, - - // Structures - { - &struct{ Hello string }{"world"}, - "hello: world\n", - }, { - &struct { - A struct { - B string - } - }{struct{ B string }{"c"}}, - "a:\n b: c\n", - }, { - &struct { - A *struct { - B string - } - }{&struct{ B string }{"c"}}, - "a:\n b: c\n", - }, { - &struct { - A *struct { - B string - } - }{}, - "a: null\n", - }, { - &struct{ A int }{1}, - "a: 1\n", - }, { - &struct{ A []int }{[]int{1, 2}}, - "a:\n- 1\n- 2\n", - }, { - &struct { - B int "a" - }{1}, - "a: 1\n", - }, { - &struct{ A bool }{true}, - "a: true\n", - }, - - // Conditional flag - { - &struct { - A int "a,omitempty" - B int "b,omitempty" - }{1, 0}, - "a: 1\n", - }, { - &struct { - A int "a,omitempty" - B int "b,omitempty" - }{0, 0}, - "{}\n", - }, { - &struct { - A *struct{ X int } "a,omitempty" - B int "b,omitempty" - }{nil, 0}, - "{}\n", - }, - - // Flow flag - { - &struct { - A []int "a,flow" - }{[]int{1, 2}}, - "a: [1, 2]\n", - }, { - &struct { - A map[string]string "a,flow" - }{map[string]string{"b": "c", "d": "e"}}, - "a: {b: c, d: e}\n", - }, { - &struct { - A struct { - B, D string - } "a,flow" - }{struct{ B, D string }{"c", "e"}}, - "a: {b: c, d: e}\n", - }, - - // Unexported field - { - &struct { - u int - A int - }{0, 1}, - "a: 1\n", - }, - - // Ignored field - { - &struct { - A int - B int "-" - }{1, 2}, - "a: 1\n", - }, - - // Struct inlining - { - &struct { - A int - C inlineB `yaml:",inline"` - }{1, inlineB{2, inlineC{3}}}, - "a: 1\nb: 2\nc: 3\n", - }, - - // Duration - { - map[string]time.Duration{"a": 3 * time.Second}, - "a: 3s\n", - }, - - // Issue #24: bug in map merging logic. - { - map[string]string{"a": ""}, - "a: \n", - }, - - // Issue #34: marshal unsupported base 60 floats quoted for compatibility - // with old YAML 1.1 parsers. - { - map[string]string{"a": "1:1"}, - "a: \"1:1\"\n", - }, - - // Binary data. - { - map[string]string{"a": "\x00"}, - "a: \"\\0\"\n", - }, { - map[string]string{"a": "\x80\x81\x82"}, - "a: !!binary gIGC\n", - }, { - map[string]string{"a": strings.Repeat("\x90", 54)}, - "a: !!binary |\n " + strings.Repeat("kJCQ", 17) + "kJ\n CQ\n", - }, { - map[string]interface{}{"a": typeWithGetter{"!!str", "\x80\x81\x82"}}, - "a: !!binary gIGC\n", - }, - - // Escaping of tags. - { - map[string]interface{}{"a": typeWithGetter{"foo!bar", 1}}, - "a: ! 1\n", - }, -} - -func (s *S) TestMarshal(c *C) { - for _, item := range marshalTests { - data, err := yaml.Marshal(item.value) - c.Assert(err, IsNil) - c.Assert(string(data), Equals, item.data) - } -} - -var marshalErrorTests = []struct { - value interface{} - error string - panic string -}{{ - value: &struct { - B int - inlineB ",inline" - }{1, inlineB{2, inlineC{3}}}, - panic: `Duplicated key 'b' in struct struct \{ B int; .*`, -}, { - value: typeWithGetter{"!!binary", "\x80"}, - error: "YAML error: explicitly tagged !!binary data must be base64-encoded", -}, { - value: typeWithGetter{"!!float", "\x80"}, - error: `YAML error: cannot marshal invalid UTF-8 data as !!float`, -}} - -func (s *S) TestMarshalErrors(c *C) { - for _, item := range marshalErrorTests { - if item.panic != "" { - c.Assert(func() { yaml.Marshal(item.value) }, PanicMatches, item.panic) - } else { - _, err := yaml.Marshal(item.value) - c.Assert(err, ErrorMatches, item.error) - } - } -} - -var marshalTaggedIfaceTest interface{} = &struct{ A string }{"B"} - -var getterTests = []struct { - data, tag string - value interface{} -}{ - {"_:\n hi: there\n", "", map[interface{}]interface{}{"hi": "there"}}, - {"_:\n- 1\n- A\n", "", []interface{}{1, "A"}}, - {"_: 10\n", "", 10}, - {"_: null\n", "", nil}, - {"_: !foo BAR!\n", "!foo", "BAR!"}, - {"_: !foo 1\n", "!foo", "1"}, - {"_: !foo '\"1\"'\n", "!foo", "\"1\""}, - {"_: !foo 1.1\n", "!foo", 1.1}, - {"_: !foo 1\n", "!foo", 1}, - {"_: !foo 1\n", "!foo", uint(1)}, - {"_: !foo true\n", "!foo", true}, - {"_: !foo\n- A\n- B\n", "!foo", []string{"A", "B"}}, - {"_: !foo\n A: B\n", "!foo", map[string]string{"A": "B"}}, - {"_: !foo\n a: B\n", "!foo", &marshalTaggedIfaceTest}, -} - -func (s *S) TestMarshalTypeCache(c *C) { - var data []byte - var err error - func() { - type T struct{ A int } - data, err = yaml.Marshal(&T{}) - c.Assert(err, IsNil) - }() - func() { - type T struct{ B int } - data, err = yaml.Marshal(&T{}) - c.Assert(err, IsNil) - }() - c.Assert(string(data), Equals, "b: 0\n") -} - -type typeWithGetter struct { - tag string - value interface{} -} - -func (o typeWithGetter) GetYAML() (tag string, value interface{}) { - return o.tag, o.value -} - -type typeWithGetterField struct { - Field typeWithGetter "_" -} - -func (s *S) TestMashalWithGetter(c *C) { - for _, item := range getterTests { - obj := &typeWithGetterField{} - obj.Field.tag = item.tag - obj.Field.value = item.value - data, err := yaml.Marshal(obj) - c.Assert(err, IsNil) - c.Assert(string(data), Equals, string(item.data)) - } -} - -func (s *S) TestUnmarshalWholeDocumentWithGetter(c *C) { - obj := &typeWithGetter{} - obj.tag = "" - obj.value = map[string]string{"hello": "world!"} - data, err := yaml.Marshal(obj) - c.Assert(err, IsNil) - c.Assert(string(data), Equals, "hello: world!\n") -} - -func (s *S) TestSortedOutput(c *C) { - order := []interface{}{ - false, - true, - 1, - uint(1), - 1.0, - 1.1, - 1.2, - 2, - uint(2), - 2.0, - 2.1, - "", - ".1", - ".2", - ".a", - "1", - "2", - "a!10", - "a/2", - "a/10", - "a~10", - "ab/1", - "b/1", - "b/01", - "b/2", - "b/02", - "b/3", - "b/03", - "b1", - "b01", - "b3", - "c2.10", - "c10.2", - "d1", - "d12", - "d12a", - } - m := make(map[interface{}]int) - for _, k := range order { - m[k] = 1 - } - data, err := yaml.Marshal(m) - c.Assert(err, IsNil) - out := "\n" + string(data) - last := 0 - for i, k := range order { - repr := fmt.Sprint(k) - if s, ok := k.(string); ok { - if _, err = strconv.ParseFloat(repr, 32); s == "" || err == nil { - repr = `"` + repr + `"` - } - } - index := strings.Index(out, "\n"+repr+":") - if index == -1 { - c.Fatalf("%#v is not in the output: %#v", k, out) - } - if index < last { - c.Fatalf("%#v was generated before %#v: %q", k, order[i-1], out) - } - last = index - } -} diff --git a/internal/gopkg.in/yaml.v1/resolve.go b/internal/gopkg.in/yaml.v1/resolve.go deleted file mode 100644 index 06c698a..0000000 --- a/internal/gopkg.in/yaml.v1/resolve.go +++ /dev/null @@ -1,190 +0,0 @@ -package yaml - -import ( - "encoding/base64" - "fmt" - "math" - "strconv" - "strings" - "unicode/utf8" -) - -// TODO: merge, timestamps, base 60 floats, omap. - -type resolveMapItem struct { - value interface{} - tag string -} - -var resolveTable = make([]byte, 256) -var resolveMap = make(map[string]resolveMapItem) - -func init() { - t := resolveTable - t[int('+')] = 'S' // Sign - t[int('-')] = 'S' - for _, c := range "0123456789" { - t[int(c)] = 'D' // Digit - } - for _, c := range "yYnNtTfFoO~" { - t[int(c)] = 'M' // In map - } - t[int('.')] = '.' // Float (potentially in map) - - var resolveMapList = []struct { - v interface{} - tag string - l []string - }{ - {true, yaml_BOOL_TAG, []string{"y", "Y", "yes", "Yes", "YES"}}, - {true, yaml_BOOL_TAG, []string{"true", "True", "TRUE"}}, - {true, yaml_BOOL_TAG, []string{"on", "On", "ON"}}, - {false, yaml_BOOL_TAG, []string{"n", "N", "no", "No", "NO"}}, - {false, yaml_BOOL_TAG, []string{"false", "False", "FALSE"}}, - {false, yaml_BOOL_TAG, []string{"off", "Off", "OFF"}}, - {nil, yaml_NULL_TAG, []string{"", "~", "null", "Null", "NULL"}}, - {math.NaN(), yaml_FLOAT_TAG, []string{".nan", ".NaN", ".NAN"}}, - {math.Inf(+1), yaml_FLOAT_TAG, []string{".inf", ".Inf", ".INF"}}, - {math.Inf(+1), yaml_FLOAT_TAG, []string{"+.inf", "+.Inf", "+.INF"}}, - {math.Inf(-1), yaml_FLOAT_TAG, []string{"-.inf", "-.Inf", "-.INF"}}, - {"<<", yaml_MERGE_TAG, []string{"<<"}}, - } - - m := resolveMap - for _, item := range resolveMapList { - for _, s := range item.l { - m[s] = resolveMapItem{item.v, item.tag} - } - } -} - -const longTagPrefix = "tag:yaml.org,2002:" - -func shortTag(tag string) string { - // TODO This can easily be made faster and produce less garbage. - if strings.HasPrefix(tag, longTagPrefix) { - return "!!" + tag[len(longTagPrefix):] - } - return tag -} - -func longTag(tag string) string { - if strings.HasPrefix(tag, "!!") { - return longTagPrefix + tag[2:] - } - return tag -} - -func resolvableTag(tag string) bool { - switch tag { - case "", yaml_STR_TAG, yaml_BOOL_TAG, yaml_INT_TAG, yaml_FLOAT_TAG, yaml_NULL_TAG: - return true - } - return false -} - -func resolve(tag string, in string) (rtag string, out interface{}) { - if !resolvableTag(tag) { - return tag, in - } - - defer func() { - switch tag { - case "", rtag, yaml_STR_TAG, yaml_BINARY_TAG: - return - } - fail(fmt.Sprintf("cannot decode %s `%s` as a %s", shortTag(rtag), in, shortTag(tag))) - }() - - // Any data is accepted as a !!str or !!binary. - // Otherwise, the prefix is enough of a hint about what it might be. - hint := byte('N') - if in != "" { - hint = resolveTable[in[0]] - } - if hint != 0 && tag != yaml_STR_TAG && tag != yaml_BINARY_TAG { - // Handle things we can lookup in a map. - if item, ok := resolveMap[in]; ok { - return item.tag, item.value - } - - // Base 60 floats are a bad idea, were dropped in YAML 1.2, and - // are purposefully unsupported here. They're still quoted on - // the way out for compatibility with other parser, though. - - switch hint { - case 'M': - // We've already checked the map above. - - case '.': - // Not in the map, so maybe a normal float. - floatv, err := strconv.ParseFloat(in, 64) - if err == nil { - return yaml_FLOAT_TAG, floatv - } - - case 'D', 'S': - // Int, float, or timestamp. - plain := strings.Replace(in, "_", "", -1) - intv, err := strconv.ParseInt(plain, 0, 64) - if err == nil { - if intv == int64(int(intv)) { - return yaml_INT_TAG, int(intv) - } else { - return yaml_INT_TAG, intv - } - } - floatv, err := strconv.ParseFloat(plain, 64) - if err == nil { - return yaml_FLOAT_TAG, floatv - } - if strings.HasPrefix(plain, "0b") { - intv, err := strconv.ParseInt(plain[2:], 2, 64) - if err == nil { - return yaml_INT_TAG, int(intv) - } - } else if strings.HasPrefix(plain, "-0b") { - intv, err := strconv.ParseInt(plain[3:], 2, 64) - if err == nil { - return yaml_INT_TAG, -int(intv) - } - } - // XXX Handle timestamps here. - - default: - panic("resolveTable item not yet handled: " + string(rune(hint)) + " (with " + in + ")") - } - } - if tag == yaml_BINARY_TAG { - return yaml_BINARY_TAG, in - } - if utf8.ValidString(in) { - return yaml_STR_TAG, in - } - return yaml_BINARY_TAG, encodeBase64(in) -} - -// encodeBase64 encodes s as base64 that is broken up into multiple lines -// as appropriate for the resulting length. -func encodeBase64(s string) string { - const lineLen = 70 - encLen := base64.StdEncoding.EncodedLen(len(s)) - lines := encLen/lineLen + 1 - buf := make([]byte, encLen*2+lines) - in := buf[0:encLen] - out := buf[encLen:] - base64.StdEncoding.Encode(in, []byte(s)) - k := 0 - for i := 0; i < len(in); i += lineLen { - j := i + lineLen - if j > len(in) { - j = len(in) - } - k += copy(out[k:], in[i:j]) - if lines > 1 { - out[k] = '\n' - k++ - } - } - return string(out[:k]) -} diff --git a/internal/gopkg.in/yaml.v1/yaml.go b/internal/gopkg.in/yaml.v1/yaml.go deleted file mode 100644 index f1c390e..0000000 --- a/internal/gopkg.in/yaml.v1/yaml.go +++ /dev/null @@ -1,301 +0,0 @@ -// Package yaml implements YAML support for the Go language. -// -// Source code and other details for the project are available at GitHub: -// -// https://github.com/go-yaml/yaml -// -package yaml - -import ( - "errors" - "fmt" - "reflect" - "strings" - "sync" -) - -type yamlError string - -func fail(msg string) { - panic(yamlError(msg)) -} - -func handleErr(err *error) { - if r := recover(); r != nil { - if e, ok := r.(yamlError); ok { - *err = errors.New("YAML error: " + string(e)) - } else { - panic(r) - } - } -} - -// The Setter interface may be implemented by types to do their own custom -// unmarshalling of YAML values, rather than being implicitly assigned by -// the yaml package machinery. If setting the value works, the method should -// return true. If it returns false, the value is considered unsupported -// and is omitted from maps and slices. -type Setter interface { - SetYAML(tag string, value interface{}) bool -} - -// The Getter interface is implemented by types to do their own custom -// marshalling into a YAML tag and value. -type Getter interface { - GetYAML() (tag string, value interface{}) -} - -// Unmarshal decodes the first document found within the in byte slice -// and assigns decoded values into the out value. -// -// Maps and pointers (to a struct, string, int, etc) are accepted as out -// values. If an internal pointer within a struct is not initialized, -// the yaml package will initialize it if necessary for unmarshalling -// the provided data. The out parameter must not be nil. -// -// The type of the decoded values and the type of out will be considered, -// and Unmarshal will do the best possible job to unmarshal values -// appropriately. It is NOT considered an error, though, to skip values -// because they are not available in the decoded YAML, or if they are not -// compatible with the out value. To ensure something was properly -// unmarshaled use a map or compare against the previous value for the -// field (usually the zero value). -// -// Struct fields are only unmarshalled if they are exported (have an -// upper case first letter), and are unmarshalled using the field name -// lowercased as the default key. Custom keys may be defined via the -// "yaml" name in the field tag: the content preceding the first comma -// is used as the key, and the following comma-separated options are -// used to tweak the marshalling process (see Marshal). -// Conflicting names result in a runtime error. -// -// For example: -// -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// var t T -// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) -// -// See the documentation of Marshal for the format of tags and a list of -// supported tag options. -// -func Unmarshal(in []byte, out interface{}) (err error) { - defer handleErr(&err) - d := newDecoder() - p := newParser(in) - defer p.destroy() - node := p.parse() - if node != nil { - v := reflect.ValueOf(out) - if v.Kind() == reflect.Ptr && !v.IsNil() { - v = v.Elem() - } - d.unmarshal(node, v) - } - return nil -} - -// Marshal serializes the value provided into a YAML document. The structure -// of the generated document will reflect the structure of the value itself. -// Maps and pointers (to struct, string, int, etc) are accepted as the in value. -// -// Struct fields are only unmarshalled if they are exported (have an upper case -// first letter), and are unmarshalled using the field name lowercased as the -// default key. Custom keys may be defined via the "yaml" name in the field -// tag: the content preceding the first comma is used as the key, and the -// following comma-separated options are used to tweak the marshalling process. -// Conflicting names result in a runtime error. -// -// The field tag format accepted is: -// -// `(...) yaml:"[][,[,]]" (...)` -// -// The following flags are currently supported: -// -// omitempty Only include the field if it's not set to the zero -// value for the type or to empty slices or maps. -// Does not apply to zero valued structs. -// -// flow Marshal using a flow style (useful for structs, -// sequences and maps. -// -// inline Inline the struct it's applied to, so its fields -// are processed as if they were part of the outer -// struct. -// -// In addition, if the key is "-", the field is ignored. -// -// For example: -// -// type T struct { -// F int "a,omitempty" -// B int -// } -// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" -// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" -// -func Marshal(in interface{}) (out []byte, err error) { - defer handleErr(&err) - e := newEncoder() - defer e.destroy() - e.marshal("", reflect.ValueOf(in)) - e.finish() - out = e.out - return -} - -// -------------------------------------------------------------------------- -// Maintain a mapping of keys to structure field indexes - -// The code in this section was copied from mgo/bson. - -// structInfo holds details for the serialization of fields of -// a given struct. -type structInfo struct { - FieldsMap map[string]fieldInfo - FieldsList []fieldInfo - - // InlineMap is the number of the field in the struct that - // contains an ,inline map, or -1 if there's none. - InlineMap int -} - -type fieldInfo struct { - Key string - Num int - OmitEmpty bool - Flow bool - - // Inline holds the field index if the field is part of an inlined struct. - Inline []int -} - -var structMap = make(map[reflect.Type]*structInfo) -var fieldMapMutex sync.RWMutex - -func getStructInfo(st reflect.Type) (*structInfo, error) { - fieldMapMutex.RLock() - sinfo, found := structMap[st] - fieldMapMutex.RUnlock() - if found { - return sinfo, nil - } - - n := st.NumField() - fieldsMap := make(map[string]fieldInfo) - fieldsList := make([]fieldInfo, 0, n) - inlineMap := -1 - for i := 0; i != n; i++ { - field := st.Field(i) - if field.PkgPath != "" { - continue // Private field - } - - info := fieldInfo{Num: i} - - tag := field.Tag.Get("yaml") - if tag == "" && strings.Index(string(field.Tag), ":") < 0 { - tag = string(field.Tag) - } - if tag == "-" { - continue - } - - inline := false - fields := strings.Split(tag, ",") - if len(fields) > 1 { - for _, flag := range fields[1:] { - switch flag { - case "omitempty": - info.OmitEmpty = true - case "flow": - info.Flow = true - case "inline": - inline = true - default: - return nil, errors.New(fmt.Sprintf("Unsupported flag %q in tag %q of type %s", flag, tag, st)) - } - } - tag = fields[0] - } - - if inline { - switch field.Type.Kind() { - // TODO: Implement support for inline maps. - //case reflect.Map: - // if inlineMap >= 0 { - // return nil, errors.New("Multiple ,inline maps in struct " + st.String()) - // } - // if field.Type.Key() != reflect.TypeOf("") { - // return nil, errors.New("Option ,inline needs a map with string keys in struct " + st.String()) - // } - // inlineMap = info.Num - case reflect.Struct: - sinfo, err := getStructInfo(field.Type) - if err != nil { - return nil, err - } - for _, finfo := range sinfo.FieldsList { - if _, found := fieldsMap[finfo.Key]; found { - msg := "Duplicated key '" + finfo.Key + "' in struct " + st.String() - return nil, errors.New(msg) - } - if finfo.Inline == nil { - finfo.Inline = []int{i, finfo.Num} - } else { - finfo.Inline = append([]int{i}, finfo.Inline...) - } - fieldsMap[finfo.Key] = finfo - fieldsList = append(fieldsList, finfo) - } - default: - //return nil, errors.New("Option ,inline needs a struct value or map field") - return nil, errors.New("Option ,inline needs a struct value field") - } - continue - } - - if tag != "" { - info.Key = tag - } else { - info.Key = strings.ToLower(field.Name) - } - - if _, found = fieldsMap[info.Key]; found { - msg := "Duplicated key '" + info.Key + "' in struct " + st.String() - return nil, errors.New(msg) - } - - fieldsList = append(fieldsList, info) - fieldsMap[info.Key] = info - } - - sinfo = &structInfo{fieldsMap, fieldsList, inlineMap} - - fieldMapMutex.Lock() - structMap[st] = sinfo - fieldMapMutex.Unlock() - return sinfo, nil -} - -func isZero(v reflect.Value) bool { - switch v.Kind() { - case reflect.String: - return len(v.String()) == 0 - case reflect.Interface, reflect.Ptr: - return v.IsNil() - case reflect.Slice: - return v.Len() == 0 - case reflect.Map: - return v.Len() == 0 - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Bool: - return !v.Bool() - } - return false -} diff --git a/internal/gopkg.in/yaml.v2/LICENSE b/internal/gopkg.in/yaml.v2/LICENSE deleted file mode 100644 index a68e67f..0000000 --- a/internal/gopkg.in/yaml.v2/LICENSE +++ /dev/null @@ -1,188 +0,0 @@ - -Copyright (c) 2011-2014 - Canonical Inc. - -This software is licensed under the LGPLv3, included below. - -As a special exception to the GNU Lesser General Public License version 3 -("LGPL3"), the copyright holders of this Library give you permission to -convey to a third party a Combined Work that links statically or dynamically -to this Library without providing any Minimal Corresponding Source or -Minimal Application Code as set out in 4d or providing the installation -information set out in section 4e, provided that you comply with the other -provisions of LGPL3 and provided that you meet, for the Application the -terms and conditions of the license(s) which apply to the Application. - -Except as stated in this special exception, the provisions of LGPL3 will -continue to comply in full to this Library. If you modify this Library, you -may apply this exception to your version of this Library, but you are not -obliged to do so. If you do not wish to do so, delete this exception -statement from your version. This exception does not (and cannot) modify any -license terms which apply to the Application, with which you must still -comply. - - - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/internal/gopkg.in/yaml.v2/LICENSE.libyaml b/internal/gopkg.in/yaml.v2/LICENSE.libyaml deleted file mode 100644 index 8da58fb..0000000 --- a/internal/gopkg.in/yaml.v2/LICENSE.libyaml +++ /dev/null @@ -1,31 +0,0 @@ -The following files were ported to Go from C files of libyaml, and thus -are still covered by their original copyright and license: - - apic.go - emitterc.go - parserc.go - readerc.go - scannerc.go - writerc.go - yamlh.go - yamlprivateh.go - -Copyright (c) 2006 Kirill Simonov - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/internal/gopkg.in/yaml.v2/apic.go b/internal/gopkg.in/yaml.v2/apic.go deleted file mode 100644 index 95ec014..0000000 --- a/internal/gopkg.in/yaml.v2/apic.go +++ /dev/null @@ -1,742 +0,0 @@ -package yaml - -import ( - "io" - "os" -) - -func yaml_insert_token(parser *yaml_parser_t, pos int, token *yaml_token_t) { - //fmt.Println("yaml_insert_token", "pos:", pos, "typ:", token.typ, "head:", parser.tokens_head, "len:", len(parser.tokens)) - - // Check if we can move the queue at the beginning of the buffer. - if parser.tokens_head > 0 && len(parser.tokens) == cap(parser.tokens) { - if parser.tokens_head != len(parser.tokens) { - copy(parser.tokens, parser.tokens[parser.tokens_head:]) - } - parser.tokens = parser.tokens[:len(parser.tokens)-parser.tokens_head] - parser.tokens_head = 0 - } - parser.tokens = append(parser.tokens, *token) - if pos < 0 { - return - } - copy(parser.tokens[parser.tokens_head+pos+1:], parser.tokens[parser.tokens_head+pos:]) - parser.tokens[parser.tokens_head+pos] = *token -} - -// Create a new parser object. -func yaml_parser_initialize(parser *yaml_parser_t) bool { - *parser = yaml_parser_t{ - raw_buffer: make([]byte, 0, input_raw_buffer_size), - buffer: make([]byte, 0, input_buffer_size), - } - return true -} - -// Destroy a parser object. -func yaml_parser_delete(parser *yaml_parser_t) { - *parser = yaml_parser_t{} -} - -// String read handler. -func yaml_string_read_handler(parser *yaml_parser_t, buffer []byte) (n int, err error) { - if parser.input_pos == len(parser.input) { - return 0, io.EOF - } - n = copy(buffer, parser.input[parser.input_pos:]) - parser.input_pos += n - return n, nil -} - -// File read handler. -func yaml_file_read_handler(parser *yaml_parser_t, buffer []byte) (n int, err error) { - return parser.input_file.Read(buffer) -} - -// Set a string input. -func yaml_parser_set_input_string(parser *yaml_parser_t, input []byte) { - if parser.read_handler != nil { - panic("must set the input source only once") - } - parser.read_handler = yaml_string_read_handler - parser.input = input - parser.input_pos = 0 -} - -// Set a file input. -func yaml_parser_set_input_file(parser *yaml_parser_t, file *os.File) { - if parser.read_handler != nil { - panic("must set the input source only once") - } - parser.read_handler = yaml_file_read_handler - parser.input_file = file -} - -// Set the source encoding. -func yaml_parser_set_encoding(parser *yaml_parser_t, encoding yaml_encoding_t) { - if parser.encoding != yaml_ANY_ENCODING { - panic("must set the encoding only once") - } - parser.encoding = encoding -} - -// Create a new emitter object. -func yaml_emitter_initialize(emitter *yaml_emitter_t) bool { - *emitter = yaml_emitter_t{ - buffer: make([]byte, output_buffer_size), - raw_buffer: make([]byte, 0, output_raw_buffer_size), - states: make([]yaml_emitter_state_t, 0, initial_stack_size), - events: make([]yaml_event_t, 0, initial_queue_size), - } - return true -} - -// Destroy an emitter object. -func yaml_emitter_delete(emitter *yaml_emitter_t) { - *emitter = yaml_emitter_t{} -} - -// String write handler. -func yaml_string_write_handler(emitter *yaml_emitter_t, buffer []byte) error { - *emitter.output_buffer = append(*emitter.output_buffer, buffer...) - return nil -} - -// File write handler. -func yaml_file_write_handler(emitter *yaml_emitter_t, buffer []byte) error { - _, err := emitter.output_file.Write(buffer) - return err -} - -// Set a string output. -func yaml_emitter_set_output_string(emitter *yaml_emitter_t, output_buffer *[]byte) { - if emitter.write_handler != nil { - panic("must set the output target only once") - } - emitter.write_handler = yaml_string_write_handler - emitter.output_buffer = output_buffer -} - -// Set a file output. -func yaml_emitter_set_output_file(emitter *yaml_emitter_t, file io.Writer) { - if emitter.write_handler != nil { - panic("must set the output target only once") - } - emitter.write_handler = yaml_file_write_handler - emitter.output_file = file -} - -// Set the output encoding. -func yaml_emitter_set_encoding(emitter *yaml_emitter_t, encoding yaml_encoding_t) { - if emitter.encoding != yaml_ANY_ENCODING { - panic("must set the output encoding only once") - } - emitter.encoding = encoding -} - -// Set the canonical output style. -func yaml_emitter_set_canonical(emitter *yaml_emitter_t, canonical bool) { - emitter.canonical = canonical -} - -//// Set the indentation increment. -func yaml_emitter_set_indent(emitter *yaml_emitter_t, indent int) { - if indent < 2 || indent > 9 { - indent = 2 - } - emitter.best_indent = indent -} - -// Set the preferred line width. -func yaml_emitter_set_width(emitter *yaml_emitter_t, width int) { - if width < 0 { - width = -1 - } - emitter.best_width = width -} - -// Set if unescaped non-ASCII characters are allowed. -func yaml_emitter_set_unicode(emitter *yaml_emitter_t, unicode bool) { - emitter.unicode = unicode -} - -// Set the preferred line break character. -func yaml_emitter_set_break(emitter *yaml_emitter_t, line_break yaml_break_t) { - emitter.line_break = line_break -} - -///* -// * Destroy a token object. -// */ -// -//YAML_DECLARE(void) -//yaml_token_delete(yaml_token_t *token) -//{ -// assert(token); // Non-NULL token object expected. -// -// switch (token.type) -// { -// case YAML_TAG_DIRECTIVE_TOKEN: -// yaml_free(token.data.tag_directive.handle); -// yaml_free(token.data.tag_directive.prefix); -// break; -// -// case YAML_ALIAS_TOKEN: -// yaml_free(token.data.alias.value); -// break; -// -// case YAML_ANCHOR_TOKEN: -// yaml_free(token.data.anchor.value); -// break; -// -// case YAML_TAG_TOKEN: -// yaml_free(token.data.tag.handle); -// yaml_free(token.data.tag.suffix); -// break; -// -// case YAML_SCALAR_TOKEN: -// yaml_free(token.data.scalar.value); -// break; -// -// default: -// break; -// } -// -// memset(token, 0, sizeof(yaml_token_t)); -//} -// -///* -// * Check if a string is a valid UTF-8 sequence. -// * -// * Check 'reader.c' for more details on UTF-8 encoding. -// */ -// -//static int -//yaml_check_utf8(yaml_char_t *start, size_t length) -//{ -// yaml_char_t *end = start+length; -// yaml_char_t *pointer = start; -// -// while (pointer < end) { -// unsigned char octet; -// unsigned int width; -// unsigned int value; -// size_t k; -// -// octet = pointer[0]; -// width = (octet & 0x80) == 0x00 ? 1 : -// (octet & 0xE0) == 0xC0 ? 2 : -// (octet & 0xF0) == 0xE0 ? 3 : -// (octet & 0xF8) == 0xF0 ? 4 : 0; -// value = (octet & 0x80) == 0x00 ? octet & 0x7F : -// (octet & 0xE0) == 0xC0 ? octet & 0x1F : -// (octet & 0xF0) == 0xE0 ? octet & 0x0F : -// (octet & 0xF8) == 0xF0 ? octet & 0x07 : 0; -// if (!width) return 0; -// if (pointer+width > end) return 0; -// for (k = 1; k < width; k ++) { -// octet = pointer[k]; -// if ((octet & 0xC0) != 0x80) return 0; -// value = (value << 6) + (octet & 0x3F); -// } -// if (!((width == 1) || -// (width == 2 && value >= 0x80) || -// (width == 3 && value >= 0x800) || -// (width == 4 && value >= 0x10000))) return 0; -// -// pointer += width; -// } -// -// return 1; -//} -// - -// Create STREAM-START. -func yaml_stream_start_event_initialize(event *yaml_event_t, encoding yaml_encoding_t) bool { - *event = yaml_event_t{ - typ: yaml_STREAM_START_EVENT, - encoding: encoding, - } - return true -} - -// Create STREAM-END. -func yaml_stream_end_event_initialize(event *yaml_event_t) bool { - *event = yaml_event_t{ - typ: yaml_STREAM_END_EVENT, - } - return true -} - -// Create DOCUMENT-START. -func yaml_document_start_event_initialize(event *yaml_event_t, version_directive *yaml_version_directive_t, - tag_directives []yaml_tag_directive_t, implicit bool) bool { - *event = yaml_event_t{ - typ: yaml_DOCUMENT_START_EVENT, - version_directive: version_directive, - tag_directives: tag_directives, - implicit: implicit, - } - return true -} - -// Create DOCUMENT-END. -func yaml_document_end_event_initialize(event *yaml_event_t, implicit bool) bool { - *event = yaml_event_t{ - typ: yaml_DOCUMENT_END_EVENT, - implicit: implicit, - } - return true -} - -///* -// * Create ALIAS. -// */ -// -//YAML_DECLARE(int) -//yaml_alias_event_initialize(event *yaml_event_t, anchor *yaml_char_t) -//{ -// mark yaml_mark_t = { 0, 0, 0 } -// anchor_copy *yaml_char_t = NULL -// -// assert(event) // Non-NULL event object is expected. -// assert(anchor) // Non-NULL anchor is expected. -// -// if (!yaml_check_utf8(anchor, strlen((char *)anchor))) return 0 -// -// anchor_copy = yaml_strdup(anchor) -// if (!anchor_copy) -// return 0 -// -// ALIAS_EVENT_INIT(*event, anchor_copy, mark, mark) -// -// return 1 -//} - -// Create SCALAR. -func yaml_scalar_event_initialize(event *yaml_event_t, anchor, tag, value []byte, plain_implicit, quoted_implicit bool, style yaml_scalar_style_t) bool { - *event = yaml_event_t{ - typ: yaml_SCALAR_EVENT, - anchor: anchor, - tag: tag, - value: value, - implicit: plain_implicit, - quoted_implicit: quoted_implicit, - style: yaml_style_t(style), - } - return true -} - -// Create SEQUENCE-START. -func yaml_sequence_start_event_initialize(event *yaml_event_t, anchor, tag []byte, implicit bool, style yaml_sequence_style_t) bool { - *event = yaml_event_t{ - typ: yaml_SEQUENCE_START_EVENT, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(style), - } - return true -} - -// Create SEQUENCE-END. -func yaml_sequence_end_event_initialize(event *yaml_event_t) bool { - *event = yaml_event_t{ - typ: yaml_SEQUENCE_END_EVENT, - } - return true -} - -// Create MAPPING-START. -func yaml_mapping_start_event_initialize(event *yaml_event_t, anchor, tag []byte, implicit bool, style yaml_mapping_style_t) bool { - *event = yaml_event_t{ - typ: yaml_MAPPING_START_EVENT, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(style), - } - return true -} - -// Create MAPPING-END. -func yaml_mapping_end_event_initialize(event *yaml_event_t) bool { - *event = yaml_event_t{ - typ: yaml_MAPPING_END_EVENT, - } - return true -} - -// Destroy an event object. -func yaml_event_delete(event *yaml_event_t) { - *event = yaml_event_t{} -} - -///* -// * Create a document object. -// */ -// -//YAML_DECLARE(int) -//yaml_document_initialize(document *yaml_document_t, -// version_directive *yaml_version_directive_t, -// tag_directives_start *yaml_tag_directive_t, -// tag_directives_end *yaml_tag_directive_t, -// start_implicit int, end_implicit int) -//{ -// struct { -// error yaml_error_type_t -// } context -// struct { -// start *yaml_node_t -// end *yaml_node_t -// top *yaml_node_t -// } nodes = { NULL, NULL, NULL } -// version_directive_copy *yaml_version_directive_t = NULL -// struct { -// start *yaml_tag_directive_t -// end *yaml_tag_directive_t -// top *yaml_tag_directive_t -// } tag_directives_copy = { NULL, NULL, NULL } -// value yaml_tag_directive_t = { NULL, NULL } -// mark yaml_mark_t = { 0, 0, 0 } -// -// assert(document) // Non-NULL document object is expected. -// assert((tag_directives_start && tag_directives_end) || -// (tag_directives_start == tag_directives_end)) -// // Valid tag directives are expected. -// -// if (!STACK_INIT(&context, nodes, INITIAL_STACK_SIZE)) goto error -// -// if (version_directive) { -// version_directive_copy = yaml_malloc(sizeof(yaml_version_directive_t)) -// if (!version_directive_copy) goto error -// version_directive_copy.major = version_directive.major -// version_directive_copy.minor = version_directive.minor -// } -// -// if (tag_directives_start != tag_directives_end) { -// tag_directive *yaml_tag_directive_t -// if (!STACK_INIT(&context, tag_directives_copy, INITIAL_STACK_SIZE)) -// goto error -// for (tag_directive = tag_directives_start -// tag_directive != tag_directives_end; tag_directive ++) { -// assert(tag_directive.handle) -// assert(tag_directive.prefix) -// if (!yaml_check_utf8(tag_directive.handle, -// strlen((char *)tag_directive.handle))) -// goto error -// if (!yaml_check_utf8(tag_directive.prefix, -// strlen((char *)tag_directive.prefix))) -// goto error -// value.handle = yaml_strdup(tag_directive.handle) -// value.prefix = yaml_strdup(tag_directive.prefix) -// if (!value.handle || !value.prefix) goto error -// if (!PUSH(&context, tag_directives_copy, value)) -// goto error -// value.handle = NULL -// value.prefix = NULL -// } -// } -// -// DOCUMENT_INIT(*document, nodes.start, nodes.end, version_directive_copy, -// tag_directives_copy.start, tag_directives_copy.top, -// start_implicit, end_implicit, mark, mark) -// -// return 1 -// -//error: -// STACK_DEL(&context, nodes) -// yaml_free(version_directive_copy) -// while (!STACK_EMPTY(&context, tag_directives_copy)) { -// value yaml_tag_directive_t = POP(&context, tag_directives_copy) -// yaml_free(value.handle) -// yaml_free(value.prefix) -// } -// STACK_DEL(&context, tag_directives_copy) -// yaml_free(value.handle) -// yaml_free(value.prefix) -// -// return 0 -//} -// -///* -// * Destroy a document object. -// */ -// -//YAML_DECLARE(void) -//yaml_document_delete(document *yaml_document_t) -//{ -// struct { -// error yaml_error_type_t -// } context -// tag_directive *yaml_tag_directive_t -// -// context.error = YAML_NO_ERROR // Eliminate a compliler warning. -// -// assert(document) // Non-NULL document object is expected. -// -// while (!STACK_EMPTY(&context, document.nodes)) { -// node yaml_node_t = POP(&context, document.nodes) -// yaml_free(node.tag) -// switch (node.type) { -// case YAML_SCALAR_NODE: -// yaml_free(node.data.scalar.value) -// break -// case YAML_SEQUENCE_NODE: -// STACK_DEL(&context, node.data.sequence.items) -// break -// case YAML_MAPPING_NODE: -// STACK_DEL(&context, node.data.mapping.pairs) -// break -// default: -// assert(0) // Should not happen. -// } -// } -// STACK_DEL(&context, document.nodes) -// -// yaml_free(document.version_directive) -// for (tag_directive = document.tag_directives.start -// tag_directive != document.tag_directives.end -// tag_directive++) { -// yaml_free(tag_directive.handle) -// yaml_free(tag_directive.prefix) -// } -// yaml_free(document.tag_directives.start) -// -// memset(document, 0, sizeof(yaml_document_t)) -//} -// -///** -// * Get a document node. -// */ -// -//YAML_DECLARE(yaml_node_t *) -//yaml_document_get_node(document *yaml_document_t, index int) -//{ -// assert(document) // Non-NULL document object is expected. -// -// if (index > 0 && document.nodes.start + index <= document.nodes.top) { -// return document.nodes.start + index - 1 -// } -// return NULL -//} -// -///** -// * Get the root object. -// */ -// -//YAML_DECLARE(yaml_node_t *) -//yaml_document_get_root_node(document *yaml_document_t) -//{ -// assert(document) // Non-NULL document object is expected. -// -// if (document.nodes.top != document.nodes.start) { -// return document.nodes.start -// } -// return NULL -//} -// -///* -// * Add a scalar node to a document. -// */ -// -//YAML_DECLARE(int) -//yaml_document_add_scalar(document *yaml_document_t, -// tag *yaml_char_t, value *yaml_char_t, length int, -// style yaml_scalar_style_t) -//{ -// struct { -// error yaml_error_type_t -// } context -// mark yaml_mark_t = { 0, 0, 0 } -// tag_copy *yaml_char_t = NULL -// value_copy *yaml_char_t = NULL -// node yaml_node_t -// -// assert(document) // Non-NULL document object is expected. -// assert(value) // Non-NULL value is expected. -// -// if (!tag) { -// tag = (yaml_char_t *)YAML_DEFAULT_SCALAR_TAG -// } -// -// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error -// tag_copy = yaml_strdup(tag) -// if (!tag_copy) goto error -// -// if (length < 0) { -// length = strlen((char *)value) -// } -// -// if (!yaml_check_utf8(value, length)) goto error -// value_copy = yaml_malloc(length+1) -// if (!value_copy) goto error -// memcpy(value_copy, value, length) -// value_copy[length] = '\0' -// -// SCALAR_NODE_INIT(node, tag_copy, value_copy, length, style, mark, mark) -// if (!PUSH(&context, document.nodes, node)) goto error -// -// return document.nodes.top - document.nodes.start -// -//error: -// yaml_free(tag_copy) -// yaml_free(value_copy) -// -// return 0 -//} -// -///* -// * Add a sequence node to a document. -// */ -// -//YAML_DECLARE(int) -//yaml_document_add_sequence(document *yaml_document_t, -// tag *yaml_char_t, style yaml_sequence_style_t) -//{ -// struct { -// error yaml_error_type_t -// } context -// mark yaml_mark_t = { 0, 0, 0 } -// tag_copy *yaml_char_t = NULL -// struct { -// start *yaml_node_item_t -// end *yaml_node_item_t -// top *yaml_node_item_t -// } items = { NULL, NULL, NULL } -// node yaml_node_t -// -// assert(document) // Non-NULL document object is expected. -// -// if (!tag) { -// tag = (yaml_char_t *)YAML_DEFAULT_SEQUENCE_TAG -// } -// -// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error -// tag_copy = yaml_strdup(tag) -// if (!tag_copy) goto error -// -// if (!STACK_INIT(&context, items, INITIAL_STACK_SIZE)) goto error -// -// SEQUENCE_NODE_INIT(node, tag_copy, items.start, items.end, -// style, mark, mark) -// if (!PUSH(&context, document.nodes, node)) goto error -// -// return document.nodes.top - document.nodes.start -// -//error: -// STACK_DEL(&context, items) -// yaml_free(tag_copy) -// -// return 0 -//} -// -///* -// * Add a mapping node to a document. -// */ -// -//YAML_DECLARE(int) -//yaml_document_add_mapping(document *yaml_document_t, -// tag *yaml_char_t, style yaml_mapping_style_t) -//{ -// struct { -// error yaml_error_type_t -// } context -// mark yaml_mark_t = { 0, 0, 0 } -// tag_copy *yaml_char_t = NULL -// struct { -// start *yaml_node_pair_t -// end *yaml_node_pair_t -// top *yaml_node_pair_t -// } pairs = { NULL, NULL, NULL } -// node yaml_node_t -// -// assert(document) // Non-NULL document object is expected. -// -// if (!tag) { -// tag = (yaml_char_t *)YAML_DEFAULT_MAPPING_TAG -// } -// -// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error -// tag_copy = yaml_strdup(tag) -// if (!tag_copy) goto error -// -// if (!STACK_INIT(&context, pairs, INITIAL_STACK_SIZE)) goto error -// -// MAPPING_NODE_INIT(node, tag_copy, pairs.start, pairs.end, -// style, mark, mark) -// if (!PUSH(&context, document.nodes, node)) goto error -// -// return document.nodes.top - document.nodes.start -// -//error: -// STACK_DEL(&context, pairs) -// yaml_free(tag_copy) -// -// return 0 -//} -// -///* -// * Append an item to a sequence node. -// */ -// -//YAML_DECLARE(int) -//yaml_document_append_sequence_item(document *yaml_document_t, -// sequence int, item int) -//{ -// struct { -// error yaml_error_type_t -// } context -// -// assert(document) // Non-NULL document is required. -// assert(sequence > 0 -// && document.nodes.start + sequence <= document.nodes.top) -// // Valid sequence id is required. -// assert(document.nodes.start[sequence-1].type == YAML_SEQUENCE_NODE) -// // A sequence node is required. -// assert(item > 0 && document.nodes.start + item <= document.nodes.top) -// // Valid item id is required. -// -// if (!PUSH(&context, -// document.nodes.start[sequence-1].data.sequence.items, item)) -// return 0 -// -// return 1 -//} -// -///* -// * Append a pair of a key and a value to a mapping node. -// */ -// -//YAML_DECLARE(int) -//yaml_document_append_mapping_pair(document *yaml_document_t, -// mapping int, key int, value int) -//{ -// struct { -// error yaml_error_type_t -// } context -// -// pair yaml_node_pair_t -// -// assert(document) // Non-NULL document is required. -// assert(mapping > 0 -// && document.nodes.start + mapping <= document.nodes.top) -// // Valid mapping id is required. -// assert(document.nodes.start[mapping-1].type == YAML_MAPPING_NODE) -// // A mapping node is required. -// assert(key > 0 && document.nodes.start + key <= document.nodes.top) -// // Valid key id is required. -// assert(value > 0 && document.nodes.start + value <= document.nodes.top) -// // Valid value id is required. -// -// pair.key = key -// pair.value = value -// -// if (!PUSH(&context, -// document.nodes.start[mapping-1].data.mapping.pairs, pair)) -// return 0 -// -// return 1 -//} -// -// diff --git a/internal/gopkg.in/yaml.v2/emitterc.go b/internal/gopkg.in/yaml.v2/emitterc.go deleted file mode 100644 index 9b3dc4a..0000000 --- a/internal/gopkg.in/yaml.v2/emitterc.go +++ /dev/null @@ -1,1685 +0,0 @@ -package yaml - -import ( - "bytes" -) - -// Flush the buffer if needed. -func flush(emitter *yaml_emitter_t) bool { - if emitter.buffer_pos+5 >= len(emitter.buffer) { - return yaml_emitter_flush(emitter) - } - return true -} - -// Put a character to the output buffer. -func put(emitter *yaml_emitter_t, value byte) bool { - if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { - return false - } - emitter.buffer[emitter.buffer_pos] = value - emitter.buffer_pos++ - emitter.column++ - return true -} - -// Put a line break to the output buffer. -func put_break(emitter *yaml_emitter_t) bool { - if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { - return false - } - switch emitter.line_break { - case yaml_CR_BREAK: - emitter.buffer[emitter.buffer_pos] = '\r' - emitter.buffer_pos += 1 - case yaml_LN_BREAK: - emitter.buffer[emitter.buffer_pos] = '\n' - emitter.buffer_pos += 1 - case yaml_CRLN_BREAK: - emitter.buffer[emitter.buffer_pos+0] = '\r' - emitter.buffer[emitter.buffer_pos+1] = '\n' - emitter.buffer_pos += 2 - default: - panic("unknown line break setting") - } - emitter.column = 0 - emitter.line++ - return true -} - -// Copy a character from a string into buffer. -func write(emitter *yaml_emitter_t, s []byte, i *int) bool { - if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { - return false - } - p := emitter.buffer_pos - w := width(s[*i]) - switch w { - case 4: - emitter.buffer[p+3] = s[*i+3] - fallthrough - case 3: - emitter.buffer[p+2] = s[*i+2] - fallthrough - case 2: - emitter.buffer[p+1] = s[*i+1] - fallthrough - case 1: - emitter.buffer[p+0] = s[*i+0] - default: - panic("unknown character width") - } - emitter.column++ - emitter.buffer_pos += w - *i += w - return true -} - -// Write a whole string into buffer. -func write_all(emitter *yaml_emitter_t, s []byte) bool { - for i := 0; i < len(s); { - if !write(emitter, s, &i) { - return false - } - } - return true -} - -// Copy a line break character from a string into buffer. -func write_break(emitter *yaml_emitter_t, s []byte, i *int) bool { - if s[*i] == '\n' { - if !put_break(emitter) { - return false - } - *i++ - } else { - if !write(emitter, s, i) { - return false - } - emitter.column = 0 - emitter.line++ - } - return true -} - -// Set an emitter error and return false. -func yaml_emitter_set_emitter_error(emitter *yaml_emitter_t, problem string) bool { - emitter.error = yaml_EMITTER_ERROR - emitter.problem = problem - return false -} - -// Emit an event. -func yaml_emitter_emit(emitter *yaml_emitter_t, event *yaml_event_t) bool { - emitter.events = append(emitter.events, *event) - for !yaml_emitter_need_more_events(emitter) { - event := &emitter.events[emitter.events_head] - if !yaml_emitter_analyze_event(emitter, event) { - return false - } - if !yaml_emitter_state_machine(emitter, event) { - return false - } - yaml_event_delete(event) - emitter.events_head++ - } - return true -} - -// Check if we need to accumulate more events before emitting. -// -// We accumulate extra -// - 1 event for DOCUMENT-START -// - 2 events for SEQUENCE-START -// - 3 events for MAPPING-START -// -func yaml_emitter_need_more_events(emitter *yaml_emitter_t) bool { - if emitter.events_head == len(emitter.events) { - return true - } - var accumulate int - switch emitter.events[emitter.events_head].typ { - case yaml_DOCUMENT_START_EVENT: - accumulate = 1 - break - case yaml_SEQUENCE_START_EVENT: - accumulate = 2 - break - case yaml_MAPPING_START_EVENT: - accumulate = 3 - break - default: - return false - } - if len(emitter.events)-emitter.events_head > accumulate { - return false - } - var level int - for i := emitter.events_head; i < len(emitter.events); i++ { - switch emitter.events[i].typ { - case yaml_STREAM_START_EVENT, yaml_DOCUMENT_START_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT: - level++ - case yaml_STREAM_END_EVENT, yaml_DOCUMENT_END_EVENT, yaml_SEQUENCE_END_EVENT, yaml_MAPPING_END_EVENT: - level-- - } - if level == 0 { - return false - } - } - return true -} - -// Append a directive to the directives stack. -func yaml_emitter_append_tag_directive(emitter *yaml_emitter_t, value *yaml_tag_directive_t, allow_duplicates bool) bool { - for i := 0; i < len(emitter.tag_directives); i++ { - if bytes.Equal(value.handle, emitter.tag_directives[i].handle) { - if allow_duplicates { - return true - } - return yaml_emitter_set_emitter_error(emitter, "duplicate %TAG directive") - } - } - - // [Go] Do we actually need to copy this given garbage collection - // and the lack of deallocating destructors? - tag_copy := yaml_tag_directive_t{ - handle: make([]byte, len(value.handle)), - prefix: make([]byte, len(value.prefix)), - } - copy(tag_copy.handle, value.handle) - copy(tag_copy.prefix, value.prefix) - emitter.tag_directives = append(emitter.tag_directives, tag_copy) - return true -} - -// Increase the indentation level. -func yaml_emitter_increase_indent(emitter *yaml_emitter_t, flow, indentless bool) bool { - emitter.indents = append(emitter.indents, emitter.indent) - if emitter.indent < 0 { - if flow { - emitter.indent = emitter.best_indent - } else { - emitter.indent = 0 - } - } else if !indentless { - emitter.indent += emitter.best_indent - } - return true -} - -// State dispatcher. -func yaml_emitter_state_machine(emitter *yaml_emitter_t, event *yaml_event_t) bool { - switch emitter.state { - default: - case yaml_EMIT_STREAM_START_STATE: - return yaml_emitter_emit_stream_start(emitter, event) - - case yaml_EMIT_FIRST_DOCUMENT_START_STATE: - return yaml_emitter_emit_document_start(emitter, event, true) - - case yaml_EMIT_DOCUMENT_START_STATE: - return yaml_emitter_emit_document_start(emitter, event, false) - - case yaml_EMIT_DOCUMENT_CONTENT_STATE: - return yaml_emitter_emit_document_content(emitter, event) - - case yaml_EMIT_DOCUMENT_END_STATE: - return yaml_emitter_emit_document_end(emitter, event) - - case yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE: - return yaml_emitter_emit_flow_sequence_item(emitter, event, true) - - case yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE: - return yaml_emitter_emit_flow_sequence_item(emitter, event, false) - - case yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE: - return yaml_emitter_emit_flow_mapping_key(emitter, event, true) - - case yaml_EMIT_FLOW_MAPPING_KEY_STATE: - return yaml_emitter_emit_flow_mapping_key(emitter, event, false) - - case yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE: - return yaml_emitter_emit_flow_mapping_value(emitter, event, true) - - case yaml_EMIT_FLOW_MAPPING_VALUE_STATE: - return yaml_emitter_emit_flow_mapping_value(emitter, event, false) - - case yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE: - return yaml_emitter_emit_block_sequence_item(emitter, event, true) - - case yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE: - return yaml_emitter_emit_block_sequence_item(emitter, event, false) - - case yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE: - return yaml_emitter_emit_block_mapping_key(emitter, event, true) - - case yaml_EMIT_BLOCK_MAPPING_KEY_STATE: - return yaml_emitter_emit_block_mapping_key(emitter, event, false) - - case yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE: - return yaml_emitter_emit_block_mapping_value(emitter, event, true) - - case yaml_EMIT_BLOCK_MAPPING_VALUE_STATE: - return yaml_emitter_emit_block_mapping_value(emitter, event, false) - - case yaml_EMIT_END_STATE: - return yaml_emitter_set_emitter_error(emitter, "expected nothing after STREAM-END") - } - panic("invalid emitter state") -} - -// Expect STREAM-START. -func yaml_emitter_emit_stream_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if event.typ != yaml_STREAM_START_EVENT { - return yaml_emitter_set_emitter_error(emitter, "expected STREAM-START") - } - if emitter.encoding == yaml_ANY_ENCODING { - emitter.encoding = event.encoding - if emitter.encoding == yaml_ANY_ENCODING { - emitter.encoding = yaml_UTF8_ENCODING - } - } - if emitter.best_indent < 2 || emitter.best_indent > 9 { - emitter.best_indent = 2 - } - if emitter.best_width >= 0 && emitter.best_width <= emitter.best_indent*2 { - emitter.best_width = 80 - } - if emitter.best_width < 0 { - emitter.best_width = 1<<31 - 1 - } - if emitter.line_break == yaml_ANY_BREAK { - emitter.line_break = yaml_LN_BREAK - } - - emitter.indent = -1 - emitter.line = 0 - emitter.column = 0 - emitter.whitespace = true - emitter.indention = true - - if emitter.encoding != yaml_UTF8_ENCODING { - if !yaml_emitter_write_bom(emitter) { - return false - } - } - emitter.state = yaml_EMIT_FIRST_DOCUMENT_START_STATE - return true -} - -// Expect DOCUMENT-START or STREAM-END. -func yaml_emitter_emit_document_start(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { - - if event.typ == yaml_DOCUMENT_START_EVENT { - - if event.version_directive != nil { - if !yaml_emitter_analyze_version_directive(emitter, event.version_directive) { - return false - } - } - - for i := 0; i < len(event.tag_directives); i++ { - tag_directive := &event.tag_directives[i] - if !yaml_emitter_analyze_tag_directive(emitter, tag_directive) { - return false - } - if !yaml_emitter_append_tag_directive(emitter, tag_directive, false) { - return false - } - } - - for i := 0; i < len(default_tag_directives); i++ { - tag_directive := &default_tag_directives[i] - if !yaml_emitter_append_tag_directive(emitter, tag_directive, true) { - return false - } - } - - implicit := event.implicit - if !first || emitter.canonical { - implicit = false - } - - if emitter.open_ended && (event.version_directive != nil || len(event.tag_directives) > 0) { - if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - - if event.version_directive != nil { - implicit = false - if !yaml_emitter_write_indicator(emitter, []byte("%YAML"), true, false, false) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte("1.1"), true, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - - if len(event.tag_directives) > 0 { - implicit = false - for i := 0; i < len(event.tag_directives); i++ { - tag_directive := &event.tag_directives[i] - if !yaml_emitter_write_indicator(emitter, []byte("%TAG"), true, false, false) { - return false - } - if !yaml_emitter_write_tag_handle(emitter, tag_directive.handle) { - return false - } - if !yaml_emitter_write_tag_content(emitter, tag_directive.prefix, true) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - } - - if yaml_emitter_check_empty_document(emitter) { - implicit = false - } - if !implicit { - if !yaml_emitter_write_indent(emitter) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte("---"), true, false, false) { - return false - } - if emitter.canonical { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - } - - emitter.state = yaml_EMIT_DOCUMENT_CONTENT_STATE - return true - } - - if event.typ == yaml_STREAM_END_EVENT { - if emitter.open_ended { - if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_flush(emitter) { - return false - } - emitter.state = yaml_EMIT_END_STATE - return true - } - - return yaml_emitter_set_emitter_error(emitter, "expected DOCUMENT-START or STREAM-END") -} - -// Expect the root node. -func yaml_emitter_emit_document_content(emitter *yaml_emitter_t, event *yaml_event_t) bool { - emitter.states = append(emitter.states, yaml_EMIT_DOCUMENT_END_STATE) - return yaml_emitter_emit_node(emitter, event, true, false, false, false) -} - -// Expect DOCUMENT-END. -func yaml_emitter_emit_document_end(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if event.typ != yaml_DOCUMENT_END_EVENT { - return yaml_emitter_set_emitter_error(emitter, "expected DOCUMENT-END") - } - if !yaml_emitter_write_indent(emitter) { - return false - } - if !event.implicit { - // [Go] Allocate the slice elsewhere. - if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_flush(emitter) { - return false - } - emitter.state = yaml_EMIT_DOCUMENT_START_STATE - emitter.tag_directives = emitter.tag_directives[:0] - return true -} - -// Expect a flow item node. -func yaml_emitter_emit_flow_sequence_item(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { - if first { - if !yaml_emitter_write_indicator(emitter, []byte{'['}, true, true, false) { - return false - } - if !yaml_emitter_increase_indent(emitter, true, false) { - return false - } - emitter.flow_level++ - } - - if event.typ == yaml_SEQUENCE_END_EVENT { - emitter.flow_level-- - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - if emitter.canonical && !first { - if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{']'}, false, false, false) { - return false - } - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - - return true - } - - if !first { - if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { - return false - } - } - - if emitter.canonical || emitter.column > emitter.best_width { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - emitter.states = append(emitter.states, yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE) - return yaml_emitter_emit_node(emitter, event, false, true, false, false) -} - -// Expect a flow key node. -func yaml_emitter_emit_flow_mapping_key(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { - if first { - if !yaml_emitter_write_indicator(emitter, []byte{'{'}, true, true, false) { - return false - } - if !yaml_emitter_increase_indent(emitter, true, false) { - return false - } - emitter.flow_level++ - } - - if event.typ == yaml_MAPPING_END_EVENT { - emitter.flow_level-- - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - if emitter.canonical && !first { - if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{'}'}, false, false, false) { - return false - } - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true - } - - if !first { - if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { - return false - } - } - if emitter.canonical || emitter.column > emitter.best_width { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - - if !emitter.canonical && yaml_emitter_check_simple_key(emitter) { - emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, true) - } - if !yaml_emitter_write_indicator(emitter, []byte{'?'}, true, false, false) { - return false - } - emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_VALUE_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, false) -} - -// Expect a flow value node. -func yaml_emitter_emit_flow_mapping_value(emitter *yaml_emitter_t, event *yaml_event_t, simple bool) bool { - if simple { - if !yaml_emitter_write_indicator(emitter, []byte{':'}, false, false, false) { - return false - } - } else { - if emitter.canonical || emitter.column > emitter.best_width { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{':'}, true, false, false) { - return false - } - } - emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_KEY_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, false) -} - -// Expect a block item node. -func yaml_emitter_emit_block_sequence_item(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { - if first { - if !yaml_emitter_increase_indent(emitter, false, emitter.mapping_context && !emitter.indention) { - return false - } - } - if event.typ == yaml_SEQUENCE_END_EVENT { - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true - } - if !yaml_emitter_write_indent(emitter) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte{'-'}, true, false, true) { - return false - } - emitter.states = append(emitter.states, yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE) - return yaml_emitter_emit_node(emitter, event, false, true, false, false) -} - -// Expect a block key node. -func yaml_emitter_emit_block_mapping_key(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { - if first { - if !yaml_emitter_increase_indent(emitter, false, false) { - return false - } - } - if event.typ == yaml_MAPPING_END_EVENT { - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true - } - if !yaml_emitter_write_indent(emitter) { - return false - } - if yaml_emitter_check_simple_key(emitter) { - emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, true) - } - if !yaml_emitter_write_indicator(emitter, []byte{'?'}, true, false, true) { - return false - } - emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_VALUE_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, false) -} - -// Expect a block value node. -func yaml_emitter_emit_block_mapping_value(emitter *yaml_emitter_t, event *yaml_event_t, simple bool) bool { - if simple { - if !yaml_emitter_write_indicator(emitter, []byte{':'}, false, false, false) { - return false - } - } else { - if !yaml_emitter_write_indent(emitter) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte{':'}, true, false, true) { - return false - } - } - emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_KEY_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, false) -} - -// Expect a node. -func yaml_emitter_emit_node(emitter *yaml_emitter_t, event *yaml_event_t, - root bool, sequence bool, mapping bool, simple_key bool) bool { - - emitter.root_context = root - emitter.sequence_context = sequence - emitter.mapping_context = mapping - emitter.simple_key_context = simple_key - - switch event.typ { - case yaml_ALIAS_EVENT: - return yaml_emitter_emit_alias(emitter, event) - case yaml_SCALAR_EVENT: - return yaml_emitter_emit_scalar(emitter, event) - case yaml_SEQUENCE_START_EVENT: - return yaml_emitter_emit_sequence_start(emitter, event) - case yaml_MAPPING_START_EVENT: - return yaml_emitter_emit_mapping_start(emitter, event) - default: - return yaml_emitter_set_emitter_error(emitter, - "expected SCALAR, SEQUENCE-START, MAPPING-START, or ALIAS") - } - return false -} - -// Expect ALIAS. -func yaml_emitter_emit_alias(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if !yaml_emitter_process_anchor(emitter) { - return false - } - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true -} - -// Expect SCALAR. -func yaml_emitter_emit_scalar(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if !yaml_emitter_select_scalar_style(emitter, event) { - return false - } - if !yaml_emitter_process_anchor(emitter) { - return false - } - if !yaml_emitter_process_tag(emitter) { - return false - } - if !yaml_emitter_increase_indent(emitter, true, false) { - return false - } - if !yaml_emitter_process_scalar(emitter) { - return false - } - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true -} - -// Expect SEQUENCE-START. -func yaml_emitter_emit_sequence_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if !yaml_emitter_process_anchor(emitter) { - return false - } - if !yaml_emitter_process_tag(emitter) { - return false - } - if emitter.flow_level > 0 || emitter.canonical || event.sequence_style() == yaml_FLOW_SEQUENCE_STYLE || - yaml_emitter_check_empty_sequence(emitter) { - emitter.state = yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE - } else { - emitter.state = yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE - } - return true -} - -// Expect MAPPING-START. -func yaml_emitter_emit_mapping_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if !yaml_emitter_process_anchor(emitter) { - return false - } - if !yaml_emitter_process_tag(emitter) { - return false - } - if emitter.flow_level > 0 || emitter.canonical || event.mapping_style() == yaml_FLOW_MAPPING_STYLE || - yaml_emitter_check_empty_mapping(emitter) { - emitter.state = yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE - } else { - emitter.state = yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE - } - return true -} - -// Check if the document content is an empty scalar. -func yaml_emitter_check_empty_document(emitter *yaml_emitter_t) bool { - return false // [Go] Huh? -} - -// Check if the next events represent an empty sequence. -func yaml_emitter_check_empty_sequence(emitter *yaml_emitter_t) bool { - if len(emitter.events)-emitter.events_head < 2 { - return false - } - return emitter.events[emitter.events_head].typ == yaml_SEQUENCE_START_EVENT && - emitter.events[emitter.events_head+1].typ == yaml_SEQUENCE_END_EVENT -} - -// Check if the next events represent an empty mapping. -func yaml_emitter_check_empty_mapping(emitter *yaml_emitter_t) bool { - if len(emitter.events)-emitter.events_head < 2 { - return false - } - return emitter.events[emitter.events_head].typ == yaml_MAPPING_START_EVENT && - emitter.events[emitter.events_head+1].typ == yaml_MAPPING_END_EVENT -} - -// Check if the next node can be expressed as a simple key. -func yaml_emitter_check_simple_key(emitter *yaml_emitter_t) bool { - length := 0 - switch emitter.events[emitter.events_head].typ { - case yaml_ALIAS_EVENT: - length += len(emitter.anchor_data.anchor) - case yaml_SCALAR_EVENT: - if emitter.scalar_data.multiline { - return false - } - length += len(emitter.anchor_data.anchor) + - len(emitter.tag_data.handle) + - len(emitter.tag_data.suffix) + - len(emitter.scalar_data.value) - case yaml_SEQUENCE_START_EVENT: - if !yaml_emitter_check_empty_sequence(emitter) { - return false - } - length += len(emitter.anchor_data.anchor) + - len(emitter.tag_data.handle) + - len(emitter.tag_data.suffix) - case yaml_MAPPING_START_EVENT: - if !yaml_emitter_check_empty_mapping(emitter) { - return false - } - length += len(emitter.anchor_data.anchor) + - len(emitter.tag_data.handle) + - len(emitter.tag_data.suffix) - default: - return false - } - return length <= 128 -} - -// Determine an acceptable scalar style. -func yaml_emitter_select_scalar_style(emitter *yaml_emitter_t, event *yaml_event_t) bool { - - no_tag := len(emitter.tag_data.handle) == 0 && len(emitter.tag_data.suffix) == 0 - if no_tag && !event.implicit && !event.quoted_implicit { - return yaml_emitter_set_emitter_error(emitter, "neither tag nor implicit flags are specified") - } - - style := event.scalar_style() - if style == yaml_ANY_SCALAR_STYLE { - style = yaml_PLAIN_SCALAR_STYLE - } - if emitter.canonical { - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - if emitter.simple_key_context && emitter.scalar_data.multiline { - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - - if style == yaml_PLAIN_SCALAR_STYLE { - if emitter.flow_level > 0 && !emitter.scalar_data.flow_plain_allowed || - emitter.flow_level == 0 && !emitter.scalar_data.block_plain_allowed { - style = yaml_SINGLE_QUOTED_SCALAR_STYLE - } - if len(emitter.scalar_data.value) == 0 && (emitter.flow_level > 0 || emitter.simple_key_context) { - style = yaml_SINGLE_QUOTED_SCALAR_STYLE - } - if no_tag && !event.implicit { - style = yaml_SINGLE_QUOTED_SCALAR_STYLE - } - } - if style == yaml_SINGLE_QUOTED_SCALAR_STYLE { - if !emitter.scalar_data.single_quoted_allowed { - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - } - if style == yaml_LITERAL_SCALAR_STYLE || style == yaml_FOLDED_SCALAR_STYLE { - if !emitter.scalar_data.block_allowed || emitter.flow_level > 0 || emitter.simple_key_context { - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - } - - if no_tag && !event.quoted_implicit && style != yaml_PLAIN_SCALAR_STYLE { - emitter.tag_data.handle = []byte{'!'} - } - emitter.scalar_data.style = style - return true -} - -// Write an achor. -func yaml_emitter_process_anchor(emitter *yaml_emitter_t) bool { - if emitter.anchor_data.anchor == nil { - return true - } - c := []byte{'&'} - if emitter.anchor_data.alias { - c[0] = '*' - } - if !yaml_emitter_write_indicator(emitter, c, true, false, false) { - return false - } - return yaml_emitter_write_anchor(emitter, emitter.anchor_data.anchor) -} - -// Write a tag. -func yaml_emitter_process_tag(emitter *yaml_emitter_t) bool { - if len(emitter.tag_data.handle) == 0 && len(emitter.tag_data.suffix) == 0 { - return true - } - if len(emitter.tag_data.handle) > 0 { - if !yaml_emitter_write_tag_handle(emitter, emitter.tag_data.handle) { - return false - } - if len(emitter.tag_data.suffix) > 0 { - if !yaml_emitter_write_tag_content(emitter, emitter.tag_data.suffix, false) { - return false - } - } - } else { - // [Go] Allocate these slices elsewhere. - if !yaml_emitter_write_indicator(emitter, []byte("!<"), true, false, false) { - return false - } - if !yaml_emitter_write_tag_content(emitter, emitter.tag_data.suffix, false) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte{'>'}, false, false, false) { - return false - } - } - return true -} - -// Write a scalar. -func yaml_emitter_process_scalar(emitter *yaml_emitter_t) bool { - switch emitter.scalar_data.style { - case yaml_PLAIN_SCALAR_STYLE: - return yaml_emitter_write_plain_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) - - case yaml_SINGLE_QUOTED_SCALAR_STYLE: - return yaml_emitter_write_single_quoted_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) - - case yaml_DOUBLE_QUOTED_SCALAR_STYLE: - return yaml_emitter_write_double_quoted_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) - - case yaml_LITERAL_SCALAR_STYLE: - return yaml_emitter_write_literal_scalar(emitter, emitter.scalar_data.value) - - case yaml_FOLDED_SCALAR_STYLE: - return yaml_emitter_write_folded_scalar(emitter, emitter.scalar_data.value) - } - panic("unknown scalar style") -} - -// Check if a %YAML directive is valid. -func yaml_emitter_analyze_version_directive(emitter *yaml_emitter_t, version_directive *yaml_version_directive_t) bool { - if version_directive.major != 1 || version_directive.minor != 1 { - return yaml_emitter_set_emitter_error(emitter, "incompatible %YAML directive") - } - return true -} - -// Check if a %TAG directive is valid. -func yaml_emitter_analyze_tag_directive(emitter *yaml_emitter_t, tag_directive *yaml_tag_directive_t) bool { - handle := tag_directive.handle - prefix := tag_directive.prefix - if len(handle) == 0 { - return yaml_emitter_set_emitter_error(emitter, "tag handle must not be empty") - } - if handle[0] != '!' { - return yaml_emitter_set_emitter_error(emitter, "tag handle must start with '!'") - } - if handle[len(handle)-1] != '!' { - return yaml_emitter_set_emitter_error(emitter, "tag handle must end with '!'") - } - for i := 1; i < len(handle)-1; i += width(handle[i]) { - if !is_alpha(handle, i) { - return yaml_emitter_set_emitter_error(emitter, "tag handle must contain alphanumerical characters only") - } - } - if len(prefix) == 0 { - return yaml_emitter_set_emitter_error(emitter, "tag prefix must not be empty") - } - return true -} - -// Check if an anchor is valid. -func yaml_emitter_analyze_anchor(emitter *yaml_emitter_t, anchor []byte, alias bool) bool { - if len(anchor) == 0 { - problem := "anchor value must not be empty" - if alias { - problem = "alias value must not be empty" - } - return yaml_emitter_set_emitter_error(emitter, problem) - } - for i := 0; i < len(anchor); i += width(anchor[i]) { - if !is_alpha(anchor, i) { - problem := "anchor value must contain alphanumerical characters only" - if alias { - problem = "alias value must contain alphanumerical characters only" - } - return yaml_emitter_set_emitter_error(emitter, problem) - } - } - emitter.anchor_data.anchor = anchor - emitter.anchor_data.alias = alias - return true -} - -// Check if a tag is valid. -func yaml_emitter_analyze_tag(emitter *yaml_emitter_t, tag []byte) bool { - if len(tag) == 0 { - return yaml_emitter_set_emitter_error(emitter, "tag value must not be empty") - } - for i := 0; i < len(emitter.tag_directives); i++ { - tag_directive := &emitter.tag_directives[i] - if bytes.HasPrefix(tag, tag_directive.prefix) { - emitter.tag_data.handle = tag_directive.handle - emitter.tag_data.suffix = tag[len(tag_directive.prefix):] - return true - } - } - emitter.tag_data.suffix = tag - return true -} - -// Check if a scalar is valid. -func yaml_emitter_analyze_scalar(emitter *yaml_emitter_t, value []byte) bool { - var ( - block_indicators = false - flow_indicators = false - line_breaks = false - special_characters = false - - leading_space = false - leading_break = false - trailing_space = false - trailing_break = false - break_space = false - space_break = false - - preceeded_by_whitespace = false - followed_by_whitespace = false - previous_space = false - previous_break = false - ) - - emitter.scalar_data.value = value - - if len(value) == 0 { - emitter.scalar_data.multiline = false - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = true - emitter.scalar_data.single_quoted_allowed = true - emitter.scalar_data.block_allowed = false - return true - } - - if len(value) >= 3 && ((value[0] == '-' && value[1] == '-' && value[2] == '-') || (value[0] == '.' && value[1] == '.' && value[2] == '.')) { - block_indicators = true - flow_indicators = true - } - - preceeded_by_whitespace = true - for i, w := 0, 0; i < len(value); i += w { - w = width(value[0]) - followed_by_whitespace = i+w >= len(value) || is_blank(value, i+w) - - if i == 0 { - switch value[i] { - case '#', ',', '[', ']', '{', '}', '&', '*', '!', '|', '>', '\'', '"', '%', '@', '`': - flow_indicators = true - block_indicators = true - case '?', ':': - flow_indicators = true - if followed_by_whitespace { - block_indicators = true - } - case '-': - if followed_by_whitespace { - flow_indicators = true - block_indicators = true - } - } - } else { - switch value[i] { - case ',', '?', '[', ']', '{', '}': - flow_indicators = true - case ':': - flow_indicators = true - if followed_by_whitespace { - block_indicators = true - } - case '#': - if preceeded_by_whitespace { - flow_indicators = true - block_indicators = true - } - } - } - - if !is_printable(value, i) || !is_ascii(value, i) && !emitter.unicode { - special_characters = true - } - if is_space(value, i) { - if i == 0 { - leading_space = true - } - if i+width(value[i]) == len(value) { - trailing_space = true - } - if previous_break { - break_space = true - } - previous_space = true - previous_break = false - } else if is_break(value, i) { - line_breaks = true - if i == 0 { - leading_break = true - } - if i+width(value[i]) == len(value) { - trailing_break = true - } - if previous_space { - space_break = true - } - previous_space = false - previous_break = true - } else { - previous_space = false - previous_break = false - } - - // [Go]: Why 'z'? Couldn't be the end of the string as that's the loop condition. - preceeded_by_whitespace = is_blankz(value, i) - } - - emitter.scalar_data.multiline = line_breaks - emitter.scalar_data.flow_plain_allowed = true - emitter.scalar_data.block_plain_allowed = true - emitter.scalar_data.single_quoted_allowed = true - emitter.scalar_data.block_allowed = true - - if leading_space || leading_break || trailing_space || trailing_break { - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = false - } - if trailing_space { - emitter.scalar_data.block_allowed = false - } - if break_space { - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = false - emitter.scalar_data.single_quoted_allowed = false - } - if space_break || special_characters { - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = false - emitter.scalar_data.single_quoted_allowed = false - emitter.scalar_data.block_allowed = false - } - if line_breaks { - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = false - } - if flow_indicators { - emitter.scalar_data.flow_plain_allowed = false - } - if block_indicators { - emitter.scalar_data.block_plain_allowed = false - } - return true -} - -// Check if the event data is valid. -func yaml_emitter_analyze_event(emitter *yaml_emitter_t, event *yaml_event_t) bool { - - emitter.anchor_data.anchor = nil - emitter.tag_data.handle = nil - emitter.tag_data.suffix = nil - emitter.scalar_data.value = nil - - switch event.typ { - case yaml_ALIAS_EVENT: - if !yaml_emitter_analyze_anchor(emitter, event.anchor, true) { - return false - } - - case yaml_SCALAR_EVENT: - if len(event.anchor) > 0 { - if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { - return false - } - } - if len(event.tag) > 0 && (emitter.canonical || (!event.implicit && !event.quoted_implicit)) { - if !yaml_emitter_analyze_tag(emitter, event.tag) { - return false - } - } - if !yaml_emitter_analyze_scalar(emitter, event.value) { - return false - } - - case yaml_SEQUENCE_START_EVENT: - if len(event.anchor) > 0 { - if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { - return false - } - } - if len(event.tag) > 0 && (emitter.canonical || !event.implicit) { - if !yaml_emitter_analyze_tag(emitter, event.tag) { - return false - } - } - - case yaml_MAPPING_START_EVENT: - if len(event.anchor) > 0 { - if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { - return false - } - } - if len(event.tag) > 0 && (emitter.canonical || !event.implicit) { - if !yaml_emitter_analyze_tag(emitter, event.tag) { - return false - } - } - } - return true -} - -// Write the BOM character. -func yaml_emitter_write_bom(emitter *yaml_emitter_t) bool { - if !flush(emitter) { - return false - } - pos := emitter.buffer_pos - emitter.buffer[pos+0] = '\xEF' - emitter.buffer[pos+1] = '\xBB' - emitter.buffer[pos+2] = '\xBF' - emitter.buffer_pos += 3 - return true -} - -func yaml_emitter_write_indent(emitter *yaml_emitter_t) bool { - indent := emitter.indent - if indent < 0 { - indent = 0 - } - if !emitter.indention || emitter.column > indent || (emitter.column == indent && !emitter.whitespace) { - if !put_break(emitter) { - return false - } - } - for emitter.column < indent { - if !put(emitter, ' ') { - return false - } - } - emitter.whitespace = true - emitter.indention = true - return true -} - -func yaml_emitter_write_indicator(emitter *yaml_emitter_t, indicator []byte, need_whitespace, is_whitespace, is_indention bool) bool { - if need_whitespace && !emitter.whitespace { - if !put(emitter, ' ') { - return false - } - } - if !write_all(emitter, indicator) { - return false - } - emitter.whitespace = is_whitespace - emitter.indention = (emitter.indention && is_indention) - emitter.open_ended = false - return true -} - -func yaml_emitter_write_anchor(emitter *yaml_emitter_t, value []byte) bool { - if !write_all(emitter, value) { - return false - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_tag_handle(emitter *yaml_emitter_t, value []byte) bool { - if !emitter.whitespace { - if !put(emitter, ' ') { - return false - } - } - if !write_all(emitter, value) { - return false - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_tag_content(emitter *yaml_emitter_t, value []byte, need_whitespace bool) bool { - if need_whitespace && !emitter.whitespace { - if !put(emitter, ' ') { - return false - } - } - for i := 0; i < len(value); { - var must_write bool - switch value[i] { - case ';', '/', '?', ':', '@', '&', '=', '+', '$', ',', '_', '.', '~', '*', '\'', '(', ')', '[', ']': - must_write = true - default: - must_write = is_alpha(value, i) - } - if must_write { - if !write(emitter, value, &i) { - return false - } - } else { - w := width(value[i]) - for k := 0; k < w; k++ { - octet := value[i] - i++ - if !put(emitter, '%') { - return false - } - - c := octet >> 4 - if c < 10 { - c += '0' - } else { - c += 'A' - 10 - } - if !put(emitter, c) { - return false - } - - c = octet & 0x0f - if c < 10 { - c += '0' - } else { - c += 'A' - 10 - } - if !put(emitter, c) { - return false - } - } - } - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_plain_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { - if !emitter.whitespace { - if !put(emitter, ' ') { - return false - } - } - - spaces := false - breaks := false - for i := 0; i < len(value); { - if is_space(value, i) { - if allow_breaks && !spaces && emitter.column > emitter.best_width && !is_space(value, i+1) { - if !yaml_emitter_write_indent(emitter) { - return false - } - i += width(value[i]) - } else { - if !write(emitter, value, &i) { - return false - } - } - spaces = true - } else if is_break(value, i) { - if !breaks && value[i] == '\n' { - if !put_break(emitter) { - return false - } - } - if !write_break(emitter, value, &i) { - return false - } - emitter.indention = true - breaks = true - } else { - if breaks { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !write(emitter, value, &i) { - return false - } - emitter.indention = false - spaces = false - breaks = false - } - } - - emitter.whitespace = false - emitter.indention = false - if emitter.root_context { - emitter.open_ended = true - } - - return true -} - -func yaml_emitter_write_single_quoted_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { - - if !yaml_emitter_write_indicator(emitter, []byte{'\''}, true, false, false) { - return false - } - - spaces := false - breaks := false - for i := 0; i < len(value); { - if is_space(value, i) { - if allow_breaks && !spaces && emitter.column > emitter.best_width && i > 0 && i < len(value)-1 && !is_space(value, i+1) { - if !yaml_emitter_write_indent(emitter) { - return false - } - i += width(value[i]) - } else { - if !write(emitter, value, &i) { - return false - } - } - spaces = true - } else if is_break(value, i) { - if !breaks && value[i] == '\n' { - if !put_break(emitter) { - return false - } - } - if !write_break(emitter, value, &i) { - return false - } - emitter.indention = true - breaks = true - } else { - if breaks { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if value[i] == '\'' { - if !put(emitter, '\'') { - return false - } - } - if !write(emitter, value, &i) { - return false - } - emitter.indention = false - spaces = false - breaks = false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{'\''}, false, false, false) { - return false - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_double_quoted_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { - spaces := false - if !yaml_emitter_write_indicator(emitter, []byte{'"'}, true, false, false) { - return false - } - - for i := 0; i < len(value); { - if !is_printable(value, i) || (!emitter.unicode && !is_ascii(value, i)) || - is_bom(value, i) || is_break(value, i) || - value[i] == '"' || value[i] == '\\' { - - octet := value[i] - - var w int - var v rune - switch { - case octet&0x80 == 0x00: - w, v = 1, rune(octet&0x7F) - case octet&0xE0 == 0xC0: - w, v = 2, rune(octet&0x1F) - case octet&0xF0 == 0xE0: - w, v = 3, rune(octet&0x0F) - case octet&0xF8 == 0xF0: - w, v = 4, rune(octet&0x07) - } - for k := 1; k < w; k++ { - octet = value[i+k] - v = (v << 6) + (rune(octet) & 0x3F) - } - i += w - - if !put(emitter, '\\') { - return false - } - - var ok bool - switch v { - case 0x00: - ok = put(emitter, '0') - case 0x07: - ok = put(emitter, 'a') - case 0x08: - ok = put(emitter, 'b') - case 0x09: - ok = put(emitter, 't') - case 0x0A: - ok = put(emitter, 'n') - case 0x0b: - ok = put(emitter, 'v') - case 0x0c: - ok = put(emitter, 'f') - case 0x0d: - ok = put(emitter, 'r') - case 0x1b: - ok = put(emitter, 'e') - case 0x22: - ok = put(emitter, '"') - case 0x5c: - ok = put(emitter, '\\') - case 0x85: - ok = put(emitter, 'N') - case 0xA0: - ok = put(emitter, '_') - case 0x2028: - ok = put(emitter, 'L') - case 0x2029: - ok = put(emitter, 'P') - default: - if v <= 0xFF { - ok = put(emitter, 'x') - w = 2 - } else if v <= 0xFFFF { - ok = put(emitter, 'u') - w = 4 - } else { - ok = put(emitter, 'U') - w = 8 - } - for k := (w - 1) * 4; ok && k >= 0; k -= 4 { - digit := byte((v >> uint(k)) & 0x0F) - if digit < 10 { - ok = put(emitter, digit+'0') - } else { - ok = put(emitter, digit+'A'-10) - } - } - } - if !ok { - return false - } - spaces = false - } else if is_space(value, i) { - if allow_breaks && !spaces && emitter.column > emitter.best_width && i > 0 && i < len(value)-1 { - if !yaml_emitter_write_indent(emitter) { - return false - } - if is_space(value, i+1) { - if !put(emitter, '\\') { - return false - } - } - i += width(value[i]) - } else if !write(emitter, value, &i) { - return false - } - spaces = true - } else { - if !write(emitter, value, &i) { - return false - } - spaces = false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{'"'}, false, false, false) { - return false - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_block_scalar_hints(emitter *yaml_emitter_t, value []byte) bool { - if is_space(value, 0) || is_break(value, 0) { - indent_hint := []byte{'0' + byte(emitter.best_indent)} - if !yaml_emitter_write_indicator(emitter, indent_hint, false, false, false) { - return false - } - } - - emitter.open_ended = false - - var chomp_hint [1]byte - if len(value) == 0 { - chomp_hint[0] = '-' - } else { - i := len(value) - 1 - for value[i]&0xC0 == 0x80 { - i-- - } - if !is_break(value, i) { - chomp_hint[0] = '-' - } else if i == 0 { - chomp_hint[0] = '+' - emitter.open_ended = true - } else { - i-- - for value[i]&0xC0 == 0x80 { - i-- - } - if is_break(value, i) { - chomp_hint[0] = '+' - emitter.open_ended = true - } - } - } - if chomp_hint[0] != 0 { - if !yaml_emitter_write_indicator(emitter, chomp_hint[:], false, false, false) { - return false - } - } - return true -} - -func yaml_emitter_write_literal_scalar(emitter *yaml_emitter_t, value []byte) bool { - if !yaml_emitter_write_indicator(emitter, []byte{'|'}, true, false, false) { - return false - } - if !yaml_emitter_write_block_scalar_hints(emitter, value) { - return false - } - if !put_break(emitter) { - return false - } - emitter.indention = true - emitter.whitespace = true - breaks := true - for i := 0; i < len(value); { - if is_break(value, i) { - if !write_break(emitter, value, &i) { - return false - } - emitter.indention = true - breaks = true - } else { - if breaks { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !write(emitter, value, &i) { - return false - } - emitter.indention = false - breaks = false - } - } - - return true -} - -func yaml_emitter_write_folded_scalar(emitter *yaml_emitter_t, value []byte) bool { - if !yaml_emitter_write_indicator(emitter, []byte{'>'}, true, false, false) { - return false - } - if !yaml_emitter_write_block_scalar_hints(emitter, value) { - return false - } - - if !put_break(emitter) { - return false - } - emitter.indention = true - emitter.whitespace = true - - breaks := true - leading_spaces := true - for i := 0; i < len(value); { - if is_break(value, i) { - if !breaks && !leading_spaces && value[i] == '\n' { - k := 0 - for is_break(value, k) { - k += width(value[k]) - } - if !is_blankz(value, k) { - if !put_break(emitter) { - return false - } - } - } - if !write_break(emitter, value, &i) { - return false - } - emitter.indention = true - breaks = true - } else { - if breaks { - if !yaml_emitter_write_indent(emitter) { - return false - } - leading_spaces = is_blank(value, i) - } - if !breaks && is_space(value, i) && !is_space(value, i+1) && emitter.column > emitter.best_width { - if !yaml_emitter_write_indent(emitter) { - return false - } - i += width(value[i]) - } else { - if !write(emitter, value, &i) { - return false - } - } - emitter.indention = false - breaks = false - } - } - return true -} diff --git a/internal/gopkg.in/yaml.v2/parserc.go b/internal/gopkg.in/yaml.v2/parserc.go deleted file mode 100644 index 0a7037a..0000000 --- a/internal/gopkg.in/yaml.v2/parserc.go +++ /dev/null @@ -1,1096 +0,0 @@ -package yaml - -import ( - "bytes" -) - -// The parser implements the following grammar: -// -// stream ::= STREAM-START implicit_document? explicit_document* STREAM-END -// implicit_document ::= block_node DOCUMENT-END* -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// block_node_or_indentless_sequence ::= -// ALIAS -// | properties (block_content | indentless_block_sequence)? -// | block_content -// | indentless_block_sequence -// block_node ::= ALIAS -// | properties block_content? -// | block_content -// flow_node ::= ALIAS -// | properties flow_content? -// | flow_content -// properties ::= TAG ANCHOR? | ANCHOR TAG? -// block_content ::= block_collection | flow_collection | SCALAR -// flow_content ::= flow_collection | SCALAR -// block_collection ::= block_sequence | block_mapping -// flow_collection ::= flow_sequence | flow_mapping -// block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END -// indentless_sequence ::= (BLOCK-ENTRY block_node?)+ -// block_mapping ::= BLOCK-MAPPING_START -// ((KEY block_node_or_indentless_sequence?)? -// (VALUE block_node_or_indentless_sequence?)?)* -// BLOCK-END -// flow_sequence ::= FLOW-SEQUENCE-START -// (flow_sequence_entry FLOW-ENTRY)* -// flow_sequence_entry? -// FLOW-SEQUENCE-END -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// flow_mapping ::= FLOW-MAPPING-START -// (flow_mapping_entry FLOW-ENTRY)* -// flow_mapping_entry? -// FLOW-MAPPING-END -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? - -// Peek the next token in the token queue. -func peek_token(parser *yaml_parser_t) *yaml_token_t { - if parser.token_available || yaml_parser_fetch_more_tokens(parser) { - return &parser.tokens[parser.tokens_head] - } - return nil -} - -// Remove the next token from the queue (must be called after peek_token). -func skip_token(parser *yaml_parser_t) { - parser.token_available = false - parser.tokens_parsed++ - parser.stream_end_produced = parser.tokens[parser.tokens_head].typ == yaml_STREAM_END_TOKEN - parser.tokens_head++ -} - -// Get the next event. -func yaml_parser_parse(parser *yaml_parser_t, event *yaml_event_t) bool { - // Erase the event object. - *event = yaml_event_t{} - - // No events after the end of the stream or error. - if parser.stream_end_produced || parser.error != yaml_NO_ERROR || parser.state == yaml_PARSE_END_STATE { - return true - } - - // Generate the next event. - return yaml_parser_state_machine(parser, event) -} - -// Set parser error. -func yaml_parser_set_parser_error(parser *yaml_parser_t, problem string, problem_mark yaml_mark_t) bool { - parser.error = yaml_PARSER_ERROR - parser.problem = problem - parser.problem_mark = problem_mark - return false -} - -func yaml_parser_set_parser_error_context(parser *yaml_parser_t, context string, context_mark yaml_mark_t, problem string, problem_mark yaml_mark_t) bool { - parser.error = yaml_PARSER_ERROR - parser.context = context - parser.context_mark = context_mark - parser.problem = problem - parser.problem_mark = problem_mark - return false -} - -// State dispatcher. -func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool { - //trace("yaml_parser_state_machine", "state:", parser.state.String()) - - switch parser.state { - case yaml_PARSE_STREAM_START_STATE: - return yaml_parser_parse_stream_start(parser, event) - - case yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE: - return yaml_parser_parse_document_start(parser, event, true) - - case yaml_PARSE_DOCUMENT_START_STATE: - return yaml_parser_parse_document_start(parser, event, false) - - case yaml_PARSE_DOCUMENT_CONTENT_STATE: - return yaml_parser_parse_document_content(parser, event) - - case yaml_PARSE_DOCUMENT_END_STATE: - return yaml_parser_parse_document_end(parser, event) - - case yaml_PARSE_BLOCK_NODE_STATE: - return yaml_parser_parse_node(parser, event, true, false) - - case yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE: - return yaml_parser_parse_node(parser, event, true, true) - - case yaml_PARSE_FLOW_NODE_STATE: - return yaml_parser_parse_node(parser, event, false, false) - - case yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE: - return yaml_parser_parse_block_sequence_entry(parser, event, true) - - case yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE: - return yaml_parser_parse_block_sequence_entry(parser, event, false) - - case yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE: - return yaml_parser_parse_indentless_sequence_entry(parser, event) - - case yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE: - return yaml_parser_parse_block_mapping_key(parser, event, true) - - case yaml_PARSE_BLOCK_MAPPING_KEY_STATE: - return yaml_parser_parse_block_mapping_key(parser, event, false) - - case yaml_PARSE_BLOCK_MAPPING_VALUE_STATE: - return yaml_parser_parse_block_mapping_value(parser, event) - - case yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE: - return yaml_parser_parse_flow_sequence_entry(parser, event, true) - - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE: - return yaml_parser_parse_flow_sequence_entry(parser, event, false) - - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE: - return yaml_parser_parse_flow_sequence_entry_mapping_key(parser, event) - - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE: - return yaml_parser_parse_flow_sequence_entry_mapping_value(parser, event) - - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE: - return yaml_parser_parse_flow_sequence_entry_mapping_end(parser, event) - - case yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE: - return yaml_parser_parse_flow_mapping_key(parser, event, true) - - case yaml_PARSE_FLOW_MAPPING_KEY_STATE: - return yaml_parser_parse_flow_mapping_key(parser, event, false) - - case yaml_PARSE_FLOW_MAPPING_VALUE_STATE: - return yaml_parser_parse_flow_mapping_value(parser, event, false) - - case yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE: - return yaml_parser_parse_flow_mapping_value(parser, event, true) - - default: - panic("invalid parser state") - } - return false -} - -// Parse the production: -// stream ::= STREAM-START implicit_document? explicit_document* STREAM-END -// ************ -func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_STREAM_START_TOKEN { - return yaml_parser_set_parser_error(parser, "did not find expected ", token.start_mark) - } - parser.state = yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE - *event = yaml_event_t{ - typ: yaml_STREAM_START_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - encoding: token.encoding, - } - skip_token(parser) - return true -} - -// Parse the productions: -// implicit_document ::= block_node DOCUMENT-END* -// * -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// ************************* -func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t, implicit bool) bool { - - token := peek_token(parser) - if token == nil { - return false - } - - // Parse extra document end indicators. - if !implicit { - for token.typ == yaml_DOCUMENT_END_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } - } - - if implicit && token.typ != yaml_VERSION_DIRECTIVE_TOKEN && - token.typ != yaml_TAG_DIRECTIVE_TOKEN && - token.typ != yaml_DOCUMENT_START_TOKEN && - token.typ != yaml_STREAM_END_TOKEN { - // Parse an implicit document. - if !yaml_parser_process_directives(parser, nil, nil) { - return false - } - parser.states = append(parser.states, yaml_PARSE_DOCUMENT_END_STATE) - parser.state = yaml_PARSE_BLOCK_NODE_STATE - - *event = yaml_event_t{ - typ: yaml_DOCUMENT_START_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - - } else if token.typ != yaml_STREAM_END_TOKEN { - // Parse an explicit document. - var version_directive *yaml_version_directive_t - var tag_directives []yaml_tag_directive_t - start_mark := token.start_mark - if !yaml_parser_process_directives(parser, &version_directive, &tag_directives) { - return false - } - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_DOCUMENT_START_TOKEN { - yaml_parser_set_parser_error(parser, - "did not find expected ", token.start_mark) - return false - } - parser.states = append(parser.states, yaml_PARSE_DOCUMENT_END_STATE) - parser.state = yaml_PARSE_DOCUMENT_CONTENT_STATE - end_mark := token.end_mark - - *event = yaml_event_t{ - typ: yaml_DOCUMENT_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - version_directive: version_directive, - tag_directives: tag_directives, - implicit: false, - } - skip_token(parser) - - } else { - // Parse the stream end. - parser.state = yaml_PARSE_END_STATE - *event = yaml_event_t{ - typ: yaml_STREAM_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - skip_token(parser) - } - - return true -} - -// Parse the productions: -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// *********** -// -func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - if token.typ == yaml_VERSION_DIRECTIVE_TOKEN || - token.typ == yaml_TAG_DIRECTIVE_TOKEN || - token.typ == yaml_DOCUMENT_START_TOKEN || - token.typ == yaml_DOCUMENT_END_TOKEN || - token.typ == yaml_STREAM_END_TOKEN { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - return yaml_parser_process_empty_scalar(parser, event, - token.start_mark) - } - return yaml_parser_parse_node(parser, event, true, false) -} - -// Parse the productions: -// implicit_document ::= block_node DOCUMENT-END* -// ************* -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// -func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - - start_mark := token.start_mark - end_mark := token.start_mark - - implicit := true - if token.typ == yaml_DOCUMENT_END_TOKEN { - end_mark = token.end_mark - skip_token(parser) - implicit = false - } - - parser.tag_directives = parser.tag_directives[:0] - - parser.state = yaml_PARSE_DOCUMENT_START_STATE - *event = yaml_event_t{ - typ: yaml_DOCUMENT_END_EVENT, - start_mark: start_mark, - end_mark: end_mark, - implicit: implicit, - } - return true -} - -// Parse the productions: -// block_node_or_indentless_sequence ::= -// ALIAS -// ***** -// | properties (block_content | indentless_block_sequence)? -// ********** * -// | block_content | indentless_block_sequence -// * -// block_node ::= ALIAS -// ***** -// | properties block_content? -// ********** * -// | block_content -// * -// flow_node ::= ALIAS -// ***** -// | properties flow_content? -// ********** * -// | flow_content -// * -// properties ::= TAG ANCHOR? | ANCHOR TAG? -// ************************* -// block_content ::= block_collection | flow_collection | SCALAR -// ****** -// flow_content ::= flow_collection | SCALAR -// ****** -func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, indentless_sequence bool) bool { - //defer trace("yaml_parser_parse_node", "block:", block, "indentless_sequence:", indentless_sequence)() - - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ == yaml_ALIAS_TOKEN { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - *event = yaml_event_t{ - typ: yaml_ALIAS_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - anchor: token.value, - } - skip_token(parser) - return true - } - - start_mark := token.start_mark - end_mark := token.start_mark - - var tag_token bool - var tag_handle, tag_suffix, anchor []byte - var tag_mark yaml_mark_t - if token.typ == yaml_ANCHOR_TOKEN { - anchor = token.value - start_mark = token.start_mark - end_mark = token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ == yaml_TAG_TOKEN { - tag_token = true - tag_handle = token.value - tag_suffix = token.suffix - tag_mark = token.start_mark - end_mark = token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } - } else if token.typ == yaml_TAG_TOKEN { - tag_token = true - tag_handle = token.value - tag_suffix = token.suffix - start_mark = token.start_mark - tag_mark = token.start_mark - end_mark = token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ == yaml_ANCHOR_TOKEN { - anchor = token.value - end_mark = token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } - } - - var tag []byte - if tag_token { - if len(tag_handle) == 0 { - tag = tag_suffix - tag_suffix = nil - } else { - for i := range parser.tag_directives { - if bytes.Equal(parser.tag_directives[i].handle, tag_handle) { - tag = append([]byte(nil), parser.tag_directives[i].prefix...) - tag = append(tag, tag_suffix...) - break - } - } - if len(tag) == 0 { - yaml_parser_set_parser_error_context(parser, - "while parsing a node", start_mark, - "found undefined tag handle", tag_mark) - return false - } - } - } - - implicit := len(tag) == 0 - if indentless_sequence && token.typ == yaml_BLOCK_ENTRY_TOKEN { - end_mark = token.end_mark - parser.state = yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE - *event = yaml_event_t{ - typ: yaml_SEQUENCE_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_BLOCK_SEQUENCE_STYLE), - } - return true - } - if token.typ == yaml_SCALAR_TOKEN { - var plain_implicit, quoted_implicit bool - end_mark = token.end_mark - if (len(tag) == 0 && token.style == yaml_PLAIN_SCALAR_STYLE) || (len(tag) == 1 && tag[0] == '!') { - plain_implicit = true - } else if len(tag) == 0 { - quoted_implicit = true - } - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - - *event = yaml_event_t{ - typ: yaml_SCALAR_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - value: token.value, - implicit: plain_implicit, - quoted_implicit: quoted_implicit, - style: yaml_style_t(token.style), - } - skip_token(parser) - return true - } - if token.typ == yaml_FLOW_SEQUENCE_START_TOKEN { - // [Go] Some of the events below can be merged as they differ only on style. - end_mark = token.end_mark - parser.state = yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE - *event = yaml_event_t{ - typ: yaml_SEQUENCE_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_FLOW_SEQUENCE_STYLE), - } - return true - } - if token.typ == yaml_FLOW_MAPPING_START_TOKEN { - end_mark = token.end_mark - parser.state = yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE - *event = yaml_event_t{ - typ: yaml_MAPPING_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_FLOW_MAPPING_STYLE), - } - return true - } - if block && token.typ == yaml_BLOCK_SEQUENCE_START_TOKEN { - end_mark = token.end_mark - parser.state = yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE - *event = yaml_event_t{ - typ: yaml_SEQUENCE_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_BLOCK_SEQUENCE_STYLE), - } - return true - } - if block && token.typ == yaml_BLOCK_MAPPING_START_TOKEN { - end_mark = token.end_mark - parser.state = yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE - *event = yaml_event_t{ - typ: yaml_MAPPING_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_BLOCK_MAPPING_STYLE), - } - return true - } - if len(anchor) > 0 || len(tag) > 0 { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - - *event = yaml_event_t{ - typ: yaml_SCALAR_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - quoted_implicit: false, - style: yaml_style_t(yaml_PLAIN_SCALAR_STYLE), - } - return true - } - - context := "while parsing a flow node" - if block { - context = "while parsing a block node" - } - yaml_parser_set_parser_error_context(parser, context, start_mark, - "did not find expected node content", token.start_mark) - return false -} - -// Parse the productions: -// block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END -// ******************** *********** * ********* -// -func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { - if first { - token := peek_token(parser) - parser.marks = append(parser.marks, token.start_mark) - skip_token(parser) - } - - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ == yaml_BLOCK_ENTRY_TOKEN { - mark := token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_BLOCK_ENTRY_TOKEN && token.typ != yaml_BLOCK_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE) - return yaml_parser_parse_node(parser, event, true, false) - } else { - parser.state = yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) - } - } - if token.typ == yaml_BLOCK_END_TOKEN { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - - *event = yaml_event_t{ - typ: yaml_SEQUENCE_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - - skip_token(parser) - return true - } - - context_mark := parser.marks[len(parser.marks)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - return yaml_parser_set_parser_error_context(parser, - "while parsing a block collection", context_mark, - "did not find expected '-' indicator", token.start_mark) -} - -// Parse the productions: -// indentless_sequence ::= (BLOCK-ENTRY block_node?)+ -// *********** * -func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ == yaml_BLOCK_ENTRY_TOKEN { - mark := token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_BLOCK_ENTRY_TOKEN && - token.typ != yaml_KEY_TOKEN && - token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_BLOCK_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE) - return yaml_parser_parse_node(parser, event, true, false) - } - parser.state = yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) - } - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - - *event = yaml_event_t{ - typ: yaml_SEQUENCE_END_EVENT, - start_mark: token.start_mark, - end_mark: token.start_mark, // [Go] Shouldn't this be token.end_mark? - } - return true -} - -// Parse the productions: -// block_mapping ::= BLOCK-MAPPING_START -// ******************* -// ((KEY block_node_or_indentless_sequence?)? -// *** * -// (VALUE block_node_or_indentless_sequence?)?)* -// -// BLOCK-END -// ********* -// -func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { - if first { - token := peek_token(parser) - parser.marks = append(parser.marks, token.start_mark) - skip_token(parser) - } - - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ == yaml_KEY_TOKEN { - mark := token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_KEY_TOKEN && - token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_BLOCK_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_BLOCK_MAPPING_VALUE_STATE) - return yaml_parser_parse_node(parser, event, true, true) - } else { - parser.state = yaml_PARSE_BLOCK_MAPPING_VALUE_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) - } - } else if token.typ == yaml_BLOCK_END_TOKEN { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - *event = yaml_event_t{ - typ: yaml_MAPPING_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - skip_token(parser) - return true - } - - context_mark := parser.marks[len(parser.marks)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - return yaml_parser_set_parser_error_context(parser, - "while parsing a block mapping", context_mark, - "did not find expected key", token.start_mark) -} - -// Parse the productions: -// block_mapping ::= BLOCK-MAPPING_START -// -// ((KEY block_node_or_indentless_sequence?)? -// -// (VALUE block_node_or_indentless_sequence?)?)* -// ***** * -// BLOCK-END -// -// -func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - if token.typ == yaml_VALUE_TOKEN { - mark := token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_KEY_TOKEN && - token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_BLOCK_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_BLOCK_MAPPING_KEY_STATE) - return yaml_parser_parse_node(parser, event, true, true) - } - parser.state = yaml_PARSE_BLOCK_MAPPING_KEY_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) - } - parser.state = yaml_PARSE_BLOCK_MAPPING_KEY_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) -} - -// Parse the productions: -// flow_sequence ::= FLOW-SEQUENCE-START -// ******************* -// (flow_sequence_entry FLOW-ENTRY)* -// * ********** -// flow_sequence_entry? -// * -// FLOW-SEQUENCE-END -// ***************** -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * -// -func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { - if first { - token := peek_token(parser) - parser.marks = append(parser.marks, token.start_mark) - skip_token(parser) - } - token := peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { - if !first { - if token.typ == yaml_FLOW_ENTRY_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } else { - context_mark := parser.marks[len(parser.marks)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - return yaml_parser_set_parser_error_context(parser, - "while parsing a flow sequence", context_mark, - "did not find expected ',' or ']'", token.start_mark) - } - } - - if token.typ == yaml_KEY_TOKEN { - parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE - *event = yaml_event_t{ - typ: yaml_MAPPING_START_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - implicit: true, - style: yaml_style_t(yaml_FLOW_MAPPING_STYLE), - } - skip_token(parser) - return true - } else if token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - } - - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - - *event = yaml_event_t{ - typ: yaml_SEQUENCE_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - - skip_token(parser) - return true -} - -// -// Parse the productions: -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// *** * -// -func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_FLOW_ENTRY_TOKEN && - token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - mark := token.end_mark - skip_token(parser) - parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) -} - -// Parse the productions: -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// ***** * -// -func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - if token.typ == yaml_VALUE_TOKEN { - skip_token(parser) - token := peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_FLOW_ENTRY_TOKEN && token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - } - parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) -} - -// Parse the productions: -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * -// -func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE - *event = yaml_event_t{ - typ: yaml_MAPPING_END_EVENT, - start_mark: token.start_mark, - end_mark: token.start_mark, // [Go] Shouldn't this be end_mark? - } - return true -} - -// Parse the productions: -// flow_mapping ::= FLOW-MAPPING-START -// ****************** -// (flow_mapping_entry FLOW-ENTRY)* -// * ********** -// flow_mapping_entry? -// ****************** -// FLOW-MAPPING-END -// **************** -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * *** * -// -func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { - if first { - token := peek_token(parser) - parser.marks = append(parser.marks, token.start_mark) - skip_token(parser) - } - - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ != yaml_FLOW_MAPPING_END_TOKEN { - if !first { - if token.typ == yaml_FLOW_ENTRY_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } else { - context_mark := parser.marks[len(parser.marks)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - return yaml_parser_set_parser_error_context(parser, - "while parsing a flow mapping", context_mark, - "did not find expected ',' or '}'", token.start_mark) - } - } - - if token.typ == yaml_KEY_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_FLOW_ENTRY_TOKEN && - token.typ != yaml_FLOW_MAPPING_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_VALUE_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } else { - parser.state = yaml_PARSE_FLOW_MAPPING_VALUE_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) - } - } else if token.typ != yaml_FLOW_MAPPING_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - } - - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - *event = yaml_event_t{ - typ: yaml_MAPPING_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - skip_token(parser) - return true -} - -// Parse the productions: -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * ***** * -// -func yaml_parser_parse_flow_mapping_value(parser *yaml_parser_t, event *yaml_event_t, empty bool) bool { - token := peek_token(parser) - if token == nil { - return false - } - if empty { - parser.state = yaml_PARSE_FLOW_MAPPING_KEY_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) - } - if token.typ == yaml_VALUE_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_FLOW_ENTRY_TOKEN && token.typ != yaml_FLOW_MAPPING_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_KEY_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - } - parser.state = yaml_PARSE_FLOW_MAPPING_KEY_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) -} - -// Generate an empty scalar event. -func yaml_parser_process_empty_scalar(parser *yaml_parser_t, event *yaml_event_t, mark yaml_mark_t) bool { - *event = yaml_event_t{ - typ: yaml_SCALAR_EVENT, - start_mark: mark, - end_mark: mark, - value: nil, // Empty - implicit: true, - style: yaml_style_t(yaml_PLAIN_SCALAR_STYLE), - } - return true -} - -var default_tag_directives = []yaml_tag_directive_t{ - {[]byte("!"), []byte("!")}, - {[]byte("!!"), []byte("tag:yaml.org,2002:")}, -} - -// Parse directives. -func yaml_parser_process_directives(parser *yaml_parser_t, - version_directive_ref **yaml_version_directive_t, - tag_directives_ref *[]yaml_tag_directive_t) bool { - - var version_directive *yaml_version_directive_t - var tag_directives []yaml_tag_directive_t - - token := peek_token(parser) - if token == nil { - return false - } - - for token.typ == yaml_VERSION_DIRECTIVE_TOKEN || token.typ == yaml_TAG_DIRECTIVE_TOKEN { - if token.typ == yaml_VERSION_DIRECTIVE_TOKEN { - if version_directive != nil { - yaml_parser_set_parser_error(parser, - "found duplicate %YAML directive", token.start_mark) - return false - } - if token.major != 1 || token.minor != 1 { - yaml_parser_set_parser_error(parser, - "found incompatible YAML document", token.start_mark) - return false - } - version_directive = &yaml_version_directive_t{ - major: token.major, - minor: token.minor, - } - } else if token.typ == yaml_TAG_DIRECTIVE_TOKEN { - value := yaml_tag_directive_t{ - handle: token.value, - prefix: token.prefix, - } - if !yaml_parser_append_tag_directive(parser, value, false, token.start_mark) { - return false - } - tag_directives = append(tag_directives, value) - } - - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } - - for i := range default_tag_directives { - if !yaml_parser_append_tag_directive(parser, default_tag_directives[i], true, token.start_mark) { - return false - } - } - - if version_directive_ref != nil { - *version_directive_ref = version_directive - } - if tag_directives_ref != nil { - *tag_directives_ref = tag_directives - } - return true -} - -// Append a tag directive to the directives stack. -func yaml_parser_append_tag_directive(parser *yaml_parser_t, value yaml_tag_directive_t, allow_duplicates bool, mark yaml_mark_t) bool { - for i := range parser.tag_directives { - if bytes.Equal(value.handle, parser.tag_directives[i].handle) { - if allow_duplicates { - return true - } - return yaml_parser_set_parser_error(parser, "found duplicate %TAG directive", mark) - } - } - - // [Go] I suspect the copy is unnecessary. This was likely done - // because there was no way to track ownership of the data. - value_copy := yaml_tag_directive_t{ - handle: make([]byte, len(value.handle)), - prefix: make([]byte, len(value.prefix)), - } - copy(value_copy.handle, value.handle) - copy(value_copy.prefix, value.prefix) - parser.tag_directives = append(parser.tag_directives, value_copy) - return true -} diff --git a/internal/gopkg.in/yaml.v2/readerc.go b/internal/gopkg.in/yaml.v2/readerc.go deleted file mode 100644 index d5fb097..0000000 --- a/internal/gopkg.in/yaml.v2/readerc.go +++ /dev/null @@ -1,391 +0,0 @@ -package yaml - -import ( - "io" -) - -// Set the reader error and return 0. -func yaml_parser_set_reader_error(parser *yaml_parser_t, problem string, offset int, value int) bool { - parser.error = yaml_READER_ERROR - parser.problem = problem - parser.problem_offset = offset - parser.problem_value = value - return false -} - -// Byte order marks. -const ( - bom_UTF8 = "\xef\xbb\xbf" - bom_UTF16LE = "\xff\xfe" - bom_UTF16BE = "\xfe\xff" -) - -// Determine the input stream encoding by checking the BOM symbol. If no BOM is -// found, the UTF-8 encoding is assumed. Return 1 on success, 0 on failure. -func yaml_parser_determine_encoding(parser *yaml_parser_t) bool { - // Ensure that we had enough bytes in the raw buffer. - for !parser.eof && len(parser.raw_buffer)-parser.raw_buffer_pos < 3 { - if !yaml_parser_update_raw_buffer(parser) { - return false - } - } - - // Determine the encoding. - buf := parser.raw_buffer - pos := parser.raw_buffer_pos - avail := len(buf) - pos - if avail >= 2 && buf[pos] == bom_UTF16LE[0] && buf[pos+1] == bom_UTF16LE[1] { - parser.encoding = yaml_UTF16LE_ENCODING - parser.raw_buffer_pos += 2 - parser.offset += 2 - } else if avail >= 2 && buf[pos] == bom_UTF16BE[0] && buf[pos+1] == bom_UTF16BE[1] { - parser.encoding = yaml_UTF16BE_ENCODING - parser.raw_buffer_pos += 2 - parser.offset += 2 - } else if avail >= 3 && buf[pos] == bom_UTF8[0] && buf[pos+1] == bom_UTF8[1] && buf[pos+2] == bom_UTF8[2] { - parser.encoding = yaml_UTF8_ENCODING - parser.raw_buffer_pos += 3 - parser.offset += 3 - } else { - parser.encoding = yaml_UTF8_ENCODING - } - return true -} - -// Update the raw buffer. -func yaml_parser_update_raw_buffer(parser *yaml_parser_t) bool { - size_read := 0 - - // Return if the raw buffer is full. - if parser.raw_buffer_pos == 0 && len(parser.raw_buffer) == cap(parser.raw_buffer) { - return true - } - - // Return on EOF. - if parser.eof { - return true - } - - // Move the remaining bytes in the raw buffer to the beginning. - if parser.raw_buffer_pos > 0 && parser.raw_buffer_pos < len(parser.raw_buffer) { - copy(parser.raw_buffer, parser.raw_buffer[parser.raw_buffer_pos:]) - } - parser.raw_buffer = parser.raw_buffer[:len(parser.raw_buffer)-parser.raw_buffer_pos] - parser.raw_buffer_pos = 0 - - // Call the read handler to fill the buffer. - size_read, err := parser.read_handler(parser, parser.raw_buffer[len(parser.raw_buffer):cap(parser.raw_buffer)]) - parser.raw_buffer = parser.raw_buffer[:len(parser.raw_buffer)+size_read] - if err == io.EOF { - parser.eof = true - } else if err != nil { - return yaml_parser_set_reader_error(parser, "input error: "+err.Error(), parser.offset, -1) - } - return true -} - -// Ensure that the buffer contains at least `length` characters. -// Return true on success, false on failure. -// -// The length is supposed to be significantly less that the buffer size. -func yaml_parser_update_buffer(parser *yaml_parser_t, length int) bool { - if parser.read_handler == nil { - panic("read handler must be set") - } - - // If the EOF flag is set and the raw buffer is empty, do nothing. - if parser.eof && parser.raw_buffer_pos == len(parser.raw_buffer) { - return true - } - - // Return if the buffer contains enough characters. - if parser.unread >= length { - return true - } - - // Determine the input encoding if it is not known yet. - if parser.encoding == yaml_ANY_ENCODING { - if !yaml_parser_determine_encoding(parser) { - return false - } - } - - // Move the unread characters to the beginning of the buffer. - buffer_len := len(parser.buffer) - if parser.buffer_pos > 0 && parser.buffer_pos < buffer_len { - copy(parser.buffer, parser.buffer[parser.buffer_pos:]) - buffer_len -= parser.buffer_pos - parser.buffer_pos = 0 - } else if parser.buffer_pos == buffer_len { - buffer_len = 0 - parser.buffer_pos = 0 - } - - // Open the whole buffer for writing, and cut it before returning. - parser.buffer = parser.buffer[:cap(parser.buffer)] - - // Fill the buffer until it has enough characters. - first := true - for parser.unread < length { - - // Fill the raw buffer if necessary. - if !first || parser.raw_buffer_pos == len(parser.raw_buffer) { - if !yaml_parser_update_raw_buffer(parser) { - parser.buffer = parser.buffer[:buffer_len] - return false - } - } - first = false - - // Decode the raw buffer. - inner: - for parser.raw_buffer_pos != len(parser.raw_buffer) { - var value rune - var width int - - raw_unread := len(parser.raw_buffer) - parser.raw_buffer_pos - - // Decode the next character. - switch parser.encoding { - case yaml_UTF8_ENCODING: - // Decode a UTF-8 character. Check RFC 3629 - // (http://www.ietf.org/rfc/rfc3629.txt) for more details. - // - // The following table (taken from the RFC) is used for - // decoding. - // - // Char. number range | UTF-8 octet sequence - // (hexadecimal) | (binary) - // --------------------+------------------------------------ - // 0000 0000-0000 007F | 0xxxxxxx - // 0000 0080-0000 07FF | 110xxxxx 10xxxxxx - // 0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx - // 0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - // - // Additionally, the characters in the range 0xD800-0xDFFF - // are prohibited as they are reserved for use with UTF-16 - // surrogate pairs. - - // Determine the length of the UTF-8 sequence. - octet := parser.raw_buffer[parser.raw_buffer_pos] - switch { - case octet&0x80 == 0x00: - width = 1 - case octet&0xE0 == 0xC0: - width = 2 - case octet&0xF0 == 0xE0: - width = 3 - case octet&0xF8 == 0xF0: - width = 4 - default: - // The leading octet is invalid. - return yaml_parser_set_reader_error(parser, - "invalid leading UTF-8 octet", - parser.offset, int(octet)) - } - - // Check if the raw buffer contains an incomplete character. - if width > raw_unread { - if parser.eof { - return yaml_parser_set_reader_error(parser, - "incomplete UTF-8 octet sequence", - parser.offset, -1) - } - break inner - } - - // Decode the leading octet. - switch { - case octet&0x80 == 0x00: - value = rune(octet & 0x7F) - case octet&0xE0 == 0xC0: - value = rune(octet & 0x1F) - case octet&0xF0 == 0xE0: - value = rune(octet & 0x0F) - case octet&0xF8 == 0xF0: - value = rune(octet & 0x07) - default: - value = 0 - } - - // Check and decode the trailing octets. - for k := 1; k < width; k++ { - octet = parser.raw_buffer[parser.raw_buffer_pos+k] - - // Check if the octet is valid. - if (octet & 0xC0) != 0x80 { - return yaml_parser_set_reader_error(parser, - "invalid trailing UTF-8 octet", - parser.offset+k, int(octet)) - } - - // Decode the octet. - value = (value << 6) + rune(octet&0x3F) - } - - // Check the length of the sequence against the value. - switch { - case width == 1: - case width == 2 && value >= 0x80: - case width == 3 && value >= 0x800: - case width == 4 && value >= 0x10000: - default: - return yaml_parser_set_reader_error(parser, - "invalid length of a UTF-8 sequence", - parser.offset, -1) - } - - // Check the range of the value. - if value >= 0xD800 && value <= 0xDFFF || value > 0x10FFFF { - return yaml_parser_set_reader_error(parser, - "invalid Unicode character", - parser.offset, int(value)) - } - - case yaml_UTF16LE_ENCODING, yaml_UTF16BE_ENCODING: - var low, high int - if parser.encoding == yaml_UTF16LE_ENCODING { - low, high = 0, 1 - } else { - high, low = 1, 0 - } - - // The UTF-16 encoding is not as simple as one might - // naively think. Check RFC 2781 - // (http://www.ietf.org/rfc/rfc2781.txt). - // - // Normally, two subsequent bytes describe a Unicode - // character. However a special technique (called a - // surrogate pair) is used for specifying character - // values larger than 0xFFFF. - // - // A surrogate pair consists of two pseudo-characters: - // high surrogate area (0xD800-0xDBFF) - // low surrogate area (0xDC00-0xDFFF) - // - // The following formulas are used for decoding - // and encoding characters using surrogate pairs: - // - // U = U' + 0x10000 (0x01 00 00 <= U <= 0x10 FF FF) - // U' = yyyyyyyyyyxxxxxxxxxx (0 <= U' <= 0x0F FF FF) - // W1 = 110110yyyyyyyyyy - // W2 = 110111xxxxxxxxxx - // - // where U is the character value, W1 is the high surrogate - // area, W2 is the low surrogate area. - - // Check for incomplete UTF-16 character. - if raw_unread < 2 { - if parser.eof { - return yaml_parser_set_reader_error(parser, - "incomplete UTF-16 character", - parser.offset, -1) - } - break inner - } - - // Get the character. - value = rune(parser.raw_buffer[parser.raw_buffer_pos+low]) + - (rune(parser.raw_buffer[parser.raw_buffer_pos+high]) << 8) - - // Check for unexpected low surrogate area. - if value&0xFC00 == 0xDC00 { - return yaml_parser_set_reader_error(parser, - "unexpected low surrogate area", - parser.offset, int(value)) - } - - // Check for a high surrogate area. - if value&0xFC00 == 0xD800 { - width = 4 - - // Check for incomplete surrogate pair. - if raw_unread < 4 { - if parser.eof { - return yaml_parser_set_reader_error(parser, - "incomplete UTF-16 surrogate pair", - parser.offset, -1) - } - break inner - } - - // Get the next character. - value2 := rune(parser.raw_buffer[parser.raw_buffer_pos+low+2]) + - (rune(parser.raw_buffer[parser.raw_buffer_pos+high+2]) << 8) - - // Check for a low surrogate area. - if value2&0xFC00 != 0xDC00 { - return yaml_parser_set_reader_error(parser, - "expected low surrogate area", - parser.offset+2, int(value2)) - } - - // Generate the value of the surrogate pair. - value = 0x10000 + ((value & 0x3FF) << 10) + (value2 & 0x3FF) - } else { - width = 2 - } - - default: - panic("impossible") - } - - // Check if the character is in the allowed range: - // #x9 | #xA | #xD | [#x20-#x7E] (8 bit) - // | #x85 | [#xA0-#xD7FF] | [#xE000-#xFFFD] (16 bit) - // | [#x10000-#x10FFFF] (32 bit) - switch { - case value == 0x09: - case value == 0x0A: - case value == 0x0D: - case value >= 0x20 && value <= 0x7E: - case value == 0x85: - case value >= 0xA0 && value <= 0xD7FF: - case value >= 0xE000 && value <= 0xFFFD: - case value >= 0x10000 && value <= 0x10FFFF: - default: - return yaml_parser_set_reader_error(parser, - "control characters are not allowed", - parser.offset, int(value)) - } - - // Move the raw pointers. - parser.raw_buffer_pos += width - parser.offset += width - - // Finally put the character into the buffer. - if value <= 0x7F { - // 0000 0000-0000 007F . 0xxxxxxx - parser.buffer[buffer_len+0] = byte(value) - } else if value <= 0x7FF { - // 0000 0080-0000 07FF . 110xxxxx 10xxxxxx - parser.buffer[buffer_len+0] = byte(0xC0 + (value >> 6)) - parser.buffer[buffer_len+1] = byte(0x80 + (value & 0x3F)) - } else if value <= 0xFFFF { - // 0000 0800-0000 FFFF . 1110xxxx 10xxxxxx 10xxxxxx - parser.buffer[buffer_len+0] = byte(0xE0 + (value >> 12)) - parser.buffer[buffer_len+1] = byte(0x80 + ((value >> 6) & 0x3F)) - parser.buffer[buffer_len+2] = byte(0x80 + (value & 0x3F)) - } else { - // 0001 0000-0010 FFFF . 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - parser.buffer[buffer_len+0] = byte(0xF0 + (value >> 18)) - parser.buffer[buffer_len+1] = byte(0x80 + ((value >> 12) & 0x3F)) - parser.buffer[buffer_len+2] = byte(0x80 + ((value >> 6) & 0x3F)) - parser.buffer[buffer_len+3] = byte(0x80 + (value & 0x3F)) - } - buffer_len += width - - parser.unread++ - } - - // On EOF, put NUL into the buffer and return. - if parser.eof { - parser.buffer[buffer_len] = 0 - buffer_len++ - parser.unread++ - break - } - } - parser.buffer = parser.buffer[:buffer_len] - return true -} diff --git a/internal/gopkg.in/yaml.v2/scannerc.go b/internal/gopkg.in/yaml.v2/scannerc.go deleted file mode 100644 index fe93b19..0000000 --- a/internal/gopkg.in/yaml.v2/scannerc.go +++ /dev/null @@ -1,2710 +0,0 @@ -package yaml - -import ( - "bytes" - "fmt" -) - -// Introduction -// ************ -// -// The following notes assume that you are familiar with the YAML specification -// (http://yaml.org/spec/cvs/current.html). We mostly follow it, although in -// some cases we are less restrictive that it requires. -// -// The process of transforming a YAML stream into a sequence of events is -// divided on two steps: Scanning and Parsing. -// -// The Scanner transforms the input stream into a sequence of tokens, while the -// parser transform the sequence of tokens produced by the Scanner into a -// sequence of parsing events. -// -// The Scanner is rather clever and complicated. The Parser, on the contrary, -// is a straightforward implementation of a recursive-descendant parser (or, -// LL(1) parser, as it is usually called). -// -// Actually there are two issues of Scanning that might be called "clever", the -// rest is quite straightforward. The issues are "block collection start" and -// "simple keys". Both issues are explained below in details. -// -// Here the Scanning step is explained and implemented. We start with the list -// of all the tokens produced by the Scanner together with short descriptions. -// -// Now, tokens: -// -// STREAM-START(encoding) # The stream start. -// STREAM-END # The stream end. -// VERSION-DIRECTIVE(major,minor) # The '%YAML' directive. -// TAG-DIRECTIVE(handle,prefix) # The '%TAG' directive. -// DOCUMENT-START # '---' -// DOCUMENT-END # '...' -// BLOCK-SEQUENCE-START # Indentation increase denoting a block -// BLOCK-MAPPING-START # sequence or a block mapping. -// BLOCK-END # Indentation decrease. -// FLOW-SEQUENCE-START # '[' -// FLOW-SEQUENCE-END # ']' -// BLOCK-SEQUENCE-START # '{' -// BLOCK-SEQUENCE-END # '}' -// BLOCK-ENTRY # '-' -// FLOW-ENTRY # ',' -// KEY # '?' or nothing (simple keys). -// VALUE # ':' -// ALIAS(anchor) # '*anchor' -// ANCHOR(anchor) # '&anchor' -// TAG(handle,suffix) # '!handle!suffix' -// SCALAR(value,style) # A scalar. -// -// The following two tokens are "virtual" tokens denoting the beginning and the -// end of the stream: -// -// STREAM-START(encoding) -// STREAM-END -// -// We pass the information about the input stream encoding with the -// STREAM-START token. -// -// The next two tokens are responsible for tags: -// -// VERSION-DIRECTIVE(major,minor) -// TAG-DIRECTIVE(handle,prefix) -// -// Example: -// -// %YAML 1.1 -// %TAG ! !foo -// %TAG !yaml! tag:yaml.org,2002: -// --- -// -// The correspoding sequence of tokens: -// -// STREAM-START(utf-8) -// VERSION-DIRECTIVE(1,1) -// TAG-DIRECTIVE("!","!foo") -// TAG-DIRECTIVE("!yaml","tag:yaml.org,2002:") -// DOCUMENT-START -// STREAM-END -// -// Note that the VERSION-DIRECTIVE and TAG-DIRECTIVE tokens occupy a whole -// line. -// -// The document start and end indicators are represented by: -// -// DOCUMENT-START -// DOCUMENT-END -// -// Note that if a YAML stream contains an implicit document (without '---' -// and '...' indicators), no DOCUMENT-START and DOCUMENT-END tokens will be -// produced. -// -// In the following examples, we present whole documents together with the -// produced tokens. -// -// 1. An implicit document: -// -// 'a scalar' -// -// Tokens: -// -// STREAM-START(utf-8) -// SCALAR("a scalar",single-quoted) -// STREAM-END -// -// 2. An explicit document: -// -// --- -// 'a scalar' -// ... -// -// Tokens: -// -// STREAM-START(utf-8) -// DOCUMENT-START -// SCALAR("a scalar",single-quoted) -// DOCUMENT-END -// STREAM-END -// -// 3. Several documents in a stream: -// -// 'a scalar' -// --- -// 'another scalar' -// --- -// 'yet another scalar' -// -// Tokens: -// -// STREAM-START(utf-8) -// SCALAR("a scalar",single-quoted) -// DOCUMENT-START -// SCALAR("another scalar",single-quoted) -// DOCUMENT-START -// SCALAR("yet another scalar",single-quoted) -// STREAM-END -// -// We have already introduced the SCALAR token above. The following tokens are -// used to describe aliases, anchors, tag, and scalars: -// -// ALIAS(anchor) -// ANCHOR(anchor) -// TAG(handle,suffix) -// SCALAR(value,style) -// -// The following series of examples illustrate the usage of these tokens: -// -// 1. A recursive sequence: -// -// &A [ *A ] -// -// Tokens: -// -// STREAM-START(utf-8) -// ANCHOR("A") -// FLOW-SEQUENCE-START -// ALIAS("A") -// FLOW-SEQUENCE-END -// STREAM-END -// -// 2. A tagged scalar: -// -// !!float "3.14" # A good approximation. -// -// Tokens: -// -// STREAM-START(utf-8) -// TAG("!!","float") -// SCALAR("3.14",double-quoted) -// STREAM-END -// -// 3. Various scalar styles: -// -// --- # Implicit empty plain scalars do not produce tokens. -// --- a plain scalar -// --- 'a single-quoted scalar' -// --- "a double-quoted scalar" -// --- |- -// a literal scalar -// --- >- -// a folded -// scalar -// -// Tokens: -// -// STREAM-START(utf-8) -// DOCUMENT-START -// DOCUMENT-START -// SCALAR("a plain scalar",plain) -// DOCUMENT-START -// SCALAR("a single-quoted scalar",single-quoted) -// DOCUMENT-START -// SCALAR("a double-quoted scalar",double-quoted) -// DOCUMENT-START -// SCALAR("a literal scalar",literal) -// DOCUMENT-START -// SCALAR("a folded scalar",folded) -// STREAM-END -// -// Now it's time to review collection-related tokens. We will start with -// flow collections: -// -// FLOW-SEQUENCE-START -// FLOW-SEQUENCE-END -// FLOW-MAPPING-START -// FLOW-MAPPING-END -// FLOW-ENTRY -// KEY -// VALUE -// -// The tokens FLOW-SEQUENCE-START, FLOW-SEQUENCE-END, FLOW-MAPPING-START, and -// FLOW-MAPPING-END represent the indicators '[', ']', '{', and '}' -// correspondingly. FLOW-ENTRY represent the ',' indicator. Finally the -// indicators '?' and ':', which are used for denoting mapping keys and values, -// are represented by the KEY and VALUE tokens. -// -// The following examples show flow collections: -// -// 1. A flow sequence: -// -// [item 1, item 2, item 3] -// -// Tokens: -// -// STREAM-START(utf-8) -// FLOW-SEQUENCE-START -// SCALAR("item 1",plain) -// FLOW-ENTRY -// SCALAR("item 2",plain) -// FLOW-ENTRY -// SCALAR("item 3",plain) -// FLOW-SEQUENCE-END -// STREAM-END -// -// 2. A flow mapping: -// -// { -// a simple key: a value, # Note that the KEY token is produced. -// ? a complex key: another value, -// } -// -// Tokens: -// -// STREAM-START(utf-8) -// FLOW-MAPPING-START -// KEY -// SCALAR("a simple key",plain) -// VALUE -// SCALAR("a value",plain) -// FLOW-ENTRY -// KEY -// SCALAR("a complex key",plain) -// VALUE -// SCALAR("another value",plain) -// FLOW-ENTRY -// FLOW-MAPPING-END -// STREAM-END -// -// A simple key is a key which is not denoted by the '?' indicator. Note that -// the Scanner still produce the KEY token whenever it encounters a simple key. -// -// For scanning block collections, the following tokens are used (note that we -// repeat KEY and VALUE here): -// -// BLOCK-SEQUENCE-START -// BLOCK-MAPPING-START -// BLOCK-END -// BLOCK-ENTRY -// KEY -// VALUE -// -// The tokens BLOCK-SEQUENCE-START and BLOCK-MAPPING-START denote indentation -// increase that precedes a block collection (cf. the INDENT token in Python). -// The token BLOCK-END denote indentation decrease that ends a block collection -// (cf. the DEDENT token in Python). However YAML has some syntax pecularities -// that makes detections of these tokens more complex. -// -// The tokens BLOCK-ENTRY, KEY, and VALUE are used to represent the indicators -// '-', '?', and ':' correspondingly. -// -// The following examples show how the tokens BLOCK-SEQUENCE-START, -// BLOCK-MAPPING-START, and BLOCK-END are emitted by the Scanner: -// -// 1. Block sequences: -// -// - item 1 -// - item 2 -// - -// - item 3.1 -// - item 3.2 -// - -// key 1: value 1 -// key 2: value 2 -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-ENTRY -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 3.1",plain) -// BLOCK-ENTRY -// SCALAR("item 3.2",plain) -// BLOCK-END -// BLOCK-ENTRY -// BLOCK-MAPPING-START -// KEY -// SCALAR("key 1",plain) -// VALUE -// SCALAR("value 1",plain) -// KEY -// SCALAR("key 2",plain) -// VALUE -// SCALAR("value 2",plain) -// BLOCK-END -// BLOCK-END -// STREAM-END -// -// 2. Block mappings: -// -// a simple key: a value # The KEY token is produced here. -// ? a complex key -// : another value -// a mapping: -// key 1: value 1 -// key 2: value 2 -// a sequence: -// - item 1 -// - item 2 -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-MAPPING-START -// KEY -// SCALAR("a simple key",plain) -// VALUE -// SCALAR("a value",plain) -// KEY -// SCALAR("a complex key",plain) -// VALUE -// SCALAR("another value",plain) -// KEY -// SCALAR("a mapping",plain) -// BLOCK-MAPPING-START -// KEY -// SCALAR("key 1",plain) -// VALUE -// SCALAR("value 1",plain) -// KEY -// SCALAR("key 2",plain) -// VALUE -// SCALAR("value 2",plain) -// BLOCK-END -// KEY -// SCALAR("a sequence",plain) -// VALUE -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-END -// BLOCK-END -// STREAM-END -// -// YAML does not always require to start a new block collection from a new -// line. If the current line contains only '-', '?', and ':' indicators, a new -// block collection may start at the current line. The following examples -// illustrate this case: -// -// 1. Collections in a sequence: -// -// - - item 1 -// - item 2 -// - key 1: value 1 -// key 2: value 2 -// - ? complex key -// : complex value -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-END -// BLOCK-ENTRY -// BLOCK-MAPPING-START -// KEY -// SCALAR("key 1",plain) -// VALUE -// SCALAR("value 1",plain) -// KEY -// SCALAR("key 2",plain) -// VALUE -// SCALAR("value 2",plain) -// BLOCK-END -// BLOCK-ENTRY -// BLOCK-MAPPING-START -// KEY -// SCALAR("complex key") -// VALUE -// SCALAR("complex value") -// BLOCK-END -// BLOCK-END -// STREAM-END -// -// 2. Collections in a mapping: -// -// ? a sequence -// : - item 1 -// - item 2 -// ? a mapping -// : key 1: value 1 -// key 2: value 2 -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-MAPPING-START -// KEY -// SCALAR("a sequence",plain) -// VALUE -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-END -// KEY -// SCALAR("a mapping",plain) -// VALUE -// BLOCK-MAPPING-START -// KEY -// SCALAR("key 1",plain) -// VALUE -// SCALAR("value 1",plain) -// KEY -// SCALAR("key 2",plain) -// VALUE -// SCALAR("value 2",plain) -// BLOCK-END -// BLOCK-END -// STREAM-END -// -// YAML also permits non-indented sequences if they are included into a block -// mapping. In this case, the token BLOCK-SEQUENCE-START is not produced: -// -// key: -// - item 1 # BLOCK-SEQUENCE-START is NOT produced here. -// - item 2 -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-MAPPING-START -// KEY -// SCALAR("key",plain) -// VALUE -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-END -// - -// Ensure that the buffer contains the required number of characters. -// Return true on success, false on failure (reader error or memory error). -func cache(parser *yaml_parser_t, length int) bool { - // [Go] This was inlined: !cache(A, B) -> unread < B && !update(A, B) - return parser.unread >= length || yaml_parser_update_buffer(parser, length) -} - -// Advance the buffer pointer. -func skip(parser *yaml_parser_t) { - parser.mark.index++ - parser.mark.column++ - parser.unread-- - parser.buffer_pos += width(parser.buffer[parser.buffer_pos]) -} - -func skip_line(parser *yaml_parser_t) { - if is_crlf(parser.buffer, parser.buffer_pos) { - parser.mark.index += 2 - parser.mark.column = 0 - parser.mark.line++ - parser.unread -= 2 - parser.buffer_pos += 2 - } else if is_break(parser.buffer, parser.buffer_pos) { - parser.mark.index++ - parser.mark.column = 0 - parser.mark.line++ - parser.unread-- - parser.buffer_pos += width(parser.buffer[parser.buffer_pos]) - } -} - -// Copy a character to a string buffer and advance pointers. -func read(parser *yaml_parser_t, s []byte) []byte { - w := width(parser.buffer[parser.buffer_pos]) - if w == 0 { - panic("invalid character sequence") - } - if len(s) == 0 { - s = make([]byte, 0, 32) - } - if w == 1 && len(s)+w <= cap(s) { - s = s[:len(s)+1] - s[len(s)-1] = parser.buffer[parser.buffer_pos] - parser.buffer_pos++ - } else { - s = append(s, parser.buffer[parser.buffer_pos:parser.buffer_pos+w]...) - parser.buffer_pos += w - } - parser.mark.index++ - parser.mark.column++ - parser.unread-- - return s -} - -// Copy a line break character to a string buffer and advance pointers. -func read_line(parser *yaml_parser_t, s []byte) []byte { - buf := parser.buffer - pos := parser.buffer_pos - switch { - case buf[pos] == '\r' && buf[pos+1] == '\n': - // CR LF . LF - s = append(s, '\n') - parser.buffer_pos += 2 - parser.mark.index++ - parser.unread-- - case buf[pos] == '\r' || buf[pos] == '\n': - // CR|LF . LF - s = append(s, '\n') - parser.buffer_pos += 1 - case buf[pos] == '\xC2' && buf[pos+1] == '\x85': - // NEL . LF - s = append(s, '\n') - parser.buffer_pos += 2 - case buf[pos] == '\xE2' && buf[pos+1] == '\x80' && (buf[pos+2] == '\xA8' || buf[pos+2] == '\xA9'): - // LS|PS . LS|PS - s = append(s, buf[parser.buffer_pos:pos+3]...) - parser.buffer_pos += 3 - default: - return s - } - parser.mark.index++ - parser.mark.column = 0 - parser.mark.line++ - parser.unread-- - return s -} - -// Get the next token. -func yaml_parser_scan(parser *yaml_parser_t, token *yaml_token_t) bool { - // Erase the token object. - *token = yaml_token_t{} // [Go] Is this necessary? - - // No tokens after STREAM-END or error. - if parser.stream_end_produced || parser.error != yaml_NO_ERROR { - return true - } - - // Ensure that the tokens queue contains enough tokens. - if !parser.token_available { - if !yaml_parser_fetch_more_tokens(parser) { - return false - } - } - - // Fetch the next token from the queue. - *token = parser.tokens[parser.tokens_head] - parser.tokens_head++ - parser.tokens_parsed++ - parser.token_available = false - - if token.typ == yaml_STREAM_END_TOKEN { - parser.stream_end_produced = true - } - return true -} - -// Set the scanner error and return false. -func yaml_parser_set_scanner_error(parser *yaml_parser_t, context string, context_mark yaml_mark_t, problem string) bool { - parser.error = yaml_SCANNER_ERROR - parser.context = context - parser.context_mark = context_mark - parser.problem = problem - parser.problem_mark = parser.mark - return false -} - -func yaml_parser_set_scanner_tag_error(parser *yaml_parser_t, directive bool, context_mark yaml_mark_t, problem string) bool { - context := "while parsing a tag" - if directive { - context = "while parsing a %TAG directive" - } - return yaml_parser_set_scanner_error(parser, context, context_mark, "did not find URI escaped octet") -} - -func trace(args ...interface{}) func() { - pargs := append([]interface{}{"+++"}, args...) - fmt.Println(pargs...) - pargs = append([]interface{}{"---"}, args...) - return func() { fmt.Println(pargs...) } -} - -// Ensure that the tokens queue contains at least one token which can be -// returned to the Parser. -func yaml_parser_fetch_more_tokens(parser *yaml_parser_t) bool { - // While we need more tokens to fetch, do it. - for { - // Check if we really need to fetch more tokens. - need_more_tokens := false - - if parser.tokens_head == len(parser.tokens) { - // Queue is empty. - need_more_tokens = true - } else { - // Check if any potential simple key may occupy the head position. - if !yaml_parser_stale_simple_keys(parser) { - return false - } - - for i := range parser.simple_keys { - simple_key := &parser.simple_keys[i] - if simple_key.possible && simple_key.token_number == parser.tokens_parsed { - need_more_tokens = true - break - } - } - } - - // We are finished. - if !need_more_tokens { - break - } - // Fetch the next token. - if !yaml_parser_fetch_next_token(parser) { - return false - } - } - - parser.token_available = true - return true -} - -// The dispatcher for token fetchers. -func yaml_parser_fetch_next_token(parser *yaml_parser_t) bool { - // Ensure that the buffer is initialized. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - // Check if we just started scanning. Fetch STREAM-START then. - if !parser.stream_start_produced { - return yaml_parser_fetch_stream_start(parser) - } - - // Eat whitespaces and comments until we reach the next token. - if !yaml_parser_scan_to_next_token(parser) { - return false - } - - // Remove obsolete potential simple keys. - if !yaml_parser_stale_simple_keys(parser) { - return false - } - - // Check the indentation level against the current column. - if !yaml_parser_unroll_indent(parser, parser.mark.column) { - return false - } - - // Ensure that the buffer contains at least 4 characters. 4 is the length - // of the longest indicators ('--- ' and '... '). - if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { - return false - } - - // Is it the end of the stream? - if is_z(parser.buffer, parser.buffer_pos) { - return yaml_parser_fetch_stream_end(parser) - } - - // Is it a directive? - if parser.mark.column == 0 && parser.buffer[parser.buffer_pos] == '%' { - return yaml_parser_fetch_directive(parser) - } - - buf := parser.buffer - pos := parser.buffer_pos - - // Is it the document start indicator? - if parser.mark.column == 0 && buf[pos] == '-' && buf[pos+1] == '-' && buf[pos+2] == '-' && is_blankz(buf, pos+3) { - return yaml_parser_fetch_document_indicator(parser, yaml_DOCUMENT_START_TOKEN) - } - - // Is it the document end indicator? - if parser.mark.column == 0 && buf[pos] == '.' && buf[pos+1] == '.' && buf[pos+2] == '.' && is_blankz(buf, pos+3) { - return yaml_parser_fetch_document_indicator(parser, yaml_DOCUMENT_END_TOKEN) - } - - // Is it the flow sequence start indicator? - if buf[pos] == '[' { - return yaml_parser_fetch_flow_collection_start(parser, yaml_FLOW_SEQUENCE_START_TOKEN) - } - - // Is it the flow mapping start indicator? - if parser.buffer[parser.buffer_pos] == '{' { - return yaml_parser_fetch_flow_collection_start(parser, yaml_FLOW_MAPPING_START_TOKEN) - } - - // Is it the flow sequence end indicator? - if parser.buffer[parser.buffer_pos] == ']' { - return yaml_parser_fetch_flow_collection_end(parser, - yaml_FLOW_SEQUENCE_END_TOKEN) - } - - // Is it the flow mapping end indicator? - if parser.buffer[parser.buffer_pos] == '}' { - return yaml_parser_fetch_flow_collection_end(parser, - yaml_FLOW_MAPPING_END_TOKEN) - } - - // Is it the flow entry indicator? - if parser.buffer[parser.buffer_pos] == ',' { - return yaml_parser_fetch_flow_entry(parser) - } - - // Is it the block entry indicator? - if parser.buffer[parser.buffer_pos] == '-' && is_blankz(parser.buffer, parser.buffer_pos+1) { - return yaml_parser_fetch_block_entry(parser) - } - - // Is it the key indicator? - if parser.buffer[parser.buffer_pos] == '?' && (parser.flow_level > 0 || is_blankz(parser.buffer, parser.buffer_pos+1)) { - return yaml_parser_fetch_key(parser) - } - - // Is it the value indicator? - if parser.buffer[parser.buffer_pos] == ':' && (parser.flow_level > 0 || is_blankz(parser.buffer, parser.buffer_pos+1)) { - return yaml_parser_fetch_value(parser) - } - - // Is it an alias? - if parser.buffer[parser.buffer_pos] == '*' { - return yaml_parser_fetch_anchor(parser, yaml_ALIAS_TOKEN) - } - - // Is it an anchor? - if parser.buffer[parser.buffer_pos] == '&' { - return yaml_parser_fetch_anchor(parser, yaml_ANCHOR_TOKEN) - } - - // Is it a tag? - if parser.buffer[parser.buffer_pos] == '!' { - return yaml_parser_fetch_tag(parser) - } - - // Is it a literal scalar? - if parser.buffer[parser.buffer_pos] == '|' && parser.flow_level == 0 { - return yaml_parser_fetch_block_scalar(parser, true) - } - - // Is it a folded scalar? - if parser.buffer[parser.buffer_pos] == '>' && parser.flow_level == 0 { - return yaml_parser_fetch_block_scalar(parser, false) - } - - // Is it a single-quoted scalar? - if parser.buffer[parser.buffer_pos] == '\'' { - return yaml_parser_fetch_flow_scalar(parser, true) - } - - // Is it a double-quoted scalar? - if parser.buffer[parser.buffer_pos] == '"' { - return yaml_parser_fetch_flow_scalar(parser, false) - } - - // Is it a plain scalar? - // - // A plain scalar may start with any non-blank characters except - // - // '-', '?', ':', ',', '[', ']', '{', '}', - // '#', '&', '*', '!', '|', '>', '\'', '\"', - // '%', '@', '`'. - // - // In the block context (and, for the '-' indicator, in the flow context - // too), it may also start with the characters - // - // '-', '?', ':' - // - // if it is followed by a non-space character. - // - // The last rule is more restrictive than the specification requires. - // [Go] Make this logic more reasonable. - //switch parser.buffer[parser.buffer_pos] { - //case '-', '?', ':', ',', '?', '-', ',', ':', ']', '[', '}', '{', '&', '#', '!', '*', '>', '|', '"', '\'', '@', '%', '-', '`': - //} - if !(is_blankz(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == '-' || - parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == ':' || - parser.buffer[parser.buffer_pos] == ',' || parser.buffer[parser.buffer_pos] == '[' || - parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '{' || - parser.buffer[parser.buffer_pos] == '}' || parser.buffer[parser.buffer_pos] == '#' || - parser.buffer[parser.buffer_pos] == '&' || parser.buffer[parser.buffer_pos] == '*' || - parser.buffer[parser.buffer_pos] == '!' || parser.buffer[parser.buffer_pos] == '|' || - parser.buffer[parser.buffer_pos] == '>' || parser.buffer[parser.buffer_pos] == '\'' || - parser.buffer[parser.buffer_pos] == '"' || parser.buffer[parser.buffer_pos] == '%' || - parser.buffer[parser.buffer_pos] == '@' || parser.buffer[parser.buffer_pos] == '`') || - (parser.buffer[parser.buffer_pos] == '-' && !is_blank(parser.buffer, parser.buffer_pos+1)) || - (parser.flow_level == 0 && - (parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == ':') && - !is_blankz(parser.buffer, parser.buffer_pos+1)) { - return yaml_parser_fetch_plain_scalar(parser) - } - - // If we don't determine the token type so far, it is an error. - return yaml_parser_set_scanner_error(parser, - "while scanning for the next token", parser.mark, - "found character that cannot start any token") -} - -// Check the list of potential simple keys and remove the positions that -// cannot contain simple keys anymore. -func yaml_parser_stale_simple_keys(parser *yaml_parser_t) bool { - // Check for a potential simple key for each flow level. - for i := range parser.simple_keys { - simple_key := &parser.simple_keys[i] - - // The specification requires that a simple key - // - // - is limited to a single line, - // - is shorter than 1024 characters. - if simple_key.possible && (simple_key.mark.line < parser.mark.line || simple_key.mark.index+1024 < parser.mark.index) { - - // Check if the potential simple key to be removed is required. - if simple_key.required { - return yaml_parser_set_scanner_error(parser, - "while scanning a simple key", simple_key.mark, - "could not find expected ':'") - } - simple_key.possible = false - } - } - return true -} - -// Check if a simple key may start at the current position and add it if -// needed. -func yaml_parser_save_simple_key(parser *yaml_parser_t) bool { - // A simple key is required at the current position if the scanner is in - // the block context and the current column coincides with the indentation - // level. - - required := parser.flow_level == 0 && parser.indent == parser.mark.column - - // A simple key is required only when it is the first token in the current - // line. Therefore it is always allowed. But we add a check anyway. - if required && !parser.simple_key_allowed { - panic("should not happen") - } - - // - // If the current position may start a simple key, save it. - // - if parser.simple_key_allowed { - simple_key := yaml_simple_key_t{ - possible: true, - required: required, - token_number: parser.tokens_parsed + (len(parser.tokens) - parser.tokens_head), - } - simple_key.mark = parser.mark - - if !yaml_parser_remove_simple_key(parser) { - return false - } - parser.simple_keys[len(parser.simple_keys)-1] = simple_key - } - return true -} - -// Remove a potential simple key at the current flow level. -func yaml_parser_remove_simple_key(parser *yaml_parser_t) bool { - i := len(parser.simple_keys) - 1 - if parser.simple_keys[i].possible { - // If the key is required, it is an error. - if parser.simple_keys[i].required { - return yaml_parser_set_scanner_error(parser, - "while scanning a simple key", parser.simple_keys[i].mark, - "could not find expected ':'") - } - } - // Remove the key from the stack. - parser.simple_keys[i].possible = false - return true -} - -// Increase the flow level and resize the simple key list if needed. -func yaml_parser_increase_flow_level(parser *yaml_parser_t) bool { - // Reset the simple key on the next level. - parser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{}) - - // Increase the flow level. - parser.flow_level++ - return true -} - -// Decrease the flow level. -func yaml_parser_decrease_flow_level(parser *yaml_parser_t) bool { - if parser.flow_level > 0 { - parser.flow_level-- - parser.simple_keys = parser.simple_keys[:len(parser.simple_keys)-1] - } - return true -} - -// Push the current indentation level to the stack and set the new level -// the current column is greater than the indentation level. In this case, -// append or insert the specified token into the token queue. -func yaml_parser_roll_indent(parser *yaml_parser_t, column, number int, typ yaml_token_type_t, mark yaml_mark_t) bool { - // In the flow context, do nothing. - if parser.flow_level > 0 { - return true - } - - if parser.indent < column { - // Push the current indentation level to the stack and set the new - // indentation level. - parser.indents = append(parser.indents, parser.indent) - parser.indent = column - - // Create a token and insert it into the queue. - token := yaml_token_t{ - typ: typ, - start_mark: mark, - end_mark: mark, - } - if number > -1 { - number -= parser.tokens_parsed - } - yaml_insert_token(parser, number, &token) - } - return true -} - -// Pop indentation levels from the indents stack until the current level -// becomes less or equal to the column. For each intendation level, append -// the BLOCK-END token. -func yaml_parser_unroll_indent(parser *yaml_parser_t, column int) bool { - // In the flow context, do nothing. - if parser.flow_level > 0 { - return true - } - - // Loop through the intendation levels in the stack. - for parser.indent > column { - // Create a token and append it to the queue. - token := yaml_token_t{ - typ: yaml_BLOCK_END_TOKEN, - start_mark: parser.mark, - end_mark: parser.mark, - } - yaml_insert_token(parser, -1, &token) - - // Pop the indentation level. - parser.indent = parser.indents[len(parser.indents)-1] - parser.indents = parser.indents[:len(parser.indents)-1] - } - return true -} - -// Initialize the scanner and produce the STREAM-START token. -func yaml_parser_fetch_stream_start(parser *yaml_parser_t) bool { - - // Set the initial indentation. - parser.indent = -1 - - // Initialize the simple key stack. - parser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{}) - - // A simple key is allowed at the beginning of the stream. - parser.simple_key_allowed = true - - // We have started. - parser.stream_start_produced = true - - // Create the STREAM-START token and append it to the queue. - token := yaml_token_t{ - typ: yaml_STREAM_START_TOKEN, - start_mark: parser.mark, - end_mark: parser.mark, - encoding: parser.encoding, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the STREAM-END token and shut down the scanner. -func yaml_parser_fetch_stream_end(parser *yaml_parser_t) bool { - - // Force new line. - if parser.mark.column != 0 { - parser.mark.column = 0 - parser.mark.line++ - } - - // Reset the indentation level. - if !yaml_parser_unroll_indent(parser, -1) { - return false - } - - // Reset simple keys. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - parser.simple_key_allowed = false - - // Create the STREAM-END token and append it to the queue. - token := yaml_token_t{ - typ: yaml_STREAM_END_TOKEN, - start_mark: parser.mark, - end_mark: parser.mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce a VERSION-DIRECTIVE or TAG-DIRECTIVE token. -func yaml_parser_fetch_directive(parser *yaml_parser_t) bool { - // Reset the indentation level. - if !yaml_parser_unroll_indent(parser, -1) { - return false - } - - // Reset simple keys. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - parser.simple_key_allowed = false - - // Create the YAML-DIRECTIVE or TAG-DIRECTIVE token. - token := yaml_token_t{} - if !yaml_parser_scan_directive(parser, &token) { - return false - } - // Append the token to the queue. - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the DOCUMENT-START or DOCUMENT-END token. -func yaml_parser_fetch_document_indicator(parser *yaml_parser_t, typ yaml_token_type_t) bool { - // Reset the indentation level. - if !yaml_parser_unroll_indent(parser, -1) { - return false - } - - // Reset simple keys. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - parser.simple_key_allowed = false - - // Consume the token. - start_mark := parser.mark - - skip(parser) - skip(parser) - skip(parser) - - end_mark := parser.mark - - // Create the DOCUMENT-START or DOCUMENT-END token. - token := yaml_token_t{ - typ: typ, - start_mark: start_mark, - end_mark: end_mark, - } - // Append the token to the queue. - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the FLOW-SEQUENCE-START or FLOW-MAPPING-START token. -func yaml_parser_fetch_flow_collection_start(parser *yaml_parser_t, typ yaml_token_type_t) bool { - // The indicators '[' and '{' may start a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // Increase the flow level. - if !yaml_parser_increase_flow_level(parser) { - return false - } - - // A simple key may follow the indicators '[' and '{'. - parser.simple_key_allowed = true - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the FLOW-SEQUENCE-START of FLOW-MAPPING-START token. - token := yaml_token_t{ - typ: typ, - start_mark: start_mark, - end_mark: end_mark, - } - // Append the token to the queue. - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the FLOW-SEQUENCE-END or FLOW-MAPPING-END token. -func yaml_parser_fetch_flow_collection_end(parser *yaml_parser_t, typ yaml_token_type_t) bool { - // Reset any potential simple key on the current flow level. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // Decrease the flow level. - if !yaml_parser_decrease_flow_level(parser) { - return false - } - - // No simple keys after the indicators ']' and '}'. - parser.simple_key_allowed = false - - // Consume the token. - - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the FLOW-SEQUENCE-END of FLOW-MAPPING-END token. - token := yaml_token_t{ - typ: typ, - start_mark: start_mark, - end_mark: end_mark, - } - // Append the token to the queue. - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the FLOW-ENTRY token. -func yaml_parser_fetch_flow_entry(parser *yaml_parser_t) bool { - // Reset any potential simple keys on the current flow level. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // Simple keys are allowed after ','. - parser.simple_key_allowed = true - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the FLOW-ENTRY token and append it to the queue. - token := yaml_token_t{ - typ: yaml_FLOW_ENTRY_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the BLOCK-ENTRY token. -func yaml_parser_fetch_block_entry(parser *yaml_parser_t) bool { - // Check if the scanner is in the block context. - if parser.flow_level == 0 { - // Check if we are allowed to start a new entry. - if !parser.simple_key_allowed { - return yaml_parser_set_scanner_error(parser, "", parser.mark, - "block sequence entries are not allowed in this context") - } - // Add the BLOCK-SEQUENCE-START token if needed. - if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_SEQUENCE_START_TOKEN, parser.mark) { - return false - } - } else { - // It is an error for the '-' indicator to occur in the flow context, - // but we let the Parser detect and report about it because the Parser - // is able to point to the context. - } - - // Reset any potential simple keys on the current flow level. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // Simple keys are allowed after '-'. - parser.simple_key_allowed = true - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the BLOCK-ENTRY token and append it to the queue. - token := yaml_token_t{ - typ: yaml_BLOCK_ENTRY_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the KEY token. -func yaml_parser_fetch_key(parser *yaml_parser_t) bool { - - // In the block context, additional checks are required. - if parser.flow_level == 0 { - // Check if we are allowed to start a new key (not nessesary simple). - if !parser.simple_key_allowed { - return yaml_parser_set_scanner_error(parser, "", parser.mark, - "mapping keys are not allowed in this context") - } - // Add the BLOCK-MAPPING-START token if needed. - if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_MAPPING_START_TOKEN, parser.mark) { - return false - } - } - - // Reset any potential simple keys on the current flow level. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // Simple keys are allowed after '?' in the block context. - parser.simple_key_allowed = parser.flow_level == 0 - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the KEY token and append it to the queue. - token := yaml_token_t{ - typ: yaml_KEY_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the VALUE token. -func yaml_parser_fetch_value(parser *yaml_parser_t) bool { - - simple_key := &parser.simple_keys[len(parser.simple_keys)-1] - - // Have we found a simple key? - if simple_key.possible { - // Create the KEY token and insert it into the queue. - token := yaml_token_t{ - typ: yaml_KEY_TOKEN, - start_mark: simple_key.mark, - end_mark: simple_key.mark, - } - yaml_insert_token(parser, simple_key.token_number-parser.tokens_parsed, &token) - - // In the block context, we may need to add the BLOCK-MAPPING-START token. - if !yaml_parser_roll_indent(parser, simple_key.mark.column, - simple_key.token_number, - yaml_BLOCK_MAPPING_START_TOKEN, simple_key.mark) { - return false - } - - // Remove the simple key. - simple_key.possible = false - - // A simple key cannot follow another simple key. - parser.simple_key_allowed = false - - } else { - // The ':' indicator follows a complex key. - - // In the block context, extra checks are required. - if parser.flow_level == 0 { - - // Check if we are allowed to start a complex value. - if !parser.simple_key_allowed { - return yaml_parser_set_scanner_error(parser, "", parser.mark, - "mapping values are not allowed in this context") - } - - // Add the BLOCK-MAPPING-START token if needed. - if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_MAPPING_START_TOKEN, parser.mark) { - return false - } - } - - // Simple keys after ':' are allowed in the block context. - parser.simple_key_allowed = parser.flow_level == 0 - } - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the VALUE token and append it to the queue. - token := yaml_token_t{ - typ: yaml_VALUE_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the ALIAS or ANCHOR token. -func yaml_parser_fetch_anchor(parser *yaml_parser_t, typ yaml_token_type_t) bool { - // An anchor or an alias could be a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // A simple key cannot follow an anchor or an alias. - parser.simple_key_allowed = false - - // Create the ALIAS or ANCHOR token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_anchor(parser, &token, typ) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the TAG token. -func yaml_parser_fetch_tag(parser *yaml_parser_t) bool { - // A tag could be a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // A simple key cannot follow a tag. - parser.simple_key_allowed = false - - // Create the TAG token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_tag(parser, &token) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the SCALAR(...,literal) or SCALAR(...,folded) tokens. -func yaml_parser_fetch_block_scalar(parser *yaml_parser_t, literal bool) bool { - // Remove any potential simple keys. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // A simple key may follow a block scalar. - parser.simple_key_allowed = true - - // Create the SCALAR token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_block_scalar(parser, &token, literal) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the SCALAR(...,single-quoted) or SCALAR(...,double-quoted) tokens. -func yaml_parser_fetch_flow_scalar(parser *yaml_parser_t, single bool) bool { - // A plain scalar could be a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // A simple key cannot follow a flow scalar. - parser.simple_key_allowed = false - - // Create the SCALAR token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_flow_scalar(parser, &token, single) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the SCALAR(...,plain) token. -func yaml_parser_fetch_plain_scalar(parser *yaml_parser_t) bool { - // A plain scalar could be a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // A simple key cannot follow a flow scalar. - parser.simple_key_allowed = false - - // Create the SCALAR token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_plain_scalar(parser, &token) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Eat whitespaces and comments until the next token is found. -func yaml_parser_scan_to_next_token(parser *yaml_parser_t) bool { - - // Until the next token is not found. - for { - // Allow the BOM mark to start a line. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if parser.mark.column == 0 && is_bom(parser.buffer, parser.buffer_pos) { - skip(parser) - } - - // Eat whitespaces. - // Tabs are allowed: - // - in the flow context - // - in the block context, but not at the beginning of the line or - // after '-', '?', or ':' (complex value). - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for parser.buffer[parser.buffer_pos] == ' ' || ((parser.flow_level > 0 || !parser.simple_key_allowed) && parser.buffer[parser.buffer_pos] == '\t') { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Eat a comment until a line break. - if parser.buffer[parser.buffer_pos] == '#' { - for !is_breakz(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - } - - // If it is a line break, eat it. - if is_break(parser.buffer, parser.buffer_pos) { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - skip_line(parser) - - // In the block context, a new line may start a simple key. - if parser.flow_level == 0 { - parser.simple_key_allowed = true - } - } else { - break // We have found a token. - } - } - - return true -} - -// Scan a YAML-DIRECTIVE or TAG-DIRECTIVE token. -// -// Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool { - // Eat '%'. - start_mark := parser.mark - skip(parser) - - // Scan the directive name. - var name []byte - if !yaml_parser_scan_directive_name(parser, start_mark, &name) { - return false - } - - // Is it a YAML directive? - if bytes.Equal(name, []byte("YAML")) { - // Scan the VERSION directive value. - var major, minor int8 - if !yaml_parser_scan_version_directive_value(parser, start_mark, &major, &minor) { - return false - } - end_mark := parser.mark - - // Create a VERSION-DIRECTIVE token. - *token = yaml_token_t{ - typ: yaml_VERSION_DIRECTIVE_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - major: major, - minor: minor, - } - - // Is it a TAG directive? - } else if bytes.Equal(name, []byte("TAG")) { - // Scan the TAG directive value. - var handle, prefix []byte - if !yaml_parser_scan_tag_directive_value(parser, start_mark, &handle, &prefix) { - return false - } - end_mark := parser.mark - - // Create a TAG-DIRECTIVE token. - *token = yaml_token_t{ - typ: yaml_TAG_DIRECTIVE_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: handle, - prefix: prefix, - } - - // Unknown directive. - } else { - yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "found uknown directive name") - return false - } - - // Eat the rest of the line including any comments. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - if parser.buffer[parser.buffer_pos] == '#' { - for !is_breakz(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - } - - // Check if we are at the end of the line. - if !is_breakz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "did not find expected comment or line break") - return false - } - - // Eat a line break. - if is_break(parser.buffer, parser.buffer_pos) { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - skip_line(parser) - } - - return true -} - -// Scan the directive name. -// -// Scope: -// %YAML 1.1 # a comment \n -// ^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^ -// -func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark_t, name *[]byte) bool { - // Consume the directive name. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - var s []byte - for is_alpha(parser.buffer, parser.buffer_pos) { - s = read(parser, s) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Check if the name is empty. - if len(s) == 0 { - yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "could not find expected directive name") - return false - } - - // Check for an blank character after the name. - if !is_blankz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "found unexpected non-alphabetical character") - return false - } - *name = s - return true -} - -// Scan the value of VERSION-DIRECTIVE. -// -// Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^ -func yaml_parser_scan_version_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, major, minor *int8) bool { - // Eat whitespaces. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Consume the major version number. - if !yaml_parser_scan_version_directive_number(parser, start_mark, major) { - return false - } - - // Eat '.'. - if parser.buffer[parser.buffer_pos] != '.' { - return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", - start_mark, "did not find expected digit or '.' character") - } - - skip(parser) - - // Consume the minor version number. - if !yaml_parser_scan_version_directive_number(parser, start_mark, minor) { - return false - } - return true -} - -const max_number_length = 2 - -// Scan the version number of VERSION-DIRECTIVE. -// -// Scope: -// %YAML 1.1 # a comment \n -// ^ -// %YAML 1.1 # a comment \n -// ^ -func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark yaml_mark_t, number *int8) bool { - - // Repeat while the next character is digit. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - var value, length int8 - for is_digit(parser.buffer, parser.buffer_pos) { - // Check if the number is too long. - length++ - if length > max_number_length { - return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", - start_mark, "found extremely long version number") - } - value = value*10 + int8(as_digit(parser.buffer, parser.buffer_pos)) - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Check if the number was present. - if length == 0 { - return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", - start_mark, "did not find expected version number") - } - *number = value - return true -} - -// Scan the value of a TAG-DIRECTIVE token. -// -// Scope: -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -func yaml_parser_scan_tag_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, handle, prefix *[]byte) bool { - var handle_value, prefix_value []byte - - // Eat whitespaces. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Scan a handle. - if !yaml_parser_scan_tag_handle(parser, true, start_mark, &handle_value) { - return false - } - - // Expect a whitespace. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if !is_blank(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a %TAG directive", - start_mark, "did not find expected whitespace") - return false - } - - // Eat whitespaces. - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Scan a prefix. - if !yaml_parser_scan_tag_uri(parser, true, nil, start_mark, &prefix_value) { - return false - } - - // Expect a whitespace or line break. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if !is_blankz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a %TAG directive", - start_mark, "did not find expected whitespace or line break") - return false - } - - *handle = handle_value - *prefix = prefix_value - return true -} - -func yaml_parser_scan_anchor(parser *yaml_parser_t, token *yaml_token_t, typ yaml_token_type_t) bool { - var s []byte - - // Eat the indicator character. - start_mark := parser.mark - skip(parser) - - // Consume the value. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for is_alpha(parser.buffer, parser.buffer_pos) { - s = read(parser, s) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - end_mark := parser.mark - - /* - * Check if length of the anchor is greater than 0 and it is followed by - * a whitespace character or one of the indicators: - * - * '?', ':', ',', ']', '}', '%', '@', '`'. - */ - - if len(s) == 0 || - !(is_blankz(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == '?' || - parser.buffer[parser.buffer_pos] == ':' || parser.buffer[parser.buffer_pos] == ',' || - parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '}' || - parser.buffer[parser.buffer_pos] == '%' || parser.buffer[parser.buffer_pos] == '@' || - parser.buffer[parser.buffer_pos] == '`') { - context := "while scanning an alias" - if typ == yaml_ANCHOR_TOKEN { - context = "while scanning an anchor" - } - yaml_parser_set_scanner_error(parser, context, start_mark, - "did not find expected alphabetic or numeric character") - return false - } - - // Create a token. - *token = yaml_token_t{ - typ: typ, - start_mark: start_mark, - end_mark: end_mark, - value: s, - } - - return true -} - -/* - * Scan a TAG token. - */ - -func yaml_parser_scan_tag(parser *yaml_parser_t, token *yaml_token_t) bool { - var handle, suffix []byte - - start_mark := parser.mark - - // Check if the tag is in the canonical form. - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - - if parser.buffer[parser.buffer_pos+1] == '<' { - // Keep the handle as '' - - // Eat '!<' - skip(parser) - skip(parser) - - // Consume the tag value. - if !yaml_parser_scan_tag_uri(parser, false, nil, start_mark, &suffix) { - return false - } - - // Check for '>' and eat it. - if parser.buffer[parser.buffer_pos] != '>' { - yaml_parser_set_scanner_error(parser, "while scanning a tag", - start_mark, "did not find the expected '>'") - return false - } - - skip(parser) - } else { - // The tag has either the '!suffix' or the '!handle!suffix' form. - - // First, try to scan a handle. - if !yaml_parser_scan_tag_handle(parser, false, start_mark, &handle) { - return false - } - - // Check if it is, indeed, handle. - if handle[0] == '!' && len(handle) > 1 && handle[len(handle)-1] == '!' { - // Scan the suffix now. - if !yaml_parser_scan_tag_uri(parser, false, nil, start_mark, &suffix) { - return false - } - } else { - // It wasn't a handle after all. Scan the rest of the tag. - if !yaml_parser_scan_tag_uri(parser, false, handle, start_mark, &suffix) { - return false - } - - // Set the handle to '!'. - handle = []byte{'!'} - - // A special case: the '!' tag. Set the handle to '' and the - // suffix to '!'. - if len(suffix) == 0 { - handle, suffix = suffix, handle - } - } - } - - // Check the character which ends the tag. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if !is_blankz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a tag", - start_mark, "did not find expected whitespace or line break") - return false - } - - end_mark := parser.mark - - // Create a token. - *token = yaml_token_t{ - typ: yaml_TAG_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: handle, - suffix: suffix, - } - return true -} - -// Scan a tag handle. -func yaml_parser_scan_tag_handle(parser *yaml_parser_t, directive bool, start_mark yaml_mark_t, handle *[]byte) bool { - // Check the initial '!' character. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if parser.buffer[parser.buffer_pos] != '!' { - yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "did not find expected '!'") - return false - } - - var s []byte - - // Copy the '!' character. - s = read(parser, s) - - // Copy all subsequent alphabetical and numerical characters. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - for is_alpha(parser.buffer, parser.buffer_pos) { - s = read(parser, s) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Check if the trailing character is '!' and copy it. - if parser.buffer[parser.buffer_pos] == '!' { - s = read(parser, s) - } else { - // It's either the '!' tag or not really a tag handle. If it's a %TAG - // directive, it's an error. If it's a tag token, it must be a part of URI. - if directive && !(s[0] == '!' && s[1] == 0) { - yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "did not find expected '!'") - return false - } - } - - *handle = s - return true -} - -// Scan a tag. -func yaml_parser_scan_tag_uri(parser *yaml_parser_t, directive bool, head []byte, start_mark yaml_mark_t, uri *[]byte) bool { - //size_t length = head ? strlen((char *)head) : 0 - var s []byte - - // Copy the head if needed. - // - // Note that we don't copy the leading '!' character. - if len(head) > 1 { - s = append(s, head[1:]...) - } - - // Scan the tag. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - // The set of characters that may appear in URI is as follows: - // - // '0'-'9', 'A'-'Z', 'a'-'z', '_', '-', ';', '/', '?', ':', '@', '&', - // '=', '+', '$', ',', '.', '!', '~', '*', '\'', '(', ')', '[', ']', - // '%'. - // [Go] Convert this into more reasonable logic. - for is_alpha(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == ';' || - parser.buffer[parser.buffer_pos] == '/' || parser.buffer[parser.buffer_pos] == '?' || - parser.buffer[parser.buffer_pos] == ':' || parser.buffer[parser.buffer_pos] == '@' || - parser.buffer[parser.buffer_pos] == '&' || parser.buffer[parser.buffer_pos] == '=' || - parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '$' || - parser.buffer[parser.buffer_pos] == ',' || parser.buffer[parser.buffer_pos] == '.' || - parser.buffer[parser.buffer_pos] == '!' || parser.buffer[parser.buffer_pos] == '~' || - parser.buffer[parser.buffer_pos] == '*' || parser.buffer[parser.buffer_pos] == '\'' || - parser.buffer[parser.buffer_pos] == '(' || parser.buffer[parser.buffer_pos] == ')' || - parser.buffer[parser.buffer_pos] == '[' || parser.buffer[parser.buffer_pos] == ']' || - parser.buffer[parser.buffer_pos] == '%' { - // Check if it is a URI-escape sequence. - if parser.buffer[parser.buffer_pos] == '%' { - if !yaml_parser_scan_uri_escapes(parser, directive, start_mark, &s) { - return false - } - } else { - s = read(parser, s) - } - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Check if the tag is non-empty. - if len(s) == 0 { - yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "did not find expected tag URI") - return false - } - *uri = s - return true -} - -// Decode an URI-escape sequence corresponding to a single UTF-8 character. -func yaml_parser_scan_uri_escapes(parser *yaml_parser_t, directive bool, start_mark yaml_mark_t, s *[]byte) bool { - - // Decode the required number of characters. - w := 1024 - for w > 0 { - // Check for a URI-escaped octet. - if parser.unread < 3 && !yaml_parser_update_buffer(parser, 3) { - return false - } - - if !(parser.buffer[parser.buffer_pos] == '%' && - is_hex(parser.buffer, parser.buffer_pos+1) && - is_hex(parser.buffer, parser.buffer_pos+2)) { - return yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "did not find URI escaped octet") - } - - // Get the octet. - octet := byte((as_hex(parser.buffer, parser.buffer_pos+1) << 4) + as_hex(parser.buffer, parser.buffer_pos+2)) - - // If it is the leading octet, determine the length of the UTF-8 sequence. - if w == 1024 { - w = width(octet) - if w == 0 { - return yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "found an incorrect leading UTF-8 octet") - } - } else { - // Check if the trailing octet is correct. - if octet&0xC0 != 0x80 { - return yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "found an incorrect trailing UTF-8 octet") - } - } - - // Copy the octet and move the pointers. - *s = append(*s, octet) - skip(parser) - skip(parser) - skip(parser) - w-- - } - return true -} - -// Scan a block scalar. -func yaml_parser_scan_block_scalar(parser *yaml_parser_t, token *yaml_token_t, literal bool) bool { - // Eat the indicator '|' or '>'. - start_mark := parser.mark - skip(parser) - - // Scan the additional block scalar indicators. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - // Check for a chomping indicator. - var chomping, increment int - if parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '-' { - // Set the chomping method and eat the indicator. - if parser.buffer[parser.buffer_pos] == '+' { - chomping = +1 - } else { - chomping = -1 - } - skip(parser) - - // Check for an indentation indicator. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if is_digit(parser.buffer, parser.buffer_pos) { - // Check that the intendation is greater than 0. - if parser.buffer[parser.buffer_pos] == '0' { - yaml_parser_set_scanner_error(parser, "while scanning a block scalar", - start_mark, "found an intendation indicator equal to 0") - return false - } - - // Get the intendation level and eat the indicator. - increment = as_digit(parser.buffer, parser.buffer_pos) - skip(parser) - } - - } else if is_digit(parser.buffer, parser.buffer_pos) { - // Do the same as above, but in the opposite order. - - if parser.buffer[parser.buffer_pos] == '0' { - yaml_parser_set_scanner_error(parser, "while scanning a block scalar", - start_mark, "found an intendation indicator equal to 0") - return false - } - increment = as_digit(parser.buffer, parser.buffer_pos) - skip(parser) - - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '-' { - if parser.buffer[parser.buffer_pos] == '+' { - chomping = +1 - } else { - chomping = -1 - } - skip(parser) - } - } - - // Eat whitespaces and comments to the end of the line. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - if parser.buffer[parser.buffer_pos] == '#' { - for !is_breakz(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - } - - // Check if we are at the end of the line. - if !is_breakz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a block scalar", - start_mark, "did not find expected comment or line break") - return false - } - - // Eat a line break. - if is_break(parser.buffer, parser.buffer_pos) { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - skip_line(parser) - } - - end_mark := parser.mark - - // Set the intendation level if it was specified. - var indent int - if increment > 0 { - if parser.indent >= 0 { - indent = parser.indent + increment - } else { - indent = increment - } - } - - // Scan the leading line breaks and determine the indentation level if needed. - var s, leading_break, trailing_breaks []byte - if !yaml_parser_scan_block_scalar_breaks(parser, &indent, &trailing_breaks, start_mark, &end_mark) { - return false - } - - // Scan the block scalar content. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - var leading_blank, trailing_blank bool - for parser.mark.column == indent && !is_z(parser.buffer, parser.buffer_pos) { - // We are at the beginning of a non-empty line. - - // Is it a trailing whitespace? - trailing_blank = is_blank(parser.buffer, parser.buffer_pos) - - // Check if we need to fold the leading line break. - if !literal && !leading_blank && !trailing_blank && len(leading_break) > 0 && leading_break[0] == '\n' { - // Do we need to join the lines by space? - if len(trailing_breaks) == 0 { - s = append(s, ' ') - } - } else { - s = append(s, leading_break...) - } - leading_break = leading_break[:0] - - // Append the remaining line breaks. - s = append(s, trailing_breaks...) - trailing_breaks = trailing_breaks[:0] - - // Is it a leading whitespace? - leading_blank = is_blank(parser.buffer, parser.buffer_pos) - - // Consume the current line. - for !is_breakz(parser.buffer, parser.buffer_pos) { - s = read(parser, s) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Consume the line break. - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - - leading_break = read_line(parser, leading_break) - - // Eat the following intendation spaces and line breaks. - if !yaml_parser_scan_block_scalar_breaks(parser, &indent, &trailing_breaks, start_mark, &end_mark) { - return false - } - } - - // Chomp the tail. - if chomping != -1 { - s = append(s, leading_break...) - } - if chomping == 1 { - s = append(s, trailing_breaks...) - } - - // Create a token. - *token = yaml_token_t{ - typ: yaml_SCALAR_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: s, - style: yaml_LITERAL_SCALAR_STYLE, - } - if !literal { - token.style = yaml_FOLDED_SCALAR_STYLE - } - return true -} - -// Scan intendation spaces and line breaks for a block scalar. Determine the -// intendation level if needed. -func yaml_parser_scan_block_scalar_breaks(parser *yaml_parser_t, indent *int, breaks *[]byte, start_mark yaml_mark_t, end_mark *yaml_mark_t) bool { - *end_mark = parser.mark - - // Eat the intendation spaces and line breaks. - max_indent := 0 - for { - // Eat the intendation spaces. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - for (*indent == 0 || parser.mark.column < *indent) && is_space(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - if parser.mark.column > max_indent { - max_indent = parser.mark.column - } - - // Check for a tab character messing the intendation. - if (*indent == 0 || parser.mark.column < *indent) && is_tab(parser.buffer, parser.buffer_pos) { - return yaml_parser_set_scanner_error(parser, "while scanning a block scalar", - start_mark, "found a tab character where an intendation space is expected") - } - - // Have we found a non-empty line? - if !is_break(parser.buffer, parser.buffer_pos) { - break - } - - // Consume the line break. - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - // [Go] Should really be returning breaks instead. - *breaks = read_line(parser, *breaks) - *end_mark = parser.mark - } - - // Determine the indentation level if needed. - if *indent == 0 { - *indent = max_indent - if *indent < parser.indent+1 { - *indent = parser.indent + 1 - } - if *indent < 1 { - *indent = 1 - } - } - return true -} - -// Scan a quoted scalar. -func yaml_parser_scan_flow_scalar(parser *yaml_parser_t, token *yaml_token_t, single bool) bool { - // Eat the left quote. - start_mark := parser.mark - skip(parser) - - // Consume the content of the quoted scalar. - var s, leading_break, trailing_breaks, whitespaces []byte - for { - // Check that there are no document indicators at the beginning of the line. - if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { - return false - } - - if parser.mark.column == 0 && - ((parser.buffer[parser.buffer_pos+0] == '-' && - parser.buffer[parser.buffer_pos+1] == '-' && - parser.buffer[parser.buffer_pos+2] == '-') || - (parser.buffer[parser.buffer_pos+0] == '.' && - parser.buffer[parser.buffer_pos+1] == '.' && - parser.buffer[parser.buffer_pos+2] == '.')) && - is_blankz(parser.buffer, parser.buffer_pos+3) { - yaml_parser_set_scanner_error(parser, "while scanning a quoted scalar", - start_mark, "found unexpected document indicator") - return false - } - - // Check for EOF. - if is_z(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a quoted scalar", - start_mark, "found unexpected end of stream") - return false - } - - // Consume non-blank characters. - leading_blanks := false - for !is_blankz(parser.buffer, parser.buffer_pos) { - if single && parser.buffer[parser.buffer_pos] == '\'' && parser.buffer[parser.buffer_pos+1] == '\'' { - // Is is an escaped single quote. - s = append(s, '\'') - skip(parser) - skip(parser) - - } else if single && parser.buffer[parser.buffer_pos] == '\'' { - // It is a right single quote. - break - } else if !single && parser.buffer[parser.buffer_pos] == '"' { - // It is a right double quote. - break - - } else if !single && parser.buffer[parser.buffer_pos] == '\\' && is_break(parser.buffer, parser.buffer_pos+1) { - // It is an escaped line break. - if parser.unread < 3 && !yaml_parser_update_buffer(parser, 3) { - return false - } - skip(parser) - skip_line(parser) - leading_blanks = true - break - - } else if !single && parser.buffer[parser.buffer_pos] == '\\' { - // It is an escape sequence. - code_length := 0 - - // Check the escape character. - switch parser.buffer[parser.buffer_pos+1] { - case '0': - s = append(s, 0) - case 'a': - s = append(s, '\x07') - case 'b': - s = append(s, '\x08') - case 't', '\t': - s = append(s, '\x09') - case 'n': - s = append(s, '\x0A') - case 'v': - s = append(s, '\x0B') - case 'f': - s = append(s, '\x0C') - case 'r': - s = append(s, '\x0D') - case 'e': - s = append(s, '\x1B') - case ' ': - s = append(s, '\x20') - case '"': - s = append(s, '"') - case '\'': - s = append(s, '\'') - case '\\': - s = append(s, '\\') - case 'N': // NEL (#x85) - s = append(s, '\xC2') - s = append(s, '\x85') - case '_': // #xA0 - s = append(s, '\xC2') - s = append(s, '\xA0') - case 'L': // LS (#x2028) - s = append(s, '\xE2') - s = append(s, '\x80') - s = append(s, '\xA8') - case 'P': // PS (#x2029) - s = append(s, '\xE2') - s = append(s, '\x80') - s = append(s, '\xA9') - case 'x': - code_length = 2 - case 'u': - code_length = 4 - case 'U': - code_length = 8 - default: - yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", - start_mark, "found unknown escape character") - return false - } - - skip(parser) - skip(parser) - - // Consume an arbitrary escape code. - if code_length > 0 { - var value int - - // Scan the character value. - if parser.unread < code_length && !yaml_parser_update_buffer(parser, code_length) { - return false - } - for k := 0; k < code_length; k++ { - if !is_hex(parser.buffer, parser.buffer_pos+k) { - yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", - start_mark, "did not find expected hexdecimal number") - return false - } - value = (value << 4) + as_hex(parser.buffer, parser.buffer_pos+k) - } - - // Check the value and write the character. - if (value >= 0xD800 && value <= 0xDFFF) || value > 0x10FFFF { - yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", - start_mark, "found invalid Unicode character escape code") - return false - } - if value <= 0x7F { - s = append(s, byte(value)) - } else if value <= 0x7FF { - s = append(s, byte(0xC0+(value>>6))) - s = append(s, byte(0x80+(value&0x3F))) - } else if value <= 0xFFFF { - s = append(s, byte(0xE0+(value>>12))) - s = append(s, byte(0x80+((value>>6)&0x3F))) - s = append(s, byte(0x80+(value&0x3F))) - } else { - s = append(s, byte(0xF0+(value>>18))) - s = append(s, byte(0x80+((value>>12)&0x3F))) - s = append(s, byte(0x80+((value>>6)&0x3F))) - s = append(s, byte(0x80+(value&0x3F))) - } - - // Advance the pointer. - for k := 0; k < code_length; k++ { - skip(parser) - } - } - } else { - // It is a non-escaped non-blank character. - s = read(parser, s) - } - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - } - - // Check if we are at the end of the scalar. - if single { - if parser.buffer[parser.buffer_pos] == '\'' { - break - } - } else { - if parser.buffer[parser.buffer_pos] == '"' { - break - } - } - - // Consume blank characters. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos) { - if is_blank(parser.buffer, parser.buffer_pos) { - // Consume a space or a tab character. - if !leading_blanks { - whitespaces = read(parser, whitespaces) - } else { - skip(parser) - } - } else { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - - // Check if it is a first line break. - if !leading_blanks { - whitespaces = whitespaces[:0] - leading_break = read_line(parser, leading_break) - leading_blanks = true - } else { - trailing_breaks = read_line(parser, trailing_breaks) - } - } - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Join the whitespaces or fold line breaks. - if leading_blanks { - // Do we need to fold line breaks? - if len(leading_break) > 0 && leading_break[0] == '\n' { - if len(trailing_breaks) == 0 { - s = append(s, ' ') - } else { - s = append(s, trailing_breaks...) - } - } else { - s = append(s, leading_break...) - s = append(s, trailing_breaks...) - } - trailing_breaks = trailing_breaks[:0] - leading_break = leading_break[:0] - } else { - s = append(s, whitespaces...) - whitespaces = whitespaces[:0] - } - } - - // Eat the right quote. - skip(parser) - end_mark := parser.mark - - // Create a token. - *token = yaml_token_t{ - typ: yaml_SCALAR_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: s, - style: yaml_SINGLE_QUOTED_SCALAR_STYLE, - } - if !single { - token.style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - return true -} - -// Scan a plain scalar. -func yaml_parser_scan_plain_scalar(parser *yaml_parser_t, token *yaml_token_t) bool { - - var s, leading_break, trailing_breaks, whitespaces []byte - var leading_blanks bool - var indent = parser.indent + 1 - - start_mark := parser.mark - end_mark := parser.mark - - // Consume the content of the plain scalar. - for { - // Check for a document indicator. - if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { - return false - } - if parser.mark.column == 0 && - ((parser.buffer[parser.buffer_pos+0] == '-' && - parser.buffer[parser.buffer_pos+1] == '-' && - parser.buffer[parser.buffer_pos+2] == '-') || - (parser.buffer[parser.buffer_pos+0] == '.' && - parser.buffer[parser.buffer_pos+1] == '.' && - parser.buffer[parser.buffer_pos+2] == '.')) && - is_blankz(parser.buffer, parser.buffer_pos+3) { - break - } - - // Check for a comment. - if parser.buffer[parser.buffer_pos] == '#' { - break - } - - // Consume non-blank characters. - for !is_blankz(parser.buffer, parser.buffer_pos) { - - // Check for 'x:x' in the flow context. TODO: Fix the test "spec-08-13". - if parser.flow_level > 0 && - parser.buffer[parser.buffer_pos] == ':' && - !is_blankz(parser.buffer, parser.buffer_pos+1) { - yaml_parser_set_scanner_error(parser, "while scanning a plain scalar", - start_mark, "found unexpected ':'") - return false - } - - // Check for indicators that may end a plain scalar. - if (parser.buffer[parser.buffer_pos] == ':' && is_blankz(parser.buffer, parser.buffer_pos+1)) || - (parser.flow_level > 0 && - (parser.buffer[parser.buffer_pos] == ',' || parser.buffer[parser.buffer_pos] == ':' || - parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == '[' || - parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '{' || - parser.buffer[parser.buffer_pos] == '}')) { - break - } - - // Check if we need to join whitespaces and breaks. - if leading_blanks || len(whitespaces) > 0 { - if leading_blanks { - // Do we need to fold line breaks? - if leading_break[0] == '\n' { - if len(trailing_breaks) == 0 { - s = append(s, ' ') - } else { - s = append(s, trailing_breaks...) - } - } else { - s = append(s, leading_break...) - s = append(s, trailing_breaks...) - } - trailing_breaks = trailing_breaks[:0] - leading_break = leading_break[:0] - leading_blanks = false - } else { - s = append(s, whitespaces...) - whitespaces = whitespaces[:0] - } - } - - // Copy the character. - s = read(parser, s) - - end_mark = parser.mark - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - } - - // Is it the end? - if !(is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos)) { - break - } - - // Consume blank characters. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos) { - if is_blank(parser.buffer, parser.buffer_pos) { - - // Check for tab character that abuse intendation. - if leading_blanks && parser.mark.column < indent && is_tab(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a plain scalar", - start_mark, "found a tab character that violate intendation") - return false - } - - // Consume a space or a tab character. - if !leading_blanks { - whitespaces = read(parser, whitespaces) - } else { - skip(parser) - } - } else { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - - // Check if it is a first line break. - if !leading_blanks { - whitespaces = whitespaces[:0] - leading_break = read_line(parser, leading_break) - leading_blanks = true - } else { - trailing_breaks = read_line(parser, trailing_breaks) - } - } - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Check intendation level. - if parser.flow_level == 0 && parser.mark.column < indent { - break - } - } - - // Create a token. - *token = yaml_token_t{ - typ: yaml_SCALAR_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: s, - style: yaml_PLAIN_SCALAR_STYLE, - } - - // Note that we change the 'simple_key_allowed' flag. - if leading_blanks { - parser.simple_key_allowed = true - } - return true -} diff --git a/internal/gopkg.in/yaml.v2/sorter.go b/internal/gopkg.in/yaml.v2/sorter.go deleted file mode 100644 index 5958822..0000000 --- a/internal/gopkg.in/yaml.v2/sorter.go +++ /dev/null @@ -1,104 +0,0 @@ -package yaml - -import ( - "reflect" - "unicode" -) - -type keyList []reflect.Value - -func (l keyList) Len() int { return len(l) } -func (l keyList) Swap(i, j int) { l[i], l[j] = l[j], l[i] } -func (l keyList) Less(i, j int) bool { - a := l[i] - b := l[j] - ak := a.Kind() - bk := b.Kind() - for (ak == reflect.Interface || ak == reflect.Ptr) && !a.IsNil() { - a = a.Elem() - ak = a.Kind() - } - for (bk == reflect.Interface || bk == reflect.Ptr) && !b.IsNil() { - b = b.Elem() - bk = b.Kind() - } - af, aok := keyFloat(a) - bf, bok := keyFloat(b) - if aok && bok { - if af != bf { - return af < bf - } - if ak != bk { - return ak < bk - } - return numLess(a, b) - } - if ak != reflect.String || bk != reflect.String { - return ak < bk - } - ar, br := []rune(a.String()), []rune(b.String()) - for i := 0; i < len(ar) && i < len(br); i++ { - if ar[i] == br[i] { - continue - } - al := unicode.IsLetter(ar[i]) - bl := unicode.IsLetter(br[i]) - if al && bl { - return ar[i] < br[i] - } - if al || bl { - return bl - } - var ai, bi int - var an, bn int64 - for ai = i; ai < len(ar) && unicode.IsDigit(ar[ai]); ai++ { - an = an*10 + int64(ar[ai]-'0') - } - for bi = i; bi < len(br) && unicode.IsDigit(br[bi]); bi++ { - bn = bn*10 + int64(br[bi]-'0') - } - if an != bn { - return an < bn - } - if ai != bi { - return ai < bi - } - return ar[i] < br[i] - } - return len(ar) < len(br) -} - -// keyFloat returns a float value for v if it is a number/bool -// and whether it is a number/bool or not. -func keyFloat(v reflect.Value) (f float64, ok bool) { - switch v.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return float64(v.Int()), true - case reflect.Float32, reflect.Float64: - return v.Float(), true - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return float64(v.Uint()), true - case reflect.Bool: - if v.Bool() { - return 1, true - } - return 0, true - } - return 0, false -} - -// numLess returns whether a < b. -// a and b must necessarily have the same kind. -func numLess(a, b reflect.Value) bool { - switch a.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return a.Int() < b.Int() - case reflect.Float32, reflect.Float64: - return a.Float() < b.Float() - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return a.Uint() < b.Uint() - case reflect.Bool: - return !a.Bool() && b.Bool() - } - panic("not a number") -} diff --git a/internal/gopkg.in/yaml.v2/suite_test.go b/internal/gopkg.in/yaml.v2/suite_test.go deleted file mode 100644 index c5cf1ed..0000000 --- a/internal/gopkg.in/yaml.v2/suite_test.go +++ /dev/null @@ -1,12 +0,0 @@ -package yaml_test - -import ( - . "gopkg.in/check.v1" - "testing" -) - -func Test(t *testing.T) { TestingT(t) } - -type S struct{} - -var _ = Suite(&S{}) diff --git a/internal/gopkg.in/yaml.v2/writerc.go b/internal/gopkg.in/yaml.v2/writerc.go deleted file mode 100644 index 190362f..0000000 --- a/internal/gopkg.in/yaml.v2/writerc.go +++ /dev/null @@ -1,89 +0,0 @@ -package yaml - -// Set the writer error and return false. -func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool { - emitter.error = yaml_WRITER_ERROR - emitter.problem = problem - return false -} - -// Flush the output buffer. -func yaml_emitter_flush(emitter *yaml_emitter_t) bool { - if emitter.write_handler == nil { - panic("write handler not set") - } - - // Check if the buffer is empty. - if emitter.buffer_pos == 0 { - return true - } - - // If the output encoding is UTF-8, we don't need to recode the buffer. - if emitter.encoding == yaml_UTF8_ENCODING { - if err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil { - return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error()) - } - emitter.buffer_pos = 0 - return true - } - - // Recode the buffer into the raw buffer. - var low, high int - if emitter.encoding == yaml_UTF16LE_ENCODING { - low, high = 0, 1 - } else { - high, low = 1, 0 - } - - pos := 0 - for pos < emitter.buffer_pos { - // See the "reader.c" code for more details on UTF-8 encoding. Note - // that we assume that the buffer contains a valid UTF-8 sequence. - - // Read the next UTF-8 character. - octet := emitter.buffer[pos] - - var w int - var value rune - switch { - case octet&0x80 == 0x00: - w, value = 1, rune(octet&0x7F) - case octet&0xE0 == 0xC0: - w, value = 2, rune(octet&0x1F) - case octet&0xF0 == 0xE0: - w, value = 3, rune(octet&0x0F) - case octet&0xF8 == 0xF0: - w, value = 4, rune(octet&0x07) - } - for k := 1; k < w; k++ { - octet = emitter.buffer[pos+k] - value = (value << 6) + (rune(octet) & 0x3F) - } - pos += w - - // Write the character. - if value < 0x10000 { - var b [2]byte - b[high] = byte(value >> 8) - b[low] = byte(value & 0xFF) - emitter.raw_buffer = append(emitter.raw_buffer, b[0], b[1]) - } else { - // Write the character using a surrogate pair (check "reader.c"). - var b [4]byte - value -= 0x10000 - b[high] = byte(0xD8 + (value >> 18)) - b[low] = byte((value >> 10) & 0xFF) - b[high+2] = byte(0xDC + ((value >> 8) & 0xFF)) - b[low+2] = byte(value & 0xFF) - emitter.raw_buffer = append(emitter.raw_buffer, b[0], b[1], b[2], b[3]) - } - } - - // Write the raw buffer. - if err := emitter.write_handler(emitter, emitter.raw_buffer); err != nil { - return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error()) - } - emitter.buffer_pos = 0 - emitter.raw_buffer = emitter.raw_buffer[:0] - return true -} diff --git a/internal/gopkg.in/yaml.v2/yamlh.go b/internal/gopkg.in/yaml.v2/yamlh.go deleted file mode 100644 index d60a6b6..0000000 --- a/internal/gopkg.in/yaml.v2/yamlh.go +++ /dev/null @@ -1,716 +0,0 @@ -package yaml - -import ( - "io" -) - -// The version directive data. -type yaml_version_directive_t struct { - major int8 // The major version number. - minor int8 // The minor version number. -} - -// The tag directive data. -type yaml_tag_directive_t struct { - handle []byte // The tag handle. - prefix []byte // The tag prefix. -} - -type yaml_encoding_t int - -// The stream encoding. -const ( - // Let the parser choose the encoding. - yaml_ANY_ENCODING yaml_encoding_t = iota - - yaml_UTF8_ENCODING // The default UTF-8 encoding. - yaml_UTF16LE_ENCODING // The UTF-16-LE encoding with BOM. - yaml_UTF16BE_ENCODING // The UTF-16-BE encoding with BOM. -) - -type yaml_break_t int - -// Line break types. -const ( - // Let the parser choose the break type. - yaml_ANY_BREAK yaml_break_t = iota - - yaml_CR_BREAK // Use CR for line breaks (Mac style). - yaml_LN_BREAK // Use LN for line breaks (Unix style). - yaml_CRLN_BREAK // Use CR LN for line breaks (DOS style). -) - -type yaml_error_type_t int - -// Many bad things could happen with the parser and emitter. -const ( - // No error is produced. - yaml_NO_ERROR yaml_error_type_t = iota - - yaml_MEMORY_ERROR // Cannot allocate or reallocate a block of memory. - yaml_READER_ERROR // Cannot read or decode the input stream. - yaml_SCANNER_ERROR // Cannot scan the input stream. - yaml_PARSER_ERROR // Cannot parse the input stream. - yaml_COMPOSER_ERROR // Cannot compose a YAML document. - yaml_WRITER_ERROR // Cannot write to the output stream. - yaml_EMITTER_ERROR // Cannot emit a YAML stream. -) - -// The pointer position. -type yaml_mark_t struct { - index int // The position index. - line int // The position line. - column int // The position column. -} - -// Node Styles - -type yaml_style_t int8 - -type yaml_scalar_style_t yaml_style_t - -// Scalar styles. -const ( - // Let the emitter choose the style. - yaml_ANY_SCALAR_STYLE yaml_scalar_style_t = iota - - yaml_PLAIN_SCALAR_STYLE // The plain scalar style. - yaml_SINGLE_QUOTED_SCALAR_STYLE // The single-quoted scalar style. - yaml_DOUBLE_QUOTED_SCALAR_STYLE // The double-quoted scalar style. - yaml_LITERAL_SCALAR_STYLE // The literal scalar style. - yaml_FOLDED_SCALAR_STYLE // The folded scalar style. -) - -type yaml_sequence_style_t yaml_style_t - -// Sequence styles. -const ( - // Let the emitter choose the style. - yaml_ANY_SEQUENCE_STYLE yaml_sequence_style_t = iota - - yaml_BLOCK_SEQUENCE_STYLE // The block sequence style. - yaml_FLOW_SEQUENCE_STYLE // The flow sequence style. -) - -type yaml_mapping_style_t yaml_style_t - -// Mapping styles. -const ( - // Let the emitter choose the style. - yaml_ANY_MAPPING_STYLE yaml_mapping_style_t = iota - - yaml_BLOCK_MAPPING_STYLE // The block mapping style. - yaml_FLOW_MAPPING_STYLE // The flow mapping style. -) - -// Tokens - -type yaml_token_type_t int - -// Token types. -const ( - // An empty token. - yaml_NO_TOKEN yaml_token_type_t = iota - - yaml_STREAM_START_TOKEN // A STREAM-START token. - yaml_STREAM_END_TOKEN // A STREAM-END token. - - yaml_VERSION_DIRECTIVE_TOKEN // A VERSION-DIRECTIVE token. - yaml_TAG_DIRECTIVE_TOKEN // A TAG-DIRECTIVE token. - yaml_DOCUMENT_START_TOKEN // A DOCUMENT-START token. - yaml_DOCUMENT_END_TOKEN // A DOCUMENT-END token. - - yaml_BLOCK_SEQUENCE_START_TOKEN // A BLOCK-SEQUENCE-START token. - yaml_BLOCK_MAPPING_START_TOKEN // A BLOCK-SEQUENCE-END token. - yaml_BLOCK_END_TOKEN // A BLOCK-END token. - - yaml_FLOW_SEQUENCE_START_TOKEN // A FLOW-SEQUENCE-START token. - yaml_FLOW_SEQUENCE_END_TOKEN // A FLOW-SEQUENCE-END token. - yaml_FLOW_MAPPING_START_TOKEN // A FLOW-MAPPING-START token. - yaml_FLOW_MAPPING_END_TOKEN // A FLOW-MAPPING-END token. - - yaml_BLOCK_ENTRY_TOKEN // A BLOCK-ENTRY token. - yaml_FLOW_ENTRY_TOKEN // A FLOW-ENTRY token. - yaml_KEY_TOKEN // A KEY token. - yaml_VALUE_TOKEN // A VALUE token. - - yaml_ALIAS_TOKEN // An ALIAS token. - yaml_ANCHOR_TOKEN // An ANCHOR token. - yaml_TAG_TOKEN // A TAG token. - yaml_SCALAR_TOKEN // A SCALAR token. -) - -func (tt yaml_token_type_t) String() string { - switch tt { - case yaml_NO_TOKEN: - return "yaml_NO_TOKEN" - case yaml_STREAM_START_TOKEN: - return "yaml_STREAM_START_TOKEN" - case yaml_STREAM_END_TOKEN: - return "yaml_STREAM_END_TOKEN" - case yaml_VERSION_DIRECTIVE_TOKEN: - return "yaml_VERSION_DIRECTIVE_TOKEN" - case yaml_TAG_DIRECTIVE_TOKEN: - return "yaml_TAG_DIRECTIVE_TOKEN" - case yaml_DOCUMENT_START_TOKEN: - return "yaml_DOCUMENT_START_TOKEN" - case yaml_DOCUMENT_END_TOKEN: - return "yaml_DOCUMENT_END_TOKEN" - case yaml_BLOCK_SEQUENCE_START_TOKEN: - return "yaml_BLOCK_SEQUENCE_START_TOKEN" - case yaml_BLOCK_MAPPING_START_TOKEN: - return "yaml_BLOCK_MAPPING_START_TOKEN" - case yaml_BLOCK_END_TOKEN: - return "yaml_BLOCK_END_TOKEN" - case yaml_FLOW_SEQUENCE_START_TOKEN: - return "yaml_FLOW_SEQUENCE_START_TOKEN" - case yaml_FLOW_SEQUENCE_END_TOKEN: - return "yaml_FLOW_SEQUENCE_END_TOKEN" - case yaml_FLOW_MAPPING_START_TOKEN: - return "yaml_FLOW_MAPPING_START_TOKEN" - case yaml_FLOW_MAPPING_END_TOKEN: - return "yaml_FLOW_MAPPING_END_TOKEN" - case yaml_BLOCK_ENTRY_TOKEN: - return "yaml_BLOCK_ENTRY_TOKEN" - case yaml_FLOW_ENTRY_TOKEN: - return "yaml_FLOW_ENTRY_TOKEN" - case yaml_KEY_TOKEN: - return "yaml_KEY_TOKEN" - case yaml_VALUE_TOKEN: - return "yaml_VALUE_TOKEN" - case yaml_ALIAS_TOKEN: - return "yaml_ALIAS_TOKEN" - case yaml_ANCHOR_TOKEN: - return "yaml_ANCHOR_TOKEN" - case yaml_TAG_TOKEN: - return "yaml_TAG_TOKEN" - case yaml_SCALAR_TOKEN: - return "yaml_SCALAR_TOKEN" - } - return "" -} - -// The token structure. -type yaml_token_t struct { - // The token type. - typ yaml_token_type_t - - // The start/end of the token. - start_mark, end_mark yaml_mark_t - - // The stream encoding (for yaml_STREAM_START_TOKEN). - encoding yaml_encoding_t - - // The alias/anchor/scalar value or tag/tag directive handle - // (for yaml_ALIAS_TOKEN, yaml_ANCHOR_TOKEN, yaml_SCALAR_TOKEN, yaml_TAG_TOKEN, yaml_TAG_DIRECTIVE_TOKEN). - value []byte - - // The tag suffix (for yaml_TAG_TOKEN). - suffix []byte - - // The tag directive prefix (for yaml_TAG_DIRECTIVE_TOKEN). - prefix []byte - - // The scalar style (for yaml_SCALAR_TOKEN). - style yaml_scalar_style_t - - // The version directive major/minor (for yaml_VERSION_DIRECTIVE_TOKEN). - major, minor int8 -} - -// Events - -type yaml_event_type_t int8 - -// Event types. -const ( - // An empty event. - yaml_NO_EVENT yaml_event_type_t = iota - - yaml_STREAM_START_EVENT // A STREAM-START event. - yaml_STREAM_END_EVENT // A STREAM-END event. - yaml_DOCUMENT_START_EVENT // A DOCUMENT-START event. - yaml_DOCUMENT_END_EVENT // A DOCUMENT-END event. - yaml_ALIAS_EVENT // An ALIAS event. - yaml_SCALAR_EVENT // A SCALAR event. - yaml_SEQUENCE_START_EVENT // A SEQUENCE-START event. - yaml_SEQUENCE_END_EVENT // A SEQUENCE-END event. - yaml_MAPPING_START_EVENT // A MAPPING-START event. - yaml_MAPPING_END_EVENT // A MAPPING-END event. -) - -// The event structure. -type yaml_event_t struct { - - // The event type. - typ yaml_event_type_t - - // The start and end of the event. - start_mark, end_mark yaml_mark_t - - // The document encoding (for yaml_STREAM_START_EVENT). - encoding yaml_encoding_t - - // The version directive (for yaml_DOCUMENT_START_EVENT). - version_directive *yaml_version_directive_t - - // The list of tag directives (for yaml_DOCUMENT_START_EVENT). - tag_directives []yaml_tag_directive_t - - // The anchor (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT, yaml_ALIAS_EVENT). - anchor []byte - - // The tag (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT). - tag []byte - - // The scalar value (for yaml_SCALAR_EVENT). - value []byte - - // Is the document start/end indicator implicit, or the tag optional? - // (for yaml_DOCUMENT_START_EVENT, yaml_DOCUMENT_END_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT, yaml_SCALAR_EVENT). - implicit bool - - // Is the tag optional for any non-plain style? (for yaml_SCALAR_EVENT). - quoted_implicit bool - - // The style (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT). - style yaml_style_t -} - -func (e *yaml_event_t) scalar_style() yaml_scalar_style_t { return yaml_scalar_style_t(e.style) } -func (e *yaml_event_t) sequence_style() yaml_sequence_style_t { return yaml_sequence_style_t(e.style) } -func (e *yaml_event_t) mapping_style() yaml_mapping_style_t { return yaml_mapping_style_t(e.style) } - -// Nodes - -const ( - yaml_NULL_TAG = "tag:yaml.org,2002:null" // The tag !!null with the only possible value: null. - yaml_BOOL_TAG = "tag:yaml.org,2002:bool" // The tag !!bool with the values: true and false. - yaml_STR_TAG = "tag:yaml.org,2002:str" // The tag !!str for string values. - yaml_INT_TAG = "tag:yaml.org,2002:int" // The tag !!int for integer values. - yaml_FLOAT_TAG = "tag:yaml.org,2002:float" // The tag !!float for float values. - yaml_TIMESTAMP_TAG = "tag:yaml.org,2002:timestamp" // The tag !!timestamp for date and time values. - - yaml_SEQ_TAG = "tag:yaml.org,2002:seq" // The tag !!seq is used to denote sequences. - yaml_MAP_TAG = "tag:yaml.org,2002:map" // The tag !!map is used to denote mapping. - - // Not in original libyaml. - yaml_BINARY_TAG = "tag:yaml.org,2002:binary" - yaml_MERGE_TAG = "tag:yaml.org,2002:merge" - - yaml_DEFAULT_SCALAR_TAG = yaml_STR_TAG // The default scalar tag is !!str. - yaml_DEFAULT_SEQUENCE_TAG = yaml_SEQ_TAG // The default sequence tag is !!seq. - yaml_DEFAULT_MAPPING_TAG = yaml_MAP_TAG // The default mapping tag is !!map. -) - -type yaml_node_type_t int - -// Node types. -const ( - // An empty node. - yaml_NO_NODE yaml_node_type_t = iota - - yaml_SCALAR_NODE // A scalar node. - yaml_SEQUENCE_NODE // A sequence node. - yaml_MAPPING_NODE // A mapping node. -) - -// An element of a sequence node. -type yaml_node_item_t int - -// An element of a mapping node. -type yaml_node_pair_t struct { - key int // The key of the element. - value int // The value of the element. -} - -// The node structure. -type yaml_node_t struct { - typ yaml_node_type_t // The node type. - tag []byte // The node tag. - - // The node data. - - // The scalar parameters (for yaml_SCALAR_NODE). - scalar struct { - value []byte // The scalar value. - length int // The length of the scalar value. - style yaml_scalar_style_t // The scalar style. - } - - // The sequence parameters (for YAML_SEQUENCE_NODE). - sequence struct { - items_data []yaml_node_item_t // The stack of sequence items. - style yaml_sequence_style_t // The sequence style. - } - - // The mapping parameters (for yaml_MAPPING_NODE). - mapping struct { - pairs_data []yaml_node_pair_t // The stack of mapping pairs (key, value). - pairs_start *yaml_node_pair_t // The beginning of the stack. - pairs_end *yaml_node_pair_t // The end of the stack. - pairs_top *yaml_node_pair_t // The top of the stack. - style yaml_mapping_style_t // The mapping style. - } - - start_mark yaml_mark_t // The beginning of the node. - end_mark yaml_mark_t // The end of the node. - -} - -// The document structure. -type yaml_document_t struct { - - // The document nodes. - nodes []yaml_node_t - - // The version directive. - version_directive *yaml_version_directive_t - - // The list of tag directives. - tag_directives_data []yaml_tag_directive_t - tag_directives_start int // The beginning of the tag directives list. - tag_directives_end int // The end of the tag directives list. - - start_implicit int // Is the document start indicator implicit? - end_implicit int // Is the document end indicator implicit? - - // The start/end of the document. - start_mark, end_mark yaml_mark_t -} - -// The prototype of a read handler. -// -// The read handler is called when the parser needs to read more bytes from the -// source. The handler should write not more than size bytes to the buffer. -// The number of written bytes should be set to the size_read variable. -// -// [in,out] data A pointer to an application data specified by -// yaml_parser_set_input(). -// [out] buffer The buffer to write the data from the source. -// [in] size The size of the buffer. -// [out] size_read The actual number of bytes read from the source. -// -// On success, the handler should return 1. If the handler failed, -// the returned value should be 0. On EOF, the handler should set the -// size_read to 0 and return 1. -type yaml_read_handler_t func(parser *yaml_parser_t, buffer []byte) (n int, err error) - -// This structure holds information about a potential simple key. -type yaml_simple_key_t struct { - possible bool // Is a simple key possible? - required bool // Is a simple key required? - token_number int // The number of the token. - mark yaml_mark_t // The position mark. -} - -// The states of the parser. -type yaml_parser_state_t int - -const ( - yaml_PARSE_STREAM_START_STATE yaml_parser_state_t = iota - - yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE // Expect the beginning of an implicit document. - yaml_PARSE_DOCUMENT_START_STATE // Expect DOCUMENT-START. - yaml_PARSE_DOCUMENT_CONTENT_STATE // Expect the content of a document. - yaml_PARSE_DOCUMENT_END_STATE // Expect DOCUMENT-END. - yaml_PARSE_BLOCK_NODE_STATE // Expect a block node. - yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE // Expect a block node or indentless sequence. - yaml_PARSE_FLOW_NODE_STATE // Expect a flow node. - yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE // Expect the first entry of a block sequence. - yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE // Expect an entry of a block sequence. - yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE // Expect an entry of an indentless sequence. - yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE // Expect the first key of a block mapping. - yaml_PARSE_BLOCK_MAPPING_KEY_STATE // Expect a block mapping key. - yaml_PARSE_BLOCK_MAPPING_VALUE_STATE // Expect a block mapping value. - yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE // Expect the first entry of a flow sequence. - yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE // Expect an entry of a flow sequence. - yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE // Expect a key of an ordered mapping. - yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE // Expect a value of an ordered mapping. - yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE // Expect the and of an ordered mapping entry. - yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE // Expect the first key of a flow mapping. - yaml_PARSE_FLOW_MAPPING_KEY_STATE // Expect a key of a flow mapping. - yaml_PARSE_FLOW_MAPPING_VALUE_STATE // Expect a value of a flow mapping. - yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE // Expect an empty value of a flow mapping. - yaml_PARSE_END_STATE // Expect nothing. -) - -func (ps yaml_parser_state_t) String() string { - switch ps { - case yaml_PARSE_STREAM_START_STATE: - return "yaml_PARSE_STREAM_START_STATE" - case yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE: - return "yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE" - case yaml_PARSE_DOCUMENT_START_STATE: - return "yaml_PARSE_DOCUMENT_START_STATE" - case yaml_PARSE_DOCUMENT_CONTENT_STATE: - return "yaml_PARSE_DOCUMENT_CONTENT_STATE" - case yaml_PARSE_DOCUMENT_END_STATE: - return "yaml_PARSE_DOCUMENT_END_STATE" - case yaml_PARSE_BLOCK_NODE_STATE: - return "yaml_PARSE_BLOCK_NODE_STATE" - case yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE: - return "yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE" - case yaml_PARSE_FLOW_NODE_STATE: - return "yaml_PARSE_FLOW_NODE_STATE" - case yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE: - return "yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE" - case yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE: - return "yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE" - case yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE: - return "yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE" - case yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE: - return "yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE" - case yaml_PARSE_BLOCK_MAPPING_KEY_STATE: - return "yaml_PARSE_BLOCK_MAPPING_KEY_STATE" - case yaml_PARSE_BLOCK_MAPPING_VALUE_STATE: - return "yaml_PARSE_BLOCK_MAPPING_VALUE_STATE" - case yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE" - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE" - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE" - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE" - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE" - case yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE: - return "yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE" - case yaml_PARSE_FLOW_MAPPING_KEY_STATE: - return "yaml_PARSE_FLOW_MAPPING_KEY_STATE" - case yaml_PARSE_FLOW_MAPPING_VALUE_STATE: - return "yaml_PARSE_FLOW_MAPPING_VALUE_STATE" - case yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE: - return "yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE" - case yaml_PARSE_END_STATE: - return "yaml_PARSE_END_STATE" - } - return "" -} - -// This structure holds aliases data. -type yaml_alias_data_t struct { - anchor []byte // The anchor. - index int // The node id. - mark yaml_mark_t // The anchor mark. -} - -// The parser structure. -// -// All members are internal. Manage the structure using the -// yaml_parser_ family of functions. -type yaml_parser_t struct { - - // Error handling - - error yaml_error_type_t // Error type. - - problem string // Error description. - - // The byte about which the problem occured. - problem_offset int - problem_value int - problem_mark yaml_mark_t - - // The error context. - context string - context_mark yaml_mark_t - - // Reader stuff - - read_handler yaml_read_handler_t // Read handler. - - input_file io.Reader // File input data. - input []byte // String input data. - input_pos int - - eof bool // EOF flag - - buffer []byte // The working buffer. - buffer_pos int // The current position of the buffer. - - unread int // The number of unread characters in the buffer. - - raw_buffer []byte // The raw buffer. - raw_buffer_pos int // The current position of the buffer. - - encoding yaml_encoding_t // The input encoding. - - offset int // The offset of the current position (in bytes). - mark yaml_mark_t // The mark of the current position. - - // Scanner stuff - - stream_start_produced bool // Have we started to scan the input stream? - stream_end_produced bool // Have we reached the end of the input stream? - - flow_level int // The number of unclosed '[' and '{' indicators. - - tokens []yaml_token_t // The tokens queue. - tokens_head int // The head of the tokens queue. - tokens_parsed int // The number of tokens fetched from the queue. - token_available bool // Does the tokens queue contain a token ready for dequeueing. - - indent int // The current indentation level. - indents []int // The indentation levels stack. - - simple_key_allowed bool // May a simple key occur at the current position? - simple_keys []yaml_simple_key_t // The stack of simple keys. - - // Parser stuff - - state yaml_parser_state_t // The current parser state. - states []yaml_parser_state_t // The parser states stack. - marks []yaml_mark_t // The stack of marks. - tag_directives []yaml_tag_directive_t // The list of TAG directives. - - // Dumper stuff - - aliases []yaml_alias_data_t // The alias data. - - document *yaml_document_t // The currently parsed document. -} - -// Emitter Definitions - -// The prototype of a write handler. -// -// The write handler is called when the emitter needs to flush the accumulated -// characters to the output. The handler should write @a size bytes of the -// @a buffer to the output. -// -// @param[in,out] data A pointer to an application data specified by -// yaml_emitter_set_output(). -// @param[in] buffer The buffer with bytes to be written. -// @param[in] size The size of the buffer. -// -// @returns On success, the handler should return @c 1. If the handler failed, -// the returned value should be @c 0. -// -type yaml_write_handler_t func(emitter *yaml_emitter_t, buffer []byte) error - -type yaml_emitter_state_t int - -// The emitter states. -const ( - // Expect STREAM-START. - yaml_EMIT_STREAM_START_STATE yaml_emitter_state_t = iota - - yaml_EMIT_FIRST_DOCUMENT_START_STATE // Expect the first DOCUMENT-START or STREAM-END. - yaml_EMIT_DOCUMENT_START_STATE // Expect DOCUMENT-START or STREAM-END. - yaml_EMIT_DOCUMENT_CONTENT_STATE // Expect the content of a document. - yaml_EMIT_DOCUMENT_END_STATE // Expect DOCUMENT-END. - yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE // Expect the first item of a flow sequence. - yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE // Expect an item of a flow sequence. - yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE // Expect the first key of a flow mapping. - yaml_EMIT_FLOW_MAPPING_KEY_STATE // Expect a key of a flow mapping. - yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE // Expect a value for a simple key of a flow mapping. - yaml_EMIT_FLOW_MAPPING_VALUE_STATE // Expect a value of a flow mapping. - yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE // Expect the first item of a block sequence. - yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE // Expect an item of a block sequence. - yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE // Expect the first key of a block mapping. - yaml_EMIT_BLOCK_MAPPING_KEY_STATE // Expect the key of a block mapping. - yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE // Expect a value for a simple key of a block mapping. - yaml_EMIT_BLOCK_MAPPING_VALUE_STATE // Expect a value of a block mapping. - yaml_EMIT_END_STATE // Expect nothing. -) - -// The emitter structure. -// -// All members are internal. Manage the structure using the @c yaml_emitter_ -// family of functions. -type yaml_emitter_t struct { - - // Error handling - - error yaml_error_type_t // Error type. - problem string // Error description. - - // Writer stuff - - write_handler yaml_write_handler_t // Write handler. - - output_buffer *[]byte // String output data. - output_file io.Writer // File output data. - - buffer []byte // The working buffer. - buffer_pos int // The current position of the buffer. - - raw_buffer []byte // The raw buffer. - raw_buffer_pos int // The current position of the buffer. - - encoding yaml_encoding_t // The stream encoding. - - // Emitter stuff - - canonical bool // If the output is in the canonical style? - best_indent int // The number of indentation spaces. - best_width int // The preferred width of the output lines. - unicode bool // Allow unescaped non-ASCII characters? - line_break yaml_break_t // The preferred line break. - - state yaml_emitter_state_t // The current emitter state. - states []yaml_emitter_state_t // The stack of states. - - events []yaml_event_t // The event queue. - events_head int // The head of the event queue. - - indents []int // The stack of indentation levels. - - tag_directives []yaml_tag_directive_t // The list of tag directives. - - indent int // The current indentation level. - - flow_level int // The current flow level. - - root_context bool // Is it the document root context? - sequence_context bool // Is it a sequence context? - mapping_context bool // Is it a mapping context? - simple_key_context bool // Is it a simple mapping key context? - - line int // The current line. - column int // The current column. - whitespace bool // If the last character was a whitespace? - indention bool // If the last character was an indentation character (' ', '-', '?', ':')? - open_ended bool // If an explicit document end is required? - - // Anchor analysis. - anchor_data struct { - anchor []byte // The anchor value. - alias bool // Is it an alias? - } - - // Tag analysis. - tag_data struct { - handle []byte // The tag handle. - suffix []byte // The tag suffix. - } - - // Scalar analysis. - scalar_data struct { - value []byte // The scalar value. - multiline bool // Does the scalar contain line breaks? - flow_plain_allowed bool // Can the scalar be expessed in the flow plain style? - block_plain_allowed bool // Can the scalar be expressed in the block plain style? - single_quoted_allowed bool // Can the scalar be expressed in the single quoted style? - block_allowed bool // Can the scalar be expressed in the literal or folded styles? - style yaml_scalar_style_t // The output style. - } - - // Dumper stuff - - opened bool // If the stream was already opened? - closed bool // If the stream was already closed? - - // The information associated with the document nodes. - anchors *struct { - references int // The number of references. - anchor int // The anchor id. - serialized bool // If the node has been emitted? - } - - last_anchor_id int // The last assigned anchor id. - - document *yaml_document_t // The currently emitted document. -} diff --git a/internal/gopkg.in/yaml.v2/yamlprivateh.go b/internal/gopkg.in/yaml.v2/yamlprivateh.go deleted file mode 100644 index 8110ce3..0000000 --- a/internal/gopkg.in/yaml.v2/yamlprivateh.go +++ /dev/null @@ -1,173 +0,0 @@ -package yaml - -const ( - // The size of the input raw buffer. - input_raw_buffer_size = 512 - - // The size of the input buffer. - // It should be possible to decode the whole raw buffer. - input_buffer_size = input_raw_buffer_size * 3 - - // The size of the output buffer. - output_buffer_size = 128 - - // The size of the output raw buffer. - // It should be possible to encode the whole output buffer. - output_raw_buffer_size = (output_buffer_size*2 + 2) - - // The size of other stacks and queues. - initial_stack_size = 16 - initial_queue_size = 16 - initial_string_size = 16 -) - -// Check if the character at the specified position is an alphabetical -// character, a digit, '_', or '-'. -func is_alpha(b []byte, i int) bool { - return b[i] >= '0' && b[i] <= '9' || b[i] >= 'A' && b[i] <= 'Z' || b[i] >= 'a' && b[i] <= 'z' || b[i] == '_' || b[i] == '-' -} - -// Check if the character at the specified position is a digit. -func is_digit(b []byte, i int) bool { - return b[i] >= '0' && b[i] <= '9' -} - -// Get the value of a digit. -func as_digit(b []byte, i int) int { - return int(b[i]) - '0' -} - -// Check if the character at the specified position is a hex-digit. -func is_hex(b []byte, i int) bool { - return b[i] >= '0' && b[i] <= '9' || b[i] >= 'A' && b[i] <= 'F' || b[i] >= 'a' && b[i] <= 'f' -} - -// Get the value of a hex-digit. -func as_hex(b []byte, i int) int { - bi := b[i] - if bi >= 'A' && bi <= 'F' { - return int(bi) - 'A' + 10 - } - if bi >= 'a' && bi <= 'f' { - return int(bi) - 'a' + 10 - } - return int(bi) - '0' -} - -// Check if the character is ASCII. -func is_ascii(b []byte, i int) bool { - return b[i] <= 0x7F -} - -// Check if the character at the start of the buffer can be printed unescaped. -func is_printable(b []byte, i int) bool { - return ((b[i] == 0x0A) || // . == #x0A - (b[i] >= 0x20 && b[i] <= 0x7E) || // #x20 <= . <= #x7E - (b[i] == 0xC2 && b[i+1] >= 0xA0) || // #0xA0 <= . <= #xD7FF - (b[i] > 0xC2 && b[i] < 0xED) || - (b[i] == 0xED && b[i+1] < 0xA0) || - (b[i] == 0xEE) || - (b[i] == 0xEF && // #xE000 <= . <= #xFFFD - !(b[i+1] == 0xBB && b[i+2] == 0xBF) && // && . != #xFEFF - !(b[i+1] == 0xBF && (b[i+2] == 0xBE || b[i+2] == 0xBF)))) -} - -// Check if the character at the specified position is NUL. -func is_z(b []byte, i int) bool { - return b[i] == 0x00 -} - -// Check if the beginning of the buffer is a BOM. -func is_bom(b []byte, i int) bool { - return b[0] == 0xEF && b[1] == 0xBB && b[2] == 0xBF -} - -// Check if the character at the specified position is space. -func is_space(b []byte, i int) bool { - return b[i] == ' ' -} - -// Check if the character at the specified position is tab. -func is_tab(b []byte, i int) bool { - return b[i] == '\t' -} - -// Check if the character at the specified position is blank (space or tab). -func is_blank(b []byte, i int) bool { - //return is_space(b, i) || is_tab(b, i) - return b[i] == ' ' || b[i] == '\t' -} - -// Check if the character at the specified position is a line break. -func is_break(b []byte, i int) bool { - return (b[i] == '\r' || // CR (#xD) - b[i] == '\n' || // LF (#xA) - b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9) // PS (#x2029) -} - -func is_crlf(b []byte, i int) bool { - return b[i] == '\r' && b[i+1] == '\n' -} - -// Check if the character is a line break or NUL. -func is_breakz(b []byte, i int) bool { - //return is_break(b, i) || is_z(b, i) - return ( // is_break: - b[i] == '\r' || // CR (#xD) - b[i] == '\n' || // LF (#xA) - b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) - // is_z: - b[i] == 0) -} - -// Check if the character is a line break, space, or NUL. -func is_spacez(b []byte, i int) bool { - //return is_space(b, i) || is_breakz(b, i) - return ( // is_space: - b[i] == ' ' || - // is_breakz: - b[i] == '\r' || // CR (#xD) - b[i] == '\n' || // LF (#xA) - b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) - b[i] == 0) -} - -// Check if the character is a line break, space, tab, or NUL. -func is_blankz(b []byte, i int) bool { - //return is_blank(b, i) || is_breakz(b, i) - return ( // is_blank: - b[i] == ' ' || b[i] == '\t' || - // is_breakz: - b[i] == '\r' || // CR (#xD) - b[i] == '\n' || // LF (#xA) - b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) - b[i] == 0) -} - -// Determine the width of the character. -func width(b byte) int { - // Don't replace these by a switch without first - // confirming that it is being inlined. - if b&0x80 == 0x00 { - return 1 - } - if b&0xE0 == 0xC0 { - return 2 - } - if b&0xF0 == 0xE0 { - return 3 - } - if b&0xF8 == 0xF0 { - return 4 - } - return 0 - -} diff --git a/internal/iana/const.go b/internal/iana/const.go deleted file mode 100644 index fb5eed4..0000000 --- a/internal/iana/const.go +++ /dev/null @@ -1,184 +0,0 @@ -// go generate gen.go -// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT - -// Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA). -package iana - -// Differentiated Services Field Codepoints (DSCP), Updated: 2013-06-25 -const ( - DiffServCS0 = 0x0 // CS0 - DiffServCS1 = 0x20 // CS1 - DiffServCS2 = 0x40 // CS2 - DiffServCS3 = 0x60 // CS3 - DiffServCS4 = 0x80 // CS4 - DiffServCS5 = 0xa0 // CS5 - DiffServCS6 = 0xc0 // CS6 - DiffServCS7 = 0xe0 // CS7 - DiffServAF11 = 0x28 // AF11 - DiffServAF12 = 0x30 // AF12 - DiffServAF13 = 0x38 // AF13 - DiffServAF21 = 0x48 // AF21 - DiffServAF22 = 0x50 // AF22 - DiffServAF23 = 0x58 // AF23 - DiffServAF31 = 0x68 // AF31 - DiffServAF32 = 0x70 // AF32 - DiffServAF33 = 0x78 // AF33 - DiffServAF41 = 0x88 // AF41 - DiffServAF42 = 0x90 // AF42 - DiffServAF43 = 0x98 // AF43 - DiffServEFPHB = 0xb8 // EF PHB - DiffServVOICEADMIT = 0xb0 // VOICE-ADMIT -) - -// IPv4 TOS Byte and IPv6 Traffic Class Octet, Updated: 2001-09-06 -const ( - NotECNTransport = 0x0 // Not-ECT (Not ECN-Capable Transport) - ECNTransport1 = 0x1 // ECT(1) (ECN-Capable Transport(1)) - ECNTransport0 = 0x2 // ECT(0) (ECN-Capable Transport(0)) - CongestionExperienced = 0x3 // CE (Congestion Experienced) -) - -// Protocol Numbers, Updated: 2014-08-12 -const ( - ProtocolIP = 0 // IPv4 encapsulation, pseudo protocol number - ProtocolHOPOPT = 0 // IPv6 Hop-by-Hop Option - ProtocolICMP = 1 // Internet Control Message - ProtocolIGMP = 2 // Internet Group Management - ProtocolGGP = 3 // Gateway-to-Gateway - ProtocolIPv4 = 4 // IPv4 encapsulation - ProtocolST = 5 // Stream - ProtocolTCP = 6 // Transmission Control - ProtocolCBT = 7 // CBT - ProtocolEGP = 8 // Exterior Gateway Protocol - ProtocolIGP = 9 // any private interior gateway (used by Cisco for their IGRP) - ProtocolBBNRCCMON = 10 // BBN RCC Monitoring - ProtocolNVPII = 11 // Network Voice Protocol - ProtocolPUP = 12 // PUP - ProtocolARGUS = 13 // ARGUS - ProtocolEMCON = 14 // EMCON - ProtocolXNET = 15 // Cross Net Debugger - ProtocolCHAOS = 16 // Chaos - ProtocolUDP = 17 // User Datagram - ProtocolMUX = 18 // Multiplexing - ProtocolDCNMEAS = 19 // DCN Measurement Subsystems - ProtocolHMP = 20 // Host Monitoring - ProtocolPRM = 21 // Packet Radio Measurement - ProtocolXNSIDP = 22 // XEROX NS IDP - ProtocolTRUNK1 = 23 // Trunk-1 - ProtocolTRUNK2 = 24 // Trunk-2 - ProtocolLEAF1 = 25 // Leaf-1 - ProtocolLEAF2 = 26 // Leaf-2 - ProtocolRDP = 27 // Reliable Data Protocol - ProtocolIRTP = 28 // Internet Reliable Transaction - ProtocolISOTP4 = 29 // ISO Transport Protocol Class 4 - ProtocolNETBLT = 30 // Bulk Data Transfer Protocol - ProtocolMFENSP = 31 // MFE Network Services Protocol - ProtocolMERITINP = 32 // MERIT Internodal Protocol - ProtocolDCCP = 33 // Datagram Congestion Control Protocol - Protocol3PC = 34 // Third Party Connect Protocol - ProtocolIDPR = 35 // Inter-Domain Policy Routing Protocol - ProtocolXTP = 36 // XTP - ProtocolDDP = 37 // Datagram Delivery Protocol - ProtocolIDPRCMTP = 38 // IDPR Control Message Transport Proto - ProtocolTPPP = 39 // TP++ Transport Protocol - ProtocolIL = 40 // IL Transport Protocol - ProtocolIPv6 = 41 // IPv6 encapsulation - ProtocolSDRP = 42 // Source Demand Routing Protocol - ProtocolIPv6Route = 43 // Routing Header for IPv6 - ProtocolIPv6Frag = 44 // Fragment Header for IPv6 - ProtocolIDRP = 45 // Inter-Domain Routing Protocol - ProtocolRSVP = 46 // Reservation Protocol - ProtocolGRE = 47 // Generic Routing Encapsulation - ProtocolDSR = 48 // Dynamic Source Routing Protocol - ProtocolBNA = 49 // BNA - ProtocolESP = 50 // Encap Security Payload - ProtocolAH = 51 // Authentication Header - ProtocolINLSP = 52 // Integrated Net Layer Security TUBA - ProtocolSWIPE = 53 // IP with Encryption - ProtocolNARP = 54 // NBMA Address Resolution Protocol - ProtocolMOBILE = 55 // IP Mobility - ProtocolTLSP = 56 // Transport Layer Security Protocol using Kryptonet key management - ProtocolSKIP = 57 // SKIP - ProtocolIPv6ICMP = 58 // ICMP for IPv6 - ProtocolIPv6NoNxt = 59 // No Next Header for IPv6 - ProtocolIPv6Opts = 60 // Destination Options for IPv6 - ProtocolCFTP = 62 // CFTP - ProtocolSATEXPAK = 64 // SATNET and Backroom EXPAK - ProtocolKRYPTOLAN = 65 // Kryptolan - ProtocolRVD = 66 // MIT Remote Virtual Disk Protocol - ProtocolIPPC = 67 // Internet Pluribus Packet Core - ProtocolSATMON = 69 // SATNET Monitoring - ProtocolVISA = 70 // VISA Protocol - ProtocolIPCV = 71 // Internet Packet Core Utility - ProtocolCPNX = 72 // Computer Protocol Network Executive - ProtocolCPHB = 73 // Computer Protocol Heart Beat - ProtocolWSN = 74 // Wang Span Network - ProtocolPVP = 75 // Packet Video Protocol - ProtocolBRSATMON = 76 // Backroom SATNET Monitoring - ProtocolSUNND = 77 // SUN ND PROTOCOL-Temporary - ProtocolWBMON = 78 // WIDEBAND Monitoring - ProtocolWBEXPAK = 79 // WIDEBAND EXPAK - ProtocolISOIP = 80 // ISO Internet Protocol - ProtocolVMTP = 81 // VMTP - ProtocolSECUREVMTP = 82 // SECURE-VMTP - ProtocolVINES = 83 // VINES - ProtocolTTP = 84 // Transaction Transport Protocol - ProtocolIPTM = 84 // Internet Protocol Traffic Manager - ProtocolNSFNETIGP = 85 // NSFNET-IGP - ProtocolDGP = 86 // Dissimilar Gateway Protocol - ProtocolTCF = 87 // TCF - ProtocolEIGRP = 88 // EIGRP - ProtocolOSPFIGP = 89 // OSPFIGP - ProtocolSpriteRPC = 90 // Sprite RPC Protocol - ProtocolLARP = 91 // Locus Address Resolution Protocol - ProtocolMTP = 92 // Multicast Transport Protocol - ProtocolAX25 = 93 // AX.25 Frames - ProtocolIPIP = 94 // IP-within-IP Encapsulation Protocol - ProtocolMICP = 95 // Mobile Internetworking Control Pro. - ProtocolSCCSP = 96 // Semaphore Communications Sec. Pro. - ProtocolETHERIP = 97 // Ethernet-within-IP Encapsulation - ProtocolENCAP = 98 // Encapsulation Header - ProtocolGMTP = 100 // GMTP - ProtocolIFMP = 101 // Ipsilon Flow Management Protocol - ProtocolPNNI = 102 // PNNI over IP - ProtocolPIM = 103 // Protocol Independent Multicast - ProtocolARIS = 104 // ARIS - ProtocolSCPS = 105 // SCPS - ProtocolQNX = 106 // QNX - ProtocolAN = 107 // Active Networks - ProtocolIPComp = 108 // IP Payload Compression Protocol - ProtocolSNP = 109 // Sitara Networks Protocol - ProtocolCompaqPeer = 110 // Compaq Peer Protocol - ProtocolIPXinIP = 111 // IPX in IP - ProtocolVRRP = 112 // Virtual Router Redundancy Protocol - ProtocolPGM = 113 // PGM Reliable Transport Protocol - ProtocolL2TP = 115 // Layer Two Tunneling Protocol - ProtocolDDX = 116 // D-II Data Exchange (DDX) - ProtocolIATP = 117 // Interactive Agent Transfer Protocol - ProtocolSTP = 118 // Schedule Transfer Protocol - ProtocolSRP = 119 // SpectraLink Radio Protocol - ProtocolUTI = 120 // UTI - ProtocolSMP = 121 // Simple Message Protocol - ProtocolSM = 122 // Simple Multicast Protocol - ProtocolPTP = 123 // Performance Transparency Protocol - ProtocolISIS = 124 // ISIS over IPv4 - ProtocolFIRE = 125 // FIRE - ProtocolCRTP = 126 // Combat Radio Transport Protocol - ProtocolCRUDP = 127 // Combat Radio User Datagram - ProtocolSSCOPMCE = 128 // SSCOPMCE - ProtocolIPLT = 129 // IPLT - ProtocolSPS = 130 // Secure Packet Shield - ProtocolPIPE = 131 // Private IP Encapsulation within IP - ProtocolSCTP = 132 // Stream Control Transmission Protocol - ProtocolFC = 133 // Fibre Channel - ProtocolRSVPE2EIGNORE = 134 // RSVP-E2E-IGNORE - ProtocolMobilityHeader = 135 // Mobility Header - ProtocolUDPLite = 136 // UDPLite - ProtocolMPLSinIP = 137 // MPLS-in-IP - ProtocolMANET = 138 // MANET Protocols - ProtocolHIP = 139 // Host Identity Protocol - ProtocolShim6 = 140 // Shim6 Protocol - ProtocolWESP = 141 // Wrapped Encapsulating Security Payload - ProtocolROHC = 142 // Robust Header Compression - ProtocolReserved = 255 // Reserved -) diff --git a/internal/iana/gen.go b/internal/iana/gen.go deleted file mode 100644 index c808bde..0000000 --- a/internal/iana/gen.go +++ /dev/null @@ -1,289 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build ignore - -//go:generate go run gen.go - -// This program generates internet protocol constants and tables by -// reading IANA protocol registries. -package main - -import ( - "bytes" - "encoding/xml" - "fmt" - "go/format" - "io" - "io/ioutil" - "net/http" - "os" - "strconv" - "strings" -) - -var registries = []struct { - url string - parse func(io.Writer, io.Reader) error -}{ - { - "http://www.iana.org/assignments/dscp-registry/dscp-registry.xml", - parseDSCPRegistry, - }, - { - "http://www.iana.org/assignments/ipv4-tos-byte/ipv4-tos-byte.xml", - parseTOSTCByte, - }, - { - "http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml", - parseProtocolNumbers, - }, -} - -func main() { - var bb bytes.Buffer - fmt.Fprintf(&bb, "// go generate gen.go\n") - fmt.Fprintf(&bb, "// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT\n\n") - fmt.Fprintf(&bb, "// Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA).\n") - fmt.Fprintf(&bb, `package iana // import "golang.org/x/net/internal/iana"`+"\n\n") - for _, r := range registries { - resp, err := http.Get(r.url) - if err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } - defer resp.Body.Close() - if resp.StatusCode != http.StatusOK { - fmt.Fprintf(os.Stderr, "got HTTP status code %v for %v\n", resp.StatusCode, r.url) - os.Exit(1) - } - if err := r.parse(&bb, resp.Body); err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } - fmt.Fprintf(&bb, "\n") - } - b, err := format.Source(bb.Bytes()) - if err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } - if err := ioutil.WriteFile("const.go", b, 0644); err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } -} - -func parseDSCPRegistry(w io.Writer, r io.Reader) error { - dec := xml.NewDecoder(r) - var dr dscpRegistry - if err := dec.Decode(&dr); err != nil { - return err - } - drs := dr.escape() - fmt.Fprintf(w, "// %s, Updated: %s\n", dr.Title, dr.Updated) - fmt.Fprintf(w, "const (\n") - for _, dr := range drs { - fmt.Fprintf(w, "DiffServ%s = %#x", dr.Name, dr.Value) - fmt.Fprintf(w, "// %s\n", dr.OrigName) - } - fmt.Fprintf(w, ")\n") - return nil -} - -type dscpRegistry struct { - XMLName xml.Name `xml:"registry"` - Title string `xml:"title"` - Updated string `xml:"updated"` - Note string `xml:"note"` - RegTitle string `xml:"registry>title"` - PoolRecords []struct { - Name string `xml:"name"` - Space string `xml:"space"` - } `xml:"registry>record"` - Records []struct { - Name string `xml:"name"` - Space string `xml:"space"` - } `xml:"registry>registry>record"` -} - -type canonDSCPRecord struct { - OrigName string - Name string - Value int -} - -func (drr *dscpRegistry) escape() []canonDSCPRecord { - drs := make([]canonDSCPRecord, len(drr.Records)) - sr := strings.NewReplacer( - "+", "", - "-", "", - "/", "", - ".", "", - " ", "", - ) - for i, dr := range drr.Records { - s := strings.TrimSpace(dr.Name) - drs[i].OrigName = s - drs[i].Name = sr.Replace(s) - n, err := strconv.ParseUint(dr.Space, 2, 8) - if err != nil { - continue - } - drs[i].Value = int(n) << 2 - } - return drs -} - -func parseTOSTCByte(w io.Writer, r io.Reader) error { - dec := xml.NewDecoder(r) - var ttb tosTCByte - if err := dec.Decode(&ttb); err != nil { - return err - } - trs := ttb.escape() - fmt.Fprintf(w, "// %s, Updated: %s\n", ttb.Title, ttb.Updated) - fmt.Fprintf(w, "const (\n") - for _, tr := range trs { - fmt.Fprintf(w, "%s = %#x", tr.Keyword, tr.Value) - fmt.Fprintf(w, "// %s\n", tr.OrigKeyword) - } - fmt.Fprintf(w, ")\n") - return nil -} - -type tosTCByte struct { - XMLName xml.Name `xml:"registry"` - Title string `xml:"title"` - Updated string `xml:"updated"` - Note string `xml:"note"` - RegTitle string `xml:"registry>title"` - Records []struct { - Binary string `xml:"binary"` - Keyword string `xml:"keyword"` - } `xml:"registry>record"` -} - -type canonTOSTCByteRecord struct { - OrigKeyword string - Keyword string - Value int -} - -func (ttb *tosTCByte) escape() []canonTOSTCByteRecord { - trs := make([]canonTOSTCByteRecord, len(ttb.Records)) - sr := strings.NewReplacer( - "Capable", "", - "(", "", - ")", "", - "+", "", - "-", "", - "/", "", - ".", "", - " ", "", - ) - for i, tr := range ttb.Records { - s := strings.TrimSpace(tr.Keyword) - trs[i].OrigKeyword = s - ss := strings.Split(s, " ") - if len(ss) > 1 { - trs[i].Keyword = strings.Join(ss[1:], " ") - } else { - trs[i].Keyword = ss[0] - } - trs[i].Keyword = sr.Replace(trs[i].Keyword) - n, err := strconv.ParseUint(tr.Binary, 2, 8) - if err != nil { - continue - } - trs[i].Value = int(n) - } - return trs -} - -func parseProtocolNumbers(w io.Writer, r io.Reader) error { - dec := xml.NewDecoder(r) - var pn protocolNumbers - if err := dec.Decode(&pn); err != nil { - return err - } - prs := pn.escape() - prs = append([]canonProtocolRecord{{ - Name: "IP", - Descr: "IPv4 encapsulation, pseudo protocol number", - Value: 0, - }}, prs...) - fmt.Fprintf(w, "// %s, Updated: %s\n", pn.Title, pn.Updated) - fmt.Fprintf(w, "const (\n") - for _, pr := range prs { - if pr.Name == "" { - continue - } - fmt.Fprintf(w, "Protocol%s = %d", pr.Name, pr.Value) - s := pr.Descr - if s == "" { - s = pr.OrigName - } - fmt.Fprintf(w, "// %s\n", s) - } - fmt.Fprintf(w, ")\n") - return nil -} - -type protocolNumbers struct { - XMLName xml.Name `xml:"registry"` - Title string `xml:"title"` - Updated string `xml:"updated"` - RegTitle string `xml:"registry>title"` - Note string `xml:"registry>note"` - Records []struct { - Value string `xml:"value"` - Name string `xml:"name"` - Descr string `xml:"description"` - } `xml:"registry>record"` -} - -type canonProtocolRecord struct { - OrigName string - Name string - Descr string - Value int -} - -func (pn *protocolNumbers) escape() []canonProtocolRecord { - prs := make([]canonProtocolRecord, len(pn.Records)) - sr := strings.NewReplacer( - "-in-", "in", - "-within-", "within", - "-over-", "over", - "+", "P", - "-", "", - "/", "", - ".", "", - " ", "", - ) - for i, pr := range pn.Records { - prs[i].OrigName = pr.Name - s := strings.TrimSpace(pr.Name) - switch pr.Name { - case "ISIS over IPv4": - prs[i].Name = "ISIS" - case "manet": - prs[i].Name = "MANET" - default: - prs[i].Name = sr.Replace(s) - } - ss := strings.Split(pr.Descr, "\n") - for i := range ss { - ss[i] = strings.TrimSpace(ss[i]) - } - if len(ss) > 1 { - prs[i].Descr = strings.Join(ss, " ") - } else { - prs[i].Descr = ss[0] - } - prs[i].Value, _ = strconv.Atoi(pr.Value) - } - return prs -} diff --git a/internal/nettest/error_posix.go b/internal/nettest/error_posix.go deleted file mode 100644 index 963ed99..0000000 --- a/internal/nettest/error_posix.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows - -package nettest - -import ( - "os" - "syscall" -) - -func protocolNotSupported(err error) bool { - switch err := err.(type) { - case syscall.Errno: - switch err { - case syscall.EPROTONOSUPPORT, syscall.ENOPROTOOPT: - return true - } - case *os.SyscallError: - switch err := err.Err.(type) { - case syscall.Errno: - switch err { - case syscall.EPROTONOSUPPORT, syscall.ENOPROTOOPT: - return true - } - } - } - return false -} diff --git a/internal/nettest/error_stub.go b/internal/nettest/error_stub.go deleted file mode 100644 index 3c74d81..0000000 --- a/internal/nettest/error_stub.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// +build nacl plan9 - -package nettest - -func protocolNotSupported(err error) bool { - return false -} diff --git a/internal/nettest/interface.go b/internal/nettest/interface.go deleted file mode 100644 index 53ae13a..0000000 --- a/internal/nettest/interface.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package nettest - -import "net" - -// IsMulticastCapable reports whether ifi is an IP multicast-capable -// network interface. Network must be "ip", "ip4" or "ip6". -func IsMulticastCapable(network string, ifi *net.Interface) (net.IP, bool) { - switch network { - case "ip", "ip4", "ip6": - default: - return nil, false - } - if ifi == nil || ifi.Flags&net.FlagUp == 0 || ifi.Flags&net.FlagMulticast == 0 { - return nil, false - } - return hasRoutableIP(network, ifi) -} - -// RoutedInterface returns a network interface that can route IP -// traffic and satisfies flags. It returns nil when an appropriate -// network interface is not found. Network must be "ip", "ip4" or -// "ip6". -func RoutedInterface(network string, flags net.Flags) *net.Interface { - switch network { - case "ip", "ip4", "ip6": - default: - return nil - } - ift, err := net.Interfaces() - if err != nil { - return nil - } - for _, ifi := range ift { - if ifi.Flags&flags != flags { - continue - } - if _, ok := hasRoutableIP(network, &ifi); !ok { - continue - } - return &ifi - } - return nil -} - -func hasRoutableIP(network string, ifi *net.Interface) (net.IP, bool) { - ifat, err := ifi.Addrs() - if err != nil { - return nil, false - } - for _, ifa := range ifat { - switch ifa := ifa.(type) { - case *net.IPAddr: - if ip := routableIP(network, ifa.IP); ip != nil { - return ip, true - } - case *net.IPNet: - if ip := routableIP(network, ifa.IP); ip != nil { - return ip, true - } - } - } - return nil, false -} - -func routableIP(network string, ip net.IP) net.IP { - if !ip.IsLoopback() && !ip.IsLinkLocalUnicast() && !ip.IsGlobalUnicast() { - return nil - } - switch network { - case "ip4": - if ip := ip.To4(); ip != nil { - return ip - } - case "ip6": - if ip.IsLoopback() { // addressing scope of the loopback address depends on each implementation - return nil - } - if ip := ip.To16(); ip != nil && ip.To4() == nil { - return ip - } - default: - if ip := ip.To4(); ip != nil { - return ip - } - if ip := ip.To16(); ip != nil { - return ip - } - } - return nil -} diff --git a/internal/nettest/stack.go b/internal/nettest/stack.go deleted file mode 100644 index 219f1f9..0000000 --- a/internal/nettest/stack.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2014 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package nettest provides utilities for IP testing. -package nettest - -import "net" - -// SupportsIPv4 reports whether the platform supports IPv4 networking -// functionality. -func SupportsIPv4() bool { - ln, err := net.Listen("tcp4", "127.0.0.1:0") - if err != nil { - return false - } - ln.Close() - return true -} - -// SupportsIPv6 reports whether the platform supports IPv6 networking -// functionality. -func SupportsIPv6() bool { - ln, err := net.Listen("tcp6", "[::1]:0") - if err != nil { - return false - } - ln.Close() - return true -} - -// ProtocolNotSupported reports whether err is a protocol not -// supported error. -func ProtocolNotSupported(err error) bool { - return protocolNotSupported(err) -} diff --git a/internal/vendor.json b/internal/vendor.json deleted file mode 100755 index 1bc396f..0000000 --- a/internal/vendor.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "Tool": "github.com/kardianos/vendor", - "Package": [ - { - "Vendor": "github.com/alexzorin/libvirt-go", - "Local": "github.com/vtolstov/svirtnet/internal/github.com/alexzorin/libvirt-go", - "Version": "ca84f7b582bd159c1ca98e7a1d079dab9e5d3d42", - "VersionTime": "2014-08-02T12:51:44+10:00" - }, - { - "Vendor": "github.com/vishvananda/netlink/nl", - "Local": "github.com/vtolstov/svirtnet/internal/github.com/vishvananda/netlink/nl", - "Version": "889b85d2e6cc39e031ace0abb2a05d517a2f8536", - "VersionTime": "2015-02-06T18:58:24-08:00" - }, - { - "Vendor": "github.com/vtolstov/gopacket", - "Local": "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket", - "Version": "946d2521bcd371a310e7977bef413df73da8cc75", - "VersionTime": "2015-03-23T01:24:48+03:00" - }, - { - "Vendor": "github.com/vtolstov/gopacket/bytediff", - "Local": "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket/bytediff", - "Version": "946d2521bcd371a310e7977bef413df73da8cc75", - "VersionTime": "2015-03-23T01:24:48+03:00" - }, - { - "Vendor": "github.com/vtolstov/gopacket/layers", - "Local": "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket/layers", - "Version": "946d2521bcd371a310e7977bef413df73da8cc75", - "VersionTime": "2015-03-23T01:24:48+03:00" - }, - { - "Vendor": "golang.org/x/net/icmp", - "Local": "github.com/vtolstov/svirtnet/internal/golang.org/x/net/icmp", - "Version": "ca657d0bd9d9b4f73523118b59af79e5374b9908", - "VersionTime": "2015-01-15T01:52:15+09:00" - }, - { - "Vendor": "golang.org/x/net/ipv4", - "Local": "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv4", - "Version": "ca657d0bd9d9b4f73523118b59af79e5374b9908", - "VersionTime": "2015-01-15T01:52:15+09:00" - }, - { - "Vendor": "golang.org/x/net/ipv6", - "Local": "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv6", - "Version": "ca657d0bd9d9b4f73523118b59af79e5374b9908", - "VersionTime": "2015-01-15T01:52:15+09:00" - }, - { - "Vendor": "gopkg.in/yaml.v1", - "Local": "github.com/vtolstov/svirtnet/internal/gopkg.in/yaml.v1", - "Version": "9f9df34309c04878acc86042b16630b0f696e1de", - "VersionTime": "2014-09-24T13:16:07-03:00" - }, - { - "Vendor": "gopkg.in/yaml.v2", - "Local": "github.com/vtolstov/svirtnet/internal/gopkg.in/yaml.v2", - "Version": "49c95bdc21843256fb6c4e0d370a05f24a0bf213", - "VersionTime": "2015-02-24T19:57:58-03:00" - }, - { - "Vendor": "golang.org/x/net/internal/iana", - "Local": "github.com/vtolstov/svirtnet/internal/iana", - "Version": "ca657d0bd9d9b4f73523118b59af79e5374b9908", - "VersionTime": "2015-01-15T01:52:15+09:00" - }, - { - "Vendor": "golang.org/x/net/internal/nettest", - "Local": "github.com/vtolstov/svirtnet/internal/nettest", - "Version": "ca657d0bd9d9b4f73523118b59af79e5374b9908", - "VersionTime": "2015-01-15T01:52:15+09:00" - } - ] -} \ No newline at end of file diff --git a/main.go b/main.go index 00b4f65..e6c2e3d 100644 --- a/main.go +++ b/main.go @@ -11,7 +11,7 @@ import ( "syscall" "time" - "github.com/vtolstov/svirtnet/internal/github.com/vishvananda/netlink/nl" + "github.com/vishvananda/netlink/nl" "gopkg.in/alexzorin/libvirt-go.v2" "gopkg.in/yaml.v2" ) diff --git a/server.go b/server.go index ee17da3..0223de9 100644 --- a/server.go +++ b/server.go @@ -15,8 +15,8 @@ import ( "crypto/tls" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv4" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv6" + "golang.org/x/net/ipv4" + "golang.org/x/net/ipv6" "gopkg.in/alexzorin/libvirt-go.v2" ) diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/.drone.yml b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/.drone.yml deleted file mode 100644 index da5ca0d..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/.drone.yml +++ /dev/null @@ -1,7 +0,0 @@ -image: alexzorin/libvirt-go_test:1.2 -script: - - go test -v -notify: - email: - recipients: - - git@zor.io diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/.gitignore b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/.gitignore deleted file mode 100644 index ce6b260..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*.sublime-workspace -*.sublime-project -.vagrant \ No newline at end of file diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/LICENSE b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/LICENSE deleted file mode 100644 index 202f5fc..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License - -Copyright (c) 2013 Alex Zorin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/README.md b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/README.md deleted file mode 100644 index f7638f5..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# libvirt-go - -[![Build Status](http://ci.serversaurus.com/github.com/alexzorin/libvirt-go/status.svg?branch=master)](http://ci.serversaurus.com/github.com/alexzorin/libvirt-go) - -Go bindings for libvirt. - -Make sure to have `libvirt-dev` package (or the development files otherwise somewhere in your include path) - -## Version Support -Currently, the only supported version of libvirt is **1.2.2**, tagged as `v2.x` releases `gopkg.in/alexzorin/libvirt-go.v2` [(docs)](http://gopkg.in/alexzorin/libvirt-go.v2). - -The bindings will probably work with versions of libvirt that are higher than 1.2.2, depending on what is added in those releases. However, no features are currently being added that will cause the build or tests to break against 1.2.2. - -### OS Compatibility Matrix - -To quickly see what version of libvirt your OS can easily support (may be outdated). Obviously, nothing below 1.2.2 is usable with these bindings. - -| OS Release | libvirt Version | -| ------------ | ------------------------------ | -| FC19 | 1.2.9 from libvirt.org/sources | -| Debian 7 | 1.2.4 from wheezy-backports | -| Debian 6 | 0.9.12 from squeeze-backports | -| Ubuntu 14.04 | 1.2.2 from trusty | -| RHEL 6 | 0.10.x | -| RHEL 5 | 0.8.x | - - -### 0.9.x Support - -Previously there was support for libvirt 0.9.8 and below, however this is no longer being updated. These releases were tagged `v1.x` at `gopkg.in/alexzorin/libvirt-go.v1` [(docs)](http://gopkg.in/alexzorin/libvirt-go.v1). - -## Documentation - -* [api documentation for the bindings](http://godoc.org/github.com/alexzorin/libvirt-go) -* [api documentation for libvirt](http://libvirt.org/html/libvirt-libvirt.html) - -## Contributing - -Please fork and write tests. - -Integration tests are available where functionality isn't provided by the test driver, see `integration_test.go`. - -A `Vagrantfile` is included to run the integration tests: - -* `cd ./vagrant/{branch}` (i.e `./vagrant/master`, where you will find a `Vagrantfile` for the `master` branch) -* `vagrant up` to provision the virtual machine -* `vagrant ssh` to login to the virtual machine - -Once inside, `sudo su -`, `cd /libvirt-go` and `go test -tags integration`. diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/cfuncs.go b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/cfuncs.go deleted file mode 100644 index 81ae515..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/cfuncs.go +++ /dev/null @@ -1,96 +0,0 @@ -package libvirt - -/* -#cgo LDFLAGS: -lvirt -ldl -#include -#include -#include - -void virErrorFuncDummy(void *userData, virErrorPtr error) -{ -} - -int domainEventLifecycleCallback_cgo(virConnectPtr c, virDomainPtr d, - int event, int detail, void *data) -{ - return domainEventLifecycleCallback(c, d, event, detail, data); -} - -int domainEventGenericCallback_cgo(virConnectPtr c, virDomainPtr d, void *data) -{ - return domainEventGenericCallback(c, d, data); -} - -int domainEventRTCChangeCallback_cgo(virConnectPtr c, virDomainPtr d, - long long utcoffset, void *data) -{ - return domainEventRTCChangeCallback(c, d, utcoffset, data); -} - -int domainEventWatchdogCallback_cgo(virConnectPtr c, virDomainPtr d, - int action, void *data) -{ - return domainEventWatchdogCallback(c, d, action, data); -} - -int domainEventIOErrorCallback_cgo(virConnectPtr c, virDomainPtr d, - const char *srcPath, const char *devAlias, - int action, void *data) -{ - return domainEventIOErrorCallback(c, d, srcPath, devAlias, action, data); -} - -int domainEventGraphicsCallback_cgo(virConnectPtr c, virDomainPtr d, - int phase, const virDomainEventGraphicsAddress *local, - const virDomainEventGraphicsAddress *remote, - const char *authScheme, - const virDomainEventGraphicsSubject *subject, void *data) -{ - return domainEventGraphicsCallback(c, d, phase, local, remote, authScheme, subject, data); -} - -int domainEventIOErrorReasonCallback_cgo(virConnectPtr c, virDomainPtr d, - const char *srcPath, const char *devAlias, - int action, const char *reason, void *data) -{ - return domainEventIOErrorReasonCallback(c, d, srcPath, devAlias, action, reason, data); -} - -int domainEventBlockJobCallback_cgo(virConnectPtr c, virDomainPtr d, - const char *disk, int type, int status, void *data) -{ - return domainEventIOErrorReasonCallback(c, d, disk, type, status, data); -} - -int domainEventDiskChangeCallback_cgo(virConnectPtr c, virDomainPtr d, - const char *oldSrcPath, const char *newSrcPath, - const char *devAlias, int reason, void *data) -{ - return domainEventDiskChangeCallback(c, d, oldSrcPath, newSrcPath, devAlias, reason, data); -} - -int domainEventTrayChangeCallback_cgo(virConnectPtr c, virDomainPtr d, - const char *devAlias, int reason, void *data) -{ - return domainEventTrayChangeCallback(c, d, devAlias, reason, data); -} - -int domainEventReasonCallback_cgo(virConnectPtr c, virDomainPtr d, - int reason, void *data) -{ - return domainEventReasonCallback(c, d, reason, data); -} - -int domainEventBalloonChangeCallback_cgo(virConnectPtr c, virDomainPtr d, - unsigned long long actual, void *data) -{ - return domainEventBalloonChangeCallback(c, d, actual, data); -} - -int domainEventDeviceRemovedCallback_cgo(virConnectPtr c, virDomainPtr d, - const char *devAlias, void *data) -{ - return domainEventDeviceRemovedCallback(c, d, devAlias, data); -} -*/ -import "C" diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/constants.go b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/constants.go deleted file mode 100644 index a9f2ceb..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/constants.go +++ /dev/null @@ -1,385 +0,0 @@ -package libvirt - -/* -#cgo LDFLAGS: -lvirt -ldl -#include -#include -#include -*/ -import "C" - -// virDomainState -const ( - VIR_DOMAIN_NOSTATE = C.VIR_DOMAIN_NOSTATE - VIR_DOMAIN_RUNNING = C.VIR_DOMAIN_RUNNING - VIR_DOMAIN_BLOCKED = C.VIR_DOMAIN_BLOCKED - VIR_DOMAIN_PAUSED = C.VIR_DOMAIN_PAUSED - VIR_DOMAIN_SHUTDOWN = C.VIR_DOMAIN_SHUTDOWN - VIR_DOMAIN_CRASHED = C.VIR_DOMAIN_CRASHED - VIR_DOMAIN_PMSUSPENDED = C.VIR_DOMAIN_PMSUSPENDED - VIR_DOMAIN_SHUTOFF = C.VIR_DOMAIN_SHUTOFF -) - -//virConnectListAllDomainsFlags -const ( - VIR_CONNECT_LIST_DOMAINS_ACTIVE = C.VIR_CONNECT_LIST_DOMAINS_ACTIVE - VIR_CONNECT_LIST_DOMAINS_INACTIVE = C.VIR_CONNECT_LIST_DOMAINS_INACTIVE - VIR_CONNECT_LIST_DOMAINS_PERSISTENT = C.VIR_CONNECT_LIST_DOMAINS_PERSISTENT - VIR_CONNECT_LIST_DOMAINS_TRANSIENT = C.VIR_CONNECT_LIST_DOMAINS_TRANSIENT - VIR_CONNECT_LIST_DOMAINS_RUNNING = C.VIR_CONNECT_LIST_DOMAINS_RUNNING - VIR_CONNECT_LIST_DOMAINS_PAUSED = C.VIR_CONNECT_LIST_DOMAINS_PAUSED - VIR_CONNECT_LIST_DOMAINS_SHUTOFF = C.VIR_CONNECT_LIST_DOMAINS_SHUTOFF - VIR_CONNECT_LIST_DOMAINS_OTHER = C.VIR_CONNECT_LIST_DOMAINS_OTHER - VIR_CONNECT_LIST_DOMAINS_MANAGEDSAVE = C.VIR_CONNECT_LIST_DOMAINS_MANAGEDSAVE - VIR_CONNECT_LIST_DOMAINS_NO_MANAGEDSAVE = C.VIR_CONNECT_LIST_DOMAINS_NO_MANAGEDSAVE - VIR_CONNECT_LIST_DOMAINS_AUTOSTART = C.VIR_CONNECT_LIST_DOMAINS_AUTOSTART - VIR_CONNECT_LIST_DOMAINS_NO_AUTOSTART = C.VIR_CONNECT_LIST_DOMAINS_NO_AUTOSTART - VIR_CONNECT_LIST_DOMAINS_HAS_SNAPSHOT = C.VIR_CONNECT_LIST_DOMAINS_HAS_SNAPSHOT - VIR_CONNECT_LIST_DOMAINS_NO_SNAPSHOT = C.VIR_CONNECT_LIST_DOMAINS_NO_SNAPSHOT -) - -// virDomainMetadataType -const ( - VIR_DOMAIN_METADATA_DESCRIPTION = C.VIR_DOMAIN_METADATA_DESCRIPTION - VIR_DOMAIN_METADATA_TITLE = C.VIR_DOMAIN_METADATA_TITLE - VIR_DOMAIN_METADATA_ELEMENT = C.VIR_DOMAIN_METADATA_ELEMENT -) - -// virDomainVcpuFlags -const ( - VIR_DOMAIN_VCPU_CONFIG = C.VIR_DOMAIN_VCPU_CONFIG - VIR_DOMAIN_VCPU_CURRENT = C.VIR_DOMAIN_VCPU_CURRENT - VIR_DOMAIN_VCPU_LIVE = C.VIR_DOMAIN_VCPU_LIVE - VIR_DOMAIN_VCPU_MAXIMUM = C.VIR_DOMAIN_VCPU_MAXIMUM - VIR_DOMAIN_VCPU_GUEST = C.VIR_DOMAIN_VCPU_GUEST -) - -// virDomainMemoryModFlags -const ( - VIR_DOMAIN_MEM_CONFIG = C.VIR_DOMAIN_AFFECT_CONFIG - VIR_DOMAIN_MEM_CURRENT = C.VIR_DOMAIN_AFFECT_CURRENT - VIR_DOMAIN_MEM_LIVE = C.VIR_DOMAIN_AFFECT_LIVE - VIR_DOMAIN_MEM_MAXIMUM = C.VIR_DOMAIN_MEM_MAXIMUM -) - -// virStoragePoolState -const ( - VIR_STORAGE_POOL_INACTIVE = C.VIR_STORAGE_POOL_INACTIVE // Not running - VIR_STORAGE_POOL_BUILDING = C.VIR_STORAGE_POOL_BUILDING // Initializing pool,not available - VIR_STORAGE_POOL_RUNNING = C.VIR_STORAGE_POOL_RUNNING // Running normally - VIR_STORAGE_POOL_DEGRADED = C.VIR_STORAGE_POOL_DEGRADED // Running degraded - VIR_STORAGE_POOL_INACCESSIBLE = C.VIR_STORAGE_POOL_INACCESSIBLE // Running,but not accessible -) - -// virStoragePoolBuildFlags -const ( - VIR_STORAGE_POOL_BUILD_NEW = C.VIR_STORAGE_POOL_BUILD_NEW // Regular build from scratch - VIR_STORAGE_POOL_BUILD_REPAIR = C.VIR_STORAGE_POOL_BUILD_REPAIR // Repair / reinitialize - VIR_STORAGE_POOL_BUILD_RESIZE = C.VIR_STORAGE_POOL_BUILD_RESIZE // Extend existing pool - VIR_STORAGE_POOL_BUILD_NO_OVERWRITE = C.VIR_STORAGE_POOL_BUILD_NO_OVERWRITE // Do not overwrite existing pool - VIR_STORAGE_POOL_BUILD_OVERWRITE = C.VIR_STORAGE_POOL_BUILD_OVERWRITE // Overwrite data -) - -// virDomainDestroyFlags -const ( - VIR_DOMAIN_DESTROY_DEFAULT = C.VIR_DOMAIN_DESTROY_DEFAULT - VIR_DOMAIN_DESTROY_GRACEFUL = C.VIR_DOMAIN_DESTROY_GRACEFUL -) - -// virDomainShutdownFlags -const ( - VIR_DOMAIN_SHUTDOWN_DEFAULT = C.VIR_DOMAIN_SHUTDOWN_DEFAULT - VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN = C.VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN - VIR_DOMAIN_SHUTDOWN_GUEST_AGENT = C.VIR_DOMAIN_SHUTDOWN_GUEST_AGENT - VIR_DOMAIN_SHUTDOWN_INITCTL = C.VIR_DOMAIN_SHUTDOWN_INITCTL - VIR_DOMAIN_SHUTDOWN_SIGNAL = C.VIR_DOMAIN_SHUTDOWN_SIGNAL -) - -// virDomainAttachDeviceFlags -const ( - VIR_DOMAIN_DEVICE_MODIFY_CONFIG = C.VIR_DOMAIN_AFFECT_CONFIG - VIR_DOMAIN_DEVICE_MODIFY_CURRENT = C.VIR_DOMAIN_AFFECT_CURRENT - VIR_DOMAIN_DEVICE_MODIFY_LIVE = C.VIR_DOMAIN_AFFECT_LIVE - VIR_DOMAIN_DEVICE_MODIFY_FORCE = C.VIR_DOMAIN_DEVICE_MODIFY_FORCE -) - -// virStorageVolCreateFlags -const ( - VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA = C.VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA -) - -// virStorageVolDeleteFlags -const ( - VIR_STORAGE_VOL_DELETE_NORMAL = C.VIR_STORAGE_VOL_DELETE_NORMAL // Delete metadata only (fast) - VIR_STORAGE_VOL_DELETE_ZEROED = C.VIR_STORAGE_VOL_DELETE_ZEROED // Clear all data to zeros (slow) -) - -// virStorageVolResizeFlags -const ( - VIR_STORAGE_VOL_RESIZE_ALLOCATE = C.VIR_STORAGE_VOL_RESIZE_ALLOCATE // force allocation of new size - VIR_STORAGE_VOL_RESIZE_DELTA = C.VIR_STORAGE_VOL_RESIZE_DELTA // size is relative to current - VIR_STORAGE_VOL_RESIZE_SHRINK = C.VIR_STORAGE_VOL_RESIZE_SHRINK // allow decrease in capacity -) - -// virStorageVolType -const ( - VIR_STORAGE_VOL_FILE = C.VIR_STORAGE_VOL_FILE // Regular file based volumes - VIR_STORAGE_VOL_BLOCK = C.VIR_STORAGE_VOL_BLOCK // Block based volumes - VIR_STORAGE_VOL_DIR = C.VIR_STORAGE_VOL_DIR // Directory-passthrough based volume - VIR_STORAGE_VOL_NETWORK = C.VIR_STORAGE_VOL_NETWORK //Network volumes like RBD (RADOS Block Device) - VIR_STORAGE_VOL_NETDIR = C.VIR_STORAGE_VOL_NETDIR // Network accessible directory that can contain other network volumes -) - -// virStorageVolWipeAlgorithm -const ( - VIR_STORAGE_VOL_WIPE_ALG_ZERO = C.VIR_STORAGE_VOL_WIPE_ALG_ZERO // 1-pass, all zeroes - VIR_STORAGE_VOL_WIPE_ALG_NNSA = C.VIR_STORAGE_VOL_WIPE_ALG_NNSA // 4-pass NNSA Policy Letter NAP-14.1-C (XVI-8) - VIR_STORAGE_VOL_WIPE_ALG_DOD = C.VIR_STORAGE_VOL_WIPE_ALG_DOD // 4-pass DoD 5220.22-M section 8-306 procedure - VIR_STORAGE_VOL_WIPE_ALG_BSI = C.VIR_STORAGE_VOL_WIPE_ALG_BSI // 9-pass method recommended by the German Center of Security in Information Technologies - VIR_STORAGE_VOL_WIPE_ALG_GUTMANN = C.VIR_STORAGE_VOL_WIPE_ALG_GUTMANN // The canonical 35-pass sequence - VIR_STORAGE_VOL_WIPE_ALG_SCHNEIER = C.VIR_STORAGE_VOL_WIPE_ALG_SCHNEIER // 7-pass method described by Bruce Schneier in "Applied Cryptography" (1996) - VIR_STORAGE_VOL_WIPE_ALG_PFITZNER7 = C.VIR_STORAGE_VOL_WIPE_ALG_PFITZNER7 // 7-pass random - VIR_STORAGE_VOL_WIPE_ALG_PFITZNER33 = C.VIR_STORAGE_VOL_WIPE_ALG_PFITZNER33 // 33-pass random - VIR_STORAGE_VOL_WIPE_ALG_RANDOM = C.VIR_STORAGE_VOL_WIPE_ALG_RANDOM // 1-pass random -) - -// virSecretUsageType -const ( - VIR_SECRET_USAGE_TYPE_NONE = C.VIR_SECRET_USAGE_TYPE_NONE - VIR_SECRET_USAGE_TYPE_VOLUME = C.VIR_SECRET_USAGE_TYPE_VOLUME - VIR_SECRET_USAGE_TYPE_CEPH = C.VIR_SECRET_USAGE_TYPE_CEPH - VIR_SECRET_USAGE_TYPE_ISCSI = C.VIR_SECRET_USAGE_TYPE_ISCSI -) - -// virConnectListAllNetworksFlags -const ( - VIR_CONNECT_LIST_NETWORKS_INACTIVE = C.VIR_CONNECT_LIST_NETWORKS_INACTIVE - VIR_CONNECT_LIST_NETWORKS_ACTIVE = C.VIR_CONNECT_LIST_NETWORKS_ACTIVE - VIR_CONNECT_LIST_NETWORKS_PERSISTENT = C.VIR_CONNECT_LIST_NETWORKS_PERSISTENT - VIR_CONNECT_LIST_NETWORKS_TRANSIENT = C.VIR_CONNECT_LIST_NETWORKS_TRANSIENT - VIR_CONNECT_LIST_NETWORKS_AUTOSTART = C.VIR_CONNECT_LIST_NETWORKS_AUTOSTART - VIR_CONNECT_LIST_NETWORKS_NO_AUTOSTART = C.VIR_CONNECT_LIST_NETWORKS_NO_AUTOSTART -) - -// virConnectListAllStoragePoolsFlags -const ( - VIR_CONNECT_LIST_STORAGE_POOLS_INACTIVE = C.VIR_CONNECT_LIST_STORAGE_POOLS_INACTIVE - VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVE = C.VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVE - VIR_CONNECT_LIST_STORAGE_POOLS_PERSISTENT = C.VIR_CONNECT_LIST_STORAGE_POOLS_PERSISTENT - VIR_CONNECT_LIST_STORAGE_POOLS_TRANSIENT = C.VIR_CONNECT_LIST_STORAGE_POOLS_TRANSIENT - VIR_CONNECT_LIST_STORAGE_POOLS_AUTOSTART = C.VIR_CONNECT_LIST_STORAGE_POOLS_AUTOSTART - VIR_CONNECT_LIST_STORAGE_POOLS_NO_AUTOSTART = C.VIR_CONNECT_LIST_STORAGE_POOLS_NO_AUTOSTART - VIR_CONNECT_LIST_STORAGE_POOLS_DIR = C.VIR_CONNECT_LIST_STORAGE_POOLS_DIR - VIR_CONNECT_LIST_STORAGE_POOLS_FS = C.VIR_CONNECT_LIST_STORAGE_POOLS_FS - VIR_CONNECT_LIST_STORAGE_POOLS_NETFS = C.VIR_CONNECT_LIST_STORAGE_POOLS_NETFS - VIR_CONNECT_LIST_STORAGE_POOLS_LOGICAL = C.VIR_CONNECT_LIST_STORAGE_POOLS_LOGICAL - VIR_CONNECT_LIST_STORAGE_POOLS_DISK = C.VIR_CONNECT_LIST_STORAGE_POOLS_DISK - VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI = C.VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI - VIR_CONNECT_LIST_STORAGE_POOLS_SCSI = C.VIR_CONNECT_LIST_STORAGE_POOLS_SCSI - VIR_CONNECT_LIST_STORAGE_POOLS_MPATH = C.VIR_CONNECT_LIST_STORAGE_POOLS_MPATH - VIR_CONNECT_LIST_STORAGE_POOLS_RBD = C.VIR_CONNECT_LIST_STORAGE_POOLS_RBD - VIR_CONNECT_LIST_STORAGE_POOLS_SHEEPDOG = C.VIR_CONNECT_LIST_STORAGE_POOLS_SHEEPDOG - VIR_CONNECT_LIST_STORAGE_POOLS_GLUSTER = C.VIR_CONNECT_LIST_STORAGE_POOLS_GLUSTER -) - -// virStreamFlags -const ( - VIR_STREAM_NONBLOCK = C.VIR_STREAM_NONBLOCK -) - -// virKeycodeSet -const ( - VIR_KEYCODE_SET_LINUX = C.VIR_KEYCODE_SET_LINUX - VIR_KEYCODE_SET_XT = C.VIR_KEYCODE_SET_XT - VIR_KEYCODE_SET_ATSET1 = C.VIR_KEYCODE_SET_ATSET1 - VIR_KEYCODE_SET_ATSET2 = C.VIR_KEYCODE_SET_ATSET2 - VIR_KEYCODE_SET_ATSET3 = C.VIR_KEYCODE_SET_ATSET3 - VIR_KEYCODE_SET_OSX = C.VIR_KEYCODE_SET_OSX - VIR_KEYCODE_SET_XT_KBD = C.VIR_KEYCODE_SET_XT_KBD - VIR_KEYCODE_SET_USB = C.VIR_KEYCODE_SET_USB - VIR_KEYCODE_SET_WIN32 = C.VIR_KEYCODE_SET_WIN32 - VIR_KEYCODE_SET_RFB = C.VIR_KEYCODE_SET_RFB -) - -// virDomainCreateFlags -const ( - VIR_DOMAIN_NONE = C.VIR_DOMAIN_NONE - VIR_DOMAIN_START_PAUSED = C.VIR_DOMAIN_START_PAUSED - VIR_DOMAIN_START_AUTODESTROY = C.VIR_DOMAIN_START_AUTODESTROY - VIR_DOMAIN_START_BYPASS_CACHE = C.VIR_DOMAIN_START_BYPASS_CACHE - VIR_DOMAIN_START_FORCE_BOOT = C.VIR_DOMAIN_START_FORCE_BOOT -) - -const VIR_DOMAIN_MEMORY_PARAM_UNLIMITED = C.VIR_DOMAIN_MEMORY_PARAM_UNLIMITED - -// virDomainEventID -const ( - // event parameter in the callback is of type DomainLifecycleEvent - VIR_DOMAIN_EVENT_ID_LIFECYCLE = C.VIR_DOMAIN_EVENT_ID_LIFECYCLE - - // event parameter in the callback is nil - VIR_DOMAIN_EVENT_ID_REBOOT = C.VIR_DOMAIN_EVENT_ID_REBOOT - - // event parameter in the callback is of type DomainRTCChangeEvent - VIR_DOMAIN_EVENT_ID_RTC_CHANGE = C.VIR_DOMAIN_EVENT_ID_RTC_CHANGE - - // event parameter in the callback is of type DomainWatchdogEvent - VIR_DOMAIN_EVENT_ID_WATCHDOG = C.VIR_DOMAIN_EVENT_ID_WATCHDOG - - // event parameter in the callback is of type DomainIOErrorEvent - VIR_DOMAIN_EVENT_ID_IO_ERROR = C.VIR_DOMAIN_EVENT_ID_IO_ERROR - - // event parameter in the callback is of type DomainGraphicsEvent - VIR_DOMAIN_EVENT_ID_GRAPHICS = C.VIR_DOMAIN_EVENT_ID_GRAPHICS - - // virConnectDomainEventIOErrorReasonCallback - VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON = C.VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON - - // event parameter in the callback is nil - VIR_DOMAIN_EVENT_ID_CONTROL_ERROR = C.VIR_DOMAIN_EVENT_ID_CONTROL_ERROR - - // event parameter in the callback is of type DomainBlockJobEvent - VIR_DOMAIN_EVENT_ID_BLOCK_JOB = C.VIR_DOMAIN_EVENT_ID_BLOCK_JOB - - // event parameter in the callback is of type DomainDiskChangeEvent - VIR_DOMAIN_EVENT_ID_DISK_CHANGE = C.VIR_DOMAIN_EVENT_ID_DISK_CHANGE - - // event parameter in the callback is of type DomainTrayChangeEvent - VIR_DOMAIN_EVENT_ID_TRAY_CHANGE = C.VIR_DOMAIN_EVENT_ID_TRAY_CHANGE - - // event parameter in the callback is of type DomainReasonEvent - VIR_DOMAIN_EVENT_ID_PMWAKEUP = C.VIR_DOMAIN_EVENT_ID_PMWAKEUP - - // event parameter in the callback is of type DomainReasonEvent - VIR_DOMAIN_EVENT_ID_PMSUSPEND = C.VIR_DOMAIN_EVENT_ID_PMSUSPEND - - // event parameter in the callback is of type DomainBalloonChangeEvent - VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE = C.VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE - - // event parameter in the callback is of type DomainReasonEvent - VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK = C.VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK - - // event parameter in the callback is of type DomainDeviceRemovedEvent - VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED = C.VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED - - // TODO Post 1.2.4, enable later - // event parameter in the callback is of type DomainBlockJobEvent - // VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2 = C.VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2 -) - -// virDomainEventType -const ( - VIR_DOMAIN_EVENT_DEFINED = C.VIR_DOMAIN_EVENT_DEFINED - VIR_DOMAIN_EVENT_UNDEFINED = C.VIR_DOMAIN_EVENT_UNDEFINED - VIR_DOMAIN_EVENT_STARTED = C.VIR_DOMAIN_EVENT_STARTED - VIR_DOMAIN_EVENT_SUSPENDED = C.VIR_DOMAIN_EVENT_SUSPENDED - VIR_DOMAIN_EVENT_RESUMED = C.VIR_DOMAIN_EVENT_RESUMED - VIR_DOMAIN_EVENT_STOPPED = C.VIR_DOMAIN_EVENT_STOPPED - VIR_DOMAIN_EVENT_SHUTDOWN = C.VIR_DOMAIN_EVENT_SHUTDOWN - VIR_DOMAIN_EVENT_PMSUSPENDED = C.VIR_DOMAIN_EVENT_PMSUSPENDED - VIR_DOMAIN_EVENT_CRASHED = C.VIR_DOMAIN_EVENT_CRASHED -) - -// virDomainEventWatchdogAction: -// The action that is to be taken due to the watchdog device firing -const ( - // No action, watchdog ignored - VIR_DOMAIN_EVENT_WATCHDOG_NONE = C.VIR_DOMAIN_EVENT_WATCHDOG_NONE - - // Guest CPUs are paused - VIR_DOMAIN_EVENT_WATCHDOG_PAUSE = C.VIR_DOMAIN_EVENT_WATCHDOG_PAUSE - - // Guest CPUs are reset - VIR_DOMAIN_EVENT_WATCHDOG_RESET = C.VIR_DOMAIN_EVENT_WATCHDOG_RESET - - // Guest is forcibly powered off - VIR_DOMAIN_EVENT_WATCHDOG_POWEROFF = C.VIR_DOMAIN_EVENT_WATCHDOG_POWEROFF - - // Guest is requested to gracefully shutdown - VIR_DOMAIN_EVENT_WATCHDOG_SHUTDOWN = C.VIR_DOMAIN_EVENT_WATCHDOG_SHUTDOWN - - // No action, a debug message logged - VIR_DOMAIN_EVENT_WATCHDOG_DEBUG = C.VIR_DOMAIN_EVENT_WATCHDOG_DEBUG -) - -// virDomainEventIOErrorAction -// The action that is to be taken due to an IO error occurring -const ( - // No action, IO error ignored - VIR_DOMAIN_EVENT_IO_ERROR_NONE = C.VIR_DOMAIN_EVENT_IO_ERROR_NONE - - // Guest CPUs are paused - VIR_DOMAIN_EVENT_IO_ERROR_PAUSE = C.VIR_DOMAIN_EVENT_IO_ERROR_PAUSE - - // IO error reported to guest OS - VIR_DOMAIN_EVENT_IO_ERROR_REPORT = C.VIR_DOMAIN_EVENT_IO_ERROR_REPORT -) - -// virDomainEventGraphicsPhase -// The phase of the graphics client connection -const ( - // Initial socket connection established - VIR_DOMAIN_EVENT_GRAPHICS_CONNECT = C.VIR_DOMAIN_EVENT_GRAPHICS_CONNECT - - // Authentication & setup completed - VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZE = C.VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZE - - // Final socket disconnection - VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECT = C.VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECT -) - -// virDomainEventGraphicsAddressType -const ( - // IPv4 address - VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4 = C.VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4 - - // IPv6 address - VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6 = C.VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6 - - // UNIX socket path - VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_UNIX = C.VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_UNIX -) - -// virDomainBlockJobType -const ( - // Placeholder - VIR_DOMAIN_BLOCK_JOB_TYPE_UNKNOWN = C.VIR_DOMAIN_BLOCK_JOB_TYPE_UNKNOWN - - // Block Pull (virDomainBlockPull, or virDomainBlockRebase without - // flags), job ends on completion - VIR_DOMAIN_BLOCK_JOB_TYPE_PULL = C.VIR_DOMAIN_BLOCK_JOB_TYPE_PULL - - // Block Copy (virDomainBlockCopy, or virDomainBlockRebase with - // flags), job exists as long as mirroring is active - VIR_DOMAIN_BLOCK_JOB_TYPE_COPY = C.VIR_DOMAIN_BLOCK_JOB_TYPE_COPY - - // Block Commit (virDomainBlockCommit without flags), job ends on - // completion - VIR_DOMAIN_BLOCK_JOB_TYPE_COMMIT = C.VIR_DOMAIN_BLOCK_JOB_TYPE_COMMIT - - // TODO Post 1.2.4, enable later - // Active Block Commit (virDomainBlockCommit with flags), job - // exists as long as sync is active - // VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT = C.VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT -) - -// virConnectDomainEventBlockJobStatus -const ( - VIR_DOMAIN_BLOCK_JOB_COMPLETED = C.VIR_DOMAIN_BLOCK_JOB_COMPLETED - VIR_DOMAIN_BLOCK_JOB_FAILED = C.VIR_DOMAIN_BLOCK_JOB_FAILED - VIR_DOMAIN_BLOCK_JOB_CANCELED = C.VIR_DOMAIN_BLOCK_JOB_CANCELED - VIR_DOMAIN_BLOCK_JOB_READY = C.VIR_DOMAIN_BLOCK_JOB_READY -) - -// virConnectDomainEventDiskChangeReason -const ( - // OldSrcPath is set - VIR_DOMAIN_EVENT_DISK_CHANGE_MISSING_ON_START = C.VIR_DOMAIN_EVENT_DISK_CHANGE_MISSING_ON_START - VIR_DOMAIN_EVENT_DISK_DROP_MISSING_ON_START = C.VIR_DOMAIN_EVENT_DISK_DROP_MISSING_ON_START -) - -// virConnectDomainEventTrayChangeReason -const ( - VIR_DOMAIN_EVENT_TRAY_CHANGE_OPEN = C.VIR_DOMAIN_EVENT_TRAY_CHANGE_OPEN - VIR_DOMAIN_EVENT_TRAY_CHANGE_CLOSE = C.VIR_DOMAIN_EVENT_TRAY_CHANGE_CLOSE -) diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/domain.go b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/domain.go deleted file mode 100644 index e13abe1..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/domain.go +++ /dev/null @@ -1,574 +0,0 @@ -package libvirt - -/* -#cgo LDFLAGS: -lvirt -ldl -#include -#include -#include -*/ -import "C" - -import ( - "reflect" - "strings" - "unsafe" -) - -type VirDomain struct { - ptr C.virDomainPtr -} - -type VirDomainBlockInfo struct { - ptr C.virDomainBlockInfo -} - -type VirDomainInfo struct { - ptr C.virDomainInfo -} - -type VirTypedParameter struct { - Name string - Value interface{} -} - -type VirTypedParameters []VirTypedParameter - -func (dest *VirTypedParameters) loadFromCPtr(params C.virTypedParameterPtr, nParams int) { - // reset slice - *dest = VirTypedParameters{} - - // transform that C array to a go slice - hdr := reflect.SliceHeader{ - Data: uintptr(unsafe.Pointer(params)), - Len: int(nParams), - Cap: int(nParams), - } - rawParams := *(*[]C.struct__virTypedParameter)(unsafe.Pointer(&hdr)) - - // there is probably a more elegant way to deal with that union - for _, rawParam := range rawParams { - name := C.GoStringN(&rawParam.field[0], C.VIR_TYPED_PARAM_FIELD_LENGTH) - if nbIdx := strings.Index(name, "\x00"); nbIdx != -1 { - name = name[:nbIdx] - } - switch rawParam._type { - case C.VIR_TYPED_PARAM_INT: - *dest = append(*dest, VirTypedParameter{name, int(*(*C.int)(unsafe.Pointer(&rawParam.value[0])))}) - case C.VIR_TYPED_PARAM_UINT: - *dest = append(*dest, VirTypedParameter{name, uint32(*(*C.uint)(unsafe.Pointer(&rawParam.value[0])))}) - case C.VIR_TYPED_PARAM_LLONG: - *dest = append(*dest, VirTypedParameter{name, int64(*(*C.longlong)(unsafe.Pointer(&rawParam.value[0])))}) - case C.VIR_TYPED_PARAM_ULLONG: - *dest = append(*dest, VirTypedParameter{name, uint64(*(*C.ulonglong)(unsafe.Pointer(&rawParam.value[0])))}) - case C.VIR_TYPED_PARAM_DOUBLE: - *dest = append(*dest, VirTypedParameter{name, float64(*(*C.double)(unsafe.Pointer(&rawParam.value[0])))}) - case C.VIR_TYPED_PARAM_BOOLEAN: - if int(*(*C.char)(unsafe.Pointer(&rawParam.value[0]))) == 1 { - *dest = append(*dest, VirTypedParameter{name, true}) - } else { - *dest = append(*dest, VirTypedParameter{name, false}) - } - case C.VIR_TYPED_PARAM_STRING: - *dest = append(*dest, VirTypedParameter{name, C.GoString((*C.char)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&rawParam.value[0])))))}) - } - } -} - -func (d *VirDomain) Free() error { - if result := C.virDomainFree(d.ptr); result != 0 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) Create() error { - result := C.virDomainCreate(d.ptr) - if result == -1 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) Destroy() error { - result := C.virDomainDestroy(d.ptr) - if result == -1 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) Shutdown() error { - result := C.virDomainShutdown(d.ptr) - if result == -1 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) Reboot(flags uint) error { - result := C.virDomainReboot(d.ptr, C.uint(flags)) - if result == -1 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) IsActive() (bool, error) { - result := C.virDomainIsActive(d.ptr) - if result == -1 { - return false, GetLastError() - } - if result == 1 { - return true, nil - } - return false, nil -} - -func (d *VirDomain) SetAutostart(autostart bool) error { - var cAutostart C.int - switch autostart { - case true: - cAutostart = 1 - default: - cAutostart = 0 - } - result := C.virDomainSetAutostart(d.ptr, cAutostart) - if result == -1 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) GetAutostart() (bool, error) { - var out C.int - result := C.virDomainGetAutostart(d.ptr, (*C.int)(unsafe.Pointer(&out))) - if result == -1 { - return false, GetLastError() - } - switch out { - case 1: - return true, nil - default: - return false, nil - } -} - -func (d *VirDomain) GetBlockInfo(disk string, flag uint) (VirDomainBlockInfo, error) { - bi := VirDomainBlockInfo{} - var ptr C.virDomainBlockInfo - cDisk := C.CString(disk) - defer C.free(unsafe.Pointer(cDisk)) - result := C.virDomainGetBlockInfo(d.ptr, cDisk, (*C.virDomainBlockInfo)(unsafe.Pointer(&ptr)), C.uint(flag)) - if result == -1 { - return bi, GetLastError() - } - bi.ptr = ptr - return bi, nil -} - -func (b *VirDomainBlockInfo) Allocation() uint64 { - return uint64(b.ptr.allocation) -} - -func (b *VirDomainBlockInfo) Capacity() uint64 { - return uint64(b.ptr.capacity) -} - -func (b *VirDomainBlockInfo) Physical() uint64 { - return uint64(b.ptr.physical) -} - -func (d *VirDomain) GetName() (string, error) { - name := C.virDomainGetName(d.ptr) - if name == nil { - return "", GetLastError() - } - return C.GoString(name), nil -} - -func (d *VirDomain) GetState() ([]int, error) { - var cState C.int - var cReason C.int - result := C.virDomainGetState(d.ptr, - (*C.int)(unsafe.Pointer(&cState)), - (*C.int)(unsafe.Pointer(&cReason)), - 0) - if int(result) == -1 { - return []int{}, GetLastError() - } - return []int{int(cState), int(cReason)}, nil -} - -func (d *VirDomain) GetID() (uint, error) { - id := uint(C.virDomainGetID(d.ptr)) - if id == ^uint(0) { - return id, GetLastError() - } - return id, nil -} - -func (d *VirDomain) GetUUID() ([]byte, error) { - var cUuid [C.VIR_UUID_BUFLEN](byte) - cuidPtr := unsafe.Pointer(&cUuid) - result := C.virDomainGetUUID(d.ptr, (*C.uchar)(cuidPtr)) - if result != 0 { - return []byte{}, GetLastError() - } - return C.GoBytes(cuidPtr, C.VIR_UUID_BUFLEN), nil -} - -func (d *VirDomain) GetUUIDString() (string, error) { - var cUuid [C.VIR_UUID_STRING_BUFLEN](C.char) - cuidPtr := unsafe.Pointer(&cUuid) - result := C.virDomainGetUUIDString(d.ptr, (*C.char)(cuidPtr)) - if result != 0 { - return "", GetLastError() - } - return C.GoString((*C.char)(cuidPtr)), nil -} - -func (d *VirDomain) GetInfo() (VirDomainInfo, error) { - di := VirDomainInfo{} - var ptr C.virDomainInfo - result := C.virDomainGetInfo(d.ptr, (*C.virDomainInfo)(unsafe.Pointer(&ptr))) - if result == -1 { - return di, GetLastError() - } - di.ptr = ptr - return di, nil -} - -func (d *VirDomain) GetXMLDesc(flags uint32) (string, error) { - result := C.virDomainGetXMLDesc(d.ptr, C.uint(flags)) - if result == nil { - return "", GetLastError() - } - xml := C.GoString(result) - C.free(unsafe.Pointer(result)) - return xml, nil -} - -func (i *VirDomainInfo) GetState() uint8 { - return uint8(i.ptr.state) -} - -func (i *VirDomainInfo) GetMaxMem() uint64 { - return uint64(i.ptr.maxMem) -} - -func (i *VirDomainInfo) GetMemory() uint64 { - return uint64(i.ptr.memory) -} - -func (i *VirDomainInfo) GetNrVirtCpu() uint16 { - return uint16(i.ptr.nrVirtCpu) -} - -func (i *VirDomainInfo) GetCpuTime() uint64 { - return uint64(i.ptr.cpuTime) -} - -func (d *VirDomain) GetCPUStats(params *VirTypedParameters, nParams int, startCpu int, nCpus uint32, flags uint32) (int, error) { - var cParams C.virTypedParameterPtr - var cParamsLen int - - cParamsLen = int(nCpus) * nParams - - if params != nil && cParamsLen > 0 { - cParams = (C.virTypedParameterPtr)(C.calloc(C.size_t(cParamsLen), C.size_t(unsafe.Sizeof(C.struct__virTypedParameter{})))) - defer C.virTypedParamsFree(cParams, C.int(cParamsLen)) - } else { - cParamsLen = 0 - cParams = nil - } - - result := int(C.virDomainGetCPUStats(d.ptr, (C.virTypedParameterPtr)(cParams), C.uint(nParams), C.int(startCpu), C.uint(nCpus), C.uint(flags))) - if result == -1 { - return result, GetLastError() - } - - if cParamsLen > 0 { - params.loadFromCPtr(cParams, cParamsLen) - } - - return result, nil -} - -// Warning: No test written for this function -func (d *VirDomain) GetInterfaceParameters(device string, params *VirTypedParameters, nParams *int, flags uint32) (int, error) { - var cParams C.virTypedParameterPtr - - if params != nil && *nParams > 0 { - cParams = (C.virTypedParameterPtr)(C.calloc(C.size_t(*nParams), C.size_t(unsafe.Sizeof(C.struct__virTypedParameter{})))) - defer C.virTypedParamsFree(cParams, C.int(*nParams)) - } else { - cParams = nil - } - - result := int(C.virDomainGetInterfaceParameters(d.ptr, C.CString(device), (C.virTypedParameterPtr)(cParams), (*C.int)(unsafe.Pointer(nParams)), C.uint(flags))) - if result == -1 { - return result, GetLastError() - } - - if params != nil && *nParams > 0 { - params.loadFromCPtr(cParams, *nParams) - } - - return result, nil -} - -func (d *VirDomain) GetMetadata(tipus int, uri string, flags uint32) (string, error) { - var cUri *C.char - if uri != "" { - cUri = C.CString(uri) - defer C.free(unsafe.Pointer(cUri)) - } - - result := C.virDomainGetMetadata(d.ptr, C.int(tipus), cUri, C.uint(flags)) - if result == nil { - return "", GetLastError() - - } - defer C.free(unsafe.Pointer(result)) - return C.GoString(result), nil -} - -func (d *VirDomain) SetMetadata(metaDataType int, metaDataCont, uriKey, uri string, flags uint32) error { - var cMetaDataCont *C.char - var cUriKey *C.char - var cUri *C.char - - cMetaDataCont = C.CString(metaDataCont) - defer C.free(unsafe.Pointer(cMetaDataCont)) - - if metaDataType == VIR_DOMAIN_METADATA_ELEMENT { - cUriKey = C.CString(uriKey) - defer C.free(unsafe.Pointer(cUriKey)) - cUri = C.CString(uri) - defer C.free(unsafe.Pointer(cUri)) - } - result := C.virDomainSetMetadata(d.ptr, C.int(metaDataType), cMetaDataCont, cUriKey, cUri, C.uint(flags)) - if result == -1 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) Undefine() error { - result := C.virDomainUndefine(d.ptr) - if result == -1 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) SetMaxMemory(memory uint) error { - result := C.virDomainSetMaxMemory(d.ptr, C.ulong(memory)) - if result == -1 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) SetMemory(memory uint64) error { - result := C.virDomainSetMemory(d.ptr, C.ulong(memory)) - if result == -1 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) SetMemoryFlags(memory uint64, flags uint32) error { - result := C.virDomainSetMemoryFlags(d.ptr, C.ulong(memory), C.uint(flags)) - if result == -1 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) SetMemoryStatsPeriod(period int, flags uint) error { - result := C.virDomainSetMemoryStatsPeriod(d.ptr, C.int(period), C.uint(flags)) - if result == -1 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) SetVcpus(vcpu uint) error { - result := C.virDomainSetVcpus(d.ptr, C.uint(vcpu)) - if result == -1 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) SetVcpusFlags(vcpu uint, flags uint) error { - result := C.virDomainSetVcpusFlags(d.ptr, C.uint(vcpu), C.uint(flags)) - if result == -1 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) Suspend() error { - result := C.virDomainSuspend(d.ptr) - if result == -1 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) Resume() error { - result := C.virDomainResume(d.ptr) - if result == -1 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) AbortJob() error { - result := C.virDomainAbortJob(d.ptr) - if result == -1 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) DestroyFlags(flags uint) error { - result := C.virDomainDestroyFlags(d.ptr, C.uint(flags)) - if result == -1 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) ShutdownFlags(flags uint) error { - result := C.virDomainShutdownFlags(d.ptr, C.uint(flags)) - if result == -1 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) AttachDevice(xml string) error { - cXml := C.CString(xml) - defer C.free(unsafe.Pointer(cXml)) - result := C.virDomainAttachDevice(d.ptr, cXml) - if result == -1 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) AttachDeviceFlags(xml string, flags uint) error { - cXml := C.CString(xml) - defer C.free(unsafe.Pointer(cXml)) - result := C.virDomainAttachDeviceFlags(d.ptr, cXml, C.uint(flags)) - if result == -1 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) DetachDevice(xml string) error { - cXml := C.CString(xml) - defer C.free(unsafe.Pointer(cXml)) - result := C.virDomainDetachDevice(d.ptr, cXml) - if result == -1 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) DetachDeviceFlags(xml string, flags uint) error { - cXml := C.CString(xml) - defer C.free(unsafe.Pointer(cXml)) - result := C.virDomainDetachDeviceFlags(d.ptr, cXml, C.uint(flags)) - if result == -1 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) Screenshot(stream *VirStream, screen, flags uint) (string, error) { - cType := C.virDomainScreenshot(d.ptr, stream.ptr, C.uint(screen), C.uint(flags)) - if cType == nil { - return "", GetLastError() - } - defer C.free(unsafe.Pointer(cType)) - - mimeType := C.GoString(cType) - return mimeType, nil -} - -func (d *VirDomain) SendKey(codeset, holdtime uint, keycodes []uint, flags uint) error { - result := C.virDomainSendKey(d.ptr, C.uint(codeset), C.uint(holdtime), (*C.uint)(unsafe.Pointer(&keycodes[0])), C.int(len(keycodes)), C.uint(flags)) - if result == -1 { - return GetLastError() - } - - return nil -} - -func (d *VirDomain) BlockStatsFlags(disk string, params *VirTypedParameters, nParams int, flags uint32) (int, error) { - var cParams C.virTypedParameterPtr - cDisk := C.CString(disk) - defer C.free(unsafe.Pointer(cDisk)) - - cParamsLen := C.int(nParams) - - if params != nil && nParams > 0 { - cParams = (C.virTypedParameterPtr)(C.calloc(C.size_t(nParams), C.size_t(unsafe.Sizeof(C.struct__virTypedParameter{})))) - defer C.virTypedParamsFree(cParams, cParamsLen) - } else { - cParams = nil - } - - result := int(C.virDomainBlockStatsFlags(d.ptr, cDisk, (C.virTypedParameterPtr)(cParams), &cParamsLen, C.uint(flags))) - if result == -1 { - return result, GetLastError() - } - - if cParamsLen > 0 && params != nil { - params.loadFromCPtr(cParams, nParams) - } - - return int(cParamsLen), nil -} - -type VirDomainInterfaceStats struct { - RxBytes int64 - RxPackets int64 - RxErrs int64 - RxDrop int64 - TxBytes int64 - TxPackets int64 - TxErrs int64 - TxDrop int64 -} - -func (d *VirDomain) InterfaceStats(path string) (VirDomainInterfaceStats, error) { - cPath := C.CString(path) - defer C.free(unsafe.Pointer(cPath)) - - size := C.size_t(unsafe.Sizeof(C.struct__virDomainInterfaceStats{})) - - cStats := (C.virDomainInterfaceStatsPtr)(C.malloc(size)) - defer C.free(unsafe.Pointer(cStats)) - - result := C.virDomainInterfaceStats(d.ptr, cPath, (C.virDomainInterfaceStatsPtr)(cStats), size) - - if result != 0 { - return VirDomainInterfaceStats{}, GetLastError() - } - return VirDomainInterfaceStats{ - RxBytes: int64(cStats.rx_bytes), - RxPackets: int64(cStats.rx_packets), - RxErrs: int64(cStats.rx_errs), - RxDrop: int64(cStats.rx_drop), - TxBytes: int64(cStats.tx_bytes), - TxPackets: int64(cStats.tx_packets), - TxErrs: int64(cStats.tx_errs), - TxDrop: int64(cStats.tx_drop), - }, nil -} diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/domain_test.go b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/domain_test.go deleted file mode 100644 index 368abee..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/domain_test.go +++ /dev/null @@ -1,483 +0,0 @@ -package libvirt - -import ( - "strings" - "testing" - "time" -) - -func buildTestDomain() (VirDomain, VirConnection) { - conn := buildTestConnection() - dom, err := conn.DomainDefineXML(` - ` + time.Now().String() + ` - 8192 - - hvm - - `) - if err != nil { - panic(err) - } - return dom, conn -} - -func TestUndefineDomain(t *testing.T) { - dom, conn := buildTestDomain() - defer func() { - dom.Free() - conn.CloseConnection() - }() - name, err := dom.GetName() - if err != nil { - t.Error(err) - return - } - if err := dom.Undefine(); err != nil { - t.Error(err) - return - } - if _, err := conn.LookupDomainByName(name); err == nil { - t.Fatal("Shouldn't have been able to find domain") - return - } -} - -func TestGetDomainName(t *testing.T) { - dom, conn := buildTestDomain() - defer func() { - dom.Undefine() - dom.Free() - conn.CloseConnection() - }() - if _, err := dom.GetName(); err != nil { - t.Error(err) - return - } -} - -func TestGetDomainState(t *testing.T) { - dom, conn := buildTestDomain() - defer func() { - dom.Free() - conn.CloseConnection() - }() - state, err := dom.GetState() - if err != nil { - t.Error(err) - return - } - if len(state) != 2 { - t.Error("Length of domain state should be 2") - return - } - if state[0] != 5 || state[1] != 0 { - t.Error("Domain state in test transport should be [5 0]") - return - } -} - -func TestGetDomainID(t *testing.T) { - dom, conn := buildTestDomain() - defer func() { - dom.Free() - conn.CloseConnection() - }() - - if err := dom.Create(); err != nil { - t.Error("Failed to create domain") - } - - if id, err := dom.GetID(); id == ^uint(0) || err != nil { - dom.Destroy() - t.Error("Couldn't get domain ID") - return - } - dom.Destroy() -} - -func TestGetDomainUUID(t *testing.T) { - dom, conn := buildTestDomain() - defer func() { - dom.Free() - conn.CloseConnection() - }() - _, err := dom.GetUUID() - // how to test uuid validity? - if err != nil { - t.Error(err) - return - } -} - -func TestGetDomainUUIDString(t *testing.T) { - dom, conn := buildTestDomain() - defer func() { - dom.Free() - conn.CloseConnection() - }() - _, err := dom.GetUUIDString() - if err != nil { - t.Error(err) - return - } -} - -func TestGetDomainInfo(t *testing.T) { - dom, conn := buildTestDomain() - defer func() { - dom.Free() - conn.CloseConnection() - }() - _, err := dom.GetInfo() - if err != nil { - t.Error(err) - return - } -} - -func TestGetDomainXMLDesc(t *testing.T) { - dom, conn := buildTestDomain() - defer func() { - dom.Free() - conn.CloseConnection() - }() - _, err := dom.GetXMLDesc(0) - if err != nil { - t.Error(err) - return - } -} - -func TestCreateDomainSnapshotXML(t *testing.T) { - dom, conn := buildTestDomain() - defer func() { - dom.Free() - conn.CloseConnection() - }() - ss, err := dom.CreateSnapshotXML(` - - Test snapshot that will fail because its unsupported - - `, 0) - if err != nil { - t.Error(err) - return - } - defer ss.Free() -} - -func TestSaveDomain(t *testing.T) { - dom, conn := buildTestDomain() - defer func() { - dom.Free() - conn.CloseConnection() - }() - // get the name so we can get a handle on it later - domName, err := dom.GetName() - if err != nil { - t.Error(err) - return - } - const tmpFile = "/tmp/libvirt-go-test.tmp" - if err := dom.Save(tmpFile); err != nil { - t.Error(err) - return - } - if err := conn.Restore(tmpFile); err != nil { - t.Error(err) - return - } - if _, err = conn.LookupDomainByName(domName); err != nil { - t.Error(err) - return - } -} - -func TestSaveDomainFlags(t *testing.T) { - dom, conn := buildTestDomain() - defer func() { - dom.Free() - conn.CloseConnection() - }() - const srcFile = "/tmp/libvirt-go-test.tmp" - if err := dom.SaveFlags(srcFile, "", 0); err == nil { - t.Fatal("expected xml modification unsupported") - return - } -} - -func TestCreateDestroyDomain(t *testing.T) { - dom, conn := buildTestDomain() - defer func() { - dom.Free() - conn.CloseConnection() - }() - if err := dom.Create(); err != nil { - t.Error(err) - return - } - state, err := dom.GetState() - if err != nil { - t.Error(err) - return - } - if state[0] != VIR_DOMAIN_RUNNING { - t.Fatal("Domain should be running") - return - } - if err = dom.Destroy(); err != nil { - t.Error(err) - return - } - state, err = dom.GetState() - if err != nil { - t.Error(err) - return - } - if state[0] != VIR_DOMAIN_SHUTOFF { - t.Fatal("Domain should be destroyed") - return - } -} - -func TestShutdownDomain(t *testing.T) { - dom, conn := buildTestDomain() - defer conn.CloseConnection() - if err := dom.Create(); err != nil { - t.Error(err) - return - } - if err := dom.Shutdown(); err != nil { - t.Error(err) - return - } - state, err := dom.GetState() - if err != nil { - t.Error(err) - return - } - if state[0] != 5 || state[1] != 1 { - t.Fatal("state should be [5 1]") - return - } -} - -func TestShutdownReboot(t *testing.T) { - dom, conn := buildTestDomain() - defer func() { - dom.Free() - conn.CloseConnection() - }() - if err := dom.Reboot(0); err != nil { - t.Error(err) - return - } -} - -func TestDomainAutostart(t *testing.T) { - dom, conn := buildTestDomain() - defer func() { - dom.Free() - conn.CloseConnection() - }() - as, err := dom.GetAutostart() - if err != nil { - t.Error(err) - return - } - if as { - t.Fatal("autostart should be false") - return - } - if err := dom.SetAutostart(true); err != nil { - t.Error(err) - return - } - as, err = dom.GetAutostart() - if err != nil { - t.Error(err) - return - } - if !as { - t.Fatal("autostart should be true") - return - } -} - -func TestDomainIsActive(t *testing.T) { - dom, conn := buildTestDomain() - defer func() { - dom.Free() - conn.CloseConnection() - }() - if err := dom.Create(); err != nil { - t.Log(err) - return - } - active, err := dom.IsActive() - if err != nil { - t.Error(err) - return - } - if !active { - t.Fatal("Domain should be active") - return - } - if err := dom.Destroy(); err != nil { - t.Error(err) - return - } - active, err = dom.IsActive() - if err != nil { - t.Error(err) - return - } - if active { - t.Fatal("Domain should be inactive") - return - } -} - -func TestDomainSetMaxMemory(t *testing.T) { - const mem = 8192 * 100 - dom, conn := buildTestDomain() - defer func() { - dom.Free() - conn.CloseConnection() - }() - if err := dom.SetMaxMemory(mem); err != nil { - t.Error(err) - return - } -} - -func TestDomainSetMemory(t *testing.T) { - dom, conn := buildTestDomain() - defer func() { - dom.Free() - conn.CloseConnection() - }() - if err := dom.Create(); err != nil { - t.Error(err) - return - } - if err := dom.SetMemory(1024); err != nil { - t.Error(err) - return - } -} - -func TestDomainSetVcpus(t *testing.T) { - dom, conn := buildTestDomain() - defer func() { - dom.Free() - conn.CloseConnection() - }() - if err := dom.Create(); err != nil { - t.Error(err) - return - } - if err := dom.SetVcpus(1); err != nil { - t.Error(err) - return - } - if err := dom.SetVcpusFlags(1, VIR_DOMAIN_VCPU_LIVE); err != nil { - t.Error(err) - return - } -} - -func TestDomainFree(t *testing.T) { - dom, conn := buildTestDomain() - defer conn.CloseConnection() - if err := dom.Free(); err != nil { - t.Error(err) - return - } -} - -func TestDomainSuspend(t *testing.T) { - dom, conn := buildTestDomain() - defer func() { - dom.Free() - conn.CloseConnection() - }() - if err := dom.Create(); err != nil { - t.Error(err) - return - } - defer dom.Destroy() - if err := dom.Suspend(); err != nil { - t.Error(err) - return - } - defer dom.Resume() -} - -func TesDomainShutdownFlags(t *testing.T) { - dom, conn := buildTestDomain() - defer conn.CloseConnection() - if err := dom.Create(); err != nil { - t.Error(err) - return - } - if err := dom.ShutdownFlags(VIR_DOMAIN_SHUTDOWN_SIGNAL); err != nil { - t.Error(err) - return - } - state, err := dom.GetState() - if err != nil { - t.Error(err) - return - } - if state[0] != 5 || state[1] != 1 { - t.Fatal("state should be [5 1]") - return - } -} - -func TesDomainDestoryFlags(t *testing.T) { - dom, conn := buildTestDomain() - defer conn.CloseConnection() - if err := dom.Create(); err != nil { - t.Error(err) - return - } - if err := dom.DestroyFlags(VIR_DOMAIN_DESTROY_GRACEFUL); err != nil { - t.Error(err) - return - } - state, err := dom.GetState() - if err != nil { - t.Error(err) - return - } - if state[0] != 5 || state[1] != 1 { - t.Fatal("state should be [5 1]") - return - } -} - -func TestDomainScreenshot(t *testing.T) { - dom, conn := buildTestDomain() - defer func() { - dom.Free() - conn.CloseConnection() - }() - if err := dom.Create(); err != nil { - t.Error(err) - return - } - stream, err := NewVirStream(&conn, 0) - if err != nil { - t.Fatalf("failed to create new stream: %s", err) - } - defer stream.Free() - mime, err := dom.Screenshot(stream, 0, 0) - if err != nil { - t.Fatalf("failed to take screenshot: %s", err) - } - if strings.Index(mime, "image/") != 0 { - t.Fatalf("Wanted image/*, got %s", mime) - } -} diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/error.go b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/error.go deleted file mode 100644 index 810cd25..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/error.go +++ /dev/null @@ -1,504 +0,0 @@ -package libvirt - -/* -#cgo LDFLAGS: -lvirt -ldl -#include -#include -#include - -#ifndef VIR_FROM_BHYVE -#define VIR_FROM_BHYVE 57 -#endif - -#ifndef VIR_FROM_CRYPTO -#define VIR_FROM_CRYPTO 58 -#endif - -#ifndef VIR_FROM_FIREWALL -#define VIR_FROM_FIREWALL 59 -#endif - -*/ -import "C" - -import "fmt" - -// virErrorLevel -const ( - VIR_ERR_NONE = C.VIR_ERR_NONE - VIR_ERR_WARNING = C.VIR_ERR_WARNING - VIR_ERR_ERROR = C.VIR_ERR_ERROR -) - -// virErrorNumber -const ( - VIR_ERR_OK = C.VIR_ERR_OK - - // internal error - VIR_ERR_INTERNAL_ERROR = C.VIR_ERR_INTERNAL_ERROR - - // memory allocation failure - VIR_ERR_NO_MEMORY = C.VIR_ERR_NO_MEMORY - - // no support for this function - VIR_ERR_NO_SUPPORT = C.VIR_ERR_NO_SUPPORT - - // could not resolve hostname - VIR_ERR_UNKNOWN_HOST = C.VIR_ERR_UNKNOWN_HOST - - // can't connect to hypervisor - VIR_ERR_NO_CONNECT = C.VIR_ERR_NO_CONNECT - - // invalid connection object - VIR_ERR_INVALID_CONN = C.VIR_ERR_INVALID_CONN - - // invalid domain object - VIR_ERR_INVALID_DOMAIN = C.VIR_ERR_INVALID_DOMAIN - - // invalid function argument - VIR_ERR_INVALID_ARG = C.VIR_ERR_INVALID_ARG - - // a command to hypervisor failed - VIR_ERR_OPERATION_FAILED = C.VIR_ERR_OPERATION_FAILED - - // a HTTP GET command to failed - VIR_ERR_GET_FAILED = C.VIR_ERR_GET_FAILED - - // a HTTP POST command to failed - VIR_ERR_POST_FAILED = C.VIR_ERR_POST_FAILED - - // unexpected HTTP error code - VIR_ERR_HTTP_ERROR = C.VIR_ERR_HTTP_ERROR - - // failure to serialize an S-Expr - VIR_ERR_SEXPR_SERIAL = C.VIR_ERR_SEXPR_SERIAL - - // could not open Xen hypervisor control - VIR_ERR_NO_XEN = C.VIR_ERR_NO_XEN - - // failure doing an hypervisor call - VIR_ERR_XEN_CALL = C.VIR_ERR_XEN_CALL - - // unknown OS type - VIR_ERR_OS_TYPE = C.VIR_ERR_OS_TYPE - - // missing kernel information - VIR_ERR_NO_KERNEL = C.VIR_ERR_NO_KERNEL - - // missing root device information - VIR_ERR_NO_ROOT = C.VIR_ERR_NO_ROOT - - // missing source device information - VIR_ERR_NO_SOURCE = C.VIR_ERR_NO_SOURCE - - // missing target device information - VIR_ERR_NO_TARGET = C.VIR_ERR_NO_TARGET - - // missing domain name information - VIR_ERR_NO_NAME = C.VIR_ERR_NO_NAME - - // missing domain OS information - VIR_ERR_NO_OS = C.VIR_ERR_NO_OS - - // missing domain devices information - VIR_ERR_NO_DEVICE = C.VIR_ERR_NO_DEVICE - - // could not open Xen Store control - VIR_ERR_NO_XENSTORE = C.VIR_ERR_NO_XENSTORE - - // too many drivers registered - VIR_ERR_DRIVER_FULL = C.VIR_ERR_DRIVER_FULL - - // not supported by the drivers (DEPRECATED) - VIR_ERR_CALL_FAILED = C.VIR_ERR_CALL_FAILED - - // an XML description is not well formed or broken - VIR_ERR_XML_ERROR = C.VIR_ERR_XML_ERROR - - // the domain already exist - VIR_ERR_DOM_EXIST = C.VIR_ERR_DOM_EXIST - - // operation forbidden on read-only connections - VIR_ERR_OPERATION_DENIED = C.VIR_ERR_OPERATION_DENIED - - // failed to open a conf file - VIR_ERR_OPEN_FAILED = C.VIR_ERR_OPEN_FAILED - - // failed to read a conf file - VIR_ERR_READ_FAILED = C.VIR_ERR_READ_FAILED - - // failed to parse a conf file - VIR_ERR_PARSE_FAILED = C.VIR_ERR_PARSE_FAILED - - // failed to parse the syntax of a conf file - VIR_ERR_CONF_SYNTAX = C.VIR_ERR_CONF_SYNTAX - - // failed to write a conf file - VIR_ERR_WRITE_FAILED = C.VIR_ERR_WRITE_FAILED - - // detail of an XML error - VIR_ERR_XML_DETAIL = C.VIR_ERR_XML_DETAIL - - // invalid network object - VIR_ERR_INVALID_NETWORK = C.VIR_ERR_INVALID_NETWORK - - // the network already exist - VIR_ERR_NETWORK_EXIST = C.VIR_ERR_NETWORK_EXIST - - // general system call failure - VIR_ERR_SYSTEM_ERROR = C.VIR_ERR_SYSTEM_ERROR - - // some sort of RPC error - VIR_ERR_RPC = C.VIR_ERR_RPC - - // error from a GNUTLS call - VIR_ERR_GNUTLS_ERROR = C.VIR_ERR_GNUTLS_ERROR - - // failed to start network - VIR_WAR_NO_NETWORK = C.VIR_WAR_NO_NETWORK - - // domain not found or unexpectedly disappeared - VIR_ERR_NO_DOMAIN = C.VIR_ERR_NO_DOMAIN - - // network not found - VIR_ERR_NO_NETWORK = C.VIR_ERR_NO_NETWORK - - // invalid MAC address - VIR_ERR_INVALID_MAC = C.VIR_ERR_INVALID_MAC - - // authentication failed - VIR_ERR_AUTH_FAILED = C.VIR_ERR_AUTH_FAILED - - // invalid storage pool object - VIR_ERR_INVALID_STORAGE_POOL = C.VIR_ERR_INVALID_STORAGE_POOL - - // invalid storage vol object - VIR_ERR_INVALID_STORAGE_VOL = C.VIR_ERR_INVALID_STORAGE_VOL - - // failed to start storage - VIR_WAR_NO_STORAGE = C.VIR_WAR_NO_STORAGE - - // storage pool not found - VIR_ERR_NO_STORAGE_POOL = C.VIR_ERR_NO_STORAGE_POOL - - // storage volume not found - VIR_ERR_NO_STORAGE_VOL = C.VIR_ERR_NO_STORAGE_VOL - - // failed to start node driver - VIR_WAR_NO_NODE = C.VIR_WAR_NO_NODE - - // invalid node device object - VIR_ERR_INVALID_NODE_DEVICE = C.VIR_ERR_INVALID_NODE_DEVICE - - // node device not found - VIR_ERR_NO_NODE_DEVICE = C.VIR_ERR_NO_NODE_DEVICE - - // security model not found - VIR_ERR_NO_SECURITY_MODEL = C.VIR_ERR_NO_SECURITY_MODEL - - // operation is not applicable at this time - VIR_ERR_OPERATION_INVALID = C.VIR_ERR_OPERATION_INVALID - - // failed to start interface driver - VIR_WAR_NO_INTERFACE = C.VIR_WAR_NO_INTERFACE - - // interface driver not running - VIR_ERR_NO_INTERFACE = C.VIR_ERR_NO_INTERFACE - - // invalid interface object - VIR_ERR_INVALID_INTERFACE = C.VIR_ERR_INVALID_INTERFACE - - // more than one matching interface found - VIR_ERR_MULTIPLE_INTERFACES = C.VIR_ERR_MULTIPLE_INTERFACES - - // failed to start nwfilter driver - VIR_WAR_NO_NWFILTER = C.VIR_WAR_NO_NWFILTER - - // invalid nwfilter object - VIR_ERR_INVALID_NWFILTER = C.VIR_ERR_INVALID_NWFILTER - - // nw filter pool not found - VIR_ERR_NO_NWFILTER = C.VIR_ERR_NO_NWFILTER - - // nw filter pool not found - VIR_ERR_BUILD_FIREWALL = C.VIR_ERR_BUILD_FIREWALL - - // failed to start secret storage - VIR_WAR_NO_SECRET = C.VIR_WAR_NO_SECRET - - // invalid secret - VIR_ERR_INVALID_SECRET = C.VIR_ERR_INVALID_SECRET - - // secret not found - VIR_ERR_NO_SECRET = C.VIR_ERR_NO_SECRET - - // unsupported configuration construct - VIR_ERR_CONFIG_UNSUPPORTED = C.VIR_ERR_CONFIG_UNSUPPORTED - - // timeout occurred during operation - VIR_ERR_OPERATION_TIMEOUT = C.VIR_ERR_OPERATION_TIMEOUT - - // a migration worked, but making the VM persist on the dest host failed - VIR_ERR_MIGRATE_PERSIST_FAILED = C.VIR_ERR_MIGRATE_PERSIST_FAILED - - // a synchronous hook script failed - VIR_ERR_HOOK_SCRIPT_FAILED = C.VIR_ERR_HOOK_SCRIPT_FAILED - - // invalid domain snapshot - VIR_ERR_INVALID_DOMAIN_SNAPSHOT = C.VIR_ERR_INVALID_DOMAIN_SNAPSHOT - - // domain snapshot not found - VIR_ERR_NO_DOMAIN_SNAPSHOT = C.VIR_ERR_NO_DOMAIN_SNAPSHOT - - // stream pointer not valid - VIR_ERR_INVALID_STREAM = C.VIR_ERR_INVALID_STREAM - - // valid API use but unsupported by the given driver - VIR_ERR_ARGUMENT_UNSUPPORTED = C.VIR_ERR_ARGUMENT_UNSUPPORTED - - // storage pool probe failed - VIR_ERR_STORAGE_PROBE_FAILED = C.VIR_ERR_STORAGE_PROBE_FAILED - - // storage pool already built - VIR_ERR_STORAGE_POOL_BUILT = C.VIR_ERR_STORAGE_POOL_BUILT - - // force was not requested for a risky domain snapshot revert - VIR_ERR_SNAPSHOT_REVERT_RISKY = C.VIR_ERR_SNAPSHOT_REVERT_RISKY - - // operation on a domain was canceled/aborted by user - VIR_ERR_OPERATION_ABORTED = C.VIR_ERR_OPERATION_ABORTED - - // authentication cancelled - VIR_ERR_AUTH_CANCELLED = C.VIR_ERR_AUTH_CANCELLED - - // The metadata is not present - VIR_ERR_NO_DOMAIN_METADATA = C.VIR_ERR_NO_DOMAIN_METADATA - - // Migration is not safe - VIR_ERR_MIGRATE_UNSAFE = C.VIR_ERR_MIGRATE_UNSAFE - - // integer overflow - VIR_ERR_OVERFLOW = C.VIR_ERR_OVERFLOW - - // action prevented by block copy job - VIR_ERR_BLOCK_COPY_ACTIVE = C.VIR_ERR_BLOCK_COPY_ACTIVE - - // The requested operation is not supported - VIR_ERR_OPERATION_UNSUPPORTED = C.VIR_ERR_OPERATION_UNSUPPORTED - - // error in ssh transport driver - VIR_ERR_SSH = C.VIR_ERR_SSH - - // guest agent is unresponsive, not running or not usable - VIR_ERR_AGENT_UNRESPONSIVE = C.VIR_ERR_AGENT_UNRESPONSIVE - - // resource is already in use - VIR_ERR_RESOURCE_BUSY = C.VIR_ERR_RESOURCE_BUSY - - // operation on the object/resource was denied - VIR_ERR_ACCESS_DENIED = C.VIR_ERR_ACCESS_DENIED - - // error from a dbus service - VIR_ERR_DBUS_SERVICE = C.VIR_ERR_DBUS_SERVICE - - // the storage vol already exists - VIR_ERR_STORAGE_VOL_EXIST = C.VIR_ERR_STORAGE_VOL_EXIST - - // given CPU is incompatible with host CPU - // added in libvirt 1.2.6 - // VIR_ERR_CPU_INCOMPATIBLE = C.VIR_ERR_CPU_INCOMPATIBLE -) - -// virErrorDomain -const ( - VIR_FROM_NONE = C.VIR_FROM_NONE - - // Error at Xen hypervisor layer - VIR_FROM_XEN = C.VIR_FROM_XEN - - // Error at connection with xend daemon - VIR_FROM_XEND = C.VIR_FROM_XEND - - // Error at connection with xen store - VIR_FROM_XENSTORE = C.VIR_FROM_XENSTORE - - // Error in the S-Expression code - VIR_FROM_SEXPR = C.VIR_FROM_SEXPR - - // Error in the XML code - VIR_FROM_XML = C.VIR_FROM_XML - - // Error when operating on a domain - VIR_FROM_DOM = C.VIR_FROM_DOM - - // Error in the XML-RPC code - VIR_FROM_RPC = C.VIR_FROM_RPC - - // Error in the proxy code; unused since 0.8.6 - VIR_FROM_PROXY = C.VIR_FROM_PROXY - - // Error in the configuration file handling - VIR_FROM_CONF = C.VIR_FROM_CONF - - // Error at the QEMU daemon - VIR_FROM_QEMU = C.VIR_FROM_QEMU - - // Error when operating on a network - VIR_FROM_NET = C.VIR_FROM_NET - - // Error from test driver - VIR_FROM_TEST = C.VIR_FROM_TEST - - // Error from remote driver - VIR_FROM_REMOTE = C.VIR_FROM_REMOTE - - // Error from OpenVZ driver - VIR_FROM_OPENVZ = C.VIR_FROM_OPENVZ - - // Error at Xen XM layer - VIR_FROM_XENXM = C.VIR_FROM_XENXM - - // Error in the Linux Stats code - VIR_FROM_STATS_LINUX = C.VIR_FROM_STATS_LINUX - - // Error from Linux Container driver - VIR_FROM_LXC = C.VIR_FROM_LXC - - // Error from storage driver - VIR_FROM_STORAGE = C.VIR_FROM_STORAGE - - // Error from network config - VIR_FROM_NETWORK = C.VIR_FROM_NETWORK - - // Error from domain config - VIR_FROM_DOMAIN = C.VIR_FROM_DOMAIN - - // Error at the UML driver - VIR_FROM_UML = C.VIR_FROM_UML - - // Error from node device monitor - VIR_FROM_NODEDEV = C.VIR_FROM_NODEDEV - - // Error from xen inotify layer - VIR_FROM_XEN_INOTIFY = C.VIR_FROM_XEN_INOTIFY - - // Error from security framework - VIR_FROM_SECURITY = C.VIR_FROM_SECURITY - - // Error from VirtualBox driver - VIR_FROM_VBOX = C.VIR_FROM_VBOX - - // Error when operating on an interface - VIR_FROM_INTERFACE = C.VIR_FROM_INTERFACE - - // The OpenNebula driver no longer exists. Retained for ABI/API compat only - VIR_FROM_ONE = C.VIR_FROM_ONE - - // Error from ESX driver - VIR_FROM_ESX = C.VIR_FROM_ESX - - // Error from IBM power hypervisor - VIR_FROM_PHYP = C.VIR_FROM_PHYP - - // Error from secret storage - VIR_FROM_SECRET = C.VIR_FROM_SECRET - - // Error from CPU driver - VIR_FROM_CPU = C.VIR_FROM_CPU - - // Error from XenAPI - VIR_FROM_XENAPI = C.VIR_FROM_XENAPI - - // Error from network filter driver - VIR_FROM_NWFILTER = C.VIR_FROM_NWFILTER - - // Error from Synchronous hooks - VIR_FROM_HOOK = C.VIR_FROM_HOOK - - // Error from domain snapshot - VIR_FROM_DOMAIN_SNAPSHOT = C.VIR_FROM_DOMAIN_SNAPSHOT - - // Error from auditing subsystem - VIR_FROM_AUDIT = C.VIR_FROM_AUDIT - - // Error from sysinfo/SMBIOS - VIR_FROM_SYSINFO = C.VIR_FROM_SYSINFO - - // Error from I/O streams - VIR_FROM_STREAMS = C.VIR_FROM_STREAMS - - // Error from VMware driver - VIR_FROM_VMWARE = C.VIR_FROM_VMWARE - - // Error from event loop impl - VIR_FROM_EVENT = C.VIR_FROM_EVENT - - // Error from libxenlight driver - VIR_FROM_LIBXL = C.VIR_FROM_LIBXL - - // Error from lock manager - VIR_FROM_LOCKING = C.VIR_FROM_LOCKING - - // Error from Hyper-V driver - VIR_FROM_HYPERV = C.VIR_FROM_HYPERV - - // Error from capabilities - VIR_FROM_CAPABILITIES = C.VIR_FROM_CAPABILITIES - - // Error from URI handling - VIR_FROM_URI = C.VIR_FROM_URI - - // Error from auth handling - VIR_FROM_AUTH = C.VIR_FROM_AUTH - - // Error from DBus - VIR_FROM_DBUS = C.VIR_FROM_DBUS - - // Error from Parallels - VIR_FROM_PARALLELS = C.VIR_FROM_PARALLELS - - // Error from Device - VIR_FROM_DEVICE = C.VIR_FROM_DEVICE - - // Error from libssh2 connection transport - VIR_FROM_SSH = C.VIR_FROM_SSH - - // Error from lockspace - VIR_FROM_LOCKSPACE = C.VIR_FROM_LOCKSPACE - - // Error from initctl device communication - VIR_FROM_INITCTL = C.VIR_FROM_INITCTL - - // Error from identity code - VIR_FROM_IDENTITY = C.VIR_FROM_IDENTITY - - // Error from cgroups - VIR_FROM_CGROUP = C.VIR_FROM_CGROUP - - // Error from access control manager - VIR_FROM_ACCESS = C.VIR_FROM_ACCESS - - // Error from systemd code - VIR_FROM_SYSTEMD = C.VIR_FROM_SYSTEMD - - // Error from bhyve driver - VIR_FROM_BHYVE = C.VIR_FROM_BHYVE - - // Error from crypto code - VIR_FROM_CRYPTO = C.VIR_FROM_CRYPTO - - // Error from firewall - VIR_FROM_FIREWALL = C.VIR_FROM_FIREWALL -) - -type VirError struct { - Code int - Domain int - Message string - Level int -} - -func (err VirError) Error() string { - return fmt.Sprintf("[Code-%d] [Domain-%d] %s", - err.Code, err.Domain, err.Message) -} diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/events.go b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/events.go deleted file mode 100644 index 04f94f1..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/events.go +++ /dev/null @@ -1,321 +0,0 @@ -package libvirt - -import ( - "unsafe" -) - -/* -#cgo LDFLAGS: -lvirt -ldl -#include -*/ -import "C" - -type DomainLifecycleEvent struct { - Event int - Detail int -} - -type DomainRTCChangeEvent struct { - Utcoffset int64 -} - -type DomainWatchdogEvent struct { - Action int -} - -type DomainIOErrorEvent struct { - SrcPath string - DevAlias string - Action int -} - -type DomainEventGraphicsAddress struct { - Family int - Node string - Service string -} - -type DomainEventGraphicsSubjectIdentity struct { - Type string - Name string -} - -type DomainGraphicsEvent struct { - Phase int - Local DomainEventGraphicsAddress - Remote DomainEventGraphicsAddress - AuthScheme string - Subject []DomainEventGraphicsSubjectIdentity -} - -type DomainIOErrorReasonEvent struct { - DomainIOErrorEvent - Reason string -} - -type DomainBlockJobEvent struct { - Disk string - Type int - Status int -} - -type DomainDiskChangeEvent struct { - OldSrcPath string - NewSrcPath string - DevAlias string - Reason int -} - -type DomainTrayChangeEvent struct { - DevAlias string - Reason int -} - -type DomainReasonEvent struct { - Reason int -} - -type DomainBalloonChangeEvent struct { - Actual uint64 -} - -type DomainDeviceRemovedEvent struct { - DevAlias string -} - -//export domainEventLifecycleCallback -func domainEventLifecycleCallback(c C.virConnectPtr, d C.virDomainPtr, - event int, detail int, - opaque unsafe.Pointer) int { - - context := *(*domainCallbackContext)(opaque) - domain := VirDomain{ptr: d} - connection := VirConnection{ptr: c} - - eventDetails := DomainLifecycleEvent{ - Event: event, - Detail: detail, - } - - return (*context.cb)(&connection, &domain, eventDetails, context.f) -} - -//export domainEventGenericCallback -func domainEventGenericCallback(c C.virConnectPtr, d C.virDomainPtr, - opaque unsafe.Pointer) int { - - context := *(*domainCallbackContext)(opaque) - domain := VirDomain{ptr: d} - connection := VirConnection{ptr: c} - - return (*context.cb)(&connection, &domain, nil, context.f) -} - -//export domainEventRTCChangeCallback -func domainEventRTCChangeCallback(c C.virConnectPtr, d C.virDomainPtr, - utcoffset int64, opaque unsafe.Pointer) int { - - context := *(*domainCallbackContext)(opaque) - domain := VirDomain{ptr: d} - connection := VirConnection{ptr: c} - - eventDetails := DomainRTCChangeEvent{ - Utcoffset: utcoffset, - } - - return (*context.cb)(&connection, &domain, eventDetails, context.f) -} - -//export domainEventWatchdogCallback -func domainEventWatchdogCallback(c C.virConnectPtr, d C.virDomainPtr, - action int, opaque unsafe.Pointer) int { - - context := *(*domainCallbackContext)(opaque) - domain := VirDomain{ptr: d} - connection := VirConnection{ptr: c} - - eventDetails := DomainWatchdogEvent{ - Action: action, - } - - return (*context.cb)(&connection, &domain, eventDetails, context.f) -} - -//export domainEventIOErrorCallback -func domainEventIOErrorCallback(c C.virConnectPtr, d C.virDomainPtr, - srcPath string, devAlias string, action int, opaque unsafe.Pointer) int { - - context := *(*domainCallbackContext)(opaque) - domain := VirDomain{ptr: d} - connection := VirConnection{ptr: c} - - eventDetails := DomainIOErrorEvent{ - SrcPath: srcPath, - DevAlias: devAlias, - Action: action, - } - - return (*context.cb)(&connection, &domain, eventDetails, context.f) -} - -//export domainEventGraphicsCallback -func domainEventGraphicsCallback(c C.virConnectPtr, d C.virDomainPtr, - phase int, - local C.virDomainEventGraphicsAddressPtr, - remote C.virDomainEventGraphicsAddressPtr, - authScheme string, - subject C.virDomainEventGraphicsSubjectPtr, - opaque unsafe.Pointer) int { - - context := *(*domainCallbackContext)(opaque) - domain := VirDomain{ptr: d} - connection := VirConnection{ptr: c} - - subjectGo := make([]DomainEventGraphicsSubjectIdentity, subject.nidentity) - nidentities := int(subject.nidentity) - identities := (*[1 << 30]C.virDomainEventGraphicsSubjectIdentity)(unsafe.Pointer(&subject.identities))[:nidentities:nidentities] - for _, identity := range identities { - subjectGo = append(subjectGo, - DomainEventGraphicsSubjectIdentity{ - Type: C.GoString(identity._type), - Name: C.GoString(identity.name), - }, - ) - } - - eventDetails := DomainGraphicsEvent{ - Phase: phase, - Local: DomainEventGraphicsAddress{ - Family: int(local.family), - Node: C.GoString(local.node), - Service: C.GoString(local.service), - }, - Remote: DomainEventGraphicsAddress{ - Family: int(remote.family), - Node: C.GoString(remote.node), - Service: C.GoString(remote.service), - }, - AuthScheme: authScheme, - Subject: subjectGo, - } - - return (*context.cb)(&connection, &domain, eventDetails, context.f) -} - -//export domainEventIOErrorReasonCallback -func domainEventIOErrorReasonCallback(c C.virConnectPtr, d C.virDomainPtr, - srcPath string, devAlias string, action int, reason string, - opaque unsafe.Pointer) int { - - context := *(*domainCallbackContext)(opaque) - domain := VirDomain{ptr: d} - connection := VirConnection{ptr: c} - - eventDetails := DomainIOErrorReasonEvent{ - DomainIOErrorEvent: DomainIOErrorEvent{ - SrcPath: srcPath, - DevAlias: devAlias, - Action: action, - }, - Reason: reason, - } - - return (*context.cb)(&connection, &domain, eventDetails, context.f) -} - -//export domainEventBlockJobCallback -func domainEventBlockJobCallback(c C.virConnectPtr, d C.virDomainPtr, - disk string, _type int, status int, opaque unsafe.Pointer) int { - - context := *(*domainCallbackContext)(opaque) - domain := VirDomain{ptr: d} - connection := VirConnection{ptr: c} - - eventDetails := DomainBlockJobEvent{ - Disk: disk, - Type: _type, - Status: status, - } - - return (*context.cb)(&connection, &domain, eventDetails, context.f) -} - -//export domainEventDiskChangeCallback -func domainEventDiskChangeCallback(c C.virConnectPtr, d C.virDomainPtr, - oldSrcPath string, newSrcPath string, devAlias string, - reason int, opaque unsafe.Pointer) int { - - context := *(*domainCallbackContext)(opaque) - domain := VirDomain{ptr: d} - connection := VirConnection{ptr: c} - - eventDetails := DomainDiskChangeEvent{ - OldSrcPath: oldSrcPath, - NewSrcPath: newSrcPath, - DevAlias: devAlias, - Reason: reason, - } - - return (*context.cb)(&connection, &domain, eventDetails, context.f) -} - -//export domainEventTrayChangeCallback -func domainEventTrayChangeCallback(c C.virConnectPtr, d C.virDomainPtr, - devAlias string, reason int, opaque unsafe.Pointer) int { - - context := *(*domainCallbackContext)(opaque) - domain := VirDomain{ptr: d} - connection := VirConnection{ptr: c} - - eventDetails := DomainTrayChangeEvent{ - DevAlias: devAlias, - Reason: reason, - } - - return (*context.cb)(&connection, &domain, eventDetails, context.f) -} - -//export domainEventReasonCallback -func domainEventReasonCallback(c C.virConnectPtr, d C.virDomainPtr, - reason int, opaque unsafe.Pointer) int { - - context := *(*domainCallbackContext)(opaque) - domain := VirDomain{ptr: d} - connection := VirConnection{ptr: c} - - eventDetails := DomainReasonEvent{ - Reason: reason, - } - - return (*context.cb)(&connection, &domain, eventDetails, context.f) -} - -//export domainEventBalloonChangeCallback -func domainEventBalloonChangeCallback(c C.virConnectPtr, d C.virDomainPtr, - actual uint64, opaque unsafe.Pointer) int { - - context := *(*domainCallbackContext)(opaque) - domain := VirDomain{ptr: d} - connection := VirConnection{ptr: c} - - eventDetails := DomainBalloonChangeEvent{ - Actual: actual, - } - - return (*context.cb)(&connection, &domain, eventDetails, context.f) -} - -//export domainEventDeviceRemovedCallback -func domainEventDeviceRemovedCallback(c C.virConnectPtr, d C.virDomainPtr, - devAlias string, opaque unsafe.Pointer) int { - - context := *(*domainCallbackContext)(opaque) - domain := VirDomain{ptr: d} - connection := VirConnection{ptr: c} - - eventDetails := DomainDeviceRemovedEvent{ - DevAlias: devAlias, - } - - return (*context.cb)(&connection, &domain, eventDetails, context.f) -} diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/integration_test.go b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/integration_test.go deleted file mode 100644 index 0ec6eb8..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/integration_test.go +++ /dev/null @@ -1,962 +0,0 @@ -// +build integration - -package libvirt - -import ( - "io/ioutil" - "os" - "strings" - "testing" - "time" -) - -func defineTestLxcDomain(conn VirConnection, title string) (VirDomain, error) { - if title == "" { - title = time.Now().String() - } - xml := ` - ` + title + ` - ` + title + ` - 102400 - - exe - /bin/sh - - - - - ` - dom, err := conn.DomainDefineXML(xml) - return dom, err -} - -// Integration tests are run against LXC using Libvirt 1.2.x -// on Debian Wheezy (libvirt from wheezy-backports) -// -// To run, -// go test -tags integration - -func TestIntegrationGetMetadata(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - title := time.Now().String() - dom, err := defineTestLxcDomain(conn, title) - if err != nil { - t.Error(err) - return - } - defer dom.Free() - if err := dom.Create(); err != nil { - t.Error(err) - return - } - v, err := dom.GetMetadata(VIR_DOMAIN_METADATA_TITLE, "", 0) - dom.Destroy() - if err != nil { - t.Error(err) - return - } - if v != title { - t.Fatal("title didnt match: expected %s, got %s", title, v) - return - } - if err := dom.Undefine(); err != nil { - t.Error(err) - return - } -} - -func TestIntegrationSetMetadata(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - dom, err := defineTestLxcDomain(conn, "") - if err != nil { - t.Error(err) - return - } - defer func() { - dom.Undefine() - dom.Free() - }() - const domTitle = "newtitle" - if err := dom.SetMetadata(VIR_DOMAIN_METADATA_TITLE, domTitle, "", "", 0); err != nil { - t.Error(err) - return - } - v, err := dom.GetMetadata(VIR_DOMAIN_METADATA_TITLE, "", 0) - if err != nil { - t.Error(err) - return - } - if v != domTitle { - t.Fatalf("VIR_DOMAIN_METADATA_TITLE should have been %s, not %s", domTitle, v) - return - } -} - -func TestIntegrationGetSysinfo(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - info, err := conn.GetSysinfo(0) - if err != nil { - t.Error(err) - return - } - if strings.Index(info, " - - - - ` -} - -func TestIntergrationDefineUndefineNWFilterXML(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - filter, err := conn.NWFilterDefineXML(testNWFilterXML("", "ipv4")) - if err != nil { - t.Fatal(err) - } - defer func() { - if err := filter.Undefine(); err != nil { - t.Fatal(err) - } - filter.Free() - }() - _, err = conn.NWFilterDefineXML(testNWFilterXML("", "bad")) - if err == nil { - t.Fatal("Should have had an error") - } -} - -func TestIntegrationNWFilterGetName(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - filter, err := conn.NWFilterDefineXML(testNWFilterXML("", "ipv4")) - if err != nil { - t.Error(err) - return - } - defer func() { - filter.Undefine() - filter.Free() - }() - if _, err := filter.GetName(); err != nil { - t.Error(err) - } -} - -func TestIntegrationNWFilterGetUUID(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - filter, err := conn.NWFilterDefineXML(testNWFilterXML("", "ipv4")) - if err != nil { - t.Error(err) - return - } - defer func() { - filter.Undefine() - filter.Free() - }() - if _, err := filter.GetUUID(); err != nil { - t.Error(err) - } -} - -func TestIntegrationNWFilterGetUUIDString(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - filter, err := conn.NWFilterDefineXML(testNWFilterXML("", "ipv4")) - if err != nil { - t.Error(err) - return - } - defer func() { - filter.Undefine() - filter.Free() - }() - if _, err := filter.GetUUIDString(); err != nil { - t.Error(err) - } -} - -func TestIntegrationNWFilterGetXMLDesc(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - filter, err := conn.NWFilterDefineXML(testNWFilterXML("", "ipv4")) - if err != nil { - t.Error(err) - return - } - defer func() { - filter.Undefine() - filter.Free() - }() - if _, err := filter.GetXMLDesc(0); err != nil { - t.Error(err) - } -} - -func TestIntegrationLookupNWFilterByName(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - origName := time.Now().String() - filter, err := conn.NWFilterDefineXML(testNWFilterXML(origName, "ipv4")) - if err != nil { - t.Error(err) - return - } - defer func() { - filter.Undefine() - filter.Free() - }() - filter, err = conn.LookupNWFilterByName(origName) - if err != nil { - t.Error(err) - return - } - var newName string - newName, err = filter.GetName() - if err != nil { - t.Error(err) - return - } - if newName != origName { - t.Fatalf("expected filter name: %s ,got: %s", origName, newName) - } -} - -func TestIntegrationLookupNWFilterByUUIDString(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - origName := time.Now().String() - filter, err := conn.NWFilterDefineXML(testNWFilterXML(origName, "ipv4")) - if err != nil { - t.Error(err) - return - } - defer func() { - filter.Undefine() - filter.Free() - }() - filter, err = conn.LookupNWFilterByName(origName) - if err != nil { - t.Error(err) - return - } - var filterUUID string - filterUUID, err = filter.GetUUIDString() - if err != nil { - t.Error(err) - return - } - filter, err = conn.LookupNWFilterByUUIDString(filterUUID) - if err != nil { - t.Error(err) - return - } - name, err := filter.GetName() - if err != nil { - t.Error(err) - return - } - if name != origName { - t.Fatalf("fetching by UUID: expected filter name: %s ,got: %s", name, origName) - } -} - -func TestIntegrationDomainAttachDetachDevice(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - - dom, err := defineTestLxcDomain(conn, "") - if err != nil { - t.Error(err) - return - } - defer func() { - dom.Undefine() - dom.Free() - }() - const nwXml = ` - - - - ` - if err := dom.AttachDeviceFlags(nwXml, VIR_DOMAIN_DEVICE_MODIFY_CONFIG); err != nil { - t.Error(err) - return - } - if err := dom.DetachDeviceFlags(nwXml, VIR_DOMAIN_DEVICE_MODIFY_CONFIG); err != nil { - t.Error(err) - return - } -} - -func TestStorageVolResize(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - - poolPath, err := ioutil.TempDir("", "default-pool-test-1") - if err != nil { - t.Error(err) - return - } - defer os.RemoveAll(poolPath) - pool, err := conn.StoragePoolDefineXML(` - default-pool-test-1 - - `+poolPath+` - - `, 0) - defer func() { - pool.Undefine() - pool.Free() - }() - if err := pool.Create(0); err != nil { - t.Error(err) - return - } - defer pool.Destroy() - vol, err := pool.StorageVolCreateXML(testStorageVolXML("", poolPath), 0) - if err != nil { - t.Error(err) - return - } - defer func() { - vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) - vol.Free() - }() - const newCapacityInBytes = 12582912 - if err := vol.Resize(newCapacityInBytes, VIR_STORAGE_VOL_RESIZE_ALLOCATE); err != nil { - t.Fatal(err) - } -} - -func TestStorageVolWipe(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - - poolPath, err := ioutil.TempDir("", "default-pool-test-1") - if err != nil { - t.Error(err) - return - } - defer os.RemoveAll(poolPath) - pool, err := conn.StoragePoolDefineXML(` - default-pool-test-1 - - `+poolPath+` - - `, 0) - defer func() { - pool.Undefine() - pool.Free() - }() - if err := pool.Create(0); err != nil { - t.Error(err) - return - } - defer pool.Destroy() - vol, err := pool.StorageVolCreateXML(testStorageVolXML("", poolPath), 0) - if err != nil { - t.Error(err) - return - } - defer func() { - vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) - vol.Free() - }() - if err := vol.Wipe(0); err != nil { - t.Fatal(err) - } -} - -func TestStorageVolWipePattern(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - - poolPath, err := ioutil.TempDir("", "default-pool-test-1") - if err != nil { - t.Error(err) - return - } - defer os.RemoveAll(poolPath) - pool, err := conn.StoragePoolDefineXML(` - default-pool-test-1 - - `+poolPath+` - - `, 0) - defer func() { - pool.Undefine() - pool.Free() - }() - if err := pool.Create(0); err != nil { - t.Error(err) - return - } - defer pool.Destroy() - vol, err := pool.StorageVolCreateXML(testStorageVolXML("", poolPath), 0) - if err != nil { - t.Error(err) - return - } - defer func() { - vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) - vol.Free() - }() - if err := vol.WipePattern(VIR_STORAGE_VOL_WIPE_ALG_ZERO, 0); err != nil { - t.Fatal(err) - } -} - -func testSecretTypeCephFromXML(name string) string { - var setName string - if name == "" { - setName = time.Now().String() - } else { - setName = name - } - return ` - - ` + setName + ` - - ` -} - -func TestIntegrationSecretDefineUndefine(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - sec, err := conn.SecretDefineXML(testSecretTypeCephFromXML(""), 0) - if err != nil { - t.Fatal(err) - } - defer sec.Free() - - if err := sec.Undefine(); err != nil { - t.Fatal(err) - } -} - -func TestIntegrationSecretGetUUID(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - sec, err := conn.SecretDefineXML(testSecretTypeCephFromXML(""), 0) - if err != nil { - t.Error(err) - return - } - defer func() { - sec.Undefine() - sec.Free() - }() - if _, err := sec.GetUUID(); err != nil { - t.Error(err) - } -} - -func TestIntegrationSecretGetUUIDString(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - sec, err := conn.SecretDefineXML(testSecretTypeCephFromXML(""), 0) - if err != nil { - t.Error(err) - return - } - defer func() { - sec.Undefine() - sec.Free() - }() - if _, err := sec.GetUUIDString(); err != nil { - t.Error(err) - } -} - -func TestIntegrationSecretGetXMLDesc(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - sec, err := conn.SecretDefineXML(testSecretTypeCephFromXML(""), 0) - if err != nil { - t.Error(err) - return - } - defer func() { - sec.Undefine() - sec.Free() - }() - if _, err := sec.GetXMLDesc(0); err != nil { - t.Error(err) - } -} - -func TestIntegrationSecretGetUsageType(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - sec, err := conn.SecretDefineXML(testSecretTypeCephFromXML(""), 0) - if err != nil { - t.Error(err) - return - } - defer func() { - sec.Undefine() - sec.Free() - }() - uType, err := sec.GetUsageType() - if err != nil { - t.Error(err) - return - } - if uType != VIR_SECRET_USAGE_TYPE_CEPH { - t.Fatal("unexpected usage type.Expected usage type is Ceph") - } -} - -func TestIntegrationSecretGetUsageID(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - setUsageID := time.Now().String() - sec, err := conn.SecretDefineXML(testSecretTypeCephFromXML(setUsageID), 0) - if err != nil { - t.Error(err) - return - } - defer func() { - sec.Undefine() - sec.Free() - }() - recUsageID, err := sec.GetUsageID() - if err != nil { - t.Error(err) - return - } - if recUsageID != setUsageID { - t.Fatalf("exepected usage ID: %s, got: %s", setUsageID, recUsageID) - } -} - -func TestIntegrationLookupSecretByUsage(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - usageID := time.Now().String() - sec, err := conn.SecretDefineXML(testSecretTypeCephFromXML(usageID), 0) - if err != nil { - t.Error(err) - return - } - defer func() { - sec.Undefine() - sec.Free() - }() - sec, err = conn.LookupSecretByUsage(VIR_SECRET_USAGE_TYPE_CEPH, usageID) - if err != nil { - t.Fatal(err) - } -} - -func TestIntegrationGetDomainCPUStats(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Fatal(err) - } - defer conn.CloseConnection() - dom, err := defineTestLxcDomain(conn, "") - if err != nil { - t.Fatal(err) - } - defer func() { - dom.Undefine() - dom.Free() - }() - - if err := dom.Create(); err != nil { - t.Fatal(err) - } - defer dom.Destroy() - - // ... if @params is NULL and @nparams is 0 and @ncpus is 0, the - // number of cpus available to query is returned. From the host perspective, - ncpus, err := dom.GetCPUStats(nil, 0, 0, 0, 0) - if err != nil { - t.Fatal(err) - } - if ncpus != 1 { - t.Fatal("Number of CPUs should be 1") - } - - // ... if @params is NULL and @nparams is 0 and @ncpus is 1, - // and the return value will be how many statistics are available for the given @start_cpu. - nparams, err := dom.GetCPUStats(nil, 0, 0, 1, 0) - if err != nil { - t.Fatal(err) - } - - const lxcNumParams = 1 - const lxcParamName = "cpu_time" - - if nparams != lxcNumParams { - t.Fatal("Number of parameters for this hypervisor should be 2, got ", nparams) - } - var params VirTypedParameters - if _, err = dom.GetCPUStats(¶ms, nparams, 0, uint32(ncpus), 0); err != nil { - t.Fatal(err) - } - - if len(params) != lxcNumParams { - t.Fatalf("Wanted %d returned parameters, got %d", lxcNumParams, len(params)) - } - param := params[0] - if param.Name != lxcParamName { - t.Fatalf("Wanted param '%s', got '%s'", lxcParamName, param.Name) - } - if _, ok := param.Value.(uint64); !ok { - t.Fatalf("Wanted uint64 param, got %v instead", param.Value) - } -} - -// Not supported on libvirt driver, so no integration test -// func TestGetInterfaceParameters(t *testing.T) { -// dom, conn := buildTestDomain() -// defer func() { -// dom.Undefine() -// dom.Free() -// conn.CloseConnection() -// }() -// iface := "either mac or path to interface" -// nparams := int(0) -// if _, err := dom.GetInterfaceParameters(iface, nil, &nparams, 0); err != nil { -// t.Error(err) -// return -// } - -// var params VirTypedParameters -// if _, err := dom.GetInterfaceParameters(iface, ¶ms, &nparams, 0); err != nil { -// t.Error(err) -// return -// } -// } - -func TestIntegrationListAllInterfaces(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - ifaces, err := conn.ListAllInterfaces(0) - if err != nil { - t.Fatal(err) - } - lookingFor := "lo" - found := false - for _, iface := range ifaces { - name, err := iface.GetName() - if err != nil { - t.Fatal(err) - } - if name == lookingFor { - found = true - } - iface.Free() - } - if found == false { - t.Fatalf("interface %s not found", lookingFor) - } -} - -func TestIntergrationListAllNWFilters(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - - testNWFilterName := time.Now().String() - filter, err := conn.NWFilterDefineXML(testNWFilterXML(testNWFilterName, "ipv4")) - if err != nil { - t.Error(err) - return - } - defer func() { - filter.Undefine() - filter.Free() - }() - - filters, err := conn.ListAllNWFilters(0) - if len(filters) == 0 { - t.Fatal("length of []VirNWFilter shouldn't be 0") - } - - found := false - for _, f := range filters { - name, _ := f.GetName() - if name == testNWFilterName { - found = true - } - f.Free() - } - if found == false { - t.Fatalf("NWFilter %s not found", testNWFilterName) - } -} - -func TestIntegrationDomainBlockStatsFlags(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Fatal(err) - } - defer conn.CloseConnection() - - dom, err := defineTestLxcDomain(conn, "") - if err != nil { - t.Fatal(err) - } - defer func() { - dom.Undefine() - dom.Free() - }() - - if err := dom.Create(); err != nil { - t.Fatal(err) - } - defer dom.Destroy() - - // special case, count number of parameters - _, err = dom.BlockStatsFlags("", nil, 0, 0) - if err != nil { - t.Fatal(err) - } -} - -func TestIntegrationDomainInterfaceStats(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Fatal(err) - } - defer conn.CloseConnection() - - dom, err := defineTestLxcDomain(conn, "") - if err != nil { - t.Fatal(err) - } - defer func() { - dom.Undefine() - dom.Free() - }() - const nwXml = ` - - - - ` - if err := dom.AttachDeviceFlags(nwXml, VIR_DOMAIN_DEVICE_MODIFY_CONFIG); err != nil { - t.Fatal(err) - } - - if err := dom.Create(); err != nil { - t.Fatal(err) - } - - if _, err := dom.InterfaceStats("vnet0"); err != nil { - t.Error(err) - } - - if err := dom.Destroy(); err != nil { - t.Fatal(err) - } - - if err := dom.DetachDeviceFlags(nwXml, VIR_DOMAIN_DEVICE_MODIFY_CONFIG); err != nil { - t.Fatal(err) - } -} - -func TestStorageVolUploadDownload(t *testing.T) { - conn, err := NewVirConnection("lxc:///") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - - poolPath, err := ioutil.TempDir("", "default-pool-test-1") - if err != nil { - t.Error(err) - return - } - defer os.RemoveAll(poolPath) - pool, err := conn.StoragePoolDefineXML(` - default-pool-test-1 - - `+poolPath+` - - `, 0) - defer func() { - pool.Undefine() - pool.Free() - }() - if err := pool.Create(0); err != nil { - t.Error(err) - return - } - defer pool.Destroy() - vol, err := pool.StorageVolCreateXML(testStorageVolXML("", poolPath), 0) - if err != nil { - t.Error(err) - return - } - defer func() { - vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) - vol.Free() - }() - - data := []byte{1, 2, 3, 4, 5, 6} - - // write above data to the vol - // 1. create a stream - stream, err := NewVirStream(&conn, 0) - if err != nil { - t.Fatal(err) - } - defer func() { - stream.Free() - }() - - // 2. set it up to upload from stream - if err := vol.Upload(stream, 0, uint64(len(data)), 0); err != nil { - stream.Abort() - t.Fatal(err) - } - - // 3. do the actual writing - if n, err := stream.Write(data); err != nil || n != len(data) { - t.Fatal(err, n) - } - - // 4. finish! - if err := stream.Close(); err != nil { - t.Fatal(err) - } - - // read back the data - // 1. create a stream - downStream, err := NewVirStream(&conn, 0) - if err != nil { - t.Fatal(err) - } - defer func() { - downStream.Free() - }() - - // 2. set it up to download from stream - if err := vol.Download(downStream, 0, uint64(len(data)), 0); err != nil { - downStream.Abort() - t.Fatal(err) - } - - // 3. do the actual reading - buf := make([]byte, 1024) - if n, err := downStream.Read(buf); err != nil || n != len(data) { - t.Fatal(err, n) - } - - t.Logf("read back: %#v", buf[:len(data)]) - - // 4. finish! - if err := downStream.Close(); err != nil { - t.Fatal(err) - } -} diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/interface.go b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/interface.go deleted file mode 100644 index eeb9605..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/interface.go +++ /dev/null @@ -1,87 +0,0 @@ -package libvirt - -/* -#cgo LDFLAGS: -lvirt -ldl -#include -#include -#include -*/ -import "C" - -import ( - "unsafe" -) - -type VirInterface struct { - ptr C.virInterfacePtr -} - -func (n *VirInterface) Create(flags uint32) error { - result := C.virInterfaceCreate(n.ptr, C.uint(flags)) - if result == -1 { - return GetLastError() - } - return nil -} - -func (n *VirInterface) Destroy(flags uint32) error { - result := C.virInterfaceDestroy(n.ptr, C.uint(flags)) - if result == -1 { - return GetLastError() - } - return nil -} - -func (n *VirInterface) IsActive() (bool, error) { - result := C.virInterfaceIsActive(n.ptr) - if result == -1 { - return false, GetLastError() - } - if result == 1 { - return true, nil - } - return false, nil -} - -func (n *VirInterface) GetMACString() (string, error) { - result := C.virInterfaceGetMACString(n.ptr) - if result == nil { - return "", GetLastError() - } - mac := C.GoString(result) - return mac, nil -} - -func (n *VirInterface) GetName() (string, error) { - result := C.virInterfaceGetName(n.ptr) - if result == nil { - return "", GetLastError() - } - name := C.GoString(result) - return name, nil -} - -func (n *VirInterface) GetXMLDesc(flags uint32) (string, error) { - result := C.virInterfaceGetXMLDesc(n.ptr, C.uint(flags)) - if result == nil { - return "", GetLastError() - } - xml := C.GoString(result) - C.free(unsafe.Pointer(result)) - return xml, nil -} - -func (n *VirInterface) Undefine() error { - result := C.virInterfaceUndefine(n.ptr) - if result == -1 { - return GetLastError() - } - return nil -} - -func (n *VirInterface) Free() error { - if result := C.virInterfaceFree(n.ptr); result != 0 { - return GetLastError() - } - return nil -} diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/interface_test.go b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/interface_test.go deleted file mode 100644 index 6d35eb3..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/interface_test.go +++ /dev/null @@ -1,128 +0,0 @@ -package libvirt - -import ( - "crypto/rand" - "fmt" - "testing" -) - -func buildTestInterface(mac string) (VirInterface, VirConnection) { - conn := buildTestConnection() - xml := `` - iface, err := conn.InterfaceDefineXML(xml, 0) - if err != nil { - panic(err) - } - return iface, conn -} - -func generateRandomMac() string { - macBuf := make([]byte, 3) - if _, err := rand.Read(macBuf); err != nil { - panic(err) - } - return fmt.Sprintf("aa:bb:cc:%02x:%02x:%02x", macBuf[0], macBuf[1], macBuf[2]) -} - -func TestCreateDestroyInterface(t *testing.T) { - iface, conn := buildTestInterface(generateRandomMac()) - defer iface.Free() - defer conn.CloseConnection() - if err := iface.Create(0); err != nil { - t.Error(err) - return - } - if err := iface.Destroy(0); err != nil { - t.Error(err) - } -} - -func TestUndefineInterface(t *testing.T) { - iface, conn := buildTestInterface(generateRandomMac()) - defer iface.Free() - defer conn.CloseConnection() - name, err := iface.GetName() - if err != nil { - t.Error(err) - return - } - if err := iface.Undefine(); err != nil { - t.Error(err) - return - } - if _, err := conn.LookupInterfaceByName(name); err == nil { - t.Fatal("Shouldn't have been able to find interface") - } -} - -func TestGetInterfaceName(t *testing.T) { - iface, conn := buildTestInterface(generateRandomMac()) - defer iface.Free() - defer conn.CloseConnection() - if _, err := iface.GetName(); err != nil { - t.Fatal(err) - } -} - -func TestInterfaceIsActive(t *testing.T) { - iface, conn := buildTestInterface(generateRandomMac()) - defer iface.Free() - defer conn.CloseConnection() - if err := iface.Create(0); err != nil { - t.Log(err) - return - } - active, err := iface.IsActive() - if err != nil { - t.Error(err) - return - } - if !active { - t.Fatal("Interface should be active") - } - if err := iface.Destroy(0); err != nil { - t.Error(err) - return - } - active, err = iface.IsActive() - if err != nil { - t.Error(err) - return - } - if active { - t.Fatal("Interface should be inactive") - } -} - -func TestGetMACString(t *testing.T) { - origMac := generateRandomMac() - iface, conn := buildTestInterface(origMac) - defer iface.Free() - defer conn.CloseConnection() - mac, err := iface.GetMACString() - if err != nil { - t.Error(err) - return - } - if mac != origMac { - t.Fatalf("expected MAC: %s , got: %s", origMac, mac) - } -} - -func TestGetInterfaceXMLDesc(t *testing.T) { - iface, conn := buildTestInterface(generateRandomMac()) - defer conn.CloseConnection() - defer iface.Free() - if _, err := iface.GetXMLDesc(0); err != nil { - t.Error(err) - } -} - -func TestInterfaceFree(t *testing.T) { - iface, conn := buildTestInterface(generateRandomMac()) - defer conn.CloseConnection() - if err := iface.Free(); err != nil { - t.Error(err) - return - } -} diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/libvirt.go b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/libvirt.go deleted file mode 100644 index a607010..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/libvirt.go +++ /dev/null @@ -1,878 +0,0 @@ -package libvirt - -import ( - "io/ioutil" - "reflect" - "unsafe" -) - -/* -#cgo LDFLAGS: -lvirt -ldl -#include -#include -#include - -void virErrorFuncDummy(void *userData, virErrorPtr error); - -int domainEventLifecycleCallback_cgo(virConnectPtr c, virDomainPtr d, - int event, int detail, void* data); - -int domainEventGenericCallback_cgo(virConnectPtr c, virDomainPtr d, void* data); - -int domainEventRTCChangeCallback_cgo(virConnectPtr c, virDomainPtr d, - long long utcoffset, void* data); - -int domainEventWatchdogCallback_cgo(virConnectPtr c, virDomainPtr d, - int action, void* data); - -int domainEventIOErrorCallback_cgo(virConnectPtr c, virDomainPtr d, - const char *srcPath, const char *devAlias, - int action, void* data); - -int domainEventGraphicsCallback_cgo(virConnectPtr c, virDomainPtr d, - int phase, const virDomainEventGraphicsAddress *local, - const virDomainEventGraphicsAddress *remote, - const char *authScheme, - const virDomainEventGraphicsSubject *subject, void* data); - -int domainEventIOErrorReasonCallback_cgo(virConnectPtr c, virDomainPtr d, - const char *srcPath, const char *devAlias, - int action, const char *reason, void* data); - -int domainEventBlockJobCallback_cgo(virConnectPtr c, virDomainPtr d, - const char *disk, int type, int status, void* data); - -int domainEventDiskChangeCallback_cgo(virConnectPtr c, virDomainPtr d, - const char *oldSrcPath, const char *newSrcPath, - const char *devAlias, int reason, void* data); - -int domainEventTrayChangeCallback_cgo(virConnectPtr c, virDomainPtr d, - const char *devAlias, int reason, void* data); - -int domainEventReasonCallback_cgo(virConnectPtr c, virDomainPtr d, - int reason, void* data); - -int domainEventBalloonChangeCallback_cgo(virConnectPtr c, virDomainPtr d, - unsigned long long actual, void* data); - -int domainEventDeviceRemovedCallback_cgo(virConnectPtr c, virDomainPtr d, - const char *devAlias, void* data); -*/ -import "C" - -func init() { - // libvirt won't print to stderr - C.virSetErrorFunc(nil, C.virErrorFunc(unsafe.Pointer(C.virErrorFuncDummy))) -} - -type VirConnection struct { - ptr C.virConnectPtr -} - -func NewVirConnection(uri string) (VirConnection, error) { - var cUri *C.char - if uri != "" { - cUri = C.CString(uri) - defer C.free(unsafe.Pointer(cUri)) - } - ptr := C.virConnectOpen(cUri) - if ptr == nil { - return VirConnection{}, GetLastError() - } - obj := VirConnection{ptr: ptr} - return obj, nil -} - -func NewVirConnectionReadOnly(uri string) (VirConnection, error) { - var cUri *C.char - if uri != "" { - cUri = C.CString(uri) - defer C.free(unsafe.Pointer(cUri)) - } - ptr := C.virConnectOpenReadOnly(cUri) - if ptr == nil { - return VirConnection{}, GetLastError() - } - obj := VirConnection{ptr: ptr} - return obj, nil -} - -func GetLastError() VirError { - var virErr VirError - err := C.virGetLastError() - - virErr.Code = int(err.code) - virErr.Domain = int(err.domain) - virErr.Message = C.GoString(err.message) - virErr.Level = int(err.level) - - C.virResetError(err) - return virErr -} - -func (c *VirConnection) CloseConnection() (int, error) { - result := int(C.virConnectClose(c.ptr)) - if result == -1 { - return result, GetLastError() - } - return result, nil -} - -func (c *VirConnection) UnrefAndCloseConnection() error { - closeRes := 1 - var err error - for closeRes > 0 { - closeRes, err = c.CloseConnection() - if err != nil { - return err - } - } - return nil -} - -func (c *VirConnection) GetCapabilities() (string, error) { - str := C.virConnectGetCapabilities(c.ptr) - if str == nil { - return "", GetLastError() - } - capabilities := C.GoString(str) - C.free(unsafe.Pointer(str)) - return capabilities, nil -} - -func (c *VirConnection) GetNodeInfo() (VirNodeInfo, error) { - ni := VirNodeInfo{} - var ptr C.virNodeInfo - result := C.virNodeGetInfo(c.ptr, (*C.virNodeInfo)(unsafe.Pointer(&ptr))) - if result == -1 { - return ni, GetLastError() - } - ni.ptr = ptr - return ni, nil -} - -func (c *VirConnection) GetHostname() (string, error) { - str := C.virConnectGetHostname(c.ptr) - if str == nil { - return "", GetLastError() - } - hostname := C.GoString(str) - C.free(unsafe.Pointer(str)) - return hostname, nil -} - -func (c *VirConnection) GetLibVersion() (uint32, error) { - var version C.ulong - if err := C.virConnectGetLibVersion(c.ptr, &version); err < 0 { - return 0, GetLastError() - } - return uint32(version), nil -} - -func (c *VirConnection) GetType() (string, error) { - str := C.virConnectGetType(c.ptr) - if str == nil { - return "", GetLastError() - } - hypDriver := C.GoString(str) - return hypDriver, nil -} - -func (c *VirConnection) IsAlive() (bool, error) { - result := C.virConnectIsAlive(c.ptr) - if result == -1 { - return false, GetLastError() - } - if result == 1 { - return true, nil - } - return false, nil -} - -func (c *VirConnection) IsEncrypted() (bool, error) { - result := C.virConnectIsEncrypted(c.ptr) - if result == -1 { - return false, GetLastError() - } - if result == 1 { - return true, nil - } - return false, nil -} - -func (c *VirConnection) IsSecure() (bool, error) { - result := C.virConnectIsSecure(c.ptr) - if result == -1 { - return false, GetLastError() - } - if result == 1 { - return true, nil - } - return false, nil -} - -func (c *VirConnection) ListDefinedDomains() ([]string, error) { - var names [1024](*C.char) - namesPtr := unsafe.Pointer(&names) - numDomains := C.virConnectListDefinedDomains( - c.ptr, - (**C.char)(namesPtr), - 1024) - if numDomains == -1 { - return nil, GetLastError() - } - goNames := make([]string, numDomains) - for k := 0; k < int(numDomains); k++ { - goNames[k] = C.GoString(names[k]) - C.free(unsafe.Pointer(names[k])) - } - return goNames, nil -} - -func (c *VirConnection) ListDomains() ([]uint32, error) { - var cDomainsIds [512](uint32) - cDomainsPointer := unsafe.Pointer(&cDomainsIds) - numDomains := C.virConnectListDomains(c.ptr, (*C.int)(cDomainsPointer), 512) - if numDomains == -1 { - return nil, GetLastError() - } - - return cDomainsIds[:numDomains], nil -} - -func (c *VirConnection) ListInterfaces() ([]string, error) { - const maxIfaces = 1024 - var names [maxIfaces](*C.char) - namesPtr := unsafe.Pointer(&names) - numIfaces := C.virConnectListInterfaces( - c.ptr, - (**C.char)(namesPtr), - maxIfaces) - if numIfaces == -1 { - return nil, GetLastError() - } - goNames := make([]string, numIfaces) - for k := 0; k < int(numIfaces); k++ { - goNames[k] = C.GoString(names[k]) - C.free(unsafe.Pointer(names[k])) - } - return goNames, nil -} - -func (c *VirConnection) ListNetworks() ([]string, error) { - const maxNets = 1024 - var names [maxNets](*C.char) - namesPtr := unsafe.Pointer(&names) - numNetworks := C.virConnectListNetworks( - c.ptr, - (**C.char)(namesPtr), - maxNets) - if numNetworks == -1 { - return nil, GetLastError() - } - goNames := make([]string, numNetworks) - for k := 0; k < int(numNetworks); k++ { - goNames[k] = C.GoString(names[k]) - C.free(unsafe.Pointer(names[k])) - } - return goNames, nil -} - -func (c *VirConnection) ListStoragePools() ([]string, error) { - const maxPools = 1024 - var names [maxPools](*C.char) - namesPtr := unsafe.Pointer(&names) - numStoragePools := C.virConnectListStoragePools( - c.ptr, - (**C.char)(namesPtr), - maxPools) - if numStoragePools == -1 { - return nil, GetLastError() - } - goNames := make([]string, numStoragePools) - for k := 0; k < int(numStoragePools); k++ { - goNames[k] = C.GoString(names[k]) - C.free(unsafe.Pointer(names[k])) - } - return goNames, nil -} - -func (c *VirConnection) LookupDomainById(id uint32) (VirDomain, error) { - ptr := C.virDomainLookupByID(c.ptr, C.int(id)) - if ptr == nil { - return VirDomain{}, GetLastError() - } - return VirDomain{ptr: ptr}, nil -} - -func (c *VirConnection) LookupDomainByName(id string) (VirDomain, error) { - cName := C.CString(id) - defer C.free(unsafe.Pointer(cName)) - ptr := C.virDomainLookupByName(c.ptr, cName) - if ptr == nil { - return VirDomain{}, GetLastError() - } - return VirDomain{ptr: ptr}, nil -} - -func (c *VirConnection) DomainCreateXMLFromFile(xmlFile string, flags uint32) (VirDomain, error) { - xmlConfig, err := ioutil.ReadFile(xmlFile) - if err != nil { - return VirDomain{}, err - } - return c.DomainCreateXML(string(xmlConfig), flags) -} - -func (c *VirConnection) DomainCreateXML(xmlConfig string, flags uint32) (VirDomain, error) { - cXml := C.CString(string(xmlConfig)) - defer C.free(unsafe.Pointer(cXml)) - ptr := C.virDomainCreateXML(c.ptr, cXml, C.uint(flags)) - if ptr == nil { - return VirDomain{}, GetLastError() - } - return VirDomain{ptr: ptr}, nil -} - -func (c *VirConnection) DomainDefineXMLFromFile(xmlFile string) (VirDomain, error) { - xmlConfig, err := ioutil.ReadFile(xmlFile) - if err != nil { - return VirDomain{}, err - } - return c.DomainDefineXML(string(xmlConfig)) -} - -func (c *VirConnection) DomainDefineXML(xmlConfig string) (VirDomain, error) { - cXml := C.CString(string(xmlConfig)) - defer C.free(unsafe.Pointer(cXml)) - ptr := C.virDomainDefineXML(c.ptr, cXml) - if ptr == nil { - return VirDomain{}, GetLastError() - } - return VirDomain{ptr: ptr}, nil -} - -func (c *VirConnection) ListDefinedInterfaces() ([]string, error) { - const maxIfaces = 1024 - var names [maxIfaces](*C.char) - namesPtr := unsafe.Pointer(&names) - numIfaces := C.virConnectListDefinedInterfaces( - c.ptr, - (**C.char)(namesPtr), - maxIfaces) - if numIfaces == -1 { - return nil, GetLastError() - } - goNames := make([]string, numIfaces) - for k := 0; k < int(numIfaces); k++ { - goNames[k] = C.GoString(names[k]) - C.free(unsafe.Pointer(names[k])) - } - return goNames, nil -} - -func (c *VirConnection) ListDefinedNetworks() ([]string, error) { - const maxNets = 1024 - var names [maxNets](*C.char) - namesPtr := unsafe.Pointer(&names) - numNetworks := C.virConnectListDefinedNetworks( - c.ptr, - (**C.char)(namesPtr), - maxNets) - if numNetworks == -1 { - return nil, GetLastError() - } - goNames := make([]string, numNetworks) - for k := 0; k < int(numNetworks); k++ { - goNames[k] = C.GoString(names[k]) - C.free(unsafe.Pointer(names[k])) - } - return goNames, nil -} - -func (c *VirConnection) ListDefinedStoragePools() ([]string, error) { - const maxPools = 1024 - var names [maxPools](*C.char) - namesPtr := unsafe.Pointer(&names) - numStoragePools := C.virConnectListDefinedStoragePools( - c.ptr, - (**C.char)(namesPtr), - maxPools) - if numStoragePools == -1 { - return nil, GetLastError() - } - goNames := make([]string, numStoragePools) - for k := 0; k < int(numStoragePools); k++ { - goNames[k] = C.GoString(names[k]) - C.free(unsafe.Pointer(names[k])) - } - return goNames, nil -} - -func (c *VirConnection) NumOfDefinedInterfaces() (int, error) { - result := int(C.virConnectNumOfDefinedInterfaces(c.ptr)) - if result == -1 { - return 0, GetLastError() - } - return result, nil -} - -func (c *VirConnection) NumOfDefinedNetworks() (int, error) { - result := int(C.virConnectNumOfDefinedNetworks(c.ptr)) - if result == -1 { - return 0, GetLastError() - } - return result, nil -} - -func (c *VirConnection) NumOfDefinedStoragePools() (int, error) { - result := int(C.virConnectNumOfDefinedStoragePools(c.ptr)) - if result == -1 { - return 0, GetLastError() - } - return result, nil -} - -func (c *VirConnection) NumOfDomains() (int, error) { - result := int(C.virConnectNumOfDomains(c.ptr)) - if result == -1 { - return 0, GetLastError() - } - return result, nil -} - -func (c *VirConnection) NumOfInterfaces() (int, error) { - result := int(C.virConnectNumOfInterfaces(c.ptr)) - if result == -1 { - return 0, GetLastError() - } - return result, nil -} - -func (c *VirConnection) NumOfNetworks() (int, error) { - result := int(C.virConnectNumOfNetworks(c.ptr)) - if result == -1 { - return 0, GetLastError() - } - return result, nil -} - -func (c *VirConnection) NumOfNWFilters() (int, error) { - result := int(C.virConnectNumOfNWFilters(c.ptr)) - if result == -1 { - return 0, GetLastError() - } - return result, nil -} - -func (c *VirConnection) NumOfSecrets() (int, error) { - result := int(C.virConnectNumOfSecrets(c.ptr)) - if result == -1 { - return 0, GetLastError() - } - return result, nil -} - -func (c *VirConnection) NetworkDefineXMLFromFile(xmlFile string) (VirNetwork, error) { - xmlConfig, err := ioutil.ReadFile(xmlFile) - if err != nil { - return VirNetwork{}, err - } - return c.NetworkDefineXML(string(xmlConfig)) -} - -func (c *VirConnection) NetworkDefineXML(xmlConfig string) (VirNetwork, error) { - cXml := C.CString(string(xmlConfig)) - defer C.free(unsafe.Pointer(cXml)) - ptr := C.virNetworkDefineXML(c.ptr, cXml) - if ptr == nil { - return VirNetwork{}, GetLastError() - } - return VirNetwork{ptr: ptr}, nil -} - -func (c *VirConnection) LookupNetworkByName(name string) (VirNetwork, error) { - cName := C.CString(name) - defer C.free(unsafe.Pointer(cName)) - ptr := C.virNetworkLookupByName(c.ptr, cName) - if ptr == nil { - return VirNetwork{}, GetLastError() - } - return VirNetwork{ptr: ptr}, nil -} - -func (c *VirConnection) GetSysinfo(flags uint) (string, error) { - cStr := C.virConnectGetSysinfo(c.ptr, C.uint(flags)) - if cStr == nil { - return "", GetLastError() - } - info := C.GoString(cStr) - C.free(unsafe.Pointer(cStr)) - return info, nil -} - -func (c *VirConnection) GetURI() (string, error) { - cStr := C.virConnectGetURI(c.ptr) - if cStr == nil { - return "", GetLastError() - } - uri := C.GoString(cStr) - C.free(unsafe.Pointer(cStr)) - return uri, nil -} - -func (c *VirConnection) GetMaxVcpus(typeAttr string) (int, error) { - var cTypeAttr *C.char - if typeAttr != "" { - cTypeAttr = C.CString(typeAttr) - defer C.free(unsafe.Pointer(cTypeAttr)) - } - result := int(C.virConnectGetMaxVcpus(c.ptr, cTypeAttr)) - if result == -1 { - return 0, GetLastError() - } - return result, nil -} - -func (c *VirConnection) InterfaceDefineXMLFromFile(xmlFile string) (VirInterface, error) { - xmlConfig, err := ioutil.ReadFile(xmlFile) - if err != nil { - return VirInterface{}, err - } - return c.InterfaceDefineXML(string(xmlConfig), 0) -} - -func (c *VirConnection) InterfaceDefineXML(xmlConfig string, flags uint32) (VirInterface, error) { - cXml := C.CString(string(xmlConfig)) - defer C.free(unsafe.Pointer(cXml)) - ptr := C.virInterfaceDefineXML(c.ptr, cXml, C.uint(flags)) - if ptr == nil { - return VirInterface{}, GetLastError() - } - return VirInterface{ptr: ptr}, nil -} - -func (c *VirConnection) LookupInterfaceByName(name string) (VirInterface, error) { - cName := C.CString(name) - defer C.free(unsafe.Pointer(cName)) - ptr := C.virInterfaceLookupByName(c.ptr, cName) - if ptr == nil { - return VirInterface{}, GetLastError() - } - return VirInterface{ptr: ptr}, nil -} - -func (c *VirConnection) LookupInterfaceByMACString(mac string) (VirInterface, error) { - cName := C.CString(mac) - defer C.free(unsafe.Pointer(cName)) - ptr := C.virInterfaceLookupByMACString(c.ptr, cName) - if ptr == nil { - return VirInterface{}, GetLastError() - } - return VirInterface{ptr: ptr}, nil -} - -func (c *VirConnection) StoragePoolDefineXMLFromFile(xmlFile string) (VirStoragePool, error) { - xmlConfig, err := ioutil.ReadFile(xmlFile) - if err != nil { - return VirStoragePool{}, err - } - return c.StoragePoolDefineXML(string(xmlConfig), 0) -} - -func (c *VirConnection) StoragePoolDefineXML(xmlConfig string, flags uint32) (VirStoragePool, error) { - cXml := C.CString(string(xmlConfig)) - defer C.free(unsafe.Pointer(cXml)) - ptr := C.virStoragePoolDefineXML(c.ptr, cXml, C.uint(flags)) - if ptr == nil { - return VirStoragePool{}, GetLastError() - } - return VirStoragePool{ptr: ptr}, nil -} - -func (c *VirConnection) LookupStoragePoolByName(name string) (VirStoragePool, error) { - cName := C.CString(name) - defer C.free(unsafe.Pointer(cName)) - ptr := C.virStoragePoolLookupByName(c.ptr, cName) - if ptr == nil { - return VirStoragePool{}, GetLastError() - } - return VirStoragePool{ptr: ptr}, nil -} - -func (c *VirConnection) LookupStoragePoolByUUIDString(uuid string) (VirStoragePool, error) { - cUuid := C.CString(uuid) - defer C.free(unsafe.Pointer(cUuid)) - ptr := C.virStoragePoolLookupByUUIDString(c.ptr, cUuid) - if ptr == nil { - return VirStoragePool{}, GetLastError() - } - return VirStoragePool{ptr: ptr}, nil -} - -func (c *VirConnection) NWFilterDefineXMLFromFile(xmlFile string) (VirNWFilter, error) { - xmlConfig, err := ioutil.ReadFile(xmlFile) - if err != nil { - return VirNWFilter{}, err - } - return c.NWFilterDefineXML(string(xmlConfig)) -} - -func (c *VirConnection) NWFilterDefineXML(xmlConfig string) (VirNWFilter, error) { - cXml := C.CString(string(xmlConfig)) - defer C.free(unsafe.Pointer(cXml)) - ptr := C.virNWFilterDefineXML(c.ptr, cXml) - if ptr == nil { - return VirNWFilter{}, GetLastError() - } - return VirNWFilter{ptr: ptr}, nil -} - -func (c *VirConnection) LookupNWFilterByName(name string) (VirNWFilter, error) { - cName := C.CString(name) - defer C.free(unsafe.Pointer(cName)) - ptr := C.virNWFilterLookupByName(c.ptr, cName) - if ptr == nil { - return VirNWFilter{}, GetLastError() - } - return VirNWFilter{ptr: ptr}, nil -} - -func (c *VirConnection) LookupNWFilterByUUIDString(uuid string) (VirNWFilter, error) { - cUuid := C.CString(uuid) - defer C.free(unsafe.Pointer(cUuid)) - ptr := C.virNWFilterLookupByUUIDString(c.ptr, cUuid) - if ptr == nil { - return VirNWFilter{}, GetLastError() - } - return VirNWFilter{ptr: ptr}, nil -} - -func (c *VirConnection) LookupStorageVolByKey(key string) (VirStorageVol, error) { - cKey := C.CString(key) - defer C.free(unsafe.Pointer(cKey)) - ptr := C.virStorageVolLookupByKey(c.ptr, cKey) - if ptr == nil { - return VirStorageVol{}, GetLastError() - } - return VirStorageVol{ptr: ptr}, nil -} - -func (c *VirConnection) LookupStorageVolByPath(path string) (VirStorageVol, error) { - cPath := C.CString(path) - defer C.free(unsafe.Pointer(cPath)) - ptr := C.virStorageVolLookupByPath(c.ptr, cPath) - if ptr == nil { - return VirStorageVol{}, GetLastError() - } - return VirStorageVol{ptr: ptr}, nil -} - -func (c *VirConnection) SecretDefineXMLFromFile(xmlFile string) (VirSecret, error) { - xmlConfig, err := ioutil.ReadFile(xmlFile) - if err != nil { - return VirSecret{}, err - } - return c.SecretDefineXML(string(xmlConfig), 0) -} - -func (c *VirConnection) SecretDefineXML(xmlConfig string, flags uint32) (VirSecret, error) { - cXml := C.CString(string(xmlConfig)) - defer C.free(unsafe.Pointer(cXml)) - ptr := C.virSecretDefineXML(c.ptr, cXml, C.uint(flags)) - if ptr == nil { - return VirSecret{}, GetLastError() - } - return VirSecret{ptr: ptr}, nil -} - -func (c *VirConnection) LookupSecretByUUIDString(uuid string) (VirSecret, error) { - cUuid := C.CString(uuid) - defer C.free(unsafe.Pointer(cUuid)) - ptr := C.virSecretLookupByUUIDString(c.ptr, cUuid) - if ptr == nil { - return VirSecret{}, GetLastError() - } - return VirSecret{ptr: ptr}, nil -} - -func (c *VirConnection) LookupSecretByUsage(usageType int, usageID string) (VirSecret, error) { - cUsageID := C.CString(usageID) - defer C.free(unsafe.Pointer(cUsageID)) - ptr := C.virSecretLookupByUsage(c.ptr, C.int(usageType), cUsageID) - if ptr == nil { - return VirSecret{}, GetLastError() - } - return VirSecret{ptr: ptr}, nil -} - -func (c *VirConnection) ListAllInterfaces(flags uint32) ([]VirInterface, error) { - var cList *C.virInterfacePtr - numIfaces := C.virConnectListAllInterfaces(c.ptr, (**C.virInterfacePtr)(&cList), C.uint(flags)) - if numIfaces == -1 { - return nil, GetLastError() - } - hdr := reflect.SliceHeader{ - Data: uintptr(unsafe.Pointer(cList)), - Len: int(numIfaces), - Cap: int(numIfaces), - } - var ifaces []VirInterface - slice := *(*[]C.virInterfacePtr)(unsafe.Pointer(&hdr)) - for _, ptr := range slice { - ifaces = append(ifaces, VirInterface{ptr}) - } - C.free(unsafe.Pointer(cList)) - return ifaces, nil -} - -func (c *VirConnection) ListAllNetworks(flags uint32) ([]VirNetwork, error) { - var cList *C.virNetworkPtr - numNets := C.virConnectListAllNetworks(c.ptr, (**C.virNetworkPtr)(&cList), C.uint(flags)) - if numNets == -1 { - return nil, GetLastError() - } - hdr := reflect.SliceHeader{ - Data: uintptr(unsafe.Pointer(cList)), - Len: int(numNets), - Cap: int(numNets), - } - var nets []VirNetwork - slice := *(*[]C.virNetworkPtr)(unsafe.Pointer(&hdr)) - for _, ptr := range slice { - nets = append(nets, VirNetwork{ptr}) - } - C.free(unsafe.Pointer(cList)) - return nets, nil -} - -func (c *VirConnection) ListAllDomains(flags uint32) ([]VirDomain, error) { - var cList *C.virDomainPtr - numDomains := C.virConnectListAllDomains(c.ptr, (**C.virDomainPtr)(&cList), C.uint(flags)) - if numDomains == -1 { - return nil, GetLastError() - } - hdr := reflect.SliceHeader{ - Data: uintptr(unsafe.Pointer(cList)), - Len: int(numDomains), - Cap: int(numDomains), - } - var domains []VirDomain - slice := *(*[]C.virDomainPtr)(unsafe.Pointer(&hdr)) - for _, ptr := range slice { - domains = append(domains, VirDomain{ptr}) - } - C.free(unsafe.Pointer(cList)) - return domains, nil -} - -func (c *VirConnection) ListAllNWFilters(flags uint32) ([]VirNWFilter, error) { - var cList *C.virNWFilterPtr - numNWFilters := C.virConnectListAllNWFilters(c.ptr, (**C.virNWFilterPtr)(&cList), C.uint(flags)) - if numNWFilters == -1 { - return nil, GetLastError() - } - hdr := reflect.SliceHeader{ - Data: uintptr(unsafe.Pointer(cList)), - Len: int(numNWFilters), - Cap: int(numNWFilters), - } - var filters []VirNWFilter - slice := *(*[]C.virNWFilterPtr)(unsafe.Pointer(&hdr)) - for _, ptr := range slice { - filters = append(filters, VirNWFilter{ptr}) - } - C.free(unsafe.Pointer(cList)) - return filters, nil -} - -func (c *VirConnection) ListAllStoragePools(flags uint32) ([]VirStoragePool, error) { - var cList *C.virStoragePoolPtr - numPools := C.virConnectListAllStoragePools(c.ptr, (**C.virStoragePoolPtr)(&cList), C.uint(flags)) - if numPools == -1 { - return nil, GetLastError() - } - hdr := reflect.SliceHeader{ - Data: uintptr(unsafe.Pointer(cList)), - Len: int(numPools), - Cap: int(numPools), - } - var pools []VirStoragePool - slice := *(*[]C.virStoragePoolPtr)(unsafe.Pointer(&hdr)) - for _, ptr := range slice { - pools = append(pools, VirStoragePool{ptr}) - } - C.free(unsafe.Pointer(cList)) - return pools, nil -} - -type DomainEventCallback func(c *VirConnection, d *VirDomain, - event interface{}, f func()) int - -type domainCallbackContext struct { - cb *DomainEventCallback - f func() -} - -func (c *VirConnection) DomainEventRegister(dom VirDomain, - eventId int, - callback *DomainEventCallback, - opaque func()) int { - var callbackPtr unsafe.Pointer - context := domainCallbackContext{ - cb: callback, - f: opaque, - } - - switch eventId { - case VIR_DOMAIN_EVENT_ID_LIFECYCLE: - callbackPtr = unsafe.Pointer(C.domainEventLifecycleCallback_cgo) - case VIR_DOMAIN_EVENT_ID_REBOOT: - case VIR_DOMAIN_EVENT_ID_CONTROL_ERROR: - callbackPtr = unsafe.Pointer(C.domainEventGenericCallback_cgo) - case VIR_DOMAIN_EVENT_ID_RTC_CHANGE: - callbackPtr = unsafe.Pointer(C.domainEventRTCChangeCallback_cgo) - case VIR_DOMAIN_EVENT_ID_WATCHDOG: - callbackPtr = unsafe.Pointer(C.domainEventWatchdogCallback_cgo) - case VIR_DOMAIN_EVENT_ID_IO_ERROR: - callbackPtr = unsafe.Pointer(C.domainEventIOErrorCallback_cgo) - case VIR_DOMAIN_EVENT_ID_GRAPHICS: - callbackPtr = unsafe.Pointer(C.domainEventGraphicsCallback_cgo) - case VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON: - callbackPtr = unsafe.Pointer(C.domainEventIOErrorReasonCallback_cgo) - case VIR_DOMAIN_EVENT_ID_BLOCK_JOB: - // TODO Post 1.2.4, uncomment later - // case VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2: - callbackPtr = unsafe.Pointer(C.domainEventBlockJobCallback_cgo) - case VIR_DOMAIN_EVENT_ID_DISK_CHANGE: - callbackPtr = unsafe.Pointer(C.domainEventDiskChangeCallback_cgo) - case VIR_DOMAIN_EVENT_ID_TRAY_CHANGE: - callbackPtr = unsafe.Pointer(C.domainEventTrayChangeCallback_cgo) - case VIR_DOMAIN_EVENT_ID_PMWAKEUP: - case VIR_DOMAIN_EVENT_ID_PMSUSPEND: - case VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK: - callbackPtr = unsafe.Pointer(C.domainEventReasonCallback_cgo) - case VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE: - callbackPtr = unsafe.Pointer(C.domainEventBalloonChangeCallback_cgo) - case VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED: - callbackPtr = unsafe.Pointer(C.domainEventDeviceRemovedCallback_cgo) - default: - } - ret := C.virConnectDomainEventRegisterAny(c.ptr, dom.ptr, C.VIR_DOMAIN_EVENT_ID_LIFECYCLE, - C.virConnectDomainEventGenericCallback(callbackPtr), - unsafe.Pointer(&context), - nil) - return int(ret) -} - -func (c *VirConnection) DomainEventDeregister(callbackId int) int { - // Deregister the callback - return int(C.virConnectDomainEventDeregisterAny(c.ptr, C.int(callbackId))) -} - -func EventRegisterDefaultImpl() int { - return int(C.virEventRegisterDefaultImpl()) -} - -func EventRunDefaultImpl() int { - return int(C.virEventRunDefaultImpl()) -} diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/libvirt_test.go b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/libvirt_test.go deleted file mode 100644 index ca2ada2..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/libvirt_test.go +++ /dev/null @@ -1,873 +0,0 @@ -package libvirt - -import ( - "testing" - "time" -) - -func buildTestConnection() VirConnection { - conn, err := NewVirConnection("test:///default") - if err != nil { - panic(err) - } - return conn -} - -func TestConnection(t *testing.T) { - conn, err := NewVirConnection("test:///default") - if err != nil { - t.Error(err) - return - } - _, err = conn.CloseConnection() - if err != nil { - t.Error(err) - return - } -} - -func TestConnectionReadOnly(t *testing.T) { - conn, err := NewVirConnectionReadOnly("test:///default") - if err != nil { - t.Error(err) - return - } - defer conn.CloseConnection() - - _, err = conn.NetworkDefineXML(` - ` + time.Now().String() + ` - - - - - `) - if err == nil { - t.Fatal("writing on a read only connection") - } -} - -func TestInvalidConnection(t *testing.T) { - _, err := NewVirConnection("invalid_transport:///default") - if err == nil { - t.Error("Non-existent transport works") - } -} - -func TestGetType(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - tp, err := conn.GetType() - if err != nil { - t.Error(err) - return - } - if tp != "Test" { - t.Fatalf("type should have been test: %s", tp) - return - } -} - -func TestIsAlive(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - alive, err := conn.IsAlive() - if err != nil { - t.Error(err) - return - } - if !alive { - t.Fatal("Connection should be alive") - return - } -} - -func TestIsEncryptedAndSecure(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - secure, err := conn.IsSecure() - if err != nil { - t.Log(err) - return - } - enc, err := conn.IsEncrypted() - if err != nil { - t.Error(err) - return - } - if !secure { - t.Fatal("Test driver should be secure") - return - } - if enc { - t.Fatal("Test driver should not be encrypted") - return - } -} - -func TestCapabilities(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - capabilities, err := conn.GetCapabilities() - if err != nil { - t.Error(err) - return - } - if capabilities == "" { - t.Error("Capabilities was empty") - return - } -} - -func TestGetNodeInfo(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - ni, err := conn.GetNodeInfo() - if err != nil { - t.Error(err) - return - } - if ni.GetModel() != "i686" { - t.Error("Expected i686 model in test transport") - return - } -} - -func TestHostname(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - hostname, err := conn.GetHostname() - if err != nil { - t.Error(err) - return - } - if hostname == "" { - t.Error("Hostname was empty") - return - } -} - -func TestLibVersion(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - version, err := conn.GetLibVersion() - if err != nil { - t.Error(err) - return - } - if version == 0 { - t.Error("Version was 0") - return - } -} - -func TestListDefinedDomains(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - doms, err := conn.ListDefinedDomains() - if err != nil { - t.Error(err) - return - } - if doms == nil { - t.Fatal("ListDefinedDomains shouldn't be nil") - return - } -} - -func TestListDomains(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - doms, err := conn.ListDomains() - if err != nil { - t.Error(err) - return - } - if doms == nil { - t.Fatal("ListDomains shouldn't be nil") - return - } -} - -func TestListInterfaces(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - _, err := conn.ListInterfaces() - if err != nil { - t.Error(err) - return - } -} - -func TestListNetworks(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - _, err := conn.ListNetworks() - if err != nil { - t.Error(err) - return - } -} - -func TestListStoragePools(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - _, err := conn.ListStoragePools() - if err != nil { - t.Error(err) - return - } -} - -func TestLookupDomainById(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - ids, err := conn.ListDomains() - if err != nil { - t.Error(err) - return - } - t.Log(ids) - if len(ids) == 0 { - t.Fatal("Length of ListDomains shouldn't be zero") - return - } - dom, err := conn.LookupDomainById(ids[0]) - if err != nil { - t.Error(err) - return - } - defer dom.Free() -} - -func TestLookupInvalidDomainById(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - _, err := conn.LookupDomainById(12345) - if err == nil { - t.Error("Domain #12345 shouldn't exist in test transport") - return - } -} - -func TestLookupDomainByName(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - dom, err := conn.LookupDomainByName("test") - if err != nil { - t.Error(err) - return - } - defer dom.Free() -} - -func TestLookupInvalidDomainByName(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - _, err := conn.LookupDomainByName("non_existent_domain") - if err == nil { - t.Error("Could find non-existent domain by name") - return - } -} - -func TestDomainCreateXML(t *testing.T) { - conn := buildTestConnection() - nodom := VirDomain{} - defer conn.CloseConnection() - // Test a minimally valid xml - defName := time.Now().String() - xml := ` - ` + defName + ` - 8192 - - hvm - - ` - dom, err := conn.DomainCreateXML(xml, VIR_DOMAIN_NONE) - if err != nil { - t.Error(err) - return - } - defer func() { - if dom != nodom { - dom.Destroy() - dom.Free() - } - }() - name, err := dom.GetName() - if err != nil { - t.Error(err) - return - } - if name != defName { - t.Fatalf("Name was not '%s': %s", defName, name) - return - } - - // Destroy the domain: it should not be persistent - if err := dom.Destroy(); err != nil { - t.Error(err) - return - } - dom = nodom - - testeddom, err := conn.LookupDomainByName(defName) - if testeddom != nodom { - t.Fatal("Created domain is persisting") - return - } -} - -func TestDomainDefineXML(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - // Test a minimally valid xml - defName := time.Now().String() - xml := ` - ` + defName + ` - 8192 - - hvm - - ` - dom, err := conn.DomainDefineXML(xml) - if err != nil { - t.Error(err) - return - } - defer func() { - dom.Undefine() - dom.Free() - }() - name, err := dom.GetName() - if err != nil { - t.Error(err) - return - } - if name != defName { - t.Fatalf("Name was not 'test': %s", name) - return - } - // And an invalid one - xml = `` - _, err = conn.DomainDefineXML(xml) - if err == nil { - t.Fatal("Should have had an error") - return - } -} - -func TestListDefinedInterfaces(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - _, err := conn.ListDefinedInterfaces() - if err != nil { - t.Error(err) - return - } -} - -func TestListDefinedNetworks(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - _, err := conn.ListDefinedNetworks() - if err != nil { - t.Error(err) - return - } -} - -func TestListDefinedStoragePools(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - _, err := conn.ListDefinedStoragePools() - if err != nil { - t.Error(err) - return - } -} - -func TestNumOfDefinedInterfaces(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - if _, err := conn.NumOfDefinedInterfaces(); err != nil { - t.Error(err) - return - } -} - -func TestNumOfDefinedNetworks(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - if _, err := conn.NumOfDefinedNetworks(); err != nil { - t.Error(err) - return - } -} - -func TestNumOfDefinedStoragePools(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - if _, err := conn.NumOfDefinedStoragePools(); err != nil { - t.Error(err) - return - } -} - -func TestNumOfDomains(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - if _, err := conn.NumOfDomains(); err != nil { - t.Error(err) - return - } -} - -func TestNumOfInterfaces(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - if _, err := conn.NumOfInterfaces(); err != nil { - t.Error(err) - return - } -} - -func TestNumOfNetworks(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - if _, err := conn.NumOfNetworks(); err != nil { - t.Error(err) - return - } -} - -func TestNumOfNWFilters(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - if _, err := conn.NumOfNWFilters(); err == nil { - t.Fatalf("NumOfNWFilters should fail due to no support on test driver") - return - } -} - -func TestNumOfSecrets(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - if _, err := conn.NumOfSecrets(); err == nil { - t.Fatalf("NumOfSecrets should fail due to no support on test driver") - return - } -} - -func TestGetURI(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - uri, err := conn.GetURI() - if err != nil { - t.Error(err) - } - origUri := "test:///default" - if uri != origUri { - t.Fatalf("should be %s but got %s", origUri, uri) - } -} - -func TestGetMaxVcpus(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - _, err := conn.GetMaxVcpus("") - if err != nil { - t.Error(err) - } -} - -func TestInterfaceDefineXML(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - defName := "ethTest0" - xml := `` - iface, err := conn.InterfaceDefineXML(xml, 0) - if err != nil { - t.Fatal(err) - } - defer iface.Undefine() - name, err := iface.GetName() - if err != nil { - t.Error(err) - return - } - if name != defName { - t.Fatalf("Expected interface name: %s,got: %s", defName, name) - return - } - // Invalid configuration - xml = `` - _, err = conn.InterfaceDefineXML(xml, 0) - if err == nil { - t.Fatal("Should have had an error") - return - } -} - -func TestLookupInterfaceByName(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - testEth := "eth1" - iface, err := conn.LookupInterfaceByName(testEth) - if err != nil { - t.Error(err) - return - } - var ifName string - ifName, err = iface.GetName() - if err != nil { - t.Error(err) - return - } - if ifName != testEth { - t.Fatalf("expected interface name: %s ,got: %s", testEth, ifName) - } -} - -func TestLookupInterfaceByMACString(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - testMAC := "aa:bb:cc:dd:ee:ff" - iface, err := conn.LookupInterfaceByMACString(testMAC) - if err != nil { - t.Error(err) - return - } - var ifMAC string - ifMAC, err = iface.GetMACString() - if err != nil { - t.Error(err) - return - } - if ifMAC != testMAC { - t.Fatalf("expected interface MAC: %s ,got: %s", testMAC, ifMAC) - } -} - -func TestStoragePoolDefineXML(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - defName := "default-pool-test-0" - xml := `default-pool-test-0 - /default-pool` - pool, err := conn.StoragePoolDefineXML(xml, 0) - if err != nil { - t.Fatal(err) - return - } - defer pool.Free() - defer pool.Undefine() - name, err := pool.GetName() - if err != nil { - t.Error(err) - return - } - if name != defName { - t.Fatalf("Expected storage pool name: %s,got: %s", defName, name) - return - } - // Invalid configuration - xml = `` - _, err = conn.StoragePoolDefineXML(xml, 0) - if err == nil { - t.Fatal("Should have had an error") - return - } -} - -func TestLookupStoragePoolByName(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - testPool := "default-pool" - pool, err := conn.LookupStoragePoolByName(testPool) - if err != nil { - t.Error(err) - return - } - defer pool.Free() - var poolName string - poolName, err = pool.GetName() - if err != nil { - t.Error(err) - return - } - if poolName != testPool { - t.Fatalf("expected storage pool name: %s ,got: %s", testPool, poolName) - } -} - -func TestLookupStoragePoolByUUIDString(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - poolName := "default-pool" - pool, err := conn.LookupStoragePoolByName(poolName) - if err != nil { - t.Error(err) - return - } - defer pool.Free() - var poolUUID string - poolUUID, err = pool.GetUUIDString() - if err != nil { - t.Error(err) - return - } - pool, err = conn.LookupStoragePoolByUUIDString(poolUUID) - if err != nil { - t.Error(err) - return - } - name, err := pool.GetName() - if err != nil { - t.Error(err) - } - if name != poolName { - t.Fatalf("fetching by UUID: expected storage pool name: %s ,got: %s", name, poolName) - } -} - -func TestLookupStorageVolByKey(t *testing.T) { - pool, conn := buildTestStoragePool("") - defer func() { - pool.Undefine() - pool.Free() - conn.CloseConnection() - }() - if err := pool.Create(0); err != nil { - t.Error(err) - return - } - defer pool.Destroy() - defPoolPath := "default-pool" - defVolName := time.Now().String() - defVolKey := "/" + defPoolPath + "/" + defVolName - vol, err := pool.StorageVolCreateXML(testStorageVolXML(defVolName, defPoolPath), 0) - if err != nil { - t.Error(err) - return - } - defer func() { - vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) - vol.Free() - }() - vol, err = conn.LookupStorageVolByKey(defVolKey) - if err != nil { - t.Error(err) - return - } - key, err := vol.GetKey() - if err != nil { - t.Error(err) - return - } - if key != defVolKey { - t.Fatalf("expected storage volume key: %s ,got: %s", defVolKey, key) - } -} - -func TestLookupStorageVolByPath(t *testing.T) { - pool, conn := buildTestStoragePool("") - defer func() { - pool.Undefine() - pool.Free() - conn.CloseConnection() - }() - if err := pool.Create(0); err != nil { - t.Error(err) - return - } - defer pool.Destroy() - defPoolPath := "default-pool" - defVolName := time.Now().String() - defVolPath := "/" + defPoolPath + "/" + defVolName - vol, err := pool.StorageVolCreateXML(testStorageVolXML(defVolName, defPoolPath), 0) - if err != nil { - t.Error(err) - return - } - defer func() { - vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) - vol.Free() - }() - vol, err = conn.LookupStorageVolByPath(defVolPath) - if err != nil { - t.Error(err) - return - } - path, err := vol.GetPath() - if err != nil { - t.Error(err) - return - } - if path != defVolPath { - t.Fatalf("expected storage volume path: %s ,got: %s", defVolPath, path) - } -} - -func TestListAllDomains(t *testing.T) { - conn := buildTestConnection() - defer conn.CloseConnection() - doms, err := conn.ListAllDomains(VIR_CONNECT_LIST_DOMAINS_PERSISTENT) - if err != nil { - t.Error(err) - return - } - if len(doms) == 0 { - t.Fatal("length of []VirDomain shouldn't be 0") - } - testDomName := "test" - found := false - for _, dom := range doms { - name, _ := dom.GetName() - if name == testDomName { - found = true - } - // not mandatory for the tests but lets make it in a proper way - dom.Free() - } - if found == false { - t.Fatalf("domain %s not found", testDomName) - } -} - -func TestListAllNetworks(t *testing.T) { - testNetwork := time.Now().String() - net, conn := buildTestNetwork(testNetwork) - defer func() { - // actually,no nicessaty to destroy as the network is being removed as soon as - // the test connection is closed - net.Destroy() - net.Free() - conn.CloseConnection() - }() - nets, err := conn.ListAllNetworks(VIR_CONNECT_LIST_NETWORKS_INACTIVE) - if err != nil { - t.Fatal(err) - } - if len(nets) == 0 { - t.Fatal("length of []VirNetwork shouldn't be 0") - } - found := false - for _, n := range nets { - name, _ := n.GetName() - if name == testNetwork { - found = true - } - n.Free() - } - if found == false { - t.Fatalf("network %s not found", testNetwork) - } -} - -func TestListAllStoragePools(t *testing.T) { - testStoragePool := "default-pool-test-1" - pool, conn := buildTestStoragePool(testStoragePool) - defer func() { - pool.Undefine() - pool.Free() - conn.CloseConnection() - }() - pools, err := conn.ListAllStoragePools(VIR_STORAGE_POOL_INACTIVE) - if err != nil { - t.Fatal(err) - } - if len(pools) == 0 { - t.Fatal("length of []VirStoragePool shouldn't be 0") - } - found := false - for _, p := range pools { - name, _ := p.GetName() - if name == testStoragePool { - found = true - } - p.Free() - } - if found == false { - t.Fatalf("storage pool %s not found", testStoragePool) - } -} - -func TestDomainEventRegister(t *testing.T) { - - callbackId := -1 - - conn := buildTestConnection() - defer func() { - if callbackId >= 0 { - conn.DomainEventDeregister(callbackId) - } - conn.CloseConnection() - }() - - nodom := VirDomain{} - defName := time.Now().String() - - nbEvents := 0 - - callback := DomainEventCallback( - func(c *VirConnection, d *VirDomain, eventDetails interface{}, f func()) int { - if lifecycleEvent, ok := eventDetails.(DomainLifecycleEvent); ok { - if lifecycleEvent.Event == VIR_DOMAIN_EVENT_STARTED { - domName, _ := d.GetName() - if defName != domName { - t.Fatalf("Name was not '%s': %s", defName, domName) - } - } - } else { - t.Fatalf("event details isn't DomainLifecycleEvent") - } - f() - return 0 - }, - ) - - EventRegisterDefaultImpl() - - callbackId = conn.DomainEventRegister( - VirDomain{}, - VIR_DOMAIN_EVENT_ID_LIFECYCLE, - &callback, - func() { - nbEvents++ - }, - ) - - // Test a minimally valid xml - xml := ` - ` + defName + ` - 8192 - - hvm - - ` - dom, err := conn.DomainCreateXML(xml, VIR_DOMAIN_NONE) - if err != nil { - t.Error(err) - return - } - - // This is blocking as long as there is no message - EventRunDefaultImpl() - if nbEvents == 0 { - t.Fatal("At least one event was expected") - } - - defer func() { - if dom != nodom { - dom.Destroy() - dom.Free() - } - }() - - // Deregister the event - if ret := conn.DomainEventDeregister(callbackId); ret < 0 { - t.Fatal("Event deregistration failed") - } - callbackId = -1 // Don't deregister twice -} diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/network.go b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/network.go deleted file mode 100644 index 87b6b0a..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/network.go +++ /dev/null @@ -1,147 +0,0 @@ -package libvirt - -/* -#cgo LDFLAGS: -lvirt -ldl -#include -#include -#include -*/ -import "C" - -import ( - "unsafe" -) - -type VirNetwork struct { - ptr C.virNetworkPtr -} - -func (n *VirNetwork) Free() error { - if result := C.virNetworkFree(n.ptr); result != 0 { - return GetLastError() - } - return nil -} - -func (n *VirNetwork) Create() error { - result := C.virNetworkCreate(n.ptr) - if result == -1 { - return GetLastError() - } - return nil -} - -func (n *VirNetwork) Destroy() error { - result := C.virNetworkDestroy(n.ptr) - if result == -1 { - return GetLastError() - } - return nil -} - -func (n *VirNetwork) IsActive() (bool, error) { - result := C.virNetworkIsActive(n.ptr) - if result == -1 { - return false, GetLastError() - } - if result == 1 { - return true, nil - } - return false, nil -} - -func (n *VirNetwork) IsPersistent() (bool, error) { - result := C.virNetworkIsPersistent(n.ptr) - if result == -1 { - return false, GetLastError() - } - if result == 1 { - return true, nil - } - return false, nil -} - -func (n *VirNetwork) GetAutostart() (bool, error) { - var out C.int - result := C.virNetworkGetAutostart(n.ptr, (*C.int)(unsafe.Pointer(&out))) - if result == -1 { - return false, GetLastError() - } - switch out { - case 1: - return true, nil - default: - return false, nil - } -} - -func (n *VirNetwork) SetAutostart(autostart bool) error { - var cAutostart C.int - switch autostart { - case true: - cAutostart = 1 - default: - cAutostart = 0 - } - result := C.virNetworkSetAutostart(n.ptr, cAutostart) - if result == -1 { - return GetLastError() - } - return nil -} - -func (n *VirNetwork) GetName() (string, error) { - name := C.virNetworkGetName(n.ptr) - if name == nil { - return "", GetLastError() - } - return C.GoString(name), nil -} - -func (n *VirNetwork) GetUUID() ([]byte, error) { - var cUuid [C.VIR_UUID_BUFLEN](byte) - cuidPtr := unsafe.Pointer(&cUuid) - result := C.virNetworkGetUUID(n.ptr, (*C.uchar)(cuidPtr)) - if result != 0 { - return []byte{}, GetLastError() - } - return C.GoBytes(cuidPtr, C.VIR_UUID_BUFLEN), nil -} - -func (n *VirNetwork) GetUUIDString() (string, error) { - var cUuid [C.VIR_UUID_STRING_BUFLEN](C.char) - cuidPtr := unsafe.Pointer(&cUuid) - result := C.virNetworkGetUUIDString(n.ptr, (*C.char)(cuidPtr)) - if result != 0 { - return "", GetLastError() - } - return C.GoString((*C.char)(cuidPtr)), nil -} - -func (n *VirNetwork) GetBridgeName() (string, error) { - result := C.virNetworkGetBridgeName(n.ptr) - if result == nil { - return "", GetLastError() - } - bridge := C.GoString(result) - C.free(unsafe.Pointer(result)) - return bridge, nil -} - -func (n *VirNetwork) GetXMLDesc(flags uint32) (string, error) { - result := C.virNetworkGetXMLDesc(n.ptr, C.uint(flags)) - if result == nil { - return "", GetLastError() - } - xml := C.GoString(result) - C.free(unsafe.Pointer(result)) - return xml, nil -} - -func (n *VirNetwork) Undefine() error { - result := C.virNetworkUndefine(n.ptr) - if result == -1 { - return GetLastError() - } - return nil -} diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/network_test.go b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/network_test.go deleted file mode 100644 index 0a46d57..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/network_test.go +++ /dev/null @@ -1,184 +0,0 @@ -package libvirt - -import ( - "testing" - "time" -) - -func buildTestNetwork(netName string) (VirNetwork, VirConnection) { - conn := buildTestConnection() - var name string - if netName == "" { - name = time.Now().String() - } else { - name = netName - } - net, err := conn.NetworkDefineXML(` - ` + name + ` - - - - - `) - if err != nil { - panic(err) - } - return net, conn -} - -func TestGetNetworkName(t *testing.T) { - net, conn := buildTestNetwork("") - defer func() { - net.Free() - conn.CloseConnection() - }() - if _, err := net.GetName(); err != nil { - t.Fatal(err) - return - } -} - -func TestGetNetworkUUID(t *testing.T) { - net, conn := buildTestNetwork("") - defer func() { - net.Free() - conn.CloseConnection() - }() - _, err := net.GetUUID() - if err != nil { - t.Error(err) - return - } -} - -func TestGetNetworkUUIDString(t *testing.T) { - net, conn := buildTestNetwork("") - defer func() { - net.Free() - conn.CloseConnection() - }() - _, err := net.GetUUIDString() - if err != nil { - t.Error(err) - return - } -} - -func TestGetNetworkXMLDesc(t *testing.T) { - net, conn := buildTestNetwork("") - defer func() { - net.Free() - conn.CloseConnection() - }() - if _, err := net.GetXMLDesc(0); err != nil { - t.Error(err) - return - } -} - -func TestCreateDestroyNetwork(t *testing.T) { - net, conn := buildTestNetwork("") - defer func() { - net.Free() - conn.CloseConnection() - }() - if err := net.Create(); err != nil { - t.Error(err) - return - } - - if err := net.Destroy(); err != nil { - t.Error(err) - return - } -} - -func TestNetworkAutostart(t *testing.T) { - net, conn := buildTestNetwork("") - defer func() { - net.Free() - conn.CloseConnection() - }() - as, err := net.GetAutostart() - if err != nil { - t.Error(err) - return - } - if as { - t.Fatal("autostart should be false") - return - } - if err := net.SetAutostart(true); err != nil { - t.Error(err) - return - } - as, err = net.GetAutostart() - if err != nil { - t.Error(err) - return - } - if !as { - t.Fatal("autostart should be true") - return - } -} - -func TestNetworkIsActive(t *testing.T) { - net, conn := buildTestNetwork("") - defer func() { - net.Free() - conn.CloseConnection() - }() - if err := net.Create(); err != nil { - t.Log(err) - return - } - active, err := net.IsActive() - if err != nil { - t.Error(err) - return - } - if !active { - t.Fatal("Network should be active") - return - } - if err := net.Destroy(); err != nil { - t.Error(err) - return - } - active, err = net.IsActive() - if err != nil { - t.Error(err) - return - } - if active { - t.Fatal("Network should be inactive") - return - } -} - -func TestNetworkGetBridgeName(t *testing.T) { - net, conn := buildTestNetwork("") - defer func() { - net.Free() - conn.CloseConnection() - }() - if err := net.Create(); err != nil { - t.Error(err) - return - } - brName := "testbr0" - br, err := net.GetBridgeName() - if err != nil { - t.Errorf("got %s but expected %s", br, brName) - } -} - -func TestNetworkFree(t *testing.T) { - net, conn := buildTestNetwork("") - defer conn.CloseConnection() - if err := net.Free(); err != nil { - t.Error(err) - return - } -} diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/nodeinfo.go b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/nodeinfo.go deleted file mode 100644 index fdcc307..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/nodeinfo.go +++ /dev/null @@ -1,50 +0,0 @@ -package libvirt - -/* -#cgo LDFLAGS: -lvirt -ldl -#include -#include -#include -*/ -import "C" - -import ( - "unsafe" -) - -type VirNodeInfo struct { - ptr C.virNodeInfo -} - -func (ni *VirNodeInfo) GetModel() string { - model := C.GoString((*C.char)(unsafe.Pointer(&ni.ptr.model))) - return model -} - -func (ni *VirNodeInfo) GetMemoryKB() uint64 { - return uint64(ni.ptr.memory) -} - -func (ni *VirNodeInfo) GetCPUs() uint32 { - return uint32(ni.ptr.cpus) -} - -func (ni *VirNodeInfo) GetMhz() uint32 { - return uint32(ni.ptr.mhz) -} - -func (ni *VirNodeInfo) GetNodes() uint32 { - return uint32(ni.ptr.nodes) -} - -func (ni *VirNodeInfo) GetSockets() uint32 { - return uint32(ni.ptr.sockets) -} - -func (ni *VirNodeInfo) GetCores() uint32 { - return uint32(ni.ptr.cores) -} - -func (ni *VirNodeInfo) GetThreads() uint32 { - return uint32(ni.ptr.threads) -} diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/nwfilter.go b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/nwfilter.go deleted file mode 100644 index b2d4f41..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/nwfilter.go +++ /dev/null @@ -1,70 +0,0 @@ -package libvirt - -/* -#cgo LDFLAGS: -lvirt -ldl -#include -#include -#include -*/ -import "C" - -import ( - "unsafe" -) - -type VirNWFilter struct { - ptr C.virNWFilterPtr -} - -func (f *VirNWFilter) Free() error { - if result := C.virNWFilterFree(f.ptr); result != 0 { - return GetLastError() - } - return nil -} - -func (f *VirNWFilter) GetName() (string, error) { - name := C.virNWFilterGetName(f.ptr) - if name == nil { - return "", GetLastError() - } - return C.GoString(name), nil -} - -func (f *VirNWFilter) Undefine() error { - result := C.virNWFilterUndefine(f.ptr) - if result == -1 { - return GetLastError() - } - return nil -} - -func (f *VirNWFilter) GetUUID() ([]byte, error) { - var cUuid [C.VIR_UUID_BUFLEN](byte) - cuidPtr := unsafe.Pointer(&cUuid) - result := C.virNWFilterGetUUID(f.ptr, (*C.uchar)(cuidPtr)) - if result != 0 { - return []byte{}, GetLastError() - } - return C.GoBytes(cuidPtr, C.VIR_UUID_BUFLEN), nil -} - -func (f *VirNWFilter) GetUUIDString() (string, error) { - var cUuid [C.VIR_UUID_STRING_BUFLEN](C.char) - cuidPtr := unsafe.Pointer(&cUuid) - result := C.virNWFilterGetUUIDString(f.ptr, (*C.char)(cuidPtr)) - if result != 0 { - return "", GetLastError() - } - return C.GoString((*C.char)(cuidPtr)), nil -} - -func (f *VirNWFilter) GetXMLDesc(flags uint32) (string, error) { - result := C.virNWFilterGetXMLDesc(f.ptr, C.uint(flags)) - if result == nil { - return "", GetLastError() - } - xml := C.GoString(result) - C.free(unsafe.Pointer(result)) - return xml, nil -} diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/secret.go b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/secret.go deleted file mode 100644 index b5f820d..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/secret.go +++ /dev/null @@ -1,78 +0,0 @@ -package libvirt - -/* -#cgo LDFLAGS: -lvirt -ldl -#include -#include -#include -*/ -import "C" - -import ( - "unsafe" -) - -type VirSecret struct { - ptr C.virSecretPtr -} - -func (s *VirSecret) Free() error { - if result := C.virSecretFree(s.ptr); result != 0 { - return GetLastError() - } - return nil -} - -func (s *VirSecret) Undefine() error { - result := C.virSecretUndefine(s.ptr) - if result == -1 { - return GetLastError() - } - return nil -} - -func (s *VirSecret) GetUUID() ([]byte, error) { - var cUuid [C.VIR_UUID_BUFLEN](byte) - cuidPtr := unsafe.Pointer(&cUuid) - result := C.virSecretGetUUID(s.ptr, (*C.uchar)(cuidPtr)) - if result != 0 { - return []byte{}, GetLastError() - } - return C.GoBytes(cuidPtr, C.VIR_UUID_BUFLEN), nil -} - -func (s *VirSecret) GetUUIDString() (string, error) { - var cUuid [C.VIR_UUID_STRING_BUFLEN](C.char) - cuidPtr := unsafe.Pointer(&cUuid) - result := C.virSecretGetUUIDString(s.ptr, (*C.char)(cuidPtr)) - if result != 0 { - return "", GetLastError() - } - return C.GoString((*C.char)(cuidPtr)), nil -} - -func (s *VirSecret) GetUsageID() (string, error) { - result := C.virSecretGetUsageID(s.ptr) - if result == nil { - return "", GetLastError() - } - return C.GoString(result), nil -} - -func (s *VirSecret) GetUsageType() (int, error) { - result := int(C.virSecretGetUsageType(s.ptr)) - if result == -1 { - return 0, GetLastError() - } - return result, nil -} - -func (s *VirSecret) GetXMLDesc(flags uint32) (string, error) { - result := C.virSecretGetXMLDesc(s.ptr, C.uint(flags)) - if result == nil { - return "", GetLastError() - } - xml := C.GoString(result) - C.free(unsafe.Pointer(result)) - return xml, nil -} diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/snapshot.go b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/snapshot.go deleted file mode 100644 index 55955c4..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/snapshot.go +++ /dev/null @@ -1,95 +0,0 @@ -package libvirt - -/* -#cgo LDFLAGS: -lvirt -ldl -#include -#include -#include -*/ -import "C" - -import ( - "unsafe" -) - -type VirDomainSnapshot struct { - ptr C.virDomainSnapshotPtr -} - -func (s *VirDomainSnapshot) Free() error { - if result := C.virDomainSnapshotFree(s.ptr); result != 0 { - return GetLastError() - } - return nil -} - -func (s *VirDomainSnapshot) Delete(flags uint32) error { - result := C.virDomainSnapshotDelete(s.ptr, C.uint(flags)) - if result != 0 { - return GetLastError() - } - return nil -} - -func (s *VirDomainSnapshot) RevertToSnapshot(flags uint32) error { - result := C.virDomainRevertToSnapshot(s.ptr, C.uint(flags)) - if result != 0 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) CreateSnapshotXML(xml string, flags uint32) (VirDomainSnapshot, error) { - cXml := C.CString(xml) - defer C.free(unsafe.Pointer(cXml)) - result := C.virDomainSnapshotCreateXML(d.ptr, cXml, C.uint(flags)) - if result == nil { - return VirDomainSnapshot{}, GetLastError() - } - return VirDomainSnapshot{ptr: result}, nil -} - -func (d *VirDomain) Save(destFile string) error { - cPath := C.CString(destFile) - defer C.free(unsafe.Pointer(cPath)) - result := C.virDomainSave(d.ptr, cPath) - if result == -1 { - return GetLastError() - } - return nil -} - -func (d *VirDomain) SaveFlags(destFile string, destXml string, flags uint32) error { - cDestFile := C.CString(destFile) - cDestXml := C.CString(destXml) - defer C.free(unsafe.Pointer(cDestXml)) - defer C.free(unsafe.Pointer(cDestFile)) - result := C.virDomainSaveFlags(d.ptr, cDestFile, cDestXml, C.uint(flags)) - if result == -1 { - return GetLastError() - } - return nil -} - -func (conn VirConnection) Restore(srcFile string) error { - cPath := C.CString(srcFile) - defer C.free(unsafe.Pointer(cPath)) - if result := C.virDomainRestore(conn.ptr, cPath); result == -1 { - return GetLastError() - } - return nil -} - -func (conn VirConnection) RestoreFlags(srcFile, xmlConf string, flags uint32) error { - cPath := C.CString(srcFile) - defer C.free(unsafe.Pointer(cPath)) - var cXmlConf *C.char - if xmlConf != "" { - cXmlConf = C.CString(xmlConf) - defer C.free(unsafe.Pointer(cXmlConf)) - } - if result := C.virDomainRestoreFlags(conn.ptr, cPath, cXmlConf, C.uint(flags)); result == -1 { - return GetLastError() - } - return nil -} diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/storage_pool.go b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/storage_pool.go deleted file mode 100644 index 8d3562c..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/storage_pool.go +++ /dev/null @@ -1,210 +0,0 @@ -package libvirt - -/* -#cgo LDFLAGS: -lvirt -ldl -#include -#include -#include -*/ -import "C" - -import ( - "io/ioutil" - "unsafe" -) - -type VirStoragePool struct { - ptr C.virStoragePoolPtr -} - -type VirStoragePoolInfo struct { - ptr C.virStoragePoolInfo -} - -func (p *VirStoragePool) Build(flags uint32) error { - result := C.virStoragePoolBuild(p.ptr, C.uint(flags)) - if result == -1 { - return GetLastError() - } - return nil -} - -func (p *VirStoragePool) Create(flags uint32) error { - result := C.virStoragePoolCreate(p.ptr, C.uint(flags)) - if result == -1 { - return GetLastError() - } - return nil -} - -func (p *VirStoragePool) Delete(flags uint32) error { - result := C.virStoragePoolDelete(p.ptr, C.uint(flags)) - if result == -1 { - return GetLastError() - } - return nil -} - -func (p *VirStoragePool) Destroy() error { - result := C.virStoragePoolDestroy(p.ptr) - if result == -1 { - return GetLastError() - } - return nil -} - -func (p *VirStoragePool) Free() error { - if result := C.virStoragePoolFree(p.ptr); result != 0 { - return GetLastError() - } - return nil -} - -func (p *VirStoragePool) GetAutostart() (bool, error) { - var out C.int - result := C.virStoragePoolGetAutostart(p.ptr, (*C.int)(unsafe.Pointer(&out))) - if result == -1 { - return false, GetLastError() - } - switch out { - case 1: - return true, nil - default: - return false, nil - } -} - -func (p *VirStoragePool) GetInfo() (VirStoragePoolInfo, error) { - pi := VirStoragePoolInfo{} - var ptr C.virStoragePoolInfo - result := C.virStoragePoolGetInfo(p.ptr, (*C.virStoragePoolInfo)(unsafe.Pointer(&ptr))) - if result == -1 { - return pi, GetLastError() - } - pi.ptr = ptr - return pi, nil -} - -func (p *VirStoragePool) GetName() (string, error) { - name := C.virStoragePoolGetName(p.ptr) - if name == nil { - return "", GetLastError() - } - return C.GoString(name), nil -} - -func (p *VirStoragePool) GetUUID() ([]byte, error) { - var cUuid [C.VIR_UUID_BUFLEN](byte) - cuidPtr := unsafe.Pointer(&cUuid) - result := C.virStoragePoolGetUUID(p.ptr, (*C.uchar)(cuidPtr)) - if result != 0 { - return []byte{}, GetLastError() - } - return C.GoBytes(cuidPtr, C.VIR_UUID_BUFLEN), nil -} - -func (p *VirStoragePool) GetUUIDString() (string, error) { - var cUuid [C.VIR_UUID_STRING_BUFLEN](C.char) - cuidPtr := unsafe.Pointer(&cUuid) - result := C.virStoragePoolGetUUIDString(p.ptr, (*C.char)(cuidPtr)) - if result != 0 { - return "", GetLastError() - } - return C.GoString((*C.char)(cuidPtr)), nil -} - -func (p *VirStoragePool) GetXMLDesc(flags uint32) (string, error) { - result := C.virStoragePoolGetXMLDesc(p.ptr, C.uint(flags)) - if result == nil { - return "", GetLastError() - } - xml := C.GoString(result) - C.free(unsafe.Pointer(result)) - return xml, nil -} - -func (p *VirStoragePool) IsActive() (bool, error) { - result := C.virStoragePoolIsActive(p.ptr) - if result == -1 { - return false, GetLastError() - } - if result == 1 { - return true, nil - } - return false, nil -} - -func (p *VirStoragePool) SetAutostart(autostart bool) error { - var cAutostart C.int - switch autostart { - case true: - cAutostart = 1 - default: - cAutostart = 0 - } - result := C.virStoragePoolSetAutostart(p.ptr, cAutostart) - if result == -1 { - return GetLastError() - } - return nil -} - -func (p *VirStoragePool) Refresh(flags uint32) error { - result := C.virStoragePoolRefresh(p.ptr, C.uint(flags)) - if result == -1 { - return GetLastError() - } - return nil -} - -func (p *VirStoragePool) Undefine() error { - result := C.virStoragePoolUndefine(p.ptr) - if result == -1 { - return GetLastError() - } - return nil -} - -func (i *VirStoragePoolInfo) GetState() uint8 { - return uint8(i.ptr.state) -} - -func (i *VirStoragePoolInfo) GetCapacityInBytes() uint64 { - return uint64(i.ptr.capacity) -} - -func (i *VirStoragePoolInfo) GetAllocationInBytes() uint64 { - return uint64(i.ptr.allocation) -} - -func (i *VirStoragePoolInfo) GetAvailableInBytes() uint64 { - return uint64(i.ptr.available) -} - -func (p *VirStoragePool) StorageVolCreateXMLFromFile(xmlFile string, flags uint32) (VirStorageVol, error) { - xmlConfig, err := ioutil.ReadFile(xmlFile) - if err != nil { - return VirStorageVol{}, err - } - return p.StorageVolCreateXML(string(xmlConfig), flags) -} - -func (p *VirStoragePool) StorageVolCreateXML(xmlConfig string, flags uint32) (VirStorageVol, error) { - cXml := C.CString(string(xmlConfig)) - defer C.free(unsafe.Pointer(cXml)) - ptr := C.virStorageVolCreateXML(p.ptr, cXml, C.uint(flags)) - if ptr == nil { - return VirStorageVol{}, GetLastError() - } - return VirStorageVol{ptr: ptr}, nil -} - -func (p *VirStoragePool) LookupStorageVolByName(name string) (VirStorageVol, error) { - cName := C.CString(name) - defer C.free(unsafe.Pointer(cName)) - ptr := C.virStorageVolLookupByName(p.ptr, cName) - if ptr == nil { - return VirStorageVol{}, GetLastError() - } - return VirStorageVol{ptr: ptr}, nil -} diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/storage_pool_test.go b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/storage_pool_test.go deleted file mode 100644 index ce25410..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/storage_pool_test.go +++ /dev/null @@ -1,292 +0,0 @@ -package libvirt - -import ( - "testing" - "time" -) - -func buildTestStoragePool(poolName string) (VirStoragePool, VirConnection) { - conn := buildTestConnection() - var name string - if poolName == "" { - name = "default-pool-test-1" - } else { - name = poolName - } - pool, err := conn.StoragePoolDefineXML(` - `+name+` - - /default-pool - - `, 0) - if err != nil { - panic(err) - } - return pool, conn -} - -func TestStoragePoolBuild(t *testing.T) { - pool, conn := buildTestStoragePool("") - defer func() { - pool.Undefine() - pool.Free() - conn.CloseConnection() - }() - if err := pool.Build(VIR_STORAGE_POOL_BUILD_NEW); err != nil { - t.Fatal(err) - } -} - -func TestUndefineStoragePool(t *testing.T) { - pool, conn := buildTestStoragePool("") - defer func() { - pool.Free() - conn.CloseConnection() - }() - name, err := pool.GetName() - if err != nil { - t.Error(err) - return - } - if err := pool.Undefine(); err != nil { - t.Error(err) - return - } - if _, err := conn.LookupStoragePoolByName(name); err == nil { - t.Fatal("Shouldn't have been able to find storage pool") - return - } -} - -func TestGetStoragePoolName(t *testing.T) { - pool, conn := buildTestStoragePool("") - defer func() { - pool.Undefine() - pool.Free() - conn.CloseConnection() - }() - if _, err := pool.GetName(); err != nil { - t.Error(err) - } -} - -func TestGetStoragePoolUUID(t *testing.T) { - pool, conn := buildTestStoragePool("") - defer func() { - pool.Undefine() - pool.Free() - conn.CloseConnection() - }() - if _, err := pool.GetUUID(); err != nil { - t.Error(err) - } -} - -func TestGetStoragePoolUUIDString(t *testing.T) { - pool, conn := buildTestStoragePool("") - defer func() { - pool.Undefine() - pool.Free() - conn.CloseConnection() - }() - if _, err := pool.GetUUIDString(); err != nil { - t.Error(err) - } -} - -func TestGetStoragePoolInfo(t *testing.T) { - pool, conn := buildTestStoragePool("") - defer func() { - pool.Undefine() - pool.Free() - conn.CloseConnection() - }() - if _, err := pool.GetInfo(); err != nil { - t.Error(err) - } -} - -func TestGetStoragePoolXMLDesc(t *testing.T) { - pool, conn := buildTestStoragePool("") - defer func() { - pool.Undefine() - pool.Free() - conn.CloseConnection() - }() - if _, err := pool.GetXMLDesc(0); err != nil { - t.Error(err) - } -} - -func TestStoragePoolRefresh(t *testing.T) { - pool, conn := buildTestStoragePool("") - defer func() { - pool.Destroy() - pool.Undefine() - pool.Free() - conn.CloseConnection() - }() - if err := pool.Create(0); err != nil { - t.Error(err) - return - } - if err := pool.Refresh(0); err != nil { - t.Error(err) - } -} - -func TestCreateDestroyStoragePool(t *testing.T) { - pool, conn := buildTestStoragePool("") - defer func() { - pool.Undefine() - pool.Free() - conn.CloseConnection() - }() - if err := pool.Create(0); err != nil { - t.Error(err) - return - } - state, err := pool.GetInfo() - if err != nil { - t.Error(err) - return - } - if state.GetState() != VIR_STORAGE_POOL_RUNNING { - t.Fatal("Storage pool should be running") - } - if err = pool.Destroy(); err != nil { - t.Error(err) - return - } - - state, err = pool.GetInfo() - if err != nil { - t.Error(err) - return - } - if state.GetState() != VIR_STORAGE_POOL_INACTIVE { - t.Fatal("Storage pool should be inactive") - } -} - -func TestStoragePoolAutostart(t *testing.T) { - pool, conn := buildTestStoragePool("") - defer func() { - pool.Undefine() - pool.Free() - conn.CloseConnection() - }() - as, err := pool.GetAutostart() - if err != nil { - t.Error(err) - return - } - if as { - t.Fatal("autostart should be false") - } - if err := pool.SetAutostart(true); err != nil { - t.Error(err) - return - } - as, err = pool.GetAutostart() - if err != nil { - t.Error(err) - return - } - if !as { - t.Fatal("autostart should be true") - } -} - -func TestStoragePoolIsActive(t *testing.T) { - pool, conn := buildTestStoragePool("") - defer func() { - pool.Undefine() - pool.Free() - conn.CloseConnection() - }() - - if err := pool.Create(0); err != nil { - t.Error(err) - return - } - active, err := pool.IsActive() - if err != nil { - t.Error(err) - return - } - if !active { - t.Fatal("Storage pool should be active") - } - if err := pool.Destroy(); err != nil { - t.Error(err) - return - } - active, err = pool.IsActive() - if err != nil { - t.Error(err) - return - } - if active { - t.Fatal("Storage pool should be inactive") - } -} - -func TestStorageVolCreateDelete(t *testing.T) { - pool, conn := buildTestStoragePool("") - defer func() { - pool.Undefine() - pool.Free() - conn.CloseConnection() - }() - if err := pool.Create(0); err != nil { - t.Error(err) - return - } - defer pool.Destroy() - vol, err := pool.StorageVolCreateXML(testStorageVolXML("", "default-pool"), 0) - if err != nil { - t.Fatal(err) - } - defer vol.Free() - if err := vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL); err != nil { - t.Fatal(err) - } -} - -func TestLookupStorageVolByName(t *testing.T) { - pool, conn := buildTestStoragePool("") - defer func() { - pool.Undefine() - pool.Free() - conn.CloseConnection() - }() - if err := pool.Create(0); err != nil { - t.Error(err) - return - } - defer pool.Destroy() - defVolName := time.Now().String() - vol, err := pool.StorageVolCreateXML(testStorageVolXML(defVolName, "default-pool"), 0) - if err != nil { - t.Error(err) - return - } - defer func() { - vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) - vol.Free() - }() - vol, err = pool.LookupStorageVolByName(defVolName) - if err != nil { - t.Error(err) - return - } - name, err := vol.GetName() - if err != nil { - t.Error(err) - return - } - if name != defVolName { - t.Fatalf("expected storage volume name: %s ,got: %s", defVolName, name) - } -} diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/storage_volume.go b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/storage_volume.go deleted file mode 100644 index 26b446e..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/storage_volume.go +++ /dev/null @@ -1,134 +0,0 @@ -package libvirt - -/* -#cgo LDFLAGS: -lvirt -ldl -#include -#include -#include -*/ -import "C" - -import ( - "unsafe" -) - -type VirStorageVol struct { - ptr C.virStorageVolPtr -} - -type VirStorageVolInfo struct { - ptr C.virStorageVolInfo -} - -func (v *VirStorageVol) Delete(flags uint32) error { - result := C.virStorageVolDelete(v.ptr, C.uint(flags)) - if result == -1 { - return GetLastError() - } - return nil -} - -func (v *VirStorageVol) Free() error { - if result := C.virStorageVolFree(v.ptr); result != 0 { - return GetLastError() - } - return nil -} - -func (v *VirStorageVol) GetInfo() (VirStorageVolInfo, error) { - vi := VirStorageVolInfo{} - var ptr C.virStorageVolInfo - result := C.virStorageVolGetInfo(v.ptr, (*C.virStorageVolInfo)(unsafe.Pointer(&ptr))) - if result == -1 { - return vi, GetLastError() - } - vi.ptr = ptr - return vi, nil -} - -func (i *VirStorageVolInfo) GetType() int { - return int(i.ptr._type) -} - -func (i *VirStorageVolInfo) GetCapacityInBytes() uint64 { - return uint64(i.ptr.capacity) -} - -func (i *VirStorageVolInfo) GetAllocationInBytes() uint64 { - return uint64(i.ptr.allocation) -} - -func (v *VirStorageVol) GetKey() (string, error) { - key := C.virStorageVolGetKey(v.ptr) - if key == nil { - return "", GetLastError() - } - return C.GoString(key), nil -} - -func (v *VirStorageVol) GetName() (string, error) { - name := C.virStorageVolGetName(v.ptr) - if name == nil { - return "", GetLastError() - } - return C.GoString(name), nil -} - -func (v *VirStorageVol) GetPath() (string, error) { - result := C.virStorageVolGetPath(v.ptr) - if result == nil { - return "", GetLastError() - } - path := C.GoString(result) - C.free(unsafe.Pointer(result)) - return path, nil -} - -func (v *VirStorageVol) GetXMLDesc(flags uint32) (string, error) { - result := C.virStorageVolGetXMLDesc(v.ptr, C.uint(flags)) - if result == nil { - return "", GetLastError() - } - xml := C.GoString(result) - C.free(unsafe.Pointer(result)) - return xml, nil -} - -func (v *VirStorageVol) Resize(capacity uint64, flags uint32) error { - result := C.virStorageVolResize(v.ptr, C.ulonglong(capacity), C.uint(flags)) - if result == -1 { - return GetLastError() - } - return nil -} - -func (v *VirStorageVol) Wipe(flags uint32) error { - result := C.virStorageVolWipe(v.ptr, C.uint(flags)) - if result == -1 { - return GetLastError() - } - return nil -} -func (v *VirStorageVol) WipePattern(algorithm uint32, flags uint32) error { - result := C.virStorageVolWipePattern(v.ptr, C.uint(algorithm), C.uint(flags)) - if result == -1 { - return GetLastError() - } - return nil -} - -func (v *VirStorageVol) Upload(stream *VirStream, offset, length uint64, flags uint32) error { - if C.virStorageVolUpload(v.ptr, stream.ptr, C.ulonglong(offset), - C.ulonglong(length), C.uint(flags)) == -1 { - return GetLastError() - } - return nil -} - -func (v *VirStorageVol) Download(stream *VirStream, offset, length uint64, flags uint32) error { - if C.virStorageVolDownload(v.ptr, stream.ptr, C.ulonglong(offset), - C.ulonglong(length), C.uint(flags)) == -1 { - return GetLastError() - } - return nil -} diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/storage_volume_test.go b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/storage_volume_test.go deleted file mode 100644 index 83eeefa..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/storage_volume_test.go +++ /dev/null @@ -1,157 +0,0 @@ -package libvirt - -import ( - "testing" - "time" -) - -func testStorageVolXML(volName, poolPath string) string { - defName := volName - if defName == "" { - defName = time.Now().String() - } - return ` - ` + defName + ` - 0 - 10 - - ` + "/" + poolPath + "/" + defName + ` - - 107 - 107 - 0744 - - - - ` -} - -func TestStorageVolGetInfo(t *testing.T) { - pool, conn := buildTestStoragePool("") - defer func() { - pool.Undefine() - pool.Free() - conn.CloseConnection() - }() - if err := pool.Create(0); err != nil { - t.Error(err) - return - } - defer pool.Destroy() - vol, err := pool.StorageVolCreateXML(testStorageVolXML("", "default-pool"), 0) - if err != nil { - t.Error(err) - return - } - defer func() { - vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) - vol.Free() - }() - if _, err := vol.GetInfo(); err != nil { - t.Fatal(err) - } -} - -func TestStorageVolGetKey(t *testing.T) { - pool, conn := buildTestStoragePool("") - defer func() { - pool.Undefine() - pool.Free() - conn.CloseConnection() - }() - if err := pool.Create(0); err != nil { - t.Error(err) - return - } - defer pool.Destroy() - vol, err := pool.StorageVolCreateXML(testStorageVolXML("", "default-pool"), 0) - if err != nil { - t.Error(err) - return - } - defer func() { - vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) - vol.Free() - }() - if _, err := vol.GetKey(); err != nil { - t.Fatal(err) - } -} - -func TestStorageVolGetName(t *testing.T) { - pool, conn := buildTestStoragePool("") - defer func() { - pool.Undefine() - pool.Free() - conn.CloseConnection() - }() - if err := pool.Create(0); err != nil { - t.Error(err) - return - } - defer pool.Destroy() - vol, err := pool.StorageVolCreateXML(testStorageVolXML("", "default-pool"), 0) - if err != nil { - t.Error(err) - return - } - defer func() { - vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) - vol.Free() - }() - if _, err := vol.GetName(); err != nil { - t.Fatal(err) - } -} - -func TestStorageVolGetPath(t *testing.T) { - pool, conn := buildTestStoragePool("") - defer func() { - pool.Undefine() - pool.Free() - conn.CloseConnection() - }() - if err := pool.Create(0); err != nil { - t.Error(err) - return - } - defer pool.Destroy() - vol, err := pool.StorageVolCreateXML(testStorageVolXML("", "default-pool"), 0) - if err != nil { - t.Error(err) - return - } - defer func() { - vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) - vol.Free() - }() - if _, err := vol.GetPath(); err != nil { - t.Fatal(err) - } -} - -func TestStorageVolGetXMLDesc(t *testing.T) { - pool, conn := buildTestStoragePool("") - defer func() { - pool.Undefine() - pool.Free() - conn.CloseConnection() - }() - if err := pool.Create(0); err != nil { - t.Error(err) - return - } - defer pool.Destroy() - vol, err := pool.StorageVolCreateXML(testStorageVolXML("", "default-pool"), 0) - if err != nil { - t.Error(err) - return - } - defer func() { - vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) - vol.Free() - }() - if _, err := vol.GetXMLDesc(0); err != nil { - t.Fatal(err) - } -} diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/stream.go b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/stream.go deleted file mode 100644 index e0b142b..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/stream.go +++ /dev/null @@ -1,79 +0,0 @@ -package libvirt - -/* -#cgo LDFLAGS: -lvirt -ldl -#include -#include -#include -*/ -import "C" -import ( - "io" - "unsafe" -) - -type VirStream struct { - ptr C.virStreamPtr -} - -func NewVirStream(c *VirConnection, flags uint) (*VirStream, error) { - virStream := C.virStreamNew(c.ptr, C.uint(flags)) - if virStream == nil { - return nil, GetLastError() - } - - return &VirStream{ - ptr: virStream, - }, nil -} - -func (v *VirStream) Abort() error { - result := C.virStreamAbort(v.ptr) - if result == -1 { - return GetLastError() - } - - return nil -} - -func (v *VirStream) Close() error { - result := C.virStreamFinish(v.ptr) - if result == -1 { - return GetLastError() - } - - return nil -} - -func (v *VirStream) Free() error { - result := C.virStreamFree(v.ptr) - if result == -1 { - return GetLastError() - } - - return nil -} - -func (v *VirStream) Read(p []byte) (int, error) { - n := C.virStreamRecv(v.ptr, (*C.char)(unsafe.Pointer(&p[0])), C.size_t(len(p))) - if n < 0 { - return 0, GetLastError() - } - if n == 0 { - return 0, io.EOF - } - - return int(n), nil -} - -func (v *VirStream) Write(p []byte) (int, error) { - n := C.virStreamSend(v.ptr, (*C.char)(unsafe.Pointer(&p[0])), C.size_t(len(p))) - if n < 0 { - return 0, GetLastError() - } - if n == 0 { - return 0, io.EOF - } - - return int(n), nil -} diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/vagrant/master/Vagrantfile b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/vagrant/master/Vagrantfile deleted file mode 100644 index 520b250..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/vagrant/master/Vagrantfile +++ /dev/null @@ -1,83 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -####################################################################################################### -# -# If you get problems about guest additions versions, please get this plugin to fix it up: -# -# vagrant plugin install vagrant-vbguest -# -####################################################################################################### - -require '../vagrant-provision-reboot-plugin' - -VAGRANTFILE_API_VERSION = "2" - -Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| - config.vm.box = "chef/fedora-19" - config.vm.provision "shell", privileged: true, inline: <<-EOF - set -e - echo "Installing LXC + libvirt dependencies" - yum -y install cyrus-sasl-devel device-mapper-devel gnutls-devel \ - libxml2-devel cyrus-sasl-md5 gnutls-utils nc numactl numactl-libs libwsman1 \ - libwsman-devel avahi-devel e2fsprogs-devel libcap-ng-devel libnl-devel \ - libpciaccess-devel libselinux-devel libssh2-devel libudev-devel netcf-devel \ - numactl-devel parted-devel python-devel readline-devel xen-devel xhtml1-dtds \ - xmlrpc-c-devel yajl-devel pm-utils dmidecode libcgroup numad iptables-ipv6 \ - radvd lzop glusterfs-client iscsi-initiator-utils sheepdog fuse-libs \ - glusterfs-api librados2 librbd1 qemu-img lxc - - echo "Download libvirt 1.2.2 RPMs" - mkdir -p /tmp/rpms && cd /tmp/rpms - wget -N http://libvirt.org/sources/libvirt-client-1.2.2-1.fc19.x86_64.rpm \ - http://libvirt.org/sources/libvirt-daemon-1.2.2-1.fc19.x86_64.rpm \ - http://libvirt.org/sources/libvirt-daemon-config-network-1.2.2-1.fc19.x86_64.rpm \ - http://libvirt.org/sources/libvirt-daemon-config-nwfilter-1.2.2-1.fc19.x86_64.rpm \ - http://libvirt.org/sources/libvirt-daemon-driver-interface-1.2.2-1.fc19.x86_64.rpm \ - http://libvirt.org/sources/libvirt-daemon-driver-libxl-1.2.2-1.fc19.x86_64.rpm \ - http://libvirt.org/sources/libvirt-daemon-driver-lxc-1.2.2-1.fc19.x86_64.rpm \ - http://libvirt.org/sources/libvirt-daemon-driver-network-1.2.2-1.fc19.x86_64.rpm \ - http://libvirt.org/sources/libvirt-daemon-driver-nodedev-1.2.2-1.fc19.x86_64.rpm \ - http://libvirt.org/sources/libvirt-daemon-driver-nwfilter-1.2.2-1.fc19.x86_64.rpm \ - http://libvirt.org/sources/libvirt-daemon-driver-qemu-1.2.2-1.fc19.x86_64.rpm \ - http://libvirt.org/sources/libvirt-daemon-driver-secret-1.2.2-1.fc19.x86_64.rpm \ - http://libvirt.org/sources/libvirt-daemon-driver-storage-1.2.2-1.fc19.x86_64.rpm \ - http://libvirt.org/sources/libvirt-daemon-driver-uml-1.2.2-1.fc19.x86_64.rpm \ - http://libvirt.org/sources/libvirt-daemon-driver-vbox-1.2.2-1.fc19.x86_64.rpm \ - http://libvirt.org/sources/libvirt-daemon-driver-xen-1.2.2-1.fc19.x86_64.rpm \ - http://libvirt.org/sources/libvirt-daemon-lxc-1.2.2-1.fc19.x86_64.rpm \ - http://libvirt.org/sources/libvirt-devel-1.2.2-1.fc19.x86_64.rpm \ - http://libvirt.org/sources/libvirt-docs-1.2.2-1.fc19.x86_64.rpm - - echo "Installing libvirt RPMs" - cd /tmp/rpms - # sigh, bad rpm - rpm -ivh *.rpm || true - - GOVERSION="1.3.3" - GOTARBALL="go${GOVERSION}.linux-amd64.tar.gz" - export GOROOT=/usr/local/go - export GOPATH=/opt/go - export PATH=$PATH:$GOROOT/bin:$GOPATH/bin - echo "Installing Go $GOVERSION" - if [ ! $(which go) ]; then - echo " Downloading $GOTARBALL" - wget --quiet --directory-prefix=/tmp https://storage.googleapis.com/golang/$GOTARBALL - echo " Extracting $GOTARBALL to $GOROOT" - tar -C /usr/local -xzf /tmp/$GOTARBALL - echo " Configuring GOPATH" - mkdir -p $GOPATH/src $GOPATH/bin $GOPATH/pkg - chown -R vagrant $GOPATH - echo " Configuring env vars" - echo "export PATH=\$PATH:$GOROOT/bin:$GOPATH/bin" | tee /etc/profile.d/golang.sh > /dev/null - echo "export GOROOT=$GOROOT" | tee --append /etc/profile.d/golang.sh > /dev/null - echo "export GOPATH=$GOPATH" | tee --append /etc/profile.d/golang.sh > /dev/null - fi - - systemctl enable lxc - systemctl enable libvirtd - EOF - - config.vm.provision :unix_reboot - config.vm.synced_folder "../..", "/libvirt-go" -end diff --git a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/vagrant/vagrant-provision-reboot-plugin.rb b/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/vagrant/vagrant-provision-reboot-plugin.rb deleted file mode 100644 index 99d9920..0000000 --- a/third_party/src/gopkg.in/alexzorin/libvirt-go.v2/vagrant/vagrant-provision-reboot-plugin.rb +++ /dev/null @@ -1,176 +0,0 @@ -# A quick hack to allow rebooting of a Vagrant VM during provisioning. -# -# This is tested with Vagrant 1.4.3. It may work with slightly earlier versions, -# but definitely won't work with much earlier versions. The code is fragile with -# respect to internal changes in Vagrant. -# -# Adapted from: https://gist.github.com/ukabu/6780121 -# -# This file should be placed into the same folder as your Vagrantfile. Then in -# your Vagrantfile, you'll want to do something like the following: -# -# ---------------------------------------------------------------------------- -# -# require './vagrant-provision-reboot-plugin' -# -# Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| -# -# # Run your pre-reboot provisioning block. -# #config.vm.provision :chef_solo do |chef| -# # ... -# #end -# -# # Run a reboot of a *NIX guest. -# config.vm.provision :unix_reboot -# # Run a reboot of a Windows guest, assuming that you are set up with the -# # relevant plugins and configurations to manage a Windows guest in Vagrant. -# #config.vm.provision :windows_reboot -# -# # Run your post-reboot provisioning block. -# #config.vm.provision :chef_solo do |chef| -# # ... -# #end -# -# ---------------------------------------------------------------------------- -# -# The provisioner takes care of remounting the synced folders. -# -# This will work for the VirtualBox provider. For other providers, a -# 'remount_synched_folders' action must be added to the provider implementation. - -require 'vagrant' - -# Monkey-patch the VirtualBox provider to be able to remap synced folders after -# reboot. -# -# This involves pulling out some code fragments from the existing SyncedFolders -# class - which is unpleasant, but there are no usefully exposed methods such -# that we can run only what we need to. -module VagrantPlugins - module ProviderVirtualBox - module Action - - class RemountSyncedFolders < SyncedFolders - - def initialize(app, env) - super(app, env) - end - - def call(env) - @env = env - @app.call(env) - - # Copied out of /lib/vagrant/action/builtin/synced_folders.rb in - # Vagrant 1.4.3. This is going to be fragile with respect to future - # changes, but that's just the way the cookie crumbles. - # - # We can't just run the whole SyncedFolders.call() method because - # it undertakes a lot more setup and will error out if invoked twice - # during "vagrant up" or "vagrant provision". - folders = synced_folders(env[:machine]) - folders.each do |impl_name, fs| - plugins[impl_name.to_sym][0].new.enable(env[:machine], fs, impl_opts(impl_name, env)) - end - end - end - - def self.action_remount_synced_folders - Vagrant::Action::Builder.new.tap do |b| - b.use RemountSyncedFolders - end - end - - end - end -end - -# Define the plugin. -class RebootPlugin < Vagrant.plugin('2') - name 'Reboot Plugin' - - # This plugin provides a provisioner called unix_reboot. - provisioner 'unix_reboot' do - - # Create a provisioner. - class RebootProvisioner < Vagrant.plugin('2', :provisioner) - # Initialization, define internal state. Nothing needed. - def initialize(machine, config) - super(machine, config) - end - - # Configuration changes to be done. Nothing needed here either. - def configure(root_config) - super(root_config) - end - - # Run the provisioning. - def provision - command = 'shutdown -r now' - @machine.ui.info("Issuing command: #{command}") - @machine.communicate.sudo(command) do |type, data| - if type == :stderr - @machine.ui.error(data); - end - end - - begin - sleep 5 - end until @machine.communicate.ready? - - # Now the machine is up again, perform the necessary tasks. - @machine.ui.info("Launching remount_synced_folders action...") - @machine.action('remount_synced_folders') - end - - # Nothing needs to be done on cleanup. - def cleanup - super - end - end - RebootProvisioner - - end - - # This plugin provides a provisioner called windows_reboot. - provisioner 'windows_reboot' do - - # Create a provisioner. - class RebootProvisioner < Vagrant.plugin('2', :provisioner) - # Initialization, define internal state. Nothing needed. - def initialize(machine, config) - super(machine, config) - end - - # Configuration changes to be done. Nothing needed here either. - def configure(root_config) - super(root_config) - end - - # Run the provisioning. - def provision - command = 'shutdown -t 0 -r -f' - @machine.ui.info("Issuing command: #{command}") - @machine.communicate.execute(command) do - if type == :stderr - @machine.ui.error(data); - end - end - - begin - sleep 5 - end until @machine.communicate.ready? - - # Now the machine is up again, perform the necessary tasks. - @machine.ui.info("Launching remount_synced_folders action...") - @machine.action('remount_synced_folders') - end - - # Nothing needs to be done on cleanup. - def cleanup - super - end - end - RebootProvisioner - - end -end diff --git a/third_party/src/gopkg.in/yaml.v2/LICENSE b/third_party/src/gopkg.in/yaml.v2/LICENSE deleted file mode 100644 index a68e67f..0000000 --- a/third_party/src/gopkg.in/yaml.v2/LICENSE +++ /dev/null @@ -1,188 +0,0 @@ - -Copyright (c) 2011-2014 - Canonical Inc. - -This software is licensed under the LGPLv3, included below. - -As a special exception to the GNU Lesser General Public License version 3 -("LGPL3"), the copyright holders of this Library give you permission to -convey to a third party a Combined Work that links statically or dynamically -to this Library without providing any Minimal Corresponding Source or -Minimal Application Code as set out in 4d or providing the installation -information set out in section 4e, provided that you comply with the other -provisions of LGPL3 and provided that you meet, for the Application the -terms and conditions of the license(s) which apply to the Application. - -Except as stated in this special exception, the provisions of LGPL3 will -continue to comply in full to this Library. If you modify this Library, you -may apply this exception to your version of this Library, but you are not -obliged to do so. If you do not wish to do so, delete this exception -statement from your version. This exception does not (and cannot) modify any -license terms which apply to the Application, with which you must still -comply. - - - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/third_party/src/gopkg.in/yaml.v2/LICENSE.libyaml b/third_party/src/gopkg.in/yaml.v2/LICENSE.libyaml deleted file mode 100644 index 8da58fb..0000000 --- a/third_party/src/gopkg.in/yaml.v2/LICENSE.libyaml +++ /dev/null @@ -1,31 +0,0 @@ -The following files were ported to Go from C files of libyaml, and thus -are still covered by their original copyright and license: - - apic.go - emitterc.go - parserc.go - readerc.go - scannerc.go - writerc.go - yamlh.go - yamlprivateh.go - -Copyright (c) 2006 Kirill Simonov - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/third_party/src/gopkg.in/yaml.v2/README.md b/third_party/src/gopkg.in/yaml.v2/README.md deleted file mode 100644 index d6c919e..0000000 --- a/third_party/src/gopkg.in/yaml.v2/README.md +++ /dev/null @@ -1,128 +0,0 @@ -# YAML support for the Go language - -Introduction ------------- - -The yaml package enables Go programs to comfortably encode and decode YAML -values. It was developed within [Canonical](https://www.canonical.com) as -part of the [juju](https://juju.ubuntu.com) project, and is based on a -pure Go port of the well-known [libyaml](http://pyyaml.org/wiki/LibYAML) -C library to parse and generate YAML data quickly and reliably. - -Compatibility -------------- - -The yaml package supports most of YAML 1.1 and 1.2, including support for -anchors, tags, map merging, etc. Multi-document unmarshalling is not yet -implemented, and base-60 floats from YAML 1.1 are purposefully not -supported since they're a poor design and are gone in YAML 1.2. - -Installation and usage ----------------------- - -The import path for the package is *gopkg.in/yaml.v2*. - -To install it, run: - - go get gopkg.in/yaml.v2 - -API documentation ------------------ - -If opened in a browser, the import path itself leads to the API documentation: - - * [https://gopkg.in/yaml.v2](https://gopkg.in/yaml.v2) - -API stability -------------- - -The package API for yaml v2 will remain stable as described in [gopkg.in](https://gopkg.in). - - -License -------- - -The yaml package is licensed under the LGPL with an exception that allows it to be linked statically. Please see the LICENSE file for details. - - -Example -------- - -```Go -package main - -import ( - "fmt" - "log" - - "gopkg.in/yaml.v2" -) - -var data = ` -a: Easy! -b: - c: 2 - d: [3, 4] -` - -type T struct { - A string - B struct{C int; D []int ",flow"} -} - -func main() { - t := T{} - - err := yaml.Unmarshal([]byte(data), &t) - if err != nil { - log.Fatalf("error: %v", err) - } - fmt.Printf("--- t:\n%v\n\n", t) - - d, err := yaml.Marshal(&t) - if err != nil { - log.Fatalf("error: %v", err) - } - fmt.Printf("--- t dump:\n%s\n\n", string(d)) - - m := make(map[interface{}]interface{}) - - err = yaml.Unmarshal([]byte(data), &m) - if err != nil { - log.Fatalf("error: %v", err) - } - fmt.Printf("--- m:\n%v\n\n", m) - - d, err = yaml.Marshal(&m) - if err != nil { - log.Fatalf("error: %v", err) - } - fmt.Printf("--- m dump:\n%s\n\n", string(d)) -} -``` - -This example will generate the following output: - -``` ---- t: -{Easy! {2 [3 4]}} - ---- t dump: -a: Easy! -b: - c: 2 - d: [3, 4] - - ---- m: -map[a:Easy! b:map[c:2 d:[3 4]]] - ---- m dump: -a: Easy! -b: - c: 2 - d: - - 3 - - 4 -``` - diff --git a/third_party/src/gopkg.in/yaml.v2/apic.go b/third_party/src/gopkg.in/yaml.v2/apic.go deleted file mode 100644 index 95ec014..0000000 --- a/third_party/src/gopkg.in/yaml.v2/apic.go +++ /dev/null @@ -1,742 +0,0 @@ -package yaml - -import ( - "io" - "os" -) - -func yaml_insert_token(parser *yaml_parser_t, pos int, token *yaml_token_t) { - //fmt.Println("yaml_insert_token", "pos:", pos, "typ:", token.typ, "head:", parser.tokens_head, "len:", len(parser.tokens)) - - // Check if we can move the queue at the beginning of the buffer. - if parser.tokens_head > 0 && len(parser.tokens) == cap(parser.tokens) { - if parser.tokens_head != len(parser.tokens) { - copy(parser.tokens, parser.tokens[parser.tokens_head:]) - } - parser.tokens = parser.tokens[:len(parser.tokens)-parser.tokens_head] - parser.tokens_head = 0 - } - parser.tokens = append(parser.tokens, *token) - if pos < 0 { - return - } - copy(parser.tokens[parser.tokens_head+pos+1:], parser.tokens[parser.tokens_head+pos:]) - parser.tokens[parser.tokens_head+pos] = *token -} - -// Create a new parser object. -func yaml_parser_initialize(parser *yaml_parser_t) bool { - *parser = yaml_parser_t{ - raw_buffer: make([]byte, 0, input_raw_buffer_size), - buffer: make([]byte, 0, input_buffer_size), - } - return true -} - -// Destroy a parser object. -func yaml_parser_delete(parser *yaml_parser_t) { - *parser = yaml_parser_t{} -} - -// String read handler. -func yaml_string_read_handler(parser *yaml_parser_t, buffer []byte) (n int, err error) { - if parser.input_pos == len(parser.input) { - return 0, io.EOF - } - n = copy(buffer, parser.input[parser.input_pos:]) - parser.input_pos += n - return n, nil -} - -// File read handler. -func yaml_file_read_handler(parser *yaml_parser_t, buffer []byte) (n int, err error) { - return parser.input_file.Read(buffer) -} - -// Set a string input. -func yaml_parser_set_input_string(parser *yaml_parser_t, input []byte) { - if parser.read_handler != nil { - panic("must set the input source only once") - } - parser.read_handler = yaml_string_read_handler - parser.input = input - parser.input_pos = 0 -} - -// Set a file input. -func yaml_parser_set_input_file(parser *yaml_parser_t, file *os.File) { - if parser.read_handler != nil { - panic("must set the input source only once") - } - parser.read_handler = yaml_file_read_handler - parser.input_file = file -} - -// Set the source encoding. -func yaml_parser_set_encoding(parser *yaml_parser_t, encoding yaml_encoding_t) { - if parser.encoding != yaml_ANY_ENCODING { - panic("must set the encoding only once") - } - parser.encoding = encoding -} - -// Create a new emitter object. -func yaml_emitter_initialize(emitter *yaml_emitter_t) bool { - *emitter = yaml_emitter_t{ - buffer: make([]byte, output_buffer_size), - raw_buffer: make([]byte, 0, output_raw_buffer_size), - states: make([]yaml_emitter_state_t, 0, initial_stack_size), - events: make([]yaml_event_t, 0, initial_queue_size), - } - return true -} - -// Destroy an emitter object. -func yaml_emitter_delete(emitter *yaml_emitter_t) { - *emitter = yaml_emitter_t{} -} - -// String write handler. -func yaml_string_write_handler(emitter *yaml_emitter_t, buffer []byte) error { - *emitter.output_buffer = append(*emitter.output_buffer, buffer...) - return nil -} - -// File write handler. -func yaml_file_write_handler(emitter *yaml_emitter_t, buffer []byte) error { - _, err := emitter.output_file.Write(buffer) - return err -} - -// Set a string output. -func yaml_emitter_set_output_string(emitter *yaml_emitter_t, output_buffer *[]byte) { - if emitter.write_handler != nil { - panic("must set the output target only once") - } - emitter.write_handler = yaml_string_write_handler - emitter.output_buffer = output_buffer -} - -// Set a file output. -func yaml_emitter_set_output_file(emitter *yaml_emitter_t, file io.Writer) { - if emitter.write_handler != nil { - panic("must set the output target only once") - } - emitter.write_handler = yaml_file_write_handler - emitter.output_file = file -} - -// Set the output encoding. -func yaml_emitter_set_encoding(emitter *yaml_emitter_t, encoding yaml_encoding_t) { - if emitter.encoding != yaml_ANY_ENCODING { - panic("must set the output encoding only once") - } - emitter.encoding = encoding -} - -// Set the canonical output style. -func yaml_emitter_set_canonical(emitter *yaml_emitter_t, canonical bool) { - emitter.canonical = canonical -} - -//// Set the indentation increment. -func yaml_emitter_set_indent(emitter *yaml_emitter_t, indent int) { - if indent < 2 || indent > 9 { - indent = 2 - } - emitter.best_indent = indent -} - -// Set the preferred line width. -func yaml_emitter_set_width(emitter *yaml_emitter_t, width int) { - if width < 0 { - width = -1 - } - emitter.best_width = width -} - -// Set if unescaped non-ASCII characters are allowed. -func yaml_emitter_set_unicode(emitter *yaml_emitter_t, unicode bool) { - emitter.unicode = unicode -} - -// Set the preferred line break character. -func yaml_emitter_set_break(emitter *yaml_emitter_t, line_break yaml_break_t) { - emitter.line_break = line_break -} - -///* -// * Destroy a token object. -// */ -// -//YAML_DECLARE(void) -//yaml_token_delete(yaml_token_t *token) -//{ -// assert(token); // Non-NULL token object expected. -// -// switch (token.type) -// { -// case YAML_TAG_DIRECTIVE_TOKEN: -// yaml_free(token.data.tag_directive.handle); -// yaml_free(token.data.tag_directive.prefix); -// break; -// -// case YAML_ALIAS_TOKEN: -// yaml_free(token.data.alias.value); -// break; -// -// case YAML_ANCHOR_TOKEN: -// yaml_free(token.data.anchor.value); -// break; -// -// case YAML_TAG_TOKEN: -// yaml_free(token.data.tag.handle); -// yaml_free(token.data.tag.suffix); -// break; -// -// case YAML_SCALAR_TOKEN: -// yaml_free(token.data.scalar.value); -// break; -// -// default: -// break; -// } -// -// memset(token, 0, sizeof(yaml_token_t)); -//} -// -///* -// * Check if a string is a valid UTF-8 sequence. -// * -// * Check 'reader.c' for more details on UTF-8 encoding. -// */ -// -//static int -//yaml_check_utf8(yaml_char_t *start, size_t length) -//{ -// yaml_char_t *end = start+length; -// yaml_char_t *pointer = start; -// -// while (pointer < end) { -// unsigned char octet; -// unsigned int width; -// unsigned int value; -// size_t k; -// -// octet = pointer[0]; -// width = (octet & 0x80) == 0x00 ? 1 : -// (octet & 0xE0) == 0xC0 ? 2 : -// (octet & 0xF0) == 0xE0 ? 3 : -// (octet & 0xF8) == 0xF0 ? 4 : 0; -// value = (octet & 0x80) == 0x00 ? octet & 0x7F : -// (octet & 0xE0) == 0xC0 ? octet & 0x1F : -// (octet & 0xF0) == 0xE0 ? octet & 0x0F : -// (octet & 0xF8) == 0xF0 ? octet & 0x07 : 0; -// if (!width) return 0; -// if (pointer+width > end) return 0; -// for (k = 1; k < width; k ++) { -// octet = pointer[k]; -// if ((octet & 0xC0) != 0x80) return 0; -// value = (value << 6) + (octet & 0x3F); -// } -// if (!((width == 1) || -// (width == 2 && value >= 0x80) || -// (width == 3 && value >= 0x800) || -// (width == 4 && value >= 0x10000))) return 0; -// -// pointer += width; -// } -// -// return 1; -//} -// - -// Create STREAM-START. -func yaml_stream_start_event_initialize(event *yaml_event_t, encoding yaml_encoding_t) bool { - *event = yaml_event_t{ - typ: yaml_STREAM_START_EVENT, - encoding: encoding, - } - return true -} - -// Create STREAM-END. -func yaml_stream_end_event_initialize(event *yaml_event_t) bool { - *event = yaml_event_t{ - typ: yaml_STREAM_END_EVENT, - } - return true -} - -// Create DOCUMENT-START. -func yaml_document_start_event_initialize(event *yaml_event_t, version_directive *yaml_version_directive_t, - tag_directives []yaml_tag_directive_t, implicit bool) bool { - *event = yaml_event_t{ - typ: yaml_DOCUMENT_START_EVENT, - version_directive: version_directive, - tag_directives: tag_directives, - implicit: implicit, - } - return true -} - -// Create DOCUMENT-END. -func yaml_document_end_event_initialize(event *yaml_event_t, implicit bool) bool { - *event = yaml_event_t{ - typ: yaml_DOCUMENT_END_EVENT, - implicit: implicit, - } - return true -} - -///* -// * Create ALIAS. -// */ -// -//YAML_DECLARE(int) -//yaml_alias_event_initialize(event *yaml_event_t, anchor *yaml_char_t) -//{ -// mark yaml_mark_t = { 0, 0, 0 } -// anchor_copy *yaml_char_t = NULL -// -// assert(event) // Non-NULL event object is expected. -// assert(anchor) // Non-NULL anchor is expected. -// -// if (!yaml_check_utf8(anchor, strlen((char *)anchor))) return 0 -// -// anchor_copy = yaml_strdup(anchor) -// if (!anchor_copy) -// return 0 -// -// ALIAS_EVENT_INIT(*event, anchor_copy, mark, mark) -// -// return 1 -//} - -// Create SCALAR. -func yaml_scalar_event_initialize(event *yaml_event_t, anchor, tag, value []byte, plain_implicit, quoted_implicit bool, style yaml_scalar_style_t) bool { - *event = yaml_event_t{ - typ: yaml_SCALAR_EVENT, - anchor: anchor, - tag: tag, - value: value, - implicit: plain_implicit, - quoted_implicit: quoted_implicit, - style: yaml_style_t(style), - } - return true -} - -// Create SEQUENCE-START. -func yaml_sequence_start_event_initialize(event *yaml_event_t, anchor, tag []byte, implicit bool, style yaml_sequence_style_t) bool { - *event = yaml_event_t{ - typ: yaml_SEQUENCE_START_EVENT, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(style), - } - return true -} - -// Create SEQUENCE-END. -func yaml_sequence_end_event_initialize(event *yaml_event_t) bool { - *event = yaml_event_t{ - typ: yaml_SEQUENCE_END_EVENT, - } - return true -} - -// Create MAPPING-START. -func yaml_mapping_start_event_initialize(event *yaml_event_t, anchor, tag []byte, implicit bool, style yaml_mapping_style_t) bool { - *event = yaml_event_t{ - typ: yaml_MAPPING_START_EVENT, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(style), - } - return true -} - -// Create MAPPING-END. -func yaml_mapping_end_event_initialize(event *yaml_event_t) bool { - *event = yaml_event_t{ - typ: yaml_MAPPING_END_EVENT, - } - return true -} - -// Destroy an event object. -func yaml_event_delete(event *yaml_event_t) { - *event = yaml_event_t{} -} - -///* -// * Create a document object. -// */ -// -//YAML_DECLARE(int) -//yaml_document_initialize(document *yaml_document_t, -// version_directive *yaml_version_directive_t, -// tag_directives_start *yaml_tag_directive_t, -// tag_directives_end *yaml_tag_directive_t, -// start_implicit int, end_implicit int) -//{ -// struct { -// error yaml_error_type_t -// } context -// struct { -// start *yaml_node_t -// end *yaml_node_t -// top *yaml_node_t -// } nodes = { NULL, NULL, NULL } -// version_directive_copy *yaml_version_directive_t = NULL -// struct { -// start *yaml_tag_directive_t -// end *yaml_tag_directive_t -// top *yaml_tag_directive_t -// } tag_directives_copy = { NULL, NULL, NULL } -// value yaml_tag_directive_t = { NULL, NULL } -// mark yaml_mark_t = { 0, 0, 0 } -// -// assert(document) // Non-NULL document object is expected. -// assert((tag_directives_start && tag_directives_end) || -// (tag_directives_start == tag_directives_end)) -// // Valid tag directives are expected. -// -// if (!STACK_INIT(&context, nodes, INITIAL_STACK_SIZE)) goto error -// -// if (version_directive) { -// version_directive_copy = yaml_malloc(sizeof(yaml_version_directive_t)) -// if (!version_directive_copy) goto error -// version_directive_copy.major = version_directive.major -// version_directive_copy.minor = version_directive.minor -// } -// -// if (tag_directives_start != tag_directives_end) { -// tag_directive *yaml_tag_directive_t -// if (!STACK_INIT(&context, tag_directives_copy, INITIAL_STACK_SIZE)) -// goto error -// for (tag_directive = tag_directives_start -// tag_directive != tag_directives_end; tag_directive ++) { -// assert(tag_directive.handle) -// assert(tag_directive.prefix) -// if (!yaml_check_utf8(tag_directive.handle, -// strlen((char *)tag_directive.handle))) -// goto error -// if (!yaml_check_utf8(tag_directive.prefix, -// strlen((char *)tag_directive.prefix))) -// goto error -// value.handle = yaml_strdup(tag_directive.handle) -// value.prefix = yaml_strdup(tag_directive.prefix) -// if (!value.handle || !value.prefix) goto error -// if (!PUSH(&context, tag_directives_copy, value)) -// goto error -// value.handle = NULL -// value.prefix = NULL -// } -// } -// -// DOCUMENT_INIT(*document, nodes.start, nodes.end, version_directive_copy, -// tag_directives_copy.start, tag_directives_copy.top, -// start_implicit, end_implicit, mark, mark) -// -// return 1 -// -//error: -// STACK_DEL(&context, nodes) -// yaml_free(version_directive_copy) -// while (!STACK_EMPTY(&context, tag_directives_copy)) { -// value yaml_tag_directive_t = POP(&context, tag_directives_copy) -// yaml_free(value.handle) -// yaml_free(value.prefix) -// } -// STACK_DEL(&context, tag_directives_copy) -// yaml_free(value.handle) -// yaml_free(value.prefix) -// -// return 0 -//} -// -///* -// * Destroy a document object. -// */ -// -//YAML_DECLARE(void) -//yaml_document_delete(document *yaml_document_t) -//{ -// struct { -// error yaml_error_type_t -// } context -// tag_directive *yaml_tag_directive_t -// -// context.error = YAML_NO_ERROR // Eliminate a compliler warning. -// -// assert(document) // Non-NULL document object is expected. -// -// while (!STACK_EMPTY(&context, document.nodes)) { -// node yaml_node_t = POP(&context, document.nodes) -// yaml_free(node.tag) -// switch (node.type) { -// case YAML_SCALAR_NODE: -// yaml_free(node.data.scalar.value) -// break -// case YAML_SEQUENCE_NODE: -// STACK_DEL(&context, node.data.sequence.items) -// break -// case YAML_MAPPING_NODE: -// STACK_DEL(&context, node.data.mapping.pairs) -// break -// default: -// assert(0) // Should not happen. -// } -// } -// STACK_DEL(&context, document.nodes) -// -// yaml_free(document.version_directive) -// for (tag_directive = document.tag_directives.start -// tag_directive != document.tag_directives.end -// tag_directive++) { -// yaml_free(tag_directive.handle) -// yaml_free(tag_directive.prefix) -// } -// yaml_free(document.tag_directives.start) -// -// memset(document, 0, sizeof(yaml_document_t)) -//} -// -///** -// * Get a document node. -// */ -// -//YAML_DECLARE(yaml_node_t *) -//yaml_document_get_node(document *yaml_document_t, index int) -//{ -// assert(document) // Non-NULL document object is expected. -// -// if (index > 0 && document.nodes.start + index <= document.nodes.top) { -// return document.nodes.start + index - 1 -// } -// return NULL -//} -// -///** -// * Get the root object. -// */ -// -//YAML_DECLARE(yaml_node_t *) -//yaml_document_get_root_node(document *yaml_document_t) -//{ -// assert(document) // Non-NULL document object is expected. -// -// if (document.nodes.top != document.nodes.start) { -// return document.nodes.start -// } -// return NULL -//} -// -///* -// * Add a scalar node to a document. -// */ -// -//YAML_DECLARE(int) -//yaml_document_add_scalar(document *yaml_document_t, -// tag *yaml_char_t, value *yaml_char_t, length int, -// style yaml_scalar_style_t) -//{ -// struct { -// error yaml_error_type_t -// } context -// mark yaml_mark_t = { 0, 0, 0 } -// tag_copy *yaml_char_t = NULL -// value_copy *yaml_char_t = NULL -// node yaml_node_t -// -// assert(document) // Non-NULL document object is expected. -// assert(value) // Non-NULL value is expected. -// -// if (!tag) { -// tag = (yaml_char_t *)YAML_DEFAULT_SCALAR_TAG -// } -// -// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error -// tag_copy = yaml_strdup(tag) -// if (!tag_copy) goto error -// -// if (length < 0) { -// length = strlen((char *)value) -// } -// -// if (!yaml_check_utf8(value, length)) goto error -// value_copy = yaml_malloc(length+1) -// if (!value_copy) goto error -// memcpy(value_copy, value, length) -// value_copy[length] = '\0' -// -// SCALAR_NODE_INIT(node, tag_copy, value_copy, length, style, mark, mark) -// if (!PUSH(&context, document.nodes, node)) goto error -// -// return document.nodes.top - document.nodes.start -// -//error: -// yaml_free(tag_copy) -// yaml_free(value_copy) -// -// return 0 -//} -// -///* -// * Add a sequence node to a document. -// */ -// -//YAML_DECLARE(int) -//yaml_document_add_sequence(document *yaml_document_t, -// tag *yaml_char_t, style yaml_sequence_style_t) -//{ -// struct { -// error yaml_error_type_t -// } context -// mark yaml_mark_t = { 0, 0, 0 } -// tag_copy *yaml_char_t = NULL -// struct { -// start *yaml_node_item_t -// end *yaml_node_item_t -// top *yaml_node_item_t -// } items = { NULL, NULL, NULL } -// node yaml_node_t -// -// assert(document) // Non-NULL document object is expected. -// -// if (!tag) { -// tag = (yaml_char_t *)YAML_DEFAULT_SEQUENCE_TAG -// } -// -// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error -// tag_copy = yaml_strdup(tag) -// if (!tag_copy) goto error -// -// if (!STACK_INIT(&context, items, INITIAL_STACK_SIZE)) goto error -// -// SEQUENCE_NODE_INIT(node, tag_copy, items.start, items.end, -// style, mark, mark) -// if (!PUSH(&context, document.nodes, node)) goto error -// -// return document.nodes.top - document.nodes.start -// -//error: -// STACK_DEL(&context, items) -// yaml_free(tag_copy) -// -// return 0 -//} -// -///* -// * Add a mapping node to a document. -// */ -// -//YAML_DECLARE(int) -//yaml_document_add_mapping(document *yaml_document_t, -// tag *yaml_char_t, style yaml_mapping_style_t) -//{ -// struct { -// error yaml_error_type_t -// } context -// mark yaml_mark_t = { 0, 0, 0 } -// tag_copy *yaml_char_t = NULL -// struct { -// start *yaml_node_pair_t -// end *yaml_node_pair_t -// top *yaml_node_pair_t -// } pairs = { NULL, NULL, NULL } -// node yaml_node_t -// -// assert(document) // Non-NULL document object is expected. -// -// if (!tag) { -// tag = (yaml_char_t *)YAML_DEFAULT_MAPPING_TAG -// } -// -// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error -// tag_copy = yaml_strdup(tag) -// if (!tag_copy) goto error -// -// if (!STACK_INIT(&context, pairs, INITIAL_STACK_SIZE)) goto error -// -// MAPPING_NODE_INIT(node, tag_copy, pairs.start, pairs.end, -// style, mark, mark) -// if (!PUSH(&context, document.nodes, node)) goto error -// -// return document.nodes.top - document.nodes.start -// -//error: -// STACK_DEL(&context, pairs) -// yaml_free(tag_copy) -// -// return 0 -//} -// -///* -// * Append an item to a sequence node. -// */ -// -//YAML_DECLARE(int) -//yaml_document_append_sequence_item(document *yaml_document_t, -// sequence int, item int) -//{ -// struct { -// error yaml_error_type_t -// } context -// -// assert(document) // Non-NULL document is required. -// assert(sequence > 0 -// && document.nodes.start + sequence <= document.nodes.top) -// // Valid sequence id is required. -// assert(document.nodes.start[sequence-1].type == YAML_SEQUENCE_NODE) -// // A sequence node is required. -// assert(item > 0 && document.nodes.start + item <= document.nodes.top) -// // Valid item id is required. -// -// if (!PUSH(&context, -// document.nodes.start[sequence-1].data.sequence.items, item)) -// return 0 -// -// return 1 -//} -// -///* -// * Append a pair of a key and a value to a mapping node. -// */ -// -//YAML_DECLARE(int) -//yaml_document_append_mapping_pair(document *yaml_document_t, -// mapping int, key int, value int) -//{ -// struct { -// error yaml_error_type_t -// } context -// -// pair yaml_node_pair_t -// -// assert(document) // Non-NULL document is required. -// assert(mapping > 0 -// && document.nodes.start + mapping <= document.nodes.top) -// // Valid mapping id is required. -// assert(document.nodes.start[mapping-1].type == YAML_MAPPING_NODE) -// // A mapping node is required. -// assert(key > 0 && document.nodes.start + key <= document.nodes.top) -// // Valid key id is required. -// assert(value > 0 && document.nodes.start + value <= document.nodes.top) -// // Valid value id is required. -// -// pair.key = key -// pair.value = value -// -// if (!PUSH(&context, -// document.nodes.start[mapping-1].data.mapping.pairs, pair)) -// return 0 -// -// return 1 -//} -// -// diff --git a/third_party/src/gopkg.in/yaml.v2/decode.go b/third_party/src/gopkg.in/yaml.v2/decode.go deleted file mode 100644 index 085cddc..0000000 --- a/third_party/src/gopkg.in/yaml.v2/decode.go +++ /dev/null @@ -1,683 +0,0 @@ -package yaml - -import ( - "encoding" - "encoding/base64" - "fmt" - "math" - "reflect" - "strconv" - "time" -) - -const ( - documentNode = 1 << iota - mappingNode - sequenceNode - scalarNode - aliasNode -) - -type node struct { - kind int - line, column int - tag string - value string - implicit bool - children []*node - anchors map[string]*node -} - -// ---------------------------------------------------------------------------- -// Parser, produces a node tree out of a libyaml event stream. - -type parser struct { - parser yaml_parser_t - event yaml_event_t - doc *node -} - -func newParser(b []byte) *parser { - p := parser{} - if !yaml_parser_initialize(&p.parser) { - panic("failed to initialize YAML emitter") - } - - if len(b) == 0 { - b = []byte{'\n'} - } - - yaml_parser_set_input_string(&p.parser, b) - - p.skip() - if p.event.typ != yaml_STREAM_START_EVENT { - panic("expected stream start event, got " + strconv.Itoa(int(p.event.typ))) - } - p.skip() - return &p -} - -func (p *parser) destroy() { - if p.event.typ != yaml_NO_EVENT { - yaml_event_delete(&p.event) - } - yaml_parser_delete(&p.parser) -} - -func (p *parser) skip() { - if p.event.typ != yaml_NO_EVENT { - if p.event.typ == yaml_STREAM_END_EVENT { - failf("attempted to go past the end of stream; corrupted value?") - } - yaml_event_delete(&p.event) - } - if !yaml_parser_parse(&p.parser, &p.event) { - p.fail() - } -} - -func (p *parser) fail() { - var where string - var line int - if p.parser.problem_mark.line != 0 { - line = p.parser.problem_mark.line - } else if p.parser.context_mark.line != 0 { - line = p.parser.context_mark.line - } - if line != 0 { - where = "line " + strconv.Itoa(line) + ": " - } - var msg string - if len(p.parser.problem) > 0 { - msg = p.parser.problem - } else { - msg = "unknown problem parsing YAML content" - } - failf("%s%s", where, msg) -} - -func (p *parser) anchor(n *node, anchor []byte) { - if anchor != nil { - p.doc.anchors[string(anchor)] = n - } -} - -func (p *parser) parse() *node { - switch p.event.typ { - case yaml_SCALAR_EVENT: - return p.scalar() - case yaml_ALIAS_EVENT: - return p.alias() - case yaml_MAPPING_START_EVENT: - return p.mapping() - case yaml_SEQUENCE_START_EVENT: - return p.sequence() - case yaml_DOCUMENT_START_EVENT: - return p.document() - case yaml_STREAM_END_EVENT: - // Happens when attempting to decode an empty buffer. - return nil - default: - panic("attempted to parse unknown event: " + strconv.Itoa(int(p.event.typ))) - } - panic("unreachable") -} - -func (p *parser) node(kind int) *node { - return &node{ - kind: kind, - line: p.event.start_mark.line, - column: p.event.start_mark.column, - } -} - -func (p *parser) document() *node { - n := p.node(documentNode) - n.anchors = make(map[string]*node) - p.doc = n - p.skip() - n.children = append(n.children, p.parse()) - if p.event.typ != yaml_DOCUMENT_END_EVENT { - panic("expected end of document event but got " + strconv.Itoa(int(p.event.typ))) - } - p.skip() - return n -} - -func (p *parser) alias() *node { - n := p.node(aliasNode) - n.value = string(p.event.anchor) - p.skip() - return n -} - -func (p *parser) scalar() *node { - n := p.node(scalarNode) - n.value = string(p.event.value) - n.tag = string(p.event.tag) - n.implicit = p.event.implicit - p.anchor(n, p.event.anchor) - p.skip() - return n -} - -func (p *parser) sequence() *node { - n := p.node(sequenceNode) - p.anchor(n, p.event.anchor) - p.skip() - for p.event.typ != yaml_SEQUENCE_END_EVENT { - n.children = append(n.children, p.parse()) - } - p.skip() - return n -} - -func (p *parser) mapping() *node { - n := p.node(mappingNode) - p.anchor(n, p.event.anchor) - p.skip() - for p.event.typ != yaml_MAPPING_END_EVENT { - n.children = append(n.children, p.parse(), p.parse()) - } - p.skip() - return n -} - -// ---------------------------------------------------------------------------- -// Decoder, unmarshals a node into a provided value. - -type decoder struct { - doc *node - aliases map[string]bool - mapType reflect.Type - terrors []string -} - -var ( - mapItemType = reflect.TypeOf(MapItem{}) - durationType = reflect.TypeOf(time.Duration(0)) - defaultMapType = reflect.TypeOf(map[interface{}]interface{}{}) - ifaceType = defaultMapType.Elem() -) - -func newDecoder() *decoder { - d := &decoder{mapType: defaultMapType} - d.aliases = make(map[string]bool) - return d -} - -func (d *decoder) terror(n *node, tag string, out reflect.Value) { - if n.tag != "" { - tag = n.tag - } - value := n.value - if tag != yaml_SEQ_TAG && tag != yaml_MAP_TAG { - if len(value) > 10 { - value = " `" + value[:7] + "...`" - } else { - value = " `" + value + "`" - } - } - d.terrors = append(d.terrors, fmt.Sprintf("line %d: cannot unmarshal %s%s into %s", n.line+1, shortTag(tag), value, out.Type())) -} - -func (d *decoder) callUnmarshaler(n *node, u Unmarshaler) (good bool) { - terrlen := len(d.terrors) - err := u.UnmarshalYAML(func(v interface{}) (err error) { - defer handleErr(&err) - d.unmarshal(n, reflect.ValueOf(v)) - if len(d.terrors) > terrlen { - issues := d.terrors[terrlen:] - d.terrors = d.terrors[:terrlen] - return &TypeError{issues} - } - return nil - }) - if e, ok := err.(*TypeError); ok { - d.terrors = append(d.terrors, e.Errors...) - return false - } - if err != nil { - fail(err) - } - return true -} - -// d.prepare initializes and dereferences pointers and calls UnmarshalYAML -// if a value is found to implement it. -// It returns the initialized and dereferenced out value, whether -// unmarshalling was already done by UnmarshalYAML, and if so whether -// its types unmarshalled appropriately. -// -// If n holds a null value, prepare returns before doing anything. -func (d *decoder) prepare(n *node, out reflect.Value) (newout reflect.Value, unmarshaled, good bool) { - if n.tag == yaml_NULL_TAG || n.kind == scalarNode && n.tag == "" && (n.value == "null" || n.value == "") { - return out, false, false - } - again := true - for again { - again = false - if out.Kind() == reflect.Ptr { - if out.IsNil() { - out.Set(reflect.New(out.Type().Elem())) - } - out = out.Elem() - again = true - } - if out.CanAddr() { - if u, ok := out.Addr().Interface().(Unmarshaler); ok { - good = d.callUnmarshaler(n, u) - return out, true, good - } - } - } - return out, false, false -} - -func (d *decoder) unmarshal(n *node, out reflect.Value) (good bool) { - switch n.kind { - case documentNode: - return d.document(n, out) - case aliasNode: - return d.alias(n, out) - } - out, unmarshaled, good := d.prepare(n, out) - if unmarshaled { - return good - } - switch n.kind { - case scalarNode: - good = d.scalar(n, out) - case mappingNode: - good = d.mapping(n, out) - case sequenceNode: - good = d.sequence(n, out) - default: - panic("internal error: unknown node kind: " + strconv.Itoa(n.kind)) - } - return good -} - -func (d *decoder) document(n *node, out reflect.Value) (good bool) { - if len(n.children) == 1 { - d.doc = n - d.unmarshal(n.children[0], out) - return true - } - return false -} - -func (d *decoder) alias(n *node, out reflect.Value) (good bool) { - an, ok := d.doc.anchors[n.value] - if !ok { - failf("unknown anchor '%s' referenced", n.value) - } - if d.aliases[n.value] { - failf("anchor '%s' value contains itself", n.value) - } - d.aliases[n.value] = true - good = d.unmarshal(an, out) - delete(d.aliases, n.value) - return good -} - -var zeroValue reflect.Value - -func resetMap(out reflect.Value) { - for _, k := range out.MapKeys() { - out.SetMapIndex(k, zeroValue) - } -} - -func (d *decoder) scalar(n *node, out reflect.Value) (good bool) { - var tag string - var resolved interface{} - if n.tag == "" && !n.implicit { - tag = yaml_STR_TAG - resolved = n.value - } else { - tag, resolved = resolve(n.tag, n.value) - if tag == yaml_BINARY_TAG { - data, err := base64.StdEncoding.DecodeString(resolved.(string)) - if err != nil { - failf("!!binary value contains invalid base64 data") - } - resolved = string(data) - } - } - if resolved == nil { - if out.Kind() == reflect.Map && !out.CanAddr() { - resetMap(out) - } else { - out.Set(reflect.Zero(out.Type())) - } - return true - } - if s, ok := resolved.(string); ok && out.CanAddr() { - if u, ok := out.Addr().Interface().(encoding.TextUnmarshaler); ok { - err := u.UnmarshalText([]byte(s)) - if err != nil { - fail(err) - } - return true - } - } - switch out.Kind() { - case reflect.String: - if tag == yaml_BINARY_TAG { - out.SetString(resolved.(string)) - good = true - } else if resolved != nil { - out.SetString(n.value) - good = true - } - case reflect.Interface: - if resolved == nil { - out.Set(reflect.Zero(out.Type())) - } else { - out.Set(reflect.ValueOf(resolved)) - } - good = true - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - switch resolved := resolved.(type) { - case int: - if !out.OverflowInt(int64(resolved)) { - out.SetInt(int64(resolved)) - good = true - } - case int64: - if !out.OverflowInt(resolved) { - out.SetInt(resolved) - good = true - } - case uint64: - if resolved <= math.MaxInt64 && !out.OverflowInt(int64(resolved)) { - out.SetInt(int64(resolved)) - good = true - } - case float64: - if resolved <= math.MaxInt64 && !out.OverflowInt(int64(resolved)) { - out.SetInt(int64(resolved)) - good = true - } - case string: - if out.Type() == durationType { - d, err := time.ParseDuration(resolved) - if err == nil { - out.SetInt(int64(d)) - good = true - } - } - } - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - switch resolved := resolved.(type) { - case int: - if resolved >= 0 && !out.OverflowUint(uint64(resolved)) { - out.SetUint(uint64(resolved)) - good = true - } - case int64: - if resolved >= 0 && !out.OverflowUint(uint64(resolved)) { - out.SetUint(uint64(resolved)) - good = true - } - case uint64: - if !out.OverflowUint(uint64(resolved)) { - out.SetUint(uint64(resolved)) - good = true - } - case float64: - if resolved <= math.MaxUint64 && !out.OverflowUint(uint64(resolved)) { - out.SetUint(uint64(resolved)) - good = true - } - } - case reflect.Bool: - switch resolved := resolved.(type) { - case bool: - out.SetBool(resolved) - good = true - } - case reflect.Float32, reflect.Float64: - switch resolved := resolved.(type) { - case int: - out.SetFloat(float64(resolved)) - good = true - case int64: - out.SetFloat(float64(resolved)) - good = true - case uint64: - out.SetFloat(float64(resolved)) - good = true - case float64: - out.SetFloat(resolved) - good = true - } - case reflect.Ptr: - if out.Type().Elem() == reflect.TypeOf(resolved) { - // TODO DOes this make sense? When is out a Ptr except when decoding a nil value? - elem := reflect.New(out.Type().Elem()) - elem.Elem().Set(reflect.ValueOf(resolved)) - out.Set(elem) - good = true - } - } - if !good { - d.terror(n, tag, out) - } - return good -} - -func settableValueOf(i interface{}) reflect.Value { - v := reflect.ValueOf(i) - sv := reflect.New(v.Type()).Elem() - sv.Set(v) - return sv -} - -func (d *decoder) sequence(n *node, out reflect.Value) (good bool) { - l := len(n.children) - - var iface reflect.Value - switch out.Kind() { - case reflect.Slice: - out.Set(reflect.MakeSlice(out.Type(), l, l)) - case reflect.Interface: - // No type hints. Will have to use a generic sequence. - iface = out - out = settableValueOf(make([]interface{}, l)) - default: - d.terror(n, yaml_SEQ_TAG, out) - return false - } - et := out.Type().Elem() - - j := 0 - for i := 0; i < l; i++ { - e := reflect.New(et).Elem() - if ok := d.unmarshal(n.children[i], e); ok { - out.Index(j).Set(e) - j++ - } - } - out.Set(out.Slice(0, j)) - if iface.IsValid() { - iface.Set(out) - } - return true -} - -func (d *decoder) mapping(n *node, out reflect.Value) (good bool) { - switch out.Kind() { - case reflect.Struct: - return d.mappingStruct(n, out) - case reflect.Slice: - return d.mappingSlice(n, out) - case reflect.Map: - // okay - case reflect.Interface: - if d.mapType.Kind() == reflect.Map { - iface := out - out = reflect.MakeMap(d.mapType) - iface.Set(out) - } else { - slicev := reflect.New(d.mapType).Elem() - if !d.mappingSlice(n, slicev) { - return false - } - out.Set(slicev) - return true - } - default: - d.terror(n, yaml_MAP_TAG, out) - return false - } - outt := out.Type() - kt := outt.Key() - et := outt.Elem() - - mapType := d.mapType - if outt.Key() == ifaceType && outt.Elem() == ifaceType { - d.mapType = outt - } - - if out.IsNil() { - out.Set(reflect.MakeMap(outt)) - } - l := len(n.children) - for i := 0; i < l; i += 2 { - if isMerge(n.children[i]) { - d.merge(n.children[i+1], out) - continue - } - k := reflect.New(kt).Elem() - if d.unmarshal(n.children[i], k) { - kkind := k.Kind() - if kkind == reflect.Interface { - kkind = k.Elem().Kind() - } - if kkind == reflect.Map || kkind == reflect.Slice { - failf("invalid map key: %#v", k.Interface()) - } - e := reflect.New(et).Elem() - if d.unmarshal(n.children[i+1], e) { - out.SetMapIndex(k, e) - } - } - } - d.mapType = mapType - return true -} - -func (d *decoder) mappingSlice(n *node, out reflect.Value) (good bool) { - outt := out.Type() - if outt.Elem() != mapItemType { - d.terror(n, yaml_MAP_TAG, out) - return false - } - - mapType := d.mapType - d.mapType = outt - - var slice []MapItem - var l = len(n.children) - for i := 0; i < l; i += 2 { - if isMerge(n.children[i]) { - d.merge(n.children[i+1], out) - continue - } - item := MapItem{} - k := reflect.ValueOf(&item.Key).Elem() - if d.unmarshal(n.children[i], k) { - v := reflect.ValueOf(&item.Value).Elem() - if d.unmarshal(n.children[i+1], v) { - slice = append(slice, item) - } - } - } - out.Set(reflect.ValueOf(slice)) - d.mapType = mapType - return true -} - -func (d *decoder) mappingStruct(n *node, out reflect.Value) (good bool) { - sinfo, err := getStructInfo(out.Type()) - if err != nil { - panic(err) - } - name := settableValueOf("") - l := len(n.children) - - var inlineMap reflect.Value - var elemType reflect.Type - if sinfo.InlineMap != -1 { - inlineMap = out.Field(sinfo.InlineMap) - inlineMap.Set(reflect.New(inlineMap.Type()).Elem()) - elemType = inlineMap.Type().Elem() - } - - for i := 0; i < l; i += 2 { - ni := n.children[i] - if isMerge(ni) { - d.merge(n.children[i+1], out) - continue - } - if !d.unmarshal(ni, name) { - continue - } - if info, ok := sinfo.FieldsMap[name.String()]; ok { - var field reflect.Value - if info.Inline == nil { - field = out.Field(info.Num) - } else { - field = out.FieldByIndex(info.Inline) - } - d.unmarshal(n.children[i+1], field) - } else if sinfo.InlineMap != -1 { - if inlineMap.IsNil() { - inlineMap.Set(reflect.MakeMap(inlineMap.Type())) - } - value := reflect.New(elemType).Elem() - d.unmarshal(n.children[i+1], value) - inlineMap.SetMapIndex(name, value) - } - } - return true -} - -func failWantMap() { - failf("map merge requires map or sequence of maps as the value") -} - -func (d *decoder) merge(n *node, out reflect.Value) { - switch n.kind { - case mappingNode: - d.unmarshal(n, out) - case aliasNode: - an, ok := d.doc.anchors[n.value] - if ok && an.kind != mappingNode { - failWantMap() - } - d.unmarshal(n, out) - case sequenceNode: - // Step backwards as earlier nodes take precedence. - for i := len(n.children) - 1; i >= 0; i-- { - ni := n.children[i] - if ni.kind == aliasNode { - an, ok := d.doc.anchors[ni.value] - if ok && an.kind != mappingNode { - failWantMap() - } - } else if ni.kind != mappingNode { - failWantMap() - } - d.unmarshal(ni, out) - } - default: - failWantMap() - } -} - -func isMerge(n *node) bool { - return n.kind == scalarNode && n.value == "<<" && (n.implicit == true || n.tag == yaml_MERGE_TAG) -} diff --git a/third_party/src/gopkg.in/yaml.v2/decode_test.go b/third_party/src/gopkg.in/yaml.v2/decode_test.go deleted file mode 100644 index 04fdd9e..0000000 --- a/third_party/src/gopkg.in/yaml.v2/decode_test.go +++ /dev/null @@ -1,966 +0,0 @@ -package yaml_test - -import ( - "errors" - . "gopkg.in/check.v1" - "gopkg.in/yaml.v2" - "math" - "net" - "reflect" - "strings" - "time" -) - -var unmarshalIntTest = 123 - -var unmarshalTests = []struct { - data string - value interface{} -}{ - { - "", - &struct{}{}, - }, { - "{}", &struct{}{}, - }, { - "v: hi", - map[string]string{"v": "hi"}, - }, { - "v: hi", map[string]interface{}{"v": "hi"}, - }, { - "v: true", - map[string]string{"v": "true"}, - }, { - "v: true", - map[string]interface{}{"v": true}, - }, { - "v: 10", - map[string]interface{}{"v": 10}, - }, { - "v: 0b10", - map[string]interface{}{"v": 2}, - }, { - "v: 0xA", - map[string]interface{}{"v": 10}, - }, { - "v: 4294967296", - map[string]int64{"v": 4294967296}, - }, { - "v: 0.1", - map[string]interface{}{"v": 0.1}, - }, { - "v: .1", - map[string]interface{}{"v": 0.1}, - }, { - "v: .Inf", - map[string]interface{}{"v": math.Inf(+1)}, - }, { - "v: -.Inf", - map[string]interface{}{"v": math.Inf(-1)}, - }, { - "v: -10", - map[string]interface{}{"v": -10}, - }, { - "v: -.1", - map[string]interface{}{"v": -0.1}, - }, - - // Simple values. - { - "123", - &unmarshalIntTest, - }, - - // Floats from spec - { - "canonical: 6.8523e+5", - map[string]interface{}{"canonical": 6.8523e+5}, - }, { - "expo: 685.230_15e+03", - map[string]interface{}{"expo": 685.23015e+03}, - }, { - "fixed: 685_230.15", - map[string]interface{}{"fixed": 685230.15}, - }, { - "neginf: -.inf", - map[string]interface{}{"neginf": math.Inf(-1)}, - }, { - "fixed: 685_230.15", - map[string]float64{"fixed": 685230.15}, - }, - //{"sexa: 190:20:30.15", map[string]interface{}{"sexa": 0}}, // Unsupported - //{"notanum: .NaN", map[string]interface{}{"notanum": math.NaN()}}, // Equality of NaN fails. - - // Bools from spec - { - "canonical: y", - map[string]interface{}{"canonical": true}, - }, { - "answer: NO", - map[string]interface{}{"answer": false}, - }, { - "logical: True", - map[string]interface{}{"logical": true}, - }, { - "option: on", - map[string]interface{}{"option": true}, - }, { - "option: on", - map[string]bool{"option": true}, - }, - // Ints from spec - { - "canonical: 685230", - map[string]interface{}{"canonical": 685230}, - }, { - "decimal: +685_230", - map[string]interface{}{"decimal": 685230}, - }, { - "octal: 02472256", - map[string]interface{}{"octal": 685230}, - }, { - "hexa: 0x_0A_74_AE", - map[string]interface{}{"hexa": 685230}, - }, { - "bin: 0b1010_0111_0100_1010_1110", - map[string]interface{}{"bin": 685230}, - }, { - "bin: -0b101010", - map[string]interface{}{"bin": -42}, - }, { - "decimal: +685_230", - map[string]int{"decimal": 685230}, - }, - - //{"sexa: 190:20:30", map[string]interface{}{"sexa": 0}}, // Unsupported - - // Nulls from spec - { - "empty:", - map[string]interface{}{"empty": nil}, - }, { - "canonical: ~", - map[string]interface{}{"canonical": nil}, - }, { - "english: null", - map[string]interface{}{"english": nil}, - }, { - "~: null key", - map[interface{}]string{nil: "null key"}, - }, { - "empty:", - map[string]*bool{"empty": nil}, - }, - - // Flow sequence - { - "seq: [A,B]", - map[string]interface{}{"seq": []interface{}{"A", "B"}}, - }, { - "seq: [A,B,C,]", - map[string][]string{"seq": []string{"A", "B", "C"}}, - }, { - "seq: [A,1,C]", - map[string][]string{"seq": []string{"A", "1", "C"}}, - }, { - "seq: [A,1,C]", - map[string][]int{"seq": []int{1}}, - }, { - "seq: [A,1,C]", - map[string]interface{}{"seq": []interface{}{"A", 1, "C"}}, - }, - // Block sequence - { - "seq:\n - A\n - B", - map[string]interface{}{"seq": []interface{}{"A", "B"}}, - }, { - "seq:\n - A\n - B\n - C", - map[string][]string{"seq": []string{"A", "B", "C"}}, - }, { - "seq:\n - A\n - 1\n - C", - map[string][]string{"seq": []string{"A", "1", "C"}}, - }, { - "seq:\n - A\n - 1\n - C", - map[string][]int{"seq": []int{1}}, - }, { - "seq:\n - A\n - 1\n - C", - map[string]interface{}{"seq": []interface{}{"A", 1, "C"}}, - }, - - // Literal block scalar - { - "scalar: | # Comment\n\n literal\n\n \ttext\n\n", - map[string]string{"scalar": "\nliteral\n\n\ttext\n"}, - }, - - // Folded block scalar - { - "scalar: > # Comment\n\n folded\n line\n \n next\n line\n * one\n * two\n\n last\n line\n\n", - map[string]string{"scalar": "\nfolded line\nnext line\n * one\n * two\n\nlast line\n"}, - }, - - // Map inside interface with no type hints. - { - "a: {b: c}", - map[interface{}]interface{}{"a": map[interface{}]interface{}{"b": "c"}}, - }, - - // Structs and type conversions. - { - "hello: world", - &struct{ Hello string }{"world"}, - }, { - "a: {b: c}", - &struct{ A struct{ B string } }{struct{ B string }{"c"}}, - }, { - "a: {b: c}", - &struct{ A *struct{ B string } }{&struct{ B string }{"c"}}, - }, { - "a: {b: c}", - &struct{ A map[string]string }{map[string]string{"b": "c"}}, - }, { - "a: {b: c}", - &struct{ A *map[string]string }{&map[string]string{"b": "c"}}, - }, { - "a:", - &struct{ A map[string]string }{}, - }, { - "a: 1", - &struct{ A int }{1}, - }, { - "a: 1", - &struct{ A float64 }{1}, - }, { - "a: 1.0", - &struct{ A int }{1}, - }, { - "a: 1.0", - &struct{ A uint }{1}, - }, { - "a: [1, 2]", - &struct{ A []int }{[]int{1, 2}}, - }, { - "a: 1", - &struct{ B int }{0}, - }, { - "a: 1", - &struct { - B int "a" - }{1}, - }, { - "a: y", - &struct{ A bool }{true}, - }, - - // Some cross type conversions - { - "v: 42", - map[string]uint{"v": 42}, - }, { - "v: -42", - map[string]uint{}, - }, { - "v: 4294967296", - map[string]uint64{"v": 4294967296}, - }, { - "v: -4294967296", - map[string]uint64{}, - }, - - // int - { - "int_max: 2147483647", - map[string]int{"int_max": math.MaxInt32}, - }, - { - "int_min: -2147483648", - map[string]int{"int_min": math.MinInt32}, - }, - { - "int_overflow: 9223372036854775808", // math.MaxInt64 + 1 - map[string]int{}, - }, - - // int64 - { - "int64_max: 9223372036854775807", - map[string]int64{"int64_max": math.MaxInt64}, - }, - { - "int64_max_base2: 0b111111111111111111111111111111111111111111111111111111111111111", - map[string]int64{"int64_max_base2": math.MaxInt64}, - }, - { - "int64_min: -9223372036854775808", - map[string]int64{"int64_min": math.MinInt64}, - }, - { - "int64_neg_base2: -0b111111111111111111111111111111111111111111111111111111111111111", - map[string]int64{"int64_neg_base2": -math.MaxInt64}, - }, - { - "int64_overflow: 9223372036854775808", // math.MaxInt64 + 1 - map[string]int64{}, - }, - - // uint - { - "uint_min: 0", - map[string]uint{"uint_min": 0}, - }, - { - "uint_max: 4294967295", - map[string]uint{"uint_max": math.MaxUint32}, - }, - { - "uint_underflow: -1", - map[string]uint{}, - }, - - // uint64 - { - "uint64_min: 0", - map[string]uint{"uint64_min": 0}, - }, - { - "uint64_max: 18446744073709551615", - map[string]uint64{"uint64_max": math.MaxUint64}, - }, - { - "uint64_max_base2: 0b1111111111111111111111111111111111111111111111111111111111111111", - map[string]uint64{"uint64_max_base2": math.MaxUint64}, - }, - { - "uint64_maxint64: 9223372036854775807", - map[string]uint64{"uint64_maxint64": math.MaxInt64}, - }, - { - "uint64_underflow: -1", - map[string]uint64{}, - }, - - // float32 - { - "float32_max: 3.40282346638528859811704183484516925440e+38", - map[string]float32{"float32_max": math.MaxFloat32}, - }, - { - "float32_nonzero: 1.401298464324817070923729583289916131280e-45", - map[string]float32{"float32_nonzero": math.SmallestNonzeroFloat32}, - }, - { - "float32_maxuint64: 18446744073709551615", - map[string]float32{"float32_maxuint64": float32(math.MaxUint64)}, - }, - { - "float32_maxuint64+1: 18446744073709551616", - map[string]float32{"float32_maxuint64+1": float32(math.MaxUint64 + 1)}, - }, - - // float64 - { - "float64_max: 1.797693134862315708145274237317043567981e+308", - map[string]float64{"float64_max": math.MaxFloat64}, - }, - { - "float64_nonzero: 4.940656458412465441765687928682213723651e-324", - map[string]float64{"float64_nonzero": math.SmallestNonzeroFloat64}, - }, - { - "float64_maxuint64: 18446744073709551615", - map[string]float64{"float64_maxuint64": float64(math.MaxUint64)}, - }, - { - "float64_maxuint64+1: 18446744073709551616", - map[string]float64{"float64_maxuint64+1": float64(math.MaxUint64 + 1)}, - }, - - // Overflow cases. - { - "v: 4294967297", - map[string]int32{}, - }, { - "v: 128", - map[string]int8{}, - }, - - // Quoted values. - { - "'1': '\"2\"'", - map[interface{}]interface{}{"1": "\"2\""}, - }, { - "v:\n- A\n- 'B\n\n C'\n", - map[string][]string{"v": []string{"A", "B\nC"}}, - }, - - // Explicit tags. - { - "v: !!float '1.1'", - map[string]interface{}{"v": 1.1}, - }, { - "v: !!null ''", - map[string]interface{}{"v": nil}, - }, { - "%TAG !y! tag:yaml.org,2002:\n---\nv: !y!int '1'", - map[string]interface{}{"v": 1}, - }, - - // Anchors and aliases. - { - "a: &x 1\nb: &y 2\nc: *x\nd: *y\n", - &struct{ A, B, C, D int }{1, 2, 1, 2}, - }, { - "a: &a {c: 1}\nb: *a", - &struct { - A, B struct { - C int - } - }{struct{ C int }{1}, struct{ C int }{1}}, - }, { - "a: &a [1, 2]\nb: *a", - &struct{ B []int }{[]int{1, 2}}, - }, { - "b: *a\na: &a {c: 1}", - &struct { - A, B struct { - C int - } - }{struct{ C int }{1}, struct{ C int }{1}}, - }, - - // Bug #1133337 - { - "foo: ''", - map[string]*string{"foo": new(string)}, - }, { - "foo: null", - map[string]string{"foo": ""}, - }, { - "foo: null", - map[string]interface{}{"foo": nil}, - }, - - // Ignored field - { - "a: 1\nb: 2\n", - &struct { - A int - B int "-" - }{1, 0}, - }, - - // Bug #1191981 - { - "" + - "%YAML 1.1\n" + - "--- !!str\n" + - `"Generic line break (no glyph)\n\` + "\n" + - ` Generic line break (glyphed)\n\` + "\n" + - ` Line separator\u2028\` + "\n" + - ` Paragraph separator\u2029"` + "\n", - "" + - "Generic line break (no glyph)\n" + - "Generic line break (glyphed)\n" + - "Line separator\u2028Paragraph separator\u2029", - }, - - // Struct inlining - { - "a: 1\nb: 2\nc: 3\n", - &struct { - A int - C inlineB `yaml:",inline"` - }{1, inlineB{2, inlineC{3}}}, - }, - - // Map inlining - { - "a: 1\nb: 2\nc: 3\n", - &struct { - A int - C map[string]int `yaml:",inline"` - }{1, map[string]int{"b": 2, "c": 3}}, - }, - - // bug 1243827 - { - "a: -b_c", - map[string]interface{}{"a": "-b_c"}, - }, - { - "a: +b_c", - map[string]interface{}{"a": "+b_c"}, - }, - { - "a: 50cent_of_dollar", - map[string]interface{}{"a": "50cent_of_dollar"}, - }, - - // Duration - { - "a: 3s", - map[string]time.Duration{"a": 3 * time.Second}, - }, - - // Issue #24. - { - "a: ", - map[string]string{"a": ""}, - }, - - // Base 60 floats are obsolete and unsupported. - { - "a: 1:1\n", - map[string]string{"a": "1:1"}, - }, - - // Binary data. - { - "a: !!binary gIGC\n", - map[string]string{"a": "\x80\x81\x82"}, - }, { - "a: !!binary |\n " + strings.Repeat("kJCQ", 17) + "kJ\n CQ\n", - map[string]string{"a": strings.Repeat("\x90", 54)}, - }, { - "a: !!binary |\n " + strings.Repeat("A", 70) + "\n ==\n", - map[string]string{"a": strings.Repeat("\x00", 52)}, - }, - - // Ordered maps. - { - "{b: 2, a: 1, d: 4, c: 3, sub: {e: 5}}", - &yaml.MapSlice{{"b", 2}, {"a", 1}, {"d", 4}, {"c", 3}, {"sub", yaml.MapSlice{{"e", 5}}}}, - }, - - // Issue #39. - { - "a:\n b:\n c: d\n", - map[string]struct{ B interface{} }{"a": {map[interface{}]interface{}{"c": "d"}}}, - }, - - // Custom map type. - { - "a: {b: c}", - M{"a": M{"b": "c"}}, - }, - - // Support encoding.TextUnmarshaler. - { - "a: 1.2.3.4\n", - map[string]net.IP{"a": net.IPv4(1, 2, 3, 4)}, - }, - { - "a: 2015-02-24T18:19:39Z\n", - map[string]time.Time{"a": time.Unix(1424801979, 0)}, - }, - - // Encode empty lists as zero-length slices. - { - "a: []", - &struct{ A []int }{[]int{}}, - }, -} - -type M map[interface{}]interface{} - -type inlineB struct { - B int - inlineC `yaml:",inline"` -} - -type inlineC struct { - C int -} - -func (s *S) TestUnmarshal(c *C) { - for _, item := range unmarshalTests { - t := reflect.ValueOf(item.value).Type() - var value interface{} - switch t.Kind() { - case reflect.Map: - value = reflect.MakeMap(t).Interface() - case reflect.String: - value = reflect.New(t).Interface() - case reflect.Ptr: - value = reflect.New(t.Elem()).Interface() - default: - c.Fatalf("missing case for %s", t) - } - err := yaml.Unmarshal([]byte(item.data), value) - if _, ok := err.(*yaml.TypeError); !ok { - c.Assert(err, IsNil) - } - if t.Kind() == reflect.String { - c.Assert(*value.(*string), Equals, item.value) - } else { - c.Assert(value, DeepEquals, item.value) - } - } -} - -func (s *S) TestUnmarshalNaN(c *C) { - value := map[string]interface{}{} - err := yaml.Unmarshal([]byte("notanum: .NaN"), &value) - c.Assert(err, IsNil) - c.Assert(math.IsNaN(value["notanum"].(float64)), Equals, true) -} - -var unmarshalErrorTests = []struct { - data, error string -}{ - {"v: !!float 'error'", "yaml: cannot decode !!str `error` as a !!float"}, - {"v: [A,", "yaml: line 1: did not find expected node content"}, - {"v:\n- [A,", "yaml: line 2: did not find expected node content"}, - {"a: *b\n", "yaml: unknown anchor 'b' referenced"}, - {"a: &a\n b: *a\n", "yaml: anchor 'a' value contains itself"}, - {"value: -", "yaml: block sequence entries are not allowed in this context"}, - {"a: !!binary ==", "yaml: !!binary value contains invalid base64 data"}, - {"{[.]}", `yaml: invalid map key: \[\]interface \{\}\{"\."\}`}, - {"{{.}}", `yaml: invalid map key: map\[interface\ \{\}\]interface \{\}\{".":interface \{\}\(nil\)\}`}, -} - -func (s *S) TestUnmarshalErrors(c *C) { - for _, item := range unmarshalErrorTests { - var value interface{} - err := yaml.Unmarshal([]byte(item.data), &value) - c.Assert(err, ErrorMatches, item.error, Commentf("Partial unmarshal: %#v", value)) - } -} - -var unmarshalerTests = []struct { - data, tag string - value interface{} -}{ - {"_: {hi: there}", "!!map", map[interface{}]interface{}{"hi": "there"}}, - {"_: [1,A]", "!!seq", []interface{}{1, "A"}}, - {"_: 10", "!!int", 10}, - {"_: null", "!!null", nil}, - {`_: BAR!`, "!!str", "BAR!"}, - {`_: "BAR!"`, "!!str", "BAR!"}, - {"_: !!foo 'BAR!'", "!!foo", "BAR!"}, -} - -var unmarshalerResult = map[int]error{} - -type unmarshalerType struct { - value interface{} -} - -func (o *unmarshalerType) UnmarshalYAML(unmarshal func(v interface{}) error) error { - if err := unmarshal(&o.value); err != nil { - return err - } - if i, ok := o.value.(int); ok { - if result, ok := unmarshalerResult[i]; ok { - return result - } - } - return nil -} - -type unmarshalerPointer struct { - Field *unmarshalerType "_" -} - -type unmarshalerValue struct { - Field unmarshalerType "_" -} - -func (s *S) TestUnmarshalerPointerField(c *C) { - for _, item := range unmarshalerTests { - obj := &unmarshalerPointer{} - err := yaml.Unmarshal([]byte(item.data), obj) - c.Assert(err, IsNil) - if item.value == nil { - c.Assert(obj.Field, IsNil) - } else { - c.Assert(obj.Field, NotNil, Commentf("Pointer not initialized (%#v)", item.value)) - c.Assert(obj.Field.value, DeepEquals, item.value) - } - } -} - -func (s *S) TestUnmarshalerValueField(c *C) { - for _, item := range unmarshalerTests { - obj := &unmarshalerValue{} - err := yaml.Unmarshal([]byte(item.data), obj) - c.Assert(err, IsNil) - c.Assert(obj.Field, NotNil, Commentf("Pointer not initialized (%#v)", item.value)) - c.Assert(obj.Field.value, DeepEquals, item.value) - } -} - -func (s *S) TestUnmarshalerWholeDocument(c *C) { - obj := &unmarshalerType{} - err := yaml.Unmarshal([]byte(unmarshalerTests[0].data), obj) - c.Assert(err, IsNil) - value, ok := obj.value.(map[interface{}]interface{}) - c.Assert(ok, Equals, true, Commentf("value: %#v", obj.value)) - c.Assert(value["_"], DeepEquals, unmarshalerTests[0].value) -} - -func (s *S) TestUnmarshalerTypeError(c *C) { - unmarshalerResult[2] = &yaml.TypeError{[]string{"foo"}} - unmarshalerResult[4] = &yaml.TypeError{[]string{"bar"}} - defer func() { - delete(unmarshalerResult, 2) - delete(unmarshalerResult, 4) - }() - - type T struct { - Before int - After int - M map[string]*unmarshalerType - } - var v T - data := `{before: A, m: {abc: 1, def: 2, ghi: 3, jkl: 4}, after: B}` - err := yaml.Unmarshal([]byte(data), &v) - c.Assert(err, ErrorMatches, ""+ - "yaml: unmarshal errors:\n"+ - " line 1: cannot unmarshal !!str `A` into int\n"+ - " foo\n"+ - " bar\n"+ - " line 1: cannot unmarshal !!str `B` into int") - c.Assert(v.M["abc"], NotNil) - c.Assert(v.M["def"], IsNil) - c.Assert(v.M["ghi"], NotNil) - c.Assert(v.M["jkl"], IsNil) - - c.Assert(v.M["abc"].value, Equals, 1) - c.Assert(v.M["ghi"].value, Equals, 3) -} - -type proxyTypeError struct{} - -func (v *proxyTypeError) UnmarshalYAML(unmarshal func(interface{}) error) error { - var s string - var a int32 - var b int64 - if err := unmarshal(&s); err != nil { - panic(err) - } - if s == "a" { - if err := unmarshal(&b); err == nil { - panic("should have failed") - } - return unmarshal(&a) - } - if err := unmarshal(&a); err == nil { - panic("should have failed") - } - return unmarshal(&b) -} - -func (s *S) TestUnmarshalerTypeErrorProxying(c *C) { - type T struct { - Before int - After int - M map[string]*proxyTypeError - } - var v T - data := `{before: A, m: {abc: a, def: b}, after: B}` - err := yaml.Unmarshal([]byte(data), &v) - c.Assert(err, ErrorMatches, ""+ - "yaml: unmarshal errors:\n"+ - " line 1: cannot unmarshal !!str `A` into int\n"+ - " line 1: cannot unmarshal !!str `a` into int32\n"+ - " line 1: cannot unmarshal !!str `b` into int64\n"+ - " line 1: cannot unmarshal !!str `B` into int") -} - -type failingUnmarshaler struct{} - -var failingErr = errors.New("failingErr") - -func (ft *failingUnmarshaler) UnmarshalYAML(unmarshal func(interface{}) error) error { - return failingErr -} - -func (s *S) TestUnmarshalerError(c *C) { - err := yaml.Unmarshal([]byte("a: b"), &failingUnmarshaler{}) - c.Assert(err, Equals, failingErr) -} - -type sliceUnmarshaler []int - -func (su *sliceUnmarshaler) UnmarshalYAML(unmarshal func(interface{}) error) error { - var slice []int - err := unmarshal(&slice) - if err == nil { - *su = slice - return nil - } - - var intVal int - err = unmarshal(&intVal) - if err == nil { - *su = []int{intVal} - return nil - } - - return err -} - -func (s *S) TestUnmarshalerRetry(c *C) { - var su sliceUnmarshaler - err := yaml.Unmarshal([]byte("[1, 2, 3]"), &su) - c.Assert(err, IsNil) - c.Assert(su, DeepEquals, sliceUnmarshaler([]int{1, 2, 3})) - - err = yaml.Unmarshal([]byte("1"), &su) - c.Assert(err, IsNil) - c.Assert(su, DeepEquals, sliceUnmarshaler([]int{1})) -} - -// From http://yaml.org/type/merge.html -var mergeTests = ` -anchors: - list: - - &CENTER { "x": 1, "y": 2 } - - &LEFT { "x": 0, "y": 2 } - - &BIG { "r": 10 } - - &SMALL { "r": 1 } - -# All the following maps are equal: - -plain: - # Explicit keys - "x": 1 - "y": 2 - "r": 10 - label: center/big - -mergeOne: - # Merge one map - << : *CENTER - "r": 10 - label: center/big - -mergeMultiple: - # Merge multiple maps - << : [ *CENTER, *BIG ] - label: center/big - -override: - # Override - << : [ *BIG, *LEFT, *SMALL ] - "x": 1 - label: center/big - -shortTag: - # Explicit short merge tag - !!merge "<<" : [ *CENTER, *BIG ] - label: center/big - -longTag: - # Explicit merge long tag - ! "<<" : [ *CENTER, *BIG ] - label: center/big - -inlineMap: - # Inlined map - << : {"x": 1, "y": 2, "r": 10} - label: center/big - -inlineSequenceMap: - # Inlined map in sequence - << : [ *CENTER, {"r": 10} ] - label: center/big -` - -func (s *S) TestMerge(c *C) { - var want = map[interface{}]interface{}{ - "x": 1, - "y": 2, - "r": 10, - "label": "center/big", - } - - var m map[interface{}]interface{} - err := yaml.Unmarshal([]byte(mergeTests), &m) - c.Assert(err, IsNil) - for name, test := range m { - if name == "anchors" { - continue - } - c.Assert(test, DeepEquals, want, Commentf("test %q failed", name)) - } -} - -func (s *S) TestMergeStruct(c *C) { - type Data struct { - X, Y, R int - Label string - } - want := Data{1, 2, 10, "center/big"} - - var m map[string]Data - err := yaml.Unmarshal([]byte(mergeTests), &m) - c.Assert(err, IsNil) - for name, test := range m { - if name == "anchors" { - continue - } - c.Assert(test, Equals, want, Commentf("test %q failed", name)) - } -} - -var unmarshalNullTests = []func() interface{}{ - func() interface{} { var v interface{}; v = "v"; return &v }, - func() interface{} { var s = "s"; return &s }, - func() interface{} { var s = "s"; sptr := &s; return &sptr }, - func() interface{} { var i = 1; return &i }, - func() interface{} { var i = 1; iptr := &i; return &iptr }, - func() interface{} { m := map[string]int{"s": 1}; return &m }, - func() interface{} { m := map[string]int{"s": 1}; return m }, -} - -func (s *S) TestUnmarshalNull(c *C) { - for _, test := range unmarshalNullTests { - item := test() - zero := reflect.Zero(reflect.TypeOf(item).Elem()).Interface() - err := yaml.Unmarshal([]byte("null"), item) - c.Assert(err, IsNil) - if reflect.TypeOf(item).Kind() == reflect.Map { - c.Assert(reflect.ValueOf(item).Interface(), DeepEquals, reflect.MakeMap(reflect.TypeOf(item)).Interface()) - } else { - c.Assert(reflect.ValueOf(item).Elem().Interface(), DeepEquals, zero) - } - } -} - -func (s *S) TestUnmarshalSliceOnPreset(c *C) { - // Issue #48. - v := struct{ A []int }{[]int{1}} - yaml.Unmarshal([]byte("a: [2]"), &v) - c.Assert(v.A, DeepEquals, []int{2}) -} - -//var data []byte -//func init() { -// var err error -// data, err = ioutil.ReadFile("/tmp/file.yaml") -// if err != nil { -// panic(err) -// } -//} -// -//func (s *S) BenchmarkUnmarshal(c *C) { -// var err error -// for i := 0; i < c.N; i++ { -// var v map[string]interface{} -// err = yaml.Unmarshal(data, &v) -// } -// if err != nil { -// panic(err) -// } -//} -// -//func (s *S) BenchmarkMarshal(c *C) { -// var v map[string]interface{} -// yaml.Unmarshal(data, &v) -// c.ResetTimer() -// for i := 0; i < c.N; i++ { -// yaml.Marshal(&v) -// } -//} diff --git a/third_party/src/gopkg.in/yaml.v2/emitterc.go b/third_party/src/gopkg.in/yaml.v2/emitterc.go deleted file mode 100644 index 2befd55..0000000 --- a/third_party/src/gopkg.in/yaml.v2/emitterc.go +++ /dev/null @@ -1,1685 +0,0 @@ -package yaml - -import ( - "bytes" -) - -// Flush the buffer if needed. -func flush(emitter *yaml_emitter_t) bool { - if emitter.buffer_pos+5 >= len(emitter.buffer) { - return yaml_emitter_flush(emitter) - } - return true -} - -// Put a character to the output buffer. -func put(emitter *yaml_emitter_t, value byte) bool { - if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { - return false - } - emitter.buffer[emitter.buffer_pos] = value - emitter.buffer_pos++ - emitter.column++ - return true -} - -// Put a line break to the output buffer. -func put_break(emitter *yaml_emitter_t) bool { - if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { - return false - } - switch emitter.line_break { - case yaml_CR_BREAK: - emitter.buffer[emitter.buffer_pos] = '\r' - emitter.buffer_pos += 1 - case yaml_LN_BREAK: - emitter.buffer[emitter.buffer_pos] = '\n' - emitter.buffer_pos += 1 - case yaml_CRLN_BREAK: - emitter.buffer[emitter.buffer_pos+0] = '\r' - emitter.buffer[emitter.buffer_pos+1] = '\n' - emitter.buffer_pos += 2 - default: - panic("unknown line break setting") - } - emitter.column = 0 - emitter.line++ - return true -} - -// Copy a character from a string into buffer. -func write(emitter *yaml_emitter_t, s []byte, i *int) bool { - if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { - return false - } - p := emitter.buffer_pos - w := width(s[*i]) - switch w { - case 4: - emitter.buffer[p+3] = s[*i+3] - fallthrough - case 3: - emitter.buffer[p+2] = s[*i+2] - fallthrough - case 2: - emitter.buffer[p+1] = s[*i+1] - fallthrough - case 1: - emitter.buffer[p+0] = s[*i+0] - default: - panic("unknown character width") - } - emitter.column++ - emitter.buffer_pos += w - *i += w - return true -} - -// Write a whole string into buffer. -func write_all(emitter *yaml_emitter_t, s []byte) bool { - for i := 0; i < len(s); { - if !write(emitter, s, &i) { - return false - } - } - return true -} - -// Copy a line break character from a string into buffer. -func write_break(emitter *yaml_emitter_t, s []byte, i *int) bool { - if s[*i] == '\n' { - if !put_break(emitter) { - return false - } - *i++ - } else { - if !write(emitter, s, i) { - return false - } - emitter.column = 0 - emitter.line++ - } - return true -} - -// Set an emitter error and return false. -func yaml_emitter_set_emitter_error(emitter *yaml_emitter_t, problem string) bool { - emitter.error = yaml_EMITTER_ERROR - emitter.problem = problem - return false -} - -// Emit an event. -func yaml_emitter_emit(emitter *yaml_emitter_t, event *yaml_event_t) bool { - emitter.events = append(emitter.events, *event) - for !yaml_emitter_need_more_events(emitter) { - event := &emitter.events[emitter.events_head] - if !yaml_emitter_analyze_event(emitter, event) { - return false - } - if !yaml_emitter_state_machine(emitter, event) { - return false - } - yaml_event_delete(event) - emitter.events_head++ - } - return true -} - -// Check if we need to accumulate more events before emitting. -// -// We accumulate extra -// - 1 event for DOCUMENT-START -// - 2 events for SEQUENCE-START -// - 3 events for MAPPING-START -// -func yaml_emitter_need_more_events(emitter *yaml_emitter_t) bool { - if emitter.events_head == len(emitter.events) { - return true - } - var accumulate int - switch emitter.events[emitter.events_head].typ { - case yaml_DOCUMENT_START_EVENT: - accumulate = 1 - break - case yaml_SEQUENCE_START_EVENT: - accumulate = 2 - break - case yaml_MAPPING_START_EVENT: - accumulate = 3 - break - default: - return false - } - if len(emitter.events)-emitter.events_head > accumulate { - return false - } - var level int - for i := emitter.events_head; i < len(emitter.events); i++ { - switch emitter.events[i].typ { - case yaml_STREAM_START_EVENT, yaml_DOCUMENT_START_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT: - level++ - case yaml_STREAM_END_EVENT, yaml_DOCUMENT_END_EVENT, yaml_SEQUENCE_END_EVENT, yaml_MAPPING_END_EVENT: - level-- - } - if level == 0 { - return false - } - } - return true -} - -// Append a directive to the directives stack. -func yaml_emitter_append_tag_directive(emitter *yaml_emitter_t, value *yaml_tag_directive_t, allow_duplicates bool) bool { - for i := 0; i < len(emitter.tag_directives); i++ { - if bytes.Equal(value.handle, emitter.tag_directives[i].handle) { - if allow_duplicates { - return true - } - return yaml_emitter_set_emitter_error(emitter, "duplicate %TAG directive") - } - } - - // [Go] Do we actually need to copy this given garbage collection - // and the lack of deallocating destructors? - tag_copy := yaml_tag_directive_t{ - handle: make([]byte, len(value.handle)), - prefix: make([]byte, len(value.prefix)), - } - copy(tag_copy.handle, value.handle) - copy(tag_copy.prefix, value.prefix) - emitter.tag_directives = append(emitter.tag_directives, tag_copy) - return true -} - -// Increase the indentation level. -func yaml_emitter_increase_indent(emitter *yaml_emitter_t, flow, indentless bool) bool { - emitter.indents = append(emitter.indents, emitter.indent) - if emitter.indent < 0 { - if flow { - emitter.indent = emitter.best_indent - } else { - emitter.indent = 0 - } - } else if !indentless { - emitter.indent += emitter.best_indent - } - return true -} - -// State dispatcher. -func yaml_emitter_state_machine(emitter *yaml_emitter_t, event *yaml_event_t) bool { - switch emitter.state { - default: - case yaml_EMIT_STREAM_START_STATE: - return yaml_emitter_emit_stream_start(emitter, event) - - case yaml_EMIT_FIRST_DOCUMENT_START_STATE: - return yaml_emitter_emit_document_start(emitter, event, true) - - case yaml_EMIT_DOCUMENT_START_STATE: - return yaml_emitter_emit_document_start(emitter, event, false) - - case yaml_EMIT_DOCUMENT_CONTENT_STATE: - return yaml_emitter_emit_document_content(emitter, event) - - case yaml_EMIT_DOCUMENT_END_STATE: - return yaml_emitter_emit_document_end(emitter, event) - - case yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE: - return yaml_emitter_emit_flow_sequence_item(emitter, event, true) - - case yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE: - return yaml_emitter_emit_flow_sequence_item(emitter, event, false) - - case yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE: - return yaml_emitter_emit_flow_mapping_key(emitter, event, true) - - case yaml_EMIT_FLOW_MAPPING_KEY_STATE: - return yaml_emitter_emit_flow_mapping_key(emitter, event, false) - - case yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE: - return yaml_emitter_emit_flow_mapping_value(emitter, event, true) - - case yaml_EMIT_FLOW_MAPPING_VALUE_STATE: - return yaml_emitter_emit_flow_mapping_value(emitter, event, false) - - case yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE: - return yaml_emitter_emit_block_sequence_item(emitter, event, true) - - case yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE: - return yaml_emitter_emit_block_sequence_item(emitter, event, false) - - case yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE: - return yaml_emitter_emit_block_mapping_key(emitter, event, true) - - case yaml_EMIT_BLOCK_MAPPING_KEY_STATE: - return yaml_emitter_emit_block_mapping_key(emitter, event, false) - - case yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE: - return yaml_emitter_emit_block_mapping_value(emitter, event, true) - - case yaml_EMIT_BLOCK_MAPPING_VALUE_STATE: - return yaml_emitter_emit_block_mapping_value(emitter, event, false) - - case yaml_EMIT_END_STATE: - return yaml_emitter_set_emitter_error(emitter, "expected nothing after STREAM-END") - } - panic("invalid emitter state") -} - -// Expect STREAM-START. -func yaml_emitter_emit_stream_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if event.typ != yaml_STREAM_START_EVENT { - return yaml_emitter_set_emitter_error(emitter, "expected STREAM-START") - } - if emitter.encoding == yaml_ANY_ENCODING { - emitter.encoding = event.encoding - if emitter.encoding == yaml_ANY_ENCODING { - emitter.encoding = yaml_UTF8_ENCODING - } - } - if emitter.best_indent < 2 || emitter.best_indent > 9 { - emitter.best_indent = 2 - } - if emitter.best_width >= 0 && emitter.best_width <= emitter.best_indent*2 { - emitter.best_width = 80 - } - if emitter.best_width < 0 { - emitter.best_width = 1<<31 - 1 - } - if emitter.line_break == yaml_ANY_BREAK { - emitter.line_break = yaml_LN_BREAK - } - - emitter.indent = -1 - emitter.line = 0 - emitter.column = 0 - emitter.whitespace = true - emitter.indention = true - - if emitter.encoding != yaml_UTF8_ENCODING { - if !yaml_emitter_write_bom(emitter) { - return false - } - } - emitter.state = yaml_EMIT_FIRST_DOCUMENT_START_STATE - return true -} - -// Expect DOCUMENT-START or STREAM-END. -func yaml_emitter_emit_document_start(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { - - if event.typ == yaml_DOCUMENT_START_EVENT { - - if event.version_directive != nil { - if !yaml_emitter_analyze_version_directive(emitter, event.version_directive) { - return false - } - } - - for i := 0; i < len(event.tag_directives); i++ { - tag_directive := &event.tag_directives[i] - if !yaml_emitter_analyze_tag_directive(emitter, tag_directive) { - return false - } - if !yaml_emitter_append_tag_directive(emitter, tag_directive, false) { - return false - } - } - - for i := 0; i < len(default_tag_directives); i++ { - tag_directive := &default_tag_directives[i] - if !yaml_emitter_append_tag_directive(emitter, tag_directive, true) { - return false - } - } - - implicit := event.implicit - if !first || emitter.canonical { - implicit = false - } - - if emitter.open_ended && (event.version_directive != nil || len(event.tag_directives) > 0) { - if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - - if event.version_directive != nil { - implicit = false - if !yaml_emitter_write_indicator(emitter, []byte("%YAML"), true, false, false) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte("1.1"), true, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - - if len(event.tag_directives) > 0 { - implicit = false - for i := 0; i < len(event.tag_directives); i++ { - tag_directive := &event.tag_directives[i] - if !yaml_emitter_write_indicator(emitter, []byte("%TAG"), true, false, false) { - return false - } - if !yaml_emitter_write_tag_handle(emitter, tag_directive.handle) { - return false - } - if !yaml_emitter_write_tag_content(emitter, tag_directive.prefix, true) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - } - - if yaml_emitter_check_empty_document(emitter) { - implicit = false - } - if !implicit { - if !yaml_emitter_write_indent(emitter) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte("---"), true, false, false) { - return false - } - if emitter.canonical { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - } - - emitter.state = yaml_EMIT_DOCUMENT_CONTENT_STATE - return true - } - - if event.typ == yaml_STREAM_END_EVENT { - if emitter.open_ended { - if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_flush(emitter) { - return false - } - emitter.state = yaml_EMIT_END_STATE - return true - } - - return yaml_emitter_set_emitter_error(emitter, "expected DOCUMENT-START or STREAM-END") -} - -// Expect the root node. -func yaml_emitter_emit_document_content(emitter *yaml_emitter_t, event *yaml_event_t) bool { - emitter.states = append(emitter.states, yaml_EMIT_DOCUMENT_END_STATE) - return yaml_emitter_emit_node(emitter, event, true, false, false, false) -} - -// Expect DOCUMENT-END. -func yaml_emitter_emit_document_end(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if event.typ != yaml_DOCUMENT_END_EVENT { - return yaml_emitter_set_emitter_error(emitter, "expected DOCUMENT-END") - } - if !yaml_emitter_write_indent(emitter) { - return false - } - if !event.implicit { - // [Go] Allocate the slice elsewhere. - if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_flush(emitter) { - return false - } - emitter.state = yaml_EMIT_DOCUMENT_START_STATE - emitter.tag_directives = emitter.tag_directives[:0] - return true -} - -// Expect a flow item node. -func yaml_emitter_emit_flow_sequence_item(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { - if first { - if !yaml_emitter_write_indicator(emitter, []byte{'['}, true, true, false) { - return false - } - if !yaml_emitter_increase_indent(emitter, true, false) { - return false - } - emitter.flow_level++ - } - - if event.typ == yaml_SEQUENCE_END_EVENT { - emitter.flow_level-- - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - if emitter.canonical && !first { - if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{']'}, false, false, false) { - return false - } - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - - return true - } - - if !first { - if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { - return false - } - } - - if emitter.canonical || emitter.column > emitter.best_width { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - emitter.states = append(emitter.states, yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE) - return yaml_emitter_emit_node(emitter, event, false, true, false, false) -} - -// Expect a flow key node. -func yaml_emitter_emit_flow_mapping_key(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { - if first { - if !yaml_emitter_write_indicator(emitter, []byte{'{'}, true, true, false) { - return false - } - if !yaml_emitter_increase_indent(emitter, true, false) { - return false - } - emitter.flow_level++ - } - - if event.typ == yaml_MAPPING_END_EVENT { - emitter.flow_level-- - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - if emitter.canonical && !first { - if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { - return false - } - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{'}'}, false, false, false) { - return false - } - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true - } - - if !first { - if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { - return false - } - } - if emitter.canonical || emitter.column > emitter.best_width { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - - if !emitter.canonical && yaml_emitter_check_simple_key(emitter) { - emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, true) - } - if !yaml_emitter_write_indicator(emitter, []byte{'?'}, true, false, false) { - return false - } - emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_VALUE_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, false) -} - -// Expect a flow value node. -func yaml_emitter_emit_flow_mapping_value(emitter *yaml_emitter_t, event *yaml_event_t, simple bool) bool { - if simple { - if !yaml_emitter_write_indicator(emitter, []byte{':'}, false, false, false) { - return false - } - } else { - if emitter.canonical || emitter.column > emitter.best_width { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{':'}, true, false, false) { - return false - } - } - emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_KEY_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, false) -} - -// Expect a block item node. -func yaml_emitter_emit_block_sequence_item(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { - if first { - if !yaml_emitter_increase_indent(emitter, false, emitter.mapping_context && !emitter.indention) { - return false - } - } - if event.typ == yaml_SEQUENCE_END_EVENT { - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true - } - if !yaml_emitter_write_indent(emitter) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte{'-'}, true, false, true) { - return false - } - emitter.states = append(emitter.states, yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE) - return yaml_emitter_emit_node(emitter, event, false, true, false, false) -} - -// Expect a block key node. -func yaml_emitter_emit_block_mapping_key(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { - if first { - if !yaml_emitter_increase_indent(emitter, false, false) { - return false - } - } - if event.typ == yaml_MAPPING_END_EVENT { - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true - } - if !yaml_emitter_write_indent(emitter) { - return false - } - if yaml_emitter_check_simple_key(emitter) { - emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, true) - } - if !yaml_emitter_write_indicator(emitter, []byte{'?'}, true, false, true) { - return false - } - emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_VALUE_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, false) -} - -// Expect a block value node. -func yaml_emitter_emit_block_mapping_value(emitter *yaml_emitter_t, event *yaml_event_t, simple bool) bool { - if simple { - if !yaml_emitter_write_indicator(emitter, []byte{':'}, false, false, false) { - return false - } - } else { - if !yaml_emitter_write_indent(emitter) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte{':'}, true, false, true) { - return false - } - } - emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_KEY_STATE) - return yaml_emitter_emit_node(emitter, event, false, false, true, false) -} - -// Expect a node. -func yaml_emitter_emit_node(emitter *yaml_emitter_t, event *yaml_event_t, - root bool, sequence bool, mapping bool, simple_key bool) bool { - - emitter.root_context = root - emitter.sequence_context = sequence - emitter.mapping_context = mapping - emitter.simple_key_context = simple_key - - switch event.typ { - case yaml_ALIAS_EVENT: - return yaml_emitter_emit_alias(emitter, event) - case yaml_SCALAR_EVENT: - return yaml_emitter_emit_scalar(emitter, event) - case yaml_SEQUENCE_START_EVENT: - return yaml_emitter_emit_sequence_start(emitter, event) - case yaml_MAPPING_START_EVENT: - return yaml_emitter_emit_mapping_start(emitter, event) - default: - return yaml_emitter_set_emitter_error(emitter, - "expected SCALAR, SEQUENCE-START, MAPPING-START, or ALIAS") - } - return false -} - -// Expect ALIAS. -func yaml_emitter_emit_alias(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if !yaml_emitter_process_anchor(emitter) { - return false - } - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true -} - -// Expect SCALAR. -func yaml_emitter_emit_scalar(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if !yaml_emitter_select_scalar_style(emitter, event) { - return false - } - if !yaml_emitter_process_anchor(emitter) { - return false - } - if !yaml_emitter_process_tag(emitter) { - return false - } - if !yaml_emitter_increase_indent(emitter, true, false) { - return false - } - if !yaml_emitter_process_scalar(emitter) { - return false - } - emitter.indent = emitter.indents[len(emitter.indents)-1] - emitter.indents = emitter.indents[:len(emitter.indents)-1] - emitter.state = emitter.states[len(emitter.states)-1] - emitter.states = emitter.states[:len(emitter.states)-1] - return true -} - -// Expect SEQUENCE-START. -func yaml_emitter_emit_sequence_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if !yaml_emitter_process_anchor(emitter) { - return false - } - if !yaml_emitter_process_tag(emitter) { - return false - } - if emitter.flow_level > 0 || emitter.canonical || event.sequence_style() == yaml_FLOW_SEQUENCE_STYLE || - yaml_emitter_check_empty_sequence(emitter) { - emitter.state = yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE - } else { - emitter.state = yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE - } - return true -} - -// Expect MAPPING-START. -func yaml_emitter_emit_mapping_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { - if !yaml_emitter_process_anchor(emitter) { - return false - } - if !yaml_emitter_process_tag(emitter) { - return false - } - if emitter.flow_level > 0 || emitter.canonical || event.mapping_style() == yaml_FLOW_MAPPING_STYLE || - yaml_emitter_check_empty_mapping(emitter) { - emitter.state = yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE - } else { - emitter.state = yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE - } - return true -} - -// Check if the document content is an empty scalar. -func yaml_emitter_check_empty_document(emitter *yaml_emitter_t) bool { - return false // [Go] Huh? -} - -// Check if the next events represent an empty sequence. -func yaml_emitter_check_empty_sequence(emitter *yaml_emitter_t) bool { - if len(emitter.events)-emitter.events_head < 2 { - return false - } - return emitter.events[emitter.events_head].typ == yaml_SEQUENCE_START_EVENT && - emitter.events[emitter.events_head+1].typ == yaml_SEQUENCE_END_EVENT -} - -// Check if the next events represent an empty mapping. -func yaml_emitter_check_empty_mapping(emitter *yaml_emitter_t) bool { - if len(emitter.events)-emitter.events_head < 2 { - return false - } - return emitter.events[emitter.events_head].typ == yaml_MAPPING_START_EVENT && - emitter.events[emitter.events_head+1].typ == yaml_MAPPING_END_EVENT -} - -// Check if the next node can be expressed as a simple key. -func yaml_emitter_check_simple_key(emitter *yaml_emitter_t) bool { - length := 0 - switch emitter.events[emitter.events_head].typ { - case yaml_ALIAS_EVENT: - length += len(emitter.anchor_data.anchor) - case yaml_SCALAR_EVENT: - if emitter.scalar_data.multiline { - return false - } - length += len(emitter.anchor_data.anchor) + - len(emitter.tag_data.handle) + - len(emitter.tag_data.suffix) + - len(emitter.scalar_data.value) - case yaml_SEQUENCE_START_EVENT: - if !yaml_emitter_check_empty_sequence(emitter) { - return false - } - length += len(emitter.anchor_data.anchor) + - len(emitter.tag_data.handle) + - len(emitter.tag_data.suffix) - case yaml_MAPPING_START_EVENT: - if !yaml_emitter_check_empty_mapping(emitter) { - return false - } - length += len(emitter.anchor_data.anchor) + - len(emitter.tag_data.handle) + - len(emitter.tag_data.suffix) - default: - return false - } - return length <= 128 -} - -// Determine an acceptable scalar style. -func yaml_emitter_select_scalar_style(emitter *yaml_emitter_t, event *yaml_event_t) bool { - - no_tag := len(emitter.tag_data.handle) == 0 && len(emitter.tag_data.suffix) == 0 - if no_tag && !event.implicit && !event.quoted_implicit { - return yaml_emitter_set_emitter_error(emitter, "neither tag nor implicit flags are specified") - } - - style := event.scalar_style() - if style == yaml_ANY_SCALAR_STYLE { - style = yaml_PLAIN_SCALAR_STYLE - } - if emitter.canonical { - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - if emitter.simple_key_context && emitter.scalar_data.multiline { - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - - if style == yaml_PLAIN_SCALAR_STYLE { - if emitter.flow_level > 0 && !emitter.scalar_data.flow_plain_allowed || - emitter.flow_level == 0 && !emitter.scalar_data.block_plain_allowed { - style = yaml_SINGLE_QUOTED_SCALAR_STYLE - } - if len(emitter.scalar_data.value) == 0 && (emitter.flow_level > 0 || emitter.simple_key_context) { - style = yaml_SINGLE_QUOTED_SCALAR_STYLE - } - if no_tag && !event.implicit { - style = yaml_SINGLE_QUOTED_SCALAR_STYLE - } - } - if style == yaml_SINGLE_QUOTED_SCALAR_STYLE { - if !emitter.scalar_data.single_quoted_allowed { - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - } - if style == yaml_LITERAL_SCALAR_STYLE || style == yaml_FOLDED_SCALAR_STYLE { - if !emitter.scalar_data.block_allowed || emitter.flow_level > 0 || emitter.simple_key_context { - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - } - - if no_tag && !event.quoted_implicit && style != yaml_PLAIN_SCALAR_STYLE { - emitter.tag_data.handle = []byte{'!'} - } - emitter.scalar_data.style = style - return true -} - -// Write an achor. -func yaml_emitter_process_anchor(emitter *yaml_emitter_t) bool { - if emitter.anchor_data.anchor == nil { - return true - } - c := []byte{'&'} - if emitter.anchor_data.alias { - c[0] = '*' - } - if !yaml_emitter_write_indicator(emitter, c, true, false, false) { - return false - } - return yaml_emitter_write_anchor(emitter, emitter.anchor_data.anchor) -} - -// Write a tag. -func yaml_emitter_process_tag(emitter *yaml_emitter_t) bool { - if len(emitter.tag_data.handle) == 0 && len(emitter.tag_data.suffix) == 0 { - return true - } - if len(emitter.tag_data.handle) > 0 { - if !yaml_emitter_write_tag_handle(emitter, emitter.tag_data.handle) { - return false - } - if len(emitter.tag_data.suffix) > 0 { - if !yaml_emitter_write_tag_content(emitter, emitter.tag_data.suffix, false) { - return false - } - } - } else { - // [Go] Allocate these slices elsewhere. - if !yaml_emitter_write_indicator(emitter, []byte("!<"), true, false, false) { - return false - } - if !yaml_emitter_write_tag_content(emitter, emitter.tag_data.suffix, false) { - return false - } - if !yaml_emitter_write_indicator(emitter, []byte{'>'}, false, false, false) { - return false - } - } - return true -} - -// Write a scalar. -func yaml_emitter_process_scalar(emitter *yaml_emitter_t) bool { - switch emitter.scalar_data.style { - case yaml_PLAIN_SCALAR_STYLE: - return yaml_emitter_write_plain_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) - - case yaml_SINGLE_QUOTED_SCALAR_STYLE: - return yaml_emitter_write_single_quoted_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) - - case yaml_DOUBLE_QUOTED_SCALAR_STYLE: - return yaml_emitter_write_double_quoted_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) - - case yaml_LITERAL_SCALAR_STYLE: - return yaml_emitter_write_literal_scalar(emitter, emitter.scalar_data.value) - - case yaml_FOLDED_SCALAR_STYLE: - return yaml_emitter_write_folded_scalar(emitter, emitter.scalar_data.value) - } - panic("unknown scalar style") -} - -// Check if a %YAML directive is valid. -func yaml_emitter_analyze_version_directive(emitter *yaml_emitter_t, version_directive *yaml_version_directive_t) bool { - if version_directive.major != 1 || version_directive.minor != 1 { - return yaml_emitter_set_emitter_error(emitter, "incompatible %YAML directive") - } - return true -} - -// Check if a %TAG directive is valid. -func yaml_emitter_analyze_tag_directive(emitter *yaml_emitter_t, tag_directive *yaml_tag_directive_t) bool { - handle := tag_directive.handle - prefix := tag_directive.prefix - if len(handle) == 0 { - return yaml_emitter_set_emitter_error(emitter, "tag handle must not be empty") - } - if handle[0] != '!' { - return yaml_emitter_set_emitter_error(emitter, "tag handle must start with '!'") - } - if handle[len(handle)-1] != '!' { - return yaml_emitter_set_emitter_error(emitter, "tag handle must end with '!'") - } - for i := 1; i < len(handle)-1; i += width(handle[i]) { - if !is_alpha(handle, i) { - return yaml_emitter_set_emitter_error(emitter, "tag handle must contain alphanumerical characters only") - } - } - if len(prefix) == 0 { - return yaml_emitter_set_emitter_error(emitter, "tag prefix must not be empty") - } - return true -} - -// Check if an anchor is valid. -func yaml_emitter_analyze_anchor(emitter *yaml_emitter_t, anchor []byte, alias bool) bool { - if len(anchor) == 0 { - problem := "anchor value must not be empty" - if alias { - problem = "alias value must not be empty" - } - return yaml_emitter_set_emitter_error(emitter, problem) - } - for i := 0; i < len(anchor); i += width(anchor[i]) { - if !is_alpha(anchor, i) { - problem := "anchor value must contain alphanumerical characters only" - if alias { - problem = "alias value must contain alphanumerical characters only" - } - return yaml_emitter_set_emitter_error(emitter, problem) - } - } - emitter.anchor_data.anchor = anchor - emitter.anchor_data.alias = alias - return true -} - -// Check if a tag is valid. -func yaml_emitter_analyze_tag(emitter *yaml_emitter_t, tag []byte) bool { - if len(tag) == 0 { - return yaml_emitter_set_emitter_error(emitter, "tag value must not be empty") - } - for i := 0; i < len(emitter.tag_directives); i++ { - tag_directive := &emitter.tag_directives[i] - if bytes.HasPrefix(tag, tag_directive.prefix) { - emitter.tag_data.handle = tag_directive.handle - emitter.tag_data.suffix = tag[len(tag_directive.prefix):] - return true - } - } - emitter.tag_data.suffix = tag - return true -} - -// Check if a scalar is valid. -func yaml_emitter_analyze_scalar(emitter *yaml_emitter_t, value []byte) bool { - var ( - block_indicators = false - flow_indicators = false - line_breaks = false - special_characters = false - - leading_space = false - leading_break = false - trailing_space = false - trailing_break = false - break_space = false - space_break = false - - preceeded_by_whitespace = false - followed_by_whitespace = false - previous_space = false - previous_break = false - ) - - emitter.scalar_data.value = value - - if len(value) == 0 { - emitter.scalar_data.multiline = false - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = true - emitter.scalar_data.single_quoted_allowed = true - emitter.scalar_data.block_allowed = false - return true - } - - if len(value) >= 3 && ((value[0] == '-' && value[1] == '-' && value[2] == '-') || (value[0] == '.' && value[1] == '.' && value[2] == '.')) { - block_indicators = true - flow_indicators = true - } - - preceeded_by_whitespace = true - for i, w := 0, 0; i < len(value); i += w { - w = width(value[i]) - followed_by_whitespace = i+w >= len(value) || is_blank(value, i+w) - - if i == 0 { - switch value[i] { - case '#', ',', '[', ']', '{', '}', '&', '*', '!', '|', '>', '\'', '"', '%', '@', '`': - flow_indicators = true - block_indicators = true - case '?', ':': - flow_indicators = true - if followed_by_whitespace { - block_indicators = true - } - case '-': - if followed_by_whitespace { - flow_indicators = true - block_indicators = true - } - } - } else { - switch value[i] { - case ',', '?', '[', ']', '{', '}': - flow_indicators = true - case ':': - flow_indicators = true - if followed_by_whitespace { - block_indicators = true - } - case '#': - if preceeded_by_whitespace { - flow_indicators = true - block_indicators = true - } - } - } - - if !is_printable(value, i) || !is_ascii(value, i) && !emitter.unicode { - special_characters = true - } - if is_space(value, i) { - if i == 0 { - leading_space = true - } - if i+width(value[i]) == len(value) { - trailing_space = true - } - if previous_break { - break_space = true - } - previous_space = true - previous_break = false - } else if is_break(value, i) { - line_breaks = true - if i == 0 { - leading_break = true - } - if i+width(value[i]) == len(value) { - trailing_break = true - } - if previous_space { - space_break = true - } - previous_space = false - previous_break = true - } else { - previous_space = false - previous_break = false - } - - // [Go]: Why 'z'? Couldn't be the end of the string as that's the loop condition. - preceeded_by_whitespace = is_blankz(value, i) - } - - emitter.scalar_data.multiline = line_breaks - emitter.scalar_data.flow_plain_allowed = true - emitter.scalar_data.block_plain_allowed = true - emitter.scalar_data.single_quoted_allowed = true - emitter.scalar_data.block_allowed = true - - if leading_space || leading_break || trailing_space || trailing_break { - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = false - } - if trailing_space { - emitter.scalar_data.block_allowed = false - } - if break_space { - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = false - emitter.scalar_data.single_quoted_allowed = false - } - if space_break || special_characters { - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = false - emitter.scalar_data.single_quoted_allowed = false - emitter.scalar_data.block_allowed = false - } - if line_breaks { - emitter.scalar_data.flow_plain_allowed = false - emitter.scalar_data.block_plain_allowed = false - } - if flow_indicators { - emitter.scalar_data.flow_plain_allowed = false - } - if block_indicators { - emitter.scalar_data.block_plain_allowed = false - } - return true -} - -// Check if the event data is valid. -func yaml_emitter_analyze_event(emitter *yaml_emitter_t, event *yaml_event_t) bool { - - emitter.anchor_data.anchor = nil - emitter.tag_data.handle = nil - emitter.tag_data.suffix = nil - emitter.scalar_data.value = nil - - switch event.typ { - case yaml_ALIAS_EVENT: - if !yaml_emitter_analyze_anchor(emitter, event.anchor, true) { - return false - } - - case yaml_SCALAR_EVENT: - if len(event.anchor) > 0 { - if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { - return false - } - } - if len(event.tag) > 0 && (emitter.canonical || (!event.implicit && !event.quoted_implicit)) { - if !yaml_emitter_analyze_tag(emitter, event.tag) { - return false - } - } - if !yaml_emitter_analyze_scalar(emitter, event.value) { - return false - } - - case yaml_SEQUENCE_START_EVENT: - if len(event.anchor) > 0 { - if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { - return false - } - } - if len(event.tag) > 0 && (emitter.canonical || !event.implicit) { - if !yaml_emitter_analyze_tag(emitter, event.tag) { - return false - } - } - - case yaml_MAPPING_START_EVENT: - if len(event.anchor) > 0 { - if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { - return false - } - } - if len(event.tag) > 0 && (emitter.canonical || !event.implicit) { - if !yaml_emitter_analyze_tag(emitter, event.tag) { - return false - } - } - } - return true -} - -// Write the BOM character. -func yaml_emitter_write_bom(emitter *yaml_emitter_t) bool { - if !flush(emitter) { - return false - } - pos := emitter.buffer_pos - emitter.buffer[pos+0] = '\xEF' - emitter.buffer[pos+1] = '\xBB' - emitter.buffer[pos+2] = '\xBF' - emitter.buffer_pos += 3 - return true -} - -func yaml_emitter_write_indent(emitter *yaml_emitter_t) bool { - indent := emitter.indent - if indent < 0 { - indent = 0 - } - if !emitter.indention || emitter.column > indent || (emitter.column == indent && !emitter.whitespace) { - if !put_break(emitter) { - return false - } - } - for emitter.column < indent { - if !put(emitter, ' ') { - return false - } - } - emitter.whitespace = true - emitter.indention = true - return true -} - -func yaml_emitter_write_indicator(emitter *yaml_emitter_t, indicator []byte, need_whitespace, is_whitespace, is_indention bool) bool { - if need_whitespace && !emitter.whitespace { - if !put(emitter, ' ') { - return false - } - } - if !write_all(emitter, indicator) { - return false - } - emitter.whitespace = is_whitespace - emitter.indention = (emitter.indention && is_indention) - emitter.open_ended = false - return true -} - -func yaml_emitter_write_anchor(emitter *yaml_emitter_t, value []byte) bool { - if !write_all(emitter, value) { - return false - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_tag_handle(emitter *yaml_emitter_t, value []byte) bool { - if !emitter.whitespace { - if !put(emitter, ' ') { - return false - } - } - if !write_all(emitter, value) { - return false - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_tag_content(emitter *yaml_emitter_t, value []byte, need_whitespace bool) bool { - if need_whitespace && !emitter.whitespace { - if !put(emitter, ' ') { - return false - } - } - for i := 0; i < len(value); { - var must_write bool - switch value[i] { - case ';', '/', '?', ':', '@', '&', '=', '+', '$', ',', '_', '.', '~', '*', '\'', '(', ')', '[', ']': - must_write = true - default: - must_write = is_alpha(value, i) - } - if must_write { - if !write(emitter, value, &i) { - return false - } - } else { - w := width(value[i]) - for k := 0; k < w; k++ { - octet := value[i] - i++ - if !put(emitter, '%') { - return false - } - - c := octet >> 4 - if c < 10 { - c += '0' - } else { - c += 'A' - 10 - } - if !put(emitter, c) { - return false - } - - c = octet & 0x0f - if c < 10 { - c += '0' - } else { - c += 'A' - 10 - } - if !put(emitter, c) { - return false - } - } - } - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_plain_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { - if !emitter.whitespace { - if !put(emitter, ' ') { - return false - } - } - - spaces := false - breaks := false - for i := 0; i < len(value); { - if is_space(value, i) { - if allow_breaks && !spaces && emitter.column > emitter.best_width && !is_space(value, i+1) { - if !yaml_emitter_write_indent(emitter) { - return false - } - i += width(value[i]) - } else { - if !write(emitter, value, &i) { - return false - } - } - spaces = true - } else if is_break(value, i) { - if !breaks && value[i] == '\n' { - if !put_break(emitter) { - return false - } - } - if !write_break(emitter, value, &i) { - return false - } - emitter.indention = true - breaks = true - } else { - if breaks { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !write(emitter, value, &i) { - return false - } - emitter.indention = false - spaces = false - breaks = false - } - } - - emitter.whitespace = false - emitter.indention = false - if emitter.root_context { - emitter.open_ended = true - } - - return true -} - -func yaml_emitter_write_single_quoted_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { - - if !yaml_emitter_write_indicator(emitter, []byte{'\''}, true, false, false) { - return false - } - - spaces := false - breaks := false - for i := 0; i < len(value); { - if is_space(value, i) { - if allow_breaks && !spaces && emitter.column > emitter.best_width && i > 0 && i < len(value)-1 && !is_space(value, i+1) { - if !yaml_emitter_write_indent(emitter) { - return false - } - i += width(value[i]) - } else { - if !write(emitter, value, &i) { - return false - } - } - spaces = true - } else if is_break(value, i) { - if !breaks && value[i] == '\n' { - if !put_break(emitter) { - return false - } - } - if !write_break(emitter, value, &i) { - return false - } - emitter.indention = true - breaks = true - } else { - if breaks { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if value[i] == '\'' { - if !put(emitter, '\'') { - return false - } - } - if !write(emitter, value, &i) { - return false - } - emitter.indention = false - spaces = false - breaks = false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{'\''}, false, false, false) { - return false - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_double_quoted_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { - spaces := false - if !yaml_emitter_write_indicator(emitter, []byte{'"'}, true, false, false) { - return false - } - - for i := 0; i < len(value); { - if !is_printable(value, i) || (!emitter.unicode && !is_ascii(value, i)) || - is_bom(value, i) || is_break(value, i) || - value[i] == '"' || value[i] == '\\' { - - octet := value[i] - - var w int - var v rune - switch { - case octet&0x80 == 0x00: - w, v = 1, rune(octet&0x7F) - case octet&0xE0 == 0xC0: - w, v = 2, rune(octet&0x1F) - case octet&0xF0 == 0xE0: - w, v = 3, rune(octet&0x0F) - case octet&0xF8 == 0xF0: - w, v = 4, rune(octet&0x07) - } - for k := 1; k < w; k++ { - octet = value[i+k] - v = (v << 6) + (rune(octet) & 0x3F) - } - i += w - - if !put(emitter, '\\') { - return false - } - - var ok bool - switch v { - case 0x00: - ok = put(emitter, '0') - case 0x07: - ok = put(emitter, 'a') - case 0x08: - ok = put(emitter, 'b') - case 0x09: - ok = put(emitter, 't') - case 0x0A: - ok = put(emitter, 'n') - case 0x0b: - ok = put(emitter, 'v') - case 0x0c: - ok = put(emitter, 'f') - case 0x0d: - ok = put(emitter, 'r') - case 0x1b: - ok = put(emitter, 'e') - case 0x22: - ok = put(emitter, '"') - case 0x5c: - ok = put(emitter, '\\') - case 0x85: - ok = put(emitter, 'N') - case 0xA0: - ok = put(emitter, '_') - case 0x2028: - ok = put(emitter, 'L') - case 0x2029: - ok = put(emitter, 'P') - default: - if v <= 0xFF { - ok = put(emitter, 'x') - w = 2 - } else if v <= 0xFFFF { - ok = put(emitter, 'u') - w = 4 - } else { - ok = put(emitter, 'U') - w = 8 - } - for k := (w - 1) * 4; ok && k >= 0; k -= 4 { - digit := byte((v >> uint(k)) & 0x0F) - if digit < 10 { - ok = put(emitter, digit+'0') - } else { - ok = put(emitter, digit+'A'-10) - } - } - } - if !ok { - return false - } - spaces = false - } else if is_space(value, i) { - if allow_breaks && !spaces && emitter.column > emitter.best_width && i > 0 && i < len(value)-1 { - if !yaml_emitter_write_indent(emitter) { - return false - } - if is_space(value, i+1) { - if !put(emitter, '\\') { - return false - } - } - i += width(value[i]) - } else if !write(emitter, value, &i) { - return false - } - spaces = true - } else { - if !write(emitter, value, &i) { - return false - } - spaces = false - } - } - if !yaml_emitter_write_indicator(emitter, []byte{'"'}, false, false, false) { - return false - } - emitter.whitespace = false - emitter.indention = false - return true -} - -func yaml_emitter_write_block_scalar_hints(emitter *yaml_emitter_t, value []byte) bool { - if is_space(value, 0) || is_break(value, 0) { - indent_hint := []byte{'0' + byte(emitter.best_indent)} - if !yaml_emitter_write_indicator(emitter, indent_hint, false, false, false) { - return false - } - } - - emitter.open_ended = false - - var chomp_hint [1]byte - if len(value) == 0 { - chomp_hint[0] = '-' - } else { - i := len(value) - 1 - for value[i]&0xC0 == 0x80 { - i-- - } - if !is_break(value, i) { - chomp_hint[0] = '-' - } else if i == 0 { - chomp_hint[0] = '+' - emitter.open_ended = true - } else { - i-- - for value[i]&0xC0 == 0x80 { - i-- - } - if is_break(value, i) { - chomp_hint[0] = '+' - emitter.open_ended = true - } - } - } - if chomp_hint[0] != 0 { - if !yaml_emitter_write_indicator(emitter, chomp_hint[:], false, false, false) { - return false - } - } - return true -} - -func yaml_emitter_write_literal_scalar(emitter *yaml_emitter_t, value []byte) bool { - if !yaml_emitter_write_indicator(emitter, []byte{'|'}, true, false, false) { - return false - } - if !yaml_emitter_write_block_scalar_hints(emitter, value) { - return false - } - if !put_break(emitter) { - return false - } - emitter.indention = true - emitter.whitespace = true - breaks := true - for i := 0; i < len(value); { - if is_break(value, i) { - if !write_break(emitter, value, &i) { - return false - } - emitter.indention = true - breaks = true - } else { - if breaks { - if !yaml_emitter_write_indent(emitter) { - return false - } - } - if !write(emitter, value, &i) { - return false - } - emitter.indention = false - breaks = false - } - } - - return true -} - -func yaml_emitter_write_folded_scalar(emitter *yaml_emitter_t, value []byte) bool { - if !yaml_emitter_write_indicator(emitter, []byte{'>'}, true, false, false) { - return false - } - if !yaml_emitter_write_block_scalar_hints(emitter, value) { - return false - } - - if !put_break(emitter) { - return false - } - emitter.indention = true - emitter.whitespace = true - - breaks := true - leading_spaces := true - for i := 0; i < len(value); { - if is_break(value, i) { - if !breaks && !leading_spaces && value[i] == '\n' { - k := 0 - for is_break(value, k) { - k += width(value[k]) - } - if !is_blankz(value, k) { - if !put_break(emitter) { - return false - } - } - } - if !write_break(emitter, value, &i) { - return false - } - emitter.indention = true - breaks = true - } else { - if breaks { - if !yaml_emitter_write_indent(emitter) { - return false - } - leading_spaces = is_blank(value, i) - } - if !breaks && is_space(value, i) && !is_space(value, i+1) && emitter.column > emitter.best_width { - if !yaml_emitter_write_indent(emitter) { - return false - } - i += width(value[i]) - } else { - if !write(emitter, value, &i) { - return false - } - } - emitter.indention = false - breaks = false - } - } - return true -} diff --git a/third_party/src/gopkg.in/yaml.v2/encode.go b/third_party/src/gopkg.in/yaml.v2/encode.go deleted file mode 100644 index 84f8499..0000000 --- a/third_party/src/gopkg.in/yaml.v2/encode.go +++ /dev/null @@ -1,306 +0,0 @@ -package yaml - -import ( - "encoding" - "fmt" - "reflect" - "regexp" - "sort" - "strconv" - "strings" - "time" -) - -type encoder struct { - emitter yaml_emitter_t - event yaml_event_t - out []byte - flow bool -} - -func newEncoder() (e *encoder) { - e = &encoder{} - e.must(yaml_emitter_initialize(&e.emitter)) - yaml_emitter_set_output_string(&e.emitter, &e.out) - yaml_emitter_set_unicode(&e.emitter, true) - e.must(yaml_stream_start_event_initialize(&e.event, yaml_UTF8_ENCODING)) - e.emit() - e.must(yaml_document_start_event_initialize(&e.event, nil, nil, true)) - e.emit() - return e -} - -func (e *encoder) finish() { - e.must(yaml_document_end_event_initialize(&e.event, true)) - e.emit() - e.emitter.open_ended = false - e.must(yaml_stream_end_event_initialize(&e.event)) - e.emit() -} - -func (e *encoder) destroy() { - yaml_emitter_delete(&e.emitter) -} - -func (e *encoder) emit() { - // This will internally delete the e.event value. - if !yaml_emitter_emit(&e.emitter, &e.event) && e.event.typ != yaml_DOCUMENT_END_EVENT && e.event.typ != yaml_STREAM_END_EVENT { - e.must(false) - } -} - -func (e *encoder) must(ok bool) { - if !ok { - msg := e.emitter.problem - if msg == "" { - msg = "unknown problem generating YAML content" - } - failf("%s", msg) - } -} - -func (e *encoder) marshal(tag string, in reflect.Value) { - if !in.IsValid() { - e.nilv() - return - } - iface := in.Interface() - if m, ok := iface.(Marshaler); ok { - v, err := m.MarshalYAML() - if err != nil { - fail(err) - } - if v == nil { - e.nilv() - return - } - in = reflect.ValueOf(v) - } else if m, ok := iface.(encoding.TextMarshaler); ok { - text, err := m.MarshalText() - if err != nil { - fail(err) - } - in = reflect.ValueOf(string(text)) - } - switch in.Kind() { - case reflect.Interface: - if in.IsNil() { - e.nilv() - } else { - e.marshal(tag, in.Elem()) - } - case reflect.Map: - e.mapv(tag, in) - case reflect.Ptr: - if in.IsNil() { - e.nilv() - } else { - e.marshal(tag, in.Elem()) - } - case reflect.Struct: - e.structv(tag, in) - case reflect.Slice: - if in.Type().Elem() == mapItemType { - e.itemsv(tag, in) - } else { - e.slicev(tag, in) - } - case reflect.String: - e.stringv(tag, in) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - if in.Type() == durationType { - e.stringv(tag, reflect.ValueOf(iface.(time.Duration).String())) - } else { - e.intv(tag, in) - } - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - e.uintv(tag, in) - case reflect.Float32, reflect.Float64: - e.floatv(tag, in) - case reflect.Bool: - e.boolv(tag, in) - default: - panic("cannot marshal type: " + in.Type().String()) - } -} - -func (e *encoder) mapv(tag string, in reflect.Value) { - e.mappingv(tag, func() { - keys := keyList(in.MapKeys()) - sort.Sort(keys) - for _, k := range keys { - e.marshal("", k) - e.marshal("", in.MapIndex(k)) - } - }) -} - -func (e *encoder) itemsv(tag string, in reflect.Value) { - e.mappingv(tag, func() { - slice := in.Convert(reflect.TypeOf([]MapItem{})).Interface().([]MapItem) - for _, item := range slice { - e.marshal("", reflect.ValueOf(item.Key)) - e.marshal("", reflect.ValueOf(item.Value)) - } - }) -} - -func (e *encoder) structv(tag string, in reflect.Value) { - sinfo, err := getStructInfo(in.Type()) - if err != nil { - panic(err) - } - e.mappingv(tag, func() { - for _, info := range sinfo.FieldsList { - var value reflect.Value - if info.Inline == nil { - value = in.Field(info.Num) - } else { - value = in.FieldByIndex(info.Inline) - } - if info.OmitEmpty && isZero(value) { - continue - } - e.marshal("", reflect.ValueOf(info.Key)) - e.flow = info.Flow - e.marshal("", value) - } - if sinfo.InlineMap >= 0 { - m := in.Field(sinfo.InlineMap) - if m.Len() > 0 { - e.flow = false - keys := keyList(m.MapKeys()) - sort.Sort(keys) - for _, k := range keys { - if _, found := sinfo.FieldsMap[k.String()]; found { - panic(fmt.Sprintf("Can't have key %q in inlined map; conflicts with struct field", k.String())) - } - e.marshal("", k) - e.flow = false - e.marshal("", m.MapIndex(k)) - } - } - } - }) -} - -func (e *encoder) mappingv(tag string, f func()) { - implicit := tag == "" - style := yaml_BLOCK_MAPPING_STYLE - if e.flow { - e.flow = false - style = yaml_FLOW_MAPPING_STYLE - } - e.must(yaml_mapping_start_event_initialize(&e.event, nil, []byte(tag), implicit, style)) - e.emit() - f() - e.must(yaml_mapping_end_event_initialize(&e.event)) - e.emit() -} - -func (e *encoder) slicev(tag string, in reflect.Value) { - implicit := tag == "" - style := yaml_BLOCK_SEQUENCE_STYLE - if e.flow { - e.flow = false - style = yaml_FLOW_SEQUENCE_STYLE - } - e.must(yaml_sequence_start_event_initialize(&e.event, nil, []byte(tag), implicit, style)) - e.emit() - n := in.Len() - for i := 0; i < n; i++ { - e.marshal("", in.Index(i)) - } - e.must(yaml_sequence_end_event_initialize(&e.event)) - e.emit() -} - -// isBase60 returns whether s is in base 60 notation as defined in YAML 1.1. -// -// The base 60 float notation in YAML 1.1 is a terrible idea and is unsupported -// in YAML 1.2 and by this package, but these should be marshalled quoted for -// the time being for compatibility with other parsers. -func isBase60Float(s string) (result bool) { - // Fast path. - if s == "" { - return false - } - c := s[0] - if !(c == '+' || c == '-' || c >= '0' && c <= '9') || strings.IndexByte(s, ':') < 0 { - return false - } - // Do the full match. - return base60float.MatchString(s) -} - -// From http://yaml.org/type/float.html, except the regular expression there -// is bogus. In practice parsers do not enforce the "\.[0-9_]*" suffix. -var base60float = regexp.MustCompile(`^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+(?:\.[0-9_]*)?$`) - -func (e *encoder) stringv(tag string, in reflect.Value) { - var style yaml_scalar_style_t - s := in.String() - rtag, rs := resolve("", s) - if rtag == yaml_BINARY_TAG { - if tag == "" || tag == yaml_STR_TAG { - tag = rtag - s = rs.(string) - } else if tag == yaml_BINARY_TAG { - failf("explicitly tagged !!binary data must be base64-encoded") - } else { - failf("cannot marshal invalid UTF-8 data as %s", shortTag(tag)) - } - } - if tag == "" && (rtag != yaml_STR_TAG || isBase60Float(s)) { - style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } else if strings.Contains(s, "\n") { - style = yaml_LITERAL_SCALAR_STYLE - } else { - style = yaml_PLAIN_SCALAR_STYLE - } - e.emitScalar(s, "", tag, style) -} - -func (e *encoder) boolv(tag string, in reflect.Value) { - var s string - if in.Bool() { - s = "true" - } else { - s = "false" - } - e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) -} - -func (e *encoder) intv(tag string, in reflect.Value) { - s := strconv.FormatInt(in.Int(), 10) - e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) -} - -func (e *encoder) uintv(tag string, in reflect.Value) { - s := strconv.FormatUint(in.Uint(), 10) - e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) -} - -func (e *encoder) floatv(tag string, in reflect.Value) { - // FIXME: Handle 64 bits here. - s := strconv.FormatFloat(float64(in.Float()), 'g', -1, 32) - switch s { - case "+Inf": - s = ".inf" - case "-Inf": - s = "-.inf" - case "NaN": - s = ".nan" - } - e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) -} - -func (e *encoder) nilv() { - e.emitScalar("null", "", "", yaml_PLAIN_SCALAR_STYLE) -} - -func (e *encoder) emitScalar(value, anchor, tag string, style yaml_scalar_style_t) { - implicit := tag == "" - e.must(yaml_scalar_event_initialize(&e.event, []byte(anchor), []byte(tag), []byte(value), implicit, implicit, style)) - e.emit() -} diff --git a/third_party/src/gopkg.in/yaml.v2/encode_test.go b/third_party/src/gopkg.in/yaml.v2/encode_test.go deleted file mode 100644 index 84099bd..0000000 --- a/third_party/src/gopkg.in/yaml.v2/encode_test.go +++ /dev/null @@ -1,501 +0,0 @@ -package yaml_test - -import ( - "fmt" - "math" - "strconv" - "strings" - "time" - - . "gopkg.in/check.v1" - "gopkg.in/yaml.v2" - "net" - "os" -) - -var marshalIntTest = 123 - -var marshalTests = []struct { - value interface{} - data string -}{ - { - nil, - "null\n", - }, { - &struct{}{}, - "{}\n", - }, { - map[string]string{"v": "hi"}, - "v: hi\n", - }, { - map[string]interface{}{"v": "hi"}, - "v: hi\n", - }, { - map[string]string{"v": "true"}, - "v: \"true\"\n", - }, { - map[string]string{"v": "false"}, - "v: \"false\"\n", - }, { - map[string]interface{}{"v": true}, - "v: true\n", - }, { - map[string]interface{}{"v": false}, - "v: false\n", - }, { - map[string]interface{}{"v": 10}, - "v: 10\n", - }, { - map[string]interface{}{"v": -10}, - "v: -10\n", - }, { - map[string]uint{"v": 42}, - "v: 42\n", - }, { - map[string]interface{}{"v": int64(4294967296)}, - "v: 4294967296\n", - }, { - map[string]int64{"v": int64(4294967296)}, - "v: 4294967296\n", - }, { - map[string]uint64{"v": 4294967296}, - "v: 4294967296\n", - }, { - map[string]interface{}{"v": "10"}, - "v: \"10\"\n", - }, { - map[string]interface{}{"v": 0.1}, - "v: 0.1\n", - }, { - map[string]interface{}{"v": float64(0.1)}, - "v: 0.1\n", - }, { - map[string]interface{}{"v": -0.1}, - "v: -0.1\n", - }, { - map[string]interface{}{"v": math.Inf(+1)}, - "v: .inf\n", - }, { - map[string]interface{}{"v": math.Inf(-1)}, - "v: -.inf\n", - }, { - map[string]interface{}{"v": math.NaN()}, - "v: .nan\n", - }, { - map[string]interface{}{"v": nil}, - "v: null\n", - }, { - map[string]interface{}{"v": ""}, - "v: \"\"\n", - }, { - map[string][]string{"v": []string{"A", "B"}}, - "v:\n- A\n- B\n", - }, { - map[string][]string{"v": []string{"A", "B\nC"}}, - "v:\n- A\n- |-\n B\n C\n", - }, { - map[string][]interface{}{"v": []interface{}{"A", 1, map[string][]int{"B": []int{2, 3}}}}, - "v:\n- A\n- 1\n- B:\n - 2\n - 3\n", - }, { - map[string]interface{}{"a": map[interface{}]interface{}{"b": "c"}}, - "a:\n b: c\n", - }, { - map[string]interface{}{"a": "-"}, - "a: '-'\n", - }, - - // Simple values. - { - &marshalIntTest, - "123\n", - }, - - // Structures - { - &struct{ Hello string }{"world"}, - "hello: world\n", - }, { - &struct { - A struct { - B string - } - }{struct{ B string }{"c"}}, - "a:\n b: c\n", - }, { - &struct { - A *struct { - B string - } - }{&struct{ B string }{"c"}}, - "a:\n b: c\n", - }, { - &struct { - A *struct { - B string - } - }{}, - "a: null\n", - }, { - &struct{ A int }{1}, - "a: 1\n", - }, { - &struct{ A []int }{[]int{1, 2}}, - "a:\n- 1\n- 2\n", - }, { - &struct { - B int "a" - }{1}, - "a: 1\n", - }, { - &struct{ A bool }{true}, - "a: true\n", - }, - - // Conditional flag - { - &struct { - A int "a,omitempty" - B int "b,omitempty" - }{1, 0}, - "a: 1\n", - }, { - &struct { - A int "a,omitempty" - B int "b,omitempty" - }{0, 0}, - "{}\n", - }, { - &struct { - A *struct{ X, y int } "a,omitempty,flow" - }{&struct{ X, y int }{1, 2}}, - "a: {x: 1}\n", - }, { - &struct { - A *struct{ X, y int } "a,omitempty,flow" - }{nil}, - "{}\n", - }, { - &struct { - A *struct{ X, y int } "a,omitempty,flow" - }{&struct{ X, y int }{}}, - "a: {x: 0}\n", - }, { - &struct { - A struct{ X, y int } "a,omitempty,flow" - }{struct{ X, y int }{1, 2}}, - "a: {x: 1}\n", - }, { - &struct { - A struct{ X, y int } "a,omitempty,flow" - }{struct{ X, y int }{0, 1}}, - "{}\n", - }, { - &struct { - A float64 "a,omitempty" - B float64 "b,omitempty" - }{1, 0}, - "a: 1\n", - }, - - // Flow flag - { - &struct { - A []int "a,flow" - }{[]int{1, 2}}, - "a: [1, 2]\n", - }, { - &struct { - A map[string]string "a,flow" - }{map[string]string{"b": "c", "d": "e"}}, - "a: {b: c, d: e}\n", - }, { - &struct { - A struct { - B, D string - } "a,flow" - }{struct{ B, D string }{"c", "e"}}, - "a: {b: c, d: e}\n", - }, - - // Unexported field - { - &struct { - u int - A int - }{0, 1}, - "a: 1\n", - }, - - // Ignored field - { - &struct { - A int - B int "-" - }{1, 2}, - "a: 1\n", - }, - - // Struct inlining - { - &struct { - A int - C inlineB `yaml:",inline"` - }{1, inlineB{2, inlineC{3}}}, - "a: 1\nb: 2\nc: 3\n", - }, - - // Map inlining - { - &struct { - A int - C map[string]int `yaml:",inline"` - }{1, map[string]int{"b": 2, "c": 3}}, - "a: 1\nb: 2\nc: 3\n", - }, - - // Duration - { - map[string]time.Duration{"a": 3 * time.Second}, - "a: 3s\n", - }, - - // Issue #24: bug in map merging logic. - { - map[string]string{"a": ""}, - "a: \n", - }, - - // Issue #34: marshal unsupported base 60 floats quoted for compatibility - // with old YAML 1.1 parsers. - { - map[string]string{"a": "1:1"}, - "a: \"1:1\"\n", - }, - - // Binary data. - { - map[string]string{"a": "\x00"}, - "a: \"\\0\"\n", - }, { - map[string]string{"a": "\x80\x81\x82"}, - "a: !!binary gIGC\n", - }, { - map[string]string{"a": strings.Repeat("\x90", 54)}, - "a: !!binary |\n " + strings.Repeat("kJCQ", 17) + "kJ\n CQ\n", - }, - - // Ordered maps. - { - &yaml.MapSlice{{"b", 2}, {"a", 1}, {"d", 4}, {"c", 3}, {"sub", yaml.MapSlice{{"e", 5}}}}, - "b: 2\na: 1\nd: 4\nc: 3\nsub:\n e: 5\n", - }, - - // Encode unicode as utf-8 rather than in escaped form. - { - map[string]string{"a": "你好"}, - "a: 你好\n", - }, - - // Support encoding.TextMarshaler. - { - map[string]net.IP{"a": net.IPv4(1, 2, 3, 4)}, - "a: 1.2.3.4\n", - }, - { - map[string]time.Time{"a": time.Unix(1424801979, 0)}, - "a: 2015-02-24T18:19:39Z\n", - }, - - // Ensure strings containing ": " are quoted (reported as PR #43, but not reproducible). - { - map[string]string{"a": "b: c"}, - "a: 'b: c'\n", - }, - - // Containing hash mark ('#') in string should be quoted - { - map[string]string{"a": "Hello #comment"}, - "a: 'Hello #comment'\n", - }, - { - map[string]string{"a": "你好 #comment"}, - "a: '你好 #comment'\n", - }, -} - -func (s *S) TestMarshal(c *C) { - defer os.Setenv("TZ", os.Getenv("TZ")) - os.Setenv("TZ", "UTC") - for _, item := range marshalTests { - data, err := yaml.Marshal(item.value) - c.Assert(err, IsNil) - c.Assert(string(data), Equals, item.data) - } -} - -var marshalErrorTests = []struct { - value interface{} - error string - panic string -}{{ - value: &struct { - B int - inlineB ",inline" - }{1, inlineB{2, inlineC{3}}}, - panic: `Duplicated key 'b' in struct struct \{ B int; .*`, -}, { - value: &struct { - A int - B map[string]int ",inline" - }{1, map[string]int{"a": 2}}, - panic: `Can't have key "a" in inlined map; conflicts with struct field`, -}} - -func (s *S) TestMarshalErrors(c *C) { - for _, item := range marshalErrorTests { - if item.panic != "" { - c.Assert(func() { yaml.Marshal(item.value) }, PanicMatches, item.panic) - } else { - _, err := yaml.Marshal(item.value) - c.Assert(err, ErrorMatches, item.error) - } - } -} - -func (s *S) TestMarshalTypeCache(c *C) { - var data []byte - var err error - func() { - type T struct{ A int } - data, err = yaml.Marshal(&T{}) - c.Assert(err, IsNil) - }() - func() { - type T struct{ B int } - data, err = yaml.Marshal(&T{}) - c.Assert(err, IsNil) - }() - c.Assert(string(data), Equals, "b: 0\n") -} - -var marshalerTests = []struct { - data string - value interface{} -}{ - {"_:\n hi: there\n", map[interface{}]interface{}{"hi": "there"}}, - {"_:\n- 1\n- A\n", []interface{}{1, "A"}}, - {"_: 10\n", 10}, - {"_: null\n", nil}, - {"_: BAR!\n", "BAR!"}, -} - -type marshalerType struct { - value interface{} -} - -func (o marshalerType) MarshalText() ([]byte, error) { - panic("MarshalText called on type with MarshalYAML") -} - -func (o marshalerType) MarshalYAML() (interface{}, error) { - return o.value, nil -} - -type marshalerValue struct { - Field marshalerType "_" -} - -func (s *S) TestMarshaler(c *C) { - for _, item := range marshalerTests { - obj := &marshalerValue{} - obj.Field.value = item.value - data, err := yaml.Marshal(obj) - c.Assert(err, IsNil) - c.Assert(string(data), Equals, string(item.data)) - } -} - -func (s *S) TestMarshalerWholeDocument(c *C) { - obj := &marshalerType{} - obj.value = map[string]string{"hello": "world!"} - data, err := yaml.Marshal(obj) - c.Assert(err, IsNil) - c.Assert(string(data), Equals, "hello: world!\n") -} - -type failingMarshaler struct{} - -func (ft *failingMarshaler) MarshalYAML() (interface{}, error) { - return nil, failingErr -} - -func (s *S) TestMarshalerError(c *C) { - _, err := yaml.Marshal(&failingMarshaler{}) - c.Assert(err, Equals, failingErr) -} - -func (s *S) TestSortedOutput(c *C) { - order := []interface{}{ - false, - true, - 1, - uint(1), - 1.0, - 1.1, - 1.2, - 2, - uint(2), - 2.0, - 2.1, - "", - ".1", - ".2", - ".a", - "1", - "2", - "a!10", - "a/2", - "a/10", - "a~10", - "ab/1", - "b/1", - "b/01", - "b/2", - "b/02", - "b/3", - "b/03", - "b1", - "b01", - "b3", - "c2.10", - "c10.2", - "d1", - "d12", - "d12a", - } - m := make(map[interface{}]int) - for _, k := range order { - m[k] = 1 - } - data, err := yaml.Marshal(m) - c.Assert(err, IsNil) - out := "\n" + string(data) - last := 0 - for i, k := range order { - repr := fmt.Sprint(k) - if s, ok := k.(string); ok { - if _, err = strconv.ParseFloat(repr, 32); s == "" || err == nil { - repr = `"` + repr + `"` - } - } - index := strings.Index(out, "\n"+repr+":") - if index == -1 { - c.Fatalf("%#v is not in the output: %#v", k, out) - } - if index < last { - c.Fatalf("%#v was generated before %#v: %q", k, order[i-1], out) - } - last = index - } -} diff --git a/third_party/src/gopkg.in/yaml.v2/parserc.go b/third_party/src/gopkg.in/yaml.v2/parserc.go deleted file mode 100644 index 0a7037a..0000000 --- a/third_party/src/gopkg.in/yaml.v2/parserc.go +++ /dev/null @@ -1,1096 +0,0 @@ -package yaml - -import ( - "bytes" -) - -// The parser implements the following grammar: -// -// stream ::= STREAM-START implicit_document? explicit_document* STREAM-END -// implicit_document ::= block_node DOCUMENT-END* -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// block_node_or_indentless_sequence ::= -// ALIAS -// | properties (block_content | indentless_block_sequence)? -// | block_content -// | indentless_block_sequence -// block_node ::= ALIAS -// | properties block_content? -// | block_content -// flow_node ::= ALIAS -// | properties flow_content? -// | flow_content -// properties ::= TAG ANCHOR? | ANCHOR TAG? -// block_content ::= block_collection | flow_collection | SCALAR -// flow_content ::= flow_collection | SCALAR -// block_collection ::= block_sequence | block_mapping -// flow_collection ::= flow_sequence | flow_mapping -// block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END -// indentless_sequence ::= (BLOCK-ENTRY block_node?)+ -// block_mapping ::= BLOCK-MAPPING_START -// ((KEY block_node_or_indentless_sequence?)? -// (VALUE block_node_or_indentless_sequence?)?)* -// BLOCK-END -// flow_sequence ::= FLOW-SEQUENCE-START -// (flow_sequence_entry FLOW-ENTRY)* -// flow_sequence_entry? -// FLOW-SEQUENCE-END -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// flow_mapping ::= FLOW-MAPPING-START -// (flow_mapping_entry FLOW-ENTRY)* -// flow_mapping_entry? -// FLOW-MAPPING-END -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? - -// Peek the next token in the token queue. -func peek_token(parser *yaml_parser_t) *yaml_token_t { - if parser.token_available || yaml_parser_fetch_more_tokens(parser) { - return &parser.tokens[parser.tokens_head] - } - return nil -} - -// Remove the next token from the queue (must be called after peek_token). -func skip_token(parser *yaml_parser_t) { - parser.token_available = false - parser.tokens_parsed++ - parser.stream_end_produced = parser.tokens[parser.tokens_head].typ == yaml_STREAM_END_TOKEN - parser.tokens_head++ -} - -// Get the next event. -func yaml_parser_parse(parser *yaml_parser_t, event *yaml_event_t) bool { - // Erase the event object. - *event = yaml_event_t{} - - // No events after the end of the stream or error. - if parser.stream_end_produced || parser.error != yaml_NO_ERROR || parser.state == yaml_PARSE_END_STATE { - return true - } - - // Generate the next event. - return yaml_parser_state_machine(parser, event) -} - -// Set parser error. -func yaml_parser_set_parser_error(parser *yaml_parser_t, problem string, problem_mark yaml_mark_t) bool { - parser.error = yaml_PARSER_ERROR - parser.problem = problem - parser.problem_mark = problem_mark - return false -} - -func yaml_parser_set_parser_error_context(parser *yaml_parser_t, context string, context_mark yaml_mark_t, problem string, problem_mark yaml_mark_t) bool { - parser.error = yaml_PARSER_ERROR - parser.context = context - parser.context_mark = context_mark - parser.problem = problem - parser.problem_mark = problem_mark - return false -} - -// State dispatcher. -func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool { - //trace("yaml_parser_state_machine", "state:", parser.state.String()) - - switch parser.state { - case yaml_PARSE_STREAM_START_STATE: - return yaml_parser_parse_stream_start(parser, event) - - case yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE: - return yaml_parser_parse_document_start(parser, event, true) - - case yaml_PARSE_DOCUMENT_START_STATE: - return yaml_parser_parse_document_start(parser, event, false) - - case yaml_PARSE_DOCUMENT_CONTENT_STATE: - return yaml_parser_parse_document_content(parser, event) - - case yaml_PARSE_DOCUMENT_END_STATE: - return yaml_parser_parse_document_end(parser, event) - - case yaml_PARSE_BLOCK_NODE_STATE: - return yaml_parser_parse_node(parser, event, true, false) - - case yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE: - return yaml_parser_parse_node(parser, event, true, true) - - case yaml_PARSE_FLOW_NODE_STATE: - return yaml_parser_parse_node(parser, event, false, false) - - case yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE: - return yaml_parser_parse_block_sequence_entry(parser, event, true) - - case yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE: - return yaml_parser_parse_block_sequence_entry(parser, event, false) - - case yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE: - return yaml_parser_parse_indentless_sequence_entry(parser, event) - - case yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE: - return yaml_parser_parse_block_mapping_key(parser, event, true) - - case yaml_PARSE_BLOCK_MAPPING_KEY_STATE: - return yaml_parser_parse_block_mapping_key(parser, event, false) - - case yaml_PARSE_BLOCK_MAPPING_VALUE_STATE: - return yaml_parser_parse_block_mapping_value(parser, event) - - case yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE: - return yaml_parser_parse_flow_sequence_entry(parser, event, true) - - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE: - return yaml_parser_parse_flow_sequence_entry(parser, event, false) - - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE: - return yaml_parser_parse_flow_sequence_entry_mapping_key(parser, event) - - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE: - return yaml_parser_parse_flow_sequence_entry_mapping_value(parser, event) - - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE: - return yaml_parser_parse_flow_sequence_entry_mapping_end(parser, event) - - case yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE: - return yaml_parser_parse_flow_mapping_key(parser, event, true) - - case yaml_PARSE_FLOW_MAPPING_KEY_STATE: - return yaml_parser_parse_flow_mapping_key(parser, event, false) - - case yaml_PARSE_FLOW_MAPPING_VALUE_STATE: - return yaml_parser_parse_flow_mapping_value(parser, event, false) - - case yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE: - return yaml_parser_parse_flow_mapping_value(parser, event, true) - - default: - panic("invalid parser state") - } - return false -} - -// Parse the production: -// stream ::= STREAM-START implicit_document? explicit_document* STREAM-END -// ************ -func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_STREAM_START_TOKEN { - return yaml_parser_set_parser_error(parser, "did not find expected ", token.start_mark) - } - parser.state = yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE - *event = yaml_event_t{ - typ: yaml_STREAM_START_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - encoding: token.encoding, - } - skip_token(parser) - return true -} - -// Parse the productions: -// implicit_document ::= block_node DOCUMENT-END* -// * -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// ************************* -func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t, implicit bool) bool { - - token := peek_token(parser) - if token == nil { - return false - } - - // Parse extra document end indicators. - if !implicit { - for token.typ == yaml_DOCUMENT_END_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } - } - - if implicit && token.typ != yaml_VERSION_DIRECTIVE_TOKEN && - token.typ != yaml_TAG_DIRECTIVE_TOKEN && - token.typ != yaml_DOCUMENT_START_TOKEN && - token.typ != yaml_STREAM_END_TOKEN { - // Parse an implicit document. - if !yaml_parser_process_directives(parser, nil, nil) { - return false - } - parser.states = append(parser.states, yaml_PARSE_DOCUMENT_END_STATE) - parser.state = yaml_PARSE_BLOCK_NODE_STATE - - *event = yaml_event_t{ - typ: yaml_DOCUMENT_START_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - - } else if token.typ != yaml_STREAM_END_TOKEN { - // Parse an explicit document. - var version_directive *yaml_version_directive_t - var tag_directives []yaml_tag_directive_t - start_mark := token.start_mark - if !yaml_parser_process_directives(parser, &version_directive, &tag_directives) { - return false - } - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_DOCUMENT_START_TOKEN { - yaml_parser_set_parser_error(parser, - "did not find expected ", token.start_mark) - return false - } - parser.states = append(parser.states, yaml_PARSE_DOCUMENT_END_STATE) - parser.state = yaml_PARSE_DOCUMENT_CONTENT_STATE - end_mark := token.end_mark - - *event = yaml_event_t{ - typ: yaml_DOCUMENT_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - version_directive: version_directive, - tag_directives: tag_directives, - implicit: false, - } - skip_token(parser) - - } else { - // Parse the stream end. - parser.state = yaml_PARSE_END_STATE - *event = yaml_event_t{ - typ: yaml_STREAM_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - skip_token(parser) - } - - return true -} - -// Parse the productions: -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// *********** -// -func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - if token.typ == yaml_VERSION_DIRECTIVE_TOKEN || - token.typ == yaml_TAG_DIRECTIVE_TOKEN || - token.typ == yaml_DOCUMENT_START_TOKEN || - token.typ == yaml_DOCUMENT_END_TOKEN || - token.typ == yaml_STREAM_END_TOKEN { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - return yaml_parser_process_empty_scalar(parser, event, - token.start_mark) - } - return yaml_parser_parse_node(parser, event, true, false) -} - -// Parse the productions: -// implicit_document ::= block_node DOCUMENT-END* -// ************* -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// -func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - - start_mark := token.start_mark - end_mark := token.start_mark - - implicit := true - if token.typ == yaml_DOCUMENT_END_TOKEN { - end_mark = token.end_mark - skip_token(parser) - implicit = false - } - - parser.tag_directives = parser.tag_directives[:0] - - parser.state = yaml_PARSE_DOCUMENT_START_STATE - *event = yaml_event_t{ - typ: yaml_DOCUMENT_END_EVENT, - start_mark: start_mark, - end_mark: end_mark, - implicit: implicit, - } - return true -} - -// Parse the productions: -// block_node_or_indentless_sequence ::= -// ALIAS -// ***** -// | properties (block_content | indentless_block_sequence)? -// ********** * -// | block_content | indentless_block_sequence -// * -// block_node ::= ALIAS -// ***** -// | properties block_content? -// ********** * -// | block_content -// * -// flow_node ::= ALIAS -// ***** -// | properties flow_content? -// ********** * -// | flow_content -// * -// properties ::= TAG ANCHOR? | ANCHOR TAG? -// ************************* -// block_content ::= block_collection | flow_collection | SCALAR -// ****** -// flow_content ::= flow_collection | SCALAR -// ****** -func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, indentless_sequence bool) bool { - //defer trace("yaml_parser_parse_node", "block:", block, "indentless_sequence:", indentless_sequence)() - - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ == yaml_ALIAS_TOKEN { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - *event = yaml_event_t{ - typ: yaml_ALIAS_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - anchor: token.value, - } - skip_token(parser) - return true - } - - start_mark := token.start_mark - end_mark := token.start_mark - - var tag_token bool - var tag_handle, tag_suffix, anchor []byte - var tag_mark yaml_mark_t - if token.typ == yaml_ANCHOR_TOKEN { - anchor = token.value - start_mark = token.start_mark - end_mark = token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ == yaml_TAG_TOKEN { - tag_token = true - tag_handle = token.value - tag_suffix = token.suffix - tag_mark = token.start_mark - end_mark = token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } - } else if token.typ == yaml_TAG_TOKEN { - tag_token = true - tag_handle = token.value - tag_suffix = token.suffix - start_mark = token.start_mark - tag_mark = token.start_mark - end_mark = token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ == yaml_ANCHOR_TOKEN { - anchor = token.value - end_mark = token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } - } - - var tag []byte - if tag_token { - if len(tag_handle) == 0 { - tag = tag_suffix - tag_suffix = nil - } else { - for i := range parser.tag_directives { - if bytes.Equal(parser.tag_directives[i].handle, tag_handle) { - tag = append([]byte(nil), parser.tag_directives[i].prefix...) - tag = append(tag, tag_suffix...) - break - } - } - if len(tag) == 0 { - yaml_parser_set_parser_error_context(parser, - "while parsing a node", start_mark, - "found undefined tag handle", tag_mark) - return false - } - } - } - - implicit := len(tag) == 0 - if indentless_sequence && token.typ == yaml_BLOCK_ENTRY_TOKEN { - end_mark = token.end_mark - parser.state = yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE - *event = yaml_event_t{ - typ: yaml_SEQUENCE_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_BLOCK_SEQUENCE_STYLE), - } - return true - } - if token.typ == yaml_SCALAR_TOKEN { - var plain_implicit, quoted_implicit bool - end_mark = token.end_mark - if (len(tag) == 0 && token.style == yaml_PLAIN_SCALAR_STYLE) || (len(tag) == 1 && tag[0] == '!') { - plain_implicit = true - } else if len(tag) == 0 { - quoted_implicit = true - } - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - - *event = yaml_event_t{ - typ: yaml_SCALAR_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - value: token.value, - implicit: plain_implicit, - quoted_implicit: quoted_implicit, - style: yaml_style_t(token.style), - } - skip_token(parser) - return true - } - if token.typ == yaml_FLOW_SEQUENCE_START_TOKEN { - // [Go] Some of the events below can be merged as they differ only on style. - end_mark = token.end_mark - parser.state = yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE - *event = yaml_event_t{ - typ: yaml_SEQUENCE_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_FLOW_SEQUENCE_STYLE), - } - return true - } - if token.typ == yaml_FLOW_MAPPING_START_TOKEN { - end_mark = token.end_mark - parser.state = yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE - *event = yaml_event_t{ - typ: yaml_MAPPING_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_FLOW_MAPPING_STYLE), - } - return true - } - if block && token.typ == yaml_BLOCK_SEQUENCE_START_TOKEN { - end_mark = token.end_mark - parser.state = yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE - *event = yaml_event_t{ - typ: yaml_SEQUENCE_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_BLOCK_SEQUENCE_STYLE), - } - return true - } - if block && token.typ == yaml_BLOCK_MAPPING_START_TOKEN { - end_mark = token.end_mark - parser.state = yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE - *event = yaml_event_t{ - typ: yaml_MAPPING_START_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - style: yaml_style_t(yaml_BLOCK_MAPPING_STYLE), - } - return true - } - if len(anchor) > 0 || len(tag) > 0 { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - - *event = yaml_event_t{ - typ: yaml_SCALAR_EVENT, - start_mark: start_mark, - end_mark: end_mark, - anchor: anchor, - tag: tag, - implicit: implicit, - quoted_implicit: false, - style: yaml_style_t(yaml_PLAIN_SCALAR_STYLE), - } - return true - } - - context := "while parsing a flow node" - if block { - context = "while parsing a block node" - } - yaml_parser_set_parser_error_context(parser, context, start_mark, - "did not find expected node content", token.start_mark) - return false -} - -// Parse the productions: -// block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END -// ******************** *********** * ********* -// -func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { - if first { - token := peek_token(parser) - parser.marks = append(parser.marks, token.start_mark) - skip_token(parser) - } - - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ == yaml_BLOCK_ENTRY_TOKEN { - mark := token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_BLOCK_ENTRY_TOKEN && token.typ != yaml_BLOCK_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE) - return yaml_parser_parse_node(parser, event, true, false) - } else { - parser.state = yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) - } - } - if token.typ == yaml_BLOCK_END_TOKEN { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - - *event = yaml_event_t{ - typ: yaml_SEQUENCE_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - - skip_token(parser) - return true - } - - context_mark := parser.marks[len(parser.marks)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - return yaml_parser_set_parser_error_context(parser, - "while parsing a block collection", context_mark, - "did not find expected '-' indicator", token.start_mark) -} - -// Parse the productions: -// indentless_sequence ::= (BLOCK-ENTRY block_node?)+ -// *********** * -func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ == yaml_BLOCK_ENTRY_TOKEN { - mark := token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_BLOCK_ENTRY_TOKEN && - token.typ != yaml_KEY_TOKEN && - token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_BLOCK_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE) - return yaml_parser_parse_node(parser, event, true, false) - } - parser.state = yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) - } - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - - *event = yaml_event_t{ - typ: yaml_SEQUENCE_END_EVENT, - start_mark: token.start_mark, - end_mark: token.start_mark, // [Go] Shouldn't this be token.end_mark? - } - return true -} - -// Parse the productions: -// block_mapping ::= BLOCK-MAPPING_START -// ******************* -// ((KEY block_node_or_indentless_sequence?)? -// *** * -// (VALUE block_node_or_indentless_sequence?)?)* -// -// BLOCK-END -// ********* -// -func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { - if first { - token := peek_token(parser) - parser.marks = append(parser.marks, token.start_mark) - skip_token(parser) - } - - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ == yaml_KEY_TOKEN { - mark := token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_KEY_TOKEN && - token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_BLOCK_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_BLOCK_MAPPING_VALUE_STATE) - return yaml_parser_parse_node(parser, event, true, true) - } else { - parser.state = yaml_PARSE_BLOCK_MAPPING_VALUE_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) - } - } else if token.typ == yaml_BLOCK_END_TOKEN { - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - *event = yaml_event_t{ - typ: yaml_MAPPING_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - skip_token(parser) - return true - } - - context_mark := parser.marks[len(parser.marks)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - return yaml_parser_set_parser_error_context(parser, - "while parsing a block mapping", context_mark, - "did not find expected key", token.start_mark) -} - -// Parse the productions: -// block_mapping ::= BLOCK-MAPPING_START -// -// ((KEY block_node_or_indentless_sequence?)? -// -// (VALUE block_node_or_indentless_sequence?)?)* -// ***** * -// BLOCK-END -// -// -func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - if token.typ == yaml_VALUE_TOKEN { - mark := token.end_mark - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_KEY_TOKEN && - token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_BLOCK_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_BLOCK_MAPPING_KEY_STATE) - return yaml_parser_parse_node(parser, event, true, true) - } - parser.state = yaml_PARSE_BLOCK_MAPPING_KEY_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) - } - parser.state = yaml_PARSE_BLOCK_MAPPING_KEY_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) -} - -// Parse the productions: -// flow_sequence ::= FLOW-SEQUENCE-START -// ******************* -// (flow_sequence_entry FLOW-ENTRY)* -// * ********** -// flow_sequence_entry? -// * -// FLOW-SEQUENCE-END -// ***************** -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * -// -func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { - if first { - token := peek_token(parser) - parser.marks = append(parser.marks, token.start_mark) - skip_token(parser) - } - token := peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { - if !first { - if token.typ == yaml_FLOW_ENTRY_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } else { - context_mark := parser.marks[len(parser.marks)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - return yaml_parser_set_parser_error_context(parser, - "while parsing a flow sequence", context_mark, - "did not find expected ',' or ']'", token.start_mark) - } - } - - if token.typ == yaml_KEY_TOKEN { - parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE - *event = yaml_event_t{ - typ: yaml_MAPPING_START_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - implicit: true, - style: yaml_style_t(yaml_FLOW_MAPPING_STYLE), - } - skip_token(parser) - return true - } else if token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - } - - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - - *event = yaml_event_t{ - typ: yaml_SEQUENCE_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - - skip_token(parser) - return true -} - -// -// Parse the productions: -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// *** * -// -func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_FLOW_ENTRY_TOKEN && - token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - mark := token.end_mark - skip_token(parser) - parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE - return yaml_parser_process_empty_scalar(parser, event, mark) -} - -// Parse the productions: -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// ***** * -// -func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - if token.typ == yaml_VALUE_TOKEN { - skip_token(parser) - token := peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_FLOW_ENTRY_TOKEN && token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - } - parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) -} - -// Parse the productions: -// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * -// -func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, event *yaml_event_t) bool { - token := peek_token(parser) - if token == nil { - return false - } - parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE - *event = yaml_event_t{ - typ: yaml_MAPPING_END_EVENT, - start_mark: token.start_mark, - end_mark: token.start_mark, // [Go] Shouldn't this be end_mark? - } - return true -} - -// Parse the productions: -// flow_mapping ::= FLOW-MAPPING-START -// ****************** -// (flow_mapping_entry FLOW-ENTRY)* -// * ********** -// flow_mapping_entry? -// ****************** -// FLOW-MAPPING-END -// **************** -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * *** * -// -func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { - if first { - token := peek_token(parser) - parser.marks = append(parser.marks, token.start_mark) - skip_token(parser) - } - - token := peek_token(parser) - if token == nil { - return false - } - - if token.typ != yaml_FLOW_MAPPING_END_TOKEN { - if !first { - if token.typ == yaml_FLOW_ENTRY_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } else { - context_mark := parser.marks[len(parser.marks)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - return yaml_parser_set_parser_error_context(parser, - "while parsing a flow mapping", context_mark, - "did not find expected ',' or '}'", token.start_mark) - } - } - - if token.typ == yaml_KEY_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_VALUE_TOKEN && - token.typ != yaml_FLOW_ENTRY_TOKEN && - token.typ != yaml_FLOW_MAPPING_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_VALUE_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } else { - parser.state = yaml_PARSE_FLOW_MAPPING_VALUE_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) - } - } else if token.typ != yaml_FLOW_MAPPING_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - } - - parser.state = parser.states[len(parser.states)-1] - parser.states = parser.states[:len(parser.states)-1] - parser.marks = parser.marks[:len(parser.marks)-1] - *event = yaml_event_t{ - typ: yaml_MAPPING_END_EVENT, - start_mark: token.start_mark, - end_mark: token.end_mark, - } - skip_token(parser) - return true -} - -// Parse the productions: -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * ***** * -// -func yaml_parser_parse_flow_mapping_value(parser *yaml_parser_t, event *yaml_event_t, empty bool) bool { - token := peek_token(parser) - if token == nil { - return false - } - if empty { - parser.state = yaml_PARSE_FLOW_MAPPING_KEY_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) - } - if token.typ == yaml_VALUE_TOKEN { - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - if token.typ != yaml_FLOW_ENTRY_TOKEN && token.typ != yaml_FLOW_MAPPING_END_TOKEN { - parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_KEY_STATE) - return yaml_parser_parse_node(parser, event, false, false) - } - } - parser.state = yaml_PARSE_FLOW_MAPPING_KEY_STATE - return yaml_parser_process_empty_scalar(parser, event, token.start_mark) -} - -// Generate an empty scalar event. -func yaml_parser_process_empty_scalar(parser *yaml_parser_t, event *yaml_event_t, mark yaml_mark_t) bool { - *event = yaml_event_t{ - typ: yaml_SCALAR_EVENT, - start_mark: mark, - end_mark: mark, - value: nil, // Empty - implicit: true, - style: yaml_style_t(yaml_PLAIN_SCALAR_STYLE), - } - return true -} - -var default_tag_directives = []yaml_tag_directive_t{ - {[]byte("!"), []byte("!")}, - {[]byte("!!"), []byte("tag:yaml.org,2002:")}, -} - -// Parse directives. -func yaml_parser_process_directives(parser *yaml_parser_t, - version_directive_ref **yaml_version_directive_t, - tag_directives_ref *[]yaml_tag_directive_t) bool { - - var version_directive *yaml_version_directive_t - var tag_directives []yaml_tag_directive_t - - token := peek_token(parser) - if token == nil { - return false - } - - for token.typ == yaml_VERSION_DIRECTIVE_TOKEN || token.typ == yaml_TAG_DIRECTIVE_TOKEN { - if token.typ == yaml_VERSION_DIRECTIVE_TOKEN { - if version_directive != nil { - yaml_parser_set_parser_error(parser, - "found duplicate %YAML directive", token.start_mark) - return false - } - if token.major != 1 || token.minor != 1 { - yaml_parser_set_parser_error(parser, - "found incompatible YAML document", token.start_mark) - return false - } - version_directive = &yaml_version_directive_t{ - major: token.major, - minor: token.minor, - } - } else if token.typ == yaml_TAG_DIRECTIVE_TOKEN { - value := yaml_tag_directive_t{ - handle: token.value, - prefix: token.prefix, - } - if !yaml_parser_append_tag_directive(parser, value, false, token.start_mark) { - return false - } - tag_directives = append(tag_directives, value) - } - - skip_token(parser) - token = peek_token(parser) - if token == nil { - return false - } - } - - for i := range default_tag_directives { - if !yaml_parser_append_tag_directive(parser, default_tag_directives[i], true, token.start_mark) { - return false - } - } - - if version_directive_ref != nil { - *version_directive_ref = version_directive - } - if tag_directives_ref != nil { - *tag_directives_ref = tag_directives - } - return true -} - -// Append a tag directive to the directives stack. -func yaml_parser_append_tag_directive(parser *yaml_parser_t, value yaml_tag_directive_t, allow_duplicates bool, mark yaml_mark_t) bool { - for i := range parser.tag_directives { - if bytes.Equal(value.handle, parser.tag_directives[i].handle) { - if allow_duplicates { - return true - } - return yaml_parser_set_parser_error(parser, "found duplicate %TAG directive", mark) - } - } - - // [Go] I suspect the copy is unnecessary. This was likely done - // because there was no way to track ownership of the data. - value_copy := yaml_tag_directive_t{ - handle: make([]byte, len(value.handle)), - prefix: make([]byte, len(value.prefix)), - } - copy(value_copy.handle, value.handle) - copy(value_copy.prefix, value.prefix) - parser.tag_directives = append(parser.tag_directives, value_copy) - return true -} diff --git a/third_party/src/gopkg.in/yaml.v2/readerc.go b/third_party/src/gopkg.in/yaml.v2/readerc.go deleted file mode 100644 index d5fb097..0000000 --- a/third_party/src/gopkg.in/yaml.v2/readerc.go +++ /dev/null @@ -1,391 +0,0 @@ -package yaml - -import ( - "io" -) - -// Set the reader error and return 0. -func yaml_parser_set_reader_error(parser *yaml_parser_t, problem string, offset int, value int) bool { - parser.error = yaml_READER_ERROR - parser.problem = problem - parser.problem_offset = offset - parser.problem_value = value - return false -} - -// Byte order marks. -const ( - bom_UTF8 = "\xef\xbb\xbf" - bom_UTF16LE = "\xff\xfe" - bom_UTF16BE = "\xfe\xff" -) - -// Determine the input stream encoding by checking the BOM symbol. If no BOM is -// found, the UTF-8 encoding is assumed. Return 1 on success, 0 on failure. -func yaml_parser_determine_encoding(parser *yaml_parser_t) bool { - // Ensure that we had enough bytes in the raw buffer. - for !parser.eof && len(parser.raw_buffer)-parser.raw_buffer_pos < 3 { - if !yaml_parser_update_raw_buffer(parser) { - return false - } - } - - // Determine the encoding. - buf := parser.raw_buffer - pos := parser.raw_buffer_pos - avail := len(buf) - pos - if avail >= 2 && buf[pos] == bom_UTF16LE[0] && buf[pos+1] == bom_UTF16LE[1] { - parser.encoding = yaml_UTF16LE_ENCODING - parser.raw_buffer_pos += 2 - parser.offset += 2 - } else if avail >= 2 && buf[pos] == bom_UTF16BE[0] && buf[pos+1] == bom_UTF16BE[1] { - parser.encoding = yaml_UTF16BE_ENCODING - parser.raw_buffer_pos += 2 - parser.offset += 2 - } else if avail >= 3 && buf[pos] == bom_UTF8[0] && buf[pos+1] == bom_UTF8[1] && buf[pos+2] == bom_UTF8[2] { - parser.encoding = yaml_UTF8_ENCODING - parser.raw_buffer_pos += 3 - parser.offset += 3 - } else { - parser.encoding = yaml_UTF8_ENCODING - } - return true -} - -// Update the raw buffer. -func yaml_parser_update_raw_buffer(parser *yaml_parser_t) bool { - size_read := 0 - - // Return if the raw buffer is full. - if parser.raw_buffer_pos == 0 && len(parser.raw_buffer) == cap(parser.raw_buffer) { - return true - } - - // Return on EOF. - if parser.eof { - return true - } - - // Move the remaining bytes in the raw buffer to the beginning. - if parser.raw_buffer_pos > 0 && parser.raw_buffer_pos < len(parser.raw_buffer) { - copy(parser.raw_buffer, parser.raw_buffer[parser.raw_buffer_pos:]) - } - parser.raw_buffer = parser.raw_buffer[:len(parser.raw_buffer)-parser.raw_buffer_pos] - parser.raw_buffer_pos = 0 - - // Call the read handler to fill the buffer. - size_read, err := parser.read_handler(parser, parser.raw_buffer[len(parser.raw_buffer):cap(parser.raw_buffer)]) - parser.raw_buffer = parser.raw_buffer[:len(parser.raw_buffer)+size_read] - if err == io.EOF { - parser.eof = true - } else if err != nil { - return yaml_parser_set_reader_error(parser, "input error: "+err.Error(), parser.offset, -1) - } - return true -} - -// Ensure that the buffer contains at least `length` characters. -// Return true on success, false on failure. -// -// The length is supposed to be significantly less that the buffer size. -func yaml_parser_update_buffer(parser *yaml_parser_t, length int) bool { - if parser.read_handler == nil { - panic("read handler must be set") - } - - // If the EOF flag is set and the raw buffer is empty, do nothing. - if parser.eof && parser.raw_buffer_pos == len(parser.raw_buffer) { - return true - } - - // Return if the buffer contains enough characters. - if parser.unread >= length { - return true - } - - // Determine the input encoding if it is not known yet. - if parser.encoding == yaml_ANY_ENCODING { - if !yaml_parser_determine_encoding(parser) { - return false - } - } - - // Move the unread characters to the beginning of the buffer. - buffer_len := len(parser.buffer) - if parser.buffer_pos > 0 && parser.buffer_pos < buffer_len { - copy(parser.buffer, parser.buffer[parser.buffer_pos:]) - buffer_len -= parser.buffer_pos - parser.buffer_pos = 0 - } else if parser.buffer_pos == buffer_len { - buffer_len = 0 - parser.buffer_pos = 0 - } - - // Open the whole buffer for writing, and cut it before returning. - parser.buffer = parser.buffer[:cap(parser.buffer)] - - // Fill the buffer until it has enough characters. - first := true - for parser.unread < length { - - // Fill the raw buffer if necessary. - if !first || parser.raw_buffer_pos == len(parser.raw_buffer) { - if !yaml_parser_update_raw_buffer(parser) { - parser.buffer = parser.buffer[:buffer_len] - return false - } - } - first = false - - // Decode the raw buffer. - inner: - for parser.raw_buffer_pos != len(parser.raw_buffer) { - var value rune - var width int - - raw_unread := len(parser.raw_buffer) - parser.raw_buffer_pos - - // Decode the next character. - switch parser.encoding { - case yaml_UTF8_ENCODING: - // Decode a UTF-8 character. Check RFC 3629 - // (http://www.ietf.org/rfc/rfc3629.txt) for more details. - // - // The following table (taken from the RFC) is used for - // decoding. - // - // Char. number range | UTF-8 octet sequence - // (hexadecimal) | (binary) - // --------------------+------------------------------------ - // 0000 0000-0000 007F | 0xxxxxxx - // 0000 0080-0000 07FF | 110xxxxx 10xxxxxx - // 0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx - // 0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - // - // Additionally, the characters in the range 0xD800-0xDFFF - // are prohibited as they are reserved for use with UTF-16 - // surrogate pairs. - - // Determine the length of the UTF-8 sequence. - octet := parser.raw_buffer[parser.raw_buffer_pos] - switch { - case octet&0x80 == 0x00: - width = 1 - case octet&0xE0 == 0xC0: - width = 2 - case octet&0xF0 == 0xE0: - width = 3 - case octet&0xF8 == 0xF0: - width = 4 - default: - // The leading octet is invalid. - return yaml_parser_set_reader_error(parser, - "invalid leading UTF-8 octet", - parser.offset, int(octet)) - } - - // Check if the raw buffer contains an incomplete character. - if width > raw_unread { - if parser.eof { - return yaml_parser_set_reader_error(parser, - "incomplete UTF-8 octet sequence", - parser.offset, -1) - } - break inner - } - - // Decode the leading octet. - switch { - case octet&0x80 == 0x00: - value = rune(octet & 0x7F) - case octet&0xE0 == 0xC0: - value = rune(octet & 0x1F) - case octet&0xF0 == 0xE0: - value = rune(octet & 0x0F) - case octet&0xF8 == 0xF0: - value = rune(octet & 0x07) - default: - value = 0 - } - - // Check and decode the trailing octets. - for k := 1; k < width; k++ { - octet = parser.raw_buffer[parser.raw_buffer_pos+k] - - // Check if the octet is valid. - if (octet & 0xC0) != 0x80 { - return yaml_parser_set_reader_error(parser, - "invalid trailing UTF-8 octet", - parser.offset+k, int(octet)) - } - - // Decode the octet. - value = (value << 6) + rune(octet&0x3F) - } - - // Check the length of the sequence against the value. - switch { - case width == 1: - case width == 2 && value >= 0x80: - case width == 3 && value >= 0x800: - case width == 4 && value >= 0x10000: - default: - return yaml_parser_set_reader_error(parser, - "invalid length of a UTF-8 sequence", - parser.offset, -1) - } - - // Check the range of the value. - if value >= 0xD800 && value <= 0xDFFF || value > 0x10FFFF { - return yaml_parser_set_reader_error(parser, - "invalid Unicode character", - parser.offset, int(value)) - } - - case yaml_UTF16LE_ENCODING, yaml_UTF16BE_ENCODING: - var low, high int - if parser.encoding == yaml_UTF16LE_ENCODING { - low, high = 0, 1 - } else { - high, low = 1, 0 - } - - // The UTF-16 encoding is not as simple as one might - // naively think. Check RFC 2781 - // (http://www.ietf.org/rfc/rfc2781.txt). - // - // Normally, two subsequent bytes describe a Unicode - // character. However a special technique (called a - // surrogate pair) is used for specifying character - // values larger than 0xFFFF. - // - // A surrogate pair consists of two pseudo-characters: - // high surrogate area (0xD800-0xDBFF) - // low surrogate area (0xDC00-0xDFFF) - // - // The following formulas are used for decoding - // and encoding characters using surrogate pairs: - // - // U = U' + 0x10000 (0x01 00 00 <= U <= 0x10 FF FF) - // U' = yyyyyyyyyyxxxxxxxxxx (0 <= U' <= 0x0F FF FF) - // W1 = 110110yyyyyyyyyy - // W2 = 110111xxxxxxxxxx - // - // where U is the character value, W1 is the high surrogate - // area, W2 is the low surrogate area. - - // Check for incomplete UTF-16 character. - if raw_unread < 2 { - if parser.eof { - return yaml_parser_set_reader_error(parser, - "incomplete UTF-16 character", - parser.offset, -1) - } - break inner - } - - // Get the character. - value = rune(parser.raw_buffer[parser.raw_buffer_pos+low]) + - (rune(parser.raw_buffer[parser.raw_buffer_pos+high]) << 8) - - // Check for unexpected low surrogate area. - if value&0xFC00 == 0xDC00 { - return yaml_parser_set_reader_error(parser, - "unexpected low surrogate area", - parser.offset, int(value)) - } - - // Check for a high surrogate area. - if value&0xFC00 == 0xD800 { - width = 4 - - // Check for incomplete surrogate pair. - if raw_unread < 4 { - if parser.eof { - return yaml_parser_set_reader_error(parser, - "incomplete UTF-16 surrogate pair", - parser.offset, -1) - } - break inner - } - - // Get the next character. - value2 := rune(parser.raw_buffer[parser.raw_buffer_pos+low+2]) + - (rune(parser.raw_buffer[parser.raw_buffer_pos+high+2]) << 8) - - // Check for a low surrogate area. - if value2&0xFC00 != 0xDC00 { - return yaml_parser_set_reader_error(parser, - "expected low surrogate area", - parser.offset+2, int(value2)) - } - - // Generate the value of the surrogate pair. - value = 0x10000 + ((value & 0x3FF) << 10) + (value2 & 0x3FF) - } else { - width = 2 - } - - default: - panic("impossible") - } - - // Check if the character is in the allowed range: - // #x9 | #xA | #xD | [#x20-#x7E] (8 bit) - // | #x85 | [#xA0-#xD7FF] | [#xE000-#xFFFD] (16 bit) - // | [#x10000-#x10FFFF] (32 bit) - switch { - case value == 0x09: - case value == 0x0A: - case value == 0x0D: - case value >= 0x20 && value <= 0x7E: - case value == 0x85: - case value >= 0xA0 && value <= 0xD7FF: - case value >= 0xE000 && value <= 0xFFFD: - case value >= 0x10000 && value <= 0x10FFFF: - default: - return yaml_parser_set_reader_error(parser, - "control characters are not allowed", - parser.offset, int(value)) - } - - // Move the raw pointers. - parser.raw_buffer_pos += width - parser.offset += width - - // Finally put the character into the buffer. - if value <= 0x7F { - // 0000 0000-0000 007F . 0xxxxxxx - parser.buffer[buffer_len+0] = byte(value) - } else if value <= 0x7FF { - // 0000 0080-0000 07FF . 110xxxxx 10xxxxxx - parser.buffer[buffer_len+0] = byte(0xC0 + (value >> 6)) - parser.buffer[buffer_len+1] = byte(0x80 + (value & 0x3F)) - } else if value <= 0xFFFF { - // 0000 0800-0000 FFFF . 1110xxxx 10xxxxxx 10xxxxxx - parser.buffer[buffer_len+0] = byte(0xE0 + (value >> 12)) - parser.buffer[buffer_len+1] = byte(0x80 + ((value >> 6) & 0x3F)) - parser.buffer[buffer_len+2] = byte(0x80 + (value & 0x3F)) - } else { - // 0001 0000-0010 FFFF . 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - parser.buffer[buffer_len+0] = byte(0xF0 + (value >> 18)) - parser.buffer[buffer_len+1] = byte(0x80 + ((value >> 12) & 0x3F)) - parser.buffer[buffer_len+2] = byte(0x80 + ((value >> 6) & 0x3F)) - parser.buffer[buffer_len+3] = byte(0x80 + (value & 0x3F)) - } - buffer_len += width - - parser.unread++ - } - - // On EOF, put NUL into the buffer and return. - if parser.eof { - parser.buffer[buffer_len] = 0 - buffer_len++ - parser.unread++ - break - } - } - parser.buffer = parser.buffer[:buffer_len] - return true -} diff --git a/third_party/src/gopkg.in/yaml.v2/resolve.go b/third_party/src/gopkg.in/yaml.v2/resolve.go deleted file mode 100644 index 93a8632..0000000 --- a/third_party/src/gopkg.in/yaml.v2/resolve.go +++ /dev/null @@ -1,203 +0,0 @@ -package yaml - -import ( - "encoding/base64" - "math" - "strconv" - "strings" - "unicode/utf8" -) - -type resolveMapItem struct { - value interface{} - tag string -} - -var resolveTable = make([]byte, 256) -var resolveMap = make(map[string]resolveMapItem) - -func init() { - t := resolveTable - t[int('+')] = 'S' // Sign - t[int('-')] = 'S' - for _, c := range "0123456789" { - t[int(c)] = 'D' // Digit - } - for _, c := range "yYnNtTfFoO~" { - t[int(c)] = 'M' // In map - } - t[int('.')] = '.' // Float (potentially in map) - - var resolveMapList = []struct { - v interface{} - tag string - l []string - }{ - {true, yaml_BOOL_TAG, []string{"y", "Y", "yes", "Yes", "YES"}}, - {true, yaml_BOOL_TAG, []string{"true", "True", "TRUE"}}, - {true, yaml_BOOL_TAG, []string{"on", "On", "ON"}}, - {false, yaml_BOOL_TAG, []string{"n", "N", "no", "No", "NO"}}, - {false, yaml_BOOL_TAG, []string{"false", "False", "FALSE"}}, - {false, yaml_BOOL_TAG, []string{"off", "Off", "OFF"}}, - {nil, yaml_NULL_TAG, []string{"", "~", "null", "Null", "NULL"}}, - {math.NaN(), yaml_FLOAT_TAG, []string{".nan", ".NaN", ".NAN"}}, - {math.Inf(+1), yaml_FLOAT_TAG, []string{".inf", ".Inf", ".INF"}}, - {math.Inf(+1), yaml_FLOAT_TAG, []string{"+.inf", "+.Inf", "+.INF"}}, - {math.Inf(-1), yaml_FLOAT_TAG, []string{"-.inf", "-.Inf", "-.INF"}}, - {"<<", yaml_MERGE_TAG, []string{"<<"}}, - } - - m := resolveMap - for _, item := range resolveMapList { - for _, s := range item.l { - m[s] = resolveMapItem{item.v, item.tag} - } - } -} - -const longTagPrefix = "tag:yaml.org,2002:" - -func shortTag(tag string) string { - // TODO This can easily be made faster and produce less garbage. - if strings.HasPrefix(tag, longTagPrefix) { - return "!!" + tag[len(longTagPrefix):] - } - return tag -} - -func longTag(tag string) string { - if strings.HasPrefix(tag, "!!") { - return longTagPrefix + tag[2:] - } - return tag -} - -func resolvableTag(tag string) bool { - switch tag { - case "", yaml_STR_TAG, yaml_BOOL_TAG, yaml_INT_TAG, yaml_FLOAT_TAG, yaml_NULL_TAG: - return true - } - return false -} - -func resolve(tag string, in string) (rtag string, out interface{}) { - if !resolvableTag(tag) { - return tag, in - } - - defer func() { - switch tag { - case "", rtag, yaml_STR_TAG, yaml_BINARY_TAG: - return - } - failf("cannot decode %s `%s` as a %s", shortTag(rtag), in, shortTag(tag)) - }() - - // Any data is accepted as a !!str or !!binary. - // Otherwise, the prefix is enough of a hint about what it might be. - hint := byte('N') - if in != "" { - hint = resolveTable[in[0]] - } - if hint != 0 && tag != yaml_STR_TAG && tag != yaml_BINARY_TAG { - // Handle things we can lookup in a map. - if item, ok := resolveMap[in]; ok { - return item.tag, item.value - } - - // Base 60 floats are a bad idea, were dropped in YAML 1.2, and - // are purposefully unsupported here. They're still quoted on - // the way out for compatibility with other parser, though. - - switch hint { - case 'M': - // We've already checked the map above. - - case '.': - // Not in the map, so maybe a normal float. - floatv, err := strconv.ParseFloat(in, 64) - if err == nil { - return yaml_FLOAT_TAG, floatv - } - - case 'D', 'S': - // Int, float, or timestamp. - plain := strings.Replace(in, "_", "", -1) - intv, err := strconv.ParseInt(plain, 0, 64) - if err == nil { - if intv == int64(int(intv)) { - return yaml_INT_TAG, int(intv) - } else { - return yaml_INT_TAG, intv - } - } - uintv, err := strconv.ParseUint(plain, 0, 64) - if err == nil { - return yaml_INT_TAG, uintv - } - floatv, err := strconv.ParseFloat(plain, 64) - if err == nil { - return yaml_FLOAT_TAG, floatv - } - if strings.HasPrefix(plain, "0b") { - intv, err := strconv.ParseInt(plain[2:], 2, 64) - if err == nil { - if intv == int64(int(intv)) { - return yaml_INT_TAG, int(intv) - } else { - return yaml_INT_TAG, intv - } - } - uintv, err := strconv.ParseUint(plain[2:], 2, 64) - if err == nil { - return yaml_INT_TAG, uintv - } - } else if strings.HasPrefix(plain, "-0b") { - intv, err := strconv.ParseInt(plain[3:], 2, 64) - if err == nil { - if intv == int64(int(intv)) { - return yaml_INT_TAG, -int(intv) - } else { - return yaml_INT_TAG, -intv - } - } - } - // XXX Handle timestamps here. - - default: - panic("resolveTable item not yet handled: " + string(rune(hint)) + " (with " + in + ")") - } - } - if tag == yaml_BINARY_TAG { - return yaml_BINARY_TAG, in - } - if utf8.ValidString(in) { - return yaml_STR_TAG, in - } - return yaml_BINARY_TAG, encodeBase64(in) -} - -// encodeBase64 encodes s as base64 that is broken up into multiple lines -// as appropriate for the resulting length. -func encodeBase64(s string) string { - const lineLen = 70 - encLen := base64.StdEncoding.EncodedLen(len(s)) - lines := encLen/lineLen + 1 - buf := make([]byte, encLen*2+lines) - in := buf[0:encLen] - out := buf[encLen:] - base64.StdEncoding.Encode(in, []byte(s)) - k := 0 - for i := 0; i < len(in); i += lineLen { - j := i + lineLen - if j > len(in) { - j = len(in) - } - k += copy(out[k:], in[i:j]) - if lines > 1 { - out[k] = '\n' - k++ - } - } - return string(out[:k]) -} diff --git a/third_party/src/gopkg.in/yaml.v2/scannerc.go b/third_party/src/gopkg.in/yaml.v2/scannerc.go deleted file mode 100644 index fe93b19..0000000 --- a/third_party/src/gopkg.in/yaml.v2/scannerc.go +++ /dev/null @@ -1,2710 +0,0 @@ -package yaml - -import ( - "bytes" - "fmt" -) - -// Introduction -// ************ -// -// The following notes assume that you are familiar with the YAML specification -// (http://yaml.org/spec/cvs/current.html). We mostly follow it, although in -// some cases we are less restrictive that it requires. -// -// The process of transforming a YAML stream into a sequence of events is -// divided on two steps: Scanning and Parsing. -// -// The Scanner transforms the input stream into a sequence of tokens, while the -// parser transform the sequence of tokens produced by the Scanner into a -// sequence of parsing events. -// -// The Scanner is rather clever and complicated. The Parser, on the contrary, -// is a straightforward implementation of a recursive-descendant parser (or, -// LL(1) parser, as it is usually called). -// -// Actually there are two issues of Scanning that might be called "clever", the -// rest is quite straightforward. The issues are "block collection start" and -// "simple keys". Both issues are explained below in details. -// -// Here the Scanning step is explained and implemented. We start with the list -// of all the tokens produced by the Scanner together with short descriptions. -// -// Now, tokens: -// -// STREAM-START(encoding) # The stream start. -// STREAM-END # The stream end. -// VERSION-DIRECTIVE(major,minor) # The '%YAML' directive. -// TAG-DIRECTIVE(handle,prefix) # The '%TAG' directive. -// DOCUMENT-START # '---' -// DOCUMENT-END # '...' -// BLOCK-SEQUENCE-START # Indentation increase denoting a block -// BLOCK-MAPPING-START # sequence or a block mapping. -// BLOCK-END # Indentation decrease. -// FLOW-SEQUENCE-START # '[' -// FLOW-SEQUENCE-END # ']' -// BLOCK-SEQUENCE-START # '{' -// BLOCK-SEQUENCE-END # '}' -// BLOCK-ENTRY # '-' -// FLOW-ENTRY # ',' -// KEY # '?' or nothing (simple keys). -// VALUE # ':' -// ALIAS(anchor) # '*anchor' -// ANCHOR(anchor) # '&anchor' -// TAG(handle,suffix) # '!handle!suffix' -// SCALAR(value,style) # A scalar. -// -// The following two tokens are "virtual" tokens denoting the beginning and the -// end of the stream: -// -// STREAM-START(encoding) -// STREAM-END -// -// We pass the information about the input stream encoding with the -// STREAM-START token. -// -// The next two tokens are responsible for tags: -// -// VERSION-DIRECTIVE(major,minor) -// TAG-DIRECTIVE(handle,prefix) -// -// Example: -// -// %YAML 1.1 -// %TAG ! !foo -// %TAG !yaml! tag:yaml.org,2002: -// --- -// -// The correspoding sequence of tokens: -// -// STREAM-START(utf-8) -// VERSION-DIRECTIVE(1,1) -// TAG-DIRECTIVE("!","!foo") -// TAG-DIRECTIVE("!yaml","tag:yaml.org,2002:") -// DOCUMENT-START -// STREAM-END -// -// Note that the VERSION-DIRECTIVE and TAG-DIRECTIVE tokens occupy a whole -// line. -// -// The document start and end indicators are represented by: -// -// DOCUMENT-START -// DOCUMENT-END -// -// Note that if a YAML stream contains an implicit document (without '---' -// and '...' indicators), no DOCUMENT-START and DOCUMENT-END tokens will be -// produced. -// -// In the following examples, we present whole documents together with the -// produced tokens. -// -// 1. An implicit document: -// -// 'a scalar' -// -// Tokens: -// -// STREAM-START(utf-8) -// SCALAR("a scalar",single-quoted) -// STREAM-END -// -// 2. An explicit document: -// -// --- -// 'a scalar' -// ... -// -// Tokens: -// -// STREAM-START(utf-8) -// DOCUMENT-START -// SCALAR("a scalar",single-quoted) -// DOCUMENT-END -// STREAM-END -// -// 3. Several documents in a stream: -// -// 'a scalar' -// --- -// 'another scalar' -// --- -// 'yet another scalar' -// -// Tokens: -// -// STREAM-START(utf-8) -// SCALAR("a scalar",single-quoted) -// DOCUMENT-START -// SCALAR("another scalar",single-quoted) -// DOCUMENT-START -// SCALAR("yet another scalar",single-quoted) -// STREAM-END -// -// We have already introduced the SCALAR token above. The following tokens are -// used to describe aliases, anchors, tag, and scalars: -// -// ALIAS(anchor) -// ANCHOR(anchor) -// TAG(handle,suffix) -// SCALAR(value,style) -// -// The following series of examples illustrate the usage of these tokens: -// -// 1. A recursive sequence: -// -// &A [ *A ] -// -// Tokens: -// -// STREAM-START(utf-8) -// ANCHOR("A") -// FLOW-SEQUENCE-START -// ALIAS("A") -// FLOW-SEQUENCE-END -// STREAM-END -// -// 2. A tagged scalar: -// -// !!float "3.14" # A good approximation. -// -// Tokens: -// -// STREAM-START(utf-8) -// TAG("!!","float") -// SCALAR("3.14",double-quoted) -// STREAM-END -// -// 3. Various scalar styles: -// -// --- # Implicit empty plain scalars do not produce tokens. -// --- a plain scalar -// --- 'a single-quoted scalar' -// --- "a double-quoted scalar" -// --- |- -// a literal scalar -// --- >- -// a folded -// scalar -// -// Tokens: -// -// STREAM-START(utf-8) -// DOCUMENT-START -// DOCUMENT-START -// SCALAR("a plain scalar",plain) -// DOCUMENT-START -// SCALAR("a single-quoted scalar",single-quoted) -// DOCUMENT-START -// SCALAR("a double-quoted scalar",double-quoted) -// DOCUMENT-START -// SCALAR("a literal scalar",literal) -// DOCUMENT-START -// SCALAR("a folded scalar",folded) -// STREAM-END -// -// Now it's time to review collection-related tokens. We will start with -// flow collections: -// -// FLOW-SEQUENCE-START -// FLOW-SEQUENCE-END -// FLOW-MAPPING-START -// FLOW-MAPPING-END -// FLOW-ENTRY -// KEY -// VALUE -// -// The tokens FLOW-SEQUENCE-START, FLOW-SEQUENCE-END, FLOW-MAPPING-START, and -// FLOW-MAPPING-END represent the indicators '[', ']', '{', and '}' -// correspondingly. FLOW-ENTRY represent the ',' indicator. Finally the -// indicators '?' and ':', which are used for denoting mapping keys and values, -// are represented by the KEY and VALUE tokens. -// -// The following examples show flow collections: -// -// 1. A flow sequence: -// -// [item 1, item 2, item 3] -// -// Tokens: -// -// STREAM-START(utf-8) -// FLOW-SEQUENCE-START -// SCALAR("item 1",plain) -// FLOW-ENTRY -// SCALAR("item 2",plain) -// FLOW-ENTRY -// SCALAR("item 3",plain) -// FLOW-SEQUENCE-END -// STREAM-END -// -// 2. A flow mapping: -// -// { -// a simple key: a value, # Note that the KEY token is produced. -// ? a complex key: another value, -// } -// -// Tokens: -// -// STREAM-START(utf-8) -// FLOW-MAPPING-START -// KEY -// SCALAR("a simple key",plain) -// VALUE -// SCALAR("a value",plain) -// FLOW-ENTRY -// KEY -// SCALAR("a complex key",plain) -// VALUE -// SCALAR("another value",plain) -// FLOW-ENTRY -// FLOW-MAPPING-END -// STREAM-END -// -// A simple key is a key which is not denoted by the '?' indicator. Note that -// the Scanner still produce the KEY token whenever it encounters a simple key. -// -// For scanning block collections, the following tokens are used (note that we -// repeat KEY and VALUE here): -// -// BLOCK-SEQUENCE-START -// BLOCK-MAPPING-START -// BLOCK-END -// BLOCK-ENTRY -// KEY -// VALUE -// -// The tokens BLOCK-SEQUENCE-START and BLOCK-MAPPING-START denote indentation -// increase that precedes a block collection (cf. the INDENT token in Python). -// The token BLOCK-END denote indentation decrease that ends a block collection -// (cf. the DEDENT token in Python). However YAML has some syntax pecularities -// that makes detections of these tokens more complex. -// -// The tokens BLOCK-ENTRY, KEY, and VALUE are used to represent the indicators -// '-', '?', and ':' correspondingly. -// -// The following examples show how the tokens BLOCK-SEQUENCE-START, -// BLOCK-MAPPING-START, and BLOCK-END are emitted by the Scanner: -// -// 1. Block sequences: -// -// - item 1 -// - item 2 -// - -// - item 3.1 -// - item 3.2 -// - -// key 1: value 1 -// key 2: value 2 -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-ENTRY -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 3.1",plain) -// BLOCK-ENTRY -// SCALAR("item 3.2",plain) -// BLOCK-END -// BLOCK-ENTRY -// BLOCK-MAPPING-START -// KEY -// SCALAR("key 1",plain) -// VALUE -// SCALAR("value 1",plain) -// KEY -// SCALAR("key 2",plain) -// VALUE -// SCALAR("value 2",plain) -// BLOCK-END -// BLOCK-END -// STREAM-END -// -// 2. Block mappings: -// -// a simple key: a value # The KEY token is produced here. -// ? a complex key -// : another value -// a mapping: -// key 1: value 1 -// key 2: value 2 -// a sequence: -// - item 1 -// - item 2 -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-MAPPING-START -// KEY -// SCALAR("a simple key",plain) -// VALUE -// SCALAR("a value",plain) -// KEY -// SCALAR("a complex key",plain) -// VALUE -// SCALAR("another value",plain) -// KEY -// SCALAR("a mapping",plain) -// BLOCK-MAPPING-START -// KEY -// SCALAR("key 1",plain) -// VALUE -// SCALAR("value 1",plain) -// KEY -// SCALAR("key 2",plain) -// VALUE -// SCALAR("value 2",plain) -// BLOCK-END -// KEY -// SCALAR("a sequence",plain) -// VALUE -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-END -// BLOCK-END -// STREAM-END -// -// YAML does not always require to start a new block collection from a new -// line. If the current line contains only '-', '?', and ':' indicators, a new -// block collection may start at the current line. The following examples -// illustrate this case: -// -// 1. Collections in a sequence: -// -// - - item 1 -// - item 2 -// - key 1: value 1 -// key 2: value 2 -// - ? complex key -// : complex value -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-END -// BLOCK-ENTRY -// BLOCK-MAPPING-START -// KEY -// SCALAR("key 1",plain) -// VALUE -// SCALAR("value 1",plain) -// KEY -// SCALAR("key 2",plain) -// VALUE -// SCALAR("value 2",plain) -// BLOCK-END -// BLOCK-ENTRY -// BLOCK-MAPPING-START -// KEY -// SCALAR("complex key") -// VALUE -// SCALAR("complex value") -// BLOCK-END -// BLOCK-END -// STREAM-END -// -// 2. Collections in a mapping: -// -// ? a sequence -// : - item 1 -// - item 2 -// ? a mapping -// : key 1: value 1 -// key 2: value 2 -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-MAPPING-START -// KEY -// SCALAR("a sequence",plain) -// VALUE -// BLOCK-SEQUENCE-START -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-END -// KEY -// SCALAR("a mapping",plain) -// VALUE -// BLOCK-MAPPING-START -// KEY -// SCALAR("key 1",plain) -// VALUE -// SCALAR("value 1",plain) -// KEY -// SCALAR("key 2",plain) -// VALUE -// SCALAR("value 2",plain) -// BLOCK-END -// BLOCK-END -// STREAM-END -// -// YAML also permits non-indented sequences if they are included into a block -// mapping. In this case, the token BLOCK-SEQUENCE-START is not produced: -// -// key: -// - item 1 # BLOCK-SEQUENCE-START is NOT produced here. -// - item 2 -// -// Tokens: -// -// STREAM-START(utf-8) -// BLOCK-MAPPING-START -// KEY -// SCALAR("key",plain) -// VALUE -// BLOCK-ENTRY -// SCALAR("item 1",plain) -// BLOCK-ENTRY -// SCALAR("item 2",plain) -// BLOCK-END -// - -// Ensure that the buffer contains the required number of characters. -// Return true on success, false on failure (reader error or memory error). -func cache(parser *yaml_parser_t, length int) bool { - // [Go] This was inlined: !cache(A, B) -> unread < B && !update(A, B) - return parser.unread >= length || yaml_parser_update_buffer(parser, length) -} - -// Advance the buffer pointer. -func skip(parser *yaml_parser_t) { - parser.mark.index++ - parser.mark.column++ - parser.unread-- - parser.buffer_pos += width(parser.buffer[parser.buffer_pos]) -} - -func skip_line(parser *yaml_parser_t) { - if is_crlf(parser.buffer, parser.buffer_pos) { - parser.mark.index += 2 - parser.mark.column = 0 - parser.mark.line++ - parser.unread -= 2 - parser.buffer_pos += 2 - } else if is_break(parser.buffer, parser.buffer_pos) { - parser.mark.index++ - parser.mark.column = 0 - parser.mark.line++ - parser.unread-- - parser.buffer_pos += width(parser.buffer[parser.buffer_pos]) - } -} - -// Copy a character to a string buffer and advance pointers. -func read(parser *yaml_parser_t, s []byte) []byte { - w := width(parser.buffer[parser.buffer_pos]) - if w == 0 { - panic("invalid character sequence") - } - if len(s) == 0 { - s = make([]byte, 0, 32) - } - if w == 1 && len(s)+w <= cap(s) { - s = s[:len(s)+1] - s[len(s)-1] = parser.buffer[parser.buffer_pos] - parser.buffer_pos++ - } else { - s = append(s, parser.buffer[parser.buffer_pos:parser.buffer_pos+w]...) - parser.buffer_pos += w - } - parser.mark.index++ - parser.mark.column++ - parser.unread-- - return s -} - -// Copy a line break character to a string buffer and advance pointers. -func read_line(parser *yaml_parser_t, s []byte) []byte { - buf := parser.buffer - pos := parser.buffer_pos - switch { - case buf[pos] == '\r' && buf[pos+1] == '\n': - // CR LF . LF - s = append(s, '\n') - parser.buffer_pos += 2 - parser.mark.index++ - parser.unread-- - case buf[pos] == '\r' || buf[pos] == '\n': - // CR|LF . LF - s = append(s, '\n') - parser.buffer_pos += 1 - case buf[pos] == '\xC2' && buf[pos+1] == '\x85': - // NEL . LF - s = append(s, '\n') - parser.buffer_pos += 2 - case buf[pos] == '\xE2' && buf[pos+1] == '\x80' && (buf[pos+2] == '\xA8' || buf[pos+2] == '\xA9'): - // LS|PS . LS|PS - s = append(s, buf[parser.buffer_pos:pos+3]...) - parser.buffer_pos += 3 - default: - return s - } - parser.mark.index++ - parser.mark.column = 0 - parser.mark.line++ - parser.unread-- - return s -} - -// Get the next token. -func yaml_parser_scan(parser *yaml_parser_t, token *yaml_token_t) bool { - // Erase the token object. - *token = yaml_token_t{} // [Go] Is this necessary? - - // No tokens after STREAM-END or error. - if parser.stream_end_produced || parser.error != yaml_NO_ERROR { - return true - } - - // Ensure that the tokens queue contains enough tokens. - if !parser.token_available { - if !yaml_parser_fetch_more_tokens(parser) { - return false - } - } - - // Fetch the next token from the queue. - *token = parser.tokens[parser.tokens_head] - parser.tokens_head++ - parser.tokens_parsed++ - parser.token_available = false - - if token.typ == yaml_STREAM_END_TOKEN { - parser.stream_end_produced = true - } - return true -} - -// Set the scanner error and return false. -func yaml_parser_set_scanner_error(parser *yaml_parser_t, context string, context_mark yaml_mark_t, problem string) bool { - parser.error = yaml_SCANNER_ERROR - parser.context = context - parser.context_mark = context_mark - parser.problem = problem - parser.problem_mark = parser.mark - return false -} - -func yaml_parser_set_scanner_tag_error(parser *yaml_parser_t, directive bool, context_mark yaml_mark_t, problem string) bool { - context := "while parsing a tag" - if directive { - context = "while parsing a %TAG directive" - } - return yaml_parser_set_scanner_error(parser, context, context_mark, "did not find URI escaped octet") -} - -func trace(args ...interface{}) func() { - pargs := append([]interface{}{"+++"}, args...) - fmt.Println(pargs...) - pargs = append([]interface{}{"---"}, args...) - return func() { fmt.Println(pargs...) } -} - -// Ensure that the tokens queue contains at least one token which can be -// returned to the Parser. -func yaml_parser_fetch_more_tokens(parser *yaml_parser_t) bool { - // While we need more tokens to fetch, do it. - for { - // Check if we really need to fetch more tokens. - need_more_tokens := false - - if parser.tokens_head == len(parser.tokens) { - // Queue is empty. - need_more_tokens = true - } else { - // Check if any potential simple key may occupy the head position. - if !yaml_parser_stale_simple_keys(parser) { - return false - } - - for i := range parser.simple_keys { - simple_key := &parser.simple_keys[i] - if simple_key.possible && simple_key.token_number == parser.tokens_parsed { - need_more_tokens = true - break - } - } - } - - // We are finished. - if !need_more_tokens { - break - } - // Fetch the next token. - if !yaml_parser_fetch_next_token(parser) { - return false - } - } - - parser.token_available = true - return true -} - -// The dispatcher for token fetchers. -func yaml_parser_fetch_next_token(parser *yaml_parser_t) bool { - // Ensure that the buffer is initialized. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - // Check if we just started scanning. Fetch STREAM-START then. - if !parser.stream_start_produced { - return yaml_parser_fetch_stream_start(parser) - } - - // Eat whitespaces and comments until we reach the next token. - if !yaml_parser_scan_to_next_token(parser) { - return false - } - - // Remove obsolete potential simple keys. - if !yaml_parser_stale_simple_keys(parser) { - return false - } - - // Check the indentation level against the current column. - if !yaml_parser_unroll_indent(parser, parser.mark.column) { - return false - } - - // Ensure that the buffer contains at least 4 characters. 4 is the length - // of the longest indicators ('--- ' and '... '). - if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { - return false - } - - // Is it the end of the stream? - if is_z(parser.buffer, parser.buffer_pos) { - return yaml_parser_fetch_stream_end(parser) - } - - // Is it a directive? - if parser.mark.column == 0 && parser.buffer[parser.buffer_pos] == '%' { - return yaml_parser_fetch_directive(parser) - } - - buf := parser.buffer - pos := parser.buffer_pos - - // Is it the document start indicator? - if parser.mark.column == 0 && buf[pos] == '-' && buf[pos+1] == '-' && buf[pos+2] == '-' && is_blankz(buf, pos+3) { - return yaml_parser_fetch_document_indicator(parser, yaml_DOCUMENT_START_TOKEN) - } - - // Is it the document end indicator? - if parser.mark.column == 0 && buf[pos] == '.' && buf[pos+1] == '.' && buf[pos+2] == '.' && is_blankz(buf, pos+3) { - return yaml_parser_fetch_document_indicator(parser, yaml_DOCUMENT_END_TOKEN) - } - - // Is it the flow sequence start indicator? - if buf[pos] == '[' { - return yaml_parser_fetch_flow_collection_start(parser, yaml_FLOW_SEQUENCE_START_TOKEN) - } - - // Is it the flow mapping start indicator? - if parser.buffer[parser.buffer_pos] == '{' { - return yaml_parser_fetch_flow_collection_start(parser, yaml_FLOW_MAPPING_START_TOKEN) - } - - // Is it the flow sequence end indicator? - if parser.buffer[parser.buffer_pos] == ']' { - return yaml_parser_fetch_flow_collection_end(parser, - yaml_FLOW_SEQUENCE_END_TOKEN) - } - - // Is it the flow mapping end indicator? - if parser.buffer[parser.buffer_pos] == '}' { - return yaml_parser_fetch_flow_collection_end(parser, - yaml_FLOW_MAPPING_END_TOKEN) - } - - // Is it the flow entry indicator? - if parser.buffer[parser.buffer_pos] == ',' { - return yaml_parser_fetch_flow_entry(parser) - } - - // Is it the block entry indicator? - if parser.buffer[parser.buffer_pos] == '-' && is_blankz(parser.buffer, parser.buffer_pos+1) { - return yaml_parser_fetch_block_entry(parser) - } - - // Is it the key indicator? - if parser.buffer[parser.buffer_pos] == '?' && (parser.flow_level > 0 || is_blankz(parser.buffer, parser.buffer_pos+1)) { - return yaml_parser_fetch_key(parser) - } - - // Is it the value indicator? - if parser.buffer[parser.buffer_pos] == ':' && (parser.flow_level > 0 || is_blankz(parser.buffer, parser.buffer_pos+1)) { - return yaml_parser_fetch_value(parser) - } - - // Is it an alias? - if parser.buffer[parser.buffer_pos] == '*' { - return yaml_parser_fetch_anchor(parser, yaml_ALIAS_TOKEN) - } - - // Is it an anchor? - if parser.buffer[parser.buffer_pos] == '&' { - return yaml_parser_fetch_anchor(parser, yaml_ANCHOR_TOKEN) - } - - // Is it a tag? - if parser.buffer[parser.buffer_pos] == '!' { - return yaml_parser_fetch_tag(parser) - } - - // Is it a literal scalar? - if parser.buffer[parser.buffer_pos] == '|' && parser.flow_level == 0 { - return yaml_parser_fetch_block_scalar(parser, true) - } - - // Is it a folded scalar? - if parser.buffer[parser.buffer_pos] == '>' && parser.flow_level == 0 { - return yaml_parser_fetch_block_scalar(parser, false) - } - - // Is it a single-quoted scalar? - if parser.buffer[parser.buffer_pos] == '\'' { - return yaml_parser_fetch_flow_scalar(parser, true) - } - - // Is it a double-quoted scalar? - if parser.buffer[parser.buffer_pos] == '"' { - return yaml_parser_fetch_flow_scalar(parser, false) - } - - // Is it a plain scalar? - // - // A plain scalar may start with any non-blank characters except - // - // '-', '?', ':', ',', '[', ']', '{', '}', - // '#', '&', '*', '!', '|', '>', '\'', '\"', - // '%', '@', '`'. - // - // In the block context (and, for the '-' indicator, in the flow context - // too), it may also start with the characters - // - // '-', '?', ':' - // - // if it is followed by a non-space character. - // - // The last rule is more restrictive than the specification requires. - // [Go] Make this logic more reasonable. - //switch parser.buffer[parser.buffer_pos] { - //case '-', '?', ':', ',', '?', '-', ',', ':', ']', '[', '}', '{', '&', '#', '!', '*', '>', '|', '"', '\'', '@', '%', '-', '`': - //} - if !(is_blankz(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == '-' || - parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == ':' || - parser.buffer[parser.buffer_pos] == ',' || parser.buffer[parser.buffer_pos] == '[' || - parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '{' || - parser.buffer[parser.buffer_pos] == '}' || parser.buffer[parser.buffer_pos] == '#' || - parser.buffer[parser.buffer_pos] == '&' || parser.buffer[parser.buffer_pos] == '*' || - parser.buffer[parser.buffer_pos] == '!' || parser.buffer[parser.buffer_pos] == '|' || - parser.buffer[parser.buffer_pos] == '>' || parser.buffer[parser.buffer_pos] == '\'' || - parser.buffer[parser.buffer_pos] == '"' || parser.buffer[parser.buffer_pos] == '%' || - parser.buffer[parser.buffer_pos] == '@' || parser.buffer[parser.buffer_pos] == '`') || - (parser.buffer[parser.buffer_pos] == '-' && !is_blank(parser.buffer, parser.buffer_pos+1)) || - (parser.flow_level == 0 && - (parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == ':') && - !is_blankz(parser.buffer, parser.buffer_pos+1)) { - return yaml_parser_fetch_plain_scalar(parser) - } - - // If we don't determine the token type so far, it is an error. - return yaml_parser_set_scanner_error(parser, - "while scanning for the next token", parser.mark, - "found character that cannot start any token") -} - -// Check the list of potential simple keys and remove the positions that -// cannot contain simple keys anymore. -func yaml_parser_stale_simple_keys(parser *yaml_parser_t) bool { - // Check for a potential simple key for each flow level. - for i := range parser.simple_keys { - simple_key := &parser.simple_keys[i] - - // The specification requires that a simple key - // - // - is limited to a single line, - // - is shorter than 1024 characters. - if simple_key.possible && (simple_key.mark.line < parser.mark.line || simple_key.mark.index+1024 < parser.mark.index) { - - // Check if the potential simple key to be removed is required. - if simple_key.required { - return yaml_parser_set_scanner_error(parser, - "while scanning a simple key", simple_key.mark, - "could not find expected ':'") - } - simple_key.possible = false - } - } - return true -} - -// Check if a simple key may start at the current position and add it if -// needed. -func yaml_parser_save_simple_key(parser *yaml_parser_t) bool { - // A simple key is required at the current position if the scanner is in - // the block context and the current column coincides with the indentation - // level. - - required := parser.flow_level == 0 && parser.indent == parser.mark.column - - // A simple key is required only when it is the first token in the current - // line. Therefore it is always allowed. But we add a check anyway. - if required && !parser.simple_key_allowed { - panic("should not happen") - } - - // - // If the current position may start a simple key, save it. - // - if parser.simple_key_allowed { - simple_key := yaml_simple_key_t{ - possible: true, - required: required, - token_number: parser.tokens_parsed + (len(parser.tokens) - parser.tokens_head), - } - simple_key.mark = parser.mark - - if !yaml_parser_remove_simple_key(parser) { - return false - } - parser.simple_keys[len(parser.simple_keys)-1] = simple_key - } - return true -} - -// Remove a potential simple key at the current flow level. -func yaml_parser_remove_simple_key(parser *yaml_parser_t) bool { - i := len(parser.simple_keys) - 1 - if parser.simple_keys[i].possible { - // If the key is required, it is an error. - if parser.simple_keys[i].required { - return yaml_parser_set_scanner_error(parser, - "while scanning a simple key", parser.simple_keys[i].mark, - "could not find expected ':'") - } - } - // Remove the key from the stack. - parser.simple_keys[i].possible = false - return true -} - -// Increase the flow level and resize the simple key list if needed. -func yaml_parser_increase_flow_level(parser *yaml_parser_t) bool { - // Reset the simple key on the next level. - parser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{}) - - // Increase the flow level. - parser.flow_level++ - return true -} - -// Decrease the flow level. -func yaml_parser_decrease_flow_level(parser *yaml_parser_t) bool { - if parser.flow_level > 0 { - parser.flow_level-- - parser.simple_keys = parser.simple_keys[:len(parser.simple_keys)-1] - } - return true -} - -// Push the current indentation level to the stack and set the new level -// the current column is greater than the indentation level. In this case, -// append or insert the specified token into the token queue. -func yaml_parser_roll_indent(parser *yaml_parser_t, column, number int, typ yaml_token_type_t, mark yaml_mark_t) bool { - // In the flow context, do nothing. - if parser.flow_level > 0 { - return true - } - - if parser.indent < column { - // Push the current indentation level to the stack and set the new - // indentation level. - parser.indents = append(parser.indents, parser.indent) - parser.indent = column - - // Create a token and insert it into the queue. - token := yaml_token_t{ - typ: typ, - start_mark: mark, - end_mark: mark, - } - if number > -1 { - number -= parser.tokens_parsed - } - yaml_insert_token(parser, number, &token) - } - return true -} - -// Pop indentation levels from the indents stack until the current level -// becomes less or equal to the column. For each intendation level, append -// the BLOCK-END token. -func yaml_parser_unroll_indent(parser *yaml_parser_t, column int) bool { - // In the flow context, do nothing. - if parser.flow_level > 0 { - return true - } - - // Loop through the intendation levels in the stack. - for parser.indent > column { - // Create a token and append it to the queue. - token := yaml_token_t{ - typ: yaml_BLOCK_END_TOKEN, - start_mark: parser.mark, - end_mark: parser.mark, - } - yaml_insert_token(parser, -1, &token) - - // Pop the indentation level. - parser.indent = parser.indents[len(parser.indents)-1] - parser.indents = parser.indents[:len(parser.indents)-1] - } - return true -} - -// Initialize the scanner and produce the STREAM-START token. -func yaml_parser_fetch_stream_start(parser *yaml_parser_t) bool { - - // Set the initial indentation. - parser.indent = -1 - - // Initialize the simple key stack. - parser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{}) - - // A simple key is allowed at the beginning of the stream. - parser.simple_key_allowed = true - - // We have started. - parser.stream_start_produced = true - - // Create the STREAM-START token and append it to the queue. - token := yaml_token_t{ - typ: yaml_STREAM_START_TOKEN, - start_mark: parser.mark, - end_mark: parser.mark, - encoding: parser.encoding, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the STREAM-END token and shut down the scanner. -func yaml_parser_fetch_stream_end(parser *yaml_parser_t) bool { - - // Force new line. - if parser.mark.column != 0 { - parser.mark.column = 0 - parser.mark.line++ - } - - // Reset the indentation level. - if !yaml_parser_unroll_indent(parser, -1) { - return false - } - - // Reset simple keys. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - parser.simple_key_allowed = false - - // Create the STREAM-END token and append it to the queue. - token := yaml_token_t{ - typ: yaml_STREAM_END_TOKEN, - start_mark: parser.mark, - end_mark: parser.mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce a VERSION-DIRECTIVE or TAG-DIRECTIVE token. -func yaml_parser_fetch_directive(parser *yaml_parser_t) bool { - // Reset the indentation level. - if !yaml_parser_unroll_indent(parser, -1) { - return false - } - - // Reset simple keys. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - parser.simple_key_allowed = false - - // Create the YAML-DIRECTIVE or TAG-DIRECTIVE token. - token := yaml_token_t{} - if !yaml_parser_scan_directive(parser, &token) { - return false - } - // Append the token to the queue. - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the DOCUMENT-START or DOCUMENT-END token. -func yaml_parser_fetch_document_indicator(parser *yaml_parser_t, typ yaml_token_type_t) bool { - // Reset the indentation level. - if !yaml_parser_unroll_indent(parser, -1) { - return false - } - - // Reset simple keys. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - parser.simple_key_allowed = false - - // Consume the token. - start_mark := parser.mark - - skip(parser) - skip(parser) - skip(parser) - - end_mark := parser.mark - - // Create the DOCUMENT-START or DOCUMENT-END token. - token := yaml_token_t{ - typ: typ, - start_mark: start_mark, - end_mark: end_mark, - } - // Append the token to the queue. - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the FLOW-SEQUENCE-START or FLOW-MAPPING-START token. -func yaml_parser_fetch_flow_collection_start(parser *yaml_parser_t, typ yaml_token_type_t) bool { - // The indicators '[' and '{' may start a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // Increase the flow level. - if !yaml_parser_increase_flow_level(parser) { - return false - } - - // A simple key may follow the indicators '[' and '{'. - parser.simple_key_allowed = true - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the FLOW-SEQUENCE-START of FLOW-MAPPING-START token. - token := yaml_token_t{ - typ: typ, - start_mark: start_mark, - end_mark: end_mark, - } - // Append the token to the queue. - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the FLOW-SEQUENCE-END or FLOW-MAPPING-END token. -func yaml_parser_fetch_flow_collection_end(parser *yaml_parser_t, typ yaml_token_type_t) bool { - // Reset any potential simple key on the current flow level. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // Decrease the flow level. - if !yaml_parser_decrease_flow_level(parser) { - return false - } - - // No simple keys after the indicators ']' and '}'. - parser.simple_key_allowed = false - - // Consume the token. - - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the FLOW-SEQUENCE-END of FLOW-MAPPING-END token. - token := yaml_token_t{ - typ: typ, - start_mark: start_mark, - end_mark: end_mark, - } - // Append the token to the queue. - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the FLOW-ENTRY token. -func yaml_parser_fetch_flow_entry(parser *yaml_parser_t) bool { - // Reset any potential simple keys on the current flow level. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // Simple keys are allowed after ','. - parser.simple_key_allowed = true - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the FLOW-ENTRY token and append it to the queue. - token := yaml_token_t{ - typ: yaml_FLOW_ENTRY_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the BLOCK-ENTRY token. -func yaml_parser_fetch_block_entry(parser *yaml_parser_t) bool { - // Check if the scanner is in the block context. - if parser.flow_level == 0 { - // Check if we are allowed to start a new entry. - if !parser.simple_key_allowed { - return yaml_parser_set_scanner_error(parser, "", parser.mark, - "block sequence entries are not allowed in this context") - } - // Add the BLOCK-SEQUENCE-START token if needed. - if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_SEQUENCE_START_TOKEN, parser.mark) { - return false - } - } else { - // It is an error for the '-' indicator to occur in the flow context, - // but we let the Parser detect and report about it because the Parser - // is able to point to the context. - } - - // Reset any potential simple keys on the current flow level. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // Simple keys are allowed after '-'. - parser.simple_key_allowed = true - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the BLOCK-ENTRY token and append it to the queue. - token := yaml_token_t{ - typ: yaml_BLOCK_ENTRY_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the KEY token. -func yaml_parser_fetch_key(parser *yaml_parser_t) bool { - - // In the block context, additional checks are required. - if parser.flow_level == 0 { - // Check if we are allowed to start a new key (not nessesary simple). - if !parser.simple_key_allowed { - return yaml_parser_set_scanner_error(parser, "", parser.mark, - "mapping keys are not allowed in this context") - } - // Add the BLOCK-MAPPING-START token if needed. - if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_MAPPING_START_TOKEN, parser.mark) { - return false - } - } - - // Reset any potential simple keys on the current flow level. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // Simple keys are allowed after '?' in the block context. - parser.simple_key_allowed = parser.flow_level == 0 - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the KEY token and append it to the queue. - token := yaml_token_t{ - typ: yaml_KEY_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the VALUE token. -func yaml_parser_fetch_value(parser *yaml_parser_t) bool { - - simple_key := &parser.simple_keys[len(parser.simple_keys)-1] - - // Have we found a simple key? - if simple_key.possible { - // Create the KEY token and insert it into the queue. - token := yaml_token_t{ - typ: yaml_KEY_TOKEN, - start_mark: simple_key.mark, - end_mark: simple_key.mark, - } - yaml_insert_token(parser, simple_key.token_number-parser.tokens_parsed, &token) - - // In the block context, we may need to add the BLOCK-MAPPING-START token. - if !yaml_parser_roll_indent(parser, simple_key.mark.column, - simple_key.token_number, - yaml_BLOCK_MAPPING_START_TOKEN, simple_key.mark) { - return false - } - - // Remove the simple key. - simple_key.possible = false - - // A simple key cannot follow another simple key. - parser.simple_key_allowed = false - - } else { - // The ':' indicator follows a complex key. - - // In the block context, extra checks are required. - if parser.flow_level == 0 { - - // Check if we are allowed to start a complex value. - if !parser.simple_key_allowed { - return yaml_parser_set_scanner_error(parser, "", parser.mark, - "mapping values are not allowed in this context") - } - - // Add the BLOCK-MAPPING-START token if needed. - if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_MAPPING_START_TOKEN, parser.mark) { - return false - } - } - - // Simple keys after ':' are allowed in the block context. - parser.simple_key_allowed = parser.flow_level == 0 - } - - // Consume the token. - start_mark := parser.mark - skip(parser) - end_mark := parser.mark - - // Create the VALUE token and append it to the queue. - token := yaml_token_t{ - typ: yaml_VALUE_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the ALIAS or ANCHOR token. -func yaml_parser_fetch_anchor(parser *yaml_parser_t, typ yaml_token_type_t) bool { - // An anchor or an alias could be a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // A simple key cannot follow an anchor or an alias. - parser.simple_key_allowed = false - - // Create the ALIAS or ANCHOR token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_anchor(parser, &token, typ) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the TAG token. -func yaml_parser_fetch_tag(parser *yaml_parser_t) bool { - // A tag could be a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // A simple key cannot follow a tag. - parser.simple_key_allowed = false - - // Create the TAG token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_tag(parser, &token) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the SCALAR(...,literal) or SCALAR(...,folded) tokens. -func yaml_parser_fetch_block_scalar(parser *yaml_parser_t, literal bool) bool { - // Remove any potential simple keys. - if !yaml_parser_remove_simple_key(parser) { - return false - } - - // A simple key may follow a block scalar. - parser.simple_key_allowed = true - - // Create the SCALAR token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_block_scalar(parser, &token, literal) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the SCALAR(...,single-quoted) or SCALAR(...,double-quoted) tokens. -func yaml_parser_fetch_flow_scalar(parser *yaml_parser_t, single bool) bool { - // A plain scalar could be a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // A simple key cannot follow a flow scalar. - parser.simple_key_allowed = false - - // Create the SCALAR token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_flow_scalar(parser, &token, single) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Produce the SCALAR(...,plain) token. -func yaml_parser_fetch_plain_scalar(parser *yaml_parser_t) bool { - // A plain scalar could be a simple key. - if !yaml_parser_save_simple_key(parser) { - return false - } - - // A simple key cannot follow a flow scalar. - parser.simple_key_allowed = false - - // Create the SCALAR token and append it to the queue. - var token yaml_token_t - if !yaml_parser_scan_plain_scalar(parser, &token) { - return false - } - yaml_insert_token(parser, -1, &token) - return true -} - -// Eat whitespaces and comments until the next token is found. -func yaml_parser_scan_to_next_token(parser *yaml_parser_t) bool { - - // Until the next token is not found. - for { - // Allow the BOM mark to start a line. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if parser.mark.column == 0 && is_bom(parser.buffer, parser.buffer_pos) { - skip(parser) - } - - // Eat whitespaces. - // Tabs are allowed: - // - in the flow context - // - in the block context, but not at the beginning of the line or - // after '-', '?', or ':' (complex value). - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for parser.buffer[parser.buffer_pos] == ' ' || ((parser.flow_level > 0 || !parser.simple_key_allowed) && parser.buffer[parser.buffer_pos] == '\t') { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Eat a comment until a line break. - if parser.buffer[parser.buffer_pos] == '#' { - for !is_breakz(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - } - - // If it is a line break, eat it. - if is_break(parser.buffer, parser.buffer_pos) { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - skip_line(parser) - - // In the block context, a new line may start a simple key. - if parser.flow_level == 0 { - parser.simple_key_allowed = true - } - } else { - break // We have found a token. - } - } - - return true -} - -// Scan a YAML-DIRECTIVE or TAG-DIRECTIVE token. -// -// Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool { - // Eat '%'. - start_mark := parser.mark - skip(parser) - - // Scan the directive name. - var name []byte - if !yaml_parser_scan_directive_name(parser, start_mark, &name) { - return false - } - - // Is it a YAML directive? - if bytes.Equal(name, []byte("YAML")) { - // Scan the VERSION directive value. - var major, minor int8 - if !yaml_parser_scan_version_directive_value(parser, start_mark, &major, &minor) { - return false - } - end_mark := parser.mark - - // Create a VERSION-DIRECTIVE token. - *token = yaml_token_t{ - typ: yaml_VERSION_DIRECTIVE_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - major: major, - minor: minor, - } - - // Is it a TAG directive? - } else if bytes.Equal(name, []byte("TAG")) { - // Scan the TAG directive value. - var handle, prefix []byte - if !yaml_parser_scan_tag_directive_value(parser, start_mark, &handle, &prefix) { - return false - } - end_mark := parser.mark - - // Create a TAG-DIRECTIVE token. - *token = yaml_token_t{ - typ: yaml_TAG_DIRECTIVE_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: handle, - prefix: prefix, - } - - // Unknown directive. - } else { - yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "found uknown directive name") - return false - } - - // Eat the rest of the line including any comments. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - if parser.buffer[parser.buffer_pos] == '#' { - for !is_breakz(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - } - - // Check if we are at the end of the line. - if !is_breakz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "did not find expected comment or line break") - return false - } - - // Eat a line break. - if is_break(parser.buffer, parser.buffer_pos) { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - skip_line(parser) - } - - return true -} - -// Scan the directive name. -// -// Scope: -// %YAML 1.1 # a comment \n -// ^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^ -// -func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark_t, name *[]byte) bool { - // Consume the directive name. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - var s []byte - for is_alpha(parser.buffer, parser.buffer_pos) { - s = read(parser, s) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Check if the name is empty. - if len(s) == 0 { - yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "could not find expected directive name") - return false - } - - // Check for an blank character after the name. - if !is_blankz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a directive", - start_mark, "found unexpected non-alphabetical character") - return false - } - *name = s - return true -} - -// Scan the value of VERSION-DIRECTIVE. -// -// Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^ -func yaml_parser_scan_version_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, major, minor *int8) bool { - // Eat whitespaces. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Consume the major version number. - if !yaml_parser_scan_version_directive_number(parser, start_mark, major) { - return false - } - - // Eat '.'. - if parser.buffer[parser.buffer_pos] != '.' { - return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", - start_mark, "did not find expected digit or '.' character") - } - - skip(parser) - - // Consume the minor version number. - if !yaml_parser_scan_version_directive_number(parser, start_mark, minor) { - return false - } - return true -} - -const max_number_length = 2 - -// Scan the version number of VERSION-DIRECTIVE. -// -// Scope: -// %YAML 1.1 # a comment \n -// ^ -// %YAML 1.1 # a comment \n -// ^ -func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark yaml_mark_t, number *int8) bool { - - // Repeat while the next character is digit. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - var value, length int8 - for is_digit(parser.buffer, parser.buffer_pos) { - // Check if the number is too long. - length++ - if length > max_number_length { - return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", - start_mark, "found extremely long version number") - } - value = value*10 + int8(as_digit(parser.buffer, parser.buffer_pos)) - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Check if the number was present. - if length == 0 { - return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", - start_mark, "did not find expected version number") - } - *number = value - return true -} - -// Scan the value of a TAG-DIRECTIVE token. -// -// Scope: -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -func yaml_parser_scan_tag_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, handle, prefix *[]byte) bool { - var handle_value, prefix_value []byte - - // Eat whitespaces. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Scan a handle. - if !yaml_parser_scan_tag_handle(parser, true, start_mark, &handle_value) { - return false - } - - // Expect a whitespace. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if !is_blank(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a %TAG directive", - start_mark, "did not find expected whitespace") - return false - } - - // Eat whitespaces. - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Scan a prefix. - if !yaml_parser_scan_tag_uri(parser, true, nil, start_mark, &prefix_value) { - return false - } - - // Expect a whitespace or line break. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if !is_blankz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a %TAG directive", - start_mark, "did not find expected whitespace or line break") - return false - } - - *handle = handle_value - *prefix = prefix_value - return true -} - -func yaml_parser_scan_anchor(parser *yaml_parser_t, token *yaml_token_t, typ yaml_token_type_t) bool { - var s []byte - - // Eat the indicator character. - start_mark := parser.mark - skip(parser) - - // Consume the value. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for is_alpha(parser.buffer, parser.buffer_pos) { - s = read(parser, s) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - end_mark := parser.mark - - /* - * Check if length of the anchor is greater than 0 and it is followed by - * a whitespace character or one of the indicators: - * - * '?', ':', ',', ']', '}', '%', '@', '`'. - */ - - if len(s) == 0 || - !(is_blankz(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == '?' || - parser.buffer[parser.buffer_pos] == ':' || parser.buffer[parser.buffer_pos] == ',' || - parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '}' || - parser.buffer[parser.buffer_pos] == '%' || parser.buffer[parser.buffer_pos] == '@' || - parser.buffer[parser.buffer_pos] == '`') { - context := "while scanning an alias" - if typ == yaml_ANCHOR_TOKEN { - context = "while scanning an anchor" - } - yaml_parser_set_scanner_error(parser, context, start_mark, - "did not find expected alphabetic or numeric character") - return false - } - - // Create a token. - *token = yaml_token_t{ - typ: typ, - start_mark: start_mark, - end_mark: end_mark, - value: s, - } - - return true -} - -/* - * Scan a TAG token. - */ - -func yaml_parser_scan_tag(parser *yaml_parser_t, token *yaml_token_t) bool { - var handle, suffix []byte - - start_mark := parser.mark - - // Check if the tag is in the canonical form. - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - - if parser.buffer[parser.buffer_pos+1] == '<' { - // Keep the handle as '' - - // Eat '!<' - skip(parser) - skip(parser) - - // Consume the tag value. - if !yaml_parser_scan_tag_uri(parser, false, nil, start_mark, &suffix) { - return false - } - - // Check for '>' and eat it. - if parser.buffer[parser.buffer_pos] != '>' { - yaml_parser_set_scanner_error(parser, "while scanning a tag", - start_mark, "did not find the expected '>'") - return false - } - - skip(parser) - } else { - // The tag has either the '!suffix' or the '!handle!suffix' form. - - // First, try to scan a handle. - if !yaml_parser_scan_tag_handle(parser, false, start_mark, &handle) { - return false - } - - // Check if it is, indeed, handle. - if handle[0] == '!' && len(handle) > 1 && handle[len(handle)-1] == '!' { - // Scan the suffix now. - if !yaml_parser_scan_tag_uri(parser, false, nil, start_mark, &suffix) { - return false - } - } else { - // It wasn't a handle after all. Scan the rest of the tag. - if !yaml_parser_scan_tag_uri(parser, false, handle, start_mark, &suffix) { - return false - } - - // Set the handle to '!'. - handle = []byte{'!'} - - // A special case: the '!' tag. Set the handle to '' and the - // suffix to '!'. - if len(suffix) == 0 { - handle, suffix = suffix, handle - } - } - } - - // Check the character which ends the tag. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if !is_blankz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a tag", - start_mark, "did not find expected whitespace or line break") - return false - } - - end_mark := parser.mark - - // Create a token. - *token = yaml_token_t{ - typ: yaml_TAG_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: handle, - suffix: suffix, - } - return true -} - -// Scan a tag handle. -func yaml_parser_scan_tag_handle(parser *yaml_parser_t, directive bool, start_mark yaml_mark_t, handle *[]byte) bool { - // Check the initial '!' character. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if parser.buffer[parser.buffer_pos] != '!' { - yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "did not find expected '!'") - return false - } - - var s []byte - - // Copy the '!' character. - s = read(parser, s) - - // Copy all subsequent alphabetical and numerical characters. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - for is_alpha(parser.buffer, parser.buffer_pos) { - s = read(parser, s) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Check if the trailing character is '!' and copy it. - if parser.buffer[parser.buffer_pos] == '!' { - s = read(parser, s) - } else { - // It's either the '!' tag or not really a tag handle. If it's a %TAG - // directive, it's an error. If it's a tag token, it must be a part of URI. - if directive && !(s[0] == '!' && s[1] == 0) { - yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "did not find expected '!'") - return false - } - } - - *handle = s - return true -} - -// Scan a tag. -func yaml_parser_scan_tag_uri(parser *yaml_parser_t, directive bool, head []byte, start_mark yaml_mark_t, uri *[]byte) bool { - //size_t length = head ? strlen((char *)head) : 0 - var s []byte - - // Copy the head if needed. - // - // Note that we don't copy the leading '!' character. - if len(head) > 1 { - s = append(s, head[1:]...) - } - - // Scan the tag. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - // The set of characters that may appear in URI is as follows: - // - // '0'-'9', 'A'-'Z', 'a'-'z', '_', '-', ';', '/', '?', ':', '@', '&', - // '=', '+', '$', ',', '.', '!', '~', '*', '\'', '(', ')', '[', ']', - // '%'. - // [Go] Convert this into more reasonable logic. - for is_alpha(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == ';' || - parser.buffer[parser.buffer_pos] == '/' || parser.buffer[parser.buffer_pos] == '?' || - parser.buffer[parser.buffer_pos] == ':' || parser.buffer[parser.buffer_pos] == '@' || - parser.buffer[parser.buffer_pos] == '&' || parser.buffer[parser.buffer_pos] == '=' || - parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '$' || - parser.buffer[parser.buffer_pos] == ',' || parser.buffer[parser.buffer_pos] == '.' || - parser.buffer[parser.buffer_pos] == '!' || parser.buffer[parser.buffer_pos] == '~' || - parser.buffer[parser.buffer_pos] == '*' || parser.buffer[parser.buffer_pos] == '\'' || - parser.buffer[parser.buffer_pos] == '(' || parser.buffer[parser.buffer_pos] == ')' || - parser.buffer[parser.buffer_pos] == '[' || parser.buffer[parser.buffer_pos] == ']' || - parser.buffer[parser.buffer_pos] == '%' { - // Check if it is a URI-escape sequence. - if parser.buffer[parser.buffer_pos] == '%' { - if !yaml_parser_scan_uri_escapes(parser, directive, start_mark, &s) { - return false - } - } else { - s = read(parser, s) - } - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Check if the tag is non-empty. - if len(s) == 0 { - yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "did not find expected tag URI") - return false - } - *uri = s - return true -} - -// Decode an URI-escape sequence corresponding to a single UTF-8 character. -func yaml_parser_scan_uri_escapes(parser *yaml_parser_t, directive bool, start_mark yaml_mark_t, s *[]byte) bool { - - // Decode the required number of characters. - w := 1024 - for w > 0 { - // Check for a URI-escaped octet. - if parser.unread < 3 && !yaml_parser_update_buffer(parser, 3) { - return false - } - - if !(parser.buffer[parser.buffer_pos] == '%' && - is_hex(parser.buffer, parser.buffer_pos+1) && - is_hex(parser.buffer, parser.buffer_pos+2)) { - return yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "did not find URI escaped octet") - } - - // Get the octet. - octet := byte((as_hex(parser.buffer, parser.buffer_pos+1) << 4) + as_hex(parser.buffer, parser.buffer_pos+2)) - - // If it is the leading octet, determine the length of the UTF-8 sequence. - if w == 1024 { - w = width(octet) - if w == 0 { - return yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "found an incorrect leading UTF-8 octet") - } - } else { - // Check if the trailing octet is correct. - if octet&0xC0 != 0x80 { - return yaml_parser_set_scanner_tag_error(parser, directive, - start_mark, "found an incorrect trailing UTF-8 octet") - } - } - - // Copy the octet and move the pointers. - *s = append(*s, octet) - skip(parser) - skip(parser) - skip(parser) - w-- - } - return true -} - -// Scan a block scalar. -func yaml_parser_scan_block_scalar(parser *yaml_parser_t, token *yaml_token_t, literal bool) bool { - // Eat the indicator '|' or '>'. - start_mark := parser.mark - skip(parser) - - // Scan the additional block scalar indicators. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - // Check for a chomping indicator. - var chomping, increment int - if parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '-' { - // Set the chomping method and eat the indicator. - if parser.buffer[parser.buffer_pos] == '+' { - chomping = +1 - } else { - chomping = -1 - } - skip(parser) - - // Check for an indentation indicator. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if is_digit(parser.buffer, parser.buffer_pos) { - // Check that the intendation is greater than 0. - if parser.buffer[parser.buffer_pos] == '0' { - yaml_parser_set_scanner_error(parser, "while scanning a block scalar", - start_mark, "found an intendation indicator equal to 0") - return false - } - - // Get the intendation level and eat the indicator. - increment = as_digit(parser.buffer, parser.buffer_pos) - skip(parser) - } - - } else if is_digit(parser.buffer, parser.buffer_pos) { - // Do the same as above, but in the opposite order. - - if parser.buffer[parser.buffer_pos] == '0' { - yaml_parser_set_scanner_error(parser, "while scanning a block scalar", - start_mark, "found an intendation indicator equal to 0") - return false - } - increment = as_digit(parser.buffer, parser.buffer_pos) - skip(parser) - - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - if parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '-' { - if parser.buffer[parser.buffer_pos] == '+' { - chomping = +1 - } else { - chomping = -1 - } - skip(parser) - } - } - - // Eat whitespaces and comments to the end of the line. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - for is_blank(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - if parser.buffer[parser.buffer_pos] == '#' { - for !is_breakz(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - } - - // Check if we are at the end of the line. - if !is_breakz(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a block scalar", - start_mark, "did not find expected comment or line break") - return false - } - - // Eat a line break. - if is_break(parser.buffer, parser.buffer_pos) { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - skip_line(parser) - } - - end_mark := parser.mark - - // Set the intendation level if it was specified. - var indent int - if increment > 0 { - if parser.indent >= 0 { - indent = parser.indent + increment - } else { - indent = increment - } - } - - // Scan the leading line breaks and determine the indentation level if needed. - var s, leading_break, trailing_breaks []byte - if !yaml_parser_scan_block_scalar_breaks(parser, &indent, &trailing_breaks, start_mark, &end_mark) { - return false - } - - // Scan the block scalar content. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - var leading_blank, trailing_blank bool - for parser.mark.column == indent && !is_z(parser.buffer, parser.buffer_pos) { - // We are at the beginning of a non-empty line. - - // Is it a trailing whitespace? - trailing_blank = is_blank(parser.buffer, parser.buffer_pos) - - // Check if we need to fold the leading line break. - if !literal && !leading_blank && !trailing_blank && len(leading_break) > 0 && leading_break[0] == '\n' { - // Do we need to join the lines by space? - if len(trailing_breaks) == 0 { - s = append(s, ' ') - } - } else { - s = append(s, leading_break...) - } - leading_break = leading_break[:0] - - // Append the remaining line breaks. - s = append(s, trailing_breaks...) - trailing_breaks = trailing_breaks[:0] - - // Is it a leading whitespace? - leading_blank = is_blank(parser.buffer, parser.buffer_pos) - - // Consume the current line. - for !is_breakz(parser.buffer, parser.buffer_pos) { - s = read(parser, s) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Consume the line break. - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - - leading_break = read_line(parser, leading_break) - - // Eat the following intendation spaces and line breaks. - if !yaml_parser_scan_block_scalar_breaks(parser, &indent, &trailing_breaks, start_mark, &end_mark) { - return false - } - } - - // Chomp the tail. - if chomping != -1 { - s = append(s, leading_break...) - } - if chomping == 1 { - s = append(s, trailing_breaks...) - } - - // Create a token. - *token = yaml_token_t{ - typ: yaml_SCALAR_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: s, - style: yaml_LITERAL_SCALAR_STYLE, - } - if !literal { - token.style = yaml_FOLDED_SCALAR_STYLE - } - return true -} - -// Scan intendation spaces and line breaks for a block scalar. Determine the -// intendation level if needed. -func yaml_parser_scan_block_scalar_breaks(parser *yaml_parser_t, indent *int, breaks *[]byte, start_mark yaml_mark_t, end_mark *yaml_mark_t) bool { - *end_mark = parser.mark - - // Eat the intendation spaces and line breaks. - max_indent := 0 - for { - // Eat the intendation spaces. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - for (*indent == 0 || parser.mark.column < *indent) && is_space(parser.buffer, parser.buffer_pos) { - skip(parser) - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - if parser.mark.column > max_indent { - max_indent = parser.mark.column - } - - // Check for a tab character messing the intendation. - if (*indent == 0 || parser.mark.column < *indent) && is_tab(parser.buffer, parser.buffer_pos) { - return yaml_parser_set_scanner_error(parser, "while scanning a block scalar", - start_mark, "found a tab character where an intendation space is expected") - } - - // Have we found a non-empty line? - if !is_break(parser.buffer, parser.buffer_pos) { - break - } - - // Consume the line break. - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - // [Go] Should really be returning breaks instead. - *breaks = read_line(parser, *breaks) - *end_mark = parser.mark - } - - // Determine the indentation level if needed. - if *indent == 0 { - *indent = max_indent - if *indent < parser.indent+1 { - *indent = parser.indent + 1 - } - if *indent < 1 { - *indent = 1 - } - } - return true -} - -// Scan a quoted scalar. -func yaml_parser_scan_flow_scalar(parser *yaml_parser_t, token *yaml_token_t, single bool) bool { - // Eat the left quote. - start_mark := parser.mark - skip(parser) - - // Consume the content of the quoted scalar. - var s, leading_break, trailing_breaks, whitespaces []byte - for { - // Check that there are no document indicators at the beginning of the line. - if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { - return false - } - - if parser.mark.column == 0 && - ((parser.buffer[parser.buffer_pos+0] == '-' && - parser.buffer[parser.buffer_pos+1] == '-' && - parser.buffer[parser.buffer_pos+2] == '-') || - (parser.buffer[parser.buffer_pos+0] == '.' && - parser.buffer[parser.buffer_pos+1] == '.' && - parser.buffer[parser.buffer_pos+2] == '.')) && - is_blankz(parser.buffer, parser.buffer_pos+3) { - yaml_parser_set_scanner_error(parser, "while scanning a quoted scalar", - start_mark, "found unexpected document indicator") - return false - } - - // Check for EOF. - if is_z(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a quoted scalar", - start_mark, "found unexpected end of stream") - return false - } - - // Consume non-blank characters. - leading_blanks := false - for !is_blankz(parser.buffer, parser.buffer_pos) { - if single && parser.buffer[parser.buffer_pos] == '\'' && parser.buffer[parser.buffer_pos+1] == '\'' { - // Is is an escaped single quote. - s = append(s, '\'') - skip(parser) - skip(parser) - - } else if single && parser.buffer[parser.buffer_pos] == '\'' { - // It is a right single quote. - break - } else if !single && parser.buffer[parser.buffer_pos] == '"' { - // It is a right double quote. - break - - } else if !single && parser.buffer[parser.buffer_pos] == '\\' && is_break(parser.buffer, parser.buffer_pos+1) { - // It is an escaped line break. - if parser.unread < 3 && !yaml_parser_update_buffer(parser, 3) { - return false - } - skip(parser) - skip_line(parser) - leading_blanks = true - break - - } else if !single && parser.buffer[parser.buffer_pos] == '\\' { - // It is an escape sequence. - code_length := 0 - - // Check the escape character. - switch parser.buffer[parser.buffer_pos+1] { - case '0': - s = append(s, 0) - case 'a': - s = append(s, '\x07') - case 'b': - s = append(s, '\x08') - case 't', '\t': - s = append(s, '\x09') - case 'n': - s = append(s, '\x0A') - case 'v': - s = append(s, '\x0B') - case 'f': - s = append(s, '\x0C') - case 'r': - s = append(s, '\x0D') - case 'e': - s = append(s, '\x1B') - case ' ': - s = append(s, '\x20') - case '"': - s = append(s, '"') - case '\'': - s = append(s, '\'') - case '\\': - s = append(s, '\\') - case 'N': // NEL (#x85) - s = append(s, '\xC2') - s = append(s, '\x85') - case '_': // #xA0 - s = append(s, '\xC2') - s = append(s, '\xA0') - case 'L': // LS (#x2028) - s = append(s, '\xE2') - s = append(s, '\x80') - s = append(s, '\xA8') - case 'P': // PS (#x2029) - s = append(s, '\xE2') - s = append(s, '\x80') - s = append(s, '\xA9') - case 'x': - code_length = 2 - case 'u': - code_length = 4 - case 'U': - code_length = 8 - default: - yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", - start_mark, "found unknown escape character") - return false - } - - skip(parser) - skip(parser) - - // Consume an arbitrary escape code. - if code_length > 0 { - var value int - - // Scan the character value. - if parser.unread < code_length && !yaml_parser_update_buffer(parser, code_length) { - return false - } - for k := 0; k < code_length; k++ { - if !is_hex(parser.buffer, parser.buffer_pos+k) { - yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", - start_mark, "did not find expected hexdecimal number") - return false - } - value = (value << 4) + as_hex(parser.buffer, parser.buffer_pos+k) - } - - // Check the value and write the character. - if (value >= 0xD800 && value <= 0xDFFF) || value > 0x10FFFF { - yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", - start_mark, "found invalid Unicode character escape code") - return false - } - if value <= 0x7F { - s = append(s, byte(value)) - } else if value <= 0x7FF { - s = append(s, byte(0xC0+(value>>6))) - s = append(s, byte(0x80+(value&0x3F))) - } else if value <= 0xFFFF { - s = append(s, byte(0xE0+(value>>12))) - s = append(s, byte(0x80+((value>>6)&0x3F))) - s = append(s, byte(0x80+(value&0x3F))) - } else { - s = append(s, byte(0xF0+(value>>18))) - s = append(s, byte(0x80+((value>>12)&0x3F))) - s = append(s, byte(0x80+((value>>6)&0x3F))) - s = append(s, byte(0x80+(value&0x3F))) - } - - // Advance the pointer. - for k := 0; k < code_length; k++ { - skip(parser) - } - } - } else { - // It is a non-escaped non-blank character. - s = read(parser, s) - } - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - } - - // Check if we are at the end of the scalar. - if single { - if parser.buffer[parser.buffer_pos] == '\'' { - break - } - } else { - if parser.buffer[parser.buffer_pos] == '"' { - break - } - } - - // Consume blank characters. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos) { - if is_blank(parser.buffer, parser.buffer_pos) { - // Consume a space or a tab character. - if !leading_blanks { - whitespaces = read(parser, whitespaces) - } else { - skip(parser) - } - } else { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - - // Check if it is a first line break. - if !leading_blanks { - whitespaces = whitespaces[:0] - leading_break = read_line(parser, leading_break) - leading_blanks = true - } else { - trailing_breaks = read_line(parser, trailing_breaks) - } - } - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Join the whitespaces or fold line breaks. - if leading_blanks { - // Do we need to fold line breaks? - if len(leading_break) > 0 && leading_break[0] == '\n' { - if len(trailing_breaks) == 0 { - s = append(s, ' ') - } else { - s = append(s, trailing_breaks...) - } - } else { - s = append(s, leading_break...) - s = append(s, trailing_breaks...) - } - trailing_breaks = trailing_breaks[:0] - leading_break = leading_break[:0] - } else { - s = append(s, whitespaces...) - whitespaces = whitespaces[:0] - } - } - - // Eat the right quote. - skip(parser) - end_mark := parser.mark - - // Create a token. - *token = yaml_token_t{ - typ: yaml_SCALAR_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: s, - style: yaml_SINGLE_QUOTED_SCALAR_STYLE, - } - if !single { - token.style = yaml_DOUBLE_QUOTED_SCALAR_STYLE - } - return true -} - -// Scan a plain scalar. -func yaml_parser_scan_plain_scalar(parser *yaml_parser_t, token *yaml_token_t) bool { - - var s, leading_break, trailing_breaks, whitespaces []byte - var leading_blanks bool - var indent = parser.indent + 1 - - start_mark := parser.mark - end_mark := parser.mark - - // Consume the content of the plain scalar. - for { - // Check for a document indicator. - if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { - return false - } - if parser.mark.column == 0 && - ((parser.buffer[parser.buffer_pos+0] == '-' && - parser.buffer[parser.buffer_pos+1] == '-' && - parser.buffer[parser.buffer_pos+2] == '-') || - (parser.buffer[parser.buffer_pos+0] == '.' && - parser.buffer[parser.buffer_pos+1] == '.' && - parser.buffer[parser.buffer_pos+2] == '.')) && - is_blankz(parser.buffer, parser.buffer_pos+3) { - break - } - - // Check for a comment. - if parser.buffer[parser.buffer_pos] == '#' { - break - } - - // Consume non-blank characters. - for !is_blankz(parser.buffer, parser.buffer_pos) { - - // Check for 'x:x' in the flow context. TODO: Fix the test "spec-08-13". - if parser.flow_level > 0 && - parser.buffer[parser.buffer_pos] == ':' && - !is_blankz(parser.buffer, parser.buffer_pos+1) { - yaml_parser_set_scanner_error(parser, "while scanning a plain scalar", - start_mark, "found unexpected ':'") - return false - } - - // Check for indicators that may end a plain scalar. - if (parser.buffer[parser.buffer_pos] == ':' && is_blankz(parser.buffer, parser.buffer_pos+1)) || - (parser.flow_level > 0 && - (parser.buffer[parser.buffer_pos] == ',' || parser.buffer[parser.buffer_pos] == ':' || - parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == '[' || - parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '{' || - parser.buffer[parser.buffer_pos] == '}')) { - break - } - - // Check if we need to join whitespaces and breaks. - if leading_blanks || len(whitespaces) > 0 { - if leading_blanks { - // Do we need to fold line breaks? - if leading_break[0] == '\n' { - if len(trailing_breaks) == 0 { - s = append(s, ' ') - } else { - s = append(s, trailing_breaks...) - } - } else { - s = append(s, leading_break...) - s = append(s, trailing_breaks...) - } - trailing_breaks = trailing_breaks[:0] - leading_break = leading_break[:0] - leading_blanks = false - } else { - s = append(s, whitespaces...) - whitespaces = whitespaces[:0] - } - } - - // Copy the character. - s = read(parser, s) - - end_mark = parser.mark - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - } - - // Is it the end? - if !(is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos)) { - break - } - - // Consume blank characters. - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - - for is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos) { - if is_blank(parser.buffer, parser.buffer_pos) { - - // Check for tab character that abuse intendation. - if leading_blanks && parser.mark.column < indent && is_tab(parser.buffer, parser.buffer_pos) { - yaml_parser_set_scanner_error(parser, "while scanning a plain scalar", - start_mark, "found a tab character that violate intendation") - return false - } - - // Consume a space or a tab character. - if !leading_blanks { - whitespaces = read(parser, whitespaces) - } else { - skip(parser) - } - } else { - if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { - return false - } - - // Check if it is a first line break. - if !leading_blanks { - whitespaces = whitespaces[:0] - leading_break = read_line(parser, leading_break) - leading_blanks = true - } else { - trailing_breaks = read_line(parser, trailing_breaks) - } - } - if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { - return false - } - } - - // Check intendation level. - if parser.flow_level == 0 && parser.mark.column < indent { - break - } - } - - // Create a token. - *token = yaml_token_t{ - typ: yaml_SCALAR_TOKEN, - start_mark: start_mark, - end_mark: end_mark, - value: s, - style: yaml_PLAIN_SCALAR_STYLE, - } - - // Note that we change the 'simple_key_allowed' flag. - if leading_blanks { - parser.simple_key_allowed = true - } - return true -} diff --git a/third_party/src/gopkg.in/yaml.v2/sorter.go b/third_party/src/gopkg.in/yaml.v2/sorter.go deleted file mode 100644 index 5958822..0000000 --- a/third_party/src/gopkg.in/yaml.v2/sorter.go +++ /dev/null @@ -1,104 +0,0 @@ -package yaml - -import ( - "reflect" - "unicode" -) - -type keyList []reflect.Value - -func (l keyList) Len() int { return len(l) } -func (l keyList) Swap(i, j int) { l[i], l[j] = l[j], l[i] } -func (l keyList) Less(i, j int) bool { - a := l[i] - b := l[j] - ak := a.Kind() - bk := b.Kind() - for (ak == reflect.Interface || ak == reflect.Ptr) && !a.IsNil() { - a = a.Elem() - ak = a.Kind() - } - for (bk == reflect.Interface || bk == reflect.Ptr) && !b.IsNil() { - b = b.Elem() - bk = b.Kind() - } - af, aok := keyFloat(a) - bf, bok := keyFloat(b) - if aok && bok { - if af != bf { - return af < bf - } - if ak != bk { - return ak < bk - } - return numLess(a, b) - } - if ak != reflect.String || bk != reflect.String { - return ak < bk - } - ar, br := []rune(a.String()), []rune(b.String()) - for i := 0; i < len(ar) && i < len(br); i++ { - if ar[i] == br[i] { - continue - } - al := unicode.IsLetter(ar[i]) - bl := unicode.IsLetter(br[i]) - if al && bl { - return ar[i] < br[i] - } - if al || bl { - return bl - } - var ai, bi int - var an, bn int64 - for ai = i; ai < len(ar) && unicode.IsDigit(ar[ai]); ai++ { - an = an*10 + int64(ar[ai]-'0') - } - for bi = i; bi < len(br) && unicode.IsDigit(br[bi]); bi++ { - bn = bn*10 + int64(br[bi]-'0') - } - if an != bn { - return an < bn - } - if ai != bi { - return ai < bi - } - return ar[i] < br[i] - } - return len(ar) < len(br) -} - -// keyFloat returns a float value for v if it is a number/bool -// and whether it is a number/bool or not. -func keyFloat(v reflect.Value) (f float64, ok bool) { - switch v.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return float64(v.Int()), true - case reflect.Float32, reflect.Float64: - return v.Float(), true - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return float64(v.Uint()), true - case reflect.Bool: - if v.Bool() { - return 1, true - } - return 0, true - } - return 0, false -} - -// numLess returns whether a < b. -// a and b must necessarily have the same kind. -func numLess(a, b reflect.Value) bool { - switch a.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return a.Int() < b.Int() - case reflect.Float32, reflect.Float64: - return a.Float() < b.Float() - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return a.Uint() < b.Uint() - case reflect.Bool: - return !a.Bool() && b.Bool() - } - panic("not a number") -} diff --git a/third_party/src/gopkg.in/yaml.v2/suite_test.go b/third_party/src/gopkg.in/yaml.v2/suite_test.go deleted file mode 100644 index c5cf1ed..0000000 --- a/third_party/src/gopkg.in/yaml.v2/suite_test.go +++ /dev/null @@ -1,12 +0,0 @@ -package yaml_test - -import ( - . "gopkg.in/check.v1" - "testing" -) - -func Test(t *testing.T) { TestingT(t) } - -type S struct{} - -var _ = Suite(&S{}) diff --git a/third_party/src/gopkg.in/yaml.v2/writerc.go b/third_party/src/gopkg.in/yaml.v2/writerc.go deleted file mode 100644 index 190362f..0000000 --- a/third_party/src/gopkg.in/yaml.v2/writerc.go +++ /dev/null @@ -1,89 +0,0 @@ -package yaml - -// Set the writer error and return false. -func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool { - emitter.error = yaml_WRITER_ERROR - emitter.problem = problem - return false -} - -// Flush the output buffer. -func yaml_emitter_flush(emitter *yaml_emitter_t) bool { - if emitter.write_handler == nil { - panic("write handler not set") - } - - // Check if the buffer is empty. - if emitter.buffer_pos == 0 { - return true - } - - // If the output encoding is UTF-8, we don't need to recode the buffer. - if emitter.encoding == yaml_UTF8_ENCODING { - if err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil { - return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error()) - } - emitter.buffer_pos = 0 - return true - } - - // Recode the buffer into the raw buffer. - var low, high int - if emitter.encoding == yaml_UTF16LE_ENCODING { - low, high = 0, 1 - } else { - high, low = 1, 0 - } - - pos := 0 - for pos < emitter.buffer_pos { - // See the "reader.c" code for more details on UTF-8 encoding. Note - // that we assume that the buffer contains a valid UTF-8 sequence. - - // Read the next UTF-8 character. - octet := emitter.buffer[pos] - - var w int - var value rune - switch { - case octet&0x80 == 0x00: - w, value = 1, rune(octet&0x7F) - case octet&0xE0 == 0xC0: - w, value = 2, rune(octet&0x1F) - case octet&0xF0 == 0xE0: - w, value = 3, rune(octet&0x0F) - case octet&0xF8 == 0xF0: - w, value = 4, rune(octet&0x07) - } - for k := 1; k < w; k++ { - octet = emitter.buffer[pos+k] - value = (value << 6) + (rune(octet) & 0x3F) - } - pos += w - - // Write the character. - if value < 0x10000 { - var b [2]byte - b[high] = byte(value >> 8) - b[low] = byte(value & 0xFF) - emitter.raw_buffer = append(emitter.raw_buffer, b[0], b[1]) - } else { - // Write the character using a surrogate pair (check "reader.c"). - var b [4]byte - value -= 0x10000 - b[high] = byte(0xD8 + (value >> 18)) - b[low] = byte((value >> 10) & 0xFF) - b[high+2] = byte(0xDC + ((value >> 8) & 0xFF)) - b[low+2] = byte(value & 0xFF) - emitter.raw_buffer = append(emitter.raw_buffer, b[0], b[1], b[2], b[3]) - } - } - - // Write the raw buffer. - if err := emitter.write_handler(emitter, emitter.raw_buffer); err != nil { - return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error()) - } - emitter.buffer_pos = 0 - emitter.raw_buffer = emitter.raw_buffer[:0] - return true -} diff --git a/third_party/src/gopkg.in/yaml.v2/yaml.go b/third_party/src/gopkg.in/yaml.v2/yaml.go deleted file mode 100644 index d133edf..0000000 --- a/third_party/src/gopkg.in/yaml.v2/yaml.go +++ /dev/null @@ -1,346 +0,0 @@ -// Package yaml implements YAML support for the Go language. -// -// Source code and other details for the project are available at GitHub: -// -// https://github.com/go-yaml/yaml -// -package yaml - -import ( - "errors" - "fmt" - "reflect" - "strings" - "sync" -) - -// MapSlice encodes and decodes as a YAML map. -// The order of keys is preserved when encoding and decoding. -type MapSlice []MapItem - -// MapItem is an item in a MapSlice. -type MapItem struct { - Key, Value interface{} -} - -// The Unmarshaler interface may be implemented by types to customize their -// behavior when being unmarshaled from a YAML document. The UnmarshalYAML -// method receives a function that may be called to unmarshal the original -// YAML value into a field or variable. It is safe to call the unmarshal -// function parameter more than once if necessary. -type Unmarshaler interface { - UnmarshalYAML(unmarshal func(interface{}) error) error -} - -// The Marshaler interface may be implemented by types to customize their -// behavior when being marshaled into a YAML document. The returned value -// is marshaled in place of the original value implementing Marshaler. -// -// If an error is returned by MarshalYAML, the marshaling procedure stops -// and returns with the provided error. -type Marshaler interface { - MarshalYAML() (interface{}, error) -} - -// Unmarshal decodes the first document found within the in byte slice -// and assigns decoded values into the out value. -// -// Maps and pointers (to a struct, string, int, etc) are accepted as out -// values. If an internal pointer within a struct is not initialized, -// the yaml package will initialize it if necessary for unmarshalling -// the provided data. The out parameter must not be nil. -// -// The type of the decoded values should be compatible with the respective -// values in out. If one or more values cannot be decoded due to a type -// mismatches, decoding continues partially until the end of the YAML -// content, and a *yaml.TypeError is returned with details for all -// missed values. -// -// Struct fields are only unmarshalled if they are exported (have an -// upper case first letter), and are unmarshalled using the field name -// lowercased as the default key. Custom keys may be defined via the -// "yaml" name in the field tag: the content preceding the first comma -// is used as the key, and the following comma-separated options are -// used to tweak the marshalling process (see Marshal). -// Conflicting names result in a runtime error. -// -// For example: -// -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// var t T -// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) -// -// See the documentation of Marshal for the format of tags and a list of -// supported tag options. -// -func Unmarshal(in []byte, out interface{}) (err error) { - defer handleErr(&err) - d := newDecoder() - p := newParser(in) - defer p.destroy() - node := p.parse() - if node != nil { - v := reflect.ValueOf(out) - if v.Kind() == reflect.Ptr && !v.IsNil() { - v = v.Elem() - } - d.unmarshal(node, v) - } - if len(d.terrors) > 0 { - return &TypeError{d.terrors} - } - return nil -} - -// Marshal serializes the value provided into a YAML document. The structure -// of the generated document will reflect the structure of the value itself. -// Maps and pointers (to struct, string, int, etc) are accepted as the in value. -// -// Struct fields are only unmarshalled if they are exported (have an upper case -// first letter), and are unmarshalled using the field name lowercased as the -// default key. Custom keys may be defined via the "yaml" name in the field -// tag: the content preceding the first comma is used as the key, and the -// following comma-separated options are used to tweak the marshalling process. -// Conflicting names result in a runtime error. -// -// The field tag format accepted is: -// -// `(...) yaml:"[][,[,]]" (...)` -// -// The following flags are currently supported: -// -// omitempty Only include the field if it's not set to the zero -// value for the type or to empty slices or maps. -// Does not apply to zero valued structs. -// -// flow Marshal using a flow style (useful for structs, -// sequences and maps). -// -// inline Inline the field, which must be a struct or a map, -// causing all of its fields or keys to be processed as if -// they were part of the outer struct. For maps, keys must -// not conflict with the yaml keys of other struct fields. -// -// In addition, if the key is "-", the field is ignored. -// -// For example: -// -// type T struct { -// F int "a,omitempty" -// B int -// } -// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" -// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" -// -func Marshal(in interface{}) (out []byte, err error) { - defer handleErr(&err) - e := newEncoder() - defer e.destroy() - e.marshal("", reflect.ValueOf(in)) - e.finish() - out = e.out - return -} - -func handleErr(err *error) { - if v := recover(); v != nil { - if e, ok := v.(yamlError); ok { - *err = e.err - } else { - panic(v) - } - } -} - -type yamlError struct { - err error -} - -func fail(err error) { - panic(yamlError{err}) -} - -func failf(format string, args ...interface{}) { - panic(yamlError{fmt.Errorf("yaml: "+format, args...)}) -} - -// A TypeError is returned by Unmarshal when one or more fields in -// the YAML document cannot be properly decoded into the requested -// types. When this error is returned, the value is still -// unmarshaled partially. -type TypeError struct { - Errors []string -} - -func (e *TypeError) Error() string { - return fmt.Sprintf("yaml: unmarshal errors:\n %s", strings.Join(e.Errors, "\n ")) -} - -// -------------------------------------------------------------------------- -// Maintain a mapping of keys to structure field indexes - -// The code in this section was copied from mgo/bson. - -// structInfo holds details for the serialization of fields of -// a given struct. -type structInfo struct { - FieldsMap map[string]fieldInfo - FieldsList []fieldInfo - - // InlineMap is the number of the field in the struct that - // contains an ,inline map, or -1 if there's none. - InlineMap int -} - -type fieldInfo struct { - Key string - Num int - OmitEmpty bool - Flow bool - - // Inline holds the field index if the field is part of an inlined struct. - Inline []int -} - -var structMap = make(map[reflect.Type]*structInfo) -var fieldMapMutex sync.RWMutex - -func getStructInfo(st reflect.Type) (*structInfo, error) { - fieldMapMutex.RLock() - sinfo, found := structMap[st] - fieldMapMutex.RUnlock() - if found { - return sinfo, nil - } - - n := st.NumField() - fieldsMap := make(map[string]fieldInfo) - fieldsList := make([]fieldInfo, 0, n) - inlineMap := -1 - for i := 0; i != n; i++ { - field := st.Field(i) - if field.PkgPath != "" { - continue // Private field - } - - info := fieldInfo{Num: i} - - tag := field.Tag.Get("yaml") - if tag == "" && strings.Index(string(field.Tag), ":") < 0 { - tag = string(field.Tag) - } - if tag == "-" { - continue - } - - inline := false - fields := strings.Split(tag, ",") - if len(fields) > 1 { - for _, flag := range fields[1:] { - switch flag { - case "omitempty": - info.OmitEmpty = true - case "flow": - info.Flow = true - case "inline": - inline = true - default: - return nil, errors.New(fmt.Sprintf("Unsupported flag %q in tag %q of type %s", flag, tag, st)) - } - } - tag = fields[0] - } - - if inline { - switch field.Type.Kind() { - case reflect.Map: - if inlineMap >= 0 { - return nil, errors.New("Multiple ,inline maps in struct " + st.String()) - } - if field.Type.Key() != reflect.TypeOf("") { - return nil, errors.New("Option ,inline needs a map with string keys in struct " + st.String()) - } - inlineMap = info.Num - case reflect.Struct: - sinfo, err := getStructInfo(field.Type) - if err != nil { - return nil, err - } - for _, finfo := range sinfo.FieldsList { - if _, found := fieldsMap[finfo.Key]; found { - msg := "Duplicated key '" + finfo.Key + "' in struct " + st.String() - return nil, errors.New(msg) - } - if finfo.Inline == nil { - finfo.Inline = []int{i, finfo.Num} - } else { - finfo.Inline = append([]int{i}, finfo.Inline...) - } - fieldsMap[finfo.Key] = finfo - fieldsList = append(fieldsList, finfo) - } - default: - //return nil, errors.New("Option ,inline needs a struct value or map field") - return nil, errors.New("Option ,inline needs a struct value field") - } - continue - } - - if tag != "" { - info.Key = tag - } else { - info.Key = strings.ToLower(field.Name) - } - - if _, found = fieldsMap[info.Key]; found { - msg := "Duplicated key '" + info.Key + "' in struct " + st.String() - return nil, errors.New(msg) - } - - fieldsList = append(fieldsList, info) - fieldsMap[info.Key] = info - } - - sinfo = &structInfo{fieldsMap, fieldsList, inlineMap} - - fieldMapMutex.Lock() - structMap[st] = sinfo - fieldMapMutex.Unlock() - return sinfo, nil -} - -func isZero(v reflect.Value) bool { - switch v.Kind() { - case reflect.String: - return len(v.String()) == 0 - case reflect.Interface, reflect.Ptr: - return v.IsNil() - case reflect.Slice: - return v.Len() == 0 - case reflect.Map: - return v.Len() == 0 - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Bool: - return !v.Bool() - case reflect.Struct: - vt := v.Type() - for i := v.NumField() - 1; i >= 0; i-- { - if vt.Field(i).PkgPath != "" { - continue // Private field - } - if !isZero(v.Field(i)) { - return false - } - } - return true - } - return false -} diff --git a/third_party/src/gopkg.in/yaml.v2/yamlh.go b/third_party/src/gopkg.in/yaml.v2/yamlh.go deleted file mode 100644 index d60a6b6..0000000 --- a/third_party/src/gopkg.in/yaml.v2/yamlh.go +++ /dev/null @@ -1,716 +0,0 @@ -package yaml - -import ( - "io" -) - -// The version directive data. -type yaml_version_directive_t struct { - major int8 // The major version number. - minor int8 // The minor version number. -} - -// The tag directive data. -type yaml_tag_directive_t struct { - handle []byte // The tag handle. - prefix []byte // The tag prefix. -} - -type yaml_encoding_t int - -// The stream encoding. -const ( - // Let the parser choose the encoding. - yaml_ANY_ENCODING yaml_encoding_t = iota - - yaml_UTF8_ENCODING // The default UTF-8 encoding. - yaml_UTF16LE_ENCODING // The UTF-16-LE encoding with BOM. - yaml_UTF16BE_ENCODING // The UTF-16-BE encoding with BOM. -) - -type yaml_break_t int - -// Line break types. -const ( - // Let the parser choose the break type. - yaml_ANY_BREAK yaml_break_t = iota - - yaml_CR_BREAK // Use CR for line breaks (Mac style). - yaml_LN_BREAK // Use LN for line breaks (Unix style). - yaml_CRLN_BREAK // Use CR LN for line breaks (DOS style). -) - -type yaml_error_type_t int - -// Many bad things could happen with the parser and emitter. -const ( - // No error is produced. - yaml_NO_ERROR yaml_error_type_t = iota - - yaml_MEMORY_ERROR // Cannot allocate or reallocate a block of memory. - yaml_READER_ERROR // Cannot read or decode the input stream. - yaml_SCANNER_ERROR // Cannot scan the input stream. - yaml_PARSER_ERROR // Cannot parse the input stream. - yaml_COMPOSER_ERROR // Cannot compose a YAML document. - yaml_WRITER_ERROR // Cannot write to the output stream. - yaml_EMITTER_ERROR // Cannot emit a YAML stream. -) - -// The pointer position. -type yaml_mark_t struct { - index int // The position index. - line int // The position line. - column int // The position column. -} - -// Node Styles - -type yaml_style_t int8 - -type yaml_scalar_style_t yaml_style_t - -// Scalar styles. -const ( - // Let the emitter choose the style. - yaml_ANY_SCALAR_STYLE yaml_scalar_style_t = iota - - yaml_PLAIN_SCALAR_STYLE // The plain scalar style. - yaml_SINGLE_QUOTED_SCALAR_STYLE // The single-quoted scalar style. - yaml_DOUBLE_QUOTED_SCALAR_STYLE // The double-quoted scalar style. - yaml_LITERAL_SCALAR_STYLE // The literal scalar style. - yaml_FOLDED_SCALAR_STYLE // The folded scalar style. -) - -type yaml_sequence_style_t yaml_style_t - -// Sequence styles. -const ( - // Let the emitter choose the style. - yaml_ANY_SEQUENCE_STYLE yaml_sequence_style_t = iota - - yaml_BLOCK_SEQUENCE_STYLE // The block sequence style. - yaml_FLOW_SEQUENCE_STYLE // The flow sequence style. -) - -type yaml_mapping_style_t yaml_style_t - -// Mapping styles. -const ( - // Let the emitter choose the style. - yaml_ANY_MAPPING_STYLE yaml_mapping_style_t = iota - - yaml_BLOCK_MAPPING_STYLE // The block mapping style. - yaml_FLOW_MAPPING_STYLE // The flow mapping style. -) - -// Tokens - -type yaml_token_type_t int - -// Token types. -const ( - // An empty token. - yaml_NO_TOKEN yaml_token_type_t = iota - - yaml_STREAM_START_TOKEN // A STREAM-START token. - yaml_STREAM_END_TOKEN // A STREAM-END token. - - yaml_VERSION_DIRECTIVE_TOKEN // A VERSION-DIRECTIVE token. - yaml_TAG_DIRECTIVE_TOKEN // A TAG-DIRECTIVE token. - yaml_DOCUMENT_START_TOKEN // A DOCUMENT-START token. - yaml_DOCUMENT_END_TOKEN // A DOCUMENT-END token. - - yaml_BLOCK_SEQUENCE_START_TOKEN // A BLOCK-SEQUENCE-START token. - yaml_BLOCK_MAPPING_START_TOKEN // A BLOCK-SEQUENCE-END token. - yaml_BLOCK_END_TOKEN // A BLOCK-END token. - - yaml_FLOW_SEQUENCE_START_TOKEN // A FLOW-SEQUENCE-START token. - yaml_FLOW_SEQUENCE_END_TOKEN // A FLOW-SEQUENCE-END token. - yaml_FLOW_MAPPING_START_TOKEN // A FLOW-MAPPING-START token. - yaml_FLOW_MAPPING_END_TOKEN // A FLOW-MAPPING-END token. - - yaml_BLOCK_ENTRY_TOKEN // A BLOCK-ENTRY token. - yaml_FLOW_ENTRY_TOKEN // A FLOW-ENTRY token. - yaml_KEY_TOKEN // A KEY token. - yaml_VALUE_TOKEN // A VALUE token. - - yaml_ALIAS_TOKEN // An ALIAS token. - yaml_ANCHOR_TOKEN // An ANCHOR token. - yaml_TAG_TOKEN // A TAG token. - yaml_SCALAR_TOKEN // A SCALAR token. -) - -func (tt yaml_token_type_t) String() string { - switch tt { - case yaml_NO_TOKEN: - return "yaml_NO_TOKEN" - case yaml_STREAM_START_TOKEN: - return "yaml_STREAM_START_TOKEN" - case yaml_STREAM_END_TOKEN: - return "yaml_STREAM_END_TOKEN" - case yaml_VERSION_DIRECTIVE_TOKEN: - return "yaml_VERSION_DIRECTIVE_TOKEN" - case yaml_TAG_DIRECTIVE_TOKEN: - return "yaml_TAG_DIRECTIVE_TOKEN" - case yaml_DOCUMENT_START_TOKEN: - return "yaml_DOCUMENT_START_TOKEN" - case yaml_DOCUMENT_END_TOKEN: - return "yaml_DOCUMENT_END_TOKEN" - case yaml_BLOCK_SEQUENCE_START_TOKEN: - return "yaml_BLOCK_SEQUENCE_START_TOKEN" - case yaml_BLOCK_MAPPING_START_TOKEN: - return "yaml_BLOCK_MAPPING_START_TOKEN" - case yaml_BLOCK_END_TOKEN: - return "yaml_BLOCK_END_TOKEN" - case yaml_FLOW_SEQUENCE_START_TOKEN: - return "yaml_FLOW_SEQUENCE_START_TOKEN" - case yaml_FLOW_SEQUENCE_END_TOKEN: - return "yaml_FLOW_SEQUENCE_END_TOKEN" - case yaml_FLOW_MAPPING_START_TOKEN: - return "yaml_FLOW_MAPPING_START_TOKEN" - case yaml_FLOW_MAPPING_END_TOKEN: - return "yaml_FLOW_MAPPING_END_TOKEN" - case yaml_BLOCK_ENTRY_TOKEN: - return "yaml_BLOCK_ENTRY_TOKEN" - case yaml_FLOW_ENTRY_TOKEN: - return "yaml_FLOW_ENTRY_TOKEN" - case yaml_KEY_TOKEN: - return "yaml_KEY_TOKEN" - case yaml_VALUE_TOKEN: - return "yaml_VALUE_TOKEN" - case yaml_ALIAS_TOKEN: - return "yaml_ALIAS_TOKEN" - case yaml_ANCHOR_TOKEN: - return "yaml_ANCHOR_TOKEN" - case yaml_TAG_TOKEN: - return "yaml_TAG_TOKEN" - case yaml_SCALAR_TOKEN: - return "yaml_SCALAR_TOKEN" - } - return "" -} - -// The token structure. -type yaml_token_t struct { - // The token type. - typ yaml_token_type_t - - // The start/end of the token. - start_mark, end_mark yaml_mark_t - - // The stream encoding (for yaml_STREAM_START_TOKEN). - encoding yaml_encoding_t - - // The alias/anchor/scalar value or tag/tag directive handle - // (for yaml_ALIAS_TOKEN, yaml_ANCHOR_TOKEN, yaml_SCALAR_TOKEN, yaml_TAG_TOKEN, yaml_TAG_DIRECTIVE_TOKEN). - value []byte - - // The tag suffix (for yaml_TAG_TOKEN). - suffix []byte - - // The tag directive prefix (for yaml_TAG_DIRECTIVE_TOKEN). - prefix []byte - - // The scalar style (for yaml_SCALAR_TOKEN). - style yaml_scalar_style_t - - // The version directive major/minor (for yaml_VERSION_DIRECTIVE_TOKEN). - major, minor int8 -} - -// Events - -type yaml_event_type_t int8 - -// Event types. -const ( - // An empty event. - yaml_NO_EVENT yaml_event_type_t = iota - - yaml_STREAM_START_EVENT // A STREAM-START event. - yaml_STREAM_END_EVENT // A STREAM-END event. - yaml_DOCUMENT_START_EVENT // A DOCUMENT-START event. - yaml_DOCUMENT_END_EVENT // A DOCUMENT-END event. - yaml_ALIAS_EVENT // An ALIAS event. - yaml_SCALAR_EVENT // A SCALAR event. - yaml_SEQUENCE_START_EVENT // A SEQUENCE-START event. - yaml_SEQUENCE_END_EVENT // A SEQUENCE-END event. - yaml_MAPPING_START_EVENT // A MAPPING-START event. - yaml_MAPPING_END_EVENT // A MAPPING-END event. -) - -// The event structure. -type yaml_event_t struct { - - // The event type. - typ yaml_event_type_t - - // The start and end of the event. - start_mark, end_mark yaml_mark_t - - // The document encoding (for yaml_STREAM_START_EVENT). - encoding yaml_encoding_t - - // The version directive (for yaml_DOCUMENT_START_EVENT). - version_directive *yaml_version_directive_t - - // The list of tag directives (for yaml_DOCUMENT_START_EVENT). - tag_directives []yaml_tag_directive_t - - // The anchor (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT, yaml_ALIAS_EVENT). - anchor []byte - - // The tag (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT). - tag []byte - - // The scalar value (for yaml_SCALAR_EVENT). - value []byte - - // Is the document start/end indicator implicit, or the tag optional? - // (for yaml_DOCUMENT_START_EVENT, yaml_DOCUMENT_END_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT, yaml_SCALAR_EVENT). - implicit bool - - // Is the tag optional for any non-plain style? (for yaml_SCALAR_EVENT). - quoted_implicit bool - - // The style (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT). - style yaml_style_t -} - -func (e *yaml_event_t) scalar_style() yaml_scalar_style_t { return yaml_scalar_style_t(e.style) } -func (e *yaml_event_t) sequence_style() yaml_sequence_style_t { return yaml_sequence_style_t(e.style) } -func (e *yaml_event_t) mapping_style() yaml_mapping_style_t { return yaml_mapping_style_t(e.style) } - -// Nodes - -const ( - yaml_NULL_TAG = "tag:yaml.org,2002:null" // The tag !!null with the only possible value: null. - yaml_BOOL_TAG = "tag:yaml.org,2002:bool" // The tag !!bool with the values: true and false. - yaml_STR_TAG = "tag:yaml.org,2002:str" // The tag !!str for string values. - yaml_INT_TAG = "tag:yaml.org,2002:int" // The tag !!int for integer values. - yaml_FLOAT_TAG = "tag:yaml.org,2002:float" // The tag !!float for float values. - yaml_TIMESTAMP_TAG = "tag:yaml.org,2002:timestamp" // The tag !!timestamp for date and time values. - - yaml_SEQ_TAG = "tag:yaml.org,2002:seq" // The tag !!seq is used to denote sequences. - yaml_MAP_TAG = "tag:yaml.org,2002:map" // The tag !!map is used to denote mapping. - - // Not in original libyaml. - yaml_BINARY_TAG = "tag:yaml.org,2002:binary" - yaml_MERGE_TAG = "tag:yaml.org,2002:merge" - - yaml_DEFAULT_SCALAR_TAG = yaml_STR_TAG // The default scalar tag is !!str. - yaml_DEFAULT_SEQUENCE_TAG = yaml_SEQ_TAG // The default sequence tag is !!seq. - yaml_DEFAULT_MAPPING_TAG = yaml_MAP_TAG // The default mapping tag is !!map. -) - -type yaml_node_type_t int - -// Node types. -const ( - // An empty node. - yaml_NO_NODE yaml_node_type_t = iota - - yaml_SCALAR_NODE // A scalar node. - yaml_SEQUENCE_NODE // A sequence node. - yaml_MAPPING_NODE // A mapping node. -) - -// An element of a sequence node. -type yaml_node_item_t int - -// An element of a mapping node. -type yaml_node_pair_t struct { - key int // The key of the element. - value int // The value of the element. -} - -// The node structure. -type yaml_node_t struct { - typ yaml_node_type_t // The node type. - tag []byte // The node tag. - - // The node data. - - // The scalar parameters (for yaml_SCALAR_NODE). - scalar struct { - value []byte // The scalar value. - length int // The length of the scalar value. - style yaml_scalar_style_t // The scalar style. - } - - // The sequence parameters (for YAML_SEQUENCE_NODE). - sequence struct { - items_data []yaml_node_item_t // The stack of sequence items. - style yaml_sequence_style_t // The sequence style. - } - - // The mapping parameters (for yaml_MAPPING_NODE). - mapping struct { - pairs_data []yaml_node_pair_t // The stack of mapping pairs (key, value). - pairs_start *yaml_node_pair_t // The beginning of the stack. - pairs_end *yaml_node_pair_t // The end of the stack. - pairs_top *yaml_node_pair_t // The top of the stack. - style yaml_mapping_style_t // The mapping style. - } - - start_mark yaml_mark_t // The beginning of the node. - end_mark yaml_mark_t // The end of the node. - -} - -// The document structure. -type yaml_document_t struct { - - // The document nodes. - nodes []yaml_node_t - - // The version directive. - version_directive *yaml_version_directive_t - - // The list of tag directives. - tag_directives_data []yaml_tag_directive_t - tag_directives_start int // The beginning of the tag directives list. - tag_directives_end int // The end of the tag directives list. - - start_implicit int // Is the document start indicator implicit? - end_implicit int // Is the document end indicator implicit? - - // The start/end of the document. - start_mark, end_mark yaml_mark_t -} - -// The prototype of a read handler. -// -// The read handler is called when the parser needs to read more bytes from the -// source. The handler should write not more than size bytes to the buffer. -// The number of written bytes should be set to the size_read variable. -// -// [in,out] data A pointer to an application data specified by -// yaml_parser_set_input(). -// [out] buffer The buffer to write the data from the source. -// [in] size The size of the buffer. -// [out] size_read The actual number of bytes read from the source. -// -// On success, the handler should return 1. If the handler failed, -// the returned value should be 0. On EOF, the handler should set the -// size_read to 0 and return 1. -type yaml_read_handler_t func(parser *yaml_parser_t, buffer []byte) (n int, err error) - -// This structure holds information about a potential simple key. -type yaml_simple_key_t struct { - possible bool // Is a simple key possible? - required bool // Is a simple key required? - token_number int // The number of the token. - mark yaml_mark_t // The position mark. -} - -// The states of the parser. -type yaml_parser_state_t int - -const ( - yaml_PARSE_STREAM_START_STATE yaml_parser_state_t = iota - - yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE // Expect the beginning of an implicit document. - yaml_PARSE_DOCUMENT_START_STATE // Expect DOCUMENT-START. - yaml_PARSE_DOCUMENT_CONTENT_STATE // Expect the content of a document. - yaml_PARSE_DOCUMENT_END_STATE // Expect DOCUMENT-END. - yaml_PARSE_BLOCK_NODE_STATE // Expect a block node. - yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE // Expect a block node or indentless sequence. - yaml_PARSE_FLOW_NODE_STATE // Expect a flow node. - yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE // Expect the first entry of a block sequence. - yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE // Expect an entry of a block sequence. - yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE // Expect an entry of an indentless sequence. - yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE // Expect the first key of a block mapping. - yaml_PARSE_BLOCK_MAPPING_KEY_STATE // Expect a block mapping key. - yaml_PARSE_BLOCK_MAPPING_VALUE_STATE // Expect a block mapping value. - yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE // Expect the first entry of a flow sequence. - yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE // Expect an entry of a flow sequence. - yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE // Expect a key of an ordered mapping. - yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE // Expect a value of an ordered mapping. - yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE // Expect the and of an ordered mapping entry. - yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE // Expect the first key of a flow mapping. - yaml_PARSE_FLOW_MAPPING_KEY_STATE // Expect a key of a flow mapping. - yaml_PARSE_FLOW_MAPPING_VALUE_STATE // Expect a value of a flow mapping. - yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE // Expect an empty value of a flow mapping. - yaml_PARSE_END_STATE // Expect nothing. -) - -func (ps yaml_parser_state_t) String() string { - switch ps { - case yaml_PARSE_STREAM_START_STATE: - return "yaml_PARSE_STREAM_START_STATE" - case yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE: - return "yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE" - case yaml_PARSE_DOCUMENT_START_STATE: - return "yaml_PARSE_DOCUMENT_START_STATE" - case yaml_PARSE_DOCUMENT_CONTENT_STATE: - return "yaml_PARSE_DOCUMENT_CONTENT_STATE" - case yaml_PARSE_DOCUMENT_END_STATE: - return "yaml_PARSE_DOCUMENT_END_STATE" - case yaml_PARSE_BLOCK_NODE_STATE: - return "yaml_PARSE_BLOCK_NODE_STATE" - case yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE: - return "yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE" - case yaml_PARSE_FLOW_NODE_STATE: - return "yaml_PARSE_FLOW_NODE_STATE" - case yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE: - return "yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE" - case yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE: - return "yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE" - case yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE: - return "yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE" - case yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE: - return "yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE" - case yaml_PARSE_BLOCK_MAPPING_KEY_STATE: - return "yaml_PARSE_BLOCK_MAPPING_KEY_STATE" - case yaml_PARSE_BLOCK_MAPPING_VALUE_STATE: - return "yaml_PARSE_BLOCK_MAPPING_VALUE_STATE" - case yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE" - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE" - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE" - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE" - case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE: - return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE" - case yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE: - return "yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE" - case yaml_PARSE_FLOW_MAPPING_KEY_STATE: - return "yaml_PARSE_FLOW_MAPPING_KEY_STATE" - case yaml_PARSE_FLOW_MAPPING_VALUE_STATE: - return "yaml_PARSE_FLOW_MAPPING_VALUE_STATE" - case yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE: - return "yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE" - case yaml_PARSE_END_STATE: - return "yaml_PARSE_END_STATE" - } - return "" -} - -// This structure holds aliases data. -type yaml_alias_data_t struct { - anchor []byte // The anchor. - index int // The node id. - mark yaml_mark_t // The anchor mark. -} - -// The parser structure. -// -// All members are internal. Manage the structure using the -// yaml_parser_ family of functions. -type yaml_parser_t struct { - - // Error handling - - error yaml_error_type_t // Error type. - - problem string // Error description. - - // The byte about which the problem occured. - problem_offset int - problem_value int - problem_mark yaml_mark_t - - // The error context. - context string - context_mark yaml_mark_t - - // Reader stuff - - read_handler yaml_read_handler_t // Read handler. - - input_file io.Reader // File input data. - input []byte // String input data. - input_pos int - - eof bool // EOF flag - - buffer []byte // The working buffer. - buffer_pos int // The current position of the buffer. - - unread int // The number of unread characters in the buffer. - - raw_buffer []byte // The raw buffer. - raw_buffer_pos int // The current position of the buffer. - - encoding yaml_encoding_t // The input encoding. - - offset int // The offset of the current position (in bytes). - mark yaml_mark_t // The mark of the current position. - - // Scanner stuff - - stream_start_produced bool // Have we started to scan the input stream? - stream_end_produced bool // Have we reached the end of the input stream? - - flow_level int // The number of unclosed '[' and '{' indicators. - - tokens []yaml_token_t // The tokens queue. - tokens_head int // The head of the tokens queue. - tokens_parsed int // The number of tokens fetched from the queue. - token_available bool // Does the tokens queue contain a token ready for dequeueing. - - indent int // The current indentation level. - indents []int // The indentation levels stack. - - simple_key_allowed bool // May a simple key occur at the current position? - simple_keys []yaml_simple_key_t // The stack of simple keys. - - // Parser stuff - - state yaml_parser_state_t // The current parser state. - states []yaml_parser_state_t // The parser states stack. - marks []yaml_mark_t // The stack of marks. - tag_directives []yaml_tag_directive_t // The list of TAG directives. - - // Dumper stuff - - aliases []yaml_alias_data_t // The alias data. - - document *yaml_document_t // The currently parsed document. -} - -// Emitter Definitions - -// The prototype of a write handler. -// -// The write handler is called when the emitter needs to flush the accumulated -// characters to the output. The handler should write @a size bytes of the -// @a buffer to the output. -// -// @param[in,out] data A pointer to an application data specified by -// yaml_emitter_set_output(). -// @param[in] buffer The buffer with bytes to be written. -// @param[in] size The size of the buffer. -// -// @returns On success, the handler should return @c 1. If the handler failed, -// the returned value should be @c 0. -// -type yaml_write_handler_t func(emitter *yaml_emitter_t, buffer []byte) error - -type yaml_emitter_state_t int - -// The emitter states. -const ( - // Expect STREAM-START. - yaml_EMIT_STREAM_START_STATE yaml_emitter_state_t = iota - - yaml_EMIT_FIRST_DOCUMENT_START_STATE // Expect the first DOCUMENT-START or STREAM-END. - yaml_EMIT_DOCUMENT_START_STATE // Expect DOCUMENT-START or STREAM-END. - yaml_EMIT_DOCUMENT_CONTENT_STATE // Expect the content of a document. - yaml_EMIT_DOCUMENT_END_STATE // Expect DOCUMENT-END. - yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE // Expect the first item of a flow sequence. - yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE // Expect an item of a flow sequence. - yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE // Expect the first key of a flow mapping. - yaml_EMIT_FLOW_MAPPING_KEY_STATE // Expect a key of a flow mapping. - yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE // Expect a value for a simple key of a flow mapping. - yaml_EMIT_FLOW_MAPPING_VALUE_STATE // Expect a value of a flow mapping. - yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE // Expect the first item of a block sequence. - yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE // Expect an item of a block sequence. - yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE // Expect the first key of a block mapping. - yaml_EMIT_BLOCK_MAPPING_KEY_STATE // Expect the key of a block mapping. - yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE // Expect a value for a simple key of a block mapping. - yaml_EMIT_BLOCK_MAPPING_VALUE_STATE // Expect a value of a block mapping. - yaml_EMIT_END_STATE // Expect nothing. -) - -// The emitter structure. -// -// All members are internal. Manage the structure using the @c yaml_emitter_ -// family of functions. -type yaml_emitter_t struct { - - // Error handling - - error yaml_error_type_t // Error type. - problem string // Error description. - - // Writer stuff - - write_handler yaml_write_handler_t // Write handler. - - output_buffer *[]byte // String output data. - output_file io.Writer // File output data. - - buffer []byte // The working buffer. - buffer_pos int // The current position of the buffer. - - raw_buffer []byte // The raw buffer. - raw_buffer_pos int // The current position of the buffer. - - encoding yaml_encoding_t // The stream encoding. - - // Emitter stuff - - canonical bool // If the output is in the canonical style? - best_indent int // The number of indentation spaces. - best_width int // The preferred width of the output lines. - unicode bool // Allow unescaped non-ASCII characters? - line_break yaml_break_t // The preferred line break. - - state yaml_emitter_state_t // The current emitter state. - states []yaml_emitter_state_t // The stack of states. - - events []yaml_event_t // The event queue. - events_head int // The head of the event queue. - - indents []int // The stack of indentation levels. - - tag_directives []yaml_tag_directive_t // The list of tag directives. - - indent int // The current indentation level. - - flow_level int // The current flow level. - - root_context bool // Is it the document root context? - sequence_context bool // Is it a sequence context? - mapping_context bool // Is it a mapping context? - simple_key_context bool // Is it a simple mapping key context? - - line int // The current line. - column int // The current column. - whitespace bool // If the last character was a whitespace? - indention bool // If the last character was an indentation character (' ', '-', '?', ':')? - open_ended bool // If an explicit document end is required? - - // Anchor analysis. - anchor_data struct { - anchor []byte // The anchor value. - alias bool // Is it an alias? - } - - // Tag analysis. - tag_data struct { - handle []byte // The tag handle. - suffix []byte // The tag suffix. - } - - // Scalar analysis. - scalar_data struct { - value []byte // The scalar value. - multiline bool // Does the scalar contain line breaks? - flow_plain_allowed bool // Can the scalar be expessed in the flow plain style? - block_plain_allowed bool // Can the scalar be expressed in the block plain style? - single_quoted_allowed bool // Can the scalar be expressed in the single quoted style? - block_allowed bool // Can the scalar be expressed in the literal or folded styles? - style yaml_scalar_style_t // The output style. - } - - // Dumper stuff - - opened bool // If the stream was already opened? - closed bool // If the stream was already closed? - - // The information associated with the document nodes. - anchors *struct { - references int // The number of references. - anchor int // The anchor id. - serialized bool // If the node has been emitted? - } - - last_anchor_id int // The last assigned anchor id. - - document *yaml_document_t // The currently emitted document. -} diff --git a/third_party/src/gopkg.in/yaml.v2/yamlprivateh.go b/third_party/src/gopkg.in/yaml.v2/yamlprivateh.go deleted file mode 100644 index 8110ce3..0000000 --- a/third_party/src/gopkg.in/yaml.v2/yamlprivateh.go +++ /dev/null @@ -1,173 +0,0 @@ -package yaml - -const ( - // The size of the input raw buffer. - input_raw_buffer_size = 512 - - // The size of the input buffer. - // It should be possible to decode the whole raw buffer. - input_buffer_size = input_raw_buffer_size * 3 - - // The size of the output buffer. - output_buffer_size = 128 - - // The size of the output raw buffer. - // It should be possible to encode the whole output buffer. - output_raw_buffer_size = (output_buffer_size*2 + 2) - - // The size of other stacks and queues. - initial_stack_size = 16 - initial_queue_size = 16 - initial_string_size = 16 -) - -// Check if the character at the specified position is an alphabetical -// character, a digit, '_', or '-'. -func is_alpha(b []byte, i int) bool { - return b[i] >= '0' && b[i] <= '9' || b[i] >= 'A' && b[i] <= 'Z' || b[i] >= 'a' && b[i] <= 'z' || b[i] == '_' || b[i] == '-' -} - -// Check if the character at the specified position is a digit. -func is_digit(b []byte, i int) bool { - return b[i] >= '0' && b[i] <= '9' -} - -// Get the value of a digit. -func as_digit(b []byte, i int) int { - return int(b[i]) - '0' -} - -// Check if the character at the specified position is a hex-digit. -func is_hex(b []byte, i int) bool { - return b[i] >= '0' && b[i] <= '9' || b[i] >= 'A' && b[i] <= 'F' || b[i] >= 'a' && b[i] <= 'f' -} - -// Get the value of a hex-digit. -func as_hex(b []byte, i int) int { - bi := b[i] - if bi >= 'A' && bi <= 'F' { - return int(bi) - 'A' + 10 - } - if bi >= 'a' && bi <= 'f' { - return int(bi) - 'a' + 10 - } - return int(bi) - '0' -} - -// Check if the character is ASCII. -func is_ascii(b []byte, i int) bool { - return b[i] <= 0x7F -} - -// Check if the character at the start of the buffer can be printed unescaped. -func is_printable(b []byte, i int) bool { - return ((b[i] == 0x0A) || // . == #x0A - (b[i] >= 0x20 && b[i] <= 0x7E) || // #x20 <= . <= #x7E - (b[i] == 0xC2 && b[i+1] >= 0xA0) || // #0xA0 <= . <= #xD7FF - (b[i] > 0xC2 && b[i] < 0xED) || - (b[i] == 0xED && b[i+1] < 0xA0) || - (b[i] == 0xEE) || - (b[i] == 0xEF && // #xE000 <= . <= #xFFFD - !(b[i+1] == 0xBB && b[i+2] == 0xBF) && // && . != #xFEFF - !(b[i+1] == 0xBF && (b[i+2] == 0xBE || b[i+2] == 0xBF)))) -} - -// Check if the character at the specified position is NUL. -func is_z(b []byte, i int) bool { - return b[i] == 0x00 -} - -// Check if the beginning of the buffer is a BOM. -func is_bom(b []byte, i int) bool { - return b[0] == 0xEF && b[1] == 0xBB && b[2] == 0xBF -} - -// Check if the character at the specified position is space. -func is_space(b []byte, i int) bool { - return b[i] == ' ' -} - -// Check if the character at the specified position is tab. -func is_tab(b []byte, i int) bool { - return b[i] == '\t' -} - -// Check if the character at the specified position is blank (space or tab). -func is_blank(b []byte, i int) bool { - //return is_space(b, i) || is_tab(b, i) - return b[i] == ' ' || b[i] == '\t' -} - -// Check if the character at the specified position is a line break. -func is_break(b []byte, i int) bool { - return (b[i] == '\r' || // CR (#xD) - b[i] == '\n' || // LF (#xA) - b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9) // PS (#x2029) -} - -func is_crlf(b []byte, i int) bool { - return b[i] == '\r' && b[i+1] == '\n' -} - -// Check if the character is a line break or NUL. -func is_breakz(b []byte, i int) bool { - //return is_break(b, i) || is_z(b, i) - return ( // is_break: - b[i] == '\r' || // CR (#xD) - b[i] == '\n' || // LF (#xA) - b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) - // is_z: - b[i] == 0) -} - -// Check if the character is a line break, space, or NUL. -func is_spacez(b []byte, i int) bool { - //return is_space(b, i) || is_breakz(b, i) - return ( // is_space: - b[i] == ' ' || - // is_breakz: - b[i] == '\r' || // CR (#xD) - b[i] == '\n' || // LF (#xA) - b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) - b[i] == 0) -} - -// Check if the character is a line break, space, tab, or NUL. -func is_blankz(b []byte, i int) bool { - //return is_blank(b, i) || is_breakz(b, i) - return ( // is_blank: - b[i] == ' ' || b[i] == '\t' || - // is_breakz: - b[i] == '\r' || // CR (#xD) - b[i] == '\n' || // LF (#xA) - b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) - b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) - b[i] == 0) -} - -// Determine the width of the character. -func width(b byte) int { - // Don't replace these by a switch without first - // confirming that it is being inlined. - if b&0x80 == 0x00 { - return 1 - } - if b&0xE0 == 0xC0 { - return 2 - } - if b&0xF0 == 0xE0 { - return 3 - } - if b&0xF8 == 0xF0 { - return 4 - } - return 0 - -} diff --git a/udp.go b/udp.go index 52a6a70..4916224 100644 --- a/udp.go +++ b/udp.go @@ -6,9 +6,9 @@ import ( "net" "time" - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket/layers" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv4" + "github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket/layers" + "golang.org/x/net/ipv4" ) func cidr2bcast(cidr string) string { diff --git a/internal/github.com/alexzorin/libvirt-go/LICENSE b/vendor/github.com/alexzorin/libvirt-go/LICENSE similarity index 100% rename from internal/github.com/alexzorin/libvirt-go/LICENSE rename to vendor/github.com/alexzorin/libvirt-go/LICENSE diff --git a/internal/github.com/alexzorin/libvirt-go/README.md b/vendor/github.com/alexzorin/libvirt-go/README.md similarity index 100% rename from internal/github.com/alexzorin/libvirt-go/README.md rename to vendor/github.com/alexzorin/libvirt-go/README.md diff --git a/internal/github.com/alexzorin/libvirt-go/constants.go b/vendor/github.com/alexzorin/libvirt-go/constants.go similarity index 100% rename from internal/github.com/alexzorin/libvirt-go/constants.go rename to vendor/github.com/alexzorin/libvirt-go/constants.go diff --git a/internal/github.com/alexzorin/libvirt-go/domain.go b/vendor/github.com/alexzorin/libvirt-go/domain.go similarity index 100% rename from internal/github.com/alexzorin/libvirt-go/domain.go rename to vendor/github.com/alexzorin/libvirt-go/domain.go diff --git a/internal/github.com/alexzorin/libvirt-go/domain_test.go b/vendor/github.com/alexzorin/libvirt-go/domain_test.go similarity index 100% rename from internal/github.com/alexzorin/libvirt-go/domain_test.go rename to vendor/github.com/alexzorin/libvirt-go/domain_test.go diff --git a/internal/github.com/alexzorin/libvirt-go/integration_test.go b/vendor/github.com/alexzorin/libvirt-go/integration_test.go similarity index 100% rename from internal/github.com/alexzorin/libvirt-go/integration_test.go rename to vendor/github.com/alexzorin/libvirt-go/integration_test.go diff --git a/internal/github.com/alexzorin/libvirt-go/interface.go b/vendor/github.com/alexzorin/libvirt-go/interface.go similarity index 100% rename from internal/github.com/alexzorin/libvirt-go/interface.go rename to vendor/github.com/alexzorin/libvirt-go/interface.go diff --git a/internal/github.com/alexzorin/libvirt-go/interface_test.go b/vendor/github.com/alexzorin/libvirt-go/interface_test.go similarity index 100% rename from internal/github.com/alexzorin/libvirt-go/interface_test.go rename to vendor/github.com/alexzorin/libvirt-go/interface_test.go diff --git a/internal/github.com/alexzorin/libvirt-go/libvirt.go b/vendor/github.com/alexzorin/libvirt-go/libvirt.go similarity index 100% rename from internal/github.com/alexzorin/libvirt-go/libvirt.go rename to vendor/github.com/alexzorin/libvirt-go/libvirt.go diff --git a/internal/github.com/alexzorin/libvirt-go/libvirt_test.go b/vendor/github.com/alexzorin/libvirt-go/libvirt_test.go similarity index 100% rename from internal/github.com/alexzorin/libvirt-go/libvirt_test.go rename to vendor/github.com/alexzorin/libvirt-go/libvirt_test.go diff --git a/internal/github.com/alexzorin/libvirt-go/network.go b/vendor/github.com/alexzorin/libvirt-go/network.go similarity index 100% rename from internal/github.com/alexzorin/libvirt-go/network.go rename to vendor/github.com/alexzorin/libvirt-go/network.go diff --git a/internal/github.com/alexzorin/libvirt-go/network_test.go b/vendor/github.com/alexzorin/libvirt-go/network_test.go similarity index 100% rename from internal/github.com/alexzorin/libvirt-go/network_test.go rename to vendor/github.com/alexzorin/libvirt-go/network_test.go diff --git a/internal/github.com/alexzorin/libvirt-go/nodeinfo.go b/vendor/github.com/alexzorin/libvirt-go/nodeinfo.go similarity index 100% rename from internal/github.com/alexzorin/libvirt-go/nodeinfo.go rename to vendor/github.com/alexzorin/libvirt-go/nodeinfo.go diff --git a/internal/github.com/alexzorin/libvirt-go/nwfilter.go b/vendor/github.com/alexzorin/libvirt-go/nwfilter.go similarity index 100% rename from internal/github.com/alexzorin/libvirt-go/nwfilter.go rename to vendor/github.com/alexzorin/libvirt-go/nwfilter.go diff --git a/internal/github.com/alexzorin/libvirt-go/secret.go b/vendor/github.com/alexzorin/libvirt-go/secret.go similarity index 100% rename from internal/github.com/alexzorin/libvirt-go/secret.go rename to vendor/github.com/alexzorin/libvirt-go/secret.go diff --git a/internal/github.com/alexzorin/libvirt-go/snapshot.go b/vendor/github.com/alexzorin/libvirt-go/snapshot.go similarity index 100% rename from internal/github.com/alexzorin/libvirt-go/snapshot.go rename to vendor/github.com/alexzorin/libvirt-go/snapshot.go diff --git a/internal/github.com/alexzorin/libvirt-go/storage_pool.go b/vendor/github.com/alexzorin/libvirt-go/storage_pool.go similarity index 100% rename from internal/github.com/alexzorin/libvirt-go/storage_pool.go rename to vendor/github.com/alexzorin/libvirt-go/storage_pool.go diff --git a/internal/github.com/alexzorin/libvirt-go/storage_pool_test.go b/vendor/github.com/alexzorin/libvirt-go/storage_pool_test.go similarity index 100% rename from internal/github.com/alexzorin/libvirt-go/storage_pool_test.go rename to vendor/github.com/alexzorin/libvirt-go/storage_pool_test.go diff --git a/internal/github.com/alexzorin/libvirt-go/storage_volume.go b/vendor/github.com/alexzorin/libvirt-go/storage_volume.go similarity index 100% rename from internal/github.com/alexzorin/libvirt-go/storage_volume.go rename to vendor/github.com/alexzorin/libvirt-go/storage_volume.go diff --git a/internal/github.com/alexzorin/libvirt-go/storage_volume_test.go b/vendor/github.com/alexzorin/libvirt-go/storage_volume_test.go similarity index 100% rename from internal/github.com/alexzorin/libvirt-go/storage_volume_test.go rename to vendor/github.com/alexzorin/libvirt-go/storage_volume_test.go diff --git a/internal/github.com/alexzorin/libvirt-go/stream.go b/vendor/github.com/alexzorin/libvirt-go/stream.go similarity index 100% rename from internal/github.com/alexzorin/libvirt-go/stream.go rename to vendor/github.com/alexzorin/libvirt-go/stream.go diff --git a/internal/github.com/vishvananda/netlink/nl/addr_linux.go b/vendor/github.com/vishvananda/netlink/nl/addr_linux.go similarity index 100% rename from internal/github.com/vishvananda/netlink/nl/addr_linux.go rename to vendor/github.com/vishvananda/netlink/nl/addr_linux.go diff --git a/internal/github.com/vishvananda/netlink/nl/addr_linux_test.go b/vendor/github.com/vishvananda/netlink/nl/addr_linux_test.go similarity index 100% rename from internal/github.com/vishvananda/netlink/nl/addr_linux_test.go rename to vendor/github.com/vishvananda/netlink/nl/addr_linux_test.go diff --git a/internal/github.com/vishvananda/netlink/nl/link_linux.go b/vendor/github.com/vishvananda/netlink/nl/link_linux.go similarity index 100% rename from internal/github.com/vishvananda/netlink/nl/link_linux.go rename to vendor/github.com/vishvananda/netlink/nl/link_linux.go diff --git a/internal/github.com/vishvananda/netlink/nl/nl_linux.go b/vendor/github.com/vishvananda/netlink/nl/nl_linux.go similarity index 100% rename from internal/github.com/vishvananda/netlink/nl/nl_linux.go rename to vendor/github.com/vishvananda/netlink/nl/nl_linux.go diff --git a/internal/github.com/vishvananda/netlink/nl/nl_linux_test.go b/vendor/github.com/vishvananda/netlink/nl/nl_linux_test.go similarity index 100% rename from internal/github.com/vishvananda/netlink/nl/nl_linux_test.go rename to vendor/github.com/vishvananda/netlink/nl/nl_linux_test.go diff --git a/internal/github.com/vishvananda/netlink/nl/route_linux.go b/vendor/github.com/vishvananda/netlink/nl/route_linux.go similarity index 100% rename from internal/github.com/vishvananda/netlink/nl/route_linux.go rename to vendor/github.com/vishvananda/netlink/nl/route_linux.go diff --git a/internal/github.com/vishvananda/netlink/nl/route_linux_test.go b/vendor/github.com/vishvananda/netlink/nl/route_linux_test.go similarity index 100% rename from internal/github.com/vishvananda/netlink/nl/route_linux_test.go rename to vendor/github.com/vishvananda/netlink/nl/route_linux_test.go diff --git a/internal/github.com/vishvananda/netlink/nl/xfrm_linux.go b/vendor/github.com/vishvananda/netlink/nl/xfrm_linux.go similarity index 100% rename from internal/github.com/vishvananda/netlink/nl/xfrm_linux.go rename to vendor/github.com/vishvananda/netlink/nl/xfrm_linux.go diff --git a/internal/github.com/vishvananda/netlink/nl/xfrm_linux_test.go b/vendor/github.com/vishvananda/netlink/nl/xfrm_linux_test.go similarity index 100% rename from internal/github.com/vishvananda/netlink/nl/xfrm_linux_test.go rename to vendor/github.com/vishvananda/netlink/nl/xfrm_linux_test.go diff --git a/internal/github.com/vishvananda/netlink/nl/xfrm_policy_linux.go b/vendor/github.com/vishvananda/netlink/nl/xfrm_policy_linux.go similarity index 100% rename from internal/github.com/vishvananda/netlink/nl/xfrm_policy_linux.go rename to vendor/github.com/vishvananda/netlink/nl/xfrm_policy_linux.go diff --git a/internal/github.com/vishvananda/netlink/nl/xfrm_policy_linux_test.go b/vendor/github.com/vishvananda/netlink/nl/xfrm_policy_linux_test.go similarity index 100% rename from internal/github.com/vishvananda/netlink/nl/xfrm_policy_linux_test.go rename to vendor/github.com/vishvananda/netlink/nl/xfrm_policy_linux_test.go diff --git a/internal/github.com/vishvananda/netlink/nl/xfrm_state_linux.go b/vendor/github.com/vishvananda/netlink/nl/xfrm_state_linux.go similarity index 100% rename from internal/github.com/vishvananda/netlink/nl/xfrm_state_linux.go rename to vendor/github.com/vishvananda/netlink/nl/xfrm_state_linux.go diff --git a/internal/github.com/vishvananda/netlink/nl/xfrm_state_linux_test.go b/vendor/github.com/vishvananda/netlink/nl/xfrm_state_linux_test.go similarity index 100% rename from internal/github.com/vishvananda/netlink/nl/xfrm_state_linux_test.go rename to vendor/github.com/vishvananda/netlink/nl/xfrm_state_linux_test.go diff --git a/internal/github.com/vtolstov/gopacket/AUTHORS b/vendor/github.com/vtolstov/gopacket/AUTHORS similarity index 100% rename from internal/github.com/vtolstov/gopacket/AUTHORS rename to vendor/github.com/vtolstov/gopacket/AUTHORS diff --git a/internal/github.com/vtolstov/gopacket/CHANGELOG b/vendor/github.com/vtolstov/gopacket/CHANGELOG similarity index 100% rename from internal/github.com/vtolstov/gopacket/CHANGELOG rename to vendor/github.com/vtolstov/gopacket/CHANGELOG diff --git a/internal/github.com/vtolstov/gopacket/CONTRIBUTING.md b/vendor/github.com/vtolstov/gopacket/CONTRIBUTING.md similarity index 100% rename from internal/github.com/vtolstov/gopacket/CONTRIBUTING.md rename to vendor/github.com/vtolstov/gopacket/CONTRIBUTING.md diff --git a/internal/github.com/vtolstov/gopacket/LICENSE b/vendor/github.com/vtolstov/gopacket/LICENSE similarity index 100% rename from internal/github.com/vtolstov/gopacket/LICENSE rename to vendor/github.com/vtolstov/gopacket/LICENSE diff --git a/internal/github.com/vtolstov/gopacket/README.mkd b/vendor/github.com/vtolstov/gopacket/README.mkd similarity index 100% rename from internal/github.com/vtolstov/gopacket/README.mkd rename to vendor/github.com/vtolstov/gopacket/README.mkd diff --git a/internal/github.com/vtolstov/gopacket/base.go b/vendor/github.com/vtolstov/gopacket/base.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/base.go rename to vendor/github.com/vtolstov/gopacket/base.go diff --git a/internal/github.com/vtolstov/gopacket/benchmark_test.go b/vendor/github.com/vtolstov/gopacket/benchmark_test.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/benchmark_test.go rename to vendor/github.com/vtolstov/gopacket/benchmark_test.go diff --git a/internal/github.com/vtolstov/gopacket/bytediff/bytediff.go b/vendor/github.com/vtolstov/gopacket/bytediff/bytediff.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/bytediff/bytediff.go rename to vendor/github.com/vtolstov/gopacket/bytediff/bytediff.go diff --git a/internal/github.com/vtolstov/gopacket/bytediff/bytediff_test.go b/vendor/github.com/vtolstov/gopacket/bytediff/bytediff_test.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/bytediff/bytediff_test.go rename to vendor/github.com/vtolstov/gopacket/bytediff/bytediff_test.go diff --git a/internal/github.com/vtolstov/gopacket/decode.go b/vendor/github.com/vtolstov/gopacket/decode.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/decode.go rename to vendor/github.com/vtolstov/gopacket/decode.go diff --git a/internal/github.com/vtolstov/gopacket/doc.go b/vendor/github.com/vtolstov/gopacket/doc.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/doc.go rename to vendor/github.com/vtolstov/gopacket/doc.go diff --git a/internal/github.com/vtolstov/gopacket/flows.go b/vendor/github.com/vtolstov/gopacket/flows.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/flows.go rename to vendor/github.com/vtolstov/gopacket/flows.go diff --git a/internal/github.com/vtolstov/gopacket/gc b/vendor/github.com/vtolstov/gopacket/gc similarity index 100% rename from internal/github.com/vtolstov/gopacket/gc rename to vendor/github.com/vtolstov/gopacket/gc diff --git a/internal/github.com/vtolstov/gopacket/layerclass.go b/vendor/github.com/vtolstov/gopacket/layerclass.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layerclass.go rename to vendor/github.com/vtolstov/gopacket/layerclass.go diff --git a/internal/github.com/vtolstov/gopacket/layers/arp.go b/vendor/github.com/vtolstov/gopacket/layers/arp.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/arp.go rename to vendor/github.com/vtolstov/gopacket/layers/arp.go diff --git a/internal/github.com/vtolstov/gopacket/layers/base.go b/vendor/github.com/vtolstov/gopacket/layers/base.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/base.go rename to vendor/github.com/vtolstov/gopacket/layers/base.go diff --git a/internal/github.com/vtolstov/gopacket/layers/base_test.go b/vendor/github.com/vtolstov/gopacket/layers/base_test.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/base_test.go rename to vendor/github.com/vtolstov/gopacket/layers/base_test.go diff --git a/internal/github.com/vtolstov/gopacket/layers/cdp.go b/vendor/github.com/vtolstov/gopacket/layers/cdp.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/cdp.go rename to vendor/github.com/vtolstov/gopacket/layers/cdp.go diff --git a/internal/github.com/vtolstov/gopacket/layers/ctp.go b/vendor/github.com/vtolstov/gopacket/layers/ctp.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/ctp.go rename to vendor/github.com/vtolstov/gopacket/layers/ctp.go diff --git a/internal/github.com/vtolstov/gopacket/layers/decode_test.go b/vendor/github.com/vtolstov/gopacket/layers/decode_test.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/decode_test.go rename to vendor/github.com/vtolstov/gopacket/layers/decode_test.go diff --git a/internal/github.com/vtolstov/gopacket/layers/dhcpv4.go b/vendor/github.com/vtolstov/gopacket/layers/dhcpv4.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/dhcpv4.go rename to vendor/github.com/vtolstov/gopacket/layers/dhcpv4.go diff --git a/internal/github.com/vtolstov/gopacket/layers/dns.go b/vendor/github.com/vtolstov/gopacket/layers/dns.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/dns.go rename to vendor/github.com/vtolstov/gopacket/layers/dns.go diff --git a/internal/github.com/vtolstov/gopacket/layers/doc.go b/vendor/github.com/vtolstov/gopacket/layers/doc.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/doc.go rename to vendor/github.com/vtolstov/gopacket/layers/doc.go diff --git a/internal/github.com/vtolstov/gopacket/layers/dot11.go b/vendor/github.com/vtolstov/gopacket/layers/dot11.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/dot11.go rename to vendor/github.com/vtolstov/gopacket/layers/dot11.go diff --git a/internal/github.com/vtolstov/gopacket/layers/dot11_test.go b/vendor/github.com/vtolstov/gopacket/layers/dot11_test.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/dot11_test.go rename to vendor/github.com/vtolstov/gopacket/layers/dot11_test.go diff --git a/internal/github.com/vtolstov/gopacket/layers/dot1q.go b/vendor/github.com/vtolstov/gopacket/layers/dot1q.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/dot1q.go rename to vendor/github.com/vtolstov/gopacket/layers/dot1q.go diff --git a/internal/github.com/vtolstov/gopacket/layers/eap.go b/vendor/github.com/vtolstov/gopacket/layers/eap.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/eap.go rename to vendor/github.com/vtolstov/gopacket/layers/eap.go diff --git a/internal/github.com/vtolstov/gopacket/layers/eapol.go b/vendor/github.com/vtolstov/gopacket/layers/eapol.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/eapol.go rename to vendor/github.com/vtolstov/gopacket/layers/eapol.go diff --git a/internal/github.com/vtolstov/gopacket/layers/endpoints.go b/vendor/github.com/vtolstov/gopacket/layers/endpoints.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/endpoints.go rename to vendor/github.com/vtolstov/gopacket/layers/endpoints.go diff --git a/internal/github.com/vtolstov/gopacket/layers/enums.go b/vendor/github.com/vtolstov/gopacket/layers/enums.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/enums.go rename to vendor/github.com/vtolstov/gopacket/layers/enums.go diff --git a/internal/github.com/vtolstov/gopacket/layers/etherip.go b/vendor/github.com/vtolstov/gopacket/layers/etherip.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/etherip.go rename to vendor/github.com/vtolstov/gopacket/layers/etherip.go diff --git a/internal/github.com/vtolstov/gopacket/layers/ethernet.go b/vendor/github.com/vtolstov/gopacket/layers/ethernet.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/ethernet.go rename to vendor/github.com/vtolstov/gopacket/layers/ethernet.go diff --git a/internal/github.com/vtolstov/gopacket/layers/fddi.go b/vendor/github.com/vtolstov/gopacket/layers/fddi.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/fddi.go rename to vendor/github.com/vtolstov/gopacket/layers/fddi.go diff --git a/internal/github.com/vtolstov/gopacket/layers/gen.go b/vendor/github.com/vtolstov/gopacket/layers/gen.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/gen.go rename to vendor/github.com/vtolstov/gopacket/layers/gen.go diff --git a/internal/github.com/vtolstov/gopacket/layers/gre.go b/vendor/github.com/vtolstov/gopacket/layers/gre.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/gre.go rename to vendor/github.com/vtolstov/gopacket/layers/gre.go diff --git a/internal/github.com/vtolstov/gopacket/layers/iana_ports.go b/vendor/github.com/vtolstov/gopacket/layers/iana_ports.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/iana_ports.go rename to vendor/github.com/vtolstov/gopacket/layers/iana_ports.go diff --git a/internal/github.com/vtolstov/gopacket/layers/icmp4.go b/vendor/github.com/vtolstov/gopacket/layers/icmp4.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/icmp4.go rename to vendor/github.com/vtolstov/gopacket/layers/icmp4.go diff --git a/internal/github.com/vtolstov/gopacket/layers/icmp6.go b/vendor/github.com/vtolstov/gopacket/layers/icmp6.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/icmp6.go rename to vendor/github.com/vtolstov/gopacket/layers/icmp6.go diff --git a/internal/github.com/vtolstov/gopacket/layers/icmp6_test.go b/vendor/github.com/vtolstov/gopacket/layers/icmp6_test.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/icmp6_test.go rename to vendor/github.com/vtolstov/gopacket/layers/icmp6_test.go diff --git a/internal/github.com/vtolstov/gopacket/layers/igmp.go b/vendor/github.com/vtolstov/gopacket/layers/igmp.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/igmp.go rename to vendor/github.com/vtolstov/gopacket/layers/igmp.go diff --git a/internal/github.com/vtolstov/gopacket/layers/ip4.go b/vendor/github.com/vtolstov/gopacket/layers/ip4.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/ip4.go rename to vendor/github.com/vtolstov/gopacket/layers/ip4.go diff --git a/internal/github.com/vtolstov/gopacket/layers/ip6.go b/vendor/github.com/vtolstov/gopacket/layers/ip6.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/ip6.go rename to vendor/github.com/vtolstov/gopacket/layers/ip6.go diff --git a/internal/github.com/vtolstov/gopacket/layers/ipsec.go b/vendor/github.com/vtolstov/gopacket/layers/ipsec.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/ipsec.go rename to vendor/github.com/vtolstov/gopacket/layers/ipsec.go diff --git a/internal/github.com/vtolstov/gopacket/layers/ipsec_test.go b/vendor/github.com/vtolstov/gopacket/layers/ipsec_test.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/ipsec_test.go rename to vendor/github.com/vtolstov/gopacket/layers/ipsec_test.go diff --git a/internal/github.com/vtolstov/gopacket/layers/layertypes.go b/vendor/github.com/vtolstov/gopacket/layers/layertypes.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/layertypes.go rename to vendor/github.com/vtolstov/gopacket/layers/layertypes.go diff --git a/internal/github.com/vtolstov/gopacket/layers/linux_sll.go b/vendor/github.com/vtolstov/gopacket/layers/linux_sll.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/linux_sll.go rename to vendor/github.com/vtolstov/gopacket/layers/linux_sll.go diff --git a/internal/github.com/vtolstov/gopacket/layers/llc.go b/vendor/github.com/vtolstov/gopacket/layers/llc.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/llc.go rename to vendor/github.com/vtolstov/gopacket/layers/llc.go diff --git a/internal/github.com/vtolstov/gopacket/layers/lldp.go b/vendor/github.com/vtolstov/gopacket/layers/lldp.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/lldp.go rename to vendor/github.com/vtolstov/gopacket/layers/lldp.go diff --git a/internal/github.com/vtolstov/gopacket/layers/loopback.go b/vendor/github.com/vtolstov/gopacket/layers/loopback.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/loopback.go rename to vendor/github.com/vtolstov/gopacket/layers/loopback.go diff --git a/internal/github.com/vtolstov/gopacket/layers/mpls.go b/vendor/github.com/vtolstov/gopacket/layers/mpls.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/mpls.go rename to vendor/github.com/vtolstov/gopacket/layers/mpls.go diff --git a/internal/github.com/vtolstov/gopacket/layers/ndp.go b/vendor/github.com/vtolstov/gopacket/layers/ndp.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/ndp.go rename to vendor/github.com/vtolstov/gopacket/layers/ndp.go diff --git a/internal/github.com/vtolstov/gopacket/layers/openflow.go b/vendor/github.com/vtolstov/gopacket/layers/openflow.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/openflow.go rename to vendor/github.com/vtolstov/gopacket/layers/openflow.go diff --git a/internal/github.com/vtolstov/gopacket/layers/pflog.go b/vendor/github.com/vtolstov/gopacket/layers/pflog.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/pflog.go rename to vendor/github.com/vtolstov/gopacket/layers/pflog.go diff --git a/internal/github.com/vtolstov/gopacket/layers/ports.go b/vendor/github.com/vtolstov/gopacket/layers/ports.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/ports.go rename to vendor/github.com/vtolstov/gopacket/layers/ports.go diff --git a/internal/github.com/vtolstov/gopacket/layers/ppp.go b/vendor/github.com/vtolstov/gopacket/layers/ppp.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/ppp.go rename to vendor/github.com/vtolstov/gopacket/layers/ppp.go diff --git a/internal/github.com/vtolstov/gopacket/layers/pppoe.go b/vendor/github.com/vtolstov/gopacket/layers/pppoe.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/pppoe.go rename to vendor/github.com/vtolstov/gopacket/layers/pppoe.go diff --git a/internal/github.com/vtolstov/gopacket/layers/radiotap.go b/vendor/github.com/vtolstov/gopacket/layers/radiotap.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/radiotap.go rename to vendor/github.com/vtolstov/gopacket/layers/radiotap.go diff --git a/internal/github.com/vtolstov/gopacket/layers/rudp.go b/vendor/github.com/vtolstov/gopacket/layers/rudp.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/rudp.go rename to vendor/github.com/vtolstov/gopacket/layers/rudp.go diff --git a/internal/github.com/vtolstov/gopacket/layers/sctp.go b/vendor/github.com/vtolstov/gopacket/layers/sctp.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/sctp.go rename to vendor/github.com/vtolstov/gopacket/layers/sctp.go diff --git a/internal/github.com/vtolstov/gopacket/layers/sflow.go b/vendor/github.com/vtolstov/gopacket/layers/sflow.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/sflow.go rename to vendor/github.com/vtolstov/gopacket/layers/sflow.go diff --git a/internal/github.com/vtolstov/gopacket/layers/sflow_test.go b/vendor/github.com/vtolstov/gopacket/layers/sflow_test.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/sflow_test.go rename to vendor/github.com/vtolstov/gopacket/layers/sflow_test.go diff --git a/internal/github.com/vtolstov/gopacket/layers/tcp.go b/vendor/github.com/vtolstov/gopacket/layers/tcp.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/tcp.go rename to vendor/github.com/vtolstov/gopacket/layers/tcp.go diff --git a/internal/github.com/vtolstov/gopacket/layers/tcpip.go b/vendor/github.com/vtolstov/gopacket/layers/tcpip.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/tcpip.go rename to vendor/github.com/vtolstov/gopacket/layers/tcpip.go diff --git a/internal/github.com/vtolstov/gopacket/layers/test_creator.py b/vendor/github.com/vtolstov/gopacket/layers/test_creator.py similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/test_creator.py rename to vendor/github.com/vtolstov/gopacket/layers/test_creator.py diff --git a/internal/github.com/vtolstov/gopacket/layers/udp.go b/vendor/github.com/vtolstov/gopacket/layers/udp.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/udp.go rename to vendor/github.com/vtolstov/gopacket/layers/udp.go diff --git a/internal/github.com/vtolstov/gopacket/layers/udp_test.go b/vendor/github.com/vtolstov/gopacket/layers/udp_test.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/udp_test.go rename to vendor/github.com/vtolstov/gopacket/layers/udp_test.go diff --git a/internal/github.com/vtolstov/gopacket/layers/udplite.go b/vendor/github.com/vtolstov/gopacket/layers/udplite.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/udplite.go rename to vendor/github.com/vtolstov/gopacket/layers/udplite.go diff --git a/internal/github.com/vtolstov/gopacket/layers/usb.go b/vendor/github.com/vtolstov/gopacket/layers/usb.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/usb.go rename to vendor/github.com/vtolstov/gopacket/layers/usb.go diff --git a/internal/github.com/vtolstov/gopacket/layers/usb_test.go b/vendor/github.com/vtolstov/gopacket/layers/usb_test.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layers/usb_test.go rename to vendor/github.com/vtolstov/gopacket/layers/usb_test.go diff --git a/internal/github.com/vtolstov/gopacket/layertype.go b/vendor/github.com/vtolstov/gopacket/layertype.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/layertype.go rename to vendor/github.com/vtolstov/gopacket/layertype.go diff --git a/internal/github.com/vtolstov/gopacket/packet.go b/vendor/github.com/vtolstov/gopacket/packet.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/packet.go rename to vendor/github.com/vtolstov/gopacket/packet.go diff --git a/internal/github.com/vtolstov/gopacket/parser.go b/vendor/github.com/vtolstov/gopacket/parser.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/parser.go rename to vendor/github.com/vtolstov/gopacket/parser.go diff --git a/internal/github.com/vtolstov/gopacket/writer.go b/vendor/github.com/vtolstov/gopacket/writer.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/writer.go rename to vendor/github.com/vtolstov/gopacket/writer.go diff --git a/internal/github.com/vtolstov/gopacket/writer_test.go b/vendor/github.com/vtolstov/gopacket/writer_test.go similarity index 100% rename from internal/github.com/vtolstov/gopacket/writer_test.go rename to vendor/github.com/vtolstov/gopacket/writer_test.go diff --git a/internal/golang.org/x/net/icmp/dstunreach.go b/vendor/golang.org/x/net/icmp/dstunreach.go similarity index 100% rename from internal/golang.org/x/net/icmp/dstunreach.go rename to vendor/golang.org/x/net/icmp/dstunreach.go diff --git a/internal/golang.org/x/net/icmp/echo.go b/vendor/golang.org/x/net/icmp/echo.go similarity index 100% rename from internal/golang.org/x/net/icmp/echo.go rename to vendor/golang.org/x/net/icmp/echo.go diff --git a/internal/golang.org/x/net/icmp/endpoint.go b/vendor/golang.org/x/net/icmp/endpoint.go similarity index 100% rename from internal/golang.org/x/net/icmp/endpoint.go rename to vendor/golang.org/x/net/icmp/endpoint.go diff --git a/internal/golang.org/x/net/icmp/example_test.go b/vendor/golang.org/x/net/icmp/example_test.go similarity index 100% rename from internal/golang.org/x/net/icmp/example_test.go rename to vendor/golang.org/x/net/icmp/example_test.go diff --git a/internal/golang.org/x/net/icmp/extension.go b/vendor/golang.org/x/net/icmp/extension.go similarity index 100% rename from internal/golang.org/x/net/icmp/extension.go rename to vendor/golang.org/x/net/icmp/extension.go diff --git a/internal/golang.org/x/net/icmp/helper_posix.go b/vendor/golang.org/x/net/icmp/helper_posix.go similarity index 100% rename from internal/golang.org/x/net/icmp/helper_posix.go rename to vendor/golang.org/x/net/icmp/helper_posix.go diff --git a/internal/golang.org/x/net/icmp/ipv4.go b/vendor/golang.org/x/net/icmp/ipv4.go similarity index 100% rename from internal/golang.org/x/net/icmp/ipv4.go rename to vendor/golang.org/x/net/icmp/ipv4.go diff --git a/internal/golang.org/x/net/icmp/ipv4_test.go b/vendor/golang.org/x/net/icmp/ipv4_test.go similarity index 100% rename from internal/golang.org/x/net/icmp/ipv4_test.go rename to vendor/golang.org/x/net/icmp/ipv4_test.go diff --git a/internal/golang.org/x/net/icmp/ipv6.go b/vendor/golang.org/x/net/icmp/ipv6.go similarity index 100% rename from internal/golang.org/x/net/icmp/ipv6.go rename to vendor/golang.org/x/net/icmp/ipv6.go diff --git a/internal/golang.org/x/net/icmp/listen_posix.go b/vendor/golang.org/x/net/icmp/listen_posix.go similarity index 100% rename from internal/golang.org/x/net/icmp/listen_posix.go rename to vendor/golang.org/x/net/icmp/listen_posix.go diff --git a/internal/golang.org/x/net/icmp/listen_stub.go b/vendor/golang.org/x/net/icmp/listen_stub.go similarity index 100% rename from internal/golang.org/x/net/icmp/listen_stub.go rename to vendor/golang.org/x/net/icmp/listen_stub.go diff --git a/internal/golang.org/x/net/icmp/message.go b/vendor/golang.org/x/net/icmp/message.go similarity index 100% rename from internal/golang.org/x/net/icmp/message.go rename to vendor/golang.org/x/net/icmp/message.go diff --git a/internal/golang.org/x/net/icmp/message_test.go b/vendor/golang.org/x/net/icmp/message_test.go similarity index 100% rename from internal/golang.org/x/net/icmp/message_test.go rename to vendor/golang.org/x/net/icmp/message_test.go diff --git a/internal/golang.org/x/net/icmp/messagebody.go b/vendor/golang.org/x/net/icmp/messagebody.go similarity index 100% rename from internal/golang.org/x/net/icmp/messagebody.go rename to vendor/golang.org/x/net/icmp/messagebody.go diff --git a/internal/golang.org/x/net/icmp/packettoobig.go b/vendor/golang.org/x/net/icmp/packettoobig.go similarity index 100% rename from internal/golang.org/x/net/icmp/packettoobig.go rename to vendor/golang.org/x/net/icmp/packettoobig.go diff --git a/internal/golang.org/x/net/icmp/paramprob.go b/vendor/golang.org/x/net/icmp/paramprob.go similarity index 100% rename from internal/golang.org/x/net/icmp/paramprob.go rename to vendor/golang.org/x/net/icmp/paramprob.go diff --git a/internal/golang.org/x/net/icmp/ping_test.go b/vendor/golang.org/x/net/icmp/ping_test.go similarity index 100% rename from internal/golang.org/x/net/icmp/ping_test.go rename to vendor/golang.org/x/net/icmp/ping_test.go diff --git a/internal/golang.org/x/net/icmp/sys_freebsd.go b/vendor/golang.org/x/net/icmp/sys_freebsd.go similarity index 100% rename from internal/golang.org/x/net/icmp/sys_freebsd.go rename to vendor/golang.org/x/net/icmp/sys_freebsd.go diff --git a/internal/golang.org/x/net/icmp/timeexceeded.go b/vendor/golang.org/x/net/icmp/timeexceeded.go similarity index 100% rename from internal/golang.org/x/net/icmp/timeexceeded.go rename to vendor/golang.org/x/net/icmp/timeexceeded.go diff --git a/internal/golang.org/x/net/ipv4/control.go b/vendor/golang.org/x/net/ipv4/control.go similarity index 100% rename from internal/golang.org/x/net/ipv4/control.go rename to vendor/golang.org/x/net/ipv4/control.go diff --git a/internal/golang.org/x/net/ipv4/control_bsd.go b/vendor/golang.org/x/net/ipv4/control_bsd.go similarity index 100% rename from internal/golang.org/x/net/ipv4/control_bsd.go rename to vendor/golang.org/x/net/ipv4/control_bsd.go diff --git a/internal/golang.org/x/net/ipv4/control_pktinfo.go b/vendor/golang.org/x/net/ipv4/control_pktinfo.go similarity index 100% rename from internal/golang.org/x/net/ipv4/control_pktinfo.go rename to vendor/golang.org/x/net/ipv4/control_pktinfo.go diff --git a/internal/golang.org/x/net/ipv4/control_stub.go b/vendor/golang.org/x/net/ipv4/control_stub.go similarity index 100% rename from internal/golang.org/x/net/ipv4/control_stub.go rename to vendor/golang.org/x/net/ipv4/control_stub.go diff --git a/internal/golang.org/x/net/ipv4/control_unix.go b/vendor/golang.org/x/net/ipv4/control_unix.go similarity index 100% rename from internal/golang.org/x/net/ipv4/control_unix.go rename to vendor/golang.org/x/net/ipv4/control_unix.go diff --git a/internal/golang.org/x/net/ipv4/control_windows.go b/vendor/golang.org/x/net/ipv4/control_windows.go similarity index 100% rename from internal/golang.org/x/net/ipv4/control_windows.go rename to vendor/golang.org/x/net/ipv4/control_windows.go diff --git a/internal/golang.org/x/net/ipv4/defs_darwin.go b/vendor/golang.org/x/net/ipv4/defs_darwin.go similarity index 100% rename from internal/golang.org/x/net/ipv4/defs_darwin.go rename to vendor/golang.org/x/net/ipv4/defs_darwin.go diff --git a/internal/golang.org/x/net/ipv4/defs_dragonfly.go b/vendor/golang.org/x/net/ipv4/defs_dragonfly.go similarity index 100% rename from internal/golang.org/x/net/ipv4/defs_dragonfly.go rename to vendor/golang.org/x/net/ipv4/defs_dragonfly.go diff --git a/internal/golang.org/x/net/ipv4/defs_freebsd.go b/vendor/golang.org/x/net/ipv4/defs_freebsd.go similarity index 100% rename from internal/golang.org/x/net/ipv4/defs_freebsd.go rename to vendor/golang.org/x/net/ipv4/defs_freebsd.go diff --git a/internal/golang.org/x/net/ipv4/defs_linux.go b/vendor/golang.org/x/net/ipv4/defs_linux.go similarity index 100% rename from internal/golang.org/x/net/ipv4/defs_linux.go rename to vendor/golang.org/x/net/ipv4/defs_linux.go diff --git a/internal/golang.org/x/net/ipv4/defs_netbsd.go b/vendor/golang.org/x/net/ipv4/defs_netbsd.go similarity index 100% rename from internal/golang.org/x/net/ipv4/defs_netbsd.go rename to vendor/golang.org/x/net/ipv4/defs_netbsd.go diff --git a/internal/golang.org/x/net/ipv4/defs_openbsd.go b/vendor/golang.org/x/net/ipv4/defs_openbsd.go similarity index 100% rename from internal/golang.org/x/net/ipv4/defs_openbsd.go rename to vendor/golang.org/x/net/ipv4/defs_openbsd.go diff --git a/internal/golang.org/x/net/ipv4/defs_solaris.go b/vendor/golang.org/x/net/ipv4/defs_solaris.go similarity index 100% rename from internal/golang.org/x/net/ipv4/defs_solaris.go rename to vendor/golang.org/x/net/ipv4/defs_solaris.go diff --git a/internal/golang.org/x/net/ipv4/dgramopt_posix.go b/vendor/golang.org/x/net/ipv4/dgramopt_posix.go similarity index 100% rename from internal/golang.org/x/net/ipv4/dgramopt_posix.go rename to vendor/golang.org/x/net/ipv4/dgramopt_posix.go diff --git a/internal/golang.org/x/net/ipv4/dgramopt_stub.go b/vendor/golang.org/x/net/ipv4/dgramopt_stub.go similarity index 100% rename from internal/golang.org/x/net/ipv4/dgramopt_stub.go rename to vendor/golang.org/x/net/ipv4/dgramopt_stub.go diff --git a/internal/golang.org/x/net/ipv4/doc.go b/vendor/golang.org/x/net/ipv4/doc.go similarity index 100% rename from internal/golang.org/x/net/ipv4/doc.go rename to vendor/golang.org/x/net/ipv4/doc.go diff --git a/internal/golang.org/x/net/ipv4/endpoint.go b/vendor/golang.org/x/net/ipv4/endpoint.go similarity index 100% rename from internal/golang.org/x/net/ipv4/endpoint.go rename to vendor/golang.org/x/net/ipv4/endpoint.go diff --git a/internal/golang.org/x/net/ipv4/example_test.go b/vendor/golang.org/x/net/ipv4/example_test.go similarity index 100% rename from internal/golang.org/x/net/ipv4/example_test.go rename to vendor/golang.org/x/net/ipv4/example_test.go diff --git a/internal/golang.org/x/net/ipv4/gen.go b/vendor/golang.org/x/net/ipv4/gen.go similarity index 100% rename from internal/golang.org/x/net/ipv4/gen.go rename to vendor/golang.org/x/net/ipv4/gen.go diff --git a/internal/golang.org/x/net/ipv4/genericopt_posix.go b/vendor/golang.org/x/net/ipv4/genericopt_posix.go similarity index 100% rename from internal/golang.org/x/net/ipv4/genericopt_posix.go rename to vendor/golang.org/x/net/ipv4/genericopt_posix.go diff --git a/internal/golang.org/x/net/ipv4/genericopt_stub.go b/vendor/golang.org/x/net/ipv4/genericopt_stub.go similarity index 100% rename from internal/golang.org/x/net/ipv4/genericopt_stub.go rename to vendor/golang.org/x/net/ipv4/genericopt_stub.go diff --git a/internal/golang.org/x/net/ipv4/header.go b/vendor/golang.org/x/net/ipv4/header.go similarity index 100% rename from internal/golang.org/x/net/ipv4/header.go rename to vendor/golang.org/x/net/ipv4/header.go diff --git a/internal/golang.org/x/net/ipv4/header_test.go b/vendor/golang.org/x/net/ipv4/header_test.go similarity index 100% rename from internal/golang.org/x/net/ipv4/header_test.go rename to vendor/golang.org/x/net/ipv4/header_test.go diff --git a/internal/golang.org/x/net/ipv4/helper.go b/vendor/golang.org/x/net/ipv4/helper.go similarity index 100% rename from internal/golang.org/x/net/ipv4/helper.go rename to vendor/golang.org/x/net/ipv4/helper.go diff --git a/internal/golang.org/x/net/ipv4/helper_stub.go b/vendor/golang.org/x/net/ipv4/helper_stub.go similarity index 100% rename from internal/golang.org/x/net/ipv4/helper_stub.go rename to vendor/golang.org/x/net/ipv4/helper_stub.go diff --git a/internal/golang.org/x/net/ipv4/helper_unix.go b/vendor/golang.org/x/net/ipv4/helper_unix.go similarity index 100% rename from internal/golang.org/x/net/ipv4/helper_unix.go rename to vendor/golang.org/x/net/ipv4/helper_unix.go diff --git a/internal/golang.org/x/net/ipv4/helper_windows.go b/vendor/golang.org/x/net/ipv4/helper_windows.go similarity index 100% rename from internal/golang.org/x/net/ipv4/helper_windows.go rename to vendor/golang.org/x/net/ipv4/helper_windows.go diff --git a/internal/golang.org/x/net/ipv4/iana.go b/vendor/golang.org/x/net/ipv4/iana.go similarity index 100% rename from internal/golang.org/x/net/ipv4/iana.go rename to vendor/golang.org/x/net/ipv4/iana.go diff --git a/internal/golang.org/x/net/ipv4/icmp.go b/vendor/golang.org/x/net/ipv4/icmp.go similarity index 100% rename from internal/golang.org/x/net/ipv4/icmp.go rename to vendor/golang.org/x/net/ipv4/icmp.go diff --git a/internal/golang.org/x/net/ipv4/icmp_linux.go b/vendor/golang.org/x/net/ipv4/icmp_linux.go similarity index 100% rename from internal/golang.org/x/net/ipv4/icmp_linux.go rename to vendor/golang.org/x/net/ipv4/icmp_linux.go diff --git a/internal/golang.org/x/net/ipv4/icmp_stub.go b/vendor/golang.org/x/net/ipv4/icmp_stub.go similarity index 100% rename from internal/golang.org/x/net/ipv4/icmp_stub.go rename to vendor/golang.org/x/net/ipv4/icmp_stub.go diff --git a/internal/golang.org/x/net/ipv4/icmp_test.go b/vendor/golang.org/x/net/ipv4/icmp_test.go similarity index 100% rename from internal/golang.org/x/net/ipv4/icmp_test.go rename to vendor/golang.org/x/net/ipv4/icmp_test.go diff --git a/internal/golang.org/x/net/ipv4/mocktransponder_test.go b/vendor/golang.org/x/net/ipv4/mocktransponder_test.go similarity index 100% rename from internal/golang.org/x/net/ipv4/mocktransponder_test.go rename to vendor/golang.org/x/net/ipv4/mocktransponder_test.go diff --git a/internal/golang.org/x/net/ipv4/multicast_test.go b/vendor/golang.org/x/net/ipv4/multicast_test.go similarity index 100% rename from internal/golang.org/x/net/ipv4/multicast_test.go rename to vendor/golang.org/x/net/ipv4/multicast_test.go diff --git a/internal/golang.org/x/net/ipv4/multicastlistener_test.go b/vendor/golang.org/x/net/ipv4/multicastlistener_test.go similarity index 100% rename from internal/golang.org/x/net/ipv4/multicastlistener_test.go rename to vendor/golang.org/x/net/ipv4/multicastlistener_test.go diff --git a/internal/golang.org/x/net/ipv4/multicastsockopt_test.go b/vendor/golang.org/x/net/ipv4/multicastsockopt_test.go similarity index 100% rename from internal/golang.org/x/net/ipv4/multicastsockopt_test.go rename to vendor/golang.org/x/net/ipv4/multicastsockopt_test.go diff --git a/internal/golang.org/x/net/ipv4/packet.go b/vendor/golang.org/x/net/ipv4/packet.go similarity index 100% rename from internal/golang.org/x/net/ipv4/packet.go rename to vendor/golang.org/x/net/ipv4/packet.go diff --git a/internal/golang.org/x/net/ipv4/payload.go b/vendor/golang.org/x/net/ipv4/payload.go similarity index 100% rename from internal/golang.org/x/net/ipv4/payload.go rename to vendor/golang.org/x/net/ipv4/payload.go diff --git a/internal/golang.org/x/net/ipv4/payload_cmsg.go b/vendor/golang.org/x/net/ipv4/payload_cmsg.go similarity index 100% rename from internal/golang.org/x/net/ipv4/payload_cmsg.go rename to vendor/golang.org/x/net/ipv4/payload_cmsg.go diff --git a/internal/golang.org/x/net/ipv4/payload_nocmsg.go b/vendor/golang.org/x/net/ipv4/payload_nocmsg.go similarity index 100% rename from internal/golang.org/x/net/ipv4/payload_nocmsg.go rename to vendor/golang.org/x/net/ipv4/payload_nocmsg.go diff --git a/internal/golang.org/x/net/ipv4/readwrite_test.go b/vendor/golang.org/x/net/ipv4/readwrite_test.go similarity index 100% rename from internal/golang.org/x/net/ipv4/readwrite_test.go rename to vendor/golang.org/x/net/ipv4/readwrite_test.go diff --git a/internal/golang.org/x/net/ipv4/sockopt.go b/vendor/golang.org/x/net/ipv4/sockopt.go similarity index 100% rename from internal/golang.org/x/net/ipv4/sockopt.go rename to vendor/golang.org/x/net/ipv4/sockopt.go diff --git a/internal/golang.org/x/net/ipv4/sockopt_asmreq.go b/vendor/golang.org/x/net/ipv4/sockopt_asmreq.go similarity index 100% rename from internal/golang.org/x/net/ipv4/sockopt_asmreq.go rename to vendor/golang.org/x/net/ipv4/sockopt_asmreq.go diff --git a/internal/golang.org/x/net/ipv4/sockopt_asmreq_stub.go b/vendor/golang.org/x/net/ipv4/sockopt_asmreq_stub.go similarity index 100% rename from internal/golang.org/x/net/ipv4/sockopt_asmreq_stub.go rename to vendor/golang.org/x/net/ipv4/sockopt_asmreq_stub.go diff --git a/internal/golang.org/x/net/ipv4/sockopt_asmreq_unix.go b/vendor/golang.org/x/net/ipv4/sockopt_asmreq_unix.go similarity index 100% rename from internal/golang.org/x/net/ipv4/sockopt_asmreq_unix.go rename to vendor/golang.org/x/net/ipv4/sockopt_asmreq_unix.go diff --git a/internal/golang.org/x/net/ipv4/sockopt_asmreq_windows.go b/vendor/golang.org/x/net/ipv4/sockopt_asmreq_windows.go similarity index 100% rename from internal/golang.org/x/net/ipv4/sockopt_asmreq_windows.go rename to vendor/golang.org/x/net/ipv4/sockopt_asmreq_windows.go diff --git a/internal/golang.org/x/net/ipv4/sockopt_asmreqn_stub.go b/vendor/golang.org/x/net/ipv4/sockopt_asmreqn_stub.go similarity index 100% rename from internal/golang.org/x/net/ipv4/sockopt_asmreqn_stub.go rename to vendor/golang.org/x/net/ipv4/sockopt_asmreqn_stub.go diff --git a/internal/golang.org/x/net/ipv4/sockopt_asmreqn_unix.go b/vendor/golang.org/x/net/ipv4/sockopt_asmreqn_unix.go similarity index 100% rename from internal/golang.org/x/net/ipv4/sockopt_asmreqn_unix.go rename to vendor/golang.org/x/net/ipv4/sockopt_asmreqn_unix.go diff --git a/internal/golang.org/x/net/ipv4/sockopt_ssmreq_stub.go b/vendor/golang.org/x/net/ipv4/sockopt_ssmreq_stub.go similarity index 100% rename from internal/golang.org/x/net/ipv4/sockopt_ssmreq_stub.go rename to vendor/golang.org/x/net/ipv4/sockopt_ssmreq_stub.go diff --git a/internal/golang.org/x/net/ipv4/sockopt_ssmreq_unix.go b/vendor/golang.org/x/net/ipv4/sockopt_ssmreq_unix.go similarity index 100% rename from internal/golang.org/x/net/ipv4/sockopt_ssmreq_unix.go rename to vendor/golang.org/x/net/ipv4/sockopt_ssmreq_unix.go diff --git a/internal/golang.org/x/net/ipv4/sockopt_stub.go b/vendor/golang.org/x/net/ipv4/sockopt_stub.go similarity index 100% rename from internal/golang.org/x/net/ipv4/sockopt_stub.go rename to vendor/golang.org/x/net/ipv4/sockopt_stub.go diff --git a/internal/golang.org/x/net/ipv4/sockopt_unix.go b/vendor/golang.org/x/net/ipv4/sockopt_unix.go similarity index 100% rename from internal/golang.org/x/net/ipv4/sockopt_unix.go rename to vendor/golang.org/x/net/ipv4/sockopt_unix.go diff --git a/internal/golang.org/x/net/ipv4/sockopt_windows.go b/vendor/golang.org/x/net/ipv4/sockopt_windows.go similarity index 100% rename from internal/golang.org/x/net/ipv4/sockopt_windows.go rename to vendor/golang.org/x/net/ipv4/sockopt_windows.go diff --git a/internal/golang.org/x/net/ipv4/sys_bsd.go b/vendor/golang.org/x/net/ipv4/sys_bsd.go similarity index 100% rename from internal/golang.org/x/net/ipv4/sys_bsd.go rename to vendor/golang.org/x/net/ipv4/sys_bsd.go diff --git a/internal/golang.org/x/net/ipv4/sys_darwin.go b/vendor/golang.org/x/net/ipv4/sys_darwin.go similarity index 100% rename from internal/golang.org/x/net/ipv4/sys_darwin.go rename to vendor/golang.org/x/net/ipv4/sys_darwin.go diff --git a/internal/golang.org/x/net/ipv4/sys_freebsd.go b/vendor/golang.org/x/net/ipv4/sys_freebsd.go similarity index 100% rename from internal/golang.org/x/net/ipv4/sys_freebsd.go rename to vendor/golang.org/x/net/ipv4/sys_freebsd.go diff --git a/internal/golang.org/x/net/ipv4/sys_linux.go b/vendor/golang.org/x/net/ipv4/sys_linux.go similarity index 100% rename from internal/golang.org/x/net/ipv4/sys_linux.go rename to vendor/golang.org/x/net/ipv4/sys_linux.go diff --git a/internal/golang.org/x/net/ipv4/sys_openbsd.go b/vendor/golang.org/x/net/ipv4/sys_openbsd.go similarity index 100% rename from internal/golang.org/x/net/ipv4/sys_openbsd.go rename to vendor/golang.org/x/net/ipv4/sys_openbsd.go diff --git a/internal/golang.org/x/net/ipv4/sys_stub.go b/vendor/golang.org/x/net/ipv4/sys_stub.go similarity index 100% rename from internal/golang.org/x/net/ipv4/sys_stub.go rename to vendor/golang.org/x/net/ipv4/sys_stub.go diff --git a/internal/golang.org/x/net/ipv4/sys_windows.go b/vendor/golang.org/x/net/ipv4/sys_windows.go similarity index 100% rename from internal/golang.org/x/net/ipv4/sys_windows.go rename to vendor/golang.org/x/net/ipv4/sys_windows.go diff --git a/internal/golang.org/x/net/ipv4/syscall_linux_386.go b/vendor/golang.org/x/net/ipv4/syscall_linux_386.go similarity index 100% rename from internal/golang.org/x/net/ipv4/syscall_linux_386.go rename to vendor/golang.org/x/net/ipv4/syscall_linux_386.go diff --git a/internal/golang.org/x/net/ipv4/syscall_unix.go b/vendor/golang.org/x/net/ipv4/syscall_unix.go similarity index 100% rename from internal/golang.org/x/net/ipv4/syscall_unix.go rename to vendor/golang.org/x/net/ipv4/syscall_unix.go diff --git a/internal/golang.org/x/net/ipv4/thunk_linux_386.s b/vendor/golang.org/x/net/ipv4/thunk_linux_386.s similarity index 100% rename from internal/golang.org/x/net/ipv4/thunk_linux_386.s rename to vendor/golang.org/x/net/ipv4/thunk_linux_386.s diff --git a/internal/golang.org/x/net/ipv4/unicast_test.go b/vendor/golang.org/x/net/ipv4/unicast_test.go similarity index 100% rename from internal/golang.org/x/net/ipv4/unicast_test.go rename to vendor/golang.org/x/net/ipv4/unicast_test.go diff --git a/internal/golang.org/x/net/ipv4/unicastsockopt_test.go b/vendor/golang.org/x/net/ipv4/unicastsockopt_test.go similarity index 100% rename from internal/golang.org/x/net/ipv4/unicastsockopt_test.go rename to vendor/golang.org/x/net/ipv4/unicastsockopt_test.go diff --git a/internal/golang.org/x/net/ipv4/zsys_darwin.go b/vendor/golang.org/x/net/ipv4/zsys_darwin.go similarity index 100% rename from internal/golang.org/x/net/ipv4/zsys_darwin.go rename to vendor/golang.org/x/net/ipv4/zsys_darwin.go diff --git a/internal/golang.org/x/net/ipv4/zsys_dragonfly.go b/vendor/golang.org/x/net/ipv4/zsys_dragonfly.go similarity index 100% rename from internal/golang.org/x/net/ipv4/zsys_dragonfly.go rename to vendor/golang.org/x/net/ipv4/zsys_dragonfly.go diff --git a/internal/golang.org/x/net/ipv4/zsys_freebsd_386.go b/vendor/golang.org/x/net/ipv4/zsys_freebsd_386.go similarity index 100% rename from internal/golang.org/x/net/ipv4/zsys_freebsd_386.go rename to vendor/golang.org/x/net/ipv4/zsys_freebsd_386.go diff --git a/internal/golang.org/x/net/ipv4/zsys_freebsd_amd64.go b/vendor/golang.org/x/net/ipv4/zsys_freebsd_amd64.go similarity index 100% rename from internal/golang.org/x/net/ipv4/zsys_freebsd_amd64.go rename to vendor/golang.org/x/net/ipv4/zsys_freebsd_amd64.go diff --git a/internal/golang.org/x/net/ipv4/zsys_freebsd_arm.go b/vendor/golang.org/x/net/ipv4/zsys_freebsd_arm.go similarity index 100% rename from internal/golang.org/x/net/ipv4/zsys_freebsd_arm.go rename to vendor/golang.org/x/net/ipv4/zsys_freebsd_arm.go diff --git a/internal/golang.org/x/net/ipv4/zsys_linux_386.go b/vendor/golang.org/x/net/ipv4/zsys_linux_386.go similarity index 100% rename from internal/golang.org/x/net/ipv4/zsys_linux_386.go rename to vendor/golang.org/x/net/ipv4/zsys_linux_386.go diff --git a/internal/golang.org/x/net/ipv4/zsys_linux_amd64.go b/vendor/golang.org/x/net/ipv4/zsys_linux_amd64.go similarity index 100% rename from internal/golang.org/x/net/ipv4/zsys_linux_amd64.go rename to vendor/golang.org/x/net/ipv4/zsys_linux_amd64.go diff --git a/internal/golang.org/x/net/ipv4/zsys_linux_arm.go b/vendor/golang.org/x/net/ipv4/zsys_linux_arm.go similarity index 100% rename from internal/golang.org/x/net/ipv4/zsys_linux_arm.go rename to vendor/golang.org/x/net/ipv4/zsys_linux_arm.go diff --git a/internal/golang.org/x/net/ipv4/zsys_netbsd.go b/vendor/golang.org/x/net/ipv4/zsys_netbsd.go similarity index 100% rename from internal/golang.org/x/net/ipv4/zsys_netbsd.go rename to vendor/golang.org/x/net/ipv4/zsys_netbsd.go diff --git a/internal/golang.org/x/net/ipv4/zsys_openbsd.go b/vendor/golang.org/x/net/ipv4/zsys_openbsd.go similarity index 100% rename from internal/golang.org/x/net/ipv4/zsys_openbsd.go rename to vendor/golang.org/x/net/ipv4/zsys_openbsd.go diff --git a/internal/golang.org/x/net/ipv4/zsys_solaris.go b/vendor/golang.org/x/net/ipv4/zsys_solaris.go similarity index 100% rename from internal/golang.org/x/net/ipv4/zsys_solaris.go rename to vendor/golang.org/x/net/ipv4/zsys_solaris.go diff --git a/internal/golang.org/x/net/ipv6/control.go b/vendor/golang.org/x/net/ipv6/control.go similarity index 100% rename from internal/golang.org/x/net/ipv6/control.go rename to vendor/golang.org/x/net/ipv6/control.go diff --git a/internal/golang.org/x/net/ipv6/control_rfc2292_unix.go b/vendor/golang.org/x/net/ipv6/control_rfc2292_unix.go similarity index 100% rename from internal/golang.org/x/net/ipv6/control_rfc2292_unix.go rename to vendor/golang.org/x/net/ipv6/control_rfc2292_unix.go diff --git a/internal/golang.org/x/net/ipv6/control_rfc3542_unix.go b/vendor/golang.org/x/net/ipv6/control_rfc3542_unix.go similarity index 100% rename from internal/golang.org/x/net/ipv6/control_rfc3542_unix.go rename to vendor/golang.org/x/net/ipv6/control_rfc3542_unix.go diff --git a/internal/golang.org/x/net/ipv6/control_stub.go b/vendor/golang.org/x/net/ipv6/control_stub.go similarity index 100% rename from internal/golang.org/x/net/ipv6/control_stub.go rename to vendor/golang.org/x/net/ipv6/control_stub.go diff --git a/internal/golang.org/x/net/ipv6/control_unix.go b/vendor/golang.org/x/net/ipv6/control_unix.go similarity index 100% rename from internal/golang.org/x/net/ipv6/control_unix.go rename to vendor/golang.org/x/net/ipv6/control_unix.go diff --git a/internal/golang.org/x/net/ipv6/control_windows.go b/vendor/golang.org/x/net/ipv6/control_windows.go similarity index 100% rename from internal/golang.org/x/net/ipv6/control_windows.go rename to vendor/golang.org/x/net/ipv6/control_windows.go diff --git a/internal/golang.org/x/net/ipv6/defs_darwin.go b/vendor/golang.org/x/net/ipv6/defs_darwin.go similarity index 100% rename from internal/golang.org/x/net/ipv6/defs_darwin.go rename to vendor/golang.org/x/net/ipv6/defs_darwin.go diff --git a/internal/golang.org/x/net/ipv6/defs_dragonfly.go b/vendor/golang.org/x/net/ipv6/defs_dragonfly.go similarity index 100% rename from internal/golang.org/x/net/ipv6/defs_dragonfly.go rename to vendor/golang.org/x/net/ipv6/defs_dragonfly.go diff --git a/internal/golang.org/x/net/ipv6/defs_freebsd.go b/vendor/golang.org/x/net/ipv6/defs_freebsd.go similarity index 100% rename from internal/golang.org/x/net/ipv6/defs_freebsd.go rename to vendor/golang.org/x/net/ipv6/defs_freebsd.go diff --git a/internal/golang.org/x/net/ipv6/defs_linux.go b/vendor/golang.org/x/net/ipv6/defs_linux.go similarity index 100% rename from internal/golang.org/x/net/ipv6/defs_linux.go rename to vendor/golang.org/x/net/ipv6/defs_linux.go diff --git a/internal/golang.org/x/net/ipv6/defs_netbsd.go b/vendor/golang.org/x/net/ipv6/defs_netbsd.go similarity index 100% rename from internal/golang.org/x/net/ipv6/defs_netbsd.go rename to vendor/golang.org/x/net/ipv6/defs_netbsd.go diff --git a/internal/golang.org/x/net/ipv6/defs_openbsd.go b/vendor/golang.org/x/net/ipv6/defs_openbsd.go similarity index 100% rename from internal/golang.org/x/net/ipv6/defs_openbsd.go rename to vendor/golang.org/x/net/ipv6/defs_openbsd.go diff --git a/internal/golang.org/x/net/ipv6/defs_solaris.go b/vendor/golang.org/x/net/ipv6/defs_solaris.go similarity index 100% rename from internal/golang.org/x/net/ipv6/defs_solaris.go rename to vendor/golang.org/x/net/ipv6/defs_solaris.go diff --git a/internal/golang.org/x/net/ipv6/dgramopt_posix.go b/vendor/golang.org/x/net/ipv6/dgramopt_posix.go similarity index 100% rename from internal/golang.org/x/net/ipv6/dgramopt_posix.go rename to vendor/golang.org/x/net/ipv6/dgramopt_posix.go diff --git a/internal/golang.org/x/net/ipv6/dgramopt_stub.go b/vendor/golang.org/x/net/ipv6/dgramopt_stub.go similarity index 100% rename from internal/golang.org/x/net/ipv6/dgramopt_stub.go rename to vendor/golang.org/x/net/ipv6/dgramopt_stub.go diff --git a/internal/golang.org/x/net/ipv6/doc.go b/vendor/golang.org/x/net/ipv6/doc.go similarity index 100% rename from internal/golang.org/x/net/ipv6/doc.go rename to vendor/golang.org/x/net/ipv6/doc.go diff --git a/internal/golang.org/x/net/ipv6/endpoint.go b/vendor/golang.org/x/net/ipv6/endpoint.go similarity index 100% rename from internal/golang.org/x/net/ipv6/endpoint.go rename to vendor/golang.org/x/net/ipv6/endpoint.go diff --git a/internal/golang.org/x/net/ipv6/example_test.go b/vendor/golang.org/x/net/ipv6/example_test.go similarity index 100% rename from internal/golang.org/x/net/ipv6/example_test.go rename to vendor/golang.org/x/net/ipv6/example_test.go diff --git a/internal/golang.org/x/net/ipv6/gen.go b/vendor/golang.org/x/net/ipv6/gen.go similarity index 100% rename from internal/golang.org/x/net/ipv6/gen.go rename to vendor/golang.org/x/net/ipv6/gen.go diff --git a/internal/golang.org/x/net/ipv6/genericopt_posix.go b/vendor/golang.org/x/net/ipv6/genericopt_posix.go similarity index 100% rename from internal/golang.org/x/net/ipv6/genericopt_posix.go rename to vendor/golang.org/x/net/ipv6/genericopt_posix.go diff --git a/internal/golang.org/x/net/ipv6/genericopt_stub.go b/vendor/golang.org/x/net/ipv6/genericopt_stub.go similarity index 100% rename from internal/golang.org/x/net/ipv6/genericopt_stub.go rename to vendor/golang.org/x/net/ipv6/genericopt_stub.go diff --git a/internal/golang.org/x/net/ipv6/header.go b/vendor/golang.org/x/net/ipv6/header.go similarity index 100% rename from internal/golang.org/x/net/ipv6/header.go rename to vendor/golang.org/x/net/ipv6/header.go diff --git a/internal/golang.org/x/net/ipv6/header_test.go b/vendor/golang.org/x/net/ipv6/header_test.go similarity index 100% rename from internal/golang.org/x/net/ipv6/header_test.go rename to vendor/golang.org/x/net/ipv6/header_test.go diff --git a/internal/golang.org/x/net/ipv6/helper.go b/vendor/golang.org/x/net/ipv6/helper.go similarity index 100% rename from internal/golang.org/x/net/ipv6/helper.go rename to vendor/golang.org/x/net/ipv6/helper.go diff --git a/internal/golang.org/x/net/ipv6/helper_stub.go b/vendor/golang.org/x/net/ipv6/helper_stub.go similarity index 100% rename from internal/golang.org/x/net/ipv6/helper_stub.go rename to vendor/golang.org/x/net/ipv6/helper_stub.go diff --git a/internal/golang.org/x/net/ipv6/helper_unix.go b/vendor/golang.org/x/net/ipv6/helper_unix.go similarity index 100% rename from internal/golang.org/x/net/ipv6/helper_unix.go rename to vendor/golang.org/x/net/ipv6/helper_unix.go diff --git a/internal/golang.org/x/net/ipv6/helper_windows.go b/vendor/golang.org/x/net/ipv6/helper_windows.go similarity index 100% rename from internal/golang.org/x/net/ipv6/helper_windows.go rename to vendor/golang.org/x/net/ipv6/helper_windows.go diff --git a/internal/golang.org/x/net/ipv6/iana.go b/vendor/golang.org/x/net/ipv6/iana.go similarity index 100% rename from internal/golang.org/x/net/ipv6/iana.go rename to vendor/golang.org/x/net/ipv6/iana.go diff --git a/internal/golang.org/x/net/ipv6/icmp.go b/vendor/golang.org/x/net/ipv6/icmp.go similarity index 100% rename from internal/golang.org/x/net/ipv6/icmp.go rename to vendor/golang.org/x/net/ipv6/icmp.go diff --git a/internal/golang.org/x/net/ipv6/icmp_bsd.go b/vendor/golang.org/x/net/ipv6/icmp_bsd.go similarity index 100% rename from internal/golang.org/x/net/ipv6/icmp_bsd.go rename to vendor/golang.org/x/net/ipv6/icmp_bsd.go diff --git a/internal/golang.org/x/net/ipv6/icmp_linux.go b/vendor/golang.org/x/net/ipv6/icmp_linux.go similarity index 100% rename from internal/golang.org/x/net/ipv6/icmp_linux.go rename to vendor/golang.org/x/net/ipv6/icmp_linux.go diff --git a/internal/golang.org/x/net/ipv6/icmp_solaris.go b/vendor/golang.org/x/net/ipv6/icmp_solaris.go similarity index 100% rename from internal/golang.org/x/net/ipv6/icmp_solaris.go rename to vendor/golang.org/x/net/ipv6/icmp_solaris.go diff --git a/internal/golang.org/x/net/ipv6/icmp_stub.go b/vendor/golang.org/x/net/ipv6/icmp_stub.go similarity index 100% rename from internal/golang.org/x/net/ipv6/icmp_stub.go rename to vendor/golang.org/x/net/ipv6/icmp_stub.go diff --git a/internal/golang.org/x/net/ipv6/icmp_test.go b/vendor/golang.org/x/net/ipv6/icmp_test.go similarity index 100% rename from internal/golang.org/x/net/ipv6/icmp_test.go rename to vendor/golang.org/x/net/ipv6/icmp_test.go diff --git a/internal/golang.org/x/net/ipv6/icmp_windows.go b/vendor/golang.org/x/net/ipv6/icmp_windows.go similarity index 100% rename from internal/golang.org/x/net/ipv6/icmp_windows.go rename to vendor/golang.org/x/net/ipv6/icmp_windows.go diff --git a/internal/golang.org/x/net/ipv6/mocktransponder_test.go b/vendor/golang.org/x/net/ipv6/mocktransponder_test.go similarity index 100% rename from internal/golang.org/x/net/ipv6/mocktransponder_test.go rename to vendor/golang.org/x/net/ipv6/mocktransponder_test.go diff --git a/internal/golang.org/x/net/ipv6/multicast_test.go b/vendor/golang.org/x/net/ipv6/multicast_test.go similarity index 100% rename from internal/golang.org/x/net/ipv6/multicast_test.go rename to vendor/golang.org/x/net/ipv6/multicast_test.go diff --git a/internal/golang.org/x/net/ipv6/multicastlistener_test.go b/vendor/golang.org/x/net/ipv6/multicastlistener_test.go similarity index 100% rename from internal/golang.org/x/net/ipv6/multicastlistener_test.go rename to vendor/golang.org/x/net/ipv6/multicastlistener_test.go diff --git a/internal/golang.org/x/net/ipv6/multicastsockopt_test.go b/vendor/golang.org/x/net/ipv6/multicastsockopt_test.go similarity index 100% rename from internal/golang.org/x/net/ipv6/multicastsockopt_test.go rename to vendor/golang.org/x/net/ipv6/multicastsockopt_test.go diff --git a/internal/golang.org/x/net/ipv6/payload.go b/vendor/golang.org/x/net/ipv6/payload.go similarity index 100% rename from internal/golang.org/x/net/ipv6/payload.go rename to vendor/golang.org/x/net/ipv6/payload.go diff --git a/internal/golang.org/x/net/ipv6/payload_cmsg.go b/vendor/golang.org/x/net/ipv6/payload_cmsg.go similarity index 100% rename from internal/golang.org/x/net/ipv6/payload_cmsg.go rename to vendor/golang.org/x/net/ipv6/payload_cmsg.go diff --git a/internal/golang.org/x/net/ipv6/payload_nocmsg.go b/vendor/golang.org/x/net/ipv6/payload_nocmsg.go similarity index 100% rename from internal/golang.org/x/net/ipv6/payload_nocmsg.go rename to vendor/golang.org/x/net/ipv6/payload_nocmsg.go diff --git a/internal/golang.org/x/net/ipv6/readwrite_test.go b/vendor/golang.org/x/net/ipv6/readwrite_test.go similarity index 100% rename from internal/golang.org/x/net/ipv6/readwrite_test.go rename to vendor/golang.org/x/net/ipv6/readwrite_test.go diff --git a/internal/golang.org/x/net/ipv6/sockopt.go b/vendor/golang.org/x/net/ipv6/sockopt.go similarity index 100% rename from internal/golang.org/x/net/ipv6/sockopt.go rename to vendor/golang.org/x/net/ipv6/sockopt.go diff --git a/internal/golang.org/x/net/ipv6/sockopt_asmreq_unix.go b/vendor/golang.org/x/net/ipv6/sockopt_asmreq_unix.go similarity index 100% rename from internal/golang.org/x/net/ipv6/sockopt_asmreq_unix.go rename to vendor/golang.org/x/net/ipv6/sockopt_asmreq_unix.go diff --git a/internal/golang.org/x/net/ipv6/sockopt_asmreq_windows.go b/vendor/golang.org/x/net/ipv6/sockopt_asmreq_windows.go similarity index 100% rename from internal/golang.org/x/net/ipv6/sockopt_asmreq_windows.go rename to vendor/golang.org/x/net/ipv6/sockopt_asmreq_windows.go diff --git a/internal/golang.org/x/net/ipv6/sockopt_ssmreq_stub.go b/vendor/golang.org/x/net/ipv6/sockopt_ssmreq_stub.go similarity index 100% rename from internal/golang.org/x/net/ipv6/sockopt_ssmreq_stub.go rename to vendor/golang.org/x/net/ipv6/sockopt_ssmreq_stub.go diff --git a/internal/golang.org/x/net/ipv6/sockopt_ssmreq_unix.go b/vendor/golang.org/x/net/ipv6/sockopt_ssmreq_unix.go similarity index 100% rename from internal/golang.org/x/net/ipv6/sockopt_ssmreq_unix.go rename to vendor/golang.org/x/net/ipv6/sockopt_ssmreq_unix.go diff --git a/internal/golang.org/x/net/ipv6/sockopt_stub.go b/vendor/golang.org/x/net/ipv6/sockopt_stub.go similarity index 100% rename from internal/golang.org/x/net/ipv6/sockopt_stub.go rename to vendor/golang.org/x/net/ipv6/sockopt_stub.go diff --git a/internal/golang.org/x/net/ipv6/sockopt_test.go b/vendor/golang.org/x/net/ipv6/sockopt_test.go similarity index 100% rename from internal/golang.org/x/net/ipv6/sockopt_test.go rename to vendor/golang.org/x/net/ipv6/sockopt_test.go diff --git a/internal/golang.org/x/net/ipv6/sockopt_unix.go b/vendor/golang.org/x/net/ipv6/sockopt_unix.go similarity index 100% rename from internal/golang.org/x/net/ipv6/sockopt_unix.go rename to vendor/golang.org/x/net/ipv6/sockopt_unix.go diff --git a/internal/golang.org/x/net/ipv6/sockopt_windows.go b/vendor/golang.org/x/net/ipv6/sockopt_windows.go similarity index 100% rename from internal/golang.org/x/net/ipv6/sockopt_windows.go rename to vendor/golang.org/x/net/ipv6/sockopt_windows.go diff --git a/internal/golang.org/x/net/ipv6/sys_bsd.go b/vendor/golang.org/x/net/ipv6/sys_bsd.go similarity index 100% rename from internal/golang.org/x/net/ipv6/sys_bsd.go rename to vendor/golang.org/x/net/ipv6/sys_bsd.go diff --git a/internal/golang.org/x/net/ipv6/sys_darwin.go b/vendor/golang.org/x/net/ipv6/sys_darwin.go similarity index 100% rename from internal/golang.org/x/net/ipv6/sys_darwin.go rename to vendor/golang.org/x/net/ipv6/sys_darwin.go diff --git a/internal/golang.org/x/net/ipv6/sys_freebsd.go b/vendor/golang.org/x/net/ipv6/sys_freebsd.go similarity index 100% rename from internal/golang.org/x/net/ipv6/sys_freebsd.go rename to vendor/golang.org/x/net/ipv6/sys_freebsd.go diff --git a/internal/golang.org/x/net/ipv6/sys_linux.go b/vendor/golang.org/x/net/ipv6/sys_linux.go similarity index 100% rename from internal/golang.org/x/net/ipv6/sys_linux.go rename to vendor/golang.org/x/net/ipv6/sys_linux.go diff --git a/internal/golang.org/x/net/ipv6/sys_stub.go b/vendor/golang.org/x/net/ipv6/sys_stub.go similarity index 100% rename from internal/golang.org/x/net/ipv6/sys_stub.go rename to vendor/golang.org/x/net/ipv6/sys_stub.go diff --git a/internal/golang.org/x/net/ipv6/sys_windows.go b/vendor/golang.org/x/net/ipv6/sys_windows.go similarity index 100% rename from internal/golang.org/x/net/ipv6/sys_windows.go rename to vendor/golang.org/x/net/ipv6/sys_windows.go diff --git a/internal/golang.org/x/net/ipv6/syscall_linux_386.go b/vendor/golang.org/x/net/ipv6/syscall_linux_386.go similarity index 100% rename from internal/golang.org/x/net/ipv6/syscall_linux_386.go rename to vendor/golang.org/x/net/ipv6/syscall_linux_386.go diff --git a/internal/golang.org/x/net/ipv6/syscall_unix.go b/vendor/golang.org/x/net/ipv6/syscall_unix.go similarity index 100% rename from internal/golang.org/x/net/ipv6/syscall_unix.go rename to vendor/golang.org/x/net/ipv6/syscall_unix.go diff --git a/internal/golang.org/x/net/ipv6/thunk_linux_386.s b/vendor/golang.org/x/net/ipv6/thunk_linux_386.s similarity index 100% rename from internal/golang.org/x/net/ipv6/thunk_linux_386.s rename to vendor/golang.org/x/net/ipv6/thunk_linux_386.s diff --git a/internal/golang.org/x/net/ipv6/unicast_test.go b/vendor/golang.org/x/net/ipv6/unicast_test.go similarity index 100% rename from internal/golang.org/x/net/ipv6/unicast_test.go rename to vendor/golang.org/x/net/ipv6/unicast_test.go diff --git a/internal/golang.org/x/net/ipv6/unicastsockopt_test.go b/vendor/golang.org/x/net/ipv6/unicastsockopt_test.go similarity index 100% rename from internal/golang.org/x/net/ipv6/unicastsockopt_test.go rename to vendor/golang.org/x/net/ipv6/unicastsockopt_test.go diff --git a/internal/golang.org/x/net/ipv6/zsys_darwin.go b/vendor/golang.org/x/net/ipv6/zsys_darwin.go similarity index 100% rename from internal/golang.org/x/net/ipv6/zsys_darwin.go rename to vendor/golang.org/x/net/ipv6/zsys_darwin.go diff --git a/internal/golang.org/x/net/ipv6/zsys_dragonfly.go b/vendor/golang.org/x/net/ipv6/zsys_dragonfly.go similarity index 100% rename from internal/golang.org/x/net/ipv6/zsys_dragonfly.go rename to vendor/golang.org/x/net/ipv6/zsys_dragonfly.go diff --git a/internal/golang.org/x/net/ipv6/zsys_freebsd_386.go b/vendor/golang.org/x/net/ipv6/zsys_freebsd_386.go similarity index 100% rename from internal/golang.org/x/net/ipv6/zsys_freebsd_386.go rename to vendor/golang.org/x/net/ipv6/zsys_freebsd_386.go diff --git a/internal/golang.org/x/net/ipv6/zsys_freebsd_amd64.go b/vendor/golang.org/x/net/ipv6/zsys_freebsd_amd64.go similarity index 100% rename from internal/golang.org/x/net/ipv6/zsys_freebsd_amd64.go rename to vendor/golang.org/x/net/ipv6/zsys_freebsd_amd64.go diff --git a/internal/golang.org/x/net/ipv6/zsys_freebsd_arm.go b/vendor/golang.org/x/net/ipv6/zsys_freebsd_arm.go similarity index 100% rename from internal/golang.org/x/net/ipv6/zsys_freebsd_arm.go rename to vendor/golang.org/x/net/ipv6/zsys_freebsd_arm.go diff --git a/internal/golang.org/x/net/ipv6/zsys_linux_386.go b/vendor/golang.org/x/net/ipv6/zsys_linux_386.go similarity index 100% rename from internal/golang.org/x/net/ipv6/zsys_linux_386.go rename to vendor/golang.org/x/net/ipv6/zsys_linux_386.go diff --git a/internal/golang.org/x/net/ipv6/zsys_linux_amd64.go b/vendor/golang.org/x/net/ipv6/zsys_linux_amd64.go similarity index 100% rename from internal/golang.org/x/net/ipv6/zsys_linux_amd64.go rename to vendor/golang.org/x/net/ipv6/zsys_linux_amd64.go diff --git a/internal/golang.org/x/net/ipv6/zsys_linux_arm.go b/vendor/golang.org/x/net/ipv6/zsys_linux_arm.go similarity index 100% rename from internal/golang.org/x/net/ipv6/zsys_linux_arm.go rename to vendor/golang.org/x/net/ipv6/zsys_linux_arm.go diff --git a/internal/golang.org/x/net/ipv6/zsys_netbsd.go b/vendor/golang.org/x/net/ipv6/zsys_netbsd.go similarity index 100% rename from internal/golang.org/x/net/ipv6/zsys_netbsd.go rename to vendor/golang.org/x/net/ipv6/zsys_netbsd.go diff --git a/internal/golang.org/x/net/ipv6/zsys_openbsd.go b/vendor/golang.org/x/net/ipv6/zsys_openbsd.go similarity index 100% rename from internal/golang.org/x/net/ipv6/zsys_openbsd.go rename to vendor/golang.org/x/net/ipv6/zsys_openbsd.go diff --git a/internal/golang.org/x/net/ipv6/zsys_solaris.go b/vendor/golang.org/x/net/ipv6/zsys_solaris.go similarity index 100% rename from internal/golang.org/x/net/ipv6/zsys_solaris.go rename to vendor/golang.org/x/net/ipv6/zsys_solaris.go diff --git a/internal/gopkg.in/yaml.v1/LICENSE b/vendor/gopkg.in/yaml.v2/LICENSE similarity index 100% rename from internal/gopkg.in/yaml.v1/LICENSE rename to vendor/gopkg.in/yaml.v2/LICENSE diff --git a/internal/gopkg.in/yaml.v1/LICENSE.libyaml b/vendor/gopkg.in/yaml.v2/LICENSE.libyaml similarity index 100% rename from internal/gopkg.in/yaml.v1/LICENSE.libyaml rename to vendor/gopkg.in/yaml.v2/LICENSE.libyaml diff --git a/internal/gopkg.in/yaml.v2/README.md b/vendor/gopkg.in/yaml.v2/README.md similarity index 100% rename from internal/gopkg.in/yaml.v2/README.md rename to vendor/gopkg.in/yaml.v2/README.md diff --git a/internal/gopkg.in/yaml.v1/apic.go b/vendor/gopkg.in/yaml.v2/apic.go similarity index 100% rename from internal/gopkg.in/yaml.v1/apic.go rename to vendor/gopkg.in/yaml.v2/apic.go diff --git a/internal/gopkg.in/yaml.v2/decode.go b/vendor/gopkg.in/yaml.v2/decode.go similarity index 100% rename from internal/gopkg.in/yaml.v2/decode.go rename to vendor/gopkg.in/yaml.v2/decode.go diff --git a/internal/gopkg.in/yaml.v2/decode_test.go b/vendor/gopkg.in/yaml.v2/decode_test.go similarity index 100% rename from internal/gopkg.in/yaml.v2/decode_test.go rename to vendor/gopkg.in/yaml.v2/decode_test.go diff --git a/internal/gopkg.in/yaml.v1/emitterc.go b/vendor/gopkg.in/yaml.v2/emitterc.go similarity index 100% rename from internal/gopkg.in/yaml.v1/emitterc.go rename to vendor/gopkg.in/yaml.v2/emitterc.go diff --git a/internal/gopkg.in/yaml.v2/encode.go b/vendor/gopkg.in/yaml.v2/encode.go similarity index 100% rename from internal/gopkg.in/yaml.v2/encode.go rename to vendor/gopkg.in/yaml.v2/encode.go diff --git a/internal/gopkg.in/yaml.v2/encode_test.go b/vendor/gopkg.in/yaml.v2/encode_test.go similarity index 100% rename from internal/gopkg.in/yaml.v2/encode_test.go rename to vendor/gopkg.in/yaml.v2/encode_test.go diff --git a/internal/gopkg.in/yaml.v1/parserc.go b/vendor/gopkg.in/yaml.v2/parserc.go similarity index 100% rename from internal/gopkg.in/yaml.v1/parserc.go rename to vendor/gopkg.in/yaml.v2/parserc.go diff --git a/internal/gopkg.in/yaml.v1/readerc.go b/vendor/gopkg.in/yaml.v2/readerc.go similarity index 100% rename from internal/gopkg.in/yaml.v1/readerc.go rename to vendor/gopkg.in/yaml.v2/readerc.go diff --git a/internal/gopkg.in/yaml.v2/resolve.go b/vendor/gopkg.in/yaml.v2/resolve.go similarity index 100% rename from internal/gopkg.in/yaml.v2/resolve.go rename to vendor/gopkg.in/yaml.v2/resolve.go diff --git a/internal/gopkg.in/yaml.v1/scannerc.go b/vendor/gopkg.in/yaml.v2/scannerc.go similarity index 100% rename from internal/gopkg.in/yaml.v1/scannerc.go rename to vendor/gopkg.in/yaml.v2/scannerc.go diff --git a/internal/gopkg.in/yaml.v1/sorter.go b/vendor/gopkg.in/yaml.v2/sorter.go similarity index 100% rename from internal/gopkg.in/yaml.v1/sorter.go rename to vendor/gopkg.in/yaml.v2/sorter.go diff --git a/internal/gopkg.in/yaml.v1/suite_test.go b/vendor/gopkg.in/yaml.v2/suite_test.go similarity index 100% rename from internal/gopkg.in/yaml.v1/suite_test.go rename to vendor/gopkg.in/yaml.v2/suite_test.go diff --git a/internal/gopkg.in/yaml.v1/writerc.go b/vendor/gopkg.in/yaml.v2/writerc.go similarity index 100% rename from internal/gopkg.in/yaml.v1/writerc.go rename to vendor/gopkg.in/yaml.v2/writerc.go diff --git a/internal/gopkg.in/yaml.v2/yaml.go b/vendor/gopkg.in/yaml.v2/yaml.go similarity index 100% rename from internal/gopkg.in/yaml.v2/yaml.go rename to vendor/gopkg.in/yaml.v2/yaml.go diff --git a/internal/gopkg.in/yaml.v1/yamlh.go b/vendor/gopkg.in/yaml.v2/yamlh.go similarity index 100% rename from internal/gopkg.in/yaml.v1/yamlh.go rename to vendor/gopkg.in/yaml.v2/yamlh.go diff --git a/internal/gopkg.in/yaml.v1/yamlprivateh.go b/vendor/gopkg.in/yaml.v2/yamlprivateh.go similarity index 100% rename from internal/gopkg.in/yaml.v1/yamlprivateh.go rename to vendor/gopkg.in/yaml.v2/yamlprivateh.go From ff88fe8c39c7209ca5dd1b42e7f882323d67d26b Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Mon, 9 Nov 2015 12:43:40 +0000 Subject: [PATCH 2/5] use vendoring, add placeholders for metadata Signed-off-by: Vasiliy Tolstov --- build | 32 +- digitalocean.go | 7 + ec2.go | 7 + ec2_test.go | 270 + openstack.go | 7 + tcp.go | 235 +- .../alexzorin/libvirt-go/.drone.yml | 7 + .../alexzorin/libvirt-go/.gitignore | 3 + .../github.com/alexzorin/libvirt-go/README.md | 38 +- .../github.com/alexzorin/libvirt-go/cfuncs.go | 96 + .../alexzorin/libvirt-go/constants.go | 183 + .../github.com/alexzorin/libvirt-go/domain.go | 149 +- .../alexzorin/libvirt-go/domain_test.go | 19 + .../github.com/alexzorin/libvirt-go/error.go | 504 + .../github.com/alexzorin/libvirt-go/events.go | 321 + .../alexzorin/libvirt-go/integration_test.go | 138 + .../alexzorin/libvirt-go/interface.go | 17 +- .../alexzorin/libvirt-go/libvirt.go | 284 +- .../alexzorin/libvirt-go/libvirt_test.go | 141 + .../alexzorin/libvirt-go/network.go | 27 +- .../alexzorin/libvirt-go/nwfilter.go | 13 +- .../github.com/alexzorin/libvirt-go/secret.go | 15 +- .../alexzorin/libvirt-go/snapshot.go | 29 +- .../alexzorin/libvirt-go/storage_pool.go | 35 +- .../alexzorin/libvirt-go/storage_volume.go | 37 +- .../github.com/alexzorin/libvirt-go/stream.go | 13 +- .../libvirt-go/vagrant/master/Vagrantfile | 83 + .../vagrant-provision-reboot-plugin.rb | 176 + vendor/github.com/gorilla/context/.travis.yml | 8 + vendor/github.com/gorilla/context/LICENSE | 27 + vendor/github.com/gorilla/context/README.md | 7 + vendor/github.com/gorilla/context/context.go | 143 + .../gorilla/context/context_test.go | 161 + vendor/github.com/gorilla/context/doc.go | 82 + vendor/github.com/gorilla/mux/.travis.yml | 8 + vendor/github.com/gorilla/mux/LICENSE | 27 + vendor/github.com/gorilla/mux/README.md | 235 + vendor/github.com/gorilla/mux/bench_test.go | 21 + vendor/github.com/gorilla/mux/doc.go | 206 + vendor/github.com/gorilla/mux/mux.go | 474 + vendor/github.com/gorilla/mux/mux_test.go | 1334 ++ vendor/github.com/gorilla/mux/old_test.go | 714 + vendor/github.com/gorilla/mux/regexp.go | 317 + vendor/github.com/gorilla/mux/route.go | 595 + .../github.com/vtolstov/gopacket/.gitignore | 32 + .../github.com/vtolstov/gopacket/.travis.yml | 9 + vendor/github.com/vtolstov/gopacket/AUTHORS | 2 + .../github.com/vtolstov/gopacket/README.mkd | 2 + .../vtolstov/gopacket/afpacket/afpacket.go | 351 + .../gopacket/afpacket/afpacket_test.go | 40 + .../vtolstov/gopacket/afpacket/header.go | 137 + .../vtolstov/gopacket/afpacket/options.go | 159 + .../gopacket/bsdbpf/bsd_bpf_sniffer.go | 202 + .../vtolstov/gopacket/dumpcommand/tcpdump.go | 86 + .../gopacket/examples/arpscan/arpscan.go | 188 + .../gopacket/examples/bidirectional/main.go | 192 + .../gopacket/examples/bytediff/bytediff.png | Bin 0 -> 47462 bytes .../gopacket/examples/bytediff/main.go | 96 + .../gopacket/examples/httpassembly/main.go | 127 + .../gopacket/examples/pcapdump/main.go | 73 + .../vtolstov/gopacket/examples/pfdump/main.go | 52 + .../gopacket/examples/statsassembly/main.go | 211 + .../gopacket/examples/synscan/main.go | 260 + .../vtolstov/gopacket/examples/util/util.go | 40 + .../vtolstov/gopacket/layers/arp.go | 2 +- .../vtolstov/gopacket/layers/base.go | 2 +- .../vtolstov/gopacket/layers/base_test.go | 2 +- .../vtolstov/gopacket/layers/cdp.go | 4 +- .../vtolstov/gopacket/layers/ctp.go | 2 +- .../vtolstov/gopacket/layers/decode_test.go | 4 +- .../vtolstov/gopacket/layers/dhcpv4.go | 2 +- .../vtolstov/gopacket/layers/dns.go | 6 +- .../vtolstov/gopacket/layers/dot11.go | 92 +- .../vtolstov/gopacket/layers/dot11_test.go | 181 +- .../vtolstov/gopacket/layers/dot1q.go | 2 +- .../vtolstov/gopacket/layers/eap.go | 2 +- .../vtolstov/gopacket/layers/eapol.go | 2 +- .../vtolstov/gopacket/layers/endpoints.go | 2 +- .../vtolstov/gopacket/layers/enums.go | 38 +- .../vtolstov/gopacket/layers/etherip.go | 2 +- .../vtolstov/gopacket/layers/ethernet.go | 2 +- .../vtolstov/gopacket/layers/fddi.go | 2 +- .../vtolstov/gopacket/layers/gre.go | 49 +- .../vtolstov/gopacket/layers/gre_test.go | 102 + .../vtolstov/gopacket/layers/icmp4.go | 2 +- .../vtolstov/gopacket/layers/icmp6.go | 2 +- .../vtolstov/gopacket/layers/icmp6_test.go | 2 +- .../vtolstov/gopacket/layers/igmp.go | 2 +- .../vtolstov/gopacket/layers/ip4.go | 2 +- .../vtolstov/gopacket/layers/ip6.go | 2 +- .../vtolstov/gopacket/layers/ipsec.go | 18 +- .../vtolstov/gopacket/layers/ipsec_test.go | 106 +- .../vtolstov/gopacket/layers/layertypes.go | 3 +- .../vtolstov/gopacket/layers/linux_sll.go | 2 +- .../vtolstov/gopacket/layers/llc.go | 2 +- .../vtolstov/gopacket/layers/lldp.go | 2 +- .../vtolstov/gopacket/layers/loopback.go | 2 +- .../vtolstov/gopacket/layers/mpls.go | 2 +- .../vtolstov/gopacket/layers/ndp.go | 2 +- .../vtolstov/gopacket/layers/openflow.go | 716 - .../vtolstov/gopacket/layers/pflog.go | 2 +- .../vtolstov/gopacket/layers/ports.go | 2 +- .../vtolstov/gopacket/layers/ppp.go | 2 +- .../vtolstov/gopacket/layers/pppoe.go | 2 +- .../vtolstov/gopacket/layers/prism.go | 146 + .../vtolstov/gopacket/layers/prism_test.go | 120 + .../vtolstov/gopacket/layers/radiotap.go | 505 +- .../vtolstov/gopacket/layers/radiotap_test.go | 79 + .../vtolstov/gopacket/layers/rudp.go | 2 +- .../vtolstov/gopacket/layers/sctp.go | 2 +- .../vtolstov/gopacket/layers/sflow.go | 2 +- .../vtolstov/gopacket/layers/sflow_test.go | 2 +- .../vtolstov/gopacket/layers/tcp.go | 2 +- .../vtolstov/gopacket/layers/tcpip.go | 2 +- .../vtolstov/gopacket/layers/udp.go | 2 +- .../vtolstov/gopacket/layers/udp_test.go | 2 +- .../vtolstov/gopacket/layers/udplite.go | 2 +- .../vtolstov/gopacket/layers/usb.go | 2 +- .../vtolstov/gopacket/layers/usb_test.go | 2 +- .../vtolstov/gopacket/macs/benchmark_test.go | 18 + .../github.com/vtolstov/gopacket/macs/doc.go | 12 + .../github.com/vtolstov/gopacket/macs/gen.go | 78 + .../gopacket/macs/valid_mac_prefixes.go | 19791 ++++++++++++++++ .../github.com/vtolstov/gopacket/pcap/doc.go | 100 + .../pcap/gopacket_benchmark/benchmark.go | 247 + .../github.com/vtolstov/gopacket/pcap/pcap.go | 776 + .../vtolstov/gopacket/pcap/pcap_test.go | 154 + .../vtolstov/gopacket/pcap/pcap_tester.go | 107 + .../vtolstov/gopacket/pcap/pcapgo_test.go | 56 + .../vtolstov/gopacket/pcap/test_dns.pcap | Bin 0 -> 1001 bytes .../vtolstov/gopacket/pcap/test_ethernet.pcap | Bin 0 -> 7672 bytes .../vtolstov/gopacket/pcap/test_loopback.pcap | Bin 0 -> 58587 bytes .../vtolstov/gopacket/pcapgo/read.go | 135 + .../vtolstov/gopacket/pcapgo/read_test.go | 119 + .../vtolstov/gopacket/pcapgo/write.go | 98 + .../vtolstov/gopacket/pcapgo/write_test.go | 71 + .../vtolstov/gopacket/pfring/doc.go | 58 + .../vtolstov/gopacket/pfring/pfring.go | 304 + .../vtolstov/gopacket/routing/common.go | 36 + .../vtolstov/gopacket/routing/other.go | 15 + .../vtolstov/gopacket/routing/routing.go | 241 + .../vtolstov/gopacket/tcpassembly/assembly.go | 773 + .../gopacket/tcpassembly/assembly_test.go | 562 + .../gopacket/tcpassembly/tcpreader/reader.go | 209 + .../tcpassembly/tcpreader/reader_test.go | 129 + vendor/golang.org/x/net/.gitattributes | 10 + vendor/golang.org/x/net/.gitignore | 2 + vendor/golang.org/x/net/AUTHORS | 3 + vendor/golang.org/x/net/CONTRIBUTING.md | 31 + vendor/golang.org/x/net/CONTRIBUTORS | 3 + vendor/golang.org/x/net/LICENSE | 27 + vendor/golang.org/x/net/PATENTS | 22 + vendor/golang.org/x/net/README | 3 + vendor/golang.org/x/net/codereview.cfg | 1 + vendor/golang.org/x/net/context/context.go | 447 + .../golang.org/x/net/context/context_test.go | 575 + .../x/net/context/ctxhttp/cancelreq.go | 18 + .../x/net/context/ctxhttp/cancelreq_go14.go | 23 + .../x/net/context/ctxhttp/ctxhttp.go | 79 + .../x/net/context/ctxhttp/ctxhttp_test.go | 72 + .../x/net/context/withtimeout_test.go | 26 + vendor/golang.org/x/net/dict/dict.go | 210 + vendor/golang.org/x/net/html/atom/atom.go | 78 + .../golang.org/x/net/html/atom/atom_test.go | 109 + vendor/golang.org/x/net/html/atom/gen.go | 648 + vendor/golang.org/x/net/html/atom/table.go | 713 + .../golang.org/x/net/html/atom/table_test.go | 351 + .../golang.org/x/net/html/charset/charset.go | 244 + .../x/net/html/charset/charset_test.go | 236 + vendor/golang.org/x/net/html/charset/gen.go | 111 + vendor/golang.org/x/net/html/charset/table.go | 235 + .../html/charset/testdata/HTTP-charset.html | 48 + .../charset/testdata/HTTP-vs-UTF-8-BOM.html | 48 + .../testdata/HTTP-vs-meta-charset.html | 49 + .../testdata/HTTP-vs-meta-content.html | 49 + .../testdata/No-encoding-declaration.html | 47 + .../x/net/html/charset/testdata/README | 9 + .../html/charset/testdata/UTF-16BE-BOM.html | Bin 0 -> 2670 bytes .../html/charset/testdata/UTF-16LE-BOM.html | Bin 0 -> 2682 bytes .../testdata/UTF-8-BOM-vs-meta-charset.html | 49 + .../testdata/UTF-8-BOM-vs-meta-content.html | 48 + .../testdata/meta-charset-attribute.html | 48 + .../testdata/meta-content-attribute.html | 48 + vendor/golang.org/x/net/html/const.go | 102 + vendor/golang.org/x/net/html/doc.go | 106 + vendor/golang.org/x/net/html/doctype.go | 156 + vendor/golang.org/x/net/html/entity.go | 2253 ++ vendor/golang.org/x/net/html/entity_test.go | 29 + vendor/golang.org/x/net/html/escape.go | 258 + vendor/golang.org/x/net/html/escape_test.go | 97 + vendor/golang.org/x/net/html/example_test.go | 40 + vendor/golang.org/x/net/html/foreign.go | 226 + vendor/golang.org/x/net/html/node.go | 193 + vendor/golang.org/x/net/html/node_test.go | 146 + vendor/golang.org/x/net/html/parse.go | 2094 ++ vendor/golang.org/x/net/html/parse_test.go | 388 + vendor/golang.org/x/net/html/render.go | 271 + vendor/golang.org/x/net/html/render_test.go | 156 + .../golang.org/x/net/html/testdata/go1.html | 2237 ++ .../x/net/html/testdata/webkit/README | 28 + .../x/net/html/testdata/webkit/adoption01.dat | 194 + .../x/net/html/testdata/webkit/adoption02.dat | 31 + .../x/net/html/testdata/webkit/comments01.dat | 135 + .../x/net/html/testdata/webkit/doctype01.dat | 370 + .../x/net/html/testdata/webkit/entities01.dat | 603 + .../x/net/html/testdata/webkit/entities02.dat | 249 + .../html/testdata/webkit/html5test-com.dat | 246 + .../x/net/html/testdata/webkit/inbody01.dat | 43 + .../x/net/html/testdata/webkit/isindex.dat | 40 + ...pending-spec-changes-plain-text-unsafe.dat | Bin 0 -> 115 bytes .../testdata/webkit/pending-spec-changes.dat | 52 + .../testdata/webkit/plain-text-unsafe.dat | Bin 0 -> 4166 bytes .../net/html/testdata/webkit/scriptdata01.dat | 308 + .../testdata/webkit/scripted/adoption01.dat | 15 + .../testdata/webkit/scripted/webkit01.dat | 28 + .../x/net/html/testdata/webkit/tables01.dat | 212 + .../x/net/html/testdata/webkit/tests1.dat | 1952 ++ .../x/net/html/testdata/webkit/tests10.dat | 799 + .../x/net/html/testdata/webkit/tests11.dat | 482 + .../x/net/html/testdata/webkit/tests12.dat | 62 + .../x/net/html/testdata/webkit/tests14.dat | 74 + .../x/net/html/testdata/webkit/tests15.dat | 208 + .../x/net/html/testdata/webkit/tests16.dat | 2299 ++ .../x/net/html/testdata/webkit/tests17.dat | 153 + .../x/net/html/testdata/webkit/tests18.dat | 269 + .../x/net/html/testdata/webkit/tests19.dat | 1237 + .../x/net/html/testdata/webkit/tests2.dat | 763 + .../x/net/html/testdata/webkit/tests20.dat | 455 + .../x/net/html/testdata/webkit/tests21.dat | 221 + .../x/net/html/testdata/webkit/tests22.dat | 157 + .../x/net/html/testdata/webkit/tests23.dat | 155 + .../x/net/html/testdata/webkit/tests24.dat | 79 + .../x/net/html/testdata/webkit/tests25.dat | 219 + .../x/net/html/testdata/webkit/tests26.dat | 313 + .../x/net/html/testdata/webkit/tests3.dat | 305 + .../x/net/html/testdata/webkit/tests4.dat | 59 + .../x/net/html/testdata/webkit/tests5.dat | 191 + .../x/net/html/testdata/webkit/tests6.dat | 663 + .../x/net/html/testdata/webkit/tests7.dat | 390 + .../x/net/html/testdata/webkit/tests8.dat | 148 + .../x/net/html/testdata/webkit/tests9.dat | 457 + .../testdata/webkit/tests_innerHTML_1.dat | 741 + .../x/net/html/testdata/webkit/tricky01.dat | 261 + .../x/net/html/testdata/webkit/webkit01.dat | 610 + .../x/net/html/testdata/webkit/webkit02.dat | 159 + vendor/golang.org/x/net/html/token.go | 1219 + vendor/golang.org/x/net/html/token_test.go | 748 + vendor/golang.org/x/net/http2/.gitignore | 2 + vendor/golang.org/x/net/http2/Dockerfile | 51 + vendor/golang.org/x/net/http2/Makefile | 3 + vendor/golang.org/x/net/http2/README | 20 + .../x/net/http2/client_conn_pool.go | 118 + .../x/net/http2/configure_transport.go | 78 + vendor/golang.org/x/net/http2/errors.go | 77 + vendor/golang.org/x/net/http2/errors_test.go | 24 + vendor/golang.org/x/net/http2/fixed_buffer.go | 60 + .../x/net/http2/fixed_buffer_test.go | 128 + vendor/golang.org/x/net/http2/flow.go | 50 + vendor/golang.org/x/net/http2/flow_test.go | 53 + vendor/golang.org/x/net/http2/frame.go | 1114 + vendor/golang.org/x/net/http2/frame_test.go | 597 + vendor/golang.org/x/net/http2/go15.go | 13 + vendor/golang.org/x/net/http2/gotrack.go | 170 + vendor/golang.org/x/net/http2/gotrack_test.go | 30 + .../golang.org/x/net/http2/h2demo/.gitignore | 5 + vendor/golang.org/x/net/http2/h2demo/Makefile | 5 + vendor/golang.org/x/net/http2/h2demo/README | 16 + .../golang.org/x/net/http2/h2demo/h2demo.go | 436 + .../golang.org/x/net/http2/h2demo/launch.go | 302 + .../golang.org/x/net/http2/h2demo/rootCA.key | 27 + .../golang.org/x/net/http2/h2demo/rootCA.pem | 26 + .../golang.org/x/net/http2/h2demo/rootCA.srl | 1 + .../golang.org/x/net/http2/h2demo/server.crt | 20 + .../golang.org/x/net/http2/h2demo/server.key | 27 + vendor/golang.org/x/net/http2/h2i/README.md | 97 + vendor/golang.org/x/net/http2/h2i/h2i.go | 486 + vendor/golang.org/x/net/http2/headermap.go | 77 + vendor/golang.org/x/net/http2/hpack/encode.go | 251 + .../x/net/http2/hpack/encode_test.go | 330 + vendor/golang.org/x/net/http2/hpack/hpack.go | 518 + .../x/net/http2/hpack/hpack_test.go | 813 + .../golang.org/x/net/http2/hpack/huffman.go | 190 + vendor/golang.org/x/net/http2/hpack/tables.go | 352 + vendor/golang.org/x/net/http2/http2.go | 253 + vendor/golang.org/x/net/http2/http2_test.go | 168 + vendor/golang.org/x/net/http2/pipe.go | 90 + vendor/golang.org/x/net/http2/pipe_test.go | 24 + .../golang.org/x/net/http2/priority_test.go | 118 + vendor/golang.org/x/net/http2/server.go | 1894 ++ vendor/golang.org/x/net/http2/server_test.go | 2622 ++ .../testdata/draft-ietf-httpbis-http2.xml | 5021 ++++ vendor/golang.org/x/net/http2/transport.go | 1096 + .../golang.org/x/net/http2/transport_test.go | 375 + vendor/golang.org/x/net/http2/write.go | 206 + vendor/golang.org/x/net/http2/writesched.go | 283 + vendor/golang.org/x/net/http2/z_spec_test.go | 356 + vendor/golang.org/x/net/icmp/dstunreach.go | 19 +- vendor/golang.org/x/net/icmp/echo.go | 2 +- vendor/golang.org/x/net/icmp/endpoint.go | 25 +- vendor/golang.org/x/net/icmp/example_test.go | 17 +- vendor/golang.org/x/net/icmp/extension.go | 75 +- .../golang.org/x/net/icmp/extension_test.go | 259 + vendor/golang.org/x/net/icmp/interface.go | 235 + vendor/golang.org/x/net/icmp/ipv4.go | 2 +- vendor/golang.org/x/net/icmp/ipv4_test.go | 2 +- vendor/golang.org/x/net/icmp/ipv6.go | 2 +- vendor/golang.org/x/net/icmp/listen_posix.go | 20 +- vendor/golang.org/x/net/icmp/message.go | 52 +- vendor/golang.org/x/net/icmp/message_test.go | 20 +- vendor/golang.org/x/net/icmp/messagebody.go | 5 +- vendor/golang.org/x/net/icmp/mpls.go | 75 + vendor/golang.org/x/net/icmp/multipart.go | 109 + .../golang.org/x/net/icmp/multipart_test.go | 315 + vendor/golang.org/x/net/icmp/packettoobig.go | 4 +- vendor/golang.org/x/net/icmp/paramprob.go | 41 +- vendor/golang.org/x/net/icmp/ping_test.go | 150 +- vendor/golang.org/x/net/icmp/timeexceeded.go | 19 +- vendor/golang.org/x/net/idna/idna.go | 68 + vendor/golang.org/x/net/idna/idna_test.go | 43 + vendor/golang.org/x/net/idna/punycode.go | 200 + vendor/golang.org/x/net/idna/punycode_test.go | 198 + .../golang.org/x/net/internal/iana/const.go | 181 + vendor/golang.org/x/net/internal/iana/gen.go | 293 + .../x/net/internal/nettest/error_posix.go | 31 + .../x/net/internal/nettest/error_stub.go | 11 + .../x/net/internal/nettest/interface.go | 94 + .../x/net/internal/nettest/rlimit.go | 11 + .../x/net/internal/nettest/rlimit_stub.go | 9 + .../x/net/internal/nettest/rlimit_unix.go | 17 + .../x/net/internal/nettest/rlimit_windows.go | 7 + .../x/net/internal/nettest/stack.go | 36 + .../x/net/internal/nettest/stack_stub.go | 18 + .../x/net/internal/nettest/stack_unix.go | 22 + .../x/net/internal/nettest/stack_windows.go | 32 + .../x/net/internal/timeseries/timeseries.go | 525 + .../internal/timeseries/timeseries_test.go | 170 + vendor/golang.org/x/net/ipv4/control_bsd.go | 2 +- .../golang.org/x/net/ipv4/control_pktinfo.go | 2 +- vendor/golang.org/x/net/ipv4/control_unix.go | 2 +- vendor/golang.org/x/net/ipv4/doc.go | 8 +- vendor/golang.org/x/net/ipv4/example_test.go | 17 +- vendor/golang.org/x/net/ipv4/gen.go | 12 +- vendor/golang.org/x/net/ipv4/icmp.go | 2 +- vendor/golang.org/x/net/ipv4/icmp_test.go | 12 +- .../golang.org/x/net/ipv4/multicast_test.go | 38 +- .../x/net/ipv4/multicastlistener_test.go | 23 +- .../x/net/ipv4/multicastsockopt_test.go | 24 +- .../golang.org/x/net/ipv4/readwrite_test.go | 8 +- .../x/net/ipv4/sockopt_asmreq_unix.go | 2 +- .../x/net/ipv4/sockopt_asmreq_windows.go | 2 +- .../x/net/ipv4/sockopt_asmreqn_unix.go | 2 +- .../x/net/ipv4/sockopt_ssmreq_unix.go | 34 +- vendor/golang.org/x/net/ipv4/sockopt_unix.go | 2 +- .../golang.org/x/net/ipv4/sockopt_windows.go | 2 +- vendor/golang.org/x/net/ipv4/sys_freebsd.go | 11 + vendor/golang.org/x/net/ipv4/syscall_unix.go | 2 +- vendor/golang.org/x/net/ipv4/unicast_test.go | 38 +- .../x/net/ipv4/unicastsockopt_test.go | 30 +- .../golang.org/x/net/ipv4/zsys_freebsd_arm.go | 6 +- .../golang.org/x/net/ipv4/zsys_linux_arm64.go | 134 + .../golang.org/x/net/ipv4/zsys_linux_ppc64.go | 134 + .../x/net/ipv4/zsys_linux_ppc64le.go | 134 + .../x/net/ipv6/control_rfc2292_unix.go | 2 +- .../x/net/ipv6/control_rfc3542_unix.go | 2 +- vendor/golang.org/x/net/ipv6/control_unix.go | 2 +- vendor/golang.org/x/net/ipv6/doc.go | 8 +- vendor/golang.org/x/net/ipv6/example_test.go | 15 +- vendor/golang.org/x/net/ipv6/gen.go | 12 +- vendor/golang.org/x/net/ipv6/header_test.go | 4 +- vendor/golang.org/x/net/ipv6/iana.go | 6 +- vendor/golang.org/x/net/ipv6/icmp.go | 2 +- vendor/golang.org/x/net/ipv6/icmp_test.go | 12 +- .../golang.org/x/net/ipv6/multicast_test.go | 34 +- .../x/net/ipv6/multicastlistener_test.go | 25 +- .../x/net/ipv6/multicastsockopt_test.go | 16 +- .../golang.org/x/net/ipv6/readwrite_test.go | 10 +- .../x/net/ipv6/sockopt_ssmreq_unix.go | 32 +- vendor/golang.org/x/net/ipv6/sockopt_test.go | 21 +- vendor/golang.org/x/net/ipv6/sys_bsd.go | 2 +- vendor/golang.org/x/net/ipv6/sys_darwin.go | 2 +- vendor/golang.org/x/net/ipv6/sys_freebsd.go | 16 +- vendor/golang.org/x/net/ipv6/sys_linux.go | 2 +- vendor/golang.org/x/net/ipv6/sys_windows.go | 2 +- vendor/golang.org/x/net/ipv6/syscall_unix.go | 2 +- vendor/golang.org/x/net/ipv6/unicast_test.go | 22 +- .../x/net/ipv6/unicastsockopt_test.go | 18 +- .../golang.org/x/net/ipv6/zsys_freebsd_arm.go | 6 +- .../golang.org/x/net/ipv6/zsys_linux_arm64.go | 156 + .../golang.org/x/net/ipv6/zsys_linux_ppc64.go | 156 + .../x/net/ipv6/zsys_linux_ppc64le.go | 156 + vendor/golang.org/x/net/netutil/listen.go | 48 + .../golang.org/x/net/netutil/listen_test.go | 106 + vendor/golang.org/x/net/proxy/direct.go | 18 + vendor/golang.org/x/net/proxy/per_host.go | 140 + .../golang.org/x/net/proxy/per_host_test.go | 55 + vendor/golang.org/x/net/proxy/proxy.go | 94 + vendor/golang.org/x/net/proxy/proxy_test.go | 142 + vendor/golang.org/x/net/proxy/socks5.go | 210 + vendor/golang.org/x/net/publicsuffix/gen.go | 608 + vendor/golang.org/x/net/publicsuffix/list.go | 133 + .../x/net/publicsuffix/list_test.go | 416 + vendor/golang.org/x/net/publicsuffix/table.go | 8708 +++++++ .../x/net/publicsuffix/table_test.go | 15615 ++++++++++++ vendor/golang.org/x/net/trace/events.go | 524 + vendor/golang.org/x/net/trace/histogram.go | 356 + .../golang.org/x/net/trace/histogram_test.go | 325 + vendor/golang.org/x/net/trace/trace.go | 1057 + vendor/golang.org/x/net/trace/trace_test.go | 46 + vendor/golang.org/x/net/webdav/file.go | 795 + vendor/golang.org/x/net/webdav/file_test.go | 1167 + vendor/golang.org/x/net/webdav/if.go | 173 + vendor/golang.org/x/net/webdav/if_test.go | 322 + .../x/net/webdav/internal/xml/README | 11 + .../x/net/webdav/internal/xml/atom_test.go | 56 + .../x/net/webdav/internal/xml/example_test.go | 151 + .../x/net/webdav/internal/xml/marshal.go | 1223 + .../x/net/webdav/internal/xml/marshal_test.go | 1939 ++ .../x/net/webdav/internal/xml/read.go | 692 + .../x/net/webdav/internal/xml/read_test.go | 744 + .../x/net/webdav/internal/xml/typeinfo.go | 371 + .../x/net/webdav/internal/xml/xml.go | 1998 ++ .../x/net/webdav/internal/xml/xml_test.go | 752 + .../x/net/webdav/litmus_test_server.go | 94 + vendor/golang.org/x/net/webdav/lock.go | 445 + vendor/golang.org/x/net/webdav/lock_test.go | 731 + vendor/golang.org/x/net/webdav/prop.go | 385 + vendor/golang.org/x/net/webdav/prop_test.go | 619 + vendor/golang.org/x/net/webdav/webdav.go | 706 + vendor/golang.org/x/net/webdav/webdav_test.go | 155 + vendor/golang.org/x/net/webdav/xml.go | 469 + vendor/golang.org/x/net/webdav/xml_test.go | 909 + vendor/golang.org/x/net/websocket/client.go | 113 + .../x/net/websocket/exampledial_test.go | 31 + .../x/net/websocket/examplehandler_test.go | 26 + vendor/golang.org/x/net/websocket/hybi.go | 586 + .../golang.org/x/net/websocket/hybi_test.go | 608 + vendor/golang.org/x/net/websocket/server.go | 113 + .../golang.org/x/net/websocket/websocket.go | 412 + .../x/net/websocket/websocket_test.go | 587 + vendor/golang.org/x/sys | 1 + .../alexzorin/libvirt-go.v2/.drone.yml | 7 + .../alexzorin/libvirt-go.v2/.gitignore | 3 + .../gopkg.in/alexzorin/libvirt-go.v2/LICENSE | 21 + .../alexzorin/libvirt-go.v2/README.md | 49 + .../alexzorin/libvirt-go.v2/cfuncs.go | 96 + .../alexzorin/libvirt-go.v2/constants.go | 385 + .../alexzorin/libvirt-go.v2/domain.go | 574 + .../alexzorin/libvirt-go.v2/domain_test.go | 483 + .../gopkg.in/alexzorin/libvirt-go.v2/error.go | 504 + .../alexzorin/libvirt-go.v2/events.go | 321 + .../libvirt-go.v2/integration_test.go | 962 + .../alexzorin/libvirt-go.v2/interface.go | 87 + .../alexzorin/libvirt-go.v2/interface_test.go | 128 + .../alexzorin/libvirt-go.v2/libvirt.go | 878 + .../alexzorin/libvirt-go.v2/libvirt_test.go | 873 + .../alexzorin/libvirt-go.v2/network.go | 147 + .../alexzorin/libvirt-go.v2/network_test.go | 184 + .../alexzorin/libvirt-go.v2/nodeinfo.go | 50 + .../alexzorin/libvirt-go.v2/nwfilter.go | 70 + .../alexzorin/libvirt-go.v2/secret.go | 78 + .../alexzorin/libvirt-go.v2/snapshot.go | 95 + .../alexzorin/libvirt-go.v2/storage_pool.go | 210 + .../libvirt-go.v2/storage_pool_test.go | 292 + .../alexzorin/libvirt-go.v2/storage_volume.go | 134 + .../libvirt-go.v2/storage_volume_test.go | 157 + .../alexzorin/libvirt-go.v2/stream.go | 79 + .../libvirt-go.v2/vagrant/master/Vagrantfile | 83 + .../vagrant-provision-reboot-plugin.rb | 176 + 468 files changed, 142989 insertions(+), 1749 deletions(-) create mode 100644 digitalocean.go create mode 100644 ec2.go create mode 100644 ec2_test.go create mode 100644 openstack.go create mode 100644 vendor/github.com/alexzorin/libvirt-go/.drone.yml create mode 100644 vendor/github.com/alexzorin/libvirt-go/.gitignore create mode 100644 vendor/github.com/alexzorin/libvirt-go/cfuncs.go create mode 100644 vendor/github.com/alexzorin/libvirt-go/error.go create mode 100644 vendor/github.com/alexzorin/libvirt-go/events.go create mode 100644 vendor/github.com/alexzorin/libvirt-go/vagrant/master/Vagrantfile create mode 100644 vendor/github.com/alexzorin/libvirt-go/vagrant/vagrant-provision-reboot-plugin.rb create mode 100644 vendor/github.com/gorilla/context/.travis.yml create mode 100644 vendor/github.com/gorilla/context/LICENSE create mode 100644 vendor/github.com/gorilla/context/README.md create mode 100644 vendor/github.com/gorilla/context/context.go create mode 100644 vendor/github.com/gorilla/context/context_test.go create mode 100644 vendor/github.com/gorilla/context/doc.go create mode 100644 vendor/github.com/gorilla/mux/.travis.yml create mode 100644 vendor/github.com/gorilla/mux/LICENSE create mode 100644 vendor/github.com/gorilla/mux/README.md create mode 100644 vendor/github.com/gorilla/mux/bench_test.go create mode 100644 vendor/github.com/gorilla/mux/doc.go create mode 100644 vendor/github.com/gorilla/mux/mux.go create mode 100644 vendor/github.com/gorilla/mux/mux_test.go create mode 100644 vendor/github.com/gorilla/mux/old_test.go create mode 100644 vendor/github.com/gorilla/mux/regexp.go create mode 100644 vendor/github.com/gorilla/mux/route.go create mode 100644 vendor/github.com/vtolstov/gopacket/.gitignore create mode 100644 vendor/github.com/vtolstov/gopacket/.travis.yml create mode 100644 vendor/github.com/vtolstov/gopacket/afpacket/afpacket.go create mode 100644 vendor/github.com/vtolstov/gopacket/afpacket/afpacket_test.go create mode 100644 vendor/github.com/vtolstov/gopacket/afpacket/header.go create mode 100644 vendor/github.com/vtolstov/gopacket/afpacket/options.go create mode 100644 vendor/github.com/vtolstov/gopacket/bsdbpf/bsd_bpf_sniffer.go create mode 100644 vendor/github.com/vtolstov/gopacket/dumpcommand/tcpdump.go create mode 100644 vendor/github.com/vtolstov/gopacket/examples/arpscan/arpscan.go create mode 100644 vendor/github.com/vtolstov/gopacket/examples/bidirectional/main.go create mode 100644 vendor/github.com/vtolstov/gopacket/examples/bytediff/bytediff.png create mode 100644 vendor/github.com/vtolstov/gopacket/examples/bytediff/main.go create mode 100644 vendor/github.com/vtolstov/gopacket/examples/httpassembly/main.go create mode 100644 vendor/github.com/vtolstov/gopacket/examples/pcapdump/main.go create mode 100644 vendor/github.com/vtolstov/gopacket/examples/pfdump/main.go create mode 100644 vendor/github.com/vtolstov/gopacket/examples/statsassembly/main.go create mode 100644 vendor/github.com/vtolstov/gopacket/examples/synscan/main.go create mode 100644 vendor/github.com/vtolstov/gopacket/examples/util/util.go create mode 100644 vendor/github.com/vtolstov/gopacket/layers/gre_test.go delete mode 100644 vendor/github.com/vtolstov/gopacket/layers/openflow.go create mode 100644 vendor/github.com/vtolstov/gopacket/layers/prism.go create mode 100644 vendor/github.com/vtolstov/gopacket/layers/prism_test.go create mode 100644 vendor/github.com/vtolstov/gopacket/layers/radiotap_test.go create mode 100644 vendor/github.com/vtolstov/gopacket/macs/benchmark_test.go create mode 100644 vendor/github.com/vtolstov/gopacket/macs/doc.go create mode 100644 vendor/github.com/vtolstov/gopacket/macs/gen.go create mode 100644 vendor/github.com/vtolstov/gopacket/macs/valid_mac_prefixes.go create mode 100644 vendor/github.com/vtolstov/gopacket/pcap/doc.go create mode 100644 vendor/github.com/vtolstov/gopacket/pcap/gopacket_benchmark/benchmark.go create mode 100644 vendor/github.com/vtolstov/gopacket/pcap/pcap.go create mode 100644 vendor/github.com/vtolstov/gopacket/pcap/pcap_test.go create mode 100644 vendor/github.com/vtolstov/gopacket/pcap/pcap_tester.go create mode 100644 vendor/github.com/vtolstov/gopacket/pcap/pcapgo_test.go create mode 100644 vendor/github.com/vtolstov/gopacket/pcap/test_dns.pcap create mode 100644 vendor/github.com/vtolstov/gopacket/pcap/test_ethernet.pcap create mode 100644 vendor/github.com/vtolstov/gopacket/pcap/test_loopback.pcap create mode 100644 vendor/github.com/vtolstov/gopacket/pcapgo/read.go create mode 100644 vendor/github.com/vtolstov/gopacket/pcapgo/read_test.go create mode 100644 vendor/github.com/vtolstov/gopacket/pcapgo/write.go create mode 100644 vendor/github.com/vtolstov/gopacket/pcapgo/write_test.go create mode 100644 vendor/github.com/vtolstov/gopacket/pfring/doc.go create mode 100644 vendor/github.com/vtolstov/gopacket/pfring/pfring.go create mode 100644 vendor/github.com/vtolstov/gopacket/routing/common.go create mode 100644 vendor/github.com/vtolstov/gopacket/routing/other.go create mode 100644 vendor/github.com/vtolstov/gopacket/routing/routing.go create mode 100644 vendor/github.com/vtolstov/gopacket/tcpassembly/assembly.go create mode 100644 vendor/github.com/vtolstov/gopacket/tcpassembly/assembly_test.go create mode 100644 vendor/github.com/vtolstov/gopacket/tcpassembly/tcpreader/reader.go create mode 100644 vendor/github.com/vtolstov/gopacket/tcpassembly/tcpreader/reader_test.go create mode 100644 vendor/golang.org/x/net/.gitattributes create mode 100644 vendor/golang.org/x/net/.gitignore create mode 100644 vendor/golang.org/x/net/AUTHORS create mode 100644 vendor/golang.org/x/net/CONTRIBUTING.md create mode 100644 vendor/golang.org/x/net/CONTRIBUTORS create mode 100644 vendor/golang.org/x/net/LICENSE create mode 100644 vendor/golang.org/x/net/PATENTS create mode 100644 vendor/golang.org/x/net/README create mode 100644 vendor/golang.org/x/net/codereview.cfg create mode 100644 vendor/golang.org/x/net/context/context.go create mode 100644 vendor/golang.org/x/net/context/context_test.go create mode 100644 vendor/golang.org/x/net/context/ctxhttp/cancelreq.go create mode 100644 vendor/golang.org/x/net/context/ctxhttp/cancelreq_go14.go create mode 100644 vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go create mode 100644 vendor/golang.org/x/net/context/ctxhttp/ctxhttp_test.go create mode 100644 vendor/golang.org/x/net/context/withtimeout_test.go create mode 100644 vendor/golang.org/x/net/dict/dict.go create mode 100644 vendor/golang.org/x/net/html/atom/atom.go create mode 100644 vendor/golang.org/x/net/html/atom/atom_test.go create mode 100644 vendor/golang.org/x/net/html/atom/gen.go create mode 100644 vendor/golang.org/x/net/html/atom/table.go create mode 100644 vendor/golang.org/x/net/html/atom/table_test.go create mode 100644 vendor/golang.org/x/net/html/charset/charset.go create mode 100644 vendor/golang.org/x/net/html/charset/charset_test.go create mode 100644 vendor/golang.org/x/net/html/charset/gen.go create mode 100644 vendor/golang.org/x/net/html/charset/table.go create mode 100644 vendor/golang.org/x/net/html/charset/testdata/HTTP-charset.html create mode 100644 vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-UTF-8-BOM.html create mode 100644 vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-charset.html create mode 100644 vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-content.html create mode 100644 vendor/golang.org/x/net/html/charset/testdata/No-encoding-declaration.html create mode 100644 vendor/golang.org/x/net/html/charset/testdata/README create mode 100644 vendor/golang.org/x/net/html/charset/testdata/UTF-16BE-BOM.html create mode 100644 vendor/golang.org/x/net/html/charset/testdata/UTF-16LE-BOM.html create mode 100644 vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-charset.html create mode 100644 vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-content.html create mode 100644 vendor/golang.org/x/net/html/charset/testdata/meta-charset-attribute.html create mode 100644 vendor/golang.org/x/net/html/charset/testdata/meta-content-attribute.html create mode 100644 vendor/golang.org/x/net/html/const.go create mode 100644 vendor/golang.org/x/net/html/doc.go create mode 100644 vendor/golang.org/x/net/html/doctype.go create mode 100644 vendor/golang.org/x/net/html/entity.go create mode 100644 vendor/golang.org/x/net/html/entity_test.go create mode 100644 vendor/golang.org/x/net/html/escape.go create mode 100644 vendor/golang.org/x/net/html/escape_test.go create mode 100644 vendor/golang.org/x/net/html/example_test.go create mode 100644 vendor/golang.org/x/net/html/foreign.go create mode 100644 vendor/golang.org/x/net/html/node.go create mode 100644 vendor/golang.org/x/net/html/node_test.go create mode 100644 vendor/golang.org/x/net/html/parse.go create mode 100644 vendor/golang.org/x/net/html/parse_test.go create mode 100644 vendor/golang.org/x/net/html/render.go create mode 100644 vendor/golang.org/x/net/html/render_test.go create mode 100644 vendor/golang.org/x/net/html/testdata/go1.html create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/README create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/adoption01.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/adoption02.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/comments01.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/doctype01.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/entities01.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/entities02.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/html5test-com.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/inbody01.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/isindex.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/pending-spec-changes-plain-text-unsafe.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/pending-spec-changes.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/plain-text-unsafe.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/scriptdata01.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/scripted/adoption01.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/scripted/webkit01.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tables01.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests1.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests10.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests11.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests12.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests14.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests15.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests16.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests17.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests18.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests19.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests2.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests20.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests21.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests22.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests23.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests24.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests25.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests26.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests3.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests4.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests5.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests6.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests7.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests8.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests9.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tests_innerHTML_1.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/tricky01.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/webkit01.dat create mode 100644 vendor/golang.org/x/net/html/testdata/webkit/webkit02.dat create mode 100644 vendor/golang.org/x/net/html/token.go create mode 100644 vendor/golang.org/x/net/html/token_test.go create mode 100644 vendor/golang.org/x/net/http2/.gitignore create mode 100644 vendor/golang.org/x/net/http2/Dockerfile create mode 100644 vendor/golang.org/x/net/http2/Makefile create mode 100644 vendor/golang.org/x/net/http2/README create mode 100644 vendor/golang.org/x/net/http2/client_conn_pool.go create mode 100644 vendor/golang.org/x/net/http2/configure_transport.go create mode 100644 vendor/golang.org/x/net/http2/errors.go create mode 100644 vendor/golang.org/x/net/http2/errors_test.go create mode 100644 vendor/golang.org/x/net/http2/fixed_buffer.go create mode 100644 vendor/golang.org/x/net/http2/fixed_buffer_test.go create mode 100644 vendor/golang.org/x/net/http2/flow.go create mode 100644 vendor/golang.org/x/net/http2/flow_test.go create mode 100644 vendor/golang.org/x/net/http2/frame.go create mode 100644 vendor/golang.org/x/net/http2/frame_test.go create mode 100644 vendor/golang.org/x/net/http2/go15.go create mode 100644 vendor/golang.org/x/net/http2/gotrack.go create mode 100644 vendor/golang.org/x/net/http2/gotrack_test.go create mode 100644 vendor/golang.org/x/net/http2/h2demo/.gitignore create mode 100644 vendor/golang.org/x/net/http2/h2demo/Makefile create mode 100644 vendor/golang.org/x/net/http2/h2demo/README create mode 100644 vendor/golang.org/x/net/http2/h2demo/h2demo.go create mode 100644 vendor/golang.org/x/net/http2/h2demo/launch.go create mode 100644 vendor/golang.org/x/net/http2/h2demo/rootCA.key create mode 100644 vendor/golang.org/x/net/http2/h2demo/rootCA.pem create mode 100644 vendor/golang.org/x/net/http2/h2demo/rootCA.srl create mode 100644 vendor/golang.org/x/net/http2/h2demo/server.crt create mode 100644 vendor/golang.org/x/net/http2/h2demo/server.key create mode 100644 vendor/golang.org/x/net/http2/h2i/README.md create mode 100644 vendor/golang.org/x/net/http2/h2i/h2i.go create mode 100644 vendor/golang.org/x/net/http2/headermap.go create mode 100644 vendor/golang.org/x/net/http2/hpack/encode.go create mode 100644 vendor/golang.org/x/net/http2/hpack/encode_test.go create mode 100644 vendor/golang.org/x/net/http2/hpack/hpack.go create mode 100644 vendor/golang.org/x/net/http2/hpack/hpack_test.go create mode 100644 vendor/golang.org/x/net/http2/hpack/huffman.go create mode 100644 vendor/golang.org/x/net/http2/hpack/tables.go create mode 100644 vendor/golang.org/x/net/http2/http2.go create mode 100644 vendor/golang.org/x/net/http2/http2_test.go create mode 100644 vendor/golang.org/x/net/http2/pipe.go create mode 100644 vendor/golang.org/x/net/http2/pipe_test.go create mode 100644 vendor/golang.org/x/net/http2/priority_test.go create mode 100644 vendor/golang.org/x/net/http2/server.go create mode 100644 vendor/golang.org/x/net/http2/server_test.go create mode 100644 vendor/golang.org/x/net/http2/testdata/draft-ietf-httpbis-http2.xml create mode 100644 vendor/golang.org/x/net/http2/transport.go create mode 100644 vendor/golang.org/x/net/http2/transport_test.go create mode 100644 vendor/golang.org/x/net/http2/write.go create mode 100644 vendor/golang.org/x/net/http2/writesched.go create mode 100644 vendor/golang.org/x/net/http2/z_spec_test.go create mode 100644 vendor/golang.org/x/net/icmp/extension_test.go create mode 100644 vendor/golang.org/x/net/icmp/interface.go create mode 100644 vendor/golang.org/x/net/icmp/mpls.go create mode 100644 vendor/golang.org/x/net/icmp/multipart.go create mode 100644 vendor/golang.org/x/net/icmp/multipart_test.go create mode 100644 vendor/golang.org/x/net/idna/idna.go create mode 100644 vendor/golang.org/x/net/idna/idna_test.go create mode 100644 vendor/golang.org/x/net/idna/punycode.go create mode 100644 vendor/golang.org/x/net/idna/punycode_test.go create mode 100644 vendor/golang.org/x/net/internal/iana/const.go create mode 100644 vendor/golang.org/x/net/internal/iana/gen.go create mode 100644 vendor/golang.org/x/net/internal/nettest/error_posix.go create mode 100644 vendor/golang.org/x/net/internal/nettest/error_stub.go create mode 100644 vendor/golang.org/x/net/internal/nettest/interface.go create mode 100644 vendor/golang.org/x/net/internal/nettest/rlimit.go create mode 100644 vendor/golang.org/x/net/internal/nettest/rlimit_stub.go create mode 100644 vendor/golang.org/x/net/internal/nettest/rlimit_unix.go create mode 100644 vendor/golang.org/x/net/internal/nettest/rlimit_windows.go create mode 100644 vendor/golang.org/x/net/internal/nettest/stack.go create mode 100644 vendor/golang.org/x/net/internal/nettest/stack_stub.go create mode 100644 vendor/golang.org/x/net/internal/nettest/stack_unix.go create mode 100644 vendor/golang.org/x/net/internal/nettest/stack_windows.go create mode 100644 vendor/golang.org/x/net/internal/timeseries/timeseries.go create mode 100644 vendor/golang.org/x/net/internal/timeseries/timeseries_test.go create mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_arm64.go create mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_ppc64.go create mode 100644 vendor/golang.org/x/net/ipv4/zsys_linux_ppc64le.go create mode 100644 vendor/golang.org/x/net/ipv6/zsys_linux_arm64.go create mode 100644 vendor/golang.org/x/net/ipv6/zsys_linux_ppc64.go create mode 100644 vendor/golang.org/x/net/ipv6/zsys_linux_ppc64le.go create mode 100644 vendor/golang.org/x/net/netutil/listen.go create mode 100644 vendor/golang.org/x/net/netutil/listen_test.go create mode 100644 vendor/golang.org/x/net/proxy/direct.go create mode 100644 vendor/golang.org/x/net/proxy/per_host.go create mode 100644 vendor/golang.org/x/net/proxy/per_host_test.go create mode 100644 vendor/golang.org/x/net/proxy/proxy.go create mode 100644 vendor/golang.org/x/net/proxy/proxy_test.go create mode 100644 vendor/golang.org/x/net/proxy/socks5.go create mode 100644 vendor/golang.org/x/net/publicsuffix/gen.go create mode 100644 vendor/golang.org/x/net/publicsuffix/list.go create mode 100644 vendor/golang.org/x/net/publicsuffix/list_test.go create mode 100644 vendor/golang.org/x/net/publicsuffix/table.go create mode 100644 vendor/golang.org/x/net/publicsuffix/table_test.go create mode 100644 vendor/golang.org/x/net/trace/events.go create mode 100644 vendor/golang.org/x/net/trace/histogram.go create mode 100644 vendor/golang.org/x/net/trace/histogram_test.go create mode 100644 vendor/golang.org/x/net/trace/trace.go create mode 100644 vendor/golang.org/x/net/trace/trace_test.go create mode 100644 vendor/golang.org/x/net/webdav/file.go create mode 100644 vendor/golang.org/x/net/webdav/file_test.go create mode 100644 vendor/golang.org/x/net/webdav/if.go create mode 100644 vendor/golang.org/x/net/webdav/if_test.go create mode 100644 vendor/golang.org/x/net/webdav/internal/xml/README create mode 100644 vendor/golang.org/x/net/webdav/internal/xml/atom_test.go create mode 100644 vendor/golang.org/x/net/webdav/internal/xml/example_test.go create mode 100644 vendor/golang.org/x/net/webdav/internal/xml/marshal.go create mode 100644 vendor/golang.org/x/net/webdav/internal/xml/marshal_test.go create mode 100644 vendor/golang.org/x/net/webdav/internal/xml/read.go create mode 100644 vendor/golang.org/x/net/webdav/internal/xml/read_test.go create mode 100644 vendor/golang.org/x/net/webdav/internal/xml/typeinfo.go create mode 100644 vendor/golang.org/x/net/webdav/internal/xml/xml.go create mode 100644 vendor/golang.org/x/net/webdav/internal/xml/xml_test.go create mode 100644 vendor/golang.org/x/net/webdav/litmus_test_server.go create mode 100644 vendor/golang.org/x/net/webdav/lock.go create mode 100644 vendor/golang.org/x/net/webdav/lock_test.go create mode 100644 vendor/golang.org/x/net/webdav/prop.go create mode 100644 vendor/golang.org/x/net/webdav/prop_test.go create mode 100644 vendor/golang.org/x/net/webdav/webdav.go create mode 100644 vendor/golang.org/x/net/webdav/webdav_test.go create mode 100644 vendor/golang.org/x/net/webdav/xml.go create mode 100644 vendor/golang.org/x/net/webdav/xml_test.go create mode 100644 vendor/golang.org/x/net/websocket/client.go create mode 100644 vendor/golang.org/x/net/websocket/exampledial_test.go create mode 100644 vendor/golang.org/x/net/websocket/examplehandler_test.go create mode 100644 vendor/golang.org/x/net/websocket/hybi.go create mode 100644 vendor/golang.org/x/net/websocket/hybi_test.go create mode 100644 vendor/golang.org/x/net/websocket/server.go create mode 100644 vendor/golang.org/x/net/websocket/websocket.go create mode 100644 vendor/golang.org/x/net/websocket/websocket_test.go create mode 160000 vendor/golang.org/x/sys create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/.drone.yml create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/.gitignore create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/LICENSE create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/README.md create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/cfuncs.go create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/constants.go create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/domain.go create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/domain_test.go create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/error.go create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/events.go create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/integration_test.go create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/interface.go create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/interface_test.go create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/libvirt.go create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/libvirt_test.go create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/network.go create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/network_test.go create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/nodeinfo.go create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/nwfilter.go create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/secret.go create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/snapshot.go create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/storage_pool.go create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/storage_pool_test.go create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/storage_volume.go create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/storage_volume_test.go create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/stream.go create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/vagrant/master/Vagrantfile create mode 100644 vendor/gopkg.in/alexzorin/libvirt-go.v2/vagrant/vagrant-provision-reboot-plugin.rb diff --git a/build b/build index 023e474..e0369f7 100755 --- a/build +++ b/build @@ -2,19 +2,27 @@ ORG_PATH="github.com/vtolstov" REPO_PATH="${ORG_PATH}/svirtnet" +VERSION=`git describe --long` +BUILD_TIME=`date +%FT%T%z` +LDFLAGS="-X main.Version=${VERSION} -X main.BuildTime=${BUILD_TIME}" -export GOBIN=$(pwd)/bin -export GOPATH=$(pwd)/third_party -mkdir -p $GOBIN +rm -rf bin tmp -GO=$(which go) -if [ "x${GO}" = "x" ]; then - wget https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz -O go.tar.gz - tar -zxf go.tar.gz - rm -f go.tar.gz - export PATH=$(pwd)/go/bin:/bin:/usr/bin:/sbin:/usr/sbin - export GOROOT=$(pwd)/go +export GO15VENDOREXPERIMENT=1 +export GOPATH=$(pwd)/gopath +mkdir -p $GOPATH +mkdir -p bin +mkdir -p tmp + +go version | grep -q go1.5 + +if [ "x$?" != "x0" ]; then + export GOROOT=$(pwd)/goroot + export PATH=$GOROOT/bin:$PATH + mkdir -p $GOROOT + wget https://storage.googleapis.com/golang/go1.5.linux-amd64.tar.gz -O tmp/go.tar.gz + tar --strip-components=1 -C $GOROOT -xf tmp/go.tar.gz fi if [ ! -h $GOPATH/src/${REPO_PATH} ]; then @@ -22,4 +30,6 @@ if [ ! -h $GOPATH/src/${REPO_PATH} ]; then ln -s ../../../.. $GOPATH/src/${REPO_PATH} || echo "exit 255" fi -go build -a -x -o bin/svirtnet ${REPO_PATH} +set -e + +GOOS=linux GOARCH=amd64 go build -x -ldflags "${LDFLAGS}" -tags netgo -o bin/svirtnet ${REPO_PATH} diff --git a/digitalocean.go b/digitalocean.go new file mode 100644 index 0000000..0e8c5e0 --- /dev/null +++ b/digitalocean.go @@ -0,0 +1,7 @@ +package main + +import "net/http" + +func DigitalOceanHandler(w http.ResponseWriter, r *http.Request) { + +} diff --git a/ec2.go b/ec2.go new file mode 100644 index 0000000..05564cd --- /dev/null +++ b/ec2.go @@ -0,0 +1,7 @@ +package main + +import "net/http" + +func Ec2Handler(w http.ResponseWriter, r *http.Request) { + +} diff --git a/ec2_test.go b/ec2_test.go new file mode 100644 index 0000000..304f649 --- /dev/null +++ b/ec2_test.go @@ -0,0 +1,270 @@ +package main + +import ( + "encoding/json" + "fmt" + "io" + "io/ioutil" + "net" + "net/http" + "net/url" + "path" + "strings" + "time" + + "github.com/docker/docker/vendor/src/github.com/gorilla/mux" + + "gopkg.in/yaml.v2" +) + +func getServerByIP(ip string) (*Server, error) { + for _, s := range servers { + if s.metadata == nil { + continue + } + for _, addr := range s.metadata.Network.IP { + if addr.Gateway == "false" && addr.Address == ip { + return s, nil + } + } + } + return nil, fmt.Errorf("failed to get Server by IP") +} + +func ListenAndServeTCPv4() { + ipAddr := &net.TCPAddr{IP: net.IPv4zero, Port: 80} + conn, err := net.Listen("tcp", ipAddr.String()) + if err != nil { + l.Info(err.Error()) + return + } + + httpconn = conn + defer conn.Close() + + r := mux.NewRouter() + r.HandleFunc("/", MetadataHandler) + r.HandleFunc("/2009-04-04", Ec2Handler) + r.HandleFunc("/latest", Ec2Handler) + r.HandleFunc("/openstack", OpenstackHandler) + r.HandleFunc("/metadata", DigitaloceanHandler) + http.Handle("/", r) + + s := &http.Server{ + Addr: ":80", + Handler: r, + ReadTimeout: 10 * time.Second, + WriteTimeout: 10 * time.Second, + MaxHeaderBytes: 1 << 20, + } + s.Serve(httpconn) +} + +func MetadataHandler(w http.ResponseWriter, r *http.Request) { + var host string + var port string + + host, _, _ = net.SplitHostPort(r.RemoteAddr) + s, err := getServerByIP(host) + if err != nil { + l.Info(fmt.Sprintf("err: %s %+v\n", err, r)) + w.WriteHeader(503) + return + } + l.Info(fmt.Sprintf("%s http req: Host:%s RemoteAddr:%s URL:%s\n", s.name, r.Host, r.RemoteAddr, r.URL)) + + var res *http.Response + + if s.metadata == nil { + l.Info(fmt.Sprintf("err: metadata is nil")) + w.WriteHeader(503) + return + } + + u, _ := url.Parse(s.metadata.CloudConfig.URL) + if strings.Index(u.Host, ":") > 0 { + host, port, _ = net.SplitHostPort(u.Host) + } else { + host = u.Host + } + if port == "" { + if u.Scheme == "https" { + port = "443" + } else { + port = "80" + } + } + + addrs, err := net.LookupIP(host) + if err != nil { + l.Warning(fmt.Sprintf("%s http err: %s\n", s.name, err.Error())) + w.WriteHeader(503) + return + } + + var addr net.IP + + for _, addr = range addrs { + if addr.To4() == nil { + break + } + } + uri := path.Clean(r.URL.String()) + switch uri { + case "/2009-04-04": + w.Write([]byte("meta-data\n")) + case "/": + w.Write([]byte("2009-04-04\nlatest\n")) + case "/2009-04-04/meta-data", "/latest/meta-data": + w.Write([]byte("public-hostname\nhostname\nlocal-hostname\ninstance-id\npublic-ipv4\npublic-keys\n")) + case "/2009-04-04/meta-data/public-hostname", "/2009-04-04/meta-data/hostname", "/2009-04-04/meta-data/local-hostname", "/latest/meta-data/public-hostname", "/latest/meta-data/hostname", "/latest/meta-data/local-hostname": + w.Write([]byte(s.name + "." + s.metadata.Network.DomainName + "\n")) + case "/2009-04-04/meta-data/local-ipv4": + w.Write([]byte("")) + case "/2009-04-04/meta-data/instance-id", "/latest/meta-data/instance-id": + w.Write([]byte(s.name + "\n")) + case "/2009-04-04/meta-data/public-ipv4", "/latest/meta-data/public-ipv4": + w.Write([]byte("")) + case "/2009-04-04/meta-data/public-keys", "/latest/meta-data/public-keys": + w.Write([]byte("0=id_rsa\n")) + case "/2009-04-04/meta-data/public-keys/0", "/latest/meta-data/public-keys/0": + w.Write([]byte("openssh-key\n")) + case "/2009-04-04/meta-data/public-keys/0/openssh-key", "/latest/meta-data/public-keys/0/openssh-key": + req, _ := http.NewRequest("GET", s.metadata.CloudConfig.URL, nil) + req.URL = u + req.URL.Host = net.JoinHostPort(addr.String(), port) + req.Host = host + res, err = httpClient.Do(req) + if res != nil && res.Body != nil { + defer res.Body.Close() + } + if res == nil && err != nil { + l.Warning(fmt.Sprintf("%s http err: %s\n", s.name, err.Error())) + w.Write([]byte("\n")) + return + } + buf, err := ioutil.ReadAll(res.Body) + if err != nil { + l.Warning(fmt.Sprintf("%s http err: %s\n", s.name, err.Error())) + w.Write([]byte("\n")) + return + } + + type User struct { + Name string `yaml:"name,omitempty"` + Passwd string `yaml:"passwd,omitempty"` + SSHKey []string `yaml:"ssh-authorized-keys,omitempty"` + } + + type CloudConfig struct { + AllowRootLogin bool `yaml:"disable_root,omitempty"` + AllowRootSSH bool `yaml:"ssh_pwauth,omitempty"` + AllowResize bool `yaml:"resize_rootfs,omitempty"` + Users []User `yaml:"users,omitempty"` + } + var cloudconfig CloudConfig + err = yaml.Unmarshal(buf, &cloudconfig) + if err != nil { + l.Warning(fmt.Sprintf("%s http err: %s\n", s.name, err.Error())) + w.Write([]byte("\n")) + return + } + w.Write([]byte(strings.Join(cloudconfig.Users[0].SSHKey, "\n") + "\n")) + case "/openstack": + w.Write([]byte("latest\n2013-04-04\n")) + case "/openstack/latest", "/openstack/2013-04-04": + w.Write([]byte("meta-data.json\nmeta_data.json\nuser-data\nuser_data\nvendor-data\nvendo_data\n")) + case "/openstack/2013-04-04/password", "/openstack/latest/password": + w.WriteHeader(200) + case "/openstack/latest/meta-data.json", "/openstack/latest/meta_data.json", "/openstack/2013-04-04/meta_data.json": + type openstackMetaData struct { + Meta struct { + Username string `json:"username"` + AdminPass string `json:"admin_pass"` + UUID string `json:"uuid"` + Hostname string `json:"hostname"` + } `json:"meta"` + UUID string `json:"uuid"` + Hostname string `json:"hostname"` + SSHKey struct { + Root string `json:"root"` + } `json:"public_keys,omitempty"` + } + metadata := &openstackMetaData{} + metadata.Meta.Hostname = s.name + "." + s.metadata.Network.DomainName + metadata.Hostname = s.name + "." + s.metadata.Network.DomainName + + virconn = getVirConn() + domain, err := virconn.LookupDomainByName(s.name) + var uuid string + if err == nil { + uuid, _ = domain.GetUUIDString() + } + metadata.Meta.UUID = uuid + metadata.UUID = uuid + req, _ := http.NewRequest("GET", s.metadata.CloudConfig.URL, nil) + req.URL = u + req.URL.Host = net.JoinHostPort(addr.String(), port) + req.Host = host + res, err = httpClient.Do(req) + if res != nil && res.Body != nil { + defer res.Body.Close() + } + if res == nil && err != nil { + w.Write([]byte("{}")) + return + } + buf, err := ioutil.ReadAll(res.Body) + if err != nil { + w.Write([]byte("{}")) + return + } + + type User struct { + Name string `yaml:"name,omitempty"` + Passwd string `yaml:"passwd,omitempty"` + SSHKey []string `yaml:"ssh-authorized-keys,omitempty"` + } + + type CloudConfig struct { + AllowRootLogin bool `yaml:"disable_root,omitempty"` + AllowRootSSH bool `yaml:"ssh_pwauth,omitempty"` + AllowResize bool `yaml:"resize_rootfs,omitempty"` + Users []User `yaml:"users,omitempty"` + } + var cloudconfig CloudConfig + err = yaml.Unmarshal(buf, &cloudconfig) + if err != nil { + w.Write([]byte("{}")) + return + } + metadata.Meta.Username = cloudconfig.Users[0].Name + metadata.Meta.AdminPass = cloudconfig.Users[0].Passwd + metadata.SSHKey.Root = strings.Join(cloudconfig.Users[0].SSHKey, "\n") + buf, err = json.Marshal(metadata) + if err != nil { + w.Write([]byte("{}")) + } else { + w.Write([]byte(buf)) + } + case "/2009-04-04/user-data", "/latest/user-data", "/openstack/latest/user_data", "/openstack/latest/user-data", "/openstack/latest/vendor_data", "/openstack/latest/vendor-data": + req, _ := http.NewRequest("GET", s.metadata.CloudConfig.URL, nil) + req.URL = u + req.URL.Host = net.JoinHostPort(addr.String(), port) + req.Host = host + res, err = httpClient.Do(req) + if res != nil && res.Body != nil { + defer res.Body.Close() + } + if res == nil && err != nil { + l.Warning(fmt.Sprintf("%s http err: %s\n", s.name, err.Error())) + w.WriteHeader(503) + return + } + io.Copy(w, res.Body) + default: + l.Info(fmt.Sprintf("http: %+v\n", r)) + w.WriteHeader(503) + } + return +} diff --git a/openstack.go b/openstack.go new file mode 100644 index 0000000..cec5c4a --- /dev/null +++ b/openstack.go @@ -0,0 +1,7 @@ +package main + +import "net/http" + +func OpenstackHandler(w http.ResponseWriter, r *http.Request) { + +} diff --git a/tcp.go b/tcp.go index e7ac2f5..0057c31 100644 --- a/tcp.go +++ b/tcp.go @@ -1,20 +1,25 @@ package main import ( - "encoding/json" "fmt" - "io" - "io/ioutil" "net" "net/http" - "net/url" - "path" - "strings" "time" - "gopkg.in/yaml.v2" + "github.com/gorilla/mux" ) +var metadataMap map[string]func(w http.ResponseWriter, r *http.Request) + +func init() { + metadataMap = make(map[string]func(w http.ResponseWriter, r *http.Request)) + metadataMap["/"] = MetadataHandler + metadataMap["/2009-04-04"] = Ec2Handler + metadataMap["/latest"] = Ec2Handler + metadataMap["/openstack"] = OpenstackHandler + metadataMap["/metadata"] = DigitalOceanHandler +} + func getServerByIP(ip string) (*Server, error) { for _, s := range servers { if s.metadata == nil { @@ -40,8 +45,10 @@ func ListenAndServeTCPv4() { httpconn = conn defer conn.Close() - r := http.NewServeMux() - r.HandleFunc("/", ServeHTTP) + r := mux.NewRouter() + for k, v := range metadataMap { + r.HandleFunc(k, v) + } http.Handle("/", r) s := &http.Server{ @@ -54,211 +61,9 @@ func ListenAndServeTCPv4() { s.Serve(httpconn) } -func ServeHTTP(w http.ResponseWriter, r *http.Request) { - var host string - var port string - - host, _, _ = net.SplitHostPort(r.RemoteAddr) - s, err := getServerByIP(host) - if err != nil { - l.Info(fmt.Sprintf("err: %s %+v\n", err, r)) - w.WriteHeader(503) - return - } - l.Info(fmt.Sprintf("%s http req: Host:%s RemoteAddr:%s URL:%s\n", s.name, r.Host, r.RemoteAddr, r.URL)) - - var res *http.Response - - if s.metadata == nil { - l.Info(fmt.Sprintf("err: metadata is nil")) - w.WriteHeader(503) - return - } - - u, _ := url.Parse(s.metadata.CloudConfig.URL) - if strings.Index(u.Host, ":") > 0 { - host, port, _ = net.SplitHostPort(u.Host) - } else { - host = u.Host - } - if port == "" { - if u.Scheme == "https" { - port = "443" - } else { - port = "80" - } - } - - addrs, err := net.LookupIP(host) - if err != nil { - l.Warning(fmt.Sprintf("%s http err: %s\n", s.name, err.Error())) - w.WriteHeader(503) - return - } - - var addr net.IP - - for _, addr = range addrs { - if addr.To4() == nil { - break - } - } - uri := path.Clean(r.URL.String()) - switch uri { - case "/2009-04-04": - w.Write([]byte("meta-data\n")) - case "/": - w.Write([]byte("2009-04-04\nlatest\n")) - case "/2009-04-04/meta-data", "/latest/meta-data": - w.Write([]byte("public-hostname\nhostname\nlocal-hostname\ninstance-id\npublic-ipv4\npublic-keys\n")) - case "/2009-04-04/meta-data/public-hostname", "/2009-04-04/meta-data/hostname", "/2009-04-04/meta-data/local-hostname", "/latest/meta-data/public-hostname", "/latest/meta-data/hostname", "/latest/meta-data/local-hostname": - w.Write([]byte(s.name + "." + s.metadata.Network.DomainName + "\n")) - case "/2009-04-04/meta-data/local-ipv4": - w.Write([]byte("")) - case "/2009-04-04/meta-data/instance-id", "/latest/meta-data/instance-id": - w.Write([]byte(s.name + "\n")) - case "/2009-04-04/meta-data/public-ipv4", "/latest/meta-data/public-ipv4": - w.Write([]byte("")) - case "/2009-04-04/meta-data/public-keys", "/latest/meta-data/public-keys": - w.Write([]byte("0=id_rsa\n")) - case "/2009-04-04/meta-data/public-keys/0", "/latest/meta-data/public-keys/0": - w.Write([]byte("openssh-key\n")) - case "/2009-04-04/meta-data/public-keys/0/openssh-key", "/latest/meta-data/public-keys/0/openssh-key": - req, _ := http.NewRequest("GET", s.metadata.CloudConfig.URL, nil) - req.URL = u - req.URL.Host = net.JoinHostPort(addr.String(), port) - req.Host = host - res, err = httpClient.Do(req) - if res != nil && res.Body != nil { - defer res.Body.Close() - } - if res == nil && err != nil { - l.Warning(fmt.Sprintf("%s http err: %s\n", s.name, err.Error())) - w.Write([]byte("\n")) - return - } - buf, err := ioutil.ReadAll(res.Body) - if err != nil { - l.Warning(fmt.Sprintf("%s http err: %s\n", s.name, err.Error())) - w.Write([]byte("\n")) - return - } - - type User struct { - Name string `yaml:"name,omitempty"` - Passwd string `yaml:"passwd,omitempty"` - SSHKey []string `yaml:"ssh-authorized-keys,omitempty"` - } - - type CloudConfig struct { - AllowRootLogin bool `yaml:"disable_root,omitempty"` - AllowRootSSH bool `yaml:"ssh_pwauth,omitempty"` - AllowResize bool `yaml:"resize_rootfs,omitempty"` - Users []User `yaml:"users,omitempty"` - } - var cloudconfig CloudConfig - err = yaml.Unmarshal(buf, &cloudconfig) - if err != nil { - l.Warning(fmt.Sprintf("%s http err: %s\n", s.name, err.Error())) - w.Write([]byte("\n")) - return - } - w.Write([]byte(strings.Join(cloudconfig.Users[0].SSHKey, "\n") + "\n")) - case "/openstack": - w.Write([]byte("latest\n2013-04-04\n")) - case "/openstack/latest", "/openstack/2013-04-04": - w.Write([]byte("meta-data.json\nmeta_data.json\nuser-data\nuser_data\nvendor-data\nvendo_data\n")) - case "/openstack/2013-04-04/password", "/openstack/latest/password": - w.WriteHeader(200) - case "/openstack/latest/meta-data.json", "/openstack/latest/meta_data.json", "/openstack/2013-04-04/meta_data.json": - type openstackMetaData struct { - Meta struct { - Username string `json:"username"` - AdminPass string `json:"admin_pass"` - UUID string `json:"uuid"` - Hostname string `json:"hostname"` - } `json:"meta"` - UUID string `json:"uuid"` - Hostname string `json:"hostname"` - SSHKey struct { - Root string `json:"root"` - } `json:"public_keys,omitempty"` - } - metadata := &openstackMetaData{} - metadata.Meta.Hostname = s.name + "." + s.metadata.Network.DomainName - metadata.Hostname = s.name + "." + s.metadata.Network.DomainName - - virconn = getVirConn() - domain, err := virconn.LookupDomainByName(s.name) - var uuid string - if err == nil { - uuid, _ = domain.GetUUIDString() - } - metadata.Meta.UUID = uuid - metadata.UUID = uuid - req, _ := http.NewRequest("GET", s.metadata.CloudConfig.URL, nil) - req.URL = u - req.URL.Host = net.JoinHostPort(addr.String(), port) - req.Host = host - res, err = httpClient.Do(req) - if res != nil && res.Body != nil { - defer res.Body.Close() - } - if res == nil && err != nil { - w.Write([]byte("{}")) - return - } - buf, err := ioutil.ReadAll(res.Body) - if err != nil { - w.Write([]byte("{}")) - return - } - - type User struct { - Name string `yaml:"name,omitempty"` - Passwd string `yaml:"passwd,omitempty"` - SSHKey []string `yaml:"ssh-authorized-keys,omitempty"` - } - - type CloudConfig struct { - AllowRootLogin bool `yaml:"disable_root,omitempty"` - AllowRootSSH bool `yaml:"ssh_pwauth,omitempty"` - AllowResize bool `yaml:"resize_rootfs,omitempty"` - Users []User `yaml:"users,omitempty"` - } - var cloudconfig CloudConfig - err = yaml.Unmarshal(buf, &cloudconfig) - if err != nil { - w.Write([]byte("{}")) - return - } - metadata.Meta.Username = cloudconfig.Users[0].Name - metadata.Meta.AdminPass = cloudconfig.Users[0].Passwd - metadata.SSHKey.Root = strings.Join(cloudconfig.Users[0].SSHKey, "\n") - buf, err = json.Marshal(metadata) - if err != nil { - w.Write([]byte("{}")) - } else { - w.Write([]byte(buf)) - } - case "/2009-04-04/user-data", "/latest/user-data", "/openstack/latest/user_data", "/openstack/latest/user-data", "/openstack/latest/vendor_data", "/openstack/latest/vendor-data": - req, _ := http.NewRequest("GET", s.metadata.CloudConfig.URL, nil) - req.URL = u - req.URL.Host = net.JoinHostPort(addr.String(), port) - req.Host = host - res, err = httpClient.Do(req) - if res != nil && res.Body != nil { - defer res.Body.Close() - } - if res == nil && err != nil { - l.Warning(fmt.Sprintf("%s http err: %s\n", s.name, err.Error())) - w.WriteHeader(503) - return - } - io.Copy(w, res.Body) - default: - l.Info(fmt.Sprintf("http: %+v\n", r)) - w.WriteHeader(503) +func MetadataHandler(w http.ResponseWriter, r *http.Request) { + for k, _ := range metadataMap { + w.Write([]byte(k[1:])) + w.Write([]byte("\n")) } - return } diff --git a/vendor/github.com/alexzorin/libvirt-go/.drone.yml b/vendor/github.com/alexzorin/libvirt-go/.drone.yml new file mode 100644 index 0000000..da5ca0d --- /dev/null +++ b/vendor/github.com/alexzorin/libvirt-go/.drone.yml @@ -0,0 +1,7 @@ +image: alexzorin/libvirt-go_test:1.2 +script: + - go test -v +notify: + email: + recipients: + - git@zor.io diff --git a/vendor/github.com/alexzorin/libvirt-go/.gitignore b/vendor/github.com/alexzorin/libvirt-go/.gitignore new file mode 100644 index 0000000..ce6b260 --- /dev/null +++ b/vendor/github.com/alexzorin/libvirt-go/.gitignore @@ -0,0 +1,3 @@ +*.sublime-workspace +*.sublime-project +.vagrant \ No newline at end of file diff --git a/vendor/github.com/alexzorin/libvirt-go/README.md b/vendor/github.com/alexzorin/libvirt-go/README.md index d4a3b16..f7638f5 100644 --- a/vendor/github.com/alexzorin/libvirt-go/README.md +++ b/vendor/github.com/alexzorin/libvirt-go/README.md @@ -1,32 +1,46 @@ -libvirt-go -============ +# libvirt-go [![Build Status](http://ci.serversaurus.com/github.com/alexzorin/libvirt-go/status.svg?branch=master)](http://ci.serversaurus.com/github.com/alexzorin/libvirt-go) Go bindings for libvirt. -Versions --------------- -Please use the `0.9` branch for libvirt 0.9.8 and below, which will be tagged `v1.x` releases: `gopkg.in/alexzorin/libvirt-go.v1` [(docs)](http://gopkg.in/alexzorin/libvirt-go.v1). +Make sure to have `libvirt-dev` package (or the development files otherwise somewhere in your include path) -The `master` branch targets the 1.x version of libvirt, which will be tagged `v2.x` releases: `gopkg.in/alexzorin/libvirt-go.v2` [(docs)](http://gopkg.in/alexzorin/libvirt-go.v2). +## Version Support +Currently, the only supported version of libvirt is **1.2.2**, tagged as `v2.x` releases `gopkg.in/alexzorin/libvirt-go.v2` [(docs)](http://gopkg.in/alexzorin/libvirt-go.v2). -Make sure to have libvirt-dev package (or the development files otherwise somewhere in your include path) +The bindings will probably work with versions of libvirt that are higher than 1.2.2, depending on what is added in those releases. However, no features are currently being added that will cause the build or tests to break against 1.2.2. -Documentation --------------- +### OS Compatibility Matrix + +To quickly see what version of libvirt your OS can easily support (may be outdated). Obviously, nothing below 1.2.2 is usable with these bindings. + +| OS Release | libvirt Version | +| ------------ | ------------------------------ | +| FC19 | 1.2.9 from libvirt.org/sources | +| Debian 7 | 1.2.4 from wheezy-backports | +| Debian 6 | 0.9.12 from squeeze-backports | +| Ubuntu 14.04 | 1.2.2 from trusty | +| RHEL 6 | 0.10.x | +| RHEL 5 | 0.8.x | + + +### 0.9.x Support + +Previously there was support for libvirt 0.9.8 and below, however this is no longer being updated. These releases were tagged `v1.x` at `gopkg.in/alexzorin/libvirt-go.v1` [(docs)](http://gopkg.in/alexzorin/libvirt-go.v1). + +## Documentation * [api documentation for the bindings](http://godoc.org/github.com/alexzorin/libvirt-go) * [api documentation for libvirt](http://libvirt.org/html/libvirt-libvirt.html) -Contributing -------------- +## Contributing Please fork and write tests. Integration tests are available where functionality isn't provided by the test driver, see `integration_test.go`. -`Vagrantfiles` are included to provision testing environments to run the integration tests: +A `Vagrantfile` is included to run the integration tests: * `cd ./vagrant/{branch}` (i.e `./vagrant/master`, where you will find a `Vagrantfile` for the `master` branch) * `vagrant up` to provision the virtual machine diff --git a/vendor/github.com/alexzorin/libvirt-go/cfuncs.go b/vendor/github.com/alexzorin/libvirt-go/cfuncs.go new file mode 100644 index 0000000..81ae515 --- /dev/null +++ b/vendor/github.com/alexzorin/libvirt-go/cfuncs.go @@ -0,0 +1,96 @@ +package libvirt + +/* +#cgo LDFLAGS: -lvirt -ldl +#include +#include +#include + +void virErrorFuncDummy(void *userData, virErrorPtr error) +{ +} + +int domainEventLifecycleCallback_cgo(virConnectPtr c, virDomainPtr d, + int event, int detail, void *data) +{ + return domainEventLifecycleCallback(c, d, event, detail, data); +} + +int domainEventGenericCallback_cgo(virConnectPtr c, virDomainPtr d, void *data) +{ + return domainEventGenericCallback(c, d, data); +} + +int domainEventRTCChangeCallback_cgo(virConnectPtr c, virDomainPtr d, + long long utcoffset, void *data) +{ + return domainEventRTCChangeCallback(c, d, utcoffset, data); +} + +int domainEventWatchdogCallback_cgo(virConnectPtr c, virDomainPtr d, + int action, void *data) +{ + return domainEventWatchdogCallback(c, d, action, data); +} + +int domainEventIOErrorCallback_cgo(virConnectPtr c, virDomainPtr d, + const char *srcPath, const char *devAlias, + int action, void *data) +{ + return domainEventIOErrorCallback(c, d, srcPath, devAlias, action, data); +} + +int domainEventGraphicsCallback_cgo(virConnectPtr c, virDomainPtr d, + int phase, const virDomainEventGraphicsAddress *local, + const virDomainEventGraphicsAddress *remote, + const char *authScheme, + const virDomainEventGraphicsSubject *subject, void *data) +{ + return domainEventGraphicsCallback(c, d, phase, local, remote, authScheme, subject, data); +} + +int domainEventIOErrorReasonCallback_cgo(virConnectPtr c, virDomainPtr d, + const char *srcPath, const char *devAlias, + int action, const char *reason, void *data) +{ + return domainEventIOErrorReasonCallback(c, d, srcPath, devAlias, action, reason, data); +} + +int domainEventBlockJobCallback_cgo(virConnectPtr c, virDomainPtr d, + const char *disk, int type, int status, void *data) +{ + return domainEventIOErrorReasonCallback(c, d, disk, type, status, data); +} + +int domainEventDiskChangeCallback_cgo(virConnectPtr c, virDomainPtr d, + const char *oldSrcPath, const char *newSrcPath, + const char *devAlias, int reason, void *data) +{ + return domainEventDiskChangeCallback(c, d, oldSrcPath, newSrcPath, devAlias, reason, data); +} + +int domainEventTrayChangeCallback_cgo(virConnectPtr c, virDomainPtr d, + const char *devAlias, int reason, void *data) +{ + return domainEventTrayChangeCallback(c, d, devAlias, reason, data); +} + +int domainEventReasonCallback_cgo(virConnectPtr c, virDomainPtr d, + int reason, void *data) +{ + return domainEventReasonCallback(c, d, reason, data); +} + +int domainEventBalloonChangeCallback_cgo(virConnectPtr c, virDomainPtr d, + unsigned long long actual, void *data) +{ + return domainEventBalloonChangeCallback(c, d, actual, data); +} + +int domainEventDeviceRemovedCallback_cgo(virConnectPtr c, virDomainPtr d, + const char *devAlias, void *data) +{ + return domainEventDeviceRemovedCallback(c, d, devAlias, data); +} +*/ +import "C" diff --git a/vendor/github.com/alexzorin/libvirt-go/constants.go b/vendor/github.com/alexzorin/libvirt-go/constants.go index 0b20109..a9f2ceb 100644 --- a/vendor/github.com/alexzorin/libvirt-go/constants.go +++ b/vendor/github.com/alexzorin/libvirt-go/constants.go @@ -200,3 +200,186 @@ const ( VIR_KEYCODE_SET_WIN32 = C.VIR_KEYCODE_SET_WIN32 VIR_KEYCODE_SET_RFB = C.VIR_KEYCODE_SET_RFB ) + +// virDomainCreateFlags +const ( + VIR_DOMAIN_NONE = C.VIR_DOMAIN_NONE + VIR_DOMAIN_START_PAUSED = C.VIR_DOMAIN_START_PAUSED + VIR_DOMAIN_START_AUTODESTROY = C.VIR_DOMAIN_START_AUTODESTROY + VIR_DOMAIN_START_BYPASS_CACHE = C.VIR_DOMAIN_START_BYPASS_CACHE + VIR_DOMAIN_START_FORCE_BOOT = C.VIR_DOMAIN_START_FORCE_BOOT +) + +const VIR_DOMAIN_MEMORY_PARAM_UNLIMITED = C.VIR_DOMAIN_MEMORY_PARAM_UNLIMITED + +// virDomainEventID +const ( + // event parameter in the callback is of type DomainLifecycleEvent + VIR_DOMAIN_EVENT_ID_LIFECYCLE = C.VIR_DOMAIN_EVENT_ID_LIFECYCLE + + // event parameter in the callback is nil + VIR_DOMAIN_EVENT_ID_REBOOT = C.VIR_DOMAIN_EVENT_ID_REBOOT + + // event parameter in the callback is of type DomainRTCChangeEvent + VIR_DOMAIN_EVENT_ID_RTC_CHANGE = C.VIR_DOMAIN_EVENT_ID_RTC_CHANGE + + // event parameter in the callback is of type DomainWatchdogEvent + VIR_DOMAIN_EVENT_ID_WATCHDOG = C.VIR_DOMAIN_EVENT_ID_WATCHDOG + + // event parameter in the callback is of type DomainIOErrorEvent + VIR_DOMAIN_EVENT_ID_IO_ERROR = C.VIR_DOMAIN_EVENT_ID_IO_ERROR + + // event parameter in the callback is of type DomainGraphicsEvent + VIR_DOMAIN_EVENT_ID_GRAPHICS = C.VIR_DOMAIN_EVENT_ID_GRAPHICS + + // virConnectDomainEventIOErrorReasonCallback + VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON = C.VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON + + // event parameter in the callback is nil + VIR_DOMAIN_EVENT_ID_CONTROL_ERROR = C.VIR_DOMAIN_EVENT_ID_CONTROL_ERROR + + // event parameter in the callback is of type DomainBlockJobEvent + VIR_DOMAIN_EVENT_ID_BLOCK_JOB = C.VIR_DOMAIN_EVENT_ID_BLOCK_JOB + + // event parameter in the callback is of type DomainDiskChangeEvent + VIR_DOMAIN_EVENT_ID_DISK_CHANGE = C.VIR_DOMAIN_EVENT_ID_DISK_CHANGE + + // event parameter in the callback is of type DomainTrayChangeEvent + VIR_DOMAIN_EVENT_ID_TRAY_CHANGE = C.VIR_DOMAIN_EVENT_ID_TRAY_CHANGE + + // event parameter in the callback is of type DomainReasonEvent + VIR_DOMAIN_EVENT_ID_PMWAKEUP = C.VIR_DOMAIN_EVENT_ID_PMWAKEUP + + // event parameter in the callback is of type DomainReasonEvent + VIR_DOMAIN_EVENT_ID_PMSUSPEND = C.VIR_DOMAIN_EVENT_ID_PMSUSPEND + + // event parameter in the callback is of type DomainBalloonChangeEvent + VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE = C.VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE + + // event parameter in the callback is of type DomainReasonEvent + VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK = C.VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK + + // event parameter in the callback is of type DomainDeviceRemovedEvent + VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED = C.VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED + + // TODO Post 1.2.4, enable later + // event parameter in the callback is of type DomainBlockJobEvent + // VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2 = C.VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2 +) + +// virDomainEventType +const ( + VIR_DOMAIN_EVENT_DEFINED = C.VIR_DOMAIN_EVENT_DEFINED + VIR_DOMAIN_EVENT_UNDEFINED = C.VIR_DOMAIN_EVENT_UNDEFINED + VIR_DOMAIN_EVENT_STARTED = C.VIR_DOMAIN_EVENT_STARTED + VIR_DOMAIN_EVENT_SUSPENDED = C.VIR_DOMAIN_EVENT_SUSPENDED + VIR_DOMAIN_EVENT_RESUMED = C.VIR_DOMAIN_EVENT_RESUMED + VIR_DOMAIN_EVENT_STOPPED = C.VIR_DOMAIN_EVENT_STOPPED + VIR_DOMAIN_EVENT_SHUTDOWN = C.VIR_DOMAIN_EVENT_SHUTDOWN + VIR_DOMAIN_EVENT_PMSUSPENDED = C.VIR_DOMAIN_EVENT_PMSUSPENDED + VIR_DOMAIN_EVENT_CRASHED = C.VIR_DOMAIN_EVENT_CRASHED +) + +// virDomainEventWatchdogAction: +// The action that is to be taken due to the watchdog device firing +const ( + // No action, watchdog ignored + VIR_DOMAIN_EVENT_WATCHDOG_NONE = C.VIR_DOMAIN_EVENT_WATCHDOG_NONE + + // Guest CPUs are paused + VIR_DOMAIN_EVENT_WATCHDOG_PAUSE = C.VIR_DOMAIN_EVENT_WATCHDOG_PAUSE + + // Guest CPUs are reset + VIR_DOMAIN_EVENT_WATCHDOG_RESET = C.VIR_DOMAIN_EVENT_WATCHDOG_RESET + + // Guest is forcibly powered off + VIR_DOMAIN_EVENT_WATCHDOG_POWEROFF = C.VIR_DOMAIN_EVENT_WATCHDOG_POWEROFF + + // Guest is requested to gracefully shutdown + VIR_DOMAIN_EVENT_WATCHDOG_SHUTDOWN = C.VIR_DOMAIN_EVENT_WATCHDOG_SHUTDOWN + + // No action, a debug message logged + VIR_DOMAIN_EVENT_WATCHDOG_DEBUG = C.VIR_DOMAIN_EVENT_WATCHDOG_DEBUG +) + +// virDomainEventIOErrorAction +// The action that is to be taken due to an IO error occurring +const ( + // No action, IO error ignored + VIR_DOMAIN_EVENT_IO_ERROR_NONE = C.VIR_DOMAIN_EVENT_IO_ERROR_NONE + + // Guest CPUs are paused + VIR_DOMAIN_EVENT_IO_ERROR_PAUSE = C.VIR_DOMAIN_EVENT_IO_ERROR_PAUSE + + // IO error reported to guest OS + VIR_DOMAIN_EVENT_IO_ERROR_REPORT = C.VIR_DOMAIN_EVENT_IO_ERROR_REPORT +) + +// virDomainEventGraphicsPhase +// The phase of the graphics client connection +const ( + // Initial socket connection established + VIR_DOMAIN_EVENT_GRAPHICS_CONNECT = C.VIR_DOMAIN_EVENT_GRAPHICS_CONNECT + + // Authentication & setup completed + VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZE = C.VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZE + + // Final socket disconnection + VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECT = C.VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECT +) + +// virDomainEventGraphicsAddressType +const ( + // IPv4 address + VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4 = C.VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4 + + // IPv6 address + VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6 = C.VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6 + + // UNIX socket path + VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_UNIX = C.VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_UNIX +) + +// virDomainBlockJobType +const ( + // Placeholder + VIR_DOMAIN_BLOCK_JOB_TYPE_UNKNOWN = C.VIR_DOMAIN_BLOCK_JOB_TYPE_UNKNOWN + + // Block Pull (virDomainBlockPull, or virDomainBlockRebase without + // flags), job ends on completion + VIR_DOMAIN_BLOCK_JOB_TYPE_PULL = C.VIR_DOMAIN_BLOCK_JOB_TYPE_PULL + + // Block Copy (virDomainBlockCopy, or virDomainBlockRebase with + // flags), job exists as long as mirroring is active + VIR_DOMAIN_BLOCK_JOB_TYPE_COPY = C.VIR_DOMAIN_BLOCK_JOB_TYPE_COPY + + // Block Commit (virDomainBlockCommit without flags), job ends on + // completion + VIR_DOMAIN_BLOCK_JOB_TYPE_COMMIT = C.VIR_DOMAIN_BLOCK_JOB_TYPE_COMMIT + + // TODO Post 1.2.4, enable later + // Active Block Commit (virDomainBlockCommit with flags), job + // exists as long as sync is active + // VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT = C.VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT +) + +// virConnectDomainEventBlockJobStatus +const ( + VIR_DOMAIN_BLOCK_JOB_COMPLETED = C.VIR_DOMAIN_BLOCK_JOB_COMPLETED + VIR_DOMAIN_BLOCK_JOB_FAILED = C.VIR_DOMAIN_BLOCK_JOB_FAILED + VIR_DOMAIN_BLOCK_JOB_CANCELED = C.VIR_DOMAIN_BLOCK_JOB_CANCELED + VIR_DOMAIN_BLOCK_JOB_READY = C.VIR_DOMAIN_BLOCK_JOB_READY +) + +// virConnectDomainEventDiskChangeReason +const ( + // OldSrcPath is set + VIR_DOMAIN_EVENT_DISK_CHANGE_MISSING_ON_START = C.VIR_DOMAIN_EVENT_DISK_CHANGE_MISSING_ON_START + VIR_DOMAIN_EVENT_DISK_DROP_MISSING_ON_START = C.VIR_DOMAIN_EVENT_DISK_DROP_MISSING_ON_START +) + +// virConnectDomainEventTrayChangeReason +const ( + VIR_DOMAIN_EVENT_TRAY_CHANGE_OPEN = C.VIR_DOMAIN_EVENT_TRAY_CHANGE_OPEN + VIR_DOMAIN_EVENT_TRAY_CHANGE_CLOSE = C.VIR_DOMAIN_EVENT_TRAY_CHANGE_CLOSE +) diff --git a/vendor/github.com/alexzorin/libvirt-go/domain.go b/vendor/github.com/alexzorin/libvirt-go/domain.go index 7aee532..e13abe1 100644 --- a/vendor/github.com/alexzorin/libvirt-go/domain.go +++ b/vendor/github.com/alexzorin/libvirt-go/domain.go @@ -9,7 +9,6 @@ package libvirt import "C" import ( - "errors" "reflect" "strings" "unsafe" @@ -19,6 +18,10 @@ type VirDomain struct { ptr C.virDomainPtr } +type VirDomainBlockInfo struct { + ptr C.virDomainBlockInfo +} + type VirDomainInfo struct { ptr C.virDomainInfo } @@ -73,7 +76,7 @@ func (dest *VirTypedParameters) loadFromCPtr(params C.virTypedParameterPtr, nPar func (d *VirDomain) Free() error { if result := C.virDomainFree(d.ptr); result != 0 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -81,7 +84,7 @@ func (d *VirDomain) Free() error { func (d *VirDomain) Create() error { result := C.virDomainCreate(d.ptr) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -89,7 +92,7 @@ func (d *VirDomain) Create() error { func (d *VirDomain) Destroy() error { result := C.virDomainDestroy(d.ptr) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -97,7 +100,7 @@ func (d *VirDomain) Destroy() error { func (d *VirDomain) Shutdown() error { result := C.virDomainShutdown(d.ptr) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -105,7 +108,7 @@ func (d *VirDomain) Shutdown() error { func (d *VirDomain) Reboot(flags uint) error { result := C.virDomainReboot(d.ptr, C.uint(flags)) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -113,7 +116,7 @@ func (d *VirDomain) Reboot(flags uint) error { func (d *VirDomain) IsActive() (bool, error) { result := C.virDomainIsActive(d.ptr) if result == -1 { - return false, errors.New(GetLastError()) + return false, GetLastError() } if result == 1 { return true, nil @@ -131,7 +134,7 @@ func (d *VirDomain) SetAutostart(autostart bool) error { } result := C.virDomainSetAutostart(d.ptr, cAutostart) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -140,7 +143,7 @@ func (d *VirDomain) GetAutostart() (bool, error) { var out C.int result := C.virDomainGetAutostart(d.ptr, (*C.int)(unsafe.Pointer(&out))) if result == -1 { - return false, errors.New(GetLastError()) + return false, GetLastError() } switch out { case 1: @@ -150,10 +153,35 @@ func (d *VirDomain) GetAutostart() (bool, error) { } } +func (d *VirDomain) GetBlockInfo(disk string, flag uint) (VirDomainBlockInfo, error) { + bi := VirDomainBlockInfo{} + var ptr C.virDomainBlockInfo + cDisk := C.CString(disk) + defer C.free(unsafe.Pointer(cDisk)) + result := C.virDomainGetBlockInfo(d.ptr, cDisk, (*C.virDomainBlockInfo)(unsafe.Pointer(&ptr)), C.uint(flag)) + if result == -1 { + return bi, GetLastError() + } + bi.ptr = ptr + return bi, nil +} + +func (b *VirDomainBlockInfo) Allocation() uint64 { + return uint64(b.ptr.allocation) +} + +func (b *VirDomainBlockInfo) Capacity() uint64 { + return uint64(b.ptr.capacity) +} + +func (b *VirDomainBlockInfo) Physical() uint64 { + return uint64(b.ptr.physical) +} + func (d *VirDomain) GetName() (string, error) { name := C.virDomainGetName(d.ptr) if name == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } return C.GoString(name), nil } @@ -166,17 +194,25 @@ func (d *VirDomain) GetState() ([]int, error) { (*C.int)(unsafe.Pointer(&cReason)), 0) if int(result) == -1 { - return []int{}, errors.New(GetLastError()) + return []int{}, GetLastError() } return []int{int(cState), int(cReason)}, nil } +func (d *VirDomain) GetID() (uint, error) { + id := uint(C.virDomainGetID(d.ptr)) + if id == ^uint(0) { + return id, GetLastError() + } + return id, nil +} + func (d *VirDomain) GetUUID() ([]byte, error) { var cUuid [C.VIR_UUID_BUFLEN](byte) cuidPtr := unsafe.Pointer(&cUuid) result := C.virDomainGetUUID(d.ptr, (*C.uchar)(cuidPtr)) if result != 0 { - return []byte{}, errors.New(GetLastError()) + return []byte{}, GetLastError() } return C.GoBytes(cuidPtr, C.VIR_UUID_BUFLEN), nil } @@ -186,7 +222,7 @@ func (d *VirDomain) GetUUIDString() (string, error) { cuidPtr := unsafe.Pointer(&cUuid) result := C.virDomainGetUUIDString(d.ptr, (*C.char)(cuidPtr)) if result != 0 { - return "", errors.New(GetLastError()) + return "", GetLastError() } return C.GoString((*C.char)(cuidPtr)), nil } @@ -196,7 +232,7 @@ func (d *VirDomain) GetInfo() (VirDomainInfo, error) { var ptr C.virDomainInfo result := C.virDomainGetInfo(d.ptr, (*C.virDomainInfo)(unsafe.Pointer(&ptr))) if result == -1 { - return di, errors.New(GetLastError()) + return di, GetLastError() } di.ptr = ptr return di, nil @@ -205,7 +241,7 @@ func (d *VirDomain) GetInfo() (VirDomainInfo, error) { func (d *VirDomain) GetXMLDesc(flags uint32) (string, error) { result := C.virDomainGetXMLDesc(d.ptr, C.uint(flags)) if result == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } xml := C.GoString(result) C.free(unsafe.Pointer(result)) @@ -248,7 +284,7 @@ func (d *VirDomain) GetCPUStats(params *VirTypedParameters, nParams int, startCp result := int(C.virDomainGetCPUStats(d.ptr, (C.virTypedParameterPtr)(cParams), C.uint(nParams), C.int(startCpu), C.uint(nCpus), C.uint(flags))) if result == -1 { - return result, errors.New(GetLastError()) + return result, GetLastError() } if cParamsLen > 0 { @@ -271,7 +307,7 @@ func (d *VirDomain) GetInterfaceParameters(device string, params *VirTypedParame result := int(C.virDomainGetInterfaceParameters(d.ptr, C.CString(device), (C.virTypedParameterPtr)(cParams), (*C.int)(unsafe.Pointer(nParams)), C.uint(flags))) if result == -1 { - return result, errors.New(GetLastError()) + return result, GetLastError() } if params != nil && *nParams > 0 { @@ -290,7 +326,7 @@ func (d *VirDomain) GetMetadata(tipus int, uri string, flags uint32) (string, er result := C.virDomainGetMetadata(d.ptr, C.int(tipus), cUri, C.uint(flags)) if result == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } defer C.free(unsafe.Pointer(result)) @@ -313,7 +349,7 @@ func (d *VirDomain) SetMetadata(metaDataType int, metaDataCont, uriKey, uri stri } result := C.virDomainSetMetadata(d.ptr, C.int(metaDataType), cMetaDataCont, cUriKey, cUri, C.uint(flags)) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -321,7 +357,7 @@ func (d *VirDomain) SetMetadata(metaDataType int, metaDataCont, uriKey, uri stri func (d *VirDomain) Undefine() error { result := C.virDomainUndefine(d.ptr) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -329,7 +365,7 @@ func (d *VirDomain) Undefine() error { func (d *VirDomain) SetMaxMemory(memory uint) error { result := C.virDomainSetMaxMemory(d.ptr, C.ulong(memory)) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -337,7 +373,7 @@ func (d *VirDomain) SetMaxMemory(memory uint) error { func (d *VirDomain) SetMemory(memory uint64) error { result := C.virDomainSetMemory(d.ptr, C.ulong(memory)) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -345,7 +381,7 @@ func (d *VirDomain) SetMemory(memory uint64) error { func (d *VirDomain) SetMemoryFlags(memory uint64, flags uint32) error { result := C.virDomainSetMemoryFlags(d.ptr, C.ulong(memory), C.uint(flags)) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -353,7 +389,7 @@ func (d *VirDomain) SetMemoryFlags(memory uint64, flags uint32) error { func (d *VirDomain) SetMemoryStatsPeriod(period int, flags uint) error { result := C.virDomainSetMemoryStatsPeriod(d.ptr, C.int(period), C.uint(flags)) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -361,7 +397,7 @@ func (d *VirDomain) SetMemoryStatsPeriod(period int, flags uint) error { func (d *VirDomain) SetVcpus(vcpu uint) error { result := C.virDomainSetVcpus(d.ptr, C.uint(vcpu)) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -369,7 +405,7 @@ func (d *VirDomain) SetVcpus(vcpu uint) error { func (d *VirDomain) SetVcpusFlags(vcpu uint, flags uint) error { result := C.virDomainSetVcpusFlags(d.ptr, C.uint(vcpu), C.uint(flags)) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -377,7 +413,7 @@ func (d *VirDomain) SetVcpusFlags(vcpu uint, flags uint) error { func (d *VirDomain) Suspend() error { result := C.virDomainSuspend(d.ptr) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -385,7 +421,7 @@ func (d *VirDomain) Suspend() error { func (d *VirDomain) Resume() error { result := C.virDomainResume(d.ptr) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -393,7 +429,7 @@ func (d *VirDomain) Resume() error { func (d *VirDomain) AbortJob() error { result := C.virDomainAbortJob(d.ptr) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -401,7 +437,7 @@ func (d *VirDomain) AbortJob() error { func (d *VirDomain) DestroyFlags(flags uint) error { result := C.virDomainDestroyFlags(d.ptr, C.uint(flags)) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -409,7 +445,7 @@ func (d *VirDomain) DestroyFlags(flags uint) error { func (d *VirDomain) ShutdownFlags(flags uint) error { result := C.virDomainShutdownFlags(d.ptr, C.uint(flags)) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -419,7 +455,7 @@ func (d *VirDomain) AttachDevice(xml string) error { defer C.free(unsafe.Pointer(cXml)) result := C.virDomainAttachDevice(d.ptr, cXml) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -429,7 +465,7 @@ func (d *VirDomain) AttachDeviceFlags(xml string, flags uint) error { defer C.free(unsafe.Pointer(cXml)) result := C.virDomainAttachDeviceFlags(d.ptr, cXml, C.uint(flags)) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -439,7 +475,7 @@ func (d *VirDomain) DetachDevice(xml string) error { defer C.free(unsafe.Pointer(cXml)) result := C.virDomainDetachDevice(d.ptr, cXml) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -449,7 +485,7 @@ func (d *VirDomain) DetachDeviceFlags(xml string, flags uint) error { defer C.free(unsafe.Pointer(cXml)) result := C.virDomainDetachDeviceFlags(d.ptr, cXml, C.uint(flags)) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -457,7 +493,7 @@ func (d *VirDomain) DetachDeviceFlags(xml string, flags uint) error { func (d *VirDomain) Screenshot(stream *VirStream, screen, flags uint) (string, error) { cType := C.virDomainScreenshot(d.ptr, stream.ptr, C.uint(screen), C.uint(flags)) if cType == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } defer C.free(unsafe.Pointer(cType)) @@ -468,7 +504,7 @@ func (d *VirDomain) Screenshot(stream *VirStream, screen, flags uint) (string, e func (d *VirDomain) SendKey(codeset, holdtime uint, keycodes []uint, flags uint) error { result := C.virDomainSendKey(d.ptr, C.uint(codeset), C.uint(holdtime), (*C.uint)(unsafe.Pointer(&keycodes[0])), C.int(len(keycodes)), C.uint(flags)) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil @@ -490,7 +526,7 @@ func (d *VirDomain) BlockStatsFlags(disk string, params *VirTypedParameters, nPa result := int(C.virDomainBlockStatsFlags(d.ptr, cDisk, (C.virTypedParameterPtr)(cParams), &cParamsLen, C.uint(flags))) if result == -1 { - return result, errors.New(GetLastError()) + return result, GetLastError() } if cParamsLen > 0 && params != nil { @@ -499,3 +535,40 @@ func (d *VirDomain) BlockStatsFlags(disk string, params *VirTypedParameters, nPa return int(cParamsLen), nil } + +type VirDomainInterfaceStats struct { + RxBytes int64 + RxPackets int64 + RxErrs int64 + RxDrop int64 + TxBytes int64 + TxPackets int64 + TxErrs int64 + TxDrop int64 +} + +func (d *VirDomain) InterfaceStats(path string) (VirDomainInterfaceStats, error) { + cPath := C.CString(path) + defer C.free(unsafe.Pointer(cPath)) + + size := C.size_t(unsafe.Sizeof(C.struct__virDomainInterfaceStats{})) + + cStats := (C.virDomainInterfaceStatsPtr)(C.malloc(size)) + defer C.free(unsafe.Pointer(cStats)) + + result := C.virDomainInterfaceStats(d.ptr, cPath, (C.virDomainInterfaceStatsPtr)(cStats), size) + + if result != 0 { + return VirDomainInterfaceStats{}, GetLastError() + } + return VirDomainInterfaceStats{ + RxBytes: int64(cStats.rx_bytes), + RxPackets: int64(cStats.rx_packets), + RxErrs: int64(cStats.rx_errs), + RxDrop: int64(cStats.rx_drop), + TxBytes: int64(cStats.tx_bytes), + TxPackets: int64(cStats.tx_packets), + TxErrs: int64(cStats.tx_errs), + TxDrop: int64(cStats.tx_drop), + }, nil +} diff --git a/vendor/github.com/alexzorin/libvirt-go/domain_test.go b/vendor/github.com/alexzorin/libvirt-go/domain_test.go index 4cb149f..368abee 100644 --- a/vendor/github.com/alexzorin/libvirt-go/domain_test.go +++ b/vendor/github.com/alexzorin/libvirt-go/domain_test.go @@ -76,6 +76,25 @@ func TestGetDomainState(t *testing.T) { } } +func TestGetDomainID(t *testing.T) { + dom, conn := buildTestDomain() + defer func() { + dom.Free() + conn.CloseConnection() + }() + + if err := dom.Create(); err != nil { + t.Error("Failed to create domain") + } + + if id, err := dom.GetID(); id == ^uint(0) || err != nil { + dom.Destroy() + t.Error("Couldn't get domain ID") + return + } + dom.Destroy() +} + func TestGetDomainUUID(t *testing.T) { dom, conn := buildTestDomain() defer func() { diff --git a/vendor/github.com/alexzorin/libvirt-go/error.go b/vendor/github.com/alexzorin/libvirt-go/error.go new file mode 100644 index 0000000..810cd25 --- /dev/null +++ b/vendor/github.com/alexzorin/libvirt-go/error.go @@ -0,0 +1,504 @@ +package libvirt + +/* +#cgo LDFLAGS: -lvirt -ldl +#include +#include +#include + +#ifndef VIR_FROM_BHYVE +#define VIR_FROM_BHYVE 57 +#endif + +#ifndef VIR_FROM_CRYPTO +#define VIR_FROM_CRYPTO 58 +#endif + +#ifndef VIR_FROM_FIREWALL +#define VIR_FROM_FIREWALL 59 +#endif + +*/ +import "C" + +import "fmt" + +// virErrorLevel +const ( + VIR_ERR_NONE = C.VIR_ERR_NONE + VIR_ERR_WARNING = C.VIR_ERR_WARNING + VIR_ERR_ERROR = C.VIR_ERR_ERROR +) + +// virErrorNumber +const ( + VIR_ERR_OK = C.VIR_ERR_OK + + // internal error + VIR_ERR_INTERNAL_ERROR = C.VIR_ERR_INTERNAL_ERROR + + // memory allocation failure + VIR_ERR_NO_MEMORY = C.VIR_ERR_NO_MEMORY + + // no support for this function + VIR_ERR_NO_SUPPORT = C.VIR_ERR_NO_SUPPORT + + // could not resolve hostname + VIR_ERR_UNKNOWN_HOST = C.VIR_ERR_UNKNOWN_HOST + + // can't connect to hypervisor + VIR_ERR_NO_CONNECT = C.VIR_ERR_NO_CONNECT + + // invalid connection object + VIR_ERR_INVALID_CONN = C.VIR_ERR_INVALID_CONN + + // invalid domain object + VIR_ERR_INVALID_DOMAIN = C.VIR_ERR_INVALID_DOMAIN + + // invalid function argument + VIR_ERR_INVALID_ARG = C.VIR_ERR_INVALID_ARG + + // a command to hypervisor failed + VIR_ERR_OPERATION_FAILED = C.VIR_ERR_OPERATION_FAILED + + // a HTTP GET command to failed + VIR_ERR_GET_FAILED = C.VIR_ERR_GET_FAILED + + // a HTTP POST command to failed + VIR_ERR_POST_FAILED = C.VIR_ERR_POST_FAILED + + // unexpected HTTP error code + VIR_ERR_HTTP_ERROR = C.VIR_ERR_HTTP_ERROR + + // failure to serialize an S-Expr + VIR_ERR_SEXPR_SERIAL = C.VIR_ERR_SEXPR_SERIAL + + // could not open Xen hypervisor control + VIR_ERR_NO_XEN = C.VIR_ERR_NO_XEN + + // failure doing an hypervisor call + VIR_ERR_XEN_CALL = C.VIR_ERR_XEN_CALL + + // unknown OS type + VIR_ERR_OS_TYPE = C.VIR_ERR_OS_TYPE + + // missing kernel information + VIR_ERR_NO_KERNEL = C.VIR_ERR_NO_KERNEL + + // missing root device information + VIR_ERR_NO_ROOT = C.VIR_ERR_NO_ROOT + + // missing source device information + VIR_ERR_NO_SOURCE = C.VIR_ERR_NO_SOURCE + + // missing target device information + VIR_ERR_NO_TARGET = C.VIR_ERR_NO_TARGET + + // missing domain name information + VIR_ERR_NO_NAME = C.VIR_ERR_NO_NAME + + // missing domain OS information + VIR_ERR_NO_OS = C.VIR_ERR_NO_OS + + // missing domain devices information + VIR_ERR_NO_DEVICE = C.VIR_ERR_NO_DEVICE + + // could not open Xen Store control + VIR_ERR_NO_XENSTORE = C.VIR_ERR_NO_XENSTORE + + // too many drivers registered + VIR_ERR_DRIVER_FULL = C.VIR_ERR_DRIVER_FULL + + // not supported by the drivers (DEPRECATED) + VIR_ERR_CALL_FAILED = C.VIR_ERR_CALL_FAILED + + // an XML description is not well formed or broken + VIR_ERR_XML_ERROR = C.VIR_ERR_XML_ERROR + + // the domain already exist + VIR_ERR_DOM_EXIST = C.VIR_ERR_DOM_EXIST + + // operation forbidden on read-only connections + VIR_ERR_OPERATION_DENIED = C.VIR_ERR_OPERATION_DENIED + + // failed to open a conf file + VIR_ERR_OPEN_FAILED = C.VIR_ERR_OPEN_FAILED + + // failed to read a conf file + VIR_ERR_READ_FAILED = C.VIR_ERR_READ_FAILED + + // failed to parse a conf file + VIR_ERR_PARSE_FAILED = C.VIR_ERR_PARSE_FAILED + + // failed to parse the syntax of a conf file + VIR_ERR_CONF_SYNTAX = C.VIR_ERR_CONF_SYNTAX + + // failed to write a conf file + VIR_ERR_WRITE_FAILED = C.VIR_ERR_WRITE_FAILED + + // detail of an XML error + VIR_ERR_XML_DETAIL = C.VIR_ERR_XML_DETAIL + + // invalid network object + VIR_ERR_INVALID_NETWORK = C.VIR_ERR_INVALID_NETWORK + + // the network already exist + VIR_ERR_NETWORK_EXIST = C.VIR_ERR_NETWORK_EXIST + + // general system call failure + VIR_ERR_SYSTEM_ERROR = C.VIR_ERR_SYSTEM_ERROR + + // some sort of RPC error + VIR_ERR_RPC = C.VIR_ERR_RPC + + // error from a GNUTLS call + VIR_ERR_GNUTLS_ERROR = C.VIR_ERR_GNUTLS_ERROR + + // failed to start network + VIR_WAR_NO_NETWORK = C.VIR_WAR_NO_NETWORK + + // domain not found or unexpectedly disappeared + VIR_ERR_NO_DOMAIN = C.VIR_ERR_NO_DOMAIN + + // network not found + VIR_ERR_NO_NETWORK = C.VIR_ERR_NO_NETWORK + + // invalid MAC address + VIR_ERR_INVALID_MAC = C.VIR_ERR_INVALID_MAC + + // authentication failed + VIR_ERR_AUTH_FAILED = C.VIR_ERR_AUTH_FAILED + + // invalid storage pool object + VIR_ERR_INVALID_STORAGE_POOL = C.VIR_ERR_INVALID_STORAGE_POOL + + // invalid storage vol object + VIR_ERR_INVALID_STORAGE_VOL = C.VIR_ERR_INVALID_STORAGE_VOL + + // failed to start storage + VIR_WAR_NO_STORAGE = C.VIR_WAR_NO_STORAGE + + // storage pool not found + VIR_ERR_NO_STORAGE_POOL = C.VIR_ERR_NO_STORAGE_POOL + + // storage volume not found + VIR_ERR_NO_STORAGE_VOL = C.VIR_ERR_NO_STORAGE_VOL + + // failed to start node driver + VIR_WAR_NO_NODE = C.VIR_WAR_NO_NODE + + // invalid node device object + VIR_ERR_INVALID_NODE_DEVICE = C.VIR_ERR_INVALID_NODE_DEVICE + + // node device not found + VIR_ERR_NO_NODE_DEVICE = C.VIR_ERR_NO_NODE_DEVICE + + // security model not found + VIR_ERR_NO_SECURITY_MODEL = C.VIR_ERR_NO_SECURITY_MODEL + + // operation is not applicable at this time + VIR_ERR_OPERATION_INVALID = C.VIR_ERR_OPERATION_INVALID + + // failed to start interface driver + VIR_WAR_NO_INTERFACE = C.VIR_WAR_NO_INTERFACE + + // interface driver not running + VIR_ERR_NO_INTERFACE = C.VIR_ERR_NO_INTERFACE + + // invalid interface object + VIR_ERR_INVALID_INTERFACE = C.VIR_ERR_INVALID_INTERFACE + + // more than one matching interface found + VIR_ERR_MULTIPLE_INTERFACES = C.VIR_ERR_MULTIPLE_INTERFACES + + // failed to start nwfilter driver + VIR_WAR_NO_NWFILTER = C.VIR_WAR_NO_NWFILTER + + // invalid nwfilter object + VIR_ERR_INVALID_NWFILTER = C.VIR_ERR_INVALID_NWFILTER + + // nw filter pool not found + VIR_ERR_NO_NWFILTER = C.VIR_ERR_NO_NWFILTER + + // nw filter pool not found + VIR_ERR_BUILD_FIREWALL = C.VIR_ERR_BUILD_FIREWALL + + // failed to start secret storage + VIR_WAR_NO_SECRET = C.VIR_WAR_NO_SECRET + + // invalid secret + VIR_ERR_INVALID_SECRET = C.VIR_ERR_INVALID_SECRET + + // secret not found + VIR_ERR_NO_SECRET = C.VIR_ERR_NO_SECRET + + // unsupported configuration construct + VIR_ERR_CONFIG_UNSUPPORTED = C.VIR_ERR_CONFIG_UNSUPPORTED + + // timeout occurred during operation + VIR_ERR_OPERATION_TIMEOUT = C.VIR_ERR_OPERATION_TIMEOUT + + // a migration worked, but making the VM persist on the dest host failed + VIR_ERR_MIGRATE_PERSIST_FAILED = C.VIR_ERR_MIGRATE_PERSIST_FAILED + + // a synchronous hook script failed + VIR_ERR_HOOK_SCRIPT_FAILED = C.VIR_ERR_HOOK_SCRIPT_FAILED + + // invalid domain snapshot + VIR_ERR_INVALID_DOMAIN_SNAPSHOT = C.VIR_ERR_INVALID_DOMAIN_SNAPSHOT + + // domain snapshot not found + VIR_ERR_NO_DOMAIN_SNAPSHOT = C.VIR_ERR_NO_DOMAIN_SNAPSHOT + + // stream pointer not valid + VIR_ERR_INVALID_STREAM = C.VIR_ERR_INVALID_STREAM + + // valid API use but unsupported by the given driver + VIR_ERR_ARGUMENT_UNSUPPORTED = C.VIR_ERR_ARGUMENT_UNSUPPORTED + + // storage pool probe failed + VIR_ERR_STORAGE_PROBE_FAILED = C.VIR_ERR_STORAGE_PROBE_FAILED + + // storage pool already built + VIR_ERR_STORAGE_POOL_BUILT = C.VIR_ERR_STORAGE_POOL_BUILT + + // force was not requested for a risky domain snapshot revert + VIR_ERR_SNAPSHOT_REVERT_RISKY = C.VIR_ERR_SNAPSHOT_REVERT_RISKY + + // operation on a domain was canceled/aborted by user + VIR_ERR_OPERATION_ABORTED = C.VIR_ERR_OPERATION_ABORTED + + // authentication cancelled + VIR_ERR_AUTH_CANCELLED = C.VIR_ERR_AUTH_CANCELLED + + // The metadata is not present + VIR_ERR_NO_DOMAIN_METADATA = C.VIR_ERR_NO_DOMAIN_METADATA + + // Migration is not safe + VIR_ERR_MIGRATE_UNSAFE = C.VIR_ERR_MIGRATE_UNSAFE + + // integer overflow + VIR_ERR_OVERFLOW = C.VIR_ERR_OVERFLOW + + // action prevented by block copy job + VIR_ERR_BLOCK_COPY_ACTIVE = C.VIR_ERR_BLOCK_COPY_ACTIVE + + // The requested operation is not supported + VIR_ERR_OPERATION_UNSUPPORTED = C.VIR_ERR_OPERATION_UNSUPPORTED + + // error in ssh transport driver + VIR_ERR_SSH = C.VIR_ERR_SSH + + // guest agent is unresponsive, not running or not usable + VIR_ERR_AGENT_UNRESPONSIVE = C.VIR_ERR_AGENT_UNRESPONSIVE + + // resource is already in use + VIR_ERR_RESOURCE_BUSY = C.VIR_ERR_RESOURCE_BUSY + + // operation on the object/resource was denied + VIR_ERR_ACCESS_DENIED = C.VIR_ERR_ACCESS_DENIED + + // error from a dbus service + VIR_ERR_DBUS_SERVICE = C.VIR_ERR_DBUS_SERVICE + + // the storage vol already exists + VIR_ERR_STORAGE_VOL_EXIST = C.VIR_ERR_STORAGE_VOL_EXIST + + // given CPU is incompatible with host CPU + // added in libvirt 1.2.6 + // VIR_ERR_CPU_INCOMPATIBLE = C.VIR_ERR_CPU_INCOMPATIBLE +) + +// virErrorDomain +const ( + VIR_FROM_NONE = C.VIR_FROM_NONE + + // Error at Xen hypervisor layer + VIR_FROM_XEN = C.VIR_FROM_XEN + + // Error at connection with xend daemon + VIR_FROM_XEND = C.VIR_FROM_XEND + + // Error at connection with xen store + VIR_FROM_XENSTORE = C.VIR_FROM_XENSTORE + + // Error in the S-Expression code + VIR_FROM_SEXPR = C.VIR_FROM_SEXPR + + // Error in the XML code + VIR_FROM_XML = C.VIR_FROM_XML + + // Error when operating on a domain + VIR_FROM_DOM = C.VIR_FROM_DOM + + // Error in the XML-RPC code + VIR_FROM_RPC = C.VIR_FROM_RPC + + // Error in the proxy code; unused since 0.8.6 + VIR_FROM_PROXY = C.VIR_FROM_PROXY + + // Error in the configuration file handling + VIR_FROM_CONF = C.VIR_FROM_CONF + + // Error at the QEMU daemon + VIR_FROM_QEMU = C.VIR_FROM_QEMU + + // Error when operating on a network + VIR_FROM_NET = C.VIR_FROM_NET + + // Error from test driver + VIR_FROM_TEST = C.VIR_FROM_TEST + + // Error from remote driver + VIR_FROM_REMOTE = C.VIR_FROM_REMOTE + + // Error from OpenVZ driver + VIR_FROM_OPENVZ = C.VIR_FROM_OPENVZ + + // Error at Xen XM layer + VIR_FROM_XENXM = C.VIR_FROM_XENXM + + // Error in the Linux Stats code + VIR_FROM_STATS_LINUX = C.VIR_FROM_STATS_LINUX + + // Error from Linux Container driver + VIR_FROM_LXC = C.VIR_FROM_LXC + + // Error from storage driver + VIR_FROM_STORAGE = C.VIR_FROM_STORAGE + + // Error from network config + VIR_FROM_NETWORK = C.VIR_FROM_NETWORK + + // Error from domain config + VIR_FROM_DOMAIN = C.VIR_FROM_DOMAIN + + // Error at the UML driver + VIR_FROM_UML = C.VIR_FROM_UML + + // Error from node device monitor + VIR_FROM_NODEDEV = C.VIR_FROM_NODEDEV + + // Error from xen inotify layer + VIR_FROM_XEN_INOTIFY = C.VIR_FROM_XEN_INOTIFY + + // Error from security framework + VIR_FROM_SECURITY = C.VIR_FROM_SECURITY + + // Error from VirtualBox driver + VIR_FROM_VBOX = C.VIR_FROM_VBOX + + // Error when operating on an interface + VIR_FROM_INTERFACE = C.VIR_FROM_INTERFACE + + // The OpenNebula driver no longer exists. Retained for ABI/API compat only + VIR_FROM_ONE = C.VIR_FROM_ONE + + // Error from ESX driver + VIR_FROM_ESX = C.VIR_FROM_ESX + + // Error from IBM power hypervisor + VIR_FROM_PHYP = C.VIR_FROM_PHYP + + // Error from secret storage + VIR_FROM_SECRET = C.VIR_FROM_SECRET + + // Error from CPU driver + VIR_FROM_CPU = C.VIR_FROM_CPU + + // Error from XenAPI + VIR_FROM_XENAPI = C.VIR_FROM_XENAPI + + // Error from network filter driver + VIR_FROM_NWFILTER = C.VIR_FROM_NWFILTER + + // Error from Synchronous hooks + VIR_FROM_HOOK = C.VIR_FROM_HOOK + + // Error from domain snapshot + VIR_FROM_DOMAIN_SNAPSHOT = C.VIR_FROM_DOMAIN_SNAPSHOT + + // Error from auditing subsystem + VIR_FROM_AUDIT = C.VIR_FROM_AUDIT + + // Error from sysinfo/SMBIOS + VIR_FROM_SYSINFO = C.VIR_FROM_SYSINFO + + // Error from I/O streams + VIR_FROM_STREAMS = C.VIR_FROM_STREAMS + + // Error from VMware driver + VIR_FROM_VMWARE = C.VIR_FROM_VMWARE + + // Error from event loop impl + VIR_FROM_EVENT = C.VIR_FROM_EVENT + + // Error from libxenlight driver + VIR_FROM_LIBXL = C.VIR_FROM_LIBXL + + // Error from lock manager + VIR_FROM_LOCKING = C.VIR_FROM_LOCKING + + // Error from Hyper-V driver + VIR_FROM_HYPERV = C.VIR_FROM_HYPERV + + // Error from capabilities + VIR_FROM_CAPABILITIES = C.VIR_FROM_CAPABILITIES + + // Error from URI handling + VIR_FROM_URI = C.VIR_FROM_URI + + // Error from auth handling + VIR_FROM_AUTH = C.VIR_FROM_AUTH + + // Error from DBus + VIR_FROM_DBUS = C.VIR_FROM_DBUS + + // Error from Parallels + VIR_FROM_PARALLELS = C.VIR_FROM_PARALLELS + + // Error from Device + VIR_FROM_DEVICE = C.VIR_FROM_DEVICE + + // Error from libssh2 connection transport + VIR_FROM_SSH = C.VIR_FROM_SSH + + // Error from lockspace + VIR_FROM_LOCKSPACE = C.VIR_FROM_LOCKSPACE + + // Error from initctl device communication + VIR_FROM_INITCTL = C.VIR_FROM_INITCTL + + // Error from identity code + VIR_FROM_IDENTITY = C.VIR_FROM_IDENTITY + + // Error from cgroups + VIR_FROM_CGROUP = C.VIR_FROM_CGROUP + + // Error from access control manager + VIR_FROM_ACCESS = C.VIR_FROM_ACCESS + + // Error from systemd code + VIR_FROM_SYSTEMD = C.VIR_FROM_SYSTEMD + + // Error from bhyve driver + VIR_FROM_BHYVE = C.VIR_FROM_BHYVE + + // Error from crypto code + VIR_FROM_CRYPTO = C.VIR_FROM_CRYPTO + + // Error from firewall + VIR_FROM_FIREWALL = C.VIR_FROM_FIREWALL +) + +type VirError struct { + Code int + Domain int + Message string + Level int +} + +func (err VirError) Error() string { + return fmt.Sprintf("[Code-%d] [Domain-%d] %s", + err.Code, err.Domain, err.Message) +} diff --git a/vendor/github.com/alexzorin/libvirt-go/events.go b/vendor/github.com/alexzorin/libvirt-go/events.go new file mode 100644 index 0000000..04f94f1 --- /dev/null +++ b/vendor/github.com/alexzorin/libvirt-go/events.go @@ -0,0 +1,321 @@ +package libvirt + +import ( + "unsafe" +) + +/* +#cgo LDFLAGS: -lvirt -ldl +#include +*/ +import "C" + +type DomainLifecycleEvent struct { + Event int + Detail int +} + +type DomainRTCChangeEvent struct { + Utcoffset int64 +} + +type DomainWatchdogEvent struct { + Action int +} + +type DomainIOErrorEvent struct { + SrcPath string + DevAlias string + Action int +} + +type DomainEventGraphicsAddress struct { + Family int + Node string + Service string +} + +type DomainEventGraphicsSubjectIdentity struct { + Type string + Name string +} + +type DomainGraphicsEvent struct { + Phase int + Local DomainEventGraphicsAddress + Remote DomainEventGraphicsAddress + AuthScheme string + Subject []DomainEventGraphicsSubjectIdentity +} + +type DomainIOErrorReasonEvent struct { + DomainIOErrorEvent + Reason string +} + +type DomainBlockJobEvent struct { + Disk string + Type int + Status int +} + +type DomainDiskChangeEvent struct { + OldSrcPath string + NewSrcPath string + DevAlias string + Reason int +} + +type DomainTrayChangeEvent struct { + DevAlias string + Reason int +} + +type DomainReasonEvent struct { + Reason int +} + +type DomainBalloonChangeEvent struct { + Actual uint64 +} + +type DomainDeviceRemovedEvent struct { + DevAlias string +} + +//export domainEventLifecycleCallback +func domainEventLifecycleCallback(c C.virConnectPtr, d C.virDomainPtr, + event int, detail int, + opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + eventDetails := DomainLifecycleEvent{ + Event: event, + Detail: detail, + } + + return (*context.cb)(&connection, &domain, eventDetails, context.f) +} + +//export domainEventGenericCallback +func domainEventGenericCallback(c C.virConnectPtr, d C.virDomainPtr, + opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + return (*context.cb)(&connection, &domain, nil, context.f) +} + +//export domainEventRTCChangeCallback +func domainEventRTCChangeCallback(c C.virConnectPtr, d C.virDomainPtr, + utcoffset int64, opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + eventDetails := DomainRTCChangeEvent{ + Utcoffset: utcoffset, + } + + return (*context.cb)(&connection, &domain, eventDetails, context.f) +} + +//export domainEventWatchdogCallback +func domainEventWatchdogCallback(c C.virConnectPtr, d C.virDomainPtr, + action int, opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + eventDetails := DomainWatchdogEvent{ + Action: action, + } + + return (*context.cb)(&connection, &domain, eventDetails, context.f) +} + +//export domainEventIOErrorCallback +func domainEventIOErrorCallback(c C.virConnectPtr, d C.virDomainPtr, + srcPath string, devAlias string, action int, opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + eventDetails := DomainIOErrorEvent{ + SrcPath: srcPath, + DevAlias: devAlias, + Action: action, + } + + return (*context.cb)(&connection, &domain, eventDetails, context.f) +} + +//export domainEventGraphicsCallback +func domainEventGraphicsCallback(c C.virConnectPtr, d C.virDomainPtr, + phase int, + local C.virDomainEventGraphicsAddressPtr, + remote C.virDomainEventGraphicsAddressPtr, + authScheme string, + subject C.virDomainEventGraphicsSubjectPtr, + opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + subjectGo := make([]DomainEventGraphicsSubjectIdentity, subject.nidentity) + nidentities := int(subject.nidentity) + identities := (*[1 << 30]C.virDomainEventGraphicsSubjectIdentity)(unsafe.Pointer(&subject.identities))[:nidentities:nidentities] + for _, identity := range identities { + subjectGo = append(subjectGo, + DomainEventGraphicsSubjectIdentity{ + Type: C.GoString(identity._type), + Name: C.GoString(identity.name), + }, + ) + } + + eventDetails := DomainGraphicsEvent{ + Phase: phase, + Local: DomainEventGraphicsAddress{ + Family: int(local.family), + Node: C.GoString(local.node), + Service: C.GoString(local.service), + }, + Remote: DomainEventGraphicsAddress{ + Family: int(remote.family), + Node: C.GoString(remote.node), + Service: C.GoString(remote.service), + }, + AuthScheme: authScheme, + Subject: subjectGo, + } + + return (*context.cb)(&connection, &domain, eventDetails, context.f) +} + +//export domainEventIOErrorReasonCallback +func domainEventIOErrorReasonCallback(c C.virConnectPtr, d C.virDomainPtr, + srcPath string, devAlias string, action int, reason string, + opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + eventDetails := DomainIOErrorReasonEvent{ + DomainIOErrorEvent: DomainIOErrorEvent{ + SrcPath: srcPath, + DevAlias: devAlias, + Action: action, + }, + Reason: reason, + } + + return (*context.cb)(&connection, &domain, eventDetails, context.f) +} + +//export domainEventBlockJobCallback +func domainEventBlockJobCallback(c C.virConnectPtr, d C.virDomainPtr, + disk string, _type int, status int, opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + eventDetails := DomainBlockJobEvent{ + Disk: disk, + Type: _type, + Status: status, + } + + return (*context.cb)(&connection, &domain, eventDetails, context.f) +} + +//export domainEventDiskChangeCallback +func domainEventDiskChangeCallback(c C.virConnectPtr, d C.virDomainPtr, + oldSrcPath string, newSrcPath string, devAlias string, + reason int, opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + eventDetails := DomainDiskChangeEvent{ + OldSrcPath: oldSrcPath, + NewSrcPath: newSrcPath, + DevAlias: devAlias, + Reason: reason, + } + + return (*context.cb)(&connection, &domain, eventDetails, context.f) +} + +//export domainEventTrayChangeCallback +func domainEventTrayChangeCallback(c C.virConnectPtr, d C.virDomainPtr, + devAlias string, reason int, opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + eventDetails := DomainTrayChangeEvent{ + DevAlias: devAlias, + Reason: reason, + } + + return (*context.cb)(&connection, &domain, eventDetails, context.f) +} + +//export domainEventReasonCallback +func domainEventReasonCallback(c C.virConnectPtr, d C.virDomainPtr, + reason int, opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + eventDetails := DomainReasonEvent{ + Reason: reason, + } + + return (*context.cb)(&connection, &domain, eventDetails, context.f) +} + +//export domainEventBalloonChangeCallback +func domainEventBalloonChangeCallback(c C.virConnectPtr, d C.virDomainPtr, + actual uint64, opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + eventDetails := DomainBalloonChangeEvent{ + Actual: actual, + } + + return (*context.cb)(&connection, &domain, eventDetails, context.f) +} + +//export domainEventDeviceRemovedCallback +func domainEventDeviceRemovedCallback(c C.virConnectPtr, d C.virDomainPtr, + devAlias string, opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + eventDetails := DomainDeviceRemovedEvent{ + DevAlias: devAlias, + } + + return (*context.cb)(&connection, &domain, eventDetails, context.f) +} diff --git a/vendor/github.com/alexzorin/libvirt-go/integration_test.go b/vendor/github.com/alexzorin/libvirt-go/integration_test.go index 0ce3120..0ec6eb8 100644 --- a/vendor/github.com/alexzorin/libvirt-go/integration_test.go +++ b/vendor/github.com/alexzorin/libvirt-go/integration_test.go @@ -822,3 +822,141 @@ func TestIntegrationDomainBlockStatsFlags(t *testing.T) { t.Fatal(err) } } + +func TestIntegrationDomainInterfaceStats(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Fatal(err) + } + defer conn.CloseConnection() + + dom, err := defineTestLxcDomain(conn, "") + if err != nil { + t.Fatal(err) + } + defer func() { + dom.Undefine() + dom.Free() + }() + const nwXml = ` + + + + ` + if err := dom.AttachDeviceFlags(nwXml, VIR_DOMAIN_DEVICE_MODIFY_CONFIG); err != nil { + t.Fatal(err) + } + + if err := dom.Create(); err != nil { + t.Fatal(err) + } + + if _, err := dom.InterfaceStats("vnet0"); err != nil { + t.Error(err) + } + + if err := dom.Destroy(); err != nil { + t.Fatal(err) + } + + if err := dom.DetachDeviceFlags(nwXml, VIR_DOMAIN_DEVICE_MODIFY_CONFIG); err != nil { + t.Fatal(err) + } +} + +func TestStorageVolUploadDownload(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + + poolPath, err := ioutil.TempDir("", "default-pool-test-1") + if err != nil { + t.Error(err) + return + } + defer os.RemoveAll(poolPath) + pool, err := conn.StoragePoolDefineXML(` + default-pool-test-1 + + `+poolPath+` + + `, 0) + defer func() { + pool.Undefine() + pool.Free() + }() + if err := pool.Create(0); err != nil { + t.Error(err) + return + } + defer pool.Destroy() + vol, err := pool.StorageVolCreateXML(testStorageVolXML("", poolPath), 0) + if err != nil { + t.Error(err) + return + } + defer func() { + vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) + vol.Free() + }() + + data := []byte{1, 2, 3, 4, 5, 6} + + // write above data to the vol + // 1. create a stream + stream, err := NewVirStream(&conn, 0) + if err != nil { + t.Fatal(err) + } + defer func() { + stream.Free() + }() + + // 2. set it up to upload from stream + if err := vol.Upload(stream, 0, uint64(len(data)), 0); err != nil { + stream.Abort() + t.Fatal(err) + } + + // 3. do the actual writing + if n, err := stream.Write(data); err != nil || n != len(data) { + t.Fatal(err, n) + } + + // 4. finish! + if err := stream.Close(); err != nil { + t.Fatal(err) + } + + // read back the data + // 1. create a stream + downStream, err := NewVirStream(&conn, 0) + if err != nil { + t.Fatal(err) + } + defer func() { + downStream.Free() + }() + + // 2. set it up to download from stream + if err := vol.Download(downStream, 0, uint64(len(data)), 0); err != nil { + downStream.Abort() + t.Fatal(err) + } + + // 3. do the actual reading + buf := make([]byte, 1024) + if n, err := downStream.Read(buf); err != nil || n != len(data) { + t.Fatal(err, n) + } + + t.Logf("read back: %#v", buf[:len(data)]) + + // 4. finish! + if err := downStream.Close(); err != nil { + t.Fatal(err) + } +} diff --git a/vendor/github.com/alexzorin/libvirt-go/interface.go b/vendor/github.com/alexzorin/libvirt-go/interface.go index e0b4c23..eeb9605 100644 --- a/vendor/github.com/alexzorin/libvirt-go/interface.go +++ b/vendor/github.com/alexzorin/libvirt-go/interface.go @@ -9,7 +9,6 @@ package libvirt import "C" import ( - "errors" "unsafe" ) @@ -20,7 +19,7 @@ type VirInterface struct { func (n *VirInterface) Create(flags uint32) error { result := C.virInterfaceCreate(n.ptr, C.uint(flags)) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -28,7 +27,7 @@ func (n *VirInterface) Create(flags uint32) error { func (n *VirInterface) Destroy(flags uint32) error { result := C.virInterfaceDestroy(n.ptr, C.uint(flags)) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -36,7 +35,7 @@ func (n *VirInterface) Destroy(flags uint32) error { func (n *VirInterface) IsActive() (bool, error) { result := C.virInterfaceIsActive(n.ptr) if result == -1 { - return false, errors.New(GetLastError()) + return false, GetLastError() } if result == 1 { return true, nil @@ -47,7 +46,7 @@ func (n *VirInterface) IsActive() (bool, error) { func (n *VirInterface) GetMACString() (string, error) { result := C.virInterfaceGetMACString(n.ptr) if result == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } mac := C.GoString(result) return mac, nil @@ -56,7 +55,7 @@ func (n *VirInterface) GetMACString() (string, error) { func (n *VirInterface) GetName() (string, error) { result := C.virInterfaceGetName(n.ptr) if result == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } name := C.GoString(result) return name, nil @@ -65,7 +64,7 @@ func (n *VirInterface) GetName() (string, error) { func (n *VirInterface) GetXMLDesc(flags uint32) (string, error) { result := C.virInterfaceGetXMLDesc(n.ptr, C.uint(flags)) if result == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } xml := C.GoString(result) C.free(unsafe.Pointer(result)) @@ -75,14 +74,14 @@ func (n *VirInterface) GetXMLDesc(flags uint32) (string, error) { func (n *VirInterface) Undefine() error { result := C.virInterfaceUndefine(n.ptr) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } func (n *VirInterface) Free() error { if result := C.virInterfaceFree(n.ptr); result != 0 { - return errors.New(GetLastError()) + return GetLastError() } return nil } diff --git a/vendor/github.com/alexzorin/libvirt-go/libvirt.go b/vendor/github.com/alexzorin/libvirt-go/libvirt.go index e0fe674..a607010 100644 --- a/vendor/github.com/alexzorin/libvirt-go/libvirt.go +++ b/vendor/github.com/alexzorin/libvirt-go/libvirt.go @@ -1,8 +1,6 @@ package libvirt import ( - "errors" - "fmt" "io/ioutil" "reflect" "unsafe" @@ -13,47 +11,109 @@ import ( #include #include #include + +void virErrorFuncDummy(void *userData, virErrorPtr error); + +int domainEventLifecycleCallback_cgo(virConnectPtr c, virDomainPtr d, + int event, int detail, void* data); + +int domainEventGenericCallback_cgo(virConnectPtr c, virDomainPtr d, void* data); + +int domainEventRTCChangeCallback_cgo(virConnectPtr c, virDomainPtr d, + long long utcoffset, void* data); + +int domainEventWatchdogCallback_cgo(virConnectPtr c, virDomainPtr d, + int action, void* data); + +int domainEventIOErrorCallback_cgo(virConnectPtr c, virDomainPtr d, + const char *srcPath, const char *devAlias, + int action, void* data); + +int domainEventGraphicsCallback_cgo(virConnectPtr c, virDomainPtr d, + int phase, const virDomainEventGraphicsAddress *local, + const virDomainEventGraphicsAddress *remote, + const char *authScheme, + const virDomainEventGraphicsSubject *subject, void* data); + +int domainEventIOErrorReasonCallback_cgo(virConnectPtr c, virDomainPtr d, + const char *srcPath, const char *devAlias, + int action, const char *reason, void* data); + +int domainEventBlockJobCallback_cgo(virConnectPtr c, virDomainPtr d, + const char *disk, int type, int status, void* data); + +int domainEventDiskChangeCallback_cgo(virConnectPtr c, virDomainPtr d, + const char *oldSrcPath, const char *newSrcPath, + const char *devAlias, int reason, void* data); + +int domainEventTrayChangeCallback_cgo(virConnectPtr c, virDomainPtr d, + const char *devAlias, int reason, void* data); + +int domainEventReasonCallback_cgo(virConnectPtr c, virDomainPtr d, + int reason, void* data); + +int domainEventBalloonChangeCallback_cgo(virConnectPtr c, virDomainPtr d, + unsigned long long actual, void* data); + +int domainEventDeviceRemovedCallback_cgo(virConnectPtr c, virDomainPtr d, + const char *devAlias, void* data); */ import "C" +func init() { + // libvirt won't print to stderr + C.virSetErrorFunc(nil, C.virErrorFunc(unsafe.Pointer(C.virErrorFuncDummy))) +} + type VirConnection struct { ptr C.virConnectPtr } func NewVirConnection(uri string) (VirConnection, error) { - cUri := C.CString(uri) - defer C.free(unsafe.Pointer(cUri)) + var cUri *C.char + if uri != "" { + cUri = C.CString(uri) + defer C.free(unsafe.Pointer(cUri)) + } ptr := C.virConnectOpen(cUri) if ptr == nil { - return VirConnection{}, errors.New(GetLastError()) + return VirConnection{}, GetLastError() } obj := VirConnection{ptr: ptr} return obj, nil } func NewVirConnectionReadOnly(uri string) (VirConnection, error) { - cUri := C.CString(uri) - defer C.free(unsafe.Pointer(cUri)) + var cUri *C.char + if uri != "" { + cUri = C.CString(uri) + defer C.free(unsafe.Pointer(cUri)) + } ptr := C.virConnectOpenReadOnly(cUri) if ptr == nil { - return VirConnection{}, errors.New(GetLastError()) + return VirConnection{}, GetLastError() } obj := VirConnection{ptr: ptr} return obj, nil } -func GetLastError() string { +func GetLastError() VirError { + var virErr VirError err := C.virGetLastError() - errMsg := fmt.Sprintf("[Code-%d] [Domain-%d] %s", - err.code, err.domain, C.GoString(err.message)) + + virErr.Code = int(err.code) + virErr.Domain = int(err.domain) + virErr.Message = C.GoString(err.message) + virErr.Level = int(err.level) + C.virResetError(err) - return errMsg + return virErr } func (c *VirConnection) CloseConnection() (int, error) { result := int(C.virConnectClose(c.ptr)) if result == -1 { - return result, errors.New(GetLastError()) + return result, GetLastError() } return result, nil } @@ -73,7 +133,7 @@ func (c *VirConnection) UnrefAndCloseConnection() error { func (c *VirConnection) GetCapabilities() (string, error) { str := C.virConnectGetCapabilities(c.ptr) if str == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } capabilities := C.GoString(str) C.free(unsafe.Pointer(str)) @@ -85,7 +145,7 @@ func (c *VirConnection) GetNodeInfo() (VirNodeInfo, error) { var ptr C.virNodeInfo result := C.virNodeGetInfo(c.ptr, (*C.virNodeInfo)(unsafe.Pointer(&ptr))) if result == -1 { - return ni, errors.New(GetLastError()) + return ni, GetLastError() } ni.ptr = ptr return ni, nil @@ -94,17 +154,25 @@ func (c *VirConnection) GetNodeInfo() (VirNodeInfo, error) { func (c *VirConnection) GetHostname() (string, error) { str := C.virConnectGetHostname(c.ptr) if str == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } hostname := C.GoString(str) C.free(unsafe.Pointer(str)) return hostname, nil } +func (c *VirConnection) GetLibVersion() (uint32, error) { + var version C.ulong + if err := C.virConnectGetLibVersion(c.ptr, &version); err < 0 { + return 0, GetLastError() + } + return uint32(version), nil +} + func (c *VirConnection) GetType() (string, error) { str := C.virConnectGetType(c.ptr) if str == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } hypDriver := C.GoString(str) return hypDriver, nil @@ -113,7 +181,7 @@ func (c *VirConnection) GetType() (string, error) { func (c *VirConnection) IsAlive() (bool, error) { result := C.virConnectIsAlive(c.ptr) if result == -1 { - return false, errors.New(GetLastError()) + return false, GetLastError() } if result == 1 { return true, nil @@ -124,7 +192,7 @@ func (c *VirConnection) IsAlive() (bool, error) { func (c *VirConnection) IsEncrypted() (bool, error) { result := C.virConnectIsEncrypted(c.ptr) if result == -1 { - return false, errors.New(GetLastError()) + return false, GetLastError() } if result == 1 { return true, nil @@ -135,7 +203,7 @@ func (c *VirConnection) IsEncrypted() (bool, error) { func (c *VirConnection) IsSecure() (bool, error) { result := C.virConnectIsSecure(c.ptr) if result == -1 { - return false, errors.New(GetLastError()) + return false, GetLastError() } if result == 1 { return true, nil @@ -151,7 +219,7 @@ func (c *VirConnection) ListDefinedDomains() ([]string, error) { (**C.char)(namesPtr), 1024) if numDomains == -1 { - return nil, errors.New(GetLastError()) + return nil, GetLastError() } goNames := make([]string, numDomains) for k := 0; k < int(numDomains); k++ { @@ -166,7 +234,7 @@ func (c *VirConnection) ListDomains() ([]uint32, error) { cDomainsPointer := unsafe.Pointer(&cDomainsIds) numDomains := C.virConnectListDomains(c.ptr, (*C.int)(cDomainsPointer), 512) if numDomains == -1 { - return nil, errors.New(GetLastError()) + return nil, GetLastError() } return cDomainsIds[:numDomains], nil @@ -181,7 +249,7 @@ func (c *VirConnection) ListInterfaces() ([]string, error) { (**C.char)(namesPtr), maxIfaces) if numIfaces == -1 { - return nil, errors.New(GetLastError()) + return nil, GetLastError() } goNames := make([]string, numIfaces) for k := 0; k < int(numIfaces); k++ { @@ -200,7 +268,7 @@ func (c *VirConnection) ListNetworks() ([]string, error) { (**C.char)(namesPtr), maxNets) if numNetworks == -1 { - return nil, errors.New(GetLastError()) + return nil, GetLastError() } goNames := make([]string, numNetworks) for k := 0; k < int(numNetworks); k++ { @@ -219,7 +287,7 @@ func (c *VirConnection) ListStoragePools() ([]string, error) { (**C.char)(namesPtr), maxPools) if numStoragePools == -1 { - return nil, errors.New(GetLastError()) + return nil, GetLastError() } goNames := make([]string, numStoragePools) for k := 0; k < int(numStoragePools); k++ { @@ -232,7 +300,7 @@ func (c *VirConnection) ListStoragePools() ([]string, error) { func (c *VirConnection) LookupDomainById(id uint32) (VirDomain, error) { ptr := C.virDomainLookupByID(c.ptr, C.int(id)) if ptr == nil { - return VirDomain{}, errors.New(GetLastError()) + return VirDomain{}, GetLastError() } return VirDomain{ptr: ptr}, nil } @@ -242,7 +310,25 @@ func (c *VirConnection) LookupDomainByName(id string) (VirDomain, error) { defer C.free(unsafe.Pointer(cName)) ptr := C.virDomainLookupByName(c.ptr, cName) if ptr == nil { - return VirDomain{}, errors.New(GetLastError()) + return VirDomain{}, GetLastError() + } + return VirDomain{ptr: ptr}, nil +} + +func (c *VirConnection) DomainCreateXMLFromFile(xmlFile string, flags uint32) (VirDomain, error) { + xmlConfig, err := ioutil.ReadFile(xmlFile) + if err != nil { + return VirDomain{}, err + } + return c.DomainCreateXML(string(xmlConfig), flags) +} + +func (c *VirConnection) DomainCreateXML(xmlConfig string, flags uint32) (VirDomain, error) { + cXml := C.CString(string(xmlConfig)) + defer C.free(unsafe.Pointer(cXml)) + ptr := C.virDomainCreateXML(c.ptr, cXml, C.uint(flags)) + if ptr == nil { + return VirDomain{}, GetLastError() } return VirDomain{ptr: ptr}, nil } @@ -260,7 +346,7 @@ func (c *VirConnection) DomainDefineXML(xmlConfig string) (VirDomain, error) { defer C.free(unsafe.Pointer(cXml)) ptr := C.virDomainDefineXML(c.ptr, cXml) if ptr == nil { - return VirDomain{}, errors.New(GetLastError()) + return VirDomain{}, GetLastError() } return VirDomain{ptr: ptr}, nil } @@ -274,7 +360,7 @@ func (c *VirConnection) ListDefinedInterfaces() ([]string, error) { (**C.char)(namesPtr), maxIfaces) if numIfaces == -1 { - return nil, errors.New(GetLastError()) + return nil, GetLastError() } goNames := make([]string, numIfaces) for k := 0; k < int(numIfaces); k++ { @@ -293,7 +379,7 @@ func (c *VirConnection) ListDefinedNetworks() ([]string, error) { (**C.char)(namesPtr), maxNets) if numNetworks == -1 { - return nil, errors.New(GetLastError()) + return nil, GetLastError() } goNames := make([]string, numNetworks) for k := 0; k < int(numNetworks); k++ { @@ -312,7 +398,7 @@ func (c *VirConnection) ListDefinedStoragePools() ([]string, error) { (**C.char)(namesPtr), maxPools) if numStoragePools == -1 { - return nil, errors.New(GetLastError()) + return nil, GetLastError() } goNames := make([]string, numStoragePools) for k := 0; k < int(numStoragePools); k++ { @@ -325,7 +411,7 @@ func (c *VirConnection) ListDefinedStoragePools() ([]string, error) { func (c *VirConnection) NumOfDefinedInterfaces() (int, error) { result := int(C.virConnectNumOfDefinedInterfaces(c.ptr)) if result == -1 { - return 0, errors.New(GetLastError()) + return 0, GetLastError() } return result, nil } @@ -333,7 +419,7 @@ func (c *VirConnection) NumOfDefinedInterfaces() (int, error) { func (c *VirConnection) NumOfDefinedNetworks() (int, error) { result := int(C.virConnectNumOfDefinedNetworks(c.ptr)) if result == -1 { - return 0, errors.New(GetLastError()) + return 0, GetLastError() } return result, nil } @@ -341,7 +427,7 @@ func (c *VirConnection) NumOfDefinedNetworks() (int, error) { func (c *VirConnection) NumOfDefinedStoragePools() (int, error) { result := int(C.virConnectNumOfDefinedStoragePools(c.ptr)) if result == -1 { - return 0, errors.New(GetLastError()) + return 0, GetLastError() } return result, nil } @@ -349,7 +435,7 @@ func (c *VirConnection) NumOfDefinedStoragePools() (int, error) { func (c *VirConnection) NumOfDomains() (int, error) { result := int(C.virConnectNumOfDomains(c.ptr)) if result == -1 { - return 0, errors.New(GetLastError()) + return 0, GetLastError() } return result, nil } @@ -357,7 +443,7 @@ func (c *VirConnection) NumOfDomains() (int, error) { func (c *VirConnection) NumOfInterfaces() (int, error) { result := int(C.virConnectNumOfInterfaces(c.ptr)) if result == -1 { - return 0, errors.New(GetLastError()) + return 0, GetLastError() } return result, nil } @@ -365,7 +451,7 @@ func (c *VirConnection) NumOfInterfaces() (int, error) { func (c *VirConnection) NumOfNetworks() (int, error) { result := int(C.virConnectNumOfNetworks(c.ptr)) if result == -1 { - return 0, errors.New(GetLastError()) + return 0, GetLastError() } return result, nil } @@ -373,7 +459,7 @@ func (c *VirConnection) NumOfNetworks() (int, error) { func (c *VirConnection) NumOfNWFilters() (int, error) { result := int(C.virConnectNumOfNWFilters(c.ptr)) if result == -1 { - return 0, errors.New(GetLastError()) + return 0, GetLastError() } return result, nil } @@ -381,7 +467,7 @@ func (c *VirConnection) NumOfNWFilters() (int, error) { func (c *VirConnection) NumOfSecrets() (int, error) { result := int(C.virConnectNumOfSecrets(c.ptr)) if result == -1 { - return 0, errors.New(GetLastError()) + return 0, GetLastError() } return result, nil } @@ -399,7 +485,7 @@ func (c *VirConnection) NetworkDefineXML(xmlConfig string) (VirNetwork, error) { defer C.free(unsafe.Pointer(cXml)) ptr := C.virNetworkDefineXML(c.ptr, cXml) if ptr == nil { - return VirNetwork{}, errors.New(GetLastError()) + return VirNetwork{}, GetLastError() } return VirNetwork{ptr: ptr}, nil } @@ -409,7 +495,7 @@ func (c *VirConnection) LookupNetworkByName(name string) (VirNetwork, error) { defer C.free(unsafe.Pointer(cName)) ptr := C.virNetworkLookupByName(c.ptr, cName) if ptr == nil { - return VirNetwork{}, errors.New(GetLastError()) + return VirNetwork{}, GetLastError() } return VirNetwork{ptr: ptr}, nil } @@ -417,7 +503,7 @@ func (c *VirConnection) LookupNetworkByName(name string) (VirNetwork, error) { func (c *VirConnection) GetSysinfo(flags uint) (string, error) { cStr := C.virConnectGetSysinfo(c.ptr, C.uint(flags)) if cStr == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } info := C.GoString(cStr) C.free(unsafe.Pointer(cStr)) @@ -427,7 +513,7 @@ func (c *VirConnection) GetSysinfo(flags uint) (string, error) { func (c *VirConnection) GetURI() (string, error) { cStr := C.virConnectGetURI(c.ptr) if cStr == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } uri := C.GoString(cStr) C.free(unsafe.Pointer(cStr)) @@ -442,7 +528,7 @@ func (c *VirConnection) GetMaxVcpus(typeAttr string) (int, error) { } result := int(C.virConnectGetMaxVcpus(c.ptr, cTypeAttr)) if result == -1 { - return 0, errors.New(GetLastError()) + return 0, GetLastError() } return result, nil } @@ -460,7 +546,7 @@ func (c *VirConnection) InterfaceDefineXML(xmlConfig string, flags uint32) (VirI defer C.free(unsafe.Pointer(cXml)) ptr := C.virInterfaceDefineXML(c.ptr, cXml, C.uint(flags)) if ptr == nil { - return VirInterface{}, errors.New(GetLastError()) + return VirInterface{}, GetLastError() } return VirInterface{ptr: ptr}, nil } @@ -470,7 +556,7 @@ func (c *VirConnection) LookupInterfaceByName(name string) (VirInterface, error) defer C.free(unsafe.Pointer(cName)) ptr := C.virInterfaceLookupByName(c.ptr, cName) if ptr == nil { - return VirInterface{}, errors.New(GetLastError()) + return VirInterface{}, GetLastError() } return VirInterface{ptr: ptr}, nil } @@ -480,7 +566,7 @@ func (c *VirConnection) LookupInterfaceByMACString(mac string) (VirInterface, er defer C.free(unsafe.Pointer(cName)) ptr := C.virInterfaceLookupByMACString(c.ptr, cName) if ptr == nil { - return VirInterface{}, errors.New(GetLastError()) + return VirInterface{}, GetLastError() } return VirInterface{ptr: ptr}, nil } @@ -498,7 +584,7 @@ func (c *VirConnection) StoragePoolDefineXML(xmlConfig string, flags uint32) (Vi defer C.free(unsafe.Pointer(cXml)) ptr := C.virStoragePoolDefineXML(c.ptr, cXml, C.uint(flags)) if ptr == nil { - return VirStoragePool{}, errors.New(GetLastError()) + return VirStoragePool{}, GetLastError() } return VirStoragePool{ptr: ptr}, nil } @@ -508,7 +594,7 @@ func (c *VirConnection) LookupStoragePoolByName(name string) (VirStoragePool, er defer C.free(unsafe.Pointer(cName)) ptr := C.virStoragePoolLookupByName(c.ptr, cName) if ptr == nil { - return VirStoragePool{}, errors.New(GetLastError()) + return VirStoragePool{}, GetLastError() } return VirStoragePool{ptr: ptr}, nil } @@ -518,7 +604,7 @@ func (c *VirConnection) LookupStoragePoolByUUIDString(uuid string) (VirStoragePo defer C.free(unsafe.Pointer(cUuid)) ptr := C.virStoragePoolLookupByUUIDString(c.ptr, cUuid) if ptr == nil { - return VirStoragePool{}, errors.New(GetLastError()) + return VirStoragePool{}, GetLastError() } return VirStoragePool{ptr: ptr}, nil } @@ -536,7 +622,7 @@ func (c *VirConnection) NWFilterDefineXML(xmlConfig string) (VirNWFilter, error) defer C.free(unsafe.Pointer(cXml)) ptr := C.virNWFilterDefineXML(c.ptr, cXml) if ptr == nil { - return VirNWFilter{}, errors.New(GetLastError()) + return VirNWFilter{}, GetLastError() } return VirNWFilter{ptr: ptr}, nil } @@ -546,7 +632,7 @@ func (c *VirConnection) LookupNWFilterByName(name string) (VirNWFilter, error) { defer C.free(unsafe.Pointer(cName)) ptr := C.virNWFilterLookupByName(c.ptr, cName) if ptr == nil { - return VirNWFilter{}, errors.New(GetLastError()) + return VirNWFilter{}, GetLastError() } return VirNWFilter{ptr: ptr}, nil } @@ -556,7 +642,7 @@ func (c *VirConnection) LookupNWFilterByUUIDString(uuid string) (VirNWFilter, er defer C.free(unsafe.Pointer(cUuid)) ptr := C.virNWFilterLookupByUUIDString(c.ptr, cUuid) if ptr == nil { - return VirNWFilter{}, errors.New(GetLastError()) + return VirNWFilter{}, GetLastError() } return VirNWFilter{ptr: ptr}, nil } @@ -566,7 +652,7 @@ func (c *VirConnection) LookupStorageVolByKey(key string) (VirStorageVol, error) defer C.free(unsafe.Pointer(cKey)) ptr := C.virStorageVolLookupByKey(c.ptr, cKey) if ptr == nil { - return VirStorageVol{}, errors.New(GetLastError()) + return VirStorageVol{}, GetLastError() } return VirStorageVol{ptr: ptr}, nil } @@ -576,7 +662,7 @@ func (c *VirConnection) LookupStorageVolByPath(path string) (VirStorageVol, erro defer C.free(unsafe.Pointer(cPath)) ptr := C.virStorageVolLookupByPath(c.ptr, cPath) if ptr == nil { - return VirStorageVol{}, errors.New(GetLastError()) + return VirStorageVol{}, GetLastError() } return VirStorageVol{ptr: ptr}, nil } @@ -594,7 +680,7 @@ func (c *VirConnection) SecretDefineXML(xmlConfig string, flags uint32) (VirSecr defer C.free(unsafe.Pointer(cXml)) ptr := C.virSecretDefineXML(c.ptr, cXml, C.uint(flags)) if ptr == nil { - return VirSecret{}, errors.New(GetLastError()) + return VirSecret{}, GetLastError() } return VirSecret{ptr: ptr}, nil } @@ -604,7 +690,7 @@ func (c *VirConnection) LookupSecretByUUIDString(uuid string) (VirSecret, error) defer C.free(unsafe.Pointer(cUuid)) ptr := C.virSecretLookupByUUIDString(c.ptr, cUuid) if ptr == nil { - return VirSecret{}, errors.New(GetLastError()) + return VirSecret{}, GetLastError() } return VirSecret{ptr: ptr}, nil } @@ -614,7 +700,7 @@ func (c *VirConnection) LookupSecretByUsage(usageType int, usageID string) (VirS defer C.free(unsafe.Pointer(cUsageID)) ptr := C.virSecretLookupByUsage(c.ptr, C.int(usageType), cUsageID) if ptr == nil { - return VirSecret{}, errors.New(GetLastError()) + return VirSecret{}, GetLastError() } return VirSecret{ptr: ptr}, nil } @@ -623,7 +709,7 @@ func (c *VirConnection) ListAllInterfaces(flags uint32) ([]VirInterface, error) var cList *C.virInterfacePtr numIfaces := C.virConnectListAllInterfaces(c.ptr, (**C.virInterfacePtr)(&cList), C.uint(flags)) if numIfaces == -1 { - return nil, errors.New(GetLastError()) + return nil, GetLastError() } hdr := reflect.SliceHeader{ Data: uintptr(unsafe.Pointer(cList)), @@ -643,7 +729,7 @@ func (c *VirConnection) ListAllNetworks(flags uint32) ([]VirNetwork, error) { var cList *C.virNetworkPtr numNets := C.virConnectListAllNetworks(c.ptr, (**C.virNetworkPtr)(&cList), C.uint(flags)) if numNets == -1 { - return nil, errors.New(GetLastError()) + return nil, GetLastError() } hdr := reflect.SliceHeader{ Data: uintptr(unsafe.Pointer(cList)), @@ -663,7 +749,7 @@ func (c *VirConnection) ListAllDomains(flags uint32) ([]VirDomain, error) { var cList *C.virDomainPtr numDomains := C.virConnectListAllDomains(c.ptr, (**C.virDomainPtr)(&cList), C.uint(flags)) if numDomains == -1 { - return nil, errors.New(GetLastError()) + return nil, GetLastError() } hdr := reflect.SliceHeader{ Data: uintptr(unsafe.Pointer(cList)), @@ -683,7 +769,7 @@ func (c *VirConnection) ListAllNWFilters(flags uint32) ([]VirNWFilter, error) { var cList *C.virNWFilterPtr numNWFilters := C.virConnectListAllNWFilters(c.ptr, (**C.virNWFilterPtr)(&cList), C.uint(flags)) if numNWFilters == -1 { - return nil, errors.New(GetLastError()) + return nil, GetLastError() } hdr := reflect.SliceHeader{ Data: uintptr(unsafe.Pointer(cList)), @@ -703,7 +789,7 @@ func (c *VirConnection) ListAllStoragePools(flags uint32) ([]VirStoragePool, err var cList *C.virStoragePoolPtr numPools := C.virConnectListAllStoragePools(c.ptr, (**C.virStoragePoolPtr)(&cList), C.uint(flags)) if numPools == -1 { - return nil, errors.New(GetLastError()) + return nil, GetLastError() } hdr := reflect.SliceHeader{ Data: uintptr(unsafe.Pointer(cList)), @@ -718,3 +804,75 @@ func (c *VirConnection) ListAllStoragePools(flags uint32) ([]VirStoragePool, err C.free(unsafe.Pointer(cList)) return pools, nil } + +type DomainEventCallback func(c *VirConnection, d *VirDomain, + event interface{}, f func()) int + +type domainCallbackContext struct { + cb *DomainEventCallback + f func() +} + +func (c *VirConnection) DomainEventRegister(dom VirDomain, + eventId int, + callback *DomainEventCallback, + opaque func()) int { + var callbackPtr unsafe.Pointer + context := domainCallbackContext{ + cb: callback, + f: opaque, + } + + switch eventId { + case VIR_DOMAIN_EVENT_ID_LIFECYCLE: + callbackPtr = unsafe.Pointer(C.domainEventLifecycleCallback_cgo) + case VIR_DOMAIN_EVENT_ID_REBOOT: + case VIR_DOMAIN_EVENT_ID_CONTROL_ERROR: + callbackPtr = unsafe.Pointer(C.domainEventGenericCallback_cgo) + case VIR_DOMAIN_EVENT_ID_RTC_CHANGE: + callbackPtr = unsafe.Pointer(C.domainEventRTCChangeCallback_cgo) + case VIR_DOMAIN_EVENT_ID_WATCHDOG: + callbackPtr = unsafe.Pointer(C.domainEventWatchdogCallback_cgo) + case VIR_DOMAIN_EVENT_ID_IO_ERROR: + callbackPtr = unsafe.Pointer(C.domainEventIOErrorCallback_cgo) + case VIR_DOMAIN_EVENT_ID_GRAPHICS: + callbackPtr = unsafe.Pointer(C.domainEventGraphicsCallback_cgo) + case VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON: + callbackPtr = unsafe.Pointer(C.domainEventIOErrorReasonCallback_cgo) + case VIR_DOMAIN_EVENT_ID_BLOCK_JOB: + // TODO Post 1.2.4, uncomment later + // case VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2: + callbackPtr = unsafe.Pointer(C.domainEventBlockJobCallback_cgo) + case VIR_DOMAIN_EVENT_ID_DISK_CHANGE: + callbackPtr = unsafe.Pointer(C.domainEventDiskChangeCallback_cgo) + case VIR_DOMAIN_EVENT_ID_TRAY_CHANGE: + callbackPtr = unsafe.Pointer(C.domainEventTrayChangeCallback_cgo) + case VIR_DOMAIN_EVENT_ID_PMWAKEUP: + case VIR_DOMAIN_EVENT_ID_PMSUSPEND: + case VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK: + callbackPtr = unsafe.Pointer(C.domainEventReasonCallback_cgo) + case VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE: + callbackPtr = unsafe.Pointer(C.domainEventBalloonChangeCallback_cgo) + case VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED: + callbackPtr = unsafe.Pointer(C.domainEventDeviceRemovedCallback_cgo) + default: + } + ret := C.virConnectDomainEventRegisterAny(c.ptr, dom.ptr, C.VIR_DOMAIN_EVENT_ID_LIFECYCLE, + C.virConnectDomainEventGenericCallback(callbackPtr), + unsafe.Pointer(&context), + nil) + return int(ret) +} + +func (c *VirConnection) DomainEventDeregister(callbackId int) int { + // Deregister the callback + return int(C.virConnectDomainEventDeregisterAny(c.ptr, C.int(callbackId))) +} + +func EventRegisterDefaultImpl() int { + return int(C.virEventRegisterDefaultImpl()) +} + +func EventRunDefaultImpl() int { + return int(C.virEventRunDefaultImpl()) +} diff --git a/vendor/github.com/alexzorin/libvirt-go/libvirt_test.go b/vendor/github.com/alexzorin/libvirt-go/libvirt_test.go index 7d4c9d3..ca2ada2 100644 --- a/vendor/github.com/alexzorin/libvirt-go/libvirt_test.go +++ b/vendor/github.com/alexzorin/libvirt-go/libvirt_test.go @@ -146,6 +146,20 @@ func TestHostname(t *testing.T) { } } +func TestLibVersion(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + version, err := conn.GetLibVersion() + if err != nil { + t.Error(err) + return + } + if version == 0 { + t.Error("Version was 0") + return + } +} + func TestListDefinedDomains(t *testing.T) { conn := buildTestConnection() defer conn.CloseConnection() @@ -256,6 +270,54 @@ func TestLookupInvalidDomainByName(t *testing.T) { } } +func TestDomainCreateXML(t *testing.T) { + conn := buildTestConnection() + nodom := VirDomain{} + defer conn.CloseConnection() + // Test a minimally valid xml + defName := time.Now().String() + xml := ` + ` + defName + ` + 8192 + + hvm + + ` + dom, err := conn.DomainCreateXML(xml, VIR_DOMAIN_NONE) + if err != nil { + t.Error(err) + return + } + defer func() { + if dom != nodom { + dom.Destroy() + dom.Free() + } + }() + name, err := dom.GetName() + if err != nil { + t.Error(err) + return + } + if name != defName { + t.Fatalf("Name was not '%s': %s", defName, name) + return + } + + // Destroy the domain: it should not be persistent + if err := dom.Destroy(); err != nil { + t.Error(err) + return + } + dom = nodom + + testeddom, err := conn.LookupDomainByName(defName) + if testeddom != nodom { + t.Fatal("Created domain is persisting") + return + } +} + func TestDomainDefineXML(t *testing.T) { conn := buildTestConnection() defer conn.CloseConnection() @@ -730,3 +792,82 @@ func TestListAllStoragePools(t *testing.T) { t.Fatalf("storage pool %s not found", testStoragePool) } } + +func TestDomainEventRegister(t *testing.T) { + + callbackId := -1 + + conn := buildTestConnection() + defer func() { + if callbackId >= 0 { + conn.DomainEventDeregister(callbackId) + } + conn.CloseConnection() + }() + + nodom := VirDomain{} + defName := time.Now().String() + + nbEvents := 0 + + callback := DomainEventCallback( + func(c *VirConnection, d *VirDomain, eventDetails interface{}, f func()) int { + if lifecycleEvent, ok := eventDetails.(DomainLifecycleEvent); ok { + if lifecycleEvent.Event == VIR_DOMAIN_EVENT_STARTED { + domName, _ := d.GetName() + if defName != domName { + t.Fatalf("Name was not '%s': %s", defName, domName) + } + } + } else { + t.Fatalf("event details isn't DomainLifecycleEvent") + } + f() + return 0 + }, + ) + + EventRegisterDefaultImpl() + + callbackId = conn.DomainEventRegister( + VirDomain{}, + VIR_DOMAIN_EVENT_ID_LIFECYCLE, + &callback, + func() { + nbEvents++ + }, + ) + + // Test a minimally valid xml + xml := ` + ` + defName + ` + 8192 + + hvm + + ` + dom, err := conn.DomainCreateXML(xml, VIR_DOMAIN_NONE) + if err != nil { + t.Error(err) + return + } + + // This is blocking as long as there is no message + EventRunDefaultImpl() + if nbEvents == 0 { + t.Fatal("At least one event was expected") + } + + defer func() { + if dom != nodom { + dom.Destroy() + dom.Free() + } + }() + + // Deregister the event + if ret := conn.DomainEventDeregister(callbackId); ret < 0 { + t.Fatal("Event deregistration failed") + } + callbackId = -1 // Don't deregister twice +} diff --git a/vendor/github.com/alexzorin/libvirt-go/network.go b/vendor/github.com/alexzorin/libvirt-go/network.go index ff6a5a1..87b6b0a 100644 --- a/vendor/github.com/alexzorin/libvirt-go/network.go +++ b/vendor/github.com/alexzorin/libvirt-go/network.go @@ -9,7 +9,6 @@ package libvirt import "C" import ( - "errors" "unsafe" ) @@ -19,7 +18,7 @@ type VirNetwork struct { func (n *VirNetwork) Free() error { if result := C.virNetworkFree(n.ptr); result != 0 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -27,7 +26,7 @@ func (n *VirNetwork) Free() error { func (n *VirNetwork) Create() error { result := C.virNetworkCreate(n.ptr) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -35,7 +34,7 @@ func (n *VirNetwork) Create() error { func (n *VirNetwork) Destroy() error { result := C.virNetworkDestroy(n.ptr) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -43,7 +42,7 @@ func (n *VirNetwork) Destroy() error { func (n *VirNetwork) IsActive() (bool, error) { result := C.virNetworkIsActive(n.ptr) if result == -1 { - return false, errors.New(GetLastError()) + return false, GetLastError() } if result == 1 { return true, nil @@ -54,7 +53,7 @@ func (n *VirNetwork) IsActive() (bool, error) { func (n *VirNetwork) IsPersistent() (bool, error) { result := C.virNetworkIsPersistent(n.ptr) if result == -1 { - return false, errors.New(GetLastError()) + return false, GetLastError() } if result == 1 { return true, nil @@ -66,7 +65,7 @@ func (n *VirNetwork) GetAutostart() (bool, error) { var out C.int result := C.virNetworkGetAutostart(n.ptr, (*C.int)(unsafe.Pointer(&out))) if result == -1 { - return false, errors.New(GetLastError()) + return false, GetLastError() } switch out { case 1: @@ -86,7 +85,7 @@ func (n *VirNetwork) SetAutostart(autostart bool) error { } result := C.virNetworkSetAutostart(n.ptr, cAutostart) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -94,7 +93,7 @@ func (n *VirNetwork) SetAutostart(autostart bool) error { func (n *VirNetwork) GetName() (string, error) { name := C.virNetworkGetName(n.ptr) if name == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } return C.GoString(name), nil } @@ -104,7 +103,7 @@ func (n *VirNetwork) GetUUID() ([]byte, error) { cuidPtr := unsafe.Pointer(&cUuid) result := C.virNetworkGetUUID(n.ptr, (*C.uchar)(cuidPtr)) if result != 0 { - return []byte{}, errors.New(GetLastError()) + return []byte{}, GetLastError() } return C.GoBytes(cuidPtr, C.VIR_UUID_BUFLEN), nil } @@ -114,7 +113,7 @@ func (n *VirNetwork) GetUUIDString() (string, error) { cuidPtr := unsafe.Pointer(&cUuid) result := C.virNetworkGetUUIDString(n.ptr, (*C.char)(cuidPtr)) if result != 0 { - return "", errors.New(GetLastError()) + return "", GetLastError() } return C.GoString((*C.char)(cuidPtr)), nil } @@ -122,7 +121,7 @@ func (n *VirNetwork) GetUUIDString() (string, error) { func (n *VirNetwork) GetBridgeName() (string, error) { result := C.virNetworkGetBridgeName(n.ptr) if result == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } bridge := C.GoString(result) C.free(unsafe.Pointer(result)) @@ -132,7 +131,7 @@ func (n *VirNetwork) GetBridgeName() (string, error) { func (n *VirNetwork) GetXMLDesc(flags uint32) (string, error) { result := C.virNetworkGetXMLDesc(n.ptr, C.uint(flags)) if result == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } xml := C.GoString(result) C.free(unsafe.Pointer(result)) @@ -142,7 +141,7 @@ func (n *VirNetwork) GetXMLDesc(flags uint32) (string, error) { func (n *VirNetwork) Undefine() error { result := C.virNetworkUndefine(n.ptr) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } diff --git a/vendor/github.com/alexzorin/libvirt-go/nwfilter.go b/vendor/github.com/alexzorin/libvirt-go/nwfilter.go index a664b71..b2d4f41 100644 --- a/vendor/github.com/alexzorin/libvirt-go/nwfilter.go +++ b/vendor/github.com/alexzorin/libvirt-go/nwfilter.go @@ -9,7 +9,6 @@ package libvirt import "C" import ( - "errors" "unsafe" ) @@ -19,7 +18,7 @@ type VirNWFilter struct { func (f *VirNWFilter) Free() error { if result := C.virNWFilterFree(f.ptr); result != 0 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -27,7 +26,7 @@ func (f *VirNWFilter) Free() error { func (f *VirNWFilter) GetName() (string, error) { name := C.virNWFilterGetName(f.ptr) if name == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } return C.GoString(name), nil } @@ -35,7 +34,7 @@ func (f *VirNWFilter) GetName() (string, error) { func (f *VirNWFilter) Undefine() error { result := C.virNWFilterUndefine(f.ptr) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -45,7 +44,7 @@ func (f *VirNWFilter) GetUUID() ([]byte, error) { cuidPtr := unsafe.Pointer(&cUuid) result := C.virNWFilterGetUUID(f.ptr, (*C.uchar)(cuidPtr)) if result != 0 { - return []byte{}, errors.New(GetLastError()) + return []byte{}, GetLastError() } return C.GoBytes(cuidPtr, C.VIR_UUID_BUFLEN), nil } @@ -55,7 +54,7 @@ func (f *VirNWFilter) GetUUIDString() (string, error) { cuidPtr := unsafe.Pointer(&cUuid) result := C.virNWFilterGetUUIDString(f.ptr, (*C.char)(cuidPtr)) if result != 0 { - return "", errors.New(GetLastError()) + return "", GetLastError() } return C.GoString((*C.char)(cuidPtr)), nil } @@ -63,7 +62,7 @@ func (f *VirNWFilter) GetUUIDString() (string, error) { func (f *VirNWFilter) GetXMLDesc(flags uint32) (string, error) { result := C.virNWFilterGetXMLDesc(f.ptr, C.uint(flags)) if result == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } xml := C.GoString(result) C.free(unsafe.Pointer(result)) diff --git a/vendor/github.com/alexzorin/libvirt-go/secret.go b/vendor/github.com/alexzorin/libvirt-go/secret.go index 409e464..b5f820d 100644 --- a/vendor/github.com/alexzorin/libvirt-go/secret.go +++ b/vendor/github.com/alexzorin/libvirt-go/secret.go @@ -9,7 +9,6 @@ package libvirt import "C" import ( - "errors" "unsafe" ) @@ -19,7 +18,7 @@ type VirSecret struct { func (s *VirSecret) Free() error { if result := C.virSecretFree(s.ptr); result != 0 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -27,7 +26,7 @@ func (s *VirSecret) Free() error { func (s *VirSecret) Undefine() error { result := C.virSecretUndefine(s.ptr) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -37,7 +36,7 @@ func (s *VirSecret) GetUUID() ([]byte, error) { cuidPtr := unsafe.Pointer(&cUuid) result := C.virSecretGetUUID(s.ptr, (*C.uchar)(cuidPtr)) if result != 0 { - return []byte{}, errors.New(GetLastError()) + return []byte{}, GetLastError() } return C.GoBytes(cuidPtr, C.VIR_UUID_BUFLEN), nil } @@ -47,7 +46,7 @@ func (s *VirSecret) GetUUIDString() (string, error) { cuidPtr := unsafe.Pointer(&cUuid) result := C.virSecretGetUUIDString(s.ptr, (*C.char)(cuidPtr)) if result != 0 { - return "", errors.New(GetLastError()) + return "", GetLastError() } return C.GoString((*C.char)(cuidPtr)), nil } @@ -55,7 +54,7 @@ func (s *VirSecret) GetUUIDString() (string, error) { func (s *VirSecret) GetUsageID() (string, error) { result := C.virSecretGetUsageID(s.ptr) if result == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } return C.GoString(result), nil } @@ -63,7 +62,7 @@ func (s *VirSecret) GetUsageID() (string, error) { func (s *VirSecret) GetUsageType() (int, error) { result := int(C.virSecretGetUsageType(s.ptr)) if result == -1 { - return 0, errors.New(GetLastError()) + return 0, GetLastError() } return result, nil } @@ -71,7 +70,7 @@ func (s *VirSecret) GetUsageType() (int, error) { func (s *VirSecret) GetXMLDesc(flags uint32) (string, error) { result := C.virSecretGetXMLDesc(s.ptr, C.uint(flags)) if result == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } xml := C.GoString(result) C.free(unsafe.Pointer(result)) diff --git a/vendor/github.com/alexzorin/libvirt-go/snapshot.go b/vendor/github.com/alexzorin/libvirt-go/snapshot.go index 711f119..55955c4 100644 --- a/vendor/github.com/alexzorin/libvirt-go/snapshot.go +++ b/vendor/github.com/alexzorin/libvirt-go/snapshot.go @@ -9,7 +9,6 @@ package libvirt import "C" import ( - "errors" "unsafe" ) @@ -19,7 +18,23 @@ type VirDomainSnapshot struct { func (s *VirDomainSnapshot) Free() error { if result := C.virDomainSnapshotFree(s.ptr); result != 0 { - return errors.New(GetLastError()) + return GetLastError() + } + return nil +} + +func (s *VirDomainSnapshot) Delete(flags uint32) error { + result := C.virDomainSnapshotDelete(s.ptr, C.uint(flags)) + if result != 0 { + return GetLastError() + } + return nil +} + +func (s *VirDomainSnapshot) RevertToSnapshot(flags uint32) error { + result := C.virDomainRevertToSnapshot(s.ptr, C.uint(flags)) + if result != 0 { + return GetLastError() } return nil } @@ -29,7 +44,7 @@ func (d *VirDomain) CreateSnapshotXML(xml string, flags uint32) (VirDomainSnapsh defer C.free(unsafe.Pointer(cXml)) result := C.virDomainSnapshotCreateXML(d.ptr, cXml, C.uint(flags)) if result == nil { - return VirDomainSnapshot{}, errors.New(GetLastError()) + return VirDomainSnapshot{}, GetLastError() } return VirDomainSnapshot{ptr: result}, nil } @@ -39,7 +54,7 @@ func (d *VirDomain) Save(destFile string) error { defer C.free(unsafe.Pointer(cPath)) result := C.virDomainSave(d.ptr, cPath) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -51,7 +66,7 @@ func (d *VirDomain) SaveFlags(destFile string, destXml string, flags uint32) err defer C.free(unsafe.Pointer(cDestFile)) result := C.virDomainSaveFlags(d.ptr, cDestFile, cDestXml, C.uint(flags)) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -60,7 +75,7 @@ func (conn VirConnection) Restore(srcFile string) error { cPath := C.CString(srcFile) defer C.free(unsafe.Pointer(cPath)) if result := C.virDomainRestore(conn.ptr, cPath); result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -74,7 +89,7 @@ func (conn VirConnection) RestoreFlags(srcFile, xmlConf string, flags uint32) er defer C.free(unsafe.Pointer(cXmlConf)) } if result := C.virDomainRestoreFlags(conn.ptr, cPath, cXmlConf, C.uint(flags)); result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } diff --git a/vendor/github.com/alexzorin/libvirt-go/storage_pool.go b/vendor/github.com/alexzorin/libvirt-go/storage_pool.go index a104491..8d3562c 100644 --- a/vendor/github.com/alexzorin/libvirt-go/storage_pool.go +++ b/vendor/github.com/alexzorin/libvirt-go/storage_pool.go @@ -9,7 +9,6 @@ package libvirt import "C" import ( - "errors" "io/ioutil" "unsafe" ) @@ -25,7 +24,7 @@ type VirStoragePoolInfo struct { func (p *VirStoragePool) Build(flags uint32) error { result := C.virStoragePoolBuild(p.ptr, C.uint(flags)) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -33,7 +32,7 @@ func (p *VirStoragePool) Build(flags uint32) error { func (p *VirStoragePool) Create(flags uint32) error { result := C.virStoragePoolCreate(p.ptr, C.uint(flags)) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -41,7 +40,7 @@ func (p *VirStoragePool) Create(flags uint32) error { func (p *VirStoragePool) Delete(flags uint32) error { result := C.virStoragePoolDelete(p.ptr, C.uint(flags)) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -49,14 +48,14 @@ func (p *VirStoragePool) Delete(flags uint32) error { func (p *VirStoragePool) Destroy() error { result := C.virStoragePoolDestroy(p.ptr) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } func (p *VirStoragePool) Free() error { if result := C.virStoragePoolFree(p.ptr); result != 0 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -65,7 +64,7 @@ func (p *VirStoragePool) GetAutostart() (bool, error) { var out C.int result := C.virStoragePoolGetAutostart(p.ptr, (*C.int)(unsafe.Pointer(&out))) if result == -1 { - return false, errors.New(GetLastError()) + return false, GetLastError() } switch out { case 1: @@ -80,7 +79,7 @@ func (p *VirStoragePool) GetInfo() (VirStoragePoolInfo, error) { var ptr C.virStoragePoolInfo result := C.virStoragePoolGetInfo(p.ptr, (*C.virStoragePoolInfo)(unsafe.Pointer(&ptr))) if result == -1 { - return pi, errors.New(GetLastError()) + return pi, GetLastError() } pi.ptr = ptr return pi, nil @@ -89,7 +88,7 @@ func (p *VirStoragePool) GetInfo() (VirStoragePoolInfo, error) { func (p *VirStoragePool) GetName() (string, error) { name := C.virStoragePoolGetName(p.ptr) if name == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } return C.GoString(name), nil } @@ -99,7 +98,7 @@ func (p *VirStoragePool) GetUUID() ([]byte, error) { cuidPtr := unsafe.Pointer(&cUuid) result := C.virStoragePoolGetUUID(p.ptr, (*C.uchar)(cuidPtr)) if result != 0 { - return []byte{}, errors.New(GetLastError()) + return []byte{}, GetLastError() } return C.GoBytes(cuidPtr, C.VIR_UUID_BUFLEN), nil } @@ -109,7 +108,7 @@ func (p *VirStoragePool) GetUUIDString() (string, error) { cuidPtr := unsafe.Pointer(&cUuid) result := C.virStoragePoolGetUUIDString(p.ptr, (*C.char)(cuidPtr)) if result != 0 { - return "", errors.New(GetLastError()) + return "", GetLastError() } return C.GoString((*C.char)(cuidPtr)), nil } @@ -117,7 +116,7 @@ func (p *VirStoragePool) GetUUIDString() (string, error) { func (p *VirStoragePool) GetXMLDesc(flags uint32) (string, error) { result := C.virStoragePoolGetXMLDesc(p.ptr, C.uint(flags)) if result == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } xml := C.GoString(result) C.free(unsafe.Pointer(result)) @@ -127,7 +126,7 @@ func (p *VirStoragePool) GetXMLDesc(flags uint32) (string, error) { func (p *VirStoragePool) IsActive() (bool, error) { result := C.virStoragePoolIsActive(p.ptr) if result == -1 { - return false, errors.New(GetLastError()) + return false, GetLastError() } if result == 1 { return true, nil @@ -145,7 +144,7 @@ func (p *VirStoragePool) SetAutostart(autostart bool) error { } result := C.virStoragePoolSetAutostart(p.ptr, cAutostart) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -153,7 +152,7 @@ func (p *VirStoragePool) SetAutostart(autostart bool) error { func (p *VirStoragePool) Refresh(flags uint32) error { result := C.virStoragePoolRefresh(p.ptr, C.uint(flags)) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -161,7 +160,7 @@ func (p *VirStoragePool) Refresh(flags uint32) error { func (p *VirStoragePool) Undefine() error { result := C.virStoragePoolUndefine(p.ptr) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -195,7 +194,7 @@ func (p *VirStoragePool) StorageVolCreateXML(xmlConfig string, flags uint32) (Vi defer C.free(unsafe.Pointer(cXml)) ptr := C.virStorageVolCreateXML(p.ptr, cXml, C.uint(flags)) if ptr == nil { - return VirStorageVol{}, errors.New(GetLastError()) + return VirStorageVol{}, GetLastError() } return VirStorageVol{ptr: ptr}, nil } @@ -205,7 +204,7 @@ func (p *VirStoragePool) LookupStorageVolByName(name string) (VirStorageVol, err defer C.free(unsafe.Pointer(cName)) ptr := C.virStorageVolLookupByName(p.ptr, cName) if ptr == nil { - return VirStorageVol{}, errors.New(GetLastError()) + return VirStorageVol{}, GetLastError() } return VirStorageVol{ptr: ptr}, nil } diff --git a/vendor/github.com/alexzorin/libvirt-go/storage_volume.go b/vendor/github.com/alexzorin/libvirt-go/storage_volume.go index d5a5cfe..26b446e 100644 --- a/vendor/github.com/alexzorin/libvirt-go/storage_volume.go +++ b/vendor/github.com/alexzorin/libvirt-go/storage_volume.go @@ -9,7 +9,6 @@ package libvirt import "C" import ( - "errors" "unsafe" ) @@ -24,14 +23,14 @@ type VirStorageVolInfo struct { func (v *VirStorageVol) Delete(flags uint32) error { result := C.virStorageVolDelete(v.ptr, C.uint(flags)) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } func (v *VirStorageVol) Free() error { if result := C.virStorageVolFree(v.ptr); result != 0 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -41,7 +40,7 @@ func (v *VirStorageVol) GetInfo() (VirStorageVolInfo, error) { var ptr C.virStorageVolInfo result := C.virStorageVolGetInfo(v.ptr, (*C.virStorageVolInfo)(unsafe.Pointer(&ptr))) if result == -1 { - return vi, errors.New(GetLastError()) + return vi, GetLastError() } vi.ptr = ptr return vi, nil @@ -62,7 +61,7 @@ func (i *VirStorageVolInfo) GetAllocationInBytes() uint64 { func (v *VirStorageVol) GetKey() (string, error) { key := C.virStorageVolGetKey(v.ptr) if key == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } return C.GoString(key), nil } @@ -70,7 +69,7 @@ func (v *VirStorageVol) GetKey() (string, error) { func (v *VirStorageVol) GetName() (string, error) { name := C.virStorageVolGetName(v.ptr) if name == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } return C.GoString(name), nil } @@ -78,7 +77,7 @@ func (v *VirStorageVol) GetName() (string, error) { func (v *VirStorageVol) GetPath() (string, error) { result := C.virStorageVolGetPath(v.ptr) if result == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } path := C.GoString(result) C.free(unsafe.Pointer(result)) @@ -88,7 +87,7 @@ func (v *VirStorageVol) GetPath() (string, error) { func (v *VirStorageVol) GetXMLDesc(flags uint32) (string, error) { result := C.virStorageVolGetXMLDesc(v.ptr, C.uint(flags)) if result == nil { - return "", errors.New(GetLastError()) + return "", GetLastError() } xml := C.GoString(result) C.free(unsafe.Pointer(result)) @@ -98,7 +97,7 @@ func (v *VirStorageVol) GetXMLDesc(flags uint32) (string, error) { func (v *VirStorageVol) Resize(capacity uint64, flags uint32) error { result := C.virStorageVolResize(v.ptr, C.ulonglong(capacity), C.uint(flags)) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } @@ -106,14 +105,30 @@ func (v *VirStorageVol) Resize(capacity uint64, flags uint32) error { func (v *VirStorageVol) Wipe(flags uint32) error { result := C.virStorageVolWipe(v.ptr, C.uint(flags)) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil } func (v *VirStorageVol) WipePattern(algorithm uint32, flags uint32) error { result := C.virStorageVolWipePattern(v.ptr, C.uint(algorithm), C.uint(flags)) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() + } + return nil +} + +func (v *VirStorageVol) Upload(stream *VirStream, offset, length uint64, flags uint32) error { + if C.virStorageVolUpload(v.ptr, stream.ptr, C.ulonglong(offset), + C.ulonglong(length), C.uint(flags)) == -1 { + return GetLastError() + } + return nil +} + +func (v *VirStorageVol) Download(stream *VirStream, offset, length uint64, flags uint32) error { + if C.virStorageVolDownload(v.ptr, stream.ptr, C.ulonglong(offset), + C.ulonglong(length), C.uint(flags)) == -1 { + return GetLastError() } return nil } diff --git a/vendor/github.com/alexzorin/libvirt-go/stream.go b/vendor/github.com/alexzorin/libvirt-go/stream.go index 7420d1c..e0b142b 100644 --- a/vendor/github.com/alexzorin/libvirt-go/stream.go +++ b/vendor/github.com/alexzorin/libvirt-go/stream.go @@ -8,7 +8,6 @@ package libvirt */ import "C" import ( - "errors" "io" "unsafe" ) @@ -20,7 +19,7 @@ type VirStream struct { func NewVirStream(c *VirConnection, flags uint) (*VirStream, error) { virStream := C.virStreamNew(c.ptr, C.uint(flags)) if virStream == nil { - return nil, errors.New(GetLastError()) + return nil, GetLastError() } return &VirStream{ @@ -31,7 +30,7 @@ func NewVirStream(c *VirConnection, flags uint) (*VirStream, error) { func (v *VirStream) Abort() error { result := C.virStreamAbort(v.ptr) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil @@ -40,7 +39,7 @@ func (v *VirStream) Abort() error { func (v *VirStream) Close() error { result := C.virStreamFinish(v.ptr) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil @@ -49,7 +48,7 @@ func (v *VirStream) Close() error { func (v *VirStream) Free() error { result := C.virStreamFree(v.ptr) if result == -1 { - return errors.New(GetLastError()) + return GetLastError() } return nil @@ -58,7 +57,7 @@ func (v *VirStream) Free() error { func (v *VirStream) Read(p []byte) (int, error) { n := C.virStreamRecv(v.ptr, (*C.char)(unsafe.Pointer(&p[0])), C.size_t(len(p))) if n < 0 { - return 0, errors.New(GetLastError()) + return 0, GetLastError() } if n == 0 { return 0, io.EOF @@ -70,7 +69,7 @@ func (v *VirStream) Read(p []byte) (int, error) { func (v *VirStream) Write(p []byte) (int, error) { n := C.virStreamSend(v.ptr, (*C.char)(unsafe.Pointer(&p[0])), C.size_t(len(p))) if n < 0 { - return 0, errors.New(GetLastError()) + return 0, GetLastError() } if n == 0 { return 0, io.EOF diff --git a/vendor/github.com/alexzorin/libvirt-go/vagrant/master/Vagrantfile b/vendor/github.com/alexzorin/libvirt-go/vagrant/master/Vagrantfile new file mode 100644 index 0000000..520b250 --- /dev/null +++ b/vendor/github.com/alexzorin/libvirt-go/vagrant/master/Vagrantfile @@ -0,0 +1,83 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +####################################################################################################### +# +# If you get problems about guest additions versions, please get this plugin to fix it up: +# +# vagrant plugin install vagrant-vbguest +# +####################################################################################################### + +require '../vagrant-provision-reboot-plugin' + +VAGRANTFILE_API_VERSION = "2" + +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + config.vm.box = "chef/fedora-19" + config.vm.provision "shell", privileged: true, inline: <<-EOF + set -e + echo "Installing LXC + libvirt dependencies" + yum -y install cyrus-sasl-devel device-mapper-devel gnutls-devel \ + libxml2-devel cyrus-sasl-md5 gnutls-utils nc numactl numactl-libs libwsman1 \ + libwsman-devel avahi-devel e2fsprogs-devel libcap-ng-devel libnl-devel \ + libpciaccess-devel libselinux-devel libssh2-devel libudev-devel netcf-devel \ + numactl-devel parted-devel python-devel readline-devel xen-devel xhtml1-dtds \ + xmlrpc-c-devel yajl-devel pm-utils dmidecode libcgroup numad iptables-ipv6 \ + radvd lzop glusterfs-client iscsi-initiator-utils sheepdog fuse-libs \ + glusterfs-api librados2 librbd1 qemu-img lxc + + echo "Download libvirt 1.2.2 RPMs" + mkdir -p /tmp/rpms && cd /tmp/rpms + wget -N http://libvirt.org/sources/libvirt-client-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-config-network-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-config-nwfilter-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-driver-interface-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-driver-libxl-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-driver-lxc-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-driver-network-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-driver-nodedev-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-driver-nwfilter-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-driver-qemu-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-driver-secret-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-driver-storage-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-driver-uml-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-driver-vbox-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-driver-xen-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-lxc-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-devel-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-docs-1.2.2-1.fc19.x86_64.rpm + + echo "Installing libvirt RPMs" + cd /tmp/rpms + # sigh, bad rpm + rpm -ivh *.rpm || true + + GOVERSION="1.3.3" + GOTARBALL="go${GOVERSION}.linux-amd64.tar.gz" + export GOROOT=/usr/local/go + export GOPATH=/opt/go + export PATH=$PATH:$GOROOT/bin:$GOPATH/bin + echo "Installing Go $GOVERSION" + if [ ! $(which go) ]; then + echo " Downloading $GOTARBALL" + wget --quiet --directory-prefix=/tmp https://storage.googleapis.com/golang/$GOTARBALL + echo " Extracting $GOTARBALL to $GOROOT" + tar -C /usr/local -xzf /tmp/$GOTARBALL + echo " Configuring GOPATH" + mkdir -p $GOPATH/src $GOPATH/bin $GOPATH/pkg + chown -R vagrant $GOPATH + echo " Configuring env vars" + echo "export PATH=\$PATH:$GOROOT/bin:$GOPATH/bin" | tee /etc/profile.d/golang.sh > /dev/null + echo "export GOROOT=$GOROOT" | tee --append /etc/profile.d/golang.sh > /dev/null + echo "export GOPATH=$GOPATH" | tee --append /etc/profile.d/golang.sh > /dev/null + fi + + systemctl enable lxc + systemctl enable libvirtd + EOF + + config.vm.provision :unix_reboot + config.vm.synced_folder "../..", "/libvirt-go" +end diff --git a/vendor/github.com/alexzorin/libvirt-go/vagrant/vagrant-provision-reboot-plugin.rb b/vendor/github.com/alexzorin/libvirt-go/vagrant/vagrant-provision-reboot-plugin.rb new file mode 100644 index 0000000..99d9920 --- /dev/null +++ b/vendor/github.com/alexzorin/libvirt-go/vagrant/vagrant-provision-reboot-plugin.rb @@ -0,0 +1,176 @@ +# A quick hack to allow rebooting of a Vagrant VM during provisioning. +# +# This is tested with Vagrant 1.4.3. It may work with slightly earlier versions, +# but definitely won't work with much earlier versions. The code is fragile with +# respect to internal changes in Vagrant. +# +# Adapted from: https://gist.github.com/ukabu/6780121 +# +# This file should be placed into the same folder as your Vagrantfile. Then in +# your Vagrantfile, you'll want to do something like the following: +# +# ---------------------------------------------------------------------------- +# +# require './vagrant-provision-reboot-plugin' +# +# Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| +# +# # Run your pre-reboot provisioning block. +# #config.vm.provision :chef_solo do |chef| +# # ... +# #end +# +# # Run a reboot of a *NIX guest. +# config.vm.provision :unix_reboot +# # Run a reboot of a Windows guest, assuming that you are set up with the +# # relevant plugins and configurations to manage a Windows guest in Vagrant. +# #config.vm.provision :windows_reboot +# +# # Run your post-reboot provisioning block. +# #config.vm.provision :chef_solo do |chef| +# # ... +# #end +# +# ---------------------------------------------------------------------------- +# +# The provisioner takes care of remounting the synced folders. +# +# This will work for the VirtualBox provider. For other providers, a +# 'remount_synched_folders' action must be added to the provider implementation. + +require 'vagrant' + +# Monkey-patch the VirtualBox provider to be able to remap synced folders after +# reboot. +# +# This involves pulling out some code fragments from the existing SyncedFolders +# class - which is unpleasant, but there are no usefully exposed methods such +# that we can run only what we need to. +module VagrantPlugins + module ProviderVirtualBox + module Action + + class RemountSyncedFolders < SyncedFolders + + def initialize(app, env) + super(app, env) + end + + def call(env) + @env = env + @app.call(env) + + # Copied out of /lib/vagrant/action/builtin/synced_folders.rb in + # Vagrant 1.4.3. This is going to be fragile with respect to future + # changes, but that's just the way the cookie crumbles. + # + # We can't just run the whole SyncedFolders.call() method because + # it undertakes a lot more setup and will error out if invoked twice + # during "vagrant up" or "vagrant provision". + folders = synced_folders(env[:machine]) + folders.each do |impl_name, fs| + plugins[impl_name.to_sym][0].new.enable(env[:machine], fs, impl_opts(impl_name, env)) + end + end + end + + def self.action_remount_synced_folders + Vagrant::Action::Builder.new.tap do |b| + b.use RemountSyncedFolders + end + end + + end + end +end + +# Define the plugin. +class RebootPlugin < Vagrant.plugin('2') + name 'Reboot Plugin' + + # This plugin provides a provisioner called unix_reboot. + provisioner 'unix_reboot' do + + # Create a provisioner. + class RebootProvisioner < Vagrant.plugin('2', :provisioner) + # Initialization, define internal state. Nothing needed. + def initialize(machine, config) + super(machine, config) + end + + # Configuration changes to be done. Nothing needed here either. + def configure(root_config) + super(root_config) + end + + # Run the provisioning. + def provision + command = 'shutdown -r now' + @machine.ui.info("Issuing command: #{command}") + @machine.communicate.sudo(command) do |type, data| + if type == :stderr + @machine.ui.error(data); + end + end + + begin + sleep 5 + end until @machine.communicate.ready? + + # Now the machine is up again, perform the necessary tasks. + @machine.ui.info("Launching remount_synced_folders action...") + @machine.action('remount_synced_folders') + end + + # Nothing needs to be done on cleanup. + def cleanup + super + end + end + RebootProvisioner + + end + + # This plugin provides a provisioner called windows_reboot. + provisioner 'windows_reboot' do + + # Create a provisioner. + class RebootProvisioner < Vagrant.plugin('2', :provisioner) + # Initialization, define internal state. Nothing needed. + def initialize(machine, config) + super(machine, config) + end + + # Configuration changes to be done. Nothing needed here either. + def configure(root_config) + super(root_config) + end + + # Run the provisioning. + def provision + command = 'shutdown -t 0 -r -f' + @machine.ui.info("Issuing command: #{command}") + @machine.communicate.execute(command) do + if type == :stderr + @machine.ui.error(data); + end + end + + begin + sleep 5 + end until @machine.communicate.ready? + + # Now the machine is up again, perform the necessary tasks. + @machine.ui.info("Launching remount_synced_folders action...") + @machine.action('remount_synced_folders') + end + + # Nothing needs to be done on cleanup. + def cleanup + super + end + end + RebootProvisioner + + end +end diff --git a/vendor/github.com/gorilla/context/.travis.yml b/vendor/github.com/gorilla/context/.travis.yml new file mode 100644 index 0000000..f983b60 --- /dev/null +++ b/vendor/github.com/gorilla/context/.travis.yml @@ -0,0 +1,8 @@ +language: go +sudo: false + +go: + - 1.3 + - 1.4 + - 1.5 + - tip diff --git a/vendor/github.com/gorilla/context/LICENSE b/vendor/github.com/gorilla/context/LICENSE new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/vendor/github.com/gorilla/context/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/gorilla/context/README.md b/vendor/github.com/gorilla/context/README.md new file mode 100644 index 0000000..c60a31b --- /dev/null +++ b/vendor/github.com/gorilla/context/README.md @@ -0,0 +1,7 @@ +context +======= +[![Build Status](https://travis-ci.org/gorilla/context.png?branch=master)](https://travis-ci.org/gorilla/context) + +gorilla/context is a general purpose registry for global request variables. + +Read the full documentation here: http://www.gorillatoolkit.org/pkg/context diff --git a/vendor/github.com/gorilla/context/context.go b/vendor/github.com/gorilla/context/context.go new file mode 100644 index 0000000..81cb128 --- /dev/null +++ b/vendor/github.com/gorilla/context/context.go @@ -0,0 +1,143 @@ +// Copyright 2012 The Gorilla Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package context + +import ( + "net/http" + "sync" + "time" +) + +var ( + mutex sync.RWMutex + data = make(map[*http.Request]map[interface{}]interface{}) + datat = make(map[*http.Request]int64) +) + +// Set stores a value for a given key in a given request. +func Set(r *http.Request, key, val interface{}) { + mutex.Lock() + if data[r] == nil { + data[r] = make(map[interface{}]interface{}) + datat[r] = time.Now().Unix() + } + data[r][key] = val + mutex.Unlock() +} + +// Get returns a value stored for a given key in a given request. +func Get(r *http.Request, key interface{}) interface{} { + mutex.RLock() + if ctx := data[r]; ctx != nil { + value := ctx[key] + mutex.RUnlock() + return value + } + mutex.RUnlock() + return nil +} + +// GetOk returns stored value and presence state like multi-value return of map access. +func GetOk(r *http.Request, key interface{}) (interface{}, bool) { + mutex.RLock() + if _, ok := data[r]; ok { + value, ok := data[r][key] + mutex.RUnlock() + return value, ok + } + mutex.RUnlock() + return nil, false +} + +// GetAll returns all stored values for the request as a map. Nil is returned for invalid requests. +func GetAll(r *http.Request) map[interface{}]interface{} { + mutex.RLock() + if context, ok := data[r]; ok { + result := make(map[interface{}]interface{}, len(context)) + for k, v := range context { + result[k] = v + } + mutex.RUnlock() + return result + } + mutex.RUnlock() + return nil +} + +// GetAllOk returns all stored values for the request as a map and a boolean value that indicates if +// the request was registered. +func GetAllOk(r *http.Request) (map[interface{}]interface{}, bool) { + mutex.RLock() + context, ok := data[r] + result := make(map[interface{}]interface{}, len(context)) + for k, v := range context { + result[k] = v + } + mutex.RUnlock() + return result, ok +} + +// Delete removes a value stored for a given key in a given request. +func Delete(r *http.Request, key interface{}) { + mutex.Lock() + if data[r] != nil { + delete(data[r], key) + } + mutex.Unlock() +} + +// Clear removes all values stored for a given request. +// +// This is usually called by a handler wrapper to clean up request +// variables at the end of a request lifetime. See ClearHandler(). +func Clear(r *http.Request) { + mutex.Lock() + clear(r) + mutex.Unlock() +} + +// clear is Clear without the lock. +func clear(r *http.Request) { + delete(data, r) + delete(datat, r) +} + +// Purge removes request data stored for longer than maxAge, in seconds. +// It returns the amount of requests removed. +// +// If maxAge <= 0, all request data is removed. +// +// This is only used for sanity check: in case context cleaning was not +// properly set some request data can be kept forever, consuming an increasing +// amount of memory. In case this is detected, Purge() must be called +// periodically until the problem is fixed. +func Purge(maxAge int) int { + mutex.Lock() + count := 0 + if maxAge <= 0 { + count = len(data) + data = make(map[*http.Request]map[interface{}]interface{}) + datat = make(map[*http.Request]int64) + } else { + min := time.Now().Unix() - int64(maxAge) + for r := range data { + if datat[r] < min { + clear(r) + count++ + } + } + } + mutex.Unlock() + return count +} + +// ClearHandler wraps an http.Handler and clears request values at the end +// of a request lifetime. +func ClearHandler(h http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + defer Clear(r) + h.ServeHTTP(w, r) + }) +} diff --git a/vendor/github.com/gorilla/context/context_test.go b/vendor/github.com/gorilla/context/context_test.go new file mode 100644 index 0000000..9814c50 --- /dev/null +++ b/vendor/github.com/gorilla/context/context_test.go @@ -0,0 +1,161 @@ +// Copyright 2012 The Gorilla Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package context + +import ( + "net/http" + "testing" +) + +type keyType int + +const ( + key1 keyType = iota + key2 +) + +func TestContext(t *testing.T) { + assertEqual := func(val interface{}, exp interface{}) { + if val != exp { + t.Errorf("Expected %v, got %v.", exp, val) + } + } + + r, _ := http.NewRequest("GET", "http://localhost:8080/", nil) + emptyR, _ := http.NewRequest("GET", "http://localhost:8080/", nil) + + // Get() + assertEqual(Get(r, key1), nil) + + // Set() + Set(r, key1, "1") + assertEqual(Get(r, key1), "1") + assertEqual(len(data[r]), 1) + + Set(r, key2, "2") + assertEqual(Get(r, key2), "2") + assertEqual(len(data[r]), 2) + + //GetOk + value, ok := GetOk(r, key1) + assertEqual(value, "1") + assertEqual(ok, true) + + value, ok = GetOk(r, "not exists") + assertEqual(value, nil) + assertEqual(ok, false) + + Set(r, "nil value", nil) + value, ok = GetOk(r, "nil value") + assertEqual(value, nil) + assertEqual(ok, true) + + // GetAll() + values := GetAll(r) + assertEqual(len(values), 3) + + // GetAll() for empty request + values = GetAll(emptyR) + if values != nil { + t.Error("GetAll didn't return nil value for invalid request") + } + + // GetAllOk() + values, ok = GetAllOk(r) + assertEqual(len(values), 3) + assertEqual(ok, true) + + // GetAllOk() for empty request + values, ok = GetAllOk(emptyR) + assertEqual(value, nil) + assertEqual(ok, false) + + // Delete() + Delete(r, key1) + assertEqual(Get(r, key1), nil) + assertEqual(len(data[r]), 2) + + Delete(r, key2) + assertEqual(Get(r, key2), nil) + assertEqual(len(data[r]), 1) + + // Clear() + Clear(r) + assertEqual(len(data), 0) +} + +func parallelReader(r *http.Request, key string, iterations int, wait, done chan struct{}) { + <-wait + for i := 0; i < iterations; i++ { + Get(r, key) + } + done <- struct{}{} + +} + +func parallelWriter(r *http.Request, key, value string, iterations int, wait, done chan struct{}) { + <-wait + for i := 0; i < iterations; i++ { + Set(r, key, value) + } + done <- struct{}{} + +} + +func benchmarkMutex(b *testing.B, numReaders, numWriters, iterations int) { + + b.StopTimer() + r, _ := http.NewRequest("GET", "http://localhost:8080/", nil) + done := make(chan struct{}) + b.StartTimer() + + for i := 0; i < b.N; i++ { + wait := make(chan struct{}) + + for i := 0; i < numReaders; i++ { + go parallelReader(r, "test", iterations, wait, done) + } + + for i := 0; i < numWriters; i++ { + go parallelWriter(r, "test", "123", iterations, wait, done) + } + + close(wait) + + for i := 0; i < numReaders+numWriters; i++ { + <-done + } + + } + +} + +func BenchmarkMutexSameReadWrite1(b *testing.B) { + benchmarkMutex(b, 1, 1, 32) +} +func BenchmarkMutexSameReadWrite2(b *testing.B) { + benchmarkMutex(b, 2, 2, 32) +} +func BenchmarkMutexSameReadWrite4(b *testing.B) { + benchmarkMutex(b, 4, 4, 32) +} +func BenchmarkMutex1(b *testing.B) { + benchmarkMutex(b, 2, 8, 32) +} +func BenchmarkMutex2(b *testing.B) { + benchmarkMutex(b, 16, 4, 64) +} +func BenchmarkMutex3(b *testing.B) { + benchmarkMutex(b, 1, 2, 128) +} +func BenchmarkMutex4(b *testing.B) { + benchmarkMutex(b, 128, 32, 256) +} +func BenchmarkMutex5(b *testing.B) { + benchmarkMutex(b, 1024, 2048, 64) +} +func BenchmarkMutex6(b *testing.B) { + benchmarkMutex(b, 2048, 1024, 512) +} diff --git a/vendor/github.com/gorilla/context/doc.go b/vendor/github.com/gorilla/context/doc.go new file mode 100644 index 0000000..73c7400 --- /dev/null +++ b/vendor/github.com/gorilla/context/doc.go @@ -0,0 +1,82 @@ +// Copyright 2012 The Gorilla Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/* +Package context stores values shared during a request lifetime. + +For example, a router can set variables extracted from the URL and later +application handlers can access those values, or it can be used to store +sessions values to be saved at the end of a request. There are several +others common uses. + +The idea was posted by Brad Fitzpatrick to the go-nuts mailing list: + + http://groups.google.com/group/golang-nuts/msg/e2d679d303aa5d53 + +Here's the basic usage: first define the keys that you will need. The key +type is interface{} so a key can be of any type that supports equality. +Here we define a key using a custom int type to avoid name collisions: + + package foo + + import ( + "github.com/gorilla/context" + ) + + type key int + + const MyKey key = 0 + +Then set a variable. Variables are bound to an http.Request object, so you +need a request instance to set a value: + + context.Set(r, MyKey, "bar") + +The application can later access the variable using the same key you provided: + + func MyHandler(w http.ResponseWriter, r *http.Request) { + // val is "bar". + val := context.Get(r, foo.MyKey) + + // returns ("bar", true) + val, ok := context.GetOk(r, foo.MyKey) + // ... + } + +And that's all about the basic usage. We discuss some other ideas below. + +Any type can be stored in the context. To enforce a given type, make the key +private and wrap Get() and Set() to accept and return values of a specific +type: + + type key int + + const mykey key = 0 + + // GetMyKey returns a value for this package from the request values. + func GetMyKey(r *http.Request) SomeType { + if rv := context.Get(r, mykey); rv != nil { + return rv.(SomeType) + } + return nil + } + + // SetMyKey sets a value for this package in the request values. + func SetMyKey(r *http.Request, val SomeType) { + context.Set(r, mykey, val) + } + +Variables must be cleared at the end of a request, to remove all values +that were stored. This can be done in an http.Handler, after a request was +served. Just call Clear() passing the request: + + context.Clear(r) + +...or use ClearHandler(), which conveniently wraps an http.Handler to clear +variables at the end of a request lifetime. + +The Routers from the packages gorilla/mux and gorilla/pat call Clear() +so if you are using either of them you don't need to clear the context manually. +*/ +package context diff --git a/vendor/github.com/gorilla/mux/.travis.yml b/vendor/github.com/gorilla/mux/.travis.yml new file mode 100644 index 0000000..f983b60 --- /dev/null +++ b/vendor/github.com/gorilla/mux/.travis.yml @@ -0,0 +1,8 @@ +language: go +sudo: false + +go: + - 1.3 + - 1.4 + - 1.5 + - tip diff --git a/vendor/github.com/gorilla/mux/LICENSE b/vendor/github.com/gorilla/mux/LICENSE new file mode 100644 index 0000000..0e5fb87 --- /dev/null +++ b/vendor/github.com/gorilla/mux/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2012 Rodrigo Moraes. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/gorilla/mux/README.md b/vendor/github.com/gorilla/mux/README.md new file mode 100644 index 0000000..55dd4e5 --- /dev/null +++ b/vendor/github.com/gorilla/mux/README.md @@ -0,0 +1,235 @@ +mux +=== +[![GoDoc](https://godoc.org/github.com/gorilla/mux?status.svg)](https://godoc.org/github.com/gorilla/mux) +[![Build Status](https://travis-ci.org/gorilla/mux.png?branch=master)](https://travis-ci.org/gorilla/mux) + +Package gorilla/mux implements a request router and dispatcher. + +The name mux stands for "HTTP request multiplexer". Like the standard +http.ServeMux, mux.Router matches incoming requests against a list of +registered routes and calls a handler for the route that matches the URL +or other conditions. The main features are: + + * Requests can be matched based on URL host, path, path prefix, schemes, + header and query values, HTTP methods or using custom matchers. + * URL hosts and paths can have variables with an optional regular + expression. + * Registered URLs can be built, or "reversed", which helps maintaining + references to resources. + * Routes can be used as subrouters: nested routes are only tested if the + parent route matches. This is useful to define groups of routes that + share common conditions like a host, a path prefix or other repeated + attributes. As a bonus, this optimizes request matching. + * It implements the http.Handler interface so it is compatible with the + standard http.ServeMux. + +Let's start registering a couple of URL paths and handlers: + + func main() { + r := mux.NewRouter() + r.HandleFunc("/", HomeHandler) + r.HandleFunc("/products", ProductsHandler) + r.HandleFunc("/articles", ArticlesHandler) + http.Handle("/", r) + } + +Here we register three routes mapping URL paths to handlers. This is +equivalent to how http.HandleFunc() works: if an incoming request URL matches +one of the paths, the corresponding handler is called passing +(http.ResponseWriter, *http.Request) as parameters. + +Paths can have variables. They are defined using the format {name} or +{name:pattern}. If a regular expression pattern is not defined, the matched +variable will be anything until the next slash. For example: + + r := mux.NewRouter() + r.HandleFunc("/products/{key}", ProductHandler) + r.HandleFunc("/articles/{category}/", ArticlesCategoryHandler) + r.HandleFunc("/articles/{category}/{id:[0-9]+}", ArticleHandler) + +The names are used to create a map of route variables which can be retrieved +calling mux.Vars(): + + vars := mux.Vars(request) + category := vars["category"] + +And this is all you need to know about the basic usage. More advanced options +are explained below. + +Routes can also be restricted to a domain or subdomain. Just define a host +pattern to be matched. They can also have variables: + + r := mux.NewRouter() + // Only matches if domain is "www.example.com". + r.Host("www.example.com") + // Matches a dynamic subdomain. + r.Host("{subdomain:[a-z]+}.domain.com") + +There are several other matchers that can be added. To match path prefixes: + + r.PathPrefix("/products/") + +...or HTTP methods: + + r.Methods("GET", "POST") + +...or URL schemes: + + r.Schemes("https") + +...or header values: + + r.Headers("X-Requested-With", "XMLHttpRequest") + +...or query values: + + r.Queries("key", "value") + +...or to use a custom matcher function: + + r.MatcherFunc(func(r *http.Request, rm *RouteMatch) bool { + return r.ProtoMajor == 0 + }) + +...and finally, it is possible to combine several matchers in a single route: + + r.HandleFunc("/products", ProductsHandler). + Host("www.example.com"). + Methods("GET"). + Schemes("http") + +Setting the same matching conditions again and again can be boring, so we have +a way to group several routes that share the same requirements. +We call it "subrouting". + +For example, let's say we have several URLs that should only match when the +host is `www.example.com`. Create a route for that host and get a "subrouter" +from it: + + r := mux.NewRouter() + s := r.Host("www.example.com").Subrouter() + +Then register routes in the subrouter: + + s.HandleFunc("/products/", ProductsHandler) + s.HandleFunc("/products/{key}", ProductHandler) + s.HandleFunc("/articles/{category}/{id:[0-9]+}"), ArticleHandler) + +The three URL paths we registered above will only be tested if the domain is +`www.example.com`, because the subrouter is tested first. This is not +only convenient, but also optimizes request matching. You can create +subrouters combining any attribute matchers accepted by a route. + +Subrouters can be used to create domain or path "namespaces": you define +subrouters in a central place and then parts of the app can register its +paths relatively to a given subrouter. + +There's one more thing about subroutes. When a subrouter has a path prefix, +the inner routes use it as base for their paths: + + r := mux.NewRouter() + s := r.PathPrefix("/products").Subrouter() + // "/products/" + s.HandleFunc("/", ProductsHandler) + // "/products/{key}/" + s.HandleFunc("/{key}/", ProductHandler) + // "/products/{key}/details" + s.HandleFunc("/{key}/details", ProductDetailsHandler) + +Now let's see how to build registered URLs. + +Routes can be named. All routes that define a name can have their URLs built, +or "reversed". We define a name calling Name() on a route. For example: + + r := mux.NewRouter() + r.HandleFunc("/articles/{category}/{id:[0-9]+}", ArticleHandler). + Name("article") + +To build a URL, get the route and call the URL() method, passing a sequence of +key/value pairs for the route variables. For the previous route, we would do: + + url, err := r.Get("article").URL("category", "technology", "id", "42") + +...and the result will be a url.URL with the following path: + + "/articles/technology/42" + +This also works for host variables: + + r := mux.NewRouter() + r.Host("{subdomain}.domain.com"). + Path("/articles/{category}/{id:[0-9]+}"). + HandlerFunc(ArticleHandler). + Name("article") + + // url.String() will be "http://news.domain.com/articles/technology/42" + url, err := r.Get("article").URL("subdomain", "news", + "category", "technology", + "id", "42") + +All variables defined in the route are required, and their values must +conform to the corresponding patterns. These requirements guarantee that a +generated URL will always match a registered route -- the only exception is +for explicitly defined "build-only" routes which never match. + +Regex support also exists for matching Headers within a route. For example, we could do: + + r.HeadersRegexp("Content-Type", "application/(text|json)") + +...and the route will match both requests with a Content-Type of `application/json` as well as +`application/text` + +There's also a way to build only the URL host or path for a route: +use the methods URLHost() or URLPath() instead. For the previous route, +we would do: + + // "http://news.domain.com/" + host, err := r.Get("article").URLHost("subdomain", "news") + + // "/articles/technology/42" + path, err := r.Get("article").URLPath("category", "technology", "id", "42") + +And if you use subrouters, host and path defined separately can be built +as well: + + r := mux.NewRouter() + s := r.Host("{subdomain}.domain.com").Subrouter() + s.Path("/articles/{category}/{id:[0-9]+}"). + HandlerFunc(ArticleHandler). + Name("article") + + // "http://news.domain.com/articles/technology/42" + url, err := r.Get("article").URL("subdomain", "news", + "category", "technology", + "id", "42") + +## Full Example + +Here's a complete, runnable example of a small mux based server: + +```go +package main + +import ( + "net/http" + + "github.com/gorilla/mux" +) + +func YourHandler(w http.ResponseWriter, r *http.Request) { + w.Write([]byte("Gorilla!\n")) +} + +func main() { + r := mux.NewRouter() + // Routes consist of a path and a handler function. + r.HandleFunc("/", YourHandler) + + // Bind to a port and pass our router in + http.ListenAndServe(":8000", r) +} +``` + +## License + +BSD licensed. See the LICENSE file for details. diff --git a/vendor/github.com/gorilla/mux/bench_test.go b/vendor/github.com/gorilla/mux/bench_test.go new file mode 100644 index 0000000..c5f97b2 --- /dev/null +++ b/vendor/github.com/gorilla/mux/bench_test.go @@ -0,0 +1,21 @@ +// Copyright 2012 The Gorilla Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package mux + +import ( + "net/http" + "testing" +) + +func BenchmarkMux(b *testing.B) { + router := new(Router) + handler := func(w http.ResponseWriter, r *http.Request) {} + router.HandleFunc("/v1/{v1}", handler) + + request, _ := http.NewRequest("GET", "/v1/anything", nil) + for i := 0; i < b.N; i++ { + router.ServeHTTP(nil, request) + } +} diff --git a/vendor/github.com/gorilla/mux/doc.go b/vendor/github.com/gorilla/mux/doc.go new file mode 100644 index 0000000..49798cb --- /dev/null +++ b/vendor/github.com/gorilla/mux/doc.go @@ -0,0 +1,206 @@ +// Copyright 2012 The Gorilla Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/* +Package gorilla/mux implements a request router and dispatcher. + +The name mux stands for "HTTP request multiplexer". Like the standard +http.ServeMux, mux.Router matches incoming requests against a list of +registered routes and calls a handler for the route that matches the URL +or other conditions. The main features are: + + * Requests can be matched based on URL host, path, path prefix, schemes, + header and query values, HTTP methods or using custom matchers. + * URL hosts and paths can have variables with an optional regular + expression. + * Registered URLs can be built, or "reversed", which helps maintaining + references to resources. + * Routes can be used as subrouters: nested routes are only tested if the + parent route matches. This is useful to define groups of routes that + share common conditions like a host, a path prefix or other repeated + attributes. As a bonus, this optimizes request matching. + * It implements the http.Handler interface so it is compatible with the + standard http.ServeMux. + +Let's start registering a couple of URL paths and handlers: + + func main() { + r := mux.NewRouter() + r.HandleFunc("/", HomeHandler) + r.HandleFunc("/products", ProductsHandler) + r.HandleFunc("/articles", ArticlesHandler) + http.Handle("/", r) + } + +Here we register three routes mapping URL paths to handlers. This is +equivalent to how http.HandleFunc() works: if an incoming request URL matches +one of the paths, the corresponding handler is called passing +(http.ResponseWriter, *http.Request) as parameters. + +Paths can have variables. They are defined using the format {name} or +{name:pattern}. If a regular expression pattern is not defined, the matched +variable will be anything until the next slash. For example: + + r := mux.NewRouter() + r.HandleFunc("/products/{key}", ProductHandler) + r.HandleFunc("/articles/{category}/", ArticlesCategoryHandler) + r.HandleFunc("/articles/{category}/{id:[0-9]+}", ArticleHandler) + +The names are used to create a map of route variables which can be retrieved +calling mux.Vars(): + + vars := mux.Vars(request) + category := vars["category"] + +And this is all you need to know about the basic usage. More advanced options +are explained below. + +Routes can also be restricted to a domain or subdomain. Just define a host +pattern to be matched. They can also have variables: + + r := mux.NewRouter() + // Only matches if domain is "www.example.com". + r.Host("www.example.com") + // Matches a dynamic subdomain. + r.Host("{subdomain:[a-z]+}.domain.com") + +There are several other matchers that can be added. To match path prefixes: + + r.PathPrefix("/products/") + +...or HTTP methods: + + r.Methods("GET", "POST") + +...or URL schemes: + + r.Schemes("https") + +...or header values: + + r.Headers("X-Requested-With", "XMLHttpRequest") + +...or query values: + + r.Queries("key", "value") + +...or to use a custom matcher function: + + r.MatcherFunc(func(r *http.Request, rm *RouteMatch) bool { + return r.ProtoMajor == 0 + }) + +...and finally, it is possible to combine several matchers in a single route: + + r.HandleFunc("/products", ProductsHandler). + Host("www.example.com"). + Methods("GET"). + Schemes("http") + +Setting the same matching conditions again and again can be boring, so we have +a way to group several routes that share the same requirements. +We call it "subrouting". + +For example, let's say we have several URLs that should only match when the +host is "www.example.com". Create a route for that host and get a "subrouter" +from it: + + r := mux.NewRouter() + s := r.Host("www.example.com").Subrouter() + +Then register routes in the subrouter: + + s.HandleFunc("/products/", ProductsHandler) + s.HandleFunc("/products/{key}", ProductHandler) + s.HandleFunc("/articles/{category}/{id:[0-9]+}"), ArticleHandler) + +The three URL paths we registered above will only be tested if the domain is +"www.example.com", because the subrouter is tested first. This is not +only convenient, but also optimizes request matching. You can create +subrouters combining any attribute matchers accepted by a route. + +Subrouters can be used to create domain or path "namespaces": you define +subrouters in a central place and then parts of the app can register its +paths relatively to a given subrouter. + +There's one more thing about subroutes. When a subrouter has a path prefix, +the inner routes use it as base for their paths: + + r := mux.NewRouter() + s := r.PathPrefix("/products").Subrouter() + // "/products/" + s.HandleFunc("/", ProductsHandler) + // "/products/{key}/" + s.HandleFunc("/{key}/", ProductHandler) + // "/products/{key}/details" + s.HandleFunc("/{key}/details", ProductDetailsHandler) + +Now let's see how to build registered URLs. + +Routes can be named. All routes that define a name can have their URLs built, +or "reversed". We define a name calling Name() on a route. For example: + + r := mux.NewRouter() + r.HandleFunc("/articles/{category}/{id:[0-9]+}", ArticleHandler). + Name("article") + +To build a URL, get the route and call the URL() method, passing a sequence of +key/value pairs for the route variables. For the previous route, we would do: + + url, err := r.Get("article").URL("category", "technology", "id", "42") + +...and the result will be a url.URL with the following path: + + "/articles/technology/42" + +This also works for host variables: + + r := mux.NewRouter() + r.Host("{subdomain}.domain.com"). + Path("/articles/{category}/{id:[0-9]+}"). + HandlerFunc(ArticleHandler). + Name("article") + + // url.String() will be "http://news.domain.com/articles/technology/42" + url, err := r.Get("article").URL("subdomain", "news", + "category", "technology", + "id", "42") + +All variables defined in the route are required, and their values must +conform to the corresponding patterns. These requirements guarantee that a +generated URL will always match a registered route -- the only exception is +for explicitly defined "build-only" routes which never match. + +Regex support also exists for matching Headers within a route. For example, we could do: + + r.HeadersRegexp("Content-Type", "application/(text|json)") + +...and the route will match both requests with a Content-Type of `application/json` as well as +`application/text` + +There's also a way to build only the URL host or path for a route: +use the methods URLHost() or URLPath() instead. For the previous route, +we would do: + + // "http://news.domain.com/" + host, err := r.Get("article").URLHost("subdomain", "news") + + // "/articles/technology/42" + path, err := r.Get("article").URLPath("category", "technology", "id", "42") + +And if you use subrouters, host and path defined separately can be built +as well: + + r := mux.NewRouter() + s := r.Host("{subdomain}.domain.com").Subrouter() + s.Path("/articles/{category}/{id:[0-9]+}"). + HandlerFunc(ArticleHandler). + Name("article") + + // "http://news.domain.com/articles/technology/42" + url, err := r.Get("article").URL("subdomain", "news", + "category", "technology", + "id", "42") +*/ +package mux diff --git a/vendor/github.com/gorilla/mux/mux.go b/vendor/github.com/gorilla/mux/mux.go new file mode 100644 index 0000000..68c4ea5 --- /dev/null +++ b/vendor/github.com/gorilla/mux/mux.go @@ -0,0 +1,474 @@ +// Copyright 2012 The Gorilla Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package mux + +import ( + "errors" + "fmt" + "net/http" + "path" + "regexp" + + "github.com/gorilla/context" +) + +// NewRouter returns a new router instance. +func NewRouter() *Router { + return &Router{namedRoutes: make(map[string]*Route), KeepContext: false} +} + +// Router registers routes to be matched and dispatches a handler. +// +// It implements the http.Handler interface, so it can be registered to serve +// requests: +// +// var router = mux.NewRouter() +// +// func main() { +// http.Handle("/", router) +// } +// +// Or, for Google App Engine, register it in a init() function: +// +// func init() { +// http.Handle("/", router) +// } +// +// This will send all incoming requests to the router. +type Router struct { + // Configurable Handler to be used when no route matches. + NotFoundHandler http.Handler + // Parent route, if this is a subrouter. + parent parentRoute + // Routes to be matched, in order. + routes []*Route + // Routes by name for URL building. + namedRoutes map[string]*Route + // See Router.StrictSlash(). This defines the flag for new routes. + strictSlash bool + // If true, do not clear the request context after handling the request + KeepContext bool +} + +// Match matches registered routes against the request. +func (r *Router) Match(req *http.Request, match *RouteMatch) bool { + for _, route := range r.routes { + if route.Match(req, match) { + return true + } + } + return false +} + +// ServeHTTP dispatches the handler registered in the matched route. +// +// When there is a match, the route variables can be retrieved calling +// mux.Vars(request). +func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request) { + // Clean path to canonical form and redirect. + if p := cleanPath(req.URL.Path); p != req.URL.Path { + + // Added 3 lines (Philip Schlump) - It was dropping the query string and #whatever from query. + // This matches with fix in go 1.2 r.c. 4 for same problem. Go Issue: + // http://code.google.com/p/go/issues/detail?id=5252 + url := *req.URL + url.Path = p + p = url.String() + + w.Header().Set("Location", p) + w.WriteHeader(http.StatusMovedPermanently) + return + } + var match RouteMatch + var handler http.Handler + if r.Match(req, &match) { + handler = match.Handler + setVars(req, match.Vars) + setCurrentRoute(req, match.Route) + } + if handler == nil { + handler = r.NotFoundHandler + if handler == nil { + handler = http.NotFoundHandler() + } + } + if !r.KeepContext { + defer context.Clear(req) + } + handler.ServeHTTP(w, req) +} + +// Get returns a route registered with the given name. +func (r *Router) Get(name string) *Route { + return r.getNamedRoutes()[name] +} + +// GetRoute returns a route registered with the given name. This method +// was renamed to Get() and remains here for backwards compatibility. +func (r *Router) GetRoute(name string) *Route { + return r.getNamedRoutes()[name] +} + +// StrictSlash defines the trailing slash behavior for new routes. The initial +// value is false. +// +// When true, if the route path is "/path/", accessing "/path" will redirect +// to the former and vice versa. In other words, your application will always +// see the path as specified in the route. +// +// When false, if the route path is "/path", accessing "/path/" will not match +// this route and vice versa. +// +// Special case: when a route sets a path prefix using the PathPrefix() method, +// strict slash is ignored for that route because the redirect behavior can't +// be determined from a prefix alone. However, any subrouters created from that +// route inherit the original StrictSlash setting. +func (r *Router) StrictSlash(value bool) *Router { + r.strictSlash = value + return r +} + +// ---------------------------------------------------------------------------- +// parentRoute +// ---------------------------------------------------------------------------- + +// getNamedRoutes returns the map where named routes are registered. +func (r *Router) getNamedRoutes() map[string]*Route { + if r.namedRoutes == nil { + if r.parent != nil { + r.namedRoutes = r.parent.getNamedRoutes() + } else { + r.namedRoutes = make(map[string]*Route) + } + } + return r.namedRoutes +} + +// getRegexpGroup returns regexp definitions from the parent route, if any. +func (r *Router) getRegexpGroup() *routeRegexpGroup { + if r.parent != nil { + return r.parent.getRegexpGroup() + } + return nil +} + +func (r *Router) buildVars(m map[string]string) map[string]string { + if r.parent != nil { + m = r.parent.buildVars(m) + } + return m +} + +// ---------------------------------------------------------------------------- +// Route factories +// ---------------------------------------------------------------------------- + +// NewRoute registers an empty route. +func (r *Router) NewRoute() *Route { + route := &Route{parent: r, strictSlash: r.strictSlash} + r.routes = append(r.routes, route) + return route +} + +// Handle registers a new route with a matcher for the URL path. +// See Route.Path() and Route.Handler(). +func (r *Router) Handle(path string, handler http.Handler) *Route { + return r.NewRoute().Path(path).Handler(handler) +} + +// HandleFunc registers a new route with a matcher for the URL path. +// See Route.Path() and Route.HandlerFunc(). +func (r *Router) HandleFunc(path string, f func(http.ResponseWriter, + *http.Request)) *Route { + return r.NewRoute().Path(path).HandlerFunc(f) +} + +// Headers registers a new route with a matcher for request header values. +// See Route.Headers(). +func (r *Router) Headers(pairs ...string) *Route { + return r.NewRoute().Headers(pairs...) +} + +// Host registers a new route with a matcher for the URL host. +// See Route.Host(). +func (r *Router) Host(tpl string) *Route { + return r.NewRoute().Host(tpl) +} + +// MatcherFunc registers a new route with a custom matcher function. +// See Route.MatcherFunc(). +func (r *Router) MatcherFunc(f MatcherFunc) *Route { + return r.NewRoute().MatcherFunc(f) +} + +// Methods registers a new route with a matcher for HTTP methods. +// See Route.Methods(). +func (r *Router) Methods(methods ...string) *Route { + return r.NewRoute().Methods(methods...) +} + +// Path registers a new route with a matcher for the URL path. +// See Route.Path(). +func (r *Router) Path(tpl string) *Route { + return r.NewRoute().Path(tpl) +} + +// PathPrefix registers a new route with a matcher for the URL path prefix. +// See Route.PathPrefix(). +func (r *Router) PathPrefix(tpl string) *Route { + return r.NewRoute().PathPrefix(tpl) +} + +// Queries registers a new route with a matcher for URL query values. +// See Route.Queries(). +func (r *Router) Queries(pairs ...string) *Route { + return r.NewRoute().Queries(pairs...) +} + +// Schemes registers a new route with a matcher for URL schemes. +// See Route.Schemes(). +func (r *Router) Schemes(schemes ...string) *Route { + return r.NewRoute().Schemes(schemes...) +} + +// BuildVars registers a new route with a custom function for modifying +// route variables before building a URL. +func (r *Router) BuildVarsFunc(f BuildVarsFunc) *Route { + return r.NewRoute().BuildVarsFunc(f) +} + +// Walk walks the router and all its sub-routers, calling walkFn for each route +// in the tree. The routes are walked in the order they were added. Sub-routers +// are explored depth-first. +func (r *Router) Walk(walkFn WalkFunc) error { + return r.walk(walkFn, []*Route{}) +} + +// SkipRouter is used as a return value from WalkFuncs to indicate that the +// router that walk is about to descend down to should be skipped. +var SkipRouter = errors.New("skip this router") + +// WalkFunc is the type of the function called for each route visited by Walk. +// At every invocation, it is given the current route, and the current router, +// and a list of ancestor routes that lead to the current route. +type WalkFunc func(route *Route, router *Router, ancestors []*Route) error + +func (r *Router) walk(walkFn WalkFunc, ancestors []*Route) error { + for _, t := range r.routes { + if t.regexp == nil || t.regexp.path == nil || t.regexp.path.template == "" { + continue + } + + err := walkFn(t, r, ancestors) + if err == SkipRouter { + continue + } + for _, sr := range t.matchers { + if h, ok := sr.(*Router); ok { + err := h.walk(walkFn, ancestors) + if err != nil { + return err + } + } + } + if h, ok := t.handler.(*Router); ok { + ancestors = append(ancestors, t) + err := h.walk(walkFn, ancestors) + if err != nil { + return err + } + ancestors = ancestors[:len(ancestors)-1] + } + } + return nil +} + +// ---------------------------------------------------------------------------- +// Context +// ---------------------------------------------------------------------------- + +// RouteMatch stores information about a matched route. +type RouteMatch struct { + Route *Route + Handler http.Handler + Vars map[string]string +} + +type contextKey int + +const ( + varsKey contextKey = iota + routeKey +) + +// Vars returns the route variables for the current request, if any. +func Vars(r *http.Request) map[string]string { + if rv := context.Get(r, varsKey); rv != nil { + return rv.(map[string]string) + } + return nil +} + +// CurrentRoute returns the matched route for the current request, if any. +// This only works when called inside the handler of the matched route +// because the matched route is stored in the request context which is cleared +// after the handler returns, unless the KeepContext option is set on the +// Router. +func CurrentRoute(r *http.Request) *Route { + if rv := context.Get(r, routeKey); rv != nil { + return rv.(*Route) + } + return nil +} + +func setVars(r *http.Request, val interface{}) { + context.Set(r, varsKey, val) +} + +func setCurrentRoute(r *http.Request, val interface{}) { + context.Set(r, routeKey, val) +} + +// ---------------------------------------------------------------------------- +// Helpers +// ---------------------------------------------------------------------------- + +// cleanPath returns the canonical path for p, eliminating . and .. elements. +// Borrowed from the net/http package. +func cleanPath(p string) string { + if p == "" { + return "/" + } + if p[0] != '/' { + p = "/" + p + } + np := path.Clean(p) + // path.Clean removes trailing slash except for root; + // put the trailing slash back if necessary. + if p[len(p)-1] == '/' && np != "/" { + np += "/" + } + return np +} + +// uniqueVars returns an error if two slices contain duplicated strings. +func uniqueVars(s1, s2 []string) error { + for _, v1 := range s1 { + for _, v2 := range s2 { + if v1 == v2 { + return fmt.Errorf("mux: duplicated route variable %q", v2) + } + } + } + return nil +} + +// checkPairs returns the count of strings passed in, and an error if +// the count is not an even number. +func checkPairs(pairs ...string) (int, error) { + length := len(pairs) + if length%2 != 0 { + return length, fmt.Errorf( + "mux: number of parameters must be multiple of 2, got %v", pairs) + } + return length, nil +} + +// mapFromPairsToString converts variadic string parameters to a +// string to string map. +func mapFromPairsToString(pairs ...string) (map[string]string, error) { + length, err := checkPairs(pairs...) + if err != nil { + return nil, err + } + m := make(map[string]string, length/2) + for i := 0; i < length; i += 2 { + m[pairs[i]] = pairs[i+1] + } + return m, nil +} + +// mapFromPairsToRegex converts variadic string paramers to a +// string to regex map. +func mapFromPairsToRegex(pairs ...string) (map[string]*regexp.Regexp, error) { + length, err := checkPairs(pairs...) + if err != nil { + return nil, err + } + m := make(map[string]*regexp.Regexp, length/2) + for i := 0; i < length; i += 2 { + regex, err := regexp.Compile(pairs[i+1]) + if err != nil { + return nil, err + } + m[pairs[i]] = regex + } + return m, nil +} + +// matchInArray returns true if the given string value is in the array. +func matchInArray(arr []string, value string) bool { + for _, v := range arr { + if v == value { + return true + } + } + return false +} + +// matchMapWithString returns true if the given key/value pairs exist in a given map. +func matchMapWithString(toCheck map[string]string, toMatch map[string][]string, canonicalKey bool) bool { + for k, v := range toCheck { + // Check if key exists. + if canonicalKey { + k = http.CanonicalHeaderKey(k) + } + if values := toMatch[k]; values == nil { + return false + } else if v != "" { + // If value was defined as an empty string we only check that the + // key exists. Otherwise we also check for equality. + valueExists := false + for _, value := range values { + if v == value { + valueExists = true + break + } + } + if !valueExists { + return false + } + } + } + return true +} + +// matchMapWithRegex returns true if the given key/value pairs exist in a given map compiled against +// the given regex +func matchMapWithRegex(toCheck map[string]*regexp.Regexp, toMatch map[string][]string, canonicalKey bool) bool { + for k, v := range toCheck { + // Check if key exists. + if canonicalKey { + k = http.CanonicalHeaderKey(k) + } + if values := toMatch[k]; values == nil { + return false + } else if v != nil { + // If value was defined as an empty string we only check that the + // key exists. Otherwise we also check for equality. + valueExists := false + for _, value := range values { + if v.MatchString(value) { + valueExists = true + break + } + } + if !valueExists { + return false + } + } + } + return true +} diff --git a/vendor/github.com/gorilla/mux/mux_test.go b/vendor/github.com/gorilla/mux/mux_test.go new file mode 100644 index 0000000..d1eae92 --- /dev/null +++ b/vendor/github.com/gorilla/mux/mux_test.go @@ -0,0 +1,1334 @@ +// Copyright 2012 The Gorilla Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package mux + +import ( + "fmt" + "net/http" + "strings" + "testing" + + "github.com/gorilla/context" +) + +func (r *Route) GoString() string { + matchers := make([]string, len(r.matchers)) + for i, m := range r.matchers { + matchers[i] = fmt.Sprintf("%#v", m) + } + return fmt.Sprintf("&Route{matchers:[]matcher{%s}}", strings.Join(matchers, ", ")) +} + +func (r *routeRegexp) GoString() string { + return fmt.Sprintf("&routeRegexp{template: %q, matchHost: %t, matchQuery: %t, strictSlash: %t, regexp: regexp.MustCompile(%q), reverse: %q, varsN: %v, varsR: %v", r.template, r.matchHost, r.matchQuery, r.strictSlash, r.regexp.String(), r.reverse, r.varsN, r.varsR) +} + +type routeTest struct { + title string // title of the test + route *Route // the route being tested + request *http.Request // a request to test the route + vars map[string]string // the expected vars of the match + host string // the expected host of the match + path string // the expected path of the match + shouldMatch bool // whether the request is expected to match the route at all + shouldRedirect bool // whether the request should result in a redirect +} + +func TestHost(t *testing.T) { + // newRequestHost a new request with a method, url, and host header + newRequestHost := func(method, url, host string) *http.Request { + req, err := http.NewRequest(method, url, nil) + if err != nil { + panic(err) + } + req.Host = host + return req + } + + tests := []routeTest{ + { + title: "Host route match", + route: new(Route).Host("aaa.bbb.ccc"), + request: newRequest("GET", "http://aaa.bbb.ccc/111/222/333"), + vars: map[string]string{}, + host: "aaa.bbb.ccc", + path: "", + shouldMatch: true, + }, + { + title: "Host route, wrong host in request URL", + route: new(Route).Host("aaa.bbb.ccc"), + request: newRequest("GET", "http://aaa.222.ccc/111/222/333"), + vars: map[string]string{}, + host: "aaa.bbb.ccc", + path: "", + shouldMatch: false, + }, + { + title: "Host route with port, match", + route: new(Route).Host("aaa.bbb.ccc:1234"), + request: newRequest("GET", "http://aaa.bbb.ccc:1234/111/222/333"), + vars: map[string]string{}, + host: "aaa.bbb.ccc:1234", + path: "", + shouldMatch: true, + }, + { + title: "Host route with port, wrong port in request URL", + route: new(Route).Host("aaa.bbb.ccc:1234"), + request: newRequest("GET", "http://aaa.bbb.ccc:9999/111/222/333"), + vars: map[string]string{}, + host: "aaa.bbb.ccc:1234", + path: "", + shouldMatch: false, + }, + { + title: "Host route, match with host in request header", + route: new(Route).Host("aaa.bbb.ccc"), + request: newRequestHost("GET", "/111/222/333", "aaa.bbb.ccc"), + vars: map[string]string{}, + host: "aaa.bbb.ccc", + path: "", + shouldMatch: true, + }, + { + title: "Host route, wrong host in request header", + route: new(Route).Host("aaa.bbb.ccc"), + request: newRequestHost("GET", "/111/222/333", "aaa.222.ccc"), + vars: map[string]string{}, + host: "aaa.bbb.ccc", + path: "", + shouldMatch: false, + }, + // BUG {new(Route).Host("aaa.bbb.ccc:1234"), newRequestHost("GET", "/111/222/333", "aaa.bbb.ccc:1234"), map[string]string{}, "aaa.bbb.ccc:1234", "", true}, + { + title: "Host route with port, wrong host in request header", + route: new(Route).Host("aaa.bbb.ccc:1234"), + request: newRequestHost("GET", "/111/222/333", "aaa.bbb.ccc:9999"), + vars: map[string]string{}, + host: "aaa.bbb.ccc:1234", + path: "", + shouldMatch: false, + }, + { + title: "Host route with pattern, match", + route: new(Route).Host("aaa.{v1:[a-z]{3}}.ccc"), + request: newRequest("GET", "http://aaa.bbb.ccc/111/222/333"), + vars: map[string]string{"v1": "bbb"}, + host: "aaa.bbb.ccc", + path: "", + shouldMatch: true, + }, + { + title: "Host route with pattern, additional capturing group, match", + route: new(Route).Host("aaa.{v1:[a-z]{2}(b|c)}.ccc"), + request: newRequest("GET", "http://aaa.bbb.ccc/111/222/333"), + vars: map[string]string{"v1": "bbb"}, + host: "aaa.bbb.ccc", + path: "", + shouldMatch: true, + }, + { + title: "Host route with pattern, wrong host in request URL", + route: new(Route).Host("aaa.{v1:[a-z]{3}}.ccc"), + request: newRequest("GET", "http://aaa.222.ccc/111/222/333"), + vars: map[string]string{"v1": "bbb"}, + host: "aaa.bbb.ccc", + path: "", + shouldMatch: false, + }, + { + title: "Host route with multiple patterns, match", + route: new(Route).Host("{v1:[a-z]{3}}.{v2:[a-z]{3}}.{v3:[a-z]{3}}"), + request: newRequest("GET", "http://aaa.bbb.ccc/111/222/333"), + vars: map[string]string{"v1": "aaa", "v2": "bbb", "v3": "ccc"}, + host: "aaa.bbb.ccc", + path: "", + shouldMatch: true, + }, + { + title: "Host route with multiple patterns, wrong host in request URL", + route: new(Route).Host("{v1:[a-z]{3}}.{v2:[a-z]{3}}.{v3:[a-z]{3}}"), + request: newRequest("GET", "http://aaa.222.ccc/111/222/333"), + vars: map[string]string{"v1": "aaa", "v2": "bbb", "v3": "ccc"}, + host: "aaa.bbb.ccc", + path: "", + shouldMatch: false, + }, + { + title: "Host route with hyphenated name and pattern, match", + route: new(Route).Host("aaa.{v-1:[a-z]{3}}.ccc"), + request: newRequest("GET", "http://aaa.bbb.ccc/111/222/333"), + vars: map[string]string{"v-1": "bbb"}, + host: "aaa.bbb.ccc", + path: "", + shouldMatch: true, + }, + { + title: "Host route with hyphenated name and pattern, additional capturing group, match", + route: new(Route).Host("aaa.{v-1:[a-z]{2}(b|c)}.ccc"), + request: newRequest("GET", "http://aaa.bbb.ccc/111/222/333"), + vars: map[string]string{"v-1": "bbb"}, + host: "aaa.bbb.ccc", + path: "", + shouldMatch: true, + }, + { + title: "Host route with multiple hyphenated names and patterns, match", + route: new(Route).Host("{v-1:[a-z]{3}}.{v-2:[a-z]{3}}.{v-3:[a-z]{3}}"), + request: newRequest("GET", "http://aaa.bbb.ccc/111/222/333"), + vars: map[string]string{"v-1": "aaa", "v-2": "bbb", "v-3": "ccc"}, + host: "aaa.bbb.ccc", + path: "", + shouldMatch: true, + }, + { + title: "Path route with single pattern with pipe, match", + route: new(Route).Path("/{category:a|b/c}"), + request: newRequest("GET", "http://localhost/a"), + vars: map[string]string{"category": "a"}, + host: "", + path: "/a", + shouldMatch: true, + }, + { + title: "Path route with single pattern with pipe, match", + route: new(Route).Path("/{category:a|b/c}"), + request: newRequest("GET", "http://localhost/b/c"), + vars: map[string]string{"category": "b/c"}, + host: "", + path: "/b/c", + shouldMatch: true, + }, + { + title: "Path route with multiple patterns with pipe, match", + route: new(Route).Path("/{category:a|b/c}/{product}/{id:[0-9]+}"), + request: newRequest("GET", "http://localhost/a/product_name/1"), + vars: map[string]string{"category": "a", "product": "product_name", "id": "1"}, + host: "", + path: "/a/product_name/1", + shouldMatch: true, + }, + { + title: "Path route with multiple patterns with pipe, match", + route: new(Route).Path("/{category:a|b/c}/{product}/{id:[0-9]+}"), + request: newRequest("GET", "http://localhost/b/c/product_name/1"), + vars: map[string]string{"category": "b/c", "product": "product_name", "id": "1"}, + host: "", + path: "/b/c/product_name/1", + shouldMatch: true, + }, + } + for _, test := range tests { + testRoute(t, test) + } +} + +func TestPath(t *testing.T) { + tests := []routeTest{ + { + title: "Path route, match", + route: new(Route).Path("/111/222/333"), + request: newRequest("GET", "http://localhost/111/222/333"), + vars: map[string]string{}, + host: "", + path: "/111/222/333", + shouldMatch: true, + }, + { + title: "Path route, match with trailing slash in request and path", + route: new(Route).Path("/111/"), + request: newRequest("GET", "http://localhost/111/"), + vars: map[string]string{}, + host: "", + path: "/111/", + shouldMatch: true, + }, + { + title: "Path route, do not match with trailing slash in path", + route: new(Route).Path("/111/"), + request: newRequest("GET", "http://localhost/111"), + vars: map[string]string{}, + host: "", + path: "/111", + shouldMatch: false, + }, + { + title: "Path route, do not match with trailing slash in request", + route: new(Route).Path("/111"), + request: newRequest("GET", "http://localhost/111/"), + vars: map[string]string{}, + host: "", + path: "/111/", + shouldMatch: false, + }, + { + title: "Path route, wrong path in request in request URL", + route: new(Route).Path("/111/222/333"), + request: newRequest("GET", "http://localhost/1/2/3"), + vars: map[string]string{}, + host: "", + path: "/111/222/333", + shouldMatch: false, + }, + { + title: "Path route with pattern, match", + route: new(Route).Path("/111/{v1:[0-9]{3}}/333"), + request: newRequest("GET", "http://localhost/111/222/333"), + vars: map[string]string{"v1": "222"}, + host: "", + path: "/111/222/333", + shouldMatch: true, + }, + { + title: "Path route with pattern, URL in request does not match", + route: new(Route).Path("/111/{v1:[0-9]{3}}/333"), + request: newRequest("GET", "http://localhost/111/aaa/333"), + vars: map[string]string{"v1": "222"}, + host: "", + path: "/111/222/333", + shouldMatch: false, + }, + { + title: "Path route with multiple patterns, match", + route: new(Route).Path("/{v1:[0-9]{3}}/{v2:[0-9]{3}}/{v3:[0-9]{3}}"), + request: newRequest("GET", "http://localhost/111/222/333"), + vars: map[string]string{"v1": "111", "v2": "222", "v3": "333"}, + host: "", + path: "/111/222/333", + shouldMatch: true, + }, + { + title: "Path route with multiple patterns, URL in request does not match", + route: new(Route).Path("/{v1:[0-9]{3}}/{v2:[0-9]{3}}/{v3:[0-9]{3}}"), + request: newRequest("GET", "http://localhost/111/aaa/333"), + vars: map[string]string{"v1": "111", "v2": "222", "v3": "333"}, + host: "", + path: "/111/222/333", + shouldMatch: false, + }, + { + title: "Path route with multiple patterns with pipe, match", + route: new(Route).Path("/{category:a|(b/c)}/{product}/{id:[0-9]+}"), + request: newRequest("GET", "http://localhost/a/product_name/1"), + vars: map[string]string{"category": "a", "product": "product_name", "id": "1"}, + host: "", + path: "/a/product_name/1", + shouldMatch: true, + }, + { + title: "Path route with hyphenated name and pattern, match", + route: new(Route).Path("/111/{v-1:[0-9]{3}}/333"), + request: newRequest("GET", "http://localhost/111/222/333"), + vars: map[string]string{"v-1": "222"}, + host: "", + path: "/111/222/333", + shouldMatch: true, + }, + { + title: "Path route with multiple hyphenated names and patterns, match", + route: new(Route).Path("/{v-1:[0-9]{3}}/{v-2:[0-9]{3}}/{v-3:[0-9]{3}}"), + request: newRequest("GET", "http://localhost/111/222/333"), + vars: map[string]string{"v-1": "111", "v-2": "222", "v-3": "333"}, + host: "", + path: "/111/222/333", + shouldMatch: true, + }, + { + title: "Path route with multiple hyphenated names and patterns with pipe, match", + route: new(Route).Path("/{product-category:a|(b/c)}/{product-name}/{product-id:[0-9]+}"), + request: newRequest("GET", "http://localhost/a/product_name/1"), + vars: map[string]string{"product-category": "a", "product-name": "product_name", "product-id": "1"}, + host: "", + path: "/a/product_name/1", + shouldMatch: true, + }, + } + + for _, test := range tests { + testRoute(t, test) + } +} + +func TestPathPrefix(t *testing.T) { + tests := []routeTest{ + { + title: "PathPrefix route, match", + route: new(Route).PathPrefix("/111"), + request: newRequest("GET", "http://localhost/111/222/333"), + vars: map[string]string{}, + host: "", + path: "/111", + shouldMatch: true, + }, + { + title: "PathPrefix route, match substring", + route: new(Route).PathPrefix("/1"), + request: newRequest("GET", "http://localhost/111/222/333"), + vars: map[string]string{}, + host: "", + path: "/1", + shouldMatch: true, + }, + { + title: "PathPrefix route, URL prefix in request does not match", + route: new(Route).PathPrefix("/111"), + request: newRequest("GET", "http://localhost/1/2/3"), + vars: map[string]string{}, + host: "", + path: "/111", + shouldMatch: false, + }, + { + title: "PathPrefix route with pattern, match", + route: new(Route).PathPrefix("/111/{v1:[0-9]{3}}"), + request: newRequest("GET", "http://localhost/111/222/333"), + vars: map[string]string{"v1": "222"}, + host: "", + path: "/111/222", + shouldMatch: true, + }, + { + title: "PathPrefix route with pattern, URL prefix in request does not match", + route: new(Route).PathPrefix("/111/{v1:[0-9]{3}}"), + request: newRequest("GET", "http://localhost/111/aaa/333"), + vars: map[string]string{"v1": "222"}, + host: "", + path: "/111/222", + shouldMatch: false, + }, + { + title: "PathPrefix route with multiple patterns, match", + route: new(Route).PathPrefix("/{v1:[0-9]{3}}/{v2:[0-9]{3}}"), + request: newRequest("GET", "http://localhost/111/222/333"), + vars: map[string]string{"v1": "111", "v2": "222"}, + host: "", + path: "/111/222", + shouldMatch: true, + }, + { + title: "PathPrefix route with multiple patterns, URL prefix in request does not match", + route: new(Route).PathPrefix("/{v1:[0-9]{3}}/{v2:[0-9]{3}}"), + request: newRequest("GET", "http://localhost/111/aaa/333"), + vars: map[string]string{"v1": "111", "v2": "222"}, + host: "", + path: "/111/222", + shouldMatch: false, + }, + } + + for _, test := range tests { + testRoute(t, test) + } +} + +func TestHostPath(t *testing.T) { + tests := []routeTest{ + { + title: "Host and Path route, match", + route: new(Route).Host("aaa.bbb.ccc").Path("/111/222/333"), + request: newRequest("GET", "http://aaa.bbb.ccc/111/222/333"), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: true, + }, + { + title: "Host and Path route, wrong host in request URL", + route: new(Route).Host("aaa.bbb.ccc").Path("/111/222/333"), + request: newRequest("GET", "http://aaa.222.ccc/111/222/333"), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: false, + }, + { + title: "Host and Path route with pattern, match", + route: new(Route).Host("aaa.{v1:[a-z]{3}}.ccc").Path("/111/{v2:[0-9]{3}}/333"), + request: newRequest("GET", "http://aaa.bbb.ccc/111/222/333"), + vars: map[string]string{"v1": "bbb", "v2": "222"}, + host: "aaa.bbb.ccc", + path: "/111/222/333", + shouldMatch: true, + }, + { + title: "Host and Path route with pattern, URL in request does not match", + route: new(Route).Host("aaa.{v1:[a-z]{3}}.ccc").Path("/111/{v2:[0-9]{3}}/333"), + request: newRequest("GET", "http://aaa.222.ccc/111/222/333"), + vars: map[string]string{"v1": "bbb", "v2": "222"}, + host: "aaa.bbb.ccc", + path: "/111/222/333", + shouldMatch: false, + }, + { + title: "Host and Path route with multiple patterns, match", + route: new(Route).Host("{v1:[a-z]{3}}.{v2:[a-z]{3}}.{v3:[a-z]{3}}").Path("/{v4:[0-9]{3}}/{v5:[0-9]{3}}/{v6:[0-9]{3}}"), + request: newRequest("GET", "http://aaa.bbb.ccc/111/222/333"), + vars: map[string]string{"v1": "aaa", "v2": "bbb", "v3": "ccc", "v4": "111", "v5": "222", "v6": "333"}, + host: "aaa.bbb.ccc", + path: "/111/222/333", + shouldMatch: true, + }, + { + title: "Host and Path route with multiple patterns, URL in request does not match", + route: new(Route).Host("{v1:[a-z]{3}}.{v2:[a-z]{3}}.{v3:[a-z]{3}}").Path("/{v4:[0-9]{3}}/{v5:[0-9]{3}}/{v6:[0-9]{3}}"), + request: newRequest("GET", "http://aaa.222.ccc/111/222/333"), + vars: map[string]string{"v1": "aaa", "v2": "bbb", "v3": "ccc", "v4": "111", "v5": "222", "v6": "333"}, + host: "aaa.bbb.ccc", + path: "/111/222/333", + shouldMatch: false, + }, + } + + for _, test := range tests { + testRoute(t, test) + } +} + +func TestHeaders(t *testing.T) { + // newRequestHeaders creates a new request with a method, url, and headers + newRequestHeaders := func(method, url string, headers map[string]string) *http.Request { + req, err := http.NewRequest(method, url, nil) + if err != nil { + panic(err) + } + for k, v := range headers { + req.Header.Add(k, v) + } + return req + } + + tests := []routeTest{ + { + title: "Headers route, match", + route: new(Route).Headers("foo", "bar", "baz", "ding"), + request: newRequestHeaders("GET", "http://localhost", map[string]string{"foo": "bar", "baz": "ding"}), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: true, + }, + { + title: "Headers route, bad header values", + route: new(Route).Headers("foo", "bar", "baz", "ding"), + request: newRequestHeaders("GET", "http://localhost", map[string]string{"foo": "bar", "baz": "dong"}), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: false, + }, + { + title: "Headers route, regex header values to match", + route: new(Route).Headers("foo", "ba[zr]"), + request: newRequestHeaders("GET", "http://localhost", map[string]string{"foo": "bar"}), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: false, + }, + { + title: "Headers route, regex header values to match", + route: new(Route).HeadersRegexp("foo", "ba[zr]"), + request: newRequestHeaders("GET", "http://localhost", map[string]string{"foo": "baz"}), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: true, + }, + } + + for _, test := range tests { + testRoute(t, test) + } + +} + +func TestMethods(t *testing.T) { + tests := []routeTest{ + { + title: "Methods route, match GET", + route: new(Route).Methods("GET", "POST"), + request: newRequest("GET", "http://localhost"), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: true, + }, + { + title: "Methods route, match POST", + route: new(Route).Methods("GET", "POST"), + request: newRequest("POST", "http://localhost"), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: true, + }, + { + title: "Methods route, bad method", + route: new(Route).Methods("GET", "POST"), + request: newRequest("PUT", "http://localhost"), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: false, + }, + } + + for _, test := range tests { + testRoute(t, test) + } +} + +func TestQueries(t *testing.T) { + tests := []routeTest{ + { + title: "Queries route, match", + route: new(Route).Queries("foo", "bar", "baz", "ding"), + request: newRequest("GET", "http://localhost?foo=bar&baz=ding"), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: true, + }, + { + title: "Queries route, match with a query string", + route: new(Route).Host("www.example.com").Path("/api").Queries("foo", "bar", "baz", "ding"), + request: newRequest("GET", "http://www.example.com/api?foo=bar&baz=ding"), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: true, + }, + { + title: "Queries route, match with a query string out of order", + route: new(Route).Host("www.example.com").Path("/api").Queries("foo", "bar", "baz", "ding"), + request: newRequest("GET", "http://www.example.com/api?baz=ding&foo=bar"), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: true, + }, + { + title: "Queries route, bad query", + route: new(Route).Queries("foo", "bar", "baz", "ding"), + request: newRequest("GET", "http://localhost?foo=bar&baz=dong"), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: false, + }, + { + title: "Queries route with pattern, match", + route: new(Route).Queries("foo", "{v1}"), + request: newRequest("GET", "http://localhost?foo=bar"), + vars: map[string]string{"v1": "bar"}, + host: "", + path: "", + shouldMatch: true, + }, + { + title: "Queries route with multiple patterns, match", + route: new(Route).Queries("foo", "{v1}", "baz", "{v2}"), + request: newRequest("GET", "http://localhost?foo=bar&baz=ding"), + vars: map[string]string{"v1": "bar", "v2": "ding"}, + host: "", + path: "", + shouldMatch: true, + }, + { + title: "Queries route with regexp pattern, match", + route: new(Route).Queries("foo", "{v1:[0-9]+}"), + request: newRequest("GET", "http://localhost?foo=10"), + vars: map[string]string{"v1": "10"}, + host: "", + path: "", + shouldMatch: true, + }, + { + title: "Queries route with regexp pattern, regexp does not match", + route: new(Route).Queries("foo", "{v1:[0-9]+}"), + request: newRequest("GET", "http://localhost?foo=a"), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: false, + }, + { + title: "Queries route with regexp pattern with quantifier, match", + route: new(Route).Queries("foo", "{v1:[0-9]{1}}"), + request: newRequest("GET", "http://localhost?foo=1"), + vars: map[string]string{"v1": "1"}, + host: "", + path: "", + shouldMatch: true, + }, + { + title: "Queries route with regexp pattern with quantifier, additional variable in query string, match", + route: new(Route).Queries("foo", "{v1:[0-9]{1}}"), + request: newRequest("GET", "http://localhost?bar=2&foo=1"), + vars: map[string]string{"v1": "1"}, + host: "", + path: "", + shouldMatch: true, + }, + { + title: "Queries route with regexp pattern with quantifier, regexp does not match", + route: new(Route).Queries("foo", "{v1:[0-9]{1}}"), + request: newRequest("GET", "http://localhost?foo=12"), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: false, + }, + { + title: "Queries route with regexp pattern with quantifier, additional capturing group", + route: new(Route).Queries("foo", "{v1:[0-9]{1}(a|b)}"), + request: newRequest("GET", "http://localhost?foo=1a"), + vars: map[string]string{"v1": "1a"}, + host: "", + path: "", + shouldMatch: true, + }, + { + title: "Queries route with regexp pattern with quantifier, additional variable in query string, regexp does not match", + route: new(Route).Queries("foo", "{v1:[0-9]{1}}"), + request: newRequest("GET", "http://localhost?foo=12"), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: false, + }, + { + title: "Queries route with hyphenated name, match", + route: new(Route).Queries("foo", "{v-1}"), + request: newRequest("GET", "http://localhost?foo=bar"), + vars: map[string]string{"v-1": "bar"}, + host: "", + path: "", + shouldMatch: true, + }, + { + title: "Queries route with multiple hyphenated names, match", + route: new(Route).Queries("foo", "{v-1}", "baz", "{v-2}"), + request: newRequest("GET", "http://localhost?foo=bar&baz=ding"), + vars: map[string]string{"v-1": "bar", "v-2": "ding"}, + host: "", + path: "", + shouldMatch: true, + }, + { + title: "Queries route with hyphenate name and pattern, match", + route: new(Route).Queries("foo", "{v-1:[0-9]+}"), + request: newRequest("GET", "http://localhost?foo=10"), + vars: map[string]string{"v-1": "10"}, + host: "", + path: "", + shouldMatch: true, + }, + { + title: "Queries route with hyphenated name and pattern with quantifier, additional capturing group", + route: new(Route).Queries("foo", "{v-1:[0-9]{1}(a|b)}"), + request: newRequest("GET", "http://localhost?foo=1a"), + vars: map[string]string{"v-1": "1a"}, + host: "", + path: "", + shouldMatch: true, + }, + { + title: "Queries route with empty value, should match", + route: new(Route).Queries("foo", ""), + request: newRequest("GET", "http://localhost?foo=bar"), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: true, + }, + { + title: "Queries route with empty value and no parameter in request, should not match", + route: new(Route).Queries("foo", ""), + request: newRequest("GET", "http://localhost"), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: false, + }, + { + title: "Queries route with empty value and empty parameter in request, should match", + route: new(Route).Queries("foo", ""), + request: newRequest("GET", "http://localhost?foo="), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: true, + }, + { + title: "Queries route with overlapping value, should not match", + route: new(Route).Queries("foo", "bar"), + request: newRequest("GET", "http://localhost?foo=barfoo"), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: false, + }, + { + title: "Queries route with no parameter in request, should not match", + route: new(Route).Queries("foo", "{bar}"), + request: newRequest("GET", "http://localhost"), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: false, + }, + { + title: "Queries route with empty parameter in request, should match", + route: new(Route).Queries("foo", "{bar}"), + request: newRequest("GET", "http://localhost?foo="), + vars: map[string]string{"foo": ""}, + host: "", + path: "", + shouldMatch: true, + }, + { + title: "Queries route, bad submatch", + route: new(Route).Queries("foo", "bar", "baz", "ding"), + request: newRequest("GET", "http://localhost?fffoo=bar&baz=dingggg"), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: false, + }, + } + + for _, test := range tests { + testRoute(t, test) + } +} + +func TestSchemes(t *testing.T) { + tests := []routeTest{ + // Schemes + { + title: "Schemes route, match https", + route: new(Route).Schemes("https", "ftp"), + request: newRequest("GET", "https://localhost"), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: true, + }, + { + title: "Schemes route, match ftp", + route: new(Route).Schemes("https", "ftp"), + request: newRequest("GET", "ftp://localhost"), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: true, + }, + { + title: "Schemes route, bad scheme", + route: new(Route).Schemes("https", "ftp"), + request: newRequest("GET", "http://localhost"), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: false, + }, + } + for _, test := range tests { + testRoute(t, test) + } +} + +func TestMatcherFunc(t *testing.T) { + m := func(r *http.Request, m *RouteMatch) bool { + if r.URL.Host == "aaa.bbb.ccc" { + return true + } + return false + } + + tests := []routeTest{ + { + title: "MatchFunc route, match", + route: new(Route).MatcherFunc(m), + request: newRequest("GET", "http://aaa.bbb.ccc"), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: true, + }, + { + title: "MatchFunc route, non-match", + route: new(Route).MatcherFunc(m), + request: newRequest("GET", "http://aaa.222.ccc"), + vars: map[string]string{}, + host: "", + path: "", + shouldMatch: false, + }, + } + + for _, test := range tests { + testRoute(t, test) + } +} + +func TestBuildVarsFunc(t *testing.T) { + tests := []routeTest{ + { + title: "BuildVarsFunc set on route", + route: new(Route).Path(`/111/{v1:\d}{v2:.*}`).BuildVarsFunc(func(vars map[string]string) map[string]string { + vars["v1"] = "3" + vars["v2"] = "a" + return vars + }), + request: newRequest("GET", "http://localhost/111/2"), + path: "/111/3a", + shouldMatch: true, + }, + { + title: "BuildVarsFunc set on route and parent route", + route: new(Route).PathPrefix(`/{v1:\d}`).BuildVarsFunc(func(vars map[string]string) map[string]string { + vars["v1"] = "2" + return vars + }).Subrouter().Path(`/{v2:\w}`).BuildVarsFunc(func(vars map[string]string) map[string]string { + vars["v2"] = "b" + return vars + }), + request: newRequest("GET", "http://localhost/1/a"), + path: "/2/b", + shouldMatch: true, + }, + } + + for _, test := range tests { + testRoute(t, test) + } +} + +func TestSubRouter(t *testing.T) { + subrouter1 := new(Route).Host("{v1:[a-z]+}.google.com").Subrouter() + subrouter2 := new(Route).PathPrefix("/foo/{v1}").Subrouter() + + tests := []routeTest{ + { + route: subrouter1.Path("/{v2:[a-z]+}"), + request: newRequest("GET", "http://aaa.google.com/bbb"), + vars: map[string]string{"v1": "aaa", "v2": "bbb"}, + host: "aaa.google.com", + path: "/bbb", + shouldMatch: true, + }, + { + route: subrouter1.Path("/{v2:[a-z]+}"), + request: newRequest("GET", "http://111.google.com/111"), + vars: map[string]string{"v1": "aaa", "v2": "bbb"}, + host: "aaa.google.com", + path: "/bbb", + shouldMatch: false, + }, + { + route: subrouter2.Path("/baz/{v2}"), + request: newRequest("GET", "http://localhost/foo/bar/baz/ding"), + vars: map[string]string{"v1": "bar", "v2": "ding"}, + host: "", + path: "/foo/bar/baz/ding", + shouldMatch: true, + }, + { + route: subrouter2.Path("/baz/{v2}"), + request: newRequest("GET", "http://localhost/foo/bar"), + vars: map[string]string{"v1": "bar", "v2": "ding"}, + host: "", + path: "/foo/bar/baz/ding", + shouldMatch: false, + }, + } + + for _, test := range tests { + testRoute(t, test) + } +} + +func TestNamedRoutes(t *testing.T) { + r1 := NewRouter() + r1.NewRoute().Name("a") + r1.NewRoute().Name("b") + r1.NewRoute().Name("c") + + r2 := r1.NewRoute().Subrouter() + r2.NewRoute().Name("d") + r2.NewRoute().Name("e") + r2.NewRoute().Name("f") + + r3 := r2.NewRoute().Subrouter() + r3.NewRoute().Name("g") + r3.NewRoute().Name("h") + r3.NewRoute().Name("i") + + if r1.namedRoutes == nil || len(r1.namedRoutes) != 9 { + t.Errorf("Expected 9 named routes, got %v", r1.namedRoutes) + } else if r1.Get("i") == nil { + t.Errorf("Subroute name not registered") + } +} + +func TestStrictSlash(t *testing.T) { + r := NewRouter() + r.StrictSlash(true) + + tests := []routeTest{ + { + title: "Redirect path without slash", + route: r.NewRoute().Path("/111/"), + request: newRequest("GET", "http://localhost/111"), + vars: map[string]string{}, + host: "", + path: "/111/", + shouldMatch: true, + shouldRedirect: true, + }, + { + title: "Do not redirect path with slash", + route: r.NewRoute().Path("/111/"), + request: newRequest("GET", "http://localhost/111/"), + vars: map[string]string{}, + host: "", + path: "/111/", + shouldMatch: true, + shouldRedirect: false, + }, + { + title: "Redirect path with slash", + route: r.NewRoute().Path("/111"), + request: newRequest("GET", "http://localhost/111/"), + vars: map[string]string{}, + host: "", + path: "/111", + shouldMatch: true, + shouldRedirect: true, + }, + { + title: "Do not redirect path without slash", + route: r.NewRoute().Path("/111"), + request: newRequest("GET", "http://localhost/111"), + vars: map[string]string{}, + host: "", + path: "/111", + shouldMatch: true, + shouldRedirect: false, + }, + { + title: "Propagate StrictSlash to subrouters", + route: r.NewRoute().PathPrefix("/static/").Subrouter().Path("/images/"), + request: newRequest("GET", "http://localhost/static/images"), + vars: map[string]string{}, + host: "", + path: "/static/images/", + shouldMatch: true, + shouldRedirect: true, + }, + { + title: "Ignore StrictSlash for path prefix", + route: r.NewRoute().PathPrefix("/static/"), + request: newRequest("GET", "http://localhost/static/logo.png"), + vars: map[string]string{}, + host: "", + path: "/static/", + shouldMatch: true, + shouldRedirect: false, + }, + } + + for _, test := range tests { + testRoute(t, test) + } +} + +func TestWalkSingleDepth(t *testing.T) { + r0 := NewRouter() + r1 := NewRouter() + r2 := NewRouter() + + r0.Path("/g") + r0.Path("/o") + r0.Path("/d").Handler(r1) + r0.Path("/r").Handler(r2) + r0.Path("/a") + + r1.Path("/z") + r1.Path("/i") + r1.Path("/l") + r1.Path("/l") + + r2.Path("/i") + r2.Path("/l") + r2.Path("/l") + + paths := []string{"g", "o", "r", "i", "l", "l", "a"} + depths := []int{0, 0, 0, 1, 1, 1, 0} + i := 0 + err := r0.Walk(func(route *Route, router *Router, ancestors []*Route) error { + matcher := route.matchers[0].(*routeRegexp) + if matcher.template == "/d" { + return SkipRouter + } + if len(ancestors) != depths[i] { + t.Errorf(`Expected depth of %d at i = %d; got "%d"`, depths[i], i, len(ancestors)) + } + if matcher.template != "/"+paths[i] { + t.Errorf(`Expected "/%s" at i = %d; got "%s"`, paths[i], i, matcher.template) + } + i++ + return nil + }) + if err != nil { + panic(err) + } + if i != len(paths) { + t.Errorf("Expected %d routes, found %d", len(paths), i) + } +} + +func TestWalkNested(t *testing.T) { + router := NewRouter() + + g := router.Path("/g").Subrouter() + o := g.PathPrefix("/o").Subrouter() + r := o.PathPrefix("/r").Subrouter() + i := r.PathPrefix("/i").Subrouter() + l1 := i.PathPrefix("/l").Subrouter() + l2 := l1.PathPrefix("/l").Subrouter() + l2.Path("/a") + + paths := []string{"/g", "/g/o", "/g/o/r", "/g/o/r/i", "/g/o/r/i/l", "/g/o/r/i/l/l", "/g/o/r/i/l/l/a"} + idx := 0 + err := router.Walk(func(route *Route, router *Router, ancestors []*Route) error { + path := paths[idx] + tpl := route.regexp.path.template + if tpl != path { + t.Errorf(`Expected %s got %s`, path, tpl) + } + idx++ + return nil + }) + if err != nil { + panic(err) + } + if idx != len(paths) { + t.Errorf("Expected %d routes, found %d", len(paths), idx) + } +} + +// ---------------------------------------------------------------------------- +// Helpers +// ---------------------------------------------------------------------------- + +func getRouteTemplate(route *Route) string { + host, path := "none", "none" + if route.regexp != nil { + if route.regexp.host != nil { + host = route.regexp.host.template + } + if route.regexp.path != nil { + path = route.regexp.path.template + } + } + return fmt.Sprintf("Host: %v, Path: %v", host, path) +} + +func testRoute(t *testing.T, test routeTest) { + request := test.request + route := test.route + vars := test.vars + shouldMatch := test.shouldMatch + host := test.host + path := test.path + url := test.host + test.path + shouldRedirect := test.shouldRedirect + + var match RouteMatch + ok := route.Match(request, &match) + if ok != shouldMatch { + msg := "Should match" + if !shouldMatch { + msg = "Should not match" + } + t.Errorf("(%v) %v:\nRoute: %#v\nRequest: %#v\nVars: %v\n", test.title, msg, route, request, vars) + return + } + if shouldMatch { + if test.vars != nil && !stringMapEqual(test.vars, match.Vars) { + t.Errorf("(%v) Vars not equal: expected %v, got %v", test.title, vars, match.Vars) + return + } + if host != "" { + u, _ := test.route.URLHost(mapToPairs(match.Vars)...) + if host != u.Host { + t.Errorf("(%v) URLHost not equal: expected %v, got %v -- %v", test.title, host, u.Host, getRouteTemplate(route)) + return + } + } + if path != "" { + u, _ := route.URLPath(mapToPairs(match.Vars)...) + if path != u.Path { + t.Errorf("(%v) URLPath not equal: expected %v, got %v -- %v", test.title, path, u.Path, getRouteTemplate(route)) + return + } + } + if url != "" { + u, _ := route.URL(mapToPairs(match.Vars)...) + if url != u.Host+u.Path { + t.Errorf("(%v) URL not equal: expected %v, got %v -- %v", test.title, url, u.Host+u.Path, getRouteTemplate(route)) + return + } + } + if shouldRedirect && match.Handler == nil { + t.Errorf("(%v) Did not redirect", test.title) + return + } + if !shouldRedirect && match.Handler != nil { + t.Errorf("(%v) Unexpected redirect", test.title) + return + } + } +} + +// Tests that the context is cleared or not cleared properly depending on +// the configuration of the router +func TestKeepContext(t *testing.T) { + func1 := func(w http.ResponseWriter, r *http.Request) {} + + r := NewRouter() + r.HandleFunc("/", func1).Name("func1") + + req, _ := http.NewRequest("GET", "http://localhost/", nil) + context.Set(req, "t", 1) + + res := new(http.ResponseWriter) + r.ServeHTTP(*res, req) + + if _, ok := context.GetOk(req, "t"); ok { + t.Error("Context should have been cleared at end of request") + } + + r.KeepContext = true + + req, _ = http.NewRequest("GET", "http://localhost/", nil) + context.Set(req, "t", 1) + + r.ServeHTTP(*res, req) + if _, ok := context.GetOk(req, "t"); !ok { + t.Error("Context should NOT have been cleared at end of request") + } + +} + +type TestA301ResponseWriter struct { + hh http.Header + status int +} + +func (ho TestA301ResponseWriter) Header() http.Header { + return http.Header(ho.hh) +} + +func (ho TestA301ResponseWriter) Write(b []byte) (int, error) { + return 0, nil +} + +func (ho TestA301ResponseWriter) WriteHeader(code int) { + ho.status = code +} + +func Test301Redirect(t *testing.T) { + m := make(http.Header) + + func1 := func(w http.ResponseWriter, r *http.Request) {} + func2 := func(w http.ResponseWriter, r *http.Request) {} + + r := NewRouter() + r.HandleFunc("/api/", func2).Name("func2") + r.HandleFunc("/", func1).Name("func1") + + req, _ := http.NewRequest("GET", "http://localhost//api/?abc=def", nil) + + res := TestA301ResponseWriter{ + hh: m, + status: 0, + } + r.ServeHTTP(&res, req) + + if "http://localhost/api/?abc=def" != res.hh["Location"][0] { + t.Errorf("Should have complete URL with query string") + } +} + +// https://plus.google.com/101022900381697718949/posts/eWy6DjFJ6uW +func TestSubrouterHeader(t *testing.T) { + expected := "func1 response" + func1 := func(w http.ResponseWriter, r *http.Request) { + fmt.Fprint(w, expected) + } + func2 := func(http.ResponseWriter, *http.Request) {} + + r := NewRouter() + s := r.Headers("SomeSpecialHeader", "").Subrouter() + s.HandleFunc("/", func1).Name("func1") + r.HandleFunc("/", func2).Name("func2") + + req, _ := http.NewRequest("GET", "http://localhost/", nil) + req.Header.Add("SomeSpecialHeader", "foo") + match := new(RouteMatch) + matched := r.Match(req, match) + if !matched { + t.Errorf("Should match request") + } + if match.Route.GetName() != "func1" { + t.Errorf("Expecting func1 handler, got %s", match.Route.GetName()) + } + resp := NewRecorder() + match.Handler.ServeHTTP(resp, req) + if resp.Body.String() != expected { + t.Errorf("Expecting %q", expected) + } +} + +// mapToPairs converts a string map to a slice of string pairs +func mapToPairs(m map[string]string) []string { + var i int + p := make([]string, len(m)*2) + for k, v := range m { + p[i] = k + p[i+1] = v + i += 2 + } + return p +} + +// stringMapEqual checks the equality of two string maps +func stringMapEqual(m1, m2 map[string]string) bool { + nil1 := m1 == nil + nil2 := m2 == nil + if nil1 != nil2 || len(m1) != len(m2) { + return false + } + for k, v := range m1 { + if v != m2[k] { + return false + } + } + return true +} + +// newRequest is a helper function to create a new request with a method and url +func newRequest(method, url string) *http.Request { + req, err := http.NewRequest(method, url, nil) + if err != nil { + panic(err) + } + return req +} diff --git a/vendor/github.com/gorilla/mux/old_test.go b/vendor/github.com/gorilla/mux/old_test.go new file mode 100644 index 0000000..755db48 --- /dev/null +++ b/vendor/github.com/gorilla/mux/old_test.go @@ -0,0 +1,714 @@ +// Old tests ported to Go1. This is a mess. Want to drop it one day. + +// Copyright 2011 Gorilla Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package mux + +import ( + "bytes" + "net/http" + "testing" +) + +// ---------------------------------------------------------------------------- +// ResponseRecorder +// ---------------------------------------------------------------------------- +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// ResponseRecorder is an implementation of http.ResponseWriter that +// records its mutations for later inspection in tests. +type ResponseRecorder struct { + Code int // the HTTP response code from WriteHeader + HeaderMap http.Header // the HTTP response headers + Body *bytes.Buffer // if non-nil, the bytes.Buffer to append written data to + Flushed bool +} + +// NewRecorder returns an initialized ResponseRecorder. +func NewRecorder() *ResponseRecorder { + return &ResponseRecorder{ + HeaderMap: make(http.Header), + Body: new(bytes.Buffer), + } +} + +// DefaultRemoteAddr is the default remote address to return in RemoteAddr if +// an explicit DefaultRemoteAddr isn't set on ResponseRecorder. +const DefaultRemoteAddr = "1.2.3.4" + +// Header returns the response headers. +func (rw *ResponseRecorder) Header() http.Header { + return rw.HeaderMap +} + +// Write always succeeds and writes to rw.Body, if not nil. +func (rw *ResponseRecorder) Write(buf []byte) (int, error) { + if rw.Body != nil { + rw.Body.Write(buf) + } + if rw.Code == 0 { + rw.Code = http.StatusOK + } + return len(buf), nil +} + +// WriteHeader sets rw.Code. +func (rw *ResponseRecorder) WriteHeader(code int) { + rw.Code = code +} + +// Flush sets rw.Flushed to true. +func (rw *ResponseRecorder) Flush() { + rw.Flushed = true +} + +// ---------------------------------------------------------------------------- + +func TestRouteMatchers(t *testing.T) { + var scheme, host, path, query, method string + var headers map[string]string + var resultVars map[bool]map[string]string + + router := NewRouter() + router.NewRoute().Host("{var1}.google.com"). + Path("/{var2:[a-z]+}/{var3:[0-9]+}"). + Queries("foo", "bar"). + Methods("GET"). + Schemes("https"). + Headers("x-requested-with", "XMLHttpRequest") + router.NewRoute().Host("www.{var4}.com"). + PathPrefix("/foo/{var5:[a-z]+}/{var6:[0-9]+}"). + Queries("baz", "ding"). + Methods("POST"). + Schemes("http"). + Headers("Content-Type", "application/json") + + reset := func() { + // Everything match. + scheme = "https" + host = "www.google.com" + path = "/product/42" + query = "?foo=bar" + method = "GET" + headers = map[string]string{"X-Requested-With": "XMLHttpRequest"} + resultVars = map[bool]map[string]string{ + true: {"var1": "www", "var2": "product", "var3": "42"}, + false: {}, + } + } + + reset2 := func() { + // Everything match. + scheme = "http" + host = "www.google.com" + path = "/foo/product/42/path/that/is/ignored" + query = "?baz=ding" + method = "POST" + headers = map[string]string{"Content-Type": "application/json"} + resultVars = map[bool]map[string]string{ + true: {"var4": "google", "var5": "product", "var6": "42"}, + false: {}, + } + } + + match := func(shouldMatch bool) { + url := scheme + "://" + host + path + query + request, _ := http.NewRequest(method, url, nil) + for key, value := range headers { + request.Header.Add(key, value) + } + + var routeMatch RouteMatch + matched := router.Match(request, &routeMatch) + if matched != shouldMatch { + // Need better messages. :) + if matched { + t.Errorf("Should match.") + } else { + t.Errorf("Should not match.") + } + } + + if matched { + currentRoute := routeMatch.Route + if currentRoute == nil { + t.Errorf("Expected a current route.") + } + vars := routeMatch.Vars + expectedVars := resultVars[shouldMatch] + if len(vars) != len(expectedVars) { + t.Errorf("Expected vars: %v Got: %v.", expectedVars, vars) + } + for name, value := range vars { + if expectedVars[name] != value { + t.Errorf("Expected vars: %v Got: %v.", expectedVars, vars) + } + } + } + } + + // 1st route -------------------------------------------------------------- + + // Everything match. + reset() + match(true) + + // Scheme doesn't match. + reset() + scheme = "http" + match(false) + + // Host doesn't match. + reset() + host = "www.mygoogle.com" + match(false) + + // Path doesn't match. + reset() + path = "/product/notdigits" + match(false) + + // Query doesn't match. + reset() + query = "?foo=baz" + match(false) + + // Method doesn't match. + reset() + method = "POST" + match(false) + + // Header doesn't match. + reset() + headers = map[string]string{} + match(false) + + // Everything match, again. + reset() + match(true) + + // 2nd route -------------------------------------------------------------- + + // Everything match. + reset2() + match(true) + + // Scheme doesn't match. + reset2() + scheme = "https" + match(false) + + // Host doesn't match. + reset2() + host = "sub.google.com" + match(false) + + // Path doesn't match. + reset2() + path = "/bar/product/42" + match(false) + + // Query doesn't match. + reset2() + query = "?foo=baz" + match(false) + + // Method doesn't match. + reset2() + method = "GET" + match(false) + + // Header doesn't match. + reset2() + headers = map[string]string{} + match(false) + + // Everything match, again. + reset2() + match(true) +} + +type headerMatcherTest struct { + matcher headerMatcher + headers map[string]string + result bool +} + +var headerMatcherTests = []headerMatcherTest{ + { + matcher: headerMatcher(map[string]string{"x-requested-with": "XMLHttpRequest"}), + headers: map[string]string{"X-Requested-With": "XMLHttpRequest"}, + result: true, + }, + { + matcher: headerMatcher(map[string]string{"x-requested-with": ""}), + headers: map[string]string{"X-Requested-With": "anything"}, + result: true, + }, + { + matcher: headerMatcher(map[string]string{"x-requested-with": "XMLHttpRequest"}), + headers: map[string]string{}, + result: false, + }, +} + +type hostMatcherTest struct { + matcher *Route + url string + vars map[string]string + result bool +} + +var hostMatcherTests = []hostMatcherTest{ + { + matcher: NewRouter().NewRoute().Host("{foo:[a-z][a-z][a-z]}.{bar:[a-z][a-z][a-z]}.{baz:[a-z][a-z][a-z]}"), + url: "http://abc.def.ghi/", + vars: map[string]string{"foo": "abc", "bar": "def", "baz": "ghi"}, + result: true, + }, + { + matcher: NewRouter().NewRoute().Host("{foo:[a-z][a-z][a-z]}.{bar:[a-z][a-z][a-z]}.{baz:[a-z][a-z][a-z]}"), + url: "http://a.b.c/", + vars: map[string]string{"foo": "abc", "bar": "def", "baz": "ghi"}, + result: false, + }, +} + +type methodMatcherTest struct { + matcher methodMatcher + method string + result bool +} + +var methodMatcherTests = []methodMatcherTest{ + { + matcher: methodMatcher([]string{"GET", "POST", "PUT"}), + method: "GET", + result: true, + }, + { + matcher: methodMatcher([]string{"GET", "POST", "PUT"}), + method: "POST", + result: true, + }, + { + matcher: methodMatcher([]string{"GET", "POST", "PUT"}), + method: "PUT", + result: true, + }, + { + matcher: methodMatcher([]string{"GET", "POST", "PUT"}), + method: "DELETE", + result: false, + }, +} + +type pathMatcherTest struct { + matcher *Route + url string + vars map[string]string + result bool +} + +var pathMatcherTests = []pathMatcherTest{ + { + matcher: NewRouter().NewRoute().Path("/{foo:[0-9][0-9][0-9]}/{bar:[0-9][0-9][0-9]}/{baz:[0-9][0-9][0-9]}"), + url: "http://localhost:8080/123/456/789", + vars: map[string]string{"foo": "123", "bar": "456", "baz": "789"}, + result: true, + }, + { + matcher: NewRouter().NewRoute().Path("/{foo:[0-9][0-9][0-9]}/{bar:[0-9][0-9][0-9]}/{baz:[0-9][0-9][0-9]}"), + url: "http://localhost:8080/1/2/3", + vars: map[string]string{"foo": "123", "bar": "456", "baz": "789"}, + result: false, + }, +} + +type schemeMatcherTest struct { + matcher schemeMatcher + url string + result bool +} + +var schemeMatcherTests = []schemeMatcherTest{ + { + matcher: schemeMatcher([]string{"http", "https"}), + url: "http://localhost:8080/", + result: true, + }, + { + matcher: schemeMatcher([]string{"http", "https"}), + url: "https://localhost:8080/", + result: true, + }, + { + matcher: schemeMatcher([]string{"https"}), + url: "http://localhost:8080/", + result: false, + }, + { + matcher: schemeMatcher([]string{"http"}), + url: "https://localhost:8080/", + result: false, + }, +} + +type urlBuildingTest struct { + route *Route + vars []string + url string +} + +var urlBuildingTests = []urlBuildingTest{ + { + route: new(Route).Host("foo.domain.com"), + vars: []string{}, + url: "http://foo.domain.com", + }, + { + route: new(Route).Host("{subdomain}.domain.com"), + vars: []string{"subdomain", "bar"}, + url: "http://bar.domain.com", + }, + { + route: new(Route).Host("foo.domain.com").Path("/articles"), + vars: []string{}, + url: "http://foo.domain.com/articles", + }, + { + route: new(Route).Path("/articles"), + vars: []string{}, + url: "/articles", + }, + { + route: new(Route).Path("/articles/{category}/{id:[0-9]+}"), + vars: []string{"category", "technology", "id", "42"}, + url: "/articles/technology/42", + }, + { + route: new(Route).Host("{subdomain}.domain.com").Path("/articles/{category}/{id:[0-9]+}"), + vars: []string{"subdomain", "foo", "category", "technology", "id", "42"}, + url: "http://foo.domain.com/articles/technology/42", + }, +} + +func TestHeaderMatcher(t *testing.T) { + for _, v := range headerMatcherTests { + request, _ := http.NewRequest("GET", "http://localhost:8080/", nil) + for key, value := range v.headers { + request.Header.Add(key, value) + } + var routeMatch RouteMatch + result := v.matcher.Match(request, &routeMatch) + if result != v.result { + if v.result { + t.Errorf("%#v: should match %v.", v.matcher, request.Header) + } else { + t.Errorf("%#v: should not match %v.", v.matcher, request.Header) + } + } + } +} + +func TestHostMatcher(t *testing.T) { + for _, v := range hostMatcherTests { + request, _ := http.NewRequest("GET", v.url, nil) + var routeMatch RouteMatch + result := v.matcher.Match(request, &routeMatch) + vars := routeMatch.Vars + if result != v.result { + if v.result { + t.Errorf("%#v: should match %v.", v.matcher, v.url) + } else { + t.Errorf("%#v: should not match %v.", v.matcher, v.url) + } + } + if result { + if len(vars) != len(v.vars) { + t.Errorf("%#v: vars length should be %v, got %v.", v.matcher, len(v.vars), len(vars)) + } + for name, value := range vars { + if v.vars[name] != value { + t.Errorf("%#v: expected value %v for key %v, got %v.", v.matcher, v.vars[name], name, value) + } + } + } else { + if len(vars) != 0 { + t.Errorf("%#v: vars length should be 0, got %v.", v.matcher, len(vars)) + } + } + } +} + +func TestMethodMatcher(t *testing.T) { + for _, v := range methodMatcherTests { + request, _ := http.NewRequest(v.method, "http://localhost:8080/", nil) + var routeMatch RouteMatch + result := v.matcher.Match(request, &routeMatch) + if result != v.result { + if v.result { + t.Errorf("%#v: should match %v.", v.matcher, v.method) + } else { + t.Errorf("%#v: should not match %v.", v.matcher, v.method) + } + } + } +} + +func TestPathMatcher(t *testing.T) { + for _, v := range pathMatcherTests { + request, _ := http.NewRequest("GET", v.url, nil) + var routeMatch RouteMatch + result := v.matcher.Match(request, &routeMatch) + vars := routeMatch.Vars + if result != v.result { + if v.result { + t.Errorf("%#v: should match %v.", v.matcher, v.url) + } else { + t.Errorf("%#v: should not match %v.", v.matcher, v.url) + } + } + if result { + if len(vars) != len(v.vars) { + t.Errorf("%#v: vars length should be %v, got %v.", v.matcher, len(v.vars), len(vars)) + } + for name, value := range vars { + if v.vars[name] != value { + t.Errorf("%#v: expected value %v for key %v, got %v.", v.matcher, v.vars[name], name, value) + } + } + } else { + if len(vars) != 0 { + t.Errorf("%#v: vars length should be 0, got %v.", v.matcher, len(vars)) + } + } + } +} + +func TestSchemeMatcher(t *testing.T) { + for _, v := range schemeMatcherTests { + request, _ := http.NewRequest("GET", v.url, nil) + var routeMatch RouteMatch + result := v.matcher.Match(request, &routeMatch) + if result != v.result { + if v.result { + t.Errorf("%#v: should match %v.", v.matcher, v.url) + } else { + t.Errorf("%#v: should not match %v.", v.matcher, v.url) + } + } + } +} + +func TestUrlBuilding(t *testing.T) { + + for _, v := range urlBuildingTests { + u, _ := v.route.URL(v.vars...) + url := u.String() + if url != v.url { + t.Errorf("expected %v, got %v", v.url, url) + /* + reversePath := "" + reverseHost := "" + if v.route.pathTemplate != nil { + reversePath = v.route.pathTemplate.Reverse + } + if v.route.hostTemplate != nil { + reverseHost = v.route.hostTemplate.Reverse + } + + t.Errorf("%#v:\nexpected: %q\ngot: %q\nreverse path: %q\nreverse host: %q", v.route, v.url, url, reversePath, reverseHost) + */ + } + } + + ArticleHandler := func(w http.ResponseWriter, r *http.Request) { + } + + router := NewRouter() + router.HandleFunc("/articles/{category}/{id:[0-9]+}", ArticleHandler).Name("article") + + url, _ := router.Get("article").URL("category", "technology", "id", "42") + expected := "/articles/technology/42" + if url.String() != expected { + t.Errorf("Expected %v, got %v", expected, url.String()) + } +} + +func TestMatchedRouteName(t *testing.T) { + routeName := "stock" + router := NewRouter() + route := router.NewRoute().Path("/products/").Name(routeName) + + url := "http://www.example.com/products/" + request, _ := http.NewRequest("GET", url, nil) + var rv RouteMatch + ok := router.Match(request, &rv) + + if !ok || rv.Route != route { + t.Errorf("Expected same route, got %+v.", rv.Route) + } + + retName := rv.Route.GetName() + if retName != routeName { + t.Errorf("Expected %q, got %q.", routeName, retName) + } +} + +func TestSubRouting(t *testing.T) { + // Example from docs. + router := NewRouter() + subrouter := router.NewRoute().Host("www.example.com").Subrouter() + route := subrouter.NewRoute().Path("/products/").Name("products") + + url := "http://www.example.com/products/" + request, _ := http.NewRequest("GET", url, nil) + var rv RouteMatch + ok := router.Match(request, &rv) + + if !ok || rv.Route != route { + t.Errorf("Expected same route, got %+v.", rv.Route) + } + + u, _ := router.Get("products").URL() + builtUrl := u.String() + // Yay, subroute aware of the domain when building! + if builtUrl != url { + t.Errorf("Expected %q, got %q.", url, builtUrl) + } +} + +func TestVariableNames(t *testing.T) { + route := new(Route).Host("{arg1}.domain.com").Path("/{arg1}/{arg2:[0-9]+}") + if route.err == nil { + t.Errorf("Expected error for duplicated variable names") + } +} + +func TestRedirectSlash(t *testing.T) { + var route *Route + var routeMatch RouteMatch + r := NewRouter() + + r.StrictSlash(false) + route = r.NewRoute() + if route.strictSlash != false { + t.Errorf("Expected false redirectSlash.") + } + + r.StrictSlash(true) + route = r.NewRoute() + if route.strictSlash != true { + t.Errorf("Expected true redirectSlash.") + } + + route = new(Route) + route.strictSlash = true + route.Path("/{arg1}/{arg2:[0-9]+}/") + request, _ := http.NewRequest("GET", "http://localhost/foo/123", nil) + routeMatch = RouteMatch{} + _ = route.Match(request, &routeMatch) + vars := routeMatch.Vars + if vars["arg1"] != "foo" { + t.Errorf("Expected foo.") + } + if vars["arg2"] != "123" { + t.Errorf("Expected 123.") + } + rsp := NewRecorder() + routeMatch.Handler.ServeHTTP(rsp, request) + if rsp.HeaderMap.Get("Location") != "http://localhost/foo/123/" { + t.Errorf("Expected redirect header.") + } + + route = new(Route) + route.strictSlash = true + route.Path("/{arg1}/{arg2:[0-9]+}") + request, _ = http.NewRequest("GET", "http://localhost/foo/123/", nil) + routeMatch = RouteMatch{} + _ = route.Match(request, &routeMatch) + vars = routeMatch.Vars + if vars["arg1"] != "foo" { + t.Errorf("Expected foo.") + } + if vars["arg2"] != "123" { + t.Errorf("Expected 123.") + } + rsp = NewRecorder() + routeMatch.Handler.ServeHTTP(rsp, request) + if rsp.HeaderMap.Get("Location") != "http://localhost/foo/123" { + t.Errorf("Expected redirect header.") + } +} + +// Test for the new regexp library, still not available in stable Go. +func TestNewRegexp(t *testing.T) { + var p *routeRegexp + var matches []string + + tests := map[string]map[string][]string{ + "/{foo:a{2}}": { + "/a": nil, + "/aa": {"aa"}, + "/aaa": nil, + "/aaaa": nil, + }, + "/{foo:a{2,}}": { + "/a": nil, + "/aa": {"aa"}, + "/aaa": {"aaa"}, + "/aaaa": {"aaaa"}, + }, + "/{foo:a{2,3}}": { + "/a": nil, + "/aa": {"aa"}, + "/aaa": {"aaa"}, + "/aaaa": nil, + }, + "/{foo:[a-z]{3}}/{bar:[a-z]{2}}": { + "/a": nil, + "/ab": nil, + "/abc": nil, + "/abcd": nil, + "/abc/ab": {"abc", "ab"}, + "/abc/abc": nil, + "/abcd/ab": nil, + }, + `/{foo:\w{3,}}/{bar:\d{2,}}`: { + "/a": nil, + "/ab": nil, + "/abc": nil, + "/abc/1": nil, + "/abc/12": {"abc", "12"}, + "/abcd/12": {"abcd", "12"}, + "/abcd/123": {"abcd", "123"}, + }, + } + + for pattern, paths := range tests { + p, _ = newRouteRegexp(pattern, false, false, false, false) + for path, result := range paths { + matches = p.regexp.FindStringSubmatch(path) + if result == nil { + if matches != nil { + t.Errorf("%v should not match %v.", pattern, path) + } + } else { + if len(matches) != len(result)+1 { + t.Errorf("Expected %v matches, got %v.", len(result)+1, len(matches)) + } else { + for k, v := range result { + if matches[k+1] != v { + t.Errorf("Expected %v, got %v.", v, matches[k+1]) + } + } + } + } + } + } +} diff --git a/vendor/github.com/gorilla/mux/regexp.go b/vendor/github.com/gorilla/mux/regexp.go new file mode 100644 index 0000000..06728dd --- /dev/null +++ b/vendor/github.com/gorilla/mux/regexp.go @@ -0,0 +1,317 @@ +// Copyright 2012 The Gorilla Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package mux + +import ( + "bytes" + "fmt" + "net/http" + "net/url" + "regexp" + "strconv" + "strings" +) + +// newRouteRegexp parses a route template and returns a routeRegexp, +// used to match a host, a path or a query string. +// +// It will extract named variables, assemble a regexp to be matched, create +// a "reverse" template to build URLs and compile regexps to validate variable +// values used in URL building. +// +// Previously we accepted only Python-like identifiers for variable +// names ([a-zA-Z_][a-zA-Z0-9_]*), but currently the only restriction is that +// name and pattern can't be empty, and names can't contain a colon. +func newRouteRegexp(tpl string, matchHost, matchPrefix, matchQuery, strictSlash bool) (*routeRegexp, error) { + // Check if it is well-formed. + idxs, errBraces := braceIndices(tpl) + if errBraces != nil { + return nil, errBraces + } + // Backup the original. + template := tpl + // Now let's parse it. + defaultPattern := "[^/]+" + if matchQuery { + defaultPattern = "[^?&]*" + } else if matchHost { + defaultPattern = "[^.]+" + matchPrefix = false + } + // Only match strict slash if not matching + if matchPrefix || matchHost || matchQuery { + strictSlash = false + } + // Set a flag for strictSlash. + endSlash := false + if strictSlash && strings.HasSuffix(tpl, "/") { + tpl = tpl[:len(tpl)-1] + endSlash = true + } + varsN := make([]string, len(idxs)/2) + varsR := make([]*regexp.Regexp, len(idxs)/2) + pattern := bytes.NewBufferString("") + pattern.WriteByte('^') + reverse := bytes.NewBufferString("") + var end int + var err error + for i := 0; i < len(idxs); i += 2 { + // Set all values we are interested in. + raw := tpl[end:idxs[i]] + end = idxs[i+1] + parts := strings.SplitN(tpl[idxs[i]+1:end-1], ":", 2) + name := parts[0] + patt := defaultPattern + if len(parts) == 2 { + patt = parts[1] + } + // Name or pattern can't be empty. + if name == "" || patt == "" { + return nil, fmt.Errorf("mux: missing name or pattern in %q", + tpl[idxs[i]:end]) + } + // Build the regexp pattern. + varIdx := i / 2 + fmt.Fprintf(pattern, "%s(?P<%s>%s)", regexp.QuoteMeta(raw), varGroupName(varIdx), patt) + // Build the reverse template. + fmt.Fprintf(reverse, "%s%%s", raw) + + // Append variable name and compiled pattern. + varsN[varIdx] = name + varsR[varIdx], err = regexp.Compile(fmt.Sprintf("^%s$", patt)) + if err != nil { + return nil, err + } + } + // Add the remaining. + raw := tpl[end:] + pattern.WriteString(regexp.QuoteMeta(raw)) + if strictSlash { + pattern.WriteString("[/]?") + } + if matchQuery { + // Add the default pattern if the query value is empty + if queryVal := strings.SplitN(template, "=", 2)[1]; queryVal == "" { + pattern.WriteString(defaultPattern) + } + } + if !matchPrefix { + pattern.WriteByte('$') + } + reverse.WriteString(raw) + if endSlash { + reverse.WriteByte('/') + } + // Compile full regexp. + reg, errCompile := regexp.Compile(pattern.String()) + if errCompile != nil { + return nil, errCompile + } + // Done! + return &routeRegexp{ + template: template, + matchHost: matchHost, + matchQuery: matchQuery, + strictSlash: strictSlash, + regexp: reg, + reverse: reverse.String(), + varsN: varsN, + varsR: varsR, + }, nil +} + +// routeRegexp stores a regexp to match a host or path and information to +// collect and validate route variables. +type routeRegexp struct { + // The unmodified template. + template string + // True for host match, false for path or query string match. + matchHost bool + // True for query string match, false for path and host match. + matchQuery bool + // The strictSlash value defined on the route, but disabled if PathPrefix was used. + strictSlash bool + // Expanded regexp. + regexp *regexp.Regexp + // Reverse template. + reverse string + // Variable names. + varsN []string + // Variable regexps (validators). + varsR []*regexp.Regexp +} + +// Match matches the regexp against the URL host or path. +func (r *routeRegexp) Match(req *http.Request, match *RouteMatch) bool { + if !r.matchHost { + if r.matchQuery { + return r.matchQueryString(req) + } else { + return r.regexp.MatchString(req.URL.Path) + } + } + return r.regexp.MatchString(getHost(req)) +} + +// url builds a URL part using the given values. +func (r *routeRegexp) url(values map[string]string) (string, error) { + urlValues := make([]interface{}, len(r.varsN)) + for k, v := range r.varsN { + value, ok := values[v] + if !ok { + return "", fmt.Errorf("mux: missing route variable %q", v) + } + urlValues[k] = value + } + rv := fmt.Sprintf(r.reverse, urlValues...) + if !r.regexp.MatchString(rv) { + // The URL is checked against the full regexp, instead of checking + // individual variables. This is faster but to provide a good error + // message, we check individual regexps if the URL doesn't match. + for k, v := range r.varsN { + if !r.varsR[k].MatchString(values[v]) { + return "", fmt.Errorf( + "mux: variable %q doesn't match, expected %q", values[v], + r.varsR[k].String()) + } + } + } + return rv, nil +} + +// getUrlQuery returns a single query parameter from a request URL. +// For a URL with foo=bar&baz=ding, we return only the relevant key +// value pair for the routeRegexp. +func (r *routeRegexp) getUrlQuery(req *http.Request) string { + if !r.matchQuery { + return "" + } + templateKey := strings.SplitN(r.template, "=", 2)[0] + for key, vals := range req.URL.Query() { + if key == templateKey && len(vals) > 0 { + return key + "=" + vals[0] + } + } + return "" +} + +func (r *routeRegexp) matchQueryString(req *http.Request) bool { + return r.regexp.MatchString(r.getUrlQuery(req)) +} + +// braceIndices returns the first level curly brace indices from a string. +// It returns an error in case of unbalanced braces. +func braceIndices(s string) ([]int, error) { + var level, idx int + idxs := make([]int, 0) + for i := 0; i < len(s); i++ { + switch s[i] { + case '{': + if level++; level == 1 { + idx = i + } + case '}': + if level--; level == 0 { + idxs = append(idxs, idx, i+1) + } else if level < 0 { + return nil, fmt.Errorf("mux: unbalanced braces in %q", s) + } + } + } + if level != 0 { + return nil, fmt.Errorf("mux: unbalanced braces in %q", s) + } + return idxs, nil +} + +// varGroupName builds a capturing group name for the indexed variable. +func varGroupName(idx int) string { + return "v" + strconv.Itoa(idx) +} + +// ---------------------------------------------------------------------------- +// routeRegexpGroup +// ---------------------------------------------------------------------------- + +// routeRegexpGroup groups the route matchers that carry variables. +type routeRegexpGroup struct { + host *routeRegexp + path *routeRegexp + queries []*routeRegexp +} + +// setMatch extracts the variables from the URL once a route matches. +func (v *routeRegexpGroup) setMatch(req *http.Request, m *RouteMatch, r *Route) { + // Store host variables. + if v.host != nil { + hostVars := v.host.regexp.FindStringSubmatch(getHost(req)) + if hostVars != nil { + subexpNames := v.host.regexp.SubexpNames() + varName := 0 + for i, name := range subexpNames[1:] { + if name != "" && name == varGroupName(varName) { + m.Vars[v.host.varsN[varName]] = hostVars[i+1] + varName++ + } + } + } + } + // Store path variables. + if v.path != nil { + pathVars := v.path.regexp.FindStringSubmatch(req.URL.Path) + if pathVars != nil { + subexpNames := v.path.regexp.SubexpNames() + varName := 0 + for i, name := range subexpNames[1:] { + if name != "" && name == varGroupName(varName) { + m.Vars[v.path.varsN[varName]] = pathVars[i+1] + varName++ + } + } + // Check if we should redirect. + if v.path.strictSlash { + p1 := strings.HasSuffix(req.URL.Path, "/") + p2 := strings.HasSuffix(v.path.template, "/") + if p1 != p2 { + u, _ := url.Parse(req.URL.String()) + if p1 { + u.Path = u.Path[:len(u.Path)-1] + } else { + u.Path += "/" + } + m.Handler = http.RedirectHandler(u.String(), 301) + } + } + } + } + // Store query string variables. + for _, q := range v.queries { + queryVars := q.regexp.FindStringSubmatch(q.getUrlQuery(req)) + if queryVars != nil { + subexpNames := q.regexp.SubexpNames() + varName := 0 + for i, name := range subexpNames[1:] { + if name != "" && name == varGroupName(varName) { + m.Vars[q.varsN[varName]] = queryVars[i+1] + varName++ + } + } + } + } +} + +// getHost tries its best to return the request host. +func getHost(r *http.Request) string { + if r.URL.IsAbs() { + return r.URL.Host + } + host := r.Host + // Slice off any port information. + if i := strings.Index(host, ":"); i != -1 { + host = host[:i] + } + return host + +} diff --git a/vendor/github.com/gorilla/mux/route.go b/vendor/github.com/gorilla/mux/route.go new file mode 100644 index 0000000..913432c --- /dev/null +++ b/vendor/github.com/gorilla/mux/route.go @@ -0,0 +1,595 @@ +// Copyright 2012 The Gorilla Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package mux + +import ( + "errors" + "fmt" + "net/http" + "net/url" + "regexp" + "strings" +) + +// Route stores information to match a request and build URLs. +type Route struct { + // Parent where the route was registered (a Router). + parent parentRoute + // Request handler for the route. + handler http.Handler + // List of matchers. + matchers []matcher + // Manager for the variables from host and path. + regexp *routeRegexpGroup + // If true, when the path pattern is "/path/", accessing "/path" will + // redirect to the former and vice versa. + strictSlash bool + // If true, this route never matches: it is only used to build URLs. + buildOnly bool + // The name used to build URLs. + name string + // Error resulted from building a route. + err error + + buildVarsFunc BuildVarsFunc +} + +// Match matches the route against the request. +func (r *Route) Match(req *http.Request, match *RouteMatch) bool { + if r.buildOnly || r.err != nil { + return false + } + // Match everything. + for _, m := range r.matchers { + if matched := m.Match(req, match); !matched { + return false + } + } + // Yay, we have a match. Let's collect some info about it. + if match.Route == nil { + match.Route = r + } + if match.Handler == nil { + match.Handler = r.handler + } + if match.Vars == nil { + match.Vars = make(map[string]string) + } + // Set variables. + if r.regexp != nil { + r.regexp.setMatch(req, match, r) + } + return true +} + +// ---------------------------------------------------------------------------- +// Route attributes +// ---------------------------------------------------------------------------- + +// GetError returns an error resulted from building the route, if any. +func (r *Route) GetError() error { + return r.err +} + +// BuildOnly sets the route to never match: it is only used to build URLs. +func (r *Route) BuildOnly() *Route { + r.buildOnly = true + return r +} + +// Handler -------------------------------------------------------------------- + +// Handler sets a handler for the route. +func (r *Route) Handler(handler http.Handler) *Route { + if r.err == nil { + r.handler = handler + } + return r +} + +// HandlerFunc sets a handler function for the route. +func (r *Route) HandlerFunc(f func(http.ResponseWriter, *http.Request)) *Route { + return r.Handler(http.HandlerFunc(f)) +} + +// GetHandler returns the handler for the route, if any. +func (r *Route) GetHandler() http.Handler { + return r.handler +} + +// Name ----------------------------------------------------------------------- + +// Name sets the name for the route, used to build URLs. +// If the name was registered already it will be overwritten. +func (r *Route) Name(name string) *Route { + if r.name != "" { + r.err = fmt.Errorf("mux: route already has name %q, can't set %q", + r.name, name) + } + if r.err == nil { + r.name = name + r.getNamedRoutes()[name] = r + } + return r +} + +// GetName returns the name for the route, if any. +func (r *Route) GetName() string { + return r.name +} + +// ---------------------------------------------------------------------------- +// Matchers +// ---------------------------------------------------------------------------- + +// matcher types try to match a request. +type matcher interface { + Match(*http.Request, *RouteMatch) bool +} + +// addMatcher adds a matcher to the route. +func (r *Route) addMatcher(m matcher) *Route { + if r.err == nil { + r.matchers = append(r.matchers, m) + } + return r +} + +// addRegexpMatcher adds a host or path matcher and builder to a route. +func (r *Route) addRegexpMatcher(tpl string, matchHost, matchPrefix, matchQuery bool) error { + if r.err != nil { + return r.err + } + r.regexp = r.getRegexpGroup() + if !matchHost && !matchQuery { + if len(tpl) == 0 || tpl[0] != '/' { + return fmt.Errorf("mux: path must start with a slash, got %q", tpl) + } + if r.regexp.path != nil { + tpl = strings.TrimRight(r.regexp.path.template, "/") + tpl + } + } + rr, err := newRouteRegexp(tpl, matchHost, matchPrefix, matchQuery, r.strictSlash) + if err != nil { + return err + } + for _, q := range r.regexp.queries { + if err = uniqueVars(rr.varsN, q.varsN); err != nil { + return err + } + } + if matchHost { + if r.regexp.path != nil { + if err = uniqueVars(rr.varsN, r.regexp.path.varsN); err != nil { + return err + } + } + r.regexp.host = rr + } else { + if r.regexp.host != nil { + if err = uniqueVars(rr.varsN, r.regexp.host.varsN); err != nil { + return err + } + } + if matchQuery { + r.regexp.queries = append(r.regexp.queries, rr) + } else { + r.regexp.path = rr + } + } + r.addMatcher(rr) + return nil +} + +// Headers -------------------------------------------------------------------- + +// headerMatcher matches the request against header values. +type headerMatcher map[string]string + +func (m headerMatcher) Match(r *http.Request, match *RouteMatch) bool { + return matchMapWithString(m, r.Header, true) +} + +// Headers adds a matcher for request header values. +// It accepts a sequence of key/value pairs to be matched. For example: +// +// r := mux.NewRouter() +// r.Headers("Content-Type", "application/json", +// "X-Requested-With", "XMLHttpRequest") +// +// The above route will only match if both request header values match. +// If the value is an empty string, it will match any value if the key is set. +func (r *Route) Headers(pairs ...string) *Route { + if r.err == nil { + var headers map[string]string + headers, r.err = mapFromPairsToString(pairs...) + return r.addMatcher(headerMatcher(headers)) + } + return r +} + +// headerRegexMatcher matches the request against the route given a regex for the header +type headerRegexMatcher map[string]*regexp.Regexp + +func (m headerRegexMatcher) Match(r *http.Request, match *RouteMatch) bool { + return matchMapWithRegex(m, r.Header, true) +} + +// Regular expressions can be used with headers as well. +// It accepts a sequence of key/value pairs, where the value has regex support. For example +// r := mux.NewRouter() +// r.HeadersRegexp("Content-Type", "application/(text|json)", +// "X-Requested-With", "XMLHttpRequest") +// +// The above route will only match if both the request header matches both regular expressions. +// It the value is an empty string, it will match any value if the key is set. +func (r *Route) HeadersRegexp(pairs ...string) *Route { + if r.err == nil { + var headers map[string]*regexp.Regexp + headers, r.err = mapFromPairsToRegex(pairs...) + return r.addMatcher(headerRegexMatcher(headers)) + } + return r +} + +// Host ----------------------------------------------------------------------- + +// Host adds a matcher for the URL host. +// It accepts a template with zero or more URL variables enclosed by {}. +// Variables can define an optional regexp pattern to be matched: +// +// - {name} matches anything until the next dot. +// +// - {name:pattern} matches the given regexp pattern. +// +// For example: +// +// r := mux.NewRouter() +// r.Host("www.example.com") +// r.Host("{subdomain}.domain.com") +// r.Host("{subdomain:[a-z]+}.domain.com") +// +// Variable names must be unique in a given route. They can be retrieved +// calling mux.Vars(request). +func (r *Route) Host(tpl string) *Route { + r.err = r.addRegexpMatcher(tpl, true, false, false) + return r +} + +// MatcherFunc ---------------------------------------------------------------- + +// MatcherFunc is the function signature used by custom matchers. +type MatcherFunc func(*http.Request, *RouteMatch) bool + +func (m MatcherFunc) Match(r *http.Request, match *RouteMatch) bool { + return m(r, match) +} + +// MatcherFunc adds a custom function to be used as request matcher. +func (r *Route) MatcherFunc(f MatcherFunc) *Route { + return r.addMatcher(f) +} + +// Methods -------------------------------------------------------------------- + +// methodMatcher matches the request against HTTP methods. +type methodMatcher []string + +func (m methodMatcher) Match(r *http.Request, match *RouteMatch) bool { + return matchInArray(m, r.Method) +} + +// Methods adds a matcher for HTTP methods. +// It accepts a sequence of one or more methods to be matched, e.g.: +// "GET", "POST", "PUT". +func (r *Route) Methods(methods ...string) *Route { + for k, v := range methods { + methods[k] = strings.ToUpper(v) + } + return r.addMatcher(methodMatcher(methods)) +} + +// Path ----------------------------------------------------------------------- + +// Path adds a matcher for the URL path. +// It accepts a template with zero or more URL variables enclosed by {}. The +// template must start with a "/". +// Variables can define an optional regexp pattern to be matched: +// +// - {name} matches anything until the next slash. +// +// - {name:pattern} matches the given regexp pattern. +// +// For example: +// +// r := mux.NewRouter() +// r.Path("/products/").Handler(ProductsHandler) +// r.Path("/products/{key}").Handler(ProductsHandler) +// r.Path("/articles/{category}/{id:[0-9]+}"). +// Handler(ArticleHandler) +// +// Variable names must be unique in a given route. They can be retrieved +// calling mux.Vars(request). +func (r *Route) Path(tpl string) *Route { + r.err = r.addRegexpMatcher(tpl, false, false, false) + return r +} + +// PathPrefix ----------------------------------------------------------------- + +// PathPrefix adds a matcher for the URL path prefix. This matches if the given +// template is a prefix of the full URL path. See Route.Path() for details on +// the tpl argument. +// +// Note that it does not treat slashes specially ("/foobar/" will be matched by +// the prefix "/foo") so you may want to use a trailing slash here. +// +// Also note that the setting of Router.StrictSlash() has no effect on routes +// with a PathPrefix matcher. +func (r *Route) PathPrefix(tpl string) *Route { + r.err = r.addRegexpMatcher(tpl, false, true, false) + return r +} + +// Query ---------------------------------------------------------------------- + +// Queries adds a matcher for URL query values. +// It accepts a sequence of key/value pairs. Values may define variables. +// For example: +// +// r := mux.NewRouter() +// r.Queries("foo", "bar", "id", "{id:[0-9]+}") +// +// The above route will only match if the URL contains the defined queries +// values, e.g.: ?foo=bar&id=42. +// +// It the value is an empty string, it will match any value if the key is set. +// +// Variables can define an optional regexp pattern to be matched: +// +// - {name} matches anything until the next slash. +// +// - {name:pattern} matches the given regexp pattern. +func (r *Route) Queries(pairs ...string) *Route { + length := len(pairs) + if length%2 != 0 { + r.err = fmt.Errorf( + "mux: number of parameters must be multiple of 2, got %v", pairs) + return nil + } + for i := 0; i < length; i += 2 { + if r.err = r.addRegexpMatcher(pairs[i]+"="+pairs[i+1], false, false, true); r.err != nil { + return r + } + } + + return r +} + +// Schemes -------------------------------------------------------------------- + +// schemeMatcher matches the request against URL schemes. +type schemeMatcher []string + +func (m schemeMatcher) Match(r *http.Request, match *RouteMatch) bool { + return matchInArray(m, r.URL.Scheme) +} + +// Schemes adds a matcher for URL schemes. +// It accepts a sequence of schemes to be matched, e.g.: "http", "https". +func (r *Route) Schemes(schemes ...string) *Route { + for k, v := range schemes { + schemes[k] = strings.ToLower(v) + } + return r.addMatcher(schemeMatcher(schemes)) +} + +// BuildVarsFunc -------------------------------------------------------------- + +// BuildVarsFunc is the function signature used by custom build variable +// functions (which can modify route variables before a route's URL is built). +type BuildVarsFunc func(map[string]string) map[string]string + +// BuildVarsFunc adds a custom function to be used to modify build variables +// before a route's URL is built. +func (r *Route) BuildVarsFunc(f BuildVarsFunc) *Route { + r.buildVarsFunc = f + return r +} + +// Subrouter ------------------------------------------------------------------ + +// Subrouter creates a subrouter for the route. +// +// It will test the inner routes only if the parent route matched. For example: +// +// r := mux.NewRouter() +// s := r.Host("www.example.com").Subrouter() +// s.HandleFunc("/products/", ProductsHandler) +// s.HandleFunc("/products/{key}", ProductHandler) +// s.HandleFunc("/articles/{category}/{id:[0-9]+}"), ArticleHandler) +// +// Here, the routes registered in the subrouter won't be tested if the host +// doesn't match. +func (r *Route) Subrouter() *Router { + router := &Router{parent: r, strictSlash: r.strictSlash} + r.addMatcher(router) + return router +} + +// ---------------------------------------------------------------------------- +// URL building +// ---------------------------------------------------------------------------- + +// URL builds a URL for the route. +// +// It accepts a sequence of key/value pairs for the route variables. For +// example, given this route: +// +// r := mux.NewRouter() +// r.HandleFunc("/articles/{category}/{id:[0-9]+}", ArticleHandler). +// Name("article") +// +// ...a URL for it can be built using: +// +// url, err := r.Get("article").URL("category", "technology", "id", "42") +// +// ...which will return an url.URL with the following path: +// +// "/articles/technology/42" +// +// This also works for host variables: +// +// r := mux.NewRouter() +// r.Host("{subdomain}.domain.com"). +// HandleFunc("/articles/{category}/{id:[0-9]+}", ArticleHandler). +// Name("article") +// +// // url.String() will be "http://news.domain.com/articles/technology/42" +// url, err := r.Get("article").URL("subdomain", "news", +// "category", "technology", +// "id", "42") +// +// All variables defined in the route are required, and their values must +// conform to the corresponding patterns. +func (r *Route) URL(pairs ...string) (*url.URL, error) { + if r.err != nil { + return nil, r.err + } + if r.regexp == nil { + return nil, errors.New("mux: route doesn't have a host or path") + } + values, err := r.prepareVars(pairs...) + if err != nil { + return nil, err + } + var scheme, host, path string + if r.regexp.host != nil { + // Set a default scheme. + scheme = "http" + if host, err = r.regexp.host.url(values); err != nil { + return nil, err + } + } + if r.regexp.path != nil { + if path, err = r.regexp.path.url(values); err != nil { + return nil, err + } + } + return &url.URL{ + Scheme: scheme, + Host: host, + Path: path, + }, nil +} + +// URLHost builds the host part of the URL for a route. See Route.URL(). +// +// The route must have a host defined. +func (r *Route) URLHost(pairs ...string) (*url.URL, error) { + if r.err != nil { + return nil, r.err + } + if r.regexp == nil || r.regexp.host == nil { + return nil, errors.New("mux: route doesn't have a host") + } + values, err := r.prepareVars(pairs...) + if err != nil { + return nil, err + } + host, err := r.regexp.host.url(values) + if err != nil { + return nil, err + } + return &url.URL{ + Scheme: "http", + Host: host, + }, nil +} + +// URLPath builds the path part of the URL for a route. See Route.URL(). +// +// The route must have a path defined. +func (r *Route) URLPath(pairs ...string) (*url.URL, error) { + if r.err != nil { + return nil, r.err + } + if r.regexp == nil || r.regexp.path == nil { + return nil, errors.New("mux: route doesn't have a path") + } + values, err := r.prepareVars(pairs...) + if err != nil { + return nil, err + } + path, err := r.regexp.path.url(values) + if err != nil { + return nil, err + } + return &url.URL{ + Path: path, + }, nil +} + +// prepareVars converts the route variable pairs into a map. If the route has a +// BuildVarsFunc, it is invoked. +func (r *Route) prepareVars(pairs ...string) (map[string]string, error) { + m, err := mapFromPairsToString(pairs...) + if err != nil { + return nil, err + } + return r.buildVars(m), nil +} + +func (r *Route) buildVars(m map[string]string) map[string]string { + if r.parent != nil { + m = r.parent.buildVars(m) + } + if r.buildVarsFunc != nil { + m = r.buildVarsFunc(m) + } + return m +} + +// ---------------------------------------------------------------------------- +// parentRoute +// ---------------------------------------------------------------------------- + +// parentRoute allows routes to know about parent host and path definitions. +type parentRoute interface { + getNamedRoutes() map[string]*Route + getRegexpGroup() *routeRegexpGroup + buildVars(map[string]string) map[string]string +} + +// getNamedRoutes returns the map where named routes are registered. +func (r *Route) getNamedRoutes() map[string]*Route { + if r.parent == nil { + // During tests router is not always set. + r.parent = NewRouter() + } + return r.parent.getNamedRoutes() +} + +// getRegexpGroup returns regexp definitions from this route. +func (r *Route) getRegexpGroup() *routeRegexpGroup { + if r.regexp == nil { + if r.parent == nil { + // During tests router is not always set. + r.parent = NewRouter() + } + regexp := r.parent.getRegexpGroup() + if regexp == nil { + r.regexp = new(routeRegexpGroup) + } else { + // Copy. + r.regexp = &routeRegexpGroup{ + host: regexp.host, + path: regexp.path, + queries: regexp.queries, + } + } + } + return r.regexp +} diff --git a/vendor/github.com/vtolstov/gopacket/.gitignore b/vendor/github.com/vtolstov/gopacket/.gitignore new file mode 100644 index 0000000..6c05a34 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/.gitignore @@ -0,0 +1,32 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +#* +*~ + +# examples binaries +examples/synscan/synscan +examples/pfdump/pfdump +examples/pcapdump/pcapdump +examples/httpassembly/httpassembly +examples/statsassembly/statsassembly +examples/arpscan/arpscan diff --git a/vendor/github.com/vtolstov/gopacket/.travis.yml b/vendor/github.com/vtolstov/gopacket/.travis.yml new file mode 100644 index 0000000..a2feecb --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/.travis.yml @@ -0,0 +1,9 @@ +language: go +install: + - go get github.com/google/gopacket + - go get github.com/google/gopacket/layers + - go get github.com/google/gopacket/tcpassembly +script: + - go test github.com/google/gopacket + - go test github.com/google/gopacket/layers + - go test github.com/google/gopacket/tcpassembly diff --git a/vendor/github.com/vtolstov/gopacket/AUTHORS b/vendor/github.com/vtolstov/gopacket/AUTHORS index c3f4f8c..9b3f6bf 100644 --- a/vendor/github.com/vtolstov/gopacket/AUTHORS +++ b/vendor/github.com/vtolstov/gopacket/AUTHORS @@ -22,6 +22,8 @@ Matthew Sackman Loic Prylli Alexandre Fiori Adrian Tam +Satoshi Matsumoto +David Stainton ----------------------------------------------- FORKED FROM github.com/akrennmair/gopcap diff --git a/vendor/github.com/vtolstov/gopacket/README.mkd b/vendor/github.com/vtolstov/gopacket/README.mkd index d219519..2766a05 100644 --- a/vendor/github.com/vtolstov/gopacket/README.mkd +++ b/vendor/github.com/vtolstov/gopacket/README.mkd @@ -3,5 +3,7 @@ This library provides packet decoding capabilities for Go. See doc.go for more details. +[![Build Status](https://travis-ci.org/google/gopacket.svg?branch=master)](https://travis-ci.org/google/gopacket) + Originally forked from the gopcap project written by Andreas Krennmair (http://github.com/akrennmair/gopcap). diff --git a/vendor/github.com/vtolstov/gopacket/afpacket/afpacket.go b/vendor/github.com/vtolstov/gopacket/afpacket/afpacket.go new file mode 100644 index 0000000..a30d1d6 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/afpacket/afpacket.go @@ -0,0 +1,351 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +// +build linux + +// Package afpacket provides Go bindings for MMap'd AF_PACKET socket reading. +package afpacket + +// Couldn't have done this without: +// http://lxr.free-electrons.com/source/Documentation/networking/packet_mmap.txt +// http://codemonkeytips.blogspot.co.uk/2011/07/asynchronous-packet-socket-reading-with.html + +import ( + "errors" + "fmt" + "github.com/vtolstov/gopacket" + "net" + "runtime" + "sync" + "time" + "unsafe" +) + +/* +#include // AF_PACKET, sockaddr_ll +#include // ETH_P_ALL +#include // socket() +#include // close() +#include // htons() +#include // mmap(), munmap() +#include // poll() +*/ +import "C" + +var pageSize = int(C.getpagesize()) +var tpacketAlignment = uint(C.TPACKET_ALIGNMENT) + +func tpacketAlign(v int) int { + return int((uint(v) + tpacketAlignment - 1) & ((^tpacketAlignment) - 1)) +} + +// Stats is a set of counters detailing the work TPacket has done so far. +type Stats struct { + // Packets is the total number of packets returned to the caller. + Packets int64 + // Polls is the number of blocking syscalls made waiting for packets. + // This should always be <= Packets, since with TPacket one syscall + // can (and often does) return many results. + Polls int64 +} + +type TPacket struct { + // fd is the C file descriptor. + fd C.int + // ring points to the memory space of the ring buffer shared by tpacket and the kernel. + ring unsafe.Pointer + // opts contains read-only options for the TPacket object. + opts options + mu sync.Mutex // guards below + // offset is the offset into the ring of the current header. + offset int + // current is the current header. + current header + // pollset is used by TPacket for its poll() call. + pollset C.struct_pollfd + // shouldReleasePacket is set to true whenever we return packet data, to make sure we remember to release that data back to the kernel. + shouldReleasePacket bool + // stats is simple statistics on TPacket's run. + stats Stats + // tpVersion is the version of TPacket actually in use, set by setRequestedTPacketVersion. + tpVersion OptTPacketVersion + // Hackity hack hack hack. We need to return a pointer to the header with + // getTPacketHeader, and we don't want to allocate a v3wrapper every time, + // so we leave it in the TPacket object and return a pointer to it. + v3 v3wrapper +} + +// bindToInterface binds the TPacket socket to a particular named interface. +func (h *TPacket) bindToInterface(ifaceName string) error { + iface, err := net.InterfaceByName(ifaceName) + if err != nil { + return fmt.Errorf("InterfaceByName: %v", err) + } + var ll C.struct_sockaddr_ll + ll.sll_family = C.AF_PACKET + ll.sll_protocol = C.__be16(C.htons(C.ETH_P_ALL)) + ll.sll_ifindex = C.int(iface.Index) + if _, err := C.bind(h.fd, (*C.struct_sockaddr)(unsafe.Pointer(&ll)), C.socklen_t(unsafe.Sizeof(ll))); err != nil { + return fmt.Errorf("bindToInterface: %v", err) + } + return nil +} + +// setTPacketVersion asks the kernel to set TPacket to a particular version, and returns an error on failure. +func (h *TPacket) setTPacketVersion(version OptTPacketVersion) error { + val := C.int(version) + _, err := C.setsockopt(h.fd, C.SOL_PACKET, C.PACKET_VERSION, unsafe.Pointer(&val), C.socklen_t(unsafe.Sizeof(val))) + if err != nil { + return fmt.Errorf("setsockopt packet_version: %v", err) + } + return nil +} + +// setRequestedTPacketVersion tries to set TPacket to the requested version or versions. +func (h *TPacket) setRequestedTPacketVersion() error { + switch { + case (h.opts.version == TPacketVersionHighestAvailable || h.opts.version == TPacketVersion3) && h.setTPacketVersion(TPacketVersion3) == nil: + h.tpVersion = TPacketVersion3 + case (h.opts.version == TPacketVersionHighestAvailable || h.opts.version == TPacketVersion2) && h.setTPacketVersion(TPacketVersion2) == nil: + h.tpVersion = TPacketVersion2 + case (h.opts.version == TPacketVersionHighestAvailable || h.opts.version == TPacketVersion1) && h.setTPacketVersion(TPacketVersion1) == nil: + h.tpVersion = TPacketVersion1 + default: + return errors.New("no known tpacket versions work on this machine") + } + return nil +} + +// setUpRing sets up the shared-memory ring buffer between the user process and the kernel. +func (h *TPacket) setUpRing() (err error) { + totalSize := C.uint(h.opts.framesPerBlock * h.opts.numBlocks * h.opts.frameSize) + switch h.tpVersion { + case TPacketVersion1, TPacketVersion2: + var tp C.struct_tpacket_req + tp.tp_block_size = C.uint(h.opts.blockSize) + tp.tp_block_nr = C.uint(h.opts.numBlocks) + tp.tp_frame_size = C.uint(h.opts.frameSize) + tp.tp_frame_nr = C.uint(h.opts.framesPerBlock * h.opts.numBlocks) + if _, err := C.setsockopt(h.fd, C.SOL_PACKET, C.PACKET_RX_RING, unsafe.Pointer(&tp), C.socklen_t(unsafe.Sizeof(tp))); err != nil { + return fmt.Errorf("setsockopt packet_rx_ring: %v", err) + } + case TPacketVersion3: + var tp C.struct_tpacket_req3 + tp.tp_block_size = C.uint(h.opts.blockSize) + tp.tp_block_nr = C.uint(h.opts.numBlocks) + tp.tp_frame_size = C.uint(h.opts.frameSize) + tp.tp_frame_nr = C.uint(h.opts.framesPerBlock * h.opts.numBlocks) + tp.tp_retire_blk_tov = C.uint(h.opts.blockTimeout / time.Millisecond) + if _, err := C.setsockopt(h.fd, C.SOL_PACKET, C.PACKET_RX_RING, unsafe.Pointer(&tp), C.socklen_t(unsafe.Sizeof(tp))); err != nil { + return fmt.Errorf("setsockopt packet_rx_ring v3: %v", err) + } + default: + return errors.New("invalid tpVersion") + } + if h.ring, err = C.mmap(nil, C.size_t(totalSize), C.PROT_READ|C.PROT_WRITE, C.MAP_SHARED, C.int(h.fd), 0); err != nil { + return + } + if h.ring == nil { + return errors.New("no ring") + } + return nil +} + +// Close cleans up the TPacket. It should not be used after the Close call. +func (h *TPacket) Close() { + if h.fd == -1 { + return // already closed. + } + if h.ring != nil { + C.munmap(h.ring, C.size_t(h.opts.blockSize*h.opts.numBlocks)) + } + h.ring = nil + C.close(h.fd) + h.fd = -1 + runtime.SetFinalizer(h, nil) +} + +// NewTPacket returns a new TPacket object for reading packets off the wire. +// Its behavior may be modified by passing in any/all of afpacket.Opt* to this +// function. +// If this function succeeds, the user should be sure to Close the returned +// TPacket when finished with it. +func NewTPacket(opts ...interface{}) (h *TPacket, err error) { + h = &TPacket{} + if h.opts, err = parseOptions(opts...); err != nil { + return nil, err + } + fd, err := C.socket(C.AF_PACKET, C.int(h.opts.socktype), C.int(C.htons(C.ETH_P_ALL))) + if err != nil { + return nil, err + } + h.fd = fd + if h.opts.iface != "" { + if err = h.bindToInterface(h.opts.iface); err != nil { + goto errlbl + } + } + if err = h.setRequestedTPacketVersion(); err != nil { + goto errlbl + } + if err = h.setUpRing(); err != nil { + goto errlbl + } + runtime.SetFinalizer(h, (*TPacket).Close) + return h, nil +errlbl: + h.Close() + return nil, err +} + +func (h *TPacket) releaseCurrentPacket() error { + h.current.clearStatus() + h.offset++ + h.shouldReleasePacket = false + return nil +} + +// ZeroCopyReadPacketData reads the next packet off the wire, and returns its data. +// The slice returned by ZeroCopyReadPacketData points to bytes owned by the +// TPacket. Each call to ZeroCopyReadPacketData invalidates any data previously +// returned by ZeroCopyReadPacketData. Care must be taken not to keep pointers +// to old bytes when using ZeroCopyReadPacketData... if you need to keep data past +// the next time you call ZeroCopyReadPacketData, use ReadPacketDataData, which copies +// the bytes into a new buffer for you. +// tp, _ := NewTPacket(...) +// data1, _, _ := tp.ZeroCopyReadPacketData() +// // do everything you want with data1 here, copying bytes out of it if you'd like to keep them around. +// data2, _, _ := tp.ZeroCopyReadPacketData() // invalidates bytes in data1 +func (h *TPacket) ZeroCopyReadPacketData() (data []byte, ci gopacket.CaptureInfo, err error) { + h.mu.Lock() + if h.current == nil || !h.current.next() { + if h.shouldReleasePacket { + h.releaseCurrentPacket() + } + h.current = h.getTPacketHeader() + if err = h.pollForFirstPacket(h.current); err != nil { + h.mu.Unlock() + return + } + } + data = h.current.getData() + ci.Timestamp = h.current.getTime() + ci.CaptureLength = len(data) + ci.Length = h.current.getLength() + h.stats.Packets++ + h.mu.Unlock() + return +} + +// Stats returns statistics on the packets the TPacket has seen so far. +func (h *TPacket) Stats() (Stats, error) { + h.mu.Lock() + defer h.mu.Unlock() + return h.stats, nil +} + +// ReadPacketDataTo reads packet data into a user-supplied buffer. +// This function reads up to the length of the passed-in slice. +// The number of bytes read into data will be returned in ci.CaptureLength, +// which is the minimum of the size of the passed-in buffer and the size of +// the captured packet. +func (h *TPacket) ReadPacketDataTo(data []byte) (ci gopacket.CaptureInfo, err error) { + var d []byte + d, ci, err = h.ZeroCopyReadPacketData() + if err != nil { + return + } + ci.CaptureLength = copy(data, d) + return +} + +// ReadPacketData reads the next packet, copies it into a new buffer, and returns +// that buffer. Since the buffer is allocated by ReadPacketData, it is safe for long-term +// use. This implements gopacket.PacketDataSource. +func (h *TPacket) ReadPacketData() (data []byte, ci gopacket.CaptureInfo, err error) { + var d []byte + d, ci, err = h.ZeroCopyReadPacketData() + if err != nil { + return + } + data = make([]byte, len(d)) + copy(data, d) + return +} + +func (h *TPacket) getTPacketHeader() header { + switch h.tpVersion { + case TPacketVersion1: + if h.offset >= h.opts.framesPerBlock*h.opts.numBlocks { + h.offset = 0 + } + position := uintptr(h.ring) + uintptr(h.opts.frameSize*h.offset) + return (*v1header)(unsafe.Pointer(position)) + case TPacketVersion2: + if h.offset >= h.opts.framesPerBlock*h.opts.numBlocks { + h.offset = 0 + } + position := uintptr(h.ring) + uintptr(h.opts.frameSize*h.offset) + return (*v2header)(unsafe.Pointer(position)) + case TPacketVersion3: + // TPacket3 uses each block to return values, instead of each frame. Hence we need to rotate when we hit #blocks, not #frames. + if h.offset >= h.opts.numBlocks { + h.offset = 0 + } + position := uintptr(h.ring) + uintptr(h.opts.frameSize*h.offset*h.opts.framesPerBlock) + h.v3 = initV3Wrapper(unsafe.Pointer(position)) + return &h.v3 + } + panic("handle tpacket version is invalid") +} + +func (h *TPacket) pollForFirstPacket(hdr header) error { + for hdr.getStatus()&C.TP_STATUS_USER == 0 { + h.pollset.fd = h.fd + h.pollset.events = C.POLLIN + h.pollset.revents = 0 + _, err := C.poll(&h.pollset, 1, -1) + h.stats.Polls++ + if err != nil { + return err + } + } + h.shouldReleasePacket = true + return nil +} + +// FanoutType determines the type of fanout to use with a TPacket SetFanout call. +type FanoutType int + +const ( + FanoutHash FanoutType = 0 + // It appears that defrag only works with FanoutHash, see: + // http://lxr.free-electrons.com/source/net/packet/af_packet.c#L1204 + FanoutHashWithDefrag FanoutType = 0x8000 + FanoutLoadBalance FanoutType = 1 + FanoutCPU FanoutType = 2 +) + +// SetFanout activates TPacket's fanout ability. +// Use of Fanout requires creating multiple TPacket objects and the same id/type to +// a SetFanout call on each. Note that this can be done cross-process, so if two +// different processes both call SetFanout with the same type/id, they'll share +// packets between them. The same should work for multiple TPacket objects within +// the same process. +func (h *TPacket) SetFanout(t FanoutType, id uint16) error { + h.mu.Lock() + defer h.mu.Unlock() + arg := C.int(t) << 16 + arg |= C.int(id) + _, err := C.setsockopt(h.fd, C.SOL_PACKET, C.PACKET_FANOUT, unsafe.Pointer(&arg), C.socklen_t(unsafe.Sizeof(arg))) + return err +} + +// WritePacketData transmits a raw packet. +func (h *TPacket) WritePacketData(pkt []byte) error { + _, err := C.write(h.fd, unsafe.Pointer(&pkt[0]), C.size_t(len(pkt))) + return err +} diff --git a/vendor/github.com/vtolstov/gopacket/afpacket/afpacket_test.go b/vendor/github.com/vtolstov/gopacket/afpacket/afpacket_test.go new file mode 100644 index 0000000..57f6480 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/afpacket/afpacket_test.go @@ -0,0 +1,40 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +// +build linux + +package afpacket + +import ( + "reflect" + "testing" +) + +func TestParseOptions(t *testing.T) { + wanted1 := defaultOpts + wanted1.frameSize = 1 << 10 + wanted1.framesPerBlock = wanted1.blockSize / wanted1.frameSize + for i, test := range []struct { + opts []interface{} + want options + err bool + }{ + {opts: []interface{}{OptBlockSize(2)}, err: true}, + {opts: []interface{}{OptFrameSize(333)}, err: true}, + {opts: []interface{}{OptTPacketVersion(-3)}, err: true}, + {opts: []interface{}{OptTPacketVersion(5)}, err: true}, + {opts: []interface{}{OptFrameSize(1 << 10)}, want: wanted1}, + } { + got, err := parseOptions(test.opts...) + t.Logf("got: %#v\nerr: %v", got, err) + if test.err && err == nil || !test.err && err != nil { + t.Errorf("%d error mismatch, want error? %v. error: %v", i, test.err, err) + } + if !test.err && !reflect.DeepEqual(test.want, got) { + t.Errorf("%d opts mismatch, want\n%#v", i, test.want) + } + } +} diff --git a/vendor/github.com/vtolstov/gopacket/afpacket/header.go b/vendor/github.com/vtolstov/gopacket/afpacket/header.go new file mode 100644 index 0000000..c650836 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/afpacket/header.go @@ -0,0 +1,137 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +// +build linux + +package afpacket + +import ( + "reflect" + "time" + "unsafe" +) + +// #include +import "C" + +// Our model of handling all TPacket versions is a little hacky, to say the +// least. We use the header interface to handle interactions with the +// tpacket1/tpacket2 packet header AND the tpacket3 block header. The big +// difference is that tpacket3's block header implements the next() call to get +// the next packet within the block, while v1/v2 just always return false. + +type header interface { + // getStatus returns the TPacket status of the current header. + getStatus() int + // clearStatus clears the status of the current header, releasing its + // underlying data back to the kernel for future use with new packets. + // Using the header after calling clearStatus is an error. clearStatus + // should only be called after next() returns false. + clearStatus() + // getTime returns the timestamp for the current packet pointed to by + // the header. + getTime() time.Time + // getData returns the packet data pointed to by the current header. + getData() []byte + // getLength returns the total length of the packet. + getLength() int + // next moves this header to point to the next packet it contains, + // returning true on success (in which case getTime and getData will + // return values for the new packet) or false if there are no more + // packets (in which case clearStatus should be called). + next() bool +} + +type v1header C.struct_tpacket_hdr +type v2header C.struct_tpacket2_hdr + +func makeSlice(start uintptr, length int) (data []byte) { + slice := (*reflect.SliceHeader)(unsafe.Pointer(&data)) + slice.Data = start + slice.Len = length + slice.Cap = length + return +} + +func (h *v1header) getStatus() int { + return int(h.tp_status) +} +func (h *v1header) clearStatus() { + h.tp_status = 0 +} +func (h *v1header) getTime() time.Time { + return time.Unix(int64(h.tp_sec), int64(h.tp_usec)*1000) +} +func (h *v1header) getData() []byte { + return makeSlice(uintptr(unsafe.Pointer(h))+uintptr(h.tp_mac), int(h.tp_snaplen)) +} +func (h *v1header) getLength() int { + return int(h.tp_len) +} +func (h *v1header) next() bool { + return false +} +func (h *v2header) getStatus() int { + return int(h.tp_status) +} +func (h *v2header) clearStatus() { + h.tp_status = 0 +} +func (h *v2header) getTime() time.Time { + return time.Unix(int64(h.tp_sec), int64(h.tp_nsec)) +} +func (h *v2header) getData() []byte { + return makeSlice(uintptr(unsafe.Pointer(h))+uintptr(h.tp_mac), int(h.tp_snaplen)) +} +func (h *v2header) getLength() int { + return int(h.tp_len) +} +func (h *v2header) next() bool { + return false +} + +type v3wrapper struct { + block *C.struct_tpacket_block_desc + blockhdr *C.struct_tpacket_hdr_v1 + packet *C.struct_tpacket3_hdr + used C.__u32 +} + +func initV3Wrapper(block unsafe.Pointer) (w v3wrapper) { + w.block = (*C.struct_tpacket_block_desc)(block) + w.blockhdr = (*C.struct_tpacket_hdr_v1)(unsafe.Pointer(&w.block.hdr[0])) + w.packet = (*C.struct_tpacket3_hdr)(unsafe.Pointer(uintptr(block) + uintptr(w.blockhdr.offset_to_first_pkt))) + return +} +func (w *v3wrapper) getStatus() int { + return int(w.blockhdr.block_status) +} +func (w *v3wrapper) clearStatus() { + w.blockhdr.block_status = 0 +} +func (w *v3wrapper) getTime() time.Time { + return time.Unix(int64(w.packet.tp_sec), int64(w.packet.tp_nsec)) +} +func (w *v3wrapper) getData() []byte { + return makeSlice(uintptr(unsafe.Pointer(w.packet))+uintptr(w.packet.tp_mac), int(w.packet.tp_snaplen)) +} +func (w *v3wrapper) getLength() int { + return int(w.packet.tp_len) +} +func (w *v3wrapper) next() bool { + w.used++ + if w.used >= w.blockhdr.num_pkts { + return false + } + next := uintptr(unsafe.Pointer(w.packet)) + if w.packet.tp_next_offset != 0 { + next += uintptr(w.packet.tp_next_offset) + } else { + next += uintptr(tpacketAlign(int(w.packet.tp_snaplen) + int(w.packet.tp_mac))) + } + w.packet = (*C.struct_tpacket3_hdr)(unsafe.Pointer(next)) + return true +} diff --git a/vendor/github.com/vtolstov/gopacket/afpacket/options.go b/vendor/github.com/vtolstov/gopacket/afpacket/options.go new file mode 100644 index 0000000..bab9950 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/afpacket/options.go @@ -0,0 +1,159 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +// +build linux + +package afpacket + +import ( + "fmt" + "time" +) + +// #include +// #include +import "C" + +// OptTPacketVersion is the version of TPacket to use. +// It can be passed into NewTPacket. +type OptTPacketVersion int + +// String returns a string representation of the version, generally of the form V#. +func (t OptTPacketVersion) String() string { + switch t { + case TPacketVersion1: + return "V1" + case TPacketVersion2: + return "V2" + case TPacketVersion3: + return "V3" + case TPacketVersionHighestAvailable: + return "HighestAvailable" + } + return "InvalidVersion" +} + +// OptSockType is the socket type used to open the TPacket socket. +type OptSocketType int + +func (t OptSocketType) String() string { + switch t { + case SocketRaw: + return "SOCK_RAW" + case SocketDgram: + return "SOCK_DGRAM" + } + return "UnknownSocketType" +} + +const ( + // TPacketVersionHighestAvailable tells NewHandle to use the highest available version of tpacket the kernel has available. + // This is the default, should a version number not be given in NewHandle's options. + TPacketVersionHighestAvailable = OptTPacketVersion(-1) + TPacketVersion1 = OptTPacketVersion(C.TPACKET_V1) + TPacketVersion2 = OptTPacketVersion(C.TPACKET_V2) + TPacketVersion3 = OptTPacketVersion(C.TPACKET_V3) + tpacketVersionMax = TPacketVersion3 + tpacketVersionMin = -1 + // SocketRaw is the default socket type. It returns packet data + // including the link layer (ethernet headers, etc). + SocketRaw = OptSocketType(C.SOCK_RAW) + // SocketDgram strips off the link layer when reading packets, and adds + // the link layer back automatically on packet writes (coming soon...) + SocketDgram = OptSocketType(C.SOCK_DGRAM) +) + +// OptInterface is the specific interface to bind to. +// It can be passed into NewTPacket. +type OptInterface string + +// OptFrameSize is TPacket's tp_frame_size +// It can be passed into NewTPacket. +type OptFrameSize int + +// OptBlockSize is TPacket's tp_block_size +// It can be passed into NewTPacket. +type OptBlockSize int + +// OptNumBlocks is TPacket's tp_block_nr +// It can be passed into NewTPacket. +type OptNumBlocks int + +// OptBlockTimeout is TPacket v3's tp_retire_blk_tov. Note that it has only millisecond granularity, so must be >= 1 ms. +// It can be passed into NewTPacket. +type OptBlockTimeout time.Duration + +const ( + DefaultFrameSize = 4096 // Default value for OptFrameSize. + DefaultBlockSize = DefaultFrameSize * 128 // Default value for OptBlockSize. + DefaultNumBlocks = 128 // Default value for OptNumBlocks. + DefaultBlockTimeout = 64 * time.Millisecond // Default value for OptBlockTimeout. +) + +type options struct { + frameSize int + framesPerBlock int + blockSize int + numBlocks int + blockTimeout time.Duration + version OptTPacketVersion + socktype OptSocketType + iface string +} + +var defaultOpts = options{ + frameSize: DefaultFrameSize, + blockSize: DefaultBlockSize, + numBlocks: DefaultNumBlocks, + blockTimeout: DefaultBlockTimeout, + version: TPacketVersionHighestAvailable, + socktype: SocketRaw, +} + +func parseOptions(opts ...interface{}) (ret options, err error) { + ret = defaultOpts + for _, opt := range opts { + switch v := opt.(type) { + case OptFrameSize: + ret.frameSize = int(v) + case OptBlockSize: + ret.blockSize = int(v) + case OptNumBlocks: + ret.numBlocks = int(v) + case OptBlockTimeout: + ret.blockTimeout = time.Duration(v) + case OptTPacketVersion: + ret.version = v + case OptInterface: + ret.iface = string(v) + case OptSocketType: + ret.socktype = v + default: + err = fmt.Errorf("unknown type in options") + return + } + } + if err = ret.check(); err != nil { + return + } + ret.framesPerBlock = ret.blockSize / ret.frameSize + return +} +func (o options) check() error { + switch { + case o.blockSize%pageSize != 0: + return fmt.Errorf("block size %d must be divisible by page size %d", o.blockSize, pageSize) + case o.blockSize%o.frameSize != 0: + return fmt.Errorf("block size %d must be divisible by frame size %d", o.blockSize, o.frameSize) + case o.numBlocks < 1: + return fmt.Errorf("num blocks %d must be >= 1", o.numBlocks) + case o.blockTimeout < time.Millisecond: + return fmt.Errorf("block timeout %v must be > %v", o.blockTimeout, time.Millisecond) + case o.version < tpacketVersionMin || o.version > tpacketVersionMax: + return fmt.Errorf("tpacket version %v is invalid", o.version) + } + return nil +} diff --git a/vendor/github.com/vtolstov/gopacket/bsdbpf/bsd_bpf_sniffer.go b/vendor/github.com/vtolstov/gopacket/bsdbpf/bsd_bpf_sniffer.go new file mode 100644 index 0000000..dab61e1 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/bsdbpf/bsd_bpf_sniffer.go @@ -0,0 +1,202 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +// +build darwin dragonfly freebsd netbsd openbsd + +package bsdbpf + +import ( + "github.com/vtolstov/gopacket" + "golang.org/x/sys/unix" + + "fmt" + "syscall" + "time" + "unsafe" +) + +const wordSize = int(unsafe.Sizeof(uintptr(0))) + +func bpfWordAlign(x int) int { + return (((x) + (wordSize - 1)) &^ (wordSize - 1)) +} + +// Options is used to configure various properties of the BPF sniffer. +// Default values are used when a nil Options pointer is passed to NewBPFSniffer. +type Options struct { + // BPFDeviceName is name of the bpf device to use for sniffing + // the network device. The default value of BPFDeviceName is empty string + // which causes the first available BPF device file /dev/bpfX to be used. + BPFDeviceName string + // ReadBufLen specifies the size of the buffer used to read packets + // off the wire such that multiple packets are buffered with each read syscall. + // Note that an individual packet larger than the buffer size is necessarily truncated. + // A larger buffer should increase performance because fewer read syscalls would be made. + // If zero is used, the system's default buffer length will be used which depending on the + // system may default to 4096 bytes which is not big enough to accomodate some link layers + // such as WLAN (802.11). + // ReadBufLen defaults to 32767... however typical BSD manual pages for BPF indicate that + // if the requested buffer size cannot be accommodated, the closest allowable size will be + // set and returned... hence our GetReadBufLen method. + ReadBufLen int + // Timeout is the length of time to wait before timing out on a read request. + // Timeout defaults to nil which means no timeout is used. + Timeout *syscall.Timeval + // Promisc is set to true for promiscuous mode ethernet sniffing. + // Promisc defaults to true. + Promisc bool + // Immediate is set to true to make our read requests return as soon as a packet becomes available. + // Otherwise, a read will block until either the kernel buffer becomes full or a timeout occurs. + // The default is true. + Immediate bool + // PreserveLinkAddr is set to false if the link level source address should be filled in automatically + // by the interface output routine. Set to true if the link level source address will be written, + // as provided, to the wire. + // The default is true. + PreserveLinkAddr bool +} + +var defaultOptions = Options{ + BPFDeviceName: "", + ReadBufLen: 32767, + Timeout: nil, + Promisc: true, + Immediate: true, + PreserveLinkAddr: true, +} + +// BPFSniffer is a struct used to track state of a BSD BPF ethernet sniffer +// such that gopacket's PacketDataSource interface is implemented. +type BPFSniffer struct { + options *Options + sniffDeviceName string + fd int + readBuffer []byte + lastReadLen int + readBytesConsumed int +} + +// NewBPFSniffer is used to create BSD-only BPF ethernet sniffer +// iface is the network interface device name that you wish to sniff +// options can set to nil in order to utilize default values for everything. +// Each field of Options also have a default setting if left unspecified by +// the user's custome Options struct. +func NewBPFSniffer(iface string, options *Options) (*BPFSniffer, error) { + var err error + enable := 1 + sniffer := BPFSniffer{ + sniffDeviceName: iface, + } + if options == nil { + sniffer.options = &defaultOptions + } else { + sniffer.options = options + } + + if sniffer.options.BPFDeviceName == "" { + sniffer.pickBpfDevice() + } + + // setup our read buffer + if sniffer.options.ReadBufLen == 0 { + sniffer.options.ReadBufLen, err = syscall.BpfBuflen(sniffer.fd) + if err != nil { + return nil, err + } + } else { + sniffer.options.ReadBufLen, err = syscall.SetBpfBuflen(sniffer.fd, sniffer.options.ReadBufLen) + if err != nil { + return nil, err + } + } + sniffer.readBuffer = make([]byte, sniffer.options.ReadBufLen) + + err = syscall.SetBpfInterface(sniffer.fd, sniffer.sniffDeviceName) + if err != nil { + return nil, err + } + + if sniffer.options.Immediate { + // turn immediate mode on. This makes the snffer non-blocking. + err = syscall.SetBpfImmediate(sniffer.fd, enable) + if err != nil { + return nil, err + } + } + + // the above call to syscall.SetBpfImmediate needs to be made + // before setting a timer otherwise the reads will block for the + // entire timer duration even if there are packets to return. + if sniffer.options.Timeout != nil { + err = syscall.SetBpfTimeout(sniffer.fd, sniffer.options.Timeout) + if err != nil { + return nil, err + } + } + + if sniffer.options.PreserveLinkAddr { + // preserves the link level source address... + // higher level protocol analyzers will not need this + err = syscall.SetBpfHeadercmpl(sniffer.fd, enable) + if err != nil { + return nil, err + } + } + + if sniffer.options.Promisc { + // forces the interface into promiscuous mode + err = syscall.SetBpfPromisc(sniffer.fd, enable) + if err != nil { + return nil, err + } + } + + return &sniffer, nil +} + +// Close is used to close the file-descriptor of the BPF device file. +func (b *BPFSniffer) Close() error { + return syscall.Close(b.fd) +} + +func (b *BPFSniffer) pickBpfDevice() { + var err error + for i := 0; i < 99; i++ { + b.options.BPFDeviceName = fmt.Sprintf("/dev/bpf%d", i) + b.fd, err = syscall.Open(b.options.BPFDeviceName, syscall.O_RDWR, 0) + if err == nil { + break + } + } +} + +func (b *BPFSniffer) ReadPacketData() ([]byte, gopacket.CaptureInfo, error) { + var err error + if b.readBytesConsumed >= b.lastReadLen { + b.readBytesConsumed = 0 + b.readBuffer = make([]byte, b.options.ReadBufLen) + b.lastReadLen, err = syscall.Read(b.fd, b.readBuffer) + if err != nil { + b.lastReadLen = 0 + return nil, gopacket.CaptureInfo{}, err + } + } + hdr := (*unix.BpfHdr)(unsafe.Pointer(&b.readBuffer[b.readBytesConsumed])) + frameStart := b.readBytesConsumed + int(hdr.Hdrlen) + b.readBytesConsumed += bpfWordAlign(int(hdr.Hdrlen) + int(hdr.Caplen)) + rawFrame := b.readBuffer[frameStart : frameStart+int(hdr.Caplen)] + captureInfo := gopacket.CaptureInfo{ + Timestamp: time.Unix(int64(hdr.Tstamp.Sec), int64(hdr.Tstamp.Usec)*1000), + CaptureLength: len(rawFrame), + Length: len(rawFrame), + } + return rawFrame, captureInfo, nil +} + +// GetReadBufLen returns the BPF read buffer length +func (b *BPFSniffer) GetReadBufLen() int { + return b.options.ReadBufLen +} diff --git a/vendor/github.com/vtolstov/gopacket/dumpcommand/tcpdump.go b/vendor/github.com/vtolstov/gopacket/dumpcommand/tcpdump.go new file mode 100644 index 0000000..ac50d8b --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/dumpcommand/tcpdump.go @@ -0,0 +1,86 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +// Package dumpcommand implements a run function for pfdump and pcapdump +// with many similar flags/features to tcpdump. This code is split out seperate +// from data sources (pcap/pfring) so it can be used by both. +package dumpcommand + +import ( + "flag" + "fmt" + "github.com/vtolstov/gopacket" + _ "github.com/vtolstov/gopacket/layers" // pulls in all layers decoders + "log" + "os" + "time" +) + +var ( + print = flag.Bool("print", true, "Print out packets, if false only prints out statistics") + maxcount = flag.Int("c", -1, "Only grab this many packets, then exit") + decoder = flag.String("decoder", "Ethernet", "Name of the decoder to use") + dump = flag.Bool("X", false, "If true, dump very verbose info on each packet") + statsevery = flag.Int("stats", 1000, "Output statistics every N packets") + printErrors = flag.Bool("errors", false, "Print out packet dumps of decode errors, useful for checking decoders against live traffic") + lazy = flag.Bool("lazy", false, "If true, do lazy decoding") +) + +func Run(src gopacket.PacketDataSource) { + if !flag.Parsed() { + log.Fatalln("Run called without flags.Parse() being called") + } + var dec gopacket.Decoder + var ok bool + if dec, ok = gopacket.DecodersByLayerName[*decoder]; !ok { + log.Fatalln("No decoder named", *decoder) + } + source := gopacket.NewPacketSource(src, dec) + source.Lazy = *lazy + source.NoCopy = true + fmt.Fprintln(os.Stderr, "Starting to read packets") + count := 0 + bytes := int64(0) + start := time.Now() + errors := 0 + truncated := 0 + layertypes := map[gopacket.LayerType]int{} + for packet := range source.Packets() { + count++ + bytes += int64(len(packet.Data())) + if *dump { + fmt.Println(packet.Dump()) + } else if *print { + fmt.Println(packet) + } + if !*lazy || *print || *dump { // if we've already decoded all layers... + for _, layer := range packet.Layers() { + layertypes[layer.LayerType()]++ + } + if packet.Metadata().Truncated { + truncated++ + } + if errLayer := packet.ErrorLayer(); errLayer != nil { + errors++ + if *printErrors { + fmt.Println("Error:", errLayer.Error()) + fmt.Println("--- Packet ---") + fmt.Println(packet.Dump()) + } + } + } + done := *maxcount > 0 && count >= *maxcount + if count%*statsevery == 0 || done { + fmt.Fprintf(os.Stderr, "Processed %v packets (%v bytes) in %v, %v errors and %v truncated packets\n", count, bytes, time.Since(start), errors, truncated) + if len(layertypes) > 0 { + fmt.Fprintf(os.Stderr, "Layer types seen: %+v\n", layertypes) + } + } + if done { + break + } + } +} diff --git a/vendor/github.com/vtolstov/gopacket/examples/arpscan/arpscan.go b/vendor/github.com/vtolstov/gopacket/examples/arpscan/arpscan.go new file mode 100644 index 0000000..19de551 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/examples/arpscan/arpscan.go @@ -0,0 +1,188 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +// arpscan implements ARP scanning of all interfaces' local networks using +// gopacket and its subpackages. This example shows, among other things: +// * Generating and sending packet data +// * Reading in packet data and interpreting it +// * Use of the 'pcap' subpackage for reading/writing +package main + +import ( + "bytes" + "encoding/binary" + "fmt" + "log" + "net" + "sync" + "time" + + "github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket/layers" + "github.com/vtolstov/gopacket/pcap" +) + +func main() { + // Get a list of all interfaces. + ifaces, err := net.Interfaces() + if err != nil { + panic(err) + } + + var wg sync.WaitGroup + for _, iface := range ifaces { + wg.Add(1) + // Start up a scan on each interface. + go func(iface net.Interface) { + defer wg.Done() + if err := scan(&iface); err != nil { + log.Printf("interface %v: %v", iface.Name, err) + } + }(iface) + } + // Wait for all interfaces' scans to complete. They'll try to run + // forever, but will stop on an error, so if we get past this Wait + // it means all attempts to write have failed. + wg.Wait() +} + +// scan scans an individual interface's local network for machines using ARP requests/replies. +// +// scan loops forever, sending packets out regularly. It returns an error if +// it's ever unable to write a packet. +func scan(iface *net.Interface) error { + // We just look for IPv4 addresses, so try to find if the interface has one. + var addr *net.IPNet + if addrs, err := iface.Addrs(); err != nil { + return err + } else { + for _, a := range addrs { + if ipnet, ok := a.(*net.IPNet); ok { + if ip4 := ipnet.IP.To4(); ip4 != nil { + addr = &net.IPNet{ + IP: ip4, + Mask: ipnet.Mask[len(ipnet.Mask)-4:], + } + break + } + } + } + } + // Sanity-check that the interface has a good address. + if addr == nil { + return fmt.Errorf("no good IP network found") + } else if addr.IP[0] == 127 { + return fmt.Errorf("skipping localhost") + } else if addr.Mask[0] != 0xff || addr.Mask[1] != 0xff { + return fmt.Errorf("mask means network is too large") + } + log.Printf("Using network range %v for interface %v", addr, iface.Name) + + // Open up a pcap handle for packet reads/writes. + handle, err := pcap.OpenLive(iface.Name, 65536, true, pcap.BlockForever) + if err != nil { + return err + } + defer handle.Close() + + // Start up a goroutine to read in packet data. + stop := make(chan struct{}) + go readARP(handle, iface, stop) + defer close(stop) + for { + // Write our scan packets out to the handle. + if err := writeARP(handle, iface, addr); err != nil { + log.Printf("error writing packets on %v: %v", iface.Name, err) + return err + } + // We don't know exactly how long it'll take for packets to be + // sent back to us, but 10 seconds should be more than enough + // time ;) + time.Sleep(10 * time.Second) + } +} + +// readARP watches a handle for incoming ARP responses we might care about, and prints them. +// +// readARP loops until 'stop' is closed. +func readARP(handle *pcap.Handle, iface *net.Interface, stop chan struct{}) { + src := gopacket.NewPacketSource(handle, layers.LayerTypeEthernet) + in := src.Packets() + for { + var packet gopacket.Packet + select { + case <-stop: + return + case packet = <-in: + arpLayer := packet.Layer(layers.LayerTypeARP) + if arpLayer == nil { + continue + } + arp := arpLayer.(*layers.ARP) + if arp.Operation != layers.ARPReply || bytes.Equal([]byte(iface.HardwareAddr), arp.SourceHwAddress) { + // This is a packet I sent. + continue + } + // Note: we might get some packets here that aren't responses to ones we've sent, + // if for example someone else sends US an ARP request. Doesn't much matter, though... + // all information is good information :) + log.Printf("IP %v is at %v", net.IP(arp.SourceProtAddress), net.HardwareAddr(arp.SourceHwAddress)) + } + } +} + +// writeARP writes an ARP request for each address on our local network to the +// pcap handle. +func writeARP(handle *pcap.Handle, iface *net.Interface, addr *net.IPNet) error { + // Set up all the layers' fields we can. + eth := layers.Ethernet{ + SrcMAC: iface.HardwareAddr, + DstMAC: net.HardwareAddr{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, + EthernetType: layers.EthernetTypeARP, + } + arp := layers.ARP{ + AddrType: layers.LinkTypeEthernet, + Protocol: layers.EthernetTypeIPv4, + HwAddressSize: 6, + ProtAddressSize: 4, + Operation: layers.ARPRequest, + SourceHwAddress: []byte(iface.HardwareAddr), + SourceProtAddress: []byte(addr.IP), + DstHwAddress: []byte{0, 0, 0, 0, 0, 0}, + } + // Set up buffer and options for serialization. + buf := gopacket.NewSerializeBuffer() + opts := gopacket.SerializeOptions{ + FixLengths: true, + ComputeChecksums: true, + } + // Send one packet for every address. + for _, ip := range ips(addr) { + arp.DstProtAddress = []byte(ip) + gopacket.SerializeLayers(buf, opts, ð, &arp) + if err := handle.WritePacketData(buf.Bytes()); err != nil { + return err + } + } + return nil +} + +// ips is a simple and not very good method for getting all IPv4 addresses from a +// net.IPNet. It returns all IPs it can over the channel it sends back, closing +// the channel when done. +func ips(n *net.IPNet) (out []net.IP) { + num := binary.BigEndian.Uint32([]byte(n.IP)) + mask := binary.BigEndian.Uint32([]byte(n.Mask)) + num &= mask + for mask < 0xffffffff { + var buf [4]byte + binary.BigEndian.PutUint32(buf[:], num) + out = append(out, net.IP(buf[:])) + mask += 1 + num += 1 + } + return +} diff --git a/vendor/github.com/vtolstov/gopacket/examples/bidirectional/main.go b/vendor/github.com/vtolstov/gopacket/examples/bidirectional/main.go new file mode 100644 index 0000000..2b70ff7 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/examples/bidirectional/main.go @@ -0,0 +1,192 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +// This binary provides an example of connecting up bidirectional streams from +// the unidirectional streams provided by gopacket/tcpassembly. +package main + +import ( + "flag" + "fmt" + "github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket/examples/util" + "github.com/vtolstov/gopacket/layers" + "github.com/vtolstov/gopacket/pcap" + "github.com/vtolstov/gopacket/tcpassembly" + "log" + "time" +) + +var iface = flag.String("i", "eth0", "Interface to get packets from") +var snaplen = flag.Int("s", 16<<10, "SnapLen for pcap packet capture") +var filter = flag.String("f", "tcp", "BPF filter for pcap") +var logAllPackets = flag.Bool("v", false, "Logs every packet in great detail") + +// key is used to map bidirectional streams to each other. +type key struct { + net, transport gopacket.Flow +} + +// String prints out the key in a human-readable fashion. +func (k key) String() string { + return fmt.Sprintf("%v:%v", k.net, k.transport) +} + +// timeout is the length of time to wait befor flushing connections and +// bidirectional stream pairs. +const timeout time.Duration = time.Minute * 5 + +// myStream implements tcpassembly.Stream +type myStream struct { + bytes int64 // total bytes seen on this stream. + bidi *bidi // maps to my bidirectional twin. + done bool // if true, we've seen the last packet we're going to for this stream. +} + +// bidi stores each unidirectional side of a bidirectional stream. +// +// When a new stream comes in, if we don't have an opposite stream, a bidi is +// created with 'a' set to the new stream. If we DO have an opposite stream, +// 'b' is set to the new stream. +type bidi struct { + key key // Key of the first stream, mostly for logging. + a, b *myStream // the two bidirectional streams. + lastPacketSeen time.Time // last time we saw a packet from either stream. +} + +// myFactory implements tcpassmebly.StreamFactory +type myFactory struct { + // bidiMap maps keys to bidirectional stream pairs. + bidiMap map[key]*bidi +} + +// New handles creating a new tcpassembly.Stream. +func (f *myFactory) New(netFlow, tcpFlow gopacket.Flow) tcpassembly.Stream { + // Create a new stream. + s := &myStream{} + + // Find the bidi bidirectional struct for this stream, creating a new one if + // one doesn't already exist in the map. + k := key{netFlow, tcpFlow} + bd := f.bidiMap[k] + if bd == nil { + bd = &bidi{a: s, key: k} + log.Printf("[%v] created first side of bidirectional stream", bd.key) + // Register bidirectional with the reverse key, so the matching stream going + // the other direction will find it. + f.bidiMap[key{netFlow.Reverse(), tcpFlow.Reverse()}] = bd + } else { + log.Printf("[%v] found second side of bidirectional stream", bd.key) + bd.b = s + // Clear out the bidi we're using from the map, just in case. + delete(f.bidiMap, k) + } + s.bidi = bd + return s +} + +// emptyStream is used to finish bidi that only have one stream, in +// collectOldStreams. +var emptyStream = &myStream{done: true} + +// collectOldStreams finds any streams that haven't received a packet within +// 'timeout', and sets/finishes the 'b' stream inside them. The 'a' stream may +// still receive packets after this. +func (f *myFactory) collectOldStreams() { + cutoff := time.Now().Add(-timeout) + for k, bd := range f.bidiMap { + if bd.lastPacketSeen.Before(cutoff) { + log.Printf("[%v] timing out old stream", bd.key) + bd.b = emptyStream // stub out b with an empty stream. + delete(f.bidiMap, k) // remove it from our map. + bd.maybeFinish() // if b was the last stream we were waiting for, finish up. + } + } +} + +// Reassembled handles reassembled TCP stream data. +func (s *myStream) Reassembled(rs []tcpassembly.Reassembly) { + for _, r := range rs { + // For now, we'll simply count the bytes on each side of the TCP stream. + s.bytes += int64(len(r.Bytes)) + if r.Skip > 0 { + s.bytes += int64(r.Skip) + } + // Mark that we've received new packet data. + // We could just use time.Now, but by using r.Seen we handle the case + // where packets are being read from a file and could be very old. + if s.bidi.lastPacketSeen.After(r.Seen) { + s.bidi.lastPacketSeen = r.Seen + } + } +} + +// ReassemblyComplete marks this stream as finished. +func (s *myStream) ReassemblyComplete() { + s.done = true + s.bidi.maybeFinish() +} + +// maybeFinish will wait until both directions are complete, then print out +// stats. +func (bd *bidi) maybeFinish() { + switch { + case bd.a == nil: + log.Fatalf("[%v] a should always be non-nil, since it's set when bidis are created", bd.key) + case !bd.a.done: + log.Printf("[%v] still waiting on first stream", bd.key) + case bd.b == nil: + log.Printf("[%v] no second stream yet", bd.key) + case !bd.b.done: + log.Printf("[%v] still waiting on second stream", bd.key) + default: + log.Printf("[%v] FINISHED, bytes: %d tx, %d rx", bd.key, bd.a.bytes, bd.b.bytes) + } +} + +func main() { + defer util.Run()() + log.Printf("starting capture on interface %q", *iface) + // Set up pcap packet capture + handle, err := pcap.OpenLive(*iface, int32(*snaplen), true, pcap.BlockForever) + if err != nil { + panic(err) + } + if err := handle.SetBPFFilter(*filter); err != nil { + panic(err) + } + + // Set up assembly + streamFactory := &myFactory{bidiMap: make(map[key]*bidi)} + streamPool := tcpassembly.NewStreamPool(streamFactory) + assembler := tcpassembly.NewAssembler(streamPool) + + log.Println("reading in packets") + // Read in packets, pass to assembler. + packetSource := gopacket.NewPacketSource(handle, handle.LinkType()) + packets := packetSource.Packets() + ticker := time.Tick(timeout / 4) + for { + select { + case packet := <-packets: + if *logAllPackets { + log.Println(packet) + } + if packet.NetworkLayer() == nil || packet.TransportLayer() == nil || packet.TransportLayer().LayerType() != layers.LayerTypeTCP { + log.Println("Unusable packet") + continue + } + tcp := packet.TransportLayer().(*layers.TCP) + assembler.AssembleWithTimestamp(packet.NetworkLayer().NetworkFlow(), tcp, packet.Metadata().Timestamp) + + case <-ticker: + // Every minute, flush connections that haven't seen activity in the past minute. + log.Println("---- FLUSHING ----") + assembler.FlushOlderThan(time.Now().Add(-timeout)) + streamFactory.collectOldStreams() + } + } +} diff --git a/vendor/github.com/vtolstov/gopacket/examples/bytediff/bytediff.png b/vendor/github.com/vtolstov/gopacket/examples/bytediff/bytediff.png new file mode 100644 index 0000000000000000000000000000000000000000..5aa3c8a446797cb3491c6e8cbf47328062d4cf18 GIT binary patch literal 47462 zcmbTd2T)UOxGfx-6s3qXDFV`ajWj_J>4=oj2|Y+hO6VvNjnburA|fS(-a$Y}AWAj# z4$=e+(m{$e!5jR(GymMV=ltj1!wl@%o8-x!o%KFtt@TD58fZ~du~Gp50BRlW2gU#Z zi8}y5s!BmjxI#BA_ndGb@;BDH52zeqUn87QKGC-H2LNbaU;Yv?^`PK{i{t@14>ic= zuP_3LMUuB}NfIvI4A8I$Q1|ijf_Mi2)cqh10T5@dAh!TlE-jshhUPFDW&nT-pz}Zt z6#R7)6E+3WfPMq-tVOBXx#oV1eXBZZFE=NK9?A{(OM1{zJnZYZ#77k0F?^Tu?bREP z_w@CDkCFO(k$WWGA;6>fg;^tqWlY}5nbc?~QcSMpWuY2ds-E2%ym4`B=Iq?}^GU*) zaf|zS>DLc~C+D{=T;~@Z(%9vtJ{#<((J@b%ZwH^V+)GqKSzK)Ye<)ZB`ar z0n-IF!pvPZshQfujEctIO-P{y&pTPG=esBB2YNgzT-&@RIwBfn1UBYI_tx$7&%#xY zSy&mV-_cjOdp1g)3IPBV;bo71KWA_69uDfbpJ5stA=+_<(2454D$SO%8A5jF^WH)5 zB7VwvVh%Nrkcor}I{ez`m$`m4Bdba5RV>Hh8bkOLcx;+_G zT*buZQ{+Vv@ceruTlODa(b=)fdsd8&?7r95D?Af;+Fo;Op%X}tv!>3SMU4uWqe9AK`n(_MGbMXlF<6&R3=lF3pK`iP`x6TJSwH zbEHASl-KMJyY|>Owc^hE>CF!xiAtutH*Ufw|;KZazCbFmmezgFX2AvGbUXDHam!q#CYMqfj+*LId)n$;LjAA9hVH1`EBc+ zvgZYyc7Saoj31w{+yPx*%@1E1_|!TInq*A~5o*Bg8eq#r1A((L^q?4x*Qb4zVGAO4 z;nJ_tmACmELIIq zZBX5Tw05q_u`FM76l4aXSqqNK9!=w{Hg$~#dxyj3ND8rqMdCw~IZ&lnsvI2?PbTl7 zO{sJ%#+N@H+_43liFkz^s6#7YT$;38;vYPzu)SVgQ}Eo*u`z}q+amav5CGuR_GfiG zH8=ThrYbem&qVy)yWS~z)Flk%L{1Awj_N&p;TFGF|ABPDVsrl%ngq)&J9f( zNAz{Tn=P&^v#=J5A}jX-)xYHb_-zfzrRLa)TnptPj(oQUY{fBe>#lnnAKRBCo9n{X zH4<23>s{NK)GPI6`#R*pc^J=H9=^Z)D63C4KUl8=oHaOa#L3kR>ZDPEa%znmP4V~Z zM2{u}d`N>Pze*G%9(DrP>24`?soH!eT~xYEodqnOHt?Li;OUQ!@T)iH-U(DYfZ5Yj zRO>}`akDM~;<^nV>PPsW12>w>pyL>G!|xqW#e>xeB_o_P5oRc9n^5T3Pkxv(`3y0J#-Zi<@d7sR|j85#`cx)?1P(9rJ zHjQL%P!6|KDL_W53VkBaq)?FQ5yAjaRXJc?P}B0M!ts8w_`$K&_=~JHspuoMna6weIo5T2 zvYTLF)-@pM;hm9*&S@iMDgc+rsnZ?5fcw;E9JppD)8p{yiF4@5tB0h4i}NDEx?I&Q zHBP*}y}#~TyiXpNCX{iPhx`$l6Uuc~B9?fCxKABj#ZNwE6iEZ`Z(5jJ*0e_)V(-_?smC+68z&= z17hCBtUp@Z7yC;0hdfe|kmRd<7FuoRvVtIu2p!|)dYEGs$C=5-t`s)ntA04E&6tsH zW15U_WGbr_yXqa(I^JkqWkJ_@dTFyMw2VDVmx!?Ztpd=SZ|m5$&sz`hvTI6OUnx-jz5Ig4S>p)mM`SzqUcP?_q}O%o&sBa=tj)B3|HkBljz&)J{$ zQdQeo;M6|w#fP@N@CpzWK%aup3hl4-FAsQJB6v4)_xk0Lg7dOb`>#&`?t>Ba>~Ch) zc%`JAt@ez+p!N>zgTCNzzoGz@S7`znMD)zQtM)#|=WI`U@-s~ZXS7Z2EwXC*4YOq1 zf_+kIyGbIYC^@ely=M%?Z1b1I<<>~Zj$)QH%H1JJVo_;RkE=~;0f%jFJYQROPuU0?dD4sEd=Y=GQjyxwa0!p7W|`+qlgsH5Umny^u$d6gRC_Gay=)(DORN{q)Ff z;v!0@K(q)ooYkZrhw^igL>i2i zg&9?Du1M=hKeR6Sx{j2|j1w(aX;g8H_Lv@aTqK_P;E+oa%%}jd{rSAKqyO&j@Y~(n zA`l*2HySXcaT-6TmABl(?Y7(9{75&&>r{Mals+!JaK+I3=(YtZQ?eC1i8IYN3uh?I z$Vvn62~7e{XbikIg(x0_CWJ&#VW8b+0T;8TexeZXYxzV9&Z@%Xq&kU-|t0Y(rINB(Cop7VUZ zJrb`XpTpl^HNHQ|A5?P`tacCXRS-T|Nr1VmyJEN$N%Zxa<>No^Y3oXgc{@f zZzApuDK_gDqQM}`lPSP{2bQ- zamqikLw-~LIZJ!$wBY>FyR3q@7vRRsGH=o%V)sfkl*yym*4Z+!`HsHm(Ch6}6J|mX z2H-zI9+cG!zR}Sl1*BkKdKjR;ZT|Shy5R9o^2Th`-{lMIO?O)b#(q;$Le%zTPD!Fv zd9s7X7zrWrLsR>t7vly0n7J8or6f=Q_+OQjlsuj6m8=A3nSJaq-%vDgi92t~-?kT0 zo+uMu4gocO^&TSVCK;mEDXrq{Dn?mWwcG&mnhXv&2g5= z;0St0t%@{yC~m>LU3=68;Z8wX>JwJIk@9802#`T~nqlvkPu|X)8mR^S#iyXTNde$O znjfuzr$r#i&LLOL|8$rZIuuO5-2M0hd;76tdn)mGEIUuNYcK2KE!5J!u!AoMxJe8R z$^rm*a~G!Om_t$Q$yCUs7VPe#g1hZ6KLwhnf$Ef9XLr3a^zFH~eVNO|CCNRC!&0Yy zAmQKEIZ38zCyYY2;*K=#0wO(*U3Vh_{IY zTd}u=CK@+Z>w7NmFp`y`-Q9JvzB_#cs9p=QCAoyK^PhiT5NsH>jl>r(>L+VH zGYLwvI{pYj6y1LH+LYO~2Ci$nNIaLbhuM+u@IsT~oJ&1ct?g>jV;dqE>;wlE)$_c} zk^acj#)Sm%bkT|1QShKwf!9(|Exiamw52MR^g?$vH_QCwXk9D3H{fajn*>ZcbDfni zR-~neMxYonqDW-#D65rCLbF&{iLu{@Jl+9VFpeTAyk`&emQ5`4Sd?XB_WDKevr#)} zr`I#VlprC4Cb%?PVV}qiSf+d=xYcuB%AcCZK7TdH{E%I-2^;1jwh`A#T*oos^c}Hh ztUH}J8s>tcCRc->>OU^Z7KoH36Z&&+F8xq6J;$8deD&okbJ-BgqxC@x7~xi^Co*F z?eSuV$Ft@b89Pv$^r3Ug$i?gMR98q+j(o^{?CeV#0DF}2HVgp9ttDc>8*9(5B?P+)$GGPO zWV=rnTrdVEfe*) z((Oz*p+-y%Svn^>pFG@*Y9*2JV=jhbwZ5sceCUyS%750%{TRk=S;l#T=gm6{dzwT1 z@wuf4K0c2dpwBQH@_!CnThelJTK~*ll{L#3=Vz3Edkbtdq21b?Y5X@A-z5wlmxyn~ z)=X|3oqhPBVr3BPrChQnxrO6&<*;87G<+iV;`F*lS{7~Rq-~gKCK#mV;$(VCl{)@f zKmLuCSwLj!O8*1k`d2UImNrTJ4Y}8;k*#I$GSNRSAdBbT-Qniz68ev()3b@K;cxn73%iH&&NKc*k-Ji(u6~}1^3$ru!S1f{IJMrOE$BfBcD3}U+Cpjh z%pnVl?TbO$5A;d~-^P%!Bowx~S7~x*UJEb4tlb_!S!4cw`U}w&Bhs7?2EkfY-qe;T zLuN5}?-Vkg(leG;dln8Mq8kc=1dm0uDZk}5T1E>1Q-Hd&(JdKKIYj^CYz)S+U2O%!(HNglo%SkxEEBF zU~Qg@zn%$nKID6I^8ytcBhZv?j{o+aMZGo@0TGcj-hX6f3(XlUBD|UV$q(QqV*gvV z@}Cz(l3!waAg*8R%UBMs3>sj07lxD;8ALMKR4hU?GqJ-tC+@C)FwLr#Ti-2(77r0w zs?dELX=TOfazMXCQFbi4!S<__hd41I|9WKMt^&SYS7Cw=4iCt+^9JEfpHqTiztjeP zPTXuUBR(Im66$R;UiWP>{V8Z`9z%Kb(8)`vgFT>fI*JOJ%A z;ICd}qd7kFJE6K)7l}*$PS3u|AzjXJRNH7Ow9KmHGVa-_kjDN|2!U-_oV04p9gPt8ulQqPMVuK&8cBTKHUDww zBv4U@T^aP$%WA&(M+P_>P6pe?Z7@yisjFeri&VR{QJuP!jqv7Jm(_hom=RCU+NrCj zm3nR^d^DVplxuf~=eGzUBqd`_$Y@KiGV}(F4SApkZF2Kpq>8_tLUvi?>b;Y#;Pz5{ z9y(e|9L-FGrTL#UAsx#TDZ;eRD}SpUuZ1Ee#a?j6xF}qh2TDJ|t95Xjn~YI1SgRY^ zFPp&byz@S_)J}@m+_GRTH&O(R+#YI-_$X%~ffvbf@9WjbJwJNxQCz<*Q7oEX-m`uQ zpqgMxi#(){@)vr@S2C)Mz*ulNPhB&GPle#IN!zQSieDk0n~Ap&^xo|sbbTnkc*9KE z-VQ#cE$}(>^QjhQ#p&nG_;k<}hf!fRfwutms#P_1w=krlDZEGCioXXG4^_Rq&d=>V zvMOmjlmq)78$Ng$%_4)|2p>7dQbQ45Lj83gBs*{&1w zyo4y2$6SuF3sYnU%CWjp2%(*0(EBW!A5U551ScAM;xVolY;r_g%6%&Ca8?hJ_b;!B zFmQd+llXKK5RhQI+~VSZ;C;n=#Ejov`|@Gnx@PdEJop(Pp6txzxlWbahJw7Nsd}br z4e+y5_lKl$x^MV>@uV0+zx@j}-*=S^v?Dhwpamtf!tsgJib?1?lfO^- zzB&pWJzNM(O<^B=Ep?dV`6xC4-EbEuc6tZWd{IX`oi4sk44I$<#gwOsxtCX*2HAhw z2ygY9Q>eaP@(f-+(|1)Pf!mNy4SuygRnNv*%@zP?*d5kREPj~jtTVo~Q<$9sqS?-z zF!8gpw%5)@iW?fO)IVCU*F+T~=b0R3#le|gjME~#rVPblo=xYL_ca04?f(-Zu%~fU zM_QP6xZ>_+qf~cSkuy$7g|A69fA4xGyBJ#`1IxB#VCH(z3)hgR=wIW(5(&ByAwoB2 z;Dr|lP)nJ~^;!8_>;T#J?$7ZSFTWMG=q%kb`x)ujD=%PXi|P60VERPEC)+I0gSU(U z+Mu{E(>Df4LZP#a!f_v8W#U7s~Xz*}914rl9u<0qSp( z$+ztm*i}{@<+XEUJvBU9Z`k9F*^$n~y**^%YPr*l_|zh5mK$CmTq)wWd1x{RbWOqE zu4;y#Fy91xMJ*U%w0=m^2Y5k4$P&V>vasv#g(Z}(2s6nidN40p+aBtcFj(AtLw059 zr(<`Q@aWgyr7TJ~o3RH|OEyKNQ*Z=p+QL)ofMIPFTEcjcne6wgM!c$6*)w?4HSwd< ztE)8|dKly65YXL4#73`z>xOtogj-8xD?E|*V%TwLv`IpvtY>NRE))ikteg!WrCz2} z>6+P^oPt{IC2x`FF)5wKj38!R)fYs^L^M2}_MnW%`aOhdoA)xqK=#+RjO~QQS&zrF zb&Jw#naLuzji+S}YV=k<`JN`dhl-@9jZ*I4@qXEX%>POUu)j9ds02u8Dh z%uD%Fp@4J}^3TA&ZVjj7y8wOS|E%S&X#b>q*%}RDM<60s{$#v;d;6d6Uf_p3mrjjZA5kl#T7%OhiI0yiR1?K3u*ur89nTt2_VJqX!xr0CR?`OusZy^6h zS*v9n&lzA)EFmldgbCT4ZVZFc={#w1W!@=Eim|$-?K;g+zE)=-02a&7RP52Nx(`nu z5D8>xDOMEPp(c+ssPk=CBs_>UC7UWO(i;N8lXNYE{m#XCmDta#mC}~QDr(-ehki^J zfx-w6MyPeb1+%KZ1`xnon6l^;0x+0R@&E%kmQigZG&Rh%?MGM$q+J(=95t%_oF?(m zY~j7No9*G2uhg%Zms-U}N5wCW!@+Ib+pWT6R~m4Nl%z<2r1xc@gpvv}O@grV*9*X^ zR`^bY_578OCcd);tJc{u?Twgm#F#gI%gCPFOS-E&hjt_F${2_f<_(vtC_jstydDxF z0nitXf@}~tAfbh5o-L3_uhGp4!ejge8}EPCF(kP^WmFzM)}Q*bFRKk3oO0BhBa4V- zZ`#rDB`d5cSf>F1oB&~*Gu(f+r|6>+%BXMh2sB)WMzm75kwtbKtj_~Q!bbFyMUk)1 zOt#N!D^+he95xs<1>e`GZqX~un?nD(IWa-jC0NTurZt`zF%10vAs;SAC96`TX-#@6JRJjXw{xGncvpU%tf8v8Wenr( zG&uVM;>~kob=xyRBaM=jFcCdoTObG7+K&@%`P=t15Qhn0zPlh@aiv2nF~<9wA;=i4 z-lBR&Cr;BdBAbu>WqR_u>fP@M+s!FySi;4Mg?pwffF&$V-1_JAhKe1V3R5AGW>}wo z@~pre(Cr?@lXccoLC(uyGHT%V-IIpYTa1GmJk#9jIp#r|Ox9F{ZV~%tFnp!?{Ol-e zdpqLYnVZ#cp5z<(z*-?C$4vP4VsH~yR@2qIy|@Oc1J!tZ5tw^M40zrD7WnwtNw3}7 zlVb}DYn@TD^jFPl6C?~rFi5_`9FrgzhD4Tl0wyXP#i+%IkzM-8&%KLJt;MYbc;A0# zCpBw+=s^87NDVzg3+exa7b?6(WS?pm(aTnK(y`Fr-+x&1azZ=h2gv3%yglOJr4NM_ zv&BbX1syl_#iGYNsfGcQQW}r;r&zPGsic8VBJj!^u5L87nxp{3?r4Gc$LJr~$K%g1 zuuhK?Iu<8R3p3WV9Ajn+maflaG(o4YJWmo!^Mv|OSD&hyWVZCNO06u8Fes42*0ZWP z$V!_8rT742KRwz`SK3ZDJQNkqEN%)wF%**A58fWG>2kf?CjkV!-M8Ianx3AvUG^xB z5HS_e!TSzqoUr&tic0i~CROf9!w}XVnr|Dj3qvaNbP2L+?8>Mxlq^&kAKU=SR?V#A z3p4_-2(+HIwT}60mTp>?Sm_8?iA|jQY|*598H>E3DD0N;;-J%Ge&Lc}XNJ3OR~cDkmBZ|H)8 z*i_g`>es{akl!Y+c9MS>^?&)C|N5j@`DoZr-+MzR zo|(6plg&1y)f*4KZYv;Tu0mfNzNko5L&g9MkV{Sf90)|G*1HOpL7=d;{g{9|!6?>R zv@=+jpqy8Xj2KJ1ApnxYi%3*mFK@}*d&MVXjdoa;eDuWJLNlw?6{niLKwvnc-lN!W zuR+iCwmLZEP}6zR5R>`%wjsvUiWDcy&}K;lIAB$OHQZ7mt>c#%#-5W*W^BYG1KYDI z?HV1ry%02S)R?wka=@PYh>&$%-bZ6o580|(GlEDX6;J0(BYul}Qrmp0Cl$9!Pf6E{aC4iAo*M3juUFI>(o!G#6JxtnB|8k=>Ve8;4H%5MR6 z4Ior`+Bg~ifL^thSz%u2rrvBm)LX?|)gX_%_-PI;CQ8uDq6Ut_M$h!|Oqzx0qEV+KG z`m^Fw^}8Ynvk75-i^Kdiq5zPy5tGUiVbdB>&;IFvR7tWLJuPd$YyY!io-Ab`6XzSe zl>Q<5d!4f9k9hM4&|M^N5kUtTjg?CTWUw+uZM!2g{l1==s}E&R__dptW{I**aCpg*KY<>uiG? zmQ8LZh&w7QY9xS#zBqQ@1%k9Nt+RUEufyoGxFKS^NdPIT=0_^)w%5dNUF*17 zD^480|MGJ)T=(win}b6)pqE=yxe-m)#nw3^uYyAU@lA)gtau_odmed8%fUR4XY!Vl}=d-4U?i*KC zX)+)7>&>xxQC^eS8%z8I}?v{aA}HN9ou*@15oY$tQD4?q@KJ@e%ltAd-ex@l|h?A zPGgxzdcQO$FI)4QB;BA|d+H(Hk%?W^GsF%Cc3UBkrn~>3_y3hNWs|&hU$m9 zzRz&IRq||q$K?BOK&zVm+J1?<3@x2qXGWiQSQrF-%z0+v!n%d%GV`<~jA5&W_W^aM zi1=1WXEnSMt|03VrG`j+;l9PUTNVuF1L!**TdZnbX*8!^$hr(A%%0=7<1U8r59UJU zqaoUFrX}5r3A~&}V-1?QvxyhnDKAu!WGyo}VmQ05P8xb*>d8j1kJSWB$9%fCGMKZl z<9ai|hnj{n*)(+iKJ6_h0}YNjXnTXEL{&J6`m5ro`ZP|(3G*i4-lQbjv@j%Mub;1! zpqbfBH#uZWxwyDo4h?e#-AqnezI~w9eMM)vZaZ5lM3w!si zXf|^hCy9+-*)gv?DcNgoh+nsRpAWO#DsxpQ^nXmE7DJp-jvdzIvMOwIpaw6Exu!MX zYqL_R`u%U5i^QF#mI9LDQ)RKP5wW8C@mM(B4C^{8f1qb3oV&sp(*uF6&oBZ2n*q>Y zQd0QDTf!|?NB!!}Gs@tu$Tu%5jDQ_Zd8gtcTCl}Cpqm#a-lDPY)JUnQ;#MAoQn+v! zsYni$)cp`0Fdl3)OfX}mU2D8YuM+w~h$G_RV|OBTAuArv8~7@RiwK50qyUL4VVpT3 zE19-)VP23w$vVk+jp=hC#IW9wM;U{HyLLe(yj&PU+&L;~G#KpOOMAnj9fcEhf1NGn zPffrwTx*RmgY&;qr%@ z%!rzAH~zjTJx~Jbkt(9Si(}Z{Kk*RUW>2OBH4YGP`Six5eD ztgX@{QS@MHi0Msn$?EELX(#z2Z^$&~a79FB-)~^tB4|6w!}<!Y=LjcMqYxGkf_!`eWvPR^pD*fycx8hYxVpwjFI6acD4r^WfY z&xWb$$xf3cev9uTR`)Oiz2b(s=w`T-aOe3oFDotiAgog}FS-+K&mH18uIuX)W945Y{_3ofCGrSP|9V`x zV=V}!h9VVP%xXg>YO!>tqnn@N*NbE7-a~QBE^;%}xgw0OF>kg|&q9(EH8(9jj+;uo zcX49_ba97!zFh1IukaodH++-S4CfyhGeGIv;Z3$ldL3xJmr4U{h?vWRCps0Qp1n9j z$30a;f5b=9}&uiQE2?m#>Fn25*r>JmJ*U&zubm#fu&zvAOXKD2E}I}e?;cYrD6>m2 zBS907e{?dD-ojcN=3D17k#6L4R zzkfcPY48ebtEsD=EuC~s<{Q6AJ(U-0O8j*04%S-yLduGg$=vYP^KYX!Y;^B{`_<>A zJ8ir*H_O-Y2l)E%)H%R4t^l4q{*ufS79W9IjW^BY{TTE*X3|S&Kxy6f^Gv?#VUwI@YVJyEj8iYAab5G^7ts_oYh0CUlq&8A%a+Mg1 z#MNeJcxQf>+V%OM`KA@yt?2y{??9943YAB&B;u0hhh(tKv~*^r z>q^2_JeedQZ_;ZA#dPGw@7Ni`j36KPg#2E!UaEMN%HB9)&7AQp;$ynV-N1LM%v%ql#`~=>kM%5j z9dpPdzvTVZrcVtrzfXyE%`;hEH2Q?QD17EY_nc7l<+aYfG7d}PpnW4v&@6r!IFc}z`Im{m3@S!-7C9<)#bX{z2Wi;r@) z5Jzk6Zx|cawc~RKLJWH748df_25txdmJD*l1D`w%2?JlzZ;`UP9kx zK99Zg^zE4&v6tXPwLxxhnPV--cYx$m$+IaM^pN_b9g4p@z7tZANrG(}Dccm;PAceqCByBNvWo?fGcpql5eAv*%_JQS4oz^fh_AH{OS>YOAuUsV)@}%)u)mZ}ymIVW zn)_VA{XeG1Fwv^r`H#NT15&rk!wvZjJ=MV;yiCQ`LV-Z%A{`}nmT|ZgyDBCP+Mo4I z=8>oEv`M%k2_TuEAVUgt=-(mPst#694@ryvO!7|I3)$RFdxKeWZ&{IJR_VffTjKc#;^k9?M z3By?~{zZI+tj% zv&xFzRNraK)fTRKLBqmoNF7Yo{^STbs!$sbnXApqX9f!AIJo8u8WJk4r$uqADm7#v zv*~YyvPCBWeua)2WN&!Z87}vX)YhIr{shu4SWGCemA28KW*=udY?zctbn`(q5?Oz1 z%>AgN`bn4>7QemE6^DA09<7lcf_;-3rui~L=yy z$!R!0wHc-reOK5}eR_NGci0_*LzBQR8?mXdZcJYLl1wFV9Cv|Db|zNo)Mi&p1B!}j zhg7(KqzI7J#`~F~LQF+P%c{1&5&&9=#-Iwys~Xs`;6e@R%=VTRSNMl(0DI1Fr)ia? za|LfOyHd>tbNXUAp*_xuRM$k;BmpBI^7QSsyfQ}ajSq&=GR(w~#9^@7AK1siM7bOP zlOZ%Ahad~D@0inFWw2LRF;7cBpS6eS&mqxZ;ZEf$TvUt5pt4!L1M<&<4|%8_De>fn ztVuZ&W|(cVlagwa^8REsBaHn%4Z&lHTxPVcNzp$?`8&dDZ%sfp$C?WaxMVaRI94%8 zP>cQa@Z)jFMtF1^@c}rC3@Lp zk+2ca3&}Rl_w=QSR233C5f<5eN-yglL~TubNH`M6nRn$=!xoR(ArT(gsz1M#0tLRh z&SMwbeCJV~ww9>kNx!D6d`}055C3>p3^z%s>Z#W>xcypl8Sf)FNs^{&_P@()5*4fw z?fsl_u0bxt7zsg#^8ea}+Y0pQ6WOIvr%5s*R^gPiogTHH1m}Ap>a>+)%EP$)9d%G>|6*E-1`t{|EgfW2=Bu}+k%HN zYv-d3CBKx~62W;nE1Nq?#R<*oG26fx>G8HgOqg?O_3vmQqV8YO4J{6H11^2?6S{@QV zd(xJpxO?Ru6sEbBx}%!tCz@_PUJyX2W-_7ibE~V27D6d;gB(@R?A)_#XhM{36LzZV zFm3g&IyGeFp`}oWdj`KmXNcBZSiUvGRGLw}&$j3GDk}>W=;?RvyOVXhsicW>8V=O4#}} zyl#Ds7m-0gaJ} zi3T$eSoRr8sg!=HRTof6xS7Oh{K_GCH^#`0QkZX@spc9pwUcbICfn($rZj9FW(7Zl zq+^@!0OG8V<-fM@S&)MM6h1IN(bhDS^Vz(;VHOi1ru58tLhxAx>ex5A6TZFDZ)aa% zwzjmt<$h_69vXtQgbUCJiF8(*icD$j=lGCRoaXxxscKejA2!!M)5+w`Vojn1tvSpM zlGjiSas!|_UnnGMn_AINGi}w6it1N%N57*g^E|(bK7$D#j!#^*;3u%M3Zp)o->A;@ zY76euDxF5%|FiKvT|TY!cld{L`0^ORNvC-@!yJ@l5%3!9T=jYgWy}ug+AVG_a=z2Y zE0L)c;#O??y@8Z!Pxnt+@l@UAW*YUPH2yF1W$=R2z=Q3Qgp;q21eiqZjt(QeOQ5l$ zqcWOXMX5q{4%Q)V5noZkfE-q{oS5r6iN~C7Ote-49hntok*vUL^?8o33TK3gxYSme z*3=|Uq34~e+2EJG_Q`zFPFk_56;r;E`c0=m$adqs7CRZ&VMBX|^qiBfgtW2~Qkpl< zP-A)Gk_Dd%Ycw}+zY0qQw?ARyZ%IH*U5}g^28N3s2t~1#T_JpDvicv|m}Vs2h*4bI zaYrT?*N_RrL!~r@g7y^?4z@1?6$D87MtSwJu4~X72_E%4a%tav{}5wJ9GQK^aj5P; zyZ~%I=o%4Ps`hSu*Uh=H?m6~7`q{}@@9PZe`|rR~#wgw=plRxF+1p4ZkewB^m}ZiU z4+3zbSA!WW`}+u=ZZ|(Msc-^M%zn+G73L)o0jHf1yL!r0XKX*WN-r+yY{;BGtYIHQ ztTdx5^;6Eg*uvWPLIn=QJzASEf34NIQOe|I(q0PUqH$pCXdln8RSRa=ForJdJj%@zT(E|j%kCIx`-a4yhttQ??YF*Fs)wQFB zE)N8uJ6O5|Vy2h=s?YPF@U`ia2I-DH~S^p(Hp$rTy zc3z5j6Ole0yVz#JAFb5tTqc=D@~~buAj$1|hHAT+a3|Ovju^@3gm)*@`l0IK1oz@C z#&*``HqRPk06+WmKqszf#OJw9v!{mFv8!%a1VON6?_O4+b^fAv&H?_lrk@SRdzmIk zbCAJ3iXF?Qh-Io$Q=eKG_}xvN8GF_zB4Qppu^Yq1sH{85nx^|@fskC^5t3_!-X(G; zdw8Fk4egXUe?L|*fD?C0k0-{h)l)+;W0+cyJ2#v}5XT^A3?(;Az4;}bf00W7@S5l! zrzh`{NzQ5N4$sRLXLuMpS^hukqq!qqZeH*h3pq%N6>oM8=ykI0h94E{UDk(xMBYfj ze>PbU-L#tB)BbDqAChuz5%|aGuLuvuNuEckEh6#q)2TXLCrq_Cp6(9@qGfmGnvAIJ zVDUNxqD!Lz6oV9ONp`GhCipj1V_CUbuPCbWuY5R0r*p99>@}BbG%i$ca5b&+Jw!e5 zGm6wHe6nXSKzrq7VgmC*r-AfgP=dm|P?6t_bdA@9Rfcd~XHEdlfBnJNzxSDoiS2_i zNWAa{T1BH&LSsJ$5p)nTjR{{TY^GIv85Xvr8@-qhxG}JbAIrSA$`bX9?JRY;%*ceF z+C&|Wd5+a4*)Ql!Xhkfk+_-Towz!yK`%aArm`(*E`$ zQ9(1sNJ+l?q0zRx1u5>1eTmOZOfzktN_(EQvmJi4>b$eEO21EJ=KLLHEdbE;KlxBNzzca#Fd*D0Xvv!Nf06dqVQqE&wrHqOp+JQeCk0Azg1hzQ1zKo} zySq2IL#RQE7K#)oR@~jaxVsYqh2Rh%KnRlDMf-mDIp1^l-ru?B@CWcDizQ^vpNu)i zm;gq3lZ+jelUD!oS!RWBLZDXfVx)rJXNPrRdwDk%-vvKZdYyC}=0@>5=KN?1uG^po z_W)orl>Y^N3M2>PQOB$vLOf9yxEW*<)UCzgEbb9(B3Bya5MOPOg1MdTdR7;=Ow*|(H^!N8)CB^MUt0`TAj`8u7X8l>ONI4Cvej(!;Z1>J;YioxLF<2wdi7m|{ z$t~c;O%#3!9JJ;@yeb@or!?DbKosRi--GfgzXb|(CIr?&fksQ=%UV%* z1nhhpcF`u~y>u}4=3+7|&d|H(40nRZ^;<~^vF#n2m_YSupoyD04Zret`w0T7b#eOkCUp4Bzj?ypwV4f;js#i|%Nr|#hvw0@of zovVbu$Z0`bz&#+k71nzwgL?OYL?P&4zr$SB#di77X*&X^QSkh2ntvfRV<6)Ed#f2m>4?1DT77FyVSp>D&WPykea)W&ri>r(9--hfq z!MidA#wl;PjPTEn1Rz#4o(+2C-) zZuJ7QT@2g(d9g+k>@ASB6S5wLiq&hru!5bwJwh}u?}|Z%I`6!D4*Z7^I8C#Dg#Ry8 zC=a=j??}lEol8GY=Qq73>`@r?Br&eu3~B0BO7V&e!p9#&AiNpH#$5ozM5vmg_eo+|t>bTz{qf%EJ9CL8i- zaB$FnB^@T2a2Tv;=>N+lMeGFQh@7Qx!CF9hI(^rbq{_^?!sFxPq4VbheF%5iq;rpp z)flN7Ow-tF1NQ|l2u~-C?_TSY=$enCk{MoXd;I?4IKVS5y8rZ>%5aiAYjNwxu5i}^5&lue15BxP}rQ_ zma}ggwIS>%NXmQ407K(C{A}&J%drn0jf!wNVF|a1LdL*IseNeqI_naRW7PbD?2@mv zAzIBty5YP~<9wQPZNKK?(`4cphP6c?hjl#G=5RTlvGUsp!K-7&^EBAQc*wuwN8gi( zS|6f{{U_LsF7mYMR-BivuNir^V(Tn6Y)`Zo#L0?LK#$9em79TX5ovlQlkc&Xn;3oKDiEjjX*kSK(DF+<%dEYc|-ljAXb?a)q|mY z^o*_fH31B1 z+_vB%ff1|On2LwqVdgJBKJdLQ^#%EmS2O1NBX^wa0J~Ga3fda;7pf z@TU#2Z2~XFgPypIn6D0GXy_(KVH+~PUkd&*U}>?}JQT2AGQmgnViA zRRmJ!AK0qwIj$DR))a+?ct_G`FW~{V9y?g*P(33Oaau_Cy9znh8oA?k$CoOC5BZz0bG|{&Nm? zLXvx_JeC_h%t_^z-oUu&ymb4RKiHY0^IZ&5Ys{U_L%p=G-4K-tx(A+Uae?+ zF?w(ZBk;aXt8r5UaXMMOsfxaEeL5txe9-+w?`ipV&;xrxTVFQw)izagom`DzeP-^z zWz?EESRQFpA~HTFYVa$~e^TGHdu$#65c5pi>IPpuE-wT`u!EOK5CSp<&T@0on)_iYf#KP0Zt<&HH>KHc^G$!G@mzY5wE zKImp7=lX{4HcJ$8@IG0TAu+6To#D1=yCBu~-e6LUr8!y|+_4*!G=rZW$+m$L@1iwUdmwPtg%ONg~0DOcbcKA2se&h7bHyViHu3*58LZ`X-dN%2i~Q(xN< z5dD%xsYY~?Je|(|+rF!q;s}FaLwLQVg;WeLt2y0Y)nDE4#v+clp9$8dat&kR=wleh zhVx@-r5Y-8BC)@c>WSM7)aRRAB@_$*NM^n|di{3jerzUyG_)icd0#*by^v6hcO&rZ zRJi@l0lUXvoF(>9NKo4(OeK z4dg+$a45Y5u}Uu89IT%-z+fRX!j6l;JvaV(7$b#>Qv*uj3f2S@)dAjYD&AarG9;jsI~8YtB{6+7+}N*3JGCG zb*p5r&R-q!hos(v3lct6&^i6Mkl?)6e-J4aRS{O;tn>5plbjI_@B{6o z8!j#`dV*4Q7U=Z%ct6vwDwEMc<|>r0X}uyBTOP^MBHd+{_@7)!6!(yqBAS*JXY?zf zoR1N)%T||5x?-fjlCC=44?VBx;zipqX@Hi{L*nJG(uN^)AQ!l%rO$8ZNvq0APiG!UVrbjuW zYC?u97T{vZ?vGf11b{>KDGbgN3!X5js~l#RlaXt#}_U~BO5JWNp5%h?GUno9EObZKt`4VP0p(T zWI37f-Os+?t_GoB(l2oeJ(A{Z%e`5DEhf_huE0a(1MY&p6W2>2jb79%nl$U`6{3lg zTQS8_Oo9OOAAQ1~Kl`dh!@X+r0nAS|RJA(u<@eklf#J3vw1TH+RO_tMy)0^lBxACN zf@-WYsp!8t_5im*-T@d$asBdfCtZ_##~t;C$GsnxAhtU$Vjw1^I5vca;#nSW zw}HG}uYsPwpSo?$t&hn?r5-tBX-RSs_NZx2!Q_chq-tmx7*mu@t||>Mwmr z``GumE?p8r0BtkT0jLFsGcCL%jAA42!Koy-e2z=b-on#t3nD<2Spt%rr2ZqLFVm zeGr8i&|FXYqXy3e?dR(~Q1Mm;hLz4Az1&Cl6O{DrLTfkk@Y{w)w%e==WahI&WBzBj(RP;`|VYtAgxoo z%KPyhG55x!10x@d&w@m~6{3-vj)vpPykpy|e68a1B!m|R=7sW!5W{`&X@Vhua7Gxp zo*v=g-$Ri>)_CT0GrzbA_!gIf`;p0v-%gK!g2j)z86#+Y z`bSc5XG8sog!eT{!T1xm%x^TRfL;#ol^)toY#`V-VPV z9r)CbH>Vm_KlUjRL5P0GcWKvf$<>^rt;wX5c{9w;oL%V5;c#0Qolk$0AD-^j8-V6@ zmuPqPXyx5?^o<9>Lgy)ogCc9&8+=2e_WQpie2$xd7K-}ZZ|UcCCGk?1y)!w@LVa8z z)NkuNF4<$dR32Pqz28PEaTljS9P-;}a6|+xo8RQ#MjRp0WLt z4@ycrzW@>wzgWG8rRC}*YTkV|w~vs1waM=+T;lj-W(K}B2|wCU@^fa{9Jf#`ZpNjg z_nRL)*B-<_mLAoo{}ZUM-&n zqnP9keMhi}I;5B$AYN!VDFM3j{oHI$*dcQwVXk5v7l0@kO;a zX@o(D4Y?A)v-;sdxDT2d;kcsG1+?fc$Gh-y`JhuC3%kc zgaq%+9s{u|s6eMU-itZeebz>v)=eLu`u-S&@YtX6T4Nx@O1Tl?!AJtXz3JKej{>piyG7(twzjdgT2j`b8El zn7dT^$VB4{+**14{^MCzDM>2)tpinZ>svKpogzzFt}!7k1g`MTqO_5k{=e!h`+dI`N0?;SNgM)0!vCyYbm{2{Xdyh$JO@u;A#< zoFEiY<#pKACeopz;&Z%RyOw;^e83L%1RnEa%I6IM_oj4m?aY_FlV0-i(uMa#Km64# zAYmXem(5_r1Y`>p2sTDUTD;oEw@rndP7nM1ir*UTaz}Wn1K{(rtzfcn&)B|Z^}!T? z(!umAZ9CA(n0LUX$L=Sh7P<;fA^Ufp#dl8Fb{W-mWzq8`ZC)8`XISFnaU0`a0@i=7 z&&LSW8p=(1n<;I8-h1+xXN@&|1iE{GUo-ju6};K{DzNigVIr8;A8D{!sC9n)4Ol%t z(WMKR&m@l+uVrFDP?@QEj+7&EEi=Bl)epW zi8NgHaWKi{(TOS;)4E4N-8BvPe;4nSt1Nw-d8X5}bfxdcyYZb@t_2WGw)qWAjTLQ? z$*&q_$6hw4T8?Mg-f>a=1m;w;oI~_tpfBJ2%~1O5vr$YBy{7>`%QK8jRc7{Q+CKW( z$2ZxpS%oXMA+tACY1hOiuGbZFicZE|u)b~SwHR9({P0dXE^YQl8oacFJ}Klt&J30Q zi@ZrU;R6Q5N-Ld}Rxh2tkE|>Le0DQFL}YEWtzCOTZv<-J+USk)Lze~VBeh={Sh8QS z2nPg9abmR*7@O~WhI)7T`|oP_ePlnCR=A;z88!Jfrjz2E*2ia%m6Zg955@L?Q09UTu_fmZ)w-7FDtuqtHW zHlcw&y#e-bk6L0(q&wZ$!eNNX4faO08c!=jNTo(Sh8X_jp`aN@{MAc19tg}5wJv7~ zw;IF#dIv*Fb&i|VgEnFltDAN!i$zeGe!tL$C2r_+Aj%um7~=+$>K}3GHu%lO#>c~lV68)! zS6XQF3FXnN78g9Z7!X1<*aEn>R^$4JJY9m{s*Typ259NdAxGm-KyP2!=o88j3w`&u zO)q0Uu_@|_;fk0n? z=j)yJ;;N1%SI>}@jfknn9<2h^MTv4YM!#iV%};3u^k27L7b@{8(hPf(X7GmtOq&_!-jemJ5VfFrHN#*1Rlj!Y$q+CGYM?}-hB5ez|I zgg@Bc-qsm|h;FVg2X0N>0Q(N-!GJ%j~f;-PCbeUHyL&9_7sH$@evyL&aiz$Aj0ttw4Wm zYlmW7lRQ1jj(s!kam2jRcjxE}7noQt9$ZOY%YK!ai%QRH?4ztHF%c+4GivD->3Gi*-|oZ9BR3485fw46Z?%0Z{)O9`$nrTe{~GB>4^d2;MA}Ua0q+~3bhK~J-3Xx{*;k%Zu=RX7+V)?*gP9r}p z6`nQiBAqLiuHF7ePC<4W4ItD-4u>~Bh7TPyvw_1V{U)rnWF9MLoiAcyj1*!u?%&DO zP5H=XyUwNDs2bWCH{}){77|#WQ&YCt%T&H(4xH)*DR>9|CgDjjDaSURn(kTeIIzsg zQp`TE&k8BsqzXIm zIsfI}H>|$EwhR+YrN2GXzr3q`ZNhr<4}{_QZzSHkL9KY;D+BQBzZqb*cmi(gLn&%cXL8SyMbGCPE)OUfhTi#kdr1qR zB9UpIJfnYEAXX4GeJSX8EPG;2+A#V=0B0CWetGDJmOqNz|ENs=j|cqW5`q5w_>V{b z#{>TDbbF~raoj>eLML70 zvB-1xc4yy+M&StTWKi5oB8J!faI}}bJ}0H5rafd68>rNw!4>FD*^4U|MLCpqt6Ye$ z91&i+S^v0^P-e_xcyl5qvW%N47G~&1uZ1iU?r^Rp;;^QGSce;!J7o$FHeb1P^>c-| z(1Q!);|2Py-|p$ED%N^YVr=IyptV^ocougPtxB-Au*t3i0*?h@`_yizBx zR8q*b$K~r0#j+ZGxjQk#YajEO_VEoMOrEa`9dmpPPY1Le^x+DIJ=bD|{8{~(sTtoL zst)1Y96u3nWz_Z+e0|g=3r9z>LY>%JHFeG4i8*dh!laFH1Ny5V5oB-#p9CZGJB70X{bXP#+N6Q@g)IwE9F7eg8= z_-lgAAed&f-%am}=2T=B_-eqd+hF;#$OBqyktgw|bJN>O*N;1PZLO~tgiXslaI?GC z%Mqve^wqXttxe8fz38IyVA{6C2(w6;gxXkn0?>*~@jk8V;c?!}s8F|s5q~?QMQX2v zIpfMzk@3PbL$3Hh)9M~&8D%J=gTZ&&iF6R~2}xNp$}^9bAkqrNG(Qf-S;LLuVAFpa z12*pOvaemKrxuedYp{oWK(gxm!SKvS<80u3`IS)`$!!!b?L%*qhkCK8F}8=h#XJ<7 z*CORG2LN;>f!BjrL5Y~vbY~_HgJcqD96O@lodq64+P5{nk?9XlZMw|80N)N^ev0>;Jbq{bOHy=9f<5Kh5kP zg&si272TE=@^NI6h#$oJFi;8L*^MsRuHt=R`(03ZyV4A1ODjoOqm=kr>3xW(!p5ZY zQ<5*LfR}uCmU<)L@w2A)nM3b8trj%KOpO(o^cS72#SKnPM;SlY^-kW(8he74iUQ4y z?=>NFI7*5T9u!9xA(a|Zv)_o|o?SpL~KYOlGJ6}rL#+JOX7fGpl5|zL%2|b(aN;f{~7VZb@i`*iQii?%TWczXgMrxhb z91Y#3#GL5xq+MBp#{?H#Z16V$7CNk7Iqg3-BfFYX-S4l`sTv;4eQscDbh`WE6LTG} zM@Ah(eix=pFh`8hIx;nx9EeixSz}NpBl1@qO02t2^5+Y4>@wYNJcK*TR;F1b@l-K& zcnNeqVrvB)4n|``0`)qXd`a)Ils9ZADGNa^IrKHtPOcww*d=V>lH3>qUNi&q&E_i( z!krEZ+z<=A4!x?4MH0X2w(udi%fb{h|KQLEXn|U$10!yoR(38(J$dp9>{hGYZ@6+t zo~+BcGD-^>p(Yv-973X~Qp-NLm6S2c!L!Nbn4s(tRWqtgA5J#0rnY(=h%;t@odRK; zP4c@^`pl~zV1jfD!v`s?4&%xOR#$jI>->#%O@ zr~^sP)^00X5~Mriovbl^ZU>L_Dkxl5lN?Yx@m5F13t1Sljg;57m=DY^%-z&if2!Pg zZ^nmOGKm260&qy<)m3tyZ_K8?V6n_#e`P;+mpboz2JH)7lFjR)jwG)wB2(*QlOjSi zCG(4t>%@B6vrw0u%*8*OD*VR+;GY9XFE>^Azc848=?c)qg>;JMY}tEwrDv}PV#arS zr|3hHJE-!=bz+l>h#wH~|ER|S#^YwhvcwjW#S5QAN7y)Tn~&ZjxODFJEv9X3ycB5{ zjU7a9a~fr(O>w+KZL9bGF-s3~T~N_7mYn>wslwa$LFmW1UZ(8Zm!b@yZ!D(h|hkPGM8b z^zP%ftSZ^(egdKV4w|`v(y6CaH|izhw`r~eQH3IZy>;(8)1pd}-;3~jVpl-j>l2M$ zTE_~2=6B)egp^Z^4TX(6y)PGi$sd>fBZjV<9J6I|HS)P94GP*c8pQR|aQIVTAGdWO zcg#ma)}V}^)+=1xzMkO;fX7Do`xLnHyM0L|>ZcF1Kl#je8*s{zO&Ed_EzMZ7Ce2N zljFhMiI41Cw&Dcc(Wh8#F3{coBOgjz;jbAZh;f6ANB(bgkh$ITrW4n73(}&rYA(YT zN{qzmAM^Lq$v6%OV2%zcal7HjTDF+?tzCjTZUz)!bfW!<;`W6z$&1+6!$?+$tC+Il zleGJy>#G{L#?yNUUicMwr(){Mthzv8%Q0l8Az;eBx(Et;r8K#93;`BUti{O z6v8zmf=Iabl6Cq-(~Dc|gU}RSnGMmZ$IFMwIyP<3zNATx&DdBeE`v5Bb(RxNwx|Gk zC}XLa!<0SB+(Hk-anWR)q~2i~3!c)Ev6P9)>z7LSyi@cDn?9z_ISK64q%#pWc}yA- zxJi5OAL}Jv_t5G%-^bZ{tzY}8md-nV=msS#WtpqMAXeS@UPM!bA5Fot?nx1gB+O1X2u zHLA{az}mf&+qZws_49OTNMBCso3Q9rVtv=dJ%Oz^6I!bdGp;6tg9i*<#)JTRIMEoW z>8>6BM4(BAJ^Y5D8e=%ZQ}lNKUZT^?-zuTGre_~=9v1_Gr@D|lp&P#q?jPKEzJV?k zV*my4UUaHtH$;DxiCX@W>%49Te|m8+L-`Ig#lYRB7R1q;FEt^2FhOaw2y%ZbVx6OE z;V_|P`c_0ZK(_5K*R5}HvNA{E&$H-(v?S>I2$(Vc56)6iEur(*ZE5%J3E!3DbPi4F zX@Yj^7(buf>}tRHg!$1o89xz!*rbA&8Bp3jxc+})Ib1P)X*oPrbpCddz%u;G^{Kyd zz@?V8SY_XxO0Ad~*@xzWnwiDYI$_=8H*+myZ#=hIczLb!&1%-BpzK?-nwxiOpUaH| zE?tg=WhLUe|4W1T8;zX+OY}`XV4Nq`zUPBKAh)Kxqi&z`I>AXagN!YXcT3bAXQHg| zwp7oem$x@stJ)+%@;0b5Q1aiS-5EL(e-)4|8=xn1*{TeezuP@Op;Kjz zWH57*Gvhn5hHWM$gbvFvTe-uN(8%==i> z?AE&4+YycB_e~l))muE=4L4K3woLBdTXN;eZ`^H&27G|3?`bq$tsecf$xrtC>Nj=z z({D=JCGCY9!l}v>(ztZ*#FdJGr0sui1?K1a^hN9jQ=i%|$99!eGxansWv1f2?Dl)o zB>R*2sfC%2?J5H|zn!TY4;n}0%-V^*UU~I_J<3n*O=zwJ#j?m*`qNqE4UvNp)qaBD zzn8Dy(zRo|B`Et>X~jn~HI{cfGd|4|H;JDyj1W~t7B77Hi<|!XvzrSPPrMsEMIb{u zV6!lhPS~Kpl(&C#$XCCGqk_^-8kYhQyxm~!DUMeN zk+OsVA-^hS%TD6dg~a%6;kJ;|eF6}X-Wu@{T4ow4$Q^lxte*@mI}w=hcjH)IVu_-%6WK<*KARh(6*@+w38Q zo+<A#$lu%V?G&b`ob>YdY9xb`wO-36_Vi+`H3fo;Cx+9qrhotu0#Qi8q@DxQLBThAdL z%(S8fWU!g)yy$e>E~19dPi7Kf=f=!-pl(NoYnh}Moh^axcMA5K-2J;MkcGC6EZ@7; zUKI!xMaQ!0Le}aZPKvSdf(LJGE*28`s^d+Lvu1i4?F?+{ydJu8WBq$>^ z#|J-W6eO{Nd{G^s(&A+)m>FQtMD7gt8_UI4)_&GZQMy7ngw~Hjm!3vx0sE$beY!jo zpt;n2Vh3f7l@cczb|{?;usPdL@2?Wv zh2=pB2i-|mNvpew{u;arYMB@Tu>iQ zZD_{)sMF+?JsZLj9%Y7^^ifyY-XU20AzWC+ksfF^74&n{XGTpmi$ynH8koBy%O5UTK8HrKzgbH!|opB&$8@6>vv2u2^d!%6dsM>$o=gtIWN` zfexY)9Gm%~LM#=-yt33*WQ0QeEY&?$Z3K@AeGD&wynn{rW=rDlMQhHJc?j$g_P1RN zm*5Qf)!)CCDB=!`ywE0rbT=md*O6*lD(vOp`@tP8Q=Wgr5|(=E9Y1Dl45OL|8n8+) zrOFW`%(mPij^?AY{K;NyaYnXdN%wQFil1c&tNn!!8Em0mc3m4zF0aZu(Bwl3x)B+X zPFx^Ii(U;1wHy?r*u5$$lyf2O_7V}~BUTu+wAahtK@#asPzh5yezmDcr)pJu{*2@X zTdYctxf)Z1(fcweJt(wB*FkMisAO~HOLKf5N@uFMb#|qCs}PP^d5~(DSwZP>=lM$P z(F8BS6Y>Eu4x5=g!UwW9L8jQ7vaj|yo!_6u#8Cf$*Kz9f5mzj?zWE`zY@4}8C|;o6 zp@__bTYo79Ih;VH@M!#UH4G(z-}Xzv42bEEDCR`ef-PNsN5>-Cv{DP<%FS} zSl+IJ7oWv^s0qe>KjXHei0=|Pu4Cw;cg=q>9dfaY!tJg%OYJ{M5xLlx!V)!)ua8MJ zA7F=Yr^WceNTivReWqzx6DMM4hMaRkl~W?xy33JM$Ujf#cJaJ%P16dUX0Wf67lq)j z=1JAe`P&N7OwwkOhZhJ;Rk8P6#Kj!gXEol+e+A+DYXA_WkivciEgWVE`JD$z9v@c& z8Uz1TtA)Kl$VIKuNeAKV{wAp*=5sbmqQF;tLEPA%VQBq)CBNXDFe#+*1Ks3s_);DX z8&nYBkd8X{Z1r(}>%nFs33|Gxj!V9V>gGjLKl8$of~?!7{C32Oii=T*di=?L`V9b(4Eua3*#0ded?4Z^3{j9rtAxi4oo5?ejG#Q{x=7f; zq@At|5#K6&i|!sDj(KMYCY34>D$rs34PM9*NZ$jLGeOCI$1`0@bP}F>jv0?HFIUuz zA%^-cQ#WJYBhXzFHz z;kiR67q?BzCS;b1_>G5I%I4c_|42c7`$KZLGr{BfjlBXxKMkf|++zp2gQWAICs+*C^;4@Oh(V*1= zWB7(k%u@R~lak5kWTmDZlrOT{f2bLT z5o*TD{H`DZifU>7d;w;my0ioQ!c2D4gez4P+aqd;=-HrP@&)Z@Kvn=(x)k~C*C84y&JeiV5!`|$Vkd_ zZ}0TK6x4wK=X(LO}(i4I>DS~1rq5kkKLySlB zDmD}EKeE+)0*IwhiS^!V>~u{hBcx4uMf|zVxZ`)Inmg`d+5oJ2G#O>!szr*0sGA|m zV+o;kIeTw@sx4z_Y9!ccf@i%bYFs(epJ3u97i~q6j8bmS-F`3XlUu1+>r9TX(0pD? zf#Ghz_HIaF`cmMzc$62)g9{6*ob6A7+E;GLoQ;Od^c-9JOoeC0%^7g^Nrc+G)0RV` zierTe+Eddq)n`i$`Jzb2180apJ|=O%2boY#M;GohT~u8fr2D?Kj$M=~_f;Ef-HTa% zM?*Vhf5;l~uDV$4uIyj{14#e7FO9@qA-fydg;hLOn`9vV1_ihfzvV>aEnxT>}Ua126y>`%%d_3!3r}u%u`%;_ z_8#cU9$enZ=()CFDBe(fUKR?+v+GD_g0|m5{M+ITKKSxaCZkT3-v>@h*)Q%7OGU0h z%DPso2!%F|O;bLqdVS*vSuznm2;AFg1qMXDkAa-2kzpUGq}{(6uJ#yw!(|6sL~27h z0LEs2y+djSwc()roaaXvcz0tuW}5#X*0WEC$91u^!FlWHydp{pj%JM@i2&=6`VkK#r^jBegbjyCf6q z*_Bl4^^E#=((|eR2Ak74G(>VZOA@TmO|m%SbSV?#IbwXQsYBr<2TwB%sbe7a%VgIB zmYpi|WCuNpXOGgn6N&@f55kU00h|| z;o`Cci=e$#H-*1!gdjyLUPFLV;3c-SaY0;Pdx|dbatHDoc8ZNt9z*+M_;V)PQVsx_m4nL-l_7CMQZLf5K^quFRV1~^C!P~tjzVfmA>(HMW?iVK~ty- zgTs~fJ5+C@d{~-e8)DBeCF`S&nbyR&7HWe)B_i1qt8I9yXMHlAqc{Z=Q-NR^uCJr_ zAveV_u)E(2&#Omn=(EfpJr5om50gYs%3v#3D(9Pn+~uwpP4LRft19_tr_&O&u!DD= zrU%L7+Z}Aakn8zqinO(H+|aLWr9UN<3%hnVu+$>Bx46>d{cOsFqf)(po!mhx6+ugY z#P2{4`cv)yw~Z+1&pRx}`}Gl>LS|wj=E@si8>+u2zVa6S)Kn~J=Qx2KW$3!oE1@4| z!b>1W&0=*dR-&llFs>hCMvkct;s5jER*0kLL4g}sJw}|W4p1mOU3YFj_7wETI~V! zq0B+&epP6W7jbvdC3!D%!+aBs3wep21oTdL({*wgi0)1=vbLu5Kn;-r$$_J&mK(@=%t z8h$VGF^S}Ih4i!|$GyUVr~(%5)uStP3!%vAe5sGDY~be)Bx#YEwf7pejgfS(&At_+ zPdGcUBoF}q*)a1QxGnP(cZYW_)u{ef8ed@EM2>TZqa?Mqo27CQ?a-Rg)yP^uN~RQ$ zBB4Z(t~ZO8rF-pgIA}Pq(Z6ObW@=O${X!I!=IuxoYG8L<(C?em-lp;XZR-fyHP3+6 z!!Xl5*s@nZz;nx`6D!C%`?+;O;j=};leLj>&|S;8^oa6usd1*~<2#X}<10^C^M0t( zO#)c>J&>+*<*B|{Lf6L9aK-gQVWV^?iGKb%$C{9QsFLTky5MOYPKgRL?PX-BckPH3 zzVN6w$HFVv-PG}BVI(mkMt5hr?BVr*Bxl{7^Q>~ML@-t5n@;@Xnv$ zLYs6R4%l&ntJZ#Q>q|H%rK=?>u-a=u#w${T5a`sA>1j5iA{8-@zj|5|324Nn>~oh4 z=}F1PPB}wu)Rd%s?yRDEXX$#uD;3qXX|IGh%G!bcoTf-~E*cHb7Zq87-c7RVxbw7l zB2^|vo^iuhkvJ_6xiFdq-l1q>Kg-3?y>Y=8&Fgi10cNRjuT67N^^EZJLNA9nhY4o* zt@8j?zvuKzvB0enGe<`#%XUBi=hnhEU(=>oy9a~_id{#p-h@;zf@l;Zsmc{Oi+v=? z(niDII?t5r@{q=PYu38c#Aw+$K8IvQQx_DrY@f4Ixg=11m;CZXqJO?Gur-6rzUoKn z;a>*~b75CqCP9w;*qWZJrEp5cr)hajpMM>48+AH@bFf2CGE9A<2kDb!PsCb`JGy#We@pxrFTu_s8Ea@XVc5r|wP0*dU^_X}*<{zO76J|m7_Ks6 zpv+*cREti!MUeU_e3M}+(3vs z8J_5_&na7m-9%hMZ|-@td|Tgn{Yw1cEkAi{=hh@&R*q{n=E{rZu_1kFm==DN)~*@@_A|MLAUr#U{Tj;%d*n1fwO*o`(p7R}t6z;c`cXy*VXdDBZ}YSC8n&XDIhh1+?jjFteKpqamL<)n1vSP2?cN`MTag%)1;wabCHdhd9HkA-4l=|4= zy@naZ^Tfz6&W3%L4-5D0*o~Gh>yZHNcUi$_q>a8_#174wh|aXX{~o}H({B1!hycLT zD+-zA_Ke;cL0P_$NB)8ha&k7!wp_&pRK(Gfmdj7cKqUVTJN_Hg{cmIb|1F$7z+n-? z?#|YS9}NjY^t8!X=@V5iT)Op*S_#1Jhp2uqt!c zMk3lOy1AR@y`oSJ!ZNdhARr_*B3+_hZorx}=)0)OezY9`<`PDk1WA-WnK>n=bS4#JE#7-1Cw8UfV{cbx zO!&aHt!)ZvOV)20&x{hvi-hj;WoUgv`i&ijIFrt~4&^JUmC{cG$%=J_{TY(Zn~l9W z!1Hvv)1j*0QWr$zr2|ys-Ynp`{CjQQgjdOvSa>=QT2}u?mR>G@BPGbf^8!?J>gtr?c-4YHIEJ4Io$m z(E}Ak5m0Rcg3kluR{f)I*|k|RZ=gLDvqgiwTlbTCR02+dFehzJ1*2_-Zm z?QYIFcjlhC@16PX`&VX?ot>Rz?e(l*dDa5mM6h2~sGmrS&*hZcdz-THM~u%|1};XB zKMqf-U351AYS_{1`1$Y;t+t+RPUBKQP3b+PuV@GMv0B)FKa7<0&MK-2>{U&jUNlop zjjJzO6gd(o;28nV96RbcC7&xexjz&{^;(V+u=^@)o^-O(1(FKqT(xkWtR>m@ydhW)rGdc1sTxdaRpyVhj{#JCG?FhfKqv=5$6G7ru?Y{sjl8#t+1L z|NPt>vV;)!f?HPgd<^Jzg>dy%;RBgHbj^^SXxownYq`**$zCu>DhEbt@LwCZ@#^jb zTA!T$YASAy*3(sui4(QBY7;znN#If)L9%{s`&BFp$p1VwpgyANTaX$nx3H{bC||SS zeblwM!(J~pGd-sBPFg#IM@-MjBVY_z_+cLkyxk0ge(E-9hadjgrB!L#2Oz-b zRP`h$UGeRGnAq*WfXS_;{Dcxsrz?*c6*)GX=oU59*9ak z2Ce5%A`@q#t-M;7PG|pU=l5Kmg{}UB^R&AC`|Q#BkE(ia4czpvDCBM!NEjBPy$!7N zOA&OXVT2WD?SC4Zq!kCc_!i~GO-liPi#<7bE2-4MP2B9-{ah~{_}rTtxtzX};#6e3 zi)o)GADpg0)gtf4+NN#-&)EUF(WkZHP!DQ*2sZ)>W{D6PHb=x*vbgI+mHg5%sAKZl z`q|asQJ34g56xAW{Z)>&s%(Lg-}Z=kae-cSdth9+WG@2&Z1_%;`$AnA#QtZu#)@F#(*Dv-7_eF(1_UB+~h2!{NjeSoJE3IP9h;Zb@@}BWTsD zzVzw6Mq9P%Gt!vCAsD8vFF8F$TG%14yNnea!6xd{om`Kr^?7#&l(EJv_Ue3Dgt<^m zQG!jMocqym@$3Dkfnd?5vFlpqy;WgMULhSgG1a|(nq>j>`jat@B}%oA7-9g(!2TG* z-G6dEbM|a4ZZ_#trRMK6?I5JshPbhGSP@~Oru{_p!7`fQ8Am{gv+v{;=R8h)! zV5Dj08d4VWB;Y{AT? z1rSoBq}xsC-5=Dk@4n%xFzquNy#U%d`!ALBe-^ZZgY_yhqH9&>bJ0Z~w za!$N_JDj4dZIr2s6e?#r_~Ev{EJQkuZ}RqA1Nu)7eeyvy>vC-`7ciF%4IN4V+On^E z_@cG`feu9jOO0`Ih_1OlRU2((EKVd-a^#50nP_vpBt(o_<$3Ir+f!J)xAy~~1O8h= z3GClrOJ3H5dzhm+{sNqk^3B}$P#$o9KzAlEUVS(U9T5yq=KS4^4`&g;4HCq;35qeW zX&d^>vN4BlI5fb3-i&?FkhjsJEch;ge(y*Rc6KZOCht$Aq<_(XHjUq7{=~W8cExR^ zf!ip@vYD+MpoV{)s7Ev{X3JAc&EE~zjSgg^gf5{|M}v$=3nTJrw;hJ|(~7|39_gT+ zBi}qw)_VO*hpz7?8lP&F0Oh?ItB9V@|6wKdSdCGgqfP#SN8yNx+e1>}G|e^6PMR=0 zALHygWVf)7jeh9X!+z!Bw{*#PE@xFf&=v#ls#UiwQ_zwbmC27%#_}yldTF6VqhDj` zLtJ}pRo$;(5Bz*6FwLaiXm|$z1Sb^yS$0kOj>Gi#{#$$soK*AJ0=-}Q2!w+uUimvnE!iLkkBaDfs&uzk{vU{AWT^vIK z+39W#=9p)*9VvxS3XS(yMwO_N%h0}}wNj(`yMekog>*3t*!GSoBvr-Tz=C`HxgcIwEFBTl^#2H(cbS z$2-}rTH_;;k0<2>xBO+nb9|R5-g6<>yz6aQyqrDo@n2>gr@m>{%-AJM%EVrt`t&(v zGtIZ?X@VQ5Lx^_}5@(DZrViQrE@6UtD5q;|{5lzl<73D^+3AU=?$Pn;DT; z1>$cl-|aV-BpdAdvr}qbDTM>W=A9mq#%iCyR6ql;H>+=TDooS%zPu)UEZKr4CvY8< zdYyDcd=b&0m&@SsGc^RHXeuW?h#Ih`7K~cFC#dIo2|ii-oGyB_O>ue71o39$zOB%l zr{`s?o|JK#aa!H4uLRnkPTrJan0KT(A{j^+PkhWa~-FLS6tfO*9r&}R4sq>bfo`kFC(HA8(R zEwO9K&6)?C-k@;`BI>vUZ>;5QyV*3R75d?2X9tmB8XK;Wfj=SGTGnl!CmKch zx_9niWM?CM<2=Y!5iKV$N~wRt4Rn9+I|C8@JoIkP%jOM&!pd}W{JlwCg)M4pByg$m zi&+1@c_hu= z=+ue$wbkoyBHj&*$JOs(wOnyvkfXt>huvyD7x#wD5NnrW%vLhSW3T~@(4VOtD|i^( zJANMACx#5m8>E#lA=+R1u3bwb=ywf`LYXdlZ>@))1w~MSCI)M|YOoS+gwmR-JDO{B zcQgv6LN*}HTwGt|wPsC3n}2zgr$7mPQWQ^EHZb)Yb|6O zyLi8Cp-1{x(v}3-$EQ3)och(?q(BCh$~|*7aA`M~9dGMaj{LoEbxIG!xiO+IZgBML z0-N1*L-=&C)A&)Hu{7mp_;_R@&&L*FgTg55-hN2jxV>*j~V2Wp;Kj zG)>bc3Z6xsau8udB!9NF@#wx6$~vFRJX92~v~R$%ITV#H9TON00&y9l4DdmL)dPjb z)}e>d*+({EllPl(5nny``dmUxYjH*vw;7d?`|$UHYzIuaD;?w$rUY+9lfi-dIM8~3`Ce_T(ViU;Nqc9tMcGy&sP8u^ZQQUdVfuZMq89RJo`{`f0( zuh$;)dR{eRY^nJ3@MI^PE$%NF-x3_JEI!ZbhVs= zRu)x{&rx zG)dpqIm&Diw@?~!kb*W`s=Om9e@_=~TL z7}N#=xUjQ^ZhY%xeW#_-_xKZ{<3p+>R zgBQcqw*@B6CD-?-b#deF#h~x@K>P|VHCtd*WHh_EDXiV3;QpGMI`6qEAH4fi-NXUYuxr_!L#yoTFjc!*l>uqcjidQWFs z+6bj(E#Gy}V4(bpg>0oK5J*LW_@QFeOekq?;7V-k+wzE|nx=wGI;3xj(K% znBn@c)=v1_z;zlK@9oy?)fnIq$Ly-pID>EkrWiJ3tIsxAI=Ap3P?mJFF;i+Z5eM$= zshS9zMG7_Hp)W3m+kilv8M>OcP0eVnqE+Idu}b-`H@O579VU*2roV^^T-iZtOOv49 z2hv8`IN!!P4&{Aw^aT?|p!Vss|ILU^eSd60c$Uo(Q?6pWLxfM-W^z197+APZlLNPm zWdlYFuiuQ=2p=!GCSQR1P4K9Hy$Kr1L*d;9hCkh})tF1Kdlapen>B`IEk17vDfb79 zU=Ja`^sJ^6><(pdda``SK-i_XKyvN!j=#v#<{Th4n)#)NN8s-oANjPIY48t*{=?4s zoV|cS&OO3r^w{AZknWwM7T%w%*y6iGX8$SXlo|D+M1G0LJG%O|jnpbq%<6Qc$OgJZ z|6ky_wNU`ieQ2O&AAG1Gt+;gQ1UZcd=3SULt#Q~{UlI|kFD?VY;*rzko#{fP-RiQj z1)(>JC0mso@5-h%LbZDz+1frh_G=t-a%EFqFn7yuy#3$O2PDcyjIzAUw(n2<80=E7 z_Lxex=&IGc0VHR)vIN#23$s6P`at@SD8&=TW&X#&2+MJ+NXyK9?mka=$m;ZNF!rbCp~Y~*~Wh1PVWZ(hhu2B zJsUX_grWv~TKMys>hp7B=U9bZus8Q7Qo9_2>y^@r^nKk!QY(#@p=^m662RI;*3ZGD zTHy|znr>iV=cmY21qaTQ;(#ov%1VFAn7z~_6xLPSr~dqzXigDe_*Pc2wxa@57gS6Xb@qpP7gCpJEd|D)M8^ z+ps!5D?E?f<~e}KI1nNiyh-QgH`ALCjuA#XUvk$^Aw%c~&`Htv7+7HocEw8Rq-*CTI zt}po}c(hv250;FENoI3Z4DW&S(Wg(v9kS|?P^goMu3W_Mj~=k>kRJ{es?%^D`dbY- z=GGUF`uGSM#qTKlCyQgMNGqaqfs8DMeHV^55ahi=mVJ+8BT7zxu@@~?8h(ZSxY9+9 ze*^Vr;ve$8`^S|v2TFHsI1T~W@iT7nQo4!;3h~>jbHz1GP`KFACFG{~<>#!pyyVjr z>&4S>Ny}bWg$oBw-BB_}2EjfN6h1AYfsQ(m9GRc~7w(O5$G>Z1iMCXcqpuV)##KF& z+)^}T-^H3ZIr5tz7n2rC*1hXi(zAjZ!N9`U@qapayOHpLX{%S4*-WLhL<9h&VW;*= z&If`K8aT_^w--HWy~)MoWD~bJ--P2VYqJ5YzOih=zq6XV99T}4H z`t^>O2*%b6VW;h_9~mxi5x=0OI@s?h$eSDKj#>DfmVlI1YA>3j-Un4SYB$q?5N=hx zs~(LqZrf1F+y+v3#lz9<;wA4QZZD2WTd66Hq+DXMTh%)BQYMJ1=aFxm%XtC-xqK&1 zb{$=Z*ZNj%6l<}m9ylZ~tsnOvG^{k|)zFbP7&uGgP2B{_h-64kBmqmytJth)fu)XH zRP<>1F0{YnsI7NaF<+43M^S?OysN`XT$L5bd|RWg>iqo*?gS_P z4y0^h3Y7|gLDOrXiRz`}cBud(bnLhNm+bv7X5(MViK};?Ml^h>b<*e+O3miFjAd`= zlGW20&4v7^?Cq=7wV%m4i5A#quV^2sFKZ6Q=-vlGI~<`Ax~pGGVB+UmnJ}V8#-I-z zGzHIBfc#ynaTwD-@rME5ujfo&3bUa}79uj$LOC^P$NtCC(bPQ4JYyW+B|Nk?9%*bx zYnIC26!TKN{I|2ix)pGC07RQ!{Z(5}rQE#`+TN3v+l`yb!ted3jhjO@W0;6Neu!|i zEKbk|xB$J-u)1>MKnfSAiTD-mmRo0q%1t@y#^vd%z2bx!Sv#k}rX^nd)Nu+}pVcgR zfTf16TPt*Ii~PW1rks*U7%l)OER#*)k&-E}Tq2ny=+Mfq6Tmxn8?)FlV=OClJ0Po=8I z96-FIlphDG)t)lRL~N5p!Y$03GKg^;7K0?fDhJ5MuYyS>vgJ67d5Ylh1xm((C#zX& zit&`1J_86qd|tSEJpl3TT|jqU-9l>~`B8`0^NE)g0DH<+$M~xB6Qs(h=!5CAW`0HC z+Py2N9h=EQV4!&ssQQ5+$|pbSLgUU**+#Bv!&jQWzS3UPMo_MKfnAd5h@FyG82ZVx zRL-p+(`0D3plgBgmD_NGpue2omlaQ|i1O6Fgl0o-`JU@N1w#Edft%;k2Qa&NCmo{cT-A$| z_af%;BEJW}cz-SYZ5x)b4p!!Mh3z)Z6e{qt!mHfcF{MUF>%1Xr<}C=nsz4m=g8qyI zOQkK!AOf9tLEm`EDi1RHpt8gFCYAL(X$BzT0oP((H=)eN_qgErB3{_11>QpE=$9EI;BNxMi0xAVO#rM zJVg)>g}DxAyaVnKi${0y? zav^2D)QJA+M}oc+{C>j@%X_^|1D%V0F_1xVZVB0KIni*7agT-ZJI|#(g}C1R5ML`a zms!d_zgNR9c?JYePRtss9l$*QV&pgnn{1W@52LwQkM z{;4Y?D0>v?3JlBz;HC4IpC@a)h!@^&P~y>0OKigO)g_&KF~kr>;vDOz>aredk8X!K z)|F*?&E5rSGNvQ@X3Xt9=m4otO~ihvhc;p0{Mfz0JCyC@u;=RmKOkcAk7YwSg!xp( z1m+{9eE&`seT>FcnnVK3A+jHeC)kCZFTFeRBC(6(?G7|Bn)-VLEE>kHb?5?bM1=O; z1y~e^|HA60ItB3CL{+wrOmUe9n*K@oDA!G1)tyU|^9!Cy`d9!m`nb=Pr}_t1Fh!+s zBLBEzXLooDzgZoSq-z|e2k=nc! zs3(M(ozU=!z}$P{U$A5CY?5lg44C!s$Y;kAIkB+wa!5Q^D$C=3xn`~6Q`>b;6h8e* zGk7Vv2bG| zUf$|6YLyr_Evlcw<)xgj8<~d4yWI2ln-jtxUdUMDb4|Het-WjIECsna4?j66p1HXpD%tZ$ng4Dg|CUoZc{3eeQqnjmGBmf0Phyp`c6EWq>HvG zF9GwIOK}<+0}wK}X-`;6=nTmJ1Z^Taa;AQxWVzix{f~nD3io&1xpsa4875(&pIBHs z5YVSlW2@;{UH>yx2YWUWS72tJ+#`nsLbD00lT(Cy#X7Ne7PlfOh zERsSjgn%RL{Yhie)+&rUy$Ll+qi+JPRdK6k3~B4~&<+7Y0rVuIr@QFDGTXqe(h##Z zBf->f>f|vROivBd)ozPo11c^16MnY9tT$Vt=s*(~K@y@K<{zs`1t$%ax0?^34OW!Q zka_LvxG&e|hqSZ~9|NfeDADAHPSP&bZ4v@Lv<$!BNm9>40Ple>d7A$r)_OQiy`SW` zt{^`Cs{RIUHvZxRrpguZ_Ydyc6x;@mT7Lwkbb;-x}(3SqKWbE<4D|34e4 z|KF;@KSk&NTjKpc>Dqr>nE%s4HK)FHA7~vabugc+9J0Tp6g6F;5E|v{Wa5n6s@O^5 zwW;y^%r*Syi}A8)@U~g%U2U^2&(N^#sdmn^%)zo-5ojj8Kz(}9Ejy~@wQKS0yHjpC z@Ktdwas@caP8D?<&pG@jqo*#!3|Up;MMKR`KT{#-Z^SdoJ+MPP6;9v>qR4^T^nmhs zlo$THeKV;rJIXGw%Hxy7#cx1{>i;@Uwh9eJbJI6yS*lHb-2VLG8mJ>Cr)j%C^EM>C zv<|nIH_5ATQaIkKu|#8M=x+8^`Ir7VI8)q3D-%9=UXUr@;00oUoM}%2e5cHMShHPc zV}i--&2qgvhWD=Hw<2yj&`le)o68K%ezs7;h3u;~7bNqJPlPzg;-)z`D2-T}TI`+Y zJBJOQpo|Wdn6*W2&c8Z@?uhjG@PZkh-T_*?cwgal64}5qFD1;z$J~N;3HUe841lZ7 z6ysFA3%KKMO2QkF`fL{YxygeP5uV*(ZLoY82y`+v5q0pOFVB^oQbuBCOA$~`h|;G_ z7*&FOx5DL5b3G`W)pRwhuKPvuiLw~0}u6N0JdvGMRc zVdj=(byaygyRInwx@}9G7pXD{a^Ef+ zYULq2*ORgiq#m^Ge! zu{2bPV`76DL=!aE!a85l%=FoFF9m^=!jYv%&v=OQL69HI3`1MXp36f6%eB@-FoNtQ z;P-Kv1N(DsVmW41V}34hnHCsUm=xevQlVyT#8~ub<+D`=y~n(afGcyM2T$M8#|`jWSV(=oGZ*4yxhG}iaq@aRrG6I2l0&RYE$JEmv+z?vH?1on zx^=`9!n%Zc9^%q=UQjrW5_5Ftsh(tfj}Gj>$4`_x@CQ%9$uS*(jl(^dmMBvnRe)j?t0%xpsfl^x z{2A0KS_t;dCQ5S7#s8@gk55uuq^l;DT`&=%<#YcRdT^p2O3_QQ>&t45>`ZOhUSQJS zw3<@jk2s}+U5h%bWJ!hMe}qD_i>`a6z-jwh!Dc%5iy2R4yixS}d19xY3Y_zBA4S z1rv|=A(O3!*cr-B{eAcU!@UIm!uGCIJ^tlL-apO}e 0 { + bpffilter := strings.Join(flag.Args(), " ") + fmt.Fprintf(os.Stderr, "Using BPF filter %q\n", bpffilter) + if err = handle.SetBPFFilter(bpffilter); err != nil { + log.Fatal("BPF filter error:", err) + } + } + } + dumpcommand.Run(handle) +} diff --git a/vendor/github.com/vtolstov/gopacket/examples/pfdump/main.go b/vendor/github.com/vtolstov/gopacket/examples/pfdump/main.go new file mode 100644 index 0000000..14d6429 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/examples/pfdump/main.go @@ -0,0 +1,52 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +// The pfdump binary implements a tcpdump-like command line tool with gopacket +// using pfring as a backend data collection mechanism. +package main + +import ( + "flag" + "fmt" + "github.com/vtolstov/gopacket/dumpcommand" + "github.com/vtolstov/gopacket/examples/util" + "github.com/vtolstov/gopacket/pfring" + "log" + "os" + "strings" +) + +var iface = flag.String("i", "eth0", "Interface to read packets from") +var snaplen = flag.Int("s", 65536, "Snap length (number of bytes max to read per packet") +var cluster = flag.Int("cluster", -1, "If >= 0, sets the pfring cluster to this value") +var clustertype = flag.Int("clustertype", int(pfring.ClusterPerFlow), "Cluster type") + +func main() { + defer util.Run()() + var ring *pfring.Ring + var err error + if ring, err = pfring.NewRing(*iface, uint32(*snaplen), pfring.FlagPromisc); err != nil { + log.Fatalln("pfring ring creation error:", err) + } + if len(flag.Args()) > 0 { + bpffilter := strings.Join(flag.Args(), " ") + fmt.Fprintf(os.Stderr, "Using BPF filter %q\n", bpffilter) + if err = ring.SetBPFFilter(bpffilter); err != nil { + log.Fatalln("BPF filter error:", err) + } + } + if *cluster >= 0 { + if err = ring.SetCluster(*cluster, pfring.ClusterType(*clustertype)); err != nil { + log.Fatalln("pfring SetCluster error:", err) + } + } + if err = ring.SetSocketMode(pfring.ReadOnly); err != nil { + log.Fatalln("pfring SetSocketMode error:", err) + } else if err = ring.Enable(); err != nil { + log.Fatalln("pfring Enable error:", err) + } + dumpcommand.Run(ring) +} diff --git a/vendor/github.com/vtolstov/gopacket/examples/statsassembly/main.go b/vendor/github.com/vtolstov/gopacket/examples/statsassembly/main.go new file mode 100644 index 0000000..0633b7c --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/examples/statsassembly/main.go @@ -0,0 +1,211 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +// This binary provides sample code for using the gopacket TCP assembler raw, +// without the help of the tcpreader library. It watches TCP streams and +// reports statistics on completed streams. +// +// It also uses gopacket.DecodingLayerParser instead of the normal +// gopacket.PacketSource, to highlight the methods, pros, and cons of this +// approach. +package main + +import ( + "flag" + "github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket/examples/util" + "github.com/vtolstov/gopacket/layers" + "github.com/vtolstov/gopacket/pcap" + "github.com/vtolstov/gopacket/tcpassembly" + "log" + "time" +) + +var iface = flag.String("i", "eth0", "Interface to get packets from") +var snaplen = flag.Int("s", 65536, "SnapLen for pcap packet capture") +var filter = flag.String("f", "tcp", "BPF filter for pcap") +var logAllPackets = flag.Bool("v", false, "Log whenever we see a packet") +var bufferedPerConnection = flag.Int("connection_max_buffer", 0, ` +Max packets to buffer for a single connection before skipping over a gap in data +and continuing to stream the connection after the buffer. If zero or less, this +is infinite.`) +var bufferedTotal = flag.Int("total_max_buffer", 0, ` +Max packets to buffer total before skipping over gaps in connections and +continuing to stream connection data. If zero or less, this is infinite`) +var flushAfter = flag.String("flush_after", "2m", ` +Connections which have buffered packets (they've gotten packets out of order and +are waiting for old packets to fill the gaps) are flushed after they're this old +(their oldest gap is skipped). Any string parsed by time.ParseDuration is +acceptable here`) +var packetCount = flag.Int("c", -1, ` +Quit after processing this many packets, flushing all currently buffered +connections. If negative, this is infinite`) + +// simpleStreamFactory implements tcpassembly.StreamFactory +type statsStreamFactory struct{} + +// statsStream will handle the actual decoding of stats requests. +type statsStream struct { + net, transport gopacket.Flow + bytes, packets, outOfOrder, skipped int64 + start, end time.Time + sawStart, sawEnd bool +} + +// New creates a new stream. It's called whenever the assembler sees a stream +// it isn't currently following. +func (factory *statsStreamFactory) New(net, transport gopacket.Flow) tcpassembly.Stream { + log.Printf("new stream %v:%v started", net, transport) + s := &statsStream{ + net: net, + transport: transport, + start: time.Now(), + } + s.end = s.start + // ReaderStream implements tcpassembly.Stream, so we can return a pointer to it. + return s +} + +// Reassembled is called whenever new packet data is available for reading. +// Reassembly objects contain stream data IN ORDER. +func (s *statsStream) Reassembled(reassemblies []tcpassembly.Reassembly) { + for _, reassembly := range reassemblies { + if reassembly.Seen.Before(s.end) { + s.outOfOrder++ + } else { + s.end = reassembly.Seen + } + s.bytes += int64(len(reassembly.Bytes)) + s.packets += 1 + if reassembly.Skip > 0 { + s.skipped += int64(reassembly.Skip) + } + s.sawStart = s.sawStart || reassembly.Start + s.sawEnd = s.sawEnd || reassembly.End + } +} + +// ReassemblyComplete is called when the TCP assembler believes a stream has +// finished. +func (s *statsStream) ReassemblyComplete() { + diffSecs := float64(s.end.Sub(s.start)) / float64(time.Second) + log.Printf("Reassembly of stream %v:%v complete - start:%v end:%v bytes:%v packets:%v ooo:%v bps:%v pps:%v skipped:%v", + s.net, s.transport, s.start, s.end, s.bytes, s.packets, s.outOfOrder, + float64(s.bytes)/diffSecs, float64(s.packets)/diffSecs, s.skipped) +} + +func main() { + defer util.Run()() + + flushDuration, err := time.ParseDuration(*flushAfter) + if err != nil { + log.Fatal("invalid flush duration: ", *flushAfter) + } + + log.Printf("starting capture on interface %q", *iface) + // Set up pcap packet capture + handle, err := pcap.OpenLive(*iface, int32(*snaplen), true, flushDuration/2) + if err != nil { + log.Fatal("error opening pcap handle: ", err) + } + if err := handle.SetBPFFilter(*filter); err != nil { + log.Fatal("error setting BPF filter: ", err) + } + + // Set up assembly + streamFactory := &statsStreamFactory{} + streamPool := tcpassembly.NewStreamPool(streamFactory) + assembler := tcpassembly.NewAssembler(streamPool) + assembler.MaxBufferedPagesPerConnection = *bufferedPerConnection + assembler.MaxBufferedPagesTotal = *bufferedTotal + + log.Println("reading in packets") + + // We use a DecodingLayerParser here instead of a simpler PacketSource. + // This approach should be measurably faster, but is also more rigid. + // PacketSource will handle any known type of packet safely and easily, + // but DecodingLayerParser will only handle those packet types we + // specifically pass in. This trade-off can be quite useful, though, in + // high-throughput situations. + var eth layers.Ethernet + var dot1q layers.Dot1Q + var ip4 layers.IPv4 + var ip6 layers.IPv6 + var ip6extensions layers.IPv6ExtensionSkipper + var tcp layers.TCP + var payload gopacket.Payload + parser := gopacket.NewDecodingLayerParser(layers.LayerTypeEthernet, + ð, &dot1q, &ip4, &ip6, &ip6extensions, &tcp, &payload) + decoded := make([]gopacket.LayerType, 0, 4) + + nextFlush := time.Now().Add(flushDuration / 2) + + var byteCount int64 + start := time.Now() + +loop: + for ; *packetCount != 0; *packetCount-- { + // Check to see if we should flush the streams we have + // that haven't seen any new data in a while. Note we set a + // timeout on our PCAP handle, so this should happen even if we + // never see packet data. + if time.Now().After(nextFlush) { + stats, _ := handle.Stats() + log.Printf("flushing all streams that haven't seen packets in the last 2 minutes, pcap stats: %+v", stats) + assembler.FlushOlderThan(time.Now().Add(flushDuration)) + nextFlush = time.Now().Add(flushDuration / 2) + } + + // To speed things up, we're also using the ZeroCopy method for + // reading packet data. This method is faster than the normal + // ReadPacketData, but the returned bytes in 'data' are + // invalidated by any subsequent ZeroCopyReadPacketData call. + // Note that tcpassembly is entirely compatible with this packet + // reading method. This is another trade-off which might be + // appropriate for high-throughput sniffing: it avoids a packet + // copy, but its cost is much more careful handling of the + // resulting byte slice. + data, ci, err := handle.ZeroCopyReadPacketData() + + if err != nil { + log.Printf("error getting packet: %v", err) + continue + } + err = parser.DecodeLayers(data, &decoded) + if err != nil { + log.Printf("error decoding packet: %v", err) + continue + } + if *logAllPackets { + log.Printf("decoded the following layers: %v", decoded) + } + byteCount += int64(len(data)) + // Find either the IPv4 or IPv6 address to use as our network + // layer. + foundNetLayer := false + var netFlow gopacket.Flow + for _, typ := range decoded { + switch typ { + case layers.LayerTypeIPv4: + netFlow = ip4.NetworkFlow() + foundNetLayer = true + case layers.LayerTypeIPv6: + netFlow = ip6.NetworkFlow() + foundNetLayer = true + case layers.LayerTypeTCP: + if foundNetLayer { + assembler.AssembleWithTimestamp(netFlow, &tcp, ci.Timestamp) + } else { + log.Println("could not find IPv4 or IPv6 layer, inoring") + } + continue loop + } + } + log.Println("could not find TCP layer") + } + assembler.FlushAll() + log.Printf("processed %d bytes in %v", byteCount, time.Since(start)) +} diff --git a/vendor/github.com/vtolstov/gopacket/examples/synscan/main.go b/vendor/github.com/vtolstov/gopacket/examples/synscan/main.go new file mode 100644 index 0000000..2ce17d4 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/examples/synscan/main.go @@ -0,0 +1,260 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +// synscan implements a TCP syn scanner on top of pcap. +// It's more complicated than arpscan, since it has to handle sending packets +// outside the local network, requiring some routing and ARP work. +// +// Since this is just an example program, it aims for simplicity over +// performance. It doesn't handle sending packets very quickly, it scans IPs +// serially instead of in parallel, and uses gopacket.Packet instead of +// gopacket.DecodingLayerParser for packet processing. We also make use of very +// simple timeout logic with time.Since. +// +// Making it blazingly fast is left as an exercise to the reader. +package main + +import ( + "bytes" + "flag" + "fmt" + "log" + "net" + "time" + + "github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket/examples/util" + "github.com/vtolstov/gopacket/layers" + "github.com/vtolstov/gopacket/pcap" + "github.com/vtolstov/gopacket/routing" +) + +// scanner handles scanning a single IP address. +type scanner struct { + // iface is the interface to send packets on. + iface *net.Interface + // destination, gateway (if applicable), and soruce IP addresses to use. + dst, gw, src net.IP + + handle *pcap.Handle + + // opts and buf allow us to easily serialize packets in the send() + // method. + opts gopacket.SerializeOptions + buf gopacket.SerializeBuffer +} + +// newScanner creates a new scanner for a given destination IP address, using +// router to determine how to route packets to that IP. +func newScanner(ip net.IP, router routing.Router) (*scanner, error) { + s := &scanner{ + dst: ip, + opts: gopacket.SerializeOptions{ + FixLengths: true, + ComputeChecksums: true, + }, + buf: gopacket.NewSerializeBuffer(), + } + // Figure out the route to the IP. + iface, gw, src, err := router.Route(ip) + if err != nil { + return nil, err + } + log.Printf("scanning ip %v with interface %v, gateway %v, src %v", ip, iface.Name, gw, src) + s.gw, s.src, s.iface = gw, src, iface + + // Open the handle for reading/writing. + // Note we could very easily add some BPF filtering here to greatly + // decrease the number of packets we have to look at when getting back + // scan results. + handle, err := pcap.OpenLive(iface.Name, 65536, true, pcap.BlockForever) + if err != nil { + return nil, err + } + s.handle = handle + return s, nil +} + +// close cleans up the handle. +func (s *scanner) close() { + s.handle.Close() +} + +// getHwAddr is a hacky but effective way to get the destination hardware +// address for our packets. It does an ARP request for our gateway (if there is +// one) or destination IP (if no gateway is necessary), then waits for an ARP +// reply. This is pretty slow right now, since it blocks on the ARP +// request/reply. +func (s *scanner) getHwAddr() (net.HardwareAddr, error) { + start := time.Now() + arpDst := s.dst + if s.gw != nil { + arpDst = s.gw + } + // Prepare the layers to send for an ARP request. + eth := layers.Ethernet{ + SrcMAC: s.iface.HardwareAddr, + DstMAC: net.HardwareAddr{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, + EthernetType: layers.EthernetTypeARP, + } + arp := layers.ARP{ + AddrType: layers.LinkTypeEthernet, + Protocol: layers.EthernetTypeIPv4, + HwAddressSize: 6, + ProtAddressSize: 4, + Operation: layers.ARPRequest, + SourceHwAddress: []byte(s.iface.HardwareAddr), + SourceProtAddress: []byte(s.src), + DstHwAddress: []byte{0, 0, 0, 0, 0, 0}, + DstProtAddress: []byte(arpDst), + } + // Send a single ARP request packet (we never retry a send, since this + // is just an example ;) + if err := s.send(ð, &arp); err != nil { + return nil, err + } + // Wait 3 seconds for an ARP reply. + for { + if time.Since(start) > time.Second*3 { + return nil, fmt.Errorf("timeout getting ARP reply") + } + data, _, err := s.handle.ReadPacketData() + if err == pcap.NextErrorTimeoutExpired { + continue + } else if err != nil { + return nil, err + } + packet := gopacket.NewPacket(data, layers.LayerTypeEthernet, gopacket.NoCopy) + if arpLayer := packet.Layer(layers.LayerTypeARP); arpLayer != nil { + arp := arpLayer.(*layers.ARP) + if bytes.Equal(arp.SourceProtAddress, arpDst) { + return net.HardwareAddr(arp.SourceHwAddress), nil + } + } + } +} + +// scan scans the dst IP address of this scanner. +func (s *scanner) scan() error { + // First off, get the MAC address we should be sending packets to. + hwaddr, err := s.getHwAddr() + if err != nil { + return err + } + // Construct all the network layers we need. + eth := layers.Ethernet{ + SrcMAC: s.iface.HardwareAddr, + DstMAC: hwaddr, + EthernetType: layers.EthernetTypeIPv4, + } + ip4 := layers.IPv4{ + SrcIP: s.src, + DstIP: s.dst, + Version: 4, + TTL: 64, + Protocol: layers.IPProtocolTCP, + } + tcp := layers.TCP{ + SrcPort: 54321, + DstPort: 0, // will be incremented during the scan + SYN: true, + } + tcp.SetNetworkLayerForChecksum(&ip4) + + // Create the flow we expect returning packets to have, so we can check + // against it and discard useless packets. + ipFlow := gopacket.NewFlow(layers.EndpointIPv4, s.dst, s.src) + start := time.Now() + for { + // Send one packet per loop iteration until we've sent packets + // to all of ports [1, 65535]. + if tcp.DstPort < 65535 { + start = time.Now() + tcp.DstPort++ + if err := s.send(ð, &ip4, &tcp); err != nil { + log.Printf("error sending to port %v: %v", tcp.DstPort, err) + } + } + // Time out 5 seconds after the last packet we sent. + if time.Since(start) > time.Second*5 { + log.Printf("timed out for %v, assuming we've seen all we can", s.dst) + return nil + } + + // Read in the next packet. + data, _, err := s.handle.ReadPacketData() + if err == pcap.NextErrorTimeoutExpired { + continue + } else if err != nil { + log.Printf("error reading packet: %v", err) + continue + } + + // Parse the packet. We'd use DecodingLayerParser here if we + // wanted to be really fast. + packet := gopacket.NewPacket(data, layers.LayerTypeEthernet, gopacket.NoCopy) + + // Find the packets we care about, and print out logging + // information about them. All others are ignored. + if net := packet.NetworkLayer(); net == nil { + // log.Printf("packet has no network layer") + } else if net.NetworkFlow() != ipFlow { + // log.Printf("packet does not match our ip src/dst") + } else if tcpLayer := packet.Layer(layers.LayerTypeTCP); tcpLayer == nil { + // log.Printf("packet has not tcp layer") + } else if tcp, ok := tcpLayer.(*layers.TCP); !ok { + // We panic here because this is guaranteed to never + // happen. + panic("tcp layer is not tcp layer :-/") + } else if tcp.DstPort != 54321 { + // log.Printf("dst port %v does not match", tcp.DstPort) + } else if tcp.RST { + log.Printf(" port %v closed", tcp.SrcPort) + } else if tcp.SYN && tcp.ACK { + log.Printf(" port %v open", tcp.SrcPort) + } else { + // log.Printf("ignoring useless packet") + } + } +} + +// send sends the given layers as a single packet on the network. +func (s *scanner) send(l ...gopacket.SerializableLayer) error { + if err := gopacket.SerializeLayers(s.buf, s.opts, l...); err != nil { + return err + } + return s.handle.WritePacketData(s.buf.Bytes()) +} + +func main() { + defer util.Run()() + router, err := routing.New() + if err != nil { + log.Fatal("routing error:", err) + } + for _, arg := range flag.Args() { + var ip net.IP + if ip = net.ParseIP(arg); ip == nil { + log.Printf("non-ip target: %q", arg) + continue + } else if ip = ip.To4(); ip == nil { + log.Printf("non-ipv4 target: %q", arg) + continue + } + // Note: newScanner creates and closes a pcap Handle once for + // every scan target. We could do much better, were this not an + // example ;) + s, err := newScanner(ip, router) + if err != nil { + log.Printf("unable to create scanner for %v: %v", ip, err) + continue + } + if err := s.scan(); err != nil { + log.Printf("unable to scan %v: %v", ip, err) + } + s.close() + } +} diff --git a/vendor/github.com/vtolstov/gopacket/examples/util/util.go b/vendor/github.com/vtolstov/gopacket/examples/util/util.go new file mode 100644 index 0000000..0f698fb --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/examples/util/util.go @@ -0,0 +1,40 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +// Package util provides shared utilities for all gopacket examples. +package util + +import ( + "flag" + "log" + "os" + "runtime/pprof" +) + +var cpuprofile = flag.String("cpuprofile", "", "Where to write CPU profile") + +// Run starts up stuff at the beginning of a main function, and returns a +// function to defer until the function completes. It should be used like this: +// +// func main() { +// defer util.Run()() +// ... stuff ... +// } +func Run() func() { + flag.Parse() + if *cpuprofile != "" { + f, err := os.Create(*cpuprofile) + if err != nil { + log.Fatalf("could not open cpu profile file %q", *cpuprofile) + } + pprof.StartCPUProfile(f) + return func() { + pprof.StopCPUProfile() + f.Close() + } + } + return func() {} +} diff --git a/vendor/github.com/vtolstov/gopacket/layers/arp.go b/vendor/github.com/vtolstov/gopacket/layers/arp.go index fb045e0..65a5a0c 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/arp.go +++ b/vendor/github.com/vtolstov/gopacket/layers/arp.go @@ -8,9 +8,9 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" "fmt" + "github.com/vtolstov/gopacket" ) const ( diff --git a/vendor/github.com/vtolstov/gopacket/layers/base.go b/vendor/github.com/vtolstov/gopacket/layers/base.go index effe1e6..e09ad86 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/base.go +++ b/vendor/github.com/vtolstov/gopacket/layers/base.go @@ -7,7 +7,7 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket" ) // BaseLayer is a convenience struct which implements the LayerData and diff --git a/vendor/github.com/vtolstov/gopacket/layers/base_test.go b/vendor/github.com/vtolstov/gopacket/layers/base_test.go index 1601096..a353b10 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/base_test.go +++ b/vendor/github.com/vtolstov/gopacket/layers/base_test.go @@ -9,7 +9,7 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket" "testing" ) diff --git a/vendor/github.com/vtolstov/gopacket/layers/cdp.go b/vendor/github.com/vtolstov/gopacket/layers/cdp.go index b5cc333..b195b4f 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/cdp.go +++ b/vendor/github.com/vtolstov/gopacket/layers/cdp.go @@ -6,15 +6,15 @@ // Enum types courtesy of... // http://search.cpan.org/~mchapman/Net-CDP-0.09/lib/Net/CDP.pm -// https://github.com/vtolstov/ladvd/ +// https://code.google.com/p/ladvd/ // http://anonsvn.wireshark.org/viewvc/releases/wireshark-1.8.6/epan/dissectors/packet-cdp.c package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" "fmt" + "github.com/vtolstov/gopacket" "net" ) diff --git a/vendor/github.com/vtolstov/gopacket/layers/ctp.go b/vendor/github.com/vtolstov/gopacket/layers/ctp.go index e533910..5396bc7 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/ctp.go +++ b/vendor/github.com/vtolstov/gopacket/layers/ctp.go @@ -7,9 +7,9 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" "fmt" + "github.com/vtolstov/gopacket" ) // EthernetCTPFunction is the function code used by the EthernetCTP protocol to identify each diff --git a/vendor/github.com/vtolstov/gopacket/layers/decode_test.go b/vendor/github.com/vtolstov/gopacket/layers/decode_test.go index 25516d9..750442b 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/decode_test.go +++ b/vendor/github.com/vtolstov/gopacket/layers/decode_test.go @@ -9,10 +9,10 @@ package layers import ( "bytes" - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket/bytediff" "encoding/hex" "fmt" + "github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket/bytediff" "net" "reflect" "strings" diff --git a/vendor/github.com/vtolstov/gopacket/layers/dhcpv4.go b/vendor/github.com/vtolstov/gopacket/layers/dhcpv4.go index 6107a5d..d9cd767 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/dhcpv4.go +++ b/vendor/github.com/vtolstov/gopacket/layers/dhcpv4.go @@ -15,7 +15,7 @@ import ( "math/rand" "net" - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket" ) var LayerTypeDHCPv4 = gopacket.RegisterLayerType(6768, gopacket.LayerTypeMetadata{"DHCPv4", gopacket.DecodeFunc(decodeDHCPv4)}) diff --git a/vendor/github.com/vtolstov/gopacket/layers/dns.go b/vendor/github.com/vtolstov/gopacket/layers/dns.go index 59a02cd..effeb99 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/dns.go +++ b/vendor/github.com/vtolstov/gopacket/layers/dns.go @@ -7,10 +7,10 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" "errors" "fmt" + "github.com/vtolstov/gopacket" "net" ) @@ -207,6 +207,10 @@ func (d *DNS) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { df.SetTruncated() return fmt.Errorf("DNS packet too short") } + + // since there are no further layers, the baselayer's content is + // pointing to this layer + d.BaseLayer = BaseLayer{Contents: data[:len(data)]} d.ID = binary.BigEndian.Uint16(data[:2]) d.QR = data[2]&0x80 != 0 d.OpCode = DNSOpCode(data[2]>>3) & 0x0F diff --git a/vendor/github.com/vtolstov/gopacket/layers/dot11.go b/vendor/github.com/vtolstov/gopacket/layers/dot11.go index 5789d55..67bb057 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/dot11.go +++ b/vendor/github.com/vtolstov/gopacket/layers/dot11.go @@ -11,9 +11,9 @@ package layers import ( "bytes" - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" "fmt" + "github.com/vtolstov/gopacket" "hash/crc32" "net" ) @@ -334,6 +334,10 @@ func (m *Dot11) NextLayerType() gopacket.LayerType { } func (m *Dot11) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { + if len(data) < 10 { + df.SetTruncated() + return fmt.Errorf("Dot11 length %v too short, %v required", len(data), 10) + } m.Type = Dot11Type((data[0])&0xFC) >> 2 m.Proto = uint8(data[0]) & 0x0003 @@ -349,10 +353,18 @@ func (m *Dot11) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { case Dot11TypeCtrl: switch m.Type { case Dot11TypeCtrlRTS, Dot11TypeCtrlPowersavePoll, Dot11TypeCtrlCFEnd, Dot11TypeCtrlCFEndAck: + if len(data) < offset+6 { + df.SetTruncated() + return fmt.Errorf("Dot11 length %v too short, %v required", len(data), offset+6) + } m.Address2 = net.HardwareAddr(data[offset : offset+6]) offset += 6 } case Dot11TypeMgmt, Dot11TypeData: + if len(data) < offset+14 { + df.SetTruncated() + return fmt.Errorf("Dot11 length %v too short, %v required", len(data), offset+14) + } m.Address2 = net.HardwareAddr(data[offset : offset+6]) offset += 6 m.Address3 = net.HardwareAddr(data[offset : offset+6]) @@ -364,16 +376,16 @@ func (m *Dot11) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { } if mainType == Dot11TypeData && m.Flags.FromDS() && m.Flags.ToDS() { + if len(data) < offset+6 { + df.SetTruncated() + return fmt.Errorf("Dot11 length %v too short, %v required", len(data), offset+6) + } m.Address4 = net.HardwareAddr(data[offset : offset+6]) offset += 6 } - if mainType == Dot11TypeData { - m.BaseLayer = BaseLayer{Contents: data[0:offset], Payload: data[offset:len(data)]} - } else { - m.BaseLayer = BaseLayer{Contents: data[0:offset], Payload: data[offset : len(data)-4]} - m.Checksum = binary.LittleEndian.Uint32(data[len(data)-4 : len(data)]) - } + m.BaseLayer = BaseLayer{Contents: data[0:offset], Payload: data[offset : len(data)-4]} + m.Checksum = binary.LittleEndian.Uint32(data[len(data)-4 : len(data)]) return nil } @@ -571,6 +583,10 @@ type Dot11DataQOS struct { } func (m *Dot11DataQOS) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { + if len(data) < 4 { + df.SetTruncated() + return fmt.Errorf("Dot11DataQOS length %v too short, %v required", len(data), 4) + } m.TID = (uint8(data[0]) & 0x0F) m.EOSP = (uint8(data[0]) & 0x10) == 0x10 m.AckPolicy = Dot11AckPolicy((uint8(data[0]) & 0x60) >> 5) @@ -716,19 +732,27 @@ func (m *Dot11InformationElement) NextLayerType() gopacket.LayerType { } func (m *Dot11InformationElement) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { + if len(data) < 2 { + df.SetTruncated() + return fmt.Errorf("Dot11InformationElement length %v too short, %v required", len(data), 2) + } m.ID = Dot11InformationElementID(data[0]) m.Length = data[1] - offset := uint8(2) + offset := int(2) + if len(data) < offset+int(m.Length) { + df.SetTruncated() + return fmt.Errorf("Dot11InformationElement length %v too short, %v required", len(data), offset+int(m.Length)) + } if m.ID == 221 { // Vendor extension m.OUI = data[offset : offset+4] - m.Info = data[offset+4 : offset+m.Length] + m.Info = data[offset+4 : offset+int(m.Length)] } else { - m.Info = data[offset : offset+m.Length] + m.Info = data[offset : offset+int(m.Length)] } - offset += m.Length + offset += int(m.Length) m.BaseLayer = BaseLayer{Contents: data[:offset], Payload: data[offset:]} return nil @@ -754,6 +778,19 @@ func (d *Dot11InformationElement) String() string { } } +func (m Dot11InformationElement) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { + length := len(m.Info) + len(m.OUI) + if buf, err := b.PrependBytes(2 + length); err != nil { + return err + } else { + buf[0] = uint8(m.ID) + buf[1] = uint8(length) + copy(buf[2:], m.OUI) + copy(buf[2+len(m.OUI):], m.Info) + } + return nil +} + func decodeDot11InformationElement(data []byte, p gopacket.PacketBuilder) error { d := &Dot11InformationElement{} return decodingLayerDecoder(d, data, p) @@ -924,8 +961,13 @@ func (m *Dot11MgmtAssociationReq) NextLayerType() gopacket.LayerType { return LayerTypeDot11InformationElement } func (m *Dot11MgmtAssociationReq) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { + if len(data) < 4 { + df.SetTruncated() + return fmt.Errorf("Dot11MgmtAssociationReq length %v too short, %v required", len(data), 4) + } m.CapabilityInfo = binary.LittleEndian.Uint16(data[0:2]) m.ListenInterval = binary.LittleEndian.Uint16(data[2:4]) + m.Payload = data[4:] return m.Dot11Mgmt.DecodeFromBytes(data, df) } @@ -951,9 +993,14 @@ func (m *Dot11MgmtAssociationResp) NextLayerType() gopacket.LayerType { return LayerTypeDot11InformationElement } func (m *Dot11MgmtAssociationResp) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { + if len(data) < 6 { + df.SetTruncated() + return fmt.Errorf("Dot11MgmtAssociationResp length %v too short, %v required", len(data), 6) + } m.CapabilityInfo = binary.LittleEndian.Uint16(data[0:2]) m.Status = Dot11Status(binary.LittleEndian.Uint16(data[2:4])) m.AID = binary.LittleEndian.Uint16(data[4:6]) + m.Payload = data[6:] return m.Dot11Mgmt.DecodeFromBytes(data, df) } @@ -979,9 +1026,14 @@ func (m *Dot11MgmtReassociationReq) NextLayerType() gopacket.LayerType { return LayerTypeDot11InformationElement } func (m *Dot11MgmtReassociationReq) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { + if len(data) < 10 { + df.SetTruncated() + return fmt.Errorf("Dot11MgmtReassociationReq length %v too short, %v required", len(data), 10) + } m.CapabilityInfo = binary.LittleEndian.Uint16(data[0:2]) m.ListenInterval = binary.LittleEndian.Uint16(data[2:4]) m.CurrentApAddress = net.HardwareAddr(data[4:10]) + m.Payload = data[10:] return m.Dot11Mgmt.DecodeFromBytes(data, df) } @@ -1065,9 +1117,14 @@ func decodeDot11MgmtBeacon(data []byte, p gopacket.PacketBuilder) error { func (m *Dot11MgmtBeacon) LayerType() gopacket.LayerType { return LayerTypeDot11MgmtBeacon } func (m *Dot11MgmtBeacon) CanDecode() gopacket.LayerClass { return LayerTypeDot11MgmtBeacon } func (m *Dot11MgmtBeacon) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { + if len(data) < 12 { + df.SetTruncated() + return fmt.Errorf("Dot11MgmtBeacon length %v too short, %v required", len(data), 12) + } m.Timestamp = binary.LittleEndian.Uint64(data[0:8]) m.Interval = binary.LittleEndian.Uint16(data[8:10]) m.Flags = binary.LittleEndian.Uint16(data[10:12]) + m.Payload = data[12:] return m.Dot11Mgmt.DecodeFromBytes(data, df) } @@ -1102,6 +1159,10 @@ func (m *Dot11MgmtDisassociation) CanDecode() gopacket.LayerClass { return LayerTypeDot11MgmtDisassociation } func (m *Dot11MgmtDisassociation) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { + if len(data) < 2 { + df.SetTruncated() + return fmt.Errorf("Dot11MgmtDisassociation length %v too short, %v required", len(data), 2) + } m.Reason = Dot11Reason(binary.LittleEndian.Uint16(data[0:2])) return m.Dot11Mgmt.DecodeFromBytes(data, df) } @@ -1128,9 +1189,14 @@ func (m *Dot11MgmtAuthentication) NextLayerType() gopacket.LayerType { return LayerTypeDot11InformationElement } func (m *Dot11MgmtAuthentication) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { + if len(data) < 6 { + df.SetTruncated() + return fmt.Errorf("Dot11MgmtAuthentication length %v too short, %v required", len(data), 6) + } m.Algorithm = Dot11Algorithm(binary.LittleEndian.Uint16(data[0:2])) m.Sequence = binary.LittleEndian.Uint16(data[2:4]) m.Status = Dot11Status(binary.LittleEndian.Uint16(data[4:6])) + m.Payload = data[6:] return m.Dot11Mgmt.DecodeFromBytes(data, df) } @@ -1151,6 +1217,10 @@ func (m *Dot11MgmtDeauthentication) CanDecode() gopacket.LayerClass { return LayerTypeDot11MgmtDeauthentication } func (m *Dot11MgmtDeauthentication) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { + if len(data) < 2 { + df.SetTruncated() + return fmt.Errorf("Dot11MgmtDeauthentication length %v too short, %v required", len(data), 2) + } m.Reason = Dot11Reason(binary.LittleEndian.Uint16(data[0:2])) return m.Dot11Mgmt.DecodeFromBytes(data, df) } diff --git a/vendor/github.com/vtolstov/gopacket/layers/dot11_test.go b/vendor/github.com/vtolstov/gopacket/layers/dot11_test.go index 1e94c93..6f0ff9d 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/dot11_test.go +++ b/vendor/github.com/vtolstov/gopacket/layers/dot11_test.go @@ -7,8 +7,9 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" + "bytes" _ "fmt" + "github.com/vtolstov/gopacket" "net" "reflect" "testing" @@ -49,15 +50,15 @@ func TestPacketDot11CtrlCTS(t *testing.T) { Flags: 0x12, Rate: 0x30, ChannelFrequency: 0x1478, - ChannelFlags: 0x40, + ChannelFlags: 0x140, FHSS: 0x0, - DBMAntennaSignal: 1, - DBMAntennaNoise: -79, + DBMAntennaSignal: -79, + DBMAntennaNoise: -92, LockQuality: 0x0, TxAttenuation: 0x0, DBTxAttenuation: 0x0, DBMTxPower: 0, - Antenna: 0xa4, + Antenna: 1, DBAntennaSignal: 0x0, DBAntennaNoise: 0x0, } @@ -101,34 +102,38 @@ func BenchmarkDecodePacketDot11CtrlCTS(b *testing.B) { } // testPacketDot11MgmtBeacon is the packet: -// 06:14:26.492772 637444841us tsft short preamble 6.0 Mb/s -40dB signal -96dB noise antenna 2 5180 MHz 11a Beacon () [6.0* 9.0 12.0* 18.0 24.0* 36.0 48.0 54.0 Mbit] IBSS CH: 36 -// 0x0000: 0000 2000 6708 0400 e9a2 fe25 0000 0000 ....g......%.... -// 0x0010: 220c d8a0 0200 0000 4001 0000 3c14 2411 ".......@...<.$. -// 0x0020: 8000 0000 ffff ffff ffff 0003 7f07 a016 ................ -// 0x0030: 0000 0000 0000 d09b 3840 1028 0000 0000 ........8@.(.... -// 0x0040: 6400 0005 0000 0108 8c12 9824 b048 606c d..........$.H`l -// 0x0050: 0301 2405 0400 0100 0007 2a55 5320 2401 ..$.......*US.$. -// 0x0060: 1128 0111 2c01 1130 0111 3401 1738 0117 .(..,..0..4..8.. -// 0x0070: 3c01 1740 0117 9501 1e99 011e 9d01 1ea1 <..@............ -// 0x0080: 011e a501 1e20 0100 dd18 0050 f202 0101 ...........P.... -// 0x0090: 0000 03a4 0000 27a4 0000 4243 5e00 6232 ......'...BC^.b2 -// 0x00a0: 2f00 340c 6672 6565 6273 642d 6d65 7368 /.4.freebsd-mesh -// 0x00b0: 3317 0100 0fac 0000 0fac 0000 0fac ff00 3............... -// 0x00c0: 0fac ff00 0fac ff00 df ......... +// 15:44:56.531833 6.0 Mb/s 2412 MHz 11g -81dB signal antenna 5 Beacon (Wi2) [6.0* 9.0 12.0* 18.0 24.0* 36.0 48.0 54.0 Mbit] ESS CH: 1 +// 0x0000: 0000 1200 2e48 0000 100c 6c09 c000 af05 .....H....l..... +// 0x0010: 0000 8000 0000 ffff ffff ffff c08a de01 ................ +// 0x0020: 11b8 c08a de01 11b8 f097 80f1 30bc 1300 ............0... +// 0x0030: 0000 6400 2104 0003 5769 3201 088c 1298 ..d.!...Wi2..... +// 0x0040: 24b0 4860 6c03 0101 0504 0001 0000 2a01 $.H`l.........*. +// 0x0050: 00dd 1800 50f2 0201 0181 0007 a400 0023 ....P..........# +// 0x0060: a400 0042 435e 0062 322f 00dd 1e00 904c ...BC^.b2/.....L +// 0x0070: 338c 011b ffff 0000 0000 0000 0000 0000 3............... +// 0x0080: 1000 0000 0000 0000 0000 002d 1a8c 011b ...........-.... +// 0x0090: ffff 0000 0000 0000 0000 0000 1000 0000 ................ +// 0x00a0: 0000 0000 0000 00dd 1a00 904c 3401 0000 ...........L4... +// 0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ +// 0x00c0: 0000 003d 1601 0000 0000 0000 0000 0000 ...=............ +// 0x00d0: 0000 0000 0000 0000 0000 007f 0400 0000 ................ +// 0x00e0: 00dd 0800 1392 0100 0185 0094 0b90 15 ............... var testPacketDot11MgmtBeacon = []byte{ - 0x00, 0x00, 0x20, 0x00, 0x67, 0x08, 0x04, 0x00, 0xe9, 0xa2, 0xfe, 0x25, 0x00, 0x00, 0x00, 0x00, - 0x22, 0x0c, 0xd8, 0xa0, 0x02, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x3c, 0x14, 0x24, 0x11, - 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x03, 0x7f, 0x07, 0xa0, 0x16, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x9b, 0x38, 0x40, 0x10, 0x28, 0x00, 0x00, 0x00, 0x00, - 0x64, 0x00, 0x00, 0x05, 0x00, 0x00, 0x01, 0x08, 0x8c, 0x12, 0x98, 0x24, 0xb0, 0x48, 0x60, 0x6c, - 0x03, 0x01, 0x24, 0x05, 0x04, 0x00, 0x01, 0x00, 0x00, 0x07, 0x2a, 0x55, 0x53, 0x20, 0x24, 0x01, - 0x11, 0x28, 0x01, 0x11, 0x2c, 0x01, 0x11, 0x30, 0x01, 0x11, 0x34, 0x01, 0x17, 0x38, 0x01, 0x17, - 0x3c, 0x01, 0x17, 0x40, 0x01, 0x17, 0x95, 0x01, 0x1e, 0x99, 0x01, 0x1e, 0x9d, 0x01, 0x1e, 0xa1, - 0x01, 0x1e, 0xa5, 0x01, 0x1e, 0x20, 0x01, 0x00, 0xdd, 0x18, 0x00, 0x50, 0xf2, 0x02, 0x01, 0x01, - 0x00, 0x00, 0x03, 0xa4, 0x00, 0x00, 0x27, 0xa4, 0x00, 0x00, 0x42, 0x43, 0x5e, 0x00, 0x62, 0x32, - 0x2f, 0x00, 0x34, 0x0c, 0x66, 0x72, 0x65, 0x65, 0x62, 0x73, 0x64, 0x2d, 0x6d, 0x65, 0x73, 0x68, - 0x33, 0x17, 0x01, 0x00, 0x0f, 0xac, 0x00, 0x00, 0x0f, 0xac, 0x00, 0x00, 0x0f, 0xac, 0xff, 0x00, - 0x0f, 0xac, 0xff, 0x00, 0x0f, 0xac, 0xff, 0x00, 0xdf, + 0x00, 0x00, 0x12, 0x00, 0x2e, 0x48, 0x00, 0x00, 0x10, 0x0c, 0x6c, 0x09, 0xc0, 0x00, 0xaf, 0x05, + 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x8a, 0xde, 0x01, + 0x11, 0xb8, 0xc0, 0x8a, 0xde, 0x01, 0x11, 0xb8, 0xf0, 0x97, 0x80, 0xf1, 0x30, 0xbc, 0x13, 0x00, + 0x00, 0x00, 0x64, 0x00, 0x21, 0x04, 0x00, 0x03, 0x57, 0x69, 0x32, 0x01, 0x08, 0x8c, 0x12, 0x98, + 0x24, 0xb0, 0x48, 0x60, 0x6c, 0x03, 0x01, 0x01, 0x05, 0x04, 0x00, 0x01, 0x00, 0x00, 0x2a, 0x01, + 0x00, 0xdd, 0x18, 0x00, 0x50, 0xf2, 0x02, 0x01, 0x01, 0x81, 0x00, 0x07, 0xa4, 0x00, 0x00, 0x23, + 0xa4, 0x00, 0x00, 0x42, 0x43, 0x5e, 0x00, 0x62, 0x32, 0x2f, 0x00, 0xdd, 0x1e, 0x00, 0x90, 0x4c, + 0x33, 0x8c, 0x01, 0x1b, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x1a, 0x8c, 0x01, 0x1b, + 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdd, 0x1a, 0x00, 0x90, 0x4c, 0x34, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x3d, 0x16, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x04, 0x00, 0x00, 0x00, + 0x00, 0xdd, 0x08, 0x00, 0x13, 0x92, 0x01, 0x00, 0x01, 0x85, 0x00, 0x94, 0x0b, 0x90, 0x15, } func TestPacketDot11MgmtBeacon(t *testing.T) { @@ -136,38 +141,14 @@ func TestPacketDot11MgmtBeacon(t *testing.T) { if p.ErrorLayer() != nil { t.Error("Failed to decode packet:", p.ErrorLayer().Error()) } - - checkLayers(p, []gopacket.LayerType{LayerTypeRadioTap, LayerTypeDot11, LayerTypeDot11MgmtBeacon}, t) - - if got, ok := p.Layer(LayerTypeRadioTap).(*RadioTap); ok { - want := &RadioTap{BaseLayer: BaseLayer{Contents: []uint8{0x0, 0x0, 0x20, 0x0, 0x67, 0x8, 0x4, 0x0, 0xe9, 0xa2, 0xfe, 0x25, 0x0, 0x0, 0x0, 0x0, 0x22, 0xc, 0xd8, 0xa0, 0x2, 0x0, 0x0, 0x0, 0x40, 0x1, 0x0, 0x0, 0x3c, 0x14, 0x24, 0x11}, Payload: []uint8{0x80, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x3, 0x7f, 0x7, 0xa0, 0x16, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xd0, 0x9b, 0x38, 0x40, 0x10, 0x28, 0x0, 0x0, 0x0, 0x0, 0x64, 0x0, 0x0, 0x5, 0x0, 0x0, 0x1, 0x8, 0x8c, 0x12, 0x98, 0x24, 0xb0, 0x48, 0x60, 0x6c, 0x3, 0x1, 0x24, 0x5, 0x4, 0x0, 0x1, 0x0, 0x0, 0x7, 0x2a, 0x55, 0x53, 0x20, 0x24, 0x1, 0x11, 0x28, 0x1, 0x11, 0x2c, 0x1, 0x11, 0x30, 0x1, 0x11, 0x34, 0x1, 0x17, 0x38, 0x1, 0x17, 0x3c, 0x1, 0x17, 0x40, 0x1, 0x17, 0x95, 0x1, 0x1e, 0x99, 0x1, 0x1e, 0x9d, 0x1, 0x1e, 0xa1, 0x1, 0x1e, 0xa5, 0x1, 0x1e, 0x20, 0x1, 0x0, 0xdd, 0x18, 0x0, 0x50, 0xf2, 0x2, 0x1, 0x1, 0x0, 0x0, 0x3, 0xa4, 0x0, 0x0, 0x27, 0xa4, 0x0, 0x0, 0x42, 0x43, 0x5e, 0x0, 0x62, 0x32, 0x2f, 0x0, 0x34, 0xc, 0x66, 0x72, 0x65, 0x65, 0x62, 0x73, 0x64, 0x2d, 0x6d, 0x65, 0x73, 0x68, 0x33, 0x17, 0x1, 0x0, 0xf, 0xac, 0x0, 0x0, 0xf, 0xac, 0x0, 0x0, 0xf, 0xac, 0xff, 0x0, 0xf, 0xac, 0xff, 0x0, 0xf, 0xac, 0xff, 0x0, 0xdf}}, Version: 0x0, Length: 0x20, Present: 0x40867, TSFT: 0x25fea2e9, Flags: 0x22, Rate: 0xc, ChannelFrequency: 0x0, ChannelFlags: 0x0, FHSS: 0x0, DBMAntennaSignal: -40, DBMAntennaNoise: -96, LockQuality: 0x0, TxAttenuation: 0x0, DBTxAttenuation: 0x0, DBMTxPower: 0, Antenna: 0x2, DBAntennaSignal: 0x0, DBAntennaNoise: 0x0} - - if !reflect.DeepEqual(got, want) { - t.Errorf("RadioTap packet processing failed:\ngot :\n%#v\n\nwant :\n%#v\n\n", got, want) - } + expectedLayers := []gopacket.LayerType{LayerTypeRadioTap, LayerTypeDot11, LayerTypeDot11MgmtBeacon} + for i := 0; i < 12; i++ { + expectedLayers = append(expectedLayers, LayerTypeDot11InformationElement) } + checkLayers(p, expectedLayers, t) - if got, ok := p.Layer(LayerTypeDot11).(*Dot11); ok { - want := &Dot11{ - BaseLayer: BaseLayer{ - Contents: []uint8{0x80, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0, 0x3, 0x7f, 0x7, 0xa0, 0x16, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xd0, 0x9b}, - Payload: []uint8{0x38, 0x40, 0x10, 0x28, 0x0, 0x0, 0x0, 0x0, 0x64, 0x0, 0x0, 0x5, 0x0, 0x0, 0x1, 0x8, 0x8c, 0x12, 0x98, 0x24, 0xb0, 0x48, 0x60, 0x6c, 0x3, 0x1, 0x24, 0x5, 0x4, 0x0, 0x1, 0x0, 0x0, 0x7, 0x2a, 0x55, 0x53, 0x20, 0x24, 0x1, 0x11, 0x28, 0x1, 0x11, 0x2c, 0x1, 0x11, 0x30, 0x1, 0x11, 0x34, 0x1, 0x17, 0x38, 0x1, 0x17, 0x3c, 0x1, 0x17, 0x40, 0x1, 0x17, 0x95, 0x1, 0x1e, 0x99, 0x1, 0x1e, 0x9d, 0x1, 0x1e, 0xa1, 0x1, 0x1e, 0xa5, 0x1, 0x1e, 0x20, 0x1, 0x0, 0xdd, 0x18, 0x0, 0x50, 0xf2, 0x2, 0x1, 0x1, 0x0, 0x0, 0x3, 0xa4, 0x0, 0x0, 0x27, 0xa4, 0x0, 0x0, 0x42, 0x43, 0x5e, 0x0, 0x62, 0x32, 0x2f, 0x0, 0x34, 0xc, 0x66, 0x72, 0x65, 0x65, 0x62, 0x73, 0x64, 0x2d, 0x6d, 0x65, 0x73, 0x68, 0x33, 0x17, 0x1, 0x0, 0xf, 0xac, 0x0, 0x0, 0xf, 0xac, 0x0, 0x0, 0xf, 0xac, 0xff, 0x0, 0xf, 0xac, 0xff, 0x0, 0xf}, - }, - Type: Dot11TypeMgmtBeacon, - Proto: 0x0, - Flags: 0x0, - DurationID: 0x0, - Address1: net.HardwareAddr{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - Address2: net.HardwareAddr{0x0, 0x3, 0x7f, 0x7, 0xa0, 0x16}, - Address3: net.HardwareAddr{0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, - Address4: net.HardwareAddr(nil), - SequenceNumber: 0x26f, FragmentNumber: 0x10, - Checksum: 0xdf00ffac, - } - - if !reflect.DeepEqual(got, want) { - t.Errorf("Dot11 packet processing failed:\ngot :\n%#v\n\nwant :\n%#v\n\n", got, want) - } + if _, ok := p.Layer(LayerTypeDot11MgmtBeacon).(*Dot11MgmtBeacon); !ok { + t.Errorf("dot11 management beacon frame was expected") } } @@ -228,25 +209,17 @@ func BenchmarkDecodePacketDot11DataQOSData(b *testing.B) { } } -// this test is failing, this has probably todo with the datapad - // testPacketDot11MgmtAction is the packet: -// 06:14:23.248019 634199967us tsft short preamble 6.0 Mb/s -41dB signal -96dB noise antenna 1 5180 MHz 11a Action (00:03:7f:07:a0:16): Reserved(32) Act#0 -// 0x0000: 0000 2000 6708 0400 9f1f cd25 0000 0000 ....g......%.... -// 0x0010: 220c d7a0 0100 0000 4001 0000 3c14 2411 ".......@...<.$. -// 0x0020: d000 0000 ffff ffff ffff 0003 7f07 a016 ................ -// 0x0030: 0003 7f07 a016 a002 2000 4425 0001 1e06 ..........D%.... -// 0x0040: 0000 0000 037f 0342 5206 0000 0088 1300 .......BR....... -// 0x0050: 0030 0b00 0001 0600 16cb ace5 f900 0000 .0.............. -// 0x0060: 00 . +// 15:54:43.236460 1.0 Mb/s 2412 MHz 11b -67dB signal antenna 5 Action (8e:3a:e3:44:ac:c6): Spectrum Management Act#4 +// 0x0000: 0000 1200 2e48 0000 1002 6c09 a000 bd05 .....H....l..... +// 0x0010: 0000 d000 0000 ffff ffff ffff 8e3a e344 .............:.D +// 0x0020: acc6 8e3a e344 acc6 001b 0004 2503 0001 ...:.D......%... +// 0x0030: 0055 39f0 33 .U9.3 var testPacketDot11MgmtAction = []byte{ - 0x00, 0x00, 0x20, 0x00, 0x67, 0x08, 0x04, 0x00, 0x9f, 0x1f, 0xcd, 0x25, 0x00, 0x00, 0x00, 0x00, - 0x22, 0x0c, 0xd7, 0xa0, 0x01, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x3c, 0x14, 0x24, 0x11, - 0xd0, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x03, 0x7f, 0x07, 0xa0, 0x16, - 0x00, 0x03, 0x7f, 0x07, 0xa0, 0x16, 0xa0, 0x02, 0x20, 0x00, 0x44, 0x25, 0x00, 0x01, 0x1e, 0x06, - 0x00, 0x00, 0x00, 0x00, 0x03, 0x7f, 0x03, 0x42, 0x52, 0x06, 0x00, 0x00, 0x00, 0x88, 0x13, 0x00, - 0x00, 0x30, 0x0b, 0x00, 0x00, 0x01, 0x06, 0x00, 0x16, 0xcb, 0xac, 0xe5, 0xf9, 0x00, 0x00, 0x00, - 0x00, + 0x00, 0x00, 0x12, 0x00, 0x2e, 0x48, 0x00, 0x00, 0x10, 0x02, 0x6c, 0x09, 0xa0, 0x00, 0xbd, 0x05, + 0x00, 0x00, 0xd0, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8e, 0x3a, 0xe3, 0x44, + 0xac, 0xc6, 0x8e, 0x3a, 0xe3, 0x44, 0xac, 0xc6, 0x00, 0x1b, 0x00, 0x04, 0x25, 0x03, 0x00, 0x01, + 0x00, 0x55, 0x39, 0xf0, 0x33, } func TestPacketDot11MgmtAction(t *testing.T) { @@ -255,24 +228,18 @@ func TestPacketDot11MgmtAction(t *testing.T) { t.Error("Failed to decode packet:", p.ErrorLayer().Error()) } checkLayers(p, []gopacket.LayerType{LayerTypeRadioTap, LayerTypeDot11, LayerTypeDot11MgmtAction}, t) - - want := `PACKET: 97 bytes -- Layer 1 (32 bytes) = RadioTap {Contents=[..32..] Payload=[..65..] Version=0 Length=32 Present=264295 TSFT=634199967 Flags=SHORT-PREAMBLE,DATAPAD Rate=6 Mb/s ChannelFrequency=0 MHz ChannelFlags= FHSS=0 DBMAntennaSignal=-41 DBMAntennaNoise=-96 LockQuality=0 TxAttenuation=0 DBTxAttenuation=0 DBMTxPower=0 Antenna=1 DBAntennaSignal=0 DBAntennaNoise=0} -- Layer 2 (24 bytes) = Dot11 {Contents=[..24..] Payload=[..37..] Type=MgmtAction Proto=0 Flags= DurationID=0 Address1=ff:ff:ff:ff:ff:ff Address2=00:03:7f:07:a0:16 Address3=00:03:7f:07:a0:16 Address4= SequenceNumber=10 FragmentNumber=32 Checksum=0} -- Layer 3 (37 bytes) = Dot11MgmtAction {Contents=[..37..] Payload=[]} -` - if got := p.String(); got != want { - t.Errorf("packet string mismatch:\n---got---\n%q\n---want---\n%q", got, want) + if got, ok := p.Layer(LayerTypeDot11).(*Dot11); !ok { + t.Errorf("dot11 frame was not parsed") + } else if !got.ChecksumValid() { + t.Errorf("Dot11 packet processing failed: checksum failed") } - if _, ok := p.Layer(LayerTypeDot11).(*Dot11); !ok { - t.Errorf("could not get Dot11 layer from packet") - } else { - // See note above: this checksum fails most likely due to datapad. - // wireshark also says this packet is malformed, so I'm not going to waste - // too much more time on it. - // if !got.ChecksumValid() { t.Errorf("Dot11 packet processing failed: checksum failed") } + if got, ok := p.Layer(LayerTypeDot11MgmtAction).(*Dot11MgmtAction); !ok { + t.Errorf("management action frame was not parsed") + } else if got.Contents[0] != 0 { + t.Errorf("action category was not spectrum management") } } + func BenchmarkDecodePacketDot11MgmtAction(b *testing.B) { for i := 0; i < b.N; i++ { gopacket.NewPacket(testPacketDot11MgmtAction, LinkTypeIEEE80211Radio, gopacket.NoCopy) @@ -286,7 +253,7 @@ func BenchmarkDecodePacketDot11MgmtAction(b *testing.B) { // 0x0020: d400 0000 0019 e3d3 5352 46e9 7687 ........SRF.v. var testPacketDot11CtrlAck = []byte{ 0x00, 0x00, 0x20, 0x00, 0x67, 0x08, 0x04, 0x00, 0x96, 0xac, 0x12, 0x26, 0x00, 0x00, 0x00, 0x00, - 0x22, 0x30, 0xd9, 0xa0, 0x02, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x3c, 0x14, 0x24, 0x11, + 0x32, 0x30, 0xd9, 0xa0, 0x02, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x3c, 0x14, 0x24, 0x11, 0xd4, 0x00, 0x00, 0x00, 0x00, 0x19, 0xe3, 0xd3, 0x53, 0x52, 0x46, 0xe9, 0x76, 0x87, } @@ -304,6 +271,9 @@ func TestPacketDot11CtrlAck(t *testing.T) { } if got, ok := p.Layer(LayerTypeDot11).(*Dot11); ok { + if !got.ChecksumValid() { + t.Errorf("Dot11 packet processing failed:\nchecksum failed. got :\n%#v\n\n", got) + } want := &Dot11{ BaseLayer: BaseLayer{ Contents: []uint8{0xd4, 0x0, 0x0, 0x0, 0x0, 0x19, 0xe3, 0xd3, 0x53, 0x52}, @@ -496,3 +466,24 @@ func BenchmarkDecodePacketP6196(b *testing.B) { gopacket.NewPacket(testPacketP6196, LinkTypeIEEE80211Radio, gopacket.NoCopy) } } + +func TestInformationElement(t *testing.T) { + bin := []byte{ + 0, 0, + 0, 2, 1, 3, + 221, 5, 1, 2, 3, 4, 5, + } + pkt := gopacket.NewPacket(bin, LayerTypeDot11InformationElement, gopacket.NoCopy) + + buf := gopacket.NewSerializeBuffer() + var sLayers []gopacket.SerializableLayer + for _, l := range pkt.Layers() { + sLayers = append(sLayers, l.(*Dot11InformationElement)) + } + if err := gopacket.SerializeLayers(buf, gopacket.SerializeOptions{}, sLayers...); err != nil { + t.Error(err.Error()) + } + if !bytes.Equal(bin, buf.Bytes()) { + t.Error("build failed") + } +} diff --git a/vendor/github.com/vtolstov/gopacket/layers/dot1q.go b/vendor/github.com/vtolstov/gopacket/layers/dot1q.go index 4ccabda..c823542 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/dot1q.go +++ b/vendor/github.com/vtolstov/gopacket/layers/dot1q.go @@ -8,9 +8,9 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" "fmt" + "github.com/vtolstov/gopacket" ) // Dot1Q is the packet layer for 802.1Q VLAN headers. diff --git a/vendor/github.com/vtolstov/gopacket/layers/eap.go b/vendor/github.com/vtolstov/gopacket/layers/eap.go index 4ad4a8b..612c225 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/eap.go +++ b/vendor/github.com/vtolstov/gopacket/layers/eap.go @@ -7,9 +7,9 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" "fmt" + "github.com/vtolstov/gopacket" ) type EAPCode uint8 diff --git a/vendor/github.com/vtolstov/gopacket/layers/eapol.go b/vendor/github.com/vtolstov/gopacket/layers/eapol.go index 30fa02c..9c9cea6 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/eapol.go +++ b/vendor/github.com/vtolstov/gopacket/layers/eapol.go @@ -7,7 +7,7 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket" ) // EAPOL defines an EAP over LAN (802.1x) layer. diff --git a/vendor/github.com/vtolstov/gopacket/layers/endpoints.go b/vendor/github.com/vtolstov/gopacket/layers/endpoints.go index 4327125..ca02aa8 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/endpoints.go +++ b/vendor/github.com/vtolstov/gopacket/layers/endpoints.go @@ -7,8 +7,8 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" + "github.com/vtolstov/gopacket" "net" "strconv" ) diff --git a/vendor/github.com/vtolstov/gopacket/layers/enums.go b/vendor/github.com/vtolstov/gopacket/layers/enums.go index 00eeeca..ddb36dd 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/enums.go +++ b/vendor/github.com/vtolstov/gopacket/layers/enums.go @@ -8,9 +8,10 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "errors" "fmt" + + "github.com/vtolstov/gopacket" ) // EnumMetadata keeps track of a set of metadata for each enumeration value @@ -40,21 +41,22 @@ const ( // EthernetTypeLLC is not an actual ethernet type. It is instead a // placeholder we use in Ethernet frames that use the 802.3 standard of // srcmac|dstmac|length|LLC instead of srcmac|dstmac|ethertype. - EthernetTypeLLC EthernetType = 0 - EthernetTypeIPv4 EthernetType = 0x0800 - EthernetTypeARP EthernetType = 0x0806 - EthernetTypeIPv6 EthernetType = 0x86DD - EthernetTypeCiscoDiscovery EthernetType = 0x2000 - EthernetTypeNortelDiscovery EthernetType = 0x01a2 - EthernetTypeDot1Q EthernetType = 0x8100 - EthernetTypePPPoEDiscovery EthernetType = 0x8863 - EthernetTypePPPoESession EthernetType = 0x8864 - EthernetTypeMPLSUnicast EthernetType = 0x8847 - EthernetTypeMPLSMulticast EthernetType = 0x8848 - EthernetTypeEAPOL EthernetType = 0x888e - EthernetTypeQinQ EthernetType = 0x88a8 - EthernetTypeLinkLayerDiscovery EthernetType = 0x88cc - EthernetTypeEthernetCTP EthernetType = 0x9000 + EthernetTypeLLC EthernetType = 0 + EthernetTypeIPv4 EthernetType = 0x0800 + EthernetTypeARP EthernetType = 0x0806 + EthernetTypeIPv6 EthernetType = 0x86DD + EthernetTypeCiscoDiscovery EthernetType = 0x2000 + EthernetTypeNortelDiscovery EthernetType = 0x01a2 + EthernetTypeTransparentEthernetBridging EthernetType = 0x6558 + EthernetTypeDot1Q EthernetType = 0x8100 + EthernetTypePPPoEDiscovery EthernetType = 0x8863 + EthernetTypePPPoESession EthernetType = 0x8864 + EthernetTypeMPLSUnicast EthernetType = 0x8847 + EthernetTypeMPLSMulticast EthernetType = 0x8848 + EthernetTypeEAPOL EthernetType = 0x888e + EthernetTypeQinQ EthernetType = 0x88a8 + EthernetTypeLinkLayerDiscovery EthernetType = 0x88cc + EthernetTypeEthernetCTP EthernetType = 0x9000 ) // IPProtocol is an enumeration of IP protocol values, and acts as a decoder @@ -65,6 +67,7 @@ const ( IPProtocolIPv6HopByHop IPProtocol = 0 IPProtocolICMPv4 IPProtocol = 1 IPProtocolIGMP IPProtocol = 2 + IPProtocolIPv4 IPProtocol = 4 IPProtocolTCP IPProtocol = 6 IPProtocolUDP IPProtocol = 17 IPProtocolRUDP IPProtocol = 27 @@ -433,7 +436,9 @@ func init() { EthernetTypeMetadata[EthernetTypeMPLSMulticast] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeMPLS), Name: "MPLSMulticast", LayerType: LayerTypeMPLS} EthernetTypeMetadata[EthernetTypeEAPOL] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeEAPOL), Name: "EAPOL", LayerType: LayerTypeEAPOL} EthernetTypeMetadata[EthernetTypeQinQ] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeDot1Q), Name: "Dot1Q", LayerType: LayerTypeDot1Q} + EthernetTypeMetadata[EthernetTypeTransparentEthernetBridging] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeEthernet), Name: "TransparentEthernetBridging", LayerType: LayerTypeEthernet} + IPProtocolMetadata[IPProtocolIPv4] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeIPv4), Name: "IPv4", LayerType: LayerTypeIPv4} IPProtocolMetadata[IPProtocolTCP] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeTCP), Name: "TCP", LayerType: LayerTypeTCP} IPProtocolMetadata[IPProtocolUDP] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeUDP), Name: "UDP", LayerType: LayerTypeUDP} IPProtocolMetadata[IPProtocolICMPv4] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeICMPv4), Name: "ICMPv4", LayerType: LayerTypeICMPv4} @@ -486,6 +491,7 @@ func init() { LinkTypeMetadata[LinkTypeIEEE80211Radio] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeRadioTap), Name: "RadioTap"} LinkTypeMetadata[LinkTypeLinuxUSB] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeUSB), Name: "USB"} LinkTypeMetadata[LinkTypeLinuxSLL] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeLinuxSLL), Name: "Linux SLL"} + LinkTypeMetadata[LinkTypePrismHeader] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodePrismHeader), Name: "Prism"} FDDIFrameControlMetadata[FDDIFrameControlLLC] = EnumMetadata{DecodeWith: gopacket.DecodeFunc(decodeLLC), Name: "LLC"} diff --git a/vendor/github.com/vtolstov/gopacket/layers/etherip.go b/vendor/github.com/vtolstov/gopacket/layers/etherip.go index 1a266ea..741ca16 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/etherip.go +++ b/vendor/github.com/vtolstov/gopacket/layers/etherip.go @@ -7,8 +7,8 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" + "github.com/vtolstov/gopacket" ) // EtherIP is the struct for storing RFC 3378 EtherIP packet headers. diff --git a/vendor/github.com/vtolstov/gopacket/layers/ethernet.go b/vendor/github.com/vtolstov/gopacket/layers/ethernet.go index 5364421..a3b2b5c 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/ethernet.go +++ b/vendor/github.com/vtolstov/gopacket/layers/ethernet.go @@ -8,10 +8,10 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" "errors" "fmt" + "github.com/vtolstov/gopacket" "net" ) diff --git a/vendor/github.com/vtolstov/gopacket/layers/fddi.go b/vendor/github.com/vtolstov/gopacket/layers/fddi.go index d34b0ee..e3184da 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/fddi.go +++ b/vendor/github.com/vtolstov/gopacket/layers/fddi.go @@ -7,7 +7,7 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket" "net" ) diff --git a/vendor/github.com/vtolstov/gopacket/layers/gre.go b/vendor/github.com/vtolstov/gopacket/layers/gre.go index 33c5c99..5a0a5bc 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/gre.go +++ b/vendor/github.com/vtolstov/gopacket/layers/gre.go @@ -7,8 +7,8 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" + "github.com/vtolstov/gopacket" ) // GRE is a Generic Routing Encapsulation header. @@ -28,6 +28,7 @@ type GRERouting struct { AddressFamily uint16 SREOffset, SRELength uint8 RoutingInformation []byte + Next *GRERouting } // LayerType returns gopacket.LayerTypeGRE. @@ -44,26 +45,38 @@ func (g *GRE) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { g.Flags = data[1] >> 3 g.Version = data[1] & 0x7 g.Protocol = EthernetType(binary.BigEndian.Uint16(data[2:4])) - g.Checksum = binary.BigEndian.Uint16(data[4:6]) - g.Offset = binary.BigEndian.Uint16(data[6:8]) - g.Key = binary.BigEndian.Uint32(data[8:12]) - g.Seq = binary.BigEndian.Uint32(data[12:16]) - g.BaseLayer = BaseLayer{data[:16], data[16:]} - // reset data to point to after the main gre header - rData := data[16:] + offset := 4 + if g.ChecksumPresent || g.RoutingPresent { + g.Checksum = binary.BigEndian.Uint16(data[offset : offset+2]) + g.Offset = binary.BigEndian.Uint16(data[offset+2 : offset+4]) + offset += 4 + } + if g.KeyPresent { + g.Key = binary.BigEndian.Uint32(data[offset : offset+4]) + offset += 4 + } + if g.SeqPresent { + g.Seq = binary.BigEndian.Uint32(data[offset : offset+4]) + offset += 4 + } if g.RoutingPresent { - g.GRERouting = &GRERouting{ - AddressFamily: binary.BigEndian.Uint16(rData[:2]), - SREOffset: rData[2], - SRELength: rData[3], + tail := &g.GRERouting + for { + sre := &GRERouting{ + AddressFamily: binary.BigEndian.Uint16(data[offset : offset+2]), + SREOffset: data[offset+2], + SRELength: data[offset+3], + } + sre.RoutingInformation = data[offset+4 : offset+4+int(sre.SRELength)] + offset += 4 + int(sre.SRELength) + if sre.AddressFamily == 0 && sre.SRELength == 0 { + break + } + (*tail) = sre + tail = &sre.Next } - end := g.SRELength + 4 - g.RoutingInformation = rData[4:end] - g.Contents = data[:16+end] - g.Payload = data[16+end:] - } else { - g.GRERouting = nil } + g.BaseLayer = BaseLayer{data[:offset], data[offset:]} return nil } diff --git a/vendor/github.com/vtolstov/gopacket/layers/gre_test.go b/vendor/github.com/vtolstov/gopacket/layers/gre_test.go new file mode 100644 index 0000000..1032b9f --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/layers/gre_test.go @@ -0,0 +1,102 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. +package layers + +import ( + "github.com/vtolstov/gopacket" + "reflect" + "testing" +) + +// testPacketGRE is the packet: +// 15:08:08.003196 IP 192.168.1.1 > 192.168.1.2: GREv0, length 88: IP 172.16.1.1 > 172.16.2.1: ICMP echo request, id 4724, seq 1, length 64 +// 0x0000: 3a56 6b69 595e 8e7a 12c3 a971 0800 4500 :VkiY^.z...q..E. +// 0x0010: 006c 843c 4000 402f 32d3 c0a8 0101 c0a8 .l.<@.@/2....... +// 0x0020: 0102 0000 0800 4500 0054 0488 4000 4001 ......E..T..@.@. +// 0x0030: dafe ac10 0101 ac10 0201 0800 82c4 1274 ...............t +// 0x0040: 0001 c892 a354 0000 0000 380c 0000 0000 .....T....8..... +// 0x0050: 0000 1011 1213 1415 1617 1819 1a1b 1c1d ................ +// 0x0060: 1e1f 2021 2223 2425 2627 2829 2a2b 2c2d ...!"#$%&'()*+,- +// 0x0070: 2e2f 3031 3233 3435 3637 ./01234567 +var testPacketGRE = []byte{ + 0x3a, 0x56, 0x6b, 0x69, 0x59, 0x5e, 0x8e, 0x7a, 0x12, 0xc3, 0xa9, 0x71, 0x08, 0x00, 0x45, 0x00, + 0x00, 0x6c, 0x84, 0x3c, 0x40, 0x00, 0x40, 0x2f, 0x32, 0xd3, 0xc0, 0xa8, 0x01, 0x01, 0xc0, 0xa8, + 0x01, 0x02, 0x00, 0x00, 0x08, 0x00, 0x45, 0x00, 0x00, 0x54, 0x04, 0x88, 0x40, 0x00, 0x40, 0x01, + 0xda, 0xfe, 0xac, 0x10, 0x01, 0x01, 0xac, 0x10, 0x02, 0x01, 0x08, 0x00, 0x82, 0xc4, 0x12, 0x74, + 0x00, 0x01, 0xc8, 0x92, 0xa3, 0x54, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0c, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, + 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, + 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, +} + +func TestPacketGRE(t *testing.T) { + p := gopacket.NewPacket(testPacketGRE, LinkTypeEthernet, gopacket.Default) + if p.ErrorLayer() != nil { + t.Error("Failed to decode packet:", p.ErrorLayer().Error()) + } + checkLayers(p, []gopacket.LayerType{LayerTypeEthernet, LayerTypeIPv4, LayerTypeGRE, LayerTypeIPv4, LayerTypeICMPv4, gopacket.LayerTypePayload}, t) + if got, ok := p.Layer(LayerTypeGRE).(*GRE); ok { + want := &GRE{ + BaseLayer: BaseLayer{testPacketGRE[34:38], testPacketGRE[38:]}, + Protocol: EthernetTypeIPv4, + } + if !reflect.DeepEqual(want, got) { + t.Errorf("GRE layer mismatch, \nwant %#v\ngot %#v\n", want, got) + } + } +} + +func BenchmarkDecodePacketGRE(b *testing.B) { + for i := 0; i < b.N; i++ { + gopacket.NewPacket(testPacketGRE, LinkTypeEthernet, gopacket.NoCopy) + } +} + +// testPacketEthernetOverGRE is the packet: +// 11:01:38.124768 IP 192.168.1.1 > 192.168.1.2: GREv0, length 102: IP 172.16.1.1 > 172.16.1.2: ICMP echo request, id 3842, seq 1, length 64 +// 0x0000: ea6b 4cd3 5513 d6b9 d880 56ef 0800 4500 .kL.U.....V...E. +// 0x0010: 007a 0acd 4000 402f ac34 c0a8 0101 c0a8 .z..@.@/.4...... +// 0x0020: 0102 0000 6558 aa6a 36e6 c630 6e32 3ec7 ....eX.j6..0n2>. +// 0x0030: 9def 0800 4500 0054 d970 4000 4001 0715 ....E..T.p@.@... +// 0x0040: ac10 0101 ac10 0102 0800 3f15 0f02 0001 ..........?..... +// 0x0050: 82d9 b154 0000 0000 b5e6 0100 0000 0000 ...T............ +// 0x0060: 1011 1213 1415 1617 1819 1a1b 1c1d 1e1f ................ +// 0x0070: 2021 2223 2425 2627 2829 2a2b 2c2d 2e2f .!"#$%&'()*+,-./ +// 0x0080: 3031 3233 3435 3637 01234567 +var testPacketEthernetOverGRE = []byte{ + 0xea, 0x6b, 0x4c, 0xd3, 0x55, 0x13, 0xd6, 0xb9, 0xd8, 0x80, 0x56, 0xef, 0x08, 0x00, 0x45, 0x00, + 0x00, 0x7a, 0x0a, 0xcd, 0x40, 0x00, 0x40, 0x2f, 0xac, 0x34, 0xc0, 0xa8, 0x01, 0x01, 0xc0, 0xa8, + 0x01, 0x02, 0x00, 0x00, 0x65, 0x58, 0xaa, 0x6a, 0x36, 0xe6, 0xc6, 0x30, 0x6e, 0x32, 0x3e, 0xc7, + 0x9d, 0xef, 0x08, 0x00, 0x45, 0x00, 0x00, 0x54, 0xd9, 0x70, 0x40, 0x00, 0x40, 0x01, 0x07, 0x15, + 0xac, 0x10, 0x01, 0x01, 0xac, 0x10, 0x01, 0x02, 0x08, 0x00, 0x3f, 0x15, 0x0f, 0x02, 0x00, 0x01, + 0x82, 0xd9, 0xb1, 0x54, 0x00, 0x00, 0x00, 0x00, 0xb5, 0xe6, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, + 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, + 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, +} + +func TestPacketEthernetOverGRE(t *testing.T) { + p := gopacket.NewPacket(testPacketEthernetOverGRE, LinkTypeEthernet, gopacket.Default) + if p.ErrorLayer() != nil { + t.Error("Failed to decode packet:", p.ErrorLayer().Error()) + } + checkLayers(p, []gopacket.LayerType{LayerTypeEthernet, LayerTypeIPv4, LayerTypeGRE, LayerTypeEthernet, LayerTypeIPv4, LayerTypeICMPv4, gopacket.LayerTypePayload}, t) + if got, ok := p.Layer(LayerTypeGRE).(*GRE); ok { + want := &GRE{ + BaseLayer: BaseLayer{testPacketEthernetOverGRE[34:38], testPacketEthernetOverGRE[38:]}, + Protocol: EthernetTypeTransparentEthernetBridging, + } + if !reflect.DeepEqual(want, got) { + t.Errorf("GRE layer mismatch, \nwant %#v\ngot %#v\n", want, got) + } + } +} + +func BenchmarkDecodePacketEthernetOverGRE(b *testing.B) { + for i := 0; i < b.N; i++ { + gopacket.NewPacket(testPacketEthernetOverGRE, LinkTypeEthernet, gopacket.NoCopy) + } +} diff --git a/vendor/github.com/vtolstov/gopacket/layers/icmp4.go b/vendor/github.com/vtolstov/gopacket/layers/icmp4.go index d2d8ce1..31fc052 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/icmp4.go +++ b/vendor/github.com/vtolstov/gopacket/layers/icmp4.go @@ -8,9 +8,9 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" "fmt" + "github.com/vtolstov/gopacket" "strconv" ) diff --git a/vendor/github.com/vtolstov/gopacket/layers/icmp6.go b/vendor/github.com/vtolstov/gopacket/layers/icmp6.go index aa565a3..ab3e497 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/icmp6.go +++ b/vendor/github.com/vtolstov/gopacket/layers/icmp6.go @@ -8,9 +8,9 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" "fmt" + "github.com/vtolstov/gopacket" "strconv" ) diff --git a/vendor/github.com/vtolstov/gopacket/layers/icmp6_test.go b/vendor/github.com/vtolstov/gopacket/layers/icmp6_test.go index a21bcb6..cdb4ed4 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/icmp6_test.go +++ b/vendor/github.com/vtolstov/gopacket/layers/icmp6_test.go @@ -8,7 +8,7 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket" "net" "reflect" "testing" diff --git a/vendor/github.com/vtolstov/gopacket/layers/igmp.go b/vendor/github.com/vtolstov/gopacket/layers/igmp.go index 7da4cc0..40a21a7 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/igmp.go +++ b/vendor/github.com/vtolstov/gopacket/layers/igmp.go @@ -8,8 +8,8 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" + "github.com/vtolstov/gopacket" "net" "time" ) diff --git a/vendor/github.com/vtolstov/gopacket/layers/ip4.go b/vendor/github.com/vtolstov/gopacket/layers/ip4.go index 49b4b4a..a1b56bf 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/ip4.go +++ b/vendor/github.com/vtolstov/gopacket/layers/ip4.go @@ -8,9 +8,9 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" "fmt" + "github.com/vtolstov/gopacket" "net" "strings" ) diff --git a/vendor/github.com/vtolstov/gopacket/layers/ip6.go b/vendor/github.com/vtolstov/gopacket/layers/ip6.go index d6321c0..7d5cb96 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/ip6.go +++ b/vendor/github.com/vtolstov/gopacket/layers/ip6.go @@ -8,9 +8,9 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" "fmt" + "github.com/vtolstov/gopacket" "net" ) diff --git a/vendor/github.com/vtolstov/gopacket/layers/ipsec.go b/vendor/github.com/vtolstov/gopacket/layers/ipsec.go index ad6a4b8..a7afa24 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/ipsec.go +++ b/vendor/github.com/vtolstov/gopacket/layers/ipsec.go @@ -7,8 +7,8 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" + "github.com/vtolstov/gopacket" ) // IPSecAH is the authentication header for IPv4/6 defined in @@ -28,12 +28,18 @@ func (i *IPSecAH) LayerType() gopacket.LayerType { return LayerTypeIPSecAH } func decodeIPSecAH(data []byte, p gopacket.PacketBuilder) error { i := &IPSecAH{ - ipv6ExtensionBase: decodeIPv6ExtensionBase(data), - Reserved: binary.BigEndian.Uint16(data[2:4]), - SPI: binary.BigEndian.Uint32(data[4:8]), - Seq: binary.BigEndian.Uint32(data[8:12]), + ipv6ExtensionBase: ipv6ExtensionBase{ + NextHeader: IPProtocol(data[0]), + HeaderLength: data[1], + }, + Reserved: binary.BigEndian.Uint16(data[2:4]), + SPI: binary.BigEndian.Uint32(data[4:8]), + Seq: binary.BigEndian.Uint32(data[8:12]), } - i.AuthenticationData = i.Contents[12:] + i.ActualLength = (int(i.HeaderLength) + 2) * 4 + i.AuthenticationData = data[12:i.ActualLength] + i.Contents = data[:i.ActualLength] + i.Payload = data[i.ActualLength:] p.AddLayer(i) return p.NextDecoder(i.NextHeader) } diff --git a/vendor/github.com/vtolstov/gopacket/layers/ipsec_test.go b/vendor/github.com/vtolstov/gopacket/layers/ipsec_test.go index ecbb738..2c168f1 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/ipsec_test.go +++ b/vendor/github.com/vtolstov/gopacket/layers/ipsec_test.go @@ -7,10 +7,113 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket" + "reflect" "testing" ) +// testPacketIPSecAHTransport is the packet: +// 20:45:10.325850 IP 192.168.1.1 > 192.168.1.2: AH(spi=0x00000101,seq=0x1): ICMP echo request, id 1560, seq 1, length 64 +// 0x0000: 7ec0 ffc6 48f1 1a0e 3c4e 3b3a 0800 4500 ~...H... 192.168.1.2: AH(spi=0x00000101,seq=0x1): IP 172.16.1.1 > 172.16.2.1: ICMP echo request, id 31322, seq 1, length 64 (ipip-proto-4) +// 0x0000: 7220 4d91 63c9 566c ed2d 73cd 0800 4500 r.M.c.Vl.-s...E. +// 0x0010: 0080 0000 4000 4033 b6f7 c0a8 0101 c0a8 ....@.@3........ +// 0x0020: 0102 0404 0000 0000 0101 0000 0001 cca4 ................ +// 0x0030: 01da 9eb4 fb75 10fe 5a59 4500 0054 a96f .....u..ZYE..T.o +// 0x0040: 4000 4001 3617 ac10 0101 ac10 0201 0800 @.@.6........... +// 0x0050: d75f 7a5a 0001 0741 3355 0000 0000 a9db ._zZ...A3U...... +// 0x0060: 0300 0000 0000 1011 1213 1415 1617 1819 ................ +// 0x0070: 1a1b 1c1d 1e1f 2021 2223 2425 2627 2829 .......!"#$%&'() +// 0x0080: 2a2b 2c2d 2e2f 3031 3233 3435 3637 *+,-./01234567 +var testPacketIPSecAHTunnel = []byte{ + 0x72, 0x20, 0x4d, 0x91, 0x63, 0xc9, 0x56, 0x6c, 0xed, 0x2d, 0x73, 0xcd, 0x08, 0x00, 0x45, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x40, 0x00, 0x40, 0x33, 0xb6, 0xf7, 0xc0, 0xa8, 0x01, 0x01, 0xc0, 0xa8, + 0x01, 0x02, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0xcc, 0xa4, + 0x01, 0xda, 0x9e, 0xb4, 0xfb, 0x75, 0x10, 0xfe, 0x5a, 0x59, 0x45, 0x00, 0x00, 0x54, 0xa9, 0x6f, + 0x40, 0x00, 0x40, 0x01, 0x36, 0x17, 0xac, 0x10, 0x01, 0x01, 0xac, 0x10, 0x02, 0x01, 0x08, 0x00, + 0xd7, 0x5f, 0x7a, 0x5a, 0x00, 0x01, 0x07, 0x41, 0x33, 0x55, 0x00, 0x00, 0x00, 0x00, 0xa9, 0xdb, + 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, + 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, + 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, +} + +func TestPacketIPSecAHTunnel(t *testing.T) { + p := gopacket.NewPacket(testPacketIPSecAHTunnel, LinkTypeEthernet, gopacket.Default) + if p.ErrorLayer() != nil { + t.Error("Failed to decode packet:", p.ErrorLayer().Error()) + } + checkLayers(p, []gopacket.LayerType{LayerTypeEthernet, LayerTypeIPv4, LayerTypeIPSecAH, LayerTypeIPv4, LayerTypeICMPv4, gopacket.LayerTypePayload}, t) + if got, ok := p.Layer(LayerTypeIPSecAH).(*IPSecAH); ok { + want := &IPSecAH{ + Reserved: 0x0, + SPI: 0x101, + Seq: 1, + AuthenticationData: []byte{0xcc, 0xa4, 0x01, 0xda, 0x9e, 0xb4, 0xfb, 0x75, 0x10, 0xfe, 0x5a, 0x59}, + } + want.BaseLayer = BaseLayer{testPacketIPSecAHTunnel[34:58], testPacketIPSecAHTunnel[58:]} + want.NextHeader = IPProtocolIPv4 + want.HeaderLength = 0x4 + want.ActualLength = 0x18 + if !reflect.DeepEqual(want, got) { + t.Errorf("IPSecAH layer mismatch, \nwant %#v\ngot %#v\n", want, got) + } + } +} + +func BenchmarkDecodePacketIPSecAHTunnel(b *testing.B) { + for i := 0; i < b.N; i++ { + gopacket.NewPacket(testPacketIPSecAHTunnel, LinkTypeEthernet, gopacket.NoCopy) + } +} + // testPacketIPSecESP is the packet: // 04:30:37.629376 IP 190.0.0.1 > 190.0.0.2: ESP(spi=0x0000006e,seq=0x13), length 116 // 0x0000: 0000 0000 0012 0011 434a d70a 0800 4500 ........CJ....E. @@ -43,6 +146,7 @@ func TestPacketIPSecESP(t *testing.T) { } checkLayers(p, []gopacket.LayerType{LayerTypeEthernet, LayerTypeIPv4, LayerTypeIPSecESP}, t) } + func BenchmarkDecodePacketIPSecESP(b *testing.B) { for i := 0; i < b.N; i++ { gopacket.NewPacket(testPacketIPSecESP, LinkTypeEthernet, gopacket.NoCopy) diff --git a/vendor/github.com/vtolstov/gopacket/layers/layertypes.go b/vendor/github.com/vtolstov/gopacket/layers/layertypes.go index fca459f..cfa23c7 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/layertypes.go +++ b/vendor/github.com/vtolstov/gopacket/layers/layertypes.go @@ -7,7 +7,7 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket" ) var ( @@ -116,6 +116,7 @@ var ( LayerTypeUSBBulk = gopacket.RegisterLayerType(112, gopacket.LayerTypeMetadata{"USBBulk", gopacket.DecodeFunc(decodeUSBBulk)}) LayerTypeLinuxSLL = gopacket.RegisterLayerType(113, gopacket.LayerTypeMetadata{"Linux SLL", gopacket.DecodeFunc(decodeLinuxSLL)}) LayerTypeSFlow = gopacket.RegisterLayerType(114, gopacket.LayerTypeMetadata{"SFlow", gopacket.DecodeFunc(decodeSFlow)}) + LayerTypePrismHeader = gopacket.RegisterLayerType(115, gopacket.LayerTypeMetadata{"Prism monitor mode header", gopacket.DecodeFunc(decodePrismHeader)}) ) var ( diff --git a/vendor/github.com/vtolstov/gopacket/layers/linux_sll.go b/vendor/github.com/vtolstov/gopacket/layers/linux_sll.go index c7f4c20..e128ed3 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/linux_sll.go +++ b/vendor/github.com/vtolstov/gopacket/layers/linux_sll.go @@ -12,7 +12,7 @@ import ( "fmt" "net" - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket" ) type LinuxSLLPacketType uint16 diff --git a/vendor/github.com/vtolstov/gopacket/layers/llc.go b/vendor/github.com/vtolstov/gopacket/layers/llc.go index 9afe592..c70f054 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/llc.go +++ b/vendor/github.com/vtolstov/gopacket/layers/llc.go @@ -7,8 +7,8 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" + "github.com/vtolstov/gopacket" ) // LLC is the layer used for 802.2 Logical Link Control headers. diff --git a/vendor/github.com/vtolstov/gopacket/layers/lldp.go b/vendor/github.com/vtolstov/gopacket/layers/lldp.go index 01ae556..ed6b9a6 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/lldp.go +++ b/vendor/github.com/vtolstov/gopacket/layers/lldp.go @@ -7,9 +7,9 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" "fmt" + "github.com/vtolstov/gopacket" ) // LLDPTLVType is the type of each TLV value in a LinkLayerDiscovery packet. diff --git a/vendor/github.com/vtolstov/gopacket/layers/loopback.go b/vendor/github.com/vtolstov/gopacket/layers/loopback.go index 5c1e767..1aff25d 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/loopback.go +++ b/vendor/github.com/vtolstov/gopacket/layers/loopback.go @@ -7,9 +7,9 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" "fmt" + "github.com/vtolstov/gopacket" ) // Loopback contains the header for loopback encapsulation. This header is diff --git a/vendor/github.com/vtolstov/gopacket/layers/mpls.go b/vendor/github.com/vtolstov/gopacket/layers/mpls.go index cc72f49..986c46e 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/mpls.go +++ b/vendor/github.com/vtolstov/gopacket/layers/mpls.go @@ -7,9 +7,9 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" "errors" + "github.com/vtolstov/gopacket" ) // MPLS is the MPLS packet header. diff --git a/vendor/github.com/vtolstov/gopacket/layers/ndp.go b/vendor/github.com/vtolstov/gopacket/layers/ndp.go index f6482dd..a66ad17 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/ndp.go +++ b/vendor/github.com/vtolstov/gopacket/layers/ndp.go @@ -10,8 +10,8 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "fmt" + "github.com/vtolstov/gopacket" "net" ) diff --git a/vendor/github.com/vtolstov/gopacket/layers/openflow.go b/vendor/github.com/vtolstov/gopacket/layers/openflow.go deleted file mode 100644 index 384c749..0000000 --- a/vendor/github.com/vtolstov/gopacket/layers/openflow.go +++ /dev/null @@ -1,716 +0,0 @@ -// Copyright 2012 Google, Inc. All rights reserved. -// Copyright 2014-2015 Vasiliy Tolstov. All rights reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the LICENSE file in the root of the source -// tree. - -package layers - -import ( - "encoding/binary" - "fmt" - - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" -) - -var LayerTypeOpenflow = gopacket.RegisterLayerType(12340, gopacket.LayerTypeMetadata{"Openflow", gopacket.DecodeFunc(decodeOFP)}) - -const ( - OFPMC_ADD = 0 /* New meter. */ - OFPMC_MODIFY = 1 /* Modify specified meter. */ - OFPMC_DELETE = 2 /* Delete specified meter. */ -) - -const ( - OFPV_10 = 0x01 - OFPV_13 = 0x04 -) - -const ( - /* Immutable messages. */ - OFPT_HELLO = 0 /* Symmetric message */ - OFPT_ERROR = 1 /* Symmetric message */ - OFPT_ECHO_REQUEST = 2 /* Symmetric message */ - OFPT_ECHO_REPLY = 3 /* Symmetric message */ - OFPT_EXPERIMENTER = 4 /* Symmetric message */ - - /* Switch configuration messages. */ - OFPT_FEATURES_REQUEST = 5 /* Controller/switch message */ - OFPT_FEATURES_REPLY = 6 /* Controller/switch message */ - OFPT_GET_CONFIG_REQUEST = 7 /* Controller/switch message */ - OFPT_GET_CONFIG_REPLY = 8 /* Controller/switch message */ - OFPT_SET_CONFIG = 9 /* Controller/switch message */ - - /* Asynchronous messages. */ - OFPT_PACKET_IN = 10 /* Async message */ - OFPT_FLOW_REMOVED = 11 /* Async message */ - OFPT_PORT_STATUS = 12 /* Async message */ - - /* Controller command messages. */ - OFPT_PACKET_OUT = 13 /* Controller/switch message */ - OFPT_FLOW_MOD = 14 /* Controller/switch message */ - OFPT_GROUP_MOD = 15 /* Controller/switch message */ - OFPT_PORT_MOD = 16 /* Controller/switch message */ - OFPT_TABLE_MOD = 17 /* Controller/switch message */ - - /* Multipart messages. */ - OFPT_MULTIPART_REQUEST = 18 /* Controller/switch message */ - OFPT_MULTIPART_REPLY = 19 /* Controller/switch message */ - - /* Barrier messages. */ - OFPT_BARRIER_REQUEST = 20 /* Controller/switch message */ - OFPT_BARRIER_REPLY = 21 /* Controller/switch message */ - - /* Queue Configuration messages. */ - OFPT_QUEUE_GET_CONFIG_REQUEST = 22 /* Controller/switch message */ - OFPT_QUEUE_GET_CONFIG_REPLY = 23 /* Controller/switch message */ - - /* Controller role change request messages. */ - OFPT_ROLE_REQUEST = 24 /* Controller/switch message */ - OFPT_ROLE_REPLY = 25 /* Controller/switch message */ - - /* Asynchronous message configuration. */ - OFPT_GET_ASYNC_REQUEST = 26 /* Controller/switch message */ - OFPT_GET_ASYNC_REPLY = 27 /* Controller/switch message */ - OFPT_SET_ASYNC = 28 /* Controller/switch message */ - - /* Meters and rate limiters configuration messages. */ - OFPT_METER_MOD = 29 /* Controller/switch message */ -) - -const ( - OFPPC_PORT_DOWN = 1 << 0 /* Port is administratively down. */ - OFPPC_NO_STP = 1 << 1 /* Disable 802.1D spanning tree on port. */ - OFPPC_NO_RECV = 1 << 2 /* Drop all packets received by port. */ - OFPPC_NO_RECV_STP = 1 << 3 /* Drop received 802.1D STP packets. */ - OFPPC_NO_FLOOD = 1 << 4 /* Do not include this port when flooding. */ - OFPPC_NO_FWD = 1 << 5 /* Drop packets forwarded to port. */ - OFPPC_NO_PACKET_IN = 1 << 6 /* Do not send packet-in msgs for port. */ -) - -const ( - OFPPS_LINK_DOWN = 1 << 0 /* No physical link present. */ - OFPPS_BLOCKED = 1 << 1 /* Port is blocked */ - OFPPS_LIVE = 1 << 2 /* Live for Fast Failover Group. */ -) - -const ( - /* Maximum number of physical and logical switch ports. */ - OFPP_MAX = 0xffffff00 /* Reserved OpenFlow Port (fake output "ports"). */ - OFPP_IN_PORT = 0xfffffff8 /* Send the packet out the input port. Thisreserved port must be explicitly usedin order to send back out of the inputport. */ - OFPP_TABLE = 0xfffffff9 /* Submit the packet to the first flow tableNB: This destination port can only beused in packet-out messages. */ - OFPP_NORMAL = 0xfffffffa /* Process with normal L2/L3 switching. */ - OFPP_FLOOD = 0xfffffffb /* All physical ports in VLAN, except inputport and those blocked or link down. */ - OFPP_ALL = 0xfffffffc /* All physical ports except input port. */ - OFPP_CONTROLLER = 0xfffffffd /* Send to controller. */ - OFPP_LOCAL = 0xfffffffe /* Local openflow "port". */ - OFPP_ANY = 0xffffffff /* Wildcard port used only for flow mod(delete) and flow stats requests. Selectsall flows regardless of output port(including flows with no output port). */ -) - -const ( - OFPPF_10MB_HD = 1 << 0 /* 10 Mb half-duplex rate support. */ - OFPPF_10MB_FD = 1 << 1 /* 10 Mb full-duplex rate support. */ - OFPPF_100MB_HD = 1 << 2 /* 100 Mb half-duplex rate support. */ - OFPPF_100MB_FD = 1 << 3 /* 100 Mb full-duplex rate support. */ - OFPPF_1GB_HD = 1 << 4 /* 1 Gb half-duplex rate support. */ - OFPPF_1GB_FD = 1 << 5 /* 1 Gb full-duplex rate support. */ - OFPPF_10GB_FD = 1 << 6 /* 10 Gb full-duplex rate support. */ - OFPPF_40GB_FD = 1 << 7 /* 40 Gb full-duplex rate support. */ - OFPPF_100GB_FD = 1 << 8 /* 100 Gb full-duplex rate support. */ - OFPPF_1TB_FD = 1 << 9 /* 1 Tb full-duplex rate support. */ - OFPPF_OTHER = 1 << 10 /* Other rate, not in the list. */ - OFPPF_COPPER = 1 << 11 /* Copper medium. */ - OFPPF_FIBER = 1 << 12 /* Fiber medium. */ - OFPPF_AUTONEG = 1 << 13 /* Auto-negotiation. */ - OFPPF_PAUSE = 1 << 14 /* Pause. */ - OFPPF_PAUSE_ASYM = 1 << 15 /* Asymmetric pause. */ -) - -const ( - OFPQT_MIN_RATE = 1 /* Minimum datarate guaranteed. */ - OFPQT_MAX_RATE = 2 /* Maximum datarate. */ - OFPQT_EXPERIMENTER = 0xffff /* Experimenter defined property. */ -) - -const ( - OFPMT_STANDARD = 0 /* Deprecated. */ - OFPMT_OXM = 1 /* OpenFlow Extensible Match */ - -) - -const ( - OFPXMC_NXM_0 = 0x0000 /* Backward compatibility with NXM */ - OFPXMC_NXM_1 = 0x0001 /* Backward compatibility with NXM */ - OFPXMC_OPENFLOW_BASIC = 0x8000 /* Basic class for OpenFlow */ - OFPXMC_EXPERIMENTER = 0xFFFF /* Experimenter class */ -) - -const ( - OFPXMT_OFB_IN_PORT = 0 /* Switch input port. */ - OFPXMT_OFB_IN_PHY_PORT = 1 /* Switch physical input port. */ - OFPXMT_OFB_METADATA = 2 /* Metadata passed between tables. */ - OFPXMT_OFB_ETH_DST = 3 /* Ethernet destination address. */ - OFPXMT_OFB_ETH_SRC = 4 /* Ethernet source address. */ - OFPXMT_OFB_ETH_TYPE = 5 /* Ethernet frame type. */ - OFPXMT_OFB_VLAN_VID = 6 /* VLAN id. */ - OFPXMT_OFB_VLAN_PCP = 7 /* VLAN priority. */ - OFPXMT_OFB_IP_DSCP = 8 /* IP DSCP (6 bits in ToS field). */ - OFPXMT_OFB_IP_ECN = 9 /* IP ECN (2 bits in ToS field). */ - OFPXMT_OFB_IP_PROTO = 10 /* IP protocol. */ - OFPXMT_OFB_IPV4_SRC = 11 /* IPv4 source address. */ - OFPXMT_OFB_IPV4_DST = 12 /* IPv4 destination address. */ - OFPXMT_OFB_TCP_SRC = 13 /* TCP source port. */ - OFPXMT_OFB_TCP_DST = 14 /* TCP destination port. */ - OFPXMT_OFB_UDP_SRC = 15 /* UDP source port. */ - OFPXMT_OFB_UDP_DST = 16 /* UDP destination port. */ - OFPXMT_OFB_SCTP_SRC = 17 /* SCTP source port. */ - OFPXMT_OFB_SCTP_DST = 18 /* SCTP destination port. */ - OFPXMT_OFB_ICMPV4_TYPE = 19 /* ICMP type. */ - OFPXMT_OFB_ICMPV4_CODE = 20 /* ICMP code. */ - OFPXMT_OFB_ARP_OP = 21 /* ARP opcode. */ - OFPXMT_OFB_ARP_SPA = 22 /* ARP source IPv4 address. */ - OFPXMT_OFB_ARP_TPA = 23 /* ARP target IPv4 address. */ - OFPXMT_OFB_ARP_SHA = 24 /* ARP source hardware address. */ - OFPXMT_OFB_ARP_THA = 25 /* ARP target hardware address. */ - OFPXMT_OFB_IPV6_SRC = 26 /* IPv6 source address. */ - OFPXMT_OFB_IPV6_DST = 27 /* IPv6 destination address. */ - OFPXMT_OFB_IPV6_FLABEL = 28 /* IPv6 Flow Label */ - OFPXMT_OFB_ICMPV6_TYPE = 29 /* ICMPv6 type. */ - OFPXMT_OFB_ICMPV6_CODE = 30 /* ICMPv6 code. */ - OFPXMT_OFB_IPV6_ND_TARGET = 31 /* Target address for ND. */ - OFPXMT_OFB_IPV6_ND_SLL = 32 /* Source link-layer for ND. */ - OFPXMT_OFB_IPV6_ND_TLL = 33 /* Target link-layer for ND. */ - OFPXMT_OFB_MPLS_LABEL = 34 /* MPLS label. */ - OFPXMT_OFB_MPLS_TC = 35 /* MPLS TC. */ - OFPXMT_OFP_MPLS_BOS = 36 /* MPLS BoS bit. */ - OFPXMT_OFB_PBB_ISID = 37 /* PBB I-SID. */ - OFPXMT_OFB_TUNNEL_ID = 38 /* Logical Port Metadata. */ - OFPXMT_OFB_IPV6_EXTHDR = 39 /* IPv6 Extension Header pseudo-field */ -) - -const ( - OFPVID_PRESENT = 0x1000 /* Bit that indicate that a VLAN id is set */ - OFPVID_NONE = 0x0000 /* No VLAN id was set. */ -) - -const ( - OFPIEH_NONEXT = 1 << 0 /* "No next header" encountered. */ - OFPIEH_ESP = 1 << 1 /* Encrypted Sec Payload header present. */ - OFPIEH_AUTH = 1 << 2 /* Authentication header present. */ - OFPIEH_DEST = 1 << 3 /* 1 or 2 dest headers present. */ - OFPIEH_FRAG = 1 << 4 /* Fragment header present. */ - OFPIEH_ROUTER = 1 << 5 /* Router header present. */ - OFPIEH_HOP = 1 << 6 /* Hop-by-hop header present. */ - OFPIEH_UNREP = 1 << 7 /* Unexpected repeats encountered. */ - OFPIEH_UNSEQ = 1 << 8 /* Unexpected sequencing encountered. */ -) - -const ( - OFPIT_GOTO_TABLE = 1 /* Setup the next table in the lookuppipeline */ - OFPIT_WRITE_METADATA = 2 /* Setup the metadata field for use later inpipeline */ - OFPIT_WRITE_ACTIONS = 3 /* Write the action(s) onto the datapath actionset */ - OFPIT_APPLY_ACTIONS = 4 /* Applies the action(s) immediately */ - OFPIT_CLEAR_ACTIONS = 5 /* Clears all actions from the datapathaction set */ - OFPIT_METER = 6 /* Apply meter (rate limiter) */ - OFPIT_EXPERIMENTER = 0xFFFF /* Experimenter instruction */ -) - -const ( - OFPAT_OUTPUT = 0 /* Output to switch port. */ - OFPAT_COPY_TTL_OUT = 11 /* Copy TTL "outwards" -- from next-to-outermostto outermost */ - OFPAT_COPY_TTL_IN = 12 /* Copy TTL "inwards" -- from outermost tonext-to-outermost */ - OFPAT_SET_MPLS_TTL = 15 /* MPLS TTL */ - OFPAT_DEC_MPLS_TTL = 16 /* Decrement MPLS TTL */ - OFPAT_PUSH_VLAN = 17 /* Push a new VLAN tag */ - OFPAT_POP_VLAN = 18 /* Pop the outer VLAN tag */ - OFPAT_PUSH_MPLS = 19 /* Push a new MPLS tag */ - OFPAT_POP_MPLS = 20 /* Pop the outer MPLS tag */ - OFPAT_SET_QUEUE = 21 /* Set queue id when outputting to a port */ - OFPAT_GROUP = 22 /* Apply group. */ - OFPAT_SET_NW_TTL = 23 /* IP TTL. */ - OFPAT_DEC_NW_TTL = 24 /* Decrement IP TTL. */ - OFPAT_SET_FIELD = 25 /* Set a header field using OXM TLV format. */ - OFPAT_PUSH_PBB = 26 /* Push a new PBB service tag (I-TAG) */ - OFPAT_POP_PBB = 27 /* Pop the outer PBB service tag (I-TAG) */ - OFPAT_EXPERIMENTER = 0xffff -) - -const ( - OFPCML_MAX = 0xffe5 /* maximum max_len value which can be usedto request a specific byte length. */ - OFPCML_NO_BUFFER = 0xffff /* indicates that no buffering should beapplied and the whole packet is to besent to the controller. */ -) - -const ( - OFPC_FLOW_STATS = 1 << 0 /* Flow statistics. */ - OFPC_TABLE_STATS = 1 << 1 /* Table statistics. */ - OFPC_PORT_STATS = 1 << 2 /* Port statistics. */ - OFPC_GROUP_STATS = 1 << 3 /* Group statistics. */ - OFPC_IP_REASM = 1 << 5 /* Can reassemble IP fragments. */ - OFPC_QUEUE_STATS = 1 << 6 /* Queue statistics. */ - OFPC_PORT_BLOCKED = 1 << 8 /* Switch will block looping ports. */ -) - -const ( - OFPC_FRAG_NORMAL = 0 /* No special handling for fragments. */ - OFPC_FRAG_DROP = 1 << 0 /* Drop fragments. */ - OFPC_FRAG_REASM = 1 << 1 /* Reassemble (only if OFPC_IP_REASM set). */ - OFPC_FRAG_MASK = 3 -) - -const ( - /* Last usable table number. */ - OFPTT_MAX = 0xfe /* Fake tables. */ - - OFPTT_ALL = 0xff /* Wildcard table used for table config,flow stats and flow deletes. */ -) - -const ( - OFPFC_ADD = 0 /* New flow. */ - OFPFC_MODIFY = 1 /* Modify all matching flows. */ - OFPFC_MODIFY_STRICT = 2 /* Modify entry strictly matching wildcards andpriority. */ - OFPFC_DELETE = 3 /* Delete all matching flows. */ - OFPFC_DELETE_STRICT = 4 /* Delete entry strictly matching wildcards andpriority. */ -) - -const ( - OFPFF_SEND_FLOW_REM = 1 << 0 /* Send flow removed message when flow* expires or is deleted. */ - OFPFF_CHECK_OVERLAP = 1 << 1 /* Check for overlapping entries first. */ - OFPFF_RESET_COUNTS = 1 << 2 /* Reset flow packet and byte counts. */ - OFPFF_NO_PKT_COUNTS = 1 << 3 /* Don't keep track of packet count. */ - OFPFF_NO_BYT_COUNTS = 1 << 4 /* Don't keep track of byte count. */ -) - -const ( - OFPGC_ADD = 0 /* New group. */ - OFPGC_MODIFY = 1 /* Modify all matching groups. */ - OFPGC_DELETE = 2 /* Delete all matching groups. */ -) - -const ( - OFPGT_ALL = 0 /* All (multicast/broadcast) group. */ - OFPGT_SELECT = 1 /* Select group. */ - OFPGT_INDIRECT = 2 /* Indirect group. */ - OFPGT_FF = 3 /* Fast failover group. */ -) - -const ( - /* Last usable meter. */ - OFPM_MAX = 0xffff0000 - - /* Virtual meters. */ - OFPM_SLOWPATH = 0xfffffffd /* Meter for slow datapath, if any. */ - OFPM_CONTROLLER = 0xfffffffe /* Meter for controller connection. */ - OFPM_ALL = 0xffffffff /* Represents all meters for stat requestscommands. */ -) - -const ( - OFPMF_KBPS = 1 << 0 /* Rate value in kb/s (kilo-bit per second). */ - OFPMF_PKTPS = 1 << 1 /* Rate value in packet/sec. */ - OFPMF_BURST = 1 << 2 /* Do burst size. */ - OFPMF_STATS = 1 << 3 /* Collect statistics. */ -) - -const ( - OFPMBT_DROP = 1 /* Drop packet. */ - OFPMBT_DSCP_REMARK = 2 /* Remark DSCP in the IP header. */ - OFPMBT_EXPERIMENTER = 0xFFFF /* Experimenter meter band. */ -) - -const ( - OFPMPF_REQ_MORE = 1 << 0 /* More requests to follow. */ -) - -const ( - OFPMPF_REPLY_MORE = 1 << 0 /* More replies to follow. */ -) - -const ( - /* Description of this OpenFlow switch.* The request body is empty.* The reply body is struct ofp_desc. */ OFPMP_DESC = 0 - - /* Individual flow statistics.* The request body is struct ofp_flow_stats_request.* The reply body is an array of struct ofp_flow_stats. */ - OFPMP_FLOW = 1 - - /* Aggregate flow statistics.* The request body is struct ofp_aggregate_stats_request.* The reply body is struct ofp_aggregate_stats_reply. */ - OFPMP_AGGREGATE = 2 - - /* Flow table statistics.* The request body is empty.* The reply body is an array of struct ofp_table_stats. */ - OFPMP_TABLE = 3 - - /* Port statistics.* The request body is struct ofp_port_stats_request.* The reply body is an array of struct ofp_port_stats. */ - OFPMP_PORT_STATS = 4 - - /* Queue statistics for a port* The request body is struct ofp_queue_stats_request.* The reply body is an array of struct ofp_queue_stats */ - OFPMP_QUEUE = 5 - - /* Group counter statistics.* The request body is struct ofp_group_stats_request.* The reply is an array of struct ofp_group_stats. */ - OFPMP_GROUP = 6 - - /* Group description.* The request body is empty.* The reply body is an array of struct ofp_group_desc_stats. */ - OFPMP_GROUP_DESC = 7 - - /* Group features.* The request body is empty.* The reply body is struct ofp_group_features. */ - OFPMP_GROUP_FEATURES = 8 - - /* Meter statistics.* The request body is struct ofp_meter_multipart_requests.* The reply body is an array of struct ofp_meter_stats. */ - OFPMP_METER = 9 - - /* Meter configuration.* The request body is struct ofp_meter_multipart_requests.* The reply body is an array of struct ofp_meter_config. */ - OFPMP_METER_CONFIG = 10 - - /* Meter features.* The request body is empty.* The reply body is struct ofp_meter_features. */ - OFPMP_METER_FEATURES = 11 - - /* Table features.* The request body is either empty or contains an array of* struct ofp_table_features containing the controller's* desired view of the switch. If the switch is unable to* set the specified view an error is returned.* The reply body is an array of struct ofp_table_features. */ - OFPMP_TABLE_FEATURES = 12 - - /* Port description.* The request body is empty.* The reply body is an array of struct ofp_port. */ - OFPMP_PORT_DESC = 13 - - /* Experimenter extension.* The request and reply bodies begin with* struct ofp_experimenter_multipart_header.* The request and reply bodies are otherwise experimenter-defined. */ - OFPMP_EXPERIMENTER = 0xffff -) - -const ( - OFPTFPT_INSTRUCTIONS = 0 /* Instructions property. */ - OFPTFPT_INSTRUCTIONS_MISS = 1 /* Instructions for table-miss. */ - OFPTFPT_NEXT_TABLES = 2 /* Next Table property. */ - OFPTFPT_NEXT_TABLES_MISS = 3 /* Next Table for table-miss. */ - OFPTFPT_WRITE_ACTIONS = 4 /* Write Actions property. */ - OFPTFPT_WRITE_ACTIONS_MISS = 5 /* Write Actions for table-miss. */ - OFPTFPT_APPLY_ACTIONS = 6 /* Apply Actions property. */ - OFPTFPT_APPLY_ACTIONS_MISS = 7 /* Apply Actions for table-miss. */ - OFPTFPT_MATCH = 8 /* Match property. */ - OFPTFPT_WILDCARDS = 10 /* Wildcards property. */ - OFPTFPT_WRITE_SETFIELD = 12 /* Write Set-Field property. */ - OFPTFPT_WRITE_SETFIELD_MISS = 13 /* Write Set-Field for table-miss. */ - OFPTFPT_APPLY_SETFIELD = 14 /* Apply Set-Field property. */ - OFPTFPT_APPLY_SETFIELD_MISS = 15 /* Apply Set-Field for table-miss. */ - OFPTFPT_EXPERIMENTER = 0xFFFE /* Experimenter property. */ - OFPTFPT_EXPERIMENTER_MISS = 0xFFFF /* Experimenter for table-miss. */ -) - -const ( - OFPGFC_SELECT_WEIGHT = 1 << 0 /* Support weight for select groups */ - OFPGFC_SELECT_LIVENESS = 1 << 1 /* Support liveness for select groups */ - OFPGFC_CHAINING = 1 << 2 /* Support chaining groups */ - OFPGFC_CHAINING_CHECKS = 1 << 3 /* Check chaining for loops and delete */ -) - -const ( - OFPCR_ROLE_NOCHANGE = 0 /* Don't change current role. */ - OFPCR_ROLE_EQUAL = 1 /* Default role, full access. */ - OFPCR_ROLE_MASTER = 2 /* Full access, at most one master. */ - OFPCR_ROLE_SLAVE = 3 /* Read-only access. */ -) - -const ( - OFPR_NO_MATCH = 0 /* No matching flow (table-miss flow entry). */ - OFPR_ACTION = 1 /* Action explicitly output to controller. */ - OFPR_INVALID_TTL = 2 /* Packet has invalid TTL */ -) - -const ( - OFPRR_IDLE_TIMEOUT = 0 /* Flow idle time exceeded idle_timeout. */ - OFPRR_HARD_TIMEOUT = 1 /* Time exceeded hard_timeout. */ - OFPRR_DELETE = 2 /* Evicted by a DELETE flow mod. */ - OFPRR_GROUP_DELETE = 3 /* Group was removed. */ -) - -const ( - OFPPR_ADD = 0 /* The port was added. */ - OFPPR_DELETE = 1 /* The port was removed. */ - OFPPR_MODIFY = 2 /* Some attribute of the port has changed. */ -) - -const ( - OFPET_HELLO_FAILED = 0 /* Hello protocol failed. */ - OFPET_BAD_REQUEST = 1 /* Request was not understood. */ - OFPET_BAD_ACTION = 2 /* Error in action description. */ - OFPET_BAD_INSTRUCTION = 3 /* Error in instruction list. */ - OFPET_BAD_MATCH = 4 /* Error in match. */ - OFPET_FLOW_MOD_FAILED = 5 /* Problem modifying flow entry. */ - OFPET_GROUP_MOD_FAILED = 6 /* Problem modifying group entry. */ - OFPET_PORT_MOD_FAILED = 7 /* Port mod request failed. */ - OFPET_TABLE_MOD_FAILED = 8 /* Table mod request failed. */ - OFPET_QUEUE_OP_FAILED = 9 /* Queue operation failed. */ - OFPET_SWITCH_CONFIG_FAILED = 10 /* Switch config request failed. */ - OFPET_ROLE_REQUEST_FAILED = 11 /* Controller Role request failed. */ - OFPET_METER_MOD_FAILED = 12 /* Error in meter. */ - OFPET_TABLE_FEATURES_FAILED = 13 /* Setting table features failed. */ - OFPET_EXPERIMENTER = 0xffff /* Experimenter error messages. */ -) - -const ( - OFPHFC_INCOMPATIBLE = 0 /* No compatible version. */ - OFPHFC_EPERM = 1 /* Permissions error. */ -) - -const ( - OFPBRC_BAD_VERSION = 0 /* ofp_header.version not supported. */ - OFPBRC_BAD_TYPE = 1 /* ofp_header.type not supported. */ - OFPBRC_BAD_MULTIPART = 2 /* ofp_multipart_request.type not supported. */ - OFPBRC_BAD_EXPERIMENTER = 3 /* Experimenter id not supported* (in ofp_experimenter_header or* ofp_multipart_request or* ofp_multipart_reply). */ - OFPBRC_BAD_EXP_TYPE = 4 /* Experimenter type not supported. */ - OFPBRC_EPERM = 5 /* Permissions error. */ - OFPBRC_BAD_LEN = 6 /* Wrong request length for type. */ - OFPBRC_BUFFER_EMPTY = 7 /* Specified buffer has already been used. */ - OFPBRC_BUFFER_UNKNOWN = 8 /* Specified buffer does not exist. */ - OFPBRC_BAD_TABLE_ID = 9 /* Specified table-id invalid or does not* exist. */ - OFPBRC_IS_SLAVE = 10 /* Denied because controller is slave. */ - OFPBRC_BAD_PORT = 11 /* Invalid port. */ - OFPBRC_BAD_PACKET = 12 /* Invalid packet in packet-out. */ - OFPBRC_MULTIPART_BUFFER_OVERFLOW = 13 /* ofp_multipart_requestoverflowed the assigned buffer. */ -) - -const ( - OFPBAC_BAD_TYPE = 0 /* Unknown action type. */ - OFPBAC_BAD_LEN = 1 /* Length problem in actions. */ - OFPBAC_BAD_EXPERIMENTER = 2 /* Unknown experimenter id specified. */ - OFPBAC_BAD_EXP_TYPE = 3 /* Unknown action for experimenter id. */ - OFPBAC_BAD_OUT_PORT = 4 /* Problem validating output port. */ - OFPBAC_BAD_ARGUMENT = 5 /* Bad action argument. */ - OFPBAC_EPERM = 6 /* Permissions error. */ - OFPBAC_TOO_MANY = 7 /* Can't handle this many actions. */ - OFPBAC_BAD_QUEUE = 8 /* Problem validating output queue. */ - OFPBAC_BAD_OUT_GROUP = 9 /* Invalid group id in forward action. */ - OFPBAC_MATCH_INCONSISTENT = 10 /* Action can't apply for this match,or Set-Field missing prerequisite. */ - OFPBAC_UNSUPPORTED_ORDER = 11 /* Action order is unsupported for theaction list in an Apply-Actions instruction */ - OFPBAC_BAD_TAG = 12 /* Actions uses an unsupportedtag/encap. */ - OFPBAC_BAD_SET_TYPE = 13 /* Unsupported type in SET_FIELD action. */ - OFPBAC_BAD_SET_LEN = 14 /* Length problem in SET_FIELD action. */ - OFPBAC_BAD_SET_ARGUMENT = 15 /* Bad argument in SET_FIELD action. */ -) - -const ( - OFPBIC_UNKNOWN_INST = 0 /* Unknown instruction. */ - OFPBIC_UNSUP_INST = 1 /* Switch or table does not support theinstruction. */ - OFPBIC_BAD_TABLE_ID = 2 /* Invalid Table-ID specified. */ - OFPBIC_UNSUP_METADATA = 3 /* Metadata value unsupported by datapath. */ - OFPBIC_UNSUP_METADATA_MASK = 4 /* Metadata mask value unsupported bydatapath. */ - OFPBIC_BAD_EXPERIMENTER = 5 /* Unknown experimenter id specified. */ - OFPBIC_BAD_EXP_TYPE = 6 /* Unknown instruction for experimenter id. */ - OFPBIC_BAD_LEN = 7 /* Length problem in instructions. */ - OFPBIC_EPERM = 8 /* Permissions error. */ -) - -const ( - OFPBMC_BAD_TYPE = 0 /* Unsupported match type specified by thematch */ - OFPBMC_BAD_LEN = 1 /* Length problem in match. */ - OFPBMC_BAD_TAG = 2 /* Match uses an unsupported tag/encap. */ - OFPBMC_BAD_DL_ADDR_MASK = 3 /* Unsupported datalink addr mask - switchdoes not support arbitrary datalinkaddress mask. */ - OFPBMC_BAD_NW_ADDR_MASK = 4 /* Unsupported network addr mask - switchdoes not support arbitrary networkaddress mask. */ - OFPBMC_BAD_WILDCARDS = 5 /* Unsupported combination of fields maskedor omitted in the match. */ - OFPBMC_BAD_FIELD = 6 /* Unsupported field type in the match. */ - OFPBMC_BAD_VALUE = 7 /* Unsupported value in a match field. */ - OFPBMC_BAD_MASK = 8 /* Unsupported mask specified in the match,field is not dl-address or nw-address. */ - OFPBMC_BAD_PREREQ = 9 /* A prerequisite was not met. */ - OFPBMC_DUP_FIELD = 10 /* A field type was duplicated. */ - OFPBMC_EPERM = 11 /* Permissions error. */ -) - -const ( - OFPFMFC_UNKNOWN = 0 /* Unspecified error. */ - OFPFMFC_TABLE_FULL = 1 /* Flow not added because table was full. */ - OFPFMFC_BAD_TABLE_ID = 2 /* Table does not exist */ - OFPFMFC_OVERLAP = 3 /* Attempted to add overlapping flow withCHECK_OVERLAP flag set. */ - OFPFMFC_EPERM = 4 /* Permissions error. */ - OFPFMFC_BAD_TIMEOUT = 5 /* Flow not added because of unsupportedidle/hard timeout. */ - OFPFMFC_BAD_COMMAND = 6 /* Unsupported or unknown command. */ - OFPFMFC_BAD_FLAGS = 7 /* Unsupported or unknown flags. */ -) - -const ( - OFPGMFC_GROUP_EXISTS = 0 /* Group not added because a group ADDattempted to replace analready-present group. */ - OFPGMFC_INVALID_GROUP = 1 /* Group not added because Groupspecified is invalid. */ - OFPGMFC_WEIGHT_UNSUPPORTED = 2 /* Switch does not support unequal loadsharing with select groups. */ - OFPGMFC_OUT_OF_GROUPS = 3 /* The group table is full. */ - OFPGMFC_OUT_OF_BUCKETS = 4 /* The maximum number of action bucketsfor a group has been exceeded. */ - OFPGMFC_CHAINING_UNSUPPORTED = 5 /* Switch does not support groups thatforward to groups. */ - OFPGMFC_WATCH_UNSUPPORTED = 6 /* This group cannot watch the watch_portor watch_group specified. */ - OFPGMFC_LOOP = 7 /* Group entry would cause a loop. */ - OFPGMFC_UNKNOWN_GROUP = 8 /* Group not modified because a groupMODIFY attempted to modify anon-existent group. */ - OFPGMFC_CHAINED_GROUP = 9 /* Group not deleted because anothergroup is forwarding to it. */ - OFPGMFC_BAD_TYPE = 10 /* Unsupported or unknown group type. */ - OFPGMFC_BAD_COMMAND = 11 /* Unsupported or unknown command. */ - OFPGMFC_BAD_BUCKET = 12 /* Error in bucket. */ - OFPGMFC_BAD_WATCH = 13 /* Error in watch port/group. */ - OFPGMFC_EPERM = 14 /* Permissions error. */ -) - -const ( - OFPPMFC_BAD_PORT = 0 /* Specified port number does not exist. */ - OFPPMFC_BAD_HW_ADDR = 1 /* Specified hardware address does not* match the port number. */ - OFPPMFC_BAD_CONFIG = 2 /* Specified config is invalid. */ - OFPPMFC_BAD_ADVERTISE = 3 /* Specified advertise is invalid. */ - OFPPMFC_EPERM = 4 /* Permissions error. */ -) - -const ( - OFPTMFC_BAD_TABLE = 0 /* Specified table does not exist. */ - OFPTMFC_BAD_CONFIG = 1 /* Specified config is invalid. */ - OFPTMFC_EPERM = 2 /* Permissions error. */ -) - -const ( - OFPQOFC_BAD_PORT = 0 /* Invalid port (or port does not exist). */ - OFPQOFC_BAD_QUEUE = 1 /* Queue does not exist. */ - OFPQOFC_EPERM = 2 /* Permissions error. */ -) - -const ( - OFPSCFC_BAD_FLAGS = 0 /* Specified flags is invalid. */ - OFPSCFC_BAD_LEN = 1 /* Specified len is invalid. */ - OFPQCFC_EPERM = 2 /* Permissions error. */ -) - -const ( - OFPRRFC_STALE = 0 /* Stale Message: old generation_id. */ - OFPRRFC_UNSUP = 1 /* Controller role change unsupported. */ - OFPRRFC_BAD_ROLE = 2 /* Invalid role. */ -) - -const ( - OFPMMFC_UNKNOWN = 0 /* Unspecified error. */ - OFPMMFC_METER_EXISTS = 1 /* Meter not added because a Meter ADD* attempted to replace an existing Meter. */ - OFPMMFC_INVALID_METER = 2 /* Meter not added because Meter specified* is invalid. */ - OFPMMFC_UNKNOWN_METER = 3 /* Meter not modified because a MeterMODIFY attempted to modify a non-existentMeter. */ - OFPMMFC_BAD_COMMAND = 4 /* Unsupported or unknown command. */ - OFPMMFC_BAD_FLAGS = 5 /* Flag configuration unsupported. */ - OFPMMFC_BAD_RATE = 6 /* Rate unsupported. */ - OFPMMFC_BAD_BURST = 7 /* Burst size unsupported. */ - OFPMMFC_BAD_BAND = 8 /* Band unsupported. */ - OFPMMFC_BAD_BAND_VALUE = 9 /* Band value unsupported. */ - OFPMMFC_OUT_OF_METERS = 10 /* No more meters available. */ - OFPMMFC_OUT_OF_BANDS = 11 /* The maximum number of properties* for a meter has been exceeded. */ -) - -const ( - OFPTFFC_BAD_TABLE = 0 /* Specified table does not exist. */ - OFPTFFC_BAD_METADATA = 1 /* Invalid metadata mask. */ - OFPTFFC_BAD_TYPE = 2 /* Unknown property type. */ - OFPTFFC_BAD_LEN = 3 /* Length problem in properties. */ - OFPTFFC_BAD_ARGUMENT = 4 /* Unsupported property value. */ - OFPTFFC_EPERM = 5 /* Permissions error. */ -) - -const ( - OFPFW_IN_PORT = 1 << 0 /* Switch input port. */ - OFPFW_DL_VLAN = 1 << 1 /* VLAN. */ - OFPFW_DL_SRC = 1 << 2 /* Ethernet source address. */ - OFPFW_DL_DST = 1 << 3 /* Ethernet destination address. */ - OFPFW_DL_TYPE = 1 << 4 /* Ethernet frame type. */ - OFPFW_NW_PROTO = 1 << 5 /* IP protocol. */ - OFPFW_TP_SRC = 1 << 6 /* TCP/UDP source port. */ - OFPFW_TP_DST = 1 << 7 /* TCP/UDP destination port. */ - - /* IP source address wildcard bit count. 0 is exact match, 1 ignores the* LSB, 2 ignores the 2 least-significant bits, ..., 32 and higher wildcard* the entire field. This is the *opposite* of the usual convention where* e.g. /24 indicates that 8 bits (not 24 bits) are wildcarded. */ - OFPFW_NW_SRC_SHIFT = 8 - OFPFW_NW_SRC_BITS = 6 - OFPFW_NW_SRC_MASK = ((1 << OFPFW_NW_SRC_BITS) - 1) << OFPFW_NW_SRC_SHIFT - OFPFW_NW_SRC_ALL = 32 << OFPFW_NW_SRC_SHIFT - - /* IP destination address wildcard bit count. Same format as source. */ - OFPFW_NW_DST_SHIFT = 14 - OFPFW_NW_DST_BITS = 6 - OFPFW_NW_DST_MASK = ((1 << OFPFW_NW_DST_BITS) - 1) << OFPFW_NW_DST_SHIFT - OFPFW_NW_DST_ALL = 32 << OFPFW_NW_DST_SHIFT - - /* Wildcard all fields. */ - OFPFW_ALL = ((1 << 20) - 1) -) - -const ( - OFPER_IDLE_TIMEOUT = 0 /* Flow idle time exceeded idle_timeout. */ - OFPER_HARD_TIMEOUT = 1 /* Time exceeded hard_timeout. */ -) - -// OFP is the layer for OFP headers. -type Openflow struct { - BaseLayer - Version uint8 - Type uint8 - Length uint16 - Xid uint32 -} - -type ActionHeader struct { - Type uint16 - Length uint16 -} - -type ActionOutput struct { - ActionHeader - Port uint32 - MaxLength uint16 -} - -type OpenflowPhyPort struct{} - -func (o *Openflow) LayerType() gopacket.LayerType { return LayerTypeOpenflow } - -func (o *Openflow) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { - o.Version = data[0] - o.Type = data[1] - o.Length = binary.BigEndian.Uint16(data[2:4]) - o.Xid = binary.BigEndian.Uint32(data[4:8]) - o.Contents = data[:8] - switch { - case o.Length >= 8: - hlen := int(o.Length) - if hlen > len(data) { - df.SetTruncated() - hlen = len(data) - } - o.Payload = data[8:hlen] - default: - return fmt.Errorf("OFP packet too small: %d bytes", o.Length) - } - return nil -} - -// SerializeTo writes the serialized form of this layer into the -// SerializationBuffer, implementing gopacket.SerializableLayer. -// See the docs for gopacket.SerializableLayer for more info. -func (o *Openflow) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error { - payload := b.Bytes() - bytes, err := b.PrependBytes(8) - if err != nil { - return err - } - bytes[0] = o.Version - bytes[1] = o.Type - binary.BigEndian.PutUint32(bytes[4:], uint32(o.Xid)) - if opts.FixLengths { - o.Length = uint16(len(payload)) + 8 - } - binary.BigEndian.PutUint16(bytes[2:], uint16(o.Length)) - return nil -} - -func (o *Openflow) CanDecode() gopacket.LayerClass { - return LayerTypeOpenflow -} - -func (o *Openflow) NextLayerType() gopacket.LayerType { - switch o.Version { - // case 0x04: - // return LayerTypeOpenflow13 - // case 0x01: - // return LayerTypeOpenflow10 - default: - return gopacket.LayerTypePayload - } -} - -func decodeOFP(data []byte, p gopacket.PacketBuilder) error { - // o := &OFP{} - //return decodingLayerDecoder(o, data, p) - return nil -} - -/* -func (o *OFP) TransportFlow() gopacket.Flow { - return gopacket.NewFlow(EndpointUDPPort, u.sPort, u.dPort) -} -*/ diff --git a/vendor/github.com/vtolstov/gopacket/layers/pflog.go b/vendor/github.com/vtolstov/gopacket/layers/pflog.go index 91e494a..5d1c8bb 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/pflog.go +++ b/vendor/github.com/vtolstov/gopacket/layers/pflog.go @@ -10,7 +10,7 @@ import ( "encoding/binary" "errors" - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket" ) type PFDirection uint8 diff --git a/vendor/github.com/vtolstov/gopacket/layers/ports.go b/vendor/github.com/vtolstov/gopacket/layers/ports.go index c317b8a..f73e977 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/ports.go +++ b/vendor/github.com/vtolstov/gopacket/layers/ports.go @@ -10,7 +10,7 @@ import ( "fmt" "strconv" - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket" ) // TCPPort is a port in a TCP layer. diff --git a/vendor/github.com/vtolstov/gopacket/layers/ppp.go b/vendor/github.com/vtolstov/gopacket/layers/ppp.go index 2d8eb8f..8fe6c02 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/ppp.go +++ b/vendor/github.com/vtolstov/gopacket/layers/ppp.go @@ -7,9 +7,9 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" "errors" + "github.com/vtolstov/gopacket" ) // PPP is the layer for PPP encapsulation headers. diff --git a/vendor/github.com/vtolstov/gopacket/layers/pppoe.go b/vendor/github.com/vtolstov/gopacket/layers/pppoe.go index a895920..f464146 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/pppoe.go +++ b/vendor/github.com/vtolstov/gopacket/layers/pppoe.go @@ -7,8 +7,8 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" + "github.com/vtolstov/gopacket" ) // PPPoE is the layer for PPPoE encapsulation headers. diff --git a/vendor/github.com/vtolstov/gopacket/layers/prism.go b/vendor/github.com/vtolstov/gopacket/layers/prism.go new file mode 100644 index 0000000..2e64a4e --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/layers/prism.go @@ -0,0 +1,146 @@ +// Copyright 2015 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +// http://www.tcpdump.org/linktypes/LINKTYPE_IEEE802_11_PRISM.html + +package layers + +import ( + "encoding/binary" + "errors" + + "github.com/vtolstov/gopacket" +) + +func decodePrismValue(data []byte, pv *PrismValue) { + pv.DID = PrismDID(binary.LittleEndian.Uint32(data[0:4])) + pv.Status = binary.LittleEndian.Uint16(data[4:6]) + pv.Length = binary.LittleEndian.Uint16(data[6:8]) + pv.Data = data[8 : 8+pv.Length] +} + +type PrismDID uint32 + +const ( + PrismDIDType1HostTime PrismDID = 0x10044 + PrismDIDType2HostTime PrismDID = 0x01041 + PrismDIDType1MACTime PrismDID = 0x20044 + PrismDIDType2MACTime PrismDID = 0x02041 + PrismDIDType1Channel PrismDID = 0x30044 + PrismDIDType2Channel PrismDID = 0x03041 + PrismDIDType1RSSI PrismDID = 0x40044 + PrismDIDType2RSSI PrismDID = 0x04041 + PrismDIDType1SignalQuality PrismDID = 0x50044 + PrismDIDType2SignalQuality PrismDID = 0x05041 + PrismDIDType1Signal PrismDID = 0x60044 + PrismDIDType2Signal PrismDID = 0x06041 + PrismDIDType1Noise PrismDID = 0x70044 + PrismDIDType2Noise PrismDID = 0x07041 + PrismDIDType1Rate PrismDID = 0x80044 + PrismDIDType2Rate PrismDID = 0x08041 + PrismDIDType1TransmittedFrameIndicator PrismDID = 0x90044 + PrismDIDType2TransmittedFrameIndicator PrismDID = 0x09041 + PrismDIDType1FrameLength PrismDID = 0xA0044 + PrismDIDType2FrameLength PrismDID = 0x0A041 +) + +const ( + PrismType1MessageCode uint16 = 0x00000044 + PrismType2MessageCode uint16 = 0x00000041 +) + +func (p PrismDID) String() string { + dids := map[PrismDID]string{ + PrismDIDType1HostTime: "Host Time", + PrismDIDType2HostTime: "Host Time", + PrismDIDType1MACTime: "MAC Time", + PrismDIDType2MACTime: "MAC Time", + PrismDIDType1Channel: "Channel", + PrismDIDType2Channel: "Channel", + PrismDIDType1RSSI: "RSSI", + PrismDIDType2RSSI: "RSSI", + PrismDIDType1SignalQuality: "Signal Quality", + PrismDIDType2SignalQuality: "Signal Quality", + PrismDIDType1Signal: "Signal", + PrismDIDType2Signal: "Signal", + PrismDIDType1Noise: "Noise", + PrismDIDType2Noise: "Noise", + PrismDIDType1Rate: "Rate", + PrismDIDType2Rate: "Rate", + PrismDIDType1TransmittedFrameIndicator: "Transmitted Frame Indicator", + PrismDIDType2TransmittedFrameIndicator: "Transmitted Frame Indicator", + PrismDIDType1FrameLength: "Frame Length", + PrismDIDType2FrameLength: "Frame Length", + } + + if str, ok := dids[p]; ok { + return str + } + + return "Unknown DID" +} + +type PrismValue struct { + DID PrismDID + Status uint16 + Length uint16 + Data []byte +} + +func (pv *PrismValue) IsSupplied() bool { + return pv.Status == 1 +} + +var ErrPrismExpectedMoreData = errors.New("Expected more data.") +var ErrPrismInvalidCode = errors.New("Invalid header code.") + +func decodePrismHeader(data []byte, p gopacket.PacketBuilder) error { + d := &PrismHeader{} + return decodingLayerDecoder(d, data, p) +} + +type PrismHeader struct { + BaseLayer + Code uint16 + Length uint16 + DeviceName string + Values []PrismValue +} + +func (m *PrismHeader) LayerType() gopacket.LayerType { return LayerTypePrismHeader } + +func (m *PrismHeader) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) error { + m.Code = binary.LittleEndian.Uint16(data[0:4]) + m.Length = binary.LittleEndian.Uint16(data[4:8]) + m.DeviceName = string(data[8:24]) + m.BaseLayer = BaseLayer{Contents: data[:m.Length], Payload: data[m.Length:len(data)]} + + switch m.Code { + case PrismType1MessageCode: + fallthrough + case PrismType2MessageCode: + // valid message code + default: + return ErrPrismInvalidCode + } + + offset := uint16(24) + + m.Values = make([]PrismValue, (m.Length-offset)/12) + for i := 0; i < len(m.Values); i++ { + decodePrismValue(data[offset:offset+12], &m.Values[i]) + offset += 12 + } + + if offset != m.Length { + return ErrPrismExpectedMoreData + } + + return nil +} + +func (m *PrismHeader) CanDecode() gopacket.LayerClass { return LayerTypePrismHeader } +func (m *PrismHeader) NextLayerType() gopacket.LayerType { return LayerTypeDot11 } diff --git a/vendor/github.com/vtolstov/gopacket/layers/prism_test.go b/vendor/github.com/vtolstov/gopacket/layers/prism_test.go new file mode 100644 index 0000000..48cfa26 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/layers/prism_test.go @@ -0,0 +1,120 @@ +// Copyright 2014, Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +package layers + +import ( + "net" + "reflect" + "testing" + + "github.com/vtolstov/gopacket" +) + +// Generator: python layers/test_creator.py --layerType=LayerTypePrismHeader --linkType=LinkTypePrismHeader --name=Prism%s ~/tmp/dump.pcap +// http://wiki.wireshark.org/SampleCaptures#Sample_Captures + +// testPacketPrism is the packet: +// 21:32:37.616872 BSSID:Broadcast DA:Broadcast SA:cc:fa:00:ad:79:e8 (oui Unknown) Probe Request () [1.0 2.0 5.5 11.0 Mbit] +// 0x0000: 4400 0000 9000 0000 7261 3000 0000 0000 +// 0x0010: 0000 0000 0000 0000 4400 0100 0000 0400 +// 0x0020: f9c1 2900 4400 0200 0000 0000 0000 0000 +// 0x0030: 4400 0300 0000 0400 0a00 0000 4400 0400 +// 0x0040: 0000 0400 e1ff ffff 0000 0000 0000 0000 +// 0x0050: 0000 0000 4400 0600 0000 0400 0000 0000 +// 0x0060: 4400 0700 0000 0400 0000 0000 4400 0800 +// 0x0070: 0000 0400 0200 0000 4400 0900 0000 0000 +// 0x0080: 0000 0000 4400 0a00 0000 0400 7e00 0000 +// 0x0090: 4000 0000 ffff ffff ffff ccfa 00ad 79e8 +// 0x00a0: ffff ffff ffff a041 0000 0104 0204 0b16 +// 0x00b0: 3208 0c12 1824 3048 606c 0301 012d 1a2d +// 0x00c0: 1117 ff00 0000 0000 0000 0000 0000 0000 +// 0x00d0: 0000 0000 0000 0000 007f 0800 0000 0000 +// 0x00e0: 0000 40dd 0900 1018 0200 0010 0000 dd1e +// 0x00f0: 0090 4c33 2d11 17ff 0000 0000 0000 0000 +// 0x0100: 0000 0000 0000 0000 0000 0000 0000 + +var testPacketPrism = []byte{ + 0x44, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x72, 0x61, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, + 0xf9, 0xc1, 0x29, 0x00, 0x44, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x44, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x44, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x04, 0x00, 0xe1, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x44, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x08, 0x00, + 0x00, 0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x44, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x7e, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcc, 0xfa, 0x00, 0xad, 0x79, 0xe8, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa0, 0x41, 0x00, 0x00, 0x01, 0x04, 0x02, 0x04, 0x0b, 0x16, + 0x32, 0x08, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6c, 0x03, 0x01, 0x01, 0x2d, 0x1a, 0x2d, + 0x11, 0x17, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x40, 0xdd, 0x09, 0x00, 0x10, 0x18, 0x02, 0x00, 0x00, 0x10, 0x00, 0x00, 0xdd, 0x1e, + 0x00, 0x90, 0x4c, 0x33, 0x2d, 0x11, 0x17, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +} + +func TestPacketPrism(t *testing.T) { + p := gopacket.NewPacket(testPacketPrism, LinkTypePrismHeader, gopacket.Default) + if p.ErrorLayer() != nil { + t.Error("Failed to decode packet:", p.ErrorLayer().Error()) + } + checkLayers(p, []gopacket.LayerType{LayerTypePrismHeader, LayerTypeDot11, LayerTypeDot11MgmtProbeReq}, t) + + if got, ok := p.Layer(LayerTypePrismHeader).(*PrismHeader); ok { + want := &PrismHeader{ + BaseLayer: BaseLayer{ + Contents: []uint8{0x44, 0x0, 0x0, 0x0, 0x90, 0x0, 0x0, 0x0, 0x72, 0x61, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, 0x0, 0x1, 0x0, 0x0, 0x0, 0x4, 0x0, 0xf9, 0xc1, 0x29, 0x0, 0x44, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, 0x0, 0x3, 0x0, 0x0, 0x0, 0x4, 0x0, 0xa, 0x0, 0x0, 0x0, 0x44, 0x0, 0x4, 0x0, 0x0, 0x0, 0x4, 0x0, 0xe1, 0xff, 0xff, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, 0x0, 0x6, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, 0x0, 0x7, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, 0x0, 0x8, 0x0, 0x0, 0x0, 0x4, 0x0, 0x2, 0x0, 0x0, 0x0, 0x44, 0x0, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x44, 0x0, 0xa, 0x0, 0x0, 0x0, 0x4, 0x0, 0x7e, 0x0, 0x0, 0x0}, + Payload: []uint8{0x40, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcc, 0xfa, 0x0, 0xad, 0x79, 0xe8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa0, 0x41, 0x0, 0x0, 0x1, 0x4, 0x2, 0x4, 0xb, 0x16, 0x32, 0x8, 0xc, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6c, 0x3, 0x1, 0x1, 0x2d, 0x1a, 0x2d, 0x11, 0x17, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x40, 0xdd, 0x9, 0x0, 0x10, 0x18, 0x2, 0x0, 0x0, 0x10, 0x0, 0x0, 0xdd, 0x1e, 0x0, 0x90, 0x4c, 0x33, 0x2d, 0x11, 0x17, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}, Code: 0x44, Length: 0x90, DeviceName: "ra0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", + Values: []PrismValue{ + PrismValue{DID: PrismDIDType1HostTime, Status: 0x0, Length: 0x4, Data: []uint8{0xf9, 0xc1, 0x29, 0x0}}, + PrismValue{DID: PrismDIDType1MACTime, Status: 0x0, Length: 0x0, Data: []uint8{}}, + PrismValue{DID: PrismDIDType1Channel, Status: 0x0, Length: 0x4, Data: []uint8{0xa, 0x0, 0x0, 0x0}}, + PrismValue{DID: PrismDIDType1RSSI, Status: 0x0, Length: 0x4, Data: []uint8{0xe1, 0xff, 0xff, 0xff}}, + PrismValue{DID: 0x0, Status: 0x0, Length: 0x0, Data: []uint8{}}, + PrismValue{DID: PrismDIDType1Signal, Status: 0x0, Length: 0x4, Data: []uint8{0x0, 0x0, 0x0, 0x0}}, + PrismValue{DID: PrismDIDType1Noise, Status: 0x0, Length: 0x4, Data: []uint8{0x0, 0x0, 0x0, 0x0}}, + PrismValue{DID: PrismDIDType1Rate, Status: 0x0, Length: 0x4, Data: []uint8{0x2, 0x0, 0x0, 0x0}}, + PrismValue{DID: PrismDIDType1TransmittedFrameIndicator, Status: 0x0, Length: 0x0, Data: []uint8{}}, + PrismValue{DID: PrismDIDType1FrameLength, Status: 0x0, Length: 0x4, Data: []uint8{0x7e, 0x0, 0x0, 0x0}}, + }, + } + + if !reflect.DeepEqual(got, want) { + t.Errorf("RadioTap packet processing failed:\ngot :\n%#v\n\nwant :\n%#v\n\n", got, want) + } + } + + if got, ok := p.Layer(LayerTypeDot11).(*Dot11); ok { + want := &Dot11{ + BaseLayer: BaseLayer{ + Contents: []uint8{0x40, 0x0, 0x0, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcc, 0xfa, 0x0, 0xad, 0x79, 0xe8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa0, 0x41}, + Payload: []uint8{0x0, 0x0, 0x1, 0x4, 0x2, 0x4, 0xb, 0x16, 0x32, 0x8, 0xc, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6c, 0x3, 0x1, 0x1, 0x2d, 0x1a, 0x2d, 0x11, 0x17, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7f, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x40, 0xdd, 0x9, 0x0, 0x10, 0x18, 0x2, 0x0, 0x0, 0x10, 0x0, 0x0, 0xdd, 0x1e, 0x0, 0x90, 0x4c, 0x33, 0x2d, 0x11, 0x17, 0xff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, + }, + Type: 0x10, + Proto: 0x0, + Flags: 0x0, + DurationID: 0x0, + Address1: net.HardwareAddr{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, + Address2: net.HardwareAddr{0xcc, 0xfa, 0x0, 0xad, 0x79, 0xe8}, + Address3: net.HardwareAddr{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, + Address4: net.HardwareAddr(nil), + SequenceNumber: 0x106, + FragmentNumber: 0x20, + Checksum: 0x0, + } + + if !reflect.DeepEqual(got, want) { + t.Errorf("Dot11 packet processing failed:\ngot :\n%#v\n\nwant :\n%#v\n\n", got, want) + } + } +} + +func BenchmarkDecodePacketPrism(b *testing.B) { + for i := 0; i < b.N; i++ { + gopacket.NewPacket(testPacketPrism, LinkTypePrismHeader, gopacket.NoCopy) + } +} diff --git a/vendor/github.com/vtolstov/gopacket/layers/radiotap.go b/vendor/github.com/vtolstov/gopacket/layers/radiotap.go index 98d5d5b..6f53d0d 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/radiotap.go +++ b/vendor/github.com/vtolstov/gopacket/layers/radiotap.go @@ -8,9 +8,11 @@ package layers import ( "bytes" - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" "fmt" + "github.com/vtolstov/gopacket" + "hash/crc32" + "strings" ) // align calculates the number of bytes needed to align with the width @@ -41,6 +43,10 @@ const ( RadioTapPresentTxFlags RadioTapPresentRtsRetries RadioTapPresentDataRetries + _ + RadioTapPresentMCS + RadioTapPresentAMPDUStatus + RadioTapPresentVHT RadioTapPresentEXT RadioTapPresent = 1 << 31 ) @@ -98,6 +104,15 @@ func (r RadioTapPresent) RtsRetries() bool { func (r RadioTapPresent) DataRetries() bool { return r&RadioTapPresentDataRetries != 0 } +func (r RadioTapPresent) MCS() bool { + return r&RadioTapPresentMCS != 0 +} +func (r RadioTapPresent) AMPDUStatus() bool { + return r&RadioTapPresentAMPDUStatus != 0 +} +func (r RadioTapPresent) VHT() bool { + return r&RadioTapPresentVHT != 0 +} func (r RadioTapPresent) EXT() bool { return r&RadioTapPresentEXT != 0 } @@ -259,6 +274,402 @@ func (a RadioTapChannelFrequency) String() string { return fmt.Sprintf("%d MHz", a) } +type RadioTapRxFlags uint16 + +const ( + RadioTapRxFlagsBadPlcp RadioTapRxFlags = 0x0002 +) + +func (self RadioTapRxFlags) BadPlcp() bool { + return self&RadioTapRxFlagsBadPlcp != 0 +} + +func (self RadioTapRxFlags) String() string { + if self.BadPlcp() { + return "BADPLCP" + } + return "" +} + +type RadioTapTxFlags uint16 + +const ( + RadioTapTxFlagsFail RadioTapTxFlags = 1 << iota + RadioTapTxFlagsCTS + RadioTapTxFlagsRTS + RadioTapTxFlagsNoACK +) + +func (self RadioTapTxFlags) Fail() bool { return self&RadioTapTxFlagsFail != 0 } +func (self RadioTapTxFlags) CTS() bool { return self&RadioTapTxFlagsCTS != 0 } +func (self RadioTapTxFlags) RTS() bool { return self&RadioTapTxFlagsRTS != 0 } +func (self RadioTapTxFlags) NoACK() bool { return self&RadioTapTxFlagsNoACK != 0 } + +func (self RadioTapTxFlags) String() string { + var tokens []string + if self.Fail() { + tokens = append(tokens, "Fail") + } + if self.CTS() { + tokens = append(tokens, "CTS") + } + if self.RTS() { + tokens = append(tokens, "RTS") + } + if self.NoACK() { + tokens = append(tokens, "NoACK") + } + return strings.Join(tokens, ",") +} + +type RadioTapMCS struct { + Known RadioTapMCSKnown + Flags RadioTapMCSFlags + MCS uint8 +} + +func (self RadioTapMCS) String() string { + var tokens []string + if self.Known.Bandwidth() { + token := "?" + switch self.Flags.Bandwidth() { + case 0: + token = "20" + case 1: + token = "40" + case 2: + token = "40(20L)" + case 3: + token = "40(20U)" + } + tokens = append(tokens, token) + } + if self.Known.MCSIndex() { + tokens = append(tokens, fmt.Sprintf("MCSIndex#%d", self.MCS)) + } + if self.Known.GuardInterval() { + if self.Flags.ShortGI() { + tokens = append(tokens, fmt.Sprintf("shortGI")) + } else { + tokens = append(tokens, fmt.Sprintf("longGI")) + } + } + if self.Known.HTFormat() { + if self.Flags.Greenfield() { + tokens = append(tokens, fmt.Sprintf("HT-greenfield")) + } else { + tokens = append(tokens, fmt.Sprintf("HT-mixed")) + } + } + if self.Known.FECType() { + if self.Flags.FECLDPC() { + tokens = append(tokens, fmt.Sprintf("LDPC")) + } else { + tokens = append(tokens, fmt.Sprintf("BCC")) + } + } + if self.Known.STBC() { + tokens = append(tokens, fmt.Sprintf("STBC#%d", self.Flags.STBC())) + } + if self.Known.NESS() { + num := 0 + if self.Known.NESS1() { + num |= 0x02 + } + if self.Flags.NESS0() { + num |= 0x01 + } + tokens = append(tokens, fmt.Sprintf("num-of-ESS#%d", num)) + } + return strings.Join(tokens, ",") +} + +type RadioTapMCSKnown uint8 + +const ( + RadioTapMCSKnownBandwidth RadioTapMCSKnown = 1 << iota + RadioTapMCSKnownMCSIndex + RadioTapMCSKnownGuardInterval + RadioTapMCSKnownHTFormat + RadioTapMCSKnownFECType + RadioTapMCSKnownSTBC + RadioTapMCSKnownNESS + RadioTapMCSKnownNESS1 +) + +func (self RadioTapMCSKnown) Bandwidth() bool { return self&RadioTapMCSKnownBandwidth != 0 } +func (self RadioTapMCSKnown) MCSIndex() bool { return self&RadioTapMCSKnownMCSIndex != 0 } +func (self RadioTapMCSKnown) GuardInterval() bool { return self&RadioTapMCSKnownGuardInterval != 0 } +func (self RadioTapMCSKnown) HTFormat() bool { return self&RadioTapMCSKnownHTFormat != 0 } +func (self RadioTapMCSKnown) FECType() bool { return self&RadioTapMCSKnownFECType != 0 } +func (self RadioTapMCSKnown) STBC() bool { return self&RadioTapMCSKnownSTBC != 0 } +func (self RadioTapMCSKnown) NESS() bool { return self&RadioTapMCSKnownNESS != 0 } +func (self RadioTapMCSKnown) NESS1() bool { return self&RadioTapMCSKnownNESS1 != 0 } + +type RadioTapMCSFlags uint8 + +const ( + RadioTapMCSFlagsBandwidthMask RadioTapMCSFlags = 0x03 + RadioTapMCSFlagsShortGI = 0x04 + RadioTapMCSFlagsGreenfield = 0x08 + RadioTapMCSFlagsFECLDPC = 0x10 + RadioTapMCSFlagsSTBCMask = 0x60 + RadioTapMCSFlagsNESS0 = 0x80 +) + +func (self RadioTapMCSFlags) Bandwidth() int { + return int(self & RadioTapMCSFlagsBandwidthMask) +} +func (self RadioTapMCSFlags) ShortGI() bool { return self&RadioTapMCSFlagsShortGI != 0 } +func (self RadioTapMCSFlags) Greenfield() bool { return self&RadioTapMCSFlagsGreenfield != 0 } +func (self RadioTapMCSFlags) FECLDPC() bool { return self&RadioTapMCSFlagsFECLDPC != 0 } +func (self RadioTapMCSFlags) STBC() int { + return int(self&RadioTapMCSFlagsSTBCMask) >> 5 +} +func (self RadioTapMCSFlags) NESS0() bool { return self&RadioTapMCSFlagsNESS0 != 0 } + +type RadioTapAMPDUStatus struct { + Reference uint32 + Flags RadioTapAMPDUStatusFlags + CRC uint8 +} + +func (self RadioTapAMPDUStatus) String() string { + tokens := []string{ + fmt.Sprintf("ref#%x", self.Reference), + } + if self.Flags.ReportZerolen() && self.Flags.IsZerolen() { + tokens = append(tokens, fmt.Sprintf("zero-length")) + } + if self.Flags.LastKnown() && self.Flags.IsLast() { + tokens = append(tokens, "last") + } + if self.Flags.DelimCRCErr() { + tokens = append(tokens, "delimiter CRC error") + } + if self.Flags.DelimCRCKnown() { + tokens = append(tokens, fmt.Sprintf("delimiter-CRC=%02x", self.CRC)) + } + return strings.Join(tokens, ",") +} + +type RadioTapAMPDUStatusFlags uint16 + +const ( + RadioTapAMPDUStatusFlagsReportZerolen RadioTapAMPDUStatusFlags = 1 << iota + RadioTapAMPDUIsZerolen + RadioTapAMPDULastKnown + RadioTapAMPDUIsLast + RadioTapAMPDUDelimCRCErr + RadioTapAMPDUDelimCRCKnown +) + +func (self RadioTapAMPDUStatusFlags) ReportZerolen() bool { + return self&RadioTapAMPDUStatusFlagsReportZerolen != 0 +} +func (self RadioTapAMPDUStatusFlags) IsZerolen() bool { return self&RadioTapAMPDUIsZerolen != 0 } +func (self RadioTapAMPDUStatusFlags) LastKnown() bool { return self&RadioTapAMPDULastKnown != 0 } +func (self RadioTapAMPDUStatusFlags) IsLast() bool { return self&RadioTapAMPDUIsLast != 0 } +func (self RadioTapAMPDUStatusFlags) DelimCRCErr() bool { return self&RadioTapAMPDUDelimCRCErr != 0 } +func (self RadioTapAMPDUStatusFlags) DelimCRCKnown() bool { return self&RadioTapAMPDUDelimCRCKnown != 0 } + +type RadioTapVHT struct { + Known RadioTapVHTKnown + Flags RadioTapVHTFlags + Bandwidth uint8 + MCSNSS [4]RadioTapVHTMCSNSS + Coding uint8 + GroupId uint8 + PartialAID uint16 +} + +func (self RadioTapVHT) String() string { + var tokens []string + if self.Known.STBC() { + if self.Flags.STBC() { + tokens = append(tokens, "STBC") + } else { + tokens = append(tokens, "no STBC") + } + } + if self.Known.TXOPPSNotAllowed() { + if self.Flags.TXOPPSNotAllowed() { + tokens = append(tokens, "TXOP doze not allowed") + } else { + tokens = append(tokens, "TXOP doze allowed") + } + } + if self.Known.GI() { + if self.Flags.SGI() { + tokens = append(tokens, "short GI") + } else { + tokens = append(tokens, "long GI") + } + } + if self.Known.SGINSYMDisambiguation() { + if self.Flags.SGINSYMMod() { + tokens = append(tokens, "NSYM mod 10=9") + } else { + tokens = append(tokens, "NSYM mod 10!=9 or no short GI") + } + } + if self.Known.LDPCExtraOFDMSymbol() { + if self.Flags.LDPCExtraOFDMSymbol() { + tokens = append(tokens, "LDPC extra OFDM symbols") + } else { + tokens = append(tokens, "no LDPC extra OFDM symbols") + } + } + if self.Known.Beamformed() { + if self.Flags.Beamformed() { + tokens = append(tokens, "beamformed") + } else { + tokens = append(tokens, "no beamformed") + } + } + if self.Known.Bandwidth() { + token := "?" + switch self.Bandwidth & 0x1f { + case 0: + token = "20" + case 1: + token = "40" + case 2: + token = "40(20L)" + case 3: + token = "40(20U)" + case 4: + token = "80" + case 5: + token = "80(40L)" + case 6: + token = "80(40U)" + case 7: + token = "80(20LL)" + case 8: + token = "80(20LU)" + case 9: + token = "80(20UL)" + case 10: + token = "80(20UU)" + case 11: + token = "160" + case 12: + token = "160(80L)" + case 13: + token = "160(80U)" + case 14: + token = "160(40LL)" + case 15: + token = "160(40LU)" + case 16: + token = "160(40UL)" + case 17: + token = "160(40UU)" + case 18: + token = "160(20LLL)" + case 19: + token = "160(20LLU)" + case 20: + token = "160(20LUL)" + case 21: + token = "160(20LUU)" + case 22: + token = "160(20ULL)" + case 23: + token = "160(20ULU)" + case 24: + token = "160(20UUL)" + case 25: + token = "160(20UUU)" + } + tokens = append(tokens, token) + } + for i, MCSNSS := range self.MCSNSS { + if MCSNSS.Present() { + fec := "?" + switch self.Coding & (1 << uint8(i)) { + case 0: + fec = "BCC" + case 1: + fec = "LDPC" + } + tokens = append(tokens, fmt.Sprintf("user%d(%s,%s)", i, MCSNSS.String(), fec)) + } + } + if self.Known.GroupId() { + tokens = append(tokens, + fmt.Sprintf("group=%d", self.GroupId)) + } + if self.Known.PartialAID() { + tokens = append(tokens, + fmt.Sprintf("partial-AID=%d", self.PartialAID)) + } + return strings.Join(tokens, ",") +} + +type RadioTapVHTKnown uint16 + +const ( + RadioTapVHTKnownSTBC RadioTapVHTKnown = 1 << iota + RadioTapVHTKnownTXOPPSNotAllowed + RadioTapVHTKnownGI + RadioTapVHTKnownSGINSYMDisambiguation + RadioTapVHTKnownLDPCExtraOFDMSymbol + RadioTapVHTKnownBeamformed + RadioTapVHTKnownBandwidth + RadioTapVHTKnownGroupId + RadioTapVHTKnownPartialAID +) + +func (self RadioTapVHTKnown) STBC() bool { return self&RadioTapVHTKnownSTBC != 0 } +func (self RadioTapVHTKnown) TXOPPSNotAllowed() bool { + return self&RadioTapVHTKnownTXOPPSNotAllowed != 0 +} +func (self RadioTapVHTKnown) GI() bool { return self&RadioTapVHTKnownGI != 0 } +func (self RadioTapVHTKnown) SGINSYMDisambiguation() bool { + return self&RadioTapVHTKnownSGINSYMDisambiguation != 0 +} +func (self RadioTapVHTKnown) LDPCExtraOFDMSymbol() bool { + return self&RadioTapVHTKnownLDPCExtraOFDMSymbol != 0 +} +func (self RadioTapVHTKnown) Beamformed() bool { return self&RadioTapVHTKnownBeamformed != 0 } +func (self RadioTapVHTKnown) Bandwidth() bool { return self&RadioTapVHTKnownBandwidth != 0 } +func (self RadioTapVHTKnown) GroupId() bool { return self&RadioTapVHTKnownGroupId != 0 } +func (self RadioTapVHTKnown) PartialAID() bool { return self&RadioTapVHTKnownPartialAID != 0 } + +type RadioTapVHTFlags uint8 + +const ( + RadioTapVHTFlagsSTBC RadioTapVHTFlags = 1 << iota + RadioTapVHTFlagsTXOPPSNotAllowed + RadioTapVHTFlagsSGI + RadioTapVHTFlagsSGINSYMMod + RadioTapVHTFlagsLDPCExtraOFDMSymbol + RadioTapVHTFlagsBeamformed +) + +func (self RadioTapVHTFlags) STBC() bool { return self&RadioTapVHTFlagsSTBC != 0 } +func (self RadioTapVHTFlags) TXOPPSNotAllowed() bool { + return self&RadioTapVHTFlagsTXOPPSNotAllowed != 0 +} +func (self RadioTapVHTFlags) SGI() bool { return self&RadioTapVHTFlagsSGI != 0 } +func (self RadioTapVHTFlags) SGINSYMMod() bool { return self&RadioTapVHTFlagsSGINSYMMod != 0 } +func (self RadioTapVHTFlags) LDPCExtraOFDMSymbol() bool { + return self&RadioTapVHTFlagsLDPCExtraOFDMSymbol != 0 +} +func (self RadioTapVHTFlags) Beamformed() bool { return self&RadioTapVHTFlagsBeamformed != 0 } + +type RadioTapVHTMCSNSS uint8 + +func (self RadioTapVHTMCSNSS) Present() bool { + return self&0x0F != 0 +} + +func (self RadioTapVHTMCSNSS) String() string { + return fmt.Sprintf("NSS#%dMCS#%d", uint32(self&0xf), uint32(self>>4)) +} + func decodeRadioTap(data []byte, p gopacket.PacketBuilder) error { d := &RadioTap{} // TODO: Should we set LinkLayer here? And implement LinkFlow @@ -302,6 +713,14 @@ type RadioTap struct { DBAntennaSignal uint8 // DBAntennaNoise RF noise power at the antenna, decibel difference from an arbitrary, fixed reference point. DBAntennaNoise uint8 + // + RxFlags RadioTapRxFlags + TxFlags RadioTapTxFlags + RtsRetries uint8 + DataRetries uint8 + MCS RadioTapMCS + AMPDUStatus RadioTapAMPDUStatus + VHT RadioTapVHT } func (m *RadioTap) LayerType() gopacket.LayerType { return LayerTypeRadioTap } @@ -314,9 +733,12 @@ func (m *RadioTap) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) erro offset := uint16(4) for (binary.LittleEndian.Uint32(data[offset:offset+4]) & 0x80000000) != 0 { - // Extended bitmap. + // This parser only handles standard radiotap namespace, + // and expects all fields are packed in the first it_present. + // Extended bitmap will be just ignored. offset += 4 } + offset += 4 // skip the bitmap if m.Present.TSFT() { offset += align(offset, 8) @@ -331,15 +753,16 @@ func (m *RadioTap) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) erro m.Rate = RadioTapRate(data[offset]) offset++ } - if m.Present.FHSS() { - m.FHSS = binary.LittleEndian.Uint16(data[offset : offset+2]) - offset += 2 - } if m.Present.Channel() { + offset += align(offset, 2) m.ChannelFrequency = RadioTapChannelFrequency(binary.LittleEndian.Uint16(data[offset : offset+2])) offset += 2 - m.ChannelFlags = RadioTapChannelFlags(data[offset]) - offset++ + m.ChannelFlags = RadioTapChannelFlags(binary.LittleEndian.Uint16(data[offset : offset+2])) + offset += 2 + } + if m.Present.FHSS() { + m.FHSS = binary.LittleEndian.Uint16(data[offset : offset+2]) + offset += 2 } if m.Present.DBMAntennaSignal() { m.DBMAntennaSignal = int8(data[offset]) @@ -381,30 +804,68 @@ func (m *RadioTap) DecodeFromBytes(data []byte, df gopacket.DecodeFeedback) erro offset++ } if m.Present.RxFlags() { - // TODO: Implement RxFlags + offset += align(offset, 2) + m.RxFlags = RadioTapRxFlags(binary.LittleEndian.Uint16(data[offset:])) + offset += 2 } if m.Present.TxFlags() { - // TODO: Implement TxFlags + offset += align(offset, 2) + m.TxFlags = RadioTapTxFlags(binary.LittleEndian.Uint16(data[offset:])) + offset += 2 } if m.Present.RtsRetries() { - // TODO: Implement RtsRetries + m.RtsRetries = uint8(data[offset]) + offset++ } if m.Present.DataRetries() { - // TODO: Implement DataRetries + m.DataRetries = uint8(data[offset]) + offset++ } - if m.Present.EXT() { - offset += align(offset, 4) - // TODO: Implement EXT - _ = data[offset : offset+4] - offset += 4 + if m.Present.MCS() { + m.MCS = RadioTapMCS{ + RadioTapMCSKnown(data[offset]), + RadioTapMCSFlags(data[offset+1]), + uint8(data[offset+2]), + } + offset += 3 } - - if m.Flags.Datapad() { - // frame has padding between 802.11 header and payload (to 32-bit boundary) + if m.Present.AMPDUStatus() { offset += align(offset, 4) + m.AMPDUStatus = RadioTapAMPDUStatus{ + Reference: binary.LittleEndian.Uint32(data[offset:]), + Flags: RadioTapAMPDUStatusFlags(binary.LittleEndian.Uint16(data[offset+4:])), + CRC: uint8(data[offset+6]), + } + offset += 8 } - - m.BaseLayer = BaseLayer{Contents: data[:m.Length], Payload: data[m.Length:]} + if m.Present.VHT() { + offset += align(offset, 2) + m.VHT = RadioTapVHT{ + Known: RadioTapVHTKnown(binary.LittleEndian.Uint16(data[offset:])), + Flags: RadioTapVHTFlags(data[offset+2]), + Bandwidth: uint8(data[offset+3]), + MCSNSS: [4]RadioTapVHTMCSNSS{ + RadioTapVHTMCSNSS(data[offset+4]), + RadioTapVHTMCSNSS(data[offset+5]), + RadioTapVHTMCSNSS(data[offset+6]), + RadioTapVHTMCSNSS(data[offset+7]), + }, + Coding: uint8(data[offset+8]), + GroupId: uint8(data[offset+9]), + PartialAID: binary.LittleEndian.Uint16(data[offset+10:]), + } + offset += 12 + } + + payload := data[m.Length:] + if !m.Flags.FCS() { // Dot11.DecodeFromBytes() expects FCS present + fcs := make([]byte, 4) + h := crc32.NewIEEE() + h.Write(payload) + binary.LittleEndian.PutUint32(fcs, h.Sum32()) + payload = append(payload, fcs...) + } + m.BaseLayer = BaseLayer{Contents: data[:m.Length], Payload: payload} return nil } diff --git a/vendor/github.com/vtolstov/gopacket/layers/radiotap_test.go b/vendor/github.com/vtolstov/gopacket/layers/radiotap_test.go new file mode 100644 index 0000000..6662299 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/layers/radiotap_test.go @@ -0,0 +1,79 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. +package layers + +import ( + "github.com/vtolstov/gopacket" + "testing" +) + +// testPacketRadiotap0 is the packet: +// 09:34:34.799438 1.0 Mb/s 2412 MHz 11b -58dB signal antenna 7 Acknowledgment RA:88:1f:a1:ae:9d:cb +// 0x0000: 0000 1200 2e48 0000 1002 6c09 a000 c607 .....H....l..... +// 0x0010: 0000 d400 0000 881f a1ae 9dcb c630 4b4b .............0KK +var testPacketRadiotap0 = []byte{ + 0x00, 0x00, 0x12, 0x00, 0x2e, 0x48, 0x00, 0x00, 0x10, 0x02, 0x6c, 0x09, 0xa0, 0x00, 0xc6, 0x07, + 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x88, 0x1f, 0xa1, 0xae, 0x9d, 0xcb, 0xc6, 0x30, 0x4b, 0x4b, +} + +func TestPacketRadiotap0(t *testing.T) { + p := gopacket.NewPacket(testPacketRadiotap0, LayerTypeRadioTap, gopacket.Default) + if p.ErrorLayer() != nil { + t.Error("Failed to decode packet:", p.ErrorLayer().Error()) + } + checkLayers(p, []gopacket.LayerType{LayerTypeRadioTap, LayerTypeDot11}, t) + rt := p.Layer(LayerTypeRadioTap).(*RadioTap) + if rt.ChannelFrequency != 2412 || rt.DBMAntennaSignal != -58 || rt.Antenna != 7 { + t.Error("Radiotap decode error") + } + if rt.Rate != 2 { // 500Kbps unit + t.Error("Radiotap Rate decode error") + } +} +func BenchmarkDecodePacketRadiotap0(b *testing.B) { + for i := 0; i < b.N; i++ { + gopacket.NewPacket(testPacketRadiotap0, LayerTypeRadioTap, gopacket.NoCopy) + } +} + +// testPacketRadiotap1 is the packet: +// 05:24:21.380948 2412 MHz 11g -36dB signal antenna 5 65.0 Mb/s MCS 7 20 MHz lon GI +// 0x0000: 0000 1500 2a48 0800 1000 6c09 8004 dc05 ....*H....l..... +// 0x0010: 0000 0700 0748 112c 0000 3a9d aaf0 191c .....H.,..:..... +// 0x0020: aba7 f213 9d00 3a9d aaf0 1970 b2ee a9f1 ......:....p.... +// 0x0030: 16 . +var testPacketRadiotap1 = []byte{ + 0x00, 0x00, 0x15, 0x00, 0x2a, 0x48, 0x08, 0x00, 0x10, 0x00, 0x6c, 0x09, 0x80, 0x04, 0xdc, 0x05, + 0x00, 0x00, 0x07, 0x00, 0x07, 0x48, 0x11, 0x2c, 0x00, 0x00, 0x3a, 0x9d, 0xaa, 0xf0, 0x19, 0x1c, + 0xab, 0xa7, 0xf2, 0x13, 0x9d, 0x00, 0x3a, 0x9d, 0xaa, 0xf0, 0x19, 0x70, 0xb2, 0xee, 0xa9, 0xf1, + 0x16, +} + +func TestPacketRadiotap1(t *testing.T) { + p := gopacket.NewPacket(testPacketRadiotap1, LayerTypeRadioTap, gopacket.Default) + if p.ErrorLayer() != nil { + t.Error("Failed to decode packet:", p.ErrorLayer().Error()) + } + checkLayers(p, []gopacket.LayerType{LayerTypeRadioTap, LayerTypeDot11}, t) + rt := p.Layer(LayerTypeRadioTap).(*RadioTap) + if rt.ChannelFrequency != 2412 || rt.DBMAntennaSignal != -36 || rt.Antenna != 5 { + t.Error("Radiotap decode error") + } + if !rt.MCS.Known.MCSIndex() || rt.MCS.MCS != 7 { + t.Error("Radiotap MCS error") + } + if !rt.MCS.Known.Bandwidth() || rt.MCS.Flags.Bandwidth() != 0 { + t.Error("Radiotap bandwidth error") + } + if !rt.MCS.Known.GuardInterval() || rt.MCS.Flags.ShortGI() { + t.Error("Radiotap GI error") + } +} +func BenchmarkDecodePacketRadiotap1(b *testing.B) { + for i := 0; i < b.N; i++ { + gopacket.NewPacket(testPacketRadiotap1, LayerTypeRadioTap, gopacket.NoCopy) + } +} diff --git a/vendor/github.com/vtolstov/gopacket/layers/rudp.go b/vendor/github.com/vtolstov/gopacket/layers/rudp.go index f442022..bbfb1c6 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/rudp.go +++ b/vendor/github.com/vtolstov/gopacket/layers/rudp.go @@ -7,9 +7,9 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" "fmt" + "github.com/vtolstov/gopacket" ) type RUDP struct { diff --git a/vendor/github.com/vtolstov/gopacket/layers/sctp.go b/vendor/github.com/vtolstov/gopacket/layers/sctp.go index bc2dba4..98c8ddf 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/sctp.go +++ b/vendor/github.com/vtolstov/gopacket/layers/sctp.go @@ -7,9 +7,9 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" "fmt" + "github.com/vtolstov/gopacket" "hash/crc32" ) diff --git a/vendor/github.com/vtolstov/gopacket/layers/sflow.go b/vendor/github.com/vtolstov/gopacket/layers/sflow.go index 17ef54b..f9e18c3 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/sflow.go +++ b/vendor/github.com/vtolstov/gopacket/layers/sflow.go @@ -72,9 +72,9 @@ that's why they're there. */ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" "fmt" + "github.com/vtolstov/gopacket" "net" ) diff --git a/vendor/github.com/vtolstov/gopacket/layers/sflow_test.go b/vendor/github.com/vtolstov/gopacket/layers/sflow_test.go index b301d95..bae3313 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/sflow_test.go +++ b/vendor/github.com/vtolstov/gopacket/layers/sflow_test.go @@ -6,7 +6,7 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket" "reflect" "testing" ) diff --git a/vendor/github.com/vtolstov/gopacket/layers/tcp.go b/vendor/github.com/vtolstov/gopacket/layers/tcp.go index e014805..6abe539 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/tcp.go +++ b/vendor/github.com/vtolstov/gopacket/layers/tcp.go @@ -8,10 +8,10 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" "errors" "fmt" + "github.com/vtolstov/gopacket" ) // TCP is the layer for TCP headers. diff --git a/vendor/github.com/vtolstov/gopacket/layers/tcpip.go b/vendor/github.com/vtolstov/gopacket/layers/tcpip.go index 8d40ab8..3d967bf 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/tcpip.go +++ b/vendor/github.com/vtolstov/gopacket/layers/tcpip.go @@ -8,8 +8,8 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "fmt" + "github.com/vtolstov/gopacket" ) // Checksum computation for TCP/UDP. diff --git a/vendor/github.com/vtolstov/gopacket/layers/udp.go b/vendor/github.com/vtolstov/gopacket/layers/udp.go index 3d9154a..17c10fa 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/udp.go +++ b/vendor/github.com/vtolstov/gopacket/layers/udp.go @@ -8,9 +8,9 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" "fmt" + "github.com/vtolstov/gopacket" ) // UDP is the layer for UDP headers. diff --git a/vendor/github.com/vtolstov/gopacket/layers/udp_test.go b/vendor/github.com/vtolstov/gopacket/layers/udp_test.go index ff9a5cc..a5dc73d 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/udp_test.go +++ b/vendor/github.com/vtolstov/gopacket/layers/udp_test.go @@ -11,7 +11,7 @@ import ( "reflect" "testing" - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket" ) // testUDPPacketDNS is the packet: diff --git a/vendor/github.com/vtolstov/gopacket/layers/udplite.go b/vendor/github.com/vtolstov/gopacket/layers/udplite.go index a546197..5e98727 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/udplite.go +++ b/vendor/github.com/vtolstov/gopacket/layers/udplite.go @@ -8,8 +8,8 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" + "github.com/vtolstov/gopacket" ) // UDPLite is the layer for UDP-Lite headers (rfc 3828). diff --git a/vendor/github.com/vtolstov/gopacket/layers/usb.go b/vendor/github.com/vtolstov/gopacket/layers/usb.go index c408aa2..f785286 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/usb.go +++ b/vendor/github.com/vtolstov/gopacket/layers/usb.go @@ -7,8 +7,8 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" "encoding/binary" + "github.com/vtolstov/gopacket" ) type USBEventType uint8 diff --git a/vendor/github.com/vtolstov/gopacket/layers/usb_test.go b/vendor/github.com/vtolstov/gopacket/layers/usb_test.go index f0ab426..dc450c5 100644 --- a/vendor/github.com/vtolstov/gopacket/layers/usb_test.go +++ b/vendor/github.com/vtolstov/gopacket/layers/usb_test.go @@ -7,8 +7,8 @@ package layers import ( - "github.com/vtolstov/svirtnet/internal/github.com/vtolstov/gopacket" _ "fmt" + "github.com/vtolstov/gopacket" "reflect" "testing" ) diff --git a/vendor/github.com/vtolstov/gopacket/macs/benchmark_test.go b/vendor/github.com/vtolstov/gopacket/macs/benchmark_test.go new file mode 100644 index 0000000..33af5c2 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/macs/benchmark_test.go @@ -0,0 +1,18 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +package macs + +import ( + "testing" +) + +func BenchmarkCheckEthernetPrefix(b *testing.B) { + key := [3]byte{5, 5, 5} + for i := 0; i < b.N; i++ { + _ = ValidMACPrefixMap[key] + } +} diff --git a/vendor/github.com/vtolstov/gopacket/macs/doc.go b/vendor/github.com/vtolstov/gopacket/macs/doc.go new file mode 100644 index 0000000..c0d32a8 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/macs/doc.go @@ -0,0 +1,12 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +// Package macs provides an in-memory mapping of all valid Ethernet MAC address +// prefixes to their associated organization. +// +// The ValidMACPrefixMap map maps 3-byte prefixes to organization strings. It +// can be updated using 'go run gen.go' in this directory. +package macs diff --git a/vendor/github.com/vtolstov/gopacket/macs/gen.go b/vendor/github.com/vtolstov/gopacket/macs/gen.go new file mode 100644 index 0000000..97776e0 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/macs/gen.go @@ -0,0 +1,78 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +// +build ignore + +// This binary pulls the list of known MAC +// prefixes from IEEE and writes them out to a go file which is compiled +// into gopacket. It should be run as follows: +// +// go run gen.go | gofmt > valid_mac_prefixes.go +package main + +import ( + "bufio" + "encoding/hex" + "flag" + "fmt" + "io" + "net/http" + "os" + "regexp" + "time" +) + +const header = `// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +package macs + +// Created by gen.go, don't edit manually +// Generated at %s +// Fetched from %q + +// ValidMACPrefixMap maps a valid MAC address prefix to the name of the +// organization that owns the rights to use it. We map it to a hidden +// variable so it won't show up in godoc, since it's a very large map. +var ValidMACPrefixMap map[[3]byte]string= validMACPrefixMap +var validMACPrefixMap = map[[3]byte]string{ +` + +var url = flag.String("url", "http://standards.ieee.org/develop/regauth/oui/oui.txt", "URL to fetch MACs from") + +func main() { + fmt.Fprintf(os.Stderr, "Fetching MACs from %q\n", *url) + resp, err := http.Get(*url) + if err != nil { + panic(err) + } + defer resp.Body.Close() + buffered := bufio.NewReader(resp.Body) + finder := regexp.MustCompile(`^\s*([0-9A-F]{6})\s+\(base 16\)\s+(.*)`) + fmt.Fprintln(os.Stderr, "Starting write to standard output") + fmt.Printf(header, time.Now(), *url) + for { + line, err := buffered.ReadString('\n') + if err == io.EOF { + break + } else if err != nil { + panic(err) + } + if matches := finder.FindStringSubmatch(line); matches != nil { + bytes := make([]byte, 3) + hex.Decode(bytes, []byte(matches[1])) + company := matches[2] + if company == "" { + company = "PRIVATE" + } + fmt.Printf("\t[3]byte{%d, %d, %d}: %q,\n", bytes[0], bytes[1], bytes[2], company) + } + } + fmt.Println("}") +} diff --git a/vendor/github.com/vtolstov/gopacket/macs/valid_mac_prefixes.go b/vendor/github.com/vtolstov/gopacket/macs/valid_mac_prefixes.go new file mode 100644 index 0000000..4afee40 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/macs/valid_mac_prefixes.go @@ -0,0 +1,19791 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +package macs + +// Created by gen.go, don't edit manually +// Generated at 2014-09-09 10:01:58.097553511 -0600 MDT +// Fetched from "http://standards.ieee.org/develop/regauth/oui/oui.txt" + +// ValidMACPrefixMap maps a valid MAC address prefix to the name of the +// organization that owns the rights to use it. We map it to a hidden +// variable so it won't show up in godoc, since it's a very large map. +var ValidMACPrefixMap map[[3]byte]string = validMACPrefixMap +var validMACPrefixMap = map[[3]byte]string{ + [3]byte{0, 0, 0}: "XEROX CORPORATION", + [3]byte{0, 0, 1}: "XEROX CORPORATION", + [3]byte{0, 0, 2}: "XEROX CORPORATION", + [3]byte{0, 0, 3}: "XEROX CORPORATION", + [3]byte{0, 0, 4}: "XEROX CORPORATION", + [3]byte{0, 0, 5}: "XEROX CORPORATION", + [3]byte{0, 0, 6}: "XEROX CORPORATION", + [3]byte{0, 0, 7}: "XEROX CORPORATION", + [3]byte{0, 0, 8}: "XEROX CORPORATION", + [3]byte{0, 0, 9}: "XEROX CORPORATION", + [3]byte{0, 0, 10}: "OMRON TATEISI ELECTRONICS CO.", + [3]byte{0, 0, 11}: "MATRIX CORPORATION", + [3]byte{0, 0, 12}: "CISCO SYSTEMS, INC.", + [3]byte{0, 0, 13}: "FIBRONICS LTD.", + [3]byte{0, 0, 14}: "FUJITSU LIMITED", + [3]byte{0, 0, 15}: "NEXT, INC.", + [3]byte{0, 0, 16}: "SYTEK INC.", + [3]byte{0, 0, 17}: "NORMEREL SYSTEMES", + [3]byte{0, 0, 18}: "INFORMATION TECHNOLOGY LIMITED", + [3]byte{0, 0, 19}: "CAMEX", + [3]byte{0, 0, 20}: "NETRONIX", + [3]byte{0, 0, 21}: "DATAPOINT CORPORATION", + [3]byte{0, 0, 22}: "DU PONT PIXEL SYSTEMS .", + [3]byte{0, 0, 23}: "Oracle", + [3]byte{0, 0, 24}: "WEBSTER COMPUTER CORPORATION", + [3]byte{0, 0, 25}: "APPLIED DYNAMICS INTERNATIONAL", + [3]byte{0, 0, 26}: "ADVANCED MICRO DEVICES", + [3]byte{0, 0, 27}: "NOVELL INC.", + [3]byte{0, 0, 28}: "BELL TECHNOLOGIES", + [3]byte{0, 0, 29}: "CABLETRON SYSTEMS, INC.", + [3]byte{0, 0, 30}: "TELSIST INDUSTRIA ELECTRONICA", + [3]byte{0, 0, 31}: "Telco Systems, Inc.", + [3]byte{0, 0, 32}: "DATAINDUSTRIER DIAB AB", + [3]byte{0, 0, 33}: "SUREMAN COMP. & COMMUN. CORP.", + [3]byte{0, 0, 34}: "VISUAL TECHNOLOGY INC.", + [3]byte{0, 0, 35}: "ABB INDUSTRIAL SYSTEMS AB", + [3]byte{0, 0, 36}: "CONNECT AS", + [3]byte{0, 0, 37}: "RAMTEK CORP.", + [3]byte{0, 0, 38}: "SHA-KEN CO., LTD.", + [3]byte{0, 0, 39}: "JAPAN RADIO COMPANY", + [3]byte{0, 0, 40}: "PRODIGY SYSTEMS CORPORATION", + [3]byte{0, 0, 41}: "IMC NETWORKS CORP.", + [3]byte{0, 0, 42}: "TRW - SEDD/INP", + [3]byte{0, 0, 43}: "CRISP AUTOMATION, INC", + [3]byte{0, 0, 44}: "AUTOTOTE LIMITED", + [3]byte{0, 0, 45}: "CHROMATICS INC", + [3]byte{0, 0, 46}: "SOCIETE EVIRA", + [3]byte{0, 0, 47}: "TIMEPLEX INC.", + [3]byte{0, 0, 48}: "VG LABORATORY SYSTEMS LTD", + [3]byte{0, 0, 49}: "QPSX COMMUNICATIONS PTY LTD", + [3]byte{0, 0, 50}: "Marconi plc", + [3]byte{0, 0, 51}: "EGAN MACHINERY COMPANY", + [3]byte{0, 0, 52}: "NETWORK RESOURCES CORPORATION", + [3]byte{0, 0, 53}: "SPECTRAGRAPHICS CORPORATION", + [3]byte{0, 0, 54}: "ATARI CORPORATION", + [3]byte{0, 0, 55}: "OXFORD METRICS LIMITED", + [3]byte{0, 0, 56}: "CSS LABS", + [3]byte{0, 0, 57}: "TOSHIBA CORPORATION", + [3]byte{0, 0, 58}: "CHYRON CORPORATION", + [3]byte{0, 0, 59}: "i Controls, Inc.", + [3]byte{0, 0, 60}: "AUSPEX SYSTEMS INC.", + [3]byte{0, 0, 61}: "UNISYS", + [3]byte{0, 0, 62}: "SIMPACT", + [3]byte{0, 0, 63}: "SYNTREX, INC.", + [3]byte{0, 0, 64}: "APPLICON, INC.", + [3]byte{0, 0, 65}: "ICE CORPORATION", + [3]byte{0, 0, 66}: "METIER MANAGEMENT SYSTEMS LTD.", + [3]byte{0, 0, 67}: "MICRO TECHNOLOGY", + [3]byte{0, 0, 68}: "CASTELLE CORPORATION", + [3]byte{0, 0, 69}: "FORD AEROSPACE & COMM. CORP.", + [3]byte{0, 0, 70}: "OLIVETTI NORTH AMERICA", + [3]byte{0, 0, 71}: "NICOLET INSTRUMENTS CORP.", + [3]byte{0, 0, 72}: "SEIKO EPSON CORPORATION", + [3]byte{0, 0, 73}: "APRICOT COMPUTERS, LTD", + [3]byte{0, 0, 74}: "ADC CODENOLL TECHNOLOGY CORP.", + [3]byte{0, 0, 75}: "ICL DATA OY", + [3]byte{0, 0, 76}: "NEC CORPORATION", + [3]byte{0, 0, 77}: "DCI CORPORATION", + [3]byte{0, 0, 78}: "AMPEX CORPORATION", + [3]byte{0, 0, 79}: "LOGICRAFT, INC.", + [3]byte{0, 0, 80}: "RADISYS CORPORATION", + [3]byte{0, 0, 81}: "HOB ELECTRONIC GMBH & CO. KG", + [3]byte{0, 0, 82}: "Intrusion.com, Inc.", + [3]byte{0, 0, 83}: "COMPUCORP", + [3]byte{0, 0, 84}: "Schnieder Electric", + [3]byte{0, 0, 85}: "COMMISSARIAT A L`ENERGIE ATOM.", + [3]byte{0, 0, 86}: "DR. B. STRUCK", + [3]byte{0, 0, 87}: "SCITEX CORPORATION LTD.", + [3]byte{0, 0, 88}: "RACORE COMPUTER PRODUCTS INC.", + [3]byte{0, 0, 89}: "HELLIGE GMBH", + [3]byte{0, 0, 90}: "SysKonnect GmbH", + [3]byte{0, 0, 91}: "ELTEC ELEKTRONIK AG", + [3]byte{0, 0, 92}: "TELEMATICS INTERNATIONAL INC.", + [3]byte{0, 0, 93}: "CS TELECOM", + [3]byte{0, 0, 94}: "ICANN, IANA Department", + [3]byte{0, 0, 95}: "SUMITOMO ELECTRIC IND., LTD.", + [3]byte{0, 0, 96}: "KONTRON ELEKTRONIK GMBH", + [3]byte{0, 0, 97}: "GATEWAY COMMUNICATIONS", + [3]byte{0, 0, 98}: "BULL HN INFORMATION SYSTEMS", + [3]byte{0, 0, 99}: "BARCO CONTROL ROOMS GMBH", + [3]byte{0, 0, 100}: "Yokogawa Electric Corporation", + [3]byte{0, 0, 101}: "Network General Corporation", + [3]byte{0, 0, 102}: "TALARIS SYSTEMS, INC.", + [3]byte{0, 0, 103}: "SOFT * RITE, INC.", + [3]byte{0, 0, 104}: "ROSEMOUNT CONTROLS", + [3]byte{0, 0, 105}: "CONCORD COMMUNICATIONS INC", + [3]byte{0, 0, 106}: "COMPUTER CONSOLES INC.", + [3]byte{0, 0, 107}: "SILICON GRAPHICS INC./MIPS", + [3]byte{0, 0, 108}: "PRIVATE", + [3]byte{0, 0, 109}: "CRAY COMMUNICATIONS, LTD.", + [3]byte{0, 0, 110}: "ARTISOFT, INC.", + [3]byte{0, 0, 111}: "Madge Ltd.", + [3]byte{0, 0, 112}: "HCL LIMITED", + [3]byte{0, 0, 113}: "ADRA SYSTEMS INC.", + [3]byte{0, 0, 114}: "MINIWARE TECHNOLOGY", + [3]byte{0, 0, 115}: "SIECOR CORPORATION", + [3]byte{0, 0, 116}: "RICOH COMPANY LTD.", + [3]byte{0, 0, 117}: "Nortel Networks", + [3]byte{0, 0, 118}: "ABEKAS VIDEO SYSTEM", + [3]byte{0, 0, 119}: "INTERPHASE CORPORATION", + [3]byte{0, 0, 120}: "LABTAM LIMITED", + [3]byte{0, 0, 121}: "NETWORTH INCORPORATED", + [3]byte{0, 0, 122}: "DANA COMPUTER INC.", + [3]byte{0, 0, 123}: "RESEARCH MACHINES", + [3]byte{0, 0, 124}: "AMPERE INCORPORATED", + [3]byte{0, 0, 125}: "Oracle Corporation", + [3]byte{0, 0, 126}: "CLUSTRIX CORPORATION", + [3]byte{0, 0, 127}: "LINOTYPE-HELL AG", + [3]byte{0, 0, 128}: "CRAY COMMUNICATIONS A/S", + [3]byte{0, 0, 129}: "BAY NETWORKS", + [3]byte{0, 0, 130}: "LECTRA SYSTEMES SA", + [3]byte{0, 0, 131}: "TADPOLE TECHNOLOGY PLC", + [3]byte{0, 0, 132}: "SUPERNET", + [3]byte{0, 0, 133}: "CANON INC.", + [3]byte{0, 0, 134}: "MEGAHERTZ CORPORATION", + [3]byte{0, 0, 135}: "HITACHI, LTD.", + [3]byte{0, 0, 136}: "Brocade Communications Systems, Inc.", + [3]byte{0, 0, 137}: "CAYMAN SYSTEMS INC.", + [3]byte{0, 0, 138}: "DATAHOUSE INFORMATION SYSTEMS", + [3]byte{0, 0, 139}: "INFOTRON", + [3]byte{0, 0, 140}: "Alloy Computer Products (Australia) Pty Ltd", + [3]byte{0, 0, 141}: "Cryptek Inc.", + [3]byte{0, 0, 142}: "SOLBOURNE COMPUTER, INC.", + [3]byte{0, 0, 143}: "Raytheon", + [3]byte{0, 0, 144}: "MICROCOM", + [3]byte{0, 0, 145}: "ANRITSU CORPORATION", + [3]byte{0, 0, 146}: "COGENT DATA TECHNOLOGIES", + [3]byte{0, 0, 147}: "PROTEON INC.", + [3]byte{0, 0, 148}: "ASANTE TECHNOLOGIES", + [3]byte{0, 0, 149}: "SONY TEKTRONIX CORP.", + [3]byte{0, 0, 150}: "MARCONI ELECTRONICS LTD.", + [3]byte{0, 0, 151}: "EMC Corporation", + [3]byte{0, 0, 152}: "CROSSCOMM CORPORATION", + [3]byte{0, 0, 153}: "MTX, INC.", + [3]byte{0, 0, 154}: "RC COMPUTER A/S", + [3]byte{0, 0, 155}: "INFORMATION INTERNATIONAL, INC", + [3]byte{0, 0, 156}: "ROLM MIL-SPEC COMPUTERS", + [3]byte{0, 0, 157}: "LOCUS COMPUTING CORPORATION", + [3]byte{0, 0, 158}: "MARLI S.A.", + [3]byte{0, 0, 159}: "AMERISTAR TECHNOLOGIES INC.", + [3]byte{0, 0, 160}: "SANYO Electric Co., Ltd.", + [3]byte{0, 0, 161}: "MARQUETTE ELECTRIC CO.", + [3]byte{0, 0, 162}: "BAY NETWORKS", + [3]byte{0, 0, 163}: "NETWORK APPLICATION TECHNOLOGY", + [3]byte{0, 0, 164}: "ACORN COMPUTERS LIMITED", + [3]byte{0, 0, 165}: "Tattile SRL", + [3]byte{0, 0, 166}: "NETWORK GENERAL CORPORATION", + [3]byte{0, 0, 167}: "NETWORK COMPUTING DEVICES INC.", + [3]byte{0, 0, 168}: "STRATUS COMPUTER INC.", + [3]byte{0, 0, 169}: "NETWORK SYSTEMS CORP.", + [3]byte{0, 0, 170}: "XEROX CORPORATION", + [3]byte{0, 0, 171}: "LOGIC MODELING CORPORATION", + [3]byte{0, 0, 172}: "CONWARE COMPUTER CONSULTING", + [3]byte{0, 0, 173}: "BRUKER INSTRUMENTS INC.", + [3]byte{0, 0, 174}: "DASSAULT ELECTRONIQUE", + [3]byte{0, 0, 175}: "NUCLEAR DATA INSTRUMENTATION", + [3]byte{0, 0, 176}: "RND-RAD NETWORK DEVICES", + [3]byte{0, 0, 177}: "ALPHA MICROSYSTEMS INC.", + [3]byte{0, 0, 178}: "TELEVIDEO SYSTEMS, INC.", + [3]byte{0, 0, 179}: "CIMLINC INCORPORATED", + [3]byte{0, 0, 180}: "EDIMAX COMPUTER COMPANY", + [3]byte{0, 0, 181}: "DATABILITY SOFTWARE SYS. INC.", + [3]byte{0, 0, 182}: "MICRO-MATIC RESEARCH", + [3]byte{0, 0, 183}: "DOVE COMPUTER CORPORATION", + [3]byte{0, 0, 184}: "SEIKOSHA CO., LTD.", + [3]byte{0, 0, 185}: "MCDONNELL DOUGLAS COMPUTER SYS", + [3]byte{0, 0, 186}: "SIIG, INC.", + [3]byte{0, 0, 187}: "TRI-DATA", + [3]byte{0, 0, 188}: "Rockwell Automation", + [3]byte{0, 0, 189}: "MITSUBISHI CABLE COMPANY", + [3]byte{0, 0, 190}: "THE NTI GROUP", + [3]byte{0, 0, 191}: "SYMMETRIC COMPUTER SYSTEMS", + [3]byte{0, 0, 192}: "WESTERN DIGITAL CORPORATION", + [3]byte{0, 0, 193}: "Madge Ltd.", + [3]byte{0, 0, 194}: "INFORMATION PRESENTATION TECH.", + [3]byte{0, 0, 195}: "HARRIS CORP COMPUTER SYS DIV", + [3]byte{0, 0, 196}: "WATERS DIV. OF MILLIPORE", + [3]byte{0, 0, 197}: "FARALLON COMPUTING/NETOPIA", + [3]byte{0, 0, 198}: "EON SYSTEMS", + [3]byte{0, 0, 199}: "ARIX CORPORATION", + [3]byte{0, 0, 200}: "ALTOS COMPUTER SYSTEMS", + [3]byte{0, 0, 201}: "Emulex Corporation", + [3]byte{0, 0, 202}: "ARRIS International", + [3]byte{0, 0, 203}: "COMPU-SHACK ELECTRONIC GMBH", + [3]byte{0, 0, 204}: "DENSAN CO., LTD.", + [3]byte{0, 0, 205}: "Allied Telesis Labs Ltd", + [3]byte{0, 0, 206}: "MEGADATA CORP.", + [3]byte{0, 0, 207}: "HAYES MICROCOMPUTER PRODUCTS", + [3]byte{0, 0, 208}: "DEVELCON ELECTRONICS LTD.", + [3]byte{0, 0, 209}: "ADAPTEC INCORPORATED", + [3]byte{0, 0, 210}: "SBE, INC.", + [3]byte{0, 0, 211}: "WANG LABORATORIES INC.", + [3]byte{0, 0, 212}: "PURE DATA LTD.", + [3]byte{0, 0, 213}: "MICROGNOSIS INTERNATIONAL", + [3]byte{0, 0, 214}: "PUNCH LINE HOLDING", + [3]byte{0, 0, 215}: "DARTMOUTH COLLEGE", + [3]byte{0, 0, 216}: "NOVELL, INC.", + [3]byte{0, 0, 217}: "NIPPON TELEGRAPH & TELEPHONE", + [3]byte{0, 0, 218}: "ATEX", + [3]byte{0, 0, 219}: "British Telecommunications plc", + [3]byte{0, 0, 220}: "HAYES MICROCOMPUTER PRODUCTS", + [3]byte{0, 0, 221}: "TCL INCORPORATED", + [3]byte{0, 0, 222}: "CETIA", + [3]byte{0, 0, 223}: "BELL & HOWELL PUB SYS DIV", + [3]byte{0, 0, 224}: "QUADRAM CORP.", + [3]byte{0, 0, 225}: "GRID SYSTEMS", + [3]byte{0, 0, 226}: "ACER TECHNOLOGIES CORP.", + [3]byte{0, 0, 227}: "INTEGRATED MICRO PRODUCTS LTD", + [3]byte{0, 0, 228}: "IN2 GROUPE INTERTECHNIQUE", + [3]byte{0, 0, 229}: "SIGMEX LTD.", + [3]byte{0, 0, 230}: "APTOR PRODUITS DE COMM INDUST", + [3]byte{0, 0, 231}: "STAR GATE TECHNOLOGIES", + [3]byte{0, 0, 232}: "ACCTON TECHNOLOGY CORP.", + [3]byte{0, 0, 233}: "ISICAD, INC.", + [3]byte{0, 0, 234}: "UPNOD AB", + [3]byte{0, 0, 235}: "MATSUSHITA COMM. IND. CO. LTD.", + [3]byte{0, 0, 236}: "MICROPROCESS", + [3]byte{0, 0, 237}: "APRIL", + [3]byte{0, 0, 238}: "NETWORK DESIGNERS, LTD.", + [3]byte{0, 0, 239}: "KTI", + [3]byte{0, 0, 240}: "SAMSUNG ELECTRONICS CO., LTD.", + [3]byte{0, 0, 241}: "MAGNA COMPUTER CORPORATION", + [3]byte{0, 0, 242}: "SPIDER COMMUNICATIONS", + [3]byte{0, 0, 243}: "GANDALF DATA LIMITED", + [3]byte{0, 0, 244}: "Allied Telesis", + [3]byte{0, 0, 245}: "DIAMOND SALES LIMITED", + [3]byte{0, 0, 246}: "APPLIED MICROSYSTEMS CORP.", + [3]byte{0, 0, 247}: "YOUTH KEEP ENTERPRISE CO LTD", + [3]byte{0, 0, 248}: "DIGITAL EQUIPMENT CORPORATION", + [3]byte{0, 0, 249}: "QUOTRON SYSTEMS INC.", + [3]byte{0, 0, 250}: "MICROSAGE COMPUTER SYSTEMS INC", + [3]byte{0, 0, 251}: "RECHNER ZUR KOMMUNIKATION", + [3]byte{0, 0, 252}: "MEIKO", + [3]byte{0, 0, 253}: "HIGH LEVEL HARDWARE", + [3]byte{0, 0, 254}: "ANNAPOLIS MICRO SYSTEMS", + [3]byte{0, 0, 255}: "CAMTEC ELECTRONICS LTD.", + [3]byte{0, 1, 0}: "EQUIP'TRANS", + [3]byte{0, 1, 1}: "PRIVATE", + [3]byte{0, 1, 2}: "3COM CORPORATION", + [3]byte{0, 1, 3}: "3COM CORPORATION", + [3]byte{0, 1, 4}: "DVICO Co., Ltd.", + [3]byte{0, 1, 5}: "Beckhoff Automation GmbH", + [3]byte{0, 1, 6}: "Tews Datentechnik GmbH", + [3]byte{0, 1, 7}: "Leiser GmbH", + [3]byte{0, 1, 8}: "AVLAB Technology, Inc.", + [3]byte{0, 1, 9}: "Nagano Japan Radio Co., Ltd.", + [3]byte{0, 1, 10}: "CIS TECHNOLOGY INC.", + [3]byte{0, 1, 11}: "Space CyberLink, Inc.", + [3]byte{0, 1, 12}: "System Talks Inc.", + [3]byte{0, 1, 13}: "CORECO, INC.", + [3]byte{0, 1, 14}: "Bri-Link Technologies Co., Ltd", + [3]byte{0, 1, 15}: "Brocade Communications Systems, Inc.", + [3]byte{0, 1, 16}: "Gotham Networks", + [3]byte{0, 1, 17}: "iDigm Inc.", + [3]byte{0, 1, 18}: "Shark Multimedia Inc.", + [3]byte{0, 1, 19}: "OLYMPUS CORPORATION", + [3]byte{0, 1, 20}: "KANDA TSUSHIN KOGYO CO., LTD.", + [3]byte{0, 1, 21}: "EXTRATECH CORPORATION", + [3]byte{0, 1, 22}: "Netspect Technologies, Inc.", + [3]byte{0, 1, 23}: "CANAL +", + [3]byte{0, 1, 24}: "EZ Digital Co., Ltd.", + [3]byte{0, 1, 25}: "RTUnet (Australia)", + [3]byte{0, 1, 26}: "Hoffmann und Burmeister GbR", + [3]byte{0, 1, 27}: "Unizone Technologies, Inc.", + [3]byte{0, 1, 28}: "Universal Talkware Corporation", + [3]byte{0, 1, 29}: "Centillium Communications", + [3]byte{0, 1, 30}: "Precidia Technologies, Inc.", + [3]byte{0, 1, 31}: "RC Networks, Inc.", + [3]byte{0, 1, 32}: "OSCILLOQUARTZ S.A.", + [3]byte{0, 1, 33}: "Watchguard Technologies, Inc.", + [3]byte{0, 1, 34}: "Trend Communications, Ltd.", + [3]byte{0, 1, 35}: "DIGITAL ELECTRONICS CORP.", + [3]byte{0, 1, 36}: "Acer Incorporated", + [3]byte{0, 1, 37}: "YAESU MUSEN CO., LTD.", + [3]byte{0, 1, 38}: "PAC Labs", + [3]byte{0, 1, 39}: "OPEN Networks Pty Ltd", + [3]byte{0, 1, 40}: "EnjoyWeb, Inc.", + [3]byte{0, 1, 41}: "DFI Inc.", + [3]byte{0, 1, 42}: "Telematica Sistems Inteligente", + [3]byte{0, 1, 43}: "TELENET Co., Ltd.", + [3]byte{0, 1, 44}: "Aravox Technologies, Inc.", + [3]byte{0, 1, 45}: "Komodo Technology", + [3]byte{0, 1, 46}: "PC Partner Ltd.", + [3]byte{0, 1, 47}: "Twinhead International Corp", + [3]byte{0, 1, 48}: "Extreme Networks", + [3]byte{0, 1, 49}: "Bosch Security Systems, Inc.", + [3]byte{0, 1, 50}: "Dranetz - BMI", + [3]byte{0, 1, 51}: "KYOWA Electronic Instruments C", + [3]byte{0, 1, 52}: "Selectron Systems AG", + [3]byte{0, 1, 53}: "KDC Corp.", + [3]byte{0, 1, 54}: "CyberTAN Technology, Inc.", + [3]byte{0, 1, 55}: "IT Farm Corporation", + [3]byte{0, 1, 56}: "XAVi Technologies Corp.", + [3]byte{0, 1, 57}: "Point Multimedia Systems", + [3]byte{0, 1, 58}: "SHELCAD COMMUNICATIONS, LTD.", + [3]byte{0, 1, 59}: "BNA SYSTEMS", + [3]byte{0, 1, 60}: "TIW SYSTEMS", + [3]byte{0, 1, 61}: "RiscStation Ltd.", + [3]byte{0, 1, 62}: "Ascom Tateco AB", + [3]byte{0, 1, 63}: "Neighbor World Co., Ltd.", + [3]byte{0, 1, 64}: "Sendtek Corporation", + [3]byte{0, 1, 65}: "CABLE PRINT", + [3]byte{0, 1, 66}: "CISCO SYSTEMS, INC.", + [3]byte{0, 1, 67}: "CISCO SYSTEMS, INC.", + [3]byte{0, 1, 68}: "EMC Corporation", + [3]byte{0, 1, 69}: "WINSYSTEMS, INC.", + [3]byte{0, 1, 70}: "Tesco Controls, Inc.", + [3]byte{0, 1, 71}: "Zhone Technologies", + [3]byte{0, 1, 72}: "X-traWeb Inc.", + [3]byte{0, 1, 73}: "T.D.T. Transfer Data Test GmbH", + [3]byte{0, 1, 74}: "Sony Corporation", + [3]byte{0, 1, 75}: "Ennovate Networks, Inc.", + [3]byte{0, 1, 76}: "Berkeley Process Control", + [3]byte{0, 1, 77}: "Shin Kin Enterprises Co., Ltd", + [3]byte{0, 1, 78}: "WIN Enterprises, Inc.", + [3]byte{0, 1, 79}: "ADTRAN INC", + [3]byte{0, 1, 80}: "GILAT COMMUNICATIONS, LTD.", + [3]byte{0, 1, 81}: "Ensemble Communications", + [3]byte{0, 1, 82}: "CHROMATEK INC.", + [3]byte{0, 1, 83}: "ARCHTEK TELECOM CORPORATION", + [3]byte{0, 1, 84}: "G3M Corporation", + [3]byte{0, 1, 85}: "Promise Technology, Inc.", + [3]byte{0, 1, 86}: "FIREWIREDIRECT.COM, INC.", + [3]byte{0, 1, 87}: "SYSWAVE CO., LTD", + [3]byte{0, 1, 88}: "Electro Industries/Gauge Tech", + [3]byte{0, 1, 89}: "S1 Corporation", + [3]byte{0, 1, 90}: "Digital Video Broadcasting", + [3]byte{0, 1, 91}: "ITALTEL S.p.A/RF-UP-I", + [3]byte{0, 1, 92}: "CADANT INC.", + [3]byte{0, 1, 93}: "Oracle Corporation", + [3]byte{0, 1, 94}: "BEST TECHNOLOGY CO., LTD.", + [3]byte{0, 1, 95}: "DIGITAL DESIGN GmbH", + [3]byte{0, 1, 96}: "ELMEX Co., LTD.", + [3]byte{0, 1, 97}: "Meta Machine Technology", + [3]byte{0, 1, 98}: "Cygnet Technologies, Inc.", + [3]byte{0, 1, 99}: "CISCO SYSTEMS, INC.", + [3]byte{0, 1, 100}: "CISCO SYSTEMS, INC.", + [3]byte{0, 1, 101}: "AirSwitch Corporation", + [3]byte{0, 1, 102}: "TC GROUP A/S", + [3]byte{0, 1, 103}: "HIOKI E.E. CORPORATION", + [3]byte{0, 1, 104}: "VITANA CORPORATION", + [3]byte{0, 1, 105}: "Celestix Networks Pte Ltd.", + [3]byte{0, 1, 106}: "ALITEC", + [3]byte{0, 1, 107}: "LightChip, Inc.", + [3]byte{0, 1, 108}: "FOXCONN", + [3]byte{0, 1, 109}: "CarrierComm Inc.", + [3]byte{0, 1, 110}: "Conklin Corporation", + [3]byte{0, 1, 111}: "Inkel Corp.", + [3]byte{0, 1, 112}: "ESE Embedded System Engineer'g", + [3]byte{0, 1, 113}: "Allied Data Technologies", + [3]byte{0, 1, 114}: "TechnoLand Co., LTD.", + [3]byte{0, 1, 115}: "AMCC", + [3]byte{0, 1, 116}: "CyberOptics Corporation", + [3]byte{0, 1, 117}: "Radiant Communications Corp.", + [3]byte{0, 1, 118}: "Orient Silver Enterprises", + [3]byte{0, 1, 119}: "EDSL", + [3]byte{0, 1, 120}: "MARGI Systems, Inc.", + [3]byte{0, 1, 121}: "WIRELESS TECHNOLOGY, INC.", + [3]byte{0, 1, 122}: "Chengdu Maipu Electric Industrial Co., Ltd.", + [3]byte{0, 1, 123}: "Heidelberger Druckmaschinen AG", + [3]byte{0, 1, 124}: "AG-E GmbH", + [3]byte{0, 1, 125}: "ThermoQuest", + [3]byte{0, 1, 126}: "ADTEK System Science Co., Ltd.", + [3]byte{0, 1, 127}: "Experience Music Project", + [3]byte{0, 1, 128}: "AOpen, Inc.", + [3]byte{0, 1, 129}: "Nortel Networks", + [3]byte{0, 1, 130}: "DICA TECHNOLOGIES AG", + [3]byte{0, 1, 131}: "ANITE TELECOMS", + [3]byte{0, 1, 132}: "SIEB & MEYER AG", + [3]byte{0, 1, 133}: "Hitachi Aloka Medical, Ltd.", + [3]byte{0, 1, 134}: "Uwe Disch", + [3]byte{0, 1, 135}: "I2SE GmbH", + [3]byte{0, 1, 136}: "LXCO Technologies ag", + [3]byte{0, 1, 137}: "Refraction Technology, Inc.", + [3]byte{0, 1, 138}: "ROI COMPUTER AG", + [3]byte{0, 1, 139}: "NetLinks Co., Ltd.", + [3]byte{0, 1, 140}: "Mega Vision", + [3]byte{0, 1, 141}: "AudeSi Technologies", + [3]byte{0, 1, 142}: "Logitec Corporation", + [3]byte{0, 1, 143}: "Kenetec, Inc.", + [3]byte{0, 1, 144}: "SMK-M", + [3]byte{0, 1, 145}: "SYRED Data Systems", + [3]byte{0, 1, 146}: "Texas Digital Systems", + [3]byte{0, 1, 147}: "Hanbyul Telecom Co., Ltd.", + [3]byte{0, 1, 148}: "Capital Equipment Corporation", + [3]byte{0, 1, 149}: "Sena Technologies, Inc.", + [3]byte{0, 1, 150}: "CISCO SYSTEMS, INC.", + [3]byte{0, 1, 151}: "CISCO SYSTEMS, INC.", + [3]byte{0, 1, 152}: "Darim Vision", + [3]byte{0, 1, 153}: "HeiSei Electronics", + [3]byte{0, 1, 154}: "LEUNIG GmbH", + [3]byte{0, 1, 155}: "Kyoto Microcomputer Co., Ltd.", + [3]byte{0, 1, 156}: "JDS Uniphase Inc.", + [3]byte{0, 1, 157}: "E-Control Systems, Inc.", + [3]byte{0, 1, 158}: "ESS Technology, Inc.", + [3]byte{0, 1, 159}: "ReadyNet", + [3]byte{0, 1, 160}: "Infinilink Corporation", + [3]byte{0, 1, 161}: "Mag-Tek, Inc.", + [3]byte{0, 1, 162}: "Logical Co., Ltd.", + [3]byte{0, 1, 163}: "GENESYS LOGIC, INC.", + [3]byte{0, 1, 164}: "Microlink Corporation", + [3]byte{0, 1, 165}: "Nextcomm, Inc.", + [3]byte{0, 1, 166}: "Scientific-Atlanta Arcodan A/S", + [3]byte{0, 1, 167}: "UNEX TECHNOLOGY CORPORATION", + [3]byte{0, 1, 168}: "Welltech Computer Co., Ltd.", + [3]byte{0, 1, 169}: "BMW AG", + [3]byte{0, 1, 170}: "Airspan Communications, Ltd.", + [3]byte{0, 1, 171}: "Main Street Networks", + [3]byte{0, 1, 172}: "Sitara Networks, Inc.", + [3]byte{0, 1, 173}: "Coach Master International d.b.a. CMI Worldwide, Inc.", + [3]byte{0, 1, 174}: "Trex Enterprises", + [3]byte{0, 1, 175}: "Artesyn Embedded Technologies", + [3]byte{0, 1, 176}: "Fulltek Technology Co., Ltd.", + [3]byte{0, 1, 177}: "General Bandwidth", + [3]byte{0, 1, 178}: "Digital Processing Systems, Inc.", + [3]byte{0, 1, 179}: "Precision Electronic Manufacturing", + [3]byte{0, 1, 180}: "Wayport, Inc.", + [3]byte{0, 1, 181}: "Turin Networks, Inc.", + [3]byte{0, 1, 182}: "SAEJIN T&M Co., Ltd.", + [3]byte{0, 1, 183}: "Centos, Inc.", + [3]byte{0, 1, 184}: "Netsensity, Inc.", + [3]byte{0, 1, 185}: "SKF Condition Monitoring", + [3]byte{0, 1, 186}: "IC-Net, Inc.", + [3]byte{0, 1, 187}: "Frequentis", + [3]byte{0, 1, 188}: "Brains Corporation", + [3]byte{0, 1, 189}: "Peterson Electro-Musical Products, Inc.", + [3]byte{0, 1, 190}: "Gigalink Co., Ltd.", + [3]byte{0, 1, 191}: "Teleforce Co., Ltd.", + [3]byte{0, 1, 192}: "CompuLab, Ltd.", + [3]byte{0, 1, 193}: "Vitesse Semiconductor Corporation", + [3]byte{0, 1, 194}: "ARK Research Corp.", + [3]byte{0, 1, 195}: "Acromag, Inc.", + [3]byte{0, 1, 196}: "NeoWave, Inc.", + [3]byte{0, 1, 197}: "Simpler Networks", + [3]byte{0, 1, 198}: "Quarry Technologies", + [3]byte{0, 1, 199}: "CISCO SYSTEMS, INC.", + [3]byte{0, 1, 200}: "THOMAS CONRAD CORP.", + [3]byte{0, 1, 200}: "CONRAD CORP.", + [3]byte{0, 1, 201}: "CISCO SYSTEMS, INC.", + [3]byte{0, 1, 202}: "Geocast Network Systems, Inc.", + [3]byte{0, 1, 203}: "EVR", + [3]byte{0, 1, 204}: "Japan Total Design Communication Co., Ltd.", + [3]byte{0, 1, 205}: "ARtem", + [3]byte{0, 1, 206}: "Custom Micro Products, Ltd.", + [3]byte{0, 1, 207}: "Alpha Data Parallel Systems, Ltd.", + [3]byte{0, 1, 208}: "VitalPoint, Inc.", + [3]byte{0, 1, 209}: "CoNet Communications, Inc.", + [3]byte{0, 1, 210}: "inXtron, Inc.", + [3]byte{0, 1, 211}: "PAXCOMM, Inc.", + [3]byte{0, 1, 212}: "Leisure Time, Inc.", + [3]byte{0, 1, 213}: "HAEDONG INFO & COMM CO., LTD", + [3]byte{0, 1, 214}: "manroland AG", + [3]byte{0, 1, 215}: "F5 Networks, Inc.", + [3]byte{0, 1, 216}: "Teltronics, Inc.", + [3]byte{0, 1, 217}: "Sigma, Inc.", + [3]byte{0, 1, 218}: "WINCOMM Corporation", + [3]byte{0, 1, 219}: "Freecom Technologies GmbH", + [3]byte{0, 1, 220}: "Activetelco", + [3]byte{0, 1, 221}: "Avail Networks", + [3]byte{0, 1, 222}: "Trango Systems, Inc.", + [3]byte{0, 1, 223}: "ISDN Communications, Ltd.", + [3]byte{0, 1, 224}: "Fast Systems, Inc.", + [3]byte{0, 1, 225}: "Kinpo Electronics, Inc.", + [3]byte{0, 1, 226}: "Ando Electric Corporation", + [3]byte{0, 1, 227}: "Siemens AG", + [3]byte{0, 1, 228}: "Sitera, Inc.", + [3]byte{0, 1, 229}: "Supernet, Inc.", + [3]byte{0, 1, 230}: "Hewlett-Packard Company", + [3]byte{0, 1, 231}: "Hewlett-Packard Company", + [3]byte{0, 1, 232}: "Force10 Networks, Inc.", + [3]byte{0, 1, 233}: "Litton Marine Systems B.V.", + [3]byte{0, 1, 234}: "Cirilium Corp.", + [3]byte{0, 1, 235}: "C-COM Corporation", + [3]byte{0, 1, 236}: "Ericsson Group", + [3]byte{0, 1, 237}: "SETA Corp.", + [3]byte{0, 1, 238}: "Comtrol Europe, Ltd.", + [3]byte{0, 1, 239}: "Camtel Technology Corp.", + [3]byte{0, 1, 240}: "Tridium, Inc.", + [3]byte{0, 1, 241}: "Innovative Concepts, Inc.", + [3]byte{0, 1, 242}: "Mark of the Unicorn, Inc.", + [3]byte{0, 1, 243}: "QPS, Inc.", + [3]byte{0, 1, 244}: "Enterasys Networks", + [3]byte{0, 1, 245}: "ERIM S.A.", + [3]byte{0, 1, 246}: "Association of Musical Electronics Industry", + [3]byte{0, 1, 247}: "Image Display Systems, Inc.", + [3]byte{0, 1, 248}: "Texio Technology Corporation", + [3]byte{0, 1, 249}: "TeraGlobal Communications Corp.", + [3]byte{0, 1, 250}: "HOROSCAS", + [3]byte{0, 1, 251}: "DoTop Technology, Inc.", + [3]byte{0, 1, 252}: "Keyence Corporation", + [3]byte{0, 1, 253}: "Digital Voice Systems, Inc.", + [3]byte{0, 1, 254}: "DIGITAL EQUIPMENT CORPORATION", + [3]byte{0, 1, 255}: "Data Direct Networks, Inc.", + [3]byte{0, 2, 0}: "Net & Sys Co., Ltd.", + [3]byte{0, 2, 1}: "IFM Electronic gmbh", + [3]byte{0, 2, 2}: "Amino Communications, Ltd.", + [3]byte{0, 2, 3}: "Woonsang Telecom, Inc.", + [3]byte{0, 2, 4}: "Bodmann Industries Elektronik GmbH", + [3]byte{0, 2, 5}: "Hitachi Denshi, Ltd.", + [3]byte{0, 2, 6}: "Telital R&D Denmark A/S", + [3]byte{0, 2, 7}: "VisionGlobal Network Corp.", + [3]byte{0, 2, 8}: "Unify Networks, Inc.", + [3]byte{0, 2, 9}: "Shenzhen SED Information Technology Co., Ltd.", + [3]byte{0, 2, 10}: "Gefran Spa", + [3]byte{0, 2, 11}: "Native Networks, Inc.", + [3]byte{0, 2, 12}: "Metro-Optix", + [3]byte{0, 2, 13}: "Micronpc.com", + [3]byte{0, 2, 14}: "ECI Telecom, Ltd", + [3]byte{0, 2, 15}: "AATR", + [3]byte{0, 2, 16}: "Fenecom", + [3]byte{0, 2, 17}: "Nature Worldwide Technology Corp.", + [3]byte{0, 2, 18}: "SierraCom", + [3]byte{0, 2, 19}: "S.D.E.L.", + [3]byte{0, 2, 20}: "DTVRO", + [3]byte{0, 2, 21}: "Cotas Computer Technology A/B", + [3]byte{0, 2, 22}: "CISCO SYSTEMS, INC.", + [3]byte{0, 2, 23}: "CISCO SYSTEMS, INC.", + [3]byte{0, 2, 24}: "Advanced Scientific Corp", + [3]byte{0, 2, 25}: "Paralon Technologies", + [3]byte{0, 2, 26}: "Zuma Networks", + [3]byte{0, 2, 27}: "Kollmorgen-Servotronix", + [3]byte{0, 2, 28}: "Network Elements, Inc.", + [3]byte{0, 2, 29}: "Data General Communication Ltd.", + [3]byte{0, 2, 30}: "SIMTEL S.R.L.", + [3]byte{0, 2, 31}: "Aculab PLC", + [3]byte{0, 2, 32}: "CANON FINETECH INC.", + [3]byte{0, 2, 33}: "DSP Application, Ltd.", + [3]byte{0, 2, 34}: "Chromisys, Inc.", + [3]byte{0, 2, 35}: "ClickTV", + [3]byte{0, 2, 36}: "C-COR", + [3]byte{0, 2, 37}: "One Stop Systems", + [3]byte{0, 2, 38}: "XESystems, Inc.", + [3]byte{0, 2, 39}: "ESD Electronic System Design GmbH", + [3]byte{0, 2, 40}: "Necsom, Ltd.", + [3]byte{0, 2, 41}: "Adtec Corporation", + [3]byte{0, 2, 42}: "Asound Electronic", + [3]byte{0, 2, 43}: "SAXA, Inc.", + [3]byte{0, 2, 44}: "ABB Bomem, Inc.", + [3]byte{0, 2, 45}: "Agere Systems", + [3]byte{0, 2, 46}: "TEAC Corp. R& D", + [3]byte{0, 2, 47}: "P-Cube, Ltd.", + [3]byte{0, 2, 48}: "Intersoft Electronics", + [3]byte{0, 2, 49}: "Ingersoll-Rand", + [3]byte{0, 2, 50}: "Avision, Inc.", + [3]byte{0, 2, 51}: "Mantra Communications, Inc.", + [3]byte{0, 2, 52}: "Imperial Technology, Inc.", + [3]byte{0, 2, 53}: "Paragon Networks International", + [3]byte{0, 2, 54}: "INIT GmbH", + [3]byte{0, 2, 55}: "Cosmo Research Corp.", + [3]byte{0, 2, 56}: "Serome Technology, Inc.", + [3]byte{0, 2, 57}: "Visicom", + [3]byte{0, 2, 58}: "ZSK Stickmaschinen GmbH", + [3]byte{0, 2, 59}: "Ericsson", + [3]byte{0, 2, 60}: "Creative Technology, Ltd.", + [3]byte{0, 2, 61}: "Cisco Systems, Inc.", + [3]byte{0, 2, 62}: "Selta Telematica S.p.a", + [3]byte{0, 2, 63}: "Compal Electronics, Inc.", + [3]byte{0, 2, 64}: "Seedek Co., Ltd.", + [3]byte{0, 2, 65}: "Amer.com", + [3]byte{0, 2, 66}: "Videoframe Systems", + [3]byte{0, 2, 67}: "Raysis Co., Ltd.", + [3]byte{0, 2, 68}: "SURECOM Technology Co.", + [3]byte{0, 2, 69}: "Lampus Co, Ltd.", + [3]byte{0, 2, 70}: "All-Win Tech Co., Ltd.", + [3]byte{0, 2, 71}: "Great Dragon Information Technology (Group) Co., Ltd.", + [3]byte{0, 2, 72}: "Pilz GmbH & Co.", + [3]byte{0, 2, 73}: "Aviv Infocom Co, Ltd.", + [3]byte{0, 2, 74}: "CISCO SYSTEMS, INC.", + [3]byte{0, 2, 75}: "CISCO SYSTEMS, INC.", + [3]byte{0, 2, 76}: "SiByte, Inc.", + [3]byte{0, 2, 77}: "Mannesman Dematic Colby Pty. Ltd.", + [3]byte{0, 2, 78}: "Datacard Group", + [3]byte{0, 2, 79}: "IPM Datacom S.R.L.", + [3]byte{0, 2, 80}: "Geyser Networks, Inc.", + [3]byte{0, 2, 81}: "Soma Networks, Inc.", + [3]byte{0, 2, 82}: "Carrier Corporation", + [3]byte{0, 2, 83}: "Televideo, Inc.", + [3]byte{0, 2, 84}: "WorldGate", + [3]byte{0, 2, 85}: "IBM Corp", + [3]byte{0, 2, 86}: "Alpha Processor, Inc.", + [3]byte{0, 2, 87}: "Microcom Corp.", + [3]byte{0, 2, 88}: "Flying Packets Communications", + [3]byte{0, 2, 89}: "Tsann Kuen China (Shanghai)Enterprise Co., Ltd. IT Group", + [3]byte{0, 2, 90}: "Catena Networks", + [3]byte{0, 2, 91}: "Cambridge Silicon Radio", + [3]byte{0, 2, 92}: "SCI Systems (Kunshan) Co., Ltd.", + [3]byte{0, 2, 93}: "Calix Networks", + [3]byte{0, 2, 94}: "High Technology Ltd", + [3]byte{0, 2, 95}: "Nortel Networks", + [3]byte{0, 2, 96}: "Accordion Networks, Inc.", + [3]byte{0, 2, 97}: "Tilgin AB", + [3]byte{0, 2, 98}: "Soyo Group Soyo Com Tech Co., Ltd", + [3]byte{0, 2, 99}: "UPS Manufacturing SRL", + [3]byte{0, 2, 100}: "AudioRamp.com", + [3]byte{0, 2, 101}: "Virditech Co. Ltd.", + [3]byte{0, 2, 102}: "Thermalogic Corporation", + [3]byte{0, 2, 103}: "NODE RUNNER, INC.", + [3]byte{0, 2, 104}: "Harris Government Communications", + [3]byte{0, 2, 105}: "Nadatel Co., Ltd", + [3]byte{0, 2, 106}: "Cocess Telecom Co., Ltd.", + [3]byte{0, 2, 107}: "BCM Computers Co., Ltd.", + [3]byte{0, 2, 108}: "Philips CFT", + [3]byte{0, 2, 109}: "Adept Telecom", + [3]byte{0, 2, 110}: "NeGeN Access, Inc.", + [3]byte{0, 2, 111}: "Senao International Co., Ltd.", + [3]byte{0, 2, 112}: "Crewave Co., Ltd.", + [3]byte{0, 2, 113}: "Zhone Technologies", + [3]byte{0, 2, 114}: "CC&C Technologies, Inc.", + [3]byte{0, 2, 115}: "Coriolis Networks", + [3]byte{0, 2, 116}: "Tommy Technologies Corp.", + [3]byte{0, 2, 117}: "SMART Technologies, Inc.", + [3]byte{0, 2, 118}: "Primax Electronics Ltd.", + [3]byte{0, 2, 119}: "Cash Systemes Industrie", + [3]byte{0, 2, 120}: "Samsung Electro-Mechanics Co., Ltd.", + [3]byte{0, 2, 121}: "Control Applications, Ltd.", + [3]byte{0, 2, 122}: "IOI Technology Corporation", + [3]byte{0, 2, 123}: "Amplify Net, Inc.", + [3]byte{0, 2, 124}: "Trilithic, Inc.", + [3]byte{0, 2, 125}: "CISCO SYSTEMS, INC.", + [3]byte{0, 2, 126}: "CISCO SYSTEMS, INC.", + [3]byte{0, 2, 127}: "ask-technologies.com", + [3]byte{0, 2, 128}: "Mu Net, Inc.", + [3]byte{0, 2, 129}: "Madge Ltd.", + [3]byte{0, 2, 130}: "ViaClix, Inc.", + [3]byte{0, 2, 131}: "Spectrum Controls, Inc.", + [3]byte{0, 2, 132}: "AREVA T&D", + [3]byte{0, 2, 133}: "Riverstone Networks", + [3]byte{0, 2, 134}: "Occam Networks", + [3]byte{0, 2, 135}: "Adapcom", + [3]byte{0, 2, 136}: "GLOBAL VILLAGE COMMUNICATION", + [3]byte{0, 2, 137}: "DNE Technologies", + [3]byte{0, 2, 138}: "Ambit Microsystems Corporation", + [3]byte{0, 2, 139}: "VDSL Systems OY", + [3]byte{0, 2, 140}: "Micrel-Synergy Semiconductor", + [3]byte{0, 2, 141}: "Movita Technologies, Inc.", + [3]byte{0, 2, 142}: "Rapid 5 Networks, Inc.", + [3]byte{0, 2, 143}: "Globetek, Inc.", + [3]byte{0, 2, 144}: "Woorigisool, Inc.", + [3]byte{0, 2, 145}: "Open Network Co., Ltd.", + [3]byte{0, 2, 146}: "Logic Innovations, Inc.", + [3]byte{0, 2, 147}: "Solid Data Systems", + [3]byte{0, 2, 148}: "Tokyo Sokushin Co., Ltd.", + [3]byte{0, 2, 149}: "IP.Access Limited", + [3]byte{0, 2, 150}: "Lectron Co,. Ltd.", + [3]byte{0, 2, 151}: "C-COR.net", + [3]byte{0, 2, 152}: "Broadframe Corporation", + [3]byte{0, 2, 153}: "Apex, Inc.", + [3]byte{0, 2, 154}: "Storage Apps", + [3]byte{0, 2, 155}: "Kreatel Communications AB", + [3]byte{0, 2, 156}: "3COM", + [3]byte{0, 2, 157}: "Merix Corp.", + [3]byte{0, 2, 158}: "Information Equipment Co., Ltd.", + [3]byte{0, 2, 159}: "L-3 Communication Aviation Recorders", + [3]byte{0, 2, 160}: "Flatstack Ltd.", + [3]byte{0, 2, 161}: "World Wide Packets", + [3]byte{0, 2, 162}: "Hilscher GmbH", + [3]byte{0, 2, 163}: "ABB Switzerland Ltd, Power Systems", + [3]byte{0, 2, 164}: "AddPac Technology Co., Ltd.", + [3]byte{0, 2, 165}: "Hewlett-Packard Company", + [3]byte{0, 2, 166}: "Effinet Systems Co., Ltd.", + [3]byte{0, 2, 167}: "Vivace Networks", + [3]byte{0, 2, 168}: "Air Link Technology", + [3]byte{0, 2, 169}: "RACOM, s.r.o.", + [3]byte{0, 2, 170}: "PLcom Co., Ltd.", + [3]byte{0, 2, 171}: "CTC Union Technologies Co., Ltd.", + [3]byte{0, 2, 172}: "3PAR data", + [3]byte{0, 2, 173}: "HOYA Corporation", + [3]byte{0, 2, 174}: "Scannex Electronics Ltd.", + [3]byte{0, 2, 175}: "TeleCruz Technology, Inc.", + [3]byte{0, 2, 176}: "Hokubu Communication & Industrial Co., Ltd.", + [3]byte{0, 2, 177}: "Anritsu, Ltd.", + [3]byte{0, 2, 178}: "Cablevision", + [3]byte{0, 2, 179}: "Intel Corporation", + [3]byte{0, 2, 180}: "DAPHNE", + [3]byte{0, 2, 181}: "Avnet, Inc.", + [3]byte{0, 2, 182}: "Acrosser Technology Co., Ltd.", + [3]byte{0, 2, 183}: "Watanabe Electric Industry Co., Ltd.", + [3]byte{0, 2, 184}: "WHI KONSULT AB", + [3]byte{0, 2, 185}: "CISCO SYSTEMS, INC.", + [3]byte{0, 2, 186}: "CISCO SYSTEMS, INC.", + [3]byte{0, 2, 187}: "Continuous Computing Corp", + [3]byte{0, 2, 188}: "LVL 7 Systems, Inc.", + [3]byte{0, 2, 189}: "Bionet Co., Ltd.", + [3]byte{0, 2, 190}: "Totsu Engineering, Inc.", + [3]byte{0, 2, 191}: "dotRocket, Inc.", + [3]byte{0, 2, 192}: "Bencent Tzeng Industry Co., Ltd.", + [3]byte{0, 2, 193}: "Innovative Electronic Designs, Inc.", + [3]byte{0, 2, 194}: "Net Vision Telecom", + [3]byte{0, 2, 195}: "Arelnet Ltd.", + [3]byte{0, 2, 196}: "Vector International BVBA", + [3]byte{0, 2, 197}: "Evertz Microsystems Ltd.", + [3]byte{0, 2, 198}: "Data Track Technology PLC", + [3]byte{0, 2, 199}: "ALPS ELECTRIC Co., Ltd.", + [3]byte{0, 2, 200}: "Technocom Communications Technology (pte) Ltd", + [3]byte{0, 2, 201}: "Mellanox Technologies", + [3]byte{0, 2, 202}: "EndPoints, Inc.", + [3]byte{0, 2, 203}: "TriState Ltd.", + [3]byte{0, 2, 204}: "M.C.C.I", + [3]byte{0, 2, 205}: "TeleDream, Inc.", + [3]byte{0, 2, 206}: "FoxJet, Inc.", + [3]byte{0, 2, 207}: "ZyGate Communications, Inc.", + [3]byte{0, 2, 208}: "Comdial Corporation", + [3]byte{0, 2, 209}: "Vivotek, Inc.", + [3]byte{0, 2, 210}: "Workstation AG", + [3]byte{0, 2, 211}: "NetBotz, Inc.", + [3]byte{0, 2, 212}: "PDA Peripherals, Inc.", + [3]byte{0, 2, 213}: "ACR", + [3]byte{0, 2, 214}: "NICE Systems", + [3]byte{0, 2, 215}: "EMPEG Ltd", + [3]byte{0, 2, 216}: "BRECIS Communications Corporation", + [3]byte{0, 2, 217}: "Reliable Controls", + [3]byte{0, 2, 218}: "ExiO Communications, Inc.", + [3]byte{0, 2, 219}: "NETSEC", + [3]byte{0, 2, 220}: "Fujitsu General Limited", + [3]byte{0, 2, 221}: "Bromax Communications, Ltd.", + [3]byte{0, 2, 222}: "Astrodesign, Inc.", + [3]byte{0, 2, 223}: "Net Com Systems, Inc.", + [3]byte{0, 2, 224}: "ETAS GmbH", + [3]byte{0, 2, 225}: "Integrated Network Corporation", + [3]byte{0, 2, 226}: "NDC Infared Engineering", + [3]byte{0, 2, 227}: "LITE-ON Communications, Inc.", + [3]byte{0, 2, 228}: "JC HYUN Systems, Inc.", + [3]byte{0, 2, 229}: "Timeware Ltd.", + [3]byte{0, 2, 230}: "Gould Instrument Systems, Inc.", + [3]byte{0, 2, 231}: "CAB GmbH & Co KG", + [3]byte{0, 2, 232}: "E.D.&A.", + [3]byte{0, 2, 233}: "CS Systemes De Securite - C3S", + [3]byte{0, 2, 234}: "Focus Enhancements", + [3]byte{0, 2, 235}: "Pico Communications", + [3]byte{0, 2, 236}: "Maschoff Design Engineering", + [3]byte{0, 2, 237}: "DXO Telecom Co., Ltd.", + [3]byte{0, 2, 238}: "Nokia Danmark A/S", + [3]byte{0, 2, 239}: "CCC Network Systems Group Ltd.", + [3]byte{0, 2, 240}: "AME Optimedia Technology Co., Ltd.", + [3]byte{0, 2, 241}: "Pinetron Co., Ltd.", + [3]byte{0, 2, 242}: "eDevice, Inc.", + [3]byte{0, 2, 243}: "Media Serve Co., Ltd.", + [3]byte{0, 2, 244}: "PCTEL, Inc.", + [3]byte{0, 2, 245}: "VIVE Synergies, Inc.", + [3]byte{0, 2, 246}: "Equipe Communications", + [3]byte{0, 2, 247}: "ARM", + [3]byte{0, 2, 248}: "SEAKR Engineering, Inc.", + [3]byte{0, 2, 249}: "MIMOS Berhad", + [3]byte{0, 2, 250}: "DX Antenna Co., Ltd.", + [3]byte{0, 2, 251}: "Baumuller Aulugen-Systemtechnik GmbH", + [3]byte{0, 2, 252}: "CISCO SYSTEMS, INC.", + [3]byte{0, 2, 253}: "CISCO SYSTEMS, INC.", + [3]byte{0, 2, 254}: "Viditec, Inc.", + [3]byte{0, 2, 255}: "Handan BroadInfoCom", + [3]byte{0, 3, 0}: "Barracuda Networks, Inc.", + [3]byte{0, 3, 1}: "EXFO", + [3]byte{0, 3, 2}: "Charles Industries, Ltd.", + [3]byte{0, 3, 3}: "JAMA Electronics Co., Ltd.", + [3]byte{0, 3, 4}: "Pacific Broadband Communications", + [3]byte{0, 3, 5}: "MSC Vertriebs GmbH", + [3]byte{0, 3, 6}: "Fusion In Tech Co., Ltd.", + [3]byte{0, 3, 7}: "Secure Works, Inc.", + [3]byte{0, 3, 8}: "AM Communications, Inc.", + [3]byte{0, 3, 9}: "Texcel Technology PLC", + [3]byte{0, 3, 10}: "Argus Technologies", + [3]byte{0, 3, 11}: "Hunter Technology, Inc.", + [3]byte{0, 3, 12}: "Telesoft Technologies Ltd.", + [3]byte{0, 3, 13}: "Uniwill Computer Corp.", + [3]byte{0, 3, 14}: "Core Communications Co., Ltd.", + [3]byte{0, 3, 15}: "Digital China (Shanghai) Networks Ltd.", + [3]byte{0, 3, 16}: "E-Globaledge Corporation", + [3]byte{0, 3, 17}: "Micro Technology Co., Ltd.", + [3]byte{0, 3, 18}: "TR-Systemtechnik GmbH", + [3]byte{0, 3, 19}: "Access Media SPA", + [3]byte{0, 3, 20}: "Teleware Network Systems", + [3]byte{0, 3, 21}: "Cidco Incorporated", + [3]byte{0, 3, 22}: "Nobell Communications, Inc.", + [3]byte{0, 3, 23}: "Merlin Systems, Inc.", + [3]byte{0, 3, 24}: "Cyras Systems, Inc.", + [3]byte{0, 3, 25}: "Infineon AG", + [3]byte{0, 3, 26}: "Beijing Broad Telecom Ltd., China", + [3]byte{0, 3, 27}: "Cellvision Systems, Inc.", + [3]byte{0, 3, 28}: "Svenska Hardvarufabriken AB", + [3]byte{0, 3, 29}: "Taiwan Commate Computer, Inc.", + [3]byte{0, 3, 30}: "Optranet, Inc.", + [3]byte{0, 3, 31}: "Condev Ltd.", + [3]byte{0, 3, 32}: "Xpeed, Inc.", + [3]byte{0, 3, 33}: "Reco Research Co., Ltd.", + [3]byte{0, 3, 34}: "IDIS Co., Ltd.", + [3]byte{0, 3, 35}: "Cornet Technology, Inc.", + [3]byte{0, 3, 36}: "SANYO Consumer Electronics Co., Ltd.", + [3]byte{0, 3, 37}: "Arima Computer Corp.", + [3]byte{0, 3, 38}: "Iwasaki Information Systems Co., Ltd.", + [3]byte{0, 3, 39}: "ACT'L", + [3]byte{0, 3, 40}: "Mace Group, Inc.", + [3]byte{0, 3, 41}: "F3, Inc.", + [3]byte{0, 3, 42}: "UniData Communication Systems, Inc.", + [3]byte{0, 3, 43}: "GAI Datenfunksysteme GmbH", + [3]byte{0, 3, 44}: "ABB Switzerland Ltd", + [3]byte{0, 3, 45}: "IBASE Technology, Inc.", + [3]byte{0, 3, 46}: "Scope Information Management, Ltd.", + [3]byte{0, 3, 47}: "Global Sun Technology, Inc.", + [3]byte{0, 3, 48}: "Imagenics, Co., Ltd.", + [3]byte{0, 3, 49}: "CISCO SYSTEMS, INC.", + [3]byte{0, 3, 50}: "CISCO SYSTEMS, INC.", + [3]byte{0, 3, 51}: "Digitel Co., Ltd.", + [3]byte{0, 3, 52}: "Newport Electronics", + [3]byte{0, 3, 53}: "Mirae Technology", + [3]byte{0, 3, 54}: "Zetes Technologies", + [3]byte{0, 3, 55}: "Vaone, Inc.", + [3]byte{0, 3, 56}: "Oak Technology", + [3]byte{0, 3, 57}: "Eurologic Systems, Ltd.", + [3]byte{0, 3, 58}: "Silicon Wave, Inc.", + [3]byte{0, 3, 59}: "TAMI Tech Co., Ltd.", + [3]byte{0, 3, 60}: "Daiden Co., Ltd.", + [3]byte{0, 3, 61}: "ILSHin Lab", + [3]byte{0, 3, 62}: "Tateyama System Laboratory Co., Ltd.", + [3]byte{0, 3, 63}: "BigBand Networks, Ltd.", + [3]byte{0, 3, 64}: "Floware Wireless Systems, Ltd.", + [3]byte{0, 3, 65}: "Axon Digital Design", + [3]byte{0, 3, 66}: "Nortel Networks", + [3]byte{0, 3, 67}: "Martin Professional A/S", + [3]byte{0, 3, 68}: "Tietech.Co., Ltd.", + [3]byte{0, 3, 69}: "Routrek Networks Corporation", + [3]byte{0, 3, 70}: "Hitachi Kokusai Electric, Inc.", + [3]byte{0, 3, 71}: "Intel Corporation", + [3]byte{0, 3, 72}: "Norscan Instruments, Ltd.", + [3]byte{0, 3, 73}: "Vidicode Datacommunicatie B.V.", + [3]byte{0, 3, 74}: "RIAS Corporation", + [3]byte{0, 3, 75}: "Nortel Networks", + [3]byte{0, 3, 76}: "Shanghai DigiVision Technology Co., Ltd.", + [3]byte{0, 3, 77}: "Chiaro Networks, Ltd.", + [3]byte{0, 3, 78}: "Pos Data Company, Ltd.", + [3]byte{0, 3, 79}: "Sur-Gard Security", + [3]byte{0, 3, 80}: "BTICINO SPA", + [3]byte{0, 3, 81}: "Diebold, Inc.", + [3]byte{0, 3, 82}: "Colubris Networks", + [3]byte{0, 3, 83}: "Mitac, Inc.", + [3]byte{0, 3, 84}: "Fiber Logic Communications", + [3]byte{0, 3, 85}: "TeraBeam Internet Systems", + [3]byte{0, 3, 86}: "Wincor Nixdorf International GmbH", + [3]byte{0, 3, 87}: "Intervoice-Brite, Inc.", + [3]byte{0, 3, 88}: "Hanyang Digitech Co., Ltd.", + [3]byte{0, 3, 89}: "DigitalSis", + [3]byte{0, 3, 90}: "Photron Limited", + [3]byte{0, 3, 91}: "BridgeWave Communications", + [3]byte{0, 3, 92}: "Saint Song Corp.", + [3]byte{0, 3, 93}: "Bosung Hi-Net Co., Ltd.", + [3]byte{0, 3, 94}: "Metropolitan Area Networks, Inc.", + [3]byte{0, 3, 95}: "Prüftechnik Condition Monitoring GmbH & Co. KG", + [3]byte{0, 3, 96}: "PAC Interactive Technology, Inc.", + [3]byte{0, 3, 97}: "Widcomm, Inc.", + [3]byte{0, 3, 98}: "Vodtel Communications, Inc.", + [3]byte{0, 3, 99}: "Miraesys Co., Ltd.", + [3]byte{0, 3, 100}: "Scenix Semiconductor, Inc.", + [3]byte{0, 3, 101}: "Kira Information & Communications, Ltd.", + [3]byte{0, 3, 102}: "ASM Pacific Technology", + [3]byte{0, 3, 103}: "Jasmine Networks, Inc.", + [3]byte{0, 3, 104}: "Embedone Co., Ltd.", + [3]byte{0, 3, 105}: "Nippon Antenna Co., Ltd.", + [3]byte{0, 3, 106}: "Mainnet, Ltd.", + [3]byte{0, 3, 107}: "CISCO SYSTEMS, INC.", + [3]byte{0, 3, 108}: "CISCO SYSTEMS, INC.", + [3]byte{0, 3, 109}: "Runtop, Inc.", + [3]byte{0, 3, 110}: "Nicon Systems (Pty) Limited", + [3]byte{0, 3, 111}: "Telsey SPA", + [3]byte{0, 3, 112}: "NXTV, Inc.", + [3]byte{0, 3, 113}: "Acomz Networks Corp.", + [3]byte{0, 3, 114}: "ULAN", + [3]byte{0, 3, 115}: "Aselsan A.S", + [3]byte{0, 3, 116}: "Control Microsystems", + [3]byte{0, 3, 117}: "NetMedia, Inc.", + [3]byte{0, 3, 118}: "Graphtec Technology, Inc.", + [3]byte{0, 3, 119}: "Gigabit Wireless", + [3]byte{0, 3, 120}: "HUMAX Co., Ltd.", + [3]byte{0, 3, 121}: "Proscend Communications, Inc.", + [3]byte{0, 3, 122}: "Taiyo Yuden Co., Ltd.", + [3]byte{0, 3, 123}: "IDEC IZUMI Corporation", + [3]byte{0, 3, 124}: "Coax Media", + [3]byte{0, 3, 125}: "Stellcom", + [3]byte{0, 3, 126}: "PORTech Communications, Inc.", + [3]byte{0, 3, 127}: "Atheros Communications, Inc.", + [3]byte{0, 3, 128}: "SSH Communications Security Corp.", + [3]byte{0, 3, 129}: "Ingenico International", + [3]byte{0, 3, 130}: "A-One Co., Ltd.", + [3]byte{0, 3, 131}: "Metera Networks, Inc.", + [3]byte{0, 3, 132}: "AETA", + [3]byte{0, 3, 133}: "Actelis Networks, Inc.", + [3]byte{0, 3, 134}: "Ho Net, Inc.", + [3]byte{0, 3, 135}: "Blaze Network Products", + [3]byte{0, 3, 136}: "Fastfame Technology Co., Ltd.", + [3]byte{0, 3, 137}: "Plantronics", + [3]byte{0, 3, 138}: "America Online, Inc.", + [3]byte{0, 3, 139}: "PLUS-ONE I&T, Inc.", + [3]byte{0, 3, 140}: "Total Impact", + [3]byte{0, 3, 141}: "PCS Revenue Control Systems, Inc.", + [3]byte{0, 3, 142}: "Atoga Systems, Inc.", + [3]byte{0, 3, 143}: "Weinschel Corporation", + [3]byte{0, 3, 144}: "Digital Video Communications, Inc.", + [3]byte{0, 3, 145}: "Advanced Digital Broadcast, Ltd.", + [3]byte{0, 3, 146}: "Hyundai Teletek Co., Ltd.", + [3]byte{0, 3, 147}: "Apple", + [3]byte{0, 3, 148}: "Connect One", + [3]byte{0, 3, 149}: "California Amplifier", + [3]byte{0, 3, 150}: "EZ Cast Co., Ltd.", + [3]byte{0, 3, 151}: "Watchfront Limited", + [3]byte{0, 3, 152}: "WISI", + [3]byte{0, 3, 153}: "Dongju Informations & Communications Co., Ltd.", + [3]byte{0, 3, 154}: "SiConnect", + [3]byte{0, 3, 155}: "NetChip Technology, Inc.", + [3]byte{0, 3, 156}: "OptiMight Communications, Inc.", + [3]byte{0, 3, 157}: "Qisda Corporation", + [3]byte{0, 3, 158}: "Tera System Co., Ltd.", + [3]byte{0, 3, 159}: "CISCO SYSTEMS, INC.", + [3]byte{0, 3, 160}: "CISCO SYSTEMS, INC.", + [3]byte{0, 3, 161}: "HIPER Information & Communication, Inc.", + [3]byte{0, 3, 162}: "Catapult Communications", + [3]byte{0, 3, 163}: "MAVIX, Ltd.", + [3]byte{0, 3, 164}: "Imation Corp.", + [3]byte{0, 3, 165}: "Medea Corporation", + [3]byte{0, 3, 166}: "Traxit Technology, Inc.", + [3]byte{0, 3, 167}: "Unixtar Technology, Inc.", + [3]byte{0, 3, 168}: "IDOT Computers, Inc.", + [3]byte{0, 3, 169}: "AXCENT Media AG", + [3]byte{0, 3, 170}: "Watlow", + [3]byte{0, 3, 171}: "Bridge Information Systems", + [3]byte{0, 3, 172}: "Fronius Schweissmaschinen", + [3]byte{0, 3, 173}: "Emerson Energy Systems AB", + [3]byte{0, 3, 174}: "Allied Advanced Manufacturing Pte, Ltd.", + [3]byte{0, 3, 175}: "Paragea Communications", + [3]byte{0, 3, 176}: "Xsense Technology Corp.", + [3]byte{0, 3, 177}: "Hospira Inc.", + [3]byte{0, 3, 178}: "Radware", + [3]byte{0, 3, 179}: "IA Link Systems Co., Ltd.", + [3]byte{0, 3, 180}: "Macrotek International Corp.", + [3]byte{0, 3, 181}: "Entra Technology Co.", + [3]byte{0, 3, 182}: "QSI Corporation", + [3]byte{0, 3, 183}: "ZACCESS Systems", + [3]byte{0, 3, 184}: "NetKit Solutions, LLC", + [3]byte{0, 3, 185}: "Hualong Telecom Co., Ltd.", + [3]byte{0, 3, 186}: "Oracle Corporation", + [3]byte{0, 3, 187}: "Signal Communications Limited", + [3]byte{0, 3, 188}: "COT GmbH", + [3]byte{0, 3, 189}: "OmniCluster Technologies, Inc.", + [3]byte{0, 3, 190}: "Netility", + [3]byte{0, 3, 191}: "Centerpoint Broadband Technologies, Inc.", + [3]byte{0, 3, 192}: "RFTNC Co., Ltd.", + [3]byte{0, 3, 193}: "Packet Dynamics Ltd", + [3]byte{0, 3, 194}: "Solphone K.K.", + [3]byte{0, 3, 195}: "Micronik Multimedia", + [3]byte{0, 3, 196}: "Tomra Systems ASA", + [3]byte{0, 3, 197}: "Mobotix AG", + [3]byte{0, 3, 198}: "ICUE Systems, Inc.", + [3]byte{0, 3, 199}: "hopf Elektronik GmbH", + [3]byte{0, 3, 200}: "CML Emergency Services", + [3]byte{0, 3, 201}: "TECOM Co., Ltd.", + [3]byte{0, 3, 202}: "MTS Systems Corp.", + [3]byte{0, 3, 203}: "Nippon Systems Development Co., Ltd.", + [3]byte{0, 3, 204}: "Momentum Computer, Inc.", + [3]byte{0, 3, 205}: "Clovertech, Inc.", + [3]byte{0, 3, 206}: "ETEN Technologies, Inc.", + [3]byte{0, 3, 207}: "Muxcom, Inc.", + [3]byte{0, 3, 208}: "KOANKEISO Co., Ltd.", + [3]byte{0, 3, 209}: "Takaya Corporation", + [3]byte{0, 3, 210}: "Crossbeam Systems, Inc.", + [3]byte{0, 3, 211}: "Internet Energy Systems, Inc.", + [3]byte{0, 3, 212}: "Alloptic, Inc.", + [3]byte{0, 3, 213}: "Advanced Communications Co., Ltd.", + [3]byte{0, 3, 214}: "RADVision, Ltd.", + [3]byte{0, 3, 215}: "NextNet Wireless, Inc.", + [3]byte{0, 3, 216}: "iMPath Networks, Inc.", + [3]byte{0, 3, 217}: "Secheron SA", + [3]byte{0, 3, 218}: "Takamisawa Cybernetics Co., Ltd.", + [3]byte{0, 3, 219}: "Apogee Electronics Corp.", + [3]byte{0, 3, 220}: "Lexar Media, Inc.", + [3]byte{0, 3, 221}: "Comark Corp.", + [3]byte{0, 3, 222}: "OTC Wireless", + [3]byte{0, 3, 223}: "Desana Systems", + [3]byte{0, 3, 224}: "ARRIS Group, Inc.", + [3]byte{0, 3, 225}: "Winmate Communication, Inc.", + [3]byte{0, 3, 226}: "Comspace Corporation", + [3]byte{0, 3, 227}: "CISCO SYSTEMS, INC.", + [3]byte{0, 3, 228}: "CISCO SYSTEMS, INC.", + [3]byte{0, 3, 229}: "Hermstedt SG", + [3]byte{0, 3, 230}: "Entone, Inc.", + [3]byte{0, 3, 231}: "Logostek Co. Ltd.", + [3]byte{0, 3, 232}: "Wavelength Digital Limited", + [3]byte{0, 3, 233}: "Akara Canada, Inc.", + [3]byte{0, 3, 234}: "Mega System Technologies, Inc.", + [3]byte{0, 3, 235}: "Atrica", + [3]byte{0, 3, 236}: "ICG Research, Inc.", + [3]byte{0, 3, 237}: "Shinkawa Electric Co., Ltd.", + [3]byte{0, 3, 238}: "MKNet Corporation", + [3]byte{0, 3, 239}: "Oneline AG", + [3]byte{0, 3, 240}: "Redfern Broadband Networks", + [3]byte{0, 3, 241}: "Cicada Semiconductor, Inc.", + [3]byte{0, 3, 242}: "Seneca Networks", + [3]byte{0, 3, 243}: "Dazzle Multimedia, Inc.", + [3]byte{0, 3, 244}: "NetBurner", + [3]byte{0, 3, 245}: "Chip2Chip", + [3]byte{0, 3, 246}: "Allegro Networks, Inc.", + [3]byte{0, 3, 247}: "Plast-Control GmbH", + [3]byte{0, 3, 248}: "SanCastle Technologies, Inc.", + [3]byte{0, 3, 249}: "Pleiades Communications, Inc.", + [3]byte{0, 3, 250}: "TiMetra Networks", + [3]byte{0, 3, 251}: "ENEGATE Co.,Ltd.", + [3]byte{0, 3, 252}: "Intertex Data AB", + [3]byte{0, 3, 253}: "CISCO SYSTEMS, INC.", + [3]byte{0, 3, 254}: "CISCO SYSTEMS, INC.", + [3]byte{0, 3, 255}: "Microsoft Corporation", + [3]byte{0, 4, 0}: "LEXMARK INTERNATIONAL, INC.", + [3]byte{0, 4, 1}: "Osaki Electric Co., Ltd.", + [3]byte{0, 4, 2}: "Nexsan Technologies, Ltd.", + [3]byte{0, 4, 3}: "Nexsi Corporation", + [3]byte{0, 4, 4}: "Makino Milling Machine Co., Ltd.", + [3]byte{0, 4, 5}: "ACN Technologies", + [3]byte{0, 4, 6}: "Fa. Metabox AG", + [3]byte{0, 4, 7}: "Topcon Positioning Systems, Inc.", + [3]byte{0, 4, 8}: "Sanko Electronics Co., Ltd.", + [3]byte{0, 4, 9}: "Cratos Networks", + [3]byte{0, 4, 10}: "Sage Systems", + [3]byte{0, 4, 11}: "3com Europe Ltd.", + [3]byte{0, 4, 12}: "Kanno Works, Ltd.", + [3]byte{0, 4, 13}: "Avaya, Inc.", + [3]byte{0, 4, 14}: "AVM GmbH", + [3]byte{0, 4, 15}: "Asus Network Technologies, Inc.", + [3]byte{0, 4, 16}: "Spinnaker Networks, Inc.", + [3]byte{0, 4, 17}: "Inkra Networks, Inc.", + [3]byte{0, 4, 18}: "WaveSmith Networks, Inc.", + [3]byte{0, 4, 19}: "SNOM Technology AG", + [3]byte{0, 4, 20}: "Umezawa Musen Denki Co., Ltd.", + [3]byte{0, 4, 21}: "Rasteme Systems Co., Ltd.", + [3]byte{0, 4, 22}: "Parks S/A Comunicacoes Digitais", + [3]byte{0, 4, 23}: "ELAU AG", + [3]byte{0, 4, 24}: "Teltronic S.A.U.", + [3]byte{0, 4, 25}: "Fibercycle Networks, Inc.", + [3]byte{0, 4, 26}: "Ines Test and Measurement GmbH & CoKG", + [3]byte{0, 4, 27}: "Bridgeworks Ltd.", + [3]byte{0, 4, 28}: "ipDialog, Inc.", + [3]byte{0, 4, 29}: "Corega of America", + [3]byte{0, 4, 30}: "Shikoku Instrumentation Co., Ltd.", + [3]byte{0, 4, 31}: "Sony Computer Entertainment, Inc.", + [3]byte{0, 4, 32}: "Slim Devices, Inc.", + [3]byte{0, 4, 33}: "Ocular Networks", + [3]byte{0, 4, 34}: "Gordon Kapes, Inc.", + [3]byte{0, 4, 35}: "Intel Corporation", + [3]byte{0, 4, 36}: "TMC s.r.l.", + [3]byte{0, 4, 37}: "Atmel Corporation", + [3]byte{0, 4, 38}: "Autosys", + [3]byte{0, 4, 39}: "CISCO SYSTEMS, INC.", + [3]byte{0, 4, 40}: "CISCO SYSTEMS, INC.", + [3]byte{0, 4, 41}: "Pixord Corporation", + [3]byte{0, 4, 42}: "Wireless Networks, Inc.", + [3]byte{0, 4, 43}: "IT Access Co., Ltd.", + [3]byte{0, 4, 44}: "Minet, Inc.", + [3]byte{0, 4, 45}: "Sarian Systems, Ltd.", + [3]byte{0, 4, 46}: "Netous Technologies, Ltd.", + [3]byte{0, 4, 47}: "International Communications Products, Inc.", + [3]byte{0, 4, 48}: "Netgem", + [3]byte{0, 4, 49}: "GlobalStreams, Inc.", + [3]byte{0, 4, 50}: "Voyetra Turtle Beach, Inc.", + [3]byte{0, 4, 51}: "Cyberboard A/S", + [3]byte{0, 4, 52}: "Accelent Systems, Inc.", + [3]byte{0, 4, 53}: "Comptek International, Inc.", + [3]byte{0, 4, 54}: "ELANsat Technologies, Inc.", + [3]byte{0, 4, 55}: "Powin Information Technology, Inc.", + [3]byte{0, 4, 56}: "Nortel Networks", + [3]byte{0, 4, 57}: "Rosco Entertainment Technology, Inc.", + [3]byte{0, 4, 58}: "Intelligent Telecommunications, Inc.", + [3]byte{0, 4, 59}: "Lava Computer Mfg., Inc.", + [3]byte{0, 4, 60}: "SONOS Co., Ltd.", + [3]byte{0, 4, 61}: "INDEL AG", + [3]byte{0, 4, 62}: "Telencomm", + [3]byte{0, 4, 63}: "ESTeem Wireless Modems, Inc", + [3]byte{0, 4, 64}: "cyberPIXIE, Inc.", + [3]byte{0, 4, 65}: "Half Dome Systems, Inc.", + [3]byte{0, 4, 66}: "NACT", + [3]byte{0, 4, 67}: "Agilent Technologies, Inc.", + [3]byte{0, 4, 68}: "Western Multiplex Corporation", + [3]byte{0, 4, 69}: "LMS Skalar Instruments GmbH", + [3]byte{0, 4, 70}: "CYZENTECH Co., Ltd.", + [3]byte{0, 4, 71}: "Acrowave Systems Co., Ltd.", + [3]byte{0, 4, 72}: "Polaroid Corporation", + [3]byte{0, 4, 73}: "Mapletree Networks", + [3]byte{0, 4, 74}: "iPolicy Networks, Inc.", + [3]byte{0, 4, 75}: "NVIDIA", + [3]byte{0, 4, 76}: "JENOPTIK", + [3]byte{0, 4, 77}: "CISCO SYSTEMS, INC.", + [3]byte{0, 4, 78}: "CISCO SYSTEMS, INC.", + [3]byte{0, 4, 79}: "Leukhardt Systemelektronik GmbH", + [3]byte{0, 4, 80}: "DMD Computers SRL", + [3]byte{0, 4, 81}: "Medrad, Inc.", + [3]byte{0, 4, 82}: "RocketLogix, Inc.", + [3]byte{0, 4, 83}: "YottaYotta, Inc.", + [3]byte{0, 4, 84}: "Quadriga UK", + [3]byte{0, 4, 85}: "ANTARA.net", + [3]byte{0, 4, 86}: "Cambium Networks Limited", + [3]byte{0, 4, 87}: "Universal Access Technology, Inc.", + [3]byte{0, 4, 88}: "Fusion X Co., Ltd.", + [3]byte{0, 4, 89}: "Veristar Corporation", + [3]byte{0, 4, 90}: "The Linksys Group, Inc.", + [3]byte{0, 4, 91}: "Techsan Electronics Co., Ltd.", + [3]byte{0, 4, 92}: "Mobiwave Pte Ltd", + [3]byte{0, 4, 93}: "BEKA Elektronik", + [3]byte{0, 4, 94}: "PolyTrax Information Technology AG", + [3]byte{0, 4, 95}: "Avalue Technology, Inc.", + [3]byte{0, 4, 96}: "Knilink Technology, Inc.", + [3]byte{0, 4, 97}: "EPOX Computer Co., Ltd.", + [3]byte{0, 4, 98}: "DAKOS Data & Communication Co., Ltd.", + [3]byte{0, 4, 99}: "Bosch Security Systems", + [3]byte{0, 4, 100}: "Pulse-Link Inc", + [3]byte{0, 4, 101}: "i.s.t isdn-support technik GmbH", + [3]byte{0, 4, 102}: "ARMITEL Co.", + [3]byte{0, 4, 103}: "Wuhan Research Institute of MII", + [3]byte{0, 4, 104}: "Vivity, Inc.", + [3]byte{0, 4, 105}: "Innocom, Inc.", + [3]byte{0, 4, 106}: "Navini Networks", + [3]byte{0, 4, 107}: "Palm Wireless, Inc.", + [3]byte{0, 4, 108}: "Cyber Technology Co., Ltd.", + [3]byte{0, 4, 109}: "CISCO SYSTEMS, INC.", + [3]byte{0, 4, 110}: "CISCO SYSTEMS, INC.", + [3]byte{0, 4, 111}: "Digitel S/A Industria Eletronica", + [3]byte{0, 4, 112}: "ipUnplugged AB", + [3]byte{0, 4, 113}: "IPrad", + [3]byte{0, 4, 114}: "Telelynx, Inc.", + [3]byte{0, 4, 115}: "Photonex Corporation", + [3]byte{0, 4, 116}: "LEGRAND", + [3]byte{0, 4, 117}: "3 Com Corporation", + [3]byte{0, 4, 118}: "3 Com Corporation", + [3]byte{0, 4, 119}: "Scalant Systems, Inc.", + [3]byte{0, 4, 120}: "G. Star Technology Corporation", + [3]byte{0, 4, 121}: "Radius Co., Ltd.", + [3]byte{0, 4, 122}: "AXXESSIT ASA", + [3]byte{0, 4, 123}: "Schlumberger", + [3]byte{0, 4, 124}: "Skidata AG", + [3]byte{0, 4, 125}: "Pelco", + [3]byte{0, 4, 126}: "Siqura B.V.", + [3]byte{0, 4, 127}: "Chr. Mayr GmbH & Co. KG", + [3]byte{0, 4, 128}: "Brocade Communications Systems, Inc", + [3]byte{0, 4, 129}: "Econolite Control Products, Inc.", + [3]byte{0, 4, 130}: "Medialogic Corp.", + [3]byte{0, 4, 131}: "Deltron Technology, Inc.", + [3]byte{0, 4, 132}: "Amann GmbH", + [3]byte{0, 4, 133}: "PicoLight", + [3]byte{0, 4, 134}: "ITTC, University of Kansas", + [3]byte{0, 4, 135}: "Cogency Semiconductor, Inc.", + [3]byte{0, 4, 136}: "Eurotherm Controls", + [3]byte{0, 4, 137}: "YAFO Networks, Inc.", + [3]byte{0, 4, 138}: "Temia Vertriebs GmbH", + [3]byte{0, 4, 139}: "Poscon Corporation", + [3]byte{0, 4, 140}: "Nayna Networks, Inc.", + [3]byte{0, 4, 141}: "Tone Commander Systems, Inc.", + [3]byte{0, 4, 142}: "Ohm Tech Labs, Inc.", + [3]byte{0, 4, 143}: "TD Systems Corporation", + [3]byte{0, 4, 144}: "Optical Access", + [3]byte{0, 4, 145}: "Technovision, Inc.", + [3]byte{0, 4, 146}: "Hive Internet, Ltd.", + [3]byte{0, 4, 147}: "Tsinghua Unisplendour Co., Ltd.", + [3]byte{0, 4, 148}: "Breezecom, Ltd.", + [3]byte{0, 4, 149}: "Tejas Networks India Limited", + [3]byte{0, 4, 150}: "Extreme Networks", + [3]byte{0, 4, 151}: "MacroSystem Digital Video AG", + [3]byte{0, 4, 152}: "Mahi Networks", + [3]byte{0, 4, 153}: "Chino Corporation", + [3]byte{0, 4, 154}: "CISCO SYSTEMS, INC.", + [3]byte{0, 4, 155}: "CISCO SYSTEMS, INC.", + [3]byte{0, 4, 156}: "Surgient Networks, Inc.", + [3]byte{0, 4, 157}: "Ipanema Technologies", + [3]byte{0, 4, 158}: "Wirelink Co., Ltd.", + [3]byte{0, 4, 159}: "Freescale Semiconductor", + [3]byte{0, 4, 160}: "Verity Instruments, Inc.", + [3]byte{0, 4, 161}: "Pathway Connectivity", + [3]byte{0, 4, 162}: "L.S.I. Japan Co., Ltd.", + [3]byte{0, 4, 163}: "Microchip Technology, Inc.", + [3]byte{0, 4, 164}: "NetEnabled, Inc.", + [3]byte{0, 4, 165}: "Barco Projection Systems NV", + [3]byte{0, 4, 166}: "SAF Tehnika Ltd.", + [3]byte{0, 4, 167}: "FabiaTech Corporation", + [3]byte{0, 4, 168}: "Broadmax Technologies, Inc.", + [3]byte{0, 4, 169}: "SandStream Technologies, Inc.", + [3]byte{0, 4, 170}: "Jetstream Communications", + [3]byte{0, 4, 171}: "Comverse Network Systems, Inc.", + [3]byte{0, 4, 172}: "IBM Corp", + [3]byte{0, 4, 173}: "Malibu Networks", + [3]byte{0, 4, 174}: "Sullair Corporation", + [3]byte{0, 4, 175}: "Digital Fountain, Inc.", + [3]byte{0, 4, 176}: "ELESIGN Co., Ltd.", + [3]byte{0, 4, 177}: "Signal Technology, Inc.", + [3]byte{0, 4, 178}: "ESSEGI SRL", + [3]byte{0, 4, 179}: "Videotek, Inc.", + [3]byte{0, 4, 180}: "CIAC", + [3]byte{0, 4, 181}: "Equitrac Corporation", + [3]byte{0, 4, 182}: "Stratex Networks, Inc.", + [3]byte{0, 4, 183}: "AMB i.t. Holding", + [3]byte{0, 4, 184}: "Kumahira Co., Ltd.", + [3]byte{0, 4, 185}: "S.I. Soubou, Inc.", + [3]byte{0, 4, 186}: "KDD Media Will Corporation", + [3]byte{0, 4, 187}: "Bardac Corporation", + [3]byte{0, 4, 188}: "Giantec, Inc.", + [3]byte{0, 4, 189}: "ARRIS Group, Inc.", + [3]byte{0, 4, 190}: "OptXCon, Inc.", + [3]byte{0, 4, 191}: "VersaLogic Corp.", + [3]byte{0, 4, 192}: "CISCO SYSTEMS, INC.", + [3]byte{0, 4, 193}: "CISCO SYSTEMS, INC.", + [3]byte{0, 4, 194}: "Magnipix, Inc.", + [3]byte{0, 4, 195}: "CASTOR Informatique", + [3]byte{0, 4, 196}: "Allen & Heath Limited", + [3]byte{0, 4, 197}: "ASE Technologies, USA", + [3]byte{0, 4, 198}: "Yamaha Motor Co., Ltd.", + [3]byte{0, 4, 199}: "NetMount", + [3]byte{0, 4, 200}: "LIBA Maschinenfabrik GmbH", + [3]byte{0, 4, 201}: "Micro Electron Co., Ltd.", + [3]byte{0, 4, 202}: "FreeMs Corp.", + [3]byte{0, 4, 203}: "Tdsoft Communication, Ltd.", + [3]byte{0, 4, 204}: "Peek Traffic B.V.", + [3]byte{0, 4, 205}: "Extenway Solutions Inc", + [3]byte{0, 4, 206}: "Patria Ailon", + [3]byte{0, 4, 207}: "Seagate Technology", + [3]byte{0, 4, 208}: "Softlink s.r.o.", + [3]byte{0, 4, 209}: "Drew Technologies, Inc.", + [3]byte{0, 4, 210}: "Adcon Telemetry GmbH", + [3]byte{0, 4, 211}: "Toyokeiki Co., Ltd.", + [3]byte{0, 4, 212}: "Proview Electronics Co., Ltd.", + [3]byte{0, 4, 213}: "Hitachi Information & Communication Engineering, Ltd.", + [3]byte{0, 4, 214}: "Takagi Industrial Co., Ltd.", + [3]byte{0, 4, 215}: "Omitec Instrumentation Ltd.", + [3]byte{0, 4, 216}: "IPWireless, Inc.", + [3]byte{0, 4, 217}: "Titan Electronics, Inc.", + [3]byte{0, 4, 218}: "Relax Technology, Inc.", + [3]byte{0, 4, 219}: "Tellus Group Corp.", + [3]byte{0, 4, 220}: "Nortel Networks", + [3]byte{0, 4, 221}: "CISCO SYSTEMS, INC.", + [3]byte{0, 4, 222}: "CISCO SYSTEMS, INC.", + [3]byte{0, 4, 223}: "Teracom Telematica Ltda.", + [3]byte{0, 4, 224}: "Procket Networks", + [3]byte{0, 4, 225}: "Infinior Microsystems", + [3]byte{0, 4, 226}: "SMC Networks, Inc.", + [3]byte{0, 4, 227}: "Accton Technology Corp.", + [3]byte{0, 4, 228}: "Daeryung Ind., Inc.", + [3]byte{0, 4, 229}: "Glonet Systems, Inc.", + [3]byte{0, 4, 230}: "Banyan Network Private Limited", + [3]byte{0, 4, 231}: "Lightpointe Communications, Inc", + [3]byte{0, 4, 232}: "IER, Inc.", + [3]byte{0, 4, 233}: "Infiniswitch Corporation", + [3]byte{0, 4, 234}: "Hewlett-Packard Company", + [3]byte{0, 4, 235}: "Paxonet Communications, Inc.", + [3]byte{0, 4, 236}: "Memobox SA", + [3]byte{0, 4, 237}: "Billion Electric Co., Ltd.", + [3]byte{0, 4, 238}: "Lincoln Electric Company", + [3]byte{0, 4, 239}: "Polestar Corp.", + [3]byte{0, 4, 240}: "International Computers, Ltd", + [3]byte{0, 4, 241}: "WhereNet", + [3]byte{0, 4, 242}: "Polycom", + [3]byte{0, 4, 243}: "FS FORTH-SYSTEME GmbH", + [3]byte{0, 4, 244}: "Infinite Electronics Inc.", + [3]byte{0, 4, 245}: "SnowShore Networks, Inc.", + [3]byte{0, 4, 246}: "Amphus", + [3]byte{0, 4, 247}: "Omega Band, Inc.", + [3]byte{0, 4, 248}: "QUALICABLE TV Industria E Com., Ltda", + [3]byte{0, 4, 249}: "Xtera Communications, Inc.", + [3]byte{0, 4, 250}: "NBS Technologies Inc.", + [3]byte{0, 4, 251}: "Commtech, Inc.", + [3]byte{0, 4, 252}: "Stratus Computer (DE), Inc.", + [3]byte{0, 4, 253}: "Japan Control Engineering Co., Ltd.", + [3]byte{0, 4, 254}: "Pelago Networks", + [3]byte{0, 4, 255}: "Acronet Co., Ltd.", + [3]byte{0, 5, 0}: "CISCO SYSTEMS, INC.", + [3]byte{0, 5, 1}: "CISCO SYSTEMS, INC.", + [3]byte{0, 5, 2}: "Apple", + [3]byte{0, 5, 3}: "ICONAG", + [3]byte{0, 5, 4}: "Naray Information & Communication Enterprise", + [3]byte{0, 5, 5}: "Systems Integration Solutions, Inc.", + [3]byte{0, 5, 6}: "Reddo Networks AB", + [3]byte{0, 5, 7}: "Fine Appliance Corp.", + [3]byte{0, 5, 8}: "Inetcam, Inc.", + [3]byte{0, 5, 9}: "AVOC Nishimura Ltd.", + [3]byte{0, 5, 10}: "ICS Spa", + [3]byte{0, 5, 11}: "SICOM Systems, Inc.", + [3]byte{0, 5, 12}: "Network Photonics, Inc.", + [3]byte{0, 5, 13}: "Midstream Technologies, Inc.", + [3]byte{0, 5, 14}: "3ware, Inc.", + [3]byte{0, 5, 15}: "Tanaka S/S Ltd.", + [3]byte{0, 5, 16}: "Infinite Shanghai Communication Terminals Ltd.", + [3]byte{0, 5, 17}: "Complementary Technologies Ltd", + [3]byte{0, 5, 18}: "MeshNetworks, Inc.", + [3]byte{0, 5, 19}: "VTLinx Multimedia Systems, Inc.", + [3]byte{0, 5, 20}: "KDT Systems Co., Ltd.", + [3]byte{0, 5, 21}: "Nuark Co., Ltd.", + [3]byte{0, 5, 22}: "SMART Modular Technologies", + [3]byte{0, 5, 23}: "Shellcomm, Inc.", + [3]byte{0, 5, 24}: "Jupiters Technology", + [3]byte{0, 5, 25}: "Siemens Building Technologies AG,", + [3]byte{0, 5, 26}: "3Com Europe Ltd.", + [3]byte{0, 5, 27}: "Magic Control Technology Corporation", + [3]byte{0, 5, 28}: "Xnet Technology Corp.", + [3]byte{0, 5, 29}: "Airocon, Inc.", + [3]byte{0, 5, 30}: "Brocade Communications Systems, Inc.", + [3]byte{0, 5, 31}: "Taijin Media Co., Ltd.", + [3]byte{0, 5, 32}: "Smartronix, Inc.", + [3]byte{0, 5, 33}: "Control Microsystems", + [3]byte{0, 5, 34}: "LEA*D Corporation, Inc.", + [3]byte{0, 5, 35}: "AVL List GmbH", + [3]byte{0, 5, 36}: "BTL System (HK) Limited", + [3]byte{0, 5, 37}: "Puretek Industrial Co., Ltd.", + [3]byte{0, 5, 38}: "IPAS GmbH", + [3]byte{0, 5, 39}: "SJ Tek Co. Ltd", + [3]byte{0, 5, 40}: "New Focus, Inc.", + [3]byte{0, 5, 41}: "Shanghai Broadan Communication Technology Co., Ltd", + [3]byte{0, 5, 42}: "Ikegami Tsushinki Co., Ltd.", + [3]byte{0, 5, 43}: "HORIBA, Ltd.", + [3]byte{0, 5, 44}: "Supreme Magic Corporation", + [3]byte{0, 5, 45}: "Zoltrix International Limited", + [3]byte{0, 5, 46}: "Cinta Networks", + [3]byte{0, 5, 47}: "Leviton Network Solutions", + [3]byte{0, 5, 48}: "Andiamo Systems, Inc.", + [3]byte{0, 5, 49}: "CISCO SYSTEMS, INC.", + [3]byte{0, 5, 50}: "CISCO SYSTEMS, INC.", + [3]byte{0, 5, 51}: "Brocade Communications Systems, Inc.", + [3]byte{0, 5, 52}: "Northstar Engineering Ltd.", + [3]byte{0, 5, 53}: "Chip PC Ltd.", + [3]byte{0, 5, 54}: "Danam Communications, Inc.", + [3]byte{0, 5, 55}: "Nets Technology Co., Ltd.", + [3]byte{0, 5, 56}: "Merilus, Inc.", + [3]byte{0, 5, 57}: "A Brand New World in Sweden AB", + [3]byte{0, 5, 58}: "Willowglen Services Pte Ltd", + [3]byte{0, 5, 59}: "Harbour Networks Ltd., Co. Beijing", + [3]byte{0, 5, 60}: "Xircom", + [3]byte{0, 5, 61}: "Agere Systems", + [3]byte{0, 5, 62}: "KID Systeme GmbH", + [3]byte{0, 5, 63}: "VisionTek, Inc.", + [3]byte{0, 5, 64}: "FAST Corporation", + [3]byte{0, 5, 65}: "Advanced Systems Co., Ltd.", + [3]byte{0, 5, 66}: "Otari, Inc.", + [3]byte{0, 5, 67}: "IQ Wireless GmbH", + [3]byte{0, 5, 68}: "Valley Technologies, Inc.", + [3]byte{0, 5, 69}: "Internet Photonics", + [3]byte{0, 5, 70}: "KDDI Network & Solultions Inc.", + [3]byte{0, 5, 71}: "Starent Networks", + [3]byte{0, 5, 72}: "Disco Corporation", + [3]byte{0, 5, 73}: "Salira Optical Network Systems", + [3]byte{0, 5, 74}: "Ario Data Networks, Inc.", + [3]byte{0, 5, 75}: "Eaton Automation AG", + [3]byte{0, 5, 76}: "RF Innovations Pty Ltd", + [3]byte{0, 5, 77}: "Brans Technologies, Inc.", + [3]byte{0, 5, 78}: "Philips", + [3]byte{0, 5, 79}: "PRIVATE", + [3]byte{0, 5, 80}: "Vcomms Connect Limited", + [3]byte{0, 5, 81}: "F & S Elektronik Systeme GmbH", + [3]byte{0, 5, 82}: "Xycotec Computer GmbH", + [3]byte{0, 5, 83}: "DVC Company, Inc.", + [3]byte{0, 5, 84}: "Rangestar Wireless", + [3]byte{0, 5, 85}: "Japan Cash Machine Co., Ltd.", + [3]byte{0, 5, 86}: "360 Systems", + [3]byte{0, 5, 87}: "Agile TV Corporation", + [3]byte{0, 5, 88}: "Synchronous, Inc.", + [3]byte{0, 5, 89}: "Intracom S.A.", + [3]byte{0, 5, 90}: "Power Dsine Ltd.", + [3]byte{0, 5, 91}: "Charles Industries, Ltd.", + [3]byte{0, 5, 92}: "Kowa Company, Ltd.", + [3]byte{0, 5, 93}: "D-Link Systems, Inc.", + [3]byte{0, 5, 94}: "CISCO SYSTEMS, INC.", + [3]byte{0, 5, 95}: "CISCO SYSTEMS, INC.", + [3]byte{0, 5, 96}: "LEADER COMM.CO., LTD", + [3]byte{0, 5, 97}: "nac Image Technology, Inc.", + [3]byte{0, 5, 98}: "Digital View Limited", + [3]byte{0, 5, 99}: "J-Works, Inc.", + [3]byte{0, 5, 100}: "Tsinghua Bitway Co., Ltd.", + [3]byte{0, 5, 101}: "Tailyn Communication Company Ltd.", + [3]byte{0, 5, 102}: "Secui.com Corporation", + [3]byte{0, 5, 103}: "Etymonic Design, Inc.", + [3]byte{0, 5, 104}: "Piltofish Networks AB", + [3]byte{0, 5, 105}: "VMware, Inc.", + [3]byte{0, 5, 106}: "Heuft Systemtechnik GmbH", + [3]byte{0, 5, 107}: "C.P. Technology Co., Ltd.", + [3]byte{0, 5, 108}: "Hung Chang Co., Ltd.", + [3]byte{0, 5, 109}: "Pacific Corporation", + [3]byte{0, 5, 110}: "National Enhance Technology, Inc.", + [3]byte{0, 5, 111}: "Innomedia Technologies Pvt. Ltd.", + [3]byte{0, 5, 112}: "Baydel Ltd.", + [3]byte{0, 5, 113}: "Seiwa Electronics Co.", + [3]byte{0, 5, 114}: "Deonet Co., Ltd.", + [3]byte{0, 5, 115}: "CISCO SYSTEMS, INC.", + [3]byte{0, 5, 116}: "CISCO SYSTEMS, INC.", + [3]byte{0, 5, 117}: "CDS-Electronics BV", + [3]byte{0, 5, 118}: "NSM Technology Ltd.", + [3]byte{0, 5, 119}: "SM Information & Communication", + [3]byte{0, 5, 120}: "PRIVATE", + [3]byte{0, 5, 121}: "Universal Control Solution Corp.", + [3]byte{0, 5, 122}: "Overture Networks", + [3]byte{0, 5, 123}: "Chung Nam Electronic Co., Ltd.", + [3]byte{0, 5, 124}: "RCO Security AB", + [3]byte{0, 5, 125}: "Sun Communications, Inc.", + [3]byte{0, 5, 126}: "Eckelmann Steuerungstechnik GmbH", + [3]byte{0, 5, 127}: "Acqis Technology", + [3]byte{0, 5, 128}: "FibroLAN Ltd.", + [3]byte{0, 5, 129}: "Snell", + [3]byte{0, 5, 130}: "ClearCube Technology", + [3]byte{0, 5, 131}: "ImageCom Limited", + [3]byte{0, 5, 132}: "AbsoluteValue Systems, Inc.", + [3]byte{0, 5, 133}: "Juniper Networks, Inc.", + [3]byte{0, 5, 134}: "Lucent Technologies", + [3]byte{0, 5, 135}: "Locus, Incorporated", + [3]byte{0, 5, 136}: "Sensoria Corp.", + [3]byte{0, 5, 137}: "National Datacomputer", + [3]byte{0, 5, 138}: "Netcom Co., Ltd.", + [3]byte{0, 5, 139}: "IPmental, Inc.", + [3]byte{0, 5, 140}: "Opentech Inc.", + [3]byte{0, 5, 141}: "Lynx Photonic Networks, Inc.", + [3]byte{0, 5, 142}: "Flextronics International GmbH & Co. Nfg. KG", + [3]byte{0, 5, 143}: "CLCsoft co.", + [3]byte{0, 5, 144}: "Swissvoice Ltd.", + [3]byte{0, 5, 145}: "Active Silicon Ltd", + [3]byte{0, 5, 146}: "Pultek Corp.", + [3]byte{0, 5, 147}: "Grammar Engine Inc.", + [3]byte{0, 5, 148}: "IXXAT Automation GmbH", + [3]byte{0, 5, 149}: "Alesis Corporation", + [3]byte{0, 5, 150}: "Genotech Co., Ltd.", + [3]byte{0, 5, 151}: "Eagle Traffic Control Systems", + [3]byte{0, 5, 152}: "CRONOS S.r.l.", + [3]byte{0, 5, 153}: "DRS Test and Energy Management or DRS-TEM", + [3]byte{0, 5, 154}: "CISCO SYSTEMS, INC.", + [3]byte{0, 5, 155}: "CISCO SYSTEMS, INC.", + [3]byte{0, 5, 156}: "Kleinknecht GmbH, Ing. Büro", + [3]byte{0, 5, 157}: "Daniel Computing Systems, Inc.", + [3]byte{0, 5, 158}: "Zinwell Corporation", + [3]byte{0, 5, 159}: "Yotta Networks, Inc.", + [3]byte{0, 5, 160}: "MOBILINE Kft.", + [3]byte{0, 5, 161}: "Zenocom", + [3]byte{0, 5, 162}: "CELOX Networks", + [3]byte{0, 5, 163}: "QEI, Inc.", + [3]byte{0, 5, 164}: "Lucid Voice Ltd.", + [3]byte{0, 5, 165}: "KOTT", + [3]byte{0, 5, 166}: "Extron Electronics", + [3]byte{0, 5, 167}: "Hyperchip, Inc.", + [3]byte{0, 5, 168}: "WYLE ELECTRONICS", + [3]byte{0, 5, 169}: "Princeton Networks, Inc.", + [3]byte{0, 5, 170}: "Moore Industries International Inc.", + [3]byte{0, 5, 171}: "Cyber Fone, Inc.", + [3]byte{0, 5, 172}: "Northern Digital, Inc.", + [3]byte{0, 5, 173}: "Topspin Communications, Inc.", + [3]byte{0, 5, 174}: "Mediaport USA", + [3]byte{0, 5, 175}: "InnoScan Computing A/S", + [3]byte{0, 5, 176}: "Korea Computer Technology Co., Ltd.", + [3]byte{0, 5, 177}: "ASB Technology BV", + [3]byte{0, 5, 178}: "Medison Co., Ltd.", + [3]byte{0, 5, 179}: "Asahi-Engineering Co., Ltd.", + [3]byte{0, 5, 180}: "Aceex Corporation", + [3]byte{0, 5, 181}: "Broadcom Technologies", + [3]byte{0, 5, 182}: "INSYS Microelectronics GmbH", + [3]byte{0, 5, 183}: "Arbor Technology Corp.", + [3]byte{0, 5, 184}: "Electronic Design Associates, Inc.", + [3]byte{0, 5, 185}: "Airvana, Inc.", + [3]byte{0, 5, 186}: "Area Netwoeks, Inc.", + [3]byte{0, 5, 187}: "Myspace AB", + [3]byte{0, 5, 188}: "Resource Data Management Ltd", + [3]byte{0, 5, 189}: "ROAX BV", + [3]byte{0, 5, 190}: "Kongsberg Seatex AS", + [3]byte{0, 5, 191}: "JustEzy Technology, Inc.", + [3]byte{0, 5, 192}: "Digital Network Alacarte Co., Ltd.", + [3]byte{0, 5, 193}: "A-Kyung Motion, Inc.", + [3]byte{0, 5, 194}: "Soronti, Inc.", + [3]byte{0, 5, 195}: "Pacific Instruments, Inc.", + [3]byte{0, 5, 196}: "Telect, Inc.", + [3]byte{0, 5, 197}: "Flaga HF", + [3]byte{0, 5, 198}: "Triz Communications", + [3]byte{0, 5, 199}: "I/F-COM A/S", + [3]byte{0, 5, 200}: "VERYTECH", + [3]byte{0, 5, 201}: "LG Innotek Co., Ltd.", + [3]byte{0, 5, 202}: "Hitron Technology, Inc.", + [3]byte{0, 5, 203}: "ROIS Technologies, Inc.", + [3]byte{0, 5, 204}: "Sumtel Communications, Inc.", + [3]byte{0, 5, 205}: "Denon, Ltd.", + [3]byte{0, 5, 206}: "Prolink Microsystems Corporation", + [3]byte{0, 5, 207}: "Thunder River Technologies, Inc.", + [3]byte{0, 5, 208}: "Solinet Systems", + [3]byte{0, 5, 209}: "Metavector Technologies", + [3]byte{0, 5, 210}: "DAP Technologies", + [3]byte{0, 5, 211}: "eProduction Solutions, Inc.", + [3]byte{0, 5, 212}: "FutureSmart Networks, Inc.", + [3]byte{0, 5, 213}: "Speedcom Wireless", + [3]byte{0, 5, 214}: "L-3 Linkabit", + [3]byte{0, 5, 215}: "Vista Imaging, Inc.", + [3]byte{0, 5, 216}: "Arescom, Inc.", + [3]byte{0, 5, 217}: "Techno Valley, Inc.", + [3]byte{0, 5, 218}: "Apex Automationstechnik", + [3]byte{0, 5, 219}: "PSI Nentec GmbH", + [3]byte{0, 5, 220}: "CISCO SYSTEMS, INC.", + [3]byte{0, 5, 221}: "CISCO SYSTEMS, INC.", + [3]byte{0, 5, 222}: "Gi Fone Korea, Inc.", + [3]byte{0, 5, 223}: "Electronic Innovation, Inc.", + [3]byte{0, 5, 224}: "Empirix Corp.", + [3]byte{0, 5, 225}: "Trellis Photonics, Ltd.", + [3]byte{0, 5, 226}: "Creativ Network Technologies", + [3]byte{0, 5, 227}: "LightSand Communications, Inc.", + [3]byte{0, 5, 228}: "Red Lion Controls Inc.", + [3]byte{0, 5, 229}: "Renishaw PLC", + [3]byte{0, 5, 230}: "Egenera, Inc.", + [3]byte{0, 5, 231}: "Netrake an AudioCodes Company", + [3]byte{0, 5, 232}: "TurboWave, Inc.", + [3]byte{0, 5, 233}: "Unicess Network, Inc.", + [3]byte{0, 5, 234}: "Rednix", + [3]byte{0, 5, 235}: "Blue Ridge Networks, Inc.", + [3]byte{0, 5, 236}: "Mosaic Systems Inc.", + [3]byte{0, 5, 237}: "Technikum Joanneum GmbH", + [3]byte{0, 5, 238}: "Siemens AB, Infrastructure & Cities, Building Technologies Division, IC BT SSP SP BA PR", + [3]byte{0, 5, 239}: "ADOIR Digital Technology", + [3]byte{0, 5, 240}: "SATEC", + [3]byte{0, 5, 241}: "Vrcom, Inc.", + [3]byte{0, 5, 242}: "Power R, Inc.", + [3]byte{0, 5, 243}: "Webyn", + [3]byte{0, 5, 244}: "System Base Co., Ltd.", + [3]byte{0, 5, 245}: "Geospace Technologies", + [3]byte{0, 5, 246}: "Young Chang Co. Ltd.", + [3]byte{0, 5, 247}: "Analog Devices, Inc.", + [3]byte{0, 5, 248}: "Real Time Access, Inc.", + [3]byte{0, 5, 249}: "TOA Corporation", + [3]byte{0, 5, 250}: "IPOptical, Inc.", + [3]byte{0, 5, 251}: "ShareGate, Inc.", + [3]byte{0, 5, 252}: "Schenck Pegasus Corp.", + [3]byte{0, 5, 253}: "PacketLight Networks Ltd.", + [3]byte{0, 5, 254}: "Traficon N.V.", + [3]byte{0, 5, 255}: "SNS Solutions, Inc.", + [3]byte{0, 6, 0}: "Toshiba Teli Corporation", + [3]byte{0, 6, 1}: "Otanikeiki Co., Ltd.", + [3]byte{0, 6, 2}: "Cirkitech Electronics Co.", + [3]byte{0, 6, 3}: "Baker Hughes Inc.", + [3]byte{0, 6, 4}: "@Track Communications, Inc.", + [3]byte{0, 6, 5}: "Inncom International, Inc.", + [3]byte{0, 6, 6}: "RapidWAN, Inc.", + [3]byte{0, 6, 7}: "Omni Directional Control Technology Inc.", + [3]byte{0, 6, 8}: "At-Sky SAS", + [3]byte{0, 6, 9}: "Crossport Systems", + [3]byte{0, 6, 10}: "Blue2space", + [3]byte{0, 6, 11}: "Artesyn Embedded Technologies", + [3]byte{0, 6, 12}: "Melco Industries, Inc.", + [3]byte{0, 6, 13}: "Wave7 Optics", + [3]byte{0, 6, 14}: "IGYS Systems, Inc.", + [3]byte{0, 6, 15}: "Narad Networks Inc", + [3]byte{0, 6, 16}: "Abeona Networks Inc", + [3]byte{0, 6, 17}: "Zeus Wireless, Inc.", + [3]byte{0, 6, 18}: "Accusys, Inc.", + [3]byte{0, 6, 19}: "Kawasaki Microelectronics Incorporated", + [3]byte{0, 6, 20}: "Prism Holdings", + [3]byte{0, 6, 21}: "Kimoto Electric Co., Ltd.", + [3]byte{0, 6, 22}: "Tel Net Co., Ltd.", + [3]byte{0, 6, 23}: "Redswitch Inc.", + [3]byte{0, 6, 24}: "DigiPower Manufacturing Inc.", + [3]byte{0, 6, 25}: "Connection Technology Systems", + [3]byte{0, 6, 26}: "Zetari Inc.", + [3]byte{0, 6, 27}: "Notebook Development Lab. Lenovo Japan Ltd.", + [3]byte{0, 6, 28}: "Hoshino Metal Industries, Ltd.", + [3]byte{0, 6, 29}: "MIP Telecom, Inc.", + [3]byte{0, 6, 30}: "Maxan Systems", + [3]byte{0, 6, 31}: "Vision Components GmbH", + [3]byte{0, 6, 32}: "Serial System Ltd.", + [3]byte{0, 6, 33}: "Hinox, Co., Ltd.", + [3]byte{0, 6, 34}: "Chung Fu Chen Yeh Enterprise Corp.", + [3]byte{0, 6, 35}: "MGE UPS Systems France", + [3]byte{0, 6, 36}: "Gentner Communications Corp.", + [3]byte{0, 6, 37}: "The Linksys Group, Inc.", + [3]byte{0, 6, 38}: "MWE GmbH", + [3]byte{0, 6, 39}: "Uniwide Technologies, Inc.", + [3]byte{0, 6, 40}: "CISCO SYSTEMS, INC.", + [3]byte{0, 6, 41}: "IBM Corp", + [3]byte{0, 6, 42}: "CISCO SYSTEMS, INC.", + [3]byte{0, 6, 43}: "INTRASERVER TECHNOLOGY", + [3]byte{0, 6, 44}: "Bivio Networks", + [3]byte{0, 6, 45}: "TouchStar Technologies, L.L.C.", + [3]byte{0, 6, 46}: "Aristos Logic Corp.", + [3]byte{0, 6, 47}: "Pivotech Systems Inc.", + [3]byte{0, 6, 48}: "Adtranz Sweden", + [3]byte{0, 6, 49}: "Calix", + [3]byte{0, 6, 50}: "Mesco Engineering GmbH", + [3]byte{0, 6, 51}: "Cross Match Technologies GmbH", + [3]byte{0, 6, 52}: "GTE Airfone Inc.", + [3]byte{0, 6, 53}: "PacketAir Networks, Inc.", + [3]byte{0, 6, 54}: "Jedai Broadband Networks", + [3]byte{0, 6, 55}: "Toptrend-Meta Information (ShenZhen) Inc.", + [3]byte{0, 6, 56}: "Sungjin C&C Co., Ltd.", + [3]byte{0, 6, 57}: "Newtec", + [3]byte{0, 6, 58}: "Dura Micro, Inc.", + [3]byte{0, 6, 59}: "Arcturus Networks Inc.", + [3]byte{0, 6, 60}: "Intrinsyc Software International Inc.", + [3]byte{0, 6, 61}: "Microwave Data Systems Inc.", + [3]byte{0, 6, 62}: "Opthos Inc.", + [3]byte{0, 6, 63}: "Everex Communications Inc.", + [3]byte{0, 6, 64}: "White Rock Networks", + [3]byte{0, 6, 65}: "ITCN", + [3]byte{0, 6, 66}: "Genetel Systems Inc.", + [3]byte{0, 6, 67}: "SONO Computer Co., Ltd.", + [3]byte{0, 6, 68}: "Neix,Inc", + [3]byte{0, 6, 69}: "Meisei Electric Co. Ltd.", + [3]byte{0, 6, 70}: "ShenZhen XunBao Network Technology Co Ltd", + [3]byte{0, 6, 71}: "Etrali S.A.", + [3]byte{0, 6, 72}: "Seedsware, Inc.", + [3]byte{0, 6, 73}: "3M Deutschland GmbH", + [3]byte{0, 6, 74}: "Honeywell Co., Ltd. (KOREA)", + [3]byte{0, 6, 75}: "Alexon Co., Ltd.", + [3]byte{0, 6, 76}: "Invicta Networks, Inc.", + [3]byte{0, 6, 77}: "Sencore", + [3]byte{0, 6, 78}: "Broad Net Technology Inc.", + [3]byte{0, 6, 79}: "PRO-NETS Technology Corporation", + [3]byte{0, 6, 80}: "Tiburon Networks, Inc.", + [3]byte{0, 6, 81}: "Aspen Networks Inc.", + [3]byte{0, 6, 82}: "CISCO SYSTEMS, INC.", + [3]byte{0, 6, 83}: "CISCO SYSTEMS, INC.", + [3]byte{0, 6, 84}: "Winpresa Building Automation Technologies GmbH", + [3]byte{0, 6, 85}: "Yipee, Inc.", + [3]byte{0, 6, 86}: "Tactel AB", + [3]byte{0, 6, 87}: "Market Central, Inc.", + [3]byte{0, 6, 88}: "Helmut Fischer GmbH Institut für Elektronik und Messtechnik", + [3]byte{0, 6, 89}: "EAL (Apeldoorn) B.V.", + [3]byte{0, 6, 90}: "Strix Systems", + [3]byte{0, 6, 91}: "Dell Computer Corp.", + [3]byte{0, 6, 92}: "Malachite Technologies, Inc.", + [3]byte{0, 6, 93}: "Heidelberg Web Systems", + [3]byte{0, 6, 94}: "Photuris, Inc.", + [3]byte{0, 6, 95}: "ECI Telecom - NGTS Ltd.", + [3]byte{0, 6, 96}: "NADEX Co., Ltd.", + [3]byte{0, 6, 97}: "NIA Home Technologies Corp.", + [3]byte{0, 6, 98}: "MBM Technology Ltd.", + [3]byte{0, 6, 99}: "Human Technology Co., Ltd.", + [3]byte{0, 6, 100}: "Fostex Corporation", + [3]byte{0, 6, 101}: "Sunny Giken, Inc.", + [3]byte{0, 6, 102}: "Roving Networks", + [3]byte{0, 6, 103}: "Tripp Lite", + [3]byte{0, 6, 104}: "Vicon Industries Inc.", + [3]byte{0, 6, 105}: "Datasound Laboratories Ltd", + [3]byte{0, 6, 106}: "InfiniCon Systems, Inc.", + [3]byte{0, 6, 107}: "Sysmex Corporation", + [3]byte{0, 6, 108}: "Robinson Corporation", + [3]byte{0, 6, 109}: "Compuprint S.P.A.", + [3]byte{0, 6, 110}: "Delta Electronics, Inc.", + [3]byte{0, 6, 111}: "Korea Data Systems", + [3]byte{0, 6, 112}: "Upponetti Oy", + [3]byte{0, 6, 113}: "Softing AG", + [3]byte{0, 6, 114}: "Netezza", + [3]byte{0, 6, 115}: "TKH Security Solutions USA", + [3]byte{0, 6, 116}: "Spectrum Control, Inc.", + [3]byte{0, 6, 117}: "Banderacom, Inc.", + [3]byte{0, 6, 118}: "Novra Technologies Inc.", + [3]byte{0, 6, 119}: "SICK AG", + [3]byte{0, 6, 120}: "Marantz Brand Company", + [3]byte{0, 6, 121}: "Konami Corporation", + [3]byte{0, 6, 122}: "JMP Systems", + [3]byte{0, 6, 123}: "Toplink C&C Corporation", + [3]byte{0, 6, 124}: "CISCO SYSTEMS, INC.", + [3]byte{0, 6, 125}: "Takasago Ltd.", + [3]byte{0, 6, 126}: "WinCom Systems, Inc.", + [3]byte{0, 6, 127}: "Digeo, Inc.", + [3]byte{0, 6, 128}: "Card Access, Inc.", + [3]byte{0, 6, 129}: "Goepel Electronic GmbH", + [3]byte{0, 6, 130}: "Convedia", + [3]byte{0, 6, 131}: "Bravara Communications, Inc.", + [3]byte{0, 6, 132}: "Biacore AB", + [3]byte{0, 6, 133}: "NetNearU Corporation", + [3]byte{0, 6, 134}: "ZARDCOM Co., Ltd.", + [3]byte{0, 6, 135}: "Omnitron Systems Technology, Inc.", + [3]byte{0, 6, 136}: "Telways Communication Co., Ltd.", + [3]byte{0, 6, 137}: "yLez Technologies Pte Ltd", + [3]byte{0, 6, 138}: "NeuronNet Co. Ltd. R&D Center", + [3]byte{0, 6, 139}: "AirRunner Technologies, Inc.", + [3]byte{0, 6, 140}: "3Com Corporation", + [3]byte{0, 6, 141}: "SEPATON, Inc.", + [3]byte{0, 6, 142}: "HID Corporation", + [3]byte{0, 6, 143}: "Telemonitor, Inc.", + [3]byte{0, 6, 144}: "Euracom Communication GmbH", + [3]byte{0, 6, 145}: "PT Inovacao", + [3]byte{0, 6, 146}: "Intruvert Networks, Inc.", + [3]byte{0, 6, 147}: "Flexus Computer Technology, Inc.", + [3]byte{0, 6, 148}: "Mobillian Corporation", + [3]byte{0, 6, 149}: "Ensure Technologies, Inc.", + [3]byte{0, 6, 150}: "Advent Networks", + [3]byte{0, 6, 151}: "R & D Center", + [3]byte{0, 6, 152}: "egnite GmbH", + [3]byte{0, 6, 153}: "Vida Design Co.", + [3]byte{0, 6, 154}: "e & Tel", + [3]byte{0, 6, 155}: "AVT Audio Video Technologies GmbH", + [3]byte{0, 6, 156}: "Transmode Systems AB", + [3]byte{0, 6, 157}: "Petards Ltd", + [3]byte{0, 6, 158}: "UNIQA, Inc.", + [3]byte{0, 6, 159}: "Kuokoa Networks", + [3]byte{0, 6, 160}: "Mx Imaging", + [3]byte{0, 6, 161}: "Celsian Technologies, Inc.", + [3]byte{0, 6, 162}: "Microtune, Inc.", + [3]byte{0, 6, 163}: "Bitran Corporation", + [3]byte{0, 6, 164}: "INNOWELL Corp.", + [3]byte{0, 6, 165}: "PINON Corp.", + [3]byte{0, 6, 166}: "Artistic Licence Engineering Ltd", + [3]byte{0, 6, 167}: "Primarion", + [3]byte{0, 6, 168}: "KC Technology, Inc.", + [3]byte{0, 6, 169}: "Universal Instruments Corp.", + [3]byte{0, 6, 170}: "VT Miltope", + [3]byte{0, 6, 171}: "W-Link Systems, Inc.", + [3]byte{0, 6, 172}: "Intersoft Co.", + [3]byte{0, 6, 173}: "KB Electronics Ltd.", + [3]byte{0, 6, 174}: "Himachal Futuristic Communications Ltd", + [3]byte{0, 6, 175}: "Xalted Networks", + [3]byte{0, 6, 176}: "Comtech EF Data Corp.", + [3]byte{0, 6, 177}: "Sonicwall", + [3]byte{0, 6, 178}: "Linxtek Co.", + [3]byte{0, 6, 179}: "Diagraph Corporation", + [3]byte{0, 6, 180}: "Vorne Industries, Inc.", + [3]byte{0, 6, 181}: "Source Photonics, Inc.", + [3]byte{0, 6, 182}: "Nir-Or Israel Ltd.", + [3]byte{0, 6, 183}: "TELEM GmbH", + [3]byte{0, 6, 184}: "Bandspeed Pty Ltd", + [3]byte{0, 6, 185}: "A5TEK Corp.", + [3]byte{0, 6, 186}: "Westwave Communications", + [3]byte{0, 6, 187}: "ATI Technologies Inc.", + [3]byte{0, 6, 188}: "Macrolink, Inc.", + [3]byte{0, 6, 189}: "BNTECHNOLOGY Co., Ltd.", + [3]byte{0, 6, 190}: "Baumer Optronic GmbH", + [3]byte{0, 6, 191}: "Accella Technologies Co., Ltd.", + [3]byte{0, 6, 192}: "United Internetworks, Inc.", + [3]byte{0, 6, 193}: "CISCO SYSTEMS, INC.", + [3]byte{0, 6, 194}: "Smartmatic Corporation", + [3]byte{0, 6, 195}: "Schindler Elevator Ltd.", + [3]byte{0, 6, 196}: "Piolink Inc.", + [3]byte{0, 6, 197}: "INNOVI Technologies Limited", + [3]byte{0, 6, 198}: "lesswire AG", + [3]byte{0, 6, 199}: "RFNET Technologies Pte Ltd (S)", + [3]byte{0, 6, 200}: "Sumitomo Metal Micro Devices, Inc.", + [3]byte{0, 6, 201}: "Technical Marketing Research, Inc.", + [3]byte{0, 6, 202}: "American Computer & Digital Components, Inc. (ACDC)", + [3]byte{0, 6, 203}: "Jotron Electronics A/S", + [3]byte{0, 6, 204}: "JMI Electronics Co., Ltd.", + [3]byte{0, 6, 205}: "Leaf Imaging Ltd.", + [3]byte{0, 6, 206}: "DATENO", + [3]byte{0, 6, 207}: "Thales Avionics In-Flight Systems, LLC", + [3]byte{0, 6, 208}: "Elgar Electronics Corp.", + [3]byte{0, 6, 209}: "Tahoe Networks, Inc.", + [3]byte{0, 6, 210}: "Tundra Semiconductor Corp.", + [3]byte{0, 6, 211}: "Alpha Telecom, Inc. U.S.A.", + [3]byte{0, 6, 212}: "Interactive Objects, Inc.", + [3]byte{0, 6, 213}: "Diamond Systems Corp.", + [3]byte{0, 6, 214}: "CISCO SYSTEMS, INC.", + [3]byte{0, 6, 215}: "CISCO SYSTEMS, INC.", + [3]byte{0, 6, 216}: "Maple Optical Systems", + [3]byte{0, 6, 217}: "IPM-Net S.p.A.", + [3]byte{0, 6, 218}: "ITRAN Communications Ltd.", + [3]byte{0, 6, 219}: "ICHIPS Co., Ltd.", + [3]byte{0, 6, 220}: "Syabas Technology (Amquest)", + [3]byte{0, 6, 221}: "AT & T Laboratories - Cambridge Ltd", + [3]byte{0, 6, 222}: "Flash Technology", + [3]byte{0, 6, 223}: "AIDONIC Corporation", + [3]byte{0, 6, 224}: "MAT Co., Ltd.", + [3]byte{0, 6, 225}: "Techno Trade s.a", + [3]byte{0, 6, 226}: "Ceemax Technology Co., Ltd.", + [3]byte{0, 6, 227}: "Quantitative Imaging Corporation", + [3]byte{0, 6, 228}: "Citel Technologies Ltd.", + [3]byte{0, 6, 229}: "Fujian Newland Computer Ltd. Co.", + [3]byte{0, 6, 230}: "DongYang Telecom Co., Ltd.", + [3]byte{0, 6, 231}: "Bit Blitz Communications Inc.", + [3]byte{0, 6, 232}: "Optical Network Testing, Inc.", + [3]byte{0, 6, 233}: "Intime Corp.", + [3]byte{0, 6, 234}: "ELZET80 Mikrocomputer GmbH&Co. KG", + [3]byte{0, 6, 235}: "Global Data", + [3]byte{0, 6, 236}: "Harris Corporation", + [3]byte{0, 6, 237}: "Inara Networks", + [3]byte{0, 6, 238}: "Shenyang Neu-era Information & Technology Stock Co., Ltd", + [3]byte{0, 6, 239}: "Maxxan Systems, Inc.", + [3]byte{0, 6, 240}: "Digeo, Inc.", + [3]byte{0, 6, 241}: "Optillion", + [3]byte{0, 6, 242}: "Platys Communications", + [3]byte{0, 6, 243}: "AcceLight Networks", + [3]byte{0, 6, 244}: "Prime Electronics & Satellitics Inc.", + [3]byte{0, 6, 245}: "ALPS Co,. Ltd.", + [3]byte{0, 6, 246}: "CISCO SYSTEMS, INC.", + [3]byte{0, 6, 247}: "ALPS Co,. Ltd.", + [3]byte{0, 6, 248}: "The Boeing Company", + [3]byte{0, 6, 249}: "Mitsui Zosen Systems Research Inc.", + [3]byte{0, 6, 250}: "IP SQUARE Co, Ltd.", + [3]byte{0, 6, 251}: "Hitachi Printing Solutions, Ltd.", + [3]byte{0, 6, 252}: "Fnet Co., Ltd.", + [3]byte{0, 6, 253}: "Comjet Information Systems Corp.", + [3]byte{0, 6, 254}: "Ambrado, Inc", + [3]byte{0, 6, 255}: "Sheba Systems Co., Ltd.", + [3]byte{0, 7, 0}: "Zettamedia Korea", + [3]byte{0, 7, 1}: "RACAL-DATACOM", + [3]byte{0, 7, 2}: "Varian Medical Systems", + [3]byte{0, 7, 3}: "CSEE Transport", + [3]byte{0, 7, 4}: "ALPS Co,. Ltd.", + [3]byte{0, 7, 5}: "Endress & Hauser GmbH & Co", + [3]byte{0, 7, 6}: "Sanritz Corporation", + [3]byte{0, 7, 7}: "Interalia Inc.", + [3]byte{0, 7, 8}: "Bitrage Inc.", + [3]byte{0, 7, 9}: "Westerstrand Urfabrik AB", + [3]byte{0, 7, 10}: "Unicom Automation Co., Ltd.", + [3]byte{0, 7, 11}: "Novabase SGPS, SA", + [3]byte{0, 7, 12}: "SVA-Intrusion.com Co. Ltd.", + [3]byte{0, 7, 13}: "CISCO SYSTEMS, INC.", + [3]byte{0, 7, 14}: "CISCO SYSTEMS, INC.", + [3]byte{0, 7, 15}: "Fujant, Inc.", + [3]byte{0, 7, 16}: "Adax, Inc.", + [3]byte{0, 7, 17}: "Acterna", + [3]byte{0, 7, 18}: "JAL Information Technology", + [3]byte{0, 7, 19}: "IP One, Inc.", + [3]byte{0, 7, 20}: "Brightcom", + [3]byte{0, 7, 21}: "General Research of Electronics, Inc.", + [3]byte{0, 7, 22}: "J & S Marine Ltd.", + [3]byte{0, 7, 23}: "Wieland Electric GmbH", + [3]byte{0, 7, 24}: "iCanTek Co., Ltd.", + [3]byte{0, 7, 25}: "Mobiis Co., Ltd.", + [3]byte{0, 7, 26}: "Finedigital Inc.", + [3]byte{0, 7, 27}: "CDVI Americas Ltd", + [3]byte{0, 7, 28}: "AT&T Fixed Wireless Services", + [3]byte{0, 7, 29}: "Satelsa Sistemas Y Aplicaciones De Telecomunicaciones, S.A.", + [3]byte{0, 7, 30}: "Tri-M Engineering / Nupak Dev. Corp.", + [3]byte{0, 7, 31}: "European Systems Integration", + [3]byte{0, 7, 32}: "Trutzschler GmbH & Co. KG", + [3]byte{0, 7, 33}: "Formac Elektronik GmbH", + [3]byte{0, 7, 34}: "The Nielsen Company", + [3]byte{0, 7, 35}: "ELCON Systemtechnik GmbH", + [3]byte{0, 7, 36}: "Telemax Co., Ltd.", + [3]byte{0, 7, 37}: "Bematech International Corp.", + [3]byte{0, 7, 38}: "Shenzhen Gongjin Electronics Co., Ltd.", + [3]byte{0, 7, 39}: "Zi Corporation (HK) Ltd.", + [3]byte{0, 7, 40}: "Neo Telecom", + [3]byte{0, 7, 41}: "Kistler Instrumente AG", + [3]byte{0, 7, 42}: "Innovance Networks", + [3]byte{0, 7, 43}: "Jung Myung Telecom Co., Ltd.", + [3]byte{0, 7, 44}: "Fabricom", + [3]byte{0, 7, 45}: "CNSystems", + [3]byte{0, 7, 46}: "North Node AB", + [3]byte{0, 7, 47}: "Intransa, Inc.", + [3]byte{0, 7, 48}: "Hutchison OPTEL Telecom Technology Co., Ltd.", + [3]byte{0, 7, 49}: "Ophir-Spiricon LLC", + [3]byte{0, 7, 50}: "AAEON Technology Inc.", + [3]byte{0, 7, 51}: "DANCONTROL Engineering", + [3]byte{0, 7, 52}: "ONStor, Inc.", + [3]byte{0, 7, 53}: "Flarion Technologies, Inc.", + [3]byte{0, 7, 54}: "Data Video Technologies Co., Ltd.", + [3]byte{0, 7, 55}: "Soriya Co. Ltd.", + [3]byte{0, 7, 56}: "Young Technology Co., Ltd.", + [3]byte{0, 7, 57}: "Scotty Group Austria Gmbh", + [3]byte{0, 7, 58}: "Inventel Systemes", + [3]byte{0, 7, 59}: "Tenovis GmbH & Co KG", + [3]byte{0, 7, 60}: "Telecom Design", + [3]byte{0, 7, 61}: "Nanjing Postel Telecommunications Co., Ltd.", + [3]byte{0, 7, 62}: "China Great-Wall Computer Shenzhen Co., Ltd.", + [3]byte{0, 7, 63}: "Woojyun Systec Co., Ltd.", + [3]byte{0, 7, 64}: "Buffalo Inc.", + [3]byte{0, 7, 65}: "Sierra Automated Systems", + [3]byte{0, 7, 66}: "Current Technologies, LLC", + [3]byte{0, 7, 67}: "Chelsio Communications", + [3]byte{0, 7, 68}: "Unico, Inc.", + [3]byte{0, 7, 69}: "Radlan Computer Communications Ltd.", + [3]byte{0, 7, 70}: "TURCK, Inc.", + [3]byte{0, 7, 71}: "Mecalc", + [3]byte{0, 7, 72}: "The Imaging Source Europe", + [3]byte{0, 7, 73}: "CENiX Inc.", + [3]byte{0, 7, 74}: "Carl Valentin GmbH", + [3]byte{0, 7, 75}: "Daihen Corporation", + [3]byte{0, 7, 76}: "Beicom Inc.", + [3]byte{0, 7, 77}: "Zebra Technologies Corp.", + [3]byte{0, 7, 78}: "IPFRONT Inc", + [3]byte{0, 7, 79}: "CISCO SYSTEMS, INC.", + [3]byte{0, 7, 80}: "CISCO SYSTEMS, INC.", + [3]byte{0, 7, 81}: "m-u-t AG", + [3]byte{0, 7, 82}: "Rhythm Watch Co., Ltd.", + [3]byte{0, 7, 83}: "Beijing Qxcomm Technology Co., Ltd.", + [3]byte{0, 7, 84}: "Xyterra Computing, Inc.", + [3]byte{0, 7, 85}: "Lafon", + [3]byte{0, 7, 86}: "Juyoung Telecom", + [3]byte{0, 7, 87}: "Topcall International AG", + [3]byte{0, 7, 88}: "Dragonwave", + [3]byte{0, 7, 89}: "Boris Manufacturing Corp.", + [3]byte{0, 7, 90}: "Air Products and Chemicals, Inc.", + [3]byte{0, 7, 91}: "Gibson Guitars", + [3]byte{0, 7, 92}: "Eastman Kodak Company", + [3]byte{0, 7, 93}: "Celleritas Inc.", + [3]byte{0, 7, 94}: "Ametek Power Instruments", + [3]byte{0, 7, 95}: "VCS Video Communication Systems AG", + [3]byte{0, 7, 96}: "TOMIS Information & Telecom Corp.", + [3]byte{0, 7, 97}: "Logitech Europe SA", + [3]byte{0, 7, 98}: "Group Sense Limited", + [3]byte{0, 7, 99}: "Sunniwell Cyber Tech. Co., Ltd.", + [3]byte{0, 7, 100}: "YoungWoo Telecom Co. Ltd.", + [3]byte{0, 7, 101}: "Jade Quantum Technologies, Inc.", + [3]byte{0, 7, 102}: "Chou Chin Industrial Co., Ltd.", + [3]byte{0, 7, 103}: "Yuxing Electronics Company Limited", + [3]byte{0, 7, 104}: "Danfoss A/S", + [3]byte{0, 7, 105}: "Italiana Macchi SpA", + [3]byte{0, 7, 106}: "NEXTEYE Co., Ltd.", + [3]byte{0, 7, 107}: "Stralfors AB", + [3]byte{0, 7, 108}: "Daehanet, Inc.", + [3]byte{0, 7, 109}: "Flexlight Networks", + [3]byte{0, 7, 110}: "Sinetica Corporation Limited", + [3]byte{0, 7, 111}: "Synoptics Limited", + [3]byte{0, 7, 112}: "Ubiquoss Inc", + [3]byte{0, 7, 113}: "Embedded System Corporation", + [3]byte{0, 7, 114}: "Alcatel Shanghai Bell Co., Ltd.", + [3]byte{0, 7, 115}: "Ascom Powerline Communications Ltd.", + [3]byte{0, 7, 116}: "GuangZhou Thinker Technology Co. Ltd.", + [3]byte{0, 7, 117}: "Valence Semiconductor, Inc.", + [3]byte{0, 7, 118}: "Federal APD", + [3]byte{0, 7, 119}: "Motah Ltd.", + [3]byte{0, 7, 120}: "GERSTEL GmbH & Co. KG", + [3]byte{0, 7, 121}: "Sungil Telecom Co., Ltd.", + [3]byte{0, 7, 122}: "Infoware System Co., Ltd.", + [3]byte{0, 7, 123}: "Millimetrix Broadband Networks", + [3]byte{0, 7, 124}: "Westermo Teleindustri AB", + [3]byte{0, 7, 125}: "CISCO SYSTEMS, INC.", + [3]byte{0, 7, 126}: "Elrest GmbH", + [3]byte{0, 7, 127}: "J Communications Co., Ltd.", + [3]byte{0, 7, 128}: "Bluegiga Technologies OY", + [3]byte{0, 7, 129}: "Itron Inc.", + [3]byte{0, 7, 130}: "Oracle Corporation", + [3]byte{0, 7, 131}: "SynCom Network, Inc.", + [3]byte{0, 7, 132}: "CISCO SYSTEMS, INC.", + [3]byte{0, 7, 133}: "CISCO SYSTEMS, INC.", + [3]byte{0, 7, 134}: "Wireless Networks Inc.", + [3]byte{0, 7, 135}: "Idea System Co., Ltd.", + [3]byte{0, 7, 136}: "Clipcomm, Inc.", + [3]byte{0, 7, 137}: "DONGWON SYSTEMS", + [3]byte{0, 7, 138}: "Mentor Data System Inc.", + [3]byte{0, 7, 139}: "Wegener Communications, Inc.", + [3]byte{0, 7, 140}: "Elektronikspecialisten i Borlange AB", + [3]byte{0, 7, 141}: "NetEngines Ltd.", + [3]byte{0, 7, 142}: "Garz & Friche GmbH", + [3]byte{0, 7, 143}: "Emkay Innovative Products", + [3]byte{0, 7, 144}: "Tri-M Technologies (s) Limited", + [3]byte{0, 7, 145}: "International Data Communications, Inc.", + [3]byte{0, 7, 146}: "Sütron Electronic GmbH", + [3]byte{0, 7, 147}: "Shin Satellite Public Company Limited", + [3]byte{0, 7, 148}: "Simple Devices, Inc.", + [3]byte{0, 7, 149}: "Elitegroup Computer System Co. (ECS)", + [3]byte{0, 7, 150}: "LSI Systems, Inc.", + [3]byte{0, 7, 151}: "Netpower Co., Ltd.", + [3]byte{0, 7, 152}: "Selea SRL", + [3]byte{0, 7, 153}: "Tipping Point Technologies, Inc.", + [3]byte{0, 7, 154}: "Verint Systems Inc", + [3]byte{0, 7, 155}: "Aurora Networks", + [3]byte{0, 7, 156}: "Golden Electronics Technology Co., Ltd.", + [3]byte{0, 7, 157}: "Musashi Co., Ltd.", + [3]byte{0, 7, 158}: "Ilinx Co., Ltd.", + [3]byte{0, 7, 159}: "Action Digital Inc.", + [3]byte{0, 7, 160}: "e-Watch Inc.", + [3]byte{0, 7, 161}: "VIASYS Healthcare GmbH", + [3]byte{0, 7, 162}: "Opteon Corporation", + [3]byte{0, 7, 163}: "Ositis Software, Inc.", + [3]byte{0, 7, 164}: "GN Netcom Ltd.", + [3]byte{0, 7, 165}: "Y.D.K Co. Ltd.", + [3]byte{0, 7, 166}: "Home Automation, Inc.", + [3]byte{0, 7, 167}: "A-Z Inc.", + [3]byte{0, 7, 168}: "Haier Group Technologies Ltd.", + [3]byte{0, 7, 169}: "Novasonics", + [3]byte{0, 7, 170}: "Quantum Data Inc.", + [3]byte{0, 7, 171}: "Samsung Electronics Co.,Ltd", + [3]byte{0, 7, 172}: "Eolring", + [3]byte{0, 7, 173}: "Pentacon GmbH Foto-und Feinwerktechnik", + [3]byte{0, 7, 174}: "Britestream Networks, Inc.", + [3]byte{0, 7, 175}: "N-TRON Corporation", + [3]byte{0, 7, 176}: "Office Details, Inc.", + [3]byte{0, 7, 177}: "Equator Technologies", + [3]byte{0, 7, 178}: "Transaccess S.A.", + [3]byte{0, 7, 179}: "CISCO SYSTEMS, INC.", + [3]byte{0, 7, 180}: "CISCO SYSTEMS, INC.", + [3]byte{0, 7, 181}: "Any One Wireless Ltd.", + [3]byte{0, 7, 182}: "Telecom Technology Ltd.", + [3]byte{0, 7, 183}: "Samurai Ind. Prods Eletronicos Ltda", + [3]byte{0, 7, 184}: "Corvalent Corporation", + [3]byte{0, 7, 185}: "Ginganet Corporation", + [3]byte{0, 7, 186}: "UTStarcom, Inc.", + [3]byte{0, 7, 187}: "Candera Inc.", + [3]byte{0, 7, 188}: "Identix Inc.", + [3]byte{0, 7, 189}: "Radionet Ltd.", + [3]byte{0, 7, 190}: "DataLogic SpA", + [3]byte{0, 7, 191}: "Armillaire Technologies, Inc.", + [3]byte{0, 7, 192}: "NetZerver Inc.", + [3]byte{0, 7, 193}: "Overture Networks, Inc.", + [3]byte{0, 7, 194}: "Netsys Telecom", + [3]byte{0, 7, 195}: "Thomson", + [3]byte{0, 7, 196}: "JEAN Co. Ltd.", + [3]byte{0, 7, 197}: "Gcom, Inc.", + [3]byte{0, 7, 198}: "VDS Vosskuhler GmbH", + [3]byte{0, 7, 199}: "Synectics Systems Limited", + [3]byte{0, 7, 200}: "Brain21, Inc.", + [3]byte{0, 7, 201}: "Technol Seven Co., Ltd.", + [3]byte{0, 7, 202}: "Creatix Polymedia Ges Fur Kommunikaitonssysteme", + [3]byte{0, 7, 203}: "Freebox SA", + [3]byte{0, 7, 204}: "Kaba Benzing GmbH", + [3]byte{0, 7, 205}: "Kumoh Electronic Co, Ltd", + [3]byte{0, 7, 206}: "Cabletime Limited", + [3]byte{0, 7, 207}: "Anoto AB", + [3]byte{0, 7, 208}: "Automat Engenharia de Automação Ltda.", + [3]byte{0, 7, 209}: "Spectrum Signal Processing Inc.", + [3]byte{0, 7, 210}: "Logopak Systeme GmbH & Co. KG", + [3]byte{0, 7, 211}: "SPGPrints B.V.", + [3]byte{0, 7, 212}: "Zhejiang Yutong Network Communication Co Ltd.", + [3]byte{0, 7, 213}: "3e Technologies Int;., Inc.", + [3]byte{0, 7, 214}: "Commil Ltd.", + [3]byte{0, 7, 215}: "Caporis Networks AG", + [3]byte{0, 7, 216}: "Hitron Systems Inc.", + [3]byte{0, 7, 217}: "Splicecom", + [3]byte{0, 7, 218}: "Neuro Telecom Co., Ltd.", + [3]byte{0, 7, 219}: "Kirana Networks, Inc.", + [3]byte{0, 7, 220}: "Atek Co, Ltd.", + [3]byte{0, 7, 221}: "Cradle Technologies", + [3]byte{0, 7, 222}: "eCopilt AB", + [3]byte{0, 7, 223}: "Vbrick Systems Inc.", + [3]byte{0, 7, 224}: "Palm Inc.", + [3]byte{0, 7, 225}: "WIS Communications Co. Ltd.", + [3]byte{0, 7, 226}: "Bitworks, Inc.", + [3]byte{0, 7, 227}: "Navcom Technology, Inc.", + [3]byte{0, 7, 228}: "SoftRadio Co., Ltd.", + [3]byte{0, 7, 229}: "Coup Corporation", + [3]byte{0, 7, 230}: "edgeflow Canada Inc.", + [3]byte{0, 7, 231}: "FreeWave Technologies", + [3]byte{0, 7, 232}: "EdgeWave", + [3]byte{0, 7, 233}: "Intel Corporation", + [3]byte{0, 7, 234}: "Massana, Inc.", + [3]byte{0, 7, 235}: "CISCO SYSTEMS, INC.", + [3]byte{0, 7, 236}: "CISCO SYSTEMS, INC.", + [3]byte{0, 7, 237}: "Altera Corporation", + [3]byte{0, 7, 238}: "telco Informationssysteme GmbH", + [3]byte{0, 7, 239}: "Lockheed Martin Tactical Systems", + [3]byte{0, 7, 240}: "LogiSync LLC", + [3]byte{0, 7, 241}: "TeraBurst Networks Inc.", + [3]byte{0, 7, 242}: "IOA Corporation", + [3]byte{0, 7, 243}: "Thinkengine Networks", + [3]byte{0, 7, 244}: "Eletex Co., Ltd.", + [3]byte{0, 7, 245}: "Bridgeco Co AG", + [3]byte{0, 7, 246}: "Qqest Software Systems", + [3]byte{0, 7, 247}: "Galtronics", + [3]byte{0, 7, 248}: "ITDevices, Inc.", + [3]byte{0, 7, 249}: "Sensaphone", + [3]byte{0, 7, 250}: "ITT Co., Ltd.", + [3]byte{0, 7, 251}: "Giga Stream UMTS Technologies GmbH", + [3]byte{0, 7, 252}: "Adept Systems Inc.", + [3]byte{0, 7, 253}: "LANergy Ltd.", + [3]byte{0, 7, 254}: "Rigaku Corporation", + [3]byte{0, 7, 255}: "Gluon Networks", + [3]byte{0, 8, 0}: "MULTITECH SYSTEMS, INC.", + [3]byte{0, 8, 1}: "HighSpeed Surfing Inc.", + [3]byte{0, 8, 2}: "Hewlett-Packard Company", + [3]byte{0, 8, 3}: "Cos Tron", + [3]byte{0, 8, 4}: "ICA Inc.", + [3]byte{0, 8, 5}: "Techno-Holon Corporation", + [3]byte{0, 8, 6}: "Raonet Systems, Inc.", + [3]byte{0, 8, 7}: "Access Devices Limited", + [3]byte{0, 8, 8}: "PPT Vision, Inc.", + [3]byte{0, 8, 9}: "Systemonic AG", + [3]byte{0, 8, 10}: "Espera-Werke GmbH", + [3]byte{0, 8, 11}: "Birka BPA Informationssystem AB", + [3]byte{0, 8, 12}: "VDA Elettronica spa", + [3]byte{0, 8, 13}: "Toshiba", + [3]byte{0, 8, 14}: "ARRIS Group, Inc.", + [3]byte{0, 8, 15}: "Proximion Fiber Optics AB", + [3]byte{0, 8, 16}: "Key Technology, Inc.", + [3]byte{0, 8, 17}: "VOIX Corporation", + [3]byte{0, 8, 18}: "GM-2 Corporation", + [3]byte{0, 8, 19}: "Diskbank, Inc.", + [3]byte{0, 8, 20}: "TIL Technologies", + [3]byte{0, 8, 21}: "CATS Co., Ltd.", + [3]byte{0, 8, 22}: "Bluelon ApS", + [3]byte{0, 8, 23}: "EmergeCore Networks LLC", + [3]byte{0, 8, 24}: "Pixelworks, Inc.", + [3]byte{0, 8, 25}: "Banksys", + [3]byte{0, 8, 26}: "Sanrad Intelligence Storage Communications (2000) Ltd.", + [3]byte{0, 8, 27}: "Windigo Systems", + [3]byte{0, 8, 28}: "@pos.com", + [3]byte{0, 8, 29}: "Ipsil, Incorporated", + [3]byte{0, 8, 30}: "Repeatit AB", + [3]byte{0, 8, 31}: "Pou Yuen Tech Corp. Ltd.", + [3]byte{0, 8, 32}: "CISCO SYSTEMS, INC.", + [3]byte{0, 8, 33}: "CISCO SYSTEMS, INC.", + [3]byte{0, 8, 34}: "InPro Comm", + [3]byte{0, 8, 35}: "Texa Corp.", + [3]byte{0, 8, 36}: "Nuance Document Imaging", + [3]byte{0, 8, 37}: "Acme Packet", + [3]byte{0, 8, 38}: "Colorado Med Tech", + [3]byte{0, 8, 39}: "ADB Broadband Italia", + [3]byte{0, 8, 40}: "Koei Engineering Ltd.", + [3]byte{0, 8, 41}: "Aval Nagasaki Corporation", + [3]byte{0, 8, 42}: "Powerwallz Network Security", + [3]byte{0, 8, 43}: "Wooksung Electronics, Inc.", + [3]byte{0, 8, 44}: "Homag AG", + [3]byte{0, 8, 45}: "Indus Teqsite Private Limited", + [3]byte{0, 8, 46}: "Multitone Electronics PLC", + [3]byte{0, 8, 47}: "CISCO SYSTEMS, INC.", + [3]byte{0, 8, 48}: "CISCO SYSTEMS, INC.", + [3]byte{0, 8, 49}: "CISCO SYSTEMS, INC.", + [3]byte{0, 8, 50}: "Cisco", + [3]byte{0, 8, 78}: "DivergeNet, Inc.", + [3]byte{0, 8, 79}: "Qualstar Corporation", + [3]byte{0, 8, 80}: "Arizona Instrument Corp.", + [3]byte{0, 8, 81}: "Canadian Bank Note Company, Ltd.", + [3]byte{0, 8, 82}: "Davolink Co. Inc.", + [3]byte{0, 8, 83}: "Schleicher GmbH & Co. Relaiswerke KG", + [3]byte{0, 8, 84}: "Netronix, Inc.", + [3]byte{0, 8, 85}: "NASA-Goddard Space Flight Center", + [3]byte{0, 8, 86}: "Gamatronic Electronic Industries Ltd.", + [3]byte{0, 8, 87}: "Polaris Networks, Inc.", + [3]byte{0, 8, 88}: "Novatechnology Inc.", + [3]byte{0, 8, 89}: "ShenZhen Unitone Electronics Co., Ltd.", + [3]byte{0, 8, 90}: "IntiGate Inc.", + [3]byte{0, 8, 91}: "Hanbit Electronics Co., Ltd.", + [3]byte{0, 8, 92}: "Shanghai Dare Technologies Co. Ltd.", + [3]byte{0, 8, 93}: "Aastra", + [3]byte{0, 8, 94}: "PCO AG", + [3]byte{0, 8, 95}: "Picanol N.V.", + [3]byte{0, 8, 96}: "LodgeNet Entertainment Corp.", + [3]byte{0, 8, 97}: "SoftEnergy Co., Ltd.", + [3]byte{0, 8, 98}: "NEC Eluminant Technologies, Inc.", + [3]byte{0, 8, 99}: "Entrisphere Inc.", + [3]byte{0, 8, 100}: "Fasy S.p.A.", + [3]byte{0, 8, 101}: "JASCOM CO., LTD", + [3]byte{0, 8, 102}: "DSX Access Systems, Inc.", + [3]byte{0, 8, 103}: "Uptime Devices", + [3]byte{0, 8, 104}: "PurOptix", + [3]byte{0, 8, 105}: "Command-e Technology Co.,Ltd.", + [3]byte{0, 8, 106}: "Securiton Gmbh", + [3]byte{0, 8, 107}: "MIPSYS", + [3]byte{0, 8, 108}: "Plasmon LMS", + [3]byte{0, 8, 109}: "Missouri FreeNet", + [3]byte{0, 8, 110}: "Hyglo AB", + [3]byte{0, 8, 111}: "Resources Computer Network Ltd.", + [3]byte{0, 8, 112}: "Rasvia Systems, Inc.", + [3]byte{0, 8, 113}: "NORTHDATA Co., Ltd.", + [3]byte{0, 8, 114}: "Sorenson Communications", + [3]byte{0, 8, 115}: "DapTechnology B.V.", + [3]byte{0, 8, 116}: "Dell Computer Corp.", + [3]byte{0, 8, 117}: "Acorp Electronics Corp.", + [3]byte{0, 8, 118}: "SDSystem", + [3]byte{0, 8, 119}: "Liebert-Hiross Spa", + [3]byte{0, 8, 120}: "Benchmark Storage Innovations", + [3]byte{0, 8, 121}: "CEM Corporation", + [3]byte{0, 8, 122}: "Wipotec GmbH", + [3]byte{0, 8, 123}: "RTX Telecom A/S", + [3]byte{0, 8, 124}: "CISCO SYSTEMS, INC.", + [3]byte{0, 8, 125}: "CISCO SYSTEMS, INC.", + [3]byte{0, 8, 126}: "Bon Electro-Telecom Inc.", + [3]byte{0, 8, 127}: "SPAUN electronic GmbH & Co. KG", + [3]byte{0, 8, 128}: "BroadTel Canada Communications inc.", + [3]byte{0, 8, 129}: "DIGITAL HANDS CO.,LTD.", + [3]byte{0, 8, 130}: "SIGMA CORPORATION", + [3]byte{0, 8, 131}: "Hewlett-Packard Company", + [3]byte{0, 8, 132}: "Index Braille AB", + [3]byte{0, 8, 133}: "EMS Dr. Thomas Wünsche", + [3]byte{0, 8, 134}: "Hansung Teliann, Inc.", + [3]byte{0, 8, 135}: "Maschinenfabrik Reinhausen GmbH", + [3]byte{0, 8, 136}: "OULLIM Information Technology Inc,.", + [3]byte{0, 8, 137}: "Echostar Technologies Corp", + [3]byte{0, 8, 138}: "Minds@Work", + [3]byte{0, 8, 139}: "Tropic Networks Inc.", + [3]byte{0, 8, 140}: "Quanta Network Systems Inc.", + [3]byte{0, 8, 141}: "Sigma-Links Inc.", + [3]byte{0, 8, 142}: "Nihon Computer Co., Ltd.", + [3]byte{0, 8, 143}: "ADVANCED DIGITAL TECHNOLOGY", + [3]byte{0, 8, 144}: "AVILINKS SA", + [3]byte{0, 8, 145}: "Lyan Inc.", + [3]byte{0, 8, 146}: "EM Solutions", + [3]byte{0, 8, 147}: "LE INFORMATION COMMUNICATION INC.", + [3]byte{0, 8, 148}: "InnoVISION Multimedia Ltd.", + [3]byte{0, 8, 149}: "DIRC Technologie GmbH & Co.KG", + [3]byte{0, 8, 150}: "Printronix, Inc.", + [3]byte{0, 8, 151}: "Quake Technologies", + [3]byte{0, 8, 152}: "Gigabit Optics Corporation", + [3]byte{0, 8, 153}: "Netbind, Inc.", + [3]byte{0, 8, 154}: "Alcatel Microelectronics", + [3]byte{0, 8, 155}: "ICP Electronics Inc.", + [3]byte{0, 8, 156}: "Elecs Industry Co., Ltd.", + [3]byte{0, 8, 157}: "UHD-Elektronik", + [3]byte{0, 8, 158}: "Beijing Enter-Net co.LTD", + [3]byte{0, 8, 159}: "EFM Networks", + [3]byte{0, 8, 160}: "Stotz Feinmesstechnik GmbH", + [3]byte{0, 8, 161}: "CNet Technology Inc.", + [3]byte{0, 8, 162}: "ADI Engineering, Inc.", + [3]byte{0, 8, 163}: "CISCO SYSTEMS, INC.", + [3]byte{0, 8, 164}: "CISCO SYSTEMS, INC.", + [3]byte{0, 8, 165}: "Peninsula Systems Inc.", + [3]byte{0, 8, 166}: "Multiware & Image Co., Ltd.", + [3]byte{0, 8, 167}: "iLogic Inc.", + [3]byte{0, 8, 168}: "Systec Co., Ltd.", + [3]byte{0, 8, 169}: "SangSang Technology, Inc.", + [3]byte{0, 8, 170}: "KARAM", + [3]byte{0, 8, 171}: "EnerLinx.com, Inc.", + [3]byte{0, 8, 172}: "Eltromat GmbH", + [3]byte{0, 8, 173}: "Toyo-Linx Co., Ltd.", + [3]byte{0, 8, 174}: "PacketFront Network Products AB", + [3]byte{0, 8, 175}: "Novatec Corporation", + [3]byte{0, 8, 176}: "BKtel communications GmbH", + [3]byte{0, 8, 177}: "ProQuent Systems", + [3]byte{0, 8, 178}: "SHENZHEN COMPASS TECHNOLOGY DEVELOPMENT CO.,LTD", + [3]byte{0, 8, 179}: "Fastwel", + [3]byte{0, 8, 180}: "SYSPOL", + [3]byte{0, 8, 181}: "TAI GUEN ENTERPRISE CO., LTD", + [3]byte{0, 8, 182}: "RouteFree, Inc.", + [3]byte{0, 8, 183}: "HIT Incorporated", + [3]byte{0, 8, 184}: "E.F. Johnson", + [3]byte{0, 8, 185}: "KAON MEDIA Co., Ltd.", + [3]byte{0, 8, 186}: "Erskine Systems Ltd", + [3]byte{0, 8, 187}: "NetExcell", + [3]byte{0, 8, 188}: "Ilevo AB", + [3]byte{0, 8, 189}: "TEPG-US", + [3]byte{0, 8, 190}: "XENPAK MSA Group", + [3]byte{0, 8, 191}: "Aptus Elektronik AB", + [3]byte{0, 8, 192}: "ASA SYSTEMS", + [3]byte{0, 8, 193}: "Avistar Communications Corporation", + [3]byte{0, 8, 194}: "CISCO SYSTEMS, INC.", + [3]byte{0, 8, 195}: "Contex A/S", + [3]byte{0, 8, 196}: "Hikari Co.,Ltd.", + [3]byte{0, 8, 197}: "Liontech Co., Ltd.", + [3]byte{0, 8, 198}: "Philips Consumer Communications", + [3]byte{0, 8, 199}: "Hewlett-Packard Company", + [3]byte{0, 8, 200}: "Soneticom, Inc.", + [3]byte{0, 8, 201}: "TechniSat Digital GmbH", + [3]byte{0, 8, 202}: "TwinHan Technology Co.,Ltd", + [3]byte{0, 8, 203}: "Zeta Broadband Inc.", + [3]byte{0, 8, 204}: "Remotec, Inc.", + [3]byte{0, 8, 205}: "With-Net Inc", + [3]byte{0, 8, 206}: "IPMobileNet Inc.", + [3]byte{0, 8, 207}: "Nippon Koei Power Systems Co., Ltd.", + [3]byte{0, 8, 208}: "Musashi Engineering Co., LTD.", + [3]byte{0, 8, 209}: "KAREL INC.", + [3]byte{0, 8, 210}: "ZOOM Networks Inc.", + [3]byte{0, 8, 211}: "Hercules Technologies S.A.S.", + [3]byte{0, 8, 212}: "IneoQuest Technologies, Inc", + [3]byte{0, 8, 213}: "Vanguard Networks Solutions, LLC", + [3]byte{0, 8, 214}: "HASSNET Inc.", + [3]byte{0, 8, 215}: "HOW CORPORATION", + [3]byte{0, 8, 216}: "Dowkey Microwave", + [3]byte{0, 8, 217}: "Mitadenshi Co.,LTD", + [3]byte{0, 8, 218}: "SofaWare Technologies Ltd.", + [3]byte{0, 8, 219}: "Corrigent Systems", + [3]byte{0, 8, 220}: "Wiznet", + [3]byte{0, 8, 221}: "Telena Communications, Inc.", + [3]byte{0, 8, 222}: "3UP Systems", + [3]byte{0, 8, 223}: "Alistel Inc.", + [3]byte{0, 8, 224}: "ATO Technology Ltd.", + [3]byte{0, 8, 225}: "Barix AG", + [3]byte{0, 8, 226}: "CISCO SYSTEMS, INC.", + [3]byte{0, 8, 227}: "CISCO SYSTEMS, INC.", + [3]byte{0, 8, 228}: "Envenergy Inc", + [3]byte{0, 8, 229}: "IDK Corporation", + [3]byte{0, 8, 230}: "Littlefeet", + [3]byte{0, 8, 231}: "SHI ControlSystems,Ltd.", + [3]byte{0, 8, 232}: "Excel Master Ltd.", + [3]byte{0, 8, 233}: "NextGig", + [3]byte{0, 8, 234}: "Motion Control Engineering, Inc", + [3]byte{0, 8, 235}: "ROMWin Co.,Ltd.", + [3]byte{0, 8, 236}: "Optical Zonu Corporation", + [3]byte{0, 8, 237}: "ST&T Instrument Corp.", + [3]byte{0, 8, 238}: "Logic Product Development", + [3]byte{0, 8, 239}: "DIBAL,S.A.", + [3]byte{0, 8, 240}: "Next Generation Systems, Inc.", + [3]byte{0, 8, 241}: "Voltaire", + [3]byte{0, 8, 242}: "C&S Technology", + [3]byte{0, 8, 243}: "WANY", + [3]byte{0, 8, 244}: "Bluetake Technology Co., Ltd.", + [3]byte{0, 8, 245}: "YESTECHNOLOGY Co.,Ltd.", + [3]byte{0, 8, 246}: "Sumitomo Electric System Solutions Co., Ltd.", + [3]byte{0, 8, 247}: "Hitachi Ltd, Semiconductor & Integrated Circuits Gr", + [3]byte{0, 8, 248}: "UTC CCS", + [3]byte{0, 8, 249}: "Artesyn Embedded Technologies", + [3]byte{0, 8, 250}: "Karl E.Brinkmann GmbH", + [3]byte{0, 8, 251}: "SonoSite, Inc.", + [3]byte{0, 8, 252}: "Gigaphoton Inc.", + [3]byte{0, 8, 253}: "BlueKorea Co., Ltd.", + [3]byte{0, 8, 254}: "UNIK C&C Co.,Ltd.", + [3]byte{0, 8, 255}: "Trilogy Communications Ltd", + [3]byte{0, 9, 0}: "TMT", + [3]byte{0, 9, 1}: "Shenzhen Shixuntong Information & Technoligy Co", + [3]byte{0, 9, 2}: "Redline Communications Inc.", + [3]byte{0, 9, 3}: "Panasas, Inc", + [3]byte{0, 9, 4}: "MONDIAL electronic", + [3]byte{0, 9, 5}: "iTEC Technologies Ltd.", + [3]byte{0, 9, 6}: "Esteem Networks", + [3]byte{0, 9, 7}: "Chrysalis Development", + [3]byte{0, 9, 8}: "VTech Technology Corp.", + [3]byte{0, 9, 9}: "Telenor Connect A/S", + [3]byte{0, 9, 10}: "SnedFar Technology Co., Ltd.", + [3]byte{0, 9, 11}: "MTL Instruments PLC", + [3]byte{0, 9, 12}: "Mayekawa Mfg. Co. Ltd.", + [3]byte{0, 9, 13}: "LEADER ELECTRONICS CORP.", + [3]byte{0, 9, 14}: "Helix Technology Inc.", + [3]byte{0, 9, 15}: "Fortinet Inc.", + [3]byte{0, 9, 16}: "Simple Access Inc.", + [3]byte{0, 9, 17}: "CISCO SYSTEMS, INC.", + [3]byte{0, 9, 18}: "CISCO SYSTEMS, INC.", + [3]byte{0, 9, 19}: "SystemK Corporation", + [3]byte{0, 9, 20}: "COMPUTROLS INC.", + [3]byte{0, 9, 21}: "CAS Corp.", + [3]byte{0, 9, 22}: "Listman Home Technologies, Inc.", + [3]byte{0, 9, 23}: "WEM Technology Inc", + [3]byte{0, 9, 24}: "SAMSUNG TECHWIN CO.,LTD", + [3]byte{0, 9, 25}: "MDS Gateways", + [3]byte{0, 9, 26}: "Macat Optics & Electronics Co., Ltd.", + [3]byte{0, 9, 27}: "Digital Generation Inc.", + [3]byte{0, 9, 28}: "CacheVision, Inc", + [3]byte{0, 9, 29}: "Proteam Computer Corporation", + [3]byte{0, 9, 30}: "Firstech Technology Corp.", + [3]byte{0, 9, 31}: "A&D Co., Ltd.", + [3]byte{0, 9, 32}: "EpoX COMPUTER CO.,LTD.", + [3]byte{0, 9, 33}: "Planmeca Oy", + [3]byte{0, 9, 34}: "TST Biometrics GmbH", + [3]byte{0, 9, 35}: "Heaman System Co., Ltd", + [3]byte{0, 9, 36}: "Telebau GmbH", + [3]byte{0, 9, 37}: "VSN Systemen BV", + [3]byte{0, 9, 38}: "YODA COMMUNICATIONS, INC.", + [3]byte{0, 9, 39}: "TOYOKEIKI CO.,LTD.", + [3]byte{0, 9, 40}: "Telecore", + [3]byte{0, 9, 41}: "Sanyo Industries (UK) Limited", + [3]byte{0, 9, 42}: "MYTECS Co.,Ltd.", + [3]byte{0, 9, 43}: "iQstor Networks, Inc.", + [3]byte{0, 9, 44}: "Hitpoint Inc.", + [3]byte{0, 9, 45}: "HTC Corporation", + [3]byte{0, 9, 46}: "B&Tech System Inc.", + [3]byte{0, 9, 47}: "Akom Technology Corporation", + [3]byte{0, 9, 48}: "AeroConcierge Inc.", + [3]byte{0, 9, 49}: "Future Internet, Inc.", + [3]byte{0, 9, 50}: "Omnilux", + [3]byte{0, 9, 51}: "Ophit Co.Ltd.", + [3]byte{0, 9, 52}: "Dream-Multimedia-Tv GmbH", + [3]byte{0, 9, 53}: "Sandvine Incorporated", + [3]byte{0, 9, 54}: "Ipetronik GmbH & Co. KG", + [3]byte{0, 9, 55}: "Inventec Appliance Corp", + [3]byte{0, 9, 56}: "Allot Communications", + [3]byte{0, 9, 57}: "ShibaSoku Co.,Ltd.", + [3]byte{0, 9, 58}: "Molex Fiber Optics", + [3]byte{0, 9, 59}: "HYUNDAI NETWORKS INC.", + [3]byte{0, 9, 60}: "Jacques Technologies P/L", + [3]byte{0, 9, 61}: "Newisys,Inc.", + [3]byte{0, 9, 62}: "C&I Technologies", + [3]byte{0, 9, 63}: "Double-Win Enterpirse CO., LTD", + [3]byte{0, 9, 64}: "AGFEO GmbH & Co. KG", + [3]byte{0, 9, 65}: "Allied Telesis K.K.", + [3]byte{0, 9, 66}: "Wireless Technologies, Inc", + [3]byte{0, 9, 67}: "CISCO SYSTEMS, INC.", + [3]byte{0, 9, 68}: "CISCO SYSTEMS, INC.", + [3]byte{0, 9, 69}: "Palmmicro Communications Inc", + [3]byte{0, 9, 70}: "Cluster Labs GmbH", + [3]byte{0, 9, 71}: "Aztek, Inc.", + [3]byte{0, 9, 72}: "Vista Control Systems, Corp.", + [3]byte{0, 9, 73}: "Glyph Technologies Inc.", + [3]byte{0, 9, 74}: "Homenet Communications", + [3]byte{0, 9, 75}: "FillFactory NV", + [3]byte{0, 9, 76}: "Communication Weaver Co.,Ltd.", + [3]byte{0, 9, 77}: "Braintree Communications Pty Ltd", + [3]byte{0, 9, 78}: "BARTECH SYSTEMS INTERNATIONAL, INC", + [3]byte{0, 9, 79}: "elmegt GmbH & Co. KG", + [3]byte{0, 9, 80}: "Independent Storage Corporation", + [3]byte{0, 9, 81}: "Apogee Imaging Systems", + [3]byte{0, 9, 82}: "Auerswald GmbH & Co. KG", + [3]byte{0, 9, 83}: "Linkage System Integration Co.Ltd.", + [3]byte{0, 9, 84}: "AMiT spol. s. r. o.", + [3]byte{0, 9, 85}: "Young Generation International Corp.", + [3]byte{0, 9, 86}: "Network Systems Group, Ltd. (NSG)", + [3]byte{0, 9, 87}: "Supercaller, Inc.", + [3]byte{0, 9, 88}: "INTELNET S.A.", + [3]byte{0, 9, 89}: "Sitecsoft", + [3]byte{0, 9, 90}: "RACEWOOD TECHNOLOGY", + [3]byte{0, 9, 91}: "Netgear, Inc.", + [3]byte{0, 9, 92}: "Philips Medical Systems - Cardiac and Monitoring Systems (CM", + [3]byte{0, 9, 93}: "Dialogue Technology Corp.", + [3]byte{0, 9, 94}: "Masstech Group Inc.", + [3]byte{0, 9, 95}: "Telebyte, Inc.", + [3]byte{0, 9, 96}: "YOZAN Inc.", + [3]byte{0, 9, 97}: "Switchgear and Instrumentation Ltd", + [3]byte{0, 9, 98}: "Sonitor Technologies AS", + [3]byte{0, 9, 99}: "Dominion Lasercom Inc.", + [3]byte{0, 9, 100}: "Hi-Techniques, Inc.", + [3]byte{0, 9, 101}: "HyunJu Computer Co., Ltd.", + [3]byte{0, 9, 102}: "Thales Navigation", + [3]byte{0, 9, 103}: "Tachyon, Inc", + [3]byte{0, 9, 104}: "TECHNOVENTURE, INC.", + [3]byte{0, 9, 105}: "Meret Optical Communications", + [3]byte{0, 9, 106}: "Cloverleaf Communications Inc.", + [3]byte{0, 9, 107}: "IBM Corp", + [3]byte{0, 9, 108}: "Imedia Semiconductor Corp.", + [3]byte{0, 9, 109}: "Powernet Technologies Corp.", + [3]byte{0, 9, 110}: "GIANT ELECTRONICS LTD.", + [3]byte{0, 9, 111}: "Beijing Zhongqing Elegant Tech. Corp.,Limited", + [3]byte{0, 9, 112}: "Vibration Research Corporation", + [3]byte{0, 9, 113}: "Time Management, Inc.", + [3]byte{0, 9, 114}: "Securebase,Inc", + [3]byte{0, 9, 115}: "Lenten Technology Co., Ltd.", + [3]byte{0, 9, 116}: "Innopia Technologies, Inc.", + [3]byte{0, 9, 117}: "fSONA Communications Corporation", + [3]byte{0, 9, 118}: "Datasoft ISDN Systems GmbH", + [3]byte{0, 9, 119}: "Brunner Elektronik AG", + [3]byte{0, 9, 120}: "AIJI System Co., Ltd.", + [3]byte{0, 9, 121}: "Advanced Television Systems Committee, Inc.", + [3]byte{0, 9, 122}: "Louis Design Labs.", + [3]byte{0, 9, 123}: "CISCO SYSTEMS, INC.", + [3]byte{0, 9, 124}: "CISCO SYSTEMS, INC.", + [3]byte{0, 9, 125}: "SecWell Networks Oy", + [3]byte{0, 9, 126}: "IMI TECHNOLOGY CO., LTD", + [3]byte{0, 9, 127}: "Vsecure 2000 LTD.", + [3]byte{0, 9, 128}: "Power Zenith Inc.", + [3]byte{0, 9, 129}: "Newport Networks", + [3]byte{0, 9, 130}: "Loewe Opta GmbH", + [3]byte{0, 9, 131}: "GlobalTop Technology, Inc.", + [3]byte{0, 9, 132}: "MyCasa Network Inc.", + [3]byte{0, 9, 133}: "Auto Telecom Company", + [3]byte{0, 9, 134}: "Metalink LTD.", + [3]byte{0, 9, 135}: "NISHI NIPPON ELECTRIC WIRE & CABLE CO.,LTD.", + [3]byte{0, 9, 136}: "Nudian Electron Co., Ltd.", + [3]byte{0, 9, 137}: "VividLogic Inc.", + [3]byte{0, 9, 138}: "EqualLogic Inc", + [3]byte{0, 9, 139}: "Entropic Communications, Inc.", + [3]byte{0, 9, 140}: "Option Wireless Sweden", + [3]byte{0, 9, 141}: "Velocity Semiconductor", + [3]byte{0, 9, 142}: "ipcas GmbH", + [3]byte{0, 9, 143}: "Cetacean Networks", + [3]byte{0, 9, 144}: "ACKSYS Communications & systems", + [3]byte{0, 9, 145}: "GE Fanuc Automation Manufacturing, Inc.", + [3]byte{0, 9, 146}: "InterEpoch Technology,INC.", + [3]byte{0, 9, 147}: "Visteon Corporation", + [3]byte{0, 9, 148}: "Cronyx Engineering", + [3]byte{0, 9, 149}: "Castle Technology Ltd", + [3]byte{0, 9, 150}: "RDI", + [3]byte{0, 9, 151}: "Nortel Networks", + [3]byte{0, 9, 152}: "Capinfo Company Limited", + [3]byte{0, 9, 153}: "CP GEORGES RENAULT", + [3]byte{0, 9, 154}: "ELMO COMPANY, LIMITED", + [3]byte{0, 9, 155}: "Western Telematic Inc.", + [3]byte{0, 9, 156}: "Naval Research Laboratory", + [3]byte{0, 9, 157}: "Haliplex Communications", + [3]byte{0, 9, 158}: "Testech, Inc.", + [3]byte{0, 9, 159}: "VIDEX INC.", + [3]byte{0, 9, 160}: "Microtechno Corporation", + [3]byte{0, 9, 161}: "Telewise Communications, Inc.", + [3]byte{0, 9, 162}: "Interface Co., Ltd.", + [3]byte{0, 9, 163}: "Leadfly Techologies Corp. Ltd.", + [3]byte{0, 9, 164}: "HARTEC Corporation", + [3]byte{0, 9, 165}: "HANSUNG ELETRONIC INDUSTRIES DEVELOPMENT CO., LTD", + [3]byte{0, 9, 166}: "Ignis Optics, Inc.", + [3]byte{0, 9, 167}: "Bang & Olufsen A/S", + [3]byte{0, 9, 168}: "Eastmode Pte Ltd", + [3]byte{0, 9, 169}: "Ikanos Communications", + [3]byte{0, 9, 170}: "Data Comm for Business, Inc.", + [3]byte{0, 9, 171}: "Netcontrol Oy", + [3]byte{0, 9, 172}: "LANVOICE", + [3]byte{0, 9, 173}: "HYUNDAI SYSCOMM, INC.", + [3]byte{0, 9, 174}: "OKANO ELECTRIC CO.,LTD", + [3]byte{0, 9, 175}: "e-generis", + [3]byte{0, 9, 176}: "Onkyo Corporation", + [3]byte{0, 9, 177}: "Kanematsu Electronics, Ltd.", + [3]byte{0, 9, 178}: "L&F Inc.", + [3]byte{0, 9, 179}: "MCM Systems Ltd", + [3]byte{0, 9, 180}: "KISAN TELECOM CO., LTD.", + [3]byte{0, 9, 181}: "3J Tech. Co., Ltd.", + [3]byte{0, 9, 182}: "CISCO SYSTEMS, INC.", + [3]byte{0, 9, 183}: "CISCO SYSTEMS, INC.", + [3]byte{0, 9, 184}: "Entise Systems", + [3]byte{0, 9, 185}: "Action Imaging Solutions", + [3]byte{0, 9, 186}: "MAKU Informationstechik GmbH", + [3]byte{0, 9, 187}: "MathStar, Inc.", + [3]byte{0, 9, 188}: "Digital Safety Technologies, Inc", + [3]byte{0, 9, 189}: "Epygi Technologies, Ltd.", + [3]byte{0, 9, 190}: "Mamiya-OP Co.,Ltd.", + [3]byte{0, 9, 191}: "Nintendo Co., Ltd.", + [3]byte{0, 9, 192}: "6WIND", + [3]byte{0, 9, 193}: "PROCES-DATA A/S", + [3]byte{0, 9, 194}: "Onity, Inc.", + [3]byte{0, 9, 195}: "NETAS", + [3]byte{0, 9, 196}: "Medicore Co., Ltd", + [3]byte{0, 9, 197}: "KINGENE Technology Corporation", + [3]byte{0, 9, 198}: "Visionics Corporation", + [3]byte{0, 9, 199}: "Movistec", + [3]byte{0, 9, 200}: "SINAGAWA TSUSHIN KEISOU SERVICE", + [3]byte{0, 9, 201}: "BlueWINC Co., Ltd.", + [3]byte{0, 9, 202}: "iMaxNetworks(Shenzhen)Limited.", + [3]byte{0, 9, 203}: "HBrain", + [3]byte{0, 9, 204}: "Moog GmbH", + [3]byte{0, 9, 205}: "HUDSON SOFT CO.,LTD.", + [3]byte{0, 9, 206}: "SpaceBridge Semiconductor Corp.", + [3]byte{0, 9, 207}: "iAd GmbH", + [3]byte{0, 9, 208}: "Solacom Technologies Inc.", + [3]byte{0, 9, 209}: "SERANOA NETWORKS INC", + [3]byte{0, 9, 210}: "Mai Logic Inc.", + [3]byte{0, 9, 211}: "Western DataCom Co., Inc.", + [3]byte{0, 9, 212}: "Transtech Networks", + [3]byte{0, 9, 213}: "Signal Communication, Inc.", + [3]byte{0, 9, 214}: "KNC One GmbH", + [3]byte{0, 9, 215}: "DC Security Products", + [3]byte{0, 9, 216}: "Fält Communications AB", + [3]byte{0, 9, 217}: "Neoscale Systems, Inc", + [3]byte{0, 9, 218}: "Control Module Inc.", + [3]byte{0, 9, 219}: "eSpace", + [3]byte{0, 9, 220}: "Galaxis Technology AG", + [3]byte{0, 9, 221}: "Mavin Technology Inc.", + [3]byte{0, 9, 222}: "Samjin Information & Communications Co., Ltd.", + [3]byte{0, 9, 223}: "Vestel Komunikasyon Sanayi ve Ticaret A.S.", + [3]byte{0, 9, 224}: "XEMICS S.A.", + [3]byte{0, 9, 225}: "Gemtek Technology Co., Ltd.", + [3]byte{0, 9, 226}: "Sinbon Electronics Co., Ltd.", + [3]byte{0, 9, 227}: "Angel Iglesias S.A.", + [3]byte{0, 9, 228}: "K Tech Infosystem Inc.", + [3]byte{0, 9, 229}: "Hottinger Baldwin Messtechnik GmbH", + [3]byte{0, 9, 230}: "Cyber Switching Inc.", + [3]byte{0, 9, 231}: "ADC Techonology", + [3]byte{0, 9, 232}: "CISCO SYSTEMS, INC.", + [3]byte{0, 9, 233}: "CISCO SYSTEMS, INC.", + [3]byte{0, 9, 234}: "YEM Inc.", + [3]byte{0, 9, 235}: "HuMANDATA LTD.", + [3]byte{0, 9, 236}: "Daktronics, Inc.", + [3]byte{0, 9, 237}: "CipherOptics", + [3]byte{0, 9, 238}: "MEIKYO ELECTRIC CO.,LTD", + [3]byte{0, 9, 239}: "Vocera Communications", + [3]byte{0, 9, 240}: "Shimizu Technology Inc.", + [3]byte{0, 9, 241}: "Yamaki Electric Corporation", + [3]byte{0, 9, 242}: "Cohu, Inc., Electronics Division", + [3]byte{0, 9, 243}: "WELL Communication Corp.", + [3]byte{0, 9, 244}: "Alcon Laboratories, Inc.", + [3]byte{0, 9, 245}: "Emerson Network Power Co.,Ltd", + [3]byte{0, 9, 246}: "Shenzhen Eastern Digital Tech Ltd.", + [3]byte{0, 9, 247}: "SED, a division of Calian", + [3]byte{0, 9, 248}: "UNIMO TECHNOLOGY CO., LTD.", + [3]byte{0, 9, 249}: "ART JAPAN CO., LTD.", + [3]byte{0, 9, 251}: "Philips Patient Monitoring", + [3]byte{0, 9, 252}: "IPFLEX Inc.", + [3]byte{0, 9, 253}: "Ubinetics Limited", + [3]byte{0, 9, 254}: "Daisy Technologies, Inc.", + [3]byte{0, 9, 255}: "X.net 2000 GmbH", + [3]byte{0, 10, 0}: "Mediatek Corp.", + [3]byte{0, 10, 1}: "SOHOware, Inc.", + [3]byte{0, 10, 2}: "ANNSO CO., LTD.", + [3]byte{0, 10, 3}: "ENDESA SERVICIOS, S.L.", + [3]byte{0, 10, 4}: "3Com Ltd", + [3]byte{0, 10, 5}: "Widax Corp.", + [3]byte{0, 10, 6}: "Teledex LLC", + [3]byte{0, 10, 7}: "WebWayOne Ltd", + [3]byte{0, 10, 8}: "ALPINE ELECTRONICS, INC.", + [3]byte{0, 10, 9}: "TaraCom Integrated Products, Inc.", + [3]byte{0, 10, 10}: "SUNIX Co., Ltd.", + [3]byte{0, 10, 11}: "Sealevel Systems, Inc.", + [3]byte{0, 10, 12}: "Scientific Research Corporation", + [3]byte{0, 10, 13}: "FCI Deutschland GmbH", + [3]byte{0, 10, 14}: "Invivo Research Inc.", + [3]byte{0, 10, 15}: "Ilryung Telesys, Inc", + [3]byte{0, 10, 16}: "FAST media integrations AG", + [3]byte{0, 10, 17}: "ExPet Technologies, Inc", + [3]byte{0, 10, 18}: "Azylex Technology, Inc", + [3]byte{0, 10, 19}: "Honeywell Video Systems", + [3]byte{0, 10, 20}: "TECO a.s.", + [3]byte{0, 10, 21}: "Silicon Data, Inc", + [3]byte{0, 10, 22}: "Lassen Research", + [3]byte{0, 10, 23}: "NESTAR COMMUNICATIONS, INC", + [3]byte{0, 10, 24}: "Vichel Inc.", + [3]byte{0, 10, 25}: "Valere Power, Inc.", + [3]byte{0, 10, 26}: "Imerge Ltd", + [3]byte{0, 10, 27}: "Stream Labs", + [3]byte{0, 10, 28}: "Bridge Information Co., Ltd.", + [3]byte{0, 10, 29}: "Optical Communications Products Inc.", + [3]byte{0, 10, 30}: "Red-M Products Limited", + [3]byte{0, 10, 31}: "ART WARE Telecommunication Co., Ltd.", + [3]byte{0, 10, 32}: "SVA Networks, Inc.", + [3]byte{0, 10, 33}: "Integra Telecom Co. Ltd", + [3]byte{0, 10, 34}: "Amperion Inc", + [3]byte{0, 10, 35}: "Parama Networks Inc", + [3]byte{0, 10, 36}: "Octave Communications", + [3]byte{0, 10, 37}: "CERAGON NETWORKS", + [3]byte{0, 10, 38}: "CEIA S.p.A.", + [3]byte{0, 10, 39}: "Apple", + [3]byte{0, 10, 40}: "Motorola", + [3]byte{0, 10, 41}: "Pan Dacom Networking AG", + [3]byte{0, 10, 42}: "QSI Systems Inc.", + [3]byte{0, 10, 43}: "Etherstuff", + [3]byte{0, 10, 44}: "Active Tchnology Corporation", + [3]byte{0, 10, 45}: "Cabot Communications Limited", + [3]byte{0, 10, 46}: "MAPLE NETWORKS CO., LTD", + [3]byte{0, 10, 47}: "Artnix Inc.", + [3]byte{0, 10, 48}: "Visteon Corporation", + [3]byte{0, 10, 49}: "HCV Consulting", + [3]byte{0, 10, 50}: "Xsido Corporation", + [3]byte{0, 10, 51}: "Emulex Corporation", + [3]byte{0, 10, 52}: "Identicard Systems Incorporated", + [3]byte{0, 10, 53}: "Xilinx", + [3]byte{0, 10, 54}: "Synelec Telecom Multimedia", + [3]byte{0, 10, 55}: "Procera Networks, Inc.", + [3]byte{0, 10, 56}: "Apani Networks", + [3]byte{0, 10, 57}: "LoPA Information Technology", + [3]byte{0, 10, 58}: "J-THREE INTERNATIONAL Holding Co., Ltd.", + [3]byte{0, 10, 59}: "GCT Semiconductor, Inc", + [3]byte{0, 10, 60}: "Enerpoint Ltd.", + [3]byte{0, 10, 61}: "Elo Sistemas Eletronicos S.A.", + [3]byte{0, 10, 62}: "EADS Telecom", + [3]byte{0, 10, 63}: "Data East Corporation", + [3]byte{0, 10, 64}: "Crown Audio -- Harmanm International", + [3]byte{0, 10, 65}: "CISCO SYSTEMS, INC.", + [3]byte{0, 10, 66}: "CISCO SYSTEMS, INC.", + [3]byte{0, 10, 67}: "Chunghwa Telecom Co., Ltd.", + [3]byte{0, 10, 68}: "Avery Dennison Deutschland GmbH", + [3]byte{0, 10, 69}: "Audio-Technica Corp.", + [3]byte{0, 10, 70}: "ARO WELDING TECHNOLOGIES SAS", + [3]byte{0, 10, 71}: "Allied Vision Technologies", + [3]byte{0, 10, 72}: "Albatron Technology", + [3]byte{0, 10, 73}: "F5 Networks, Inc.", + [3]byte{0, 10, 74}: "Targa Systems Ltd.", + [3]byte{0, 10, 75}: "DataPower Technology, Inc.", + [3]byte{0, 10, 76}: "Molecular Devices Corporation", + [3]byte{0, 10, 77}: "Noritz Corporation", + [3]byte{0, 10, 78}: "UNITEK Electronics INC.", + [3]byte{0, 10, 79}: "Brain Boxes Limited", + [3]byte{0, 10, 80}: "REMOTEK CORPORATION", + [3]byte{0, 10, 81}: "GyroSignal Technology Co., Ltd.", + [3]byte{0, 10, 82}: "AsiaRF Ltd.", + [3]byte{0, 10, 83}: "Intronics, Incorporated", + [3]byte{0, 10, 84}: "Laguna Hills, Inc.", + [3]byte{0, 10, 85}: "MARKEM Corporation", + [3]byte{0, 10, 86}: "HITACHI Maxell Ltd.", + [3]byte{0, 10, 87}: "Hewlett-Packard Company - Standards", + [3]byte{0, 10, 88}: "Freyer & Siegel Elektronik GmbH & Co. KG", + [3]byte{0, 10, 89}: "HW server", + [3]byte{0, 10, 90}: "GreenNET Technologies Co.,Ltd.", + [3]byte{0, 10, 91}: "Power-One as", + [3]byte{0, 10, 92}: "Carel s.p.a.", + [3]byte{0, 10, 93}: "FingerTec Worldwide Sdn Bhd", + [3]byte{0, 10, 94}: "3COM Corporation", + [3]byte{0, 10, 95}: "almedio inc.", + [3]byte{0, 10, 96}: "Autostar Technology Pte Ltd", + [3]byte{0, 10, 97}: "Cellinx Systems Inc.", + [3]byte{0, 10, 98}: "Crinis Networks, Inc.", + [3]byte{0, 10, 99}: "DHD GmbH", + [3]byte{0, 10, 100}: "Eracom Technologies", + [3]byte{0, 10, 101}: "GentechMedia.co.,ltd.", + [3]byte{0, 10, 102}: "MITSUBISHI ELECTRIC SYSTEM & SERVICE CO.,LTD.", + [3]byte{0, 10, 103}: "OngCorp", + [3]byte{0, 10, 104}: "SolarFlare Communications, Inc.", + [3]byte{0, 10, 105}: "SUNNY bell Technology Co., Ltd.", + [3]byte{0, 10, 106}: "SVM Microwaves s.r.o.", + [3]byte{0, 10, 107}: "Tadiran Telecom Business Systems LTD", + [3]byte{0, 10, 108}: "Walchem Corporation", + [3]byte{0, 10, 109}: "EKS Elektronikservice GmbH", + [3]byte{0, 10, 110}: "Harmonic, Inc", + [3]byte{0, 10, 111}: "ZyFLEX Technologies Inc", + [3]byte{0, 10, 112}: "MPLS Forum", + [3]byte{0, 10, 113}: "Avrio Technologies, Inc", + [3]byte{0, 10, 114}: "STEC, INC.", + [3]byte{0, 10, 115}: "Scientific Atlanta", + [3]byte{0, 10, 116}: "Manticom Networks Inc.", + [3]byte{0, 10, 117}: "Caterpillar, Inc", + [3]byte{0, 10, 118}: "Beida Jade Bird Huaguang Technology Co.,Ltd", + [3]byte{0, 10, 119}: "Bluewire Technologies LLC", + [3]byte{0, 10, 120}: "OLITEC", + [3]byte{0, 10, 121}: "corega K.K", + [3]byte{0, 10, 122}: "Kyoritsu Electric Co., Ltd.", + [3]byte{0, 10, 123}: "Cornelius Consult", + [3]byte{0, 10, 124}: "Tecton Ltd", + [3]byte{0, 10, 125}: "Valo, Inc.", + [3]byte{0, 10, 126}: "The Advantage Group", + [3]byte{0, 10, 127}: "Teradon Industries, Inc", + [3]byte{0, 10, 128}: "Telkonet Inc.", + [3]byte{0, 10, 129}: "TEIMA Audiotex S.L.", + [3]byte{0, 10, 130}: "TATSUTA SYSTEM ELECTRONICS CO.,LTD.", + [3]byte{0, 10, 131}: "SALTO SYSTEMS S.L.", + [3]byte{0, 10, 132}: "Rainsun Enterprise Co., Ltd.", + [3]byte{0, 10, 133}: "PLAT'C2,Inc", + [3]byte{0, 10, 134}: "Lenze", + [3]byte{0, 10, 135}: "Integrated Micromachines Inc.", + [3]byte{0, 10, 136}: "InCypher S.A.", + [3]byte{0, 10, 137}: "Creval Systems, Inc.", + [3]byte{0, 10, 138}: "CISCO SYSTEMS, INC.", + [3]byte{0, 10, 139}: "CISCO SYSTEMS, INC.", + [3]byte{0, 10, 140}: "Guardware Systems Ltd.", + [3]byte{0, 10, 141}: "EUROTHERM LIMITED", + [3]byte{0, 10, 142}: "Invacom Ltd", + [3]byte{0, 10, 143}: "Aska International Inc.", + [3]byte{0, 10, 144}: "Bayside Interactive, Inc.", + [3]byte{0, 10, 145}: "HemoCue AB", + [3]byte{0, 10, 146}: "Presonus Corporation", + [3]byte{0, 10, 147}: "W2 Networks, Inc.", + [3]byte{0, 10, 148}: "ShangHai cellink CO., LTD", + [3]byte{0, 10, 149}: "Apple", + [3]byte{0, 10, 150}: "MEWTEL TECHNOLOGY INC.", + [3]byte{0, 10, 151}: "SONICblue, Inc.", + [3]byte{0, 10, 152}: "M+F Gwinner GmbH & Co", + [3]byte{0, 10, 153}: "Calamp Wireless Networks Inc", + [3]byte{0, 10, 154}: "Aiptek International Inc", + [3]byte{0, 10, 155}: "TB Group Inc", + [3]byte{0, 10, 156}: "Server Technology, Inc.", + [3]byte{0, 10, 157}: "King Young Technology Co. Ltd.", + [3]byte{0, 10, 158}: "BroadWeb Corportation", + [3]byte{0, 10, 159}: "Pannaway Technologies, Inc.", + [3]byte{0, 10, 160}: "Cedar Point Communications", + [3]byte{0, 10, 161}: "V V S Limited", + [3]byte{0, 10, 162}: "SYSTEK INC.", + [3]byte{0, 10, 163}: "SHIMAFUJI ELECTRIC CO.,LTD.", + [3]byte{0, 10, 164}: "SHANGHAI SURVEILLANCE TECHNOLOGY CO,LTD", + [3]byte{0, 10, 165}: "MAXLINK INDUSTRIES LIMITED", + [3]byte{0, 10, 166}: "Hochiki Corporation", + [3]byte{0, 10, 167}: "FEI Electron Optics", + [3]byte{0, 10, 168}: "ePipe Pty. Ltd.", + [3]byte{0, 10, 169}: "Brooks Automation GmbH", + [3]byte{0, 10, 170}: "AltiGen Communications Inc.", + [3]byte{0, 10, 171}: "Toyota Technical Development Corporation", + [3]byte{0, 10, 172}: "TerraTec Electronic GmbH", + [3]byte{0, 10, 173}: "Stargames Corporation", + [3]byte{0, 10, 174}: "Rosemount Process Analytical", + [3]byte{0, 10, 175}: "Pipal Systems", + [3]byte{0, 10, 176}: "LOYTEC electronics GmbH", + [3]byte{0, 10, 177}: "GENETEC Corporation", + [3]byte{0, 10, 178}: "Fresnel Wireless Systems", + [3]byte{0, 10, 179}: "Fa. GIRA", + [3]byte{0, 10, 180}: "ETIC Telecommunications", + [3]byte{0, 10, 181}: "Digital Electronic Network", + [3]byte{0, 10, 182}: "COMPUNETIX, INC", + [3]byte{0, 10, 183}: "CISCO SYSTEMS, INC.", + [3]byte{0, 10, 184}: "CISCO SYSTEMS, INC.", + [3]byte{0, 10, 185}: "Astera Technologies Corp.", + [3]byte{0, 10, 186}: "Arcon Technology Limited", + [3]byte{0, 10, 187}: "Taiwan Secom Co,. Ltd", + [3]byte{0, 10, 188}: "Seabridge Ltd.", + [3]byte{0, 10, 189}: "Rupprecht & Patashnick Co.", + [3]byte{0, 10, 190}: "OPNET Technologies CO., LTD.", + [3]byte{0, 10, 191}: "HIROTA SS", + [3]byte{0, 10, 192}: "Fuyoh Video Industry CO., LTD.", + [3]byte{0, 10, 193}: "Futuretel", + [3]byte{0, 10, 194}: "FiberHome Telecommunication Technologies CO.,LTD", + [3]byte{0, 10, 195}: "eM Technics Co., Ltd.", + [3]byte{0, 10, 196}: "Daewoo Teletech Co., Ltd", + [3]byte{0, 10, 197}: "Color Kinetics", + [3]byte{0, 10, 198}: "Overture Networks.", + [3]byte{0, 10, 199}: "Unication Group", + [3]byte{0, 10, 200}: "ZPSYS CO.,LTD. (Planning&Management)", + [3]byte{0, 10, 201}: "Zambeel Inc", + [3]byte{0, 10, 202}: "YOKOYAMA SHOKAI CO.,Ltd.", + [3]byte{0, 10, 203}: "XPAK MSA Group", + [3]byte{0, 10, 204}: "Winnow Networks, Inc.", + [3]byte{0, 10, 205}: "Sunrich Technology Limited", + [3]byte{0, 10, 206}: "RADIANTECH, INC.", + [3]byte{0, 10, 207}: "PROVIDEO Multimedia Co. Ltd.", + [3]byte{0, 10, 208}: "Niigata Develoment Center, F.I.T. Co., Ltd.", + [3]byte{0, 10, 209}: "MWS", + [3]byte{0, 10, 210}: "JEPICO Corporation", + [3]byte{0, 10, 211}: "INITECH Co., Ltd", + [3]byte{0, 10, 212}: "CoreBell Systems Inc.", + [3]byte{0, 10, 213}: "Brainchild Electronic Co., Ltd.", + [3]byte{0, 10, 214}: "BeamReach Networks", + [3]byte{0, 10, 215}: "Origin ELECTRIC CO.,LTD.", + [3]byte{0, 10, 216}: "IPCserv Technology Corp.", + [3]byte{0, 10, 217}: "Sony Ericsson Mobile Communications AB", + [3]byte{0, 10, 218}: "Vindicator Technologies", + [3]byte{0, 10, 219}: "SkyPilot Network, Inc", + [3]byte{0, 10, 220}: "RuggedCom Inc.", + [3]byte{0, 10, 221}: "Allworx Corp.", + [3]byte{0, 10, 222}: "Happy Communication Co., Ltd.", + [3]byte{0, 10, 223}: "Gennum Corporation", + [3]byte{0, 10, 224}: "Fujitsu Softek", + [3]byte{0, 10, 225}: "EG Technology", + [3]byte{0, 10, 226}: "Binatone Electronics International, Ltd", + [3]byte{0, 10, 227}: "YANG MEI TECHNOLOGY CO., LTD", + [3]byte{0, 10, 228}: "Wistron Corp.", + [3]byte{0, 10, 229}: "ScottCare Corporation", + [3]byte{0, 10, 230}: "Elitegroup Computer System Co. (ECS)", + [3]byte{0, 10, 231}: "ELIOP S.A.", + [3]byte{0, 10, 232}: "Cathay Roxus Information Technology Co. LTD", + [3]byte{0, 10, 233}: "AirVast Technology Inc.", + [3]byte{0, 10, 234}: "ADAM ELEKTRONIK LTD. ŞTI", + [3]byte{0, 10, 235}: "Shenzhen Tp-Link Technology Co; Ltd.", + [3]byte{0, 10, 236}: "Koatsu Gas Kogyo Co., Ltd.", + [3]byte{0, 10, 237}: "HARTING Systems GmbH & Co KG", + [3]byte{0, 10, 238}: "GCD Hard- & Software GmbH", + [3]byte{0, 10, 239}: "OTRUM ASA", + [3]byte{0, 10, 240}: "SHIN-OH ELECTRONICS CO., LTD. R&D", + [3]byte{0, 10, 241}: "Clarity Design, Inc.", + [3]byte{0, 10, 242}: "NeoAxiom Corp.", + [3]byte{0, 10, 243}: "CISCO SYSTEMS, INC.", + [3]byte{0, 10, 244}: "CISCO SYSTEMS, INC.", + [3]byte{0, 10, 245}: "Airgo Networks, Inc.", + [3]byte{0, 10, 246}: "Emerson Climate Technologies Retail Solutions, Inc.", + [3]byte{0, 10, 247}: "Broadcom Corp.", + [3]byte{0, 10, 248}: "American Telecare Inc.", + [3]byte{0, 10, 249}: "HiConnect, Inc.", + [3]byte{0, 10, 250}: "Traverse Technologies Australia", + [3]byte{0, 10, 251}: "Ambri Limited", + [3]byte{0, 10, 252}: "Core Tec Communications, LLC", + [3]byte{0, 10, 253}: "Viking Electronic Services", + [3]byte{0, 10, 254}: "NovaPal Ltd", + [3]byte{0, 10, 255}: "Kilchherr Elektronik AG", + [3]byte{0, 11, 0}: "FUJIAN START COMPUTER EQUIPMENT CO.,LTD", + [3]byte{0, 11, 1}: "DAIICHI ELECTRONICS CO., LTD.", + [3]byte{0, 11, 2}: "Dallmeier electronic", + [3]byte{0, 11, 3}: "Taekwang Industrial Co., Ltd", + [3]byte{0, 11, 4}: "Volktek Corporation", + [3]byte{0, 11, 5}: "Pacific Broadband Networks", + [3]byte{0, 11, 6}: "ARRIS Group, Inc.", + [3]byte{0, 11, 7}: "Voxpath Networks", + [3]byte{0, 11, 8}: "Pillar Data Systems", + [3]byte{0, 11, 9}: "Ifoundry Systems Singapore", + [3]byte{0, 11, 10}: "dBm Optics", + [3]byte{0, 11, 11}: "Corrent Corporation", + [3]byte{0, 11, 12}: "Agile Systems Inc.", + [3]byte{0, 11, 13}: "Air2U, Inc.", + [3]byte{0, 11, 14}: "Trapeze Networks", + [3]byte{0, 11, 15}: "Bosch Rexroth", + [3]byte{0, 11, 16}: "11wave Technonlogy Co.,Ltd", + [3]byte{0, 11, 17}: "HIMEJI ABC TRADING CO.,LTD.", + [3]byte{0, 11, 18}: "NURI Telecom Co., Ltd.", + [3]byte{0, 11, 19}: "ZETRON INC", + [3]byte{0, 11, 20}: "ViewSonic Corporation", + [3]byte{0, 11, 21}: "Platypus Technology", + [3]byte{0, 11, 22}: "Communication Machinery Corporation", + [3]byte{0, 11, 23}: "MKS Instruments", + [3]byte{0, 11, 24}: "PRIVATE", + [3]byte{0, 11, 25}: "Vernier Networks, Inc.", + [3]byte{0, 11, 26}: "Industrial Defender, Inc.", + [3]byte{0, 11, 27}: "Systronix, Inc.", + [3]byte{0, 11, 28}: "SIBCO bv", + [3]byte{0, 11, 29}: "LayerZero Power Systems, Inc.", + [3]byte{0, 11, 30}: "KAPPA opto-electronics GmbH", + [3]byte{0, 11, 31}: "I CON Computer Co.", + [3]byte{0, 11, 32}: "Hirata corporation", + [3]byte{0, 11, 33}: "G-Star Communications Inc.", + [3]byte{0, 11, 34}: "Environmental Systems and Services", + [3]byte{0, 11, 35}: "Siemens Subscriber Networks", + [3]byte{0, 11, 36}: "AirLogic", + [3]byte{0, 11, 37}: "Aeluros", + [3]byte{0, 11, 38}: "Wetek Corporation", + [3]byte{0, 11, 39}: "Scion Corporation", + [3]byte{0, 11, 40}: "Quatech Inc.", + [3]byte{0, 11, 41}: "LS(LG) Industrial Systems co.,Ltd", + [3]byte{0, 11, 42}: "HOWTEL Co., Ltd.", + [3]byte{0, 11, 43}: "HOSTNET CORPORATION", + [3]byte{0, 11, 44}: "Eiki Industrial Co. Ltd.", + [3]byte{0, 11, 45}: "Danfoss Inc.", + [3]byte{0, 11, 46}: "Cal-Comp Electronics (Thailand) Public Company Limited Taipe", + [3]byte{0, 11, 47}: "bplan GmbH", + [3]byte{0, 11, 48}: "Beijing Gongye Science & Technology Co.,Ltd", + [3]byte{0, 11, 49}: "Yantai ZhiYang Scientific and technology industry CO., LTD", + [3]byte{0, 11, 50}: "VORMETRIC, INC.", + [3]byte{0, 11, 51}: "Vivato Technologies", + [3]byte{0, 11, 52}: "ShangHai Broadband Technologies CO.LTD", + [3]byte{0, 11, 53}: "Quad Bit System co., Ltd.", + [3]byte{0, 11, 54}: "Productivity Systems, Inc.", + [3]byte{0, 11, 55}: "MANUFACTURE DES MONTRES ROLEX SA", + [3]byte{0, 11, 56}: "Knürr GmbH", + [3]byte{0, 11, 57}: "Keisoku Giken Co.,Ltd.", + [3]byte{0, 11, 58}: "QuStream Corporation", + [3]byte{0, 11, 59}: "devolo AG", + [3]byte{0, 11, 60}: "Cygnal Integrated Products, Inc.", + [3]byte{0, 11, 61}: "CONTAL OK Ltd.", + [3]byte{0, 11, 62}: "BittWare, Inc", + [3]byte{0, 11, 63}: "Anthology Solutions Inc.", + [3]byte{0, 11, 64}: "Oclaro", + [3]byte{0, 11, 65}: "Ing. Büro Dr. Beutlhauser", + [3]byte{0, 11, 66}: "commax Co., Ltd.", + [3]byte{0, 11, 67}: "Microscan Systems, Inc.", + [3]byte{0, 11, 68}: "Concord IDea Corp.", + [3]byte{0, 11, 69}: "CISCO SYSTEMS, INC.", + [3]byte{0, 11, 70}: "CISCO SYSTEMS, INC.", + [3]byte{0, 11, 71}: "Advanced Energy", + [3]byte{0, 11, 72}: "sofrel", + [3]byte{0, 11, 73}: "RF-Link System Inc.", + [3]byte{0, 11, 74}: "Visimetrics (UK) Ltd", + [3]byte{0, 11, 75}: "VISIOWAVE SA", + [3]byte{0, 11, 76}: "Clarion (M) Sdn Bhd", + [3]byte{0, 11, 77}: "Emuzed", + [3]byte{0, 11, 78}: "VertexRSI, General Dynamics SatCOM Technologies, Inc.", + [3]byte{0, 11, 79}: "Verifone, INC.", + [3]byte{0, 11, 80}: "Oxygnet", + [3]byte{0, 11, 81}: "Micetek International Inc.", + [3]byte{0, 11, 82}: "JOYMAX ELECTRONICS CO. LTD.", + [3]byte{0, 11, 83}: "INITIUM Co., Ltd.", + [3]byte{0, 11, 84}: "BiTMICRO Networks, Inc.", + [3]byte{0, 11, 85}: "ADInstruments", + [3]byte{0, 11, 86}: "Cybernetics", + [3]byte{0, 11, 87}: "Silicon Laboratories", + [3]byte{0, 11, 88}: "Astronautics C.A LTD", + [3]byte{0, 11, 89}: "ScriptPro, LLC", + [3]byte{0, 11, 90}: "HyperEdge", + [3]byte{0, 11, 91}: "Rincon Research Corporation", + [3]byte{0, 11, 92}: "Newtech Co.,Ltd", + [3]byte{0, 11, 93}: "FUJITSU LIMITED", + [3]byte{0, 11, 94}: "Audio Engineering Society Inc.", + [3]byte{0, 11, 95}: "CISCO SYSTEMS, INC.", + [3]byte{0, 11, 96}: "CISCO SYSTEMS, INC.", + [3]byte{0, 11, 97}: "Friedrich Lütze GmbH & Co. KG", + [3]byte{0, 11, 98}: "ib-mohnen KG", + [3]byte{0, 11, 99}: "Kaleidescape", + [3]byte{0, 11, 100}: "Kieback & Peter GmbH & Co KG", + [3]byte{0, 11, 101}: "Sy.A.C. srl", + [3]byte{0, 11, 102}: "Teralink Communications", + [3]byte{0, 11, 103}: "Topview Technology Corporation", + [3]byte{0, 11, 104}: "Addvalue Communications Pte Ltd", + [3]byte{0, 11, 105}: "Franke Finland Oy", + [3]byte{0, 11, 106}: "Asiarock Incorporation", + [3]byte{0, 11, 107}: "Wistron Neweb Corp.", + [3]byte{0, 11, 108}: "Sychip Inc.", + [3]byte{0, 11, 109}: "SOLECTRON JAPAN NAKANIIDA", + [3]byte{0, 11, 110}: "Neff Instrument Corp.", + [3]byte{0, 11, 111}: "Media Streaming Networks Inc", + [3]byte{0, 11, 112}: "Load Technology, Inc.", + [3]byte{0, 11, 113}: "Litchfield Communications Inc.", + [3]byte{0, 11, 114}: "Lawo AG", + [3]byte{0, 11, 115}: "Kodeos Communications", + [3]byte{0, 11, 116}: "Kingwave Technology Co., Ltd.", + [3]byte{0, 11, 117}: "Iosoft Ltd.", + [3]byte{0, 11, 118}: "ET&T Technology Co. Ltd.", + [3]byte{0, 11, 119}: "Cogent Systems, Inc.", + [3]byte{0, 11, 120}: "TAIFATECH INC.", + [3]byte{0, 11, 121}: "X-COM, Inc.", + [3]byte{0, 11, 122}: "L-3 Linkabit", + [3]byte{0, 11, 123}: "Test-Um Inc.", + [3]byte{0, 11, 124}: "Telex Communications", + [3]byte{0, 11, 125}: "SOLOMON EXTREME INTERNATIONAL LTD.", + [3]byte{0, 11, 126}: "SAGINOMIYA Seisakusho Inc.", + [3]byte{0, 11, 127}: "Align Engineering LLC", + [3]byte{0, 11, 128}: "Lycium Networks", + [3]byte{0, 11, 129}: "Kaparel Corporation", + [3]byte{0, 11, 130}: "Grandstream Networks, Inc.", + [3]byte{0, 11, 131}: "DATAWATT B.V.", + [3]byte{0, 11, 132}: "BODET", + [3]byte{0, 11, 133}: "CISCO SYSTEMS, INC.", + [3]byte{0, 11, 134}: "Aruba Networks", + [3]byte{0, 11, 135}: "American Reliance Inc.", + [3]byte{0, 11, 136}: "Vidisco ltd.", + [3]byte{0, 11, 137}: "Top Global Technology, Ltd.", + [3]byte{0, 11, 138}: "MITEQ Inc.", + [3]byte{0, 11, 139}: "KERAJET, S.A.", + [3]byte{0, 11, 140}: "Flextronics", + [3]byte{0, 11, 141}: "Avvio Networks", + [3]byte{0, 11, 142}: "Ascent Corporation", + [3]byte{0, 11, 143}: "AKITA ELECTRONICS SYSTEMS CO.,LTD.", + [3]byte{0, 11, 144}: "ADVA Optical Networking Ltd.", + [3]byte{0, 11, 145}: "Aglaia Gesellschaft für Bildverarbeitung und Kommunikation mbH", + [3]byte{0, 11, 146}: "Ascom Danmark A/S", + [3]byte{0, 11, 147}: "Ritter Elektronik", + [3]byte{0, 11, 148}: "Digital Monitoring Products, Inc.", + [3]byte{0, 11, 149}: "eBet Gaming Systems Pty Ltd", + [3]byte{0, 11, 150}: "Innotrac Diagnostics Oy", + [3]byte{0, 11, 151}: "Matsushita Electric Industrial Co.,Ltd.", + [3]byte{0, 11, 152}: "NiceTechVision", + [3]byte{0, 11, 153}: "SensAble Technologies, Inc.", + [3]byte{0, 11, 154}: "Shanghai Ulink Telecom Equipment Co. Ltd.", + [3]byte{0, 11, 155}: "Sirius System Co, Ltd.", + [3]byte{0, 11, 156}: "TriBeam Technologies, Inc.", + [3]byte{0, 11, 157}: "TwinMOS Technologies Inc.", + [3]byte{0, 11, 158}: "Yasing Technology Corp.", + [3]byte{0, 11, 159}: "Neue ELSA GmbH", + [3]byte{0, 11, 160}: "T&L Information Inc.", + [3]byte{0, 11, 161}: "SYSCOM Ltd.", + [3]byte{0, 11, 162}: "Sumitomo Electric Networks, Inc", + [3]byte{0, 11, 163}: "Siemens AG, I&S", + [3]byte{0, 11, 164}: "Shiron Satellite Communications Ltd. (1996)", + [3]byte{0, 11, 165}: "Quasar Cipta Mandiri, PT", + [3]byte{0, 11, 166}: "Miyakawa Electric Works Ltd.", + [3]byte{0, 11, 167}: "Maranti Networks", + [3]byte{0, 11, 168}: "HANBACK ELECTRONICS CO., LTD.", + [3]byte{0, 11, 169}: "CloudShield Technologies, Inc.", + [3]byte{0, 11, 170}: "Aiphone co.,Ltd", + [3]byte{0, 11, 171}: "Advantech Technology (CHINA) Co., Ltd.", + [3]byte{0, 11, 172}: "3Com Ltd", + [3]byte{0, 11, 173}: "PC-PoS Inc.", + [3]byte{0, 11, 174}: "Vitals System Inc.", + [3]byte{0, 11, 175}: "WOOJU COMMUNICATIONS Co,.Ltd", + [3]byte{0, 11, 176}: "Sysnet Telematica srl", + [3]byte{0, 11, 177}: "Super Star Technology Co., Ltd.", + [3]byte{0, 11, 178}: "SMALLBIG TECHNOLOGY", + [3]byte{0, 11, 179}: "RiT technologies Ltd.", + [3]byte{0, 11, 180}: "RDC Semiconductor Inc.,", + [3]byte{0, 11, 181}: "nStor Technologies, Inc.", + [3]byte{0, 11, 182}: "Metalligence Technology Corp.", + [3]byte{0, 11, 183}: "Micro Systems Co.,Ltd.", + [3]byte{0, 11, 184}: "Kihoku Electronic Co.", + [3]byte{0, 11, 185}: "Imsys AB", + [3]byte{0, 11, 186}: "Harmonic, Inc", + [3]byte{0, 11, 187}: "Etin Systems Co., Ltd", + [3]byte{0, 11, 188}: "En Garde Systems, Inc.", + [3]byte{0, 11, 189}: "Connexionz Limited", + [3]byte{0, 11, 190}: "CISCO SYSTEMS, INC.", + [3]byte{0, 11, 191}: "CISCO SYSTEMS, INC.", + [3]byte{0, 11, 192}: "China IWNComm Co., Ltd.", + [3]byte{0, 11, 193}: "Bay Microsystems, Inc.", + [3]byte{0, 11, 194}: "Corinex Communication Corp.", + [3]byte{0, 11, 195}: "Multiplex, Inc.", + [3]byte{0, 11, 196}: "BIOTRONIK GmbH & Co", + [3]byte{0, 11, 197}: "SMC Networks, Inc.", + [3]byte{0, 11, 198}: "ISAC, Inc.", + [3]byte{0, 11, 199}: "ICET S.p.A.", + [3]byte{0, 11, 200}: "AirFlow Networks", + [3]byte{0, 11, 201}: "Electroline Equipment", + [3]byte{0, 11, 202}: "DATAVAN International Corporation", + [3]byte{0, 11, 203}: "Fagor Automation , S. Coop", + [3]byte{0, 11, 204}: "JUSAN, S.A.", + [3]byte{0, 11, 205}: "Hewlett-Packard Company", + [3]byte{0, 11, 206}: "Free2move AB", + [3]byte{0, 11, 207}: "AGFA NDT INC.", + [3]byte{0, 11, 208}: "XiMeta Technology Americas Inc.", + [3]byte{0, 11, 209}: "Aeronix, Inc.", + [3]byte{0, 11, 210}: "Remopro Technology Inc.", + [3]byte{0, 11, 211}: "cd3o", + [3]byte{0, 11, 212}: "Beijing Wise Technology & Science Development Co.Ltd", + [3]byte{0, 11, 213}: "Nvergence, Inc.", + [3]byte{0, 11, 214}: "Paxton Access Ltd", + [3]byte{0, 11, 215}: "DORMA Time + Access GmbH", + [3]byte{0, 11, 216}: "Industrial Scientific Corp.", + [3]byte{0, 11, 217}: "General Hydrogen", + [3]byte{0, 11, 218}: "EyeCross Co.,Inc.", + [3]byte{0, 11, 219}: "Dell Inc", + [3]byte{0, 11, 220}: "AKCP", + [3]byte{0, 11, 221}: "TOHOKU RICOH Co., LTD.", + [3]byte{0, 11, 222}: "TELDIX GmbH", + [3]byte{0, 11, 223}: "Shenzhen RouterD Networks Limited", + [3]byte{0, 11, 224}: "SercoNet Ltd.", + [3]byte{0, 11, 225}: "Nokia NET Product Operations", + [3]byte{0, 11, 226}: "Lumenera Corporation", + [3]byte{0, 11, 227}: "Key Stream Co., Ltd.", + [3]byte{0, 11, 228}: "Hosiden Corporation", + [3]byte{0, 11, 229}: "HIMS International Corporation", + [3]byte{0, 11, 230}: "Datel Electronics", + [3]byte{0, 11, 231}: "COMFLUX TECHNOLOGY INC.", + [3]byte{0, 11, 232}: "AOIP", + [3]byte{0, 11, 233}: "Actel Corporation", + [3]byte{0, 11, 234}: "Zultys Technologies", + [3]byte{0, 11, 235}: "Systegra AG", + [3]byte{0, 11, 236}: "NIPPON ELECTRIC INSTRUMENT, INC.", + [3]byte{0, 11, 237}: "ELM Inc.", + [3]byte{0, 11, 238}: "inc.jet, Incorporated", + [3]byte{0, 11, 239}: "Code Corporation", + [3]byte{0, 11, 240}: "MoTEX Products Co., Ltd.", + [3]byte{0, 11, 241}: "LAP Laser Applikations", + [3]byte{0, 11, 242}: "Chih-Kan Technology Co., Ltd.", + [3]byte{0, 11, 243}: "BAE SYSTEMS", + [3]byte{0, 11, 244}: "PRIVATE", + [3]byte{0, 11, 245}: "Shanghai Sibo Telecom Technology Co.,Ltd", + [3]byte{0, 11, 246}: "Nitgen Co., Ltd", + [3]byte{0, 11, 247}: "NIDEK CO.,LTD", + [3]byte{0, 11, 248}: "Infinera", + [3]byte{0, 11, 249}: "Gemstone communications, Inc.", + [3]byte{0, 11, 250}: "EXEMYS SRL", + [3]byte{0, 11, 251}: "D-NET International Corporation", + [3]byte{0, 11, 252}: "CISCO SYSTEMS, INC.", + [3]byte{0, 11, 253}: "CISCO SYSTEMS, INC.", + [3]byte{0, 11, 254}: "CASTEL Broadband Limited", + [3]byte{0, 11, 255}: "Berkeley Camera Engineering", + [3]byte{0, 12, 0}: "BEB Industrie-Elektronik AG", + [3]byte{0, 12, 1}: "Abatron AG", + [3]byte{0, 12, 2}: "ABB Oy", + [3]byte{0, 12, 3}: "HDMI Licensing, LLC", + [3]byte{0, 12, 4}: "Tecnova", + [3]byte{0, 12, 5}: "RPA Reserch Co., Ltd.", + [3]byte{0, 12, 6}: "Nixvue Systems Pte Ltd", + [3]byte{0, 12, 7}: "Iftest AG", + [3]byte{0, 12, 8}: "HUMEX Technologies Corp.", + [3]byte{0, 12, 9}: "Hitachi IE Systems Co., Ltd", + [3]byte{0, 12, 10}: "Guangdong Province Electronic Technology Research Institute", + [3]byte{0, 12, 11}: "Broadbus Technologies", + [3]byte{0, 12, 12}: "APPRO TECHNOLOGY INC.", + [3]byte{0, 12, 13}: "Communications & Power Industries / Satcom Division", + [3]byte{0, 12, 14}: "XtremeSpectrum, Inc.", + [3]byte{0, 12, 15}: "Techno-One Co., Ltd", + [3]byte{0, 12, 16}: "PNI Corporation", + [3]byte{0, 12, 17}: "NIPPON DEMPA CO.,LTD.", + [3]byte{0, 12, 18}: "Micro-Optronic-Messtechnik GmbH", + [3]byte{0, 12, 19}: "MediaQ", + [3]byte{0, 12, 20}: "Diagnostic Instruments, Inc.", + [3]byte{0, 12, 21}: "CyberPower Systems, Inc.", + [3]byte{0, 12, 22}: "Concorde Microsystems Inc.", + [3]byte{0, 12, 23}: "AJA Video Systems Inc", + [3]byte{0, 12, 24}: "Zenisu Keisoku Inc.", + [3]byte{0, 12, 25}: "Telio Communications GmbH", + [3]byte{0, 12, 26}: "Quest Technical Solutions Inc.", + [3]byte{0, 12, 27}: "ORACOM Co, Ltd.", + [3]byte{0, 12, 28}: "MicroWeb Co., Ltd.", + [3]byte{0, 12, 29}: "Mettler & Fuchs AG", + [3]byte{0, 12, 30}: "Global Cache", + [3]byte{0, 12, 31}: "Glimmerglass Networks", + [3]byte{0, 12, 32}: "Fi WIn, Inc.", + [3]byte{0, 12, 33}: "Faculty of Science and Technology, Keio University", + [3]byte{0, 12, 34}: "Double D Electronics Ltd", + [3]byte{0, 12, 35}: "Beijing Lanchuan Tech. Co., Ltd.", + [3]byte{0, 12, 36}: "ANATOR", + [3]byte{0, 12, 37}: "Allied Telesis Labs, Inc.", + [3]byte{0, 12, 38}: "Weintek Labs. Inc.", + [3]byte{0, 12, 39}: "Sammy Corporation", + [3]byte{0, 12, 40}: "RIFATRON", + [3]byte{0, 12, 41}: "VMware, Inc.", + [3]byte{0, 12, 42}: "OCTTEL Communication Co., Ltd.", + [3]byte{0, 12, 43}: "ELIAS Technology, Inc.", + [3]byte{0, 12, 44}: "Enwiser Inc.", + [3]byte{0, 12, 45}: "FullWave Technology Co., Ltd.", + [3]byte{0, 12, 46}: "Openet information technology(shenzhen) Co., Ltd.", + [3]byte{0, 12, 47}: "SeorimTechnology Co.,Ltd.", + [3]byte{0, 12, 48}: "CISCO SYSTEMS, INC.", + [3]byte{0, 12, 49}: "CISCO SYSTEMS, INC.", + [3]byte{0, 12, 50}: "Avionic Design Development GmbH", + [3]byte{0, 12, 51}: "Compucase Enterprise Co. Ltd.", + [3]byte{0, 12, 52}: "Vixen Co., Ltd.", + [3]byte{0, 12, 53}: "KaVo Dental GmbH & Co. KG", + [3]byte{0, 12, 54}: "SHARP TAKAYA ELECTRONICS INDUSTRY CO.,LTD.", + [3]byte{0, 12, 55}: "Geomation, Inc.", + [3]byte{0, 12, 56}: "TelcoBridges Inc.", + [3]byte{0, 12, 57}: "Sentinel Wireless Inc.", + [3]byte{0, 12, 58}: "Oxance", + [3]byte{0, 12, 59}: "Orion Electric Co., Ltd.", + [3]byte{0, 12, 60}: "MediaChorus, Inc.", + [3]byte{0, 12, 61}: "Glsystech Co., Ltd.", + [3]byte{0, 12, 62}: "Crest Audio", + [3]byte{0, 12, 63}: "Cogent Defence & Security Networks,", + [3]byte{0, 12, 64}: "Altech Controls", + [3]byte{0, 12, 65}: "Cisco-Linksys", + [3]byte{0, 12, 66}: "Routerboard.com", + [3]byte{0, 12, 67}: "Ralink Technology, Corp.", + [3]byte{0, 12, 68}: "Automated Interfaces, Inc.", + [3]byte{0, 12, 69}: "Animation Technologies Inc.", + [3]byte{0, 12, 70}: "Allied Telesyn Inc.", + [3]byte{0, 12, 71}: "SK Teletech(R&D Planning Team)", + [3]byte{0, 12, 72}: "QoStek Corporation", + [3]byte{0, 12, 73}: "Dangaard Telecom RTC Division A/S", + [3]byte{0, 12, 74}: "Cygnus Microsystems (P) Limited", + [3]byte{0, 12, 75}: "Cheops Elektronik", + [3]byte{0, 12, 76}: "Arcor AG&Co.", + [3]byte{0, 12, 77}: "Curtiss-Wright Controls Avionics & Electronics", + [3]byte{0, 12, 78}: "Winbest Technology CO,LT", + [3]byte{0, 12, 79}: "UDTech Japan Corporation", + [3]byte{0, 12, 80}: "Seagate Technology", + [3]byte{0, 12, 81}: "Scientific Technologies Inc.", + [3]byte{0, 12, 82}: "Roll Systems Inc.", + [3]byte{0, 12, 83}: "PRIVATE", + [3]byte{0, 12, 84}: "Pedestal Networks, Inc", + [3]byte{0, 12, 85}: "Microlink Communications Inc.", + [3]byte{0, 12, 86}: "Megatel Computer (1986) Corp.", + [3]byte{0, 12, 87}: "MACKIE Engineering Services Belgium BVBA", + [3]byte{0, 12, 88}: "M&S Systems", + [3]byte{0, 12, 89}: "Indyme Electronics, Inc.", + [3]byte{0, 12, 90}: "IBSmm Embedded Electronics Consulting", + [3]byte{0, 12, 91}: "HANWANG TECHNOLOGY CO.,LTD", + [3]byte{0, 12, 92}: "GTN Systems B.V.", + [3]byte{0, 12, 93}: "CHIC TECHNOLOGY (CHINA) CORP.", + [3]byte{0, 12, 94}: "Calypso Medical", + [3]byte{0, 12, 95}: "Avtec, Inc.", + [3]byte{0, 12, 96}: "ACM Systems", + [3]byte{0, 12, 97}: "AC Tech corporation DBA Advanced Digital", + [3]byte{0, 12, 98}: "ABB AB, Cewe-Control", + [3]byte{0, 12, 99}: "Zenith Electronics Corporation", + [3]byte{0, 12, 100}: "X2 MSA Group", + [3]byte{0, 12, 101}: "Sunin Telecom", + [3]byte{0, 12, 102}: "Pronto Networks Inc", + [3]byte{0, 12, 103}: "OYO ELECTRIC CO.,LTD", + [3]byte{0, 12, 104}: "SigmaTel, Inc.", + [3]byte{0, 12, 105}: "National Radio Astronomy Observatory", + [3]byte{0, 12, 106}: "MBARI", + [3]byte{0, 12, 107}: "Kurz Industrie-Elektronik GmbH", + [3]byte{0, 12, 108}: "Elgato Systems LLC", + [3]byte{0, 12, 109}: "Edwards Ltd.", + [3]byte{0, 12, 110}: "ASUSTEK COMPUTER INC.", + [3]byte{0, 12, 111}: "Amtek system co.,LTD.", + [3]byte{0, 12, 112}: "ACC GmbH", + [3]byte{0, 12, 113}: "Wybron, Inc", + [3]byte{0, 12, 114}: "Tempearl Industrial Co., Ltd.", + [3]byte{0, 12, 115}: "TELSON ELECTRONICS CO., LTD", + [3]byte{0, 12, 116}: "RIVERTEC CORPORATION", + [3]byte{0, 12, 117}: "Oriental integrated electronics. LTD", + [3]byte{0, 12, 118}: "MICRO-STAR INTERNATIONAL CO., LTD.", + [3]byte{0, 12, 119}: "Life Racing Ltd", + [3]byte{0, 12, 120}: "In-Tech Electronics Limited", + [3]byte{0, 12, 121}: "Extel Communications P/L", + [3]byte{0, 12, 122}: "DaTARIUS Technologies GmbH", + [3]byte{0, 12, 123}: "ALPHA PROJECT Co.,Ltd.", + [3]byte{0, 12, 124}: "Internet Information Image Inc.", + [3]byte{0, 12, 125}: "TEIKOKU ELECTRIC MFG. CO., LTD", + [3]byte{0, 12, 126}: "Tellium Incorporated", + [3]byte{0, 12, 127}: "synertronixx GmbH", + [3]byte{0, 12, 128}: "Opelcomm Inc.", + [3]byte{0, 12, 129}: "Schneider Electric (Australia)", + [3]byte{0, 12, 130}: "NETWORK TECHNOLOGIES INC", + [3]byte{0, 12, 131}: "Logical Solutions", + [3]byte{0, 12, 132}: "Eazix, Inc.", + [3]byte{0, 12, 133}: "CISCO SYSTEMS, INC.", + [3]byte{0, 12, 134}: "CISCO SYSTEMS, INC.", + [3]byte{0, 12, 135}: "AMD", + [3]byte{0, 12, 136}: "Apache Micro Peripherals, Inc.", + [3]byte{0, 12, 137}: "AC Electric Vehicles, Ltd.", + [3]byte{0, 12, 138}: "Bose Corporation", + [3]byte{0, 12, 139}: "Connect Tech Inc", + [3]byte{0, 12, 140}: "KODICOM CO.,LTD.", + [3]byte{0, 12, 141}: "MATRIX VISION GmbH", + [3]byte{0, 12, 142}: "Mentor Engineering Inc", + [3]byte{0, 12, 143}: "Nergal s.r.l.", + [3]byte{0, 12, 144}: "Octasic Inc.", + [3]byte{0, 12, 145}: "Riverhead Networks Inc.", + [3]byte{0, 12, 146}: "WolfVision Gmbh", + [3]byte{0, 12, 147}: "Xeline Co., Ltd.", + [3]byte{0, 12, 148}: "United Electronic Industries, Inc. (EUI)", + [3]byte{0, 12, 149}: "PrimeNet", + [3]byte{0, 12, 150}: "OQO, Inc.", + [3]byte{0, 12, 151}: "NV ADB TTV Technologies SA", + [3]byte{0, 12, 152}: "LETEK Communications Inc.", + [3]byte{0, 12, 153}: "HITEL LINK Co.,Ltd", + [3]byte{0, 12, 154}: "Hitech Electronics Corp.", + [3]byte{0, 12, 155}: "EE Solutions, Inc", + [3]byte{0, 12, 156}: "Chongho information & communications", + [3]byte{0, 12, 157}: "UbeeAirWalk, Inc.", + [3]byte{0, 12, 158}: "MemoryLink Corp.", + [3]byte{0, 12, 159}: "NKE Corporation", + [3]byte{0, 12, 160}: "StorCase Technology, Inc.", + [3]byte{0, 12, 161}: "SIGMACOM Co., LTD.", + [3]byte{0, 12, 162}: "Harmonic Video Network", + [3]byte{0, 12, 163}: "Rancho Technology, Inc.", + [3]byte{0, 12, 164}: "Prompttec Product Management GmbH", + [3]byte{0, 12, 165}: "Naman NZ LTd", + [3]byte{0, 12, 166}: "Mintera Corporation", + [3]byte{0, 12, 167}: "Metro (Suzhou) Technologies Co., Ltd.", + [3]byte{0, 12, 168}: "Garuda Networks Corporation", + [3]byte{0, 12, 169}: "Ebtron Inc.", + [3]byte{0, 12, 170}: "Cubic Transportation Systems Inc", + [3]byte{0, 12, 171}: "COMMEND International", + [3]byte{0, 12, 172}: "Citizen Watch Co., Ltd.", + [3]byte{0, 12, 173}: "BTU International", + [3]byte{0, 12, 174}: "Ailocom Oy", + [3]byte{0, 12, 175}: "TRI TERM CO.,LTD.", + [3]byte{0, 12, 176}: "Star Semiconductor Corporation", + [3]byte{0, 12, 177}: "Salland Engineering (Europe) BV", + [3]byte{0, 12, 178}: "UNION co., ltd.", + [3]byte{0, 12, 179}: "ROUND Co.,Ltd.", + [3]byte{0, 12, 180}: "AutoCell Laboratories, Inc.", + [3]byte{0, 12, 181}: "Premier Technolgies, Inc", + [3]byte{0, 12, 182}: "NANJING SEU MOBILE & INTERNET TECHNOLOGY CO.,LTD", + [3]byte{0, 12, 183}: "Nanjing Huazhuo Electronics Co., Ltd.", + [3]byte{0, 12, 184}: "MEDION AG", + [3]byte{0, 12, 185}: "LEA", + [3]byte{0, 12, 186}: "Jamex, Inc.", + [3]byte{0, 12, 187}: "ISKRAEMECO", + [3]byte{0, 12, 188}: "Iscutum", + [3]byte{0, 12, 189}: "Interface Masters, Inc", + [3]byte{0, 12, 190}: "Innominate Security Technologies AG", + [3]byte{0, 12, 191}: "Holy Stone Ent. Co., Ltd.", + [3]byte{0, 12, 192}: "Genera Oy", + [3]byte{0, 12, 193}: "Cooper Industries Inc.", + [3]byte{0, 12, 194}: "ControlNet (India) Private Limited", + [3]byte{0, 12, 195}: "BeWAN systems", + [3]byte{0, 12, 196}: "Tiptel AG", + [3]byte{0, 12, 197}: "Nextlink Co., Ltd.", + [3]byte{0, 12, 198}: "Ka-Ro electronics GmbH", + [3]byte{0, 12, 199}: "Intelligent Computer Solutions Inc.", + [3]byte{0, 12, 200}: "Xytronix Research & Design, Inc.", + [3]byte{0, 12, 201}: "ILWOO DATA & TECHNOLOGY CO.,LTD", + [3]byte{0, 12, 202}: "HGST a Western Digital Company", + [3]byte{0, 12, 203}: "Design Combus Ltd", + [3]byte{0, 12, 204}: "Aeroscout Ltd.", + [3]byte{0, 12, 205}: "IEC - TC57", + [3]byte{0, 12, 206}: "CISCO SYSTEMS, INC.", + [3]byte{0, 12, 207}: "CISCO SYSTEMS, INC.", + [3]byte{0, 12, 208}: "Symetrix", + [3]byte{0, 12, 209}: "SFOM Technology Corp.", + [3]byte{0, 12, 210}: "Schaffner EMV AG", + [3]byte{0, 12, 211}: "Prettl Elektronik Radeberg GmbH", + [3]byte{0, 12, 212}: "Positron Public Safety Systems inc.", + [3]byte{0, 12, 213}: "Passave Inc.", + [3]byte{0, 12, 214}: "PARTNER TECH", + [3]byte{0, 12, 215}: "Nallatech Ltd", + [3]byte{0, 12, 216}: "M. K. Juchheim GmbH & Co", + [3]byte{0, 12, 217}: "Itcare Co., Ltd", + [3]byte{0, 12, 218}: "FreeHand Systems, Inc.", + [3]byte{0, 12, 219}: "Brocade Communications Systems, Inc", + [3]byte{0, 12, 220}: "BECS Technology, Inc", + [3]byte{0, 12, 221}: "AOS Technologies AG", + [3]byte{0, 12, 222}: "ABB STOTZ-KONTAKT GmbH", + [3]byte{0, 12, 223}: "PULNiX America, Inc", + [3]byte{0, 12, 224}: "Trek Diagnostics Inc.", + [3]byte{0, 12, 225}: "The Open Group", + [3]byte{0, 12, 226}: "Rolls-Royce", + [3]byte{0, 12, 227}: "Option International N.V.", + [3]byte{0, 12, 228}: "NeuroCom International, Inc.", + [3]byte{0, 12, 229}: "ARRIS Group, Inc.", + [3]byte{0, 12, 230}: "Meru Networks Inc", + [3]byte{0, 12, 231}: "MediaTek Inc.", + [3]byte{0, 12, 232}: "GuangZhou AnJuBao Co., Ltd", + [3]byte{0, 12, 233}: "BLOOMBERG L.P.", + [3]byte{0, 12, 234}: "aphona Kommunikationssysteme", + [3]byte{0, 12, 235}: "CNMP Networks, Inc.", + [3]byte{0, 12, 236}: "Spectracom Corp.", + [3]byte{0, 12, 237}: "Real Digital Media", + [3]byte{0, 12, 238}: "jp-embedded", + [3]byte{0, 12, 239}: "Open Networks Engineering Ltd", + [3]byte{0, 12, 240}: "M & N GmbH", + [3]byte{0, 12, 241}: "Intel Corporation", + [3]byte{0, 12, 242}: "GAMESA Eólica", + [3]byte{0, 12, 243}: "CALL IMAGE SA", + [3]byte{0, 12, 244}: "AKATSUKI ELECTRIC MFG.CO.,LTD.", + [3]byte{0, 12, 245}: "InfoExpress", + [3]byte{0, 12, 246}: "Sitecom Europe BV", + [3]byte{0, 12, 247}: "Nortel Networks", + [3]byte{0, 12, 248}: "Nortel Networks", + [3]byte{0, 12, 249}: "Xylem Water Solutions", + [3]byte{0, 12, 250}: "Digital Systems Corp", + [3]byte{0, 12, 251}: "Korea Network Systems", + [3]byte{0, 12, 252}: "S2io Technologies Corp", + [3]byte{0, 12, 253}: "Hyundai ImageQuest Co.,Ltd.", + [3]byte{0, 12, 254}: "Grand Electronic Co., Ltd", + [3]byte{0, 12, 255}: "MRO-TEK LIMITED", + [3]byte{0, 13, 0}: "Seaway Networks Inc.", + [3]byte{0, 13, 1}: "P&E Microcomputer Systems, Inc.", + [3]byte{0, 13, 2}: "NEC Platforms, Ltd.", + [3]byte{0, 13, 3}: "Matrics, Inc.", + [3]byte{0, 13, 4}: "Foxboro Eckardt Development GmbH", + [3]byte{0, 13, 5}: "cybernet manufacturing inc.", + [3]byte{0, 13, 6}: "Compulogic Limited", + [3]byte{0, 13, 7}: "Calrec Audio Ltd", + [3]byte{0, 13, 8}: "AboveCable, Inc.", + [3]byte{0, 13, 9}: "Yuehua(Zhuhai) Electronic CO. LTD", + [3]byte{0, 13, 10}: "Projectiondesign as", + [3]byte{0, 13, 11}: "Buffalo Inc.", + [3]byte{0, 13, 12}: "MDI Security Systems", + [3]byte{0, 13, 13}: "ITSupported, LLC", + [3]byte{0, 13, 14}: "Inqnet Systems, Inc.", + [3]byte{0, 13, 15}: "Finlux Ltd", + [3]byte{0, 13, 16}: "Embedtronics Oy", + [3]byte{0, 13, 17}: "DENTSPLY - Gendex", + [3]byte{0, 13, 18}: "AXELL Corporation", + [3]byte{0, 13, 19}: "Wilhelm Rutenbeck GmbH&Co.KG", + [3]byte{0, 13, 20}: "Vtech Innovation LP dba Advanced American Telephones", + [3]byte{0, 13, 21}: "Voipac s.r.o.", + [3]byte{0, 13, 22}: "UHS Systems Pty Ltd", + [3]byte{0, 13, 23}: "Turbo Networks Co.Ltd", + [3]byte{0, 13, 24}: "Mega-Trend Electronics CO., LTD.", + [3]byte{0, 13, 25}: "ROBE Show lighting", + [3]byte{0, 13, 26}: "Mustek System Inc.", + [3]byte{0, 13, 27}: "Kyoto Electronics Manufacturing Co., Ltd.", + [3]byte{0, 13, 28}: "Amesys Defense", + [3]byte{0, 13, 29}: "HIGH-TEK HARNESS ENT. CO., LTD.", + [3]byte{0, 13, 30}: "Control Techniques", + [3]byte{0, 13, 31}: "AV Digital", + [3]byte{0, 13, 32}: "ASAHIKASEI TECHNOSYSTEM CO.,LTD.", + [3]byte{0, 13, 33}: "WISCORE Inc.", + [3]byte{0, 13, 34}: "Unitronics LTD", + [3]byte{0, 13, 35}: "Smart Solution, Inc", + [3]byte{0, 13, 36}: "SENTEC E&E CO., LTD.", + [3]byte{0, 13, 37}: "SANDEN CORPORATION", + [3]byte{0, 13, 38}: "Primagraphics Limited", + [3]byte{0, 13, 39}: "MICROPLEX Printware AG", + [3]byte{0, 13, 40}: "CISCO SYSTEMS, INC.", + [3]byte{0, 13, 41}: "CISCO SYSTEMS, INC.", + [3]byte{0, 13, 42}: "Scanmatic AS", + [3]byte{0, 13, 43}: "Racal Instruments", + [3]byte{0, 13, 44}: "Patapsco Designs Ltd", + [3]byte{0, 13, 45}: "NCT Deutschland GmbH", + [3]byte{0, 13, 46}: "Matsushita Avionics Systems Corporation", + [3]byte{0, 13, 47}: "AIN Comm.Tech.Co., LTD", + [3]byte{0, 13, 48}: "IceFyre Semiconductor", + [3]byte{0, 13, 49}: "Compellent Technologies, Inc.", + [3]byte{0, 13, 50}: "DispenseSource, Inc.", + [3]byte{0, 13, 51}: "Prediwave Corp.", + [3]byte{0, 13, 52}: "Shell International Exploration and Production, Inc.", + [3]byte{0, 13, 53}: "PAC International Ltd", + [3]byte{0, 13, 54}: "Wu Han Routon Electronic Co., Ltd", + [3]byte{0, 13, 55}: "WIPLUG", + [3]byte{0, 13, 56}: "NISSIN INC.", + [3]byte{0, 13, 57}: "Network Electronics", + [3]byte{0, 13, 58}: "Microsoft Corp.", + [3]byte{0, 13, 59}: "Microelectronics Technology Inc.", + [3]byte{0, 13, 60}: "i.Tech Dynamic Ltd", + [3]byte{0, 13, 61}: "Hammerhead Systems, Inc.", + [3]byte{0, 13, 62}: "APLUX Communications Ltd.", + [3]byte{0, 13, 63}: "VTI Instruments Corporation", + [3]byte{0, 13, 64}: "Verint Loronix Video Solutions", + [3]byte{0, 13, 65}: "Siemens AG ICM MP UC RD IT KLF1", + [3]byte{0, 13, 66}: "Newbest Development Limited", + [3]byte{0, 13, 67}: "DRS Tactical Systems Inc.", + [3]byte{0, 13, 68}: "Audio BU - Logitech", + [3]byte{0, 13, 69}: "Tottori SANYO Electric Co., Ltd.", + [3]byte{0, 13, 70}: "Parker SSD Drives", + [3]byte{0, 13, 71}: "Collex", + [3]byte{0, 13, 72}: "AEWIN Technologies Co., Ltd.", + [3]byte{0, 13, 73}: "Triton Systems of Delaware, Inc.", + [3]byte{0, 13, 74}: "Steag ETA-Optik", + [3]byte{0, 13, 75}: "Roku, LLC", + [3]byte{0, 13, 76}: "Outline Electronics Ltd.", + [3]byte{0, 13, 77}: "Ninelanes", + [3]byte{0, 13, 78}: "NDR Co.,LTD.", + [3]byte{0, 13, 79}: "Kenwood Corporation", + [3]byte{0, 13, 80}: "Galazar Networks", + [3]byte{0, 13, 81}: "DIVR Systems, Inc.", + [3]byte{0, 13, 82}: "Comart system", + [3]byte{0, 13, 83}: "Beijing 5w Communication Corp.", + [3]byte{0, 13, 84}: "3Com Ltd", + [3]byte{0, 13, 85}: "SANYCOM Technology Co.,Ltd", + [3]byte{0, 13, 86}: "Dell Inc", + [3]byte{0, 13, 87}: "Fujitsu I-Network Systems Limited.", + [3]byte{0, 13, 88}: "PRIVATE", + [3]byte{0, 13, 89}: "Amity Systems, Inc.", + [3]byte{0, 13, 90}: "Tiesse SpA", + [3]byte{0, 13, 91}: "Smart Empire Investments Limited", + [3]byte{0, 13, 92}: "Robert Bosch GmbH, VT-ATMO", + [3]byte{0, 13, 93}: "Raritan Computer, Inc", + [3]byte{0, 13, 94}: "NEC Personal Products", + [3]byte{0, 13, 95}: "Minds Inc", + [3]byte{0, 13, 96}: "IBM Corp", + [3]byte{0, 13, 97}: "Giga-Byte Technology Co., Ltd.", + [3]byte{0, 13, 98}: "Funkwerk Dabendorf GmbH", + [3]byte{0, 13, 99}: "DENT Instruments, Inc.", + [3]byte{0, 13, 100}: "COMAG Handels AG", + [3]byte{0, 13, 101}: "CISCO SYSTEMS, INC.", + [3]byte{0, 13, 102}: "CISCO SYSTEMS, INC.", + [3]byte{0, 13, 103}: "Ericsson", + [3]byte{0, 13, 104}: "Vinci Systems, Inc.", + [3]byte{0, 13, 105}: "TMT&D Corporation", + [3]byte{0, 13, 106}: "Redwood Technologies LTD", + [3]byte{0, 13, 107}: "Mita-Teknik A/S", + [3]byte{0, 13, 108}: "M-Audio", + [3]byte{0, 13, 109}: "K-Tech Devices Corp.", + [3]byte{0, 13, 110}: "K-Patents Oy", + [3]byte{0, 13, 111}: "Ember Corporation", + [3]byte{0, 13, 112}: "Datamax Corporation", + [3]byte{0, 13, 113}: "boca systems", + [3]byte{0, 13, 114}: "2Wire, Inc", + [3]byte{0, 13, 115}: "Technical Support, Inc.", + [3]byte{0, 13, 116}: "Sand Network Systems, Inc.", + [3]byte{0, 13, 117}: "Kobian Pte Ltd - Taiwan Branch", + [3]byte{0, 13, 118}: "Hokuto Denshi Co,. Ltd.", + [3]byte{0, 13, 119}: "FalconStor Software", + [3]byte{0, 13, 120}: "Engineering & Security", + [3]byte{0, 13, 121}: "Dynamic Solutions Co,.Ltd.", + [3]byte{0, 13, 122}: "DiGATTO Asia Pacific Pte Ltd", + [3]byte{0, 13, 123}: "Consensys Computers Inc.", + [3]byte{0, 13, 124}: "Codian Ltd", + [3]byte{0, 13, 125}: "Afco Systems", + [3]byte{0, 13, 126}: "Axiowave Networks, Inc.", + [3]byte{0, 13, 127}: "MIDAS COMMUNICATION TECHNOLOGIES PTE LTD ( Foreign Branch)", + [3]byte{0, 13, 128}: "Online Development Inc", + [3]byte{0, 13, 129}: "Pepperl+Fuchs GmbH", + [3]byte{0, 13, 130}: "PHS srl", + [3]byte{0, 13, 131}: "Sanmina-SCI Hungary Ltd.", + [3]byte{0, 13, 132}: "Makus Inc.", + [3]byte{0, 13, 133}: "Tapwave, Inc.", + [3]byte{0, 13, 134}: "Huber + Suhner AG", + [3]byte{0, 13, 135}: "Elitegroup Computer System Co. (ECS)", + [3]byte{0, 13, 136}: "D-Link Corporation", + [3]byte{0, 13, 137}: "Bils Technology Inc", + [3]byte{0, 13, 138}: "Winners Electronics Co., Ltd.", + [3]byte{0, 13, 139}: "T&D Corporation", + [3]byte{0, 13, 140}: "Shanghai Wedone Digital Ltd. CO.", + [3]byte{0, 13, 141}: "Prosoft Technology, Inc", + [3]byte{0, 13, 142}: "Koden Electronics Co., Ltd.", + [3]byte{0, 13, 143}: "King Tsushin Kogyo Co., LTD.", + [3]byte{0, 13, 144}: "Factum Electronics AB", + [3]byte{0, 13, 145}: "Eclipse (HQ Espana) S.L.", + [3]byte{0, 13, 146}: "Arima Communication Corporation", + [3]byte{0, 13, 147}: "Apple", + [3]byte{0, 13, 148}: "AFAR Communications,Inc", + [3]byte{0, 13, 149}: "Opti-cell, Inc.", + [3]byte{0, 13, 150}: "Vtera Technology Inc.", + [3]byte{0, 13, 151}: "Tropos Networks, Inc.", + [3]byte{0, 13, 152}: "S.W.A.C. Schmitt-Walter Automation Consult GmbH", + [3]byte{0, 13, 153}: "Orbital Sciences Corp.; Launch Systems Group", + [3]byte{0, 13, 154}: "INFOTEC LTD", + [3]byte{0, 13, 155}: "Heraeus Electro-Nite International N.V.", + [3]byte{0, 13, 156}: "Elan GmbH & Co KG", + [3]byte{0, 13, 157}: "Hewlett-Packard Company", + [3]byte{0, 13, 158}: "TOKUDEN OHIZUMI SEISAKUSYO Co.,Ltd.", + [3]byte{0, 13, 159}: "RF Micro Devices", + [3]byte{0, 13, 160}: "NEDAP N.V.", + [3]byte{0, 13, 161}: "MIRAE ITS Co.,LTD.", + [3]byte{0, 13, 162}: "Infrant Technologies, Inc.", + [3]byte{0, 13, 163}: "Emerging Technologies Limited", + [3]byte{0, 13, 164}: "DOSCH & AMAND SYSTEMS AG", + [3]byte{0, 13, 165}: "Fabric7 Systems, Inc", + [3]byte{0, 13, 166}: "Universal Switching Corporation", + [3]byte{0, 13, 167}: "PRIVATE", + [3]byte{0, 13, 168}: "Teletronics Technology Corporation", + [3]byte{0, 13, 169}: "T.E.A.M. S.L.", + [3]byte{0, 13, 170}: "S.A.Tehnology co.,Ltd.", + [3]byte{0, 13, 171}: "Parker Hannifin GmbH Electromechanical Division Europe", + [3]byte{0, 13, 172}: "Japan CBM Corporation", + [3]byte{0, 13, 173}: "Dataprobe, Inc.", + [3]byte{0, 13, 174}: "SAMSUNG HEAVY INDUSTRIES CO., LTD.", + [3]byte{0, 13, 175}: "Plexus Corp (UK) Ltd", + [3]byte{0, 13, 176}: "Olym-tech Co.,Ltd.", + [3]byte{0, 13, 177}: "Japan Network Service Co., Ltd.", + [3]byte{0, 13, 178}: "Ammasso, Inc.", + [3]byte{0, 13, 179}: "SDO Communication Corperation", + [3]byte{0, 13, 180}: "NETASQ", + [3]byte{0, 13, 181}: "GLOBALSAT TECHNOLOGY CORPORATION", + [3]byte{0, 13, 182}: "Broadcom Corporation", + [3]byte{0, 13, 183}: "SANKO ELECTRIC CO,.LTD", + [3]byte{0, 13, 184}: "SCHILLER AG", + [3]byte{0, 13, 185}: "PC Engines GmbH", + [3]byte{0, 13, 186}: "Océ Document Technologies GmbH", + [3]byte{0, 13, 187}: "Nippon Dentsu Co.,Ltd.", + [3]byte{0, 13, 188}: "CISCO SYSTEMS, INC.", + [3]byte{0, 13, 189}: "CISCO SYSTEMS, INC.", + [3]byte{0, 13, 190}: "Bel Fuse Europe Ltd.,UK", + [3]byte{0, 13, 191}: "TekTone Sound & Signal Mfg., Inc.", + [3]byte{0, 13, 192}: "Spagat AS", + [3]byte{0, 13, 193}: "SafeWeb Inc", + [3]byte{0, 13, 194}: "PRIVATE", + [3]byte{0, 13, 195}: "First Communication, Inc.", + [3]byte{0, 13, 196}: "Emcore Corporation", + [3]byte{0, 13, 197}: "EchoStar Global B.V.", + [3]byte{0, 13, 198}: "DigiRose Technology Co., Ltd.", + [3]byte{0, 13, 199}: "COSMIC ENGINEERING INC.", + [3]byte{0, 13, 200}: "AirMagnet, Inc", + [3]byte{0, 13, 201}: "THALES Elektronik Systeme GmbH", + [3]byte{0, 13, 202}: "Tait Electronics", + [3]byte{0, 13, 203}: "Petcomkorea Co., Ltd.", + [3]byte{0, 13, 204}: "NEOSMART Corp.", + [3]byte{0, 13, 205}: "GROUPE TXCOM", + [3]byte{0, 13, 206}: "Dynavac Technology Pte Ltd", + [3]byte{0, 13, 207}: "Cidra Corp.", + [3]byte{0, 13, 208}: "TetraTec Instruments GmbH", + [3]byte{0, 13, 209}: "Stryker Corporation", + [3]byte{0, 13, 210}: "Simrad Optronics ASA", + [3]byte{0, 13, 211}: "SAMWOO Telecommunication Co.,Ltd.", + [3]byte{0, 13, 212}: "Symantec Corporation", + [3]byte{0, 13, 213}: "O'RITE TECHNOLOGY CO.,LTD", + [3]byte{0, 13, 214}: "ITI LTD", + [3]byte{0, 13, 215}: "Bright", + [3]byte{0, 13, 216}: "BBN", + [3]byte{0, 13, 217}: "Anton Paar GmbH", + [3]byte{0, 13, 218}: "ALLIED TELESIS K.K.", + [3]byte{0, 13, 219}: "AIRWAVE TECHNOLOGIES INC.", + [3]byte{0, 13, 220}: "VAC", + [3]byte{0, 13, 221}: "Profilo Telra Elektronik Sanayi ve Ticaret. A.Ş", + [3]byte{0, 13, 222}: "Joyteck Co., Ltd.", + [3]byte{0, 13, 223}: "Japan Image & Network Inc.", + [3]byte{0, 13, 224}: "ICPDAS Co.,LTD", + [3]byte{0, 13, 225}: "Control Products, Inc.", + [3]byte{0, 13, 226}: "CMZ Sistemi Elettronici", + [3]byte{0, 13, 227}: "AT Sweden AB", + [3]byte{0, 13, 228}: "DIGINICS, Inc.", + [3]byte{0, 13, 229}: "Samsung Thales", + [3]byte{0, 13, 230}: "YOUNGBO ENGINEERING CO.,LTD", + [3]byte{0, 13, 231}: "Snap-on OEM Group", + [3]byte{0, 13, 232}: "Nasaco Electronics Pte. Ltd", + [3]byte{0, 13, 233}: "Napatech Aps", + [3]byte{0, 13, 234}: "Kingtel Telecommunication Corp.", + [3]byte{0, 13, 235}: "CompXs Limited", + [3]byte{0, 13, 236}: "CISCO SYSTEMS, INC.", + [3]byte{0, 13, 237}: "CISCO SYSTEMS, INC.", + [3]byte{0, 13, 238}: "Andrew RF Power Amplifier Group", + [3]byte{0, 13, 239}: "Soc. Coop. Bilanciai", + [3]byte{0, 13, 240}: "QCOM TECHNOLOGY INC.", + [3]byte{0, 13, 241}: "IONIX INC.", + [3]byte{0, 13, 242}: "PRIVATE", + [3]byte{0, 13, 243}: "Asmax Solutions", + [3]byte{0, 13, 244}: "Watertek Co.", + [3]byte{0, 13, 245}: "Teletronics International Inc.", + [3]byte{0, 13, 246}: "Technology Thesaurus Corp.", + [3]byte{0, 13, 247}: "Space Dynamics Lab", + [3]byte{0, 13, 248}: "ORGA Kartensysteme GmbH", + [3]byte{0, 13, 249}: "NDS Limited", + [3]byte{0, 13, 250}: "Micro Control Systems Ltd.", + [3]byte{0, 13, 251}: "Komax AG", + [3]byte{0, 13, 252}: "ITFOR Inc.", + [3]byte{0, 13, 253}: "Huges Hi-Tech Inc.,", + [3]byte{0, 13, 254}: "Hauppauge Computer Works, Inc.", + [3]byte{0, 13, 255}: "CHENMING MOLD INDUSTRY CORP.", + [3]byte{0, 14, 0}: "Atrie", + [3]byte{0, 14, 1}: "ASIP Technologies Inc.", + [3]byte{0, 14, 2}: "Advantech AMT Inc.", + [3]byte{0, 14, 3}: "Emulex Corporation", + [3]byte{0, 14, 4}: "CMA/Microdialysis AB", + [3]byte{0, 14, 5}: "WIRELESS MATRIX CORP.", + [3]byte{0, 14, 6}: "Team Simoco Ltd", + [3]byte{0, 14, 7}: "Sony Ericsson Mobile Communications AB", + [3]byte{0, 14, 8}: "Cisco Linksys LLC", + [3]byte{0, 14, 9}: "Shenzhen Coship Software Co.,LTD.", + [3]byte{0, 14, 10}: "SAKUMA DESIGN OFFICE", + [3]byte{0, 14, 11}: "Netac Technology Co., Ltd.", + [3]byte{0, 14, 12}: "Intel Corporation", + [3]byte{0, 14, 13}: "Hesch Schröder GmbH", + [3]byte{0, 14, 14}: "ESA elettronica S.P.A.", + [3]byte{0, 14, 15}: "ERMME", + [3]byte{0, 14, 16}: "C-guys, Inc.", + [3]byte{0, 14, 17}: "BDT Büro und Datentechnik GmbH & Co.KG", + [3]byte{0, 14, 18}: "Adaptive Micro Systems Inc.", + [3]byte{0, 14, 19}: "Accu-Sort Systems inc.", + [3]byte{0, 14, 20}: "Visionary Solutions, Inc.", + [3]byte{0, 14, 21}: "Tadlys LTD", + [3]byte{0, 14, 22}: "SouthWing S.L.", + [3]byte{0, 14, 23}: "PRIVATE", + [3]byte{0, 14, 24}: "MyA Technology", + [3]byte{0, 14, 25}: "LogicaCMG Pty Ltd", + [3]byte{0, 14, 26}: "JPS Communications", + [3]byte{0, 14, 27}: "IAV GmbH", + [3]byte{0, 14, 28}: "Hach Company", + [3]byte{0, 14, 29}: "ARION Technology Inc.", + [3]byte{0, 14, 30}: "QLogic Corporation", + [3]byte{0, 14, 31}: "TCL Networks Equipment Co., Ltd.", + [3]byte{0, 14, 32}: "ACCESS Systems Americas, Inc.", + [3]byte{0, 14, 33}: "MTU Friedrichshafen GmbH", + [3]byte{0, 14, 34}: "PRIVATE", + [3]byte{0, 14, 35}: "Incipient, Inc.", + [3]byte{0, 14, 36}: "Huwell Technology Inc.", + [3]byte{0, 14, 37}: "Hannae Technology Co., Ltd", + [3]byte{0, 14, 38}: "Gincom Technology Corp.", + [3]byte{0, 14, 39}: "Crere Networks, Inc.", + [3]byte{0, 14, 40}: "Dynamic Ratings P/L", + [3]byte{0, 14, 41}: "Shester Communications Inc", + [3]byte{0, 14, 42}: "PRIVATE", + [3]byte{0, 14, 43}: "Safari Technologies", + [3]byte{0, 14, 44}: "Netcodec co.", + [3]byte{0, 14, 45}: "Hyundai Digital Technology Co.,Ltd.", + [3]byte{0, 14, 46}: "Edimax Technology Co., Ltd.", + [3]byte{0, 14, 47}: "Roche Diagnostics GmbH", + [3]byte{0, 14, 48}: "AERAS Networks, Inc.", + [3]byte{0, 14, 49}: "Olympus Soft Imaging Solutions GmbH", + [3]byte{0, 14, 50}: "Kontron Medical", + [3]byte{0, 14, 51}: "Shuko Electronics Co.,Ltd", + [3]byte{0, 14, 52}: "NexGen City, LP", + [3]byte{0, 14, 53}: "Intel Corp", + [3]byte{0, 14, 54}: "HEINESYS, Inc.", + [3]byte{0, 14, 55}: "Harms & Wende GmbH & Co.KG", + [3]byte{0, 14, 56}: "CISCO SYSTEMS, INC.", + [3]byte{0, 14, 57}: "CISCO SYSTEMS, INC.", + [3]byte{0, 14, 58}: "Cirrus Logic", + [3]byte{0, 14, 59}: "Hawking Technologies, Inc.", + [3]byte{0, 14, 60}: "Transact Technologies Inc", + [3]byte{0, 14, 61}: "Televic N.V.", + [3]byte{0, 14, 62}: "Sun Optronics Inc", + [3]byte{0, 14, 63}: "Soronti, Inc.", + [3]byte{0, 14, 64}: "Nortel Networks", + [3]byte{0, 14, 65}: "NIHON MECHATRONICS CO.,LTD.", + [3]byte{0, 14, 66}: "Motic Incoporation Ltd.", + [3]byte{0, 14, 67}: "G-Tek Electronics Sdn. Bhd.", + [3]byte{0, 14, 68}: "Digital 5, Inc.", + [3]byte{0, 14, 69}: "Beijing Newtry Electronic Technology Ltd", + [3]byte{0, 14, 70}: "Niigata Seimitsu Co.,Ltd.", + [3]byte{0, 14, 71}: "NCI System Co.,Ltd.", + [3]byte{0, 14, 72}: "Lipman TransAction Solutions", + [3]byte{0, 14, 73}: "Forsway Scandinavia AB", + [3]byte{0, 14, 74}: "Changchun Huayu WEBPAD Co.,LTD", + [3]byte{0, 14, 75}: "atrium c and i", + [3]byte{0, 14, 76}: "Bermai Inc.", + [3]byte{0, 14, 77}: "Numesa Inc.", + [3]byte{0, 14, 78}: "Waveplus Technology Co., Ltd.", + [3]byte{0, 14, 79}: "Trajet GmbH", + [3]byte{0, 14, 80}: "Thomson Telecom Belgium", + [3]byte{0, 14, 81}: "tecna elettronica srl", + [3]byte{0, 14, 82}: "Optium Corporation", + [3]byte{0, 14, 83}: "AV TECH CORPORATION", + [3]byte{0, 14, 84}: "AlphaCell Wireless Ltd.", + [3]byte{0, 14, 85}: "AUVITRAN", + [3]byte{0, 14, 86}: "4G Systems GmbH & Co. KG", + [3]byte{0, 14, 87}: "Iworld Networking, Inc.", + [3]byte{0, 14, 88}: "Sonos, Inc.", + [3]byte{0, 14, 89}: "SAGEM SA", + [3]byte{0, 14, 90}: "TELEFIELD inc.", + [3]byte{0, 14, 91}: "ParkerVision - Direct2Data", + [3]byte{0, 14, 92}: "ARRIS Group, Inc.", + [3]byte{0, 14, 93}: "Triple Play Technologies A/S", + [3]byte{0, 14, 94}: "Raisecom Technology", + [3]byte{0, 14, 95}: "activ-net GmbH & Co. KG", + [3]byte{0, 14, 96}: "360SUN Digital Broadband Corporation", + [3]byte{0, 14, 97}: "MICROTROL LIMITED", + [3]byte{0, 14, 98}: "Nortel Networks", + [3]byte{0, 14, 99}: "Lemke Diagnostics GmbH", + [3]byte{0, 14, 100}: "Elphel, Inc", + [3]byte{0, 14, 101}: "TransCore", + [3]byte{0, 14, 102}: "Hitachi Industry & Control Solutions, Ltd.", + [3]byte{0, 14, 103}: "Eltis Microelectronics Ltd.", + [3]byte{0, 14, 104}: "E-TOP Network Technology Inc.", + [3]byte{0, 14, 105}: "China Electric Power Research Institute", + [3]byte{0, 14, 106}: "3Com Ltd", + [3]byte{0, 14, 107}: "Janitza electronics GmbH", + [3]byte{0, 14, 108}: "Device Drivers Limited", + [3]byte{0, 14, 109}: "Murata Manufacturing Co., Ltd.", + [3]byte{0, 14, 110}: "MAT S.A. (Mircrelec Advanced Technology)", + [3]byte{0, 14, 111}: "IRIS Corporation Berhad", + [3]byte{0, 14, 112}: "in2 Networks", + [3]byte{0, 14, 113}: "Gemstar Technology Development Ltd.", + [3]byte{0, 14, 114}: "CTS electronics", + [3]byte{0, 14, 115}: "Tpack A/S", + [3]byte{0, 14, 116}: "Solar Telecom. Tech", + [3]byte{0, 14, 117}: "New York Air Brake Corp.", + [3]byte{0, 14, 118}: "GEMSOC INNOVISION INC.", + [3]byte{0, 14, 119}: "Decru, Inc.", + [3]byte{0, 14, 120}: "Amtelco", + [3]byte{0, 14, 121}: "Ample Communications Inc.", + [3]byte{0, 14, 122}: "GemWon Communications Co., Ltd.", + [3]byte{0, 14, 123}: "Toshiba", + [3]byte{0, 14, 124}: "Televes S.A.", + [3]byte{0, 14, 125}: "Electronics Line 3000 Ltd.", + [3]byte{0, 14, 126}: "ionSign Oy", + [3]byte{0, 14, 127}: "Hewlett-Packard Company", + [3]byte{0, 14, 128}: "Thomson Technology Inc", + [3]byte{0, 14, 129}: "Devicescape Software, Inc.", + [3]byte{0, 14, 130}: "Commtech Wireless", + [3]byte{0, 14, 131}: "CISCO SYSTEMS, INC.", + [3]byte{0, 14, 132}: "CISCO SYSTEMS, INC.", + [3]byte{0, 14, 133}: "Catalyst Enterprises, Inc.", + [3]byte{0, 14, 134}: "Alcatel North America", + [3]byte{0, 14, 135}: "adp Gauselmann GmbH", + [3]byte{0, 14, 136}: "VIDEOTRON CORP.", + [3]byte{0, 14, 137}: "CLEMATIC", + [3]byte{0, 14, 138}: "Avara Technologies Pty. Ltd.", + [3]byte{0, 14, 139}: "Astarte Technology Co, Ltd.", + [3]byte{0, 14, 140}: "Siemens AG A&D ET", + [3]byte{0, 14, 141}: "Systems in Progress Holding GmbH", + [3]byte{0, 14, 142}: "SparkLAN Communications, Inc.", + [3]byte{0, 14, 143}: "Sercomm Corp.", + [3]byte{0, 14, 144}: "PONICO CORP.", + [3]byte{0, 14, 145}: "Navico Auckland Ltd", + [3]byte{0, 14, 146}: "Open Telecom", + [3]byte{0, 14, 147}: "Milénio 3 Sistemas Electrónicos, Lda.", + [3]byte{0, 14, 148}: "Maas International BV", + [3]byte{0, 14, 149}: "Fujiya Denki Seisakusho Co.,Ltd.", + [3]byte{0, 14, 150}: "Cubic Defense Applications, Inc.", + [3]byte{0, 14, 151}: "Ultracker Technology CO., Inc", + [3]byte{0, 14, 152}: "HME Clear-Com LTD.", + [3]byte{0, 14, 153}: "Spectrum Digital, Inc", + [3]byte{0, 14, 154}: "BOE TECHNOLOGY GROUP CO.,LTD", + [3]byte{0, 14, 155}: "Ambit Microsystems Corporation", + [3]byte{0, 14, 156}: "Benchmark Electronics", + [3]byte{0, 14, 157}: "Tiscali UK Ltd", + [3]byte{0, 14, 158}: "Topfield Co., Ltd", + [3]byte{0, 14, 159}: "TEMIC SDS GmbH", + [3]byte{0, 14, 160}: "NetKlass Technology Inc.", + [3]byte{0, 14, 161}: "Formosa Teletek Corporation", + [3]byte{0, 14, 162}: "McAfee, Inc", + [3]byte{0, 14, 163}: "CNCR-IT CO.,LTD,HangZhou P.R.CHINA", + [3]byte{0, 14, 164}: "Certance Inc.", + [3]byte{0, 14, 165}: "BLIP Systems", + [3]byte{0, 14, 166}: "ASUSTEK COMPUTER INC.", + [3]byte{0, 14, 167}: "Endace Technology", + [3]byte{0, 14, 168}: "United Technologists Europe Limited", + [3]byte{0, 14, 169}: "Shanghai Xun Shi Communications Equipment Ltd. Co.", + [3]byte{0, 14, 170}: "Scalent Systems, Inc.", + [3]byte{0, 14, 171}: "Cray Inc", + [3]byte{0, 14, 172}: "MINTRON ENTERPRISE CO., LTD.", + [3]byte{0, 14, 173}: "Metanoia Technologies, Inc.", + [3]byte{0, 14, 174}: "GAWELL TECHNOLOGIES CORP.", + [3]byte{0, 14, 175}: "CASTEL", + [3]byte{0, 14, 176}: "Solutions Radio BV", + [3]byte{0, 14, 177}: "Newcotech,Ltd", + [3]byte{0, 14, 178}: "Micro-Research Finland Oy", + [3]byte{0, 14, 179}: "Hewlett-Packard", + [3]byte{0, 14, 180}: "GUANGZHOU GAOKE COMMUNICATIONS TECHNOLOGY CO.LTD.", + [3]byte{0, 14, 181}: "Ecastle Electronics Co., Ltd.", + [3]byte{0, 14, 182}: "Riverbed Technology, Inc.", + [3]byte{0, 14, 183}: "Knovative, Inc.", + [3]byte{0, 14, 184}: "Iiga co.,Ltd", + [3]byte{0, 14, 185}: "HASHIMOTO Electronics Industry Co.,Ltd.", + [3]byte{0, 14, 186}: "HANMI SEMICONDUCTOR CO., LTD.", + [3]byte{0, 14, 187}: "Everbee Networks", + [3]byte{0, 14, 188}: "Paragon Fidelity GmbH", + [3]byte{0, 14, 189}: "Burdick, a Quinton Compny", + [3]byte{0, 14, 190}: "B&B Electronics Manufacturing Co.", + [3]byte{0, 14, 191}: "Remsdaq Limited", + [3]byte{0, 14, 192}: "Nortel Networks", + [3]byte{0, 14, 193}: "MYNAH Technologies", + [3]byte{0, 14, 194}: "Lowrance Electronics, Inc.", + [3]byte{0, 14, 195}: "Logic Controls, Inc.", + [3]byte{0, 14, 196}: "Iskra Transmission d.d.", + [3]byte{0, 14, 197}: "Digital Multitools Inc", + [3]byte{0, 14, 198}: "ASIX ELECTRONICS CORP.", + [3]byte{0, 14, 199}: "Motorola Korea", + [3]byte{0, 14, 200}: "Zoran Corporation", + [3]byte{0, 14, 201}: "YOKO Technology Corp.", + [3]byte{0, 14, 202}: "WTSS Inc", + [3]byte{0, 14, 203}: "VineSys Technology", + [3]byte{0, 14, 204}: "Tableau, LLC", + [3]byte{0, 14, 205}: "SKOV A/S", + [3]byte{0, 14, 206}: "S.I.T.T.I. S.p.A.", + [3]byte{0, 14, 207}: "PROFIBUS Nutzerorganisation e.V.", + [3]byte{0, 14, 208}: "Privaris, Inc.", + [3]byte{0, 14, 209}: "Osaka Micro Computer.", + [3]byte{0, 14, 210}: "Filtronic plc", + [3]byte{0, 14, 211}: "Epicenter, Inc.", + [3]byte{0, 14, 212}: "CRESITT INDUSTRIE", + [3]byte{0, 14, 213}: "COPAN Systems Inc.", + [3]byte{0, 14, 214}: "CISCO SYSTEMS, INC.", + [3]byte{0, 14, 215}: "CISCO SYSTEMS, INC.", + [3]byte{0, 14, 216}: "Aktino, Inc.", + [3]byte{0, 14, 217}: "Aksys, Ltd.", + [3]byte{0, 14, 218}: "C-TECH UNITED CORP.", + [3]byte{0, 14, 219}: "XiNCOM Corp.", + [3]byte{0, 14, 220}: "Tellion INC.", + [3]byte{0, 14, 221}: "SHURE INCORPORATED", + [3]byte{0, 14, 222}: "REMEC, Inc.", + [3]byte{0, 14, 223}: "PLX Technology", + [3]byte{0, 14, 224}: "Mcharge", + [3]byte{0, 14, 225}: "ExtremeSpeed Inc.", + [3]byte{0, 14, 226}: "Custom Engineering", + [3]byte{0, 14, 227}: "Chiyu Technology Co.,Ltd", + [3]byte{0, 14, 228}: "BOE TECHNOLOGY GROUP CO.,LTD", + [3]byte{0, 14, 229}: "bitWallet, Inc.", + [3]byte{0, 14, 230}: "Adimos Systems LTD", + [3]byte{0, 14, 231}: "AAC ELECTRONICS CORP.", + [3]byte{0, 14, 232}: "zioncom", + [3]byte{0, 14, 233}: "WayTech Development, Inc.", + [3]byte{0, 14, 234}: "Shadong Luneng Jicheng Electronics,Co.,Ltd", + [3]byte{0, 14, 235}: "Sandmartin(zhong shan)Electronics Co.,Ltd", + [3]byte{0, 14, 236}: "Orban", + [3]byte{0, 14, 237}: "Nokia Danmark A/S", + [3]byte{0, 14, 238}: "Muco Industrie BV", + [3]byte{0, 14, 239}: "PRIVATE", + [3]byte{0, 14, 240}: "Festo AG & Co. KG", + [3]byte{0, 14, 241}: "EZQUEST INC.", + [3]byte{0, 14, 242}: "Infinico Corporation", + [3]byte{0, 14, 243}: "Smarthome", + [3]byte{0, 14, 244}: "Kasda Digital Technology Co.,Ltd", + [3]byte{0, 14, 245}: "iPAC Technology Co., Ltd.", + [3]byte{0, 14, 246}: "E-TEN Information Systems Co., Ltd.", + [3]byte{0, 14, 247}: "Vulcan Portals Inc", + [3]byte{0, 14, 248}: "SBC ASI", + [3]byte{0, 14, 249}: "REA Elektronik GmbH", + [3]byte{0, 14, 250}: "Optoway Technology Incorporation", + [3]byte{0, 14, 251}: "Macey Enterprises", + [3]byte{0, 14, 252}: "JTAG Technologies B.V.", + [3]byte{0, 14, 253}: "FUJINON CORPORATION", + [3]byte{0, 14, 254}: "EndRun Technologies LLC", + [3]byte{0, 14, 255}: "Megasolution,Inc.", + [3]byte{0, 15, 0}: "Legra Systems, Inc.", + [3]byte{0, 15, 1}: "DIGITALKS INC", + [3]byte{0, 15, 2}: "Digicube Technology Co., Ltd", + [3]byte{0, 15, 3}: "COM&C CO., LTD", + [3]byte{0, 15, 4}: "cim-usa inc", + [3]byte{0, 15, 5}: "3B SYSTEM INC.", + [3]byte{0, 15, 6}: "Nortel Networks", + [3]byte{0, 15, 7}: "Mangrove Systems, Inc.", + [3]byte{0, 15, 8}: "Indagon Oy", + [3]byte{0, 15, 9}: "PRIVATE", + [3]byte{0, 15, 10}: "Clear Edge Networks", + [3]byte{0, 15, 11}: "Kentima Technologies AB", + [3]byte{0, 15, 12}: "SYNCHRONIC ENGINEERING", + [3]byte{0, 15, 13}: "Hunt Electronic Co., Ltd.", + [3]byte{0, 15, 14}: "WaveSplitter Technologies, Inc.", + [3]byte{0, 15, 15}: "Real ID Technology Co., Ltd.", + [3]byte{0, 15, 16}: "RDM Corporation", + [3]byte{0, 15, 17}: "Prodrive B.V.", + [3]byte{0, 15, 18}: "Panasonic Europe Ltd.", + [3]byte{0, 15, 19}: "Nisca corporation", + [3]byte{0, 15, 20}: "Mindray Co., Ltd.", + [3]byte{0, 15, 21}: "Kjaerulff1 A/S", + [3]byte{0, 15, 22}: "JAY HOW TECHNOLOGY CO.,", + [3]byte{0, 15, 23}: "Insta Elektro GmbH", + [3]byte{0, 15, 24}: "Industrial Control Systems", + [3]byte{0, 15, 25}: "Boston Scientific", + [3]byte{0, 15, 26}: "Gaming Support B.V.", + [3]byte{0, 15, 27}: "Ego Systems Inc.", + [3]byte{0, 15, 28}: "DigitAll World Co., Ltd", + [3]byte{0, 15, 29}: "Cosmo Techs Co., Ltd.", + [3]byte{0, 15, 30}: "Chengdu KT Electric Co.of High & New Technology", + [3]byte{0, 15, 31}: "Dell Inc", + [3]byte{0, 15, 32}: "Hewlett-Packard Company", + [3]byte{0, 15, 33}: "Scientific Atlanta, Inc", + [3]byte{0, 15, 34}: "Helius, Inc.", + [3]byte{0, 15, 35}: "CISCO SYSTEMS, INC.", + [3]byte{0, 15, 36}: "CISCO SYSTEMS, INC.", + [3]byte{0, 15, 37}: "AimValley B.V.", + [3]byte{0, 15, 38}: "WorldAccxx LLC", + [3]byte{0, 15, 39}: "TEAL Electronics, Inc.", + [3]byte{0, 15, 40}: "Itronix Corporation", + [3]byte{0, 15, 41}: "Augmentix Corporation", + [3]byte{0, 15, 42}: "Cableware Electronics", + [3]byte{0, 15, 43}: "GREENBELL SYSTEMS", + [3]byte{0, 15, 44}: "Uplogix, Inc.", + [3]byte{0, 15, 45}: "CHUNG-HSIN ELECTRIC & MACHINERY MFG.CORP.", + [3]byte{0, 15, 46}: "Megapower International Corp.", + [3]byte{0, 15, 47}: "W-LINX TECHNOLOGY CO., LTD.", + [3]byte{0, 15, 48}: "Raza Microelectronics Inc", + [3]byte{0, 15, 49}: "Allied Vision Technologies Canada Inc", + [3]byte{0, 15, 50}: "Lootom Telcovideo Network Wuxi Co Ltd", + [3]byte{0, 15, 51}: "DUALi Inc.", + [3]byte{0, 15, 52}: "CISCO SYSTEMS, INC.", + [3]byte{0, 15, 53}: "CISCO SYSTEMS, INC.", + [3]byte{0, 15, 54}: "Accurate Techhnologies, Inc.", + [3]byte{0, 15, 55}: "Xambala Incorporated", + [3]byte{0, 15, 56}: "Netstar", + [3]byte{0, 15, 57}: "IRIS SENSORS", + [3]byte{0, 15, 58}: "HISHARP", + [3]byte{0, 15, 59}: "Fuji System Machines Co., Ltd.", + [3]byte{0, 15, 60}: "Endeleo Limited", + [3]byte{0, 15, 61}: "D-Link Corporation", + [3]byte{0, 15, 62}: "CardioNet, Inc", + [3]byte{0, 15, 63}: "Big Bear Networks", + [3]byte{0, 15, 64}: "Optical Internetworking Forum", + [3]byte{0, 15, 65}: "Zipher Ltd", + [3]byte{0, 15, 66}: "Xalyo Systems", + [3]byte{0, 15, 67}: "Wasabi Systems Inc.", + [3]byte{0, 15, 68}: "Tivella Inc.", + [3]byte{0, 15, 69}: "Stretch, Inc.", + [3]byte{0, 15, 70}: "SINAR AG", + [3]byte{0, 15, 71}: "ROBOX SPA", + [3]byte{0, 15, 72}: "Polypix Inc.", + [3]byte{0, 15, 73}: "Northover Solutions Limited", + [3]byte{0, 15, 74}: "Kyushu-kyohan co.,ltd", + [3]byte{0, 15, 75}: "Oracle Corporation", + [3]byte{0, 15, 76}: "Elextech INC", + [3]byte{0, 15, 77}: "TalkSwitch", + [3]byte{0, 15, 78}: "Cellink", + [3]byte{0, 15, 79}: "Cadmus Technology Ltd", + [3]byte{0, 15, 80}: "StreamScale Limited", + [3]byte{0, 15, 81}: "Azul Systems, Inc.", + [3]byte{0, 15, 82}: "YORK Refrigeration, Marine & Controls", + [3]byte{0, 15, 83}: "Solarflare Communications Inc", + [3]byte{0, 15, 84}: "Entrelogic Corporation", + [3]byte{0, 15, 85}: "Datawire Communication Networks Inc.", + [3]byte{0, 15, 86}: "Continuum Photonics Inc", + [3]byte{0, 15, 87}: "CABLELOGIC Co., Ltd.", + [3]byte{0, 15, 88}: "Adder Technology Limited", + [3]byte{0, 15, 89}: "Phonak Communications AG", + [3]byte{0, 15, 90}: "Peribit Networks", + [3]byte{0, 15, 91}: "Delta Information Systems, Inc.", + [3]byte{0, 15, 92}: "Day One Digital Media Limited", + [3]byte{0, 15, 93}: "Genexis BV", + [3]byte{0, 15, 94}: "Veo", + [3]byte{0, 15, 95}: "Nicety Technologies Inc. (NTS)", + [3]byte{0, 15, 96}: "Lifetron Co.,Ltd", + [3]byte{0, 15, 97}: "Hewlett-Packard Company", + [3]byte{0, 15, 98}: "Alcatel Bell Space N.V.", + [3]byte{0, 15, 99}: "Obzerv Technologies", + [3]byte{0, 15, 100}: "D&R Electronica Weesp BV", + [3]byte{0, 15, 101}: "icube Corp.", + [3]byte{0, 15, 102}: "Cisco-Linksys", + [3]byte{0, 15, 103}: "West Instruments", + [3]byte{0, 15, 104}: "Vavic Network Technology, Inc.", + [3]byte{0, 15, 105}: "SEW Eurodrive GmbH & Co. KG", + [3]byte{0, 15, 106}: "Nortel Networks", + [3]byte{0, 15, 107}: "GateWare Communications GmbH", + [3]byte{0, 15, 108}: "ADDI-DATA GmbH", + [3]byte{0, 15, 109}: "Midas Engineering", + [3]byte{0, 15, 110}: "BBox", + [3]byte{0, 15, 111}: "FTA Communication Technologies", + [3]byte{0, 15, 112}: "Wintec Industries, inc.", + [3]byte{0, 15, 113}: "Sanmei Electronics Co.,Ltd", + [3]byte{0, 15, 114}: "Sandburst", + [3]byte{0, 15, 115}: "RS Automation Co., Ltd", + [3]byte{0, 15, 116}: "Qamcom Technology AB", + [3]byte{0, 15, 117}: "First Silicon Solutions", + [3]byte{0, 15, 118}: "Digital Keystone, Inc.", + [3]byte{0, 15, 119}: "DENTUM CO.,LTD", + [3]byte{0, 15, 120}: "Datacap Systems Inc", + [3]byte{0, 15, 121}: "Bluetooth Interest Group Inc.", + [3]byte{0, 15, 122}: "BeiJing NuQX Technology CO.,LTD", + [3]byte{0, 15, 123}: "Arce Sistemas, S.A.", + [3]byte{0, 15, 124}: "ACTi Corporation", + [3]byte{0, 15, 125}: "Xirrus", + [3]byte{0, 15, 126}: "Ablerex Electronics Co., LTD", + [3]byte{0, 15, 127}: "UBSTORAGE Co.,Ltd.", + [3]byte{0, 15, 128}: "Trinity Security Systems,Inc.", + [3]byte{0, 15, 129}: "PAL Pacific Inc.", + [3]byte{0, 15, 130}: "Mortara Instrument, Inc.", + [3]byte{0, 15, 131}: "Brainium Technologies Inc.", + [3]byte{0, 15, 132}: "Astute Networks, Inc.", + [3]byte{0, 15, 133}: "ADDO-Japan Corporation", + [3]byte{0, 15, 134}: "Research In Motion Limited", + [3]byte{0, 15, 135}: "Maxcess International", + [3]byte{0, 15, 136}: "AMETEK, Inc.", + [3]byte{0, 15, 137}: "Winnertec System Co., Ltd.", + [3]byte{0, 15, 138}: "WideView", + [3]byte{0, 15, 139}: "Orion MultiSystems Inc", + [3]byte{0, 15, 140}: "Gigawavetech Pte Ltd", + [3]byte{0, 15, 141}: "FAST TV-Server AG", + [3]byte{0, 15, 142}: "DONGYANG TELECOM CO.,LTD.", + [3]byte{0, 15, 143}: "CISCO SYSTEMS, INC.", + [3]byte{0, 15, 144}: "CISCO SYSTEMS, INC.", + [3]byte{0, 15, 145}: "Aerotelecom Co.,Ltd.", + [3]byte{0, 15, 146}: "Microhard Systems Inc.", + [3]byte{0, 15, 147}: "Landis+Gyr Ltd.", + [3]byte{0, 15, 148}: "Genexis BV", + [3]byte{0, 15, 149}: "ELECOM Co.,LTD Laneed Division", + [3]byte{0, 15, 150}: "Telco Systems, Inc.", + [3]byte{0, 15, 151}: "Avanex Corporation", + [3]byte{0, 15, 152}: "Avamax Co. Ltd.", + [3]byte{0, 15, 153}: "APAC opto Electronics Inc.", + [3]byte{0, 15, 154}: "Synchrony, Inc.", + [3]byte{0, 15, 155}: "Ross Video Limited", + [3]byte{0, 15, 156}: "Panduit Corp", + [3]byte{0, 15, 157}: "DisplayLink (UK) Ltd", + [3]byte{0, 15, 158}: "Murrelektronik GmbH", + [3]byte{0, 15, 159}: "ARRIS Group, Inc.", + [3]byte{0, 15, 160}: "CANON KOREA BUSINESS SOLUTIONS INC.", + [3]byte{0, 15, 161}: "Gigabit Systems Inc.", + [3]byte{0, 15, 162}: "2xWireless", + [3]byte{0, 15, 163}: "Alpha Networks Inc.", + [3]byte{0, 15, 164}: "Sprecher Automation GmbH", + [3]byte{0, 15, 165}: "BWA Technology GmbH", + [3]byte{0, 15, 166}: "S2 Security Corporation", + [3]byte{0, 15, 167}: "Raptor Networks Technology", + [3]byte{0, 15, 168}: "Photometrics, Inc.", + [3]byte{0, 15, 169}: "PC Fabrik", + [3]byte{0, 15, 170}: "Nexus Technologies", + [3]byte{0, 15, 171}: "Kyushu Electronics Systems Inc.", + [3]byte{0, 15, 172}: "IEEE 802.11", + [3]byte{0, 15, 173}: "FMN communications GmbH", + [3]byte{0, 15, 174}: "E2O Communications", + [3]byte{0, 15, 175}: "Dialog Inc.", + [3]byte{0, 15, 176}: "Compal Electronics,INC.", + [3]byte{0, 15, 177}: "Cognio Inc.", + [3]byte{0, 15, 178}: "Broadband Pacenet (India) Pvt. Ltd.", + [3]byte{0, 15, 179}: "Actiontec Electronics, Inc", + [3]byte{0, 15, 180}: "Timespace Technology", + [3]byte{0, 15, 181}: "NETGEAR Inc", + [3]byte{0, 15, 182}: "Europlex Technologies", + [3]byte{0, 15, 183}: "Cavium Networks", + [3]byte{0, 15, 184}: "CallURL Inc.", + [3]byte{0, 15, 185}: "Adaptive Instruments", + [3]byte{0, 15, 186}: "Tevebox AB", + [3]byte{0, 15, 187}: "Nokia Siemens Networks GmbH & Co. KG.", + [3]byte{0, 15, 188}: "Onkey Technologies, Inc.", + [3]byte{0, 15, 189}: "MRV Communications (Networks) LTD", + [3]byte{0, 15, 190}: "e-w/you Inc.", + [3]byte{0, 15, 191}: "DGT Sp. z o.o.", + [3]byte{0, 15, 192}: "DELCOMp", + [3]byte{0, 15, 193}: "WAVE Corporation", + [3]byte{0, 15, 194}: "Uniwell Corporation", + [3]byte{0, 15, 195}: "PalmPalm Technology, Inc.", + [3]byte{0, 15, 196}: "NST co.,LTD.", + [3]byte{0, 15, 197}: "KeyMed Ltd", + [3]byte{0, 15, 198}: "Eurocom Industries A/S", + [3]byte{0, 15, 199}: "Dionica R&D Ltd.", + [3]byte{0, 15, 200}: "Chantry Networks", + [3]byte{0, 15, 201}: "Allnet GmbH", + [3]byte{0, 15, 202}: "A-JIN TECHLINE CO, LTD", + [3]byte{0, 15, 203}: "3Com Ltd", + [3]byte{0, 15, 204}: "Netopia, Inc.", + [3]byte{0, 15, 205}: "Nortel Networks", + [3]byte{0, 15, 206}: "Kikusui Electronics Corp.", + [3]byte{0, 15, 207}: "Datawind Research", + [3]byte{0, 15, 208}: "ASTRI", + [3]byte{0, 15, 209}: "Applied Wireless Identifications Group, Inc.", + [3]byte{0, 15, 210}: "EWA Technologies, Inc.", + [3]byte{0, 15, 211}: "Digium", + [3]byte{0, 15, 212}: "Soundcraft", + [3]byte{0, 15, 213}: "Schwechat - RISE", + [3]byte{0, 15, 214}: "Sarotech Co., Ltd", + [3]byte{0, 15, 215}: "Harman Music Group", + [3]byte{0, 15, 216}: "Force, Inc.", + [3]byte{0, 15, 217}: "FlexDSL Telecommunications AG", + [3]byte{0, 15, 218}: "YAZAKI CORPORATION", + [3]byte{0, 15, 219}: "Westell Technologies", + [3]byte{0, 15, 220}: "Ueda Japan Radio Co., Ltd.", + [3]byte{0, 15, 221}: "SORDIN AB", + [3]byte{0, 15, 222}: "Sony Ericsson Mobile Communications AB", + [3]byte{0, 15, 223}: "SOLOMON Technology Corp.", + [3]byte{0, 15, 224}: "NComputing Co.,Ltd.", + [3]byte{0, 15, 225}: "ID DIGITAL CORPORATION", + [3]byte{0, 15, 226}: "Hangzhou H3C Technologies Co., Ltd.", + [3]byte{0, 15, 227}: "Damm Cellular Systems A/S", + [3]byte{0, 15, 228}: "Pantech Co.,Ltd", + [3]byte{0, 15, 229}: "MERCURY SECURITY CORPORATION", + [3]byte{0, 15, 230}: "MBTech Systems, Inc.", + [3]byte{0, 15, 231}: "Lutron Electronics Co., Inc.", + [3]byte{0, 15, 232}: "Lobos, Inc.", + [3]byte{0, 15, 233}: "GW TECHNOLOGIES CO.,LTD.", + [3]byte{0, 15, 234}: "Giga-Byte Technology Co.,LTD.", + [3]byte{0, 15, 235}: "Cylon Controls", + [3]byte{0, 15, 236}: "ARKUS Inc.", + [3]byte{0, 15, 237}: "Anam Electronics Co., Ltd", + [3]byte{0, 15, 238}: "XTec, Incorporated", + [3]byte{0, 15, 239}: "Thales e-Transactions GmbH", + [3]byte{0, 15, 240}: "Sunray Co. Ltd.", + [3]byte{0, 15, 241}: "nex-G Systems Pte.Ltd", + [3]byte{0, 15, 242}: "Loud Technologies Inc.", + [3]byte{0, 15, 243}: "Jung Myoung Communications&Technology", + [3]byte{0, 15, 244}: "Guntermann & Drunck GmbH", + [3]byte{0, 15, 245}: "GN&S company", + [3]byte{0, 15, 246}: "Darfon Electronics Corp.", + [3]byte{0, 15, 247}: "CISCO SYSTEMS, INC.", + [3]byte{0, 15, 248}: "CISCO SYSTEMS, INC.", + [3]byte{0, 15, 249}: "Valcretec, Inc.", + [3]byte{0, 15, 250}: "Optinel Systems, Inc.", + [3]byte{0, 15, 251}: "Nippon Denso Industry Co., Ltd.", + [3]byte{0, 15, 252}: "Merit Li-Lin Ent.", + [3]byte{0, 15, 253}: "Glorytek Network Inc.", + [3]byte{0, 15, 254}: "G-PRO COMPUTER", + [3]byte{0, 15, 255}: "Control4", + [3]byte{0, 16, 0}: "CABLE TELEVISION LABORATORIES, INC.", + [3]byte{0, 16, 1}: "Citel", + [3]byte{0, 16, 2}: "ACTIA", + [3]byte{0, 16, 3}: "IMATRON, INC.", + [3]byte{0, 16, 4}: "THE BRANTLEY COILE COMPANY,INC", + [3]byte{0, 16, 5}: "UEC COMMERCIAL", + [3]byte{0, 16, 6}: "Thales Contact Solutions Ltd.", + [3]byte{0, 16, 7}: "CISCO SYSTEMS, INC.", + [3]byte{0, 16, 8}: "VIENNA SYSTEMS CORPORATION", + [3]byte{0, 16, 9}: "HORO QUARTZ", + [3]byte{0, 16, 10}: "WILLIAMS COMMUNICATIONS GROUP", + [3]byte{0, 16, 11}: "CISCO SYSTEMS, INC.", + [3]byte{0, 16, 12}: "ITO CO., LTD.", + [3]byte{0, 16, 13}: "CISCO SYSTEMS, INC.", + [3]byte{0, 16, 14}: "MICRO LINEAR COPORATION", + [3]byte{0, 16, 15}: "INDUSTRIAL CPU SYSTEMS", + [3]byte{0, 16, 16}: "INITIO CORPORATION", + [3]byte{0, 16, 17}: "CISCO SYSTEMS, INC.", + [3]byte{0, 16, 18}: "PROCESSOR SYSTEMS (I) PVT LTD", + [3]byte{0, 16, 19}: "Kontron America, Inc.", + [3]byte{0, 16, 20}: "CISCO SYSTEMS, INC.", + [3]byte{0, 16, 21}: "OOmon Inc.", + [3]byte{0, 16, 22}: "T.SQWARE", + [3]byte{0, 16, 23}: "Bosch Access Systems GmbH", + [3]byte{0, 16, 24}: "BROADCOM CORPORATION", + [3]byte{0, 16, 25}: "SIRONA DENTAL SYSTEMS GmbH & Co. KG", + [3]byte{0, 16, 26}: "PictureTel Corp.", + [3]byte{0, 16, 27}: "CORNET TECHNOLOGY, INC.", + [3]byte{0, 16, 28}: "OHM TECHNOLOGIES INTL, LLC", + [3]byte{0, 16, 29}: "WINBOND ELECTRONICS CORP.", + [3]byte{0, 16, 30}: "MATSUSHITA ELECTRONIC INSTRUMENTS CORP.", + [3]byte{0, 16, 31}: "CISCO SYSTEMS, INC.", + [3]byte{0, 16, 32}: "Hand Held Products Inc", + [3]byte{0, 16, 33}: "ENCANTO NETWORKS, INC.", + [3]byte{0, 16, 34}: "SatCom Media Corporation", + [3]byte{0, 16, 35}: "Network Equipment Technologies", + [3]byte{0, 16, 36}: "NAGOYA ELECTRIC WORKS CO., LTD", + [3]byte{0, 16, 37}: "Grayhill, Inc", + [3]byte{0, 16, 38}: "ACCELERATED NETWORKS, INC.", + [3]byte{0, 16, 39}: "L-3 COMMUNICATIONS EAST", + [3]byte{0, 16, 40}: "COMPUTER TECHNICA, INC.", + [3]byte{0, 16, 41}: "CISCO SYSTEMS, INC.", + [3]byte{0, 16, 42}: "ZF MICROSYSTEMS, INC.", + [3]byte{0, 16, 43}: "UMAX DATA SYSTEMS, INC.", + [3]byte{0, 16, 44}: "Lasat Networks A/S", + [3]byte{0, 16, 45}: "HITACHI SOFTWARE ENGINEERING", + [3]byte{0, 16, 46}: "NETWORK SYSTEMS & TECHNOLOGIES PVT. LTD.", + [3]byte{0, 16, 47}: "CISCO SYSTEMS, INC.", + [3]byte{0, 16, 48}: "EION Inc.", + [3]byte{0, 16, 49}: "OBJECTIVE COMMUNICATIONS, INC.", + [3]byte{0, 16, 50}: "ALTA TECHNOLOGY", + [3]byte{0, 16, 51}: "ACCESSLAN COMMUNICATIONS, INC.", + [3]byte{0, 16, 52}: "GNP Computers", + [3]byte{0, 16, 53}: "ELITEGROUP COMPUTER SYSTEMS CO., LTD", + [3]byte{0, 16, 54}: "INTER-TEL INTEGRATED SYSTEMS", + [3]byte{0, 16, 55}: "CYQ've Technology Co., Ltd.", + [3]byte{0, 16, 56}: "MICRO RESEARCH INSTITUTE, INC.", + [3]byte{0, 16, 57}: "Vectron Systems AG", + [3]byte{0, 16, 58}: "DIAMOND NETWORK TECH", + [3]byte{0, 16, 59}: "HIPPI NETWORKING FORUM", + [3]byte{0, 16, 60}: "IC ENSEMBLE, INC.", + [3]byte{0, 16, 61}: "PHASECOM, LTD.", + [3]byte{0, 16, 62}: "NETSCHOOLS CORPORATION", + [3]byte{0, 16, 63}: "TOLLGRADE COMMUNICATIONS, INC.", + [3]byte{0, 16, 64}: "INTERMEC CORPORATION", + [3]byte{0, 16, 65}: "BRISTOL BABCOCK, INC.", + [3]byte{0, 16, 66}: "Alacritech, Inc.", + [3]byte{0, 16, 67}: "A2 CORPORATION", + [3]byte{0, 16, 68}: "InnoLabs Corporation", + [3]byte{0, 16, 69}: "Nortel Networks", + [3]byte{0, 16, 70}: "ALCORN MCBRIDE INC.", + [3]byte{0, 16, 71}: "ECHO ELETRIC CO. LTD.", + [3]byte{0, 16, 72}: "HTRC AUTOMATION, INC.", + [3]byte{0, 16, 73}: "ShoreTel, Inc", + [3]byte{0, 16, 74}: "The Parvus Corporation", + [3]byte{0, 16, 75}: "3COM CORPORATION", + [3]byte{0, 16, 76}: "Teledyne LeCroy, Inc", + [3]byte{0, 16, 77}: "SURTEC INDUSTRIES, INC.", + [3]byte{0, 16, 78}: "CEOLOGIC", + [3]byte{0, 16, 79}: "Oracle Corporation", + [3]byte{0, 16, 80}: "RION CO., LTD.", + [3]byte{0, 16, 81}: "CMICRO CORPORATION", + [3]byte{0, 16, 82}: "METTLER-TOLEDO (ALBSTADT) GMBH", + [3]byte{0, 16, 83}: "COMPUTER TECHNOLOGY CORP.", + [3]byte{0, 16, 84}: "CISCO SYSTEMS, INC.", + [3]byte{0, 16, 85}: "FUJITSU MICROELECTRONICS, INC.", + [3]byte{0, 16, 86}: "SODICK CO., LTD.", + [3]byte{0, 16, 87}: "Rebel.com, Inc.", + [3]byte{0, 16, 88}: "ArrowPoint Communications", + [3]byte{0, 16, 89}: "DIABLO RESEARCH CO. LLC", + [3]byte{0, 16, 90}: "3COM CORPORATION", + [3]byte{0, 16, 91}: "NET INSIGHT AB", + [3]byte{0, 16, 92}: "QUANTUM DESIGNS (H.K.) LTD.", + [3]byte{0, 16, 93}: "Draeger Medical", + [3]byte{0, 16, 94}: "Spirent plc, Service Assurance Broadband", + [3]byte{0, 16, 95}: "ZODIAC DATA SYSTEMS", + [3]byte{0, 16, 96}: "BILLIONTON SYSTEMS, INC.", + [3]byte{0, 16, 97}: "HOSTLINK CORP.", + [3]byte{0, 16, 98}: "NX SERVER, ILNC.", + [3]byte{0, 16, 99}: "STARGUIDE DIGITAL NETWORKS", + [3]byte{0, 16, 100}: "DNPG, LLC", + [3]byte{0, 16, 101}: "RADYNE CORPORATION", + [3]byte{0, 16, 102}: "ADVANCED CONTROL SYSTEMS, INC.", + [3]byte{0, 16, 103}: "Ericsson", + [3]byte{0, 16, 104}: "COMOS TELECOM", + [3]byte{0, 16, 105}: "HELIOSS COMMUNICATIONS, INC.", + [3]byte{0, 16, 106}: "DIGITAL MICROWAVE CORPORATION", + [3]byte{0, 16, 107}: "SONUS NETWORKS, INC.", + [3]byte{0, 16, 108}: "EDNT GmbH", + [3]byte{0, 16, 109}: "Axxcelera Broadband Wireless", + [3]byte{0, 16, 110}: "TADIRAN COM. LTD.", + [3]byte{0, 16, 111}: "TRENTON TECHNOLOGY INC.", + [3]byte{0, 16, 112}: "CARADON TREND LTD.", + [3]byte{0, 16, 113}: "ADVANET INC.", + [3]byte{0, 16, 114}: "GVN TECHNOLOGIES, INC.", + [3]byte{0, 16, 115}: "Technobox, Inc.", + [3]byte{0, 16, 116}: "ATEN INTERNATIONAL CO., LTD.", + [3]byte{0, 16, 117}: "Segate Technology LLC", + [3]byte{0, 16, 118}: "EUREM GmbH", + [3]byte{0, 16, 119}: "SAF DRIVE SYSTEMS, LTD.", + [3]byte{0, 16, 120}: "NUERA COMMUNICATIONS, INC.", + [3]byte{0, 16, 121}: "CISCO SYSTEMS, INC.", + [3]byte{0, 16, 122}: "AmbiCom, Inc.", + [3]byte{0, 16, 123}: "CISCO SYSTEMS, INC.", + [3]byte{0, 16, 124}: "P-COM, INC.", + [3]byte{0, 16, 125}: "AURORA COMMUNICATIONS, LTD.", + [3]byte{0, 16, 126}: "BACHMANN ELECTRONIC GmbH", + [3]byte{0, 16, 127}: "CRESTRON ELECTRONICS, INC.", + [3]byte{0, 16, 128}: "METAWAVE COMMUNICATIONS", + [3]byte{0, 16, 129}: "DPS, INC.", + [3]byte{0, 16, 130}: "JNA TELECOMMUNICATIONS LIMITED", + [3]byte{0, 16, 131}: "HEWLETT-PACKARD COMPANY", + [3]byte{0, 16, 132}: "K-BOT COMMUNICATIONS", + [3]byte{0, 16, 133}: "POLARIS COMMUNICATIONS, INC.", + [3]byte{0, 16, 134}: "ATTO Technology, Inc.", + [3]byte{0, 16, 135}: "Xstreamis PLC", + [3]byte{0, 16, 136}: "AMERICAN NETWORKS INC.", + [3]byte{0, 16, 137}: "WebSonic", + [3]byte{0, 16, 138}: "TeraLogic, Inc.", + [3]byte{0, 16, 139}: "LASERANIMATION SOLLINGER GmbH", + [3]byte{0, 16, 140}: "FUJITSU TELECOMMUNICATIONS EUROPE, LTD.", + [3]byte{0, 16, 141}: "Johnson Controls, Inc.", + [3]byte{0, 16, 142}: "HUGH SYMONS CONCEPT Technologies Ltd.", + [3]byte{0, 16, 143}: "RAPTOR SYSTEMS", + [3]byte{0, 16, 144}: "CIMETRICS, INC.", + [3]byte{0, 16, 145}: "NO WIRES NEEDED BV", + [3]byte{0, 16, 146}: "NETCORE INC.", + [3]byte{0, 16, 147}: "CMS COMPUTERS, LTD.", + [3]byte{0, 16, 148}: "Performance Analysis Broadband, Spirent plc", + [3]byte{0, 16, 149}: "Thomson Inc.", + [3]byte{0, 16, 150}: "TRACEWELL SYSTEMS, INC.", + [3]byte{0, 16, 151}: "WinNet Metropolitan Communications Systems, Inc.", + [3]byte{0, 16, 152}: "STARNET TECHNOLOGIES, INC.", + [3]byte{0, 16, 153}: "InnoMedia, Inc.", + [3]byte{0, 16, 154}: "NETLINE", + [3]byte{0, 16, 155}: "Emulex Corporation", + [3]byte{0, 16, 156}: "M-SYSTEM CO., LTD.", + [3]byte{0, 16, 157}: "CLARINET SYSTEMS, INC.", + [3]byte{0, 16, 158}: "AWARE, INC.", + [3]byte{0, 16, 159}: "PAVO, INC.", + [3]byte{0, 16, 160}: "INNOVEX TECHNOLOGIES, INC.", + [3]byte{0, 16, 161}: "KENDIN SEMICONDUCTOR, INC.", + [3]byte{0, 16, 162}: "TNS", + [3]byte{0, 16, 163}: "OMNITRONIX, INC.", + [3]byte{0, 16, 164}: "XIRCOM", + [3]byte{0, 16, 165}: "OXFORD INSTRUMENTS", + [3]byte{0, 16, 166}: "CISCO SYSTEMS, INC.", + [3]byte{0, 16, 167}: "UNEX TECHNOLOGY CORPORATION", + [3]byte{0, 16, 168}: "RELIANCE COMPUTER CORP.", + [3]byte{0, 16, 169}: "ADHOC TECHNOLOGIES", + [3]byte{0, 16, 170}: "MEDIA4, INC.", + [3]byte{0, 16, 171}: "KOITO ELECTRIC INDUSTRIES, LTD.", + [3]byte{0, 16, 172}: "IMCI TECHNOLOGIES", + [3]byte{0, 16, 173}: "SOFTRONICS USB, INC.", + [3]byte{0, 16, 174}: "SHINKO ELECTRIC INDUSTRIES CO.", + [3]byte{0, 16, 175}: "TAC SYSTEMS, INC.", + [3]byte{0, 16, 176}: "MERIDIAN TECHNOLOGY CORP.", + [3]byte{0, 16, 177}: "FOR-A CO., LTD.", + [3]byte{0, 16, 178}: "COACTIVE AESTHETICS", + [3]byte{0, 16, 179}: "NOKIA MULTIMEDIA TERMINALS", + [3]byte{0, 16, 180}: "ATMOSPHERE NETWORKS", + [3]byte{0, 16, 181}: "ACCTON TECHNOLOGY CORPORATION", + [3]byte{0, 16, 182}: "ENTRATA COMMUNICATIONS CORP.", + [3]byte{0, 16, 183}: "COYOTE TECHNOLOGIES, LLC", + [3]byte{0, 16, 184}: "ISHIGAKI COMPUTER SYSTEM CO.", + [3]byte{0, 16, 185}: "MAXTOR CORP.", + [3]byte{0, 16, 186}: "MARTINHO-DAVIS SYSTEMS, INC.", + [3]byte{0, 16, 187}: "DATA & INFORMATION TECHNOLOGY", + [3]byte{0, 16, 188}: "Aastra Telecom", + [3]byte{0, 16, 189}: "THE TELECOMMUNICATION TECHNOLOGY COMMITTEE (TTC)", + [3]byte{0, 16, 190}: "MARCH NETWORKS CORPORATION", + [3]byte{0, 16, 191}: "InterAir Wireless", + [3]byte{0, 16, 192}: "ARMA, Inc.", + [3]byte{0, 16, 193}: "OI ELECTRIC CO., LTD.", + [3]byte{0, 16, 194}: "WILLNET, INC.", + [3]byte{0, 16, 195}: "CSI-CONTROL SYSTEMS", + [3]byte{0, 16, 196}: "MEDIA LINKS CO., LTD.", + [3]byte{0, 16, 197}: "PROTOCOL TECHNOLOGIES, INC.", + [3]byte{0, 16, 198}: "Universal Global Scientific Industrial Co., Ltd.", + [3]byte{0, 16, 199}: "DATA TRANSMISSION NETWORK", + [3]byte{0, 16, 200}: "COMMUNICATIONS ELECTRONICS SECURITY GROUP", + [3]byte{0, 16, 201}: "MITSUBISHI ELECTRONICS LOGISTIC SUPPORT CO.", + [3]byte{0, 16, 202}: "Telco Systems, Inc.", + [3]byte{0, 16, 203}: "FACIT K.K.", + [3]byte{0, 16, 204}: "CLP COMPUTER LOGISTIK PLANUNG GmbH", + [3]byte{0, 16, 205}: "INTERFACE CONCEPT", + [3]byte{0, 16, 206}: "VOLAMP, LTD.", + [3]byte{0, 16, 207}: "FIBERLANE COMMUNICATIONS", + [3]byte{0, 16, 208}: "WITCOM, LTD.", + [3]byte{0, 16, 209}: "Top Layer Networks, Inc.", + [3]byte{0, 16, 210}: "NITTO TSUSHINKI CO., LTD", + [3]byte{0, 16, 211}: "GRIPS ELECTRONIC GMBH", + [3]byte{0, 16, 212}: "STORAGE COMPUTER CORPORATION", + [3]byte{0, 16, 213}: "IMASDE CANARIAS, S.A.", + [3]byte{0, 16, 214}: "Exelis", + [3]byte{0, 16, 215}: "ARGOSY RESEARCH INC.", + [3]byte{0, 16, 216}: "CALISTA", + [3]byte{0, 16, 217}: "IBM JAPAN, FUJISAWA MT+D", + [3]byte{0, 16, 218}: "Kollmorgen Corp", + [3]byte{0, 16, 219}: "Juniper Networks, Inc.", + [3]byte{0, 16, 220}: "MICRO-STAR INTERNATIONAL CO., LTD.", + [3]byte{0, 16, 221}: "ENABLE SEMICONDUCTOR, INC.", + [3]byte{0, 16, 222}: "INTERNATIONAL DATACASTING CORPORATION", + [3]byte{0, 16, 223}: "RISE COMPUTER INC.", + [3]byte{0, 16, 224}: "Oracle Corporation", + [3]byte{0, 16, 225}: "S.I. TECH, INC.", + [3]byte{0, 16, 226}: "ArrayComm, Inc.", + [3]byte{0, 16, 227}: "Hewlett-Packard Company", + [3]byte{0, 16, 228}: "NSI CORPORATION", + [3]byte{0, 16, 229}: "SOLECTRON TEXAS", + [3]byte{0, 16, 230}: "APPLIED INTELLIGENT SYSTEMS, INC.", + [3]byte{0, 16, 231}: "BreezeCom", + [3]byte{0, 16, 232}: "TELOCITY, INCORPORATED", + [3]byte{0, 16, 233}: "RAIDTEC LTD.", + [3]byte{0, 16, 234}: "ADEPT TECHNOLOGY", + [3]byte{0, 16, 235}: "SELSIUS SYSTEMS, INC.", + [3]byte{0, 16, 236}: "RPCG, LLC", + [3]byte{0, 16, 237}: "SUNDANCE TECHNOLOGY, INC.", + [3]byte{0, 16, 238}: "CTI PRODUCTS, INC.", + [3]byte{0, 16, 239}: "DBTEL INCORPORATED", + [3]byte{0, 16, 240}: "RITTAL-WERK RUDOLF LOH GmbH & Co.", + [3]byte{0, 16, 241}: "I-O CORPORATION", + [3]byte{0, 16, 242}: "ANTEC", + [3]byte{0, 16, 243}: "Nexcom International Co., Ltd.", + [3]byte{0, 16, 244}: "Vertical Communications", + [3]byte{0, 16, 245}: "AMHERST SYSTEMS, INC.", + [3]byte{0, 16, 246}: "CISCO SYSTEMS, INC.", + [3]byte{0, 16, 247}: "IRIICHI TECHNOLOGIES Inc.", + [3]byte{0, 16, 248}: "TEXIO TECHNOLOGY CORPORATION", + [3]byte{0, 16, 249}: "UNIQUE SYSTEMS, INC.", + [3]byte{0, 16, 250}: "Apple", + [3]byte{0, 16, 251}: "ZIDA TECHNOLOGIES LIMITED", + [3]byte{0, 16, 252}: "BROADBAND NETWORKS, INC.", + [3]byte{0, 16, 253}: "COCOM A/S", + [3]byte{0, 16, 254}: "DIGITAL EQUIPMENT CORPORATION", + [3]byte{0, 16, 255}: "CISCO SYSTEMS, INC.", + [3]byte{0, 17, 0}: "Schneider Electric", + [3]byte{0, 17, 1}: "CET Technologies Pte Ltd", + [3]byte{0, 17, 2}: "Aurora Multimedia Corp.", + [3]byte{0, 17, 3}: "kawamura electric inc.", + [3]byte{0, 17, 4}: "TELEXY", + [3]byte{0, 17, 5}: "Sunplus Technology Co., Ltd.", + [3]byte{0, 17, 6}: "Siemens NV (Belgium)", + [3]byte{0, 17, 7}: "RGB Networks Inc.", + [3]byte{0, 17, 8}: "Orbital Data Corporation", + [3]byte{0, 17, 9}: "Micro-Star International", + [3]byte{0, 17, 10}: "Hewlett-Packard Company", + [3]byte{0, 17, 11}: "Franklin Technology Systems", + [3]byte{0, 17, 12}: "Atmark Techno, Inc.", + [3]byte{0, 17, 13}: "SANBlaze Technology, Inc.", + [3]byte{0, 17, 14}: "Tsurusaki Sealand Transportation Co. Ltd.", + [3]byte{0, 17, 15}: "netplat,Inc.", + [3]byte{0, 17, 16}: "Maxanna Technology Co., Ltd.", + [3]byte{0, 17, 17}: "Intel Corporation", + [3]byte{0, 17, 18}: "Honeywell CMSS", + [3]byte{0, 17, 19}: "Fraunhofer FOKUS", + [3]byte{0, 17, 20}: "EverFocus Electronics Corp.", + [3]byte{0, 17, 21}: "EPIN Technologies, Inc.", + [3]byte{0, 17, 22}: "COTEAU VERT CO., LTD.", + [3]byte{0, 17, 23}: "CESNET", + [3]byte{0, 17, 24}: "BLX IC Design Corp., Ltd.", + [3]byte{0, 17, 25}: "Solteras, Inc.", + [3]byte{0, 17, 26}: "ARRIS Group, Inc.", + [3]byte{0, 17, 27}: "Targa Systems Div L-3 Communications Canada", + [3]byte{0, 17, 28}: "Pleora Technologies Inc.", + [3]byte{0, 17, 29}: "Hectrix Limited", + [3]byte{0, 17, 30}: "EPSG (Ethernet Powerlink Standardization Group)", + [3]byte{0, 17, 31}: "Doremi Labs, Inc.", + [3]byte{0, 17, 32}: "CISCO SYSTEMS, INC.", + [3]byte{0, 17, 33}: "CISCO SYSTEMS, INC.", + [3]byte{0, 17, 34}: "CIMSYS Inc", + [3]byte{0, 17, 35}: "Appointech, Inc.", + [3]byte{0, 17, 36}: "Apple", + [3]byte{0, 17, 37}: "IBM Corp", + [3]byte{0, 17, 38}: "Venstar Inc.", + [3]byte{0, 17, 39}: "TASI, Inc", + [3]byte{0, 17, 40}: "Streamit", + [3]byte{0, 17, 41}: "Paradise Datacom Ltd.", + [3]byte{0, 17, 42}: "Niko NV", + [3]byte{0, 17, 43}: "NetModule AG", + [3]byte{0, 17, 44}: "IZT GmbH", + [3]byte{0, 17, 45}: "iPulse Systems", + [3]byte{0, 17, 46}: "CEICOM", + [3]byte{0, 17, 47}: "ASUSTek Computer Inc.", + [3]byte{0, 17, 48}: "Allied Telesis (Hong Kong) Ltd.", + [3]byte{0, 17, 49}: "UNATECH. CO.,LTD", + [3]byte{0, 17, 50}: "Synology Incorporated", + [3]byte{0, 17, 51}: "Siemens Austria SIMEA", + [3]byte{0, 17, 52}: "MediaCell, Inc.", + [3]byte{0, 17, 53}: "Grandeye Ltd", + [3]byte{0, 17, 54}: "Goodrich Sensor Systems", + [3]byte{0, 17, 55}: "AICHI ELECTRIC CO., LTD.", + [3]byte{0, 17, 56}: "TAISHIN CO., LTD.", + [3]byte{0, 17, 57}: "STOEBER ANTRIEBSTECHNIK GmbH + Co. KG.", + [3]byte{0, 17, 58}: "SHINBORAM", + [3]byte{0, 17, 59}: "Micronet Communications Inc.", + [3]byte{0, 17, 60}: "Micronas GmbH", + [3]byte{0, 17, 61}: "KN SOLTEC CO.,LTD.", + [3]byte{0, 17, 62}: "JL Corporation", + [3]byte{0, 17, 63}: "Alcatel DI", + [3]byte{0, 17, 64}: "Nanometrics Inc.", + [3]byte{0, 17, 65}: "GoodMan Corporation", + [3]byte{0, 17, 66}: "e-SMARTCOM INC.", + [3]byte{0, 17, 67}: "Dell Inc", + [3]byte{0, 17, 68}: "Assurance Technology Corp", + [3]byte{0, 17, 69}: "ValuePoint Networks", + [3]byte{0, 17, 70}: "Telecard-Pribor Ltd", + [3]byte{0, 17, 71}: "Secom-Industry co.LTD.", + [3]byte{0, 17, 72}: "Prolon Control Systems", + [3]byte{0, 17, 73}: "Proliphix Inc.", + [3]byte{0, 17, 74}: "KAYABA INDUSTRY Co,.Ltd.", + [3]byte{0, 17, 75}: "Francotyp-Postalia GmbH", + [3]byte{0, 17, 76}: "caffeina applied research ltd.", + [3]byte{0, 17, 77}: "Atsumi Electric Co.,LTD.", + [3]byte{0, 17, 78}: "690885 Ontario Inc.", + [3]byte{0, 17, 79}: "US Digital Television, Inc", + [3]byte{0, 17, 80}: "Belkin Corporation", + [3]byte{0, 17, 81}: "Mykotronx", + [3]byte{0, 17, 82}: "Eidsvoll Electronics AS", + [3]byte{0, 17, 83}: "Trident Tek, Inc.", + [3]byte{0, 17, 84}: "Webpro Technologies Inc.", + [3]byte{0, 17, 85}: "Sevis Systems", + [3]byte{0, 17, 86}: "Pharos Systems NZ", + [3]byte{0, 17, 87}: "OF Networks Co., Ltd.", + [3]byte{0, 17, 88}: "Nortel Networks", + [3]byte{0, 17, 89}: "MATISSE NETWORKS INC", + [3]byte{0, 17, 90}: "Ivoclar Vivadent AG", + [3]byte{0, 17, 91}: "Elitegroup Computer System Co. (ECS)", + [3]byte{0, 17, 92}: "CISCO SYSTEMS, INC.", + [3]byte{0, 17, 93}: "CISCO SYSTEMS, INC.", + [3]byte{0, 17, 94}: "ProMinent Dosiertechnik GmbH", + [3]byte{0, 17, 95}: "ITX Security Co., Ltd.", + [3]byte{0, 17, 96}: "ARTDIO Company Co., LTD", + [3]byte{0, 17, 97}: "NetStreams, LLC", + [3]byte{0, 17, 98}: "STAR MICRONICS CO.,LTD.", + [3]byte{0, 17, 99}: "SYSTEM SPA DEPT. ELECTRONICS", + [3]byte{0, 17, 100}: "ACARD Technology Corp.", + [3]byte{0, 17, 101}: "Znyx Networks", + [3]byte{0, 17, 102}: "Taelim Electronics Co., Ltd.", + [3]byte{0, 17, 103}: "Integrated System Solution Corp.", + [3]byte{0, 17, 104}: "HomeLogic LLC", + [3]byte{0, 17, 105}: "EMS Satcom", + [3]byte{0, 17, 106}: "Domo Ltd", + [3]byte{0, 17, 107}: "Digital Data Communications Asia Co.,Ltd", + [3]byte{0, 17, 108}: "Nanwang Multimedia Inc.,Ltd", + [3]byte{0, 17, 109}: "American Time and Signal", + [3]byte{0, 17, 110}: "PePLink Ltd.", + [3]byte{0, 17, 111}: "Netforyou Co., LTD.", + [3]byte{0, 17, 112}: "GSC SRL", + [3]byte{0, 17, 113}: "DEXTER Communications, Inc.", + [3]byte{0, 17, 114}: "COTRON CORPORATION", + [3]byte{0, 17, 115}: "SMART Storage Systems", + [3]byte{0, 17, 116}: "Wibhu Technologies, Inc.", + [3]byte{0, 17, 117}: "PathScale, Inc.", + [3]byte{0, 17, 118}: "Intellambda Systems, Inc.", + [3]byte{0, 17, 119}: "Coaxial Networks, Inc.", + [3]byte{0, 17, 120}: "Chiron Technology Ltd", + [3]byte{0, 17, 121}: "Singular Technology Co. Ltd.", + [3]byte{0, 17, 122}: "Singim International Corp.", + [3]byte{0, 17, 123}: "Büchi Labortechnik AG", + [3]byte{0, 17, 124}: "e-zy.net", + [3]byte{0, 17, 125}: "ZMD America, Inc.", + [3]byte{0, 17, 126}: "Progeny, A division of Midmark Corp", + [3]byte{0, 17, 127}: "Neotune Information Technology Corporation,.LTD", + [3]byte{0, 17, 128}: "ARRIS Group, Inc.", + [3]byte{0, 17, 129}: "InterEnergy Co.Ltd,", + [3]byte{0, 17, 130}: "IMI Norgren Ltd", + [3]byte{0, 17, 131}: "Datalogic ADC, Inc.", + [3]byte{0, 17, 132}: "Humo Laboratory,Ltd.", + [3]byte{0, 17, 133}: "Hewlett-Packard Company", + [3]byte{0, 17, 134}: "Prime Systems, Inc.", + [3]byte{0, 17, 135}: "Category Solutions, Inc", + [3]byte{0, 17, 136}: "Enterasys", + [3]byte{0, 17, 137}: "Aerotech Inc", + [3]byte{0, 17, 138}: "Viewtran Technology Limited", + [3]byte{0, 17, 139}: "Alcatel-Lucent, Enterprise Business Group", + [3]byte{0, 17, 140}: "Missouri Department of Transportation", + [3]byte{0, 17, 141}: "Hanchang System Corp.", + [3]byte{0, 17, 142}: "Halytech Mace", + [3]byte{0, 17, 143}: "EUTECH INSTRUMENTS PTE. LTD.", + [3]byte{0, 17, 144}: "Digital Design Corporation", + [3]byte{0, 17, 145}: "CTS-Clima Temperatur Systeme GmbH", + [3]byte{0, 17, 146}: "CISCO SYSTEMS, INC.", + [3]byte{0, 17, 147}: "CISCO SYSTEMS, INC.", + [3]byte{0, 17, 148}: "Chi Mei Communication Systems, Inc.", + [3]byte{0, 17, 149}: "D-Link Corporation", + [3]byte{0, 17, 150}: "Actuality Systems, Inc.", + [3]byte{0, 17, 151}: "Monitoring Technologies Limited", + [3]byte{0, 17, 152}: "Prism Media Products Limited", + [3]byte{0, 17, 153}: "2wcom Systems GmbH", + [3]byte{0, 17, 154}: "Alkeria srl", + [3]byte{0, 17, 155}: "Telesynergy Research Inc.", + [3]byte{0, 17, 156}: "EP&T Energy", + [3]byte{0, 17, 157}: "Diginfo Technology Corporation", + [3]byte{0, 17, 158}: "Solectron Brazil", + [3]byte{0, 17, 159}: "Nokia Danmark A/S", + [3]byte{0, 17, 160}: "Vtech Engineering Canada Ltd", + [3]byte{0, 17, 161}: "VISION NETWARE CO.,LTD", + [3]byte{0, 17, 162}: "Manufacturing Technology Inc", + [3]byte{0, 17, 163}: "LanReady Technologies Inc.", + [3]byte{0, 17, 164}: "JStream Technologies Inc.", + [3]byte{0, 17, 165}: "Fortuna Electronic Corp.", + [3]byte{0, 17, 166}: "Sypixx Networks", + [3]byte{0, 17, 167}: "Infilco Degremont Inc.", + [3]byte{0, 17, 168}: "Quest Technologies", + [3]byte{0, 17, 169}: "MOIMSTONE Co., LTD", + [3]byte{0, 17, 170}: "Uniclass Technology, Co., LTD", + [3]byte{0, 17, 171}: "TRUSTABLE TECHNOLOGY CO.,LTD.", + [3]byte{0, 17, 172}: "Simtec Electronics", + [3]byte{0, 17, 173}: "Shanghai Ruijie Technology", + [3]byte{0, 17, 174}: "ARRIS Group, Inc.", + [3]byte{0, 17, 175}: "Medialink-i,Inc", + [3]byte{0, 17, 176}: "Fortelink Inc.", + [3]byte{0, 17, 177}: "BlueExpert Technology Corp.", + [3]byte{0, 17, 178}: "2001 Technology Inc.", + [3]byte{0, 17, 179}: "YOSHIMIYA CO.,LTD.", + [3]byte{0, 17, 180}: "Westermo Teleindustri AB", + [3]byte{0, 17, 181}: "Shenzhen Powercom Co.,Ltd", + [3]byte{0, 17, 182}: "Open Systems International", + [3]byte{0, 17, 183}: "Octalix B.V.", + [3]byte{0, 17, 184}: "Liebherr - Elektronik GmbH", + [3]byte{0, 17, 185}: "Inner Range Pty. Ltd.", + [3]byte{0, 17, 186}: "Elexol Pty Ltd", + [3]byte{0, 17, 187}: "CISCO SYSTEMS, INC.", + [3]byte{0, 17, 188}: "CISCO SYSTEMS, INC.", + [3]byte{0, 17, 189}: "Bombardier Transportation", + [3]byte{0, 17, 190}: "AGP Telecom Co. Ltd", + [3]byte{0, 17, 191}: "AESYS S.p.A.", + [3]byte{0, 17, 192}: "Aday Technology Inc", + [3]byte{0, 17, 193}: "4P MOBILE DATA PROCESSING", + [3]byte{0, 17, 194}: "United Fiber Optic Communication", + [3]byte{0, 17, 195}: "Transceiving System Technology Corporation", + [3]byte{0, 17, 196}: "Terminales de Telecomunicacion Terrestre, S.L.", + [3]byte{0, 17, 197}: "TEN Technology", + [3]byte{0, 17, 198}: "Seagate Technology", + [3]byte{0, 17, 199}: "Raymarine UK Ltd", + [3]byte{0, 17, 200}: "Powercom Co., Ltd.", + [3]byte{0, 17, 201}: "MTT Corporation", + [3]byte{0, 17, 202}: "Long Range Systems, Inc.", + [3]byte{0, 17, 203}: "Jacobsons AB", + [3]byte{0, 17, 204}: "Guangzhou Jinpeng Group Co.,Ltd.", + [3]byte{0, 17, 205}: "Axsun Technologies", + [3]byte{0, 17, 206}: "Ubisense Limited", + [3]byte{0, 17, 207}: "Thrane & Thrane A/S", + [3]byte{0, 17, 208}: "Tandberg Data ASA", + [3]byte{0, 17, 209}: "Soft Imaging System GmbH", + [3]byte{0, 17, 210}: "Perception Digital Ltd", + [3]byte{0, 17, 211}: "NextGenTel Holding ASA", + [3]byte{0, 17, 212}: "NetEnrich, Inc", + [3]byte{0, 17, 213}: "Hangzhou Sunyard System Engineering Co.,Ltd.", + [3]byte{0, 17, 214}: "HandEra, Inc.", + [3]byte{0, 17, 215}: "eWerks Inc", + [3]byte{0, 17, 216}: "ASUSTek Computer Inc.", + [3]byte{0, 17, 217}: "TiVo", + [3]byte{0, 17, 218}: "Vivaas Technology Inc.", + [3]byte{0, 17, 219}: "Land-Cellular Corporation", + [3]byte{0, 17, 220}: "Glunz & Jensen", + [3]byte{0, 17, 221}: "FROMUS TEC. Co., Ltd.", + [3]byte{0, 17, 222}: "EURILOGIC", + [3]byte{0, 17, 223}: "Current Energy", + [3]byte{0, 17, 224}: "U-MEDIA Communications, Inc.", + [3]byte{0, 17, 225}: "Arcelik A.S", + [3]byte{0, 17, 226}: "Hua Jung Components Co., Ltd.", + [3]byte{0, 17, 227}: "Thomson, Inc.", + [3]byte{0, 17, 228}: "Danelec Electronics A/S", + [3]byte{0, 17, 229}: "KCodes Corporation", + [3]byte{0, 17, 230}: "Scientific Atlanta", + [3]byte{0, 17, 231}: "WORLDSAT - Texas de France", + [3]byte{0, 17, 232}: "Tixi.Com", + [3]byte{0, 17, 233}: "STARNEX CO., LTD.", + [3]byte{0, 17, 234}: "IWICS Inc.", + [3]byte{0, 17, 235}: "Innovative Integration", + [3]byte{0, 17, 236}: "AVIX INC.", + [3]byte{0, 17, 237}: "802 Global", + [3]byte{0, 17, 238}: "Estari, Inc.", + [3]byte{0, 17, 239}: "Conitec Datensysteme GmbH", + [3]byte{0, 17, 240}: "Wideful Limited", + [3]byte{0, 17, 241}: "QinetiQ Ltd", + [3]byte{0, 17, 242}: "Institute of Network Technologies", + [3]byte{0, 17, 243}: "NeoMedia Europe AG", + [3]byte{0, 17, 244}: "woori-net", + [3]byte{0, 17, 245}: "ASKEY COMPUTER CORP.", + [3]byte{0, 17, 246}: "Asia Pacific Microsystems , Inc.", + [3]byte{0, 17, 247}: "Shenzhen Forward Industry Co., Ltd", + [3]byte{0, 17, 248}: "AIRAYA Corp", + [3]byte{0, 17, 249}: "Nortel Networks", + [3]byte{0, 17, 250}: "Rane Corporation", + [3]byte{0, 17, 251}: "Heidelberg Engineering GmbH", + [3]byte{0, 17, 252}: "HARTING Electric Gmbh & Co.KG", + [3]byte{0, 17, 253}: "KORG INC.", + [3]byte{0, 17, 254}: "Keiyo System Research, Inc.", + [3]byte{0, 17, 255}: "Digitro Tecnologia Ltda", + [3]byte{0, 18, 0}: "CISCO SYSTEMS, INC.", + [3]byte{0, 18, 1}: "CISCO SYSTEMS, INC.", + [3]byte{0, 18, 2}: "Decrane Aerospace - Audio International Inc.", + [3]byte{0, 18, 3}: "ActivNetworks", + [3]byte{0, 18, 4}: "u10 Networks, Inc.", + [3]byte{0, 18, 5}: "Terrasat Communications, Inc.", + [3]byte{0, 18, 6}: "iQuest (NZ) Ltd", + [3]byte{0, 18, 7}: "Head Strong International Limited", + [3]byte{0, 18, 8}: "Gantner Instruments GmbH", + [3]byte{0, 18, 9}: "Fastrax Ltd", + [3]byte{0, 18, 10}: "Emerson Climate Technologies GmbH", + [3]byte{0, 18, 11}: "Chinasys Technologies Limited", + [3]byte{0, 18, 12}: "CE-Infosys Pte Ltd", + [3]byte{0, 18, 13}: "Advanced Telecommunication Technologies, Inc.", + [3]byte{0, 18, 14}: "AboCom", + [3]byte{0, 18, 15}: "IEEE 802.3", + [3]byte{0, 18, 16}: "WideRay Corp", + [3]byte{0, 18, 17}: "Protechna Herbst GmbH & Co. KG", + [3]byte{0, 18, 18}: "PLUS Corporation", + [3]byte{0, 18, 19}: "Metrohm AG", + [3]byte{0, 18, 20}: "Koenig & Bauer AG", + [3]byte{0, 18, 21}: "iStor Networks, Inc.", + [3]byte{0, 18, 22}: "ICP Internet Communication Payment AG", + [3]byte{0, 18, 23}: "Cisco-Linksys, LLC", + [3]byte{0, 18, 24}: "ARUZE Corporation", + [3]byte{0, 18, 25}: "Ahead Communication Systems Inc", + [3]byte{0, 18, 26}: "Techno Soft Systemnics Inc.", + [3]byte{0, 18, 27}: "Sound Devices, LLC", + [3]byte{0, 18, 28}: "PARROT S.A.", + [3]byte{0, 18, 29}: "Netfabric Corporation", + [3]byte{0, 18, 30}: "Juniper Networks, Inc.", + [3]byte{0, 18, 31}: "Harding Instruments", + [3]byte{0, 18, 32}: "Cadco Systems", + [3]byte{0, 18, 33}: "B.Braun Melsungen AG", + [3]byte{0, 18, 34}: "Skardin (UK) Ltd", + [3]byte{0, 18, 35}: "Pixim", + [3]byte{0, 18, 36}: "NexQL Corporation", + [3]byte{0, 18, 37}: "ARRIS Group, Inc.", + [3]byte{0, 18, 38}: "Japan Direx Corporation", + [3]byte{0, 18, 39}: "Franklin Electric Co., Inc.", + [3]byte{0, 18, 40}: "Data Ltd.", + [3]byte{0, 18, 41}: "BroadEasy Technologies Co.,Ltd", + [3]byte{0, 18, 42}: "VTech Telecommunications Ltd.", + [3]byte{0, 18, 43}: "Virbiage Pty Ltd", + [3]byte{0, 18, 44}: "Soenen Controls N.V.", + [3]byte{0, 18, 45}: "SiNett Corporation", + [3]byte{0, 18, 46}: "Signal Technology - AISD", + [3]byte{0, 18, 47}: "Sanei Electric Inc.", + [3]byte{0, 18, 48}: "Picaso Infocommunication CO., LTD.", + [3]byte{0, 18, 49}: "Motion Control Systems, Inc.", + [3]byte{0, 18, 50}: "LeWiz Communications Inc.", + [3]byte{0, 18, 51}: "JRC TOKKI Co.,Ltd.", + [3]byte{0, 18, 52}: "Camille Bauer", + [3]byte{0, 18, 53}: "Andrew Corporation", + [3]byte{0, 18, 54}: "ConSentry Networks", + [3]byte{0, 18, 55}: "Texas Instruments", + [3]byte{0, 18, 56}: "SetaBox Technology Co., Ltd.", + [3]byte{0, 18, 57}: "S Net Systems Inc.", + [3]byte{0, 18, 58}: "Posystech Inc., Co.", + [3]byte{0, 18, 59}: "KeRo Systems ApS", + [3]byte{0, 18, 60}: "Second Rule LLC", + [3]byte{0, 18, 61}: "GES", + [3]byte{0, 18, 62}: "ERUNE technology Co., Ltd.", + [3]byte{0, 18, 63}: "Dell Inc", + [3]byte{0, 18, 64}: "AMOI ELECTRONICS CO.,LTD", + [3]byte{0, 18, 65}: "a2i marketing center", + [3]byte{0, 18, 66}: "Millennial Net", + [3]byte{0, 18, 67}: "CISCO SYSTEMS, INC.", + [3]byte{0, 18, 68}: "CISCO SYSTEMS, INC.", + [3]byte{0, 18, 69}: "Zellweger Analytics, Inc.", + [3]byte{0, 18, 70}: "T.O.M TECHNOLOGY INC..", + [3]byte{0, 18, 71}: "Samsung Electronics Co., Ltd.", + [3]byte{0, 18, 72}: "EMC Corporation (Kashya)", + [3]byte{0, 18, 73}: "Delta Elettronica S.p.A.", + [3]byte{0, 18, 74}: "Dedicated Devices, Inc.", + [3]byte{0, 18, 75}: "Texas Instruments", + [3]byte{0, 18, 76}: "BBWM Corporation", + [3]byte{0, 18, 77}: "Inducon BV", + [3]byte{0, 18, 78}: "XAC AUTOMATION CORP.", + [3]byte{0, 18, 79}: "Pentair Thermal Management", + [3]byte{0, 18, 80}: "Tokyo Aircaft Instrument Co., Ltd.", + [3]byte{0, 18, 81}: "SILINK", + [3]byte{0, 18, 82}: "Citronix, LLC", + [3]byte{0, 18, 83}: "AudioDev AB", + [3]byte{0, 18, 84}: "Spectra Technologies Holdings Company Ltd", + [3]byte{0, 18, 85}: "NetEffect Incorporated", + [3]byte{0, 18, 86}: "LG INFORMATION & COMM.", + [3]byte{0, 18, 87}: "LeapComm Communication Technologies Inc.", + [3]byte{0, 18, 88}: "Activis Polska", + [3]byte{0, 18, 89}: "THERMO ELECTRON KARLSRUHE", + [3]byte{0, 18, 90}: "Microsoft Corporation", + [3]byte{0, 18, 91}: "KAIMEI ELECTRONI", + [3]byte{0, 18, 92}: "Green Hills Software, Inc.", + [3]byte{0, 18, 93}: "CyberNet Inc.", + [3]byte{0, 18, 94}: "CAEN", + [3]byte{0, 18, 95}: "AWIND Inc.", + [3]byte{0, 18, 96}: "Stanton Magnetics,inc.", + [3]byte{0, 18, 97}: "Adaptix, Inc", + [3]byte{0, 18, 98}: "Nokia Danmark A/S", + [3]byte{0, 18, 99}: "Data Voice Technologies GmbH", + [3]byte{0, 18, 100}: "daum electronic gmbh", + [3]byte{0, 18, 101}: "Enerdyne Technologies, Inc.", + [3]byte{0, 18, 102}: "Swisscom Hospitality Services SA", + [3]byte{0, 18, 103}: "Panasonic Corporation", + [3]byte{0, 18, 104}: "IPS d.o.o.", + [3]byte{0, 18, 105}: "Value Electronics", + [3]byte{0, 18, 106}: "OPTOELECTRONICS Co., Ltd.", + [3]byte{0, 18, 107}: "Ascalade Communications Limited", + [3]byte{0, 18, 108}: "Visonic Ltd.", + [3]byte{0, 18, 109}: "University of California, Berkeley", + [3]byte{0, 18, 110}: "Seidel Elektronik GmbH Nfg.KG", + [3]byte{0, 18, 111}: "Rayson Technology Co., Ltd.", + [3]byte{0, 18, 112}: "NGES Denro Systems", + [3]byte{0, 18, 113}: "Measurement Computing Corp", + [3]byte{0, 18, 114}: "Redux Communications Ltd.", + [3]byte{0, 18, 115}: "Stoke Inc", + [3]byte{0, 18, 116}: "NIT lab", + [3]byte{0, 18, 117}: "Sentilla Corporation", + [3]byte{0, 18, 118}: "CG Power Systems Ireland Limited", + [3]byte{0, 18, 119}: "Korenix Technologies Co., Ltd.", + [3]byte{0, 18, 120}: "International Bar Code", + [3]byte{0, 18, 121}: "Hewlett-Packard Company", + [3]byte{0, 18, 122}: "Sanyu Industry Co.,Ltd.", + [3]byte{0, 18, 123}: "VIA Networking Technologies, Inc.", + [3]byte{0, 18, 124}: "SWEGON AB", + [3]byte{0, 18, 125}: "MobileAria", + [3]byte{0, 18, 126}: "Digital Lifestyles Group, Inc.", + [3]byte{0, 18, 127}: "CISCO SYSTEMS, INC.", + [3]byte{0, 18, 128}: "CISCO SYSTEMS, INC.", + [3]byte{0, 18, 129}: "March Networks S.p.A.", + [3]byte{0, 18, 130}: "Qovia", + [3]byte{0, 18, 131}: "Nortel Networks", + [3]byte{0, 18, 132}: "Lab33 Srl", + [3]byte{0, 18, 133}: "Gizmondo Europe Ltd", + [3]byte{0, 18, 134}: "ENDEVCO CORP", + [3]byte{0, 18, 135}: "Digital Everywhere Unterhaltungselektronik GmbH", + [3]byte{0, 18, 136}: "2Wire, Inc", + [3]byte{0, 18, 137}: "Advance Sterilization Products", + [3]byte{0, 18, 138}: "ARRIS Group, Inc.", + [3]byte{0, 18, 139}: "Sensory Networks Inc", + [3]byte{0, 18, 140}: "Woodward Governor", + [3]byte{0, 18, 141}: "STB Datenservice GmbH", + [3]byte{0, 18, 142}: "Q-Free ASA", + [3]byte{0, 18, 143}: "Montilio", + [3]byte{0, 18, 144}: "KYOWA Electric & Machinery Corp.", + [3]byte{0, 18, 145}: "KWS Computersysteme GmbH", + [3]byte{0, 18, 146}: "Griffin Technology", + [3]byte{0, 18, 147}: "GE Energy", + [3]byte{0, 18, 148}: "SUMITOMO ELECTRIC DEVICE INNOVATIONS, INC", + [3]byte{0, 18, 149}: "Aiware Inc.", + [3]byte{0, 18, 150}: "Addlogix", + [3]byte{0, 18, 151}: "O2Micro, Inc.", + [3]byte{0, 18, 152}: "MICO ELECTRIC(SHENZHEN) LIMITED", + [3]byte{0, 18, 153}: "Ktech Telecommunications Inc", + [3]byte{0, 18, 154}: "IRT Electronics Pty Ltd", + [3]byte{0, 18, 155}: "E2S Electronic Engineering Solutions, S.L.", + [3]byte{0, 18, 156}: "Yulinet", + [3]byte{0, 18, 157}: "First International Computer do Brasil", + [3]byte{0, 18, 158}: "Surf Communications Inc.", + [3]byte{0, 18, 159}: "RAE Systems", + [3]byte{0, 18, 160}: "NeoMeridian Sdn Bhd", + [3]byte{0, 18, 161}: "BluePacket Communications Co., Ltd.", + [3]byte{0, 18, 162}: "VITA", + [3]byte{0, 18, 163}: "Trust International B.V.", + [3]byte{0, 18, 164}: "ThingMagic, LLC", + [3]byte{0, 18, 165}: "Stargen, Inc.", + [3]byte{0, 18, 166}: "Dolby Australia", + [3]byte{0, 18, 167}: "ISR TECHNOLOGIES Inc", + [3]byte{0, 18, 168}: "intec GmbH", + [3]byte{0, 18, 169}: "3Com Ltd", + [3]byte{0, 18, 170}: "IEE, Inc.", + [3]byte{0, 18, 171}: "WiLife, Inc.", + [3]byte{0, 18, 172}: "ONTIMETEK INC.", + [3]byte{0, 18, 173}: "IDS GmbH", + [3]byte{0, 18, 174}: "HLS HARD-LINE Solutions Inc.", + [3]byte{0, 18, 175}: "ELPRO Technologies", + [3]byte{0, 18, 176}: "Efore Oyj (Plc)", + [3]byte{0, 18, 177}: "Dai Nippon Printing Co., Ltd", + [3]byte{0, 18, 178}: "AVOLITES LTD.", + [3]byte{0, 18, 179}: "Advance Wireless Technology Corp.", + [3]byte{0, 18, 180}: "Work Microwave GmbH", + [3]byte{0, 18, 181}: "Vialta, Inc.", + [3]byte{0, 18, 182}: "Santa Barbara Infrared, Inc.", + [3]byte{0, 18, 183}: "PTW Freiburg", + [3]byte{0, 18, 184}: "G2 Microsystems", + [3]byte{0, 18, 185}: "Fusion Digital Technology", + [3]byte{0, 18, 186}: "FSI Systems, Inc.", + [3]byte{0, 18, 187}: "Telecommunications Industry Association TR-41 Committee", + [3]byte{0, 18, 188}: "Echolab LLC", + [3]byte{0, 18, 189}: "Avantec Manufacturing Limited", + [3]byte{0, 18, 190}: "Astek Corporation", + [3]byte{0, 18, 191}: "Arcadyan Technology Corporation", + [3]byte{0, 18, 192}: "HotLava Systems, Inc.", + [3]byte{0, 18, 193}: "Check Point Software Technologies", + [3]byte{0, 18, 194}: "Apex Electronics Factory", + [3]byte{0, 18, 195}: "WIT S.A.", + [3]byte{0, 18, 196}: "Viseon, Inc.", + [3]byte{0, 18, 197}: "V-Show Technology (China) Co.,Ltd", + [3]byte{0, 18, 198}: "TGC America, Inc", + [3]byte{0, 18, 199}: "SECURAY Technologies Ltd.Co.", + [3]byte{0, 18, 200}: "Perfect tech", + [3]byte{0, 18, 201}: "ARRIS Group, Inc.", + [3]byte{0, 18, 202}: "Mechatronic Brick Aps", + [3]byte{0, 18, 203}: "CSS Inc.", + [3]byte{0, 18, 204}: "Bitatek CO., LTD", + [3]byte{0, 18, 205}: "ASEM SpA", + [3]byte{0, 18, 206}: "Advanced Cybernetics Group", + [3]byte{0, 18, 207}: "Accton Technology Corporation", + [3]byte{0, 18, 208}: "Gossen-Metrawatt-GmbH", + [3]byte{0, 18, 209}: "Texas Instruments Inc", + [3]byte{0, 18, 210}: "Texas Instruments", + [3]byte{0, 18, 211}: "Zetta Systems, Inc.", + [3]byte{0, 18, 212}: "Princeton Technology, Ltd", + [3]byte{0, 18, 213}: "Motion Reality Inc.", + [3]byte{0, 18, 214}: "Jiangsu Yitong High-Tech Co.,Ltd", + [3]byte{0, 18, 215}: "Invento Networks, Inc.", + [3]byte{0, 18, 216}: "International Games System Co., Ltd.", + [3]byte{0, 18, 217}: "CISCO SYSTEMS, INC.", + [3]byte{0, 18, 218}: "CISCO SYSTEMS, INC.", + [3]byte{0, 18, 219}: "ZIEHL industrie-elektronik GmbH + Co KG", + [3]byte{0, 18, 220}: "SunCorp Industrial Limited", + [3]byte{0, 18, 221}: "Shengqu Information Technology (Shanghai) Co., Ltd.", + [3]byte{0, 18, 222}: "Radio Components Sweden AB", + [3]byte{0, 18, 223}: "Novomatic AG", + [3]byte{0, 18, 224}: "Codan Limited", + [3]byte{0, 18, 225}: "Alliant Networks, Inc", + [3]byte{0, 18, 226}: "ALAXALA Networks Corporation", + [3]byte{0, 18, 227}: "Agat-RT, Ltd.", + [3]byte{0, 18, 228}: "ZIEHL industrie-electronik GmbH + Co KG", + [3]byte{0, 18, 229}: "Time America, Inc.", + [3]byte{0, 18, 230}: "SPECTEC COMPUTER CO., LTD.", + [3]byte{0, 18, 231}: "Projectek Networking Electronics Corp.", + [3]byte{0, 18, 232}: "Fraunhofer IMS", + [3]byte{0, 18, 233}: "Abbey Systems Ltd", + [3]byte{0, 18, 234}: "Trane", + [3]byte{0, 18, 235}: "PDH Solutions, LLC", + [3]byte{0, 18, 236}: "Movacolor b.v.", + [3]byte{0, 18, 237}: "AVG Advanced Technologies", + [3]byte{0, 18, 238}: "Sony Ericsson Mobile Communications AB", + [3]byte{0, 18, 239}: "OneAccess SA", + [3]byte{0, 18, 240}: "Intel Corporate", + [3]byte{0, 18, 241}: "IFOTEC", + [3]byte{0, 18, 242}: "Brocade Communications Systems, Inc", + [3]byte{0, 18, 243}: "connectBlue AB", + [3]byte{0, 18, 244}: "Belco International Co.,Ltd.", + [3]byte{0, 18, 245}: "Imarda New Zealand Limited", + [3]byte{0, 18, 246}: "MDK CO.,LTD.", + [3]byte{0, 18, 247}: "Xiamen Xinglian Electronics Co., Ltd.", + [3]byte{0, 18, 248}: "WNI Resources, LLC", + [3]byte{0, 18, 249}: "URYU SEISAKU, LTD.", + [3]byte{0, 18, 250}: "THX LTD", + [3]byte{0, 18, 251}: "Samsung Electronics", + [3]byte{0, 18, 252}: "PLANET System Co.,LTD", + [3]byte{0, 18, 253}: "OPTIMUS IC S.A.", + [3]byte{0, 18, 254}: "Lenovo Mobile Communication Technology Ltd.", + [3]byte{0, 18, 255}: "Lely Industries N.V.", + [3]byte{0, 19, 0}: "IT-FACTORY, INC.", + [3]byte{0, 19, 1}: "IronGate S.L.", + [3]byte{0, 19, 2}: "Intel Corporate", + [3]byte{0, 19, 3}: "GateConnect", + [3]byte{0, 19, 4}: "Flaircomm Technologies Co. LTD", + [3]byte{0, 19, 5}: "Epicom, Inc.", + [3]byte{0, 19, 6}: "Always On Wireless", + [3]byte{0, 19, 7}: "Paravirtual Corporation", + [3]byte{0, 19, 8}: "Nuvera Fuel Cells", + [3]byte{0, 19, 9}: "Ocean Broadband Networks", + [3]byte{0, 19, 10}: "Nortel", + [3]byte{0, 19, 11}: "Mextal B.V.", + [3]byte{0, 19, 12}: "HF System Corporation", + [3]byte{0, 19, 13}: "GALILEO AVIONICA", + [3]byte{0, 19, 14}: "Focusrite Audio Engineering Limited", + [3]byte{0, 19, 15}: "EGEMEN Bilgisayar Muh San ve Tic LTD STI", + [3]byte{0, 19, 16}: "Cisco-Linksys, LLC", + [3]byte{0, 19, 17}: "ARRIS International", + [3]byte{0, 19, 18}: "Amedia Networks Inc.", + [3]byte{0, 19, 19}: "GuangZhou Post & Telecom Equipment ltd", + [3]byte{0, 19, 20}: "Asiamajor Inc.", + [3]byte{0, 19, 21}: "SONY Computer Entertainment inc,", + [3]byte{0, 19, 22}: "L-S-B Broadcast Technologies GmbH", + [3]byte{0, 19, 23}: "GN Netcom as", + [3]byte{0, 19, 24}: "DGSTATION Co., Ltd.", + [3]byte{0, 19, 25}: "CISCO SYSTEMS, INC.", + [3]byte{0, 19, 26}: "CISCO SYSTEMS, INC.", + [3]byte{0, 19, 27}: "BeCell Innovations Corp.", + [3]byte{0, 19, 28}: "LiteTouch, Inc.", + [3]byte{0, 19, 29}: "Scanvaegt International A/S", + [3]byte{0, 19, 30}: "Peiker acustic GmbH & Co. KG", + [3]byte{0, 19, 31}: "NxtPhase T&D, Corp.", + [3]byte{0, 19, 32}: "Intel Corporate", + [3]byte{0, 19, 33}: "Hewlett-Packard Company", + [3]byte{0, 19, 34}: "DAQ Electronics, Inc.", + [3]byte{0, 19, 35}: "Cap Co., Ltd.", + [3]byte{0, 19, 36}: "Schneider Electric Ultra Terminal", + [3]byte{0, 19, 37}: "Cortina Systems Inc", + [3]byte{0, 19, 38}: "ECM Systems Ltd", + [3]byte{0, 19, 39}: "Data Acquisitions limited", + [3]byte{0, 19, 40}: "Westech Korea Inc.,", + [3]byte{0, 19, 41}: "VSST Co., LTD", + [3]byte{0, 19, 42}: "Sitronics Telecom Solutions", + [3]byte{0, 19, 43}: "Phoenix Digital", + [3]byte{0, 19, 44}: "MAZ Brandenburg GmbH", + [3]byte{0, 19, 45}: "iWise Communications", + [3]byte{0, 19, 46}: "ITian Coporation", + [3]byte{0, 19, 47}: "Interactek", + [3]byte{0, 19, 48}: "EURO PROTECTION SURVEILLANCE", + [3]byte{0, 19, 49}: "CellPoint Connect", + [3]byte{0, 19, 50}: "Beijing Topsec Network Security Technology Co., Ltd.", + [3]byte{0, 19, 51}: "BaudTec Corporation", + [3]byte{0, 19, 52}: "Arkados, Inc.", + [3]byte{0, 19, 53}: "VS Industry Berhad", + [3]byte{0, 19, 54}: "Tianjin 712 Communication Broadcasting co., ltd.", + [3]byte{0, 19, 55}: "Orient Power Home Network Ltd.", + [3]byte{0, 19, 56}: "FRESENIUS-VIAL", + [3]byte{0, 19, 57}: "CCV Deutschland GmbH", + [3]byte{0, 19, 58}: "VadaTech Inc.", + [3]byte{0, 19, 59}: "Speed Dragon Multimedia Limited", + [3]byte{0, 19, 60}: "QUINTRON SYSTEMS INC.", + [3]byte{0, 19, 61}: "Micro Memory Curtiss Wright Co", + [3]byte{0, 19, 62}: "MetaSwitch", + [3]byte{0, 19, 63}: "Eppendorf Instrumente GmbH", + [3]byte{0, 19, 64}: "AD.EL s.r.l.", + [3]byte{0, 19, 65}: "Shandong New Beiyang Information Technology Co.,Ltd", + [3]byte{0, 19, 66}: "Vision Research, Inc.", + [3]byte{0, 19, 67}: "Matsushita Electronic Components (Europe) GmbH", + [3]byte{0, 19, 68}: "Fargo Electronics Inc.", + [3]byte{0, 19, 69}: "Eaton Corporation", + [3]byte{0, 19, 70}: "D-Link Corporation", + [3]byte{0, 19, 71}: "BlueTree Wireless Data Inc.", + [3]byte{0, 19, 72}: "Artila Electronics Co., Ltd.", + [3]byte{0, 19, 73}: "ZyXEL Communications Corporation", + [3]byte{0, 19, 74}: "Engim, Inc.", + [3]byte{0, 19, 75}: "ToGoldenNet Technology Inc.", + [3]byte{0, 19, 76}: "YDT Technology International", + [3]byte{0, 19, 77}: "Inepro BV", + [3]byte{0, 19, 78}: "Valox Systems, Inc.", + [3]byte{0, 19, 79}: "Tranzeo Wireless Technologies Inc.", + [3]byte{0, 19, 80}: "Silver Spring Networks, Inc", + [3]byte{0, 19, 81}: "Niles Audio Corporation", + [3]byte{0, 19, 82}: "Naztec, Inc.", + [3]byte{0, 19, 83}: "HYDAC Filtertechnik GMBH", + [3]byte{0, 19, 84}: "Zcomax Technologies, Inc.", + [3]byte{0, 19, 85}: "TOMEN Cyber-business Solutions, Inc.", + [3]byte{0, 19, 86}: "FLIR Radiation Inc", + [3]byte{0, 19, 87}: "Soyal Technology Co., Ltd.", + [3]byte{0, 19, 88}: "Realm Systems, Inc.", + [3]byte{0, 19, 89}: "ProTelevision Technologies A/S", + [3]byte{0, 19, 90}: "Project T&E Limited", + [3]byte{0, 19, 91}: "PanelLink Cinema, LLC", + [3]byte{0, 19, 92}: "OnSite Systems, Inc.", + [3]byte{0, 19, 93}: "NTTPC Communications, Inc.", + [3]byte{0, 19, 94}: "EAB/RWI/K", + [3]byte{0, 19, 95}: "CISCO SYSTEMS, INC.", + [3]byte{0, 19, 96}: "CISCO SYSTEMS, INC.", + [3]byte{0, 19, 97}: "Biospace Co., Ltd.", + [3]byte{0, 19, 98}: "ShinHeung Precision Co., Ltd.", + [3]byte{0, 19, 99}: "Verascape, Inc.", + [3]byte{0, 19, 100}: "Paradigm Technology Inc..", + [3]byte{0, 19, 101}: "Nortel", + [3]byte{0, 19, 102}: "Neturity Technologies Inc.", + [3]byte{0, 19, 103}: "Narayon. Co., Ltd.", + [3]byte{0, 19, 104}: "Saab Danmark A/S", + [3]byte{0, 19, 105}: "Honda Electron Co., LED.", + [3]byte{0, 19, 106}: "Hach Lange Sarl", + [3]byte{0, 19, 107}: "E-TEC", + [3]byte{0, 19, 108}: "TomTom", + [3]byte{0, 19, 109}: "Tentaculus AB", + [3]byte{0, 19, 110}: "Techmetro Corp.", + [3]byte{0, 19, 111}: "PacketMotion, Inc.", + [3]byte{0, 19, 112}: "Nokia Danmark A/S", + [3]byte{0, 19, 113}: "ARRIS Group, Inc.", + [3]byte{0, 19, 114}: "Dell Inc", + [3]byte{0, 19, 115}: "BLwave Electronics Co., Ltd", + [3]byte{0, 19, 116}: "Atheros Communications, Inc.", + [3]byte{0, 19, 117}: "American Security Products Co.", + [3]byte{0, 19, 118}: "Tabor Electronics Ltd.", + [3]byte{0, 19, 119}: "Samsung Electronics CO., LTD", + [3]byte{0, 19, 120}: "Qsan Technology, Inc.", + [3]byte{0, 19, 121}: "PONDER INFORMATION INDUSTRIES LTD.", + [3]byte{0, 19, 122}: "Netvox Technology Co., Ltd.", + [3]byte{0, 19, 123}: "Movon Corporation", + [3]byte{0, 19, 124}: "Kaicom co., Ltd.", + [3]byte{0, 19, 125}: "Dynalab, Inc.", + [3]byte{0, 19, 126}: "CorEdge Networks, Inc.", + [3]byte{0, 19, 127}: "CISCO SYSTEMS, INC.", + [3]byte{0, 19, 128}: "CISCO SYSTEMS, INC.", + [3]byte{0, 19, 129}: "CHIPS & Systems, Inc.", + [3]byte{0, 19, 130}: "Cetacea Networks Corporation", + [3]byte{0, 19, 131}: "Application Technologies and Engineering Research Laboratory", + [3]byte{0, 19, 132}: "Advanced Motion Controls", + [3]byte{0, 19, 133}: "Add-On Technology Co., LTD.", + [3]byte{0, 19, 134}: "ABB Inc./Totalflow", + [3]byte{0, 19, 135}: "27M Technologies AB", + [3]byte{0, 19, 136}: "WiMedia Alliance", + [3]byte{0, 19, 137}: "Redes de Telefonía Móvil S.A.", + [3]byte{0, 19, 138}: "QINGDAO GOERTEK ELECTRONICS CO.,LTD.", + [3]byte{0, 19, 139}: "Phantom Technologies LLC", + [3]byte{0, 19, 140}: "Kumyoung.Co.Ltd", + [3]byte{0, 19, 141}: "Kinghold", + [3]byte{0, 19, 142}: "FOAB Elektronik AB", + [3]byte{0, 19, 143}: "Asiarock Incorporation", + [3]byte{0, 19, 144}: "Termtek Computer Co., Ltd", + [3]byte{0, 19, 145}: "OUEN CO.,LTD.", + [3]byte{0, 19, 146}: "Ruckus Wireless", + [3]byte{0, 19, 147}: "Panta Systems, Inc.", + [3]byte{0, 19, 148}: "Infohand Co.,Ltd", + [3]byte{0, 19, 149}: "congatec AG", + [3]byte{0, 19, 150}: "Acbel Polytech Inc.", + [3]byte{0, 19, 151}: "Oracle Corporation", + [3]byte{0, 19, 152}: "TrafficSim Co.,Ltd", + [3]byte{0, 19, 153}: "STAC Corporation.", + [3]byte{0, 19, 154}: "K-ubique ID Corp.", + [3]byte{0, 19, 155}: "ioIMAGE Ltd.", + [3]byte{0, 19, 156}: "Exavera Technologies, Inc.", + [3]byte{0, 19, 157}: "Marvell Hispana S.L.", + [3]byte{0, 19, 158}: "Ciara Technologies Inc.", + [3]byte{0, 19, 159}: "Electronics Design Services, Co., Ltd.", + [3]byte{0, 19, 160}: "ALGOSYSTEM Co., Ltd.", + [3]byte{0, 19, 161}: "Crow Electronic Engeneering", + [3]byte{0, 19, 162}: "MaxStream, Inc", + [3]byte{0, 19, 163}: "Siemens Com CPE Devices", + [3]byte{0, 19, 164}: "KeyEye Communications", + [3]byte{0, 19, 165}: "General Solutions, LTD.", + [3]byte{0, 19, 166}: "Extricom Ltd", + [3]byte{0, 19, 167}: "BATTELLE MEMORIAL INSTITUTE", + [3]byte{0, 19, 168}: "Tanisys Technology", + [3]byte{0, 19, 169}: "Sony Corporation", + [3]byte{0, 19, 170}: "ALS & TEC Ltd.", + [3]byte{0, 19, 171}: "Telemotive AG", + [3]byte{0, 19, 172}: "Sunmyung Electronics Co., LTD", + [3]byte{0, 19, 173}: "Sendo Ltd", + [3]byte{0, 19, 174}: "Radiance Technologies, Inc.", + [3]byte{0, 19, 175}: "NUMA Technology,Inc.", + [3]byte{0, 19, 176}: "Jablotron", + [3]byte{0, 19, 177}: "Intelligent Control Systems (Asia) Pte Ltd", + [3]byte{0, 19, 178}: "Carallon Limited", + [3]byte{0, 19, 179}: "Ecom Communications Technology Co., Ltd.", + [3]byte{0, 19, 180}: "Appear TV", + [3]byte{0, 19, 181}: "Wavesat", + [3]byte{0, 19, 182}: "Sling Media, Inc.", + [3]byte{0, 19, 183}: "Scantech ID", + [3]byte{0, 19, 184}: "RyCo Electronic Systems Limited", + [3]byte{0, 19, 185}: "BM SPA", + [3]byte{0, 19, 186}: "ReadyLinks Inc", + [3]byte{0, 19, 187}: "Smartvue Corporation", + [3]byte{0, 19, 188}: "Artimi Ltd", + [3]byte{0, 19, 189}: "HYMATOM SA", + [3]byte{0, 19, 190}: "Virtual Conexions", + [3]byte{0, 19, 191}: "Media System Planning Corp.", + [3]byte{0, 19, 192}: "Trix Tecnologia Ltda.", + [3]byte{0, 19, 193}: "Asoka USA Corporation", + [3]byte{0, 19, 194}: "WACOM Co.,Ltd", + [3]byte{0, 19, 195}: "CISCO SYSTEMS, INC.", + [3]byte{0, 19, 196}: "CISCO SYSTEMS, INC.", + [3]byte{0, 19, 197}: "LIGHTRON FIBER-OPTIC DEVICES INC.", + [3]byte{0, 19, 198}: "OpenGear, Inc", + [3]byte{0, 19, 199}: "IONOS Co.,Ltd.", + [3]byte{0, 19, 200}: "ADB Broadband Italia", + [3]byte{0, 19, 201}: "Beyond Achieve Enterprises Ltd.", + [3]byte{0, 19, 202}: "Pico Digital", + [3]byte{0, 19, 203}: "Zenitel Norway AS", + [3]byte{0, 19, 204}: "Tall Maple Systems", + [3]byte{0, 19, 205}: "MTI co. LTD", + [3]byte{0, 19, 206}: "Intel Corporate", + [3]byte{0, 19, 207}: "4Access Communications", + [3]byte{0, 19, 208}: "t+ Medical Ltd", + [3]byte{0, 19, 209}: "KIRK telecom A/S", + [3]byte{0, 19, 210}: "PAGE IBERICA, S.A.", + [3]byte{0, 19, 211}: "MICRO-STAR INTERNATIONAL CO., LTD.", + [3]byte{0, 19, 212}: "ASUSTek COMPUTER INC.", + [3]byte{0, 19, 213}: "RuggedCom", + [3]byte{0, 19, 214}: "TII NETWORK TECHNOLOGIES, INC.", + [3]byte{0, 19, 215}: "SPIDCOM Technologies SA", + [3]byte{0, 19, 216}: "Princeton Instruments", + [3]byte{0, 19, 217}: "Matrix Product Development, Inc.", + [3]byte{0, 19, 218}: "Diskware Co., Ltd", + [3]byte{0, 19, 219}: "SHOEI Electric Co.,Ltd", + [3]byte{0, 19, 220}: "IBTEK INC.", + [3]byte{0, 19, 221}: "Abbott Diagnostics", + [3]byte{0, 19, 222}: "Adapt4, LLC", + [3]byte{0, 19, 223}: "Ryvor Corp.", + [3]byte{0, 19, 224}: "Murata Manufacturing Co., Ltd.", + [3]byte{0, 19, 225}: "Iprobe AB", + [3]byte{0, 19, 226}: "GeoVision Inc.", + [3]byte{0, 19, 227}: "CoVi Technologies, Inc.", + [3]byte{0, 19, 228}: "YANGJAE SYSTEMS CORP.", + [3]byte{0, 19, 229}: "TENOSYS, INC.", + [3]byte{0, 19, 230}: "Technolution", + [3]byte{0, 19, 231}: "Halcro", + [3]byte{0, 19, 232}: "Intel Corporate", + [3]byte{0, 19, 233}: "VeriWave, Inc.", + [3]byte{0, 19, 234}: "Kamstrup A/S", + [3]byte{0, 19, 235}: "Sysmaster Corporation", + [3]byte{0, 19, 236}: "Sunbay Software AG", + [3]byte{0, 19, 237}: "PSIA", + [3]byte{0, 19, 238}: "JBX Designs Inc.", + [3]byte{0, 19, 239}: "Kingjon Digital Technology Co.,Ltd", + [3]byte{0, 19, 240}: "Wavefront Semiconductor", + [3]byte{0, 19, 241}: "AMOD Technology Co., Ltd.", + [3]byte{0, 19, 242}: "Klas Ltd", + [3]byte{0, 19, 243}: "Giga-byte Communications Inc.", + [3]byte{0, 19, 244}: "Psitek (Pty) Ltd", + [3]byte{0, 19, 245}: "Akimbi Systems", + [3]byte{0, 19, 246}: "Cintech", + [3]byte{0, 19, 247}: "SMC Networks, Inc.", + [3]byte{0, 19, 248}: "Dex Security Solutions", + [3]byte{0, 19, 249}: "Cavera Systems", + [3]byte{0, 19, 250}: "LifeSize Communications, Inc", + [3]byte{0, 19, 251}: "RKC INSTRUMENT INC.", + [3]byte{0, 19, 252}: "SiCortex, Inc", + [3]byte{0, 19, 253}: "Nokia Danmark A/S", + [3]byte{0, 19, 254}: "GRANDTEC ELECTRONIC CORP.", + [3]byte{0, 19, 255}: "Dage-MTI of MC, Inc.", + [3]byte{0, 20, 0}: "MINERVA KOREA CO., LTD", + [3]byte{0, 20, 1}: "Rivertree Networks Corp.", + [3]byte{0, 20, 2}: "kk-electronic a/s", + [3]byte{0, 20, 3}: "Renasis, LLC", + [3]byte{0, 20, 4}: "ARRIS Group, Inc.", + [3]byte{0, 20, 5}: "OpenIB, Inc.", + [3]byte{0, 20, 6}: "Go Networks", + [3]byte{0, 20, 7}: "Sperian Protection Instrumentation", + [3]byte{0, 20, 8}: "Eka Systems Inc.", + [3]byte{0, 20, 9}: "MAGNETI MARELLI S.E. S.p.A.", + [3]byte{0, 20, 10}: "WEPIO Co., Ltd.", + [3]byte{0, 20, 11}: "FIRST INTERNATIONAL COMPUTER, INC.", + [3]byte{0, 20, 12}: "GKB CCTV CO., LTD.", + [3]byte{0, 20, 13}: "Nortel", + [3]byte{0, 20, 14}: "Nortel", + [3]byte{0, 20, 15}: "Federal State Unitary Enterprise Leningrad R&D Institute of", + [3]byte{0, 20, 16}: "Suzhou Keda Technology CO.,Ltd", + [3]byte{0, 20, 17}: "Deutschmann Automation GmbH & Co. KG", + [3]byte{0, 20, 18}: "S-TEC electronics AG", + [3]byte{0, 20, 19}: "Trebing & Himstedt Prozeßautomation GmbH & Co. KG", + [3]byte{0, 20, 20}: "Jumpnode Systems LLC.", + [3]byte{0, 20, 21}: "Intec Automation Inc.", + [3]byte{0, 20, 22}: "Scosche Industries, Inc.", + [3]byte{0, 20, 23}: "RSE Informations Technologie GmbH", + [3]byte{0, 20, 24}: "C4Line", + [3]byte{0, 20, 25}: "SIDSA", + [3]byte{0, 20, 26}: "DEICY CORPORATION", + [3]byte{0, 20, 27}: "CISCO SYSTEMS, INC.", + [3]byte{0, 20, 28}: "CISCO SYSTEMS, INC.", + [3]byte{0, 20, 29}: "LTi DRIVES GmbH", + [3]byte{0, 20, 30}: "P.A. Semi, Inc.", + [3]byte{0, 20, 31}: "SunKwang Electronics Co., Ltd", + [3]byte{0, 20, 32}: "G-Links networking company", + [3]byte{0, 20, 33}: "Total Wireless Technologies Pte. Ltd.", + [3]byte{0, 20, 34}: "Dell Inc", + [3]byte{0, 20, 35}: "J-S Co. NEUROCOM", + [3]byte{0, 20, 36}: "Merry Electrics CO., LTD.", + [3]byte{0, 20, 37}: "Galactic Computing Corp.", + [3]byte{0, 20, 38}: "NL Technology", + [3]byte{0, 20, 39}: "JazzMutant", + [3]byte{0, 20, 40}: "Vocollect, Inc", + [3]byte{0, 20, 41}: "V Center Technologies Co., Ltd.", + [3]byte{0, 20, 42}: "Elitegroup Computer System Co., Ltd", + [3]byte{0, 20, 43}: "Edata Communication Inc.", + [3]byte{0, 20, 44}: "Koncept International, Inc.", + [3]byte{0, 20, 45}: "Toradex AG", + [3]byte{0, 20, 46}: "77 Elektronika Kft.", + [3]byte{0, 20, 47}: "WildPackets", + [3]byte{0, 20, 48}: "ViPowER, Inc", + [3]byte{0, 20, 49}: "PDL Electronics Ltd", + [3]byte{0, 20, 50}: "Tarallax Wireless, Inc.", + [3]byte{0, 20, 51}: "Empower Technologies(Canada) Inc.", + [3]byte{0, 20, 52}: "Keri Systems, Inc", + [3]byte{0, 20, 53}: "CityCom Corp.", + [3]byte{0, 20, 54}: "Qwerty Elektronik AB", + [3]byte{0, 20, 55}: "GSTeletech Co.,Ltd.", + [3]byte{0, 20, 56}: "Hewlett-Packard Company", + [3]byte{0, 20, 57}: "Blonder Tongue Laboratories, Inc.", + [3]byte{0, 20, 58}: "RAYTALK INTERNATIONAL SRL", + [3]byte{0, 20, 59}: "Sensovation AG", + [3]byte{0, 20, 60}: "Rheinmetall Canada Inc.", + [3]byte{0, 20, 61}: "Aevoe Inc.", + [3]byte{0, 20, 62}: "AirLink Communications, Inc.", + [3]byte{0, 20, 63}: "Hotway Technology Corporation", + [3]byte{0, 20, 64}: "ATOMIC Corporation", + [3]byte{0, 20, 65}: "Innovation Sound Technology Co., LTD.", + [3]byte{0, 20, 66}: "ATTO CORPORATION", + [3]byte{0, 20, 67}: "Consultronics Europe Ltd", + [3]byte{0, 20, 68}: "Grundfos Holding", + [3]byte{0, 20, 69}: "Telefon-Gradnja d.o.o.", + [3]byte{0, 20, 70}: "SuperVision Solutions LLC", + [3]byte{0, 20, 71}: "BOAZ Inc.", + [3]byte{0, 20, 72}: "Inventec Multimedia & Telecom Corporation", + [3]byte{0, 20, 73}: "Sichuan Changhong Electric Ltd.", + [3]byte{0, 20, 74}: "Taiwan Thick-Film Ind. Corp.", + [3]byte{0, 20, 75}: "Hifn, Inc.", + [3]byte{0, 20, 76}: "General Meters Corp.", + [3]byte{0, 20, 77}: "Intelligent Systems", + [3]byte{0, 20, 78}: "SRISA", + [3]byte{0, 20, 79}: "Oracle Corporation", + [3]byte{0, 20, 80}: "Heim Systems GmbH", + [3]byte{0, 20, 81}: "Apple", + [3]byte{0, 20, 82}: "CALCULEX,INC.", + [3]byte{0, 20, 83}: "ADVANTECH TECHNOLOGIES CO.,LTD", + [3]byte{0, 20, 84}: "Symwave", + [3]byte{0, 20, 85}: "Coder Electronics Corporation", + [3]byte{0, 20, 86}: "Edge Products", + [3]byte{0, 20, 87}: "T-VIPS AS", + [3]byte{0, 20, 88}: "HS Automatic ApS", + [3]byte{0, 20, 89}: "Moram Co., Ltd.", + [3]byte{0, 20, 90}: "Neratec Solutions AG", + [3]byte{0, 20, 91}: "SeekerNet Inc.", + [3]byte{0, 20, 92}: "Intronics B.V.", + [3]byte{0, 20, 93}: "WJ Communications, Inc.", + [3]byte{0, 20, 94}: "IBM Corp", + [3]byte{0, 20, 95}: "ADITEC CO. LTD", + [3]byte{0, 20, 96}: "Kyocera Wireless Corp.", + [3]byte{0, 20, 97}: "CORONA CORPORATION", + [3]byte{0, 20, 98}: "Digiwell Technology, inc", + [3]byte{0, 20, 99}: "IDCS N.V.", + [3]byte{0, 20, 100}: "Cryptosoft", + [3]byte{0, 20, 101}: "Novo Nordisk A/S", + [3]byte{0, 20, 102}: "Kleinhenz Elektronik GmbH", + [3]byte{0, 20, 103}: "ArrowSpan Inc.", + [3]byte{0, 20, 104}: "CelPlan International, Inc.", + [3]byte{0, 20, 105}: "CISCO SYSTEMS, INC.", + [3]byte{0, 20, 106}: "CISCO SYSTEMS, INC.", + [3]byte{0, 20, 107}: "Anagran, Inc.", + [3]byte{0, 20, 108}: "Netgear Inc.", + [3]byte{0, 20, 109}: "RF Technologies", + [3]byte{0, 20, 110}: "H. Stoll GmbH & Co. KG", + [3]byte{0, 20, 111}: "Kohler Co", + [3]byte{0, 20, 112}: "Prokom Software SA", + [3]byte{0, 20, 113}: "Eastern Asia Technology Limited", + [3]byte{0, 20, 114}: "China Broadband Wireless IP Standard Group", + [3]byte{0, 20, 115}: "Bookham Inc", + [3]byte{0, 20, 116}: "K40 Electronics", + [3]byte{0, 20, 117}: "Wiline Networks, Inc.", + [3]byte{0, 20, 118}: "MultiCom Industries Limited", + [3]byte{0, 20, 119}: "Nertec Inc.", + [3]byte{0, 20, 120}: "ShenZhen TP-LINK Technologies Co., Ltd.", + [3]byte{0, 20, 121}: "NEC Magnus Communications,Ltd.", + [3]byte{0, 20, 122}: "Eubus GmbH", + [3]byte{0, 20, 123}: "Iteris, Inc.", + [3]byte{0, 20, 124}: "3Com Ltd", + [3]byte{0, 20, 125}: "Aeon Digital International", + [3]byte{0, 20, 126}: "InnerWireless", + [3]byte{0, 20, 127}: "Thomson Telecom Belgium", + [3]byte{0, 20, 128}: "Hitachi-LG Data Storage Korea, Inc", + [3]byte{0, 20, 129}: "Multilink Inc", + [3]byte{0, 20, 130}: "Aurora Networks", + [3]byte{0, 20, 131}: "eXS Inc.", + [3]byte{0, 20, 132}: "Cermate Technologies Inc.", + [3]byte{0, 20, 133}: "Giga-Byte", + [3]byte{0, 20, 134}: "Echo Digital Audio Corporation", + [3]byte{0, 20, 135}: "American Technology Integrators", + [3]byte{0, 20, 136}: "Akorri", + [3]byte{0, 20, 137}: "B15402100 - JANDEI, S.L.", + [3]byte{0, 20, 138}: "Elin Ebg Traction Gmbh", + [3]byte{0, 20, 139}: "Globo Electronic GmbH & Co. KG", + [3]byte{0, 20, 140}: "Fortress Technologies", + [3]byte{0, 20, 141}: "Cubic Defense Simulation Systems", + [3]byte{0, 20, 142}: "Tele Power Inc.", + [3]byte{0, 20, 143}: "Protronic (Far East) Ltd.", + [3]byte{0, 20, 144}: "ASP Corporation", + [3]byte{0, 20, 145}: "Daniels Electronics Ltd. dbo Codan Rado Communications", + [3]byte{0, 20, 146}: "Liteon, Mobile Media Solution SBU", + [3]byte{0, 20, 147}: "Systimax Solutions", + [3]byte{0, 20, 148}: "ESU AG", + [3]byte{0, 20, 149}: "2Wire, Inc.", + [3]byte{0, 20, 150}: "Phonic Corp.", + [3]byte{0, 20, 151}: "ZHIYUAN Eletronics co.,ltd.", + [3]byte{0, 20, 152}: "Viking Design Technology", + [3]byte{0, 20, 153}: "Helicomm Inc", + [3]byte{0, 20, 154}: "ARRIS Group, Inc.", + [3]byte{0, 20, 155}: "Nokota Communications, LLC", + [3]byte{0, 20, 156}: "HF Company", + [3]byte{0, 20, 157}: "Sound ID Inc.", + [3]byte{0, 20, 158}: "UbONE Co., Ltd", + [3]byte{0, 20, 159}: "System and Chips, Inc.", + [3]byte{0, 20, 160}: "Accsense, Inc.", + [3]byte{0, 20, 161}: "Synchronous Communication Corp", + [3]byte{0, 20, 162}: "Core Micro Systems Inc.", + [3]byte{0, 20, 163}: "Vitelec BV", + [3]byte{0, 20, 164}: "Hon Hai Precision Ind. Co., Ltd.", + [3]byte{0, 20, 165}: "Gemtek Technology Co., Ltd.", + [3]byte{0, 20, 166}: "Teranetics, Inc.", + [3]byte{0, 20, 167}: "Nokia Danmark A/S", + [3]byte{0, 20, 168}: "CISCO SYSTEMS, INC.", + [3]byte{0, 20, 169}: "CISCO SYSTEMS, INC.", + [3]byte{0, 20, 170}: "Ashly Audio, Inc.", + [3]byte{0, 20, 171}: "Senhai Electronic Technology Co., Ltd.", + [3]byte{0, 20, 172}: "Bountiful WiFi", + [3]byte{0, 20, 173}: "Gassner Wiege- und Meßtechnik GmbH", + [3]byte{0, 20, 174}: "Wizlogics Co., Ltd.", + [3]byte{0, 20, 175}: "Datasym POS Inc.", + [3]byte{0, 20, 176}: "Naeil Community", + [3]byte{0, 20, 177}: "Avitec AB", + [3]byte{0, 20, 178}: "mCubelogics Corporation", + [3]byte{0, 20, 179}: "CoreStar International Corp", + [3]byte{0, 20, 180}: "General Dynamics United Kingdom Ltd", + [3]byte{0, 20, 181}: "PHYSIOMETRIX,INC", + [3]byte{0, 20, 182}: "Enswer Technology Inc.", + [3]byte{0, 20, 183}: "AR Infotek Inc.", + [3]byte{0, 20, 184}: "Hill-Rom", + [3]byte{0, 20, 185}: "MSTAR SEMICONDUCTOR", + [3]byte{0, 20, 186}: "Carvers SA de CV", + [3]byte{0, 20, 187}: "Open Interface North America", + [3]byte{0, 20, 188}: "SYNECTIC TELECOM EXPORTS PVT. LTD.", + [3]byte{0, 20, 189}: "incNETWORKS, Inc", + [3]byte{0, 20, 190}: "Wink communication technology CO.LTD", + [3]byte{0, 20, 191}: "Cisco-Linksys LLC", + [3]byte{0, 20, 192}: "Symstream Technology Group Ltd", + [3]byte{0, 20, 193}: "U.S. Robotics Corporation", + [3]byte{0, 20, 194}: "Hewlett-Packard Company", + [3]byte{0, 20, 195}: "Seagate Technology", + [3]byte{0, 20, 196}: "Vitelcom Mobile Technology", + [3]byte{0, 20, 197}: "Alive Technologies Pty Ltd", + [3]byte{0, 20, 198}: "Quixant Ltd", + [3]byte{0, 20, 199}: "Nortel", + [3]byte{0, 20, 200}: "Contemporary Research Corp", + [3]byte{0, 20, 201}: "Brocade Communications Systems, Inc.", + [3]byte{0, 20, 202}: "Key Radio Systems Limited", + [3]byte{0, 20, 203}: "LifeSync Corporation", + [3]byte{0, 20, 204}: "Zetec, Inc.", + [3]byte{0, 20, 205}: "DigitalZone Co., Ltd.", + [3]byte{0, 20, 206}: "NF CORPORATION", + [3]byte{0, 20, 207}: "INVISIO Communications", + [3]byte{0, 20, 208}: "BTI Systems Inc.", + [3]byte{0, 20, 209}: "TRENDnet", + [3]byte{0, 20, 210}: "Kyuden Technosystems Corporation", + [3]byte{0, 20, 211}: "SEPSA", + [3]byte{0, 20, 212}: "K Technology Corporation", + [3]byte{0, 20, 213}: "Datang Telecom Technology CO. , LCD,Optical Communication Br", + [3]byte{0, 20, 214}: "Jeongmin Electronics Co.,Ltd.", + [3]byte{0, 20, 215}: "Datastore Technology Corp", + [3]byte{0, 20, 216}: "bio-logic SA", + [3]byte{0, 20, 217}: "IP Fabrics, Inc.", + [3]byte{0, 20, 218}: "Huntleigh Healthcare", + [3]byte{0, 20, 219}: "Elma Trenew Electronic GmbH", + [3]byte{0, 20, 220}: "Communication System Design & Manufacturing (CSDM)", + [3]byte{0, 20, 221}: "Covergence Inc.", + [3]byte{0, 20, 222}: "Sage Instruments Inc.", + [3]byte{0, 20, 223}: "HI-P Tech Corporation", + [3]byte{0, 20, 224}: "LET'S Corporation", + [3]byte{0, 20, 225}: "Data Display AG", + [3]byte{0, 20, 226}: "datacom systems inc.", + [3]byte{0, 20, 227}: "mm-lab GmbH", + [3]byte{0, 20, 228}: "infinias, LLC", + [3]byte{0, 20, 229}: "Alticast", + [3]byte{0, 20, 230}: "AIM Infrarotmodule GmbH", + [3]byte{0, 20, 231}: "Stolinx,. Inc", + [3]byte{0, 20, 232}: "ARRIS Group, Inc.", + [3]byte{0, 20, 233}: "Nortech International", + [3]byte{0, 20, 234}: "S Digm Inc. (Safe Paradigm Inc.)", + [3]byte{0, 20, 235}: "AwarePoint Corporation", + [3]byte{0, 20, 236}: "Acro Telecom", + [3]byte{0, 20, 237}: "Airak, Inc.", + [3]byte{0, 20, 238}: "Western Digital Technologies, Inc.", + [3]byte{0, 20, 239}: "TZero Technologies, Inc.", + [3]byte{0, 20, 240}: "Business Security OL AB", + [3]byte{0, 20, 241}: "CISCO SYSTEMS, INC.", + [3]byte{0, 20, 242}: "CISCO SYSTEMS, INC.", + [3]byte{0, 20, 243}: "ViXS Systems Inc", + [3]byte{0, 20, 244}: "DekTec Digital Video B.V.", + [3]byte{0, 20, 245}: "OSI Security Devices", + [3]byte{0, 20, 246}: "Juniper Networks, Inc.", + [3]byte{0, 20, 247}: "CREVIS Co., LTD", + [3]byte{0, 20, 248}: "Scientific Atlanta", + [3]byte{0, 20, 249}: "Vantage Controls", + [3]byte{0, 20, 250}: "AsGa S.A.", + [3]byte{0, 20, 251}: "Technical Solutions Inc.", + [3]byte{0, 20, 252}: "Extandon, Inc.", + [3]byte{0, 20, 253}: "Thecus Technology Corp.", + [3]byte{0, 20, 254}: "Artech Electronics", + [3]byte{0, 20, 255}: "Precise Automation, Inc.", + [3]byte{0, 21, 0}: "Intel Corporate", + [3]byte{0, 21, 1}: "LexBox", + [3]byte{0, 21, 2}: "BETA tech", + [3]byte{0, 21, 3}: "PROFIcomms s.r.o.", + [3]byte{0, 21, 4}: "GAME PLUS CO., LTD.", + [3]byte{0, 21, 5}: "Actiontec Electronics, Inc", + [3]byte{0, 21, 6}: "Neo Photonics", + [3]byte{0, 21, 7}: "Renaissance Learning Inc", + [3]byte{0, 21, 8}: "Global Target Enterprise Inc", + [3]byte{0, 21, 9}: "Plus Technology Co., Ltd", + [3]byte{0, 21, 10}: "Sonoa Systems, Inc", + [3]byte{0, 21, 11}: "SAGE INFOTECH LTD.", + [3]byte{0, 21, 12}: "AVM GmbH", + [3]byte{0, 21, 13}: "Hoana Medical, Inc.", + [3]byte{0, 21, 14}: "OPENBRAIN TECHNOLOGIES CO., LTD.", + [3]byte{0, 21, 15}: "mingjong", + [3]byte{0, 21, 16}: "Techsphere Co., Ltd", + [3]byte{0, 21, 17}: "Data Center Systems", + [3]byte{0, 21, 18}: "Zurich University of Applied Sciences", + [3]byte{0, 21, 19}: "EFS sas", + [3]byte{0, 21, 20}: "Hu Zhou NAVA Networks&Electronics Ltd.", + [3]byte{0, 21, 21}: "Leipold+Co.GmbH", + [3]byte{0, 21, 22}: "URIEL SYSTEMS INC.", + [3]byte{0, 21, 23}: "Intel Corporate", + [3]byte{0, 21, 24}: "Shenzhen 10MOONS Technology Development CO.,Ltd", + [3]byte{0, 21, 25}: "StoreAge Networking Technologies", + [3]byte{0, 21, 26}: "Hunter Engineering Company", + [3]byte{0, 21, 27}: "Isilon Systems Inc.", + [3]byte{0, 21, 28}: "LENECO", + [3]byte{0, 21, 29}: "M2I CORPORATION", + [3]byte{0, 21, 30}: "Ethernet Powerlink Standardization Group (EPSG)", + [3]byte{0, 21, 31}: "Multivision Intelligent Surveillance (Hong Kong) Ltd", + [3]byte{0, 21, 32}: "Radiocrafts AS", + [3]byte{0, 21, 33}: "Horoquartz", + [3]byte{0, 21, 34}: "Dea Security", + [3]byte{0, 21, 35}: "Meteor Communications Corporation", + [3]byte{0, 21, 36}: "Numatics, Inc.", + [3]byte{0, 21, 37}: "Chamberlain Access Solutions", + [3]byte{0, 21, 38}: "Remote Technologies Inc", + [3]byte{0, 21, 39}: "Balboa Instruments", + [3]byte{0, 21, 40}: "Beacon Medical Products LLC d.b.a. BeaconMedaes", + [3]byte{0, 21, 41}: "N3 Corporation", + [3]byte{0, 21, 42}: "Nokia GmbH", + [3]byte{0, 21, 43}: "CISCO SYSTEMS, INC.", + [3]byte{0, 21, 44}: "CISCO SYSTEMS, INC.", + [3]byte{0, 21, 45}: "TenX Networks, LLC", + [3]byte{0, 21, 46}: "PacketHop, Inc.", + [3]byte{0, 21, 47}: "ARRIS Group, Inc.", + [3]byte{0, 21, 48}: "EMC Corporation", + [3]byte{0, 21, 49}: "KOCOM", + [3]byte{0, 21, 50}: "Consumer Technologies Group, LLC", + [3]byte{0, 21, 51}: "NADAM.CO.,LTD", + [3]byte{0, 21, 52}: "A Beltrónica-Companhia de Comunicações, Lda", + [3]byte{0, 21, 53}: "OTE Spa", + [3]byte{0, 21, 54}: "Powertech co.,Ltd", + [3]byte{0, 21, 55}: "Ventus Networks", + [3]byte{0, 21, 56}: "RFID, Inc.", + [3]byte{0, 21, 57}: "Technodrive SRL", + [3]byte{0, 21, 58}: "Shenzhen Syscan Technology Co.,Ltd.", + [3]byte{0, 21, 59}: "EMH metering GmbH & Co. KG", + [3]byte{0, 21, 60}: "Kprotech Co., Ltd.", + [3]byte{0, 21, 61}: "ELIM PRODUCT CO.", + [3]byte{0, 21, 62}: "Q-Matic Sweden AB", + [3]byte{0, 21, 63}: "Alcatel Alenia Space Italia", + [3]byte{0, 21, 64}: "Nortel", + [3]byte{0, 21, 65}: "StrataLight Communications, Inc.", + [3]byte{0, 21, 66}: "MICROHARD S.R.L.", + [3]byte{0, 21, 67}: "Aberdeen Test Center", + [3]byte{0, 21, 68}: "coM.s.a.t. AG", + [3]byte{0, 21, 69}: "SEECODE Co., Ltd.", + [3]byte{0, 21, 70}: "ITG Worldwide Sdn Bhd", + [3]byte{0, 21, 71}: "AiZen Solutions Inc.", + [3]byte{0, 21, 72}: "CUBE TECHNOLOGIES", + [3]byte{0, 21, 73}: "Dixtal Biomedica Ind. Com. Ltda", + [3]byte{0, 21, 74}: "WANSHIH ELECTRONIC CO., LTD", + [3]byte{0, 21, 75}: "Wonde Proud Technology Co., Ltd", + [3]byte{0, 21, 76}: "Saunders Electronics", + [3]byte{0, 21, 77}: "Netronome Systems, Inc.", + [3]byte{0, 21, 78}: "IEC", + [3]byte{0, 21, 79}: "one RF Technology", + [3]byte{0, 21, 80}: "Nits Technology Inc", + [3]byte{0, 21, 81}: "RadioPulse Inc.", + [3]byte{0, 21, 82}: "Wi-Gear Inc.", + [3]byte{0, 21, 83}: "Cytyc Corporation", + [3]byte{0, 21, 84}: "Atalum Wireless S.A.", + [3]byte{0, 21, 85}: "DFM GmbH", + [3]byte{0, 21, 86}: "SAGEM COMMUNICATION", + [3]byte{0, 21, 87}: "Olivetti", + [3]byte{0, 21, 88}: "FOXCONN", + [3]byte{0, 21, 89}: "Securaplane Technologies, Inc.", + [3]byte{0, 21, 90}: "DAINIPPON PHARMACEUTICAL CO., LTD.", + [3]byte{0, 21, 91}: "Sampo Corporation", + [3]byte{0, 21, 92}: "Dresser Wayne", + [3]byte{0, 21, 93}: "Microsoft Corporation", + [3]byte{0, 21, 94}: "Morgan Stanley", + [3]byte{0, 21, 95}: "GreenPeak Technologies", + [3]byte{0, 21, 96}: "Hewlett-Packard Company", + [3]byte{0, 21, 97}: "JJPlus Corporation", + [3]byte{0, 21, 98}: "CISCO SYSTEMS, INC.", + [3]byte{0, 21, 99}: "CISCO SYSTEMS, INC.", + [3]byte{0, 21, 100}: "BEHRINGER Spezielle Studiotechnik GmbH", + [3]byte{0, 21, 101}: "XIAMEN YEALINK NETWORK TECHNOLOGY CO.,LTD", + [3]byte{0, 21, 102}: "A-First Technology Co., Ltd.", + [3]byte{0, 21, 103}: "RADWIN Inc.", + [3]byte{0, 21, 104}: "Dilithium Networks", + [3]byte{0, 21, 105}: "PECO II, Inc.", + [3]byte{0, 21, 106}: "DG2L Technologies Pvt. Ltd.", + [3]byte{0, 21, 107}: "Perfisans Networks Corp.", + [3]byte{0, 21, 108}: "SANE SYSTEM CO., LTD", + [3]byte{0, 21, 109}: "Ubiquiti Networks Inc.", + [3]byte{0, 21, 110}: "A. W. Communication Systems Ltd", + [3]byte{0, 21, 111}: "Xiranet Communications GmbH", + [3]byte{0, 21, 112}: "Symbol TechnologiesWholly owned Subsidiary of Motorola", + [3]byte{0, 21, 113}: "Nolan Systems", + [3]byte{0, 21, 114}: "Red-Lemon", + [3]byte{0, 21, 115}: "NewSoft Technology Corporation", + [3]byte{0, 21, 116}: "Horizon Semiconductors Ltd.", + [3]byte{0, 21, 117}: "Nevis Networks Inc.", + [3]byte{0, 21, 118}: "LABiTec - Labor Biomedical Technologies GmbH", + [3]byte{0, 21, 119}: "Allied Telesis", + [3]byte{0, 21, 120}: "Audio / Video Innovations", + [3]byte{0, 21, 121}: "Lunatone Industrielle Elektronik GmbH", + [3]byte{0, 21, 122}: "Telefin S.p.A.", + [3]byte{0, 21, 123}: "Leuze electronic GmbH + Co. KG", + [3]byte{0, 21, 124}: "Dave Networks, Inc.", + [3]byte{0, 21, 125}: "POSDATA CO., LTD.", + [3]byte{0, 21, 126}: "Weidmüller Interface GmbH & Co. KG", + [3]byte{0, 21, 127}: "ChuanG International Holding CO.,LTD.", + [3]byte{0, 21, 128}: "U-WAY CORPORATION", + [3]byte{0, 21, 129}: "MAKUS Inc.", + [3]byte{0, 21, 130}: "Pulse Eight Limited", + [3]byte{0, 21, 131}: "IVT corporation", + [3]byte{0, 21, 132}: "Schenck Process GmbH", + [3]byte{0, 21, 133}: "Aonvision Technolopy Corp.", + [3]byte{0, 21, 134}: "Xiamen Overseas Chinese Electronic Co., Ltd.", + [3]byte{0, 21, 135}: "Takenaka Seisakusho Co.,Ltd", + [3]byte{0, 21, 136}: "Salutica Allied Solutions Sdn Bhd", + [3]byte{0, 21, 137}: "D-MAX Technology Co.,Ltd", + [3]byte{0, 21, 138}: "SURECOM Technology Corp.", + [3]byte{0, 21, 139}: "Park Air Systems Ltd", + [3]byte{0, 21, 140}: "Liab ApS", + [3]byte{0, 21, 141}: "Jennic Ltd", + [3]byte{0, 21, 142}: "Plustek.INC", + [3]byte{0, 21, 143}: "NTT Advanced Technology Corporation", + [3]byte{0, 21, 144}: "Hectronic GmbH", + [3]byte{0, 21, 145}: "RLW Inc.", + [3]byte{0, 21, 146}: "Facom UK Ltd (Melksham)", + [3]byte{0, 21, 147}: "U4EA Technologies Inc.", + [3]byte{0, 21, 148}: "BIXOLON CO.,LTD", + [3]byte{0, 21, 149}: "Quester Tangent Corporation", + [3]byte{0, 21, 150}: "ARRIS International", + [3]byte{0, 21, 151}: "AETA AUDIO SYSTEMS", + [3]byte{0, 21, 152}: "Kolektor group", + [3]byte{0, 21, 153}: "Samsung Electronics Co., LTD", + [3]byte{0, 21, 154}: "ARRIS Group, Inc.", + [3]byte{0, 21, 155}: "Nortel", + [3]byte{0, 21, 156}: "B-KYUNG SYSTEM Co.,Ltd.", + [3]byte{0, 21, 157}: "Tripp Lite", + [3]byte{0, 21, 158}: "Mad Catz Interactive Inc", + [3]byte{0, 21, 159}: "Terascala, Inc.", + [3]byte{0, 21, 160}: "Nokia Danmark A/S", + [3]byte{0, 21, 161}: "ECA-SINTERS", + [3]byte{0, 21, 162}: "ARRIS International", + [3]byte{0, 21, 163}: "ARRIS International", + [3]byte{0, 21, 164}: "ARRIS International", + [3]byte{0, 21, 165}: "DCI Co., Ltd.", + [3]byte{0, 21, 166}: "Digital Electronics Products Ltd.", + [3]byte{0, 21, 167}: "Robatech AG", + [3]byte{0, 21, 168}: "ARRIS Group, Inc.", + [3]byte{0, 21, 169}: "KWANG WOO I&C CO.,LTD", + [3]byte{0, 21, 170}: "Rextechnik International Co.,", + [3]byte{0, 21, 171}: "PRO CO SOUND INC", + [3]byte{0, 21, 172}: "Capelon AB", + [3]byte{0, 21, 173}: "Accedian Networks", + [3]byte{0, 21, 174}: "kyung il", + [3]byte{0, 21, 175}: "AzureWave Technologies, Inc.", + [3]byte{0, 21, 176}: "AUTOTELENET CO.,LTD", + [3]byte{0, 21, 177}: "Ambient Corporation", + [3]byte{0, 21, 178}: "Advanced Industrial Computer, Inc.", + [3]byte{0, 21, 179}: "Caretech AB", + [3]byte{0, 21, 180}: "Polymap Wireless LLC", + [3]byte{0, 21, 181}: "CI Network Corp.", + [3]byte{0, 21, 182}: "ShinMaywa Industries, Ltd.", + [3]byte{0, 21, 183}: "Toshiba", + [3]byte{0, 21, 184}: "Tahoe", + [3]byte{0, 21, 185}: "Samsung Electronics Co., Ltd.", + [3]byte{0, 21, 186}: "iba AG", + [3]byte{0, 21, 187}: "SMA Solar Technology AG", + [3]byte{0, 21, 188}: "Develco", + [3]byte{0, 21, 189}: "Group 4 Technology Ltd", + [3]byte{0, 21, 190}: "Iqua Ltd.", + [3]byte{0, 21, 191}: "technicob", + [3]byte{0, 21, 192}: "DIGITAL TELEMEDIA CO.,LTD.", + [3]byte{0, 21, 193}: "SONY Computer Entertainment inc,", + [3]byte{0, 21, 194}: "3M Germany", + [3]byte{0, 21, 195}: "Ruf Telematik AG", + [3]byte{0, 21, 196}: "FLOVEL CO., LTD.", + [3]byte{0, 21, 197}: "Dell Inc", + [3]byte{0, 21, 198}: "CISCO SYSTEMS, INC.", + [3]byte{0, 21, 199}: "CISCO SYSTEMS, INC.", + [3]byte{0, 21, 200}: "FlexiPanel Ltd", + [3]byte{0, 21, 201}: "Gumstix, Inc", + [3]byte{0, 21, 202}: "TeraRecon, Inc.", + [3]byte{0, 21, 203}: "Surf Communication Solutions Ltd.", + [3]byte{0, 21, 204}: "UQUEST, LTD.", + [3]byte{0, 21, 205}: "Exartech International Corp.", + [3]byte{0, 21, 206}: "ARRIS International", + [3]byte{0, 21, 207}: "ARRIS International", + [3]byte{0, 21, 208}: "ARRIS International", + [3]byte{0, 21, 209}: "ARRIS Group, Inc.", + [3]byte{0, 21, 210}: "Xantech Corporation", + [3]byte{0, 21, 211}: "Pantech&Curitel Communications, Inc.", + [3]byte{0, 21, 212}: "Emitor AB", + [3]byte{0, 21, 213}: "NICEVT", + [3]byte{0, 21, 214}: "OSLiNK Sp. z o.o.", + [3]byte{0, 21, 215}: "Reti Corporation", + [3]byte{0, 21, 216}: "Interlink Electronics", + [3]byte{0, 21, 217}: "PKC Electronics Oy", + [3]byte{0, 21, 218}: "IRITEL A.D.", + [3]byte{0, 21, 219}: "Canesta Inc.", + [3]byte{0, 21, 220}: "KT&C Co., Ltd.", + [3]byte{0, 21, 221}: "IP Control Systems Ltd.", + [3]byte{0, 21, 222}: "Nokia Danmark A/S", + [3]byte{0, 21, 223}: "Clivet S.p.A.", + [3]byte{0, 21, 224}: "Ericsson", + [3]byte{0, 21, 225}: "Picochip Ltd", + [3]byte{0, 21, 226}: "Dr.Ing. Herbert Knauer GmbH", + [3]byte{0, 21, 227}: "Dream Technologies Corporation", + [3]byte{0, 21, 228}: "Zimmer Elektromedizin", + [3]byte{0, 21, 229}: "Cheertek Inc.", + [3]byte{0, 21, 230}: "MOBILE TECHNIKA Inc.", + [3]byte{0, 21, 231}: "Quantec Tontechnik", + [3]byte{0, 21, 232}: "Nortel", + [3]byte{0, 21, 233}: "D-Link Corporation", + [3]byte{0, 21, 234}: "Tellumat (Pty) Ltd", + [3]byte{0, 21, 235}: "ZTE CORPORATION", + [3]byte{0, 21, 236}: "Boca Devices LLC", + [3]byte{0, 21, 237}: "Fulcrum Microsystems, Inc.", + [3]byte{0, 21, 238}: "Omnex Control Systems", + [3]byte{0, 21, 239}: "NEC TOKIN Corporation", + [3]byte{0, 21, 240}: "EGO BV", + [3]byte{0, 21, 241}: "KYLINK Communications Corp.", + [3]byte{0, 21, 242}: "ASUSTek COMPUTER INC.", + [3]byte{0, 21, 243}: "PELTOR AB", + [3]byte{0, 21, 244}: "Eventide", + [3]byte{0, 21, 245}: "Sustainable Energy Systems", + [3]byte{0, 21, 246}: "SCIENCE AND ENGINEERING SERVICES, INC.", + [3]byte{0, 21, 247}: "Wintecronics Ltd.", + [3]byte{0, 21, 248}: "Kingtronics Industrial Co. Ltd.", + [3]byte{0, 21, 249}: "CISCO SYSTEMS, INC.", + [3]byte{0, 21, 250}: "CISCO SYSTEMS, INC.", + [3]byte{0, 21, 251}: "setex schermuly textile computer gmbh", + [3]byte{0, 21, 252}: "Littelfuse Startco", + [3]byte{0, 21, 253}: "Complete Media Systems", + [3]byte{0, 21, 254}: "SCHILLING ROBOTICS LLC", + [3]byte{0, 21, 255}: "Novatel Wireless, Inc.", + [3]byte{0, 22, 0}: "CelleBrite Mobile Synchronization", + [3]byte{0, 22, 1}: "Buffalo Inc.", + [3]byte{0, 22, 2}: "CEYON TECHNOLOGY CO.,LTD.", + [3]byte{0, 22, 3}: "COOLKSKY Co., LTD", + [3]byte{0, 22, 4}: "Sigpro", + [3]byte{0, 22, 5}: "YORKVILLE SOUND INC.", + [3]byte{0, 22, 6}: "Ideal Industries", + [3]byte{0, 22, 7}: "Curves International Inc.", + [3]byte{0, 22, 8}: "Sequans Communications", + [3]byte{0, 22, 9}: "Unitech electronics co., ltd.", + [3]byte{0, 22, 10}: "SWEEX Europe BV", + [3]byte{0, 22, 11}: "TVWorks LLC", + [3]byte{0, 22, 12}: "LPL DEVELOPMENT S.A. DE C.V", + [3]byte{0, 22, 13}: "Be Here Corporation", + [3]byte{0, 22, 14}: "Optica Technologies Inc.", + [3]byte{0, 22, 15}: "BADGER METER INC", + [3]byte{0, 22, 16}: "Carina Technology", + [3]byte{0, 22, 17}: "Altecon Srl", + [3]byte{0, 22, 18}: "Otsuka Electronics Co., Ltd.", + [3]byte{0, 22, 19}: "LibreStream Technologies Inc.", + [3]byte{0, 22, 20}: "Picosecond Pulse Labs", + [3]byte{0, 22, 21}: "Nittan Company, Limited", + [3]byte{0, 22, 22}: "BROWAN COMMUNICATION INC.", + [3]byte{0, 22, 23}: "MSI", + [3]byte{0, 22, 24}: "HIVION Co., Ltd.", + [3]byte{0, 22, 25}: "Lancelan Technologies S.L.", + [3]byte{0, 22, 26}: "Dametric AB", + [3]byte{0, 22, 27}: "Micronet Corporation", + [3]byte{0, 22, 28}: "e:cue", + [3]byte{0, 22, 29}: "Innovative Wireless Technologies, Inc.", + [3]byte{0, 22, 30}: "Woojinnet", + [3]byte{0, 22, 31}: "SUNWAVETEC Co., Ltd.", + [3]byte{0, 22, 32}: "Sony Ericsson Mobile Communications AB", + [3]byte{0, 22, 33}: "Colorado Vnet", + [3]byte{0, 22, 34}: "BBH SYSTEMS GMBH", + [3]byte{0, 22, 35}: "Interval Media", + [3]byte{0, 22, 36}: "Teneros, Inc.", + [3]byte{0, 22, 37}: "Impinj, Inc.", + [3]byte{0, 22, 38}: "ARRIS Group, Inc.", + [3]byte{0, 22, 39}: "embedded-logic DESIGN AND MORE GmbH", + [3]byte{0, 22, 40}: "Ultra Electronics Manufacturing and Card Systems", + [3]byte{0, 22, 41}: "Nivus GmbH", + [3]byte{0, 22, 42}: "Antik computers & communications s.r.o.", + [3]byte{0, 22, 43}: "Togami Electric Mfg.co.,Ltd.", + [3]byte{0, 22, 44}: "Xanboo", + [3]byte{0, 22, 45}: "STNet Co., Ltd.", + [3]byte{0, 22, 46}: "Space Shuttle Hi-Tech Co., Ltd.", + [3]byte{0, 22, 47}: "Geutebrück GmbH", + [3]byte{0, 22, 48}: "Vativ Technologies", + [3]byte{0, 22, 49}: "Xteam", + [3]byte{0, 22, 50}: "SAMSUNG ELECTRONICS CO., LTD.", + [3]byte{0, 22, 51}: "Oxford Diagnostics Ltd.", + [3]byte{0, 22, 52}: "Mathtech, Inc.", + [3]byte{0, 22, 53}: "Hewlett-Packard Company", + [3]byte{0, 22, 54}: "Quanta Computer Inc.", + [3]byte{0, 22, 55}: "CITEL SpA", + [3]byte{0, 22, 56}: "TECOM Co., Ltd.", + [3]byte{0, 22, 57}: "UBIQUAM Co.,Ltd", + [3]byte{0, 22, 58}: "YVES TECHNOLOGY CO., LTD.", + [3]byte{0, 22, 59}: "VertexRSI/General Dynamics", + [3]byte{0, 22, 60}: "Rebox B.V.", + [3]byte{0, 22, 61}: "Tsinghua Tongfang Legend Silicon Tech. Co., Ltd.", + [3]byte{0, 22, 62}: "Xensource, Inc.", + [3]byte{0, 22, 63}: "CReTE SYSTEMS Inc.", + [3]byte{0, 22, 64}: "Asmobile Communication Inc.", + [3]byte{0, 22, 65}: "Universal Global Scientific Industrial Co., Ltd.", + [3]byte{0, 22, 66}: "Pangolin", + [3]byte{0, 22, 67}: "Sunhillo Corporation", + [3]byte{0, 22, 68}: "LITE-ON Technology Corp.", + [3]byte{0, 22, 69}: "Power Distribution, Inc.", + [3]byte{0, 22, 70}: "CISCO SYSTEMS, INC.", + [3]byte{0, 22, 71}: "CISCO SYSTEMS, INC.", + [3]byte{0, 22, 72}: "SSD Company Limited", + [3]byte{0, 22, 73}: "SetOne GmbH", + [3]byte{0, 22, 74}: "Vibration Technology Limited", + [3]byte{0, 22, 75}: "Quorion Data Systems GmbH", + [3]byte{0, 22, 76}: "PLANET INT Co., Ltd", + [3]byte{0, 22, 77}: "Alcatel North America IP Division", + [3]byte{0, 22, 78}: "Nokia Danmark A/S", + [3]byte{0, 22, 79}: "World Ethnic Broadcastin Inc.", + [3]byte{0, 22, 80}: "Herley General Microwave Israel.", + [3]byte{0, 22, 81}: "Exeo Systems", + [3]byte{0, 22, 82}: "Hoatech Technologies, Inc.", + [3]byte{0, 22, 83}: "LEGO System A/S IE Electronics Division", + [3]byte{0, 22, 84}: "Flex-P Industries Sdn. Bhd.", + [3]byte{0, 22, 85}: "FUHO TECHNOLOGY Co., LTD", + [3]byte{0, 22, 86}: "Nintendo Co., Ltd.", + [3]byte{0, 22, 87}: "Aegate Ltd", + [3]byte{0, 22, 88}: "Fusiontech Technologies Inc.", + [3]byte{0, 22, 89}: "Z.M.P. RADWAG", + [3]byte{0, 22, 90}: "Harman Specialty Group", + [3]byte{0, 22, 91}: "Grip Audio", + [3]byte{0, 22, 92}: "Trackflow Ltd", + [3]byte{0, 22, 93}: "AirDefense, Inc.", + [3]byte{0, 22, 94}: "Precision I/O", + [3]byte{0, 22, 95}: "Fairmount Automation", + [3]byte{0, 22, 96}: "Nortel", + [3]byte{0, 22, 97}: "Novatium Solutions (P) Ltd", + [3]byte{0, 22, 98}: "Liyuh Technology Ltd.", + [3]byte{0, 22, 99}: "KBT Mobile", + [3]byte{0, 22, 100}: "Prod-El SpA", + [3]byte{0, 22, 101}: "Cellon France", + [3]byte{0, 22, 102}: "Quantier Communication Inc.", + [3]byte{0, 22, 103}: "A-TEC Subsystem INC.", + [3]byte{0, 22, 104}: "Eishin Electronics", + [3]byte{0, 22, 105}: "MRV Communication (Networks) LTD", + [3]byte{0, 22, 106}: "TPS", + [3]byte{0, 22, 107}: "Samsung Electronics", + [3]byte{0, 22, 108}: "Samsung Electonics Digital Video System Division", + [3]byte{0, 22, 109}: "Yulong Computer Telecommunication Scientific(shenzhen)Co.,Lt", + [3]byte{0, 22, 110}: "Arbitron Inc.", + [3]byte{0, 22, 111}: "Intel Corporate", + [3]byte{0, 22, 112}: "SKNET Corporation", + [3]byte{0, 22, 113}: "Symphox Information Co.", + [3]byte{0, 22, 114}: "Zenway enterprise ltd", + [3]byte{0, 22, 115}: "Bury GmbH & Co. KG", + [3]byte{0, 22, 116}: "EuroCB (Phils.), Inc.", + [3]byte{0, 22, 117}: "ARRIS Group, Inc.", + [3]byte{0, 22, 118}: "Intel Corporate", + [3]byte{0, 22, 119}: "Bihl + Wiedemann GmbH", + [3]byte{0, 22, 120}: "SHENZHEN BAOAN GAOKE ELECTRONICS CO., LTD", + [3]byte{0, 22, 121}: "eOn Communications", + [3]byte{0, 22, 122}: "Skyworth Overseas Dvelopment Ltd.", + [3]byte{0, 22, 123}: "Haver&Boecker", + [3]byte{0, 22, 124}: "iRex Technologies BV", + [3]byte{0, 22, 125}: "Sky-Line Information Co., Ltd.", + [3]byte{0, 22, 126}: "DIBOSS.CO.,LTD", + [3]byte{0, 22, 127}: "Bluebird Soft Inc.", + [3]byte{0, 22, 128}: "Bally Gaming + Systems", + [3]byte{0, 22, 129}: "Vector Informatik GmbH", + [3]byte{0, 22, 130}: "Pro Dex, Inc", + [3]byte{0, 22, 131}: "WEBIO International Co.,.Ltd.", + [3]byte{0, 22, 132}: "Donjin Co.,Ltd.", + [3]byte{0, 22, 133}: "Elisa Oyj", + [3]byte{0, 22, 134}: "Karl Storz Imaging", + [3]byte{0, 22, 135}: "Chubb CSC-Vendor AP", + [3]byte{0, 22, 136}: "ServerEngines LLC", + [3]byte{0, 22, 137}: "Pilkor Electronics Co., Ltd", + [3]byte{0, 22, 138}: "id-Confirm Inc", + [3]byte{0, 22, 139}: "Paralan Corporation", + [3]byte{0, 22, 140}: "DSL Partner AS", + [3]byte{0, 22, 141}: "KORWIN CO., Ltd.", + [3]byte{0, 22, 142}: "Vimicro corporation", + [3]byte{0, 22, 143}: "GN Netcom as", + [3]byte{0, 22, 144}: "J-TEK INCORPORATION", + [3]byte{0, 22, 145}: "Moser-Baer AG", + [3]byte{0, 22, 146}: "Scientific-Atlanta, Inc.", + [3]byte{0, 22, 147}: "PowerLink Technology Inc.", + [3]byte{0, 22, 148}: "Sennheiser Communications A/S", + [3]byte{0, 22, 149}: "AVC Technology (International) Limited", + [3]byte{0, 22, 150}: "QDI Technology (H.K.) Limited", + [3]byte{0, 22, 151}: "NEC Corporation", + [3]byte{0, 22, 152}: "T&A Mobile Phones", + [3]byte{0, 22, 153}: "Tonic DVB Marketing Ltd", + [3]byte{0, 22, 154}: "Quadrics Ltd", + [3]byte{0, 22, 155}: "Alstom Transport", + [3]byte{0, 22, 156}: "CISCO SYSTEMS, INC.", + [3]byte{0, 22, 157}: "CISCO SYSTEMS, INC.", + [3]byte{0, 22, 158}: "TV One Ltd", + [3]byte{0, 22, 159}: "Vimtron Electronics Co., Ltd.", + [3]byte{0, 22, 160}: "Auto-Maskin", + [3]byte{0, 22, 161}: "3Leaf Networks", + [3]byte{0, 22, 162}: "CentraLite Systems, Inc.", + [3]byte{0, 22, 163}: "Ingeteam Transmission&Distribution, S.A.", + [3]byte{0, 22, 164}: "Ezurio Ltd", + [3]byte{0, 22, 165}: "Tandberg Storage ASA", + [3]byte{0, 22, 166}: "Dovado FZ-LLC", + [3]byte{0, 22, 167}: "AWETA G&P", + [3]byte{0, 22, 168}: "CWT CO., LTD.", + [3]byte{0, 22, 169}: "2EI", + [3]byte{0, 22, 170}: "Kei Communication Technology Inc.", + [3]byte{0, 22, 171}: "Dansensor A/S", + [3]byte{0, 22, 172}: "Toho Technology Corp.", + [3]byte{0, 22, 173}: "BT-Links Company Limited", + [3]byte{0, 22, 174}: "INVENTEL", + [3]byte{0, 22, 175}: "Shenzhen Union Networks Equipment Co.,Ltd.", + [3]byte{0, 22, 176}: "VK Corporation", + [3]byte{0, 22, 177}: "KBS", + [3]byte{0, 22, 178}: "DriveCam Inc", + [3]byte{0, 22, 179}: "Photonicbridges (China) Co., Ltd.", + [3]byte{0, 22, 180}: "PRIVATE", + [3]byte{0, 22, 181}: "ARRIS Group, Inc.", + [3]byte{0, 22, 182}: "Cisco-Linksys", + [3]byte{0, 22, 183}: "Seoul Commtech", + [3]byte{0, 22, 184}: "Sony Ericsson Mobile Communications", + [3]byte{0, 22, 185}: "ProCurve Networking", + [3]byte{0, 22, 186}: "WEATHERNEWS INC.", + [3]byte{0, 22, 187}: "Law-Chain Computer Technology Co Ltd", + [3]byte{0, 22, 188}: "Nokia Danmark A/S", + [3]byte{0, 22, 189}: "ATI Industrial Automation", + [3]byte{0, 22, 190}: "INFRANET, Inc.", + [3]byte{0, 22, 191}: "PaloDEx Group Oy", + [3]byte{0, 22, 192}: "Semtech Corporation", + [3]byte{0, 22, 193}: "Eleksen Ltd", + [3]byte{0, 22, 194}: "Avtec Systems Inc", + [3]byte{0, 22, 195}: "BA Systems Inc", + [3]byte{0, 22, 196}: "SiRF Technology, Inc.", + [3]byte{0, 22, 197}: "Shenzhen Xing Feng Industry Co.,Ltd", + [3]byte{0, 22, 198}: "North Atlantic Industries", + [3]byte{0, 22, 199}: "CISCO SYSTEMS, INC.", + [3]byte{0, 22, 200}: "CISCO SYSTEMS, INC.", + [3]byte{0, 22, 201}: "NAT Seattle, Inc.", + [3]byte{0, 22, 202}: "Nortel", + [3]byte{0, 22, 203}: "Apple", + [3]byte{0, 22, 204}: "Xcute Mobile Corp.", + [3]byte{0, 22, 205}: "HIJI HIGH-TECH CO., LTD.", + [3]byte{0, 22, 206}: "Hon Hai Precision Ind. Co., Ltd.", + [3]byte{0, 22, 207}: "Hon Hai Precision Ind. Co., Ltd.", + [3]byte{0, 22, 208}: "ATech elektronika d.o.o.", + [3]byte{0, 22, 209}: "ZAT a.s.", + [3]byte{0, 22, 210}: "Caspian", + [3]byte{0, 22, 211}: "Wistron Corporation", + [3]byte{0, 22, 212}: "Compal Communications, Inc.", + [3]byte{0, 22, 213}: "Synccom Co., Ltd", + [3]byte{0, 22, 214}: "TDA Tech Pty Ltd", + [3]byte{0, 22, 215}: "Sunways AG", + [3]byte{0, 22, 216}: "Senea AB", + [3]byte{0, 22, 217}: "NINGBO BIRD CO.,LTD.", + [3]byte{0, 22, 218}: "Futronic Technology Co. Ltd.", + [3]byte{0, 22, 219}: "Samsung Electronics Co., Ltd.", + [3]byte{0, 22, 220}: "ARCHOS", + [3]byte{0, 22, 221}: "Gigabeam Corporation", + [3]byte{0, 22, 222}: "FAST Inc", + [3]byte{0, 22, 223}: "Lundinova AB", + [3]byte{0, 22, 224}: "3Com Ltd", + [3]byte{0, 22, 225}: "SiliconStor, Inc.", + [3]byte{0, 22, 226}: "American Fibertek, Inc.", + [3]byte{0, 22, 227}: "ASKEY COMPUTER CORP.", + [3]byte{0, 22, 228}: "VANGUARD SECURITY ENGINEERING CORP.", + [3]byte{0, 22, 229}: "FORDLEY DEVELOPMENT LIMITED", + [3]byte{0, 22, 230}: "GIGA-BYTE TECHNOLOGY CO.,LTD.", + [3]byte{0, 22, 231}: "Dynamix Promotions Limited", + [3]byte{0, 22, 232}: "Sigma Designs, Inc.", + [3]byte{0, 22, 233}: "Tiba Medical Inc", + [3]byte{0, 22, 234}: "Intel Corporate", + [3]byte{0, 22, 235}: "Intel Corporate", + [3]byte{0, 22, 236}: "Elitegroup Computer Systems Co., Ltd.", + [3]byte{0, 22, 237}: "Digital Safety Technologies, Inc", + [3]byte{0, 22, 238}: "RoyalDigital Inc.", + [3]byte{0, 22, 239}: "Koko Fitness, Inc.", + [3]byte{0, 22, 240}: "Dell", + [3]byte{0, 22, 241}: "OmniSense, LLC", + [3]byte{0, 22, 242}: "Dmobile System Co., Ltd.", + [3]byte{0, 22, 243}: "CAST Information Co., Ltd", + [3]byte{0, 22, 244}: "Eidicom Co., Ltd.", + [3]byte{0, 22, 245}: "Dalian Golden Hualu Digital Technology Co.,Ltd", + [3]byte{0, 22, 246}: "Video Products Group", + [3]byte{0, 22, 247}: "L-3 Communications, Aviation Recorders", + [3]byte{0, 22, 248}: "AVIQTECH TECHNOLOGY CO., LTD.", + [3]byte{0, 22, 249}: "CETRTA POT, d.o.o., Kranj", + [3]byte{0, 22, 250}: "ECI Telecom Ltd.", + [3]byte{0, 22, 251}: "SHENZHEN MTC CO.,LTD.", + [3]byte{0, 22, 252}: "TOHKEN CO.,LTD.", + [3]byte{0, 22, 253}: "Jaty Electronics", + [3]byte{0, 22, 254}: "Alps Electric Co., Ltd", + [3]byte{0, 22, 255}: "Wamin Optocomm Mfg Corp", + [3]byte{0, 23, 0}: "ARRIS Group, Inc.", + [3]byte{0, 23, 1}: "KDE, Inc.", + [3]byte{0, 23, 2}: "Osung Midicom Co., Ltd", + [3]byte{0, 23, 3}: "MOSDAN Internation Co.,Ltd", + [3]byte{0, 23, 4}: "Shinco Electronics Group Co.,Ltd", + [3]byte{0, 23, 5}: "Methode Electronics", + [3]byte{0, 23, 6}: "Techfaith Wireless Communication Technology Limited.", + [3]byte{0, 23, 7}: "InGrid, Inc", + [3]byte{0, 23, 8}: "Hewlett-Packard Company", + [3]byte{0, 23, 9}: "Exalt Communications", + [3]byte{0, 23, 10}: "INEW DIGITAL COMPANY", + [3]byte{0, 23, 11}: "Contela, Inc.", + [3]byte{0, 23, 12}: "Twig Com Ltd.", + [3]byte{0, 23, 13}: "Dust Networks Inc.", + [3]byte{0, 23, 14}: "CISCO SYSTEMS, INC.", + [3]byte{0, 23, 15}: "CISCO SYSTEMS, INC.", + [3]byte{0, 23, 16}: "Casa Systems Inc.", + [3]byte{0, 23, 17}: "GE Healthcare Bio-Sciences AB", + [3]byte{0, 23, 18}: "ISCO International", + [3]byte{0, 23, 19}: "Tiger NetCom", + [3]byte{0, 23, 20}: "BR Controls Nederland bv", + [3]byte{0, 23, 21}: "Qstik", + [3]byte{0, 23, 22}: "Qno Technology Inc.", + [3]byte{0, 23, 23}: "Leica Geosystems AG", + [3]byte{0, 23, 24}: "Vansco Electronics Oy", + [3]byte{0, 23, 25}: "AudioCodes USA, Inc", + [3]byte{0, 23, 26}: "Winegard Company", + [3]byte{0, 23, 27}: "Innovation Lab Corp.", + [3]byte{0, 23, 28}: "NT MicroSystems, Inc.", + [3]byte{0, 23, 29}: "DIGIT", + [3]byte{0, 23, 30}: "Theo Benning GmbH & Co. KG", + [3]byte{0, 23, 31}: "IMV Corporation", + [3]byte{0, 23, 32}: "Image Sensing Systems, Inc.", + [3]byte{0, 23, 33}: "FITRE S.p.A.", + [3]byte{0, 23, 34}: "Hanazeder Electronic GmbH", + [3]byte{0, 23, 35}: "Summit Data Communications", + [3]byte{0, 23, 36}: "Studer Professional Audio GmbH", + [3]byte{0, 23, 37}: "Liquid Computing", + [3]byte{0, 23, 38}: "m2c Electronic Technology Ltd.", + [3]byte{0, 23, 39}: "Thermo Ramsey Italia s.r.l.", + [3]byte{0, 23, 40}: "Selex Communications", + [3]byte{0, 23, 41}: "Ubicod Co.LTD", + [3]byte{0, 23, 42}: "Proware Technology Corp.(By Unifosa)", + [3]byte{0, 23, 43}: "Global Technologies Inc.", + [3]byte{0, 23, 44}: "TAEJIN INFOTECH", + [3]byte{0, 23, 45}: "Axcen Photonics Corporation", + [3]byte{0, 23, 46}: "FXC Inc.", + [3]byte{0, 23, 47}: "NeuLion Incorporated", + [3]byte{0, 23, 48}: "Automation Electronics", + [3]byte{0, 23, 49}: "ASUSTek COMPUTER INC.", + [3]byte{0, 23, 50}: "Science-Technical Center \"RISSA\"", + [3]byte{0, 23, 51}: "SFR", + [3]byte{0, 23, 52}: "ADC Telecommunications", + [3]byte{0, 23, 53}: "PRIVATE", + [3]byte{0, 23, 54}: "iiTron Inc.", + [3]byte{0, 23, 55}: "Industrie Dial Face S.p.A.", + [3]byte{0, 23, 56}: "International Business Machines", + [3]byte{0, 23, 57}: "Bright Headphone Electronics Company", + [3]byte{0, 23, 58}: "Reach Systems Inc.", + [3]byte{0, 23, 59}: "Cisco Systems, Inc.", + [3]byte{0, 23, 60}: "Extreme Engineering Solutions", + [3]byte{0, 23, 61}: "Neology", + [3]byte{0, 23, 62}: "LeucotronEquipamentos Ltda.", + [3]byte{0, 23, 63}: "Belkin Corporation", + [3]byte{0, 23, 64}: "Bluberi Gaming Technologies Inc", + [3]byte{0, 23, 65}: "DEFIDEV", + [3]byte{0, 23, 66}: "FUJITSU LIMITED", + [3]byte{0, 23, 67}: "Deck Srl", + [3]byte{0, 23, 68}: "Araneo Ltd.", + [3]byte{0, 23, 69}: "INNOTZ CO., Ltd", + [3]byte{0, 23, 70}: "Freedom9 Inc.", + [3]byte{0, 23, 71}: "Trimble", + [3]byte{0, 23, 72}: "Neokoros Brasil Ltda", + [3]byte{0, 23, 73}: "HYUNDAE YONG-O-SA CO.,LTD", + [3]byte{0, 23, 74}: "SOCOMEC", + [3]byte{0, 23, 75}: "Nokia Danmark A/S", + [3]byte{0, 23, 76}: "Millipore", + [3]byte{0, 23, 77}: "DYNAMIC NETWORK FACTORY, INC.", + [3]byte{0, 23, 78}: "Parama-tech Co.,Ltd.", + [3]byte{0, 23, 79}: "iCatch Inc.", + [3]byte{0, 23, 80}: "GSI Group, MicroE Systems", + [3]byte{0, 23, 81}: "Online Corporation", + [3]byte{0, 23, 82}: "DAGS, Inc", + [3]byte{0, 23, 83}: "nFore Technology Inc.", + [3]byte{0, 23, 84}: "Arkino HiTOP Corporation Limited", + [3]byte{0, 23, 85}: "GE Security", + [3]byte{0, 23, 86}: "Vinci Labs Oy", + [3]byte{0, 23, 87}: "RIX TECHNOLOGY LIMITED", + [3]byte{0, 23, 88}: "ThruVision Ltd", + [3]byte{0, 23, 89}: "CISCO SYSTEMS, INC.", + [3]byte{0, 23, 90}: "CISCO SYSTEMS, INC.", + [3]byte{0, 23, 91}: "ACS Solutions Switzerland Ltd.", + [3]byte{0, 23, 92}: "SHARP CORPORATION", + [3]byte{0, 23, 93}: "Dongseo system.", + [3]byte{0, 23, 94}: "Zed-3", + [3]byte{0, 23, 95}: "XENOLINK Communications Co., Ltd.", + [3]byte{0, 23, 96}: "Naito Densei Machida MFG.CO.,LTD", + [3]byte{0, 23, 97}: "PRIVATE", + [3]byte{0, 23, 98}: "Solar Technology, Inc.", + [3]byte{0, 23, 99}: "Essentia S.p.A.", + [3]byte{0, 23, 100}: "ATMedia GmbH", + [3]byte{0, 23, 101}: "Nortel", + [3]byte{0, 23, 102}: "Accense Technology, Inc.", + [3]byte{0, 23, 103}: "Earforce AS", + [3]byte{0, 23, 104}: "Zinwave Ltd", + [3]byte{0, 23, 105}: "Cymphonix Corp", + [3]byte{0, 23, 106}: "Avago Technologies", + [3]byte{0, 23, 107}: "Kiyon, Inc.", + [3]byte{0, 23, 108}: "Pivot3, Inc.", + [3]byte{0, 23, 109}: "CORE CORPORATION", + [3]byte{0, 23, 110}: "DUCATI SISTEMI", + [3]byte{0, 23, 111}: "PAX Computer Technology(Shenzhen) Ltd.", + [3]byte{0, 23, 112}: "Arti Industrial Electronics Ltd.", + [3]byte{0, 23, 113}: "APD Communications Ltd", + [3]byte{0, 23, 114}: "ASTRO Strobel Kommunikationssysteme GmbH", + [3]byte{0, 23, 115}: "Laketune Technologies Co. Ltd", + [3]byte{0, 23, 116}: "Elesta GmbH", + [3]byte{0, 23, 117}: "TTE Germany GmbH", + [3]byte{0, 23, 118}: "Meso Scale Diagnostics, LLC", + [3]byte{0, 23, 119}: "Obsidian Research Corporation", + [3]byte{0, 23, 120}: "Central Music Co.", + [3]byte{0, 23, 121}: "QuickTel", + [3]byte{0, 23, 122}: "ASSA ABLOY AB", + [3]byte{0, 23, 123}: "Azalea Networks inc", + [3]byte{0, 23, 124}: "Smartlink Network Systems Limited", + [3]byte{0, 23, 125}: "IDT International Limited", + [3]byte{0, 23, 126}: "Meshcom Technologies Inc.", + [3]byte{0, 23, 127}: "Worldsmart Retech", + [3]byte{0, 23, 128}: "Applied Biosystems B.V.", + [3]byte{0, 23, 129}: "Greystone Data System, Inc.", + [3]byte{0, 23, 130}: "LoBenn Inc.", + [3]byte{0, 23, 131}: "Texas Instruments", + [3]byte{0, 23, 132}: "ARRIS Group, Inc.", + [3]byte{0, 23, 133}: "Sparr Electronics Ltd", + [3]byte{0, 23, 134}: "wisembed", + [3]byte{0, 23, 135}: "Brother, Brother & Sons ApS", + [3]byte{0, 23, 136}: "Philips Lighting BV", + [3]byte{0, 23, 137}: "Zenitron Corporation", + [3]byte{0, 23, 138}: "DARTS TECHNOLOGIES CORP.", + [3]byte{0, 23, 139}: "Teledyne Technologies Incorporated", + [3]byte{0, 23, 140}: "Independent Witness, Inc", + [3]byte{0, 23, 141}: "Checkpoint Systems, Inc.", + [3]byte{0, 23, 142}: "Gunnebo Cash Automation AB", + [3]byte{0, 23, 143}: "NINGBO YIDONG ELECTRONIC CO.,LTD.", + [3]byte{0, 23, 144}: "HYUNDAI DIGITECH Co, Ltd.", + [3]byte{0, 23, 145}: "LinTech GmbH", + [3]byte{0, 23, 146}: "Falcom Wireless Comunications Gmbh", + [3]byte{0, 23, 147}: "Tigi Corporation", + [3]byte{0, 23, 148}: "CISCO SYSTEMS, INC.", + [3]byte{0, 23, 149}: "CISCO SYSTEMS, INC.", + [3]byte{0, 23, 150}: "Rittmeyer AG", + [3]byte{0, 23, 151}: "Telsy Elettronica S.p.A.", + [3]byte{0, 23, 152}: "Azonic Technology Co., LTD", + [3]byte{0, 23, 153}: "SmarTire Systems Inc.", + [3]byte{0, 23, 154}: "D-Link Corporation", + [3]byte{0, 23, 155}: "Chant Sincere CO., LTD.", + [3]byte{0, 23, 156}: "DEPRAG SCHULZ GMBH u. CO.", + [3]byte{0, 23, 157}: "Kelman Limited", + [3]byte{0, 23, 158}: "Sirit Inc", + [3]byte{0, 23, 159}: "Apricorn", + [3]byte{0, 23, 160}: "RoboTech srl", + [3]byte{0, 23, 161}: "3soft inc.", + [3]byte{0, 23, 162}: "Camrivox Ltd.", + [3]byte{0, 23, 163}: "MIX s.r.l.", + [3]byte{0, 23, 164}: "Hewlett-Packard Company", + [3]byte{0, 23, 165}: "Ralink Technology Corp", + [3]byte{0, 23, 166}: "YOSIN ELECTRONICS CO., LTD.", + [3]byte{0, 23, 167}: "Mobile Computing Promotion Consortium", + [3]byte{0, 23, 168}: "EDM Corporation", + [3]byte{0, 23, 169}: "Sentivision", + [3]byte{0, 23, 170}: "elab-experience inc.", + [3]byte{0, 23, 171}: "Nintendo Co., Ltd.", + [3]byte{0, 23, 172}: "O'Neil Product Development Inc.", + [3]byte{0, 23, 173}: "AceNet Corporation", + [3]byte{0, 23, 174}: "GAI-Tronics", + [3]byte{0, 23, 175}: "Enermet", + [3]byte{0, 23, 176}: "Nokia Danmark A/S", + [3]byte{0, 23, 177}: "ACIST Medical Systems, Inc.", + [3]byte{0, 23, 178}: "SK Telesys", + [3]byte{0, 23, 179}: "Aftek Infosys Limited", + [3]byte{0, 23, 180}: "Remote Security Systems, LLC", + [3]byte{0, 23, 181}: "Peerless Systems Corporation", + [3]byte{0, 23, 182}: "Aquantia", + [3]byte{0, 23, 183}: "Tonze Technology Co.", + [3]byte{0, 23, 184}: "NOVATRON CO., LTD.", + [3]byte{0, 23, 185}: "Gambro Lundia AB", + [3]byte{0, 23, 186}: "SEDO CO., LTD.", + [3]byte{0, 23, 187}: "Syrinx Industrial Electronics", + [3]byte{0, 23, 188}: "Touchtunes Music Corporation", + [3]byte{0, 23, 189}: "Tibetsystem", + [3]byte{0, 23, 190}: "Tratec Telecom B.V.", + [3]byte{0, 23, 191}: "Coherent Research Limited", + [3]byte{0, 23, 192}: "PureTech Systems, Inc.", + [3]byte{0, 23, 193}: "CM Precision Technology LTD.", + [3]byte{0, 23, 194}: "ADB Broadband Italia", + [3]byte{0, 23, 195}: "KTF Technologies Inc.", + [3]byte{0, 23, 196}: "Quanta Microsystems, INC.", + [3]byte{0, 23, 197}: "SonicWALL", + [3]byte{0, 23, 198}: "Cross Match Technologies Inc", + [3]byte{0, 23, 199}: "MARA Systems Consulting AB", + [3]byte{0, 23, 200}: "KYOCERA Document Solutions Inc.", + [3]byte{0, 23, 201}: "Samsung Electronics Co., Ltd.", + [3]byte{0, 23, 202}: "Qisda Corporation", + [3]byte{0, 23, 203}: "Juniper Networks", + [3]byte{0, 23, 204}: "Alcatel-Lucent", + [3]byte{0, 23, 205}: "CEC Wireless R&D Ltd.", + [3]byte{0, 23, 206}: "Screen Service Spa", + [3]byte{0, 23, 207}: "iMCA-GmbH", + [3]byte{0, 23, 208}: "Opticom Communications, LLC", + [3]byte{0, 23, 209}: "Nortel", + [3]byte{0, 23, 210}: "THINLINX PTY LTD", + [3]byte{0, 23, 211}: "Etymotic Research, Inc.", + [3]byte{0, 23, 212}: "Monsoon Multimedia, Inc", + [3]byte{0, 23, 213}: "Samsung Electronics Co., Ltd.", + [3]byte{0, 23, 214}: "Bluechips Microhouse Co.,Ltd.", + [3]byte{0, 23, 215}: "ION Geophysical Corporation Inc.", + [3]byte{0, 23, 216}: "Magnum Semiconductor, Inc.", + [3]byte{0, 23, 217}: "AAI Corporation", + [3]byte{0, 23, 218}: "Spans Logic", + [3]byte{0, 23, 219}: "CANKO TECHNOLOGIES INC.", + [3]byte{0, 23, 220}: "DAEMYUNG ZERO1", + [3]byte{0, 23, 221}: "Clipsal Australia", + [3]byte{0, 23, 222}: "Advantage Six Ltd", + [3]byte{0, 23, 223}: "CISCO SYSTEMS, INC.", + [3]byte{0, 23, 224}: "CISCO SYSTEMS, INC.", + [3]byte{0, 23, 225}: "DACOS Technologies Co., Ltd.", + [3]byte{0, 23, 226}: "ARRIS Group, Inc.", + [3]byte{0, 23, 227}: "Texas Instruments", + [3]byte{0, 23, 228}: "Texas Instruments", + [3]byte{0, 23, 229}: "Texas Instruments", + [3]byte{0, 23, 230}: "Texas Instruments", + [3]byte{0, 23, 231}: "Texas Instruments", + [3]byte{0, 23, 232}: "Texas Instruments", + [3]byte{0, 23, 233}: "Texas Instruments", + [3]byte{0, 23, 234}: "Texas Instruments", + [3]byte{0, 23, 235}: "Texas Instruments", + [3]byte{0, 23, 236}: "Texas Instruments", + [3]byte{0, 23, 237}: "WooJooIT Ltd.", + [3]byte{0, 23, 238}: "ARRIS Group, Inc.", + [3]byte{0, 23, 239}: "IBM Corp", + [3]byte{0, 23, 240}: "SZCOM Broadband Network Technology Co.,Ltd", + [3]byte{0, 23, 241}: "Renu Electronics Pvt Ltd", + [3]byte{0, 23, 242}: "Apple", + [3]byte{0, 23, 243}: "Harris Corparation", + [3]byte{0, 23, 244}: "ZERON ALLIANCE", + [3]byte{0, 23, 245}: "LIG NEOPTEK", + [3]byte{0, 23, 246}: "Pyramid Meriden Inc.", + [3]byte{0, 23, 247}: "CEM Solutions Pvt Ltd", + [3]byte{0, 23, 248}: "Motech Industries Inc.", + [3]byte{0, 23, 249}: "Forcom Sp. z o.o.", + [3]byte{0, 23, 250}: "Microsoft Corporation", + [3]byte{0, 23, 251}: "FA", + [3]byte{0, 23, 252}: "Suprema Inc.", + [3]byte{0, 23, 253}: "Amulet Hotkey", + [3]byte{0, 23, 254}: "TALOS SYSTEM INC.", + [3]byte{0, 23, 255}: "PLAYLINE Co.,Ltd.", + [3]byte{0, 24, 0}: "UNIGRAND LTD", + [3]byte{0, 24, 1}: "Actiontec Electronics, Inc", + [3]byte{0, 24, 2}: "Alpha Networks Inc.", + [3]byte{0, 24, 3}: "ArcSoft Shanghai Co. LTD", + [3]byte{0, 24, 4}: "E-TEK DIGITAL TECHNOLOGY LIMITED", + [3]byte{0, 24, 5}: "Beijing InHand Networking Technology Co.,Ltd.", + [3]byte{0, 24, 6}: "Hokkei Industries Co., Ltd.", + [3]byte{0, 24, 7}: "Fanstel Corp.", + [3]byte{0, 24, 8}: "SightLogix, Inc.", + [3]byte{0, 24, 9}: "CRESYN", + [3]byte{0, 24, 10}: "Meraki, Inc.", + [3]byte{0, 24, 11}: "Brilliant Telecommunications", + [3]byte{0, 24, 12}: "Optelian Access Networks", + [3]byte{0, 24, 13}: "Terabytes Server Storage Tech Corp", + [3]byte{0, 24, 14}: "Avega Systems", + [3]byte{0, 24, 15}: "Nokia Danmark A/S", + [3]byte{0, 24, 16}: "IPTrade S.A.", + [3]byte{0, 24, 17}: "Neuros Technology International, LLC.", + [3]byte{0, 24, 18}: "Beijing Xinwei Telecom Technology Co., Ltd.", + [3]byte{0, 24, 19}: "Sony Ericsson Mobile Communications", + [3]byte{0, 24, 20}: "Mitutoyo Corporation", + [3]byte{0, 24, 21}: "GZ Technologies, Inc.", + [3]byte{0, 24, 22}: "Ubixon Co., Ltd.", + [3]byte{0, 24, 23}: "D. E. Shaw Research, LLC", + [3]byte{0, 24, 24}: "CISCO SYSTEMS, INC.", + [3]byte{0, 24, 25}: "CISCO SYSTEMS, INC.", + [3]byte{0, 24, 26}: "AVerMedia Information Inc.", + [3]byte{0, 24, 27}: "TaiJin Metal Co., Ltd.", + [3]byte{0, 24, 28}: "Exterity Limited", + [3]byte{0, 24, 29}: "ASIA ELECTRONICS CO.,LTD", + [3]byte{0, 24, 30}: "GDX Technologies Ltd.", + [3]byte{0, 24, 31}: "Palmmicro Communications", + [3]byte{0, 24, 32}: "w5networks", + [3]byte{0, 24, 33}: "SINDORICOH", + [3]byte{0, 24, 34}: "CEC TELECOM CO.,LTD.", + [3]byte{0, 24, 35}: "Delta Electronics, Inc.", + [3]byte{0, 24, 36}: "Kimaldi Electronics, S.L.", + [3]byte{0, 24, 37}: "PRIVATE", + [3]byte{0, 24, 38}: "Cale Access AB", + [3]byte{0, 24, 39}: "NEC UNIFIED SOLUTIONS NEDERLAND B.V.", + [3]byte{0, 24, 40}: "e2v technologies (UK) ltd.", + [3]byte{0, 24, 41}: "Gatsometer", + [3]byte{0, 24, 42}: "Taiwan Video & Monitor", + [3]byte{0, 24, 43}: "Softier", + [3]byte{0, 24, 44}: "Ascend Networks, Inc.", + [3]byte{0, 24, 45}: "Artec Design", + [3]byte{0, 24, 46}: "XStreamHD, LLC", + [3]byte{0, 24, 47}: "Texas Instruments", + [3]byte{0, 24, 48}: "Texas Instruments", + [3]byte{0, 24, 49}: "Texas Instruments", + [3]byte{0, 24, 50}: "Texas Instruments", + [3]byte{0, 24, 51}: "Texas Instruments", + [3]byte{0, 24, 52}: "Texas Instruments", + [3]byte{0, 24, 53}: "Thoratec / ITC", + [3]byte{0, 24, 54}: "Reliance Electric Limited", + [3]byte{0, 24, 55}: "Universal ABIT Co., Ltd.", + [3]byte{0, 24, 56}: "PanAccess Communications,Inc.", + [3]byte{0, 24, 57}: "Cisco-Linksys LLC", + [3]byte{0, 24, 58}: "Westell Technologies", + [3]byte{0, 24, 59}: "CENITS Co., Ltd.", + [3]byte{0, 24, 60}: "Encore Software Limited", + [3]byte{0, 24, 61}: "Vertex Link Corporation", + [3]byte{0, 24, 62}: "Digilent, Inc", + [3]byte{0, 24, 63}: "2Wire, Inc", + [3]byte{0, 24, 64}: "3 Phoenix, Inc.", + [3]byte{0, 24, 65}: "High Tech Computer Corp", + [3]byte{0, 24, 66}: "Nokia Danmark A/S", + [3]byte{0, 24, 67}: "Dawevision Ltd", + [3]byte{0, 24, 68}: "Heads Up Technologies, Inc.", + [3]byte{0, 24, 69}: "Pulsar-Telecom LLC.", + [3]byte{0, 24, 70}: "Crypto S.A.", + [3]byte{0, 24, 71}: "AceNet Technology Inc.", + [3]byte{0, 24, 72}: "Vecima Networks Inc.", + [3]byte{0, 24, 73}: "Pigeon Point Systems LLC", + [3]byte{0, 24, 74}: "Catcher, Inc.", + [3]byte{0, 24, 75}: "Las Vegas Gaming, Inc.", + [3]byte{0, 24, 76}: "Bogen Communications", + [3]byte{0, 24, 77}: "Netgear Inc.", + [3]byte{0, 24, 78}: "Lianhe Technologies, Inc.", + [3]byte{0, 24, 79}: "8 Ways Technology Corp.", + [3]byte{0, 24, 80}: "Secfone Kft", + [3]byte{0, 24, 81}: "SWsoft", + [3]byte{0, 24, 82}: "StorLink Semiconductors, Inc.", + [3]byte{0, 24, 83}: "Atera Networks LTD.", + [3]byte{0, 24, 84}: "Argard Co., Ltd", + [3]byte{0, 24, 85}: "Aeromaritime Systembau GmbH", + [3]byte{0, 24, 86}: "EyeFi, Inc", + [3]byte{0, 24, 87}: "Unilever R&D", + [3]byte{0, 24, 88}: "TagMaster AB", + [3]byte{0, 24, 89}: "Strawberry Linux Co.,Ltd.", + [3]byte{0, 24, 90}: "uControl, Inc.", + [3]byte{0, 24, 91}: "Network Chemistry, Inc", + [3]byte{0, 24, 92}: "EDS Lab Pte Ltd", + [3]byte{0, 24, 93}: "TAIGUEN TECHNOLOGY (SHEN-ZHEN) CO., LTD.", + [3]byte{0, 24, 94}: "Nexterm Inc.", + [3]byte{0, 24, 95}: "TAC Inc.", + [3]byte{0, 24, 96}: "SIM Technology Group Shanghai Simcom Ltd.,", + [3]byte{0, 24, 97}: "Ooma, Inc.", + [3]byte{0, 24, 98}: "Seagate Technology", + [3]byte{0, 24, 99}: "Veritech Electronics Limited", + [3]byte{0, 24, 100}: "Eaton Corporation", + [3]byte{0, 24, 101}: "Siemens Healthcare Diagnostics Manufacturing Ltd", + [3]byte{0, 24, 102}: "Leutron Vision", + [3]byte{0, 24, 103}: "Datalogic ADC", + [3]byte{0, 24, 104}: "Scientific Atlanta, A Cisco Company", + [3]byte{0, 24, 105}: "KINGJIM", + [3]byte{0, 24, 106}: "Global Link Digital Technology Co,.LTD", + [3]byte{0, 24, 107}: "Sambu Communics CO., LTD.", + [3]byte{0, 24, 108}: "Neonode AB", + [3]byte{0, 24, 109}: "Zhenjiang Sapphire Electronic Industry CO.", + [3]byte{0, 24, 110}: "3Com Ltd", + [3]byte{0, 24, 111}: "Setha Industria Eletronica LTDA", + [3]byte{0, 24, 112}: "E28 Shanghai Limited", + [3]byte{0, 24, 113}: "Hewlett-Packard Company", + [3]byte{0, 24, 114}: "Expertise Engineering", + [3]byte{0, 24, 115}: "CISCO SYSTEMS, INC.", + [3]byte{0, 24, 116}: "CISCO SYSTEMS, INC.", + [3]byte{0, 24, 117}: "AnaCise Testnology Pte Ltd", + [3]byte{0, 24, 118}: "WowWee Ltd.", + [3]byte{0, 24, 119}: "Amplex A/S", + [3]byte{0, 24, 120}: "Mackware GmbH", + [3]byte{0, 24, 121}: "dSys", + [3]byte{0, 24, 122}: "Wiremold", + [3]byte{0, 24, 123}: "4NSYS Co. Ltd.", + [3]byte{0, 24, 124}: "INTERCROSS, LLC", + [3]byte{0, 24, 125}: "Armorlink shanghai Co. Ltd", + [3]byte{0, 24, 126}: "RGB Spectrum", + [3]byte{0, 24, 127}: "ZODIANET", + [3]byte{0, 24, 128}: "Maxim Integrated Products", + [3]byte{0, 24, 129}: "Buyang Electronics Industrial Co., Ltd", + [3]byte{0, 24, 130}: "Huawei Technologies Co., Ltd.", + [3]byte{0, 24, 131}: "FORMOSA21 INC.", + [3]byte{0, 24, 132}: "Fon Technology S.L.", + [3]byte{0, 24, 133}: "Avigilon Corporation", + [3]byte{0, 24, 134}: "EL-TECH, INC.", + [3]byte{0, 24, 135}: "Metasystem SpA", + [3]byte{0, 24, 136}: "GOTIVE a.s.", + [3]byte{0, 24, 137}: "WinNet Solutions Limited", + [3]byte{0, 24, 138}: "Infinova LLC", + [3]byte{0, 24, 139}: "Dell Inc", + [3]byte{0, 24, 140}: "Mobile Action Technology Inc.", + [3]byte{0, 24, 141}: "Nokia Danmark A/S", + [3]byte{0, 24, 142}: "Ekahau, Inc.", + [3]byte{0, 24, 143}: "Montgomery Technology, Inc.", + [3]byte{0, 24, 144}: "RadioCOM, s.r.o.", + [3]byte{0, 24, 145}: "Zhongshan General K-mate Electronics Co., Ltd", + [3]byte{0, 24, 146}: "ads-tec GmbH", + [3]byte{0, 24, 147}: "SHENZHEN PHOTON BROADBAND TECHNOLOGY CO.,LTD", + [3]byte{0, 24, 148}: "NPCore, Inc.", + [3]byte{0, 24, 149}: "Hansun Technologies Inc.", + [3]byte{0, 24, 150}: "Great Well Electronic LTD", + [3]byte{0, 24, 151}: "JESS-LINK PRODUCTS Co., LTD", + [3]byte{0, 24, 152}: "KINGSTATE ELECTRONICS CORPORATION", + [3]byte{0, 24, 153}: "ShenZhen jieshun Science&Technology Industry CO,LTD.", + [3]byte{0, 24, 154}: "HANA Micron Inc.", + [3]byte{0, 24, 155}: "Thomson Inc.", + [3]byte{0, 24, 156}: "Weldex Corporation", + [3]byte{0, 24, 157}: "Navcast Inc.", + [3]byte{0, 24, 158}: "OMNIKEY GmbH.", + [3]byte{0, 24, 159}: "Lenntek Corporation", + [3]byte{0, 24, 160}: "Cierma Ascenseurs", + [3]byte{0, 24, 161}: "Tiqit Computers, Inc.", + [3]byte{0, 24, 162}: "XIP Technology AB", + [3]byte{0, 24, 163}: "ZIPPY TECHNOLOGY CORP.", + [3]byte{0, 24, 164}: "ARRIS Group, Inc.", + [3]byte{0, 24, 165}: "ADigit Technologies Corp.", + [3]byte{0, 24, 166}: "Persistent Systems, LLC", + [3]byte{0, 24, 167}: "Yoggie Security Systems LTD.", + [3]byte{0, 24, 168}: "AnNeal Technology Inc.", + [3]byte{0, 24, 169}: "Ethernet Direct Corporation", + [3]byte{0, 24, 170}: "Protec Fire Detection plc", + [3]byte{0, 24, 171}: "BEIJING LHWT MICROELECTRONICS INC.", + [3]byte{0, 24, 172}: "Shanghai Jiao Da HISYS Technology Co. Ltd.", + [3]byte{0, 24, 173}: "NIDEC SANKYO CORPORATION", + [3]byte{0, 24, 174}: "TVT CO.,LTD", + [3]byte{0, 24, 175}: "Samsung Electronics Co., Ltd.", + [3]byte{0, 24, 176}: "Nortel", + [3]byte{0, 24, 177}: "IBM Corp", + [3]byte{0, 24, 178}: "ADEUNIS RF", + [3]byte{0, 24, 179}: "TEC WizHome Co., Ltd.", + [3]byte{0, 24, 180}: "Dawon Media Inc.", + [3]byte{0, 24, 181}: "Magna Carta", + [3]byte{0, 24, 182}: "S3C, Inc.", + [3]byte{0, 24, 183}: "D3 LED, LLC", + [3]byte{0, 24, 184}: "New Voice International AG", + [3]byte{0, 24, 185}: "CISCO SYSTEMS, INC.", + [3]byte{0, 24, 186}: "CISCO SYSTEMS, INC.", + [3]byte{0, 24, 187}: "Eliwell Controls srl", + [3]byte{0, 24, 188}: "ZAO NVP Bolid", + [3]byte{0, 24, 189}: "SHENZHEN DVBWORLD TECHNOLOGY CO., LTD.", + [3]byte{0, 24, 190}: "ANSA Corporation", + [3]byte{0, 24, 191}: "Essence Technology Solution, Inc.", + [3]byte{0, 24, 192}: "ARRIS Group, Inc.", + [3]byte{0, 24, 193}: "Almitec Informática e Comércio", + [3]byte{0, 24, 194}: "Firetide, Inc", + [3]byte{0, 24, 195}: "CS Corporation", + [3]byte{0, 24, 196}: "Raba Technologies LLC", + [3]byte{0, 24, 197}: "Nokia Danmark A/S", + [3]byte{0, 24, 198}: "OPW Fuel Management Systems", + [3]byte{0, 24, 199}: "Real Time Automation", + [3]byte{0, 24, 200}: "ISONAS Inc.", + [3]byte{0, 24, 201}: "EOps Technology Limited", + [3]byte{0, 24, 202}: "Viprinet GmbH", + [3]byte{0, 24, 203}: "Tecobest Technology Limited", + [3]byte{0, 24, 204}: "AXIOHM SAS", + [3]byte{0, 24, 205}: "Erae Electronics Industry Co., Ltd", + [3]byte{0, 24, 206}: "Dreamtech Co., Ltd", + [3]byte{0, 24, 207}: "Baldor Electric Company", + [3]byte{0, 24, 208}: "AtRoad, A Trimble Company", + [3]byte{0, 24, 209}: "Siemens Home & Office Comm. Devices", + [3]byte{0, 24, 210}: "High-Gain Antennas LLC", + [3]byte{0, 24, 211}: "TEAMCAST", + [3]byte{0, 24, 212}: "Unified Display Interface SIG", + [3]byte{0, 24, 213}: "REIGNCOM", + [3]byte{0, 24, 214}: "Swirlnet A/S", + [3]byte{0, 24, 215}: "Javad Navigation Systems Inc.", + [3]byte{0, 24, 216}: "ARCH METER Corporation", + [3]byte{0, 24, 217}: "Santosha Internatonal, Inc", + [3]byte{0, 24, 218}: "AMBER wireless GmbH", + [3]byte{0, 24, 219}: "EPL Technology Ltd", + [3]byte{0, 24, 220}: "Prostar Co., Ltd.", + [3]byte{0, 24, 221}: "Silicondust Engineering Ltd", + [3]byte{0, 24, 222}: "Intel Corporate", + [3]byte{0, 24, 223}: "The Morey Corporation", + [3]byte{0, 24, 224}: "ANAVEO", + [3]byte{0, 24, 225}: "Verkerk Service Systemen", + [3]byte{0, 24, 226}: "Topdata Sistemas de Automacao Ltda", + [3]byte{0, 24, 227}: "Visualgate Systems, Inc.", + [3]byte{0, 24, 228}: "YIGUANG", + [3]byte{0, 24, 229}: "Adhoco AG", + [3]byte{0, 24, 230}: "Computer Hardware Design SIA", + [3]byte{0, 24, 231}: "Cameo Communications, INC.", + [3]byte{0, 24, 232}: "Hacetron Corporation", + [3]byte{0, 24, 233}: "Numata Corporation", + [3]byte{0, 24, 234}: "Alltec GmbH", + [3]byte{0, 24, 235}: "BroVis Wireless Networks", + [3]byte{0, 24, 236}: "Welding Technology Corporation", + [3]byte{0, 24, 237}: "Accutech Ultrasystems Co., Ltd.", + [3]byte{0, 24, 238}: "Videology Imaging Solutions, Inc.", + [3]byte{0, 24, 239}: "Escape Communications, Inc.", + [3]byte{0, 24, 240}: "JOYTOTO Co., Ltd.", + [3]byte{0, 24, 241}: "Chunichi Denshi Co.,LTD.", + [3]byte{0, 24, 242}: "Beijing Tianyu Communication Equipment Co., Ltd", + [3]byte{0, 24, 243}: "ASUSTek COMPUTER INC.", + [3]byte{0, 24, 244}: "EO TECHNICS Co., Ltd.", + [3]byte{0, 24, 245}: "Shenzhen Streaming Video Technology Company Limited", + [3]byte{0, 24, 246}: "Thomson Telecom Belgium", + [3]byte{0, 24, 247}: "Kameleon Technologies", + [3]byte{0, 24, 248}: "Cisco-Linksys LLC", + [3]byte{0, 24, 249}: "VVOND, Inc.", + [3]byte{0, 24, 250}: "Yushin Precision Equipment Co.,Ltd.", + [3]byte{0, 24, 251}: "Compro Technology", + [3]byte{0, 24, 252}: "Altec Electronic AG", + [3]byte{0, 24, 253}: "Optimal Technologies International Inc.", + [3]byte{0, 24, 254}: "Hewlett-Packard Company", + [3]byte{0, 24, 255}: "PowerQuattro Co.", + [3]byte{0, 25, 0}: "Intelliverese - DBA Voicecom", + [3]byte{0, 25, 1}: "F1MEDIA", + [3]byte{0, 25, 2}: "Cambridge Consultants Ltd", + [3]byte{0, 25, 3}: "Bigfoot Networks Inc", + [3]byte{0, 25, 4}: "WB Electronics Sp. z o.o.", + [3]byte{0, 25, 5}: "SCHRACK Seconet AG", + [3]byte{0, 25, 6}: "CISCO SYSTEMS, INC.", + [3]byte{0, 25, 7}: "CISCO SYSTEMS, INC.", + [3]byte{0, 25, 8}: "Duaxes Corporation", + [3]byte{0, 25, 9}: "DEVI - Danfoss A/S", + [3]byte{0, 25, 10}: "HASWARE INC.", + [3]byte{0, 25, 11}: "Southern Vision Systems, Inc.", + [3]byte{0, 25, 12}: "Encore Electronics, Inc.", + [3]byte{0, 25, 13}: "IEEE 1394c", + [3]byte{0, 25, 14}: "Atech Technology Co., Ltd.", + [3]byte{0, 25, 15}: "Advansus Corp.", + [3]byte{0, 25, 16}: "Knick Elektronische Messgeraete GmbH & Co. KG", + [3]byte{0, 25, 17}: "Just In Mobile Information Technologies (Shanghai) Co., Ltd.", + [3]byte{0, 25, 18}: "Welcat Inc", + [3]byte{0, 25, 19}: "Chuang-Yi Network Equipment Co.Ltd.", + [3]byte{0, 25, 20}: "Winix Co., Ltd", + [3]byte{0, 25, 21}: "TECOM Co., Ltd.", + [3]byte{0, 25, 22}: "PayTec AG", + [3]byte{0, 25, 23}: "Posiflex Inc.", + [3]byte{0, 25, 24}: "Interactive Wear AG", + [3]byte{0, 25, 25}: "ASTEL Inc.", + [3]byte{0, 25, 26}: "IRLINK", + [3]byte{0, 25, 27}: "Sputnik Engineering AG", + [3]byte{0, 25, 28}: "Sensicast Systems", + [3]byte{0, 25, 29}: "Nintendo Co., Ltd.", + [3]byte{0, 25, 30}: "Beyondwiz Co., Ltd.", + [3]byte{0, 25, 31}: "Microlink communications Inc.", + [3]byte{0, 25, 32}: "KUME electric Co.,Ltd.", + [3]byte{0, 25, 33}: "Elitegroup Computer System Co.", + [3]byte{0, 25, 34}: "CM Comandos Lineares", + [3]byte{0, 25, 35}: "Phonex Korea Co., LTD.", + [3]byte{0, 25, 36}: "LBNL Engineering", + [3]byte{0, 25, 37}: "Intelicis Corporation", + [3]byte{0, 25, 38}: "BitsGen Co., Ltd.", + [3]byte{0, 25, 39}: "ImCoSys Ltd", + [3]byte{0, 25, 40}: "Siemens AG, Transportation Systems", + [3]byte{0, 25, 41}: "2M2B Montadora de Maquinas Bahia Brasil LTDA", + [3]byte{0, 25, 42}: "Antiope Associates", + [3]byte{0, 25, 43}: "Aclara RF Systems Inc.", + [3]byte{0, 25, 44}: "ARRIS Group, Inc.", + [3]byte{0, 25, 45}: "Nokia Corporation", + [3]byte{0, 25, 46}: "Spectral Instruments, Inc.", + [3]byte{0, 25, 47}: "CISCO SYSTEMS, INC.", + [3]byte{0, 25, 48}: "CISCO SYSTEMS, INC.", + [3]byte{0, 25, 49}: "Balluff GmbH", + [3]byte{0, 25, 50}: "Gude Analog- und Digialsysteme GmbH", + [3]byte{0, 25, 51}: "Strix Systems, Inc.", + [3]byte{0, 25, 52}: "TRENDON TOUCH TECHNOLOGY CORP.", + [3]byte{0, 25, 53}: "DUERR DENTAL AG", + [3]byte{0, 25, 54}: "STERLITE OPTICAL TECHNOLOGIES LIMITED", + [3]byte{0, 25, 55}: "CommerceGuard AB", + [3]byte{0, 25, 56}: "UMB Communications Co., Ltd.", + [3]byte{0, 25, 57}: "Gigamips", + [3]byte{0, 25, 58}: "OESOLUTIONS", + [3]byte{0, 25, 59}: "Wilibox Deliberant Group LLC", + [3]byte{0, 25, 60}: "HighPoint Technologies Incorporated", + [3]byte{0, 25, 61}: "GMC Guardian Mobility Corp.", + [3]byte{0, 25, 62}: "ADB Broadband Italia", + [3]byte{0, 25, 63}: "RDI technology(Shenzhen) Co.,LTD", + [3]byte{0, 25, 64}: "Rackable Systems", + [3]byte{0, 25, 65}: "Pitney Bowes, Inc", + [3]byte{0, 25, 66}: "ON SOFTWARE INTERNATIONAL LIMITED", + [3]byte{0, 25, 67}: "Belden", + [3]byte{0, 25, 68}: "Fossil Partners, L.P.", + [3]byte{0, 25, 69}: "Ten-Tec Inc.", + [3]byte{0, 25, 70}: "Cianet Industria e Comercio S/A", + [3]byte{0, 25, 71}: "Scientific Atlanta, A Cisco Company", + [3]byte{0, 25, 72}: "AireSpider Networks", + [3]byte{0, 25, 73}: "TENTEL COMTECH CO., LTD.", + [3]byte{0, 25, 74}: "TESTO AG", + [3]byte{0, 25, 75}: "SAGEM COMMUNICATION", + [3]byte{0, 25, 76}: "Fujian Stelcom information & Technology CO.,Ltd", + [3]byte{0, 25, 77}: "Avago Technologies Sdn Bhd", + [3]byte{0, 25, 78}: "Ultra Electronics - TCS (Tactical Communication Systems)", + [3]byte{0, 25, 79}: "Nokia Danmark A/S", + [3]byte{0, 25, 80}: "Harman Multimedia", + [3]byte{0, 25, 81}: "NETCONS, s.r.o.", + [3]byte{0, 25, 82}: "ACOGITO Co., Ltd", + [3]byte{0, 25, 83}: "Chainleader Communications Corp.", + [3]byte{0, 25, 84}: "Leaf Corporation.", + [3]byte{0, 25, 85}: "CISCO SYSTEMS, INC.", + [3]byte{0, 25, 86}: "CISCO SYSTEMS, INC.", + [3]byte{0, 25, 87}: "Saafnet Canada Inc.", + [3]byte{0, 25, 88}: "Bluetooth SIG, Inc.", + [3]byte{0, 25, 89}: "Staccato Communications Inc.", + [3]byte{0, 25, 90}: "Jenaer Antriebstechnik GmbH", + [3]byte{0, 25, 91}: "D-Link Corporation", + [3]byte{0, 25, 92}: "Innotech Corporation", + [3]byte{0, 25, 93}: "ShenZhen XinHuaTong Opto Electronics Co.,Ltd", + [3]byte{0, 25, 94}: "ARRIS Group, Inc.", + [3]byte{0, 25, 95}: "Valemount Networks Corporation", + [3]byte{0, 25, 96}: "DoCoMo Systems, Inc.", + [3]byte{0, 25, 97}: "Blaupunkt Embedded Systems GmbH", + [3]byte{0, 25, 98}: "Commerciant, LP", + [3]byte{0, 25, 99}: "Sony Ericsson Mobile Communications AB", + [3]byte{0, 25, 100}: "Doorking Inc.", + [3]byte{0, 25, 101}: "YuHua TelTech (ShangHai) Co., Ltd.", + [3]byte{0, 25, 102}: "Asiarock Technology Limited", + [3]byte{0, 25, 103}: "TELDAT Sp.J.", + [3]byte{0, 25, 104}: "Digital Video Networks(Shanghai) CO. LTD.", + [3]byte{0, 25, 105}: "Nortel", + [3]byte{0, 25, 106}: "MikroM GmbH", + [3]byte{0, 25, 107}: "Danpex Corporation", + [3]byte{0, 25, 108}: "ETROVISION TECHNOLOGY", + [3]byte{0, 25, 109}: "Raybit Systems Korea, Inc", + [3]byte{0, 25, 110}: "Metacom (Pty) Ltd.", + [3]byte{0, 25, 111}: "SensoPart GmbH", + [3]byte{0, 25, 112}: "Z-Com, Inc.", + [3]byte{0, 25, 113}: "Guangzhou Unicomp Technology Co.,Ltd", + [3]byte{0, 25, 114}: "Plexus (Xiamen) Co.,ltd", + [3]byte{0, 25, 115}: "Zeugma Systems", + [3]byte{0, 25, 116}: "AboCom Systems, Inc.", + [3]byte{0, 25, 117}: "Beijing Huisen networks technology Inc", + [3]byte{0, 25, 118}: "Xipher Technologies, LLC", + [3]byte{0, 25, 119}: "Aerohive Networks, Inc.", + [3]byte{0, 25, 120}: "Datum Systems, Inc.", + [3]byte{0, 25, 121}: "Nokia Danmark A/S", + [3]byte{0, 25, 122}: "MAZeT GmbH", + [3]byte{0, 25, 123}: "Picotest Corp.", + [3]byte{0, 25, 124}: "Riedel Communications GmbH", + [3]byte{0, 25, 125}: "Hon Hai Precision Ind. Co., Ltd", + [3]byte{0, 25, 126}: "Hon Hai Precision Ind. Co., Ltd", + [3]byte{0, 25, 127}: "PLANTRONICS, INC.", + [3]byte{0, 25, 128}: "Gridpoint Systems", + [3]byte{0, 25, 129}: "Vivox Inc", + [3]byte{0, 25, 130}: "SmarDTV", + [3]byte{0, 25, 131}: "CCT R&D Limited", + [3]byte{0, 25, 132}: "ESTIC Corporation", + [3]byte{0, 25, 133}: "IT Watchdogs, Inc", + [3]byte{0, 25, 134}: "Cheng Hongjian", + [3]byte{0, 25, 135}: "Panasonic Mobile Communications Co., Ltd.", + [3]byte{0, 25, 136}: "Wi2Wi, Inc", + [3]byte{0, 25, 137}: "Sonitrol Corporation", + [3]byte{0, 25, 138}: "Northrop Grumman Systems Corp.", + [3]byte{0, 25, 139}: "Novera Optics Korea, Inc.", + [3]byte{0, 25, 140}: "iXSea", + [3]byte{0, 25, 141}: "Ocean Optics, Inc.", + [3]byte{0, 25, 142}: "Oticon A/S", + [3]byte{0, 25, 143}: "Alcatel Bell N.V.", + [3]byte{0, 25, 144}: "ELM DATA Co., Ltd.", + [3]byte{0, 25, 145}: "avinfo", + [3]byte{0, 25, 146}: "ADTRAN INC.", + [3]byte{0, 25, 147}: "Changshu Switchgear MFG. Co.,Ltd. (Former Changshu Switchgea", + [3]byte{0, 25, 148}: "Jorjin Technologies Inc.", + [3]byte{0, 25, 149}: "Jurong Hi-Tech (Suzhou)Co.ltd", + [3]byte{0, 25, 150}: "TurboChef Technologies Inc.", + [3]byte{0, 25, 151}: "Soft Device Sdn Bhd", + [3]byte{0, 25, 152}: "SATO CORPORATION", + [3]byte{0, 25, 153}: "Fujitsu Technology Solutions", + [3]byte{0, 25, 154}: "EDO-EVI", + [3]byte{0, 25, 155}: "Diversified Technical Systems, Inc.", + [3]byte{0, 25, 156}: "CTRING", + [3]byte{0, 25, 157}: "VIZIO, Inc.", + [3]byte{0, 25, 158}: "Nifty", + [3]byte{0, 25, 159}: "DKT A/S", + [3]byte{0, 25, 160}: "NIHON DATA SYSTENS, INC.", + [3]byte{0, 25, 161}: "LG INFORMATION & COMM.", + [3]byte{0, 25, 162}: "ORDYN TECHNOLOGIES", + [3]byte{0, 25, 163}: "asteel electronique atlantique", + [3]byte{0, 25, 164}: "Austar Technology (hang zhou) Co.,Ltd", + [3]byte{0, 25, 165}: "RadarFind Corporation", + [3]byte{0, 25, 166}: "ARRIS Group, Inc.", + [3]byte{0, 25, 167}: "ITU-T", + [3]byte{0, 25, 168}: "WiQuest Communications", + [3]byte{0, 25, 169}: "CISCO SYSTEMS, INC.", + [3]byte{0, 25, 170}: "CISCO SYSTEMS, INC.", + [3]byte{0, 25, 171}: "Raycom CO ., LTD", + [3]byte{0, 25, 172}: "GSP SYSTEMS Inc.", + [3]byte{0, 25, 173}: "BOBST SA", + [3]byte{0, 25, 174}: "Hopling Technologies b.v.", + [3]byte{0, 25, 175}: "Rigol Technologies, Inc.", + [3]byte{0, 25, 176}: "HanYang System", + [3]byte{0, 25, 177}: "Arrow7 Corporation", + [3]byte{0, 25, 178}: "XYnetsoft Co.,Ltd", + [3]byte{0, 25, 179}: "Stanford Research Systems", + [3]byte{0, 25, 180}: "VideoCast Ltd.", + [3]byte{0, 25, 181}: "Famar Fueguina S.A.", + [3]byte{0, 25, 182}: "Euro Emme s.r.l.", + [3]byte{0, 25, 183}: "Nokia Danmark A/S", + [3]byte{0, 25, 184}: "Boundary Devices", + [3]byte{0, 25, 185}: "Dell Inc.", + [3]byte{0, 25, 186}: "Paradox Security Systems Ltd", + [3]byte{0, 25, 187}: "Hewlett-Packard Company", + [3]byte{0, 25, 188}: "ELECTRO CHANCE SRL", + [3]byte{0, 25, 189}: "New Media Life", + [3]byte{0, 25, 190}: "Altai Technologies Limited", + [3]byte{0, 25, 191}: "Citiway technology Co.,ltd", + [3]byte{0, 25, 192}: "ARRIS Group, Inc.", + [3]byte{0, 25, 193}: "Alps Electric Co., Ltd", + [3]byte{0, 25, 194}: "Equustek Solutions, Inc.", + [3]byte{0, 25, 195}: "Qualitrol", + [3]byte{0, 25, 196}: "Infocrypt Inc.", + [3]byte{0, 25, 197}: "SONY Computer Entertainment inc,", + [3]byte{0, 25, 198}: "ZTE Corporation", + [3]byte{0, 25, 199}: "Cambridge Industries(Group) Co.,Ltd.", + [3]byte{0, 25, 200}: "AnyDATA Corporation", + [3]byte{0, 25, 201}: "S&C ELECTRIC COMPANY", + [3]byte{0, 25, 202}: "Broadata Communications, Inc", + [3]byte{0, 25, 203}: "ZyXEL Communications Corporation", + [3]byte{0, 25, 204}: "RCG (HK) Ltd", + [3]byte{0, 25, 205}: "Chengdu ethercom information technology Ltd.", + [3]byte{0, 25, 206}: "Progressive Gaming International", + [3]byte{0, 25, 207}: "SALICRU, S.A.", + [3]byte{0, 25, 208}: "Cathexis", + [3]byte{0, 25, 209}: "Intel Corporate", + [3]byte{0, 25, 210}: "Intel Corporate", + [3]byte{0, 25, 211}: "TRAK Microwave", + [3]byte{0, 25, 212}: "ICX Technologies", + [3]byte{0, 25, 213}: "IP Innovations, Inc.", + [3]byte{0, 25, 214}: "LS Cable and System Ltd.", + [3]byte{0, 25, 215}: "FORTUNETEK CO., LTD", + [3]byte{0, 25, 216}: "MAXFOR", + [3]byte{0, 25, 217}: "Zeutschel GmbH", + [3]byte{0, 25, 218}: "Welltrans O&E Technology Co. , Ltd.", + [3]byte{0, 25, 219}: "MICRO-STAR INTERNATIONAL CO., LTD.", + [3]byte{0, 25, 220}: "ENENSYS Technologies", + [3]byte{0, 25, 221}: "FEI-Zyfer, Inc.", + [3]byte{0, 25, 222}: "MOBITEK", + [3]byte{0, 25, 223}: "Thomson Inc.", + [3]byte{0, 25, 224}: "TP-LINK Technologies Co., Ltd.", + [3]byte{0, 25, 225}: "Nortel", + [3]byte{0, 25, 226}: "Juniper Networks", + [3]byte{0, 25, 227}: "Apple", + [3]byte{0, 25, 228}: "2Wire, Inc", + [3]byte{0, 25, 229}: "Lynx Studio Technology, Inc.", + [3]byte{0, 25, 230}: "TOYO MEDIC CO.,LTD.", + [3]byte{0, 25, 231}: "CISCO SYSTEMS, INC.", + [3]byte{0, 25, 232}: "CISCO SYSTEMS, INC.", + [3]byte{0, 25, 233}: "S-Information Technolgy, Co., Ltd.", + [3]byte{0, 25, 234}: "TeraMage Technologies Co., Ltd.", + [3]byte{0, 25, 235}: "Pyronix Ltd", + [3]byte{0, 25, 236}: "Sagamore Systems, Inc.", + [3]byte{0, 25, 237}: "Axesstel Inc.", + [3]byte{0, 25, 238}: "CARLO GAVAZZI CONTROLS SPA-Controls Division", + [3]byte{0, 25, 239}: "SHENZHEN LINNKING ELECTRONICS CO.,LTD", + [3]byte{0, 25, 240}: "UNIONMAN TECHNOLOGY CO.,LTD", + [3]byte{0, 25, 241}: "Star Communication Network Technology Co.,Ltd", + [3]byte{0, 25, 242}: "Teradyne K.K.", + [3]byte{0, 25, 243}: "Cetis, Inc", + [3]byte{0, 25, 244}: "Convergens Oy Ltd", + [3]byte{0, 25, 245}: "Imagination Technologies Ltd", + [3]byte{0, 25, 246}: "Acconet (PTE) Ltd", + [3]byte{0, 25, 247}: "Onset Computer Corporation", + [3]byte{0, 25, 248}: "Embedded Systems Design, Inc.", + [3]byte{0, 25, 249}: "TDK-Lambda", + [3]byte{0, 25, 250}: "Cable Vision Electronics CO., LTD.", + [3]byte{0, 25, 251}: "BSkyB Ltd", + [3]byte{0, 25, 252}: "PT. Ufoakses Sukses Luarbiasa", + [3]byte{0, 25, 253}: "Nintendo Co., Ltd.", + [3]byte{0, 25, 254}: "SHENZHEN SEECOMM TECHNOLOGY CO.,LTD.", + [3]byte{0, 25, 255}: "Finnzymes", + [3]byte{0, 26, 0}: "MATRIX INC.", + [3]byte{0, 26, 1}: "Smiths Medical", + [3]byte{0, 26, 2}: "SECURE CARE PRODUCTS, INC", + [3]byte{0, 26, 3}: "Angel Electronics Co., Ltd.", + [3]byte{0, 26, 4}: "Interay Solutions BV", + [3]byte{0, 26, 5}: "OPTIBASE LTD", + [3]byte{0, 26, 6}: "OpVista, Inc.", + [3]byte{0, 26, 7}: "Arecont Vision", + [3]byte{0, 26, 8}: "Simoco Ltd.", + [3]byte{0, 26, 9}: "Wayfarer Transit Systems Ltd", + [3]byte{0, 26, 10}: "Adaptive Micro-Ware Inc.", + [3]byte{0, 26, 11}: "BONA TECHNOLOGY INC.", + [3]byte{0, 26, 12}: "Swe-Dish Satellite Systems AB", + [3]byte{0, 26, 13}: "HandHeld entertainment, Inc.", + [3]byte{0, 26, 14}: "Cheng Uei Precision Industry Co.,Ltd", + [3]byte{0, 26, 15}: "Sistemas Avanzados de Control, S.A.", + [3]byte{0, 26, 16}: "LUCENT TRANS ELECTRONICS CO.,LTD", + [3]byte{0, 26, 17}: "Google Inc.", + [3]byte{0, 26, 18}: "Essilor", + [3]byte{0, 26, 19}: "Wanlida Group Co., LTD", + [3]byte{0, 26, 20}: "Xin Hua Control Engineering Co.,Ltd.", + [3]byte{0, 26, 21}: "gemalto e-Payment", + [3]byte{0, 26, 22}: "Nokia Danmark A/S", + [3]byte{0, 26, 23}: "Teak Technologies, Inc.", + [3]byte{0, 26, 24}: "Advanced Simulation Technology inc.", + [3]byte{0, 26, 25}: "Computer Engineering Limited", + [3]byte{0, 26, 26}: "Gentex Corporation/Electro-Acoustic Products", + [3]byte{0, 26, 27}: "ARRIS Group, Inc.", + [3]byte{0, 26, 28}: "GT&T Engineering Pte Ltd", + [3]byte{0, 26, 29}: "PChome Online Inc.", + [3]byte{0, 26, 30}: "Aruba Networks", + [3]byte{0, 26, 31}: "Coastal Environmental Systems", + [3]byte{0, 26, 32}: "CMOTECH Co. Ltd.", + [3]byte{0, 26, 33}: "Indac B.V.", + [3]byte{0, 26, 34}: "eQ-3 Entwicklung GmbH", + [3]byte{0, 26, 35}: "Ice Qube, Inc", + [3]byte{0, 26, 36}: "Galaxy Telecom Technologies Ltd", + [3]byte{0, 26, 37}: "DELTA DORE", + [3]byte{0, 26, 38}: "Deltanode Solutions AB", + [3]byte{0, 26, 39}: "Ubistar", + [3]byte{0, 26, 40}: "ASWT Co., LTD. Taiwan Branch H.K.", + [3]byte{0, 26, 41}: "Johnson Outdoors Marine Electronics, Inc", + [3]byte{0, 26, 42}: "Arcadyan Technology Corporation", + [3]byte{0, 26, 43}: "Ayecom Technology Co., Ltd.", + [3]byte{0, 26, 44}: "SATEC Co.,LTD", + [3]byte{0, 26, 45}: "The Navvo Group", + [3]byte{0, 26, 46}: "Ziova Coporation", + [3]byte{0, 26, 47}: "CISCO SYSTEMS, INC.", + [3]byte{0, 26, 48}: "CISCO SYSTEMS, INC.", + [3]byte{0, 26, 49}: "SCAN COIN Industries AB", + [3]byte{0, 26, 50}: "ACTIVA MULTIMEDIA", + [3]byte{0, 26, 51}: "ASI Communications, Inc.", + [3]byte{0, 26, 52}: "Konka Group Co., Ltd.", + [3]byte{0, 26, 53}: "BARTEC GmbH", + [3]byte{0, 26, 54}: "Aipermon GmbH & Co. KG", + [3]byte{0, 26, 55}: "Lear Corporation", + [3]byte{0, 26, 56}: "Sanmina-SCI", + [3]byte{0, 26, 57}: "Merten GmbH&CoKG", + [3]byte{0, 26, 58}: "Dongahelecomm", + [3]byte{0, 26, 59}: "Doah Elecom Inc.", + [3]byte{0, 26, 60}: "Technowave Ltd.", + [3]byte{0, 26, 61}: "Ajin Vision Co.,Ltd", + [3]byte{0, 26, 62}: "Faster Technology LLC", + [3]byte{0, 26, 63}: "intelbras", + [3]byte{0, 26, 64}: "A-FOUR TECH CO., LTD.", + [3]byte{0, 26, 65}: "INOCOVA Co.,Ltd", + [3]byte{0, 26, 66}: "Techcity Technology co., Ltd.", + [3]byte{0, 26, 67}: "Logical Link Communications", + [3]byte{0, 26, 68}: "JWTrading Co., Ltd", + [3]byte{0, 26, 69}: "GN Netcom as", + [3]byte{0, 26, 70}: "Digital Multimedia Technology Co., Ltd", + [3]byte{0, 26, 71}: "Agami Systems, Inc.", + [3]byte{0, 26, 72}: "Takacom Corporation", + [3]byte{0, 26, 73}: "Micro Vision Co.,LTD", + [3]byte{0, 26, 74}: "Qumranet Inc.", + [3]byte{0, 26, 75}: "Hewlett-Packard Company", + [3]byte{0, 26, 76}: "Crossbow Technology, Inc", + [3]byte{0, 26, 77}: "GIGA-BYTE TECHNOLOGY CO.,LTD.", + [3]byte{0, 26, 78}: "NTI AG / LinMot", + [3]byte{0, 26, 79}: "AVM GmbH", + [3]byte{0, 26, 80}: "PheeNet Technology Corp.", + [3]byte{0, 26, 81}: "Alfred Mann Foundation", + [3]byte{0, 26, 82}: "Meshlinx Wireless Inc.", + [3]byte{0, 26, 83}: "Zylaya", + [3]byte{0, 26, 84}: "Hip Shing Electronics Ltd.", + [3]byte{0, 26, 85}: "ACA-Digital Corporation", + [3]byte{0, 26, 86}: "ViewTel Co,. Ltd.", + [3]byte{0, 26, 87}: "Matrix Design Group, LLC", + [3]byte{0, 26, 88}: "CCV Deutschland GmbH - Celectronic eHealth Div.", + [3]byte{0, 26, 89}: "Ircona", + [3]byte{0, 26, 90}: "Korea Electric Power Data Network (KDN) Co., Ltd", + [3]byte{0, 26, 91}: "NetCare Service Co., Ltd.", + [3]byte{0, 26, 92}: "Euchner GmbH+Co. KG", + [3]byte{0, 26, 93}: "Mobinnova Corp.", + [3]byte{0, 26, 94}: "Thincom Technology Co.,Ltd", + [3]byte{0, 26, 95}: "KitWorks.fi Ltd.", + [3]byte{0, 26, 96}: "Wave Electronics Co.,Ltd.", + [3]byte{0, 26, 97}: "PacStar Corp.", + [3]byte{0, 26, 98}: "Data Robotics, Incorporated", + [3]byte{0, 26, 99}: "Elster Solutions, LLC,", + [3]byte{0, 26, 100}: "IBM Corp", + [3]byte{0, 26, 101}: "Seluxit", + [3]byte{0, 26, 102}: "ARRIS Group, Inc.", + [3]byte{0, 26, 103}: "Infinite QL Sdn Bhd", + [3]byte{0, 26, 104}: "Weltec Enterprise Co., Ltd.", + [3]byte{0, 26, 105}: "Wuhan Yangtze Optical Technology CO.,Ltd.", + [3]byte{0, 26, 106}: "Tranzas, Inc.", + [3]byte{0, 26, 107}: "Universal Global Scientific Industrial Co., Ltd.", + [3]byte{0, 26, 108}: "CISCO SYSTEMS, INC.", + [3]byte{0, 26, 109}: "CISCO SYSTEMS, INC.", + [3]byte{0, 26, 110}: "Impro Technologies", + [3]byte{0, 26, 111}: "MI.TEL s.r.l.", + [3]byte{0, 26, 112}: "Cisco-Linksys, LLC", + [3]byte{0, 26, 113}: "Diostech Co., Ltd.", + [3]byte{0, 26, 114}: "Mosart Semiconductor Corp.", + [3]byte{0, 26, 115}: "Gemtek Technology Co., Ltd.", + [3]byte{0, 26, 116}: "Procare International Co", + [3]byte{0, 26, 117}: "Sony Ericsson Mobile Communications", + [3]byte{0, 26, 118}: "SDT information Technology Co.,LTD.", + [3]byte{0, 26, 119}: "ARRIS Group, Inc.", + [3]byte{0, 26, 120}: "ubtos", + [3]byte{0, 26, 121}: "TELECOMUNICATION TECHNOLOGIES LTD.", + [3]byte{0, 26, 122}: "Lismore Instruments Limited", + [3]byte{0, 26, 123}: "Teleco, Inc.", + [3]byte{0, 26, 124}: "Hirschmann Multimedia B.V.", + [3]byte{0, 26, 125}: "cyber-blue(HK)Ltd", + [3]byte{0, 26, 126}: "LN Srithai Comm Ltd.", + [3]byte{0, 26, 127}: "GCI Science&Technology Co.,Ltd.", + [3]byte{0, 26, 128}: "Sony Corporation", + [3]byte{0, 26, 129}: "Zelax", + [3]byte{0, 26, 130}: "PROBA Building Automation Co.,LTD", + [3]byte{0, 26, 131}: "Pegasus Technologies Inc.", + [3]byte{0, 26, 132}: "V One Multimedia Pte Ltd", + [3]byte{0, 26, 133}: "NV Michel Van de Wiele", + [3]byte{0, 26, 134}: "AdvancedIO Systems Inc", + [3]byte{0, 26, 135}: "Canhold International Limited", + [3]byte{0, 26, 136}: "Venergy,Co,Ltd", + [3]byte{0, 26, 137}: "Nokia Danmark A/S", + [3]byte{0, 26, 138}: "Samsung Electronics Co., Ltd.", + [3]byte{0, 26, 139}: "CHUNIL ELECTRIC IND., CO.", + [3]byte{0, 26, 140}: "Sophos Ltd", + [3]byte{0, 26, 141}: "AVECS Bergen GmbH", + [3]byte{0, 26, 142}: "3Way Networks Ltd", + [3]byte{0, 26, 143}: "Nortel", + [3]byte{0, 26, 144}: "Trópico Sistemas e Telecomunicações da Amazônia LTDA.", + [3]byte{0, 26, 145}: "FusionDynamic Ltd.", + [3]byte{0, 26, 146}: "ASUSTek COMPUTER INC.", + [3]byte{0, 26, 147}: "ERCO Leuchten GmbH", + [3]byte{0, 26, 148}: "Votronic GmbH", + [3]byte{0, 26, 149}: "Hisense Mobile Communications Technoligy Co.,Ltd.", + [3]byte{0, 26, 150}: "ECLER S.A.", + [3]byte{0, 26, 151}: "fitivision technology Inc.", + [3]byte{0, 26, 152}: "Asotel Communication Limited Taiwan Branch", + [3]byte{0, 26, 153}: "Smarty (HZ) Information Electronics Co., Ltd", + [3]byte{0, 26, 154}: "Skyworth Digital technology(shenzhen)co.ltd.", + [3]byte{0, 26, 155}: "ADEC & Parter AG", + [3]byte{0, 26, 156}: "RightHand Technologies, Inc.", + [3]byte{0, 26, 157}: "Skipper Wireless, Inc.", + [3]byte{0, 26, 158}: "ICON Digital International Limited", + [3]byte{0, 26, 159}: "A-Link Ltd", + [3]byte{0, 26, 160}: "Dell Inc", + [3]byte{0, 26, 161}: "CISCO SYSTEMS, INC.", + [3]byte{0, 26, 162}: "CISCO SYSTEMS, INC.", + [3]byte{0, 26, 163}: "DELORME", + [3]byte{0, 26, 164}: "Future University-Hakodate", + [3]byte{0, 26, 165}: "BRN Phoenix", + [3]byte{0, 26, 166}: "Telefunken Radio Communication Systems GmbH &CO.KG", + [3]byte{0, 26, 167}: "Torian Wireless", + [3]byte{0, 26, 168}: "Mamiya Digital Imaging Co., Ltd.", + [3]byte{0, 26, 169}: "FUJIAN STAR-NET COMMUNICATION CO.,LTD", + [3]byte{0, 26, 170}: "Analogic Corp.", + [3]byte{0, 26, 171}: "eWings s.r.l.", + [3]byte{0, 26, 172}: "Corelatus AB", + [3]byte{0, 26, 173}: "ARRIS Group, Inc.", + [3]byte{0, 26, 174}: "Savant Systems LLC", + [3]byte{0, 26, 175}: "BLUSENS TECHNOLOGY", + [3]byte{0, 26, 176}: "Signal Networks Pvt. Ltd.,", + [3]byte{0, 26, 177}: "Asia Pacific Satellite Industries Co., Ltd.", + [3]byte{0, 26, 178}: "Cyber Solutions Inc.", + [3]byte{0, 26, 179}: "VISIONITE INC.", + [3]byte{0, 26, 180}: "FFEI Ltd.", + [3]byte{0, 26, 181}: "Home Network System", + [3]byte{0, 26, 182}: "Texas Instruments", + [3]byte{0, 26, 183}: "Ethos Networks LTD.", + [3]byte{0, 26, 184}: "Anseri Corporation", + [3]byte{0, 26, 185}: "PMC", + [3]byte{0, 26, 186}: "Caton Overseas Limited", + [3]byte{0, 26, 187}: "Fontal Technology Incorporation", + [3]byte{0, 26, 188}: "U4EA Technologies Ltd", + [3]byte{0, 26, 189}: "Impatica Inc.", + [3]byte{0, 26, 190}: "COMPUTER HI-TECH INC.", + [3]byte{0, 26, 191}: "TRUMPF Laser Marking Systems AG", + [3]byte{0, 26, 192}: "JOYBIEN TECHNOLOGIES CO., LTD.", + [3]byte{0, 26, 193}: "3Com Ltd", + [3]byte{0, 26, 194}: "YEC Co.,Ltd.", + [3]byte{0, 26, 195}: "Scientific-Atlanta, Inc", + [3]byte{0, 26, 196}: "2Wire, Inc", + [3]byte{0, 26, 197}: "BreakingPoint Systems, Inc.", + [3]byte{0, 26, 198}: "Micro Control Designs", + [3]byte{0, 26, 199}: "UNIPOINT", + [3]byte{0, 26, 200}: "ISL (Instrumentation Scientifique de Laboratoire)", + [3]byte{0, 26, 201}: "SUZUKEN CO.,LTD", + [3]byte{0, 26, 202}: "Tilera Corporation", + [3]byte{0, 26, 203}: "Autocom Products Ltd", + [3]byte{0, 26, 204}: "Celestial Semiconductor, Ltd", + [3]byte{0, 26, 205}: "Tidel Engineering LP", + [3]byte{0, 26, 206}: "YUPITERU CORPORATION", + [3]byte{0, 26, 207}: "C.T. ELETTRONICA", + [3]byte{0, 26, 208}: "Albis Technologies AG", + [3]byte{0, 26, 209}: "FARGO CO., LTD.", + [3]byte{0, 26, 210}: "Eletronica Nitron Ltda", + [3]byte{0, 26, 211}: "Vamp Ltd.", + [3]byte{0, 26, 212}: "iPOX Technology Co., Ltd.", + [3]byte{0, 26, 213}: "KMC CHAIN INDUSTRIAL CO., LTD.", + [3]byte{0, 26, 214}: "JIAGNSU AETNA ELECTRIC CO.,LTD", + [3]byte{0, 26, 215}: "Christie Digital Systems, Inc.", + [3]byte{0, 26, 216}: "AlsterAero GmbH", + [3]byte{0, 26, 217}: "International Broadband Electric Communications, Inc.", + [3]byte{0, 26, 218}: "Biz-2-Me Inc.", + [3]byte{0, 26, 219}: "ARRIS Group, Inc.", + [3]byte{0, 26, 220}: "Nokia Danmark A/S", + [3]byte{0, 26, 221}: "PePWave Ltd", + [3]byte{0, 26, 222}: "ARRIS Group, Inc.", + [3]byte{0, 26, 223}: "Interactivetv Pty Limited", + [3]byte{0, 26, 224}: "Mythology Tech Express Inc.", + [3]byte{0, 26, 225}: "EDGE ACCESS INC", + [3]byte{0, 26, 226}: "CISCO SYSTEMS, INC.", + [3]byte{0, 26, 227}: "CISCO SYSTEMS, INC.", + [3]byte{0, 26, 228}: "Medicis Technologies Corporation", + [3]byte{0, 26, 229}: "Mvox Technologies Inc.", + [3]byte{0, 26, 230}: "Atlanta Advanced Communications Holdings Limited", + [3]byte{0, 26, 231}: "Aztek Networks, Inc.", + [3]byte{0, 26, 232}: "Unify GmbH and Co KG", + [3]byte{0, 26, 233}: "Nintendo Co., Ltd.", + [3]byte{0, 26, 234}: "Radio Terminal Systems Pty Ltd", + [3]byte{0, 26, 235}: "Allied Telesis K.K.", + [3]byte{0, 26, 236}: "Keumbee Electronics Co.,Ltd.", + [3]byte{0, 26, 237}: "INCOTEC GmbH", + [3]byte{0, 26, 238}: "Shenztech Ltd", + [3]byte{0, 26, 239}: "Loopcomm Technology, Inc.", + [3]byte{0, 26, 240}: "Alcatel - IPD", + [3]byte{0, 26, 241}: "Embedded Artists AB", + [3]byte{0, 26, 242}: "Dynavisions Schweiz AG", + [3]byte{0, 26, 243}: "Samyoung Electronics", + [3]byte{0, 26, 244}: "Handreamnet", + [3]byte{0, 26, 245}: "PENTAONE. CO., LTD.", + [3]byte{0, 26, 246}: "Woven Systems, Inc.", + [3]byte{0, 26, 247}: "dataschalt e+a GmbH", + [3]byte{0, 26, 248}: "Copley Controls Corporation", + [3]byte{0, 26, 249}: "AeroVIronment (AV Inc)", + [3]byte{0, 26, 250}: "Welch Allyn, Inc.", + [3]byte{0, 26, 251}: "Joby Inc.", + [3]byte{0, 26, 252}: "ModusLink Corporation", + [3]byte{0, 26, 253}: "EVOLIS", + [3]byte{0, 26, 254}: "SOFACREAL", + [3]byte{0, 26, 255}: "Wizyoung Tech.", + [3]byte{0, 27, 0}: "Neopost Technologies", + [3]byte{0, 27, 1}: "Applied Radio Technologies", + [3]byte{0, 27, 2}: "ED Co.Ltd", + [3]byte{0, 27, 3}: "Action Technology (SZ) Co., Ltd", + [3]byte{0, 27, 4}: "Affinity International S.p.a", + [3]byte{0, 27, 5}: "YMC AG", + [3]byte{0, 27, 6}: "Ateliers R. LAUMONIER", + [3]byte{0, 27, 7}: "Mendocino Software", + [3]byte{0, 27, 8}: "Danfoss Drives A/S", + [3]byte{0, 27, 9}: "Matrix Telecom Pvt. Ltd.", + [3]byte{0, 27, 10}: "Intelligent Distributed Controls Ltd", + [3]byte{0, 27, 11}: "Phidgets Inc.", + [3]byte{0, 27, 12}: "CISCO SYSTEMS, INC.", + [3]byte{0, 27, 13}: "CISCO SYSTEMS, INC.", + [3]byte{0, 27, 14}: "InoTec GmbH Organisationssysteme", + [3]byte{0, 27, 15}: "Petratec", + [3]byte{0, 27, 16}: "ShenZhen Kang Hui Technology Co.,ltd", + [3]byte{0, 27, 17}: "D-Link Corporation", + [3]byte{0, 27, 18}: "Apprion", + [3]byte{0, 27, 19}: "Icron Technologies Corporation", + [3]byte{0, 27, 20}: "Carex Lighting Equipment Factory", + [3]byte{0, 27, 21}: "Voxtel, Inc.", + [3]byte{0, 27, 22}: "Celtro Ltd.", + [3]byte{0, 27, 23}: "Palo Alto Networks", + [3]byte{0, 27, 24}: "Tsuken Electric Ind. Co.,Ltd", + [3]byte{0, 27, 25}: "IEEE I&M Society TC9", + [3]byte{0, 27, 26}: "e-trees Japan, Inc.", + [3]byte{0, 27, 27}: "Siemens AG,", + [3]byte{0, 27, 28}: "Coherent", + [3]byte{0, 27, 29}: "Phoenix International Co., Ltd", + [3]byte{0, 27, 30}: "HART Communication Foundation", + [3]byte{0, 27, 31}: "DELTA - Danish Electronics, Light & Acoustics", + [3]byte{0, 27, 32}: "TPine Technology", + [3]byte{0, 27, 33}: "Intel Corporate", + [3]byte{0, 27, 34}: "Palit Microsystems ( H.K.) Ltd.", + [3]byte{0, 27, 35}: "SimpleComTools", + [3]byte{0, 27, 36}: "Quanta Computer Inc.", + [3]byte{0, 27, 37}: "Nortel", + [3]byte{0, 27, 38}: "RON-Telecom ZAO", + [3]byte{0, 27, 39}: "Merlin CSI", + [3]byte{0, 27, 40}: "POLYGON, JSC", + [3]byte{0, 27, 41}: "Avantis.Co.,Ltd", + [3]byte{0, 27, 42}: "CISCO SYSTEMS, INC.", + [3]byte{0, 27, 43}: "CISCO SYSTEMS, INC.", + [3]byte{0, 27, 44}: "ATRON electronic GmbH", + [3]byte{0, 27, 45}: "Med-Eng Systems Inc.", + [3]byte{0, 27, 46}: "Sinkyo Electron Inc", + [3]byte{0, 27, 47}: "NETGEAR Inc.", + [3]byte{0, 27, 48}: "Solitech Inc.", + [3]byte{0, 27, 49}: "Neural Image. Co. Ltd.", + [3]byte{0, 27, 50}: "QLogic Corporation", + [3]byte{0, 27, 51}: "Nokia Danmark A/S", + [3]byte{0, 27, 52}: "Focus System Inc.", + [3]byte{0, 27, 53}: "ChongQing JINOU Science & Technology Development CO.,Ltd", + [3]byte{0, 27, 54}: "Tsubata Engineering Co.,Ltd. (Head Office)", + [3]byte{0, 27, 55}: "Computec Oy", + [3]byte{0, 27, 56}: "COMPAL INFORMATION (KUNSHAN) CO., LTD.", + [3]byte{0, 27, 57}: "Proxicast", + [3]byte{0, 27, 58}: "SIMS Corp.", + [3]byte{0, 27, 59}: "Yi-Qing CO., LTD", + [3]byte{0, 27, 60}: "Software Technologies Group,Inc.", + [3]byte{0, 27, 61}: "EuroTel Spa", + [3]byte{0, 27, 62}: "Curtis, Inc.", + [3]byte{0, 27, 63}: "ProCurve Networking by HP", + [3]byte{0, 27, 64}: "Network Automation mxc AB", + [3]byte{0, 27, 65}: "General Infinity Co.,Ltd.", + [3]byte{0, 27, 66}: "Wise & Blue", + [3]byte{0, 27, 67}: "Beijing DG Telecommunications equipment Co.,Ltd", + [3]byte{0, 27, 68}: "SanDisk Corporation", + [3]byte{0, 27, 69}: "ABB AS, Division Automation Products", + [3]byte{0, 27, 70}: "Blueone Technology Co.,Ltd", + [3]byte{0, 27, 71}: "Futarque A/S", + [3]byte{0, 27, 72}: "Shenzhen Lantech Electronics Co., Ltd.", + [3]byte{0, 27, 73}: "Roberts Radio limited", + [3]byte{0, 27, 74}: "W&W Communications, Inc.", + [3]byte{0, 27, 75}: "SANION Co., Ltd.", + [3]byte{0, 27, 76}: "Signtech", + [3]byte{0, 27, 77}: "Areca Technology Corporation", + [3]byte{0, 27, 78}: "Navman New Zealand", + [3]byte{0, 27, 79}: "Avaya Inc.", + [3]byte{0, 27, 80}: "Nizhny Novgorod Factory named after M.Frunze, FSUE (NZiF)", + [3]byte{0, 27, 81}: "Vector Technology Corp.", + [3]byte{0, 27, 82}: "ARRIS Group, Inc.", + [3]byte{0, 27, 83}: "CISCO SYSTEMS, INC.", + [3]byte{0, 27, 84}: "CISCO SYSTEMS, INC.", + [3]byte{0, 27, 85}: "Hurco Automation Ltd.", + [3]byte{0, 27, 86}: "Tehuti Networks Ltd.", + [3]byte{0, 27, 87}: "SEMINDIA SYSTEMS PRIVATE LIMITED", + [3]byte{0, 27, 88}: "ACE CAD Enterprise Co., Ltd.", + [3]byte{0, 27, 89}: "Sony Ericsson Mobile Communications AB", + [3]byte{0, 27, 90}: "Apollo Imaging Technologies, Inc.", + [3]byte{0, 27, 91}: "2Wire, Inc.", + [3]byte{0, 27, 92}: "Azuretec Co., Ltd.", + [3]byte{0, 27, 93}: "Vololink Pty Ltd", + [3]byte{0, 27, 94}: "BPL Limited", + [3]byte{0, 27, 95}: "Alien Technology", + [3]byte{0, 27, 96}: "NAVIGON AG", + [3]byte{0, 27, 97}: "Digital Acoustics, LLC", + [3]byte{0, 27, 98}: "JHT Optoelectronics Co.,Ltd.", + [3]byte{0, 27, 99}: "Apple", + [3]byte{0, 27, 100}: "IsaacLandKorea Co., Ltd,", + [3]byte{0, 27, 101}: "China Gridcom Co., Ltd", + [3]byte{0, 27, 102}: "Sennheiser electronic GmbH & Co. KG", + [3]byte{0, 27, 103}: "Cisco Systems Inc", + [3]byte{0, 27, 104}: "Modnnet Co., Ltd", + [3]byte{0, 27, 105}: "Equaline Corporation", + [3]byte{0, 27, 106}: "Powerwave Technologies Sweden AB", + [3]byte{0, 27, 107}: "Swyx Solutions AG", + [3]byte{0, 27, 108}: "LookX Digital Media BV", + [3]byte{0, 27, 109}: "Midtronics, Inc.", + [3]byte{0, 27, 110}: "Anue Systems, Inc.", + [3]byte{0, 27, 111}: "Teletrak Ltd", + [3]byte{0, 27, 112}: "IRI Ubiteq, INC.", + [3]byte{0, 27, 113}: "Telular Corp.", + [3]byte{0, 27, 114}: "Sicep s.p.a.", + [3]byte{0, 27, 115}: "DTL Broadcast Ltd", + [3]byte{0, 27, 116}: "MiraLink Corporation", + [3]byte{0, 27, 117}: "Hypermedia Systems", + [3]byte{0, 27, 118}: "Ripcode, Inc.", + [3]byte{0, 27, 119}: "Intel Corporate", + [3]byte{0, 27, 120}: "Hewlett-Packard Company", + [3]byte{0, 27, 121}: "FAIVELEY TRANSPORT", + [3]byte{0, 27, 122}: "Nintendo Co., Ltd.", + [3]byte{0, 27, 123}: "The Tintometer Ltd", + [3]byte{0, 27, 124}: "A & R Cambridge", + [3]byte{0, 27, 125}: "CXR Anderson Jacobson", + [3]byte{0, 27, 126}: "Beckmann GmbH", + [3]byte{0, 27, 127}: "TMN Technologies Telecomunicacoes Ltda", + [3]byte{0, 27, 128}: "LORD Corporation", + [3]byte{0, 27, 129}: "DATAQ Instruments, Inc.", + [3]byte{0, 27, 130}: "Taiwan Semiconductor Co., Ltd.", + [3]byte{0, 27, 131}: "Finsoft Ltd", + [3]byte{0, 27, 132}: "Scan Engineering Telecom", + [3]byte{0, 27, 133}: "MAN Diesel SE", + [3]byte{0, 27, 134}: "Bosch Access Systems GmbH", + [3]byte{0, 27, 135}: "Deepsound Tech. Co., Ltd", + [3]byte{0, 27, 136}: "Divinet Access Technologies Ltd", + [3]byte{0, 27, 137}: "EMZA Visual Sense Ltd.", + [3]byte{0, 27, 138}: "2M Electronic A/S", + [3]byte{0, 27, 139}: "NEC Platforms, Ltd.", + [3]byte{0, 27, 140}: "JMicron Technology Corp.", + [3]byte{0, 27, 141}: "Electronic Computer Systems, Inc.", + [3]byte{0, 27, 142}: "Hulu Sweden AB", + [3]byte{0, 27, 143}: "CISCO SYSTEMS, INC.", + [3]byte{0, 27, 144}: "CISCO SYSTEMS, INC.", + [3]byte{0, 27, 145}: "EFKON AG", + [3]byte{0, 27, 146}: "l-acoustics", + [3]byte{0, 27, 147}: "JC Decaux SA DNT", + [3]byte{0, 27, 148}: "T.E.M.A. S.p.A.", + [3]byte{0, 27, 149}: "VIDEO SYSTEMS SRL", + [3]byte{0, 27, 150}: "General Sensing", + [3]byte{0, 27, 151}: "Violin Technologies", + [3]byte{0, 27, 152}: "Samsung Electronics Co., Ltd.", + [3]byte{0, 27, 153}: "KS System GmbH", + [3]byte{0, 27, 154}: "Apollo Fire Detectors Ltd", + [3]byte{0, 27, 155}: "Hose-McCann Communications", + [3]byte{0, 27, 156}: "SATEL sp. z o.o.", + [3]byte{0, 27, 157}: "Novus Security Sp. z o.o.", + [3]byte{0, 27, 158}: "ASKEY COMPUTER CORP", + [3]byte{0, 27, 159}: "Calyptech Pty Ltd", + [3]byte{0, 27, 160}: "Awox", + [3]byte{0, 27, 161}: "Åmic AB", + [3]byte{0, 27, 162}: "IDS Imaging Development Systems GmbH", + [3]byte{0, 27, 163}: "Flexit Group GmbH", + [3]byte{0, 27, 164}: "S.A.E Afikim", + [3]byte{0, 27, 165}: "MyungMin Systems, Inc.", + [3]byte{0, 27, 166}: "intotech inc.", + [3]byte{0, 27, 167}: "Lorica Solutions", + [3]byte{0, 27, 168}: "UBI&MOBI,.Inc", + [3]byte{0, 27, 169}: "BROTHER INDUSTRIES, LTD.", + [3]byte{0, 27, 170}: "XenICs nv", + [3]byte{0, 27, 171}: "Telchemy, Incorporated", + [3]byte{0, 27, 172}: "Curtiss Wright Controls Embedded Computing", + [3]byte{0, 27, 173}: "iControl Incorporated", + [3]byte{0, 27, 174}: "Micro Control Systems, Inc", + [3]byte{0, 27, 175}: "Nokia Danmark A/S", + [3]byte{0, 27, 176}: "BHARAT ELECTRONICS", + [3]byte{0, 27, 177}: "Wistron Neweb Corp.", + [3]byte{0, 27, 178}: "Intellect International NV", + [3]byte{0, 27, 179}: "Condalo GmbH", + [3]byte{0, 27, 180}: "Airvod Limited", + [3]byte{0, 27, 181}: "ZF Electronics GmbH", + [3]byte{0, 27, 182}: "Bird Electronic Corp.", + [3]byte{0, 27, 183}: "Alta Heights Technology Corp.", + [3]byte{0, 27, 184}: "BLUEWAY ELECTRONIC CO;LTD", + [3]byte{0, 27, 185}: "Elitegroup Computer System Co.", + [3]byte{0, 27, 186}: "Nortel", + [3]byte{0, 27, 187}: "RFTech Co.,Ltd", + [3]byte{0, 27, 188}: "Silver Peak Systems, Inc.", + [3]byte{0, 27, 189}: "FMC Kongsberg Subsea AS", + [3]byte{0, 27, 190}: "ICOP Digital", + [3]byte{0, 27, 191}: "SAGEM COMMUNICATION", + [3]byte{0, 27, 192}: "Juniper Networks", + [3]byte{0, 27, 193}: "HOLUX Technology, Inc.", + [3]byte{0, 27, 194}: "Integrated Control Technology Limitied", + [3]byte{0, 27, 195}: "Mobisolution Co.,Ltd", + [3]byte{0, 27, 196}: "Ultratec, Inc.", + [3]byte{0, 27, 197}: "IEEE Registration Authority", + [3]byte{0, 27, 198}: "Strato Rechenzentrum AG", + [3]byte{0, 27, 199}: "StarVedia Technology Inc.", + [3]byte{0, 27, 200}: "MIURA CO.,LTD", + [3]byte{0, 27, 201}: "FSN DISPLAY INC", + [3]byte{0, 27, 202}: "Beijing Run Technology LTD. Company", + [3]byte{0, 27, 203}: "PEMPEK SYSTEMS PTY LTD", + [3]byte{0, 27, 204}: "KINGTEK CCTV ALLIANCE CO., LTD.", + [3]byte{0, 27, 205}: "DAVISCOMMS (S) PTE LTD", + [3]byte{0, 27, 206}: "Measurement Devices Ltd", + [3]byte{0, 27, 207}: "Dataupia Corporation", + [3]byte{0, 27, 208}: "IDENTEC SOLUTIONS", + [3]byte{0, 27, 209}: "SOGESTMATIC", + [3]byte{0, 27, 210}: "ULTRA-X ASIA PACIFIC Inc.", + [3]byte{0, 27, 211}: "Panasonic Corp. AVC Company", + [3]byte{0, 27, 212}: "CISCO SYSTEMS, INC.", + [3]byte{0, 27, 213}: "CISCO SYSTEMS, INC.", + [3]byte{0, 27, 214}: "Kelvin Hughes Ltd", + [3]byte{0, 27, 215}: "Scientific Atlanta, A Cisco Company", + [3]byte{0, 27, 216}: "DVTel LTD", + [3]byte{0, 27, 217}: "Edgewater Computer Systems", + [3]byte{0, 27, 218}: "UTStarcom Inc", + [3]byte{0, 27, 219}: "Valeo VECS", + [3]byte{0, 27, 220}: "Vencer Co., Ltd.", + [3]byte{0, 27, 221}: "ARRIS Group, Inc.", + [3]byte{0, 27, 222}: "Renkus-Heinz, Inc.", + [3]byte{0, 27, 223}: "Iskra Sistemi d.d.", + [3]byte{0, 27, 224}: "TELENOT ELECTRONIC GmbH", + [3]byte{0, 27, 225}: "ViaLogy", + [3]byte{0, 27, 226}: "AhnLab,Inc.", + [3]byte{0, 27, 227}: "Health Hero Network, Inc.", + [3]byte{0, 27, 228}: "TOWNET SRL", + [3]byte{0, 27, 229}: "802automation Limited", + [3]byte{0, 27, 230}: "VR AG", + [3]byte{0, 27, 231}: "Postek Electronics Co., Ltd.", + [3]byte{0, 27, 232}: "Ultratronik GmbH", + [3]byte{0, 27, 233}: "Broadcom Corporation", + [3]byte{0, 27, 234}: "Nintendo Co., Ltd.", + [3]byte{0, 27, 235}: "DMP Electronics INC.", + [3]byte{0, 27, 236}: "Netio Technologies Co., Ltd", + [3]byte{0, 27, 237}: "Brocade Communications Systems, Inc", + [3]byte{0, 27, 238}: "Nokia Danmark A/S", + [3]byte{0, 27, 239}: "Blossoms Digital Technology Co.,Ltd.", + [3]byte{0, 27, 240}: "Value Platforms Limited", + [3]byte{0, 27, 241}: "Nanjing SilverNet Software Co., Ltd.", + [3]byte{0, 27, 242}: "KWORLD COMPUTER CO., LTD", + [3]byte{0, 27, 243}: "TRANSRADIO SenderSysteme Berlin AG", + [3]byte{0, 27, 244}: "KENWIN INDUSTRIAL(HK) LTD.", + [3]byte{0, 27, 245}: "Tellink Sistemas de Telecomunicación S.L.", + [3]byte{0, 27, 246}: "CONWISE Technology Corporation Ltd.", + [3]byte{0, 27, 247}: "Lund IP Products AB", + [3]byte{0, 27, 248}: "Digitrax Inc.", + [3]byte{0, 27, 249}: "Intellitect Water Ltd", + [3]byte{0, 27, 250}: "G.i.N. mbH", + [3]byte{0, 27, 251}: "Alps Electric Co., Ltd", + [3]byte{0, 27, 252}: "ASUSTek COMPUTER INC.", + [3]byte{0, 27, 253}: "Dignsys Inc.", + [3]byte{0, 27, 254}: "Zavio Inc.", + [3]byte{0, 27, 255}: "Millennia Media inc.", + [3]byte{0, 28, 0}: "Entry Point, LLC", + [3]byte{0, 28, 1}: "ABB Oy Drives", + [3]byte{0, 28, 2}: "Pano Logic", + [3]byte{0, 28, 3}: "Betty TV Technology AG", + [3]byte{0, 28, 4}: "Airgain, Inc.", + [3]byte{0, 28, 5}: "Nonin Medical Inc.", + [3]byte{0, 28, 6}: "Siemens Numerical Control Ltd., Nanjing", + [3]byte{0, 28, 7}: "Cwlinux Limited", + [3]byte{0, 28, 8}: "Echo360, Inc.", + [3]byte{0, 28, 9}: "SAE Electronic Co.,Ltd.", + [3]byte{0, 28, 10}: "Shenzhen AEE Technology Co.,Ltd.", + [3]byte{0, 28, 11}: "SmartAnt Telecom", + [3]byte{0, 28, 12}: "TANITA Corporation", + [3]byte{0, 28, 13}: "G-Technology, Inc.", + [3]byte{0, 28, 14}: "CISCO SYSTEMS, INC.", + [3]byte{0, 28, 15}: "CISCO SYSTEMS, INC.", + [3]byte{0, 28, 16}: "Cisco-Linksys, LLC", + [3]byte{0, 28, 17}: "ARRIS Group, Inc.", + [3]byte{0, 28, 18}: "ARRIS Group, Inc.", + [3]byte{0, 28, 19}: "OPTSYS TECHNOLOGY CO., LTD.", + [3]byte{0, 28, 20}: "VMware, Inc", + [3]byte{0, 28, 21}: "iPhotonix LLC", + [3]byte{0, 28, 22}: "ThyssenKrupp Elevator", + [3]byte{0, 28, 23}: "Nortel", + [3]byte{0, 28, 24}: "Sicert S.r.L.", + [3]byte{0, 28, 25}: "secunet Security Networks AG", + [3]byte{0, 28, 26}: "Thomas Instrumentation, Inc", + [3]byte{0, 28, 27}: "Hyperstone GmbH", + [3]byte{0, 28, 28}: "Center Communication Systems GmbH", + [3]byte{0, 28, 29}: "CHENZHOU GOSPELL DIGITAL TECHNOLOGY CO.,LTD", + [3]byte{0, 28, 30}: "emtrion GmbH", + [3]byte{0, 28, 31}: "Quest Retail Technology Pty Ltd", + [3]byte{0, 28, 32}: "CLB Benelux", + [3]byte{0, 28, 33}: "Nucsafe Inc.", + [3]byte{0, 28, 34}: "Aeris Elettronica s.r.l.", + [3]byte{0, 28, 35}: "Dell Inc", + [3]byte{0, 28, 36}: "Formosa Wireless Systems Corp.", + [3]byte{0, 28, 37}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{0, 28, 38}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{0, 28, 39}: "Sunell Electronics Co.", + [3]byte{0, 28, 40}: "Sphairon Technologies GmbH", + [3]byte{0, 28, 41}: "CORE DIGITAL ELECTRONICS CO., LTD", + [3]byte{0, 28, 42}: "Envisacor Technologies Inc.", + [3]byte{0, 28, 43}: "Alertme.com Limited", + [3]byte{0, 28, 44}: "Synapse", + [3]byte{0, 28, 45}: "FlexRadio Systems", + [3]byte{0, 28, 46}: "HPN Supply Chain", + [3]byte{0, 28, 47}: "Pfister GmbH", + [3]byte{0, 28, 48}: "Mode Lighting (UK ) Ltd.", + [3]byte{0, 28, 49}: "Mobile XP Technology Co., LTD", + [3]byte{0, 28, 50}: "Telian Corporation", + [3]byte{0, 28, 51}: "Sutron", + [3]byte{0, 28, 52}: "HUEY CHIAO INTERNATIONAL CO., LTD.", + [3]byte{0, 28, 53}: "Nokia Danmark A/S", + [3]byte{0, 28, 54}: "iNEWiT NV", + [3]byte{0, 28, 55}: "Callpod, Inc.", + [3]byte{0, 28, 56}: "Bio-Rad Laboratories, Inc.", + [3]byte{0, 28, 57}: "S Netsystems Inc.", + [3]byte{0, 28, 58}: "Element Labs, Inc.", + [3]byte{0, 28, 59}: "AmRoad Technology Inc.", + [3]byte{0, 28, 60}: "Seon Design Inc.", + [3]byte{0, 28, 61}: "WaveStorm", + [3]byte{0, 28, 62}: "ECKey Corporation", + [3]byte{0, 28, 63}: "International Police Technologies, Inc.", + [3]byte{0, 28, 64}: "VDG-Security bv", + [3]byte{0, 28, 65}: "scemtec Transponder Technology GmbH", + [3]byte{0, 28, 66}: "Parallels, Inc.", + [3]byte{0, 28, 67}: "Samsung Electronics Co.,Ltd", + [3]byte{0, 28, 68}: "Bosch Security Systems BV", + [3]byte{0, 28, 69}: "Chenbro Micom Co., Ltd.", + [3]byte{0, 28, 70}: "QTUM", + [3]byte{0, 28, 71}: "Hangzhou Hollysys Automation Co., Ltd", + [3]byte{0, 28, 72}: "WiDeFi, Inc.", + [3]byte{0, 28, 73}: "Zoltan Technology Inc.", + [3]byte{0, 28, 74}: "AVM GmbH", + [3]byte{0, 28, 75}: "Gener8, Inc.", + [3]byte{0, 28, 76}: "Petrotest Instruments", + [3]byte{0, 28, 77}: "Aplix IP Holdings Corporation", + [3]byte{0, 28, 78}: "TASA International Limited", + [3]byte{0, 28, 79}: "MACAB AB", + [3]byte{0, 28, 80}: "TCL Technoly Electronics(Huizhou)Co.,Ltd", + [3]byte{0, 28, 81}: "Celeno Communications", + [3]byte{0, 28, 82}: "VISIONEE SRL", + [3]byte{0, 28, 83}: "Synergy Lighting Controls", + [3]byte{0, 28, 84}: "Hillstone Networks Inc", + [3]byte{0, 28, 85}: "Shenzhen Kaifa Technology Co.", + [3]byte{0, 28, 86}: "Pado Systems, Inc.", + [3]byte{0, 28, 87}: "CISCO SYSTEMS, INC.", + [3]byte{0, 28, 88}: "CISCO SYSTEMS, INC.", + [3]byte{0, 28, 89}: "DEVON IT", + [3]byte{0, 28, 90}: "Advanced Relay Corporation", + [3]byte{0, 28, 91}: "Chubb Electronic Security Systems Ltd", + [3]byte{0, 28, 92}: "Integrated Medical Systems, Inc.", + [3]byte{0, 28, 93}: "Leica Microsystems", + [3]byte{0, 28, 94}: "ASTON France", + [3]byte{0, 28, 95}: "Winland Electronics, Inc.", + [3]byte{0, 28, 96}: "CSP Frontier Technologies,Inc.", + [3]byte{0, 28, 97}: "Galaxy Microsystems LImited", + [3]byte{0, 28, 98}: "LG Electronics Inc", + [3]byte{0, 28, 99}: "TRUEN", + [3]byte{0, 28, 100}: "Landis+Gyr", + [3]byte{0, 28, 101}: "JoeScan, Inc.", + [3]byte{0, 28, 102}: "UCAMP CO.,LTD", + [3]byte{0, 28, 103}: "Pumpkin Networks, Inc.", + [3]byte{0, 28, 104}: "Anhui Sun Create Electronics Co., Ltd", + [3]byte{0, 28, 105}: "Packet Vision Ltd", + [3]byte{0, 28, 106}: "Weiss Engineering Ltd.", + [3]byte{0, 28, 107}: "COVAX Co. Ltd", + [3]byte{0, 28, 108}: "Jabil Circuit (Guangzhou) Limited", + [3]byte{0, 28, 109}: "KYOHRITSU ELECTRONIC INDUSTRY CO., LTD.", + [3]byte{0, 28, 110}: "Newbury Networks, Inc.", + [3]byte{0, 28, 111}: "Emfit Ltd", + [3]byte{0, 28, 112}: "NOVACOMM LTDA", + [3]byte{0, 28, 113}: "Emergent Electronics", + [3]byte{0, 28, 114}: "Mayer & Cie GmbH & Co KG", + [3]byte{0, 28, 115}: "Arista Networks, Inc.", + [3]byte{0, 28, 116}: "Syswan Technologies Inc.", + [3]byte{0, 28, 117}: "Segnet Ltd.", + [3]byte{0, 28, 118}: "The Wandsworth Group Ltd", + [3]byte{0, 28, 119}: "Prodys", + [3]byte{0, 28, 120}: "WYPLAY SAS", + [3]byte{0, 28, 121}: "Cohesive Financial Technologies LLC", + [3]byte{0, 28, 122}: "Perfectone Netware Company Ltd", + [3]byte{0, 28, 123}: "Castlenet Technology Inc.", + [3]byte{0, 28, 124}: "PERQ SYSTEMS CORPORATION", + [3]byte{0, 28, 125}: "Excelpoint Manufacturing Pte Ltd", + [3]byte{0, 28, 126}: "Toshiba", + [3]byte{0, 28, 127}: "Check Point Software Technologies", + [3]byte{0, 28, 128}: "New Business Division/Rhea-Information CO., LTD.", + [3]byte{0, 28, 129}: "NextGen Venturi LTD", + [3]byte{0, 28, 130}: "Genew Technologies", + [3]byte{0, 28, 131}: "New Level Telecom Co., Ltd.", + [3]byte{0, 28, 132}: "STL Solution Co.,Ltd.", + [3]byte{0, 28, 133}: "Eunicorn", + [3]byte{0, 28, 134}: "Cranite Systems, Inc.", + [3]byte{0, 28, 135}: "Uriver Inc.", + [3]byte{0, 28, 136}: "TRANSYSTEM INC.", + [3]byte{0, 28, 137}: "Force Communications, Inc.", + [3]byte{0, 28, 138}: "Cirrascale Corporation", + [3]byte{0, 28, 139}: "MJ Innovations Ltd.", + [3]byte{0, 28, 140}: "DIAL TECHNOLOGY LTD.", + [3]byte{0, 28, 141}: "Mesa Imaging", + [3]byte{0, 28, 142}: "Alcatel-Lucent IPD", + [3]byte{0, 28, 143}: "Advanced Electronic Design, Inc.", + [3]byte{0, 28, 144}: "Empacket Corporation", + [3]byte{0, 28, 145}: "Gefen Inc.", + [3]byte{0, 28, 146}: "Tervela", + [3]byte{0, 28, 147}: "ExaDigm Inc", + [3]byte{0, 28, 148}: "LI-COR Biosciences", + [3]byte{0, 28, 149}: "Opticomm Corporation", + [3]byte{0, 28, 150}: "Linkwise Technology Pte Ltd", + [3]byte{0, 28, 151}: "Enzytek Technology Inc.,", + [3]byte{0, 28, 152}: "LUCKY TECHNOLOGY (HK) COMPANY LIMITED", + [3]byte{0, 28, 153}: "Shunra Software Ltd.", + [3]byte{0, 28, 154}: "Nokia Danmark A/S", + [3]byte{0, 28, 155}: "FEIG ELECTRONIC GmbH", + [3]byte{0, 28, 156}: "Nortel", + [3]byte{0, 28, 157}: "Liecthi AG", + [3]byte{0, 28, 158}: "Dualtech IT AB", + [3]byte{0, 28, 159}: "Razorstream, LLC", + [3]byte{0, 28, 160}: "Production Resource Group, LLC", + [3]byte{0, 28, 161}: "AKAMAI TECHNOLOGIES, INC.", + [3]byte{0, 28, 162}: "ADB Broadband Italia", + [3]byte{0, 28, 163}: "Terra", + [3]byte{0, 28, 164}: "Sony Ericsson Mobile Communications", + [3]byte{0, 28, 165}: "Zygo Corporation", + [3]byte{0, 28, 166}: "Win4NET", + [3]byte{0, 28, 167}: "International Quartz Limited", + [3]byte{0, 28, 168}: "AirTies Wireless Networks", + [3]byte{0, 28, 169}: "Audiomatica Srl", + [3]byte{0, 28, 170}: "Bellon Pty Ltd", + [3]byte{0, 28, 171}: "Meyer Sound Laboratories, Inc.", + [3]byte{0, 28, 172}: "Qniq Technology Corp.", + [3]byte{0, 28, 173}: "Wuhan Telecommunication Devices Co.,Ltd", + [3]byte{0, 28, 174}: "WiChorus, Inc.", + [3]byte{0, 28, 175}: "Plato Networks Inc.", + [3]byte{0, 28, 176}: "CISCO SYSTEMS, INC.", + [3]byte{0, 28, 177}: "CISCO SYSTEMS, INC.", + [3]byte{0, 28, 178}: "BPT SPA", + [3]byte{0, 28, 179}: "Apple", + [3]byte{0, 28, 180}: "Iridium Satellite LLC", + [3]byte{0, 28, 181}: "Neihua Network Technology Co.,LTD.(NHN)", + [3]byte{0, 28, 182}: "Duzon CNT Co., Ltd.", + [3]byte{0, 28, 183}: "USC DigiArk Corporation", + [3]byte{0, 28, 184}: "CBC Co., Ltd", + [3]byte{0, 28, 185}: "KWANG SUNG ELECTRONICS CO., LTD.", + [3]byte{0, 28, 186}: "VerScient, Inc.", + [3]byte{0, 28, 187}: "MusicianLink", + [3]byte{0, 28, 188}: "CastGrabber, LLC", + [3]byte{0, 28, 189}: "Ezze Mobile Tech., Inc.", + [3]byte{0, 28, 190}: "Nintendo Co., Ltd.", + [3]byte{0, 28, 191}: "Intel Corporate", + [3]byte{0, 28, 192}: "Intel Corporate", + [3]byte{0, 28, 193}: "ARRIS Group, Inc.", + [3]byte{0, 28, 194}: "Part II Research, Inc.", + [3]byte{0, 28, 195}: "Pace plc", + [3]byte{0, 28, 196}: "Hewlett-Packard Company", + [3]byte{0, 28, 197}: "3COM LTD", + [3]byte{0, 28, 198}: "ProStor Systems", + [3]byte{0, 28, 199}: "Rembrandt Technologies, LLC d/b/a REMSTREAM", + [3]byte{0, 28, 200}: "INDUSTRONIC Industrie-Electronic GmbH & Co. KG", + [3]byte{0, 28, 201}: "Kaise Electronic Technology Co., Ltd.", + [3]byte{0, 28, 202}: "Shanghai Gaozhi Science & Technology Development Co.", + [3]byte{0, 28, 203}: "Forth Corporation Public Company Limited", + [3]byte{0, 28, 204}: "Research In Motion Limited", + [3]byte{0, 28, 205}: "Alektrona Corporation", + [3]byte{0, 28, 206}: "By Techdesign", + [3]byte{0, 28, 207}: "LIMETEK", + [3]byte{0, 28, 208}: "Circleone Co.,Ltd.", + [3]byte{0, 28, 209}: "Waves Audio LTD", + [3]byte{0, 28, 210}: "King Champion (Hong Kong) Limited", + [3]byte{0, 28, 211}: "ZP Engineering SEL", + [3]byte{0, 28, 212}: "Nokia Danmark A/S", + [3]byte{0, 28, 213}: "ZeeVee, Inc.", + [3]byte{0, 28, 214}: "Nokia Danmark A/S", + [3]byte{0, 28, 215}: "Harman/Becker Automotive Systems GmbH", + [3]byte{0, 28, 216}: "BlueAnt Wireless", + [3]byte{0, 28, 217}: "GlobalTop Technology Inc.", + [3]byte{0, 28, 218}: "Exegin Technologies Limited", + [3]byte{0, 28, 219}: "CARPOINT CO.,LTD", + [3]byte{0, 28, 220}: "Custom Computer Services, Inc.", + [3]byte{0, 28, 221}: "COWBELL ENGINEERING CO., LTD.", + [3]byte{0, 28, 222}: "Interactive Multimedia eXchange Inc.", + [3]byte{0, 28, 223}: "Belkin International Inc.", + [3]byte{0, 28, 224}: "DASAN TPS", + [3]byte{0, 28, 225}: "INDRA SISTEMAS, S.A.", + [3]byte{0, 28, 226}: "Attero Tech, LLC.", + [3]byte{0, 28, 227}: "Optimedical Systems", + [3]byte{0, 28, 228}: "EleSy JSC", + [3]byte{0, 28, 229}: "MBS Electronic Systems GmbH", + [3]byte{0, 28, 230}: "INNES", + [3]byte{0, 28, 231}: "Rocon PLC Research Centre", + [3]byte{0, 28, 232}: "Cummins Inc", + [3]byte{0, 28, 233}: "Galaxy Technology Limited", + [3]byte{0, 28, 234}: "Scientific-Atlanta, Inc", + [3]byte{0, 28, 235}: "Nortel", + [3]byte{0, 28, 236}: "Mobilesoft (Aust.) Pty Ltd", + [3]byte{0, 28, 237}: "ENVIRONNEMENT SA", + [3]byte{0, 28, 238}: "SHARP Corporation", + [3]byte{0, 28, 239}: "Primax Electronics LTD", + [3]byte{0, 28, 240}: "D-Link Corporation", + [3]byte{0, 28, 241}: "SUPoX Technology Co. , LTD.", + [3]byte{0, 28, 242}: "Tenlon Technology Co.,Ltd.", + [3]byte{0, 28, 243}: "EVS BROADCAST EQUIPMENT", + [3]byte{0, 28, 244}: "Media Technology Systems Inc", + [3]byte{0, 28, 245}: "Wiseblue Technology Limited", + [3]byte{0, 28, 246}: "CISCO SYSTEMS, INC.", + [3]byte{0, 28, 247}: "AudioScience", + [3]byte{0, 28, 248}: "Parade Technologies, Ltd.", + [3]byte{0, 28, 249}: "CISCO SYSTEMS, INC.", + [3]byte{0, 28, 250}: "Alarm.com", + [3]byte{0, 28, 251}: "ARRIS Group, Inc.", + [3]byte{0, 28, 252}: "Suminet Communication Technologies (Shanghai) Co., Ltd.", + [3]byte{0, 28, 253}: "Universal Electronics", + [3]byte{0, 28, 254}: "Quartics Inc", + [3]byte{0, 28, 255}: "Napera Networks Inc", + [3]byte{0, 29, 0}: "Brivo Systems, LLC", + [3]byte{0, 29, 1}: "Neptune Digital", + [3]byte{0, 29, 2}: "Cybertech Telecom Development", + [3]byte{0, 29, 3}: "Design Solutions Inc.", + [3]byte{0, 29, 4}: "Zipit Wireless, Inc.", + [3]byte{0, 29, 5}: "Eaton Corporation", + [3]byte{0, 29, 6}: "HM Electronics, Inc.", + [3]byte{0, 29, 7}: "Shenzhen Sang Fei Consumer Communications Co.,Ltd", + [3]byte{0, 29, 8}: "JIANGSU YINHE ELECTRONICS CO., LTD", + [3]byte{0, 29, 9}: "Dell Inc", + [3]byte{0, 29, 10}: "Davis Instruments, Inc.", + [3]byte{0, 29, 11}: "Power Standards Lab", + [3]byte{0, 29, 12}: "MobileCompia", + [3]byte{0, 29, 13}: "Sony Computer Entertainment inc.", + [3]byte{0, 29, 14}: "Agapha Technology co., Ltd.", + [3]byte{0, 29, 15}: "TP-LINK Technologies Co., Ltd.", + [3]byte{0, 29, 16}: "LightHaus Logic, Inc.", + [3]byte{0, 29, 17}: "Analogue & Micro Ltd", + [3]byte{0, 29, 18}: "ROHM CO., LTD.", + [3]byte{0, 29, 19}: "NextGTV", + [3]byte{0, 29, 20}: "SPERADTONE INFORMATION TECHNOLOGY LIMITED", + [3]byte{0, 29, 21}: "Shenzhen Dolphin Electronic Co., Ltd", + [3]byte{0, 29, 22}: "SFR", + [3]byte{0, 29, 23}: "Digital Sky Corporation", + [3]byte{0, 29, 24}: "Power Innovation GmbH", + [3]byte{0, 29, 25}: "Arcadyan Technology Corporation", + [3]byte{0, 29, 26}: "OvisLink S.A.", + [3]byte{0, 29, 27}: "Sangean Electronics Inc.", + [3]byte{0, 29, 28}: "Gennet s.a.", + [3]byte{0, 29, 29}: "Inter-M Corporation", + [3]byte{0, 29, 30}: "KYUSHU TEN CO.,LTD", + [3]byte{0, 29, 31}: "Siauliu Tauro Televizoriai, JSC", + [3]byte{0, 29, 32}: "COMTREND CO.", + [3]byte{0, 29, 33}: "Alcad SL", + [3]byte{0, 29, 34}: "Foss Analytical A/S", + [3]byte{0, 29, 35}: "SENSUS", + [3]byte{0, 29, 36}: "Aclara Power-Line Systems Inc.", + [3]byte{0, 29, 37}: "Samsung Electronics Co.,Ltd", + [3]byte{0, 29, 38}: "Rockridgesound Technology Co.", + [3]byte{0, 29, 39}: "NAC-INTERCOM", + [3]byte{0, 29, 40}: "Sony Ericsson Mobile Communications AB", + [3]byte{0, 29, 41}: "Doro AB", + [3]byte{0, 29, 42}: "SHENZHEN BUL-TECH CO.,LTD.", + [3]byte{0, 29, 43}: "Wuhan Pont Technology CO. , LTD", + [3]byte{0, 29, 44}: "Wavetrend Technologies (Pty) Limited", + [3]byte{0, 29, 45}: "Pylone, Inc.", + [3]byte{0, 29, 46}: "Ruckus Wireless", + [3]byte{0, 29, 47}: "QuantumVision Corporation", + [3]byte{0, 29, 48}: "YX Wireless S.A.", + [3]byte{0, 29, 49}: "HIGHPRO INTERNATIONAL R&D CO,.LTD.", + [3]byte{0, 29, 50}: "Longkay Communication & Technology (Shanghai) Co. Ltd", + [3]byte{0, 29, 51}: "Maverick Systems Inc.", + [3]byte{0, 29, 52}: "SYRIS Technology Corp", + [3]byte{0, 29, 53}: "Viconics Electronics Inc.", + [3]byte{0, 29, 54}: "ELECTRONICS CORPORATION OF INDIA LIMITED", + [3]byte{0, 29, 55}: "Thales-Panda Transportation System", + [3]byte{0, 29, 56}: "Seagate Technology", + [3]byte{0, 29, 57}: "MOOHADIGITAL CO., LTD", + [3]byte{0, 29, 58}: "mh acoustics LLC", + [3]byte{0, 29, 59}: "Nokia Danmark A/S", + [3]byte{0, 29, 60}: "Muscle Corporation", + [3]byte{0, 29, 61}: "Avidyne Corporation", + [3]byte{0, 29, 62}: "SAKA TECHNO SCIENCE CO.,LTD", + [3]byte{0, 29, 63}: "Mitron Pty Ltd", + [3]byte{0, 29, 64}: "Intel – GE Care Innovations LLC", + [3]byte{0, 29, 65}: "Hardy Instruments", + [3]byte{0, 29, 66}: "Nortel", + [3]byte{0, 29, 67}: "Shenzhen G-link Digital Technology Co., Ltd.", + [3]byte{0, 29, 68}: "KROHNE Messtechnik GmbH", + [3]byte{0, 29, 69}: "CISCO SYSTEMS, INC.", + [3]byte{0, 29, 70}: "CISCO SYSTEMS, INC.", + [3]byte{0, 29, 71}: "Covote GmbH & Co KG", + [3]byte{0, 29, 72}: "Sensor-Technik Wiedemann GmbH", + [3]byte{0, 29, 73}: "Innovation Wireless Inc.", + [3]byte{0, 29, 74}: "Carestream Health, Inc.", + [3]byte{0, 29, 75}: "Grid Connect Inc.", + [3]byte{0, 29, 76}: "Alcatel-Lucent", + [3]byte{0, 29, 77}: "Adaptive Recognition Hungary, Inc", + [3]byte{0, 29, 78}: "TCM Mobile LLC", + [3]byte{0, 29, 79}: "Apple", + [3]byte{0, 29, 80}: "SPINETIX SA", + [3]byte{0, 29, 81}: "Babcock & Wilcox Power Generation Group, Inc", + [3]byte{0, 29, 82}: "Defzone B.V.", + [3]byte{0, 29, 83}: "S&O Electronics (Malaysia) Sdn. Bhd.", + [3]byte{0, 29, 84}: "Sunnic Technology & Merchandise INC.", + [3]byte{0, 29, 85}: "ZANTAZ, Inc", + [3]byte{0, 29, 86}: "Kramer Electronics Ltd.", + [3]byte{0, 29, 87}: "CAETEC Messtechnik", + [3]byte{0, 29, 88}: "CQ Inc", + [3]byte{0, 29, 89}: "Mitra Energy & Infrastructure", + [3]byte{0, 29, 90}: "2Wire Inc.", + [3]byte{0, 29, 91}: "Tecvan Informática Ltda", + [3]byte{0, 29, 92}: "Tom Communication Industrial Co.,Ltd.", + [3]byte{0, 29, 93}: "Control Dynamics Pty. Ltd.", + [3]byte{0, 29, 94}: "COMING MEDIA CORP.", + [3]byte{0, 29, 95}: "OverSpeed SARL", + [3]byte{0, 29, 96}: "ASUSTek COMPUTER INC.", + [3]byte{0, 29, 97}: "BIJ Corporation", + [3]byte{0, 29, 98}: "InPhase Technologies", + [3]byte{0, 29, 99}: "Miele & Cie. KG", + [3]byte{0, 29, 100}: "Adam Communications Systems Int Ltd", + [3]byte{0, 29, 101}: "Microwave Radio Communications", + [3]byte{0, 29, 102}: "Hyundai Telecom", + [3]byte{0, 29, 103}: "AMEC", + [3]byte{0, 29, 104}: "Thomson Telecom Belgium", + [3]byte{0, 29, 105}: "Knorr-Bremse IT-Services GmbH", + [3]byte{0, 29, 106}: "Alpha Networks Inc.", + [3]byte{0, 29, 107}: "ARRIS Group, Inc.", + [3]byte{0, 29, 108}: "ClariPhy Communications, Inc.", + [3]byte{0, 29, 109}: "Confidant International LLC", + [3]byte{0, 29, 110}: "Nokia Danmark A/S", + [3]byte{0, 29, 111}: "Chainzone Technology Co., Ltd", + [3]byte{0, 29, 112}: "CISCO SYSTEMS, INC.", + [3]byte{0, 29, 113}: "CISCO SYSTEMS, INC.", + [3]byte{0, 29, 114}: "Wistron Corporation", + [3]byte{0, 29, 115}: "Buffalo Inc.", + [3]byte{0, 29, 116}: "Tianjin China-Silicon Microelectronics Co., Ltd.", + [3]byte{0, 29, 117}: "Radioscape PLC", + [3]byte{0, 29, 118}: "Eyeheight Ltd.", + [3]byte{0, 29, 119}: "NSGate", + [3]byte{0, 29, 120}: "Invengo Information Technology Co.,Ltd", + [3]byte{0, 29, 121}: "SIGNAMAX LLC", + [3]byte{0, 29, 122}: "Wideband Semiconductor, Inc.", + [3]byte{0, 29, 123}: "Ice Energy, Inc.", + [3]byte{0, 29, 124}: "ABE Elettronica S.p.A.", + [3]byte{0, 29, 125}: "GIGA-BYTE TECHNOLOGY CO.,LTD.", + [3]byte{0, 29, 126}: "Cisco-Linksys, LLC", + [3]byte{0, 29, 127}: "Tekron International Ltd", + [3]byte{0, 29, 128}: "Beijing Huahuan Eletronics Co.,Ltd", + [3]byte{0, 29, 129}: "GUANGZHOU GATEWAY ELECTRONICS CO., LTD", + [3]byte{0, 29, 130}: "GN A/S (GN Netcom A/S)", + [3]byte{0, 29, 131}: "Emitech Corporation", + [3]byte{0, 29, 132}: "Gateway, Inc.", + [3]byte{0, 29, 133}: "Call Direct Cellular Solutions", + [3]byte{0, 29, 134}: "Shinwa Industries(China) Ltd.", + [3]byte{0, 29, 135}: "VigTech Labs Sdn Bhd", + [3]byte{0, 29, 136}: "Clearwire", + [3]byte{0, 29, 137}: "VaultStor Corporation", + [3]byte{0, 29, 138}: "TechTrex Inc", + [3]byte{0, 29, 139}: "ADB Broadband Italia", + [3]byte{0, 29, 140}: "La Crosse Technology LTD", + [3]byte{0, 29, 141}: "Raytek GmbH", + [3]byte{0, 29, 142}: "Alereon, Inc.", + [3]byte{0, 29, 143}: "PureWave Networks", + [3]byte{0, 29, 144}: "EMCO Flow Systems", + [3]byte{0, 29, 145}: "Digitize, Inc", + [3]byte{0, 29, 146}: "MICRO-STAR INT'L CO.,LTD.", + [3]byte{0, 29, 147}: "Modacom", + [3]byte{0, 29, 148}: "Climax Technology Co., Ltd", + [3]byte{0, 29, 149}: "Flash, Inc.", + [3]byte{0, 29, 150}: "WatchGuard Video", + [3]byte{0, 29, 151}: "Alertus Technologies LLC", + [3]byte{0, 29, 152}: "Nokia Danmark A/S", + [3]byte{0, 29, 153}: "Cyan Optic, Inc.", + [3]byte{0, 29, 154}: "GODEX INTERNATIONAL CO., LTD", + [3]byte{0, 29, 155}: "Hokuyo Automatic Co., Ltd.", + [3]byte{0, 29, 156}: "Rockwell Automation", + [3]byte{0, 29, 157}: "ARTJOY INTERNATIONAL LIMITED", + [3]byte{0, 29, 158}: "AXION TECHNOLOGIES", + [3]byte{0, 29, 159}: "MATT R.P.Traczynscy Sp.J.", + [3]byte{0, 29, 160}: "Heng Yu Electronic Manufacturing Company Limited", + [3]byte{0, 29, 161}: "CISCO SYSTEMS, INC.", + [3]byte{0, 29, 162}: "CISCO SYSTEMS, INC.", + [3]byte{0, 29, 163}: "SabiOso", + [3]byte{0, 29, 164}: "Hangzhou System Technology CO., LTD", + [3]byte{0, 29, 165}: "WB Electronics", + [3]byte{0, 29, 166}: "Media Numerics Limited", + [3]byte{0, 29, 167}: "Seamless Internet", + [3]byte{0, 29, 168}: "Takahata Electronics Co.,Ltd", + [3]byte{0, 29, 169}: "Castles Technology, Co., LTD", + [3]byte{0, 29, 170}: "DrayTek Corp.", + [3]byte{0, 29, 171}: "SwissQual License AG", + [3]byte{0, 29, 172}: "Gigamon Systems LLC", + [3]byte{0, 29, 173}: "Sinotech Engineering Consultants, Inc. Geotechnical Enginee", + [3]byte{0, 29, 174}: "CHANG TSENG TECHNOLOGY CO., LTD", + [3]byte{0, 29, 175}: "Nortel", + [3]byte{0, 29, 176}: "FuJian HengTong Information Technology Co.,Ltd", + [3]byte{0, 29, 177}: "Crescendo Networks", + [3]byte{0, 29, 178}: "HOKKAIDO ELECTRIC ENGINEERING CO.,LTD.", + [3]byte{0, 29, 179}: "HPN Supply Chain", + [3]byte{0, 29, 180}: "KUMHO ENG CO.,LTD", + [3]byte{0, 29, 181}: "Juniper networks", + [3]byte{0, 29, 182}: "BestComm Networks, Inc.", + [3]byte{0, 29, 183}: "Tendril Networks, Inc.", + [3]byte{0, 29, 184}: "Intoto Inc.", + [3]byte{0, 29, 185}: "Wellspring Wireless", + [3]byte{0, 29, 186}: "Sony Corporation", + [3]byte{0, 29, 187}: "Dynamic System Electronics Corp.", + [3]byte{0, 29, 188}: "Nintendo Co., Ltd.", + [3]byte{0, 29, 189}: "Versamed Inc.", + [3]byte{0, 29, 190}: "ARRIS Group, Inc.", + [3]byte{0, 29, 191}: "Radiient Technologies, Inc.", + [3]byte{0, 29, 192}: "Enphase Energy", + [3]byte{0, 29, 193}: "Audinate Pty L", + [3]byte{0, 29, 194}: "XORTEC OY", + [3]byte{0, 29, 195}: "RIKOR TV, Ltd", + [3]byte{0, 29, 196}: "AIOI Systems Co., Ltd.", + [3]byte{0, 29, 197}: "Beijing Jiaxun Feihong Electricial Co., Ltd.", + [3]byte{0, 29, 198}: "SNR Inc.", + [3]byte{0, 29, 199}: "L-3 Communications Geneva Aerospace", + [3]byte{0, 29, 200}: "Navionics Research Inc., dba SCADAmetrics", + [3]byte{0, 29, 201}: "GainSpan Corp.", + [3]byte{0, 29, 202}: "PAV Electronics Limited", + [3]byte{0, 29, 203}: "Exéns Development Oy", + [3]byte{0, 29, 204}: "Hetra Secure Solutions", + [3]byte{0, 29, 205}: "ARRIS Group, Inc.", + [3]byte{0, 29, 206}: "ARRIS Group, Inc.", + [3]byte{0, 29, 207}: "ARRIS Group, Inc.", + [3]byte{0, 29, 208}: "ARRIS Group, Inc.", + [3]byte{0, 29, 209}: "ARRIS Group, Inc.", + [3]byte{0, 29, 210}: "ARRIS Group, Inc.", + [3]byte{0, 29, 211}: "ARRIS Group, Inc.", + [3]byte{0, 29, 212}: "ARRIS Group, Inc.", + [3]byte{0, 29, 213}: "ARRIS Group, Inc.", + [3]byte{0, 29, 214}: "ARRIS Group, Inc.", + [3]byte{0, 29, 215}: "Algolith", + [3]byte{0, 29, 216}: "Microsoft Corporation", + [3]byte{0, 29, 217}: "Hon Hai Precision Ind.Co.,Ltd.", + [3]byte{0, 29, 218}: "Mikroelektronika spol. s r. o.", + [3]byte{0, 29, 219}: "C-BEL Corporation", + [3]byte{0, 29, 220}: "HangZhou DeChangLong Tech&Info Co.,Ltd", + [3]byte{0, 29, 221}: "DAT H.K. LIMITED", + [3]byte{0, 29, 222}: "Zhejiang Broadcast&Television Technology Co.,Ltd.", + [3]byte{0, 29, 223}: "Sunitec Enterprise Co., Ltd.", + [3]byte{0, 29, 224}: "Intel Corporate", + [3]byte{0, 29, 225}: "Intel Corporate", + [3]byte{0, 29, 226}: "Radionor Communications", + [3]byte{0, 29, 227}: "Intuicom", + [3]byte{0, 29, 228}: "Visioneered Image Systems", + [3]byte{0, 29, 229}: "CISCO SYSTEMS, INC.", + [3]byte{0, 29, 230}: "CISCO SYSTEMS, INC.", + [3]byte{0, 29, 231}: "Marine Sonic Technology, Ltd.", + [3]byte{0, 29, 232}: "Nikko Denki Tsushin Corporation(NDTC)", + [3]byte{0, 29, 233}: "Nokia Danmark A/S", + [3]byte{0, 29, 234}: "Commtest Instruments Ltd", + [3]byte{0, 29, 235}: "DINEC International", + [3]byte{0, 29, 236}: "Marusys", + [3]byte{0, 29, 237}: "Grid Net, Inc.", + [3]byte{0, 29, 238}: "NEXTVISION SISTEMAS DIGITAIS DE TELEVISÃO LTDA.", + [3]byte{0, 29, 239}: "TRIMM, INC.", + [3]byte{0, 29, 240}: "Vidient Systems, Inc.", + [3]byte{0, 29, 241}: "Intego Systems, Inc.", + [3]byte{0, 29, 242}: "Netflix, Inc.", + [3]byte{0, 29, 243}: "SBS Science & Technology Co., Ltd", + [3]byte{0, 29, 244}: "Magellan Technology Pty Limited", + [3]byte{0, 29, 245}: "Sunshine Co,LTD", + [3]byte{0, 29, 246}: "Samsung Electronics Co.,Ltd", + [3]byte{0, 29, 247}: "R. STAHL Schaltgeräte GmbH", + [3]byte{0, 29, 248}: "Webpro Vision Technology Corporation", + [3]byte{0, 29, 249}: "Cybiotronics (Far East) Limited", + [3]byte{0, 29, 250}: "Fujian LANDI Commercial Equipment Co.,Ltd", + [3]byte{0, 29, 251}: "NETCLEUS Systems Corporation", + [3]byte{0, 29, 252}: "KSIC", + [3]byte{0, 29, 253}: "Nokia Danmark A/S", + [3]byte{0, 29, 254}: "Palm, Inc", + [3]byte{0, 29, 255}: "Network Critical Solutions Ltd", + [3]byte{0, 30, 0}: "Shantou Institute of Ultrasonic Instruments", + [3]byte{0, 30, 1}: "Renesas Technology Sales Co., Ltd.", + [3]byte{0, 30, 2}: "Sougou Keikaku Kougyou Co.,Ltd.", + [3]byte{0, 30, 3}: "LiComm Co., Ltd.", + [3]byte{0, 30, 4}: "Hanson Research Corporation", + [3]byte{0, 30, 5}: "Xseed Technologies & Computing", + [3]byte{0, 30, 6}: "WIBRAIN", + [3]byte{0, 30, 7}: "Winy Technology Co., Ltd.", + [3]byte{0, 30, 8}: "Centec Networks Inc", + [3]byte{0, 30, 9}: "ZEFATEK Co.,LTD", + [3]byte{0, 30, 10}: "Syba Tech Limited", + [3]byte{0, 30, 11}: "Hewlett-Packard Company", + [3]byte{0, 30, 12}: "Sherwood Information Partners, Inc.", + [3]byte{0, 30, 13}: "Micran Ltd.", + [3]byte{0, 30, 14}: "MAXI VIEW HOLDINGS LIMITED", + [3]byte{0, 30, 15}: "Briot International", + [3]byte{0, 30, 16}: "ShenZhen Huawei Communication Technologies Co.,Ltd.", + [3]byte{0, 30, 17}: "ELELUX INTERNATIONAL LTD", + [3]byte{0, 30, 18}: "Ecolab", + [3]byte{0, 30, 19}: "CISCO SYSTEMS, INC.", + [3]byte{0, 30, 20}: "CISCO SYSTEMS, INC.", + [3]byte{0, 30, 21}: "Beech Hill Electronics", + [3]byte{0, 30, 22}: "Keytronix", + [3]byte{0, 30, 23}: "STN BV", + [3]byte{0, 30, 24}: "Radio Activity srl", + [3]byte{0, 30, 25}: "GTRI", + [3]byte{0, 30, 26}: "Best Source Taiwan Inc.", + [3]byte{0, 30, 27}: "Digital Stream Technology, Inc.", + [3]byte{0, 30, 28}: "SWS Australia Pty Limited", + [3]byte{0, 30, 29}: "East Coast Datacom, Inc.", + [3]byte{0, 30, 30}: "Honeywell Life Safety", + [3]byte{0, 30, 31}: "Nortel", + [3]byte{0, 30, 32}: "Intertain Inc.", + [3]byte{0, 30, 33}: "Qisda Co.", + [3]byte{0, 30, 34}: "ARVOO Imaging Products BV", + [3]byte{0, 30, 35}: "Electronic Educational Devices, Inc", + [3]byte{0, 30, 36}: "Zhejiang Bell Technology Co.,ltd", + [3]byte{0, 30, 37}: "Intek Digital Inc", + [3]byte{0, 30, 38}: "Digifriends Co. Ltd", + [3]byte{0, 30, 39}: "SBN TECH Co.,Ltd.", + [3]byte{0, 30, 40}: "Lumexis Corporation", + [3]byte{0, 30, 41}: "Hypertherm Inc", + [3]byte{0, 30, 42}: "Netgear Inc.", + [3]byte{0, 30, 43}: "Radio Systems Design, Inc.", + [3]byte{0, 30, 44}: "CyVerse Corporation", + [3]byte{0, 30, 45}: "STIM", + [3]byte{0, 30, 46}: "SIRTI S.p.A.", + [3]byte{0, 30, 47}: "DiMoto Pty Ltd", + [3]byte{0, 30, 48}: "Shireen Inc", + [3]byte{0, 30, 49}: "INFOMARK CO.,LTD.", + [3]byte{0, 30, 50}: "Zensys", + [3]byte{0, 30, 51}: "Inventec Corporation", + [3]byte{0, 30, 52}: "CryptoMetrics", + [3]byte{0, 30, 53}: "Nintendo Co., Ltd.", + [3]byte{0, 30, 54}: "IPTE", + [3]byte{0, 30, 55}: "Universal Global Scientific Industrial Co., Ltd.", + [3]byte{0, 30, 56}: "Bluecard Software Technology Co., Ltd.", + [3]byte{0, 30, 57}: "Comsys Communication Ltd.", + [3]byte{0, 30, 58}: "Nokia Danmark A/S", + [3]byte{0, 30, 59}: "Nokia Danmark A/S", + [3]byte{0, 30, 60}: "Lyngbox Media AB", + [3]byte{0, 30, 61}: "Alps Electric Co., Ltd", + [3]byte{0, 30, 62}: "KMW Inc.", + [3]byte{0, 30, 63}: "TrellisWare Technologies, Inc.", + [3]byte{0, 30, 64}: "Shanghai DareGlobal Technologies Co.,Ltd.", + [3]byte{0, 30, 65}: "Microwave Communication & Component, Inc.", + [3]byte{0, 30, 66}: "Teltonika", + [3]byte{0, 30, 67}: "AISIN AW CO.,LTD.", + [3]byte{0, 30, 68}: "SANTEC", + [3]byte{0, 30, 69}: "Sony Ericsson Mobile Communications AB", + [3]byte{0, 30, 70}: "ARRIS Group, Inc.", + [3]byte{0, 30, 71}: "PT. Hariff Daya Tunggal Engineering", + [3]byte{0, 30, 72}: "Wi-Links", + [3]byte{0, 30, 73}: "CISCO SYSTEMS, INC.", + [3]byte{0, 30, 74}: "CISCO SYSTEMS, INC.", + [3]byte{0, 30, 75}: "City Theatrical", + [3]byte{0, 30, 76}: "Hon Hai Precision Ind.Co., Ltd.", + [3]byte{0, 30, 77}: "Welkin Sciences, LLC", + [3]byte{0, 30, 78}: "DAKO EDV-Ingenieur- und Systemhaus GmbH", + [3]byte{0, 30, 79}: "Dell Inc.", + [3]byte{0, 30, 80}: "BATTISTONI RESEARCH", + [3]byte{0, 30, 81}: "Converter Industry Srl", + [3]byte{0, 30, 82}: "Apple", + [3]byte{0, 30, 83}: "Further Tech Co., LTD", + [3]byte{0, 30, 84}: "TOYO ELECTRIC Corporation", + [3]byte{0, 30, 85}: "COWON SYSTEMS,Inc.", + [3]byte{0, 30, 86}: "Bally Wulff Entertainment GmbH", + [3]byte{0, 30, 87}: "ALCOMA, spol. s r.o.", + [3]byte{0, 30, 88}: "D-Link Corporation", + [3]byte{0, 30, 89}: "Silicon Turnkey Express, LLC", + [3]byte{0, 30, 90}: "ARRIS Group, Inc.", + [3]byte{0, 30, 91}: "Unitron Company, Inc.", + [3]byte{0, 30, 92}: "RB GeneralEkonomik", + [3]byte{0, 30, 93}: "Holosys d.o.o.", + [3]byte{0, 30, 94}: "COmputime Ltd.", + [3]byte{0, 30, 95}: "KwikByte, LLC", + [3]byte{0, 30, 96}: "Digital Lighting Systems, Inc", + [3]byte{0, 30, 97}: "ITEC GmbH", + [3]byte{0, 30, 98}: "Siemon", + [3]byte{0, 30, 99}: "Vibro-Meter SA", + [3]byte{0, 30, 100}: "Intel Corporate", + [3]byte{0, 30, 101}: "Intel Corporate", + [3]byte{0, 30, 102}: "RESOL Elektronische Regelungen GmbH", + [3]byte{0, 30, 103}: "Intel Corporate", + [3]byte{0, 30, 104}: "Quanta Computer", + [3]byte{0, 30, 105}: "Thomson Inc.", + [3]byte{0, 30, 106}: "Beijing Bluexon Technology Co.,Ltd", + [3]byte{0, 30, 107}: "Cisco SPVTG", + [3]byte{0, 30, 108}: "Opaque Systems", + [3]byte{0, 30, 109}: "IT R&D Center", + [3]byte{0, 30, 110}: "Shenzhen First Mile Communications Ltd", + [3]byte{0, 30, 111}: "Magna-Power Electronics, Inc.", + [3]byte{0, 30, 112}: "Cobham Defence Communications Ltd", + [3]byte{0, 30, 113}: "MIrcom Group of Companies", + [3]byte{0, 30, 114}: "PCS", + [3]byte{0, 30, 115}: "ZTE CORPORATION", + [3]byte{0, 30, 116}: "SAGEM COMMUNICATION", + [3]byte{0, 30, 117}: "LG Electronics", + [3]byte{0, 30, 118}: "Thermo Fisher Scientific", + [3]byte{0, 30, 119}: "Air2App", + [3]byte{0, 30, 120}: "Owitek Technology Ltd.,", + [3]byte{0, 30, 121}: "CISCO SYSTEMS, INC.", + [3]byte{0, 30, 122}: "CISCO SYSTEMS, INC.", + [3]byte{0, 30, 123}: "R.I.CO. S.r.l.", + [3]byte{0, 30, 124}: "Taiwick Limited", + [3]byte{0, 30, 125}: "Samsung Electronics Co.,Ltd", + [3]byte{0, 30, 126}: "Nortel", + [3]byte{0, 30, 127}: "CBM of America", + [3]byte{0, 30, 128}: "Last Mile Ltd.", + [3]byte{0, 30, 129}: "CNB Technology Inc.", + [3]byte{0, 30, 130}: "SanDisk Corporation", + [3]byte{0, 30, 131}: "LAN/MAN Standards Association (LMSC)", + [3]byte{0, 30, 132}: "Pika Technologies Inc.", + [3]byte{0, 30, 133}: "Lagotek Corporation", + [3]byte{0, 30, 134}: "MEL Co.,Ltd.", + [3]byte{0, 30, 135}: "Realease Limited", + [3]byte{0, 30, 136}: "ANDOR SYSTEM SUPPORT CO., LTD.", + [3]byte{0, 30, 137}: "CRFS Limited", + [3]byte{0, 30, 138}: "eCopy, Inc", + [3]byte{0, 30, 139}: "Infra Access Korea Co., Ltd.", + [3]byte{0, 30, 140}: "ASUSTek COMPUTER INC.", + [3]byte{0, 30, 141}: "ARRIS Group, Inc.", + [3]byte{0, 30, 142}: "Hunkeler AG", + [3]byte{0, 30, 143}: "CANON INC.", + [3]byte{0, 30, 144}: "Elitegroup Computer Systems Co", + [3]byte{0, 30, 145}: "KIMIN Electronic Co., Ltd.", + [3]byte{0, 30, 146}: "JEULIN S.A.", + [3]byte{0, 30, 147}: "CiriTech Systems Inc", + [3]byte{0, 30, 148}: "SUPERCOM TECHNOLOGY CORPORATION", + [3]byte{0, 30, 149}: "SIGMALINK", + [3]byte{0, 30, 150}: "Sepura Plc", + [3]byte{0, 30, 151}: "Medium Link System Technology CO., LTD,", + [3]byte{0, 30, 152}: "GreenLine Communications", + [3]byte{0, 30, 153}: "Vantanol Industrial Corporation", + [3]byte{0, 30, 154}: "HAMILTON Bonaduz AG", + [3]byte{0, 30, 155}: "San-Eisha, Ltd.", + [3]byte{0, 30, 156}: "Fidustron INC", + [3]byte{0, 30, 157}: "Recall Technologies, Inc.", + [3]byte{0, 30, 158}: "ddm hopt + schuler Gmbh + Co. KG", + [3]byte{0, 30, 159}: "Visioneering Systems, Inc.", + [3]byte{0, 30, 160}: "XLN-t", + [3]byte{0, 30, 161}: "Brunata a/s", + [3]byte{0, 30, 162}: "Symx Systems, Inc.", + [3]byte{0, 30, 163}: "Nokia Danmark A/S", + [3]byte{0, 30, 164}: "Nokia Danmark A/S", + [3]byte{0, 30, 165}: "ROBOTOUS, Inc.", + [3]byte{0, 30, 166}: "Best IT World (India) Pvt. Ltd.", + [3]byte{0, 30, 167}: "ActionTec Electronics, Inc", + [3]byte{0, 30, 168}: "Datang Mobile Communications Equipment CO.,LTD", + [3]byte{0, 30, 169}: "Nintendo Co., Ltd.", + [3]byte{0, 30, 170}: "E-Senza Technologies GmbH", + [3]byte{0, 30, 171}: "TeleWell Oy", + [3]byte{0, 30, 172}: "Armadeus Systems", + [3]byte{0, 30, 173}: "Wingtech Group Limited", + [3]byte{0, 30, 174}: "Continental Automotive Systems", + [3]byte{0, 30, 175}: "Ophir Optronics Ltd", + [3]byte{0, 30, 176}: "ImesD Electronica S.L.", + [3]byte{0, 30, 177}: "Cryptsoft Pty Ltd", + [3]byte{0, 30, 178}: "LG innotek", + [3]byte{0, 30, 179}: "Primex Wireless", + [3]byte{0, 30, 180}: "UNIFAT TECHNOLOGY LTD.", + [3]byte{0, 30, 181}: "Ever Sparkle Technologies Ltd", + [3]byte{0, 30, 182}: "TAG Heuer SA", + [3]byte{0, 30, 183}: "TBTech, Co., Ltd.", + [3]byte{0, 30, 184}: "Fortis, Inc.", + [3]byte{0, 30, 185}: "Sing Fai Technology Limited", + [3]byte{0, 30, 186}: "High Density Devices AS", + [3]byte{0, 30, 187}: "BLUELIGHT TECHNOLOGY INC.", + [3]byte{0, 30, 188}: "WINTECH AUTOMATION CO.,LTD.", + [3]byte{0, 30, 189}: "CISCO SYSTEMS, INC.", + [3]byte{0, 30, 190}: "CISCO SYSTEMS, INC.", + [3]byte{0, 30, 191}: "Haas Automation Inc.", + [3]byte{0, 30, 192}: "Microchip Technology Inc.", + [3]byte{0, 30, 193}: "3COM EUROPE LTD", + [3]byte{0, 30, 194}: "Apple", + [3]byte{0, 30, 195}: "Kozio, Inc.", + [3]byte{0, 30, 196}: "Celio Corp", + [3]byte{0, 30, 197}: "Middle Atlantic Products Inc", + [3]byte{0, 30, 198}: "Obvius Holdings LLC", + [3]byte{0, 30, 199}: "2Wire, Inc.", + [3]byte{0, 30, 200}: "Rapid Mobile (Pty) Ltd", + [3]byte{0, 30, 201}: "Dell Inc", + [3]byte{0, 30, 202}: "Nortel", + [3]byte{0, 30, 203}: "\"RPC \"Energoautomatika\" Ltd", + [3]byte{0, 30, 204}: "CDVI", + [3]byte{0, 30, 205}: "KYLAND Technology Co. LTD", + [3]byte{0, 30, 206}: "BISA Technologies (Hong Kong) Limited", + [3]byte{0, 30, 207}: "PHILIPS ELECTRONICS UK LTD", + [3]byte{0, 30, 208}: "Ingespace", + [3]byte{0, 30, 209}: "Keyprocessor B.V.", + [3]byte{0, 30, 210}: "Ray Shine Video Technology Inc", + [3]byte{0, 30, 211}: "Dot Technology Int'l Co., Ltd.", + [3]byte{0, 30, 212}: "Doble Engineering", + [3]byte{0, 30, 213}: "Tekon-Automatics", + [3]byte{0, 30, 214}: "Alentec & Orion AB", + [3]byte{0, 30, 215}: "H-Stream Wireless, Inc.", + [3]byte{0, 30, 216}: "Digital United Inc.", + [3]byte{0, 30, 217}: "Mitsubishi Precision Co.,LTd.", + [3]byte{0, 30, 218}: "Wesemann Elektrotechniek B.V.", + [3]byte{0, 30, 219}: "Giken Trastem Co., Ltd.", + [3]byte{0, 30, 220}: "Sony Ericsson Mobile Communications AB", + [3]byte{0, 30, 221}: "WASKO S.A.", + [3]byte{0, 30, 222}: "BYD COMPANY LIMITED", + [3]byte{0, 30, 223}: "Master Industrialization Center Kista", + [3]byte{0, 30, 224}: "Urmet Domus SpA", + [3]byte{0, 30, 225}: "Samsung Electronics Co.,Ltd", + [3]byte{0, 30, 226}: "Samsung Electronics Co.,Ltd", + [3]byte{0, 30, 227}: "T&W Electronics (ShenZhen) Co.,Ltd", + [3]byte{0, 30, 228}: "ACS Solutions France", + [3]byte{0, 30, 229}: "Cisco-Linksys, LLC", + [3]byte{0, 30, 230}: "Shenzhen Advanced Video Info-Tech Co., Ltd.", + [3]byte{0, 30, 231}: "Epic Systems Inc", + [3]byte{0, 30, 232}: "Mytek", + [3]byte{0, 30, 233}: "Stoneridge Electronics AB", + [3]byte{0, 30, 234}: "Sensor Switch, Inc.", + [3]byte{0, 30, 235}: "Talk-A-Phone Co.", + [3]byte{0, 30, 236}: "COMPAL INFORMATION (KUNSHAN) CO., LTD.", + [3]byte{0, 30, 237}: "Adventiq Ltd.", + [3]byte{0, 30, 238}: "ETL Systems Ltd", + [3]byte{0, 30, 239}: "Cantronic International Limited", + [3]byte{0, 30, 240}: "Gigafin Networks", + [3]byte{0, 30, 241}: "Servimat", + [3]byte{0, 30, 242}: "Micro Motion Inc", + [3]byte{0, 30, 243}: "From2", + [3]byte{0, 30, 244}: "L-3 Communications Display Systems", + [3]byte{0, 30, 245}: "Hitek Automated Inc.", + [3]byte{0, 30, 246}: "CISCO SYSTEMS, INC.", + [3]byte{0, 30, 247}: "CISCO SYSTEMS, INC.", + [3]byte{0, 30, 248}: "Emfinity Inc.", + [3]byte{0, 30, 249}: "Pascom Kommunikations systeme GmbH.", + [3]byte{0, 30, 250}: "PROTEI Ltd.", + [3]byte{0, 30, 251}: "Trio Motion Technology Ltd", + [3]byte{0, 30, 252}: "JSC \"MASSA-K\"", + [3]byte{0, 30, 253}: "Microbit 2.0 AB", + [3]byte{0, 30, 254}: "LEVEL s.r.o.", + [3]byte{0, 30, 255}: "Mueller-Elektronik GmbH & Co. KG", + [3]byte{0, 31, 0}: "Nokia Danmark A/S", + [3]byte{0, 31, 1}: "Nokia Danmark A/S", + [3]byte{0, 31, 2}: "Pixelmetrix Corporation Pte Ltd", + [3]byte{0, 31, 3}: "NUM AG", + [3]byte{0, 31, 4}: "Granch Ltd.", + [3]byte{0, 31, 5}: "iTAS Technology Corp.", + [3]byte{0, 31, 6}: "Integrated Dispatch Solutions", + [3]byte{0, 31, 7}: "AZTEQ Mobile", + [3]byte{0, 31, 8}: "RISCO LTD", + [3]byte{0, 31, 9}: "JASTEC CO., LTD.", + [3]byte{0, 31, 10}: "Nortel", + [3]byte{0, 31, 11}: "Federal State Unitary Enterprise Industrial Union\"Electropribor\"", + [3]byte{0, 31, 12}: "Intelligent Digital Services GmbH", + [3]byte{0, 31, 13}: "L3 Communications - Telemetry West", + [3]byte{0, 31, 14}: "Japan Kyastem Co., Ltd", + [3]byte{0, 31, 15}: "Select Engineered Systems", + [3]byte{0, 31, 16}: "TOLEDO DO BRASIL INDUSTRIA DE BALANCAS LTDA", + [3]byte{0, 31, 17}: "OPENMOKO, INC.", + [3]byte{0, 31, 18}: "Juniper Networks", + [3]byte{0, 31, 19}: "S.& A.S. Ltd.", + [3]byte{0, 31, 20}: "NexG", + [3]byte{0, 31, 21}: "Bioscrypt Inc", + [3]byte{0, 31, 22}: "Wistron Corporation", + [3]byte{0, 31, 23}: "IDX Company, Ltd.", + [3]byte{0, 31, 24}: "Hakusan.Mfg.Co,.Ltd", + [3]byte{0, 31, 25}: "BEN-RI ELECTRONICA S.A.", + [3]byte{0, 31, 26}: "Prominvest", + [3]byte{0, 31, 27}: "RoyalTek Company Ltd.", + [3]byte{0, 31, 28}: "KOBISHI ELECTRIC Co.,Ltd.", + [3]byte{0, 31, 29}: "Atlas Material Testing Technology LLC", + [3]byte{0, 31, 30}: "Astec Technology Co., Ltd", + [3]byte{0, 31, 31}: "Edimax Technology Co. Ltd.", + [3]byte{0, 31, 32}: "Logitech Europe SA", + [3]byte{0, 31, 33}: "Inner Mongolia Yin An Science & Technology Development Co.,L", + [3]byte{0, 31, 34}: "Source Photonics, Inc.", + [3]byte{0, 31, 35}: "Interacoustics", + [3]byte{0, 31, 36}: "DIGITVIEW TECHNOLOGY CO., LTD.", + [3]byte{0, 31, 37}: "MBS GmbH", + [3]byte{0, 31, 38}: "CISCO SYSTEMS, INC.", + [3]byte{0, 31, 39}: "CISCO SYSTEMS, INC.", + [3]byte{0, 31, 40}: "HPN Supply Chain", + [3]byte{0, 31, 41}: "Hewlett-Packard Company", + [3]byte{0, 31, 42}: "ACCM", + [3]byte{0, 31, 43}: "Orange Logic", + [3]byte{0, 31, 44}: "Starbridge Networks", + [3]byte{0, 31, 45}: "Electro-Optical Imaging, Inc.", + [3]byte{0, 31, 46}: "Triangle Research Int'l Pte Ltd", + [3]byte{0, 31, 47}: "Berker GmbH & Co. KG", + [3]byte{0, 31, 48}: "Travelping", + [3]byte{0, 31, 49}: "Radiocomp", + [3]byte{0, 31, 50}: "Nintendo Co., Ltd.", + [3]byte{0, 31, 51}: "Netgear Inc.", + [3]byte{0, 31, 52}: "Lung Hwa Electronics Co., Ltd.", + [3]byte{0, 31, 53}: "AIR802 LLC", + [3]byte{0, 31, 54}: "Bellwin Information Co. Ltd.,", + [3]byte{0, 31, 55}: "Genesis I&C", + [3]byte{0, 31, 56}: "POSITRON", + [3]byte{0, 31, 57}: "Construcciones y Auxiliar de Ferrocarriles, S.A.", + [3]byte{0, 31, 58}: "Hon Hai Precision Ind.Co., Ltd.", + [3]byte{0, 31, 59}: "Intel Corporate", + [3]byte{0, 31, 60}: "Intel Corporate", + [3]byte{0, 31, 61}: "Qbit GmbH", + [3]byte{0, 31, 62}: "RP-Technik e.K.", + [3]byte{0, 31, 63}: "AVM GmbH", + [3]byte{0, 31, 64}: "Speakercraft Inc.", + [3]byte{0, 31, 65}: "Ruckus Wireless", + [3]byte{0, 31, 66}: "Etherstack plc", + [3]byte{0, 31, 67}: "ENTES ELEKTRONIK", + [3]byte{0, 31, 68}: "GE Transportation Systems", + [3]byte{0, 31, 69}: "Enterasys", + [3]byte{0, 31, 70}: "Nortel", + [3]byte{0, 31, 71}: "MCS Logic Inc.", + [3]byte{0, 31, 72}: "Mojix Inc.", + [3]byte{0, 31, 73}: "Eurosat Distribution Ltd", + [3]byte{0, 31, 74}: "Albentia Systems S.A.", + [3]byte{0, 31, 75}: "Lineage Power", + [3]byte{0, 31, 76}: "Roseman Engineering Ltd", + [3]byte{0, 31, 77}: "Segnetics LLC", + [3]byte{0, 31, 78}: "ConMed Linvatec", + [3]byte{0, 31, 79}: "Thinkware Co. Ltd.", + [3]byte{0, 31, 80}: "Swissdis AG", + [3]byte{0, 31, 81}: "HD Communications Corp", + [3]byte{0, 31, 82}: "UVT Unternehmensberatung fur Verkehr und Technik GmbH", + [3]byte{0, 31, 83}: "GEMAC Gesellschaft für Mikroelektronikanwendung Chemnitz mbH", + [3]byte{0, 31, 84}: "Lorex Technology Inc.", + [3]byte{0, 31, 85}: "Honeywell Security (China) Co., Ltd.", + [3]byte{0, 31, 86}: "DIGITAL FORECAST", + [3]byte{0, 31, 87}: "Phonik Innovation Co.,LTD", + [3]byte{0, 31, 88}: "EMH Energiemesstechnik GmbH", + [3]byte{0, 31, 89}: "Kronback Tracers", + [3]byte{0, 31, 90}: "Beckwith Electric Co.", + [3]byte{0, 31, 91}: "Apple", + [3]byte{0, 31, 92}: "Nokia Danmark A/S", + [3]byte{0, 31, 93}: "Nokia Danmark A/S", + [3]byte{0, 31, 94}: "Dyna Technology Co.,Ltd.", + [3]byte{0, 31, 95}: "Blatand GmbH", + [3]byte{0, 31, 96}: "COMPASS SYSTEMS CORP.", + [3]byte{0, 31, 97}: "Talent Communication Networks Inc.", + [3]byte{0, 31, 98}: "JSC \"Stilsoft\"", + [3]byte{0, 31, 99}: "JSC Goodwin-Europa", + [3]byte{0, 31, 100}: "Beijing Autelan Technology Inc.", + [3]byte{0, 31, 101}: "KOREA ELECTRIC TERMINAL CO., LTD.", + [3]byte{0, 31, 102}: "PLANAR LLC", + [3]byte{0, 31, 103}: "Hitachi,Ltd.", + [3]byte{0, 31, 104}: "Martinsson Elektronik AB", + [3]byte{0, 31, 105}: "Pingood Technology Co., Ltd.", + [3]byte{0, 31, 106}: "PacketFlux Technologies, Inc.", + [3]byte{0, 31, 107}: "LG Electronics", + [3]byte{0, 31, 108}: "CISCO SYSTEMS, INC.", + [3]byte{0, 31, 109}: "CISCO SYSTEMS, INC.", + [3]byte{0, 31, 110}: "Vtech Engineering Corporation", + [3]byte{0, 31, 111}: "Fujian Sunnada Communication Co.,Ltd.", + [3]byte{0, 31, 112}: "Botik Technologies LTD", + [3]byte{0, 31, 113}: "xG Technology, Inc.", + [3]byte{0, 31, 114}: "QingDao Hiphone Technology Co,.Ltd", + [3]byte{0, 31, 115}: "Teraview Technology Co., Ltd.", + [3]byte{0, 31, 116}: "Eigen Development", + [3]byte{0, 31, 117}: "GiBahn Media", + [3]byte{0, 31, 118}: "AirLogic Systems Inc.", + [3]byte{0, 31, 119}: "HEOL DESIGN", + [3]byte{0, 31, 120}: "Blue Fox Porini Textile", + [3]byte{0, 31, 121}: "Lodam Electronics A/S", + [3]byte{0, 31, 122}: "WiWide Inc.", + [3]byte{0, 31, 123}: "TechNexion Ltd.", + [3]byte{0, 31, 124}: "Witelcom AS", + [3]byte{0, 31, 125}: "embedded wireless GmbH", + [3]byte{0, 31, 126}: "ARRIS Group, Inc.", + [3]byte{0, 31, 127}: "Phabrix Limited", + [3]byte{0, 31, 128}: "Lucas Holding bv", + [3]byte{0, 31, 129}: "Accel Semiconductor Corp", + [3]byte{0, 31, 130}: "Cal-Comp Electronics & Communications Co., Ltd", + [3]byte{0, 31, 131}: "Teleplan Technology Services Sdn Bhd", + [3]byte{0, 31, 132}: "Gigle Semiconductor", + [3]byte{0, 31, 133}: "Apriva ISS, LLC", + [3]byte{0, 31, 134}: "digEcor", + [3]byte{0, 31, 135}: "Skydigital Inc.", + [3]byte{0, 31, 136}: "FMS Force Measuring Systems AG", + [3]byte{0, 31, 137}: "Signalion GmbH", + [3]byte{0, 31, 138}: "Ellion Digital Inc.", + [3]byte{0, 31, 139}: "Cache IQ", + [3]byte{0, 31, 140}: "CCS Inc.", + [3]byte{0, 31, 141}: "Ingenieurbuero Stark GmbH und Ko. KG", + [3]byte{0, 31, 142}: "Metris USA Inc.", + [3]byte{0, 31, 143}: "Shanghai Bellmann Digital Source Co.,Ltd.", + [3]byte{0, 31, 144}: "Actiontec Electronics, Inc", + [3]byte{0, 31, 145}: "DBS Lodging Technologies, LLC", + [3]byte{0, 31, 146}: "VideoIQ, Inc.", + [3]byte{0, 31, 147}: "Xiotech Corporation", + [3]byte{0, 31, 148}: "Lascar Electronics Ltd", + [3]byte{0, 31, 149}: "SAGEM COMMUNICATION", + [3]byte{0, 31, 150}: "APROTECH CO.LTD", + [3]byte{0, 31, 151}: "BERTANA SRL", + [3]byte{0, 31, 152}: "DAIICHI-DENTSU LTD.", + [3]byte{0, 31, 153}: "SERONICS co.ltd", + [3]byte{0, 31, 154}: "Nortel Networks", + [3]byte{0, 31, 155}: "POSBRO", + [3]byte{0, 31, 156}: "LEDCO", + [3]byte{0, 31, 157}: "CISCO SYSTEMS, INC.", + [3]byte{0, 31, 158}: "CISCO SYSTEMS, INC.", + [3]byte{0, 31, 159}: "Thomson Telecom Belgium", + [3]byte{0, 31, 160}: "A10 Networks", + [3]byte{0, 31, 161}: "Gtran Inc", + [3]byte{0, 31, 162}: "Datron World Communications, Inc.", + [3]byte{0, 31, 163}: "T&W Electronics(Shenzhen)Co.,Ltd.", + [3]byte{0, 31, 164}: "ShenZhen Gongjin Electronics Co.,Ltd", + [3]byte{0, 31, 165}: "Blue-White Industries", + [3]byte{0, 31, 166}: "Stilo srl", + [3]byte{0, 31, 167}: "Sony Computer Entertainment Inc.", + [3]byte{0, 31, 168}: "Smart Energy Instruments Inc.", + [3]byte{0, 31, 169}: "Atlanta DTH, Inc.", + [3]byte{0, 31, 170}: "Taseon, Inc.", + [3]byte{0, 31, 171}: "I.S HIGH TECH.INC", + [3]byte{0, 31, 172}: "Goodmill Systems Ltd", + [3]byte{0, 31, 173}: "Brown Innovations, Inc", + [3]byte{0, 31, 174}: "Blick South Africa (Pty) Ltd", + [3]byte{0, 31, 175}: "NextIO, Inc.", + [3]byte{0, 31, 176}: "TimeIPS, Inc.", + [3]byte{0, 31, 177}: "Cybertech Inc.", + [3]byte{0, 31, 178}: "Sontheim Industrie Elektronik GmbH", + [3]byte{0, 31, 179}: "2Wire", + [3]byte{0, 31, 180}: "SmartShare Systems", + [3]byte{0, 31, 181}: "I/O Interconnect Inc.", + [3]byte{0, 31, 182}: "Chi Lin Technology Co., Ltd.", + [3]byte{0, 31, 183}: "WiMate Technologies Corp.", + [3]byte{0, 31, 184}: "Universal Remote Control, Inc.", + [3]byte{0, 31, 185}: "Paltronics", + [3]byte{0, 31, 186}: "BoYoung Tech. & Marketing, Inc.", + [3]byte{0, 31, 187}: "Xenatech Co.,LTD", + [3]byte{0, 31, 188}: "EVGA Corporation", + [3]byte{0, 31, 189}: "Kyocera Wireless Corp.", + [3]byte{0, 31, 190}: "Shenzhen Mopnet Industrial Co.,Ltd", + [3]byte{0, 31, 191}: "Fulhua Microelectronics Corp. Taiwan Branch", + [3]byte{0, 31, 192}: "Control Express Finland Oy", + [3]byte{0, 31, 193}: "Hanlong Technology Co.,LTD", + [3]byte{0, 31, 194}: "Jow Tong Technology Co Ltd", + [3]byte{0, 31, 195}: "SmartSynch, Inc", + [3]byte{0, 31, 196}: "ARRIS Group, Inc.", + [3]byte{0, 31, 197}: "Nintendo Co., Ltd.", + [3]byte{0, 31, 198}: "ASUSTek COMPUTER INC.", + [3]byte{0, 31, 199}: "Casio Hitachi Mobile Comunications Co., Ltd.", + [3]byte{0, 31, 200}: "Up-Today Industrial Co., Ltd.", + [3]byte{0, 31, 201}: "CISCO SYSTEMS, INC.", + [3]byte{0, 31, 202}: "CISCO SYSTEMS, INC.", + [3]byte{0, 31, 203}: "NIW Solutions", + [3]byte{0, 31, 204}: "Samsung Electronics Co.,Ltd", + [3]byte{0, 31, 205}: "Samsung Electronics", + [3]byte{0, 31, 206}: "QTECH LLC", + [3]byte{0, 31, 207}: "MSI Technology GmbH", + [3]byte{0, 31, 208}: "GIGA-BYTE TECHNOLOGY CO.,LTD.", + [3]byte{0, 31, 209}: "OPTEX CO.,LTD.", + [3]byte{0, 31, 210}: "COMMTECH TECHNOLOGY MACAO COMMERCIAL OFFSHORE LTD.", + [3]byte{0, 31, 211}: "RIVA Networks Inc.", + [3]byte{0, 31, 212}: "4IPNET, INC.", + [3]byte{0, 31, 213}: "MICRORISC s.r.o.", + [3]byte{0, 31, 214}: "Shenzhen Allywll", + [3]byte{0, 31, 215}: "TELERAD SA", + [3]byte{0, 31, 216}: "A-TRUST COMPUTER CORPORATION", + [3]byte{0, 31, 217}: "RSD Communications Ltd", + [3]byte{0, 31, 218}: "Nortel Networks", + [3]byte{0, 31, 219}: "Network Supply Corp.,", + [3]byte{0, 31, 220}: "Mobile Safe Track Ltd", + [3]byte{0, 31, 221}: "GDI LLC", + [3]byte{0, 31, 222}: "Nokia Danmark A/S", + [3]byte{0, 31, 223}: "Nokia Danmark A/S", + [3]byte{0, 31, 224}: "EdgeVelocity Corp", + [3]byte{0, 31, 225}: "Hon Hai Precision Ind. Co., Ltd.", + [3]byte{0, 31, 226}: "Hon Hai Precision Ind. Co., Ltd.", + [3]byte{0, 31, 227}: "LG Electronics", + [3]byte{0, 31, 228}: "Sony Ericsson Mobile Communications", + [3]byte{0, 31, 229}: "In-Circuit GmbH", + [3]byte{0, 31, 230}: "Alphion Corporation", + [3]byte{0, 31, 231}: "Simet", + [3]byte{0, 31, 232}: "KURUSUGAWA Electronics Industry Inc,.", + [3]byte{0, 31, 233}: "Printrex, Inc.", + [3]byte{0, 31, 234}: "Applied Media Technologies Corporation", + [3]byte{0, 31, 235}: "Trio Datacom Pty Ltd", + [3]byte{0, 31, 236}: "Synapse Électronique", + [3]byte{0, 31, 237}: "Tecan Systems Inc.", + [3]byte{0, 31, 238}: "ubisys technologies GmbH", + [3]byte{0, 31, 239}: "SHINSEI INDUSTRIES CO.,LTD", + [3]byte{0, 31, 240}: "Audio Partnership", + [3]byte{0, 31, 241}: "Paradox Hellas S.A.", + [3]byte{0, 31, 242}: "VIA Technologies, Inc.", + [3]byte{0, 31, 243}: "Apple", + [3]byte{0, 31, 244}: "Power Monitors, Inc.", + [3]byte{0, 31, 245}: "Kongsberg Defence & Aerospace", + [3]byte{0, 31, 246}: "PS Audio International", + [3]byte{0, 31, 247}: "Nakajima All Precision Co., Ltd.", + [3]byte{0, 31, 248}: "Siemens AG, Sector Industry, Drive Technologies, Motion Control Systems", + [3]byte{0, 31, 249}: "Advanced Knowledge Associates", + [3]byte{0, 31, 250}: "Coretree, Co, Ltd", + [3]byte{0, 31, 251}: "Green Packet Bhd", + [3]byte{0, 31, 252}: "Riccius+Sohn GmbH", + [3]byte{0, 31, 253}: "Indigo Mobile Technologies Corp.", + [3]byte{0, 31, 254}: "HPN Supply Chain", + [3]byte{0, 31, 255}: "Respironics, Inc.", + [3]byte{0, 32, 0}: "LEXMARK INTERNATIONAL, INC.", + [3]byte{0, 32, 1}: "DSP SOLUTIONS, INC.", + [3]byte{0, 32, 2}: "SERITECH ENTERPRISE CO., LTD.", + [3]byte{0, 32, 3}: "PIXEL POWER LTD.", + [3]byte{0, 32, 4}: "YAMATAKE-HONEYWELL CO., LTD.", + [3]byte{0, 32, 5}: "SIMPLE TECHNOLOGY", + [3]byte{0, 32, 6}: "GARRETT COMMUNICATIONS, INC.", + [3]byte{0, 32, 7}: "SFA, INC.", + [3]byte{0, 32, 8}: "CABLE & COMPUTER TECHNOLOGY", + [3]byte{0, 32, 9}: "PACKARD BELL ELEC., INC.", + [3]byte{0, 32, 10}: "SOURCE-COMM CORP.", + [3]byte{0, 32, 11}: "OCTAGON SYSTEMS CORP.", + [3]byte{0, 32, 12}: "ADASTRA SYSTEMS CORP.", + [3]byte{0, 32, 13}: "CARL ZEISS", + [3]byte{0, 32, 14}: "SATELLITE TECHNOLOGY MGMT, INC", + [3]byte{0, 32, 15}: "TANBAC CO., LTD.", + [3]byte{0, 32, 16}: "JEOL SYSTEM TECHNOLOGY CO. LTD", + [3]byte{0, 32, 17}: "CANOPUS CO., LTD.", + [3]byte{0, 32, 18}: "CAMTRONICS MEDICAL SYSTEMS", + [3]byte{0, 32, 19}: "DIVERSIFIED TECHNOLOGY, INC.", + [3]byte{0, 32, 20}: "GLOBAL VIEW CO., LTD.", + [3]byte{0, 32, 21}: "ACTIS COMPUTER SA", + [3]byte{0, 32, 22}: "SHOWA ELECTRIC WIRE & CABLE CO", + [3]byte{0, 32, 23}: "ORBOTECH", + [3]byte{0, 32, 24}: "CIS TECHNOLOGY INC.", + [3]byte{0, 32, 25}: "OHLER GmbH", + [3]byte{0, 32, 26}: "MRV Communications, Inc.", + [3]byte{0, 32, 27}: "NORTHERN TELECOM/NETWORK", + [3]byte{0, 32, 28}: "EXCEL, INC.", + [3]byte{0, 32, 29}: "KATANA PRODUCTS", + [3]byte{0, 32, 30}: "NETQUEST CORPORATION", + [3]byte{0, 32, 31}: "BEST POWER TECHNOLOGY, INC.", + [3]byte{0, 32, 32}: "MEGATRON COMPUTER INDUSTRIES PTY, LTD.", + [3]byte{0, 32, 33}: "ALGORITHMS SOFTWARE PVT. LTD.", + [3]byte{0, 32, 34}: "NMS Communications", + [3]byte{0, 32, 35}: "T.C. TECHNOLOGIES PTY. LTD", + [3]byte{0, 32, 36}: "PACIFIC COMMUNICATION SCIENCES", + [3]byte{0, 32, 37}: "CONTROL TECHNOLOGY, INC.", + [3]byte{0, 32, 38}: "AMKLY SYSTEMS, INC.", + [3]byte{0, 32, 39}: "MING FORTUNE INDUSTRY CO., LTD", + [3]byte{0, 32, 40}: "WEST EGG SYSTEMS, INC.", + [3]byte{0, 32, 41}: "TELEPROCESSING PRODUCTS, INC.", + [3]byte{0, 32, 42}: "N.V. DZINE", + [3]byte{0, 32, 43}: "ADVANCED TELECOMMUNICATIONS MODULES, LTD.", + [3]byte{0, 32, 44}: "WELLTRONIX CO., LTD.", + [3]byte{0, 32, 45}: "TAIYO CORPORATION", + [3]byte{0, 32, 46}: "DAYSTAR DIGITAL", + [3]byte{0, 32, 47}: "ZETA COMMUNICATIONS, LTD.", + [3]byte{0, 32, 48}: "ANALOG & DIGITAL SYSTEMS", + [3]byte{0, 32, 49}: "Tattile SRL", + [3]byte{0, 32, 50}: "ALCATEL TAISEL", + [3]byte{0, 32, 51}: "SYNAPSE TECHNOLOGIES, INC.", + [3]byte{0, 32, 52}: "ROTEC INDUSTRIEAUTOMATION GMBH", + [3]byte{0, 32, 53}: "IBM Corp", + [3]byte{0, 32, 54}: "BMC SOFTWARE", + [3]byte{0, 32, 55}: "SEAGATE TECHNOLOGY", + [3]byte{0, 32, 56}: "VME MICROSYSTEMS INTERNATIONAL CORPORATION", + [3]byte{0, 32, 57}: "SCINETS", + [3]byte{0, 32, 58}: "DIGITAL BI0METRICS INC.", + [3]byte{0, 32, 59}: "WISDM LTD.", + [3]byte{0, 32, 60}: "EUROTIME AB", + [3]byte{0, 32, 61}: "Honeywell ECC", + [3]byte{0, 32, 62}: "LogiCan Technologies, Inc.", + [3]byte{0, 32, 63}: "JUKI CORPORATION", + [3]byte{0, 32, 64}: "ARRIS Group, Inc.", + [3]byte{0, 32, 65}: "DATA NET", + [3]byte{0, 32, 66}: "DATAMETRICS CORP.", + [3]byte{0, 32, 67}: "NEURON COMPANY LIMITED", + [3]byte{0, 32, 68}: "GENITECH PTY LTD", + [3]byte{0, 32, 69}: "ION Networks, Inc.", + [3]byte{0, 32, 70}: "CIPRICO, INC.", + [3]byte{0, 32, 71}: "STEINBRECHER CORP.", + [3]byte{0, 32, 72}: "Marconi Communications", + [3]byte{0, 32, 73}: "COMTRON, INC.", + [3]byte{0, 32, 74}: "PRONET GMBH", + [3]byte{0, 32, 75}: "AUTOCOMPUTER CO., LTD.", + [3]byte{0, 32, 76}: "MITRON COMPUTER PTE LTD.", + [3]byte{0, 32, 77}: "INOVIS GMBH", + [3]byte{0, 32, 78}: "NETWORK SECURITY SYSTEMS, INC.", + [3]byte{0, 32, 79}: "DEUTSCHE AEROSPACE AG", + [3]byte{0, 32, 80}: "KOREA COMPUTER INC.", + [3]byte{0, 32, 81}: "Verilink Corporation", + [3]byte{0, 32, 82}: "RAGULA SYSTEMS", + [3]byte{0, 32, 83}: "HUNTSVILLE MICROSYSTEMS, INC.", + [3]byte{0, 32, 84}: "Sycamore Networks", + [3]byte{0, 32, 85}: "ALTECH CO., LTD.", + [3]byte{0, 32, 86}: "NEOPRODUCTS", + [3]byte{0, 32, 87}: "TITZE DATENTECHNIK GmbH", + [3]byte{0, 32, 88}: "ALLIED SIGNAL INC.", + [3]byte{0, 32, 89}: "MIRO COMPUTER PRODUCTS AG", + [3]byte{0, 32, 90}: "COMPUTER IDENTICS", + [3]byte{0, 32, 91}: "Kentrox, LLC", + [3]byte{0, 32, 92}: "InterNet Systems of Florida, Inc.", + [3]byte{0, 32, 93}: "NANOMATIC OY", + [3]byte{0, 32, 94}: "CASTLE ROCK, INC.", + [3]byte{0, 32, 95}: "GAMMADATA COMPUTER GMBH", + [3]byte{0, 32, 96}: "ALCATEL ITALIA S.p.A.", + [3]byte{0, 32, 97}: "GarrettCom, Inc.", + [3]byte{0, 32, 98}: "SCORPION LOGIC, LTD.", + [3]byte{0, 32, 99}: "WIPRO INFOTECH LTD.", + [3]byte{0, 32, 100}: "PROTEC MICROSYSTEMS, INC.", + [3]byte{0, 32, 101}: "SUPERNET NETWORKING INC.", + [3]byte{0, 32, 102}: "GENERAL MAGIC, INC.", + [3]byte{0, 32, 103}: "PRIVATE", + [3]byte{0, 32, 104}: "ISDYNE", + [3]byte{0, 32, 105}: "ISDN SYSTEMS CORPORATION", + [3]byte{0, 32, 106}: "OSAKA COMPUTER CORP.", + [3]byte{0, 32, 107}: "KONICA MINOLTA HOLDINGS, INC.", + [3]byte{0, 32, 108}: "EVERGREEN TECHNOLOGY CORP.", + [3]byte{0, 32, 109}: "DATA RACE, INC.", + [3]byte{0, 32, 110}: "XACT, INC.", + [3]byte{0, 32, 111}: "FLOWPOINT CORPORATION", + [3]byte{0, 32, 112}: "HYNET, LTD.", + [3]byte{0, 32, 113}: "IBR GMBH", + [3]byte{0, 32, 114}: "WORKLINK INNOVATIONS", + [3]byte{0, 32, 115}: "FUSION SYSTEMS CORPORATION", + [3]byte{0, 32, 116}: "SUNGWOON SYSTEMS", + [3]byte{0, 32, 117}: "MOTOROLA COMMUNICATION ISRAEL", + [3]byte{0, 32, 118}: "REUDO CORPORATION", + [3]byte{0, 32, 119}: "KARDIOS SYSTEMS CORP.", + [3]byte{0, 32, 120}: "RUNTOP, INC.", + [3]byte{0, 32, 121}: "MIKRON GMBH", + [3]byte{0, 32, 122}: "WiSE Communications, Inc.", + [3]byte{0, 32, 123}: "Intel Corporation", + [3]byte{0, 32, 124}: "AUTEC GmbH", + [3]byte{0, 32, 125}: "ADVANCED COMPUTER APPLICATIONS", + [3]byte{0, 32, 126}: "FINECOM Co., Ltd.", + [3]byte{0, 32, 127}: "KYOEI SANGYO CO., LTD.", + [3]byte{0, 32, 128}: "SYNERGY (UK) LTD.", + [3]byte{0, 32, 129}: "TITAN ELECTRONICS", + [3]byte{0, 32, 130}: "ONEAC CORPORATION", + [3]byte{0, 32, 131}: "PRESTICOM INCORPORATED", + [3]byte{0, 32, 132}: "OCE PRINTING SYSTEMS, GMBH", + [3]byte{0, 32, 133}: "Eaton Corporation", + [3]byte{0, 32, 134}: "MICROTECH ELECTRONICS LIMITED", + [3]byte{0, 32, 135}: "MEMOTEC, INC.", + [3]byte{0, 32, 136}: "GLOBAL VILLAGE COMMUNICATION", + [3]byte{0, 32, 137}: "T3PLUS NETWORKING, INC.", + [3]byte{0, 32, 138}: "SONIX COMMUNICATIONS, LTD.", + [3]byte{0, 32, 139}: "LAPIS TECHNOLOGIES, INC.", + [3]byte{0, 32, 140}: "GALAXY NETWORKS, INC.", + [3]byte{0, 32, 141}: "CMD TECHNOLOGY", + [3]byte{0, 32, 142}: "CHEVIN SOFTWARE ENG. LTD.", + [3]byte{0, 32, 143}: "ECI TELECOM LTD.", + [3]byte{0, 32, 144}: "ADVANCED COMPRESSION TECHNOLOGY, INC.", + [3]byte{0, 32, 145}: "J125, NATIONAL SECURITY AGENCY", + [3]byte{0, 32, 146}: "CHESS ENGINEERING B.V.", + [3]byte{0, 32, 147}: "LANDINGS TECHNOLOGY CORP.", + [3]byte{0, 32, 148}: "CUBIX CORPORATION", + [3]byte{0, 32, 149}: "RIVA ELECTRONICS", + [3]byte{0, 32, 150}: "Invensys", + [3]byte{0, 32, 151}: "APPLIED SIGNAL TECHNOLOGY", + [3]byte{0, 32, 152}: "HECTRONIC AB", + [3]byte{0, 32, 153}: "BON ELECTRIC CO., LTD.", + [3]byte{0, 32, 154}: "THE 3DO COMPANY", + [3]byte{0, 32, 155}: "ERSAT ELECTRONIC GMBH", + [3]byte{0, 32, 156}: "PRIMARY ACCESS CORP.", + [3]byte{0, 32, 157}: "LIPPERT AUTOMATIONSTECHNIK", + [3]byte{0, 32, 158}: "BROWN'S OPERATING SYSTEM SERVICES, LTD.", + [3]byte{0, 32, 159}: "MERCURY COMPUTER SYSTEMS, INC.", + [3]byte{0, 32, 160}: "OA LABORATORY CO., LTD.", + [3]byte{0, 32, 161}: "DOVATRON", + [3]byte{0, 32, 162}: "GALCOM NETWORKING LTD.", + [3]byte{0, 32, 163}: "Harmonic, Inc", + [3]byte{0, 32, 164}: "MULTIPOINT NETWORKS", + [3]byte{0, 32, 165}: "API ENGINEERING", + [3]byte{0, 32, 166}: "Proxim Wireless", + [3]byte{0, 32, 167}: "PAIRGAIN TECHNOLOGIES, INC.", + [3]byte{0, 32, 168}: "SAST TECHNOLOGY CORP.", + [3]byte{0, 32, 169}: "WHITE HORSE INDUSTRIAL", + [3]byte{0, 32, 170}: "Ericsson Television Limited", + [3]byte{0, 32, 171}: "MICRO INDUSTRIES CORP.", + [3]byte{0, 32, 172}: "INTERFLEX DATENSYSTEME GMBH", + [3]byte{0, 32, 173}: "LINQ SYSTEMS", + [3]byte{0, 32, 174}: "ORNET DATA COMMUNICATION TECH.", + [3]byte{0, 32, 175}: "3COM CORPORATION", + [3]byte{0, 32, 176}: "GATEWAY DEVICES, INC.", + [3]byte{0, 32, 177}: "COMTECH RESEARCH INC.", + [3]byte{0, 32, 178}: "GKD Gesellschaft Fur Kommunikation Und Datentechnik", + [3]byte{0, 32, 179}: "Tattile SRL", + [3]byte{0, 32, 180}: "TERMA ELEKTRONIK AS", + [3]byte{0, 32, 181}: "YASKAWA ELECTRIC CORPORATION", + [3]byte{0, 32, 182}: "AGILE NETWORKS, INC.", + [3]byte{0, 32, 183}: "NAMAQUA COMPUTERWARE", + [3]byte{0, 32, 184}: "PRIME OPTION, INC.", + [3]byte{0, 32, 185}: "METRICOM, INC.", + [3]byte{0, 32, 186}: "CENTER FOR HIGH PERFORMANCE", + [3]byte{0, 32, 187}: "ZAX CORPORATION", + [3]byte{0, 32, 188}: "Long Reach Networks Pty Ltd", + [3]byte{0, 32, 189}: "NIOBRARA R & D CORPORATION", + [3]byte{0, 32, 190}: "LAN ACCESS CORP.", + [3]byte{0, 32, 191}: "AEHR TEST SYSTEMS", + [3]byte{0, 32, 192}: "PULSE ELECTRONICS, INC.", + [3]byte{0, 32, 193}: "SAXA, Inc.", + [3]byte{0, 32, 194}: "TEXAS MEMORY SYSTEMS, INC.", + [3]byte{0, 32, 195}: "COUNTER SOLUTIONS LTD.", + [3]byte{0, 32, 196}: "INET,INC.", + [3]byte{0, 32, 197}: "EAGLE TECHNOLOGY", + [3]byte{0, 32, 198}: "NECTEC", + [3]byte{0, 32, 199}: "AKAI Professional M.I. Corp.", + [3]byte{0, 32, 200}: "LARSCOM INCORPORATED", + [3]byte{0, 32, 201}: "VICTRON BV", + [3]byte{0, 32, 202}: "DIGITAL OCEAN", + [3]byte{0, 32, 203}: "PRETEC ELECTRONICS CORP.", + [3]byte{0, 32, 204}: "DIGITAL SERVICES, LTD.", + [3]byte{0, 32, 205}: "HYBRID NETWORKS, INC.", + [3]byte{0, 32, 206}: "LOGICAL DESIGN GROUP, INC.", + [3]byte{0, 32, 207}: "TEST & MEASUREMENT SYSTEMS INC", + [3]byte{0, 32, 208}: "VERSALYNX CORPORATION", + [3]byte{0, 32, 209}: "MICROCOMPUTER SYSTEMS (M) SDN.", + [3]byte{0, 32, 210}: "RAD DATA COMMUNICATIONS, LTD.", + [3]byte{0, 32, 211}: "OST (OUEST STANDARD TELEMATIQU", + [3]byte{0, 32, 212}: "CABLETRON - ZEITTNET INC.", + [3]byte{0, 32, 213}: "VIPA GMBH", + [3]byte{0, 32, 214}: "BREEZECOM", + [3]byte{0, 32, 215}: "JAPAN MINICOMPUTER SYSTEMS CO., Ltd.", + [3]byte{0, 32, 216}: "Nortel Networks", + [3]byte{0, 32, 217}: "PANASONIC TECHNOLOGIES, INC./MIECO-US", + [3]byte{0, 32, 218}: "Alcatel North America ESD", + [3]byte{0, 32, 219}: "XNET TECHNOLOGY, INC.", + [3]byte{0, 32, 220}: "DENSITRON TAIWAN LTD.", + [3]byte{0, 32, 221}: "Cybertec Pty Ltd", + [3]byte{0, 32, 222}: "JAPAN DIGITAL LABORAT'Y CO.LTD", + [3]byte{0, 32, 223}: "KYOSAN ELECTRIC MFG. CO., LTD.", + [3]byte{0, 32, 224}: "Actiontec Electronics, Inc.", + [3]byte{0, 32, 225}: "ALAMAR ELECTRONICS", + [3]byte{0, 32, 226}: "INFORMATION RESOURCE ENGINEERING", + [3]byte{0, 32, 227}: "MCD KENCOM CORPORATION", + [3]byte{0, 32, 228}: "HSING TECH ENTERPRISE CO., LTD", + [3]byte{0, 32, 229}: "APEX DATA, INC.", + [3]byte{0, 32, 230}: "LIDKOPING MACHINE TOOLS AB", + [3]byte{0, 32, 231}: "B&W NUCLEAR SERVICE COMPANY", + [3]byte{0, 32, 232}: "DATATREK CORPORATION", + [3]byte{0, 32, 233}: "DANTEL", + [3]byte{0, 32, 234}: "EFFICIENT NETWORKS, INC.", + [3]byte{0, 32, 235}: "CINCINNATI MICROWAVE, INC.", + [3]byte{0, 32, 236}: "TECHWARE SYSTEMS CORP.", + [3]byte{0, 32, 237}: "GIGA-BYTE TECHNOLOGY CO., LTD.", + [3]byte{0, 32, 238}: "GTECH CORPORATION", + [3]byte{0, 32, 239}: "USC CORPORATION", + [3]byte{0, 32, 240}: "UNIVERSAL MICROELECTRONICS CO.", + [3]byte{0, 32, 241}: "ALTOS INDIA LIMITED", + [3]byte{0, 32, 242}: "Oracle Corporation", + [3]byte{0, 32, 243}: "RAYNET CORPORATION", + [3]byte{0, 32, 244}: "SPECTRIX CORPORATION", + [3]byte{0, 32, 245}: "PANDATEL AG", + [3]byte{0, 32, 246}: "NET TEK AND KARLNET, INC.", + [3]byte{0, 32, 247}: "CYBERDATA CORPORATION", + [3]byte{0, 32, 248}: "CARRERA COMPUTERS, INC.", + [3]byte{0, 32, 249}: "PARALINK NETWORKS, INC.", + [3]byte{0, 32, 250}: "GDE SYSTEMS, INC.", + [3]byte{0, 32, 251}: "OCTEL COMMUNICATIONS CORP.", + [3]byte{0, 32, 252}: "MATROX", + [3]byte{0, 32, 253}: "ITV TECHNOLOGIES, INC.", + [3]byte{0, 32, 254}: "TOPWARE INC. / GRAND COMPUTER", + [3]byte{0, 32, 255}: "SYMMETRICAL TECHNOLOGIES", + [3]byte{0, 33, 0}: "GemTek Technology Co., Ltd.", + [3]byte{0, 33, 1}: "Aplicaciones Electronicas Quasar (AEQ)", + [3]byte{0, 33, 2}: "UpdateLogic Inc.", + [3]byte{0, 33, 3}: "GHI Electronics, LLC", + [3]byte{0, 33, 4}: "Gigaset Communications GmbH", + [3]byte{0, 33, 5}: "Alcatel-Lucent", + [3]byte{0, 33, 6}: "RIM Testing Services", + [3]byte{0, 33, 7}: "Seowonintech Co Ltd.", + [3]byte{0, 33, 8}: "Nokia Danmark A/S", + [3]byte{0, 33, 9}: "Nokia Danmark A/S", + [3]byte{0, 33, 10}: "byd:sign Corporation", + [3]byte{0, 33, 11}: "GEMINI TRAZE RFID PVT. LTD.", + [3]byte{0, 33, 12}: "Cymtec Systems, Inc.", + [3]byte{0, 33, 13}: "SAMSIN INNOTEC", + [3]byte{0, 33, 14}: "Orpak Systems L.T.D.", + [3]byte{0, 33, 15}: "Cernium Corp", + [3]byte{0, 33, 16}: "Clearbox Systems", + [3]byte{0, 33, 17}: "Uniphone Inc.", + [3]byte{0, 33, 18}: "WISCOM SYSTEM CO.,LTD", + [3]byte{0, 33, 19}: "Padtec S/A", + [3]byte{0, 33, 20}: "Hylab Technology Inc.", + [3]byte{0, 33, 21}: "PHYWE Systeme GmbH & Co. KG", + [3]byte{0, 33, 22}: "Transcon Electronic Systems, spol. s r. o.", + [3]byte{0, 33, 23}: "Tellord", + [3]byte{0, 33, 24}: "Athena Tech, Inc.", + [3]byte{0, 33, 25}: "Samsung Electro-Mechanics", + [3]byte{0, 33, 26}: "LInTech Corporation", + [3]byte{0, 33, 27}: "CISCO SYSTEMS, INC.", + [3]byte{0, 33, 28}: "CISCO SYSTEMS, INC.", + [3]byte{0, 33, 29}: "Dataline AB", + [3]byte{0, 33, 30}: "ARRIS Group, Inc.", + [3]byte{0, 33, 31}: "SHINSUNG DELTATECH CO.,LTD.", + [3]byte{0, 33, 32}: "Sequel Technologies", + [3]byte{0, 33, 33}: "VRmagic GmbH", + [3]byte{0, 33, 34}: "Chip-pro Ltd.", + [3]byte{0, 33, 35}: "Aerosat Avionics", + [3]byte{0, 33, 36}: "Optos Plc", + [3]byte{0, 33, 37}: "KUK JE TONG SHIN Co.,LTD", + [3]byte{0, 33, 38}: "Shenzhen Torch Equipment Co., Ltd.", + [3]byte{0, 33, 39}: "TP-LINK Technology Co., Ltd.", + [3]byte{0, 33, 40}: "Oracle Corporation", + [3]byte{0, 33, 41}: "Cisco-Linksys, LLC", + [3]byte{0, 33, 42}: "Audiovox Corporation", + [3]byte{0, 33, 43}: "MSA Auer", + [3]byte{0, 33, 44}: "SemIndia System Private Limited", + [3]byte{0, 33, 45}: "SCIMOLEX CORPORATION", + [3]byte{0, 33, 46}: "dresden-elektronik", + [3]byte{0, 33, 47}: "Phoebe Micro Inc.", + [3]byte{0, 33, 48}: "Keico Hightech Inc.", + [3]byte{0, 33, 49}: "Blynke Inc.", + [3]byte{0, 33, 50}: "Masterclock, Inc.", + [3]byte{0, 33, 51}: "Building B, Inc", + [3]byte{0, 33, 52}: "Brandywine Communications", + [3]byte{0, 33, 53}: "ALCATEL-LUCENT", + [3]byte{0, 33, 54}: "ARRIS Group, Inc.", + [3]byte{0, 33, 55}: "Bay Controls, LLC", + [3]byte{0, 33, 56}: "Cepheid", + [3]byte{0, 33, 57}: "Escherlogic Inc.", + [3]byte{0, 33, 58}: "Winchester Systems Inc.", + [3]byte{0, 33, 59}: "Berkshire Products, Inc", + [3]byte{0, 33, 60}: "AliphCom", + [3]byte{0, 33, 61}: "Cermetek Microelectronics, Inc.", + [3]byte{0, 33, 62}: "TomTom", + [3]byte{0, 33, 63}: "A-Team Technology Ltd.", + [3]byte{0, 33, 64}: "EN Technologies Inc.", + [3]byte{0, 33, 65}: "RADLIVE", + [3]byte{0, 33, 66}: "Advanced Control Systems doo", + [3]byte{0, 33, 67}: "ARRIS Group, Inc.", + [3]byte{0, 33, 68}: "SS Telecoms", + [3]byte{0, 33, 69}: "Semptian Technologies Ltd.", + [3]byte{0, 33, 70}: "Sanmina-SCI", + [3]byte{0, 33, 71}: "Nintendo Co., Ltd.", + [3]byte{0, 33, 72}: "Kaco Solar Korea", + [3]byte{0, 33, 73}: "China Daheng Group ,Inc.", + [3]byte{0, 33, 74}: "Pixel Velocity, Inc", + [3]byte{0, 33, 75}: "Shenzhen HAMP Science & Technology Co.,Ltd", + [3]byte{0, 33, 76}: "SAMSUNG ELECTRONICS CO., LTD.", + [3]byte{0, 33, 77}: "Guangzhou Skytone Transmission Technology Com. Ltd.", + [3]byte{0, 33, 78}: "GS Yuasa Power Supply Ltd.", + [3]byte{0, 33, 79}: "ALPS Electric Co., Ltd", + [3]byte{0, 33, 80}: "EYEVIEW ELECTRONICS", + [3]byte{0, 33, 81}: "Millinet Co., Ltd.", + [3]byte{0, 33, 82}: "General Satellite Research & Development Limited", + [3]byte{0, 33, 83}: "SeaMicro Inc.", + [3]byte{0, 33, 84}: "D-TACQ Solutions Ltd", + [3]byte{0, 33, 85}: "CISCO SYSTEMS, INC.", + [3]byte{0, 33, 86}: "CISCO SYSTEMS, INC.", + [3]byte{0, 33, 87}: "National Datacast, Inc.", + [3]byte{0, 33, 88}: "Style Flying Technology Co.", + [3]byte{0, 33, 89}: "Juniper Networks", + [3]byte{0, 33, 90}: "Hewlett-Packard Company", + [3]byte{0, 33, 91}: "Inotive", + [3]byte{0, 33, 92}: "Intel Corporate", + [3]byte{0, 33, 93}: "Intel Corporate", + [3]byte{0, 33, 94}: "IBM Corp", + [3]byte{0, 33, 95}: "IHSE GmbH", + [3]byte{0, 33, 96}: "Hidea Solutions Co. Ltd.", + [3]byte{0, 33, 97}: "Yournet Inc.", + [3]byte{0, 33, 98}: "Nortel", + [3]byte{0, 33, 99}: "ASKEY COMPUTER CORP", + [3]byte{0, 33, 100}: "Special Design Bureau for Seismic Instrumentation", + [3]byte{0, 33, 101}: "Presstek Inc.", + [3]byte{0, 33, 102}: "NovAtel Inc.", + [3]byte{0, 33, 103}: "HWA JIN T&I Corp.", + [3]byte{0, 33, 104}: "iVeia, LLC", + [3]byte{0, 33, 105}: "Prologix, LLC.", + [3]byte{0, 33, 106}: "Intel Corporate", + [3]byte{0, 33, 107}: "Intel Corporate", + [3]byte{0, 33, 108}: "ODVA", + [3]byte{0, 33, 109}: "Soltech Co., Ltd.", + [3]byte{0, 33, 110}: "Function ATI (Huizhou) Telecommunications Co., Ltd.", + [3]byte{0, 33, 111}: "SymCom, Inc.", + [3]byte{0, 33, 112}: "Dell Inc", + [3]byte{0, 33, 113}: "Wesung TNC Co., Ltd.", + [3]byte{0, 33, 114}: "Seoultek Valley", + [3]byte{0, 33, 115}: "Ion Torrent Systems, Inc.", + [3]byte{0, 33, 116}: "AvaLAN Wireless", + [3]byte{0, 33, 117}: "Pacific Satellite International Ltd.", + [3]byte{0, 33, 118}: "YMax Telecom Ltd.", + [3]byte{0, 33, 119}: "W. L. Gore & Associates", + [3]byte{0, 33, 120}: "Matuschek Messtechnik GmbH", + [3]byte{0, 33, 121}: "IOGEAR, Inc.", + [3]byte{0, 33, 122}: "Sejin Electron, Inc.", + [3]byte{0, 33, 123}: "Bastec AB", + [3]byte{0, 33, 124}: "2Wire", + [3]byte{0, 33, 125}: "PYXIS S.R.L.", + [3]byte{0, 33, 126}: "Telit Communication s.p.a", + [3]byte{0, 33, 127}: "Intraco Technology Pte Ltd", + [3]byte{0, 33, 128}: "ARRIS Group, Inc.", + [3]byte{0, 33, 129}: "Si2 Microsystems Limited", + [3]byte{0, 33, 130}: "SandLinks Systems, Ltd.", + [3]byte{0, 33, 131}: "VATECH HYDRO", + [3]byte{0, 33, 132}: "POWERSOFT SRL", + [3]byte{0, 33, 133}: "MICRO-STAR INT'L CO.,LTD.", + [3]byte{0, 33, 134}: "Universal Global Scientific Industrial Co., Ltd", + [3]byte{0, 33, 135}: "Imacs GmbH", + [3]byte{0, 33, 136}: "EMC Corporation", + [3]byte{0, 33, 137}: "AppTech, Inc.", + [3]byte{0, 33, 138}: "Electronic Design and Manufacturing Company", + [3]byte{0, 33, 139}: "Wescon Technology, Inc.", + [3]byte{0, 33, 140}: "TopControl GMBH", + [3]byte{0, 33, 141}: "AP Router Ind. Eletronica LTDA", + [3]byte{0, 33, 142}: "MEKICS CO., LTD.", + [3]byte{0, 33, 143}: "Avantgarde Acoustic Lautsprechersysteme GmbH", + [3]byte{0, 33, 144}: "Goliath Solutions", + [3]byte{0, 33, 145}: "D-Link Corporation", + [3]byte{0, 33, 146}: "Baoding Galaxy Electronic Technology Co.,Ltd", + [3]byte{0, 33, 147}: "Videofon MV", + [3]byte{0, 33, 148}: "Ping Communication", + [3]byte{0, 33, 149}: "GWD Media Limited", + [3]byte{0, 33, 150}: "Telsey S.p.A.", + [3]byte{0, 33, 151}: "ELITEGROUP COMPUTER SYSTEM", + [3]byte{0, 33, 152}: "Thai Radio Co, LTD", + [3]byte{0, 33, 153}: "Vacon Plc", + [3]byte{0, 33, 154}: "Cambridge Visual Networks Ltd", + [3]byte{0, 33, 155}: "Dell Inc", + [3]byte{0, 33, 156}: "Honeywld Technology Corp.", + [3]byte{0, 33, 157}: "Adesys BV", + [3]byte{0, 33, 158}: "Sony Ericsson Mobile Communications", + [3]byte{0, 33, 159}: "SATEL OY", + [3]byte{0, 33, 160}: "CISCO SYSTEMS, INC.", + [3]byte{0, 33, 161}: "CISCO SYSTEMS, INC.", + [3]byte{0, 33, 162}: "EKE-Electronics Ltd.", + [3]byte{0, 33, 163}: "Micromint", + [3]byte{0, 33, 164}: "Dbii Networks", + [3]byte{0, 33, 165}: "ERLPhase Power Technologies Ltd.", + [3]byte{0, 33, 166}: "Videotec Spa", + [3]byte{0, 33, 167}: "Hantle System Co., Ltd.", + [3]byte{0, 33, 168}: "Telephonics Corporation", + [3]byte{0, 33, 169}: "Mobilink Telecom Co.,Ltd", + [3]byte{0, 33, 170}: "Nokia Danmark A/S", + [3]byte{0, 33, 171}: "Nokia Danmark A/S", + [3]byte{0, 33, 172}: "Infrared Integrated Systems Ltd", + [3]byte{0, 33, 173}: "Nordic ID Oy", + [3]byte{0, 33, 174}: "ALCATEL-LUCENT FRANCE - WTD", + [3]byte{0, 33, 175}: "Radio Frequency Systems", + [3]byte{0, 33, 176}: "Tyco Telecommunications", + [3]byte{0, 33, 177}: "DIGITAL SOLUTIONS LTD", + [3]byte{0, 33, 178}: "Fiberblaze A/S", + [3]byte{0, 33, 179}: "Ross Controls", + [3]byte{0, 33, 180}: "APRO MEDIA CO., LTD", + [3]byte{0, 33, 181}: "Galvanic Ltd", + [3]byte{0, 33, 182}: "Triacta Power Technologies Inc.", + [3]byte{0, 33, 183}: "Lexmark International Inc.", + [3]byte{0, 33, 184}: "Inphi Corporation", + [3]byte{0, 33, 185}: "Universal Devices Inc.", + [3]byte{0, 33, 186}: "Texas Instruments", + [3]byte{0, 33, 187}: "Riken Keiki Co., Ltd.", + [3]byte{0, 33, 188}: "ZALA COMPUTER", + [3]byte{0, 33, 189}: "Nintendo Co., Ltd.", + [3]byte{0, 33, 190}: "Cisco, Service Provider Video Technology Group", + [3]byte{0, 33, 191}: "Hitachi High-Tech Control Systems Corporation", + [3]byte{0, 33, 192}: "Mobile Appliance, Inc.", + [3]byte{0, 33, 193}: "ABB Oy / Medium Voltage Products", + [3]byte{0, 33, 194}: "GL Communications Inc", + [3]byte{0, 33, 195}: "CORNELL Communications, Inc.", + [3]byte{0, 33, 196}: "Consilium AB", + [3]byte{0, 33, 197}: "3DSP Corp", + [3]byte{0, 33, 198}: "CSJ Global, Inc.", + [3]byte{0, 33, 199}: "Russound", + [3]byte{0, 33, 200}: "LOHUIS Networks", + [3]byte{0, 33, 201}: "Wavecom Asia Pacific Limited", + [3]byte{0, 33, 202}: "ART System Co., Ltd.", + [3]byte{0, 33, 203}: "SMS TECNOLOGIA ELETRONICA LTDA", + [3]byte{0, 33, 204}: "Flextronics International", + [3]byte{0, 33, 205}: "LiveTV", + [3]byte{0, 33, 206}: "NTC-Metrotek", + [3]byte{0, 33, 207}: "The Crypto Group", + [3]byte{0, 33, 208}: "Global Display Solutions Spa", + [3]byte{0, 33, 209}: "Samsung Electronics Co.,Ltd", + [3]byte{0, 33, 210}: "Samsung Electronics Co.,Ltd", + [3]byte{0, 33, 211}: "BOCOM SECURITY(ASIA PACIFIC) LIMITED", + [3]byte{0, 33, 212}: "Vollmer Werke GmbH", + [3]byte{0, 33, 213}: "X2E GmbH", + [3]byte{0, 33, 214}: "LXI Consortium", + [3]byte{0, 33, 215}: "CISCO SYSTEMS, INC.", + [3]byte{0, 33, 216}: "CISCO SYSTEMS, INC.", + [3]byte{0, 33, 217}: "SEKONIC CORPORATION", + [3]byte{0, 33, 218}: "Automation Products Group Inc.", + [3]byte{0, 33, 219}: "Santachi Video Technology (Shenzhen) Co., Ltd.", + [3]byte{0, 33, 220}: "TECNOALARM S.r.l.", + [3]byte{0, 33, 221}: "Northstar Systems Corp", + [3]byte{0, 33, 222}: "Firepro Wireless", + [3]byte{0, 33, 223}: "Martin Christ GmbH", + [3]byte{0, 33, 224}: "CommAgility Ltd", + [3]byte{0, 33, 225}: "Nortel Networks", + [3]byte{0, 33, 226}: "Creative Electronic GmbH", + [3]byte{0, 33, 227}: "SerialTek LLC", + [3]byte{0, 33, 228}: "I-WIN", + [3]byte{0, 33, 229}: "Display Solution AG", + [3]byte{0, 33, 230}: "Starlight Video Limited", + [3]byte{0, 33, 231}: "Informatics Services Corporation", + [3]byte{0, 33, 232}: "Murata Manufacturing Co., Ltd.", + [3]byte{0, 33, 233}: "Apple", + [3]byte{0, 33, 234}: "Bystronic Laser AG", + [3]byte{0, 33, 235}: "ESP SYSTEMS, LLC", + [3]byte{0, 33, 236}: "Solutronic GmbH", + [3]byte{0, 33, 237}: "Telegesis", + [3]byte{0, 33, 238}: "Full Spectrum Inc.", + [3]byte{0, 33, 239}: "Kapsys", + [3]byte{0, 33, 240}: "EW3 Technologies LLC", + [3]byte{0, 33, 241}: "Tutus Data AB", + [3]byte{0, 33, 242}: "EASY3CALL Technology Limited", + [3]byte{0, 33, 243}: "Si14 SpA", + [3]byte{0, 33, 244}: "INRange Systems, Inc", + [3]byte{0, 33, 245}: "Western Engravers Supply, Inc.", + [3]byte{0, 33, 246}: "Oracle Corporation", + [3]byte{0, 33, 247}: "HPN Supply Chain", + [3]byte{0, 33, 248}: "Enseo, Inc.", + [3]byte{0, 33, 249}: "WIRECOM Technologies", + [3]byte{0, 33, 250}: "A4SP Technologies Ltd.", + [3]byte{0, 33, 251}: "LG Electronics", + [3]byte{0, 33, 252}: "Nokia Danmark A/S", + [3]byte{0, 33, 253}: "DSTA S.L.", + [3]byte{0, 33, 254}: "Nokia Danmark A/S", + [3]byte{0, 33, 255}: "Cyfrowy Polsat SA", + [3]byte{0, 34, 0}: "IBM Corp", + [3]byte{0, 34, 1}: "Aksys Networks Inc", + [3]byte{0, 34, 2}: "Excito Elektronik i Skåne AB", + [3]byte{0, 34, 3}: "Glensound Electronics Ltd", + [3]byte{0, 34, 4}: "KORATEK", + [3]byte{0, 34, 5}: "WeLink Solutions, Inc.", + [3]byte{0, 34, 6}: "Cyberdyne Inc.", + [3]byte{0, 34, 7}: "Inteno Broadband Technology AB", + [3]byte{0, 34, 8}: "Certicom Corp", + [3]byte{0, 34, 9}: "Omron Healthcare Co., Ltd", + [3]byte{0, 34, 10}: "OnLive, Inc", + [3]byte{0, 34, 11}: "National Source Coding Center", + [3]byte{0, 34, 12}: "CISCO SYSTEMS, INC.", + [3]byte{0, 34, 13}: "CISCO SYSTEMS, INC.", + [3]byte{0, 34, 14}: "Indigo Security Co., Ltd.", + [3]byte{0, 34, 15}: "MoCA (Multimedia over Coax Alliance)", + [3]byte{0, 34, 16}: "ARRIS Group, Inc.", + [3]byte{0, 34, 17}: "Rohati Systems", + [3]byte{0, 34, 18}: "CAI Networks, Inc.", + [3]byte{0, 34, 19}: "PCI CORPORATION", + [3]byte{0, 34, 20}: "RINNAI KOREA", + [3]byte{0, 34, 21}: "ASUSTek COMPUTER INC.", + [3]byte{0, 34, 22}: "SHIBAURA VENDING MACHINE CORPORATION", + [3]byte{0, 34, 23}: "Neat Electronics", + [3]byte{0, 34, 24}: "Verivue Inc.", + [3]byte{0, 34, 25}: "Dell Inc", + [3]byte{0, 34, 26}: "Audio Precision", + [3]byte{0, 34, 27}: "Morega Systems", + [3]byte{0, 34, 28}: "PRIVATE", + [3]byte{0, 34, 29}: "Freegene Technology LTD", + [3]byte{0, 34, 30}: "Media Devices Co., Ltd.", + [3]byte{0, 34, 31}: "eSang Technologies Co., Ltd.", + [3]byte{0, 34, 32}: "Mitac Technology Corp", + [3]byte{0, 34, 33}: "ITOH DENKI CO,LTD.", + [3]byte{0, 34, 34}: "Schaffner Deutschland GmbH", + [3]byte{0, 34, 35}: "TimeKeeping Systems, Inc.", + [3]byte{0, 34, 36}: "Good Will Instrument Co., Ltd.", + [3]byte{0, 34, 37}: "Thales Avionics Ltd", + [3]byte{0, 34, 38}: "Avaak, Inc.", + [3]byte{0, 34, 39}: "uv-electronic GmbH", + [3]byte{0, 34, 40}: "Breeze Innovations Ltd.", + [3]byte{0, 34, 41}: "Compumedics Ltd", + [3]byte{0, 34, 42}: "SoundEar A/S", + [3]byte{0, 34, 43}: "Nucomm, Inc.", + [3]byte{0, 34, 44}: "Ceton Corp", + [3]byte{0, 34, 45}: "SMC Networks Inc.", + [3]byte{0, 34, 46}: "maintech GmbH", + [3]byte{0, 34, 47}: "Open Grid Computing, Inc.", + [3]byte{0, 34, 48}: "FutureLogic Inc.", + [3]byte{0, 34, 49}: "SMT&C Co., Ltd.", + [3]byte{0, 34, 50}: "Design Design Technology Ltd", + [3]byte{0, 34, 51}: "ADB Broadband Italia", + [3]byte{0, 34, 52}: "Corventis Inc.", + [3]byte{0, 34, 53}: "Strukton Systems bv", + [3]byte{0, 34, 54}: "VECTOR SP. Z O.O.", + [3]byte{0, 34, 55}: "Shinhint Group", + [3]byte{0, 34, 56}: "LOGIPLUS", + [3]byte{0, 34, 57}: "Indiana Life Sciences Incorporated", + [3]byte{0, 34, 58}: "Scientific Atlanta, Cisco SPVT Group", + [3]byte{0, 34, 59}: "Communication Networks, LLC", + [3]byte{0, 34, 60}: "RATIO Entwicklungen GmbH", + [3]byte{0, 34, 61}: "JumpGen Systems, LLC", + [3]byte{0, 34, 62}: "IRTrans GmbH", + [3]byte{0, 34, 63}: "Netgear Inc.", + [3]byte{0, 34, 64}: "Universal Telecom S/A", + [3]byte{0, 34, 65}: "Apple", + [3]byte{0, 34, 66}: "Alacron Inc.", + [3]byte{0, 34, 67}: "AzureWave Technologies, Inc.", + [3]byte{0, 34, 68}: "Chengdu Linkon Communications Device Co., Ltd", + [3]byte{0, 34, 69}: "Leine & Linde AB", + [3]byte{0, 34, 70}: "Evoc Intelligent Technology Co.,Ltd.", + [3]byte{0, 34, 71}: "DAC ENGINEERING CO., LTD.", + [3]byte{0, 34, 72}: "Microsoft Corporation", + [3]byte{0, 34, 73}: "HOME MULTIENERGY SL", + [3]byte{0, 34, 74}: "RAYLASE AG", + [3]byte{0, 34, 75}: "AIRTECH TECHNOLOGIES, INC.", + [3]byte{0, 34, 76}: "Nintendo Co., Ltd.", + [3]byte{0, 34, 77}: "MITAC INTERNATIONAL CORP.", + [3]byte{0, 34, 78}: "SEEnergy Corp.", + [3]byte{0, 34, 79}: "Byzoro Networks Ltd.", + [3]byte{0, 34, 80}: "Point Six Wireless, LLC", + [3]byte{0, 34, 81}: "Lumasense Technologies", + [3]byte{0, 34, 82}: "ZOLL Lifecor Corporation", + [3]byte{0, 34, 83}: "Entorian Technologies", + [3]byte{0, 34, 84}: "Bigelow Aerospace", + [3]byte{0, 34, 85}: "CISCO SYSTEMS, INC.", + [3]byte{0, 34, 86}: "CISCO SYSTEMS, INC.", + [3]byte{0, 34, 87}: "3Com Europe Ltd", + [3]byte{0, 34, 88}: "Taiyo Yuden Co., Ltd.", + [3]byte{0, 34, 89}: "Guangzhou New Postcom Equipment Co.,Ltd.", + [3]byte{0, 34, 90}: "Garde Security AB", + [3]byte{0, 34, 91}: "Teradici Corporation", + [3]byte{0, 34, 92}: "Multimedia & Communication Technology", + [3]byte{0, 34, 93}: "Digicable Network India Pvt. Ltd.", + [3]byte{0, 34, 94}: "Uwin Technologies Co.,LTD", + [3]byte{0, 34, 95}: "Liteon Technology Corporation", + [3]byte{0, 34, 96}: "AFREEY Inc.", + [3]byte{0, 34, 97}: "Frontier Silicon Ltd", + [3]byte{0, 34, 98}: "BEP Marine", + [3]byte{0, 34, 99}: "Koos Technical Services, Inc.", + [3]byte{0, 34, 100}: "Hewlett-Packard Company", + [3]byte{0, 34, 101}: "Nokia Danmark A/S", + [3]byte{0, 34, 102}: "Nokia Danmark A/S", + [3]byte{0, 34, 103}: "Nortel Networks", + [3]byte{0, 34, 104}: "Hon Hai Precision Ind. Co., Ltd.", + [3]byte{0, 34, 105}: "Hon Hai Precision Ind. Co., Ltd.", + [3]byte{0, 34, 106}: "Honeywell", + [3]byte{0, 34, 107}: "Cisco-Linksys, LLC", + [3]byte{0, 34, 108}: "LinkSprite Technologies, Inc.", + [3]byte{0, 34, 109}: "Shenzhen GIEC Electronics Co., Ltd.", + [3]byte{0, 34, 110}: "Gowell Electronic Limited", + [3]byte{0, 34, 111}: "3onedata Technology Co. Ltd.", + [3]byte{0, 34, 112}: "ABK North America, LLC", + [3]byte{0, 34, 113}: "Jäger Computergesteuerte Meßtechnik GmbH.", + [3]byte{0, 34, 114}: "American Micro-Fuel Device Corp.", + [3]byte{0, 34, 115}: "Techway", + [3]byte{0, 34, 116}: "FamilyPhone AB", + [3]byte{0, 34, 117}: "Belkin International Inc.", + [3]byte{0, 34, 118}: "Triple EYE B.V.", + [3]byte{0, 34, 119}: "NEC Australia Pty Ltd", + [3]byte{0, 34, 120}: "Shenzhen Tongfang Multimedia Technology Co.,Ltd.", + [3]byte{0, 34, 121}: "Nippon Conlux Co., Ltd.", + [3]byte{0, 34, 122}: "Telecom Design", + [3]byte{0, 34, 123}: "Apogee Labs, Inc.", + [3]byte{0, 34, 124}: "Woori SMT Co.,ltd", + [3]byte{0, 34, 125}: "YE DATA INC.", + [3]byte{0, 34, 126}: "Chengdu 30Kaitian Communication Industry Co.Ltd", + [3]byte{0, 34, 127}: "Ruckus Wireless", + [3]byte{0, 34, 128}: "A2B Electronics AB", + [3]byte{0, 34, 129}: "Daintree Networks Pty", + [3]byte{0, 34, 130}: "8086 Consultancy", + [3]byte{0, 34, 131}: "Juniper Networks", + [3]byte{0, 34, 132}: "DESAY A&V SCIENCE AND TECHNOLOGY CO.,LTD", + [3]byte{0, 34, 133}: "NOMUS COMM SYSTEMS", + [3]byte{0, 34, 134}: "ASTRON", + [3]byte{0, 34, 135}: "Titan Wireless LLC", + [3]byte{0, 34, 136}: "Sagrad, Inc.", + [3]byte{0, 34, 137}: "Optosecurity Inc.", + [3]byte{0, 34, 138}: "Teratronik elektronische systeme gmbh", + [3]byte{0, 34, 139}: "Kensington Computer Products Group", + [3]byte{0, 34, 140}: "Photon Europe GmbH", + [3]byte{0, 34, 141}: "GBS Laboratories LLC", + [3]byte{0, 34, 142}: "TV-NUMERIC", + [3]byte{0, 34, 143}: "CNRS", + [3]byte{0, 34, 144}: "CISCO SYSTEMS, INC.", + [3]byte{0, 34, 145}: "CISCO SYSTEMS, INC.", + [3]byte{0, 34, 146}: "Cinetal", + [3]byte{0, 34, 147}: "ZTE Corporation", + [3]byte{0, 34, 148}: "Kyocera Corporation", + [3]byte{0, 34, 149}: "SGM Technology for lighting spa", + [3]byte{0, 34, 150}: "LinoWave Corporation", + [3]byte{0, 34, 151}: "XMOS Semiconductor", + [3]byte{0, 34, 152}: "Sony Ericsson Mobile Communications", + [3]byte{0, 34, 153}: "SeaMicro Inc.", + [3]byte{0, 34, 154}: "Lastar, Inc.", + [3]byte{0, 34, 155}: "AverLogic Technologies, Inc.", + [3]byte{0, 34, 156}: "Verismo Networks Inc", + [3]byte{0, 34, 157}: "PYUNG-HWA IND.CO.,LTD", + [3]byte{0, 34, 158}: "Social Aid Research Co., Ltd.", + [3]byte{0, 34, 159}: "Sensys Traffic AB", + [3]byte{0, 34, 160}: "Delphi Corporation", + [3]byte{0, 34, 161}: "Huawei Symantec Technologies Co.,Ltd.", + [3]byte{0, 34, 162}: "Xtramus Technologies", + [3]byte{0, 34, 163}: "California Eastern Laboratories", + [3]byte{0, 34, 164}: "2Wire", + [3]byte{0, 34, 165}: "Texas Instruments", + [3]byte{0, 34, 166}: "Sony Computer Entertainment America", + [3]byte{0, 34, 167}: "Tyco Electronics AMP GmbH", + [3]byte{0, 34, 168}: "Ouman Oy", + [3]byte{0, 34, 169}: "LG Electronics Inc", + [3]byte{0, 34, 170}: "Nintendo Co., Ltd.", + [3]byte{0, 34, 171}: "Shenzhen Turbosight Technology Ltd", + [3]byte{0, 34, 172}: "Hangzhou Siyuan Tech. Co., Ltd", + [3]byte{0, 34, 173}: "TELESIS TECHNOLOGIES, INC.", + [3]byte{0, 34, 174}: "Mattel Inc.", + [3]byte{0, 34, 175}: "Safety Vision", + [3]byte{0, 34, 176}: "D-Link Corporation", + [3]byte{0, 34, 177}: "Elbit Systems", + [3]byte{0, 34, 178}: "4RF Communications Ltd", + [3]byte{0, 34, 179}: "Sei S.p.A.", + [3]byte{0, 34, 180}: "ARRIS Group, Inc.", + [3]byte{0, 34, 181}: "NOVITA", + [3]byte{0, 34, 182}: "Superflow Technologies Group", + [3]byte{0, 34, 183}: "GSS Grundig SAT-Systems GmbH", + [3]byte{0, 34, 184}: "Norcott", + [3]byte{0, 34, 185}: "Analogix Seminconductor, Inc", + [3]byte{0, 34, 186}: "HUTH Elektronik Systeme GmbH", + [3]byte{0, 34, 187}: "beyerdynamic GmbH & Co. KG", + [3]byte{0, 34, 188}: "JDSU France SAS", + [3]byte{0, 34, 189}: "CISCO SYSTEMS, INC.", + [3]byte{0, 34, 190}: "CISCO SYSTEMS, INC.", + [3]byte{0, 34, 191}: "SieAmp Group of Companies", + [3]byte{0, 34, 192}: "Shenzhen Forcelink Electronic Co, Ltd", + [3]byte{0, 34, 193}: "Active Storage Inc.", + [3]byte{0, 34, 194}: "Proview Eletrônica do Brasil LTDA", + [3]byte{0, 34, 195}: "Zeeport Technology Inc.", + [3]byte{0, 34, 196}: "epro GmbH", + [3]byte{0, 34, 197}: "INFORSON Co,Ltd.", + [3]byte{0, 34, 198}: "Sutus Inc", + [3]byte{0, 34, 199}: "SEGGER Microcontroller GmbH & Co. KG", + [3]byte{0, 34, 200}: "Applied Instruments B.V.", + [3]byte{0, 34, 201}: "Lenord, Bauer & Co GmbH", + [3]byte{0, 34, 202}: "Anviz Biometric Tech. Co., Ltd.", + [3]byte{0, 34, 203}: "IONODES Inc.", + [3]byte{0, 34, 204}: "SciLog, Inc.", + [3]byte{0, 34, 205}: "Ared Technology Co., Ltd.", + [3]byte{0, 34, 206}: "Cisco, Service Provider Video Technology Group", + [3]byte{0, 34, 207}: "PLANEX Communications INC", + [3]byte{0, 34, 208}: "Polar Electro Oy", + [3]byte{0, 34, 209}: "Albrecht Jung GmbH & Co. KG", + [3]byte{0, 34, 210}: "All Earth Comércio de Eletrônicos LTDA.", + [3]byte{0, 34, 211}: "Hub-Tech", + [3]byte{0, 34, 212}: "ComWorth Co., Ltd.", + [3]byte{0, 34, 213}: "Eaton Corp. Electrical Group Data Center Solutions - Pulizzi", + [3]byte{0, 34, 214}: "Cypak AB", + [3]byte{0, 34, 215}: "Nintendo Co., Ltd.", + [3]byte{0, 34, 216}: "Shenzhen GST Security and Safety Technology Limited", + [3]byte{0, 34, 217}: "Fortex Industrial Ltd.", + [3]byte{0, 34, 218}: "ANATEK, LLC", + [3]byte{0, 34, 219}: "Translogic Corporation", + [3]byte{0, 34, 220}: "Vigil Health Solutions Inc.", + [3]byte{0, 34, 221}: "Protecta Electronics Ltd", + [3]byte{0, 34, 222}: "OPPO Digital, Inc.", + [3]byte{0, 34, 223}: "TAMUZ Monitors", + [3]byte{0, 34, 224}: "Atlantic Software Technologies S.r.L.", + [3]byte{0, 34, 225}: "ZORT Labs, LLC.", + [3]byte{0, 34, 226}: "WABTEC Transit Division", + [3]byte{0, 34, 227}: "Amerigon", + [3]byte{0, 34, 228}: "APASS TECHNOLOGY CO., LTD.", + [3]byte{0, 34, 229}: "Fisher-Rosemount Systems Inc.", + [3]byte{0, 34, 230}: "Intelligent Data", + [3]byte{0, 34, 231}: "WPS Parking Systems", + [3]byte{0, 34, 232}: "Applition Co., Ltd.", + [3]byte{0, 34, 233}: "ProVision Communications", + [3]byte{0, 34, 234}: "Rustelcom Inc.", + [3]byte{0, 34, 235}: "Data Respons A/S", + [3]byte{0, 34, 236}: "IDEALBT TECHNOLOGY CORPORATION", + [3]byte{0, 34, 237}: "TSI Power Corporation", + [3]byte{0, 34, 238}: "Algo Communication Products Ltd", + [3]byte{0, 34, 239}: "iWDL Technologies", + [3]byte{0, 34, 240}: "3 Greens Aviation Limited", + [3]byte{0, 34, 241}: "PRIVATE", + [3]byte{0, 34, 242}: "SunPower Corp", + [3]byte{0, 34, 243}: "SHARP Corporation", + [3]byte{0, 34, 244}: "AMPAK Technology, Inc.", + [3]byte{0, 34, 245}: "Advanced Realtime Tracking GmbH", + [3]byte{0, 34, 246}: "Syracuse Research Corporation", + [3]byte{0, 34, 247}: "Conceptronic", + [3]byte{0, 34, 248}: "PIMA Electronic Systems Ltd.", + [3]byte{0, 34, 249}: "Pollin Electronic GmbH", + [3]byte{0, 34, 250}: "Intel Corporate", + [3]byte{0, 34, 251}: "Intel Corporate", + [3]byte{0, 34, 252}: "Nokia Danmark A/S", + [3]byte{0, 34, 253}: "Nokia Danmark A/S", + [3]byte{0, 34, 254}: "Microprocessor Designs Inc", + [3]byte{0, 34, 255}: "iWDL Technologies", + [3]byte{0, 35, 0}: "Cayee Computer Ltd.", + [3]byte{0, 35, 1}: "Witron Technology Limited", + [3]byte{0, 35, 2}: "Cobalt Digital, Inc.", + [3]byte{0, 35, 3}: "LITE-ON IT Corporation", + [3]byte{0, 35, 4}: "CISCO SYSTEMS, INC.", + [3]byte{0, 35, 5}: "CISCO SYSTEMS, INC.", + [3]byte{0, 35, 6}: "ALPS Electric Co., Ltd", + [3]byte{0, 35, 7}: "FUTURE INNOVATION TECH CO.,LTD", + [3]byte{0, 35, 8}: "Arcadyan Technology Corporation", + [3]byte{0, 35, 9}: "Janam Technologies LLC", + [3]byte{0, 35, 10}: "ARBURG GmbH & Co KG", + [3]byte{0, 35, 11}: "ARRIS Group, Inc.", + [3]byte{0, 35, 12}: "CLOVER ELECTRONICS CO.,LTD.", + [3]byte{0, 35, 13}: "Nortel Networks", + [3]byte{0, 35, 14}: "Gorba AG", + [3]byte{0, 35, 15}: "Hirsch Electronics Corporation", + [3]byte{0, 35, 16}: "LNC Technology Co., Ltd.", + [3]byte{0, 35, 17}: "Gloscom Co., Ltd.", + [3]byte{0, 35, 18}: "Apple", + [3]byte{0, 35, 19}: "Qool Technologies Ltd.", + [3]byte{0, 35, 20}: "Intel Corporate", + [3]byte{0, 35, 21}: "Intel Corporate", + [3]byte{0, 35, 22}: "KISAN ELECTRONICS CO", + [3]byte{0, 35, 23}: "Lasercraft Inc", + [3]byte{0, 35, 24}: "Toshiba", + [3]byte{0, 35, 25}: "Sielox LLC", + [3]byte{0, 35, 26}: "ITF Co., Ltd.", + [3]byte{0, 35, 27}: "Danaher Motion - Kollmorgen", + [3]byte{0, 35, 28}: "Fourier Systems Ltd.", + [3]byte{0, 35, 29}: "Deltacom Electronics Ltd", + [3]byte{0, 35, 30}: "Cezzer Multimedia Technologies", + [3]byte{0, 35, 31}: "Guangda Electronic & Telecommunication Technology Development Co., Ltd.", + [3]byte{0, 35, 32}: "Nicira Networks", + [3]byte{0, 35, 33}: "Avitech International Corp", + [3]byte{0, 35, 34}: "KISS Teknical Solutions, Inc.", + [3]byte{0, 35, 35}: "Zylin AS", + [3]byte{0, 35, 36}: "G-PRO COMPUTER", + [3]byte{0, 35, 37}: "IOLAN Holding", + [3]byte{0, 35, 38}: "Fujitsu Limited", + [3]byte{0, 35, 39}: "Shouyo Electronics CO., LTD", + [3]byte{0, 35, 40}: "ALCON TELECOMMUNICATIONS CO., LTD.", + [3]byte{0, 35, 41}: "DDRdrive LLC", + [3]byte{0, 35, 42}: "eonas IT-Beratung und -Entwicklung GmbH", + [3]byte{0, 35, 43}: "IRD A/S", + [3]byte{0, 35, 44}: "Senticare", + [3]byte{0, 35, 45}: "SandForce", + [3]byte{0, 35, 46}: "Kedah Electronics Engineering, LLC", + [3]byte{0, 35, 47}: "Advanced Card Systems Ltd.", + [3]byte{0, 35, 48}: "DIZIPIA, INC.", + [3]byte{0, 35, 49}: "Nintendo Co., Ltd.", + [3]byte{0, 35, 50}: "Apple", + [3]byte{0, 35, 51}: "CISCO SYSTEMS, INC.", + [3]byte{0, 35, 52}: "CISCO SYSTEMS, INC.", + [3]byte{0, 35, 53}: "Linkflex Co.,Ltd", + [3]byte{0, 35, 54}: "METEL s.r.o.", + [3]byte{0, 35, 55}: "Global Star Solutions ULC", + [3]byte{0, 35, 56}: "OJ-Electronics A/S", + [3]byte{0, 35, 57}: "Samsung Electronics", + [3]byte{0, 35, 58}: "Samsung Electronics Co.,Ltd", + [3]byte{0, 35, 59}: "C-Matic Systems Ltd", + [3]byte{0, 35, 60}: "Alflex", + [3]byte{0, 35, 61}: "Novero holding B.V.", + [3]byte{0, 35, 62}: "Alcatel-Lucent-IPD", + [3]byte{0, 35, 63}: "Purechoice Inc", + [3]byte{0, 35, 64}: "MiX Telematics", + [3]byte{0, 35, 65}: "Siemens AB, Infrastructure & Cities, Building Technologies Division, IC BT SSP SP BA PR", + [3]byte{0, 35, 66}: "Coffee Equipment Company", + [3]byte{0, 35, 67}: "TEM AG", + [3]byte{0, 35, 68}: "Objective Interface Systems, Inc.", + [3]byte{0, 35, 69}: "Sony Ericsson Mobile Communications", + [3]byte{0, 35, 70}: "Vestac", + [3]byte{0, 35, 71}: "ProCurve Networking by HP", + [3]byte{0, 35, 72}: "SAGEM COMMUNICATION", + [3]byte{0, 35, 73}: "Helmholtz Centre Berlin for Material and Energy", + [3]byte{0, 35, 74}: "PRIVATE", + [3]byte{0, 35, 75}: "Inyuan Technology Inc.", + [3]byte{0, 35, 76}: "KTC AB", + [3]byte{0, 35, 77}: "Hon Hai Precision Ind. Co., Ltd.", + [3]byte{0, 35, 78}: "Hon Hai Precision Ind. Co., Ltd.", + [3]byte{0, 35, 79}: "Luminous Power Technologies Pvt. Ltd.", + [3]byte{0, 35, 80}: "LynTec", + [3]byte{0, 35, 81}: "2Wire", + [3]byte{0, 35, 82}: "DATASENSOR S.p.A.", + [3]byte{0, 35, 83}: "F E T Elettronica snc", + [3]byte{0, 35, 84}: "ASUSTek COMPUTER INC.", + [3]byte{0, 35, 85}: "Kinco Automation(Shanghai) Ltd.", + [3]byte{0, 35, 86}: "Packet Forensics LLC", + [3]byte{0, 35, 87}: "Pitronot Technologies and Engineering P.T.E. Ltd.", + [3]byte{0, 35, 88}: "SYSTEL SA", + [3]byte{0, 35, 89}: "Benchmark Electronics ( Thailand ) Public Company Limited", + [3]byte{0, 35, 90}: "COMPAL INFORMATION (KUNSHAN) CO., Ltd.", + [3]byte{0, 35, 91}: "Gulfstream", + [3]byte{0, 35, 92}: "Aprius, Inc.", + [3]byte{0, 35, 93}: "CISCO SYSTEMS, INC.", + [3]byte{0, 35, 94}: "CISCO SYSTEMS, INC.", + [3]byte{0, 35, 95}: "Silicon Micro Sensors GmbH", + [3]byte{0, 35, 96}: "Lookit Technology Co., Ltd", + [3]byte{0, 35, 97}: "Unigen Corporation", + [3]byte{0, 35, 98}: "Goldline Controls", + [3]byte{0, 35, 99}: "Zhuhai RaySharp Technology Co., Ltd.", + [3]byte{0, 35, 100}: "Power Instruments Pte Ltd", + [3]byte{0, 35, 101}: "ELKA-Elektronik GmbH", + [3]byte{0, 35, 102}: "Beijing Siasun Electronic System Co.,Ltd.", + [3]byte{0, 35, 103}: "UniControls a.s.", + [3]byte{0, 35, 104}: "Motorola", + [3]byte{0, 35, 105}: "Cisco-Linksys, LLC", + [3]byte{0, 35, 106}: "SmartRG Inc", + [3]byte{0, 35, 107}: "Xembedded, Inc.", + [3]byte{0, 35, 108}: "Apple", + [3]byte{0, 35, 109}: "ResMed Ltd", + [3]byte{0, 35, 110}: "Burster GmbH & Co KG", + [3]byte{0, 35, 111}: "DAQ System", + [3]byte{0, 35, 112}: "Snell", + [3]byte{0, 35, 113}: "SOAM Systel", + [3]byte{0, 35, 114}: "MORE STAR INDUSTRIAL GROUP LIMITED", + [3]byte{0, 35, 115}: "GridIron Systems, Inc.", + [3]byte{0, 35, 116}: "ARRIS Group, Inc.", + [3]byte{0, 35, 117}: "ARRIS Group, Inc.", + [3]byte{0, 35, 118}: "HTC Corporation", + [3]byte{0, 35, 119}: "Isotek Electronics Ltd", + [3]byte{0, 35, 120}: "GN Netcom A/S", + [3]byte{0, 35, 121}: "Union Business Machines Co. Ltd.", + [3]byte{0, 35, 122}: "RIM", + [3]byte{0, 35, 123}: "WHDI LLC", + [3]byte{0, 35, 124}: "NEOTION", + [3]byte{0, 35, 125}: "Hewlett-Packard Company", + [3]byte{0, 35, 126}: "ELSTER GMBH", + [3]byte{0, 35, 127}: "PLANTRONICS, INC.", + [3]byte{0, 35, 128}: "Nanoteq", + [3]byte{0, 35, 129}: "Lengda Technology(Xiamen) Co.,Ltd.", + [3]byte{0, 35, 130}: "Lih Rong Electronic Enterprise Co., Ltd.", + [3]byte{0, 35, 131}: "InMage Systems Inc", + [3]byte{0, 35, 132}: "GGH Engineering s.r.l.", + [3]byte{0, 35, 133}: "ANTIPODE", + [3]byte{0, 35, 134}: "Tour & Andersson AB", + [3]byte{0, 35, 135}: "ThinkFlood, Inc.", + [3]byte{0, 35, 136}: "V.T. Telematica S.p.a.", + [3]byte{0, 35, 137}: "HANGZHOU H3C Technologies Co., Ltd.", + [3]byte{0, 35, 138}: "Ciena Corporation", + [3]byte{0, 35, 139}: "Quanta Computer Inc.", + [3]byte{0, 35, 140}: "PRIVATE", + [3]byte{0, 35, 141}: "Techno Design Co., Ltd.", + [3]byte{0, 35, 142}: "Pirelli Tyre S.p.A.", + [3]byte{0, 35, 143}: "NIDEC COPAL CORPORATION", + [3]byte{0, 35, 144}: "Algolware Corporation", + [3]byte{0, 35, 145}: "Maxian", + [3]byte{0, 35, 146}: "Proteus Industries Inc.", + [3]byte{0, 35, 147}: "AJINEXTEK", + [3]byte{0, 35, 148}: "Samjeon", + [3]byte{0, 35, 149}: "ARRIS Group, Inc.", + [3]byte{0, 35, 150}: "ANDES TECHNOLOGY CORPORATION", + [3]byte{0, 35, 151}: "Westell Technologies Inc.", + [3]byte{0, 35, 152}: "Sky Control", + [3]byte{0, 35, 153}: "VD Division, Samsung Electronics Co.", + [3]byte{0, 35, 154}: "EasyData Hardware GmbH", + [3]byte{0, 35, 155}: "Elster Solutions, LLC", + [3]byte{0, 35, 156}: "Juniper Networks", + [3]byte{0, 35, 157}: "Mapower Electronics Co., Ltd", + [3]byte{0, 35, 158}: "Jiangsu Lemote Technology Corporation Limited", + [3]byte{0, 35, 159}: "Institut für Prüftechnik", + [3]byte{0, 35, 160}: "Hana CNS Co., LTD.", + [3]byte{0, 35, 161}: "Trend Electronics Ltd", + [3]byte{0, 35, 162}: "ARRIS Group, Inc.", + [3]byte{0, 35, 163}: "ARRIS Group, Inc.", + [3]byte{0, 35, 164}: "New Concepts Development Corp.", + [3]byte{0, 35, 165}: "SageTV, LLC", + [3]byte{0, 35, 166}: "E-Mon", + [3]byte{0, 35, 167}: "Redpine Signals, Inc.", + [3]byte{0, 35, 168}: "Marshall Electronics", + [3]byte{0, 35, 169}: "Beijing Detianquan Electromechanical Equipment Co., Ltd", + [3]byte{0, 35, 170}: "HFR, Inc.", + [3]byte{0, 35, 171}: "CISCO SYSTEMS, INC.", + [3]byte{0, 35, 172}: "CISCO SYSTEMS, INC.", + [3]byte{0, 35, 173}: "Xmark Corporation", + [3]byte{0, 35, 174}: "Dell Inc.", + [3]byte{0, 35, 175}: "ARRIS Group, Inc.", + [3]byte{0, 35, 176}: "COMXION Technology Inc.", + [3]byte{0, 35, 177}: "Longcheer Technology (Singapore) Pte Ltd", + [3]byte{0, 35, 178}: "Intelligent Mechatronic Systems Inc", + [3]byte{0, 35, 179}: "Lyyn AB", + [3]byte{0, 35, 180}: "Nokia Danmark A/S", + [3]byte{0, 35, 181}: "ORTANA LTD", + [3]byte{0, 35, 182}: "SECURITE COMMUNICATIONS / HONEYWELL", + [3]byte{0, 35, 183}: "Q-Light Co., Ltd.", + [3]byte{0, 35, 184}: "Sichuan Jiuzhou Electronic Technology Co.,Ltd", + [3]byte{0, 35, 185}: "EADS Deutschland GmbH", + [3]byte{0, 35, 186}: "Chroma", + [3]byte{0, 35, 187}: "Schmitt Industries", + [3]byte{0, 35, 188}: "EQ-SYS GmbH", + [3]byte{0, 35, 189}: "Digital Ally, Inc.", + [3]byte{0, 35, 190}: "Cisco SPVTG", + [3]byte{0, 35, 191}: "Mainpine, Inc.", + [3]byte{0, 35, 192}: "Broadway Networks", + [3]byte{0, 35, 193}: "Securitas Direct AB", + [3]byte{0, 35, 194}: "SAMSUNG Electronics. Co. LTD", + [3]byte{0, 35, 195}: "LogMeIn, Inc.", + [3]byte{0, 35, 196}: "Lux Lumen", + [3]byte{0, 35, 197}: "Radiation Safety and Control Services Inc", + [3]byte{0, 35, 198}: "SMC Corporation", + [3]byte{0, 35, 199}: "AVSystem", + [3]byte{0, 35, 200}: "TEAM-R", + [3]byte{0, 35, 201}: "Sichuan Tianyi Information Science & Technology Stock CO.,LTD", + [3]byte{0, 35, 202}: "Behind The Set, LLC", + [3]byte{0, 35, 203}: "Shenzhen Full-join Technology Co.,Ltd", + [3]byte{0, 35, 204}: "Nintendo Co., Ltd.", + [3]byte{0, 35, 205}: "TP-LINK TECHNOLOGIES CO., LTD.", + [3]byte{0, 35, 206}: "KITA DENSHI CORPORATION", + [3]byte{0, 35, 207}: "CUMMINS-ALLISON CORP.", + [3]byte{0, 35, 208}: "Uniloc USA Inc.", + [3]byte{0, 35, 209}: "TRG", + [3]byte{0, 35, 210}: "Inhand Electronics, Inc.", + [3]byte{0, 35, 211}: "AirLink WiFi Networking Corp.", + [3]byte{0, 35, 212}: "Texas Instruments", + [3]byte{0, 35, 213}: "WAREMA electronic GmbH", + [3]byte{0, 35, 214}: "Samsung Electronics Co.,LTD", + [3]byte{0, 35, 215}: "Samsung Electronics", + [3]byte{0, 35, 216}: "Ball-It Oy", + [3]byte{0, 35, 217}: "Banner Engineering", + [3]byte{0, 35, 218}: "Industrial Computer Source (Deutschland)GmbH", + [3]byte{0, 35, 219}: "saxnet gmbh", + [3]byte{0, 35, 220}: "Benein, Inc", + [3]byte{0, 35, 221}: "ELGIN S.A.", + [3]byte{0, 35, 222}: "Ansync Inc.", + [3]byte{0, 35, 223}: "Apple", + [3]byte{0, 35, 224}: "INO Therapeutics LLC", + [3]byte{0, 35, 225}: "Cavena Image Products AB", + [3]byte{0, 35, 226}: "SEA Signalisation", + [3]byte{0, 35, 227}: "Microtronic AG", + [3]byte{0, 35, 228}: "IPnect co. ltd.", + [3]byte{0, 35, 229}: "IPaXiom Networks", + [3]byte{0, 35, 230}: "Pirkus, Inc.", + [3]byte{0, 35, 231}: "Hinke A/S", + [3]byte{0, 35, 232}: "Demco Corp.", + [3]byte{0, 35, 233}: "F5 Networks, Inc.", + [3]byte{0, 35, 234}: "CISCO SYSTEMS, INC.", + [3]byte{0, 35, 235}: "CISCO SYSTEMS, INC.", + [3]byte{0, 35, 236}: "Algorithmix GmbH", + [3]byte{0, 35, 237}: "ARRIS Group, Inc.", + [3]byte{0, 35, 238}: "ARRIS Group, Inc.", + [3]byte{0, 35, 239}: "Zuend Systemtechnik AG", + [3]byte{0, 35, 240}: "Shanghai Jinghan Weighing Apparatus Co. Ltd.", + [3]byte{0, 35, 241}: "Sony Ericsson Mobile Communications", + [3]byte{0, 35, 242}: "TVLogic", + [3]byte{0, 35, 243}: "Glocom, Inc.", + [3]byte{0, 35, 244}: "Masternaut", + [3]byte{0, 35, 245}: "WILO SE", + [3]byte{0, 35, 246}: "Softwell Technology Co., Ltd.", + [3]byte{0, 35, 247}: "PRIVATE", + [3]byte{0, 35, 248}: "ZyXEL Communications Corporation", + [3]byte{0, 35, 249}: "Double-Take Software, INC.", + [3]byte{0, 35, 250}: "RG Nets, Inc.", + [3]byte{0, 35, 251}: "IP Datatel, LLC.", + [3]byte{0, 35, 252}: "Ultra Stereo Labs, Inc", + [3]byte{0, 35, 253}: "AFT Atlas Fahrzeugtechnik GmbH", + [3]byte{0, 35, 254}: "Biodevices, SA", + [3]byte{0, 35, 255}: "Beijing HTTC Technology Ltd.", + [3]byte{0, 36, 0}: "Nortel Networks", + [3]byte{0, 36, 1}: "D-Link Corporation", + [3]byte{0, 36, 2}: "Op-Tection GmbH", + [3]byte{0, 36, 3}: "Nokia Danmark A/S", + [3]byte{0, 36, 4}: "Nokia Danmark A/S", + [3]byte{0, 36, 5}: "Dilog Nordic AB", + [3]byte{0, 36, 6}: "Pointmobile", + [3]byte{0, 36, 7}: "TELEM SAS", + [3]byte{0, 36, 8}: "Pacific Biosciences", + [3]byte{0, 36, 9}: "The Toro Company", + [3]byte{0, 36, 10}: "US Beverage Net", + [3]byte{0, 36, 11}: "Virtual Computer Inc.", + [3]byte{0, 36, 12}: "DELEC GmbH", + [3]byte{0, 36, 13}: "OnePath Networks LTD.", + [3]byte{0, 36, 14}: "Inventec Besta Co., Ltd.", + [3]byte{0, 36, 15}: "Ishii Tool & Engineering Corporation", + [3]byte{0, 36, 16}: "NUETEQ Technology,Inc.", + [3]byte{0, 36, 17}: "PharmaSmart LLC", + [3]byte{0, 36, 18}: "Benign Technologies Co, Ltd.", + [3]byte{0, 36, 19}: "CISCO SYSTEMS, INC.", + [3]byte{0, 36, 20}: "CISCO SYSTEMS, INC.", + [3]byte{0, 36, 21}: "Magnetic Autocontrol GmbH", + [3]byte{0, 36, 22}: "Any Use", + [3]byte{0, 36, 23}: "Thomson Telecom Belgium", + [3]byte{0, 36, 24}: "Nextwave Semiconductor", + [3]byte{0, 36, 25}: "PRIVATE", + [3]byte{0, 36, 26}: "Red Beetle Inc.", + [3]byte{0, 36, 27}: "iWOW Communications Pte Ltd", + [3]byte{0, 36, 28}: "FuGang Electronic (DG) Co.,Ltd", + [3]byte{0, 36, 29}: "GIGA-BYTE TECHNOLOGY CO.,LTD.", + [3]byte{0, 36, 30}: "Nintendo Co., Ltd.", + [3]byte{0, 36, 31}: "DCT-Delta GmbH", + [3]byte{0, 36, 32}: "NetUP Inc.", + [3]byte{0, 36, 33}: "MICRO-STAR INT'L CO., LTD.", + [3]byte{0, 36, 34}: "Knapp Logistik Automation GmbH", + [3]byte{0, 36, 35}: "AzureWave Technologies (Shanghai) Inc.", + [3]byte{0, 36, 36}: "Axis Network Technology", + [3]byte{0, 36, 37}: "Shenzhenshi chuangzhicheng Technology Co.,Ltd", + [3]byte{0, 36, 38}: "NOHMI BOSAI LTD.", + [3]byte{0, 36, 39}: "SSI COMPUTER CORP", + [3]byte{0, 36, 40}: "EnergyICT", + [3]byte{0, 36, 41}: "MK MASTER INC.", + [3]byte{0, 36, 42}: "Hittite Microwave Corporation", + [3]byte{0, 36, 43}: "Hon Hai Precision Ind.Co.,Ltd.", + [3]byte{0, 36, 44}: "Hon Hai Precision Ind. Co., Ltd.", + [3]byte{0, 36, 46}: "Datastrip Inc.", + [3]byte{0, 36, 47}: "Micron", + [3]byte{0, 36, 48}: "Ruby Tech Corp.", + [3]byte{0, 36, 49}: "Uni-v co.,ltd", + [3]byte{0, 36, 50}: "Neostar Technology Co.,LTD", + [3]byte{0, 36, 51}: "Alps Electric Co., Ltd", + [3]byte{0, 36, 52}: "Lectrosonics, Inc.", + [3]byte{0, 36, 53}: "WIDE CORPORATION", + [3]byte{0, 36, 54}: "Apple", + [3]byte{0, 36, 55}: "Motorola - BSG", + [3]byte{0, 36, 56}: "Brocade Communications Systems, Inc", + [3]byte{0, 36, 57}: "Digital Barriers Advanced Technologies", + [3]byte{0, 36, 58}: "Ludl Electronic Products", + [3]byte{0, 36, 59}: "CSSI (S) Pte Ltd", + [3]byte{0, 36, 60}: "S.A.A.A.", + [3]byte{0, 36, 61}: "Emerson Appliance Motors and Controls", + [3]byte{0, 36, 63}: "Storwize, Inc.", + [3]byte{0, 36, 64}: "Halo Monitoring, Inc.", + [3]byte{0, 36, 65}: "Wanzl Metallwarenfabrik GmbH", + [3]byte{0, 36, 66}: "Axona Limited", + [3]byte{0, 36, 67}: "Nortel Networks", + [3]byte{0, 36, 68}: "Nintendo Co., Ltd.", + [3]byte{0, 36, 69}: "CommScope Canada Inc.", + [3]byte{0, 36, 70}: "MMB Research Inc.", + [3]byte{0, 36, 71}: "Kaztek Systems", + [3]byte{0, 36, 72}: "SpiderCloud Wireless, Inc", + [3]byte{0, 36, 73}: "Shen Zhen Lite Star Electronics Technology Co., Ltd", + [3]byte{0, 36, 74}: "Voyant International", + [3]byte{0, 36, 75}: "PERCEPTRON INC", + [3]byte{0, 36, 76}: "Solartron Metrology Ltd", + [3]byte{0, 36, 77}: "Hokkaido Electronics Corporation", + [3]byte{0, 36, 78}: "RadChips, Inc.", + [3]byte{0, 36, 79}: "Asantron Technologies Ltd.", + [3]byte{0, 36, 80}: "CISCO SYSTEMS, INC.", + [3]byte{0, 36, 81}: "CISCO SYSTEMS, INC.", + [3]byte{0, 36, 82}: "Silicon Software GmbH", + [3]byte{0, 36, 83}: "Initra d.o.o.", + [3]byte{0, 36, 84}: "Samsung Electronics CO., LTD", + [3]byte{0, 36, 85}: "MuLogic BV", + [3]byte{0, 36, 86}: "2Wire", + [3]byte{0, 36, 88}: "PA Bastion CC", + [3]byte{0, 36, 89}: "ABB STOTZ-KONTAKT GmbH", + [3]byte{0, 36, 90}: "Nanjing Panda Electronics Company Limited", + [3]byte{0, 36, 91}: "RAIDON TECHNOLOGY, INC.", + [3]byte{0, 36, 92}: "Design-Com Technologies Pty. Ltd.", + [3]byte{0, 36, 93}: "Terberg besturingstechniek B.V.", + [3]byte{0, 36, 94}: "Hivision Co.,ltd", + [3]byte{0, 36, 95}: "Vine Telecom CO.,Ltd.", + [3]byte{0, 36, 96}: "Giaval Science Development Co. Ltd.", + [3]byte{0, 36, 97}: "Shin Wang Tech.", + [3]byte{0, 36, 98}: "Rayzone Corporation", + [3]byte{0, 36, 99}: "Phybridge Inc", + [3]byte{0, 36, 100}: "Bridge Technologies Co AS", + [3]byte{0, 36, 101}: "Elentec", + [3]byte{0, 36, 102}: "Unitron nv", + [3]byte{0, 36, 103}: "AOC International (Europe) GmbH", + [3]byte{0, 36, 104}: "Sumavision Technologies Co.,Ltd", + [3]byte{0, 36, 105}: "Smart Doorphones", + [3]byte{0, 36, 106}: "Solid Year Co., Ltd.", + [3]byte{0, 36, 107}: "Covia, Inc.", + [3]byte{0, 36, 108}: "ARUBA NETWORKS, INC.", + [3]byte{0, 36, 109}: "Weinzierl Engineering GmbH", + [3]byte{0, 36, 110}: "Phihong USA Corp.", + [3]byte{0, 36, 111}: "Onda Communication spa", + [3]byte{0, 36, 112}: "AUROTECH ultrasound AS.", + [3]byte{0, 36, 113}: "Fusion MultiSystems dba Fusion-io", + [3]byte{0, 36, 114}: "ReDriven Power Inc.", + [3]byte{0, 36, 115}: "3Com Europe Ltd", + [3]byte{0, 36, 116}: "Autronica Fire And Securirty", + [3]byte{0, 36, 117}: "Compass System(Embedded Dept.)", + [3]byte{0, 36, 118}: "TAP.tv", + [3]byte{0, 36, 119}: "Tibbo Technology", + [3]byte{0, 36, 120}: "Mag Tech Electronics Co Limited", + [3]byte{0, 36, 121}: "Optec Displays, Inc.", + [3]byte{0, 36, 122}: "FU YI CHENG Technology Co., Ltd.", + [3]byte{0, 36, 123}: "Actiontec Electronics, Inc", + [3]byte{0, 36, 124}: "Nokia Danmark A/S", + [3]byte{0, 36, 125}: "Nokia Danmark A/S", + [3]byte{0, 36, 126}: "Universal Global Scientific Industrial Co., Ltd", + [3]byte{0, 36, 127}: "Nortel Networks", + [3]byte{0, 36, 128}: "Meteocontrol GmbH", + [3]byte{0, 36, 129}: "Hewlett-Packard Company", + [3]byte{0, 36, 130}: "Ruckus Wireless", + [3]byte{0, 36, 131}: "LG Electronics", + [3]byte{0, 36, 132}: "Bang and Olufsen Medicom a/s", + [3]byte{0, 36, 133}: "ConteXtream Ltd", + [3]byte{0, 36, 134}: "DesignArt Networks", + [3]byte{0, 36, 135}: "Blackboard Inc.", + [3]byte{0, 36, 136}: "Centre For Development Of Telematics", + [3]byte{0, 36, 137}: "Vodafone Omnitel N.V.", + [3]byte{0, 36, 138}: "Kaga Electronics Co., Ltd.", + [3]byte{0, 36, 139}: "HYBUS CO., LTD.", + [3]byte{0, 36, 140}: "ASUSTek COMPUTER INC.", + [3]byte{0, 36, 141}: "Sony Computer Entertainment Inc.", + [3]byte{0, 36, 142}: "Infoware ZRt.", + [3]byte{0, 36, 143}: "DO-MONIX", + [3]byte{0, 36, 144}: "Samsung Electronics Co.,LTD", + [3]byte{0, 36, 145}: "Samsung Electronics", + [3]byte{0, 36, 146}: "Motorola, Broadband Solutions Group", + [3]byte{0, 36, 147}: "ARRIS Group, Inc.", + [3]byte{0, 36, 148}: "Shenzhen Baoxin Tech CO., Ltd.", + [3]byte{0, 36, 149}: "ARRIS Group, Inc.", + [3]byte{0, 36, 150}: "Ginzinger electronic systems", + [3]byte{0, 36, 151}: "CISCO SYSTEMS, INC.", + [3]byte{0, 36, 152}: "CISCO SYSTEMS, INC.", + [3]byte{0, 36, 153}: "Aquila Technologies", + [3]byte{0, 36, 154}: "Beijing Zhongchuang Telecommunication Test Co., Ltd.", + [3]byte{0, 36, 155}: "Action Star Enterprise Co., Ltd.", + [3]byte{0, 36, 156}: "Bimeng Comunication System Co. Ltd", + [3]byte{0, 36, 157}: "NES Technology Inc.", + [3]byte{0, 36, 158}: "ADC-Elektronik GmbH", + [3]byte{0, 36, 159}: "RIM Testing Services", + [3]byte{0, 36, 160}: "ARRIS Group, Inc.", + [3]byte{0, 36, 161}: "ARRIS Group, Inc.", + [3]byte{0, 36, 162}: "Hong Kong Middleware Technology Limited", + [3]byte{0, 36, 163}: "Sonim Technologies Inc", + [3]byte{0, 36, 164}: "Siklu Communication", + [3]byte{0, 36, 165}: "Buffalo Inc.", + [3]byte{0, 36, 166}: "TELESTAR DIGITAL GmbH", + [3]byte{0, 36, 167}: "Advanced Video Communications Inc.", + [3]byte{0, 36, 168}: "ProCurve Networking by HP", + [3]byte{0, 36, 169}: "Ag Leader Technology", + [3]byte{0, 36, 170}: "Dycor Technologies Ltd.", + [3]byte{0, 36, 171}: "A7 Engineering, Inc.", + [3]byte{0, 36, 172}: "Hangzhou DPtech Technologies Co., Ltd.", + [3]byte{0, 36, 173}: "Adolf Thies Gmbh & Co. KG", + [3]byte{0, 36, 174}: "Morpho", + [3]byte{0, 36, 175}: "EchoStar Technologies", + [3]byte{0, 36, 176}: "ESAB AB", + [3]byte{0, 36, 177}: "Coulomb Technologies", + [3]byte{0, 36, 178}: "Netgear", + [3]byte{0, 36, 179}: "Graf-Syteco GmbH & Co. KG", + [3]byte{0, 36, 180}: "ESCATRONIC GmbH", + [3]byte{0, 36, 181}: "Nortel Networks", + [3]byte{0, 36, 182}: "Seagate Technology", + [3]byte{0, 36, 183}: "GridPoint, Inc.", + [3]byte{0, 36, 184}: "free alliance sdn bhd", + [3]byte{0, 36, 185}: "Wuhan Higheasy Electronic Technology Development Co.Ltd", + [3]byte{0, 36, 186}: "Texas Instruments", + [3]byte{0, 36, 187}: "CENTRAL Corporation", + [3]byte{0, 36, 188}: "HuRob Co.,Ltd", + [3]byte{0, 36, 189}: "Hainzl Industriesysteme GmbH", + [3]byte{0, 36, 190}: "Sony Corporation", + [3]byte{0, 36, 191}: "CIAT", + [3]byte{0, 36, 192}: "NTI COMODO INC", + [3]byte{0, 36, 193}: "ARRIS Group, Inc.", + [3]byte{0, 36, 194}: "Asumo Co.,Ltd.", + [3]byte{0, 36, 195}: "CISCO SYSTEMS, INC.", + [3]byte{0, 36, 196}: "CISCO SYSTEMS, INC.", + [3]byte{0, 36, 197}: "Meridian Audio Limited", + [3]byte{0, 36, 198}: "Hager Electro SAS", + [3]byte{0, 36, 199}: "Mobilarm Ltd", + [3]byte{0, 36, 200}: "Broadband Solutions Group", + [3]byte{0, 36, 201}: "Broadband Solutions Group", + [3]byte{0, 36, 202}: "Tobii Technology AB", + [3]byte{0, 36, 203}: "Autonet Mobile", + [3]byte{0, 36, 204}: "Fascinations Toys and Gifts, Inc.", + [3]byte{0, 36, 205}: "Willow Garage, Inc.", + [3]byte{0, 36, 206}: "Exeltech Inc", + [3]byte{0, 36, 207}: "Inscape Data Corporation", + [3]byte{0, 36, 208}: "Shenzhen SOGOOD Industry CO.,LTD.", + [3]byte{0, 36, 209}: "Thomson Inc.", + [3]byte{0, 36, 210}: "Askey Computer", + [3]byte{0, 36, 211}: "QUALICA Inc.", + [3]byte{0, 36, 212}: "FREEBOX SA", + [3]byte{0, 36, 213}: "Winward Industrial Limited", + [3]byte{0, 36, 214}: "Intel Corporate", + [3]byte{0, 36, 215}: "Intel Corporate", + [3]byte{0, 36, 216}: "IlSung Precision", + [3]byte{0, 36, 217}: "BICOM, Inc.", + [3]byte{0, 36, 218}: "Innovar Systems Limited", + [3]byte{0, 36, 219}: "Alcohol Monitoring Systems", + [3]byte{0, 36, 220}: "Juniper Networks", + [3]byte{0, 36, 221}: "Centrak, Inc.", + [3]byte{0, 36, 222}: "GLOBAL Technology Inc.", + [3]byte{0, 36, 223}: "Digitalbox Europe GmbH", + [3]byte{0, 36, 224}: "DS Tech, LLC", + [3]byte{0, 36, 225}: "Convey Computer Corp.", + [3]byte{0, 36, 226}: "HASEGAWA ELECTRIC CO.,LTD.", + [3]byte{0, 36, 227}: "CAO Group", + [3]byte{0, 36, 228}: "Withings", + [3]byte{0, 36, 229}: "Seer Technology, Inc", + [3]byte{0, 36, 230}: "In Motion Technology Inc.", + [3]byte{0, 36, 231}: "Plaster Networks", + [3]byte{0, 36, 232}: "Dell Inc.", + [3]byte{0, 36, 233}: "Samsung Electronics Co., Ltd., Storage System Division", + [3]byte{0, 36, 234}: "iris-GmbH infrared & intelligent sensors", + [3]byte{0, 36, 235}: "ClearPath Networks, Inc.", + [3]byte{0, 36, 236}: "United Information Technology Co.,Ltd.", + [3]byte{0, 36, 237}: "YT Elec. Co,.Ltd.", + [3]byte{0, 36, 238}: "Wynmax Inc.", + [3]byte{0, 36, 239}: "Sony Ericsson Mobile Communications", + [3]byte{0, 36, 240}: "Seanodes", + [3]byte{0, 36, 241}: "Shenzhen Fanhai Sanjiang Electronics Co., Ltd.", + [3]byte{0, 36, 242}: "Uniphone Telecommunication Co., Ltd.", + [3]byte{0, 36, 243}: "Nintendo Co., Ltd.", + [3]byte{0, 36, 244}: "Kaminario Technologies Ltd.", + [3]byte{0, 36, 245}: "NDS Surgical Imaging", + [3]byte{0, 36, 246}: "MIYOSHI ELECTRONICS CORPORATION", + [3]byte{0, 36, 247}: "CISCO SYSTEMS, INC.", + [3]byte{0, 36, 248}: "Technical Solutions Company Ltd.", + [3]byte{0, 36, 249}: "CISCO SYSTEMS, INC.", + [3]byte{0, 36, 250}: "Hilger u. Kern GMBH", + [3]byte{0, 36, 251}: "PRIVATE", + [3]byte{0, 36, 252}: "QuoPin Co., Ltd.", + [3]byte{0, 36, 253}: "Accedian Networks Inc", + [3]byte{0, 36, 254}: "AVM GmbH", + [3]byte{0, 36, 255}: "QLogic Corporation", + [3]byte{0, 37, 0}: "Apple", + [3]byte{0, 37, 1}: "JSC \"Supertel\"", + [3]byte{0, 37, 2}: "NaturalPoint", + [3]byte{0, 37, 3}: "IBM Corp", + [3]byte{0, 37, 4}: "Valiant Communications Limited", + [3]byte{0, 37, 5}: "eks Engel GmbH & Co. KG", + [3]byte{0, 37, 6}: "A.I. ANTITACCHEGGIO ITALIA SRL", + [3]byte{0, 37, 7}: "ASTAK Inc.", + [3]byte{0, 37, 8}: "Maquet Cardiopulmonary AG", + [3]byte{0, 37, 9}: "SHARETRONIC Group LTD", + [3]byte{0, 37, 10}: "Security Expert Co. Ltd", + [3]byte{0, 37, 11}: "CENTROFACTOR INC", + [3]byte{0, 37, 12}: "Enertrac", + [3]byte{0, 37, 13}: "GZT Telkom-Telmor sp. z o.o.", + [3]byte{0, 37, 14}: "gt german telematics gmbh", + [3]byte{0, 37, 15}: "On-Ramp Wireless, Inc.", + [3]byte{0, 37, 16}: "Pico-Tesla Magnetic Therapies", + [3]byte{0, 37, 17}: "ELITEGROUP COMPUTER SYSTEM CO., LTD.", + [3]byte{0, 37, 18}: "ZTE Corporation", + [3]byte{0, 37, 19}: "CXP DIGITAL BV", + [3]byte{0, 37, 20}: "PC Worth Int'l Co., Ltd.", + [3]byte{0, 37, 21}: "SFR", + [3]byte{0, 37, 22}: "Integrated Design Tools, Inc.", + [3]byte{0, 37, 23}: "Venntis, LLC", + [3]byte{0, 37, 24}: "Power PLUS Communications AG", + [3]byte{0, 37, 25}: "Viaas Inc", + [3]byte{0, 37, 26}: "Psiber Data Systems Inc.", + [3]byte{0, 37, 27}: "Philips CareServant", + [3]byte{0, 37, 28}: "EDT", + [3]byte{0, 37, 29}: "DSA Encore, LLC", + [3]byte{0, 37, 30}: "ROTEL TECHNOLOGIES", + [3]byte{0, 37, 31}: "ZYNUS VISION INC.", + [3]byte{0, 37, 32}: "SMA Railway Technology GmbH", + [3]byte{0, 37, 33}: "Logitek Electronic Systems, Inc.", + [3]byte{0, 37, 34}: "ASRock Incorporation", + [3]byte{0, 37, 35}: "OCP Inc.", + [3]byte{0, 37, 36}: "Lightcomm Technology Co., Ltd", + [3]byte{0, 37, 37}: "CTERA Networks Ltd.", + [3]byte{0, 37, 38}: "Genuine Technologies Co., Ltd.", + [3]byte{0, 37, 39}: "Bitrode Corp.", + [3]byte{0, 37, 40}: "Daido Signal Co., Ltd.", + [3]byte{0, 37, 41}: "COMELIT GROUP S.P.A", + [3]byte{0, 37, 42}: "Chengdu GeeYa Technology Co.,LTD", + [3]byte{0, 37, 43}: "Stirling Energy Systems", + [3]byte{0, 37, 44}: "Entourage Systems, Inc.", + [3]byte{0, 37, 45}: "Kiryung Electronics", + [3]byte{0, 37, 46}: "Cisco SPVTG", + [3]byte{0, 37, 47}: "Energy, Inc.", + [3]byte{0, 37, 48}: "Aetas Systems Inc.", + [3]byte{0, 37, 49}: "Cloud Engines, Inc.", + [3]byte{0, 37, 50}: "Digital Recorders", + [3]byte{0, 37, 51}: "WITTENSTEIN AG", + [3]byte{0, 37, 53}: "Minimax GmbH & Co KG", + [3]byte{0, 37, 54}: "Oki Electric Industry Co., Ltd.", + [3]byte{0, 37, 55}: "Runcom Technologies Ltd.", + [3]byte{0, 37, 56}: "Samsung Electronics Co., Ltd., Memory Division", + [3]byte{0, 37, 57}: "IfTA GmbH", + [3]byte{0, 37, 58}: "CEVA, Ltd.", + [3]byte{0, 37, 59}: "din Dietmar Nocker Facilitymanagement GmbH", + [3]byte{0, 37, 60}: "2Wire", + [3]byte{0, 37, 61}: "DRS Consolidated Controls", + [3]byte{0, 37, 62}: "Sensus Metering Systems", + [3]byte{0, 37, 64}: "Quasar Technologies, Inc.", + [3]byte{0, 37, 65}: "Maquet Critical Care AB", + [3]byte{0, 37, 66}: "Pittasoft", + [3]byte{0, 37, 67}: "MONEYTECH", + [3]byte{0, 37, 68}: "LoJack Corporation", + [3]byte{0, 37, 69}: "CISCO SYSTEMS, INC.", + [3]byte{0, 37, 70}: "CISCO SYSTEMS, INC.", + [3]byte{0, 37, 71}: "Nokia Danmark A/S", + [3]byte{0, 37, 72}: "Nokia Danmark A/S", + [3]byte{0, 37, 73}: "Jeorich Tech. Co.,Ltd.", + [3]byte{0, 37, 74}: "RingCube Technologies, Inc.", + [3]byte{0, 37, 75}: "Apple", + [3]byte{0, 37, 76}: "Videon Central, Inc.", + [3]byte{0, 37, 77}: "Singapore Technologies Electronics Limited", + [3]byte{0, 37, 78}: "Vertex Wireless Co., Ltd.", + [3]byte{0, 37, 79}: "ELETTROLAB Srl", + [3]byte{0, 37, 80}: "Riverbed Technology", + [3]byte{0, 37, 81}: "SE-Elektronic GmbH", + [3]byte{0, 37, 82}: "VXI CORPORATION", + [3]byte{0, 37, 83}: "Pirelli Tyre S.p.A.", + [3]byte{0, 37, 84}: "Pixel8 Networks", + [3]byte{0, 37, 85}: "Visonic Technologies 1993 Ltd", + [3]byte{0, 37, 86}: "Hon Hai Precision Ind. Co., Ltd.", + [3]byte{0, 37, 87}: "Research In Motion", + [3]byte{0, 37, 88}: "MPEDIA", + [3]byte{0, 37, 89}: "Syphan Technologies Ltd", + [3]byte{0, 37, 90}: "Tantalus Systems Corp.", + [3]byte{0, 37, 91}: "CoachComm, LLC", + [3]byte{0, 37, 92}: "NEC Corporation", + [3]byte{0, 37, 93}: "Morningstar Corporation", + [3]byte{0, 37, 94}: "Shanghai Dare Technologies Co.,Ltd.", + [3]byte{0, 37, 95}: "SenTec AG", + [3]byte{0, 37, 96}: "Ibridge Networks & Communications Ltd.", + [3]byte{0, 37, 97}: "ProCurve Networking by HP", + [3]byte{0, 37, 98}: "interbro Co. Ltd.", + [3]byte{0, 37, 99}: "Luxtera Inc", + [3]byte{0, 37, 100}: "Dell Inc.", + [3]byte{0, 37, 101}: "Vizimax Inc.", + [3]byte{0, 37, 102}: "Samsung Electronics Co.,Ltd", + [3]byte{0, 37, 103}: "Samsung Electronics", + [3]byte{0, 37, 104}: "Shenzhen Huawei Communication Technologies Co., Ltd", + [3]byte{0, 37, 105}: "SAGEM COMMUNICATION", + [3]byte{0, 37, 106}: "inIT - Institut Industrial IT", + [3]byte{0, 37, 107}: "ATENIX E.E. s.r.l.", + [3]byte{0, 37, 108}: "\"Azimut\" Production Association JSC", + [3]byte{0, 37, 109}: "Broadband Forum", + [3]byte{0, 37, 110}: "Van Breda B.V.", + [3]byte{0, 37, 111}: "Dantherm Power", + [3]byte{0, 37, 112}: "Eastern Communications Company Limited", + [3]byte{0, 37, 113}: "Zhejiang Tianle Digital Electric Co.,Ltd", + [3]byte{0, 37, 114}: "Nemo-Q International AB", + [3]byte{0, 37, 115}: "ST Electronics (Info-Security) Pte Ltd", + [3]byte{0, 37, 116}: "KUNIMI MEDIA DEVICE Co., Ltd.", + [3]byte{0, 37, 117}: "FiberPlex Technologies, LLC", + [3]byte{0, 37, 118}: "NELI TECHNOLOGIES", + [3]byte{0, 37, 119}: "D-BOX Technologies", + [3]byte{0, 37, 120}: "JSC \"Concern \"Sozvezdie\"", + [3]byte{0, 37, 121}: "J & F Labs", + [3]byte{0, 37, 122}: "CAMCO Produktions- und Vertriebs-GmbH für Beschallungs- und Beleuchtungsanlagen", + [3]byte{0, 37, 123}: "STJ ELECTRONICS PVT LTD", + [3]byte{0, 37, 124}: "Huachentel Technology Development Co., Ltd", + [3]byte{0, 37, 125}: "PointRed Telecom Private Ltd.", + [3]byte{0, 37, 126}: "NEW POS Technology Limited", + [3]byte{0, 37, 127}: "CallTechSolution Co.,Ltd", + [3]byte{0, 37, 128}: "Equipson S.A.", + [3]byte{0, 37, 129}: "x-star networks Inc.", + [3]byte{0, 37, 130}: "Maksat Technologies (P) Ltd", + [3]byte{0, 37, 131}: "CISCO SYSTEMS, INC.", + [3]byte{0, 37, 132}: "CISCO SYSTEMS, INC.", + [3]byte{0, 37, 133}: "KOKUYO S&T Co., Ltd.", + [3]byte{0, 37, 134}: "TP-LINK Technologies Co., Ltd.", + [3]byte{0, 37, 135}: "Vitality, Inc.", + [3]byte{0, 37, 136}: "Genie Industries, Inc.", + [3]byte{0, 37, 137}: "Hills Industries Limited", + [3]byte{0, 37, 138}: "Pole/Zero Corporation", + [3]byte{0, 37, 139}: "Mellanox Technologies Ltd", + [3]byte{0, 37, 140}: "ESUS ELEKTRONIK SAN. VE DIS. TIC. LTD. STI.", + [3]byte{0, 37, 141}: "Haier", + [3]byte{0, 37, 142}: "The Weather Channel", + [3]byte{0, 37, 143}: "Trident Microsystems, Inc.", + [3]byte{0, 37, 144}: "Super Micro Computer, Inc.", + [3]byte{0, 37, 145}: "NEXTEK, Inc.", + [3]byte{0, 37, 146}: "Guangzhou Shirui Electronic Co., Ltd", + [3]byte{0, 37, 147}: "DatNet Informatikai Kft.", + [3]byte{0, 37, 148}: "Eurodesign BG LTD", + [3]byte{0, 37, 149}: "Northwest Signal Supply, Inc", + [3]byte{0, 37, 150}: "GIGAVISION srl", + [3]byte{0, 37, 151}: "Kalki Communication Technologies", + [3]byte{0, 37, 152}: "Zhong Shan City Litai Electronic Industrial Co. Ltd", + [3]byte{0, 37, 153}: "Hedon e.d. B.V.", + [3]byte{0, 37, 154}: "CEStronics GmbH", + [3]byte{0, 37, 155}: "Beijing PKUNITY Microsystems Technology Co., Ltd", + [3]byte{0, 37, 156}: "Cisco-Linksys, LLC", + [3]byte{0, 37, 157}: "PRIVATE", + [3]byte{0, 37, 158}: "Huawei Technologies Co., Ltd.", + [3]byte{0, 37, 159}: "TechnoDigital Technologies GmbH", + [3]byte{0, 37, 160}: "Nintendo Co., Ltd.", + [3]byte{0, 37, 161}: "Enalasys", + [3]byte{0, 37, 162}: "Alta Definicion LINCEO S.L.", + [3]byte{0, 37, 163}: "Trimax Wireless, Inc.", + [3]byte{0, 37, 164}: "EuroDesign embedded technologies GmbH", + [3]byte{0, 37, 165}: "Walnut Media Network", + [3]byte{0, 37, 166}: "Central Network Solution Co., Ltd.", + [3]byte{0, 37, 167}: "Comverge, Inc.", + [3]byte{0, 37, 168}: "Kontron (BeiJing) Technology Co.,Ltd", + [3]byte{0, 37, 169}: "Shanghai Embedway Information Technologies Co.,Ltd", + [3]byte{0, 37, 170}: "Beijing Soul Technology Co.,Ltd.", + [3]byte{0, 37, 171}: "AIO LCD PC BU / TPV", + [3]byte{0, 37, 172}: "I-Tech corporation", + [3]byte{0, 37, 173}: "Manufacturing Resources International", + [3]byte{0, 37, 174}: "Microsoft Corporation", + [3]byte{0, 37, 175}: "COMFILE Technology", + [3]byte{0, 37, 176}: "Schmartz Inc", + [3]byte{0, 37, 177}: "Maya-Creation Corporation", + [3]byte{0, 37, 178}: "MBDA Deutschland GmbH", + [3]byte{0, 37, 179}: "Hewlett-Packard Company", + [3]byte{0, 37, 180}: "CISCO SYSTEMS, INC.", + [3]byte{0, 37, 181}: "CISCO SYSTEMS, INC.", + [3]byte{0, 37, 182}: "Telecom FM", + [3]byte{0, 37, 183}: "Costar electronics, inc.,", + [3]byte{0, 37, 184}: "Agile Communications, Inc.", + [3]byte{0, 37, 185}: "Cypress Solutions Inc", + [3]byte{0, 37, 186}: "Alcatel-Lucent IPD", + [3]byte{0, 37, 187}: "INNERINT Co., Ltd.", + [3]byte{0, 37, 188}: "Apple", + [3]byte{0, 37, 189}: "Italdata Ingegneria dell'Idea S.p.A.", + [3]byte{0, 37, 190}: "Tektrap Systems Inc.", + [3]byte{0, 37, 191}: "Wireless Cables Inc.", + [3]byte{0, 37, 192}: "ZillionTV Corporation", + [3]byte{0, 37, 193}: "Nawoo Korea Corp.", + [3]byte{0, 37, 194}: "RingBell Co.,Ltd.", + [3]byte{0, 37, 195}: "Nortel Networks", + [3]byte{0, 37, 196}: "Ruckus Wireless", + [3]byte{0, 37, 197}: "Star Link Communication Pvt. Ltd.", + [3]byte{0, 37, 198}: "kasercorp, ltd", + [3]byte{0, 37, 199}: "altek Corporation", + [3]byte{0, 37, 200}: "S-Access GmbH", + [3]byte{0, 37, 201}: "SHENZHEN HUAPU DIGITAL CO., LTD", + [3]byte{0, 37, 202}: "LS Research, LLC", + [3]byte{0, 37, 203}: "Reiner SCT", + [3]byte{0, 37, 204}: "Mobile Communications Korea Incorporated", + [3]byte{0, 37, 205}: "Skylane Optics", + [3]byte{0, 37, 206}: "InnerSpace", + [3]byte{0, 37, 207}: "Nokia Danmark A/S", + [3]byte{0, 37, 208}: "Nokia Danmark A/S", + [3]byte{0, 37, 209}: "Eastern Asia Technology Limited", + [3]byte{0, 37, 210}: "InpegVision Co., Ltd", + [3]byte{0, 37, 211}: "AzureWave Technologies, Inc", + [3]byte{0, 37, 212}: "Fortress Technologies", + [3]byte{0, 37, 213}: "Robonica (Pty) Ltd", + [3]byte{0, 37, 214}: "The Kroger Co.", + [3]byte{0, 37, 215}: "CEDO", + [3]byte{0, 37, 216}: "KOREA MAINTENANCE", + [3]byte{0, 37, 217}: "DataFab Systems Inc.", + [3]byte{0, 37, 218}: "Secura Key", + [3]byte{0, 37, 219}: "ATI Electronics(Shenzhen) Co., LTD", + [3]byte{0, 37, 220}: "Sumitomo Electric Networks, Inc", + [3]byte{0, 37, 221}: "SUNNYTEK INFORMATION CO., LTD.", + [3]byte{0, 37, 222}: "Probits Co., LTD.", + [3]byte{0, 37, 223}: "PRIVATE", + [3]byte{0, 37, 224}: "CeedTec Sdn Bhd", + [3]byte{0, 37, 225}: "SHANGHAI SEEYOO ELECTRONIC & TECHNOLOGY CO., LTD", + [3]byte{0, 37, 226}: "Everspring Industry Co., Ltd.", + [3]byte{0, 37, 227}: "Hanshinit Inc.", + [3]byte{0, 37, 228}: "OMNI-WiFi, LLC", + [3]byte{0, 37, 229}: "LG Electronics Inc", + [3]byte{0, 37, 230}: "Belgian Monitoring Systems bvba", + [3]byte{0, 37, 231}: "Sony Ericsson Mobile Communications", + [3]byte{0, 37, 232}: "Idaho Technology", + [3]byte{0, 37, 233}: "i-mate Development, Inc.", + [3]byte{0, 37, 234}: "Iphion BV", + [3]byte{0, 37, 235}: "Reutech Radar Systems (PTY) Ltd", + [3]byte{0, 37, 236}: "Humanware", + [3]byte{0, 37, 237}: "NuVo Technologies LLC", + [3]byte{0, 37, 238}: "Avtex Ltd", + [3]byte{0, 37, 239}: "I-TEC Co., Ltd.", + [3]byte{0, 37, 240}: "Suga Electronics Limited", + [3]byte{0, 37, 241}: "ARRIS Group, Inc.", + [3]byte{0, 37, 242}: "ARRIS Group, Inc.", + [3]byte{0, 37, 243}: "Nordwestdeutsche Zählerrevision", + [3]byte{0, 37, 244}: "KoCo Connector AG", + [3]byte{0, 37, 245}: "DVS Korea, Co., Ltd", + [3]byte{0, 37, 246}: "netTALK.com, Inc.", + [3]byte{0, 37, 247}: "Ansaldo STS USA", + [3]byte{0, 37, 249}: "GMK electronic design GmbH", + [3]byte{0, 37, 250}: "J&M Analytik AG", + [3]byte{0, 37, 251}: "Tunstall Healthcare A/S", + [3]byte{0, 37, 252}: "ENDA ENDUSTRIYEL ELEKTRONIK LTD. STI.", + [3]byte{0, 37, 253}: "OBR Centrum Techniki Morskiej S.A.", + [3]byte{0, 37, 254}: "Pilot Electronics Corporation", + [3]byte{0, 37, 255}: "CreNova Multimedia Co., Ltd", + [3]byte{0, 38, 0}: "TEAC Australia Pty Ltd.", + [3]byte{0, 38, 1}: "Cutera Inc", + [3]byte{0, 38, 2}: "SMART Temps LLC", + [3]byte{0, 38, 3}: "Shenzhen Wistar Technology Co., Ltd", + [3]byte{0, 38, 4}: "Audio Processing Technology Ltd", + [3]byte{0, 38, 5}: "CC Systems AB", + [3]byte{0, 38, 6}: "RAUMFELD GmbH", + [3]byte{0, 38, 7}: "Enabling Technology Pty Ltd", + [3]byte{0, 38, 8}: "Apple", + [3]byte{0, 38, 9}: "Phyllis Co., Ltd.", + [3]byte{0, 38, 10}: "CISCO SYSTEMS, INC.", + [3]byte{0, 38, 11}: "CISCO SYSTEMS, INC.", + [3]byte{0, 38, 12}: "Dataram", + [3]byte{0, 38, 13}: "Mercury Systems, Inc.", + [3]byte{0, 38, 14}: "Ablaze Systems, LLC", + [3]byte{0, 38, 15}: "Linn Products Ltd", + [3]byte{0, 38, 16}: "Apacewave Technologies", + [3]byte{0, 38, 17}: "Licera AB", + [3]byte{0, 38, 18}: "Space Exploration Technologies", + [3]byte{0, 38, 19}: "Engel Axil S.L.", + [3]byte{0, 38, 20}: "KTNF", + [3]byte{0, 38, 21}: "Teracom Limited", + [3]byte{0, 38, 22}: "Rosemount Inc.", + [3]byte{0, 38, 23}: "OEM Worldwide", + [3]byte{0, 38, 24}: "ASUSTek COMPUTER INC.", + [3]byte{0, 38, 25}: "FRC", + [3]byte{0, 38, 26}: "Femtocomm System Technology Corp.", + [3]byte{0, 38, 27}: "LAUREL BANK MACHINES CO., LTD.", + [3]byte{0, 38, 28}: "NEOVIA INC.", + [3]byte{0, 38, 29}: "COP SECURITY SYSTEM CORP.", + [3]byte{0, 38, 30}: "QINGBANG ELEC(SZ) CO., LTD", + [3]byte{0, 38, 31}: "SAE Magnetics (H.K.) Ltd.", + [3]byte{0, 38, 32}: "ISGUS GmbH", + [3]byte{0, 38, 33}: "InteliCloud Technology Inc.", + [3]byte{0, 38, 34}: "COMPAL INFORMATION (KUNSHAN) CO., LTD.", + [3]byte{0, 38, 35}: "JRD Communication Inc", + [3]byte{0, 38, 36}: "Thomson Inc.", + [3]byte{0, 38, 37}: "MediaSputnik", + [3]byte{0, 38, 38}: "Geophysical Survey Systems, Inc.", + [3]byte{0, 38, 39}: "Truesell", + [3]byte{0, 38, 40}: "companytec automação e controle ltda.", + [3]byte{0, 38, 41}: "Juphoon System Software Inc.", + [3]byte{0, 38, 42}: "Proxense, LLC", + [3]byte{0, 38, 43}: "Wongs Electronics Co. Ltd.", + [3]byte{0, 38, 44}: "IKT Advanced Technologies s.r.o.", + [3]byte{0, 38, 45}: "Wistron Corporation", + [3]byte{0, 38, 46}: "Chengdu Jiuzhou Electronic Technology Inc", + [3]byte{0, 38, 47}: "HAMAMATSU TOA ELECTRONICS", + [3]byte{0, 38, 48}: "ACOREL S.A.S", + [3]byte{0, 38, 49}: "COMMTACT LTD", + [3]byte{0, 38, 50}: "Instrumentation Technologies d.d.", + [3]byte{0, 38, 51}: "MIR - Medical International Research", + [3]byte{0, 38, 52}: "Infineta Systems, Inc", + [3]byte{0, 38, 53}: "Bluetechnix GmbH", + [3]byte{0, 38, 54}: "ARRIS Group, Inc.", + [3]byte{0, 38, 55}: "Samsung Electro-Mechanics", + [3]byte{0, 38, 56}: "Xia Men Joyatech Co., Ltd.", + [3]byte{0, 38, 57}: "T.M. Electronics, Inc.", + [3]byte{0, 38, 58}: "Digitec Systems", + [3]byte{0, 38, 59}: "Onbnetech", + [3]byte{0, 38, 60}: "Bachmann Technology GmbH & Co. KG", + [3]byte{0, 38, 61}: "MIA Corporation", + [3]byte{0, 38, 62}: "Trapeze Networks", + [3]byte{0, 38, 63}: "LIOS Technology GmbH", + [3]byte{0, 38, 64}: "Baustem Broadband Technologies, Ltd.", + [3]byte{0, 38, 65}: "ARRIS Group, Inc.", + [3]byte{0, 38, 66}: "ARRIS Group, Inc.", + [3]byte{0, 38, 67}: "Alps Electric Co., Ltd", + [3]byte{0, 38, 68}: "Thomson Telecom Belgium", + [3]byte{0, 38, 69}: "Circontrol S.A.", + [3]byte{0, 38, 70}: "SHENYANG TONGFANG MULTIMEDIA TECHNOLOGY COMPANY LIMITED", + [3]byte{0, 38, 71}: "WFE TECHNOLOGY CORP.", + [3]byte{0, 38, 72}: "Emitech Corp.", + [3]byte{0, 38, 74}: "Apple", + [3]byte{0, 38, 76}: "Shanghai DigiVision Technology Co., Ltd.", + [3]byte{0, 38, 77}: "Arcadyan Technology Corporation", + [3]byte{0, 38, 78}: "Rail & Road Protec GmbH", + [3]byte{0, 38, 79}: "Krüger &Gothe GmbH", + [3]byte{0, 38, 80}: "2Wire", + [3]byte{0, 38, 81}: "CISCO SYSTEMS, INC.", + [3]byte{0, 38, 82}: "CISCO SYSTEMS, INC.", + [3]byte{0, 38, 83}: "DaySequerra Corporation", + [3]byte{0, 38, 84}: "3Com Corporation", + [3]byte{0, 38, 85}: "Hewlett-Packard Company", + [3]byte{0, 38, 86}: "Sansonic Electronics USA", + [3]byte{0, 38, 87}: "OOO NPP EKRA", + [3]byte{0, 38, 88}: "T-Platforms (Cyprus) Limited", + [3]byte{0, 38, 89}: "Nintendo Co., Ltd.", + [3]byte{0, 38, 90}: "D-Link Corporation", + [3]byte{0, 38, 91}: "Hitron Technologies. Inc", + [3]byte{0, 38, 92}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{0, 38, 93}: "Samsung Electronics", + [3]byte{0, 38, 94}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{0, 38, 95}: "Samsung Electronics Co.,Ltd", + [3]byte{0, 38, 96}: "Logiways", + [3]byte{0, 38, 97}: "Irumtek Co., Ltd.", + [3]byte{0, 38, 98}: "Actiontec Electronics, Inc", + [3]byte{0, 38, 99}: "Shenzhen Huitaiwei Tech. Ltd, co.", + [3]byte{0, 38, 100}: "Core System Japan", + [3]byte{0, 38, 101}: "ProtectedLogic Corporation", + [3]byte{0, 38, 102}: "EFM Networks", + [3]byte{0, 38, 103}: "CARECOM CO.,LTD.", + [3]byte{0, 38, 104}: "Nokia Danmark A/S", + [3]byte{0, 38, 105}: "Nokia Danmark A/S", + [3]byte{0, 38, 106}: "ESSENSIUM NV", + [3]byte{0, 38, 107}: "SHINE UNION ENTERPRISE LIMITED", + [3]byte{0, 38, 108}: "Inventec", + [3]byte{0, 38, 109}: "MobileAccess Networks", + [3]byte{0, 38, 110}: "Nissho-denki Co.,LTD.", + [3]byte{0, 38, 111}: "Coordiwise Technology Corp.", + [3]byte{0, 38, 112}: "Cinch Connectors", + [3]byte{0, 38, 113}: "AUTOVISION Co., Ltd", + [3]byte{0, 38, 114}: "AAMP of America", + [3]byte{0, 38, 115}: "RICOH COMPANY,LTD.", + [3]byte{0, 38, 116}: "Electronic Solutions, Inc.", + [3]byte{0, 38, 117}: "Aztech Electronics Pte Ltd", + [3]byte{0, 38, 118}: "COMMidt AS", + [3]byte{0, 38, 119}: "DEIF A/S", + [3]byte{0, 38, 120}: "Logic Instrument SA", + [3]byte{0, 38, 121}: "Euphonic Technologies, Inc.", + [3]byte{0, 38, 122}: "wuhan hongxin telecommunication technologies co.,ltd", + [3]byte{0, 38, 123}: "GSI Helmholtzzentrum für Schwerionenforschung GmbH", + [3]byte{0, 38, 124}: "Metz-Werke GmbH & Co KG", + [3]byte{0, 38, 125}: "A-Max Technology Macao Commercial Offshore Company Limited", + [3]byte{0, 38, 126}: "Parrot SA", + [3]byte{0, 38, 127}: "Zenterio AB", + [3]byte{0, 38, 128}: "Lockie Innovation Pty Ltd", + [3]byte{0, 38, 129}: "Interspiro AB", + [3]byte{0, 38, 130}: "Gemtek Technology Co., Ltd.", + [3]byte{0, 38, 131}: "Ajoho Enterprise Co., Ltd.", + [3]byte{0, 38, 132}: "KISAN SYSTEM", + [3]byte{0, 38, 133}: "Digital Innovation", + [3]byte{0, 38, 134}: "Quantenna Communcations, Inc.", + [3]byte{0, 38, 135}: "Corega K.K", + [3]byte{0, 38, 136}: "Juniper Networks", + [3]byte{0, 38, 137}: "General Dynamics Robotic Systems", + [3]byte{0, 38, 138}: "Terrier SC Ltd", + [3]byte{0, 38, 139}: "Guangzhou Escene Computer Technology Limited", + [3]byte{0, 38, 140}: "StarLeaf Ltd.", + [3]byte{0, 38, 141}: "CellTel S.p.A.", + [3]byte{0, 38, 142}: "Alta Solutions, Inc.", + [3]byte{0, 38, 143}: "MTA SpA", + [3]byte{0, 38, 144}: "I DO IT", + [3]byte{0, 38, 145}: "SAGEM COMMUNICATION", + [3]byte{0, 38, 146}: "Mitsubishi Electric Co.", + [3]byte{0, 38, 147}: "QVidium Technologies, Inc.", + [3]byte{0, 38, 148}: "Senscient Ltd", + [3]byte{0, 38, 149}: "ZT Group Int'l Inc", + [3]byte{0, 38, 150}: "NOOLIX Co., Ltd", + [3]byte{0, 38, 151}: "Cheetah Technologies, L.P.", + [3]byte{0, 38, 152}: "CISCO SYSTEMS, INC.", + [3]byte{0, 38, 153}: "CISCO SYSTEMS, INC.", + [3]byte{0, 38, 154}: "Carina System Co., Ltd.", + [3]byte{0, 38, 155}: "SOKRAT Ltd.", + [3]byte{0, 38, 156}: "ITUS JAPAN CO. LTD", + [3]byte{0, 38, 157}: "M2Mnet Co., Ltd.", + [3]byte{0, 38, 158}: "Quanta Computer Inc", + [3]byte{0, 38, 159}: "PRIVATE", + [3]byte{0, 38, 160}: "moblic", + [3]byte{0, 38, 161}: "Megger", + [3]byte{0, 38, 162}: "Instrumentation Technology Systems", + [3]byte{0, 38, 163}: "FQ Ingenieria Electronica S.A.", + [3]byte{0, 38, 164}: "Novus Produtos Eletronicos Ltda", + [3]byte{0, 38, 165}: "MICROROBOT.CO.,LTD", + [3]byte{0, 38, 166}: "TRIXELL", + [3]byte{0, 38, 167}: "CONNECT SRL", + [3]byte{0, 38, 168}: "DAEHAP HYPER-TECH", + [3]byte{0, 38, 169}: "Strong Technologies Pty Ltd", + [3]byte{0, 38, 170}: "Kenmec Mechanical Engineering Co., Ltd.", + [3]byte{0, 38, 171}: "SEIKO EPSON CORPORATION", + [3]byte{0, 38, 172}: "Shanghai LUSTER Teraband photonic Co., Ltd.", + [3]byte{0, 38, 173}: "Arada Systems, Inc.", + [3]byte{0, 38, 174}: "Wireless Measurement Ltd", + [3]byte{0, 38, 175}: "Duelco A/S", + [3]byte{0, 38, 176}: "Apple", + [3]byte{0, 38, 177}: "Navis Auto Motive Systems, Inc.", + [3]byte{0, 38, 178}: "Setrix GmbH", + [3]byte{0, 38, 179}: "Thales Communications Inc", + [3]byte{0, 38, 180}: "Ford Motor Company", + [3]byte{0, 38, 181}: "ICOMM Tele Ltd", + [3]byte{0, 38, 182}: "Askey Computer", + [3]byte{0, 38, 183}: "Kingston Technology Company, Inc.", + [3]byte{0, 38, 184}: "Actiontec Electronics, Inc", + [3]byte{0, 38, 185}: "Dell Inc", + [3]byte{0, 38, 186}: "ARRIS Group, Inc.", + [3]byte{0, 38, 187}: "Apple", + [3]byte{0, 38, 188}: "General Jack Technology Ltd.", + [3]byte{0, 38, 189}: "JTEC Card & Communication Co., Ltd.", + [3]byte{0, 38, 190}: "Schoonderbeek Elektronica Systemen B.V.", + [3]byte{0, 38, 191}: "ShenZhen Temobi Science&Tech Development Co.,Ltd", + [3]byte{0, 38, 192}: "EnergyHub", + [3]byte{0, 38, 193}: "ARTRAY CO., LTD.", + [3]byte{0, 38, 194}: "SCDI Co. LTD", + [3]byte{0, 38, 195}: "Insightek Corp.", + [3]byte{0, 38, 196}: "Cadmos microsystems S.r.l.", + [3]byte{0, 38, 197}: "Guangdong Gosun Telecommunications Co.,Ltd", + [3]byte{0, 38, 198}: "Intel Corporate", + [3]byte{0, 38, 199}: "Intel Corporate", + [3]byte{0, 38, 200}: "System Sensor", + [3]byte{0, 38, 201}: "Proventix Systems, Inc.", + [3]byte{0, 38, 202}: "CISCO SYSTEMS, INC.", + [3]byte{0, 38, 203}: "CISCO SYSTEMS, INC.", + [3]byte{0, 38, 204}: "Nokia Danmark A/S", + [3]byte{0, 38, 205}: "PurpleComm, Inc.", + [3]byte{0, 38, 206}: "Kozumi USA Corp.", + [3]byte{0, 38, 207}: "DEKA R&D", + [3]byte{0, 38, 208}: "Semihalf", + [3]byte{0, 38, 209}: "S Squared Innovations Inc.", + [3]byte{0, 38, 210}: "Pcube Systems, Inc.", + [3]byte{0, 38, 211}: "Zeno Information System", + [3]byte{0, 38, 212}: "IRCA SpA", + [3]byte{0, 38, 213}: "Ory Solucoes em Comercio de Informatica Ltda.", + [3]byte{0, 38, 214}: "Ningbo Andy Optoelectronic Co., Ltd.", + [3]byte{0, 38, 215}: "KM Electornic Technology Co., Ltd.", + [3]byte{0, 38, 216}: "Magic Point Inc.", + [3]byte{0, 38, 217}: "Pace plc", + [3]byte{0, 38, 218}: "Universal Media Corporation /Slovakia/ s.r.o.", + [3]byte{0, 38, 219}: "Ionics EMS Inc.", + [3]byte{0, 38, 220}: "Optical Systems Design", + [3]byte{0, 38, 221}: "Fival Science & Technology Co.,Ltd.", + [3]byte{0, 38, 222}: "FDI MATELEC", + [3]byte{0, 38, 223}: "TaiDoc Technology Corp.", + [3]byte{0, 38, 224}: "ASITEQ", + [3]byte{0, 38, 225}: "Stanford University, OpenFlow Group", + [3]byte{0, 38, 226}: "LG Electronics", + [3]byte{0, 38, 227}: "DTI", + [3]byte{0, 38, 228}: "CANAL OVERSEAS", + [3]byte{0, 38, 229}: "AEG Power Solutions", + [3]byte{0, 38, 230}: "Visionhitech Co., Ltd.", + [3]byte{0, 38, 231}: "Shanghai ONLAN Communication Tech. Co., Ltd.", + [3]byte{0, 38, 232}: "Murata Manufacturing Co., Ltd.", + [3]byte{0, 38, 233}: "SP Corp", + [3]byte{0, 38, 234}: "Cheerchip Electronic Technology (ShangHai) Co., Ltd.", + [3]byte{0, 38, 235}: "Advanced Spectrum Technology Co., Ltd.", + [3]byte{0, 38, 236}: "Legrand Home Systems, Inc", + [3]byte{0, 38, 237}: "zte corporation", + [3]byte{0, 38, 238}: "TKM GmbH", + [3]byte{0, 38, 239}: "Technology Advancement Group, Inc.", + [3]byte{0, 38, 240}: "cTrixs International GmbH.", + [3]byte{0, 38, 241}: "ProCurve Networking by HP", + [3]byte{0, 38, 242}: "Netgear", + [3]byte{0, 38, 243}: "SMC Networks", + [3]byte{0, 38, 244}: "Nesslab", + [3]byte{0, 38, 245}: "XRPLUS Inc.", + [3]byte{0, 38, 246}: "Military Communication Institute", + [3]byte{0, 38, 247}: "Infosys Technologies Ltd.", + [3]byte{0, 38, 248}: "Golden Highway Industry Development Co., Ltd.", + [3]byte{0, 38, 249}: "S.E.M. srl", + [3]byte{0, 38, 250}: "BandRich Inc.", + [3]byte{0, 38, 251}: "AirDio Wireless, Inc.", + [3]byte{0, 38, 252}: "AcSiP Technology Corp.", + [3]byte{0, 38, 253}: "Interactive Intelligence", + [3]byte{0, 38, 254}: "MKD Technology Inc.", + [3]byte{0, 38, 255}: "Research In Motion", + [3]byte{0, 39, 0}: "Shenzhen Siglent Technology Co., Ltd.", + [3]byte{0, 39, 1}: "INCOstartec GmbH", + [3]byte{0, 39, 2}: "SolarEdge Technologies", + [3]byte{0, 39, 3}: "Testech Electronics Pte Ltd", + [3]byte{0, 39, 4}: "Accelerated Concepts, Inc", + [3]byte{0, 39, 5}: "Sectronic", + [3]byte{0, 39, 6}: "YOISYS", + [3]byte{0, 39, 7}: "Lift Complex DS, JSC", + [3]byte{0, 39, 8}: "Nordiag ASA", + [3]byte{0, 39, 9}: "Nintendo Co., Ltd.", + [3]byte{0, 39, 10}: "IEE S.A.", + [3]byte{0, 39, 11}: "Adura Technologies", + [3]byte{0, 39, 12}: "CISCO SYSTEMS, INC.", + [3]byte{0, 39, 13}: "CISCO SYSTEMS, INC.", + [3]byte{0, 39, 14}: "Intel Corporate", + [3]byte{0, 39, 15}: "Envisionnovation Inc", + [3]byte{0, 39, 16}: "Intel Corporate", + [3]byte{0, 39, 17}: "LanPro Inc", + [3]byte{0, 39, 18}: "MaxVision LLC", + [3]byte{0, 39, 19}: "Universal Global Scientific Industrial Co., Ltd.", + [3]byte{0, 39, 20}: "Grainmustards, Co,ltd.", + [3]byte{0, 39, 21}: "Rebound Telecom. Co., Ltd", + [3]byte{0, 39, 22}: "Adachi-Syokai Co., Ltd.", + [3]byte{0, 39, 23}: "CE Digital(Zhenjiang)Co.,Ltd", + [3]byte{0, 39, 24}: "Suzhou NEW SEAUNION Video Technology Co.,Ltd", + [3]byte{0, 39, 25}: "TP-LINK TECHNOLOGIES CO., LTD.", + [3]byte{0, 39, 26}: "Geenovo Technology Ltd.", + [3]byte{0, 39, 27}: "Alec Sicherheitssysteme GmbH", + [3]byte{0, 39, 28}: "MERCURY CORPORATION", + [3]byte{0, 39, 29}: "Comba Telecom Systems (China) Ltd.", + [3]byte{0, 39, 30}: "Xagyl Communications", + [3]byte{0, 39, 31}: "MIPRO Electronics Co., Ltd", + [3]byte{0, 39, 32}: "NEW-SOL COM", + [3]byte{0, 39, 33}: "Shenzhen Baoan Fenda Industrial Co., Ltd", + [3]byte{0, 39, 34}: "Ubiquiti Networks", + [3]byte{0, 39, 248}: "Brocade Communications Systems, Inc.", + [3]byte{0, 42, 106}: "CISCO SYSTEMS, INC.", + [3]byte{0, 42, 175}: "LARsys-Automation GmbH", + [3]byte{0, 45, 118}: "TITECH GmbH", + [3]byte{0, 48, 0}: "ALLWELL TECHNOLOGY CORP.", + [3]byte{0, 48, 1}: "SMP", + [3]byte{0, 48, 2}: "Expand Networks", + [3]byte{0, 48, 3}: "Phasys Ltd.", + [3]byte{0, 48, 4}: "LEADTEK RESEARCH INC.", + [3]byte{0, 48, 5}: "Fujitsu Siemens Computers", + [3]byte{0, 48, 6}: "SUPERPOWER COMPUTER", + [3]byte{0, 48, 7}: "OPTI, INC.", + [3]byte{0, 48, 8}: "AVIO DIGITAL, INC.", + [3]byte{0, 48, 9}: "Tachion Networks, Inc.", + [3]byte{0, 48, 10}: "AZTECH Electronics Pte Ltd", + [3]byte{0, 48, 11}: "mPHASE Technologies, Inc.", + [3]byte{0, 48, 12}: "CONGRUENCY, LTD.", + [3]byte{0, 48, 13}: "MMC Technology, Inc.", + [3]byte{0, 48, 14}: "Klotz Digital AG", + [3]byte{0, 48, 15}: "IMT - Information Management T", + [3]byte{0, 48, 16}: "VISIONETICS INTERNATIONAL", + [3]byte{0, 48, 17}: "HMS Industrial Networks", + [3]byte{0, 48, 18}: "DIGITAL ENGINEERING LTD.", + [3]byte{0, 48, 19}: "NEC Corporation", + [3]byte{0, 48, 20}: "DIVIO, INC.", + [3]byte{0, 48, 21}: "CP CLARE CORP.", + [3]byte{0, 48, 22}: "ISHIDA CO., LTD.", + [3]byte{0, 48, 23}: "BlueArc UK Ltd", + [3]byte{0, 48, 24}: "Jetway Information Co., Ltd.", + [3]byte{0, 48, 25}: "CISCO SYSTEMS, INC.", + [3]byte{0, 48, 26}: "SMARTBRIDGES PTE. LTD.", + [3]byte{0, 48, 27}: "SHUTTLE, INC.", + [3]byte{0, 48, 28}: "ALTVATER AIRDATA SYSTEMS", + [3]byte{0, 48, 29}: "SKYSTREAM, INC.", + [3]byte{0, 48, 30}: "3COM Europe Ltd.", + [3]byte{0, 48, 31}: "OPTICAL NETWORKS, INC.", + [3]byte{0, 48, 32}: "TSI, Inc..", + [3]byte{0, 48, 33}: "HSING TECH. ENTERPRISE CO.,LTD", + [3]byte{0, 48, 34}: "Fong Kai Industrial Co., Ltd.", + [3]byte{0, 48, 35}: "COGENT COMPUTER SYSTEMS, INC.", + [3]byte{0, 48, 36}: "CISCO SYSTEMS, INC.", + [3]byte{0, 48, 37}: "CHECKOUT COMPUTER SYSTEMS, LTD", + [3]byte{0, 48, 38}: "HeiTel Digital Video GmbH", + [3]byte{0, 48, 39}: "KERBANGO, INC.", + [3]byte{0, 48, 40}: "FASE Saldatura srl", + [3]byte{0, 48, 41}: "OPICOM", + [3]byte{0, 48, 42}: "SOUTHERN INFORMATION", + [3]byte{0, 48, 43}: "INALP NETWORKS, INC.", + [3]byte{0, 48, 44}: "SYLANTRO SYSTEMS CORPORATION", + [3]byte{0, 48, 45}: "QUANTUM BRIDGE COMMUNICATIONS", + [3]byte{0, 48, 46}: "Hoft & Wessel AG", + [3]byte{0, 48, 47}: "GE Aviation System", + [3]byte{0, 48, 48}: "HARMONIX CORPORATION", + [3]byte{0, 48, 49}: "LIGHTWAVE COMMUNICATIONS, INC.", + [3]byte{0, 48, 50}: "MagicRam, Inc.", + [3]byte{0, 48, 51}: "ORIENT TELECOM CO., LTD.", + [3]byte{0, 48, 52}: "SET ENGINEERING", + [3]byte{0, 48, 53}: "Corning Incorporated", + [3]byte{0, 48, 54}: "RMP ELEKTRONIKSYSTEME GMBH", + [3]byte{0, 48, 55}: "Packard Bell Nec Services", + [3]byte{0, 48, 56}: "XCP, INC.", + [3]byte{0, 48, 57}: "SOFTBOOK PRESS", + [3]byte{0, 48, 58}: "MAATEL", + [3]byte{0, 48, 59}: "PowerCom Technology", + [3]byte{0, 48, 60}: "ONNTO CORP.", + [3]byte{0, 48, 61}: "IVA CORPORATION", + [3]byte{0, 48, 62}: "Radcom Ltd.", + [3]byte{0, 48, 63}: "TurboComm Tech Inc.", + [3]byte{0, 48, 64}: "CISCO SYSTEMS, INC.", + [3]byte{0, 48, 65}: "SAEJIN T & M CO., LTD.", + [3]byte{0, 48, 66}: "DeTeWe-Deutsche Telephonwerke", + [3]byte{0, 48, 67}: "IDREAM TECHNOLOGIES, PTE. LTD.", + [3]byte{0, 48, 68}: "CradlePoint, Inc", + [3]byte{0, 48, 69}: "Village Networks, Inc. (VNI)", + [3]byte{0, 48, 70}: "Controlled Electronic Manageme", + [3]byte{0, 48, 71}: "NISSEI ELECTRIC CO., LTD.", + [3]byte{0, 48, 72}: "Supermicro Computer, Inc.", + [3]byte{0, 48, 73}: "BRYANT TECHNOLOGY, LTD.", + [3]byte{0, 48, 74}: "Fraunhofer IPMS", + [3]byte{0, 48, 75}: "ORBACOM SYSTEMS, INC.", + [3]byte{0, 48, 76}: "APPIAN COMMUNICATIONS, INC.", + [3]byte{0, 48, 77}: "ESI", + [3]byte{0, 48, 78}: "BUSTEC PRODUCTION LTD.", + [3]byte{0, 48, 79}: "PLANET Technology Corporation", + [3]byte{0, 48, 80}: "Versa Technology", + [3]byte{0, 48, 81}: "ORBIT AVIONIC & COMMUNICATION", + [3]byte{0, 48, 82}: "ELASTIC NETWORKS", + [3]byte{0, 48, 83}: "Basler AG", + [3]byte{0, 48, 84}: "CASTLENET TECHNOLOGY, INC.", + [3]byte{0, 48, 85}: "Renesas Technology America, Inc.", + [3]byte{0, 48, 86}: "Beck IPC GmbH", + [3]byte{0, 48, 87}: "QTelNet, Inc.", + [3]byte{0, 48, 88}: "API MOTION", + [3]byte{0, 48, 89}: "KONTRON COMPACT COMPUTERS AG", + [3]byte{0, 48, 90}: "TELGEN CORPORATION", + [3]byte{0, 48, 91}: "Toko Inc.", + [3]byte{0, 48, 92}: "SMAR Laboratories Corp.", + [3]byte{0, 48, 93}: "DIGITRA SYSTEMS, INC.", + [3]byte{0, 48, 94}: "Abelko Innovation", + [3]byte{0, 48, 95}: "Hasselblad", + [3]byte{0, 48, 96}: "Powerfile, Inc.", + [3]byte{0, 48, 97}: "MobyTEL", + [3]byte{0, 48, 98}: "IP Video Networks Inc", + [3]byte{0, 48, 99}: "SANTERA SYSTEMS, INC.", + [3]byte{0, 48, 100}: "ADLINK TECHNOLOGY, INC.", + [3]byte{0, 48, 101}: "Apple", + [3]byte{0, 48, 102}: "RFM", + [3]byte{0, 48, 103}: "BIOSTAR MICROTECH INT'L CORP.", + [3]byte{0, 48, 104}: "CYBERNETICS TECH. CO., LTD.", + [3]byte{0, 48, 105}: "IMPACCT TECHNOLOGY CORP.", + [3]byte{0, 48, 106}: "PENTA MEDIA CO., LTD.", + [3]byte{0, 48, 107}: "CMOS SYSTEMS, INC.", + [3]byte{0, 48, 108}: "Hitex Holding GmbH", + [3]byte{0, 48, 109}: "LUCENT TECHNOLOGIES", + [3]byte{0, 48, 110}: "HEWLETT PACKARD", + [3]byte{0, 48, 111}: "SEYEON TECH. CO., LTD.", + [3]byte{0, 48, 112}: "1Net Corporation", + [3]byte{0, 48, 113}: "CISCO SYSTEMS, INC.", + [3]byte{0, 48, 114}: "Intellibyte Inc.", + [3]byte{0, 48, 115}: "International Microsystems, In", + [3]byte{0, 48, 116}: "EQUIINET LTD.", + [3]byte{0, 48, 117}: "ADTECH", + [3]byte{0, 48, 118}: "Akamba Corporation", + [3]byte{0, 48, 119}: "ONPREM NETWORKS", + [3]byte{0, 48, 120}: "CISCO SYSTEMS, INC.", + [3]byte{0, 48, 121}: "CQOS, INC.", + [3]byte{0, 48, 122}: "Advanced Technology & Systems", + [3]byte{0, 48, 123}: "CISCO SYSTEMS, INC.", + [3]byte{0, 48, 124}: "ADID SA", + [3]byte{0, 48, 125}: "GRE AMERICA, INC.", + [3]byte{0, 48, 126}: "Redflex Communication Systems", + [3]byte{0, 48, 127}: "IRLAN LTD.", + [3]byte{0, 48, 128}: "CISCO SYSTEMS, INC.", + [3]byte{0, 48, 129}: "ALTOS C&C", + [3]byte{0, 48, 130}: "TAIHAN ELECTRIC WIRE CO., LTD.", + [3]byte{0, 48, 131}: "Ivron Systems", + [3]byte{0, 48, 132}: "ALLIED TELESYN INTERNAIONAL", + [3]byte{0, 48, 133}: "CISCO SYSTEMS, INC.", + [3]byte{0, 48, 134}: "Transistor Devices, Inc.", + [3]byte{0, 48, 135}: "VEGA GRIESHABER KG", + [3]byte{0, 48, 136}: "Ericsson", + [3]byte{0, 48, 137}: "Spectrapoint Wireless, LLC", + [3]byte{0, 48, 138}: "NICOTRA SISTEMI S.P.A", + [3]byte{0, 48, 139}: "Brix Networks", + [3]byte{0, 48, 140}: "Quantum Corporation", + [3]byte{0, 48, 141}: "Pinnacle Systems, Inc.", + [3]byte{0, 48, 142}: "CROSS MATCH TECHNOLOGIES, INC.", + [3]byte{0, 48, 143}: "MICRILOR, Inc.", + [3]byte{0, 48, 144}: "CYRA TECHNOLOGIES, INC.", + [3]byte{0, 48, 145}: "TAIWAN FIRST LINE ELEC. CORP.", + [3]byte{0, 48, 146}: "ModuNORM GmbH", + [3]byte{0, 48, 147}: "Sonnet Technologies, Inc", + [3]byte{0, 48, 148}: "CISCO SYSTEMS, INC.", + [3]byte{0, 48, 149}: "Procomp Informatics, Ltd.", + [3]byte{0, 48, 150}: "CISCO SYSTEMS, INC.", + [3]byte{0, 48, 151}: "AB Regin", + [3]byte{0, 48, 152}: "Global Converging Technologies", + [3]byte{0, 48, 153}: "BOENIG UND KALLENBACH OHG", + [3]byte{0, 48, 154}: "ASTRO TERRA CORP.", + [3]byte{0, 48, 155}: "Smartware", + [3]byte{0, 48, 156}: "Timing Applications, Inc.", + [3]byte{0, 48, 157}: "Nimble Microsystems, Inc.", + [3]byte{0, 48, 158}: "WORKBIT CORPORATION.", + [3]byte{0, 48, 159}: "AMBER NETWORKS", + [3]byte{0, 48, 160}: "TYCO SUBMARINE SYSTEMS, LTD.", + [3]byte{0, 48, 161}: "WEBGATE Inc.", + [3]byte{0, 48, 162}: "Lightner Engineering", + [3]byte{0, 48, 163}: "CISCO SYSTEMS, INC.", + [3]byte{0, 48, 164}: "Woodwind Communications System", + [3]byte{0, 48, 165}: "ACTIVE POWER", + [3]byte{0, 48, 166}: "VIANET TECHNOLOGIES, LTD.", + [3]byte{0, 48, 167}: "SCHWEITZER ENGINEERING", + [3]byte{0, 48, 168}: "OL'E COMMUNICATIONS, INC.", + [3]byte{0, 48, 169}: "Netiverse, Inc.", + [3]byte{0, 48, 170}: "AXUS MICROSYSTEMS, INC.", + [3]byte{0, 48, 171}: "DELTA NETWORKS, INC.", + [3]byte{0, 48, 172}: "Systeme Lauer GmbH & Co., Ltd.", + [3]byte{0, 48, 173}: "SHANGHAI COMMUNICATION", + [3]byte{0, 48, 174}: "Times N System, Inc.", + [3]byte{0, 48, 175}: "Honeywell GmbH", + [3]byte{0, 48, 176}: "Convergenet Technologies", + [3]byte{0, 48, 177}: "TrunkNet", + [3]byte{0, 48, 178}: "L-3 Sonoma EO", + [3]byte{0, 48, 179}: "San Valley Systems, Inc.", + [3]byte{0, 48, 180}: "INTERSIL CORP.", + [3]byte{0, 48, 181}: "Tadiran Microwave Networks", + [3]byte{0, 48, 182}: "CISCO SYSTEMS, INC.", + [3]byte{0, 48, 183}: "Teletrol Systems, Inc.", + [3]byte{0, 48, 184}: "RiverDelta Networks", + [3]byte{0, 48, 185}: "ECTEL", + [3]byte{0, 48, 186}: "AC&T SYSTEM CO., LTD.", + [3]byte{0, 48, 187}: "CacheFlow, Inc.", + [3]byte{0, 48, 188}: "Optronic AG", + [3]byte{0, 48, 189}: "BELKIN COMPONENTS", + [3]byte{0, 48, 190}: "City-Net Technology, Inc.", + [3]byte{0, 48, 191}: "MULTIDATA GMBH", + [3]byte{0, 48, 192}: "Lara Technology, Inc.", + [3]byte{0, 48, 193}: "HEWLETT-PACKARD", + [3]byte{0, 48, 194}: "COMONE", + [3]byte{0, 48, 195}: "FLUECKIGER ELEKTRONIK AG", + [3]byte{0, 48, 196}: "Canon Imaging Systems Inc.", + [3]byte{0, 48, 197}: "CADENCE DESIGN SYSTEMS", + [3]byte{0, 48, 198}: "CONTROL SOLUTIONS, INC.", + [3]byte{0, 48, 199}: "Macromate Corp.", + [3]byte{0, 48, 200}: "GAD LINE, LTD.", + [3]byte{0, 48, 201}: "LuxN, N", + [3]byte{0, 48, 202}: "Discovery Com", + [3]byte{0, 48, 203}: "OMNI FLOW COMPUTERS, INC.", + [3]byte{0, 48, 204}: "Tenor Networks, Inc.", + [3]byte{0, 48, 205}: "CONEXANT SYSTEMS, INC.", + [3]byte{0, 48, 206}: "Zaffire", + [3]byte{0, 48, 207}: "TWO TECHNOLOGIES, INC.", + [3]byte{0, 48, 208}: "Tellabs", + [3]byte{0, 48, 209}: "INOVA CORPORATION", + [3]byte{0, 48, 210}: "WIN TECHNOLOGIES, CO., LTD.", + [3]byte{0, 48, 211}: "Agilent Technologies", + [3]byte{0, 48, 212}: "AAE Systems, Inc.", + [3]byte{0, 48, 213}: "DResearch GmbH", + [3]byte{0, 48, 214}: "MSC VERTRIEBS GMBH", + [3]byte{0, 48, 215}: "Innovative Systems, L.L.C.", + [3]byte{0, 48, 216}: "SITEK", + [3]byte{0, 48, 217}: "DATACORE SOFTWARE CORP.", + [3]byte{0, 48, 218}: "COMTREND CO.", + [3]byte{0, 48, 219}: "Mindready Solutions, Inc.", + [3]byte{0, 48, 220}: "RIGHTECH CORPORATION", + [3]byte{0, 48, 221}: "INDIGITA CORPORATION", + [3]byte{0, 48, 222}: "WAGO Kontakttechnik GmbH", + [3]byte{0, 48, 223}: "KB/TEL TELECOMUNICACIONES", + [3]byte{0, 48, 224}: "OXFORD SEMICONDUCTOR LTD.", + [3]byte{0, 48, 225}: "Network Equipment Technologies, Inc.", + [3]byte{0, 48, 226}: "GARNET SYSTEMS CO., LTD.", + [3]byte{0, 48, 227}: "SEDONA NETWORKS CORP.", + [3]byte{0, 48, 228}: "CHIYODA SYSTEM RIKEN", + [3]byte{0, 48, 229}: "Amper Datos S.A.", + [3]byte{0, 48, 230}: "Draeger Medical Systems, Inc.", + [3]byte{0, 48, 231}: "CNF MOBILE SOLUTIONS, INC.", + [3]byte{0, 48, 232}: "ENSIM CORP.", + [3]byte{0, 48, 233}: "GMA COMMUNICATION MANUFACT'G", + [3]byte{0, 48, 234}: "TeraForce Technology Corporation", + [3]byte{0, 48, 235}: "TURBONET COMMUNICATIONS, INC.", + [3]byte{0, 48, 236}: "BORGARDT", + [3]byte{0, 48, 237}: "Expert Magnetics Corp.", + [3]byte{0, 48, 238}: "DSG Technology, Inc.", + [3]byte{0, 48, 239}: "NEON TECHNOLOGY, INC.", + [3]byte{0, 48, 240}: "Uniform Industrial Corp.", + [3]byte{0, 48, 241}: "Accton Technology Corp.", + [3]byte{0, 48, 242}: "CISCO SYSTEMS, INC.", + [3]byte{0, 48, 243}: "At Work Computers", + [3]byte{0, 48, 244}: "STARDOT TECHNOLOGIES", + [3]byte{0, 48, 245}: "Wild Lab. Ltd.", + [3]byte{0, 48, 246}: "SECURELOGIX CORPORATION", + [3]byte{0, 48, 247}: "RAMIX INC.", + [3]byte{0, 48, 248}: "Dynapro Systems, Inc.", + [3]byte{0, 48, 249}: "Sollae Systems Co., Ltd.", + [3]byte{0, 48, 250}: "TELICA, INC.", + [3]byte{0, 48, 251}: "AZS Technology AG", + [3]byte{0, 48, 252}: "Terawave Communications, Inc.", + [3]byte{0, 48, 253}: "INTEGRATED SYSTEMS DESIGN", + [3]byte{0, 48, 254}: "DSA GmbH", + [3]byte{0, 48, 255}: "DATAFAB SYSTEMS, INC.", + [3]byte{0, 51, 108}: "SynapSense Corporation", + [3]byte{0, 52, 241}: "Radicom Research, Inc.", + [3]byte{0, 53, 50}: "Electro-Metrics Corporation", + [3]byte{0, 53, 96}: "Rosen Aviation", + [3]byte{0, 54, 248}: "Conti Temic microelectronic GmbH", + [3]byte{0, 54, 254}: "SuperVision", + [3]byte{0, 55, 109}: "Murata Manufacturing Co., Ltd.", + [3]byte{0, 58, 152}: "CISCO SYSTEMS, INC.", + [3]byte{0, 58, 153}: "CISCO SYSTEMS, INC.", + [3]byte{0, 58, 154}: "CISCO SYSTEMS, INC.", + [3]byte{0, 58, 155}: "CISCO SYSTEMS, INC.", + [3]byte{0, 58, 156}: "CISCO SYSTEMS, INC.", + [3]byte{0, 58, 157}: "NEC Platforms, Ltd.", + [3]byte{0, 58, 175}: "BlueBit Ltd.", + [3]byte{0, 60, 197}: "WONWOO Engineering Co., Ltd", + [3]byte{0, 61, 65}: "Hatteland Computer AS", + [3]byte{0, 62, 225}: "Apple", + [3]byte{0, 64, 0}: "PCI COMPONENTES DA AMZONIA LTD", + [3]byte{0, 64, 1}: "Zero One Technology Co. Ltd.", + [3]byte{0, 64, 2}: "PERLE SYSTEMS LIMITED", + [3]byte{0, 64, 3}: "Emerson Process Management Power & Water Solutions, Inc.", + [3]byte{0, 64, 4}: "ICM CO. LTD.", + [3]byte{0, 64, 5}: "ANI COMMUNICATIONS INC.", + [3]byte{0, 64, 6}: "SAMPO TECHNOLOGY CORPORATION", + [3]byte{0, 64, 7}: "TELMAT INFORMATIQUE", + [3]byte{0, 64, 8}: "A PLUS INFO CORPORATION", + [3]byte{0, 64, 9}: "TACHIBANA TECTRON CO., LTD.", + [3]byte{0, 64, 10}: "PIVOTAL TECHNOLOGIES, INC.", + [3]byte{0, 64, 11}: "CISCO SYSTEMS, INC.", + [3]byte{0, 64, 12}: "GENERAL MICRO SYSTEMS, INC.", + [3]byte{0, 64, 13}: "LANNET DATA COMMUNICATIONS,LTD", + [3]byte{0, 64, 14}: "MEMOTEC, INC.", + [3]byte{0, 64, 15}: "DATACOM TECHNOLOGIES", + [3]byte{0, 64, 16}: "SONIC SYSTEMS, INC.", + [3]byte{0, 64, 17}: "ANDOVER CONTROLS CORPORATION", + [3]byte{0, 64, 18}: "WINDATA, INC.", + [3]byte{0, 64, 19}: "NTT DATA COMM. SYSTEMS CORP.", + [3]byte{0, 64, 20}: "COMSOFT GMBH", + [3]byte{0, 64, 21}: "ASCOM INFRASYS AG", + [3]byte{0, 64, 22}: "ADC - Global Connectivity Solutions Division", + [3]byte{0, 64, 23}: "Silex Technology America", + [3]byte{0, 64, 24}: "ADOBE SYSTEMS, INC.", + [3]byte{0, 64, 25}: "AEON SYSTEMS, INC.", + [3]byte{0, 64, 26}: "FUJI ELECTRIC CO., LTD.", + [3]byte{0, 64, 27}: "PRINTER SYSTEMS CORP.", + [3]byte{0, 64, 28}: "AST RESEARCH, INC.", + [3]byte{0, 64, 29}: "INVISIBLE SOFTWARE, INC.", + [3]byte{0, 64, 30}: "ICC", + [3]byte{0, 64, 31}: "COLORGRAPH LTD", + [3]byte{0, 64, 32}: "TE Connectivity Ltd.", + [3]byte{0, 64, 33}: "RASTER GRAPHICS", + [3]byte{0, 64, 34}: "KLEVER COMPUTERS, INC.", + [3]byte{0, 64, 35}: "LOGIC CORPORATION", + [3]byte{0, 64, 36}: "COMPAC INC.", + [3]byte{0, 64, 37}: "MOLECULAR DYNAMICS", + [3]byte{0, 64, 38}: "Buffalo Inc.", + [3]byte{0, 64, 39}: "SMC MASSACHUSETTS, INC.", + [3]byte{0, 64, 40}: "NETCOMM LIMITED", + [3]byte{0, 64, 41}: "COMPEX", + [3]byte{0, 64, 42}: "CANOGA-PERKINS", + [3]byte{0, 64, 43}: "TRIGEM COMPUTER, INC.", + [3]byte{0, 64, 44}: "ISIS DISTRIBUTED SYSTEMS, INC.", + [3]byte{0, 64, 45}: "HARRIS ADACOM CORPORATION", + [3]byte{0, 64, 46}: "PRECISION SOFTWARE, INC.", + [3]byte{0, 64, 47}: "XLNT DESIGNS INC.", + [3]byte{0, 64, 48}: "GK COMPUTER", + [3]byte{0, 64, 49}: "KOKUSAI ELECTRIC CO., LTD", + [3]byte{0, 64, 50}: "DIGITAL COMMUNICATIONS", + [3]byte{0, 64, 51}: "ADDTRON TECHNOLOGY CO., LTD.", + [3]byte{0, 64, 52}: "BUSTEK CORPORATION", + [3]byte{0, 64, 53}: "OPCOM", + [3]byte{0, 64, 54}: "TRIBE COMPUTER WORKS, INC.", + [3]byte{0, 64, 55}: "SEA-ILAN, INC.", + [3]byte{0, 64, 56}: "TALENT ELECTRIC INCORPORATED", + [3]byte{0, 64, 57}: "OPTEC DAIICHI DENKO CO., LTD.", + [3]byte{0, 64, 58}: "IMPACT TECHNOLOGIES", + [3]byte{0, 64, 59}: "SYNERJET INTERNATIONAL CORP.", + [3]byte{0, 64, 60}: "FORKS, INC.", + [3]byte{0, 64, 61}: "Teradata Corporation", + [3]byte{0, 64, 62}: "RASTER OPS CORPORATION", + [3]byte{0, 64, 63}: "SSANGYONG COMPUTER SYSTEMS", + [3]byte{0, 64, 64}: "RING ACCESS, INC.", + [3]byte{0, 64, 65}: "FUJIKURA LTD.", + [3]byte{0, 64, 66}: "N.A.T. GMBH", + [3]byte{0, 64, 67}: "Nokia Siemens Networks GmbH & Co. KG.", + [3]byte{0, 64, 68}: "QNIX COMPUTER CO., LTD.", + [3]byte{0, 64, 69}: "TWINHEAD CORPORATION", + [3]byte{0, 64, 70}: "UDC RESEARCH LIMITED", + [3]byte{0, 64, 71}: "WIND RIVER SYSTEMS", + [3]byte{0, 64, 72}: "SMD INFORMATICA S.A.", + [3]byte{0, 64, 73}: "Roche Diagnostics International Ltd.", + [3]byte{0, 64, 74}: "WEST AUSTRALIAN DEPARTMENT", + [3]byte{0, 64, 75}: "MAPLE COMPUTER SYSTEMS", + [3]byte{0, 64, 76}: "HYPERTEC PTY LTD.", + [3]byte{0, 64, 77}: "TELECOMMUNICATIONS TECHNIQUES", + [3]byte{0, 64, 78}: "FLUENT, INC.", + [3]byte{0, 64, 79}: "SPACE & NAVAL WARFARE SYSTEMS", + [3]byte{0, 64, 80}: "IRONICS, INCORPORATED", + [3]byte{0, 64, 81}: "GRACILIS, INC.", + [3]byte{0, 64, 82}: "STAR TECHNOLOGIES, INC.", + [3]byte{0, 64, 83}: "AMPRO COMPUTERS", + [3]byte{0, 64, 84}: "CONNECTION MACHINES SERVICES", + [3]byte{0, 64, 85}: "METRONIX GMBH", + [3]byte{0, 64, 86}: "MCM JAPAN LTD.", + [3]byte{0, 64, 87}: "LOCKHEED - SANDERS", + [3]byte{0, 64, 88}: "KRONOS, INC.", + [3]byte{0, 64, 89}: "YOSHIDA KOGYO K. K.", + [3]byte{0, 64, 90}: "GOLDSTAR INFORMATION & COMM.", + [3]byte{0, 64, 91}: "FUNASSET LIMITED", + [3]byte{0, 64, 92}: "FUTURE SYSTEMS, INC.", + [3]byte{0, 64, 93}: "STAR-TEK, INC.", + [3]byte{0, 64, 94}: "NORTH HILLS ISRAEL", + [3]byte{0, 64, 95}: "AFE COMPUTERS LTD.", + [3]byte{0, 64, 96}: "COMENDEC LTD", + [3]byte{0, 64, 97}: "DATATECH ENTERPRISES CO., LTD.", + [3]byte{0, 64, 98}: "E-SYSTEMS, INC./GARLAND DIV.", + [3]byte{0, 64, 99}: "VIA TECHNOLOGIES, INC.", + [3]byte{0, 64, 100}: "KLA INSTRUMENTS CORPORATION", + [3]byte{0, 64, 101}: "GTE SPACENET", + [3]byte{0, 64, 102}: "Hitachi Metals, Ltd.", + [3]byte{0, 64, 103}: "OMNIBYTE CORPORATION", + [3]byte{0, 64, 104}: "EXTENDED SYSTEMS", + [3]byte{0, 64, 105}: "LEMCOM SYSTEMS, INC.", + [3]byte{0, 64, 106}: "KENTEK INFORMATION SYSTEMS,INC", + [3]byte{0, 64, 107}: "SYSGEN", + [3]byte{0, 64, 108}: "COPERNIQUE", + [3]byte{0, 64, 109}: "LANCO, INC.", + [3]byte{0, 64, 110}: "COROLLARY, INC.", + [3]byte{0, 64, 111}: "SYNC RESEARCH INC.", + [3]byte{0, 64, 112}: "INTERWARE CO., LTD.", + [3]byte{0, 64, 113}: "ATM COMPUTER GMBH", + [3]byte{0, 64, 114}: "Applied Innovation Inc.", + [3]byte{0, 64, 115}: "BASS ASSOCIATES", + [3]byte{0, 64, 116}: "CABLE AND WIRELESS", + [3]byte{0, 64, 117}: "Tattile SRL", + [3]byte{0, 64, 118}: "Sun Conversion Technologies", + [3]byte{0, 64, 119}: "MAXTON TECHNOLOGY CORPORATION", + [3]byte{0, 64, 120}: "WEARNES AUTOMATION PTE LTD", + [3]byte{0, 64, 121}: "JUKO MANUFACTURE COMPANY, LTD.", + [3]byte{0, 64, 122}: "SOCIETE D'EXPLOITATION DU CNIT", + [3]byte{0, 64, 123}: "SCIENTIFIC ATLANTA", + [3]byte{0, 64, 124}: "QUME CORPORATION", + [3]byte{0, 64, 125}: "EXTENSION TECHNOLOGY CORP.", + [3]byte{0, 64, 126}: "EVERGREEN SYSTEMS, INC.", + [3]byte{0, 64, 127}: "FLIR Systems", + [3]byte{0, 64, 128}: "ATHENIX CORPORATION", + [3]byte{0, 64, 129}: "MANNESMANN SCANGRAPHIC GMBH", + [3]byte{0, 64, 130}: "LABORATORY EQUIPMENT CORP.", + [3]byte{0, 64, 131}: "TDA INDUSTRIA DE PRODUTOS", + [3]byte{0, 64, 132}: "HONEYWELL ACS", + [3]byte{0, 64, 133}: "SAAB INSTRUMENTS AB", + [3]byte{0, 64, 134}: "MICHELS & KLEBERHOFF COMPUTER", + [3]byte{0, 64, 135}: "UBITREX CORPORATION", + [3]byte{0, 64, 136}: "MOBIUS TECHNOLOGIES, INC.", + [3]byte{0, 64, 137}: "MEIDENSHA CORPORATION", + [3]byte{0, 64, 138}: "TPS TELEPROCESSING SYS. GMBH", + [3]byte{0, 64, 139}: "RAYLAN CORPORATION", + [3]byte{0, 64, 140}: "AXIS COMMUNICATIONS AB", + [3]byte{0, 64, 141}: "THE GOODYEAR TIRE & RUBBER CO.", + [3]byte{0, 64, 142}: "Tattile SRL", + [3]byte{0, 64, 143}: "WM-DATA MINFO AB", + [3]byte{0, 64, 144}: "ANSEL COMMUNICATIONS", + [3]byte{0, 64, 145}: "PROCOMP INDUSTRIA ELETRONICA", + [3]byte{0, 64, 146}: "ASP COMPUTER PRODUCTS, INC.", + [3]byte{0, 64, 147}: "PAXDATA NETWORKS LTD.", + [3]byte{0, 64, 148}: "SHOGRAPHICS, INC.", + [3]byte{0, 64, 149}: "R.P.T. INTERGROUPS INT'L LTD.", + [3]byte{0, 64, 150}: "Cisco Systems", + [3]byte{0, 64, 151}: "DATEX DIVISION OF", + [3]byte{0, 64, 152}: "DRESSLER GMBH & CO.", + [3]byte{0, 64, 153}: "NEWGEN SYSTEMS CORP.", + [3]byte{0, 64, 154}: "NETWORK EXPRESS, INC.", + [3]byte{0, 64, 155}: "HAL COMPUTER SYSTEMS INC.", + [3]byte{0, 64, 156}: "TRANSWARE", + [3]byte{0, 64, 157}: "DIGIBOARD, INC.", + [3]byte{0, 64, 158}: "CONCURRENT TECHNOLOGIES LTD.", + [3]byte{0, 64, 159}: "Telco Systems, Inc.", + [3]byte{0, 64, 160}: "GOLDSTAR CO., LTD.", + [3]byte{0, 64, 161}: "ERGO COMPUTING", + [3]byte{0, 64, 162}: "KINGSTAR TECHNOLOGY INC.", + [3]byte{0, 64, 163}: "MICROUNITY SYSTEMS ENGINEERING", + [3]byte{0, 64, 164}: "ROSE ELECTRONICS", + [3]byte{0, 64, 165}: "CLINICOMP INTL.", + [3]byte{0, 64, 166}: "Cray, Inc.", + [3]byte{0, 64, 167}: "ITAUTEC PHILCO S.A.", + [3]byte{0, 64, 168}: "IMF INTERNATIONAL LTD.", + [3]byte{0, 64, 169}: "DATACOM INC.", + [3]byte{0, 64, 170}: "Metso Automation", + [3]byte{0, 64, 171}: "ROLAND DG CORPORATION", + [3]byte{0, 64, 172}: "SUPER WORKSTATION, INC.", + [3]byte{0, 64, 173}: "SMA REGELSYSTEME GMBH", + [3]byte{0, 64, 174}: "DELTA CONTROLS, INC.", + [3]byte{0, 64, 175}: "DIGITAL PRODUCTS, INC.", + [3]byte{0, 64, 176}: "BYTEX CORPORATION, ENGINEERING", + [3]byte{0, 64, 177}: "CODONICS INC.", + [3]byte{0, 64, 178}: "SYSTEMFORSCHUNG", + [3]byte{0, 64, 179}: "ParTech Inc.", + [3]byte{0, 64, 180}: "NEXTCOM K.K.", + [3]byte{0, 64, 181}: "VIDEO TECHNOLOGY COMPUTERS LTD", + [3]byte{0, 64, 182}: "COMPUTERM CORPORATION", + [3]byte{0, 64, 183}: "STEALTH COMPUTER SYSTEMS", + [3]byte{0, 64, 184}: "IDEA ASSOCIATES", + [3]byte{0, 64, 185}: "MACQ ELECTRONIQUE SA", + [3]byte{0, 64, 186}: "ALLIANT COMPUTER SYSTEMS CORP.", + [3]byte{0, 64, 187}: "GOLDSTAR CABLE CO., LTD.", + [3]byte{0, 64, 188}: "ALGORITHMICS LTD.", + [3]byte{0, 64, 189}: "STARLIGHT NETWORKS, INC.", + [3]byte{0, 64, 190}: "BOEING DEFENSE & SPACE", + [3]byte{0, 64, 191}: "CHANNEL SYSTEMS INTERN'L INC.", + [3]byte{0, 64, 192}: "VISTA CONTROLS CORPORATION", + [3]byte{0, 64, 193}: "BIZERBA-WERKE WILHEIM KRAUT", + [3]byte{0, 64, 194}: "APPLIED COMPUTING DEVICES", + [3]byte{0, 64, 195}: "FISCHER AND PORTER CO.", + [3]byte{0, 64, 196}: "KINKEI SYSTEM CORPORATION", + [3]byte{0, 64, 197}: "MICOM COMMUNICATIONS INC.", + [3]byte{0, 64, 198}: "FIBERNET RESEARCH, INC.", + [3]byte{0, 64, 199}: "RUBY TECH CORPORATION", + [3]byte{0, 64, 200}: "MILAN TECHNOLOGY CORPORATION", + [3]byte{0, 64, 201}: "NCUBE", + [3]byte{0, 64, 202}: "FIRST INTERNAT'L COMPUTER, INC", + [3]byte{0, 64, 203}: "LANWAN TECHNOLOGIES", + [3]byte{0, 64, 204}: "SILCOM MANUF'G TECHNOLOGY INC.", + [3]byte{0, 64, 205}: "TERA MICROSYSTEMS, INC.", + [3]byte{0, 64, 206}: "NET-SOURCE, INC.", + [3]byte{0, 64, 207}: "STRAWBERRY TREE, INC.", + [3]byte{0, 64, 208}: "MITAC INTERNATIONAL CORP.", + [3]byte{0, 64, 209}: "FUKUDA DENSHI CO., LTD.", + [3]byte{0, 64, 210}: "PAGINE CORPORATION", + [3]byte{0, 64, 211}: "KIMPSION INTERNATIONAL CORP.", + [3]byte{0, 64, 212}: "GAGE TALKER CORP.", + [3]byte{0, 64, 213}: "Sartorius Mechatronics T&H GmbH", + [3]byte{0, 64, 214}: "LOCAMATION B.V.", + [3]byte{0, 64, 215}: "STUDIO GEN INC.", + [3]byte{0, 64, 216}: "OCEAN OFFICE AUTOMATION LTD.", + [3]byte{0, 64, 217}: "AMERICAN MEGATRENDS INC.", + [3]byte{0, 64, 218}: "TELSPEC LTD", + [3]byte{0, 64, 219}: "ADVANCED TECHNICAL SOLUTIONS", + [3]byte{0, 64, 220}: "TRITEC ELECTRONIC GMBH", + [3]byte{0, 64, 221}: "HONG TECHNOLOGIES", + [3]byte{0, 64, 222}: "Elsag Datamat spa", + [3]byte{0, 64, 223}: "DIGALOG SYSTEMS, INC.", + [3]byte{0, 64, 224}: "ATOMWIDE LTD.", + [3]byte{0, 64, 225}: "MARNER INTERNATIONAL, INC.", + [3]byte{0, 64, 226}: "MESA RIDGE TECHNOLOGIES, INC.", + [3]byte{0, 64, 227}: "QUIN SYSTEMS LTD", + [3]byte{0, 64, 228}: "E-M TECHNOLOGY, INC.", + [3]byte{0, 64, 229}: "SYBUS CORPORATION", + [3]byte{0, 64, 230}: "C.A.E.N.", + [3]byte{0, 64, 231}: "ARNOS INSTRUMENTS & COMPUTER", + [3]byte{0, 64, 232}: "CHARLES RIVER DATA SYSTEMS,INC", + [3]byte{0, 64, 233}: "ACCORD SYSTEMS, INC.", + [3]byte{0, 64, 234}: "PLAIN TREE SYSTEMS INC", + [3]byte{0, 64, 235}: "MARTIN MARIETTA CORPORATION", + [3]byte{0, 64, 236}: "MIKASA SYSTEM ENGINEERING", + [3]byte{0, 64, 237}: "NETWORK CONTROLS INT'NATL INC.", + [3]byte{0, 64, 238}: "OPTIMEM", + [3]byte{0, 64, 239}: "HYPERCOM, INC.", + [3]byte{0, 64, 240}: "MicroBrain,Inc.", + [3]byte{0, 64, 241}: "CHUO ELECTRONICS CO., LTD.", + [3]byte{0, 64, 242}: "JANICH & KLASS COMPUTERTECHNIK", + [3]byte{0, 64, 243}: "NETCOR", + [3]byte{0, 64, 244}: "CAMEO COMMUNICATIONS, INC.", + [3]byte{0, 64, 245}: "OEM ENGINES", + [3]byte{0, 64, 246}: "KATRON COMPUTERS INC.", + [3]byte{0, 64, 247}: "Polaroid Corporation", + [3]byte{0, 64, 248}: "SYSTEMHAUS DISCOM", + [3]byte{0, 64, 249}: "COMBINET", + [3]byte{0, 64, 250}: "MICROBOARDS, INC.", + [3]byte{0, 64, 251}: "CASCADE COMMUNICATIONS CORP.", + [3]byte{0, 64, 252}: "IBR COMPUTER TECHNIK GMBH", + [3]byte{0, 64, 253}: "LXE", + [3]byte{0, 64, 254}: "SYMPLEX COMMUNICATIONS", + [3]byte{0, 64, 255}: "TELEBIT CORPORATION", + [3]byte{0, 65, 180}: "Wuxi Zhongxing Optoelectronics Technology Co.,Ltd.", + [3]byte{0, 66, 82}: "RLX Technologies", + [3]byte{0, 67, 255}: "KETRON S.R.L.", + [3]byte{0, 69, 1}: "Versus Technology, Inc.", + [3]byte{0, 70, 75}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{0, 77, 50}: "Andon Health Co.,Ltd.", + [3]byte{0, 80, 0}: "NEXO COMMUNICATIONS, INC.", + [3]byte{0, 80, 1}: "YAMASHITA SYSTEMS CORP.", + [3]byte{0, 80, 2}: "OMNISEC AG", + [3]byte{0, 80, 3}: "Xrite Inc", + [3]byte{0, 80, 4}: "3COM CORPORATION", + [3]byte{0, 80, 6}: "TAC AB", + [3]byte{0, 80, 7}: "SIEMENS TELECOMMUNICATION SYSTEMS LIMITED", + [3]byte{0, 80, 8}: "TIVA MICROCOMPUTER CORP. (TMC)", + [3]byte{0, 80, 9}: "PHILIPS BROADBAND NETWORKS", + [3]byte{0, 80, 10}: "IRIS TECHNOLOGIES, INC.", + [3]byte{0, 80, 11}: "CISCO SYSTEMS, INC.", + [3]byte{0, 80, 12}: "e-Tek Labs, Inc.", + [3]byte{0, 80, 13}: "SATORI ELECTORIC CO., LTD.", + [3]byte{0, 80, 14}: "CHROMATIS NETWORKS, INC.", + [3]byte{0, 80, 15}: "CISCO SYSTEMS, INC.", + [3]byte{0, 80, 16}: "NovaNET Learning, Inc.", + [3]byte{0, 80, 18}: "CBL - GMBH", + [3]byte{0, 80, 19}: "Chaparral Network Storage", + [3]byte{0, 80, 20}: "CISCO SYSTEMS, INC.", + [3]byte{0, 80, 21}: "BRIGHT STAR ENGINEERING", + [3]byte{0, 80, 22}: "SST/WOODHEAD INDUSTRIES", + [3]byte{0, 80, 23}: "RSR S.R.L.", + [3]byte{0, 80, 24}: "AMIT, Inc.", + [3]byte{0, 80, 25}: "SPRING TIDE NETWORKS, INC.", + [3]byte{0, 80, 26}: "IQinVision", + [3]byte{0, 80, 27}: "ABL CANADA, INC.", + [3]byte{0, 80, 28}: "JATOM SYSTEMS, INC.", + [3]byte{0, 80, 30}: "Miranda Technologies, Inc.", + [3]byte{0, 80, 31}: "MRG SYSTEMS, LTD.", + [3]byte{0, 80, 32}: "MEDIASTAR CO., LTD.", + [3]byte{0, 80, 33}: "EIS INTERNATIONAL, INC.", + [3]byte{0, 80, 34}: "ZONET TECHNOLOGY, INC.", + [3]byte{0, 80, 35}: "PG DESIGN ELECTRONICS, INC.", + [3]byte{0, 80, 36}: "NAVIC SYSTEMS, INC.", + [3]byte{0, 80, 38}: "COSYSTEMS, INC.", + [3]byte{0, 80, 39}: "GENICOM CORPORATION", + [3]byte{0, 80, 40}: "AVAL COMMUNICATIONS", + [3]byte{0, 80, 41}: "1394 PRINTER WORKING GROUP", + [3]byte{0, 80, 42}: "CISCO SYSTEMS, INC.", + [3]byte{0, 80, 43}: "GENRAD LTD.", + [3]byte{0, 80, 44}: "SOYO COMPUTER, INC.", + [3]byte{0, 80, 45}: "ACCEL, INC.", + [3]byte{0, 80, 46}: "CAMBEX CORPORATION", + [3]byte{0, 80, 47}: "TollBridge Technologies, Inc.", + [3]byte{0, 80, 48}: "FUTURE PLUS SYSTEMS", + [3]byte{0, 80, 49}: "AEROFLEX LABORATORIES, INC.", + [3]byte{0, 80, 50}: "PICAZO COMMUNICATIONS, INC.", + [3]byte{0, 80, 51}: "MAYAN NETWORKS", + [3]byte{0, 80, 54}: "NETCAM, LTD.", + [3]byte{0, 80, 55}: "KOGA ELECTRONICS CO.", + [3]byte{0, 80, 56}: "DAIN TELECOM CO., LTD.", + [3]byte{0, 80, 57}: "MARINER NETWORKS", + [3]byte{0, 80, 58}: "DATONG ELECTRONICS LTD.", + [3]byte{0, 80, 59}: "MEDIAFIRE CORPORATION", + [3]byte{0, 80, 60}: "TSINGHUA NOVEL ELECTRONICS", + [3]byte{0, 80, 62}: "CISCO SYSTEMS, INC.", + [3]byte{0, 80, 63}: "ANCHOR GAMES", + [3]byte{0, 80, 64}: "Panasonic Electric Works Co., Ltd.", + [3]byte{0, 80, 65}: "Coretronic Corporation", + [3]byte{0, 80, 66}: "SCI MANUFACTURING SINGAPORE PTE, LTD.", + [3]byte{0, 80, 67}: "MARVELL SEMICONDUCTOR, INC.", + [3]byte{0, 80, 68}: "ASACA CORPORATION", + [3]byte{0, 80, 69}: "RIOWORKS SOLUTIONS, INC.", + [3]byte{0, 80, 70}: "MENICX INTERNATIONAL CO., LTD.", + [3]byte{0, 80, 71}: "PRIVATE", + [3]byte{0, 80, 72}: "INFOLIBRIA", + [3]byte{0, 80, 73}: "Arbor Networks Inc", + [3]byte{0, 80, 74}: "ELTECO A.S.", + [3]byte{0, 80, 75}: "BARCONET N.V.", + [3]byte{0, 80, 76}: "Galil Motion Control", + [3]byte{0, 80, 77}: "Tokyo Electron Device Limited", + [3]byte{0, 80, 78}: "SIERRA MONITOR CORP.", + [3]byte{0, 80, 79}: "OLENCOM ELECTRONICS", + [3]byte{0, 80, 80}: "CISCO SYSTEMS, INC.", + [3]byte{0, 80, 81}: "IWATSU ELECTRIC CO., LTD.", + [3]byte{0, 80, 82}: "TIARA NETWORKS, INC.", + [3]byte{0, 80, 83}: "CISCO SYSTEMS, INC.", + [3]byte{0, 80, 84}: "CISCO SYSTEMS, INC.", + [3]byte{0, 80, 85}: "DOMS A/S", + [3]byte{0, 80, 86}: "VMware, Inc.", + [3]byte{0, 80, 87}: "BROADBAND ACCESS SYSTEMS", + [3]byte{0, 80, 88}: "VegaStream Group Limted", + [3]byte{0, 80, 89}: "iBAHN", + [3]byte{0, 80, 90}: "NETWORK ALCHEMY, INC.", + [3]byte{0, 80, 91}: "KAWASAKI LSI U.S.A., INC.", + [3]byte{0, 80, 92}: "TUNDO CORPORATION", + [3]byte{0, 80, 94}: "DIGITEK MICROLOGIC S.A.", + [3]byte{0, 80, 95}: "BRAND INNOVATORS", + [3]byte{0, 80, 96}: "TANDBERG TELECOM AS", + [3]byte{0, 80, 98}: "KOUWELL ELECTRONICS CORP. **", + [3]byte{0, 80, 99}: "OY COMSEL SYSTEM AB", + [3]byte{0, 80, 100}: "CAE ELECTRONICS", + [3]byte{0, 80, 101}: "TDK-Lambda Corporation", + [3]byte{0, 80, 102}: "AtecoM GmbH advanced telecomunication modules", + [3]byte{0, 80, 103}: "AEROCOMM, INC.", + [3]byte{0, 80, 104}: "ELECTRONIC INDUSTRIES ASSOCIATION", + [3]byte{0, 80, 105}: "PixStream Incorporated", + [3]byte{0, 80, 106}: "EDEVA, INC.", + [3]byte{0, 80, 107}: "SPX-ATEG", + [3]byte{0, 80, 108}: "Beijer Electronics Products AB", + [3]byte{0, 80, 109}: "VIDEOJET SYSTEMS", + [3]byte{0, 80, 110}: "CORDER ENGINEERING CORPORATION", + [3]byte{0, 80, 111}: "G-CONNECT", + [3]byte{0, 80, 112}: "CHAINTECH COMPUTER CO., LTD.", + [3]byte{0, 80, 113}: "AIWA CO., LTD.", + [3]byte{0, 80, 114}: "CORVIS CORPORATION", + [3]byte{0, 80, 115}: "CISCO SYSTEMS, INC.", + [3]byte{0, 80, 116}: "ADVANCED HI-TECH CORP.", + [3]byte{0, 80, 117}: "KESTREL SOLUTIONS", + [3]byte{0, 80, 118}: "IBM Corp", + [3]byte{0, 80, 119}: "PROLIFIC TECHNOLOGY, INC.", + [3]byte{0, 80, 120}: "MEGATON HOUSE, LTD.", + [3]byte{0, 80, 121}: "PRIVATE", + [3]byte{0, 80, 122}: "XPEED, INC.", + [3]byte{0, 80, 123}: "MERLOT COMMUNICATIONS", + [3]byte{0, 80, 124}: "VIDEOCON AG", + [3]byte{0, 80, 125}: "IFP", + [3]byte{0, 80, 126}: "NEWER TECHNOLOGY", + [3]byte{0, 80, 127}: "DrayTek Corp.", + [3]byte{0, 80, 128}: "CISCO SYSTEMS, INC.", + [3]byte{0, 80, 129}: "MURATA MACHINERY, LTD.", + [3]byte{0, 80, 130}: "FORESSON CORPORATION", + [3]byte{0, 80, 131}: "GILBARCO, INC.", + [3]byte{0, 80, 132}: "ATL PRODUCTS", + [3]byte{0, 80, 134}: "TELKOM SA, LTD.", + [3]byte{0, 80, 135}: "TERASAKI ELECTRIC CO., LTD.", + [3]byte{0, 80, 136}: "AMANO CORPORATION", + [3]byte{0, 80, 137}: "SAFETY MANAGEMENT SYSTEMS", + [3]byte{0, 80, 139}: "Hewlett-Packard Company", + [3]byte{0, 80, 140}: "RSI SYSTEMS", + [3]byte{0, 80, 141}: "ABIT COMPUTER CORPORATION", + [3]byte{0, 80, 142}: "OPTIMATION, INC.", + [3]byte{0, 80, 143}: "ASITA TECHNOLOGIES INT'L LTD.", + [3]byte{0, 80, 144}: "DCTRI", + [3]byte{0, 80, 145}: "NETACCESS, INC.", + [3]byte{0, 80, 146}: "RIGAKU INDUSTRIAL CORPORATION", + [3]byte{0, 80, 147}: "BOEING", + [3]byte{0, 80, 148}: "PACE plc", + [3]byte{0, 80, 149}: "PERACOM NETWORKS", + [3]byte{0, 80, 150}: "SALIX TECHNOLOGIES, INC.", + [3]byte{0, 80, 151}: "MMC-EMBEDDED COMPUTERTECHNIK GmbH", + [3]byte{0, 80, 152}: "GLOBALOOP, LTD.", + [3]byte{0, 80, 153}: "3COM EUROPE, LTD.", + [3]byte{0, 80, 154}: "TAG ELECTRONIC SYSTEMS", + [3]byte{0, 80, 155}: "SWITCHCORE AB", + [3]byte{0, 80, 156}: "BETA RESEARCH", + [3]byte{0, 80, 157}: "THE INDUSTREE B.V.", + [3]byte{0, 80, 158}: "Les Technologies SoftAcoustik Inc.", + [3]byte{0, 80, 159}: "HORIZON COMPUTER", + [3]byte{0, 80, 160}: "DELTA COMPUTER SYSTEMS, INC.", + [3]byte{0, 80, 161}: "CARLO GAVAZZI, INC.", + [3]byte{0, 80, 162}: "CISCO SYSTEMS, INC.", + [3]byte{0, 80, 163}: "TransMedia Communications, Inc.", + [3]byte{0, 80, 164}: "IO TECH, INC.", + [3]byte{0, 80, 165}: "CAPITOL BUSINESS SYSTEMS, LTD.", + [3]byte{0, 80, 166}: "OPTRONICS", + [3]byte{0, 80, 167}: "CISCO SYSTEMS, INC.", + [3]byte{0, 80, 168}: "OpenCon Systems, Inc.", + [3]byte{0, 80, 169}: "MOLDAT WIRELESS TECHNOLGIES", + [3]byte{0, 80, 170}: "KONICA MINOLTA HOLDINGS, INC.", + [3]byte{0, 80, 171}: "NALTEC, Inc.", + [3]byte{0, 80, 172}: "MAPLE COMPUTER CORPORATION", + [3]byte{0, 80, 173}: "CommUnique Wireless Corp.", + [3]byte{0, 80, 174}: "FDK Co., Ltd", + [3]byte{0, 80, 175}: "INTERGON, INC.", + [3]byte{0, 80, 176}: "TECHNOLOGY ATLANTA CORPORATION", + [3]byte{0, 80, 177}: "GIDDINGS & LEWIS", + [3]byte{0, 80, 178}: "BRODEL GmbH", + [3]byte{0, 80, 179}: "VOICEBOARD CORPORATION", + [3]byte{0, 80, 180}: "SATCHWELL CONTROL SYSTEMS, LTD", + [3]byte{0, 80, 181}: "FICHET-BAUCHE", + [3]byte{0, 80, 182}: "GOOD WAY IND. CO., LTD.", + [3]byte{0, 80, 183}: "BOSER TECHNOLOGY CO., LTD.", + [3]byte{0, 80, 184}: "INOVA COMPUTERS GMBH & CO. KG", + [3]byte{0, 80, 185}: "XITRON TECHNOLOGIES, INC.", + [3]byte{0, 80, 186}: "D-LINK", + [3]byte{0, 80, 187}: "CMS TECHNOLOGIES", + [3]byte{0, 80, 188}: "HAMMER STORAGE SOLUTIONS", + [3]byte{0, 80, 189}: "CISCO SYSTEMS, INC.", + [3]byte{0, 80, 190}: "FAST MULTIMEDIA AG", + [3]byte{0, 80, 191}: "Metalligence Technology Corp.", + [3]byte{0, 80, 192}: "GATAN, INC.", + [3]byte{0, 80, 193}: "GEMFLEX NETWORKS, LTD.", + [3]byte{0, 80, 194}: "IEEE REGISTRATION AUTHORITY - Please see IAB public listing for more information.", + [3]byte{0, 80, 196}: "IMD", + [3]byte{0, 80, 197}: "ADS Technologies, Inc", + [3]byte{0, 80, 198}: "LOOP TELECOMMUNICATION INTERNATIONAL, INC.", + [3]byte{0, 80, 200}: "Addonics Technologies, Inc.", + [3]byte{0, 80, 201}: "MASPRO DENKOH CORP.", + [3]byte{0, 80, 202}: "NET TO NET TECHNOLOGIES", + [3]byte{0, 80, 203}: "JETTER", + [3]byte{0, 80, 204}: "XYRATEX", + [3]byte{0, 80, 205}: "DIGIANSWER A/S", + [3]byte{0, 80, 206}: "LG INTERNATIONAL CORP.", + [3]byte{0, 80, 207}: "VANLINK COMMUNICATION TECHNOLOGY RESEARCH INSTITUTE", + [3]byte{0, 80, 208}: "MINERVA SYSTEMS", + [3]byte{0, 80, 209}: "CISCO SYSTEMS, INC.", + [3]byte{0, 80, 210}: "CMC Electronics Inc", + [3]byte{0, 80, 211}: "DIGITAL AUDIO PROCESSING PTY. LTD.", + [3]byte{0, 80, 212}: "JOOHONG INFORMATION &", + [3]byte{0, 80, 213}: "AD SYSTEMS CORP.", + [3]byte{0, 80, 214}: "ATLAS COPCO TOOLS AB", + [3]byte{0, 80, 215}: "TELSTRAT", + [3]byte{0, 80, 216}: "UNICORN COMPUTER CORP.", + [3]byte{0, 80, 217}: "ENGETRON-ENGENHARIA ELETRONICA IND. e COM. LTDA", + [3]byte{0, 80, 218}: "3COM CORPORATION", + [3]byte{0, 80, 219}: "CONTEMPORARY CONTROL", + [3]byte{0, 80, 220}: "TAS TELEFONBAU A. SCHWABE GMBH & CO. KG", + [3]byte{0, 80, 221}: "SERRA SOLDADURA, S.A.", + [3]byte{0, 80, 222}: "SIGNUM SYSTEMS CORP.", + [3]byte{0, 80, 223}: "AirFiber, Inc.", + [3]byte{0, 80, 225}: "NS TECH ELECTRONICS SDN BHD", + [3]byte{0, 80, 226}: "CISCO SYSTEMS, INC.", + [3]byte{0, 80, 227}: "ARRIS Group, Inc.", + [3]byte{0, 80, 228}: "Apple", + [3]byte{0, 80, 230}: "HAKUSAN CORPORATION", + [3]byte{0, 80, 231}: "PARADISE INNOVATIONS (ASIA)", + [3]byte{0, 80, 232}: "NOMADIX INC.", + [3]byte{0, 80, 234}: "XEL COMMUNICATIONS, INC.", + [3]byte{0, 80, 235}: "ALPHA-TOP CORPORATION", + [3]byte{0, 80, 236}: "OLICOM A/S", + [3]byte{0, 80, 237}: "ANDA NETWORKS", + [3]byte{0, 80, 238}: "TEK DIGITEL CORPORATION", + [3]byte{0, 80, 239}: "SPE Systemhaus GmbH", + [3]byte{0, 80, 240}: "CISCO SYSTEMS, INC.", + [3]byte{0, 80, 241}: "Intel Corporation", + [3]byte{0, 80, 242}: "MICROSOFT CORP.", + [3]byte{0, 80, 243}: "GLOBAL NET INFORMATION CO., Ltd.", + [3]byte{0, 80, 244}: "SIGMATEK GMBH & CO. KG", + [3]byte{0, 80, 246}: "PAN-INTERNATIONAL INDUSTRIAL CORP.", + [3]byte{0, 80, 247}: "VENTURE MANUFACTURING (SINGAPORE) LTD.", + [3]byte{0, 80, 248}: "ENTREGA TECHNOLOGIES, INC.", + [3]byte{0, 80, 249}: "Sensormatic Electronics LLC", + [3]byte{0, 80, 250}: "OXTEL, LTD.", + [3]byte{0, 80, 251}: "VSK ELECTRONICS", + [3]byte{0, 80, 252}: "EDIMAX TECHNOLOGY CO., LTD.", + [3]byte{0, 80, 253}: "VISIONCOMM CO., LTD.", + [3]byte{0, 80, 254}: "PCTVnet ASA", + [3]byte{0, 80, 255}: "HAKKO ELECTRONICS CO., LTD.", + [3]byte{0, 82, 24}: "Wuxi Keboda Electron Co.Ltd", + [3]byte{0, 84, 175}: "Continental Automotive Systems Inc.", + [3]byte{0, 89, 7}: "LenovoEMC Products USA, LLC", + [3]byte{0, 90, 57}: "SHENZHEN FAST TECHNOLOGIES CO., LTD.", + [3]byte{0, 92, 177}: "Gospell DIGITAL TECHNOLOGY CO., LTD", + [3]byte{0, 93, 3}: "Xilinx, Inc", + [3]byte{0, 96, 0}: "XYCOM INC.", + [3]byte{0, 96, 1}: "InnoSys, Inc.", + [3]byte{0, 96, 2}: "SCREEN SUBTITLING SYSTEMS, LTD", + [3]byte{0, 96, 3}: "TERAOKA WEIGH SYSTEM PTE, LTD.", + [3]byte{0, 96, 4}: "COMPUTADORES MODULARES SA", + [3]byte{0, 96, 5}: "FEEDBACK DATA LTD.", + [3]byte{0, 96, 6}: "SOTEC CO., LTD", + [3]byte{0, 96, 7}: "ACRES GAMING, INC.", + [3]byte{0, 96, 8}: "3COM CORPORATION", + [3]byte{0, 96, 9}: "CISCO SYSTEMS, INC.", + [3]byte{0, 96, 10}: "SORD COMPUTER CORPORATION", + [3]byte{0, 96, 11}: "LOGWARE GmbH", + [3]byte{0, 96, 12}: "Eurotech Inc.", + [3]byte{0, 96, 13}: "Digital Logic GmbH", + [3]byte{0, 96, 14}: "WAVENET INTERNATIONAL, INC.", + [3]byte{0, 96, 15}: "WESTELL, INC.", + [3]byte{0, 96, 16}: "NETWORK MACHINES, INC.", + [3]byte{0, 96, 17}: "CRYSTAL SEMICONDUCTOR CORP.", + [3]byte{0, 96, 18}: "POWER COMPUTING CORPORATION", + [3]byte{0, 96, 19}: "NETSTAL MASCHINEN AG", + [3]byte{0, 96, 20}: "EDEC CO., LTD.", + [3]byte{0, 96, 21}: "NET2NET CORPORATION", + [3]byte{0, 96, 22}: "CLARIION", + [3]byte{0, 96, 23}: "TOKIMEC INC.", + [3]byte{0, 96, 24}: "STELLAR ONE CORPORATION", + [3]byte{0, 96, 25}: "Roche Diagnostics", + [3]byte{0, 96, 26}: "KEITHLEY INSTRUMENTS", + [3]byte{0, 96, 27}: "MESA ELECTRONICS", + [3]byte{0, 96, 28}: "TELXON CORPORATION", + [3]byte{0, 96, 29}: "LUCENT TECHNOLOGIES", + [3]byte{0, 96, 30}: "SOFTLAB, INC.", + [3]byte{0, 96, 31}: "STALLION TECHNOLOGIES", + [3]byte{0, 96, 32}: "PIVOTAL NETWORKING, INC.", + [3]byte{0, 96, 33}: "DSC CORPORATION", + [3]byte{0, 96, 34}: "VICOM SYSTEMS, INC.", + [3]byte{0, 96, 35}: "PERICOM SEMICONDUCTOR CORP.", + [3]byte{0, 96, 36}: "GRADIENT TECHNOLOGIES, INC.", + [3]byte{0, 96, 37}: "ACTIVE IMAGING PLC", + [3]byte{0, 96, 38}: "VIKING Modular Solutions", + [3]byte{0, 96, 39}: "Superior Modular Products", + [3]byte{0, 96, 40}: "MACROVISION CORPORATION", + [3]byte{0, 96, 41}: "CARY PERIPHERALS INC.", + [3]byte{0, 96, 42}: "SYMICRON COMPUTER COMMUNICATIONS, LTD.", + [3]byte{0, 96, 43}: "PEAK AUDIO", + [3]byte{0, 96, 44}: "LINX Data Terminals, Inc.", + [3]byte{0, 96, 45}: "ALERTON TECHNOLOGIES, INC.", + [3]byte{0, 96, 46}: "CYCLADES CORPORATION", + [3]byte{0, 96, 47}: "CISCO SYSTEMS, INC.", + [3]byte{0, 96, 48}: "VILLAGE TRONIC ENTWICKLUNG", + [3]byte{0, 96, 49}: "HRK SYSTEMS", + [3]byte{0, 96, 50}: "I-CUBE, INC.", + [3]byte{0, 96, 51}: "ACUITY IMAGING, INC.", + [3]byte{0, 96, 52}: "ROBERT BOSCH GmbH", + [3]byte{0, 96, 53}: "DALLAS SEMICONDUCTOR, INC.", + [3]byte{0, 96, 54}: "AIT Austrian Institute of Technology GmbH", + [3]byte{0, 96, 55}: "NXP Semiconductors", + [3]byte{0, 96, 56}: "Nortel Networks", + [3]byte{0, 96, 57}: "SanCom Technology, Inc.", + [3]byte{0, 96, 58}: "QUICK CONTROLS LTD.", + [3]byte{0, 96, 59}: "AMTEC spa", + [3]byte{0, 96, 60}: "HAGIWARA SYS-COM CO., LTD.", + [3]byte{0, 96, 61}: "3CX", + [3]byte{0, 96, 62}: "CISCO SYSTEMS, INC.", + [3]byte{0, 96, 63}: "PATAPSCO DESIGNS", + [3]byte{0, 96, 64}: "NETRO CORP.", + [3]byte{0, 96, 65}: "Yokogawa Electric Corporation", + [3]byte{0, 96, 66}: "TKS (USA), INC.", + [3]byte{0, 96, 67}: "iDirect, INC.", + [3]byte{0, 96, 68}: "LITTON/POLY-SCIENTIFIC", + [3]byte{0, 96, 69}: "PATHLIGHT TECHNOLOGIES", + [3]byte{0, 96, 70}: "VMETRO, INC.", + [3]byte{0, 96, 71}: "CISCO SYSTEMS, INC.", + [3]byte{0, 96, 72}: "EMC CORPORATION", + [3]byte{0, 96, 73}: "VINA TECHNOLOGIES", + [3]byte{0, 96, 74}: "SAIC IDEAS GROUP", + [3]byte{0, 96, 75}: "Safe-com GmbH & Co. KG", + [3]byte{0, 96, 76}: "SAGEM COMMUNICATION", + [3]byte{0, 96, 77}: "MMC NETWORKS, INC.", + [3]byte{0, 96, 78}: "CYCLE COMPUTER CORPORATION, INC.", + [3]byte{0, 96, 79}: "Tattile SRL", + [3]byte{0, 96, 80}: "INTERNIX INC.", + [3]byte{0, 96, 81}: "QUALITY SEMICONDUCTOR", + [3]byte{0, 96, 82}: "PERIPHERALS ENTERPRISE CO., Ltd.", + [3]byte{0, 96, 83}: "TOYODA MACHINE WORKS, LTD.", + [3]byte{0, 96, 84}: "CONTROLWARE GMBH", + [3]byte{0, 96, 85}: "CORNELL UNIVERSITY", + [3]byte{0, 96, 86}: "NETWORK TOOLS, INC.", + [3]byte{0, 96, 87}: "MURATA MANUFACTURING CO., LTD.", + [3]byte{0, 96, 88}: "COPPER MOUNTAIN COMMUNICATIONS, INC.", + [3]byte{0, 96, 89}: "TECHNICAL COMMUNICATIONS CORP.", + [3]byte{0, 96, 90}: "CELCORE, INC.", + [3]byte{0, 96, 91}: "IntraServer Technology, Inc.", + [3]byte{0, 96, 92}: "CISCO SYSTEMS, INC.", + [3]byte{0, 96, 93}: "SCANIVALVE CORP.", + [3]byte{0, 96, 94}: "LIBERTY TECHNOLOGY NETWORKING", + [3]byte{0, 96, 95}: "NIPPON UNISOFT CORPORATION", + [3]byte{0, 96, 96}: "Data Innovations North America", + [3]byte{0, 96, 97}: "WHISTLE COMMUNICATIONS CORP.", + [3]byte{0, 96, 98}: "TELESYNC, INC.", + [3]byte{0, 96, 99}: "PSION DACOM PLC.", + [3]byte{0, 96, 100}: "NETCOMM LIMITED", + [3]byte{0, 96, 101}: "BERNECKER & RAINER INDUSTRIE-ELEKTRONIC GmbH", + [3]byte{0, 96, 102}: "LACROIX Trafic", + [3]byte{0, 96, 103}: "ACER NETXUS INC.", + [3]byte{0, 96, 104}: "Dialogic Corporation", + [3]byte{0, 96, 105}: "Brocade Communications Systems, Inc.", + [3]byte{0, 96, 106}: "MITSUBISHI WIRELESS COMMUNICATIONS. INC.", + [3]byte{0, 96, 107}: "Synclayer Inc.", + [3]byte{0, 96, 108}: "ARESCOM", + [3]byte{0, 96, 109}: "DIGITAL EQUIPMENT CORP.", + [3]byte{0, 96, 110}: "DAVICOM SEMICONDUCTOR, INC.", + [3]byte{0, 96, 111}: "CLARION CORPORATION OF AMERICA", + [3]byte{0, 96, 112}: "CISCO SYSTEMS, INC.", + [3]byte{0, 96, 113}: "MIDAS LAB, INC.", + [3]byte{0, 96, 114}: "VXL INSTRUMENTS, LIMITED", + [3]byte{0, 96, 115}: "REDCREEK COMMUNICATIONS, INC.", + [3]byte{0, 96, 116}: "QSC AUDIO PRODUCTS", + [3]byte{0, 96, 117}: "PENTEK, INC.", + [3]byte{0, 96, 118}: "SCHLUMBERGER TECHNOLOGIES RETAIL PETROLEUM SYSTEMS", + [3]byte{0, 96, 119}: "PRISA NETWORKS", + [3]byte{0, 96, 120}: "POWER MEASUREMENT LTD.", + [3]byte{0, 96, 121}: "Mainstream Data, Inc.", + [3]byte{0, 96, 122}: "DVS GmbH", + [3]byte{0, 96, 123}: "FORE SYSTEMS, INC.", + [3]byte{0, 96, 124}: "WaveAccess, Ltd.", + [3]byte{0, 96, 125}: "SENTIENT NETWORKS INC.", + [3]byte{0, 96, 126}: "GIGALABS, INC.", + [3]byte{0, 96, 127}: "AURORA TECHNOLOGIES, INC.", + [3]byte{0, 96, 128}: "MICROTRONIX DATACOM LTD.", + [3]byte{0, 96, 129}: "TV/COM INTERNATIONAL", + [3]byte{0, 96, 130}: "NOVALINK TECHNOLOGIES, INC.", + [3]byte{0, 96, 131}: "CISCO SYSTEMS, INC.", + [3]byte{0, 96, 132}: "DIGITAL VIDEO", + [3]byte{0, 96, 133}: "Storage Concepts", + [3]byte{0, 96, 134}: "LOGIC REPLACEMENT TECH. LTD.", + [3]byte{0, 96, 135}: "KANSAI ELECTRIC CO., LTD.", + [3]byte{0, 96, 136}: "WHITE MOUNTAIN DSP, INC.", + [3]byte{0, 96, 137}: "XATA", + [3]byte{0, 96, 138}: "CITADEL COMPUTER", + [3]byte{0, 96, 139}: "ConferTech International", + [3]byte{0, 96, 140}: "3COM CORPORATION", + [3]byte{0, 96, 141}: "UNIPULSE CORP.", + [3]byte{0, 96, 142}: "HE ELECTRONICS, TECHNOLOGIE & SYSTEMTECHNIK GmbH", + [3]byte{0, 96, 143}: "TEKRAM TECHNOLOGY CO., LTD.", + [3]byte{0, 96, 144}: "Artiza Networks Inc", + [3]byte{0, 96, 145}: "FIRST PACIFIC NETWORKS, INC.", + [3]byte{0, 96, 146}: "MICRO/SYS, INC.", + [3]byte{0, 96, 147}: "VARIAN", + [3]byte{0, 96, 148}: "IBM Corp", + [3]byte{0, 96, 149}: "ACCU-TIME SYSTEMS, INC.", + [3]byte{0, 96, 150}: "T.S. MICROTECH INC.", + [3]byte{0, 96, 151}: "3COM CORPORATION", + [3]byte{0, 96, 152}: "HT COMMUNICATIONS", + [3]byte{0, 96, 153}: "SBE, Inc.", + [3]byte{0, 96, 154}: "NJK TECHNO CO.", + [3]byte{0, 96, 155}: "ASTRO-MED, INC.", + [3]byte{0, 96, 156}: "Perkin-Elmer Incorporated", + [3]byte{0, 96, 157}: "PMI FOOD EQUIPMENT GROUP", + [3]byte{0, 96, 158}: "ASC X3 - INFORMATION TECHNOLOGY STANDARDS SECRETARIATS", + [3]byte{0, 96, 159}: "PHAST CORPORATION", + [3]byte{0, 96, 160}: "SWITCHED NETWORK TECHNOLOGIES, INC.", + [3]byte{0, 96, 161}: "VPNet, Inc.", + [3]byte{0, 96, 162}: "NIHON UNISYS LIMITED CO.", + [3]byte{0, 96, 163}: "CONTINUUM TECHNOLOGY CORP.", + [3]byte{0, 96, 164}: "GEW Technologies (PTY)Ltd", + [3]byte{0, 96, 165}: "PERFORMANCE TELECOM CORP.", + [3]byte{0, 96, 166}: "PARTICLE MEASURING SYSTEMS", + [3]byte{0, 96, 167}: "MICROSENS GmbH & CO. KG", + [3]byte{0, 96, 168}: "TIDOMAT AB", + [3]byte{0, 96, 169}: "GESYTEC MbH", + [3]byte{0, 96, 170}: "INTELLIGENT DEVICES INC. (IDI)", + [3]byte{0, 96, 171}: "LARSCOM INCORPORATED", + [3]byte{0, 96, 172}: "RESILIENCE CORPORATION", + [3]byte{0, 96, 173}: "MegaChips Corporation", + [3]byte{0, 96, 174}: "TRIO INFORMATION SYSTEMS AB", + [3]byte{0, 96, 175}: "PACIFIC MICRO DATA, INC.", + [3]byte{0, 96, 176}: "HEWLETT-PACKARD CO.", + [3]byte{0, 96, 177}: "INPUT/OUTPUT, INC.", + [3]byte{0, 96, 178}: "PROCESS CONTROL CORP.", + [3]byte{0, 96, 179}: "Z-COM, INC.", + [3]byte{0, 96, 180}: "GLENAYRE R&D INC.", + [3]byte{0, 96, 181}: "KEBA GmbH", + [3]byte{0, 96, 182}: "LAND COMPUTER CO., LTD.", + [3]byte{0, 96, 183}: "CHANNELMATIC, INC.", + [3]byte{0, 96, 184}: "CORELIS Inc.", + [3]byte{0, 96, 185}: "NEC Platforms, Ltd", + [3]byte{0, 96, 186}: "SAHARA NETWORKS, INC.", + [3]byte{0, 96, 187}: "CABLETRON - NETLINK, INC.", + [3]byte{0, 96, 188}: "KeunYoung Electronics & Communication Co., Ltd.", + [3]byte{0, 96, 189}: "HUBBELL-PULSECOM", + [3]byte{0, 96, 190}: "WEBTRONICS", + [3]byte{0, 96, 191}: "MACRAIGOR SYSTEMS, INC.", + [3]byte{0, 96, 192}: "Nera Networks AS", + [3]byte{0, 96, 193}: "WaveSpan Corporation", + [3]byte{0, 96, 194}: "MPL AG", + [3]byte{0, 96, 195}: "NETVISION CORPORATION", + [3]byte{0, 96, 196}: "SOLITON SYSTEMS K.K.", + [3]byte{0, 96, 197}: "ANCOT CORP.", + [3]byte{0, 96, 198}: "DCS AG", + [3]byte{0, 96, 199}: "AMATI COMMUNICATIONS CORP.", + [3]byte{0, 96, 200}: "KUKA WELDING SYSTEMS & ROBOTS", + [3]byte{0, 96, 201}: "ControlNet, Inc.", + [3]byte{0, 96, 202}: "HARMONIC SYSTEMS INCORPORATED", + [3]byte{0, 96, 203}: "HITACHI ZOSEN CORPORATION", + [3]byte{0, 96, 204}: "EMTRAK, INCORPORATED", + [3]byte{0, 96, 205}: "VideoServer, Inc.", + [3]byte{0, 96, 206}: "ACCLAIM COMMUNICATIONS", + [3]byte{0, 96, 207}: "ALTEON NETWORKS, INC.", + [3]byte{0, 96, 208}: "SNMP RESEARCH INCORPORATED", + [3]byte{0, 96, 209}: "CASCADE COMMUNICATIONS", + [3]byte{0, 96, 210}: "LUCENT TECHNOLOGIES TAIWAN TELECOMMUNICATIONS CO., LTD.", + [3]byte{0, 96, 211}: "AT&T", + [3]byte{0, 96, 212}: "ELDAT COMMUNICATION LTD.", + [3]byte{0, 96, 213}: "MIYACHI TECHNOS CORP.", + [3]byte{0, 96, 214}: "NovAtel Wireless Technologies Ltd.", + [3]byte{0, 96, 215}: "ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE (EPFL)", + [3]byte{0, 96, 216}: "ELMIC SYSTEMS, INC.", + [3]byte{0, 96, 217}: "TRANSYS NETWORKS INC.", + [3]byte{0, 96, 218}: "JBM ELECTRONICS CO.", + [3]byte{0, 96, 219}: "NTP ELEKTRONIK A/S", + [3]byte{0, 96, 220}: "Toyo Network Systems & System Integration Co. LTD", + [3]byte{0, 96, 221}: "MYRICOM, INC.", + [3]byte{0, 96, 222}: "Kayser-Threde GmbH", + [3]byte{0, 96, 223}: "Brocade Communications Systems, Inc.", + [3]byte{0, 96, 224}: "AXIOM TECHNOLOGY CO., LTD.", + [3]byte{0, 96, 225}: "ORCKIT COMMUNICATIONS LTD.", + [3]byte{0, 96, 226}: "QUEST ENGINEERING & DEVELOPMENT", + [3]byte{0, 96, 227}: "ARBIN INSTRUMENTS", + [3]byte{0, 96, 228}: "COMPUSERVE, INC.", + [3]byte{0, 96, 229}: "FUJI AUTOMATION CO., LTD.", + [3]byte{0, 96, 230}: "SHOMITI SYSTEMS INCORPORATED", + [3]byte{0, 96, 231}: "RANDATA", + [3]byte{0, 96, 232}: "HITACHI COMPUTER PRODUCTS (AMERICA), INC.", + [3]byte{0, 96, 233}: "ATOP TECHNOLOGIES, INC.", + [3]byte{0, 96, 234}: "StreamLogic", + [3]byte{0, 96, 235}: "FOURTHTRACK SYSTEMS", + [3]byte{0, 96, 236}: "HERMARY OPTO ELECTRONICS INC.", + [3]byte{0, 96, 237}: "RICARDO TEST AUTOMATION LTD.", + [3]byte{0, 96, 238}: "APOLLO", + [3]byte{0, 96, 239}: "FLYTECH TECHNOLOGY CO., LTD.", + [3]byte{0, 96, 240}: "JOHNSON & JOHNSON MEDICAL, INC", + [3]byte{0, 96, 241}: "EXP COMPUTER, INC.", + [3]byte{0, 96, 242}: "LASERGRAPHICS, INC.", + [3]byte{0, 96, 243}: "Performance Analysis Broadband, Spirent plc", + [3]byte{0, 96, 244}: "ADVANCED COMPUTER SOLUTIONS, Inc.", + [3]byte{0, 96, 245}: "ICON WEST, INC.", + [3]byte{0, 96, 246}: "NEXTEST COMMUNICATIONS PRODUCTS, INC.", + [3]byte{0, 96, 247}: "DATAFUSION SYSTEMS", + [3]byte{0, 96, 248}: "Loran International Technologies Inc.", + [3]byte{0, 96, 249}: "DIAMOND LANE COMMUNICATIONS", + [3]byte{0, 96, 250}: "EDUCATIONAL TECHNOLOGY RESOURCES, INC.", + [3]byte{0, 96, 251}: "PACKETEER, INC.", + [3]byte{0, 96, 252}: "CONSERVATION THROUGH INNOVATION LTD.", + [3]byte{0, 96, 253}: "NetICs, Inc.", + [3]byte{0, 96, 254}: "LYNX SYSTEM DEVELOPERS, INC.", + [3]byte{0, 96, 255}: "QuVis, Inc.", + [3]byte{0, 97, 113}: "Apple", + [3]byte{0, 100, 64}: "CISCO SYSTEMS, INC.", + [3]byte{0, 100, 166}: "Maquet CardioVascular", + [3]byte{0, 102, 75}: "Huawei Technologies Co., Ltd", + [3]byte{0, 107, 142}: "Shanghai Feixun Communication Co.,Ltd.", + [3]byte{0, 107, 158}: "VIZIO Inc", + [3]byte{0, 107, 160}: "SHENZHEN UNIVERSAL INTELLISYS PTE LTD", + [3]byte{0, 109, 251}: "Vutrix (UK) Ltd", + [3]byte{0, 112, 176}: "M/A-COM INC. COMPANIES", + [3]byte{0, 112, 179}: "DATA RECALL LTD.", + [3]byte{0, 113, 204}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{0, 115, 141}: "Tinno Mobile Technology Corp", + [3]byte{0, 115, 224}: "Samsung Electronics Co.,Ltd", + [3]byte{0, 117, 50}: "INID BV", + [3]byte{0, 117, 225}: "Ampt, LLC", + [3]byte{0, 120, 158}: "SAGEMCOM", + [3]byte{0, 125, 250}: "Volkswagen Group of America", + [3]byte{0, 127, 40}: "Actiontec Electronics, Inc", + [3]byte{0, 128, 0}: "MULTITECH SYSTEMS, INC.", + [3]byte{0, 128, 1}: "PERIPHONICS CORPORATION", + [3]byte{0, 128, 2}: "SATELCOM (UK) LTD", + [3]byte{0, 128, 3}: "HYTEC ELECTRONICS LTD.", + [3]byte{0, 128, 4}: "ANTLOW COMMUNICATIONS, LTD.", + [3]byte{0, 128, 5}: "CACTUS COMPUTER INC.", + [3]byte{0, 128, 6}: "COMPUADD CORPORATION", + [3]byte{0, 128, 7}: "DLOG NC-SYSTEME", + [3]byte{0, 128, 8}: "DYNATECH COMPUTER SYSTEMS", + [3]byte{0, 128, 9}: "JUPITER SYSTEMS, INC.", + [3]byte{0, 128, 10}: "JAPAN COMPUTER CORP.", + [3]byte{0, 128, 11}: "CSK CORPORATION", + [3]byte{0, 128, 12}: "VIDECOM LIMITED", + [3]byte{0, 128, 13}: "VOSSWINKEL F.U.", + [3]byte{0, 128, 14}: "ATLANTIX CORPORATION", + [3]byte{0, 128, 15}: "STANDARD MICROSYSTEMS", + [3]byte{0, 128, 16}: "COMMODORE INTERNATIONAL", + [3]byte{0, 128, 17}: "DIGITAL SYSTEMS INT'L. INC.", + [3]byte{0, 128, 18}: "INTEGRATED MEASUREMENT SYSTEMS", + [3]byte{0, 128, 19}: "THOMAS-CONRAD CORPORATION", + [3]byte{0, 128, 20}: "ESPRIT SYSTEMS", + [3]byte{0, 128, 21}: "SEIKO SYSTEMS, INC.", + [3]byte{0, 128, 22}: "WANDEL AND GOLTERMANN", + [3]byte{0, 128, 23}: "PFU LIMITED", + [3]byte{0, 128, 24}: "KOBE STEEL, LTD.", + [3]byte{0, 128, 25}: "DAYNA COMMUNICATIONS, INC.", + [3]byte{0, 128, 26}: "BELL ATLANTIC", + [3]byte{0, 128, 27}: "KODIAK TECHNOLOGY", + [3]byte{0, 128, 28}: "NEWPORT SYSTEMS SOLUTIONS", + [3]byte{0, 128, 29}: "INTEGRATED INFERENCE MACHINES", + [3]byte{0, 128, 30}: "XINETRON, INC.", + [3]byte{0, 128, 31}: "KRUPP ATLAS ELECTRONIK GMBH", + [3]byte{0, 128, 32}: "NETWORK PRODUCTS", + [3]byte{0, 128, 33}: "Alcatel Canada Inc.", + [3]byte{0, 128, 34}: "SCAN-OPTICS", + [3]byte{0, 128, 35}: "INTEGRATED BUSINESS NETWORKS", + [3]byte{0, 128, 36}: "KALPANA, INC.", + [3]byte{0, 128, 37}: "STOLLMANN GMBH", + [3]byte{0, 128, 38}: "NETWORK PRODUCTS CORPORATION", + [3]byte{0, 128, 39}: "ADAPTIVE SYSTEMS, INC.", + [3]byte{0, 128, 40}: "TRADPOST (HK) LTD", + [3]byte{0, 128, 41}: "EAGLE TECHNOLOGY, INC.", + [3]byte{0, 128, 42}: "TEST SYSTEMS & SIMULATIONS INC", + [3]byte{0, 128, 43}: "INTEGRATED MARKETING CO", + [3]byte{0, 128, 44}: "THE SAGE GROUP PLC", + [3]byte{0, 128, 45}: "XYLOGICS INC", + [3]byte{0, 128, 46}: "CASTLE ROCK COMPUTING", + [3]byte{0, 128, 47}: "NATIONAL INSTRUMENTS CORP.", + [3]byte{0, 128, 48}: "NEXUS ELECTRONICS", + [3]byte{0, 128, 49}: "BASYS, CORP.", + [3]byte{0, 128, 50}: "ACCESS CO., LTD.", + [3]byte{0, 128, 51}: "EMS Aviation, Inc.", + [3]byte{0, 128, 52}: "SMT GOUPIL", + [3]byte{0, 128, 53}: "TECHNOLOGY WORKS, INC.", + [3]byte{0, 128, 54}: "REFLEX MANUFACTURING SYSTEMS", + [3]byte{0, 128, 55}: "Ericsson Group", + [3]byte{0, 128, 56}: "DATA RESEARCH & APPLICATIONS", + [3]byte{0, 128, 57}: "ALCATEL STC AUSTRALIA", + [3]byte{0, 128, 58}: "VARITYPER, INC.", + [3]byte{0, 128, 59}: "APT COMMUNICATIONS, INC.", + [3]byte{0, 128, 60}: "TVS ELECTRONICS LTD", + [3]byte{0, 128, 61}: "SURIGIKEN CO., LTD.", + [3]byte{0, 128, 62}: "SYNERNETICS", + [3]byte{0, 128, 63}: "TATUNG COMPANY", + [3]byte{0, 128, 64}: "JOHN FLUKE MANUFACTURING CO.", + [3]byte{0, 128, 65}: "VEB KOMBINAT ROBOTRON", + [3]byte{0, 128, 66}: "Artesyn Embedded Technologies", + [3]byte{0, 128, 67}: "NETWORLD, INC.", + [3]byte{0, 128, 68}: "SYSTECH COMPUTER CORP.", + [3]byte{0, 128, 69}: "MATSUSHITA ELECTRIC IND. CO", + [3]byte{0, 128, 70}: "Tattile SRL", + [3]byte{0, 128, 71}: "IN-NET CORP.", + [3]byte{0, 128, 72}: "COMPEX INCORPORATED", + [3]byte{0, 128, 73}: "NISSIN ELECTRIC CO., LTD.", + [3]byte{0, 128, 74}: "PRO-LOG", + [3]byte{0, 128, 75}: "EAGLE TECHNOLOGIES PTY.LTD.", + [3]byte{0, 128, 76}: "CONTEC CO., LTD.", + [3]byte{0, 128, 77}: "CYCLONE MICROSYSTEMS, INC.", + [3]byte{0, 128, 78}: "APEX COMPUTER COMPANY", + [3]byte{0, 128, 79}: "DAIKIN INDUSTRIES, LTD.", + [3]byte{0, 128, 80}: "ZIATECH CORPORATION", + [3]byte{0, 128, 81}: "FIBERMUX", + [3]byte{0, 128, 82}: "TECHNICALLY ELITE CONCEPTS", + [3]byte{0, 128, 83}: "INTELLICOM, INC.", + [3]byte{0, 128, 84}: "FRONTIER TECHNOLOGIES CORP.", + [3]byte{0, 128, 85}: "FERMILAB", + [3]byte{0, 128, 86}: "SPHINX ELEKTRONIK GMBH", + [3]byte{0, 128, 87}: "ADSOFT, LTD.", + [3]byte{0, 128, 88}: "PRINTER SYSTEMS CORPORATION", + [3]byte{0, 128, 89}: "STANLEY ELECTRIC CO., LTD", + [3]byte{0, 128, 90}: "TULIP COMPUTERS INTERNAT'L B.V", + [3]byte{0, 128, 91}: "CONDOR SYSTEMS, INC.", + [3]byte{0, 128, 92}: "AGILIS CORPORATION", + [3]byte{0, 128, 93}: "CANSTAR", + [3]byte{0, 128, 94}: "LSI LOGIC CORPORATION", + [3]byte{0, 128, 95}: "Hewlett-Packard Company", + [3]byte{0, 128, 96}: "NETWORK INTERFACE CORPORATION", + [3]byte{0, 128, 97}: "LITTON SYSTEMS, INC.", + [3]byte{0, 128, 98}: "INTERFACE CO.", + [3]byte{0, 128, 99}: "Hirschmann Automation and Control GmbH", + [3]byte{0, 128, 100}: "WYSE TECHNOLOGY LLC", + [3]byte{0, 128, 101}: "CYBERGRAPHIC SYSTEMS PTY LTD.", + [3]byte{0, 128, 102}: "ARCOM CONTROL SYSTEMS, LTD.", + [3]byte{0, 128, 103}: "SQUARE D COMPANY", + [3]byte{0, 128, 104}: "YAMATECH SCIENTIFIC LTD.", + [3]byte{0, 128, 105}: "COMPUTONE SYSTEMS", + [3]byte{0, 128, 106}: "ERI (EMPAC RESEARCH INC.)", + [3]byte{0, 128, 107}: "SCHMID TELECOMMUNICATION", + [3]byte{0, 128, 108}: "CEGELEC PROJECTS LTD", + [3]byte{0, 128, 109}: "CENTURY SYSTEMS CORP.", + [3]byte{0, 128, 110}: "NIPPON STEEL CORPORATION", + [3]byte{0, 128, 111}: "ONELAN LTD.", + [3]byte{0, 128, 112}: "COMPUTADORAS MICRON", + [3]byte{0, 128, 113}: "SAI TECHNOLOGY", + [3]byte{0, 128, 114}: "MICROPLEX SYSTEMS LTD.", + [3]byte{0, 128, 115}: "DWB ASSOCIATES", + [3]byte{0, 128, 116}: "FISHER CONTROLS", + [3]byte{0, 128, 117}: "PARSYTEC GMBH", + [3]byte{0, 128, 118}: "MCNC", + [3]byte{0, 128, 119}: "BROTHER INDUSTRIES, LTD.", + [3]byte{0, 128, 120}: "PRACTICAL PERIPHERALS, INC.", + [3]byte{0, 128, 121}: "MICROBUS DESIGNS LTD.", + [3]byte{0, 128, 122}: "AITECH SYSTEMS LTD.", + [3]byte{0, 128, 123}: "ARTEL COMMUNICATIONS CORP.", + [3]byte{0, 128, 124}: "FIBERCOM, INC.", + [3]byte{0, 128, 125}: "EQUINOX SYSTEMS INC.", + [3]byte{0, 128, 126}: "SOUTHERN PACIFIC LTD.", + [3]byte{0, 128, 127}: "DY-4 INCORPORATED", + [3]byte{0, 128, 128}: "DATAMEDIA CORPORATION", + [3]byte{0, 128, 129}: "KENDALL SQUARE RESEARCH CORP.", + [3]byte{0, 128, 130}: "PEP MODULAR COMPUTERS GMBH", + [3]byte{0, 128, 131}: "AMDAHL", + [3]byte{0, 128, 132}: "THE CLOUD INC.", + [3]byte{0, 128, 133}: "H-THREE SYSTEMS CORPORATION", + [3]byte{0, 128, 134}: "COMPUTER GENERATION INC.", + [3]byte{0, 128, 135}: "OKI ELECTRIC INDUSTRY CO., LTD", + [3]byte{0, 128, 136}: "VICTOR COMPANY OF JAPAN, LTD.", + [3]byte{0, 128, 137}: "TECNETICS (PTY) LTD.", + [3]byte{0, 128, 138}: "SUMMIT MICROSYSTEMS CORP.", + [3]byte{0, 128, 139}: "DACOLL LIMITED", + [3]byte{0, 128, 140}: "NetScout Systems, Inc.", + [3]byte{0, 128, 141}: "WESTCOAST TECHNOLOGY B.V.", + [3]byte{0, 128, 142}: "RADSTONE TECHNOLOGY", + [3]byte{0, 128, 143}: "C. ITOH ELECTRONICS, INC.", + [3]byte{0, 128, 144}: "MICROTEK INTERNATIONAL, INC.", + [3]byte{0, 128, 145}: "TOKYO ELECTRIC CO.,LTD", + [3]byte{0, 128, 146}: "Silex Technology, Inc.", + [3]byte{0, 128, 147}: "XYRON CORPORATION", + [3]byte{0, 128, 148}: "ALFA LAVAL AUTOMATION AB", + [3]byte{0, 128, 149}: "BASIC MERTON HANDELSGES.M.B.H.", + [3]byte{0, 128, 150}: "HUMAN DESIGNED SYSTEMS, INC.", + [3]byte{0, 128, 151}: "CENTRALP AUTOMATISMES", + [3]byte{0, 128, 152}: "TDK CORPORATION", + [3]byte{0, 128, 153}: "Eaton Industries GmbH", + [3]byte{0, 128, 154}: "NOVUS NETWORKS LTD", + [3]byte{0, 128, 155}: "JUSTSYSTEM CORPORATION", + [3]byte{0, 128, 156}: "LUXCOM, INC.", + [3]byte{0, 128, 157}: "Commscraft Ltd.", + [3]byte{0, 128, 158}: "DATUS GMBH", + [3]byte{0, 128, 159}: "ALCATEL BUSINESS SYSTEMS", + [3]byte{0, 128, 160}: "EDISA HEWLETT PACKARD S/A", + [3]byte{0, 128, 161}: "MICROTEST, INC.", + [3]byte{0, 128, 162}: "CREATIVE ELECTRONIC SYSTEMS", + [3]byte{0, 128, 163}: "Lantronix", + [3]byte{0, 128, 164}: "LIBERTY ELECTRONICS", + [3]byte{0, 128, 165}: "SPEED INTERNATIONAL", + [3]byte{0, 128, 166}: "REPUBLIC TECHNOLOGY, INC.", + [3]byte{0, 128, 167}: "Honeywell International Inc", + [3]byte{0, 128, 168}: "VITACOM CORPORATION", + [3]byte{0, 128, 169}: "CLEARPOINT RESEARCH", + [3]byte{0, 128, 170}: "MAXPEED", + [3]byte{0, 128, 171}: "DUKANE NETWORK INTEGRATION", + [3]byte{0, 128, 172}: "IMLOGIX, DIVISION OF GENESYS", + [3]byte{0, 128, 173}: "CNET TECHNOLOGY, INC.", + [3]byte{0, 128, 174}: "HUGHES NETWORK SYSTEMS", + [3]byte{0, 128, 175}: "ALLUMER CO., LTD.", + [3]byte{0, 128, 176}: "ADVANCED INFORMATION", + [3]byte{0, 128, 177}: "SOFTCOM A/S", + [3]byte{0, 128, 178}: "NETWORK EQUIPMENT TECHNOLOGIES", + [3]byte{0, 128, 179}: "AVAL DATA CORPORATION", + [3]byte{0, 128, 180}: "SOPHIA SYSTEMS", + [3]byte{0, 128, 181}: "UNITED NETWORKS INC.", + [3]byte{0, 128, 182}: "THEMIS COMPUTER", + [3]byte{0, 128, 183}: "STELLAR COMPUTER", + [3]byte{0, 128, 184}: "B.U.G. MORISEIKI, INCORPORATED", + [3]byte{0, 128, 185}: "ARCHE TECHNOLIGIES INC.", + [3]byte{0, 128, 186}: "SPECIALIX (ASIA) PTE, LTD", + [3]byte{0, 128, 187}: "HUGHES LAN SYSTEMS", + [3]byte{0, 128, 188}: "HITACHI ENGINEERING CO., LTD", + [3]byte{0, 128, 189}: "THE FURUKAWA ELECTRIC CO., LTD", + [3]byte{0, 128, 190}: "ARIES RESEARCH", + [3]byte{0, 128, 191}: "TAKAOKA ELECTRIC MFG. CO. LTD.", + [3]byte{0, 128, 192}: "PENRIL DATACOMM", + [3]byte{0, 128, 193}: "LANEX CORPORATION", + [3]byte{0, 128, 194}: "IEEE 802.1 COMMITTEE", + [3]byte{0, 128, 195}: "BICC INFORMATION SYSTEMS & SVC", + [3]byte{0, 128, 196}: "DOCUMENT TECHNOLOGIES, INC.", + [3]byte{0, 128, 197}: "NOVELLCO DE MEXICO", + [3]byte{0, 128, 198}: "NATIONAL DATACOMM CORPORATION", + [3]byte{0, 128, 199}: "XIRCOM", + [3]byte{0, 128, 200}: "D-LINK SYSTEMS, INC.", + [3]byte{0, 128, 201}: "ALBERTA MICROELECTRONIC CENTRE", + [3]byte{0, 128, 202}: "NETCOM RESEARCH INCORPORATED", + [3]byte{0, 128, 203}: "FALCO DATA PRODUCTS", + [3]byte{0, 128, 204}: "MICROWAVE BYPASS SYSTEMS", + [3]byte{0, 128, 205}: "MICRONICS COMPUTER, INC.", + [3]byte{0, 128, 206}: "BROADCAST TELEVISION SYSTEMS", + [3]byte{0, 128, 207}: "EMBEDDED PERFORMANCE INC.", + [3]byte{0, 128, 208}: "COMPUTER PERIPHERALS, INC.", + [3]byte{0, 128, 209}: "KIMTRON CORPORATION", + [3]byte{0, 128, 210}: "SHINNIHONDENKO CO., LTD.", + [3]byte{0, 128, 211}: "SHIVA CORP.", + [3]byte{0, 128, 212}: "CHASE RESEARCH LTD.", + [3]byte{0, 128, 213}: "CADRE TECHNOLOGIES", + [3]byte{0, 128, 214}: "NUVOTECH, INC.", + [3]byte{0, 128, 215}: "Fantum Engineering", + [3]byte{0, 128, 216}: "NETWORK PERIPHERALS INC.", + [3]byte{0, 128, 217}: "EMK Elektronik GmbH & Co. KG", + [3]byte{0, 128, 218}: "Bruel & Kjaer Sound & Vibration Measurement A/S", + [3]byte{0, 128, 219}: "GRAPHON CORPORATION", + [3]byte{0, 128, 220}: "PICKER INTERNATIONAL", + [3]byte{0, 128, 221}: "GMX INC/GIMIX", + [3]byte{0, 128, 222}: "GIPSI S.A.", + [3]byte{0, 128, 223}: "ADC CODENOLL TECHNOLOGY CORP.", + [3]byte{0, 128, 224}: "XTP SYSTEMS, INC.", + [3]byte{0, 128, 225}: "STMICROELECTRONICS", + [3]byte{0, 128, 226}: "T.D.I. CO., LTD.", + [3]byte{0, 128, 227}: "CORAL NETWORK CORPORATION", + [3]byte{0, 128, 228}: "NORTHWEST DIGITAL SYSTEMS, INC", + [3]byte{0, 128, 229}: "NetApp, Inc", + [3]byte{0, 128, 230}: "PEER NETWORKS, INC.", + [3]byte{0, 128, 231}: "LYNWOOD SCIENTIFIC DEV. LTD.", + [3]byte{0, 128, 232}: "CUMULUS CORPORATIION", + [3]byte{0, 128, 233}: "Madge Ltd.", + [3]byte{0, 128, 234}: "ADVA Optical Networking Ltd.", + [3]byte{0, 128, 235}: "COMPCONTROL B.V.", + [3]byte{0, 128, 236}: "SUPERCOMPUTING SOLUTIONS, INC.", + [3]byte{0, 128, 237}: "IQ TECHNOLOGIES, INC.", + [3]byte{0, 128, 238}: "THOMSON CSF", + [3]byte{0, 128, 239}: "RATIONAL", + [3]byte{0, 128, 240}: "Panasonic Communications Co., Ltd.", + [3]byte{0, 128, 241}: "OPUS SYSTEMS", + [3]byte{0, 128, 242}: "RAYCOM SYSTEMS INC", + [3]byte{0, 128, 243}: "SUN ELECTRONICS CORP.", + [3]byte{0, 128, 244}: "TELEMECANIQUE ELECTRIQUE", + [3]byte{0, 128, 245}: "Quantel Ltd", + [3]byte{0, 128, 246}: "SYNERGY MICROSYSTEMS", + [3]byte{0, 128, 247}: "ZENITH ELECTRONICS", + [3]byte{0, 128, 248}: "MIZAR, INC.", + [3]byte{0, 128, 249}: "HEURIKON CORPORATION", + [3]byte{0, 128, 250}: "RWT GMBH", + [3]byte{0, 128, 251}: "BVM LIMITED", + [3]byte{0, 128, 252}: "AVATAR CORPORATION", + [3]byte{0, 128, 253}: "EXSCEED CORPRATION", + [3]byte{0, 128, 254}: "AZURE TECHNOLOGIES, INC.", + [3]byte{0, 128, 255}: "SOC. DE TELEINFORMATIQUE RTC", + [3]byte{0, 134, 160}: "PRIVATE", + [3]byte{0, 136, 101}: "Apple", + [3]byte{0, 139, 67}: "RFTECH", + [3]byte{0, 140, 16}: "Black Box Corp.", + [3]byte{0, 140, 84}: "ADB Broadband Italia", + [3]byte{0, 140, 250}: "Inventec Corporation", + [3]byte{0, 141, 78}: "CJSC NII STT", + [3]byte{0, 141, 218}: "Link One Co., Ltd.", + [3]byte{0, 142, 242}: "NETGEAR INC.,", + [3]byte{0, 144, 0}: "DIAMOND MULTIMEDIA", + [3]byte{0, 144, 1}: "NISHIMU ELECTRONICS INDUSTRIES CO., LTD.", + [3]byte{0, 144, 2}: "ALLGON AB", + [3]byte{0, 144, 3}: "APLIO", + [3]byte{0, 144, 4}: "3COM EUROPE LTD.", + [3]byte{0, 144, 5}: "PROTECH SYSTEMS CO., LTD.", + [3]byte{0, 144, 6}: "HAMAMATSU PHOTONICS K.K.", + [3]byte{0, 144, 7}: "DOMEX TECHNOLOGY CORP.", + [3]byte{0, 144, 8}: "HanA Systems Inc.", + [3]byte{0, 144, 9}: "I Controls, Inc.", + [3]byte{0, 144, 10}: "PROTON ELECTRONIC INDUSTRIAL CO., LTD.", + [3]byte{0, 144, 11}: "LANNER ELECTRONICS, INC.", + [3]byte{0, 144, 12}: "CISCO SYSTEMS, INC.", + [3]byte{0, 144, 13}: "Overland Storage Inc.", + [3]byte{0, 144, 14}: "HANDLINK TECHNOLOGIES, INC.", + [3]byte{0, 144, 15}: "KAWASAKI HEAVY INDUSTRIES, LTD", + [3]byte{0, 144, 16}: "SIMULATION LABORATORIES, INC.", + [3]byte{0, 144, 17}: "WAVTrace, Inc.", + [3]byte{0, 144, 18}: "GLOBESPAN SEMICONDUCTOR, INC.", + [3]byte{0, 144, 19}: "SAMSAN CORP.", + [3]byte{0, 144, 20}: "ROTORK INSTRUMENTS, LTD.", + [3]byte{0, 144, 21}: "CENTIGRAM COMMUNICATIONS CORP.", + [3]byte{0, 144, 22}: "ZAC", + [3]byte{0, 144, 23}: "Zypcom, Inc", + [3]byte{0, 144, 24}: "ITO ELECTRIC INDUSTRY CO, LTD.", + [3]byte{0, 144, 25}: "HERMES ELECTRONICS CO., LTD.", + [3]byte{0, 144, 26}: "UNISPHERE SOLUTIONS", + [3]byte{0, 144, 27}: "DIGITAL CONTROLS", + [3]byte{0, 144, 28}: "mps Software Gmbh", + [3]byte{0, 144, 29}: "PEC (NZ) LTD.", + [3]byte{0, 144, 30}: "Selesta Ingegneria S.p.A.", + [3]byte{0, 144, 31}: "ADTEC PRODUCTIONS, INC.", + [3]byte{0, 144, 32}: "PHILIPS ANALYTICAL X-RAY B.V.", + [3]byte{0, 144, 33}: "CISCO SYSTEMS, INC.", + [3]byte{0, 144, 34}: "IVEX", + [3]byte{0, 144, 35}: "ZILOG INC.", + [3]byte{0, 144, 36}: "PIPELINKS, INC.", + [3]byte{0, 144, 37}: "BAE Systems Australia (Electronic Systems) Pty Ltd", + [3]byte{0, 144, 38}: "ADVANCED SWITCHING COMMUNICATIONS, INC.", + [3]byte{0, 144, 39}: "INTEL CORPORATION", + [3]byte{0, 144, 40}: "NIPPON SIGNAL CO., LTD.", + [3]byte{0, 144, 41}: "CRYPTO AG", + [3]byte{0, 144, 42}: "COMMUNICATION DEVICES, INC.", + [3]byte{0, 144, 43}: "CISCO SYSTEMS, INC.", + [3]byte{0, 144, 44}: "DATA & CONTROL EQUIPMENT LTD.", + [3]byte{0, 144, 45}: "DATA ELECTRONICS (AUST.) PTY, LTD.", + [3]byte{0, 144, 46}: "NAMCO LIMITED", + [3]byte{0, 144, 47}: "NETCORE SYSTEMS, INC.", + [3]byte{0, 144, 48}: "HONEYWELL-DATING", + [3]byte{0, 144, 49}: "MYSTICOM, LTD.", + [3]byte{0, 144, 50}: "PELCOMBE GROUP LTD.", + [3]byte{0, 144, 51}: "INNOVAPHONE AG", + [3]byte{0, 144, 52}: "IMAGIC, INC.", + [3]byte{0, 144, 53}: "ALPHA TELECOM, INC.", + [3]byte{0, 144, 54}: "ens, inc.", + [3]byte{0, 144, 55}: "ACUCOMM, INC.", + [3]byte{0, 144, 56}: "FOUNTAIN TECHNOLOGIES, INC.", + [3]byte{0, 144, 57}: "SHASTA NETWORKS", + [3]byte{0, 144, 58}: "NIHON MEDIA TOOL INC.", + [3]byte{0, 144, 59}: "TriEMS Research Lab, Inc.", + [3]byte{0, 144, 60}: "ATLANTIC NETWORK SYSTEMS", + [3]byte{0, 144, 61}: "BIOPAC SYSTEMS, INC.", + [3]byte{0, 144, 62}: "N.V. PHILIPS INDUSTRIAL ACTIVITIES", + [3]byte{0, 144, 63}: "AZTEC RADIOMEDIA", + [3]byte{0, 144, 64}: "Siemens Network Convergence LLC", + [3]byte{0, 144, 65}: "APPLIED DIGITAL ACCESS", + [3]byte{0, 144, 66}: "ECCS, Inc.", + [3]byte{0, 144, 67}: "Tattile SRL", + [3]byte{0, 144, 68}: "ASSURED DIGITAL, INC.", + [3]byte{0, 144, 69}: "Marconi Communications", + [3]byte{0, 144, 70}: "DEXDYNE, LTD.", + [3]byte{0, 144, 71}: "GIGA FAST E. LTD.", + [3]byte{0, 144, 72}: "ZEAL CORPORATION", + [3]byte{0, 144, 73}: "ENTRIDIA CORPORATION", + [3]byte{0, 144, 74}: "CONCUR SYSTEM TECHNOLOGIES", + [3]byte{0, 144, 75}: "GemTek Technology Co., Ltd.", + [3]byte{0, 144, 76}: "EPIGRAM, INC.", + [3]byte{0, 144, 77}: "SPEC S.A.", + [3]byte{0, 144, 78}: "DELEM BV", + [3]byte{0, 144, 79}: "ABB POWER T&D COMPANY, INC.", + [3]byte{0, 144, 80}: "TELESTE OY", + [3]byte{0, 144, 81}: "ULTIMATE TECHNOLOGY CORP.", + [3]byte{0, 144, 82}: "SELCOM ELETTRONICA S.R.L.", + [3]byte{0, 144, 83}: "DAEWOO ELECTRONICS CO., LTD.", + [3]byte{0, 144, 84}: "INNOVATIVE SEMICONDUCTORS, INC", + [3]byte{0, 144, 85}: "PARKER HANNIFIN CORPORATION COMPUMOTOR DIVISION", + [3]byte{0, 144, 86}: "TELESTREAM, INC.", + [3]byte{0, 144, 87}: "AANetcom, Inc.", + [3]byte{0, 144, 88}: "Ultra Electronics Ltd., Command and Control Systems", + [3]byte{0, 144, 89}: "TELECOM DEVICE K.K.", + [3]byte{0, 144, 90}: "DEARBORN GROUP, INC.", + [3]byte{0, 144, 91}: "RAYMOND AND LAE ENGINEERING", + [3]byte{0, 144, 92}: "EDMI", + [3]byte{0, 144, 93}: "NETCOM SICHERHEITSTECHNIK GmbH", + [3]byte{0, 144, 94}: "RAULAND-BORG CORPORATION", + [3]byte{0, 144, 95}: "CISCO SYSTEMS, INC.", + [3]byte{0, 144, 96}: "SYSTEM CREATE CORP.", + [3]byte{0, 144, 97}: "PACIFIC RESEARCH & ENGINEERING CORPORATION", + [3]byte{0, 144, 98}: "ICP VORTEX COMPUTERSYSTEME GmbH", + [3]byte{0, 144, 99}: "COHERENT COMMUNICATIONS SYSTEMS CORPORATION", + [3]byte{0, 144, 100}: "Thomson Inc.", + [3]byte{0, 144, 101}: "FINISAR CORPORATION", + [3]byte{0, 144, 102}: "Troika Networks, Inc.", + [3]byte{0, 144, 103}: "WalkAbout Computers, Inc.", + [3]byte{0, 144, 104}: "DVT CORP.", + [3]byte{0, 144, 105}: "JUNIPER NETWORKS, INC.", + [3]byte{0, 144, 106}: "TURNSTONE SYSTEMS, INC.", + [3]byte{0, 144, 107}: "APPLIED RESOURCES, INC.", + [3]byte{0, 144, 108}: "Sartorius Hamburg GmbH", + [3]byte{0, 144, 109}: "CISCO SYSTEMS, INC.", + [3]byte{0, 144, 110}: "PRAXON, INC.", + [3]byte{0, 144, 111}: "CISCO SYSTEMS, INC.", + [3]byte{0, 144, 112}: "NEO NETWORKS, INC.", + [3]byte{0, 144, 113}: "Applied Innovation Inc.", + [3]byte{0, 144, 114}: "SIMRAD AS", + [3]byte{0, 144, 115}: "GAIO TECHNOLOGY", + [3]byte{0, 144, 116}: "ARGON NETWORKS, INC.", + [3]byte{0, 144, 117}: "NEC DO BRASIL S.A.", + [3]byte{0, 144, 118}: "FMT AIRCRAFT GATE SUPPORT SYSTEMS AB", + [3]byte{0, 144, 119}: "ADVANCED FIBRE COMMUNICATIONS", + [3]byte{0, 144, 120}: "MER TELEMANAGEMENT SOLUTIONS, LTD.", + [3]byte{0, 144, 121}: "ClearOne, Inc.", + [3]byte{0, 144, 122}: "Spectralink, Inc", + [3]byte{0, 144, 123}: "E-TECH, INC.", + [3]byte{0, 144, 124}: "DIGITALCAST, INC.", + [3]byte{0, 144, 125}: "Lake Communications", + [3]byte{0, 144, 126}: "VETRONIX CORP.", + [3]byte{0, 144, 127}: "WatchGuard Technologies, Inc.", + [3]byte{0, 144, 128}: "NOT LIMITED, INC.", + [3]byte{0, 144, 129}: "ALOHA NETWORKS, INC.", + [3]byte{0, 144, 130}: "FORCE INSTITUTE", + [3]byte{0, 144, 131}: "TURBO COMMUNICATION, INC.", + [3]byte{0, 144, 132}: "ATECH SYSTEM", + [3]byte{0, 144, 133}: "GOLDEN ENTERPRISES, INC.", + [3]byte{0, 144, 134}: "CISCO SYSTEMS, INC.", + [3]byte{0, 144, 135}: "ITIS", + [3]byte{0, 144, 136}: "BAXALL SECURITY LTD.", + [3]byte{0, 144, 137}: "SOFTCOM MICROSYSTEMS, INC.", + [3]byte{0, 144, 138}: "BAYLY COMMUNICATIONS, INC.", + [3]byte{0, 144, 139}: "Tattile SRL", + [3]byte{0, 144, 140}: "ETREND ELECTRONICS, INC.", + [3]byte{0, 144, 141}: "VICKERS ELECTRONICS SYSTEMS", + [3]byte{0, 144, 142}: "Nortel Networks Broadband Access", + [3]byte{0, 144, 143}: "AUDIO CODES LTD.", + [3]byte{0, 144, 144}: "I-BUS", + [3]byte{0, 144, 145}: "DigitalScape, Inc.", + [3]byte{0, 144, 146}: "CISCO SYSTEMS, INC.", + [3]byte{0, 144, 147}: "NANAO CORPORATION", + [3]byte{0, 144, 148}: "OSPREY TECHNOLOGIES, INC.", + [3]byte{0, 144, 149}: "UNIVERSAL AVIONICS", + [3]byte{0, 144, 150}: "ASKEY COMPUTER CORP.", + [3]byte{0, 144, 151}: "Sycamore Networks", + [3]byte{0, 144, 152}: "SBC DESIGNS, INC.", + [3]byte{0, 144, 153}: "ALLIED TELESIS, K.K.", + [3]byte{0, 144, 154}: "ONE WORLD SYSTEMS, INC.", + [3]byte{0, 144, 155}: "MARKEM-IMAJE", + [3]byte{0, 144, 156}: "ARRIS Group, Inc.", + [3]byte{0, 144, 157}: "NovaTech Process Solutions, LLC", + [3]byte{0, 144, 158}: "Critical IO, LLC", + [3]byte{0, 144, 159}: "DIGI-DATA CORPORATION", + [3]byte{0, 144, 160}: "8X8 INC.", + [3]byte{0, 144, 161}: "Flying Pig Systems/High End Systems Inc.", + [3]byte{0, 144, 162}: "CYBERTAN TECHNOLOGY, INC.", + [3]byte{0, 144, 163}: "Corecess Inc.", + [3]byte{0, 144, 164}: "ALTIGA NETWORKS", + [3]byte{0, 144, 165}: "SPECTRA LOGIC", + [3]byte{0, 144, 166}: "CISCO SYSTEMS, INC.", + [3]byte{0, 144, 167}: "CLIENTEC CORPORATION", + [3]byte{0, 144, 168}: "NineTiles Networks, Ltd.", + [3]byte{0, 144, 169}: "WESTERN DIGITAL", + [3]byte{0, 144, 170}: "INDIGO ACTIVE VISION SYSTEMS LIMITED", + [3]byte{0, 144, 171}: "CISCO SYSTEMS, INC.", + [3]byte{0, 144, 172}: "OPTIVISION, INC.", + [3]byte{0, 144, 173}: "ASPECT ELECTRONICS, INC.", + [3]byte{0, 144, 174}: "ITALTEL S.p.A.", + [3]byte{0, 144, 175}: "J. MORITA MFG. CORP.", + [3]byte{0, 144, 176}: "VADEM", + [3]byte{0, 144, 177}: "CISCO SYSTEMS, INC.", + [3]byte{0, 144, 178}: "AVICI SYSTEMS INC.", + [3]byte{0, 144, 179}: "AGRANAT SYSTEMS", + [3]byte{0, 144, 180}: "WILLOWBROOK TECHNOLOGIES", + [3]byte{0, 144, 181}: "NIKON CORPORATION", + [3]byte{0, 144, 182}: "FIBEX SYSTEMS", + [3]byte{0, 144, 183}: "DIGITAL LIGHTWAVE, INC.", + [3]byte{0, 144, 184}: "ROHDE & SCHWARZ GMBH & CO. KG", + [3]byte{0, 144, 185}: "BERAN INSTRUMENTS LTD.", + [3]byte{0, 144, 186}: "VALID NETWORKS, INC.", + [3]byte{0, 144, 187}: "TAINET COMMUNICATION SYSTEM Corp.", + [3]byte{0, 144, 188}: "TELEMANN CO., LTD.", + [3]byte{0, 144, 189}: "OMNIA COMMUNICATIONS, INC.", + [3]byte{0, 144, 190}: "IBC/INTEGRATED BUSINESS COMPUTERS", + [3]byte{0, 144, 191}: "CISCO SYSTEMS, INC.", + [3]byte{0, 144, 192}: "K.J. LAW ENGINEERS, INC.", + [3]byte{0, 144, 193}: "Peco II, Inc.", + [3]byte{0, 144, 194}: "JK microsystems, Inc.", + [3]byte{0, 144, 195}: "TOPIC SEMICONDUCTOR CORP.", + [3]byte{0, 144, 196}: "JAVELIN SYSTEMS, INC.", + [3]byte{0, 144, 197}: "INTERNET MAGIC, INC.", + [3]byte{0, 144, 198}: "OPTIM SYSTEMS, INC.", + [3]byte{0, 144, 199}: "ICOM INC.", + [3]byte{0, 144, 200}: "WAVERIDER COMMUNICATIONS (CANADA) INC.", + [3]byte{0, 144, 201}: "DPAC Technologies", + [3]byte{0, 144, 202}: "ACCORD VIDEO TELECOMMUNICATIONS, LTD.", + [3]byte{0, 144, 203}: "Wireless OnLine, Inc.", + [3]byte{0, 144, 204}: "Planex Communications", + [3]byte{0, 144, 205}: "ENT-EMPRESA NACIONAL DE TELECOMMUNICACOES, S.A.", + [3]byte{0, 144, 206}: "TETRA GmbH", + [3]byte{0, 144, 207}: "NORTEL", + [3]byte{0, 144, 208}: "Thomson Telecom Belgium", + [3]byte{0, 144, 209}: "LEICHU ENTERPRISE CO., LTD.", + [3]byte{0, 144, 210}: "ARTEL VIDEO SYSTEMS", + [3]byte{0, 144, 211}: "GIESECKE & DEVRIENT GmbH", + [3]byte{0, 144, 212}: "BindView Development Corp.", + [3]byte{0, 144, 213}: "EUPHONIX, INC.", + [3]byte{0, 144, 214}: "CRYSTAL GROUP", + [3]byte{0, 144, 215}: "NetBoost Corp.", + [3]byte{0, 144, 216}: "WHITECROSS SYSTEMS", + [3]byte{0, 144, 217}: "CISCO SYSTEMS, INC.", + [3]byte{0, 144, 218}: "DYNARC, INC.", + [3]byte{0, 144, 219}: "NEXT LEVEL COMMUNICATIONS", + [3]byte{0, 144, 220}: "TECO INFORMATION SYSTEMS", + [3]byte{0, 144, 221}: "MIHARU COMMUNICATIONS Inc", + [3]byte{0, 144, 222}: "CARDKEY SYSTEMS, INC.", + [3]byte{0, 144, 223}: "MITSUBISHI CHEMICAL AMERICA, INC.", + [3]byte{0, 144, 224}: "SYSTRAN CORP.", + [3]byte{0, 144, 225}: "TELENA S.P.A.", + [3]byte{0, 144, 226}: "DISTRIBUTED PROCESSING TECHNOLOGY", + [3]byte{0, 144, 227}: "AVEX ELECTRONICS INC.", + [3]byte{0, 144, 228}: "NEC AMERICA, INC.", + [3]byte{0, 144, 229}: "TEKNEMA, INC.", + [3]byte{0, 144, 230}: "ALi Corporation", + [3]byte{0, 144, 231}: "HORSCH ELEKTRONIK AG", + [3]byte{0, 144, 232}: "MOXA TECHNOLOGIES CORP., LTD.", + [3]byte{0, 144, 233}: "JANZ COMPUTER AG", + [3]byte{0, 144, 234}: "ALPHA TECHNOLOGIES, INC.", + [3]byte{0, 144, 235}: "SENTRY TELECOM SYSTEMS", + [3]byte{0, 144, 236}: "PYRESCOM", + [3]byte{0, 144, 237}: "CENTRAL SYSTEM RESEARCH CO., LTD.", + [3]byte{0, 144, 238}: "PERSONAL COMMUNICATIONS TECHNOLOGIES", + [3]byte{0, 144, 239}: "INTEGRIX, INC.", + [3]byte{0, 144, 240}: "Harmonic Video Systems Ltd.", + [3]byte{0, 144, 241}: "DOT HILL SYSTEMS CORPORATION", + [3]byte{0, 144, 242}: "CISCO SYSTEMS, INC.", + [3]byte{0, 144, 243}: "ASPECT COMMUNICATIONS", + [3]byte{0, 144, 244}: "LIGHTNING INSTRUMENTATION", + [3]byte{0, 144, 245}: "CLEVO CO.", + [3]byte{0, 144, 246}: "ESCALATE NETWORKS, INC.", + [3]byte{0, 144, 247}: "NBASE COMMUNICATIONS LTD.", + [3]byte{0, 144, 248}: "MEDIATRIX TELECOM", + [3]byte{0, 144, 249}: "LEITCH", + [3]byte{0, 144, 250}: "Emulex Corporation", + [3]byte{0, 144, 251}: "PORTWELL, INC.", + [3]byte{0, 144, 252}: "NETWORK COMPUTING DEVICES", + [3]byte{0, 144, 253}: "CopperCom, Inc.", + [3]byte{0, 144, 254}: "ELECOM CO., LTD. (LANEED DIV.)", + [3]byte{0, 144, 255}: "TELLUS TECHNOLOGY INC.", + [3]byte{0, 145, 214}: "Crystal Group, Inc.", + [3]byte{0, 145, 250}: "Synapse Product Development", + [3]byte{0, 146, 250}: "SHENZHEN WISKY TECHNOLOGY CO.,LTD", + [3]byte{0, 147, 99}: "Uni-Link Technology Co., Ltd.", + [3]byte{0, 149, 105}: "LSD Science and Technology Co.,Ltd.", + [3]byte{0, 151, 255}: "Heimann Sensor GmbH", + [3]byte{0, 156, 2}: "Hewlett-Packard Company", + [3]byte{0, 157, 142}: "CARDIAC RECORDERS, INC.", + [3]byte{0, 158, 200}: "Beijing Xiaomi Electronic Products Co., Ltd.", + [3]byte{0, 160, 0}: "CENTILLION NETWORKS, INC.", + [3]byte{0, 160, 1}: "DRS Signal Solutions", + [3]byte{0, 160, 2}: "LEEDS & NORTHRUP AUSTRALIA PTY LTD", + [3]byte{0, 160, 3}: "Siemens Switzerland Ltd., I B T HVP", + [3]byte{0, 160, 4}: "NETPOWER, INC.", + [3]byte{0, 160, 5}: "DANIEL INSTRUMENTS, LTD.", + [3]byte{0, 160, 6}: "IMAGE DATA PROCESSING SYSTEM GROUP", + [3]byte{0, 160, 7}: "APEXX TECHNOLOGY, INC.", + [3]byte{0, 160, 8}: "NETCORP", + [3]byte{0, 160, 9}: "WHITETREE NETWORK", + [3]byte{0, 160, 10}: "Airspan", + [3]byte{0, 160, 11}: "COMPUTEX CO., LTD.", + [3]byte{0, 160, 12}: "KINGMAX TECHNOLOGY, INC.", + [3]byte{0, 160, 13}: "THE PANDA PROJECT", + [3]byte{0, 160, 14}: "VISUAL NETWORKS, INC.", + [3]byte{0, 160, 15}: "Broadband Technologies", + [3]byte{0, 160, 16}: "SYSLOGIC DATENTECHNIK AG", + [3]byte{0, 160, 17}: "MUTOH INDUSTRIES LTD.", + [3]byte{0, 160, 18}: "Telco Systems, Inc.", + [3]byte{0, 160, 19}: "TELTREND LTD.", + [3]byte{0, 160, 20}: "CSIR", + [3]byte{0, 160, 21}: "WYLE", + [3]byte{0, 160, 22}: "MICROPOLIS CORP.", + [3]byte{0, 160, 23}: "J B M CORPORATION", + [3]byte{0, 160, 24}: "CREATIVE CONTROLLERS, INC.", + [3]byte{0, 160, 25}: "NEBULA CONSULTANTS, INC.", + [3]byte{0, 160, 26}: "BINAR ELEKTRONIK AB", + [3]byte{0, 160, 27}: "PREMISYS COMMUNICATIONS, INC.", + [3]byte{0, 160, 28}: "NASCENT NETWORKS CORPORATION", + [3]byte{0, 160, 29}: "SIXNET", + [3]byte{0, 160, 30}: "EST CORPORATION", + [3]byte{0, 160, 31}: "TRICORD SYSTEMS, INC.", + [3]byte{0, 160, 32}: "CITICORP/TTI", + [3]byte{0, 160, 33}: "General Dynamics", + [3]byte{0, 160, 34}: "CENTRE FOR DEVELOPMENT OF ADVANCED COMPUTING", + [3]byte{0, 160, 35}: "APPLIED CREATIVE TECHNOLOGY, INC.", + [3]byte{0, 160, 36}: "3COM CORPORATION", + [3]byte{0, 160, 37}: "REDCOM LABS INC.", + [3]byte{0, 160, 38}: "TELDAT, S.A.", + [3]byte{0, 160, 39}: "FIREPOWER SYSTEMS, INC.", + [3]byte{0, 160, 40}: "CONNER PERIPHERALS", + [3]byte{0, 160, 41}: "COULTER CORPORATION", + [3]byte{0, 160, 42}: "TRANCELL SYSTEMS", + [3]byte{0, 160, 43}: "TRANSITIONS RESEARCH CORP.", + [3]byte{0, 160, 44}: "interWAVE Communications", + [3]byte{0, 160, 45}: "1394 Trade Association", + [3]byte{0, 160, 46}: "BRAND COMMUNICATIONS, LTD.", + [3]byte{0, 160, 47}: "PIRELLI CAVI", + [3]byte{0, 160, 48}: "CAPTOR NV/SA", + [3]byte{0, 160, 49}: "HAZELTINE CORPORATION, MS 1-17", + [3]byte{0, 160, 50}: "GES SINGAPORE PTE. LTD.", + [3]byte{0, 160, 51}: "imc MeBsysteme GmbH", + [3]byte{0, 160, 52}: "AXEL", + [3]byte{0, 160, 53}: "CYLINK CORPORATION", + [3]byte{0, 160, 54}: "APPLIED NETWORK TECHNOLOGY", + [3]byte{0, 160, 55}: "Mindray DS USA, Inc.", + [3]byte{0, 160, 56}: "EMAIL ELECTRONICS", + [3]byte{0, 160, 57}: "ROSS TECHNOLOGY, INC.", + [3]byte{0, 160, 58}: "KUBOTEK CORPORATION", + [3]byte{0, 160, 59}: "TOSHIN ELECTRIC CO., LTD.", + [3]byte{0, 160, 60}: "EG&G NUCLEAR INSTRUMENTS", + [3]byte{0, 160, 61}: "OPTO-22", + [3]byte{0, 160, 62}: "ATM FORUM", + [3]byte{0, 160, 63}: "COMPUTER SOCIETY MICROPROCESSOR & MICROPROCESSOR STANDARDS C", + [3]byte{0, 160, 64}: "Apple", + [3]byte{0, 160, 65}: "INFICON", + [3]byte{0, 160, 66}: "SPUR PRODUCTS CORP.", + [3]byte{0, 160, 67}: "AMERICAN TECHNOLOGY LABS, INC.", + [3]byte{0, 160, 68}: "NTT IT CO., LTD.", + [3]byte{0, 160, 69}: "PHOENIX CONTACT GMBH & CO.", + [3]byte{0, 160, 70}: "SCITEX CORP. LTD.", + [3]byte{0, 160, 71}: "INTEGRATED FITNESS CORP.", + [3]byte{0, 160, 72}: "QUESTECH, LTD.", + [3]byte{0, 160, 73}: "DIGITECH INDUSTRIES, INC.", + [3]byte{0, 160, 74}: "NISSHIN ELECTRIC CO., LTD.", + [3]byte{0, 160, 75}: "TFL LAN INC.", + [3]byte{0, 160, 76}: "INNOVATIVE SYSTEMS & TECHNOLOGIES, INC.", + [3]byte{0, 160, 77}: "EDA INSTRUMENTS, INC.", + [3]byte{0, 160, 78}: "VOELKER TECHNOLOGIES, INC.", + [3]byte{0, 160, 79}: "AMERITEC CORP.", + [3]byte{0, 160, 80}: "CYPRESS SEMICONDUCTOR", + [3]byte{0, 160, 81}: "ANGIA COMMUNICATIONS. INC.", + [3]byte{0, 160, 82}: "STANILITE ELECTRONICS PTY. LTD", + [3]byte{0, 160, 83}: "COMPACT DEVICES, INC.", + [3]byte{0, 160, 84}: "PRIVATE", + [3]byte{0, 160, 85}: "Data Device Corporation", + [3]byte{0, 160, 86}: "MICROPROSS", + [3]byte{0, 160, 87}: "LANCOM Systems GmbH", + [3]byte{0, 160, 88}: "GLORY, LTD.", + [3]byte{0, 160, 89}: "HAMILTON HALLMARK", + [3]byte{0, 160, 90}: "KOFAX IMAGE PRODUCTS", + [3]byte{0, 160, 91}: "MARQUIP, INC.", + [3]byte{0, 160, 92}: "INVENTORY CONVERSION, INC./", + [3]byte{0, 160, 93}: "CS COMPUTER SYSTEME GmbH", + [3]byte{0, 160, 94}: "MYRIAD LOGIC INC.", + [3]byte{0, 160, 95}: "BTG Electronics Design BV", + [3]byte{0, 160, 96}: "ACER PERIPHERALS, INC.", + [3]byte{0, 160, 97}: "PURITAN BENNETT", + [3]byte{0, 160, 98}: "AES PRODATA", + [3]byte{0, 160, 99}: "JRL SYSTEMS, INC.", + [3]byte{0, 160, 100}: "KVB/ANALECT", + [3]byte{0, 160, 101}: "Symantec Corporation", + [3]byte{0, 160, 102}: "ISA CO., LTD.", + [3]byte{0, 160, 103}: "NETWORK SERVICES GROUP", + [3]byte{0, 160, 104}: "BHP LIMITED", + [3]byte{0, 160, 105}: "Symmetricom, Inc.", + [3]byte{0, 160, 106}: "Verilink Corporation", + [3]byte{0, 160, 107}: "DMS DORSCH MIKROSYSTEM GMBH", + [3]byte{0, 160, 108}: "SHINDENGEN ELECTRIC MFG. CO., LTD.", + [3]byte{0, 160, 109}: "MANNESMANN TALLY CORPORATION", + [3]byte{0, 160, 110}: "AUSTRON, INC.", + [3]byte{0, 160, 111}: "THE APPCON GROUP, INC.", + [3]byte{0, 160, 112}: "COASTCOM", + [3]byte{0, 160, 113}: "VIDEO LOTTERY TECHNOLOGIES,INC", + [3]byte{0, 160, 114}: "OVATION SYSTEMS LTD.", + [3]byte{0, 160, 115}: "COM21, INC.", + [3]byte{0, 160, 116}: "PERCEPTION TECHNOLOGY", + [3]byte{0, 160, 117}: "MICRON TECHNOLOGY, INC.", + [3]byte{0, 160, 118}: "CARDWARE LAB, INC.", + [3]byte{0, 160, 119}: "FUJITSU NEXION, INC.", + [3]byte{0, 160, 120}: "Marconi Communications", + [3]byte{0, 160, 121}: "ALPS ELECTRIC (USA), INC.", + [3]byte{0, 160, 122}: "ADVANCED PERIPHERALS TECHNOLOGIES, INC.", + [3]byte{0, 160, 123}: "DAWN COMPUTER INCORPORATION", + [3]byte{0, 160, 124}: "TONYANG NYLON CO., LTD.", + [3]byte{0, 160, 125}: "SEEQ TECHNOLOGY, INC.", + [3]byte{0, 160, 126}: "AVID TECHNOLOGY, INC.", + [3]byte{0, 160, 127}: "GSM-SYNTEL, LTD.", + [3]byte{0, 160, 128}: "Tattile SRL", + [3]byte{0, 160, 129}: "ALCATEL DATA NETWORKS", + [3]byte{0, 160, 130}: "NKT ELEKTRONIK A/S", + [3]byte{0, 160, 131}: "ASIMMPHONY TURKEY", + [3]byte{0, 160, 132}: "Dataplex Pty Ltd", + [3]byte{0, 160, 133}: "PRIVATE", + [3]byte{0, 160, 134}: "AMBER WAVE SYSTEMS, INC.", + [3]byte{0, 160, 135}: "Microsemi Corporation", + [3]byte{0, 160, 136}: "ESSENTIAL COMMUNICATIONS", + [3]byte{0, 160, 137}: "XPOINT TECHNOLOGIES, INC.", + [3]byte{0, 160, 138}: "BROOKTROUT TECHNOLOGY, INC.", + [3]byte{0, 160, 139}: "ASTON ELECTRONIC DESIGNS LTD.", + [3]byte{0, 160, 140}: "MultiMedia LANs, Inc.", + [3]byte{0, 160, 141}: "JACOMO CORPORATION", + [3]byte{0, 160, 142}: "Check Point Software Technologies", + [3]byte{0, 160, 143}: "DESKNET SYSTEMS, INC.", + [3]byte{0, 160, 144}: "TimeStep Corporation", + [3]byte{0, 160, 145}: "APPLICOM INTERNATIONAL", + [3]byte{0, 160, 146}: "H. BOLLMANN MANUFACTURERS, LTD", + [3]byte{0, 160, 147}: "B/E AEROSPACE, Inc.", + [3]byte{0, 160, 148}: "COMSAT CORPORATION", + [3]byte{0, 160, 149}: "ACACIA NETWORKS, INC.", + [3]byte{0, 160, 150}: "MITSUMI ELECTRIC CO., LTD.", + [3]byte{0, 160, 151}: "JC INFORMATION SYSTEMS", + [3]byte{0, 160, 152}: "NetApp", + [3]byte{0, 160, 153}: "K-NET LTD.", + [3]byte{0, 160, 154}: "NIHON KOHDEN AMERICA", + [3]byte{0, 160, 155}: "QPSX COMMUNICATIONS, LTD.", + [3]byte{0, 160, 156}: "Xyplex, Inc.", + [3]byte{0, 160, 157}: "JOHNATHON FREEMAN TECHNOLOGIES", + [3]byte{0, 160, 158}: "ICTV", + [3]byte{0, 160, 159}: "COMMVISION CORP.", + [3]byte{0, 160, 160}: "COMPACT DATA, LTD.", + [3]byte{0, 160, 161}: "EPIC DATA INC.", + [3]byte{0, 160, 162}: "DIGICOM S.P.A.", + [3]byte{0, 160, 163}: "RELIABLE POWER METERS", + [3]byte{0, 160, 164}: "MICROS SYSTEMS, INC.", + [3]byte{0, 160, 165}: "TEKNOR MICROSYSTEME, INC.", + [3]byte{0, 160, 166}: "M.I. SYSTEMS, K.K.", + [3]byte{0, 160, 167}: "VORAX CORPORATION", + [3]byte{0, 160, 168}: "RENEX CORPORATION", + [3]byte{0, 160, 169}: "NAVTEL COMMUNICATIONS INC.", + [3]byte{0, 160, 170}: "SPACELABS MEDICAL", + [3]byte{0, 160, 171}: "NETCS INFORMATIONSTECHNIK GMBH", + [3]byte{0, 160, 172}: "GILAT SATELLITE NETWORKS, LTD.", + [3]byte{0, 160, 173}: "MARCONI SPA", + [3]byte{0, 160, 174}: "NUCOM SYSTEMS, INC.", + [3]byte{0, 160, 175}: "WMS INDUSTRIES", + [3]byte{0, 160, 176}: "I-O DATA DEVICE, INC.", + [3]byte{0, 160, 177}: "FIRST VIRTUAL CORPORATION", + [3]byte{0, 160, 178}: "SHIMA SEIKI", + [3]byte{0, 160, 179}: "ZYKRONIX", + [3]byte{0, 160, 180}: "TEXAS MICROSYSTEMS, INC.", + [3]byte{0, 160, 181}: "3H TECHNOLOGY", + [3]byte{0, 160, 182}: "SANRITZ AUTOMATION CO., LTD.", + [3]byte{0, 160, 183}: "CORDANT, INC.", + [3]byte{0, 160, 184}: "SYMBIOS LOGIC INC.", + [3]byte{0, 160, 185}: "EAGLE TECHNOLOGY, INC.", + [3]byte{0, 160, 186}: "PATTON ELECTRONICS CO.", + [3]byte{0, 160, 187}: "HILAN GMBH", + [3]byte{0, 160, 188}: "VIASAT, INCORPORATED", + [3]byte{0, 160, 189}: "I-TECH CORP.", + [3]byte{0, 160, 190}: "INTEGRATED CIRCUIT SYSTEMS, INC. COMMUNICATIONS GROUP", + [3]byte{0, 160, 191}: "WIRELESS DATA GROUP MOTOROLA", + [3]byte{0, 160, 192}: "DIGITAL LINK CORP.", + [3]byte{0, 160, 193}: "ORTIVUS MEDICAL AB", + [3]byte{0, 160, 194}: "R.A. SYSTEMS CO., LTD.", + [3]byte{0, 160, 195}: "UNICOMPUTER GMBH", + [3]byte{0, 160, 196}: "CRISTIE ELECTRONICS LTD.", + [3]byte{0, 160, 197}: "ZYXEL COMMUNICATION", + [3]byte{0, 160, 198}: "QUALCOMM INCORPORATED", + [3]byte{0, 160, 199}: "TADIRAN TELECOMMUNICATIONS", + [3]byte{0, 160, 200}: "ADTRAN INC.", + [3]byte{0, 160, 201}: "INTEL CORPORATION - HF1-06", + [3]byte{0, 160, 202}: "FUJITSU DENSO LTD.", + [3]byte{0, 160, 203}: "ARK TELECOMMUNICATIONS, INC.", + [3]byte{0, 160, 204}: "LITE-ON COMMUNICATIONS, INC.", + [3]byte{0, 160, 205}: "DR. JOHANNES HEIDENHAIN GmbH", + [3]byte{0, 160, 206}: "Ecessa", + [3]byte{0, 160, 207}: "SOTAS, INC.", + [3]byte{0, 160, 208}: "TEN X TECHNOLOGY, INC.", + [3]byte{0, 160, 209}: "INVENTEC CORPORATION", + [3]byte{0, 160, 210}: "ALLIED TELESIS INTERNATIONAL CORPORATION", + [3]byte{0, 160, 211}: "INSTEM COMPUTER SYSTEMS, LTD.", + [3]byte{0, 160, 212}: "RADIOLAN, INC.", + [3]byte{0, 160, 213}: "SIERRA WIRELESS INC.", + [3]byte{0, 160, 214}: "SBE, INC.", + [3]byte{0, 160, 215}: "KASTEN CHASE APPLIED RESEARCH", + [3]byte{0, 160, 216}: "SPECTRA - TEK", + [3]byte{0, 160, 217}: "CONVEX COMPUTER CORPORATION", + [3]byte{0, 160, 218}: "INTEGRATED SYSTEMS Technology, Inc.", + [3]byte{0, 160, 219}: "FISHER & PAYKEL PRODUCTION", + [3]byte{0, 160, 220}: "O.N. ELECTRONIC CO., LTD.", + [3]byte{0, 160, 221}: "AZONIX CORPORATION", + [3]byte{0, 160, 222}: "YAMAHA CORPORATION", + [3]byte{0, 160, 223}: "STS TECHNOLOGIES, INC.", + [3]byte{0, 160, 224}: "TENNYSON TECHNOLOGIES PTY LTD", + [3]byte{0, 160, 225}: "WESTPORT RESEARCH ASSOCIATES, INC.", + [3]byte{0, 160, 226}: "Keisokugiken Corporation", + [3]byte{0, 160, 227}: "XKL SYSTEMS CORP.", + [3]byte{0, 160, 228}: "OPTIQUEST", + [3]byte{0, 160, 229}: "NHC COMMUNICATIONS", + [3]byte{0, 160, 230}: "DIALOGIC CORPORATION", + [3]byte{0, 160, 231}: "CENTRAL DATA CORPORATION", + [3]byte{0, 160, 232}: "REUTERS HOLDINGS PLC", + [3]byte{0, 160, 233}: "ELECTRONIC RETAILING SYSTEMS INTERNATIONAL", + [3]byte{0, 160, 234}: "ETHERCOM CORP.", + [3]byte{0, 160, 235}: "Encore Networks, Inc.", + [3]byte{0, 160, 236}: "TRANSMITTON LTD.", + [3]byte{0, 160, 237}: "Brooks Automation, Inc.", + [3]byte{0, 160, 238}: "NASHOBA NETWORKS", + [3]byte{0, 160, 239}: "LUCIDATA LTD.", + [3]byte{0, 160, 240}: "TORONTO MICROELECTRONICS INC.", + [3]byte{0, 160, 241}: "MTI", + [3]byte{0, 160, 242}: "INFOTEK COMMUNICATIONS, INC.", + [3]byte{0, 160, 243}: "STAUBLI", + [3]byte{0, 160, 244}: "GE", + [3]byte{0, 160, 245}: "RADGUARD LTD.", + [3]byte{0, 160, 246}: "AutoGas Systems Inc.", + [3]byte{0, 160, 247}: "V.I COMPUTER CORP.", + [3]byte{0, 160, 248}: "SYMBOL TECHNOLOGIES, INC.", + [3]byte{0, 160, 249}: "BINTEC COMMUNICATIONS GMBH", + [3]byte{0, 160, 250}: "Marconi Communication GmbH", + [3]byte{0, 160, 251}: "TORAY ENGINEERING CO., LTD.", + [3]byte{0, 160, 252}: "IMAGE SCIENCES, INC.", + [3]byte{0, 160, 253}: "SCITEX DIGITAL PRINTING, INC.", + [3]byte{0, 160, 254}: "BOSTON TECHNOLOGY, INC.", + [3]byte{0, 160, 255}: "TELLABS OPERATIONS, INC.", + [3]byte{0, 161, 222}: "ShenZhen ShiHua Technology CO.,LTD", + [3]byte{0, 162, 218}: "INAT GmbH", + [3]byte{0, 162, 245}: "Guangzhou Yuanyun Network Technology Co.,Ltd", + [3]byte{0, 162, 255}: "abatec group AG", + [3]byte{0, 170, 0}: "INTEL CORPORATION", + [3]byte{0, 170, 1}: "INTEL CORPORATION", + [3]byte{0, 170, 2}: "INTEL CORPORATION", + [3]byte{0, 170, 60}: "OLIVETTI TELECOM SPA (OLTECO)", + [3]byte{0, 170, 112}: "LG Electronics", + [3]byte{0, 172, 224}: "ARRIS Group, Inc.", + [3]byte{0, 174, 250}: "Murata Manufacturing Co., Ltd.", + [3]byte{0, 176, 9}: "Grass Valley Group", + [3]byte{0, 176, 23}: "InfoGear Technology Corp.", + [3]byte{0, 176, 25}: "UTC CCS", + [3]byte{0, 176, 28}: "Westport Technologies", + [3]byte{0, 176, 30}: "Rantic Labs, Inc.", + [3]byte{0, 176, 42}: "ORSYS GmbH", + [3]byte{0, 176, 45}: "ViaGate Technologies, Inc.", + [3]byte{0, 176, 51}: "OAO \"Izhevskiy radiozavod\"", + [3]byte{0, 176, 59}: "HiQ Networks", + [3]byte{0, 176, 72}: "Marconi Communications Inc.", + [3]byte{0, 176, 74}: "CISCO SYSTEMS, INC.", + [3]byte{0, 176, 82}: "Atheros Communications", + [3]byte{0, 176, 100}: "CISCO SYSTEMS, INC.", + [3]byte{0, 176, 105}: "Honewell Oy", + [3]byte{0, 176, 109}: "Jones Futurex Inc.", + [3]byte{0, 176, 128}: "Mannesmann Ipulsys B.V.", + [3]byte{0, 176, 134}: "LocSoft Limited", + [3]byte{0, 176, 142}: "CISCO SYSTEMS, INC.", + [3]byte{0, 176, 145}: "Transmeta Corp.", + [3]byte{0, 176, 148}: "Alaris, Inc.", + [3]byte{0, 176, 154}: "Morrow Technologies Corp.", + [3]byte{0, 176, 157}: "Point Grey Research Inc.", + [3]byte{0, 176, 172}: "SIAE-Microelettronica S.p.A.", + [3]byte{0, 176, 174}: "Symmetricom", + [3]byte{0, 176, 179}: "Xstreamis PLC", + [3]byte{0, 176, 194}: "CISCO SYSTEMS, INC.", + [3]byte{0, 176, 199}: "Tellabs Operations, Inc.", + [3]byte{0, 176, 206}: "TECHNOLOGY RESCUE", + [3]byte{0, 176, 208}: "Dell Computer Corp.", + [3]byte{0, 176, 219}: "Nextcell, Inc.", + [3]byte{0, 176, 223}: "Starboard Storage Systems", + [3]byte{0, 176, 231}: "British Federal Ltd.", + [3]byte{0, 176, 236}: "EACEM", + [3]byte{0, 176, 238}: "Ajile Systems, Inc.", + [3]byte{0, 176, 240}: "CALY NETWORKS", + [3]byte{0, 176, 245}: "NetWorth Technologies, Inc.", + [3]byte{0, 179, 56}: "Kontron Design Manufacturing Services (M) Sdn. Bhd", + [3]byte{0, 179, 66}: "MacroSAN Technologies Co., Ltd.", + [3]byte{0, 181, 109}: "David Electronics Co., LTD.", + [3]byte{0, 181, 214}: "Omnibit Inc.", + [3]byte{0, 183, 141}: "Nanjing Shining Electric Automation Co., Ltd", + [3]byte{0, 185, 246}: "Shenzhen Super Rich Electronics Co.,Ltd", + [3]byte{0, 186, 192}: "Biometric Access Company", + [3]byte{0, 187, 1}: "OCTOTHORPE CORP.", + [3]byte{0, 187, 58}: "PRIVATE", + [3]byte{0, 187, 142}: "HME Co., Ltd.", + [3]byte{0, 187, 240}: "UNGERMANN-BASS INC.", + [3]byte{0, 189, 39}: "Exar Corp.", + [3]byte{0, 189, 58}: "Nokia Corporation", + [3]byte{0, 191, 21}: "Genetec Inc.", + [3]byte{0, 192, 0}: "LANOPTICS, LTD.", + [3]byte{0, 192, 1}: "DIATEK PATIENT MANAGMENT", + [3]byte{0, 192, 2}: "SERCOMM CORPORATION", + [3]byte{0, 192, 3}: "GLOBALNET COMMUNICATIONS", + [3]byte{0, 192, 4}: "JAPAN BUSINESS COMPUTER CO.LTD", + [3]byte{0, 192, 5}: "LIVINGSTON ENTERPRISES, INC.", + [3]byte{0, 192, 6}: "NIPPON AVIONICS CO., LTD.", + [3]byte{0, 192, 7}: "PINNACLE DATA SYSTEMS, INC.", + [3]byte{0, 192, 8}: "SECO SRL", + [3]byte{0, 192, 9}: "KT TECHNOLOGY (S) PTE LTD", + [3]byte{0, 192, 10}: "MICRO CRAFT", + [3]byte{0, 192, 11}: "NORCONTROL A.S.", + [3]byte{0, 192, 12}: "RELIA TECHNOLGIES", + [3]byte{0, 192, 13}: "ADVANCED LOGIC RESEARCH, INC.", + [3]byte{0, 192, 14}: "PSITECH, INC.", + [3]byte{0, 192, 15}: "QUANTUM SOFTWARE SYSTEMS LTD.", + [3]byte{0, 192, 16}: "HIRAKAWA HEWTECH CORP.", + [3]byte{0, 192, 17}: "INTERACTIVE COMPUTING DEVICES", + [3]byte{0, 192, 18}: "NETSPAN CORPORATION", + [3]byte{0, 192, 19}: "NETRIX", + [3]byte{0, 192, 20}: "TELEMATICS CALABASAS INT'L,INC", + [3]byte{0, 192, 21}: "NEW MEDIA CORPORATION", + [3]byte{0, 192, 22}: "ELECTRONIC THEATRE CONTROLS", + [3]byte{0, 192, 23}: "Fluke Corporation", + [3]byte{0, 192, 24}: "LANART CORPORATION", + [3]byte{0, 192, 25}: "LEAP TECHNOLOGY, INC.", + [3]byte{0, 192, 26}: "COROMETRICS MEDICAL SYSTEMS", + [3]byte{0, 192, 27}: "SOCKET COMMUNICATIONS, INC.", + [3]byte{0, 192, 28}: "INTERLINK COMMUNICATIONS LTD.", + [3]byte{0, 192, 29}: "GRAND JUNCTION NETWORKS, INC.", + [3]byte{0, 192, 30}: "LA FRANCAISE DES JEUX", + [3]byte{0, 192, 31}: "S.E.R.C.E.L.", + [3]byte{0, 192, 32}: "ARCO ELECTRONIC, CONTROL LTD.", + [3]byte{0, 192, 33}: "NETEXPRESS", + [3]byte{0, 192, 34}: "LASERMASTER TECHNOLOGIES, INC.", + [3]byte{0, 192, 35}: "TUTANKHAMON ELECTRONICS", + [3]byte{0, 192, 36}: "EDEN SISTEMAS DE COMPUTACAO SA", + [3]byte{0, 192, 37}: "DATAPRODUCTS CORPORATION", + [3]byte{0, 192, 38}: "LANS TECHNOLOGY CO., LTD.", + [3]byte{0, 192, 39}: "CIPHER SYSTEMS, INC.", + [3]byte{0, 192, 40}: "JASCO CORPORATION", + [3]byte{0, 192, 41}: "Nexans Deutschland GmbH - ANS", + [3]byte{0, 192, 42}: "OHKURA ELECTRIC CO., LTD.", + [3]byte{0, 192, 43}: "GERLOFF GESELLSCHAFT FUR", + [3]byte{0, 192, 44}: "CENTRUM COMMUNICATIONS, INC.", + [3]byte{0, 192, 45}: "FUJI PHOTO FILM CO., LTD.", + [3]byte{0, 192, 46}: "NETWIZ", + [3]byte{0, 192, 47}: "OKUMA CORPORATION", + [3]byte{0, 192, 48}: "INTEGRATED ENGINEERING B. V.", + [3]byte{0, 192, 49}: "DESIGN RESEARCH SYSTEMS, INC.", + [3]byte{0, 192, 50}: "I-CUBED LIMITED", + [3]byte{0, 192, 51}: "TELEBIT COMMUNICATIONS APS", + [3]byte{0, 192, 52}: "TRANSACTION NETWORK", + [3]byte{0, 192, 53}: "QUINTAR COMPANY", + [3]byte{0, 192, 54}: "RAYTECH ELECTRONIC CORP.", + [3]byte{0, 192, 55}: "DYNATEM", + [3]byte{0, 192, 56}: "RASTER IMAGE PROCESSING SYSTEM", + [3]byte{0, 192, 57}: "Teridian Semiconductor Corporation", + [3]byte{0, 192, 58}: "MEN-MIKRO ELEKTRONIK GMBH", + [3]byte{0, 192, 59}: "MULTIACCESS COMPUTING CORP.", + [3]byte{0, 192, 60}: "TOWER TECH S.R.L.", + [3]byte{0, 192, 61}: "WIESEMANN & THEIS GMBH", + [3]byte{0, 192, 62}: "FA. GEBR. HELLER GMBH", + [3]byte{0, 192, 63}: "STORES AUTOMATED SYSTEMS, INC.", + [3]byte{0, 192, 64}: "ECCI", + [3]byte{0, 192, 65}: "DIGITAL TRANSMISSION SYSTEMS", + [3]byte{0, 192, 66}: "DATALUX CORP.", + [3]byte{0, 192, 67}: "STRATACOM", + [3]byte{0, 192, 68}: "EMCOM CORPORATION", + [3]byte{0, 192, 69}: "ISOLATION SYSTEMS, LTD.", + [3]byte{0, 192, 70}: "Blue Chip Technology Ltd", + [3]byte{0, 192, 71}: "UNIMICRO SYSTEMS, INC.", + [3]byte{0, 192, 72}: "BAY TECHNICAL ASSOCIATES", + [3]byte{0, 192, 73}: "U.S. ROBOTICS, INC.", + [3]byte{0, 192, 74}: "GROUP 2000 AG", + [3]byte{0, 192, 75}: "CREATIVE MICROSYSTEMS", + [3]byte{0, 192, 76}: "DEPARTMENT OF FOREIGN AFFAIRS", + [3]byte{0, 192, 77}: "MITEC, INC.", + [3]byte{0, 192, 78}: "COMTROL CORPORATION", + [3]byte{0, 192, 79}: "DELL COMPUTER CORPORATION", + [3]byte{0, 192, 80}: "TOYO DENKI SEIZO K.K.", + [3]byte{0, 192, 81}: "ADVANCED INTEGRATION RESEARCH", + [3]byte{0, 192, 82}: "BURR-BROWN", + [3]byte{0, 192, 83}: "Aspect Software Inc.", + [3]byte{0, 192, 84}: "NETWORK PERIPHERALS, LTD.", + [3]byte{0, 192, 85}: "MODULAR COMPUTING TECHNOLOGIES", + [3]byte{0, 192, 86}: "SOMELEC", + [3]byte{0, 192, 87}: "MYCO ELECTRONICS", + [3]byte{0, 192, 88}: "DATAEXPERT CORP.", + [3]byte{0, 192, 89}: "DENSO CORPORATION", + [3]byte{0, 192, 90}: "SEMAPHORE COMMUNICATIONS CORP.", + [3]byte{0, 192, 91}: "NETWORKS NORTHWEST, INC.", + [3]byte{0, 192, 92}: "ELONEX PLC", + [3]byte{0, 192, 93}: "L&N TECHNOLOGIES", + [3]byte{0, 192, 94}: "VARI-LITE, INC.", + [3]byte{0, 192, 95}: "FINE-PAL COMPANY LIMITED", + [3]byte{0, 192, 96}: "ID SCANDINAVIA AS", + [3]byte{0, 192, 97}: "SOLECTEK CORPORATION", + [3]byte{0, 192, 98}: "IMPULSE TECHNOLOGY", + [3]byte{0, 192, 99}: "MORNING STAR TECHNOLOGIES, INC", + [3]byte{0, 192, 100}: "GENERAL DATACOMM IND. INC.", + [3]byte{0, 192, 101}: "SCOPE COMMUNICATIONS, INC.", + [3]byte{0, 192, 102}: "DOCUPOINT, INC.", + [3]byte{0, 192, 103}: "UNITED BARCODE INDUSTRIES", + [3]byte{0, 192, 104}: "HME Clear-Com LTD.", + [3]byte{0, 192, 105}: "Axxcelera Broadband Wireless", + [3]byte{0, 192, 106}: "ZAHNER-ELEKTRIK GMBH & CO. KG", + [3]byte{0, 192, 107}: "OSI PLUS CORPORATION", + [3]byte{0, 192, 108}: "SVEC COMPUTER CORP.", + [3]byte{0, 192, 109}: "BOCA RESEARCH, INC.", + [3]byte{0, 192, 110}: "HAFT TECHNOLOGY, INC.", + [3]byte{0, 192, 111}: "KOMATSU LTD.", + [3]byte{0, 192, 112}: "SECTRA SECURE-TRANSMISSION AB", + [3]byte{0, 192, 113}: "AREANEX COMMUNICATIONS, INC.", + [3]byte{0, 192, 114}: "KNX LTD.", + [3]byte{0, 192, 115}: "XEDIA CORPORATION", + [3]byte{0, 192, 116}: "TOYODA AUTOMATIC LOOM", + [3]byte{0, 192, 117}: "XANTE CORPORATION", + [3]byte{0, 192, 118}: "I-DATA INTERNATIONAL A-S", + [3]byte{0, 192, 119}: "DAEWOO TELECOM LTD.", + [3]byte{0, 192, 120}: "COMPUTER SYSTEMS ENGINEERING", + [3]byte{0, 192, 121}: "FONSYS CO.,LTD.", + [3]byte{0, 192, 122}: "PRIVA B.V.", + [3]byte{0, 192, 123}: "ASCEND COMMUNICATIONS, INC.", + [3]byte{0, 192, 124}: "HIGHTECH INFORMATION", + [3]byte{0, 192, 125}: "RISC DEVELOPMENTS LTD.", + [3]byte{0, 192, 126}: "KUBOTA CORPORATION ELECTRONIC", + [3]byte{0, 192, 127}: "NUPON COMPUTING CORP.", + [3]byte{0, 192, 128}: "NETSTAR, INC.", + [3]byte{0, 192, 129}: "METRODATA LTD.", + [3]byte{0, 192, 130}: "MOORE PRODUCTS CO.", + [3]byte{0, 192, 131}: "TRACE MOUNTAIN PRODUCTS, INC.", + [3]byte{0, 192, 132}: "DATA LINK CORP. LTD.", + [3]byte{0, 192, 133}: "ELECTRONICS FOR IMAGING, INC.", + [3]byte{0, 192, 134}: "THE LYNK CORPORATION", + [3]byte{0, 192, 135}: "UUNET TECHNOLOGIES, INC.", + [3]byte{0, 192, 136}: "EKF ELEKTRONIK GMBH", + [3]byte{0, 192, 137}: "TELINDUS DISTRIBUTION", + [3]byte{0, 192, 138}: "Lauterbach GmbH", + [3]byte{0, 192, 139}: "RISQ MODULAR SYSTEMS, INC.", + [3]byte{0, 192, 140}: "PERFORMANCE TECHNOLOGIES, INC.", + [3]byte{0, 192, 141}: "TRONIX PRODUCT DEVELOPMENT", + [3]byte{0, 192, 142}: "NETWORK INFORMATION TECHNOLOGY", + [3]byte{0, 192, 143}: "Panasonic Electric Works Co., Ltd.", + [3]byte{0, 192, 144}: "PRAIM S.R.L.", + [3]byte{0, 192, 145}: "JABIL CIRCUIT, INC.", + [3]byte{0, 192, 146}: "MENNEN MEDICAL INC.", + [3]byte{0, 192, 147}: "ALTA RESEARCH CORP.", + [3]byte{0, 192, 148}: "VMX INC.", + [3]byte{0, 192, 149}: "ZNYX", + [3]byte{0, 192, 150}: "TAMURA CORPORATION", + [3]byte{0, 192, 151}: "ARCHIPEL SA", + [3]byte{0, 192, 152}: "CHUNTEX ELECTRONIC CO., LTD.", + [3]byte{0, 192, 153}: "YOSHIKI INDUSTRIAL CO.,LTD.", + [3]byte{0, 192, 154}: "PHOTONICS CORPORATION", + [3]byte{0, 192, 155}: "RELIANCE COMM/TEC, R-TEC", + [3]byte{0, 192, 156}: "HIOKI E.E. CORPORATION", + [3]byte{0, 192, 157}: "DISTRIBUTED SYSTEMS INT'L, INC", + [3]byte{0, 192, 158}: "CACHE COMPUTERS, INC.", + [3]byte{0, 192, 159}: "QUANTA COMPUTER, INC.", + [3]byte{0, 192, 160}: "ADVANCE MICRO RESEARCH, INC.", + [3]byte{0, 192, 161}: "TOKYO DENSHI SEKEI CO.", + [3]byte{0, 192, 162}: "INTERMEDIUM A/S", + [3]byte{0, 192, 163}: "DUAL ENTERPRISES CORPORATION", + [3]byte{0, 192, 164}: "UNIGRAF OY", + [3]byte{0, 192, 165}: "DICKENS DATA SYSTEMS", + [3]byte{0, 192, 166}: "EXICOM AUSTRALIA PTY. LTD", + [3]byte{0, 192, 167}: "SEEL LTD.", + [3]byte{0, 192, 168}: "GVC CORPORATION", + [3]byte{0, 192, 169}: "BARRON MCCANN LTD.", + [3]byte{0, 192, 170}: "SILICON VALLEY COMPUTER", + [3]byte{0, 192, 171}: "Telco Systems, Inc.", + [3]byte{0, 192, 172}: "GAMBIT COMPUTER COMMUNICATIONS", + [3]byte{0, 192, 173}: "MARBEN COMMUNICATION SYSTEMS", + [3]byte{0, 192, 174}: "TOWERCOM CO. INC. DBA PC HOUSE", + [3]byte{0, 192, 175}: "TEKLOGIX INC.", + [3]byte{0, 192, 176}: "GCC TECHNOLOGIES,INC.", + [3]byte{0, 192, 177}: "GENIUS NET CO.", + [3]byte{0, 192, 178}: "NORAND CORPORATION", + [3]byte{0, 192, 179}: "COMSTAT DATACOMM CORPORATION", + [3]byte{0, 192, 180}: "MYSON TECHNOLOGY, INC.", + [3]byte{0, 192, 181}: "CORPORATE NETWORK SYSTEMS,INC.", + [3]byte{0, 192, 182}: "Overland Storage, Inc.", + [3]byte{0, 192, 183}: "AMERICAN POWER CONVERSION CORP", + [3]byte{0, 192, 184}: "FRASER'S HILL LTD.", + [3]byte{0, 192, 185}: "FUNK SOFTWARE, INC.", + [3]byte{0, 192, 186}: "NETVANTAGE", + [3]byte{0, 192, 187}: "FORVAL CREATIVE, INC.", + [3]byte{0, 192, 188}: "TELECOM AUSTRALIA/CSSC", + [3]byte{0, 192, 189}: "INEX TECHNOLOGIES, INC.", + [3]byte{0, 192, 190}: "ALCATEL - SEL", + [3]byte{0, 192, 191}: "TECHNOLOGY CONCEPTS, LTD.", + [3]byte{0, 192, 192}: "SHORE MICROSYSTEMS, INC.", + [3]byte{0, 192, 193}: "QUAD/GRAPHICS, INC.", + [3]byte{0, 192, 194}: "INFINITE NETWORKS LTD.", + [3]byte{0, 192, 195}: "ACUSON COMPUTED SONOGRAPHY", + [3]byte{0, 192, 196}: "COMPUTER OPERATIONAL", + [3]byte{0, 192, 197}: "SID INFORMATICA", + [3]byte{0, 192, 198}: "PERSONAL MEDIA CORP.", + [3]byte{0, 192, 199}: "SPARKTRUM MICROSYSTEMS, INC.", + [3]byte{0, 192, 200}: "MICRO BYTE PTY. LTD.", + [3]byte{0, 192, 201}: "ELSAG BAILEY PROCESS", + [3]byte{0, 192, 202}: "ALFA, INC.", + [3]byte{0, 192, 203}: "CONTROL TECHNOLOGY CORPORATION", + [3]byte{0, 192, 204}: "TELESCIENCES CO SYSTEMS, INC.", + [3]byte{0, 192, 205}: "COMELTA, S.A.", + [3]byte{0, 192, 206}: "CEI SYSTEMS & ENGINEERING PTE", + [3]byte{0, 192, 207}: "IMATRAN VOIMA OY", + [3]byte{0, 192, 208}: "RATOC SYSTEM INC.", + [3]byte{0, 192, 209}: "COMTREE TECHNOLOGY CORPORATION", + [3]byte{0, 192, 210}: "SYNTELLECT, INC.", + [3]byte{0, 192, 211}: "OLYMPUS IMAGE SYSTEMS, INC.", + [3]byte{0, 192, 212}: "AXON NETWORKS, INC.", + [3]byte{0, 192, 213}: "Werbeagentur Jürgen Siebert", + [3]byte{0, 192, 214}: "J1 SYSTEMS, INC.", + [3]byte{0, 192, 215}: "TAIWAN TRADING CENTER DBA", + [3]byte{0, 192, 216}: "UNIVERSAL DATA SYSTEMS", + [3]byte{0, 192, 217}: "QUINTE NETWORK CONFIDENTIALITY", + [3]byte{0, 192, 218}: "NICE SYSTEMS LTD.", + [3]byte{0, 192, 219}: "IPC CORPORATION (PTE) LTD.", + [3]byte{0, 192, 220}: "EOS TECHNOLOGIES, INC.", + [3]byte{0, 192, 221}: "QLogic Corporation", + [3]byte{0, 192, 222}: "ZCOMM, INC.", + [3]byte{0, 192, 223}: "KYE Systems Corp.", + [3]byte{0, 192, 224}: "DSC COMMUNICATION CORP.", + [3]byte{0, 192, 225}: "SONIC SOLUTIONS", + [3]byte{0, 192, 226}: "CALCOMP, INC.", + [3]byte{0, 192, 227}: "OSITECH COMMUNICATIONS, INC.", + [3]byte{0, 192, 228}: "SIEMENS BUILDING", + [3]byte{0, 192, 229}: "GESPAC, S.A.", + [3]byte{0, 192, 230}: "Verilink Corporation", + [3]byte{0, 192, 231}: "FIBERDATA AB", + [3]byte{0, 192, 232}: "PLEXCOM, INC.", + [3]byte{0, 192, 233}: "OAK SOLUTIONS, LTD.", + [3]byte{0, 192, 234}: "ARRAY TECHNOLOGY LTD.", + [3]byte{0, 192, 235}: "SEH COMPUTERTECHNIK GMBH", + [3]byte{0, 192, 236}: "DAUPHIN TECHNOLOGY", + [3]byte{0, 192, 237}: "US ARMY ELECTRONIC", + [3]byte{0, 192, 238}: "KYOCERA CORPORATION", + [3]byte{0, 192, 239}: "ABIT CORPORATION", + [3]byte{0, 192, 240}: "KINGSTON TECHNOLOGY CORP.", + [3]byte{0, 192, 241}: "SHINKO ELECTRIC CO., LTD.", + [3]byte{0, 192, 242}: "TRANSITION NETWORKS", + [3]byte{0, 192, 243}: "NETWORK COMMUNICATIONS CORP.", + [3]byte{0, 192, 244}: "INTERLINK SYSTEM CO., LTD.", + [3]byte{0, 192, 245}: "METACOMP, INC.", + [3]byte{0, 192, 246}: "CELAN TECHNOLOGY INC.", + [3]byte{0, 192, 247}: "ENGAGE COMMUNICATION, INC.", + [3]byte{0, 192, 248}: "ABOUT COMPUTING INC.", + [3]byte{0, 192, 249}: "Artesyn Embedded Technologies", + [3]byte{0, 192, 250}: "CANARY COMMUNICATIONS, INC.", + [3]byte{0, 192, 251}: "ADVANCED TECHNOLOGY LABS", + [3]byte{0, 192, 252}: "ELASTIC REALITY, INC.", + [3]byte{0, 192, 253}: "PROSUM", + [3]byte{0, 192, 254}: "APTEC COMPUTER SYSTEMS, INC.", + [3]byte{0, 192, 255}: "DOT HILL SYSTEMS CORPORATION", + [3]byte{0, 193, 79}: "DDL Co,.ltd.", + [3]byte{0, 194, 198}: "Intel Corporate", + [3]byte{0, 197, 219}: "Datatech Sistemas Digitales Avanzados SL", + [3]byte{0, 198, 16}: "Apple", + [3]byte{0, 203, 189}: "Cambridge Broadband Networks Ltd.", + [3]byte{0, 205, 144}: "MAS Elektronik AG", + [3]byte{0, 207, 28}: "COMMUNICATION MACHINERY CORP.", + [3]byte{0, 208, 0}: "FERRAN SCIENTIFIC, INC.", + [3]byte{0, 208, 1}: "VST TECHNOLOGIES, INC.", + [3]byte{0, 208, 2}: "DITECH CORPORATION", + [3]byte{0, 208, 3}: "COMDA ENTERPRISES CORP.", + [3]byte{0, 208, 4}: "PENTACOM LTD.", + [3]byte{0, 208, 5}: "ZHS ZEITMANAGEMENTSYSTEME", + [3]byte{0, 208, 6}: "CISCO SYSTEMS, INC.", + [3]byte{0, 208, 7}: "MIC ASSOCIATES, INC.", + [3]byte{0, 208, 8}: "MACTELL CORPORATION", + [3]byte{0, 208, 9}: "HSING TECH. ENTERPRISE CO. LTD", + [3]byte{0, 208, 10}: "LANACCESS TELECOM S.A.", + [3]byte{0, 208, 11}: "RHK TECHNOLOGY, INC.", + [3]byte{0, 208, 12}: "SNIJDER MICRO SYSTEMS", + [3]byte{0, 208, 13}: "MICROMERITICS INSTRUMENT", + [3]byte{0, 208, 14}: "PLURIS, INC.", + [3]byte{0, 208, 15}: "SPEECH DESIGN GMBH", + [3]byte{0, 208, 16}: "CONVERGENT NETWORKS, INC.", + [3]byte{0, 208, 17}: "PRISM VIDEO, INC.", + [3]byte{0, 208, 18}: "GATEWORKS CORP.", + [3]byte{0, 208, 19}: "PRIMEX AEROSPACE COMPANY", + [3]byte{0, 208, 20}: "ROOT, INC.", + [3]byte{0, 208, 21}: "UNIVEX MICROTECHNOLOGY CORP.", + [3]byte{0, 208, 22}: "SCM MICROSYSTEMS, INC.", + [3]byte{0, 208, 23}: "SYNTECH INFORMATION CO., LTD.", + [3]byte{0, 208, 24}: "QWES. COM, INC.", + [3]byte{0, 208, 25}: "DAINIPPON SCREEN CORPORATE", + [3]byte{0, 208, 26}: "URMET TLC S.P.A.", + [3]byte{0, 208, 27}: "MIMAKI ENGINEERING CO., LTD.", + [3]byte{0, 208, 28}: "SBS TECHNOLOGIES,", + [3]byte{0, 208, 29}: "FURUNO ELECTRIC CO., LTD.", + [3]byte{0, 208, 30}: "PINGTEL CORP.", + [3]byte{0, 208, 31}: "Senetas Security", + [3]byte{0, 208, 32}: "AIM SYSTEM, INC.", + [3]byte{0, 208, 33}: "REGENT ELECTRONICS CORP.", + [3]byte{0, 208, 34}: "INCREDIBLE TECHNOLOGIES, INC.", + [3]byte{0, 208, 35}: "INFORTREND TECHNOLOGY, INC.", + [3]byte{0, 208, 36}: "Cognex Corporation", + [3]byte{0, 208, 37}: "XROSSTECH, INC.", + [3]byte{0, 208, 38}: "HIRSCHMANN AUSTRIA GMBH", + [3]byte{0, 208, 39}: "APPLIED AUTOMATION, INC.", + [3]byte{0, 208, 40}: "Harmonic, Inc", + [3]byte{0, 208, 41}: "WAKEFERN FOOD CORPORATION", + [3]byte{0, 208, 42}: "Voxent Systems Ltd.", + [3]byte{0, 208, 43}: "JETCELL, INC.", + [3]byte{0, 208, 44}: "CAMPBELL SCIENTIFIC, INC.", + [3]byte{0, 208, 45}: "ADEMCO", + [3]byte{0, 208, 46}: "COMMUNICATION AUTOMATION CORP.", + [3]byte{0, 208, 47}: "VLSI TECHNOLOGY INC.", + [3]byte{0, 208, 48}: "Safetran Systems Corp", + [3]byte{0, 208, 49}: "INDUSTRIAL LOGIC CORPORATION", + [3]byte{0, 208, 50}: "YANO ELECTRIC CO., LTD.", + [3]byte{0, 208, 51}: "DALIAN DAXIAN NETWORK", + [3]byte{0, 208, 52}: "ORMEC SYSTEMS CORP.", + [3]byte{0, 208, 53}: "BEHAVIOR TECH. COMPUTER CORP.", + [3]byte{0, 208, 54}: "TECHNOLOGY ATLANTA CORP.", + [3]byte{0, 208, 55}: "Pace France", + [3]byte{0, 208, 56}: "FIVEMERE, LTD.", + [3]byte{0, 208, 57}: "UTILICOM, INC.", + [3]byte{0, 208, 58}: "ZONEWORX, INC.", + [3]byte{0, 208, 59}: "VISION PRODUCTS PTY. LTD.", + [3]byte{0, 208, 60}: "Vieo, Inc.", + [3]byte{0, 208, 61}: "GALILEO TECHNOLOGY, LTD.", + [3]byte{0, 208, 62}: "ROCKETCHIPS, INC.", + [3]byte{0, 208, 63}: "AMERICAN COMMUNICATION", + [3]byte{0, 208, 64}: "SYSMATE CO., LTD.", + [3]byte{0, 208, 65}: "AMIGO TECHNOLOGY CO., LTD.", + [3]byte{0, 208, 66}: "MAHLO GMBH & CO. UG", + [3]byte{0, 208, 67}: "ZONAL RETAIL DATA SYSTEMS", + [3]byte{0, 208, 68}: "ALIDIAN NETWORKS, INC.", + [3]byte{0, 208, 69}: "KVASER AB", + [3]byte{0, 208, 70}: "DOLBY LABORATORIES, INC.", + [3]byte{0, 208, 71}: "XN TECHNOLOGIES", + [3]byte{0, 208, 72}: "ECTON, INC.", + [3]byte{0, 208, 73}: "IMPRESSTEK CO., LTD.", + [3]byte{0, 208, 74}: "PRESENCE TECHNOLOGY GMBH", + [3]byte{0, 208, 75}: "LA CIE GROUP S.A.", + [3]byte{0, 208, 76}: "EUROTEL TELECOM LTD.", + [3]byte{0, 208, 77}: "DIV OF RESEARCH & STATISTICS", + [3]byte{0, 208, 78}: "LOGIBAG", + [3]byte{0, 208, 79}: "BITRONICS, INC.", + [3]byte{0, 208, 80}: "ISKRATEL", + [3]byte{0, 208, 81}: "O2 MICRO, INC.", + [3]byte{0, 208, 82}: "ASCEND COMMUNICATIONS, INC.", + [3]byte{0, 208, 83}: "CONNECTED SYSTEMS", + [3]byte{0, 208, 84}: "SAS INSTITUTE INC.", + [3]byte{0, 208, 85}: "KATHREIN-WERKE KG", + [3]byte{0, 208, 86}: "SOMAT CORPORATION", + [3]byte{0, 208, 87}: "ULTRAK, INC.", + [3]byte{0, 208, 88}: "CISCO SYSTEMS, INC.", + [3]byte{0, 208, 89}: "AMBIT MICROSYSTEMS CORP.", + [3]byte{0, 208, 90}: "SYMBIONICS, LTD.", + [3]byte{0, 208, 91}: "ACROLOOP MOTION CONTROL", + [3]byte{0, 208, 92}: "TECHNOTREND SYSTEMTECHNIK GMBH", + [3]byte{0, 208, 93}: "INTELLIWORXX, INC.", + [3]byte{0, 208, 94}: "STRATABEAM TECHNOLOGY, INC.", + [3]byte{0, 208, 95}: "VALCOM, INC.", + [3]byte{0, 208, 96}: "Panasonic Europe Ltd.", + [3]byte{0, 208, 97}: "TREMON ENTERPRISES CO., LTD.", + [3]byte{0, 208, 98}: "DIGIGRAM", + [3]byte{0, 208, 99}: "CISCO SYSTEMS, INC.", + [3]byte{0, 208, 100}: "MULTITEL", + [3]byte{0, 208, 101}: "TOKO ELECTRIC", + [3]byte{0, 208, 102}: "WINTRISS ENGINEERING CORP.", + [3]byte{0, 208, 103}: "CAMPIO COMMUNICATIONS", + [3]byte{0, 208, 104}: "IWILL CORPORATION", + [3]byte{0, 208, 105}: "TECHNOLOGIC SYSTEMS", + [3]byte{0, 208, 106}: "LINKUP SYSTEMS CORPORATION", + [3]byte{0, 208, 107}: "SR TELECOM INC.", + [3]byte{0, 208, 108}: "SHAREWAVE, INC.", + [3]byte{0, 208, 109}: "ACRISON, INC.", + [3]byte{0, 208, 110}: "TRENDVIEW RECORDERS LTD.", + [3]byte{0, 208, 111}: "KMC CONTROLS", + [3]byte{0, 208, 112}: "LONG WELL ELECTRONICS CORP.", + [3]byte{0, 208, 113}: "ECHELON CORP.", + [3]byte{0, 208, 114}: "BROADLOGIC", + [3]byte{0, 208, 115}: "ACN ADVANCED COMMUNICATIONS", + [3]byte{0, 208, 116}: "TAQUA SYSTEMS, INC.", + [3]byte{0, 208, 117}: "ALARIS MEDICAL SYSTEMS, INC.", + [3]byte{0, 208, 118}: "Bank of America", + [3]byte{0, 208, 119}: "LUCENT TECHNOLOGIES", + [3]byte{0, 208, 120}: "Eltex of Sweden AB", + [3]byte{0, 208, 121}: "CISCO SYSTEMS, INC.", + [3]byte{0, 208, 122}: "AMAQUEST COMPUTER CORP.", + [3]byte{0, 208, 123}: "COMCAM INTERNATIONAL INC", + [3]byte{0, 208, 124}: "KOYO ELECTRONICS INC. CO.,LTD.", + [3]byte{0, 208, 125}: "COSINE COMMUNICATIONS", + [3]byte{0, 208, 126}: "KEYCORP LTD.", + [3]byte{0, 208, 127}: "STRATEGY & TECHNOLOGY, LIMITED", + [3]byte{0, 208, 128}: "EXABYTE CORPORATION", + [3]byte{0, 208, 129}: "RTD Embedded Technologies, Inc.", + [3]byte{0, 208, 130}: "IOWAVE INC.", + [3]byte{0, 208, 131}: "INVERTEX, INC.", + [3]byte{0, 208, 132}: "NEXCOMM SYSTEMS, INC.", + [3]byte{0, 208, 133}: "OTIS ELEVATOR COMPANY", + [3]byte{0, 208, 134}: "FOVEON, INC.", + [3]byte{0, 208, 135}: "MICROFIRST INC.", + [3]byte{0, 208, 136}: "ARRIS Group, Inc.", + [3]byte{0, 208, 137}: "DYNACOLOR, INC.", + [3]byte{0, 208, 138}: "PHOTRON USA", + [3]byte{0, 208, 139}: "ADVA Optical Networking Ltd.", + [3]byte{0, 208, 140}: "GENOA TECHNOLOGY, INC.", + [3]byte{0, 208, 141}: "PHOENIX GROUP, INC.", + [3]byte{0, 208, 142}: "NVISION INC.", + [3]byte{0, 208, 143}: "ARDENT TECHNOLOGIES, INC.", + [3]byte{0, 208, 144}: "CISCO SYSTEMS, INC.", + [3]byte{0, 208, 145}: "SMARTSAN SYSTEMS, INC.", + [3]byte{0, 208, 146}: "GLENAYRE WESTERN MULTIPLEX", + [3]byte{0, 208, 147}: "TQ - COMPONENTS GMBH", + [3]byte{0, 208, 148}: "TIMELINE VISTA, INC.", + [3]byte{0, 208, 149}: "Alcatel-Lucent, Enterprise Business Group", + [3]byte{0, 208, 150}: "3COM EUROPE LTD.", + [3]byte{0, 208, 151}: "CISCO SYSTEMS, INC.", + [3]byte{0, 208, 152}: "Photon Dynamics Canada Inc.", + [3]byte{0, 208, 153}: "Elcard Wireless Systems Oy", + [3]byte{0, 208, 154}: "FILANET CORPORATION", + [3]byte{0, 208, 155}: "SPECTEL LTD.", + [3]byte{0, 208, 156}: "KAPADIA COMMUNICATIONS", + [3]byte{0, 208, 157}: "VERIS INDUSTRIES", + [3]byte{0, 208, 158}: "2WIRE, INC.", + [3]byte{0, 208, 159}: "NOVTEK TEST SYSTEMS", + [3]byte{0, 208, 160}: "MIPS DENMARK", + [3]byte{0, 208, 161}: "OSKAR VIERLING GMBH + CO. KG", + [3]byte{0, 208, 162}: "INTEGRATED DEVICE", + [3]byte{0, 208, 163}: "VOCAL DATA, INC.", + [3]byte{0, 208, 164}: "ALANTRO COMMUNICATIONS", + [3]byte{0, 208, 165}: "AMERICAN ARIUM", + [3]byte{0, 208, 166}: "LANBIRD TECHNOLOGY CO., LTD.", + [3]byte{0, 208, 167}: "TOKYO SOKKI KENKYUJO CO., LTD.", + [3]byte{0, 208, 168}: "NETWORK ENGINES, INC.", + [3]byte{0, 208, 169}: "SHINANO KENSHI CO., LTD.", + [3]byte{0, 208, 170}: "CHASE COMMUNICATIONS", + [3]byte{0, 208, 171}: "DELTAKABEL TELECOM CV", + [3]byte{0, 208, 172}: "GRAYSON WIRELESS", + [3]byte{0, 208, 173}: "TL INDUSTRIES", + [3]byte{0, 208, 174}: "ORESIS COMMUNICATIONS, INC.", + [3]byte{0, 208, 175}: "CUTLER-HAMMER, INC.", + [3]byte{0, 208, 176}: "BITSWITCH LTD.", + [3]byte{0, 208, 177}: "OMEGA ELECTRONICS SA", + [3]byte{0, 208, 178}: "XIOTECH CORPORATION", + [3]byte{0, 208, 179}: "DRS Technologies Canada Ltd", + [3]byte{0, 208, 180}: "KATSUJIMA CO., LTD.", + [3]byte{0, 208, 181}: "IPricot formerly DotCom", + [3]byte{0, 208, 182}: "CRESCENT NETWORKS, INC.", + [3]byte{0, 208, 183}: "INTEL CORPORATION", + [3]byte{0, 208, 184}: "Iomega Corporation", + [3]byte{0, 208, 185}: "MICROTEK INTERNATIONAL, INC.", + [3]byte{0, 208, 186}: "CISCO SYSTEMS, INC.", + [3]byte{0, 208, 187}: "CISCO SYSTEMS, INC.", + [3]byte{0, 208, 188}: "CISCO SYSTEMS, INC.", + [3]byte{0, 208, 189}: "Silicon Image GmbH", + [3]byte{0, 208, 190}: "EMUTEC INC.", + [3]byte{0, 208, 191}: "PIVOTAL TECHNOLOGIES", + [3]byte{0, 208, 192}: "CISCO SYSTEMS, INC.", + [3]byte{0, 208, 193}: "HARMONIC DATA SYSTEMS, LTD.", + [3]byte{0, 208, 194}: "BALTHAZAR TECHNOLOGY AB", + [3]byte{0, 208, 195}: "VIVID TECHNOLOGY PTE, LTD.", + [3]byte{0, 208, 196}: "TERATECH CORPORATION", + [3]byte{0, 208, 197}: "COMPUTATIONAL SYSTEMS, INC.", + [3]byte{0, 208, 198}: "THOMAS & BETTS CORP.", + [3]byte{0, 208, 199}: "PATHWAY, INC.", + [3]byte{0, 208, 200}: "Prevas A/S", + [3]byte{0, 208, 201}: "ADVANTECH CO., LTD.", + [3]byte{0, 208, 202}: "Intrinsyc Software International Inc.", + [3]byte{0, 208, 203}: "DASAN CO., LTD.", + [3]byte{0, 208, 204}: "TECHNOLOGIES LYRE INC.", + [3]byte{0, 208, 205}: "ATAN TECHNOLOGY INC.", + [3]byte{0, 208, 206}: "ASYST ELECTRONIC", + [3]byte{0, 208, 207}: "MORETON BAY", + [3]byte{0, 208, 208}: "ZHONGXING TELECOM LTD.", + [3]byte{0, 208, 209}: "Sycamore Networks", + [3]byte{0, 208, 210}: "EPILOG CORPORATION", + [3]byte{0, 208, 211}: "CISCO SYSTEMS, INC.", + [3]byte{0, 208, 212}: "V-BITS, INC.", + [3]byte{0, 208, 213}: "GRUNDIG AG", + [3]byte{0, 208, 214}: "AETHRA TELECOMUNICAZIONI", + [3]byte{0, 208, 215}: "B2C2, INC.", + [3]byte{0, 208, 216}: "3Com Corporation", + [3]byte{0, 208, 217}: "DEDICATED MICROCOMPUTERS", + [3]byte{0, 208, 218}: "TAICOM DATA SYSTEMS CO., LTD.", + [3]byte{0, 208, 219}: "MCQUAY INTERNATIONAL", + [3]byte{0, 208, 220}: "MODULAR MINING SYSTEMS, INC.", + [3]byte{0, 208, 221}: "SUNRISE TELECOM, INC.", + [3]byte{0, 208, 222}: "PHILIPS MULTIMEDIA NETWORK", + [3]byte{0, 208, 223}: "KUZUMI ELECTRONICS, INC.", + [3]byte{0, 208, 224}: "DOOIN ELECTRONICS CO.", + [3]byte{0, 208, 225}: "AVIONITEK ISRAEL INC.", + [3]byte{0, 208, 226}: "MRT MICRO, INC.", + [3]byte{0, 208, 227}: "ELE-CHEM ENGINEERING CO., LTD.", + [3]byte{0, 208, 228}: "CISCO SYSTEMS, INC.", + [3]byte{0, 208, 229}: "SOLIDUM SYSTEMS CORP.", + [3]byte{0, 208, 230}: "IBOND INC.", + [3]byte{0, 208, 231}: "VCON TELECOMMUNICATION LTD.", + [3]byte{0, 208, 232}: "MAC SYSTEM CO., LTD.", + [3]byte{0, 208, 233}: "Advantage Century Telecommunication Corp.", + [3]byte{0, 208, 234}: "NEXTONE COMMUNICATIONS, INC.", + [3]byte{0, 208, 235}: "LIGHTERA NETWORKS, INC.", + [3]byte{0, 208, 236}: "NAKAYO TELECOMMUNICATIONS, INC", + [3]byte{0, 208, 237}: "XIOX", + [3]byte{0, 208, 238}: "DICTAPHONE CORPORATION", + [3]byte{0, 208, 239}: "IGT", + [3]byte{0, 208, 240}: "CONVISION TECHNOLOGY GMBH", + [3]byte{0, 208, 241}: "SEGA ENTERPRISES, LTD.", + [3]byte{0, 208, 242}: "MONTEREY NETWORKS", + [3]byte{0, 208, 243}: "SOLARI DI UDINE SPA", + [3]byte{0, 208, 244}: "CARINTHIAN TECH INSTITUTE", + [3]byte{0, 208, 245}: "ORANGE MICRO, INC.", + [3]byte{0, 208, 246}: "Alcatel Canada", + [3]byte{0, 208, 247}: "NEXT NETS CORPORATION", + [3]byte{0, 208, 248}: "FUJIAN STAR TERMINAL", + [3]byte{0, 208, 249}: "ACUTE COMMUNICATIONS CORP.", + [3]byte{0, 208, 250}: "Thales e-Security Ltd.", + [3]byte{0, 208, 251}: "TEK MICROSYSTEMS, INCORPORATED", + [3]byte{0, 208, 252}: "GRANITE MICROSYSTEMS", + [3]byte{0, 208, 253}: "OPTIMA TELE.COM, INC.", + [3]byte{0, 208, 254}: "ASTRAL POINT", + [3]byte{0, 208, 255}: "CISCO SYSTEMS, INC.", + [3]byte{0, 209, 28}: "ACETEL", + [3]byte{0, 211, 141}: "Hotel Technology Next Generation", + [3]byte{0, 214, 50}: "GE Energy", + [3]byte{0, 217, 209}: "Sony Computer Entertainment Inc.", + [3]byte{0, 219, 30}: "Albedo Telecom SL", + [3]byte{0, 219, 69}: "THAMWAY CO.,LTD.", + [3]byte{0, 219, 223}: "Intel Corporate", + [3]byte{0, 221, 0}: "UNGERMANN-BASS INC.", + [3]byte{0, 221, 1}: "UNGERMANN-BASS INC.", + [3]byte{0, 221, 2}: "UNGERMANN-BASS INC.", + [3]byte{0, 221, 3}: "UNGERMANN-BASS INC.", + [3]byte{0, 221, 4}: "UNGERMANN-BASS INC.", + [3]byte{0, 221, 5}: "UNGERMANN-BASS INC.", + [3]byte{0, 221, 6}: "UNGERMANN-BASS INC.", + [3]byte{0, 221, 7}: "UNGERMANN-BASS INC.", + [3]byte{0, 221, 8}: "UNGERMANN-BASS INC.", + [3]byte{0, 221, 9}: "UNGERMANN-BASS INC.", + [3]byte{0, 221, 10}: "UNGERMANN-BASS INC.", + [3]byte{0, 221, 11}: "UNGERMANN-BASS INC.", + [3]byte{0, 221, 12}: "UNGERMANN-BASS INC.", + [3]byte{0, 221, 13}: "UNGERMANN-BASS INC.", + [3]byte{0, 221, 14}: "UNGERMANN-BASS INC.", + [3]byte{0, 221, 15}: "UNGERMANN-BASS INC.", + [3]byte{0, 222, 251}: "CISCO SYSTEMS, INC.", + [3]byte{0, 224, 0}: "Fujitsu Limited", + [3]byte{0, 224, 1}: "STRAND LIGHTING LIMITED", + [3]byte{0, 224, 2}: "CROSSROADS SYSTEMS, INC.", + [3]byte{0, 224, 3}: "NOKIA WIRELESS BUSINESS COMMUN", + [3]byte{0, 224, 4}: "PMC-SIERRA, INC.", + [3]byte{0, 224, 5}: "TECHNICAL CORP.", + [3]byte{0, 224, 6}: "SILICON INTEGRATED SYS. CORP.", + [3]byte{0, 224, 7}: "Avaya ECS Ltd", + [3]byte{0, 224, 8}: "AMAZING CONTROLS! INC.", + [3]byte{0, 224, 9}: "MARATHON TECHNOLOGIES CORP.", + [3]byte{0, 224, 10}: "DIBA, INC.", + [3]byte{0, 224, 11}: "ROOFTOP COMMUNICATIONS CORP.", + [3]byte{0, 224, 12}: "MOTOROLA", + [3]byte{0, 224, 13}: "RADIANT SYSTEMS", + [3]byte{0, 224, 14}: "AVALON IMAGING SYSTEMS, INC.", + [3]byte{0, 224, 15}: "SHANGHAI BAUD DATA", + [3]byte{0, 224, 16}: "HESS SB-AUTOMATENBAU GmbH", + [3]byte{0, 224, 17}: "Uniden Corporation", + [3]byte{0, 224, 18}: "PLUTO TECHNOLOGIES INTERNATIONAL INC.", + [3]byte{0, 224, 19}: "EASTERN ELECTRONIC CO., LTD.", + [3]byte{0, 224, 20}: "CISCO SYSTEMS, INC.", + [3]byte{0, 224, 21}: "HEIWA CORPORATION", + [3]byte{0, 224, 22}: "RAPID CITY COMMUNICATIONS", + [3]byte{0, 224, 23}: "EXXACT GmbH", + [3]byte{0, 224, 24}: "ASUSTEK COMPUTER INC.", + [3]byte{0, 224, 25}: "ING. GIORDANO ELETTRONICA", + [3]byte{0, 224, 26}: "COMTEC SYSTEMS. CO., LTD.", + [3]byte{0, 224, 27}: "SPHERE COMMUNICATIONS, INC.", + [3]byte{0, 224, 28}: "Cradlepoint, Inc", + [3]byte{0, 224, 29}: "WebTV NETWORKS, INC.", + [3]byte{0, 224, 30}: "CISCO SYSTEMS, INC.", + [3]byte{0, 224, 31}: "AVIDIA Systems, Inc.", + [3]byte{0, 224, 32}: "TECNOMEN OY", + [3]byte{0, 224, 33}: "FREEGATE CORP.", + [3]byte{0, 224, 34}: "Analog Devices Inc.", + [3]byte{0, 224, 35}: "TELRAD", + [3]byte{0, 224, 36}: "GADZOOX NETWORKS", + [3]byte{0, 224, 37}: "dit Co., Ltd.", + [3]byte{0, 224, 38}: "Redlake MASD LLC", + [3]byte{0, 224, 39}: "DUX, INC.", + [3]byte{0, 224, 40}: "APTIX CORPORATION", + [3]byte{0, 224, 41}: "STANDARD MICROSYSTEMS CORP.", + [3]byte{0, 224, 42}: "TANDBERG TELEVISION AS", + [3]byte{0, 224, 43}: "EXTREME NETWORKS", + [3]byte{0, 224, 44}: "AST COMPUTER", + [3]byte{0, 224, 45}: "InnoMediaLogic, Inc.", + [3]byte{0, 224, 46}: "SPC ELECTRONICS CORPORATION", + [3]byte{0, 224, 47}: "MCNS HOLDINGS, L.P.", + [3]byte{0, 224, 48}: "MELITA INTERNATIONAL CORP.", + [3]byte{0, 224, 49}: "HAGIWARA ELECTRIC CO., LTD.", + [3]byte{0, 224, 50}: "MISYS FINANCIAL SYSTEMS, LTD.", + [3]byte{0, 224, 51}: "E.E.P.D. GmbH", + [3]byte{0, 224, 52}: "CISCO SYSTEMS, INC.", + [3]byte{0, 224, 53}: "Artesyn Embedded Technologies", + [3]byte{0, 224, 54}: "PIONEER CORPORATION", + [3]byte{0, 224, 55}: "CENTURY CORPORATION", + [3]byte{0, 224, 56}: "PROXIMA CORPORATION", + [3]byte{0, 224, 57}: "PARADYNE CORP.", + [3]byte{0, 224, 58}: "CABLETRON SYSTEMS, INC.", + [3]byte{0, 224, 59}: "PROMINET CORPORATION", + [3]byte{0, 224, 60}: "AdvanSys", + [3]byte{0, 224, 61}: "FOCON ELECTRONIC SYSTEMS A/S", + [3]byte{0, 224, 62}: "ALFATECH, INC.", + [3]byte{0, 224, 63}: "JATON CORPORATION", + [3]byte{0, 224, 64}: "DeskStation Technology, Inc.", + [3]byte{0, 224, 65}: "CSPI", + [3]byte{0, 224, 66}: "Pacom Systems Ltd.", + [3]byte{0, 224, 67}: "VitalCom", + [3]byte{0, 224, 68}: "LSICS CORPORATION", + [3]byte{0, 224, 69}: "TOUCHWAVE, INC.", + [3]byte{0, 224, 70}: "BENTLY NEVADA CORP.", + [3]byte{0, 224, 71}: "InFocus Corporation", + [3]byte{0, 224, 72}: "SDL COMMUNICATIONS, INC.", + [3]byte{0, 224, 73}: "MICROWI ELECTRONIC GmbH", + [3]byte{0, 224, 74}: "ENHANCED MESSAGING SYSTEMS, INC", + [3]byte{0, 224, 75}: "JUMP INDUSTRIELLE COMPUTERTECHNIK GmbH", + [3]byte{0, 224, 76}: "REALTEK SEMICONDUCTOR CORP.", + [3]byte{0, 224, 77}: "INTERNET INITIATIVE JAPAN, INC", + [3]byte{0, 224, 78}: "SANYO DENKI CO., LTD.", + [3]byte{0, 224, 79}: "CISCO SYSTEMS, INC.", + [3]byte{0, 224, 80}: "EXECUTONE INFORMATION SYSTEMS, INC.", + [3]byte{0, 224, 81}: "TALX CORPORATION", + [3]byte{0, 224, 82}: "Brocade Communications Systems, Inc", + [3]byte{0, 224, 83}: "CELLPORT LABS, INC.", + [3]byte{0, 224, 84}: "KODAI HITEC CO., LTD.", + [3]byte{0, 224, 85}: "INGENIERIA ELECTRONICA COMERCIAL INELCOM S.A.", + [3]byte{0, 224, 86}: "HOLONTECH CORPORATION", + [3]byte{0, 224, 87}: "HAN MICROTELECOM. CO., LTD.", + [3]byte{0, 224, 88}: "PHASE ONE DENMARK A/S", + [3]byte{0, 224, 89}: "CONTROLLED ENVIRONMENTS, LTD.", + [3]byte{0, 224, 90}: "GALEA NETWORK SECURITY", + [3]byte{0, 224, 91}: "WEST END SYSTEMS CORP.", + [3]byte{0, 224, 92}: "MATSUSHITA KOTOBUKI ELECTRONICS INDUSTRIES, LTD.", + [3]byte{0, 224, 93}: "UNITEC CO., LTD.", + [3]byte{0, 224, 94}: "JAPAN AVIATION ELECTRONICS INDUSTRY, LTD.", + [3]byte{0, 224, 95}: "e-Net, Inc.", + [3]byte{0, 224, 96}: "SHERWOOD", + [3]byte{0, 224, 97}: "EdgePoint Networks, Inc.", + [3]byte{0, 224, 98}: "HOST ENGINEERING", + [3]byte{0, 224, 99}: "CABLETRON - YAGO SYSTEMS, INC.", + [3]byte{0, 224, 100}: "SAMSUNG ELECTRONICS", + [3]byte{0, 224, 101}: "OPTICAL ACCESS INTERNATIONAL", + [3]byte{0, 224, 102}: "ProMax Systems, Inc.", + [3]byte{0, 224, 103}: "eac AUTOMATION-CONSULTING GmbH", + [3]byte{0, 224, 104}: "MERRIMAC SYSTEMS INC.", + [3]byte{0, 224, 105}: "JAYCOR", + [3]byte{0, 224, 106}: "KAPSCH AG", + [3]byte{0, 224, 107}: "W&G SPECIAL PRODUCTS", + [3]byte{0, 224, 108}: "Ultra Electronics Limited (AEP Networks)", + [3]byte{0, 224, 109}: "COMPUWARE CORPORATION", + [3]byte{0, 224, 110}: "FAR SYSTEMS S.p.A.", + [3]byte{0, 224, 111}: "ARRIS Group, Inc.", + [3]byte{0, 224, 112}: "DH TECHNOLOGY", + [3]byte{0, 224, 113}: "EPIS MICROCOMPUTER", + [3]byte{0, 224, 114}: "LYNK", + [3]byte{0, 224, 115}: "NATIONAL AMUSEMENT NETWORK, INC.", + [3]byte{0, 224, 116}: "TIERNAN COMMUNICATIONS, INC.", + [3]byte{0, 224, 117}: "Verilink Corporation", + [3]byte{0, 224, 118}: "DEVELOPMENT CONCEPTS, INC.", + [3]byte{0, 224, 119}: "WEBGEAR, INC.", + [3]byte{0, 224, 120}: "BERKELEY NETWORKS", + [3]byte{0, 224, 121}: "A.T.N.R.", + [3]byte{0, 224, 122}: "MIKRODIDAKT AB", + [3]byte{0, 224, 123}: "BAY NETWORKS", + [3]byte{0, 224, 124}: "METTLER-TOLEDO, INC.", + [3]byte{0, 224, 125}: "NETRONIX, INC.", + [3]byte{0, 224, 126}: "WALT DISNEY IMAGINEERING", + [3]byte{0, 224, 127}: "LOGISTISTEM s.r.l.", + [3]byte{0, 224, 128}: "CONTROL RESOURCES CORPORATION", + [3]byte{0, 224, 129}: "TYAN COMPUTER CORP.", + [3]byte{0, 224, 130}: "ANERMA", + [3]byte{0, 224, 131}: "JATO TECHNOLOGIES, INC.", + [3]byte{0, 224, 132}: "COMPULITE R&D", + [3]byte{0, 224, 133}: "GLOBAL MAINTECH, INC.", + [3]byte{0, 224, 134}: "Emerson Network Power, Avocent Division", + [3]byte{0, 224, 135}: "LeCroy - Networking Productions Division", + [3]byte{0, 224, 136}: "LTX-Credence CORPORATION", + [3]byte{0, 224, 137}: "ION Networks, Inc.", + [3]byte{0, 224, 138}: "GEC AVERY, LTD.", + [3]byte{0, 224, 139}: "QLogic Corp.", + [3]byte{0, 224, 140}: "NEOPARADIGM LABS, INC.", + [3]byte{0, 224, 141}: "PRESSURE SYSTEMS, INC.", + [3]byte{0, 224, 142}: "UTSTARCOM", + [3]byte{0, 224, 143}: "CISCO SYSTEMS, INC.", + [3]byte{0, 224, 144}: "BECKMAN LAB. AUTOMATION DIV.", + [3]byte{0, 224, 145}: "LG ELECTRONICS, INC.", + [3]byte{0, 224, 146}: "ADMTEK INCORPORATED", + [3]byte{0, 224, 147}: "ACKFIN NETWORKS", + [3]byte{0, 224, 148}: "OSAI SRL", + [3]byte{0, 224, 149}: "ADVANCED-VISION TECHNOLGIES CORP.", + [3]byte{0, 224, 150}: "SHIMADZU CORPORATION", + [3]byte{0, 224, 151}: "CARRIER ACCESS CORPORATION", + [3]byte{0, 224, 152}: "AboCom Systems, Inc.", + [3]byte{0, 224, 153}: "SAMSON AG", + [3]byte{0, 224, 154}: "Positron Inc.", + [3]byte{0, 224, 155}: "ENGAGE NETWORKS, INC.", + [3]byte{0, 224, 156}: "MII", + [3]byte{0, 224, 157}: "SARNOFF CORPORATION", + [3]byte{0, 224, 158}: "QUANTUM CORPORATION", + [3]byte{0, 224, 159}: "PIXEL VISION", + [3]byte{0, 224, 160}: "WILTRON CO.", + [3]byte{0, 224, 161}: "HIMA PAUL HILDEBRANDT GmbH Co. KG", + [3]byte{0, 224, 162}: "MICROSLATE INC.", + [3]byte{0, 224, 163}: "CISCO SYSTEMS, INC.", + [3]byte{0, 224, 164}: "ESAOTE S.p.A.", + [3]byte{0, 224, 165}: "ComCore Semiconductor, Inc.", + [3]byte{0, 224, 166}: "TELOGY NETWORKS, INC.", + [3]byte{0, 224, 167}: "IPC INFORMATION SYSTEMS, INC.", + [3]byte{0, 224, 168}: "SAT GmbH & Co.", + [3]byte{0, 224, 169}: "FUNAI ELECTRIC CO., LTD.", + [3]byte{0, 224, 170}: "ELECTROSONIC LTD.", + [3]byte{0, 224, 171}: "DIMAT S.A.", + [3]byte{0, 224, 172}: "MIDSCO, INC.", + [3]byte{0, 224, 173}: "EES TECHNOLOGY, LTD.", + [3]byte{0, 224, 174}: "XAQTI CORPORATION", + [3]byte{0, 224, 175}: "GENERAL DYNAMICS INFORMATION SYSTEMS", + [3]byte{0, 224, 176}: "CISCO SYSTEMS, INC.", + [3]byte{0, 224, 177}: "Alcatel-Lucent, Enterprise Business Group", + [3]byte{0, 224, 178}: "TELMAX COMMUNICATIONS CORP.", + [3]byte{0, 224, 179}: "EtherWAN Systems, Inc.", + [3]byte{0, 224, 180}: "TECHNO SCOPE CO., LTD.", + [3]byte{0, 224, 181}: "ARDENT COMMUNICATIONS CORP.", + [3]byte{0, 224, 182}: "Entrada Networks", + [3]byte{0, 224, 183}: "PI GROUP, LTD.", + [3]byte{0, 224, 184}: "GATEWAY 2000", + [3]byte{0, 224, 185}: "BYAS SYSTEMS", + [3]byte{0, 224, 186}: "BERGHOF AUTOMATIONSTECHNIK GmbH", + [3]byte{0, 224, 187}: "NBX CORPORATION", + [3]byte{0, 224, 188}: "SYMON COMMUNICATIONS, INC.", + [3]byte{0, 224, 189}: "INTERFACE SYSTEMS, INC.", + [3]byte{0, 224, 190}: "GENROCO INTERNATIONAL, INC.", + [3]byte{0, 224, 191}: "TORRENT NETWORKING TECHNOLOGIES CORP.", + [3]byte{0, 224, 192}: "SEIWA ELECTRIC MFG. CO., LTD.", + [3]byte{0, 224, 193}: "MEMOREX TELEX JAPAN, LTD.", + [3]byte{0, 224, 194}: "NECSY S.p.A.", + [3]byte{0, 224, 195}: "SAKAI SYSTEM DEVELOPMENT CORP.", + [3]byte{0, 224, 196}: "HORNER ELECTRIC, INC.", + [3]byte{0, 224, 197}: "BCOM ELECTRONICS INC.", + [3]byte{0, 224, 198}: "LINK2IT, L.L.C.", + [3]byte{0, 224, 199}: "EUROTECH SRL", + [3]byte{0, 224, 200}: "VIRTUAL ACCESS, LTD.", + [3]byte{0, 224, 201}: "AutomatedLogic Corporation", + [3]byte{0, 224, 202}: "BEST DATA PRODUCTS", + [3]byte{0, 224, 203}: "RESON, INC.", + [3]byte{0, 224, 204}: "HERO SYSTEMS, LTD.", + [3]byte{0, 224, 205}: "SAAB SENSIS CORPORATION", + [3]byte{0, 224, 206}: "ARN", + [3]byte{0, 224, 207}: "INTEGRATED DEVICE TECHNOLOGY, INC.", + [3]byte{0, 224, 208}: "NETSPEED, INC.", + [3]byte{0, 224, 209}: "TELSIS LIMITED", + [3]byte{0, 224, 210}: "VERSANET COMMUNICATIONS, INC.", + [3]byte{0, 224, 211}: "DATENTECHNIK GmbH", + [3]byte{0, 224, 212}: "EXCELLENT COMPUTER", + [3]byte{0, 224, 213}: "Emulex Corporation", + [3]byte{0, 224, 214}: "COMPUTER & COMMUNICATION RESEARCH LAB.", + [3]byte{0, 224, 215}: "SUNSHINE ELECTRONICS, INC.", + [3]byte{0, 224, 216}: "LANBit Computer, Inc.", + [3]byte{0, 224, 217}: "TAZMO CO., LTD.", + [3]byte{0, 224, 218}: "Alcatel North America ESD", + [3]byte{0, 224, 219}: "ViaVideo Communications, Inc.", + [3]byte{0, 224, 220}: "NEXWARE CORP.", + [3]byte{0, 224, 221}: "ZENITH ELECTRONICS CORPORATION", + [3]byte{0, 224, 222}: "DATAX NV", + [3]byte{0, 224, 223}: "KEYMILE GmbH", + [3]byte{0, 224, 224}: "SI ELECTRONICS, LTD.", + [3]byte{0, 224, 225}: "G2 NETWORKS, INC.", + [3]byte{0, 224, 226}: "INNOVA CORP.", + [3]byte{0, 224, 227}: "SK-ELEKTRONIK GmbH", + [3]byte{0, 224, 228}: "FANUC ROBOTICS NORTH AMERICA, Inc.", + [3]byte{0, 224, 229}: "CINCO NETWORKS, INC.", + [3]byte{0, 224, 230}: "INCAA DATACOM B.V.", + [3]byte{0, 224, 231}: "RAYTHEON E-SYSTEMS, INC.", + [3]byte{0, 224, 232}: "GRETACODER Data Systems AG", + [3]byte{0, 224, 233}: "DATA LABS, INC.", + [3]byte{0, 224, 234}: "INNOVAT COMMUNICATIONS, INC.", + [3]byte{0, 224, 235}: "DIGICOM SYSTEMS, INCORPORATED", + [3]byte{0, 224, 236}: "CELESTICA INC.", + [3]byte{0, 224, 237}: "SILICOM, LTD.", + [3]byte{0, 224, 238}: "MAREL HF", + [3]byte{0, 224, 239}: "DIONEX", + [3]byte{0, 224, 240}: "ABLER TECHNOLOGY, INC.", + [3]byte{0, 224, 241}: "THAT CORPORATION", + [3]byte{0, 224, 242}: "ARLOTTO COMNET, INC.", + [3]byte{0, 224, 243}: "WebSprint Communications, Inc.", + [3]byte{0, 224, 244}: "INSIDE Technology A/S", + [3]byte{0, 224, 245}: "TELES AG", + [3]byte{0, 224, 246}: "DECISION EUROPE", + [3]byte{0, 224, 247}: "CISCO SYSTEMS, INC.", + [3]byte{0, 224, 248}: "DICNA CONTROL AB", + [3]byte{0, 224, 249}: "CISCO SYSTEMS, INC.", + [3]byte{0, 224, 250}: "TRL TECHNOLOGY, LTD.", + [3]byte{0, 224, 251}: "LEIGHTRONIX, INC.", + [3]byte{0, 224, 252}: "HUAWEI TECHNOLOGIES CO., LTD.", + [3]byte{0, 224, 253}: "A-TREND TECHNOLOGY CO., LTD.", + [3]byte{0, 224, 254}: "CISCO SYSTEMS, INC.", + [3]byte{0, 224, 255}: "SECURITY DYNAMICS TECHNOLOGIES, Inc.", + [3]byte{0, 225, 109}: "Cisco", + [3]byte{0, 225, 117}: "AK-Systems Ltd", + [3]byte{0, 227, 178}: "Samsung Electronics Co.,Ltd", + [3]byte{0, 230, 102}: "ARIMA Communications Corp.", + [3]byte{0, 230, 211}: "NIXDORF COMPUTER CORP.", + [3]byte{0, 230, 232}: "Netzin Technology Corporation,.Ltd.", + [3]byte{0, 232, 171}: "Meggitt Training Systems, Inc.", + [3]byte{0, 235, 45}: "Sony Mobile Communications AB", + [3]byte{0, 238, 189}: "HTC Corporation", + [3]byte{0, 240, 81}: "KWB Gmbh", + [3]byte{0, 243, 219}: "WOO Sports", + [3]byte{0, 244, 3}: "Orbis Systems Oy", + [3]byte{0, 244, 111}: "Samsung Elec Co.,Ltd", + [3]byte{0, 244, 185}: "Apple", + [3]byte{0, 247, 111}: "Apple", + [3]byte{0, 248, 96}: "PT. Panggung Electric Citrabuana", + [3]byte{0, 250, 59}: "CLOOS ELECTRONIC GMBH", + [3]byte{0, 252, 88}: "WebSilicon Ltd.", + [3]byte{0, 252, 112}: "Intrepid Control Systems, Inc.", + [3]byte{0, 253, 76}: "NEVATEC", + [3]byte{2, 7, 1}: "RACAL-DATACOM", + [3]byte{2, 28, 124}: "PERQ SYSTEMS CORPORATION", + [3]byte{2, 96, 134}: "LOGIC REPLACEMENT TECH. LTD.", + [3]byte{2, 96, 140}: "3COM CORPORATION", + [3]byte{2, 112, 1}: "RACAL-DATACOM", + [3]byte{2, 112, 176}: "M/A-COM INC. COMPANIES", + [3]byte{2, 112, 179}: "DATA RECALL LTD", + [3]byte{2, 157, 142}: "CARDIAC RECORDERS INC.", + [3]byte{2, 170, 60}: "OLIVETTI TELECOMM SPA (OLTECO)", + [3]byte{2, 187, 1}: "OCTOTHORPE CORP.", + [3]byte{2, 192, 140}: "3COM CORPORATION", + [3]byte{2, 207, 28}: "COMMUNICATION MACHINERY CORP.", + [3]byte{2, 230, 211}: "NIXDORF COMPUTER CORPORATION", + [3]byte{4, 10, 131}: "Alcatel-Lucent", + [3]byte{4, 10, 224}: "XMIT AG COMPUTER NETWORKS", + [3]byte{4, 12, 206}: "Apple", + [3]byte{4, 14, 194}: "ViewSonic Mobile China Limited", + [3]byte{4, 21, 82}: "Apple", + [3]byte{4, 24, 15}: "Samsung Electronics Co.,Ltd", + [3]byte{4, 24, 182}: "PRIVATE", + [3]byte{4, 24, 214}: "Ubiquiti Networks", + [3]byte{4, 26, 4}: "WaveIP", + [3]byte{4, 27, 148}: "Host Mobility AB", + [3]byte{4, 27, 186}: "Samsung Electronics Co.,Ltd", + [3]byte{4, 29, 16}: "Dream Ware Inc.", + [3]byte{4, 30, 100}: "Apple", + [3]byte{4, 32, 154}: "Panasonic AVC Networks Company", + [3]byte{4, 34, 52}: "Wireless Standard Extensions", + [3]byte{4, 38, 5}: "GFR Gesellschaft für Regelungstechnik und Energieeinsparung mbH", + [3]byte{4, 38, 101}: "Apple", + [3]byte{4, 43, 187}: "PicoCELA, Inc.", + [3]byte{4, 47, 86}: "ATOCS (Shenzhen) LTD", + [3]byte{4, 50, 244}: "Partron", + [3]byte{4, 54, 4}: "Gyeyoung I&T", + [3]byte{4, 61, 152}: "ChongQing QingJia Electronics CO.,LTD", + [3]byte{4, 68, 161}: "TELECON GALICIA,S.A.", + [3]byte{4, 70, 101}: "Murata Manufacturing Co., Ltd.", + [3]byte{4, 72, 154}: "Apple", + [3]byte{4, 74, 80}: "Ramaxel Technology (Shenzhen) limited company", + [3]byte{4, 75, 255}: "GuangZhou Hedy Digital Technology Co., Ltd", + [3]byte{4, 76, 239}: "Fujian Sanao Technology Co.,Ltd", + [3]byte{4, 78, 6}: "Ericsson AB", + [3]byte{4, 79, 139}: "Adapteva, Inc.", + [3]byte{4, 79, 170}: "Ruckus Wireless", + [3]byte{4, 84, 83}: "Apple", + [3]byte{4, 85, 202}: "BriView (Xiamen) Corp.", + [3]byte{4, 87, 47}: "Sertel Electronics UK Ltd", + [3]byte{4, 88, 111}: "Sichuan Whayer information industry Co.,LTD", + [3]byte{4, 90, 149}: "Nokia Corporation", + [3]byte{4, 92, 6}: "Zmodo Technology Corporation", + [3]byte{4, 92, 142}: "gosund GROUP CO.,LTD", + [3]byte{4, 93, 86}: "camtron industrial inc.", + [3]byte{4, 95, 167}: "Shenzhen Yichen Technology Development Co.,LTD", + [3]byte{4, 98, 215}: "ALSTOM HYDRO FRANCE", + [3]byte{4, 99, 224}: "Nome Oy", + [3]byte{4, 103, 133}: "scemtec Hard- und Software fuer Mess- und Steuerungstechnik GmbH", + [3]byte{4, 109, 66}: "Bryston Ltd.", + [3]byte{4, 110, 73}: "TaiYear Electronic Technology (Suzhou) Co., Ltd", + [3]byte{4, 112, 188}: "Globalstar Inc.", + [3]byte{4, 116, 161}: "Aligera Equipamentos Digitais Ltda", + [3]byte{4, 117, 245}: "CSST", + [3]byte{4, 118, 110}: "ALPS Co,. Ltd.", + [3]byte{4, 125, 123}: "Quanta Computer Inc.", + [3]byte{4, 129, 174}: "Clack Corporation", + [3]byte{4, 132, 138}: "7INOVA TECHNOLOGY LIMITED", + [3]byte{4, 136, 140}: "Eifelwerk Butler Systeme GmbH", + [3]byte{4, 136, 226}: "Beats Electronics LLC", + [3]byte{4, 138, 21}: "Avaya, Inc", + [3]byte{4, 139, 66}: "Skspruce Technology Limited", + [3]byte{4, 140, 3}: "ThinPAD Technology (Shenzhen)CO.,LTD", + [3]byte{4, 141, 56}: "Netcore Technology Inc.", + [3]byte{4, 148, 161}: "CATCH THE WIND INC", + [3]byte{4, 152, 243}: "ALPS Electric Co,. Ltd.", + [3]byte{4, 153, 230}: "Shenzhen Yoostar Technology Co., Ltd", + [3]byte{4, 155, 156}: "Eadingcore Intelligent Technology Co., Ltd.", + [3]byte{4, 156, 98}: "BMT Medical Technology s.r.o.", + [3]byte{4, 159, 6}: "Smobile Co., Ltd.", + [3]byte{4, 159, 129}: "Netscout Systems, Inc.", + [3]byte{4, 161, 81}: "NETGEAR INC.,", + [3]byte{4, 163, 243}: "Emicon", + [3]byte{4, 168, 42}: "Nokia Corporation", + [3]byte{4, 179, 182}: "Seamap (UK) Ltd", + [3]byte{4, 180, 102}: "BSP Co., Ltd.", + [3]byte{4, 189, 112}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{4, 191, 168}: "ISB Corporation", + [3]byte{4, 192, 91}: "Tigo Energy", + [3]byte{4, 192, 111}: "Shenzhen Huawei Communication Technologies Co., Ltd", + [3]byte{4, 192, 156}: "Tellabs Inc.", + [3]byte{4, 193, 185}: "Fiberhome Telecommunication Tech.Co.,Ltd.", + [3]byte{4, 197, 164}: "CISCO SYSTEMS, INC.", + [3]byte{4, 200, 128}: "Samtec Inc", + [3]byte{4, 201, 145}: "Phistek INC.", + [3]byte{4, 203, 29}: "Traka plc", + [3]byte{4, 206, 20}: "Wilocity LTD.", + [3]byte{4, 207, 37}: "MANYCOLORS, INC.", + [3]byte{4, 212, 55}: "ZNV", + [3]byte{4, 215, 131}: "Y&H E&C Co.,LTD.", + [3]byte{4, 218, 210}: "Cisco", + [3]byte{4, 219, 86}: "Apple, Inc.", + [3]byte{4, 219, 138}: "Suntech International Ltd.", + [3]byte{4, 221, 76}: "Velocytech", + [3]byte{4, 222, 219}: "Rockport Networks Inc", + [3]byte{4, 223, 105}: "Car Connectivity Consortium", + [3]byte{4, 224, 196}: "TRIUMPH-ADLER AG", + [3]byte{4, 225, 200}: "IMS Soluções em Energia Ltda.", + [3]byte{4, 226, 248}: "AEP Ticketing solutions srl", + [3]byte{4, 228, 81}: "Texas Instruments", + [3]byte{4, 229, 54}: "Apple", + [3]byte{4, 229, 72}: "Cohda Wireless Pty Ltd", + [3]byte{4, 230, 98}: "Acroname Inc.", + [3]byte{4, 230, 118}: "AMPAK Technology Inc.", + [3]byte{4, 233, 229}: "PJRC.COM, LLC", + [3]byte{4, 238, 145}: "x-fabric GmbH", + [3]byte{4, 240, 33}: "Compex Systems Pte Ltd", + [3]byte{4, 241, 62}: "Apple", + [3]byte{4, 241, 125}: "Tarana Wireless", + [3]byte{4, 244, 188}: "Xena Networks", + [3]byte{4, 247, 228}: "Apple", + [3]byte{4, 248, 194}: "Flaircomm Microelectronics, Inc.", + [3]byte{4, 249, 56}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{4, 254, 49}: "Samsung Electronics Co.,Ltd", + [3]byte{4, 254, 127}: "CISCO SYSTEMS, INC.", + [3]byte{4, 255, 81}: "NOVAMEDIA INNOVISION SP. Z O.O.", + [3]byte{8, 0, 1}: "COMPUTERVISION CORPORATION", + [3]byte{8, 0, 2}: "BRIDGE COMMUNICATIONS INC.", + [3]byte{8, 0, 3}: "ADVANCED COMPUTER COMM.", + [3]byte{8, 0, 4}: "CROMEMCO INCORPORATED", + [3]byte{8, 0, 5}: "SYMBOLICS INC.", + [3]byte{8, 0, 6}: "SIEMENS AG", + [3]byte{8, 0, 7}: "Apple", + [3]byte{8, 0, 8}: "BOLT BERANEK AND NEWMAN INC.", + [3]byte{8, 0, 9}: "HEWLETT PACKARD", + [3]byte{8, 0, 10}: "NESTAR SYSTEMS INCORPORATED", + [3]byte{8, 0, 11}: "UNISYS CORPORATION", + [3]byte{8, 0, 12}: "MIKLYN DEVELOPMENT CO.", + [3]byte{8, 0, 13}: "INTERNATIONAL COMPUTERS LTD.", + [3]byte{8, 0, 14}: "NCR CORPORATION", + [3]byte{8, 0, 15}: "MITEL CORPORATION", + [3]byte{8, 0, 17}: "TEKTRONIX INC.", + [3]byte{8, 0, 18}: "BELL ATLANTIC INTEGRATED SYST.", + [3]byte{8, 0, 19}: "EXXON", + [3]byte{8, 0, 20}: "EXCELAN", + [3]byte{8, 0, 21}: "STC BUSINESS SYSTEMS", + [3]byte{8, 0, 22}: "BARRISTER INFO SYS CORP", + [3]byte{8, 0, 23}: "NATIONAL SEMICONDUCTOR", + [3]byte{8, 0, 24}: "PIRELLI FOCOM NETWORKS", + [3]byte{8, 0, 25}: "GENERAL ELECTRIC CORPORATION", + [3]byte{8, 0, 26}: "TIARA/ 10NET", + [3]byte{8, 0, 27}: "EMC Corporation", + [3]byte{8, 0, 28}: "KDD-KOKUSAI DEBNSIN DENWA CO.", + [3]byte{8, 0, 29}: "ABLE COMMUNICATIONS INC.", + [3]byte{8, 0, 30}: "APOLLO COMPUTER INC.", + [3]byte{8, 0, 31}: "SHARP CORPORATION", + [3]byte{8, 0, 32}: "Oracle Corporation", + [3]byte{8, 0, 33}: "3M COMPANY", + [3]byte{8, 0, 34}: "NBI INC.", + [3]byte{8, 0, 35}: "Panasonic Communications Co., Ltd.", + [3]byte{8, 0, 36}: "10NET COMMUNICATIONS/DCA", + [3]byte{8, 0, 37}: "CONTROL DATA", + [3]byte{8, 0, 38}: "NORSK DATA A.S.", + [3]byte{8, 0, 39}: "CADMUS COMPUTER SYSTEMS", + [3]byte{8, 0, 40}: "Texas Instruments", + [3]byte{8, 0, 41}: "MEGATEK CORPORATION", + [3]byte{8, 0, 42}: "MOSAIC TECHNOLOGIES INC.", + [3]byte{8, 0, 43}: "DIGITAL EQUIPMENT CORPORATION", + [3]byte{8, 0, 44}: "BRITTON LEE INC.", + [3]byte{8, 0, 45}: "LAN-TEC INC.", + [3]byte{8, 0, 46}: "METAPHOR COMPUTER SYSTEMS", + [3]byte{8, 0, 47}: "PRIME COMPUTER INC.", + [3]byte{8, 0, 48}: "NETWORK RESEARCH CORPORATION", + [3]byte{8, 0, 48}: "CERN", + [3]byte{8, 0, 48}: "ROYAL MELBOURNE INST OF TECH", + [3]byte{8, 0, 49}: "LITTLE MACHINES INC.", + [3]byte{8, 0, 50}: "TIGAN INCORPORATED", + [3]byte{8, 0, 51}: "BAUSCH & LOMB", + [3]byte{8, 0, 52}: "FILENET CORPORATION", + [3]byte{8, 0, 53}: "MICROFIVE CORPORATION", + [3]byte{8, 0, 54}: "INTERGRAPH CORPORATION", + [3]byte{8, 0, 55}: "FUJI-XEROX CO. LTD.", + [3]byte{8, 0, 56}: "BULL S.A.S.", + [3]byte{8, 0, 57}: "SPIDER SYSTEMS LIMITED", + [3]byte{8, 0, 58}: "ORCATECH INC.", + [3]byte{8, 0, 59}: "TORUS SYSTEMS LIMITED", + [3]byte{8, 0, 60}: "SCHLUMBERGER WELL SERVICES", + [3]byte{8, 0, 61}: "CADNETIX CORPORATIONS", + [3]byte{8, 0, 62}: "CODEX CORPORATION", + [3]byte{8, 0, 63}: "FRED KOSCHARA ENTERPRISES", + [3]byte{8, 0, 64}: "FERRANTI COMPUTER SYS. LIMITED", + [3]byte{8, 0, 65}: "RACAL-MILGO INFORMATION SYS..", + [3]byte{8, 0, 66}: "JAPAN MACNICS CORP.", + [3]byte{8, 0, 67}: "PIXEL COMPUTER INC.", + [3]byte{8, 0, 68}: "DAVID SYSTEMS INC.", + [3]byte{8, 0, 69}: "CONCURRENT COMPUTER CORP.", + [3]byte{8, 0, 70}: "Sony Corporation", + [3]byte{8, 0, 71}: "SEQUENT COMPUTER SYSTEMS INC.", + [3]byte{8, 0, 72}: "EUROTHERM GAUGING SYSTEMS", + [3]byte{8, 0, 73}: "UNIVATION", + [3]byte{8, 0, 74}: "BANYAN SYSTEMS INC.", + [3]byte{8, 0, 75}: "PLANNING RESEARCH CORP.", + [3]byte{8, 0, 76}: "HYDRA COMPUTER SYSTEMS INC.", + [3]byte{8, 0, 77}: "CORVUS SYSTEMS INC.", + [3]byte{8, 0, 78}: "3COM EUROPE LTD.", + [3]byte{8, 0, 79}: "CYGNET SYSTEMS", + [3]byte{8, 0, 80}: "DAISY SYSTEMS CORP.", + [3]byte{8, 0, 81}: "EXPERDATA", + [3]byte{8, 0, 82}: "INSYSTEC", + [3]byte{8, 0, 83}: "MIDDLE EAST TECH. UNIVERSITY", + [3]byte{8, 0, 85}: "STANFORD TELECOMM. INC.", + [3]byte{8, 0, 86}: "STANFORD LINEAR ACCEL. CENTER", + [3]byte{8, 0, 87}: "EVANS & SUTHERLAND", + [3]byte{8, 0, 88}: "SYSTEMS CONCEPTS", + [3]byte{8, 0, 89}: "A/S MYCRON", + [3]byte{8, 0, 90}: "IBM Corp", + [3]byte{8, 0, 91}: "VTA TECHNOLOGIES INC.", + [3]byte{8, 0, 92}: "FOUR PHASE SYSTEMS", + [3]byte{8, 0, 93}: "GOULD INC.", + [3]byte{8, 0, 94}: "COUNTERPOINT COMPUTER INC.", + [3]byte{8, 0, 95}: "SABER TECHNOLOGY CORP.", + [3]byte{8, 0, 96}: "INDUSTRIAL NETWORKING INC.", + [3]byte{8, 0, 97}: "JAROGATE LTD.", + [3]byte{8, 0, 98}: "GENERAL DYNAMICS", + [3]byte{8, 0, 99}: "PLESSEY", + [3]byte{8, 0, 100}: "Sitasys AG", + [3]byte{8, 0, 101}: "GENRAD INC.", + [3]byte{8, 0, 102}: "AGFA CORPORATION", + [3]byte{8, 0, 103}: "COMDESIGN", + [3]byte{8, 0, 104}: "RIDGE COMPUTERS", + [3]byte{8, 0, 105}: "SILICON GRAPHICS INC.", + [3]byte{8, 0, 106}: "ATT BELL LABORATORIES", + [3]byte{8, 0, 107}: "ACCEL TECHNOLOGIES INC.", + [3]byte{8, 0, 108}: "SUNTEK TECHNOLOGY INT'L", + [3]byte{8, 0, 109}: "WHITECHAPEL COMPUTER WORKS", + [3]byte{8, 0, 110}: "MASSCOMP", + [3]byte{8, 0, 111}: "PHILIPS APELDOORN B.V.", + [3]byte{8, 0, 112}: "MITSUBISHI ELECTRIC CORP.", + [3]byte{8, 0, 113}: "MATRA (DSIE)", + [3]byte{8, 0, 114}: "XEROX CORP UNIV GRANT PROGRAM", + [3]byte{8, 0, 115}: "TECMAR INC.", + [3]byte{8, 0, 116}: "CASIO COMPUTER CO. LTD.", + [3]byte{8, 0, 117}: "DANSK DATA ELECTRONIK", + [3]byte{8, 0, 118}: "PC LAN TECHNOLOGIES", + [3]byte{8, 0, 119}: "TSL COMMUNICATIONS LTD.", + [3]byte{8, 0, 120}: "ACCELL CORPORATION", + [3]byte{8, 0, 121}: "THE DROID WORKS", + [3]byte{8, 0, 122}: "INDATA", + [3]byte{8, 0, 123}: "SANYO ELECTRIC CO. LTD.", + [3]byte{8, 0, 124}: "VITALINK COMMUNICATIONS CORP.", + [3]byte{8, 0, 126}: "AMALGAMATED WIRELESS(AUS) LTD", + [3]byte{8, 0, 127}: "CARNEGIE-MELLON UNIVERSITY", + [3]byte{8, 0, 128}: "AES DATA INC.", + [3]byte{8, 0, 129}: "ASTECH INC.", + [3]byte{8, 0, 130}: "VERITAS SOFTWARE", + [3]byte{8, 0, 131}: "Seiko Instruments Inc.", + [3]byte{8, 0, 132}: "TOMEN ELECTRONICS CORP.", + [3]byte{8, 0, 133}: "ELXSI", + [3]byte{8, 0, 134}: "KONICA MINOLTA HOLDINGS, INC.", + [3]byte{8, 0, 135}: "XYPLEX", + [3]byte{8, 0, 136}: "Brocade Communications Systems, Inc.", + [3]byte{8, 0, 137}: "KINETICS", + [3]byte{8, 0, 138}: "PerfTech, Inc.", + [3]byte{8, 0, 139}: "PYRAMID TECHNOLOGY CORP.", + [3]byte{8, 0, 140}: "NETWORK RESEARCH CORPORATION", + [3]byte{8, 0, 141}: "XYVISION INC.", + [3]byte{8, 0, 142}: "TANDEM COMPUTERS", + [3]byte{8, 0, 143}: "CHIPCOM CORPORATION", + [3]byte{8, 0, 144}: "SONOMA SYSTEMS", + [3]byte{8, 3, 113}: "KRG CORPORATE", + [3]byte{8, 5, 205}: "DongGuang EnMai Electronic Product Co.Ltd.", + [3]byte{8, 8, 194}: "Samsung Electronics", + [3]byte{8, 8, 234}: "AMSC", + [3]byte{8, 9, 182}: "Masimo Corp", + [3]byte{8, 12, 11}: "SysMik GmbH Dresden", + [3]byte{8, 12, 201}: "Mission Technology Group, dba Magma", + [3]byte{8, 13, 132}: "GECO, Inc.", + [3]byte{8, 14, 168}: "Velex s.r.l.", + [3]byte{8, 15, 250}: "KSP INC.", + [3]byte{8, 17, 94}: "Bitel Co., Ltd.", + [3]byte{8, 17, 150}: "Intel Corporate", + [3]byte{8, 20, 67}: "UNIBRAIN S.A.", + [3]byte{8, 22, 81}: "Shenzhen Sea Star Technology Co.,Ltd", + [3]byte{8, 23, 53}: "CISCO SYSTEMS, INC.", + [3]byte{8, 23, 244}: "IBM Corp", + [3]byte{8, 24, 26}: "zte corporation", + [3]byte{8, 24, 76}: "A. S. Thomas, Inc.", + [3]byte{8, 25, 166}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{8, 29, 251}: "Shanghai Mexon Communication Technology Co.,Ltd", + [3]byte{8, 31, 63}: "WondaLink Inc.", + [3]byte{8, 31, 243}: "CISCO SYSTEMS, INC.", + [3]byte{8, 37, 34}: "ADVANSEE", + [3]byte{8, 39, 25}: "APS systems/electronic AG", + [3]byte{8, 42, 208}: "SRD Innovations Inc.", + [3]byte{8, 46, 95}: "Hewlett Packard", + [3]byte{8, 53, 113}: "CASwell INC.", + [3]byte{8, 55, 61}: "Samsung Electronics Co.,Ltd", + [3]byte{8, 55, 156}: "Topaz Co. LTD.", + [3]byte{8, 56, 165}: "Funkwerk plettac electronic GmbH", + [3]byte{8, 58, 184}: "Shinoda Plasma Co., Ltd.", + [3]byte{8, 61, 136}: "Samsung Electronics Co.,Ltd", + [3]byte{8, 62, 12}: "ARRIS Group, Inc.", + [3]byte{8, 62, 142}: "Hon Hai Precision Ind.Co.Ltd", + [3]byte{8, 63, 62}: "WSH GmbH", + [3]byte{8, 63, 118}: "Intellian Technologies, Inc.", + [3]byte{8, 64, 39}: "Gridstore Inc.", + [3]byte{8, 70, 86}: "VODALYS Ingénierie", + [3]byte{8, 72, 44}: "Raycore Taiwan Co., LTD.", + [3]byte{8, 78, 28}: "H2A Systems, LLC", + [3]byte{8, 78, 191}: "Broad Net Mux Corporation", + [3]byte{8, 81, 46}: "Orion Diagnostica Oy", + [3]byte{8, 82, 64}: "EbV Elektronikbau- und Vertriebs GmbH", + [3]byte{8, 87, 0}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{8, 90, 224}: "Recovision Technology Co., Ltd.", + [3]byte{8, 91, 14}: "Fortinet, Inc.", + [3]byte{8, 93, 221}: "Mercury Corporation", + [3]byte{8, 96, 110}: "ASUSTek COMPUTER INC.", + [3]byte{8, 99, 97}: "Huawei Technologies Co., Ltd", + [3]byte{8, 104, 208}: "Japan System Design", + [3]byte{8, 104, 234}: "EITO ELECTRONICS CO., LTD.", + [3]byte{8, 109, 242}: "Shenzhen MIMOWAVE Technology Co.,Ltd", + [3]byte{8, 112, 69}: "Apple", + [3]byte{8, 116, 246}: "Winterhalter Gastronom GmbH", + [3]byte{8, 117, 114}: "Obelux Oy", + [3]byte{8, 118, 24}: "ViE Technologies Sdn. Bhd.", + [3]byte{8, 118, 149}: "Auto Industrial Co., Ltd.", + [3]byte{8, 118, 255}: "Thomson Telecom Belgium", + [3]byte{8, 121, 153}: "AIM GmbH", + [3]byte{8, 122, 76}: "Huawei Technologies Co., Ltd", + [3]byte{8, 123, 170}: "SVYAZKOMPLEKTSERVICE, LLC", + [3]byte{8, 124, 190}: "Quintic Corp.", + [3]byte{8, 125, 33}: "Altasec technology corporation", + [3]byte{8, 128, 57}: "Cisco SPVTG", + [3]byte{8, 129, 188}: "HongKong Ipro Technology Co., Limited", + [3]byte{8, 129, 244}: "Juniper Networks", + [3]byte{8, 134, 59}: "Belkin International, Inc.", + [3]byte{8, 141, 200}: "Ryowa Electronics Co.,Ltd", + [3]byte{8, 142, 79}: "SF Software Solutions", + [3]byte{8, 143, 44}: "Hills Sound Vision & Lighting", + [3]byte{8, 150, 215}: "AVM GmbH", + [3]byte{8, 151, 88}: "Shenzhen Strong Rising Electronics Co.,Ltd DongGuan Subsidiary", + [3]byte{8, 158, 1}: "QUANTA COMPUTER INC.", + [3]byte{8, 159, 151}: "LEROY AUTOMATION", + [3]byte{8, 161, 43}: "ShenZhen EZL Technology Co., Ltd", + [3]byte{8, 165, 200}: "Sunnovo International Limited", + [3]byte{8, 169, 90}: "Azurewave", + [3]byte{8, 172, 165}: "Benu Video, Inc.", + [3]byte{8, 175, 120}: "Totus Solutions, Inc.", + [3]byte{8, 178, 163}: "Cynny Italia S.r.L.", + [3]byte{8, 180, 207}: "Abicom International", + [3]byte{8, 183, 56}: "Lite-On Technogy Corp.", + [3]byte{8, 183, 236}: "Wireless Seismic", + [3]byte{8, 187, 204}: "AK-NORD EDV VERTRIEBSGES. mbH", + [3]byte{8, 189, 67}: "NETGEAR INC.,", + [3]byte{8, 190, 9}: "Astrol Electronic AG", + [3]byte{8, 202, 69}: "Toyou Feiji Electronics Co., Ltd.", + [3]byte{8, 204, 104}: "Cisco", + [3]byte{8, 205, 155}: "samtec automotive electronics & software GmbH", + [3]byte{8, 208, 159}: "CISCO SYSTEMS, INC.", + [3]byte{8, 210, 154}: "Proformatique", + [3]byte{8, 212, 12}: "Intel Corporate", + [3]byte{8, 212, 43}: "Samsung Electronics", + [3]byte{8, 213, 192}: "Seers Technology Co., Ltd", + [3]byte{8, 216, 51}: "Shenzhen RF Technology Co,.Ltd", + [3]byte{8, 223, 31}: "Bose Corporation", + [3]byte{8, 229, 218}: "NANJING FUJITSU COMPUTER PRODUCTS CO.,LTD.", + [3]byte{8, 230, 114}: "JEBSEE ELECTRONICS CO.,LTD.", + [3]byte{8, 232, 79}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{8, 234, 68}: "Aerohive Networks, Inc.", + [3]byte{8, 235, 41}: "Jiangsu Huitong Group Co.,Ltd.", + [3]byte{8, 235, 116}: "Humax", + [3]byte{8, 235, 237}: "World Elite Technology Co.,LTD", + [3]byte{8, 237, 185}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{8, 238, 139}: "Samsung Elec Co.,Ltd", + [3]byte{8, 239, 59}: "MCS Logic Inc.", + [3]byte{8, 239, 171}: "SAYME WIRELESS SENSOR NETWORK", + [3]byte{8, 241, 183}: "Towerstream Corpration", + [3]byte{8, 242, 244}: "Net One Partners Co.,Ltd.", + [3]byte{8, 246, 248}: "GET Engineering", + [3]byte{8, 247, 40}: "GLOBO Multimedia Sp. z o.o. Sp.k.", + [3]byte{8, 250, 224}: "Fohhn Audio AG", + [3]byte{8, 252, 82}: "OpenXS BV", + [3]byte{8, 252, 136}: "Samsung Electronics Co.,Ltd", + [3]byte{8, 253, 14}: "Samsung Electronics Co.,Ltd", + [3]byte{12, 4, 0}: "Jantar d.o.o.", + [3]byte{12, 5, 53}: "Juniper Systems", + [3]byte{12, 17, 5}: "Ringslink (Xiamen) Network Communication Technologies Co., Ltd", + [3]byte{12, 18, 98}: "zte corporation", + [3]byte{12, 19, 11}: "Uniqoteq Ltd.", + [3]byte{12, 20, 32}: "Samsung Electronics Co.,Ltd", + [3]byte{12, 21, 197}: "SDTEC Co., Ltd.", + [3]byte{12, 23, 241}: "TELECSYS", + [3]byte{12, 25, 31}: "Inform Electronik", + [3]byte{12, 29, 175}: "Beijing Xiaomi communications co.,ltd", + [3]byte{12, 29, 194}: "SeAH Networks", + [3]byte{12, 32, 38}: "noax Technologies AG", + [3]byte{12, 39, 36}: "Cisco", + [3]byte{12, 39, 85}: "Valuable Techologies Limited", + [3]byte{12, 42, 105}: "electric imp, incorporated", + [3]byte{12, 42, 231}: "Beijing General Research Institute of Mining and Metallurgy", + [3]byte{12, 45, 137}: "QiiQ Communications Inc.", + [3]byte{12, 48, 33}: "Apple", + [3]byte{12, 55, 220}: "Huawei Technologies Co., Ltd", + [3]byte{12, 56, 62}: "Fanvil Technology Co., Ltd.", + [3]byte{12, 57, 86}: "Observator instruments", + [3]byte{12, 60, 101}: "Dome Imaging Inc", + [3]byte{12, 62, 159}: "Apple, Inc", + [3]byte{12, 70, 157}: "MS Sedco", + [3]byte{12, 71, 61}: "Hitron Technologies. Inc", + [3]byte{12, 76, 57}: "Mitrastar Technology", + [3]byte{12, 77, 233}: "Apple", + [3]byte{12, 79, 90}: "ASA-RT s.r.l.", + [3]byte{12, 81, 247}: "CHAUVIN ARNOUX", + [3]byte{12, 84, 165}: "PEGATRON CORPORATION", + [3]byte{12, 85, 33}: "Axiros GmbH", + [3]byte{12, 86, 92}: "HyBroad Vision (Hong Kong) Technology Co Ltd", + [3]byte{12, 87, 235}: "Mueller Systems", + [3]byte{12, 90, 25}: "Axtion Sdn Bhd", + [3]byte{12, 92, 216}: "DOLI Elektronik GmbH", + [3]byte{12, 96, 118}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{12, 99, 252}: "Nanjing Signway Technology Co., Ltd", + [3]byte{12, 104, 3}: "Cisco", + [3]byte{12, 110, 79}: "PrimeVOLT Co., Ltd.", + [3]byte{12, 113, 93}: "Samsung Electronics Co.,Ltd", + [3]byte{12, 114, 44}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{12, 116, 194}: "Apple", + [3]byte{12, 117, 35}: "BEIJING GEHUA CATV NETWORK CO.,LTD", + [3]byte{12, 119, 26}: "Apple", + [3]byte{12, 125, 124}: "Kexiang Information Technology Co, Ltd.", + [3]byte{12, 129, 18}: "PRIVATE", + [3]byte{12, 130, 48}: "SHENZHEN MAGNUS TECHNOLOGIES CO.,LTD", + [3]byte{12, 130, 104}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{12, 130, 106}: "Wuhan Huagong Genuine Optics Technology Co., Ltd", + [3]byte{12, 132, 17}: "A.O. Smith Water Products", + [3]byte{12, 132, 132}: "Zenovia Electronics Inc.", + [3]byte{12, 132, 220}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{12, 133, 37}: "CISCO SYSTEMS, INC.", + [3]byte{12, 137, 16}: "Samsung Electronics Co.,LTD", + [3]byte{12, 139, 253}: "Intel Corporate", + [3]byte{12, 140, 143}: "Kamo Technology Limited", + [3]byte{12, 140, 220}: "Suunto Oy", + [3]byte{12, 141, 152}: "TOP EIGHT IND CORP", + [3]byte{12, 146, 78}: "Rice Lake Weighing Systems", + [3]byte{12, 147, 1}: "PT. Prasimax Inovasi Teknologi", + [3]byte{12, 147, 251}: "BNS Solutions", + [3]byte{12, 150, 191}: "Huawei Technologies Co., Ltd", + [3]byte{12, 155, 19}: "Shanghai Magic Mobile Telecommunication Co.Ltd.", + [3]byte{12, 157, 86}: "Consort Controls Ltd", + [3]byte{12, 158, 145}: "Sankosha Corporation", + [3]byte{12, 161, 56}: "Blinq Wireless Inc.", + [3]byte{12, 162, 244}: "Chameleon Technology (UK) Limited", + [3]byte{12, 164, 2}: "Alcatel Lucent IPD", + [3]byte{12, 164, 42}: "OB Telecom Electronic Technology Co., Ltd", + [3]byte{12, 166, 148}: "Sunitec Enterprise Co.,Ltd", + [3]byte{12, 172, 5}: "Unitend Technologies Inc.", + [3]byte{12, 175, 90}: "GENUS POWER INFRASTRUCTURES LIMITED", + [3]byte{12, 179, 25}: "Samsung Elec Co.,Ltd", + [3]byte{12, 180, 239}: "Digience Co.,Ltd.", + [3]byte{12, 189, 81}: "TCT Mobile Limited", + [3]byte{12, 191, 21}: "Genetec", + [3]byte{12, 192, 192}: "MAGNETI MARELLI SISTEMAS ELECTRONICOS MEXICO", + [3]byte{12, 195, 167}: "Meritec", + [3]byte{12, 196, 122}: "Super Micro Computer, Inc.", + [3]byte{12, 196, 126}: "EUCAST Co., Ltd.", + [3]byte{12, 198, 85}: "Wuxi YSTen Technology Co.,Ltd.", + [3]byte{12, 198, 106}: "Nokia Corporation", + [3]byte{12, 198, 172}: "DAGS", + [3]byte{12, 200, 31}: "Summer Infant, Inc.", + [3]byte{12, 201, 198}: "Samwin Hong Kong Limited", + [3]byte{12, 203, 141}: "ASCO Numatics GmbH", + [3]byte{12, 205, 211}: "EASTRIVER TECHNOLOGY CO., LTD.", + [3]byte{12, 205, 251}: "EDIC Systems Inc.", + [3]byte{12, 207, 209}: "SPRINGWAVE Co., Ltd", + [3]byte{12, 210, 146}: "Intel Corporate", + [3]byte{12, 210, 181}: "Binatone Telecommunication Pvt. Ltd", + [3]byte{12, 213, 2}: "Westell", + [3]byte{12, 214, 150}: "Amimon Ltd", + [3]byte{12, 215, 194}: "Axium Technologies, Inc.", + [3]byte{12, 217, 150}: "CISCO SYSTEMS, INC.", + [3]byte{12, 217, 193}: "Visteon Corporation", + [3]byte{12, 218, 65}: "Hangzhou H3C Technologies Co., Limited", + [3]byte{12, 220, 204}: "Inala Technologies", + [3]byte{12, 221, 239}: "Nokia Corporation", + [3]byte{12, 223, 164}: "Samsung Electronics Co.,Ltd", + [3]byte{12, 224, 228}: "Plantronics, Inc", + [3]byte{12, 229, 211}: "DH electronics GmbH", + [3]byte{12, 231, 9}: "Fox Crypto B.V.", + [3]byte{12, 232, 47}: "Bonfiglioli Vectron GmbH", + [3]byte{12, 233, 54}: "ELIMOS srl", + [3]byte{12, 238, 230}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{12, 239, 124}: "AnaCom Inc", + [3]byte{12, 240, 25}: "Malgn Technology Co., Ltd.", + [3]byte{12, 240, 180}: "Globalsat International Technology Ltd", + [3]byte{12, 243, 97}: "Java Information", + [3]byte{12, 243, 238}: "EM Microelectronic", + [3]byte{12, 244, 5}: "Beijing Signalway Technologies Co.,Ltd", + [3]byte{12, 248, 147}: "ARRIS Group, Inc.", + [3]byte{12, 252, 131}: "Airoha Technology Corp.,", + [3]byte{16, 0, 0}: "PRIVATE", + [3]byte{16, 0, 90}: "IBM Corp", + [3]byte{16, 0, 232}: "NATIONAL SEMICONDUCTOR", + [3]byte{16, 0, 253}: "LaonPeople", + [3]byte{16, 1, 202}: "Ashley Butterworth", + [3]byte{16, 5, 202}: "Cisco", + [3]byte{16, 7, 35}: "IEEE REGISTRATION AUTHORITY - Please see MAM public listing for more information.", + [3]byte{16, 8, 177}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{16, 9, 12}: "Janome Sewing Machine Co., Ltd.", + [3]byte{16, 11, 169}: "Intel Corporate", + [3]byte{16, 12, 36}: "pomdevices, LLC", + [3]byte{16, 13, 47}: "Online Security Pty. Ltd.", + [3]byte{16, 13, 50}: "Embedian, Inc.", + [3]byte{16, 13, 127}: "NETGEAR INC.,", + [3]byte{16, 14, 43}: "NEC CASIO Mobile Communications", + [3]byte{16, 14, 126}: "Juniper networks", + [3]byte{16, 15, 24}: "Fu Gang Electronic(KunShan)CO.,LTD", + [3]byte{16, 16, 182}: "McCain Inc", + [3]byte{16, 18, 18}: "Vivo International Corporation Pty Ltd", + [3]byte{16, 18, 24}: "Korins Inc.", + [3]byte{16, 18, 72}: "ITG, Inc.", + [3]byte{16, 19, 238}: "Justec International Technology INC.", + [3]byte{16, 24, 158}: "Elmo Motion Control", + [3]byte{16, 27, 84}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{16, 28, 12}: "Apple", + [3]byte{16, 29, 81}: "ON-Q LLC dba ON-Q Mesh Networks", + [3]byte{16, 29, 192}: "Samsung Electronics Co.,Ltd", + [3]byte{16, 31, 116}: "Hewlett-Packard Company", + [3]byte{16, 34, 121}: "ZeroDesktop, Inc.", + [3]byte{16, 39, 190}: "TVIP", + [3]byte{16, 40, 49}: "Morion Inc.", + [3]byte{16, 45, 150}: "Looxcie Inc.", + [3]byte{16, 46, 175}: "Texas Instruments", + [3]byte{16, 47, 107}: "Microsoft Corporation", + [3]byte{16, 48, 71}: "Samsung Electronics Co.,Ltd", + [3]byte{16, 51, 120}: "FLECTRON Co., LTD", + [3]byte{16, 55, 17}: "Simlink AS", + [3]byte{16, 59, 89}: "Samsung Electronics Co.,Ltd", + [3]byte{16, 61, 234}: "HFC Technology (Beijing) Ltd. Co.", + [3]byte{16, 64, 243}: "Apple", + [3]byte{16, 67, 105}: "Soundmax Electronic Limited", + [3]byte{16, 68, 90}: "Shaanxi Hitech Electronic Co., LTD", + [3]byte{16, 69, 190}: "Norphonic AS", + [3]byte{16, 69, 248}: "LNT-Automation GmbH", + [3]byte{16, 71, 128}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{16, 72, 177}: "Beijing Duokan Technology Limited", + [3]byte{16, 75, 70}: "Mitsubishi Electric Corporation", + [3]byte{16, 77, 119}: "Innovative Computer Engineering", + [3]byte{16, 78, 7}: "Shanghai Genvision Industries Co.,Ltd", + [3]byte{16, 81, 114}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{16, 86, 202}: "Peplink International Ltd.", + [3]byte{16, 92, 59}: "Perma-Pipe, Inc.", + [3]byte{16, 92, 191}: "DuroByte Inc", + [3]byte{16, 95, 6}: "Actiontec Electronics, Inc", + [3]byte{16, 95, 73}: "Cisco SPVTG", + [3]byte{16, 96, 75}: "Hewlett Packard", + [3]byte{16, 98, 201}: "Adatis GmbH & Co. KG", + [3]byte{16, 100, 226}: "ADFweb.com s.r.l.", + [3]byte{16, 101, 163}: "Core Brands LLC", + [3]byte{16, 101, 207}: "IQSIM", + [3]byte{16, 102, 130}: "NEC Platforms, Ltd.", + [3]byte{16, 104, 63}: "LG Electronics", + [3]byte{16, 111, 63}: "Buffalo Inc.", + [3]byte{16, 111, 239}: "Ad-Sol Nissin Corp", + [3]byte{16, 113, 249}: "Cloud Telecomputers, LLC", + [3]byte{16, 118, 138}: "EoCell", + [3]byte{16, 119, 177}: "Samsung Electronics Co.,LTD", + [3]byte{16, 120, 206}: "Hanvit SI, Inc.", + [3]byte{16, 120, 210}: "ELITEGROUP COMPUTER SYSTEM CO., LTD.", + [3]byte{16, 122, 134}: "U&U ENGINEERING INC.", + [3]byte{16, 123, 239}: "ZyXEL Communications Corp", + [3]byte{16, 131, 210}: "Microseven Systems, LLC", + [3]byte{16, 136, 15}: "Daruma Telecomunicações e Informática S.A.", + [3]byte{16, 136, 206}: "Fiberhome Telecommunication Tech.Co.,Ltd.", + [3]byte{16, 138, 27}: "RAONIX Inc.", + [3]byte{16, 140, 207}: "CISCO SYSTEMS, INC.", + [3]byte{16, 146, 102}: "Samsung Electronics Co.,Ltd", + [3]byte{16, 147, 233}: "Apple", + [3]byte{16, 154, 185}: "Tosibox Oy", + [3]byte{16, 154, 221}: "Apple", + [3]byte{16, 159, 169}: "Actiontec Electronics, Inc", + [3]byte{16, 161, 59}: "FUJIKURA RUBBER LTD.", + [3]byte{16, 165, 208}: "Murata Manufacturing Co.,Ltd.", + [3]byte{16, 167, 67}: "SK Mtek Limited", + [3]byte{16, 169, 50}: "Beijing Cyber Cloud Technology Co. ,Ltd.", + [3]byte{16, 174, 96}: "PRIVATE", + [3]byte{16, 178, 107}: "base Co.,Ltd.", + [3]byte{16, 183, 19}: "PRIVATE", + [3]byte{16, 183, 246}: "Plastoform Industries Ltd.", + [3]byte{16, 185, 254}: "Lika srl", + [3]byte{16, 186, 165}: "GANA I&C CO., LTD", + [3]byte{16, 189, 24}: "CISCO SYSTEMS, INC.", + [3]byte{16, 191, 72}: "ASUSTEK COMPUTER INC.", + [3]byte{16, 194, 186}: "UTT Co., Ltd.", + [3]byte{16, 195, 123}: "ASUSTek COMPUTER INC.", + [3]byte{16, 197, 134}: "BIO SOUND LAB CO., LTD.", + [3]byte{16, 198, 31}: "Huawei Technologies Co., Ltd", + [3]byte{16, 198, 126}: "SHENZHEN JUCHIN TECHNOLOGY CO., LTD", + [3]byte{16, 198, 252}: "Garmin International", + [3]byte{16, 199, 63}: "Midas Klark Teknik Ltd", + [3]byte{16, 202, 129}: "PRECIA", + [3]byte{16, 204, 219}: "AXIMUM PRODUITS ELECTRONIQUES", + [3]byte{16, 209, 220}: "INSTAR Deutschland GmbH", + [3]byte{16, 213, 66}: "Samsung Electronics Co.,Ltd", + [3]byte{16, 221, 177}: "Apple", + [3]byte{16, 221, 244}: "Maxway Electronics CO.,LTD", + [3]byte{16, 222, 228}: "automationNEXT GmbH", + [3]byte{16, 226, 213}: "Qi Hardware Inc.", + [3]byte{16, 227, 199}: "Seohwa Telecom", + [3]byte{16, 228, 175}: "APR, LLC", + [3]byte{16, 230, 174}: "Source Technologies, LLC", + [3]byte{16, 232, 238}: "PhaseSpace", + [3]byte{16, 234, 89}: "Cisco SPVTG", + [3]byte{16, 238, 217}: "Canoga Perkins Corporation", + [3]byte{16, 243, 17}: "Cisco", + [3]byte{16, 243, 219}: "Gridco Systems, Inc.", + [3]byte{16, 244, 154}: "T3 Innovation", + [3]byte{16, 246, 129}: "vivo Mobile Communication Co., Ltd.", + [3]byte{16, 249, 111}: "LG Electronics", + [3]byte{16, 249, 238}: "Nokia Corporation", + [3]byte{16, 250, 206}: "Reacheng Communication Technology Co.,Ltd", + [3]byte{16, 251, 240}: "KangSheng LTD.", + [3]byte{16, 252, 84}: "Shany Electronic Co., Ltd.", + [3]byte{16, 254, 237}: "TP-LINK TECHNOLOGIES CO., LTD.", + [3]byte{17, 0, 170}: "PRIVATE", + [3]byte{20, 7, 8}: "PRIVATE", + [3]byte{20, 7, 224}: "Abrantix AG", + [3]byte{20, 12, 118}: "FREEBOX SAS", + [3]byte{20, 13, 79}: "Flextronics International", + [3]byte{20, 16, 159}: "Apple", + [3]byte{20, 19, 48}: "Anakreon UK LLP", + [3]byte{20, 20, 75}: "FUJIAN STAR-NET COMMUNICATION CO.,LTD", + [3]byte{20, 26, 81}: "Treetech Sistemas Digitais", + [3]byte{20, 27, 189}: "Volex Inc.", + [3]byte{20, 27, 240}: "Intellimedia Systems Ltd", + [3]byte{20, 31, 186}: "IEEE REGISTRATION AUTHORITY - Please see MAM public listing for more information.", + [3]byte{20, 35, 215}: "EUTRONIX CO., LTD.", + [3]byte{20, 43, 210}: "Armtel Ltd.", + [3]byte{20, 43, 214}: "Guangdong Appscomm Co.,Ltd", + [3]byte{20, 45, 39}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{20, 45, 139}: "Incipio Technologies, Inc", + [3]byte{20, 45, 245}: "Amphitech", + [3]byte{20, 48, 122}: "Avermetrics", + [3]byte{20, 48, 198}: "Motorola Mobility LLC", + [3]byte{20, 53, 139}: "Mediabridge Products, LLC.", + [3]byte{20, 53, 179}: "Future Designs, Inc.", + [3]byte{20, 54, 5}: "Nokia Corporation", + [3]byte{20, 54, 198}: "Lenovo Mobile Communication Technology Ltd.", + [3]byte{20, 55, 59}: "PROCOM Systems", + [3]byte{20, 58, 234}: "Dynapower Company LLC", + [3]byte{20, 61, 242}: "Beijing Shidai Hongyuan Network Communication Co.,Ltd", + [3]byte{20, 62, 96}: "Alcatel-Lucent", + [3]byte{20, 65, 226}: "Monaco Enterprises, Inc.", + [3]byte{20, 67, 25}: "Creative&Link Technology Limited", + [3]byte{20, 70, 228}: "AVISTEL", + [3]byte{20, 72, 139}: "Shenzhen Doov Technology Co.,Ltd", + [3]byte{20, 73, 120}: "Digital Control Incorporated", + [3]byte{20, 73, 224}: "Samsung Electro Mechanics co.,LTD.", + [3]byte{20, 76, 26}: "Max Communication GmbH", + [3]byte{20, 84, 18}: "Entis Co., Ltd.", + [3]byte{20, 86, 69}: "Savitech Corp.", + [3]byte{20, 88, 208}: "Hewlett Packard", + [3]byte{20, 90, 5}: "Apple", + [3]byte{20, 91, 209}: "ARRIS Group, Inc.", + [3]byte{20, 96, 128}: "zte corporation", + [3]byte{20, 99, 8}: "JABIL CIRCUIT (SHANGHAI) LTD.", + [3]byte{20, 106, 11}: "Cypress Electronics Limited", + [3]byte{20, 110, 10}: "PRIVATE", + [3]byte{20, 115, 115}: "TUBITAK UEKAE", + [3]byte{20, 116, 17}: "RIM", + [3]byte{20, 117, 144}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{20, 125, 179}: "JOA TELECOM.CO.,LTD", + [3]byte{20, 125, 197}: "Murata Manufacturing Co., Ltd.", + [3]byte{20, 130, 91}: "Hefei Radio Communication Technology Co., Ltd", + [3]byte{20, 134, 146}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{20, 137, 253}: "Samsung Electronics", + [3]byte{20, 138, 112}: "ADS GmbH", + [3]byte{20, 143, 198}: "Apple", + [3]byte{20, 144, 144}: "KongTop industrial(shen zhen)CO.,LTD", + [3]byte{20, 148, 72}: "BLU CASTLE S.A.", + [3]byte{20, 153, 226}: "Apple, Inc", + [3]byte{20, 159, 232}: "Lenovo Mobile Communication Technology Ltd.", + [3]byte{20, 163, 100}: "Samsung Electronics Co.,Ltd", + [3]byte{20, 166, 44}: "S.M. Dezac S.A.", + [3]byte{20, 168, 107}: "ShenZhen Telacom Science&Technology Co., Ltd", + [3]byte{20, 169, 227}: "MST CORPORATION", + [3]byte{20, 171, 240}: "ARRIS Group, Inc.", + [3]byte{20, 177, 38}: "Industrial Software Co", + [3]byte{20, 177, 200}: "InfiniWing, Inc.", + [3]byte{20, 180, 132}: "Samsung Electronics Co.,Ltd", + [3]byte{20, 183, 61}: "ARCHEAN Technologies", + [3]byte{20, 185, 104}: "Huawei Technologies Co., Ltd", + [3]byte{20, 192, 137}: "DUNE HD LTD", + [3]byte{20, 193, 38}: "Nokia Corporation", + [3]byte{20, 194, 29}: "Sabtech Industries", + [3]byte{20, 204, 32}: "TP-LINK TECHNOLOGIES CO.,LTD", + [3]byte{20, 207, 141}: "OHSUNG ELECTRONICS CO., LTD.", + [3]byte{20, 207, 146}: "TP-LINK TECHNOLOGIES CO., LTD.", + [3]byte{20, 207, 226}: "ARRIS Group, Inc.", + [3]byte{20, 212, 254}: "Pace plc", + [3]byte{20, 214, 77}: "D-Link International", + [3]byte{20, 215, 110}: "CONCH ELECTRONIC Co.,Ltd", + [3]byte{20, 218, 233}: "ASUSTek COMPUTER INC.", + [3]byte{20, 219, 133}: "S NET MEDIA", + [3]byte{20, 228, 236}: "mLogic LLC", + [3]byte{20, 230, 228}: "TP-LINK TECHNOLOGIES CO., LTD.", + [3]byte{20, 235, 51}: "BSMediasoft Co., Ltd.", + [3]byte{20, 237, 165}: "Wächter GmbH Sicherheitssysteme", + [3]byte{20, 237, 228}: "Kaiam Corporation", + [3]byte{20, 238, 157}: "AirNav Systems LLC", + [3]byte{20, 240, 197}: "Xtremio Ltd.", + [3]byte{20, 242, 142}: "ShenYang ZhongKe-Allwin Technology Co.LTD", + [3]byte{20, 244, 42}: "Samsung Electronics", + [3]byte{20, 246, 90}: "Xiaomi inc.", + [3]byte{20, 248, 147}: "Wuhan FiberHome Digital Technology Co.,Ltd.", + [3]byte{20, 254, 175}: "SAGITTAR LIMITED", + [3]byte{20, 254, 181}: "Dell Inc", + [3]byte{24, 0, 45}: "Sony Mobile Communications AB", + [3]byte{24, 0, 219}: "Fitbit Inc.", + [3]byte{24, 1, 227}: "Elektrobit Wireless Communications Ltd", + [3]byte{24, 3, 115}: "Dell Inc", + [3]byte{24, 3, 250}: "IBT Interfaces", + [3]byte{24, 6, 117}: "DILAX Intelcom GmbH", + [3]byte{24, 11, 82}: "Nanotron Technologies GmbH", + [3]byte{24, 12, 20}: "iSonea Limited", + [3]byte{24, 12, 119}: "Westinghouse Electric Company, LLC", + [3]byte{24, 12, 172}: "CANON INC.", + [3]byte{24, 16, 78}: "CEDINT-UPM", + [3]byte{24, 20, 32}: "TEB SAS", + [3]byte{24, 20, 86}: "Nokia Corporation", + [3]byte{24, 23, 20}: "DAEWOOIS", + [3]byte{24, 23, 37}: "Cameo Communications, Inc.", + [3]byte{24, 25, 63}: "Tamtron Oy", + [3]byte{24, 27, 235}: "Actiontec Electronics, Inc", + [3]byte{24, 30, 120}: "SAGEMCOM", + [3]byte{24, 30, 176}: "Samsung Electronics Co.,Ltd", + [3]byte{24, 32, 18}: "Aztech Associates Inc.", + [3]byte{24, 32, 50}: "Apple", + [3]byte{24, 32, 166}: "Sage Co., Ltd.", + [3]byte{24, 34, 126}: "Samsung Electronics Co.,Ltd", + [3]byte{24, 38, 102}: "Samsung Electronics Co.,Ltd", + [3]byte{24, 40, 97}: "AirTies Wireless Networks", + [3]byte{24, 42, 123}: "Nintendo Co., Ltd.", + [3]byte{24, 43, 5}: "8D Technologies", + [3]byte{24, 44, 145}: "Concept Development, Inc.", + [3]byte{24, 48, 9}: "Woojin Industrial Systems Co., Ltd.", + [3]byte{24, 50, 162}: "LAON TECHNOLOGY CO., LTD.", + [3]byte{24, 51, 157}: "CISCO SYSTEMS, INC.", + [3]byte{24, 52, 81}: "Apple", + [3]byte{24, 54, 252}: "Elecsys International Corporation", + [3]byte{24, 56, 37}: "Wuhan Lingjiu High-tech Co.,Ltd.", + [3]byte{24, 57, 25}: "Unicoi Systems", + [3]byte{24, 59, 210}: "BYD Precision Manufacture Company Ltd.", + [3]byte{24, 61, 162}: "Intel Corporate", + [3]byte{24, 63, 71}: "Samsung Electronics Co.,Ltd", + [3]byte{24, 66, 29}: "PRIVATE", + [3]byte{24, 66, 47}: "Alcatel Lucent", + [3]byte{24, 68, 98}: "Riava Networks, Inc.", + [3]byte{24, 70, 23}: "Samsung Electronics", + [3]byte{24, 72, 216}: "Fastback Networks", + [3]byte{24, 74, 111}: "Alcatel-Lucent Shanghai Bell Co., Ltd", + [3]byte{24, 78, 148}: "MESSOA TECHNOLOGIES INC.", + [3]byte{24, 82, 83}: "Pixord Corporation", + [3]byte{24, 83, 224}: "Hanyang Digitech Co.Ltd", + [3]byte{24, 85, 15}: "Cisco SPVTG", + [3]byte{24, 89, 51}: "Cisco SPVTG", + [3]byte{24, 90, 232}: "Zenotech.Co.,Ltd", + [3]byte{24, 98, 44}: "SAGEMCOM SAS", + [3]byte{24, 100, 114}: "Aruba Networks", + [3]byte{24, 101, 113}: "Top Victory Electronics (Taiwan) Co., Ltd.", + [3]byte{24, 102, 227}: "Veros Systems, Inc.", + [3]byte{24, 103, 63}: "Hanover Displays Limited", + [3]byte{24, 103, 81}: "KOMEG Industrielle Messtechnik GmbH", + [3]byte{24, 103, 176}: "Samsung Electronics Co.,LTD", + [3]byte{24, 109, 153}: "Adanis Inc.", + [3]byte{24, 113, 23}: "eta plus electronic gmbh", + [3]byte{24, 121, 162}: "GMJ ELECTRIC LIMITED", + [3]byte{24, 122, 147}: "AMICCOM Electronics Corporation", + [3]byte{24, 124, 129}: "Valeo Vision Systems", + [3]byte{24, 126, 213}: "shenzhen kaism technology Co. Ltd", + [3]byte{24, 128, 206}: "Barberry Solutions Ltd", + [3]byte{24, 128, 245}: "Alcatel-Lucent Shanghai Bell Co., Ltd", + [3]byte{24, 130, 25}: "Alibaba Cloud Computing Ltd.", + [3]byte{24, 131, 49}: "Samsung Electronics Co.,Ltd", + [3]byte{24, 131, 191}: "Arcadyan Technology Corporation", + [3]byte{24, 132, 16}: "CoreTrust Inc.", + [3]byte{24, 134, 58}: "DIGITAL ART SYSTEM", + [3]byte{24, 134, 172}: "Nokia Danmark A/S", + [3]byte{24, 135, 150}: "HTC Corporation", + [3]byte{24, 136, 87}: "Beijing Jinhong Xi-Dian Information Technology Corp.", + [3]byte{24, 137, 223}: "CerebrEX Inc.", + [3]byte{24, 142, 213}: "TP Vision Belgium N.V. - innovation site Brugge", + [3]byte{24, 146, 44}: "Virtual Instruments", + [3]byte{24, 151, 255}: "TechFaith Wireless Technology Limited", + [3]byte{24, 154, 103}: "CSE-Servelec Limited", + [3]byte{24, 156, 93}: "Cisco", + [3]byte{24, 158, 252}: "Apple", + [3]byte{24, 169, 5}: "Hewlett-Packard Company", + [3]byte{24, 169, 88}: "PROVISION THAI CO., LTD.", + [3]byte{24, 169, 155}: "Dell Inc", + [3]byte{24, 170, 69}: "Fon Technology", + [3]byte{24, 171, 245}: "Ultra Electronics - Electrics", + [3]byte{24, 173, 77}: "Polostar Technology Corporation", + [3]byte{24, 174, 187}: "Siemens Convergence Creators GmbH&Co.KG", + [3]byte{24, 175, 97}: "Apple, Inc", + [3]byte{24, 175, 143}: "Apple", + [3]byte{24, 175, 159}: "DIGITRONIC Automationsanlagen GmbH", + [3]byte{24, 178, 9}: "Torrey Pines Logic, Inc", + [3]byte{24, 179, 186}: "Netlogic AB", + [3]byte{24, 180, 48}: "Nest Labs Inc.", + [3]byte{24, 181, 145}: "I-Storm", + [3]byte{24, 183, 158}: "Invoxia", + [3]byte{24, 192, 134}: "Broadcom Corporation", + [3]byte{24, 196, 81}: "Tucson Embedded Systems", + [3]byte{24, 200, 231}: "Shenzhen Hualistone Technology Co.,Ltd", + [3]byte{24, 204, 35}: "Philio Technology Corporation", + [3]byte{24, 207, 94}: "Liteon Technology Corporation", + [3]byte{24, 208, 113}: "DASAN CO., LTD.", + [3]byte{24, 213, 182}: "SMG Holdings LLC", + [3]byte{24, 214, 106}: "Inmarsat", + [3]byte{24, 214, 207}: "Kurth Electronic GmbH", + [3]byte{24, 217, 73}: "Qvis Labs, LLC", + [3]byte{24, 220, 86}: "Yulong Computer Telecommunication Scientific(shenzhen)Co.,Lt", + [3]byte{24, 226, 136}: "STT Condigi", + [3]byte{24, 226, 194}: "Samsung Electronics", + [3]byte{24, 231, 40}: "Cisco", + [3]byte{24, 231, 244}: "Apple", + [3]byte{24, 232, 15}: "Viking Electronics Inc.", + [3]byte{24, 232, 221}: "MODULETEK", + [3]byte{24, 239, 99}: "CISCO SYSTEMS, INC.", + [3]byte{24, 244, 106}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{24, 246, 80}: "Multimedia Pacific Limited", + [3]byte{24, 248, 122}: "i3 International Inc.", + [3]byte{24, 250, 111}: "ISC applied systems corp", + [3]byte{24, 251, 123}: "Dell Inc", + [3]byte{24, 252, 159}: "Changhe Electronics Co., Ltd.", + [3]byte{24, 254, 52}: "Espressif Inc.", + [3]byte{24, 255, 46}: "Shenzhen Rui Ying Da Technology Co., Ltd", + [3]byte{28, 6, 86}: "IDY Corporation", + [3]byte{28, 8, 193}: "Lg Innotek", + [3]byte{28, 11, 82}: "EPICOM S.A", + [3]byte{28, 15, 207}: "Sypro Optics GmbH", + [3]byte{28, 17, 225}: "Wartsila Finland Oy", + [3]byte{28, 18, 157}: "IEEE PES PSRC/SUB", + [3]byte{28, 20, 72}: "ARRIS Group, Inc.", + [3]byte{28, 23, 211}: "CISCO SYSTEMS, INC.", + [3]byte{28, 24, 74}: "ShenZhen RicherLink Technologies Co.,LTD", + [3]byte{28, 25, 222}: "eyevis GmbH", + [3]byte{28, 26, 192}: "Apple", + [3]byte{28, 27, 104}: "ARRIS Group, Inc.", + [3]byte{28, 28, 253}: "Dalian Hi-Think Computer Technology, Corp", + [3]byte{28, 29, 103}: "Shenzhen Huawei Communication Technologies Co., Ltd", + [3]byte{28, 29, 134}: "Cisco", + [3]byte{28, 51, 77}: "ITS Telecom", + [3]byte{28, 52, 119}: "Innovation Wireless", + [3]byte{28, 53, 241}: "NEW Lift Neue Elektronische Wege Steuerungsbau GmbH", + [3]byte{28, 55, 191}: "Cloudium Systems Ltd.", + [3]byte{28, 58, 79}: "AccuSpec Electronics, LLC", + [3]byte{28, 61, 231}: "Sigma Koki Co.,Ltd.", + [3]byte{28, 62, 132}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{28, 65, 88}: "Gemalto M2M GmbH", + [3]byte{28, 67, 236}: "JAPAN CIRCUIT CO.,LTD", + [3]byte{28, 69, 147}: "Texas Instruments", + [3]byte{28, 72, 64}: "IMS Messsysteme GmbH", + [3]byte{28, 72, 249}: "GN Netcom A/S", + [3]byte{28, 74, 247}: "AMON INC", + [3]byte{28, 75, 185}: "SMG ENTERPRISE, LLC", + [3]byte{28, 75, 214}: "AzureWave", + [3]byte{28, 81, 181}: "Techaya LTD", + [3]byte{28, 82, 22}: "DONGGUAN HELE ELECTRONICS CO., LTD", + [3]byte{28, 82, 214}: "FLAT DISPLAY TECHNOLOGY CORPORATION", + [3]byte{28, 90, 62}: "Samsung Eletronics Co., Ltd (Visual Display Divison)", + [3]byte{28, 90, 107}: "Philips Electronics Nederland BV", + [3]byte{28, 92, 85}: "PRIMA Cinema, Inc", + [3]byte{28, 92, 96}: "Shenzhen Belzon Technology Co.,LTD.", + [3]byte{28, 95, 255}: "Beijing Ereneben Information Technology Co.,Ltd Shenzhen Branch", + [3]byte{28, 98, 184}: "Samsung Electronics Co.,Ltd", + [3]byte{28, 99, 183}: "OpenProducts 237 AB", + [3]byte{28, 101, 157}: "Liteon Technology Corporation", + [3]byte{28, 102, 109}: "Hon Hai Precision Ind.Co.Ltd", + [3]byte{28, 102, 170}: "Samsung Electronics", + [3]byte{28, 105, 165}: "Research In Motion", + [3]byte{28, 106, 122}: "Cisco", + [3]byte{28, 107, 202}: "Mitsunami Co., Ltd.", + [3]byte{28, 111, 101}: "GIGA-BYTE TECHNOLOGY CO.,LTD.", + [3]byte{28, 117, 8}: "COMPAL INFORMATION (KUNSHAN) CO., LTD.", + [3]byte{28, 118, 202}: "Terasic Technologies Inc.", + [3]byte{28, 120, 57}: "Shenzhen Tencent Computer System Co., Ltd.", + [3]byte{28, 123, 33}: "Sony Mobile Communications AB", + [3]byte{28, 124, 17}: "EID", + [3]byte{28, 124, 69}: "Vitek Industrial Video Products, Inc.", + [3]byte{28, 124, 199}: "Coriant GmbH", + [3]byte{28, 126, 81}: "3bumen.com", + [3]byte{28, 126, 229}: "D-Link International", + [3]byte{28, 131, 176}: "Linked IP GmbH", + [3]byte{28, 132, 100}: "FORMOSA WIRELESS COMMUNICATION CORP.", + [3]byte{28, 134, 173}: "MCT CO., LTD.", + [3]byte{28, 142, 142}: "DB Communication & Systems Co., ltd.", + [3]byte{28, 143, 138}: "Phase Motion Control SpA", + [3]byte{28, 145, 121}: "Integrated System Technologies Ltd", + [3]byte{28, 148, 146}: "RUAG Schweiz AG", + [3]byte{28, 149, 93}: "I-LAX ELECTRONICS INC.", + [3]byte{28, 149, 159}: "Veethree Electronics And Marine LLC", + [3]byte{28, 150, 90}: "Weifang goertek Electronics CO.,LTD", + [3]byte{28, 151, 61}: "PRICOM Design", + [3]byte{28, 153, 76}: "Murata Manufactuaring Co.,Ltd.", + [3]byte{28, 156, 38}: "Zoovel Technologies", + [3]byte{28, 158, 203}: "Beijing Nari Smartchip Microelectronics Company Limited", + [3]byte{28, 162, 177}: "ruwido austria gmbh", + [3]byte{28, 167, 112}: "SHENZHEN CHUANGWEI-RGB ELECTRONICS CO.,LT", + [3]byte{28, 170, 7}: "CISCO SYSTEMS, INC.", + [3]byte{28, 171, 1}: "Innovolt", + [3]byte{28, 171, 167}: "Apple", + [3]byte{28, 175, 5}: "Samsung Electronics Co.,Ltd", + [3]byte{28, 175, 247}: "D-LINK INTERNATIONAL PTE LIMITED", + [3]byte{28, 176, 148}: "HTC Corporation", + [3]byte{28, 177, 127}: "NEC Platforms, Ltd.", + [3]byte{28, 178, 67}: "TDC A/S", + [3]byte{28, 186, 140}: "Texas Instruments", + [3]byte{28, 187, 168}: "OJSC \"Ufimskiy Zavod \"Promsvyaz\"", + [3]byte{28, 189, 14}: "Amplified Engineering Pty Ltd", + [3]byte{28, 189, 185}: "D-LINK INTERNATIONAL PTE LIMITED", + [3]byte{28, 193, 26}: "Wavetronix", + [3]byte{28, 193, 222}: "Hewlett-Packard Company", + [3]byte{28, 195, 22}: "MileSight Technology Co., Ltd.", + [3]byte{28, 198, 60}: "Arcadyan Technology Corporation", + [3]byte{28, 212, 12}: "Kriwan Industrie-Elektronik GmbH", + [3]byte{28, 222, 167}: "Cisco", + [3]byte{28, 223, 15}: "CISCO SYSTEMS, INC.", + [3]byte{28, 225, 101}: "Marshal Corporation", + [3]byte{28, 225, 146}: "Qisda Corporation", + [3]byte{28, 226, 204}: "Texas Instruments", + [3]byte{28, 230, 43}: "Apple", + [3]byte{28, 230, 199}: "Cisco", + [3]byte{28, 238, 232}: "Ilshin Elecom", + [3]byte{28, 240, 97}: "SCAPS GmbH", + [3]byte{28, 244, 202}: "PRIVATE", + [3]byte{28, 245, 231}: "Turtle Industry Co., Ltd.", + [3]byte{28, 250, 104}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{28, 252, 187}: "Realfiction ApS", + [3]byte{28, 254, 167}: "IDentytech Solutins Ltd.", + [3]byte{32, 1, 79}: "Linea Research Ltd", + [3]byte{32, 2, 175}: "Murata Manufactuaring Co.,Ltd.", + [3]byte{32, 5, 5}: "RADMAX COMMUNICATION PRIVATE LIMITED", + [3]byte{32, 5, 232}: "OOO InProMedia", + [3]byte{32, 8, 237}: "Huawei Technologies Co., Ltd", + [3]byte{32, 10, 94}: "Xiangshan Giant Eagle Technology Developing co.,LTD", + [3]byte{32, 11, 199}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{32, 12, 200}: "NETGEAR INC.,", + [3]byte{32, 14, 149}: "IEC – TC9 WG43", + [3]byte{32, 16, 122}: "Gemtek Technology Co., Ltd.", + [3]byte{32, 18, 87}: "Most Lucky Trading Ltd", + [3]byte{32, 18, 213}: "Scientech Materials Corporation", + [3]byte{32, 19, 224}: "Samsung Electronics Co.,Ltd", + [3]byte{32, 22, 216}: "Liteon Technology Corporation", + [3]byte{32, 24, 14}: "Shenzhen Sunchip Technology Co., Ltd", + [3]byte{32, 26, 6}: "COMPAL INFORMATION (KUNSHAN) CO., LTD.", + [3]byte{32, 29, 3}: "Elatec GmbH", + [3]byte{32, 33, 165}: "LG Electronics Inc", + [3]byte{32, 37, 100}: "PEGATRON CORPORATION", + [3]byte{32, 37, 152}: "Teleview", + [3]byte{32, 43, 193}: "Shenzhen Huawei Communication Technologies Co., Ltd", + [3]byte{32, 44, 183}: "Kong Yue Electronics & Information Industry (Xinhui) Ltd.", + [3]byte{32, 55, 6}: "CISCO SYSTEMS, INC.", + [3]byte{32, 55, 188}: "Kuipers Electronic Engineering BV", + [3]byte{32, 58, 7}: "Cisco", + [3]byte{32, 64, 5}: "feno GmbH", + [3]byte{32, 65, 90}: "Smarteh d.o.o.", + [3]byte{32, 68, 58}: "Schneider Electric Asia Pacific Ltd", + [3]byte{32, 70, 161}: "VECOW Co., Ltd", + [3]byte{32, 70, 249}: "Advanced Network Devices (dba:AND)", + [3]byte{32, 74, 170}: "Hanscan Spain S.A.", + [3]byte{32, 76, 109}: "Hugo Brennenstuhl Gmbh & Co. KG.", + [3]byte{32, 78, 107}: "Axxana(israel) ltd", + [3]byte{32, 78, 127}: "NETGEAR", + [3]byte{32, 83, 202}: "Risk Technology Ltd", + [3]byte{32, 84, 118}: "Sony Mobile Communications AB", + [3]byte{32, 87, 33}: "Salix Technology CO., Ltd.", + [3]byte{32, 89, 160}: "Paragon Technologies Inc.", + [3]byte{32, 90, 0}: "Coval", + [3]byte{32, 91, 42}: "PRIVATE", + [3]byte{32, 91, 94}: "Shenzhen Wonhe Technology Co., Ltd", + [3]byte{32, 92, 250}: "Yangzhou ChangLian Network Technology Co,ltd.", + [3]byte{32, 100, 50}: "SAMSUNG ELECTRO MECHANICS CO.,LTD.", + [3]byte{32, 103, 177}: "Pluto inc.", + [3]byte{32, 104, 157}: "Liteon Technology Corporation", + [3]byte{32, 106, 138}: "Wistron InfoComm Manufacturing(Kunshan)Co.,Ltd.", + [3]byte{32, 106, 255}: "Atlas Elektronik UK Limited", + [3]byte{32, 110, 156}: "Samsung Electronics Co.,Ltd", + [3]byte{32, 111, 236}: "Braemac CA LLC", + [3]byte{32, 115, 85}: "ARRIS Group, Inc.", + [3]byte{32, 116, 207}: "Shenzhen Voxtech Co.,Ltd", + [3]byte{32, 118, 0}: "Actiontec Electronics, Inc", + [3]byte{32, 118, 147}: "Lenovo (Beijing) Limited.", + [3]byte{32, 124, 143}: "Quanta Microsystems,Inc.", + [3]byte{32, 125, 116}: "Apple", + [3]byte{32, 133, 140}: "Assa", + [3]byte{32, 135, 172}: "AES motomation", + [3]byte{32, 137, 132}: "COMPAL INFORMATION (KUNSHAN) CO., LTD", + [3]byte{32, 137, 134}: "zte corporation", + [3]byte{32, 145, 138}: "PROFALUX", + [3]byte{32, 145, 217}: "I'M SPA", + [3]byte{32, 147, 77}: "Fujian Star-net Communication Co., Ltd", + [3]byte{32, 154, 233}: "Volacomm Co., Ltd", + [3]byte{32, 155, 165}: "JIAXING GLEAD Electronics Co.,Ltd", + [3]byte{32, 162, 231}: "Lee-Dickens Ltd", + [3]byte{32, 167, 135}: "Bointec Taiwan Corporation Limited", + [3]byte{32, 169, 155}: "Microsoft Corporation", + [3]byte{32, 170, 37}: "IP-NET LLC", + [3]byte{32, 170, 75}: "Cisco-Linksys, LLC", + [3]byte{32, 176, 247}: "Enclustra GmbH", + [3]byte{32, 179, 153}: "Enterasys", + [3]byte{32, 181, 198}: "Mimosa Networks", + [3]byte{32, 183, 192}: "Omicron electronics GmbH", + [3]byte{32, 187, 192}: "Cisco", + [3]byte{32, 187, 198}: "Jabil Circuit Hungary Ltd.", + [3]byte{32, 191, 219}: "DVL", + [3]byte{32, 193, 175}: "i Wit Digital Co., Limited", + [3]byte{32, 195, 143}: "Texas Instruments Inc", + [3]byte{32, 198, 13}: "Shanghai annijie Information technology Co.,LTD", + [3]byte{32, 198, 235}: "Panasonic Corporation AVC Networks Company", + [3]byte{32, 200, 179}: "SHENZHEN BUL-TECH CO.,LTD.", + [3]byte{32, 201, 208}: "Apple", + [3]byte{32, 205, 57}: "Texas Instruments, Inc", + [3]byte{32, 206, 196}: "Peraso Technologies", + [3]byte{32, 207, 48}: "ASUSTek COMPUTER INC.", + [3]byte{32, 210, 31}: "Wincal Technology Corp.", + [3]byte{32, 211, 144}: "Samsung Electronics Co.,Ltd", + [3]byte{32, 213, 171}: "Korea Infocom Co.,Ltd.", + [3]byte{32, 213, 191}: "Samsung Eletronics Co., Ltd", + [3]byte{32, 214, 7}: "Nokia Corporation", + [3]byte{32, 217, 6}: "Iota, Inc.", + [3]byte{32, 220, 147}: "Cheetah Hi-Tech, Inc.", + [3]byte{32, 220, 230}: "TP-LINK TECHNOLOGIES CO., LTD.", + [3]byte{32, 223, 63}: "Nanjing SAC Power Grid Automation Co., Ltd.", + [3]byte{32, 229, 42}: "NETGEAR INC.,", + [3]byte{32, 229, 100}: "ARRIS Group, Inc.", + [3]byte{32, 231, 145}: "Siemens Healthcare Diagnostics, Inc", + [3]byte{32, 234, 199}: "SHENZHEN RIOPINE ELECTRONICS CO., LTD", + [3]byte{32, 237, 116}: "Ability enterprise co.,Ltd.", + [3]byte{32, 238, 198}: "Elefirst Science & Tech Co ., ltd", + [3]byte{32, 240, 2}: "MTData Developments Pty. Ltd.", + [3]byte{32, 243, 163}: "Huawei Technologies Co., Ltd", + [3]byte{32, 248, 94}: "Delta Electronics", + [3]byte{32, 250, 187}: "Cambridge Executive Limited", + [3]byte{32, 253, 241}: "3COM EUROPE LTD", + [3]byte{32, 254, 205}: "System In Frontier Inc.", + [3]byte{32, 254, 219}: "M2M Solution S.A.S.", + [3]byte{36, 1, 199}: "Cisco", + [3]byte{36, 5, 15}: "MTN Electronic Co. Ltd", + [3]byte{36, 9, 23}: "Devlin Electronics Limited", + [3]byte{36, 10, 17}: "TCT Mobile Limited", + [3]byte{36, 10, 100}: "AzureWaveTechnologies,Inc", + [3]byte{36, 11, 42}: "Viettel Group", + [3]byte{36, 11, 177}: "KOSTAL Industrie Elektrik GmbH", + [3]byte{36, 16, 100}: "Shenzhen Ecsino Tecnical Co. Ltd", + [3]byte{36, 17, 37}: "Hutek Co., Ltd.", + [3]byte{36, 17, 72}: "Entropix, LLC", + [3]byte{36, 17, 208}: "Chongqing Ehs Science and Technology Development Co.,Ltd.", + [3]byte{36, 26, 140}: "Squarehead Technology AS", + [3]byte{36, 27, 19}: "Shanghai Nutshell Electronic Co., Ltd.", + [3]byte{36, 31, 44}: "Calsys, Inc.", + [3]byte{36, 33, 171}: "Sony Ericsson Mobile Communications", + [3]byte{36, 38, 66}: "SHARP Corporation.", + [3]byte{36, 47, 250}: "Toshiba Global Commerce Solutions", + [3]byte{36, 51, 108}: "PRIVATE", + [3]byte{36, 55, 76}: "Cisco SPVTG", + [3]byte{36, 55, 239}: "EMC Electronic Media Communication SA", + [3]byte{36, 60, 32}: "Dynamode Group", + [3]byte{36, 66, 188}: "Alinco,incorporated", + [3]byte{36, 69, 151}: "GEMUE Gebr. Mueller Apparatebau", + [3]byte{36, 71, 14}: "PentronicAB", + [3]byte{36, 73, 123}: "Innovative Converged Devices Inc", + [3]byte{36, 79, 29}: "iRule LLC", + [3]byte{36, 95, 223}: "KYOCERA Corporation", + [3]byte{36, 98, 120}: "sysmocom - systems for mobile communications GmbH", + [3]byte{36, 100, 239}: "CYG SUNRI CO.,LTD.", + [3]byte{36, 101, 17}: "AVM GmbH", + [3]byte{36, 105, 74}: "Jasmine Systems Inc.", + [3]byte{36, 105, 165}: "Huawei Technologies Co., Ltd", + [3]byte{36, 106, 171}: "IT-IS International", + [3]byte{36, 118, 125}: "Cisco SPVTG", + [3]byte{36, 119, 3}: "Intel Corporate", + [3]byte{36, 128, 0}: "Westcontrol AS", + [3]byte{36, 129, 170}: "KSH International Co., Ltd.", + [3]byte{36, 130, 138}: "Prowave Technologies Ltd.", + [3]byte{36, 134, 244}: "Ctek, Inc.", + [3]byte{36, 135, 7}: "SEnergy Corporation", + [3]byte{36, 147, 202}: "Voxtronic Technology Computer-Systeme GmbH", + [3]byte{36, 148, 66}: "OPEN ROAD SOLUTIONS , INC.", + [3]byte{36, 149, 4}: "SFR", + [3]byte{36, 151, 237}: "Techvision Intelligent Technology Limited", + [3]byte{36, 162, 225}: "Apple, Inc", + [3]byte{36, 164, 44}: "KOUKAAM a.s.", + [3]byte{36, 164, 60}: "Ubiquiti Networks, INC", + [3]byte{36, 164, 149}: "Thales Canada Inc.", + [3]byte{36, 168, 125}: "Panasonic Automotive Systems Asia Pacific(Thailand)Co.,Ltd.", + [3]byte{36, 169, 55}: "PURE Storage", + [3]byte{36, 171, 129}: "Apple", + [3]byte{36, 175, 74}: "Alcatel-Lucent-IPD", + [3]byte{36, 175, 84}: "NEXGEN Mediatech Inc.", + [3]byte{36, 182, 87}: "CISCO SYSTEMS, INC.", + [3]byte{36, 182, 184}: "FRIEM SPA", + [3]byte{36, 182, 253}: "Dell Inc", + [3]byte{36, 184, 140}: "Crenus Co.,Ltd.", + [3]byte{36, 184, 210}: "Opzoon Technology Co.,Ltd.", + [3]byte{36, 186, 48}: "Technical Consumer Products, Inc.", + [3]byte{36, 187, 193}: "Absolute Analysis", + [3]byte{36, 188, 130}: "Dali Wireless, Inc.", + [3]byte{36, 190, 5}: "Hewlett Packard", + [3]byte{36, 191, 116}: "PRIVATE", + [3]byte{36, 192, 179}: "RSF", + [3]byte{36, 198, 150}: "Samsung Electronics Co.,Ltd", + [3]byte{36, 200, 72}: "mywerk system GmbH", + [3]byte{36, 200, 110}: "Chaney Instrument Co.", + [3]byte{36, 201, 161}: "Ruckus Wireless", + [3]byte{36, 201, 222}: "Genoray", + [3]byte{36, 203, 231}: "MYK, Inc.", + [3]byte{36, 207, 33}: "Shenzhen State Micro Technology Co., Ltd", + [3]byte{36, 209, 63}: "MEXUS CO.,LTD", + [3]byte{36, 210, 204}: "SmartDrive Systems Inc.", + [3]byte{36, 217, 33}: "Avaya, Inc", + [3]byte{36, 218, 182}: "Sistemas de Gestión Energética S.A. de C.V", + [3]byte{36, 219, 172}: "Shenzhen Huawei Communication Technologies Co., Ltd", + [3]byte{36, 219, 173}: "ShopperTrak RCT Corporation", + [3]byte{36, 219, 237}: "Samsung Electronics Co.,Ltd", + [3]byte{36, 222, 198}: "Aruba Networks", + [3]byte{36, 226, 113}: "Qingdao Hisense Communications Co.,Ltd", + [3]byte{36, 227, 20}: "Apple", + [3]byte{36, 230, 186}: "JSC Zavod im. Kozitsky", + [3]byte{36, 233, 179}: "Cisco", + [3]byte{36, 234, 64}: "Systeme Helmholz GmbH", + [3]byte{36, 235, 101}: "SAET I.S. S.r.l.", + [3]byte{36, 236, 153}: "Askey Computer Corp", + [3]byte{36, 236, 214}: "CSG Science & Technology Co.,Ltd.Hefei", + [3]byte{36, 238, 58}: "Chengdu Yingji Electronic Hi-tech Co Ltd", + [3]byte{36, 240, 255}: "GHT Co., Ltd.", + [3]byte{36, 242, 221}: "Radiant Zemax LLC", + [3]byte{36, 245, 170}: "Samsung Electronics Co.,LTD", + [3]byte{36, 253, 82}: "Liteon Technology Corporation", + [3]byte{40, 4, 224}: "FERMAX ELECTRONICA S.A.U.", + [3]byte{40, 6, 30}: "NINGBO GLOBAL USEFUL ELECTRIC CO.,LTD", + [3]byte{40, 6, 141}: "ITL, LLC", + [3]byte{40, 11, 92}: "Apple", + [3]byte{40, 12, 184}: "Mikrosay Yazilim ve Elektronik A.S.", + [3]byte{40, 13, 252}: "Sony Computer Entertainment Inc.", + [3]byte{40, 16, 123}: "D-Link International", + [3]byte{40, 20, 113}: "Lantis co., LTD.", + [3]byte{40, 22, 46}: "2Wire", + [3]byte{40, 23, 206}: "Omnisense Ltd", + [3]byte{40, 24, 120}: "Microsoft Corporation", + [3]byte{40, 24, 253}: "Aditya Infotech Ltd.", + [3]byte{40, 34, 70}: "Beijing Sinoix Communication Co., LTD", + [3]byte{40, 38, 166}: "PBR electronics GmbH", + [3]byte{40, 40, 93}: "ZyXEL Communications Corporation", + [3]byte{40, 41, 204}: "Corsa Technology Incorporated", + [3]byte{40, 41, 217}: "GlobalBeiMing technology (Beijing)Co. Ltd", + [3]byte{40, 44, 178}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{40, 49, 82}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{40, 50, 197}: "Humax.co.,ltd", + [3]byte{40, 52, 16}: "Enigma Diagnostics Limited", + [3]byte{40, 52, 162}: "Cisco", + [3]byte{40, 55, 55}: "Apple", + [3]byte{40, 56, 207}: "Gen2wave", + [3]byte{40, 57, 231}: "Preceno Technology Pte.Ltd.", + [3]byte{40, 59, 150}: "Cool Control LTD", + [3]byte{40, 60, 228}: "Huawei Technologies Co., Ltd", + [3]byte{40, 64, 26}: "C8 MediSensors, Inc.", + [3]byte{40, 65, 33}: "OptiSense Network, LLC", + [3]byte{40, 68, 48}: "GenesisTechnical Systems (UK) Ltd", + [3]byte{40, 71, 170}: "Nokia Corporation", + [3]byte{40, 72, 70}: "GridCentric Inc.", + [3]byte{40, 76, 83}: "Intune Networks", + [3]byte{40, 77, 146}: "Luminator", + [3]byte{40, 78, 215}: "OutSmart Power Systems, Inc.", + [3]byte{40, 79, 206}: "Liaoning Wontel Science and Technology Development Co.,Ltd.", + [3]byte{40, 81, 50}: "Shenzhen Prayfly Technology Co.,Ltd", + [3]byte{40, 87, 103}: "Echostar Technologies Corp", + [3]byte{40, 95, 219}: "Shenzhen Huawei Communication Technologies Co., Ltd", + [3]byte{40, 96, 70}: "Lantech Communications Global, Inc.", + [3]byte{40, 96, 148}: "CAPELEC", + [3]byte{40, 99, 54}: "Siemens AG - Industrial Automation - EWA", + [3]byte{40, 101, 107}: "Keystone Microtech Corporation", + [3]byte{40, 106, 184}: "Apple", + [3]byte{40, 106, 186}: "Apple", + [3]byte{40, 109, 151}: "SAMJIN Co., Ltd.", + [3]byte{40, 110, 212}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{40, 113, 132}: "Spire Payments", + [3]byte{40, 114, 197}: "Smartmatic Corp", + [3]byte{40, 114, 240}: "ATHENA", + [3]byte{40, 121, 148}: "Realplay Digital Technology(Shenzhen) Co.,Ltd", + [3]byte{40, 128, 35}: "Hewlett Packard", + [3]byte{40, 133, 45}: "Touch Networks", + [3]byte{40, 137, 21}: "CashGuard Sverige AB", + [3]byte{40, 138, 28}: "Juniper networks", + [3]byte{40, 145, 208}: "Stage Tec Entwicklungsgesellschaft für professionelle Audiotechnik mbH", + [3]byte{40, 146, 74}: "Hewlett Packard", + [3]byte{40, 147, 254}: "CISCO SYSTEMS, INC.", + [3]byte{40, 148, 15}: "CISCO SYSTEMS, INC.", + [3]byte{40, 148, 175}: "Samhwa Telecom", + [3]byte{40, 152, 123}: "Samsung Electronics Co.,Ltd", + [3]byte{40, 154, 75}: "SteelSeries ApS", + [3]byte{40, 154, 250}: "TCT Mobile Limited", + [3]byte{40, 158, 223}: "Danfoss Turbocor Compressors, Inc", + [3]byte{40, 161, 134}: "enblink", + [3]byte{40, 161, 146}: "GERP Solution", + [3]byte{40, 161, 235}: "ETEK TECHNOLOGY (SHENZHEN) CO.,LTD", + [3]byte{40, 162, 65}: "exlar corp", + [3]byte{40, 165, 116}: "Miller Electric Mfg. Co.", + [3]byte{40, 165, 238}: "Shenzhen SDGI CATV Co., Ltd", + [3]byte{40, 175, 10}: "Sirius XM Radio Inc", + [3]byte{40, 176, 204}: "Xenya d.o.o.", + [3]byte{40, 178, 189}: "Intel Corporate", + [3]byte{40, 179, 171}: "Genmark Automation", + [3]byte{40, 186, 24}: "NextNav, LLC", + [3]byte{40, 186, 181}: "Samsung Electronics Co.,Ltd", + [3]byte{40, 187, 89}: "RNET Technologies, Inc.", + [3]byte{40, 190, 155}: "Technicolor USA Inc.", + [3]byte{40, 192, 218}: "Juniper Networks", + [3]byte{40, 198, 113}: "Yota Devices OY", + [3]byte{40, 198, 142}: "NETGEAR INC.,", + [3]byte{40, 199, 24}: "Altierre", + [3]byte{40, 199, 206}: "Cisco", + [3]byte{40, 200, 37}: "DellKing Industrial Co., Ltd", + [3]byte{40, 201, 20}: "Taimag Corporation", + [3]byte{40, 203, 235}: "One", + [3]byte{40, 204, 1}: "Samsung Electronics Co.,Ltd", + [3]byte{40, 204, 255}: "Corporacion Empresarial Altra SL", + [3]byte{40, 205, 28}: "Espotel Oy", + [3]byte{40, 205, 76}: "Individual Computers GmbH", + [3]byte{40, 205, 156}: "Shenzhen Dynamax Software Development Co.,Ltd.", + [3]byte{40, 207, 218}: "Apple", + [3]byte{40, 207, 233}: "Apple", + [3]byte{40, 209, 175}: "Nokia Corporation", + [3]byte{40, 210, 68}: "LCFC(HeFei) Electronics Technology Co., Ltd.", + [3]byte{40, 213, 118}: "Premier Wireless, Inc.", + [3]byte{40, 217, 62}: "Telecor Inc.", + [3]byte{40, 217, 138}: "Hangzhou Konke Technology Co.,Ltd.", + [3]byte{40, 217, 151}: "Yuduan Mobile Co., Ltd.", + [3]byte{40, 219, 129}: "Shanghai Guao Electronic Technology Co., Ltd", + [3]byte{40, 222, 246}: "bioMerieux Inc.", + [3]byte{40, 224, 44}: "Apple", + [3]byte{40, 225, 76}: "Apple, Inc.", + [3]byte{40, 226, 151}: "Shanghai InfoTM Microelectronics Co.,Ltd.", + [3]byte{40, 227, 31}: "Xiaomi inc.", + [3]byte{40, 227, 71}: "Liteon Technology Corporation", + [3]byte{40, 230, 8}: "Tokheim", + [3]byte{40, 230, 233}: "SIS Sat Internet Services GmbH", + [3]byte{40, 231, 148}: "Microtime Computer Inc.", + [3]byte{40, 231, 207}: "Apple", + [3]byte{40, 237, 88}: "JAG Jakob AG", + [3]byte{40, 238, 44}: "Frontline Test Equipment", + [3]byte{40, 239, 1}: "PRIVATE", + [3]byte{40, 243, 88}: "2C - Trifonov & Co", + [3]byte{40, 245, 50}: "ADD-Engineering BV", + [3]byte{40, 246, 6}: "Syes srl", + [3]byte{40, 251, 211}: "Ragentek Technology Group", + [3]byte{40, 252, 81}: "The Electric Controller and Manufacturing Co., LLC", + [3]byte{40, 252, 246}: "Shenzhen Xin KingBrand enterprises Co.,Ltd", + [3]byte{44, 0, 44}: "UNOWHY", + [3]byte{44, 0, 51}: "EControls, LLC", + [3]byte{44, 0, 247}: "XOS", + [3]byte{44, 1, 11}: "NASCENT Technology, LLC - RemKon", + [3]byte{44, 6, 35}: "Win Leader Inc.", + [3]byte{44, 7, 60}: "DEVLINE LIMITED", + [3]byte{44, 16, 193}: "Nintendo Co., Ltd.", + [3]byte{44, 24, 174}: "Trend Electronics Co., Ltd.", + [3]byte{44, 25, 132}: "IDN Telecom, Inc.", + [3]byte{44, 26, 49}: "Electronics Company Limited", + [3]byte{44, 30, 234}: "AERODEV", + [3]byte{44, 33, 114}: "Juniper Networks", + [3]byte{44, 36, 95}: "Babolat VS", + [3]byte{44, 38, 197}: "zte corporation", + [3]byte{44, 39, 215}: "Hewlett-Packard Company", + [3]byte{44, 40, 45}: "BBK COMMUNICATIAO TECHNOLOGY CO.,LTD.", + [3]byte{44, 41, 151}: "Microsoft Corporation", + [3]byte{44, 45, 72}: "bct electronic GesmbH", + [3]byte{44, 48, 104}: "Pantech Co.,Ltd", + [3]byte{44, 51, 122}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{44, 52, 39}: "ERCO & GENER", + [3]byte{44, 53, 87}: "ELLIY Power CO..Ltd", + [3]byte{44, 54, 160}: "Capisco Limited", + [3]byte{44, 54, 248}: "CISCO SYSTEMS, INC.", + [3]byte{44, 55, 49}: "ShenZhen Yifang Digital Technology Co.,LTD", + [3]byte{44, 55, 150}: "CYBO CO.,LTD.", + [3]byte{44, 57, 150}: "SAGEMCOM", + [3]byte{44, 57, 193}: "Ciena Corporation", + [3]byte{44, 58, 40}: "Fagor Electrónica", + [3]byte{44, 59, 253}: "Netstor Technology Co., Ltd.", + [3]byte{44, 62, 207}: "Cisco", + [3]byte{44, 63, 56}: "CISCO SYSTEMS, INC.", + [3]byte{44, 63, 62}: "Alge-Timing GmbH", + [3]byte{44, 65, 56}: "Hewlett-Packard Company", + [3]byte{44, 68, 1}: "Samsung Electronics Co.,Ltd", + [3]byte{44, 68, 27}: "Spectrum Medical Limited", + [3]byte{44, 68, 253}: "Hewlett Packard", + [3]byte{44, 80, 137}: "Shenzhen Kaixuan Visual Technology Co.,Limited", + [3]byte{44, 83, 74}: "Shenzhen Winyao Electronic Limited", + [3]byte{44, 84, 45}: "CISCO SYSTEMS, INC.", + [3]byte{44, 84, 207}: "LG Electronics", + [3]byte{44, 85, 60}: "Gainspeed, Inc.", + [3]byte{44, 89, 229}: "Hewlett Packard", + [3]byte{44, 90, 5}: "Nokia Corporation", + [3]byte{44, 90, 163}: "PROMATE ELECTRONIC CO.LTD", + [3]byte{44, 91, 225}: "Centripetal Networks, Inc", + [3]byte{44, 93, 147}: "Ruckus Wireless", + [3]byte{44, 95, 243}: "Pertronic Industries", + [3]byte{44, 96, 12}: "QUANTA COMPUTER INC.", + [3]byte{44, 98, 90}: "Finest Security Systems Co., Ltd", + [3]byte{44, 98, 137}: "Regenersis (Glenrothes) Ltd", + [3]byte{44, 103, 251}: "ShenZhen Zhengjili Electronics Co., LTD", + [3]byte{44, 105, 186}: "RF Controls, LLC", + [3]byte{44, 107, 245}: "Juniper networks", + [3]byte{44, 113, 85}: "HiveMotion", + [3]byte{44, 114, 195}: "Soundmatters", + [3]byte{44, 117, 15}: "Shanghai Dongzhou-Lawton Communication Technology Co. Ltd.", + [3]byte{44, 118, 138}: "Hewlett-Packard Company", + [3]byte{44, 123, 90}: "Milper Ltd", + [3]byte{44, 123, 132}: "OOO Petr Telegin", + [3]byte{44, 126, 207}: "Onzo Ltd", + [3]byte{44, 128, 101}: "HARTING Inc. of North America", + [3]byte{44, 129, 88}: "Hon Hai Precision Ind. Co.,Ltd", + [3]byte{44, 138, 114}: "HTC Corporation", + [3]byte{44, 139, 242}: "Hitachi Metals America Ltd", + [3]byte{44, 145, 39}: "Eintechno Corporation", + [3]byte{44, 146, 44}: "Kishu Giken Kogyou Company Ltd,.", + [3]byte{44, 148, 100}: "Cincoze Co., Ltd.", + [3]byte{44, 149, 127}: "zte corporation", + [3]byte{44, 151, 23}: "I.C.Y. B.V.", + [3]byte{44, 154, 164}: "NGI SpA", + [3]byte{44, 158, 95}: "ARRIS Group, Inc.", + [3]byte{44, 158, 252}: "CANON INC.", + [3]byte{44, 161, 87}: "acromate, Inc.", + [3]byte{44, 163, 14}: "POWER DRAGON DEVELOPMENT LIMITED", + [3]byte{44, 167, 128}: "True Technologies Inc.", + [3]byte{44, 168, 53}: "RIM", + [3]byte{44, 171, 37}: "Shenzhen Gongjin Electronics Co.,Ltd", + [3]byte{44, 171, 164}: "Cisco SPVTG", + [3]byte{44, 176, 93}: "NETGEAR", + [3]byte{44, 176, 223}: "Soliton Technologies Pvt Ltd", + [3]byte{44, 180, 58}: "Apple", + [3]byte{44, 182, 147}: "Radware", + [3]byte{44, 182, 157}: "RED Digital Cinema", + [3]byte{44, 190, 8}: "Apple", + [3]byte{44, 190, 151}: "Ingenieurbuero Bickele und Buehler GmbH", + [3]byte{44, 194, 96}: "Ravello Systems", + [3]byte{44, 204, 21}: "Nokia Corporation", + [3]byte{44, 205, 39}: "Precor Inc", + [3]byte{44, 205, 67}: "Summit Technology Group", + [3]byte{44, 205, 105}: "Aqavi.com", + [3]byte{44, 208, 90}: "Liteon Technology Corporation", + [3]byte{44, 209, 218}: "Sanjole, Inc.", + [3]byte{44, 210, 231}: "Nokia Corporation", + [3]byte{44, 212, 68}: "Fujitsu Limited", + [3]byte{44, 221, 12}: "Discovergy GmbH", + [3]byte{44, 226, 168}: "DeviceDesign", + [3]byte{44, 228, 18}: "SAGEMCOM SAS", + [3]byte{44, 230, 204}: "Ruckus Wireless", + [3]byte{44, 232, 113}: "Alert Metalguard ApS", + [3]byte{44, 237, 235}: "Alpheus Digital Company Limited", + [3]byte{44, 238, 38}: "Petroleum Geo-Services", + [3]byte{44, 240, 238}: "Apple", + [3]byte{44, 242, 3}: "EMKO ELEKTRONIK SAN VE TIC AS", + [3]byte{44, 244, 197}: "Avaya, Inc", + [3]byte{44, 247, 241}: "Seeed Technology Inc.", + [3]byte{44, 250, 162}: "Alcatel-Lucent", + [3]byte{48, 5, 92}: "Brother industries, LTD.", + [3]byte{48, 11, 156}: "Delta Mobile Systems, Inc.", + [3]byte{48, 13, 42}: "Zhejiang Wellcom Technology Co.,Ltd.", + [3]byte{48, 14, 213}: "Hon Hai Precision Ind.Co.Ltd", + [3]byte{48, 16, 179}: "Liteon Technology Corporation", + [3]byte{48, 16, 228}: "Apple, Inc.", + [3]byte{48, 20, 45}: "Piciorgros GmbH", + [3]byte{48, 20, 74}: "Wistron Neweb Corp.", + [3]byte{48, 21, 24}: "Ubiquitous Communication Co. ltd.", + [3]byte{48, 22, 141}: "ProLon", + [3]byte{48, 23, 200}: "Sony Ericsson Mobile Communications AB", + [3]byte{48, 24, 207}: "DEOS control systems GmbH", + [3]byte{48, 25, 102}: "Samsung Electronics Co.,Ltd", + [3]byte{48, 26, 40}: "Mako Networks Ltd", + [3]byte{48, 33, 91}: "Shenzhen Ostar Display Electronic Co.,Ltd", + [3]byte{48, 45, 232}: "JDA, LLC (JDA Systems)", + [3]byte{48, 50, 148}: "W-IE-NE-R Plein & Baus GmbH", + [3]byte{48, 50, 212}: "Hanilstm Co., Ltd.", + [3]byte{48, 51, 53}: "Boosty", + [3]byte{48, 55, 166}: "CISCO SYSTEMS, INC.", + [3]byte{48, 56, 85}: "Nokia Corporation", + [3]byte{48, 57, 38}: "Sony Ericsson Mobile Communications AB", + [3]byte{48, 57, 85}: "Shenzhen Jinhengjia Electronic Co., Ltd.", + [3]byte{48, 57, 242}: "ADB Broadband Italia", + [3]byte{48, 58, 100}: "Intel Corporate", + [3]byte{48, 61, 8}: "GLINTT TES S.A.", + [3]byte{48, 62, 173}: "Sonavox Canada Inc", + [3]byte{48, 65, 116}: "ALTEC LANSING LLC", + [3]byte{48, 66, 37}: "BURG-WÄCHTER KG", + [3]byte{48, 68, 73}: "PLATH GmbH", + [3]byte{48, 70, 154}: "NETGEAR", + [3]byte{48, 73, 59}: "Nanjing Z-Com Wireless Co.,Ltd", + [3]byte{48, 76, 126}: "Panasonic Electric Works Automation Controls Techno Co.,Ltd.", + [3]byte{48, 78, 195}: "Tianjin Techua Technology Co., Ltd.", + [3]byte{48, 81, 248}: "BYK-Gardner GmbH", + [3]byte{48, 82, 90}: "NST Co., LTD", + [3]byte{48, 85, 237}: "Trex Network LLC", + [3]byte{48, 87, 172}: "IRLAB LTD.", + [3]byte{48, 89, 91}: "streamnow AG", + [3]byte{48, 89, 183}: "Microsoft", + [3]byte{48, 93, 56}: "Beissbarth", + [3]byte{48, 96, 35}: "ARRIS Group, Inc.", + [3]byte{48, 97, 18}: "PAV GmbH", + [3]byte{48, 97, 24}: "Paradom Inc.", + [3]byte{48, 101, 236}: "Wistron (ChongQing)", + [3]byte{48, 104, 140}: "Reach Technology Inc.", + [3]byte{48, 105, 75}: "RIM", + [3]byte{48, 108, 190}: "Skymotion Technology (HK) Limited", + [3]byte{48, 110, 92}: "Validus Technologies", + [3]byte{48, 113, 178}: "Hangzhou Prevail Optoelectronic Equipment Co.,LTD.", + [3]byte{48, 115, 80}: "Inpeco SA", + [3]byte{48, 117, 18}: "Sony Mobile Communications AB", + [3]byte{48, 118, 111}: "LG Electronics", + [3]byte{48, 119, 203}: "Maike Industry(Shenzhen)CO.,LTD", + [3]byte{48, 120, 107}: "TIANJIN Golden Pentagon Electronics Co., Ltd.", + [3]byte{48, 120, 194}: "Innowireless, Co. Ltd.", + [3]byte{48, 124, 48}: "RIM", + [3]byte{48, 126, 203}: "SFR", + [3]byte{48, 133, 169}: "Asustek Computer Inc", + [3]byte{48, 135, 48}: "Shenzhen Huawei Communication Technologies Co., Ltd", + [3]byte{48, 137, 153}: "Guangdong East Power Co.,", + [3]byte{48, 140, 251}: "Dropcam", + [3]byte{48, 144, 171}: "Apple", + [3]byte{48, 145, 143}: "Technicolor", + [3]byte{48, 146, 246}: "SHANGHAI SUNMON COMMUNICATION TECHNOGY CO.,LTD", + [3]byte{48, 155, 173}: "BBK Electronics Corp., Ltd.,", + [3]byte{48, 168, 219}: "Sony Mobile Communications AB", + [3]byte{48, 170, 189}: "Shanghai Reallytek Information Technology Co.,Ltd", + [3]byte{48, 174, 123}: "Deqing Dusun Electron CO., LTD", + [3]byte{48, 174, 246}: "Radio Mobile Access", + [3]byte{48, 178, 22}: "Hytec Geraetebau GmbH", + [3]byte{48, 179, 162}: "Shenzhen Heguang Measurement & Control Technology Co.,Ltd", + [3]byte{48, 181, 194}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{48, 181, 241}: "Aitexin Technology Co., Ltd", + [3]byte{48, 199, 80}: "MIC Technology Group", + [3]byte{48, 199, 174}: "Samsung Electronics Co.,Ltd", + [3]byte{48, 200, 42}: "Wi-Next s.r.l.", + [3]byte{48, 205, 167}: "Samsung Electronics ITS, Printer division", + [3]byte{48, 209, 126}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{48, 211, 87}: "Logosol, Inc.", + [3]byte{48, 212, 106}: "Autosales Incorporated", + [3]byte{48, 213, 135}: "Samsung Electronics Co.,Ltd", + [3]byte{48, 214, 201}: "Samsung Electronics Co.,Ltd", + [3]byte{48, 222, 134}: "Cedac Software S.r.l.", + [3]byte{48, 228, 142}: "Vodafone UK", + [3]byte{48, 228, 219}: "CISCO SYSTEMS, INC.", + [3]byte{48, 235, 37}: "INTEK DIGITAL", + [3]byte{48, 239, 209}: "Alstom Strongwish (Shenzhen) Co., Ltd.", + [3]byte{48, 243, 29}: "zte corporation", + [3]byte{48, 243, 58}: "+plugg srl", + [3]byte{48, 244, 47}: "ESP", + [3]byte{48, 247, 13}: "Cisco Systems", + [3]byte{48, 247, 197}: "Apple", + [3]byte{48, 247, 215}: "Thread Technology Co., Ltd", + [3]byte{48, 249, 237}: "Sony Corporation", + [3]byte{48, 250, 183}: "Tunai Creative", + [3]byte{48, 253, 17}: "MACROTECH (USA) INC.", + [3]byte{52, 0, 163}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{52, 2, 134}: "Intel Corporate", + [3]byte{52, 2, 155}: "CloudBerry Technologies Private Limited", + [3]byte{52, 7, 251}: "Ericsson AB", + [3]byte{52, 8, 4}: "D-Link Corporation", + [3]byte{52, 10, 255}: "Qingdao Hisense Communications Co.,Ltd", + [3]byte{52, 19, 168}: "Mediplan Limited", + [3]byte{52, 19, 232}: "Intel Corporate", + [3]byte{52, 21, 158}: "Apple", + [3]byte{52, 23, 235}: "Dell Inc", + [3]byte{52, 26, 76}: "SHENZHEN WEIBU ELECTRONICS CO.,LTD.", + [3]byte{52, 27, 34}: "Grandbeing Technology Co., Ltd", + [3]byte{52, 33, 9}: "Jensen Scandinavia AS", + [3]byte{52, 35, 135}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{52, 35, 186}: "Samsung Electro Mechanics co.,LTD.", + [3]byte{52, 37, 93}: "Shenzhen Loadcom Technology Co.,Ltd", + [3]byte{52, 40, 240}: "ATN International Limited", + [3]byte{52, 41, 234}: "MCD ELECTRONICS SP. Z O.O.", + [3]byte{52, 47, 110}: "Anywire corporation", + [3]byte{52, 49, 17}: "Samsung Electronics Co.,Ltd", + [3]byte{52, 49, 196}: "AVM GmbH", + [3]byte{52, 56, 175}: "Inlab Software GmbH", + [3]byte{52, 64, 181}: "IBM", + [3]byte{52, 70, 111}: "HiTEM Engineering", + [3]byte{52, 75, 61}: "Fiberhome Telecommunication Tech.Co.,Ltd.", + [3]byte{52, 75, 80}: "ZTE Corporation", + [3]byte{52, 77, 234}: "zte corporation", + [3]byte{52, 77, 247}: "LG Electronics", + [3]byte{52, 79, 63}: "IO-Power Technology Co., Ltd.", + [3]byte{52, 79, 92}: "R&M AG", + [3]byte{52, 79, 105}: "EKINOPS SAS", + [3]byte{52, 81, 170}: "JID GLOBAL", + [3]byte{52, 81, 201}: "Apple", + [3]byte{52, 91, 17}: "EVI HEAT AB", + [3]byte{52, 92, 64}: "Cargt Holdings LLC", + [3]byte{52, 93, 16}: "Wytek", + [3]byte{52, 97, 120}: "The Boeing Company", + [3]byte{52, 98, 136}: "Cisco", + [3]byte{52, 100, 169}: "Hewlett Packard", + [3]byte{52, 104, 74}: "Teraworks Co., Ltd.", + [3]byte{52, 107, 211}: "Huawei Technologies Co., Ltd", + [3]byte{52, 110, 138}: "Ecosense", + [3]byte{52, 111, 144}: "Cisco", + [3]byte{52, 111, 146}: "White Rodgers Division", + [3]byte{52, 117, 199}: "Avaya, Inc", + [3]byte{52, 118, 197}: "I-O DATA DEVICE, INC.", + [3]byte{52, 120, 119}: "O-NET Communications(Shenzhen) Limited", + [3]byte{52, 126, 57}: "Nokia Danmark A/S", + [3]byte{52, 129, 55}: "UNICARD SA", + [3]byte{52, 129, 196}: "AVM GmbH", + [3]byte{52, 130, 222}: "Kayo Technology, Inc.", + [3]byte{52, 131, 2}: "iFORCOM Co., Ltd", + [3]byte{52, 132, 70}: "Ericsson AB", + [3]byte{52, 134, 42}: "Heinz Lackmann GmbH & Co KG", + [3]byte{52, 136, 93}: "Logitech Far East", + [3]byte{52, 138, 174}: "SAGEMCOM SAS", + [3]byte{52, 149, 219}: "Logitec Corporation", + [3]byte{52, 151, 251}: "ADVANCED RF TECHNOLOGIES INC", + [3]byte{52, 153, 111}: "VPI Engineering", + [3]byte{52, 153, 215}: "Universal Flow Monitors, Inc.", + [3]byte{52, 154, 13}: "ZBD Displays Ltd", + [3]byte{52, 157, 144}: "Heinzmann GmbH & CO. KG", + [3]byte{52, 161, 131}: "AWare, Inc", + [3]byte{52, 163, 191}: "Terewave. Inc.", + [3]byte{52, 165, 93}: "TECHNOSOFT INTERNATIONAL SRL", + [3]byte{52, 165, 225}: "Sensorist ApS", + [3]byte{52, 166, 140}: "Shine Profit Development Limited", + [3]byte{52, 167, 9}: "Trevil srl", + [3]byte{52, 167, 186}: "Fischer International Systems Corporation", + [3]byte{52, 168, 67}: "KYOCERA Display Corporation", + [3]byte{52, 168, 78}: "Cisco", + [3]byte{52, 170, 139}: "Samsung Electronics Co.,Ltd", + [3]byte{52, 170, 153}: "Alcatel-Lucent", + [3]byte{52, 170, 238}: "Mikrovisatos Servisas UAB", + [3]byte{52, 173, 228}: "Shanghai Chint Power Systems Co., Ltd.", + [3]byte{52, 175, 44}: "Nintendo Co., Ltd.", + [3]byte{52, 177, 247}: "Texas Instruments", + [3]byte{52, 181, 113}: "PLDS", + [3]byte{52, 183, 253}: "Guangzhou Younghead Electronic Technology Co.,Ltd", + [3]byte{52, 186, 81}: "Se-Kure Controls, Inc.", + [3]byte{52, 186, 154}: "Asiatelco Technologies Co.", + [3]byte{52, 187, 31}: "Research In Motion", + [3]byte{52, 187, 38}: "Motorola Mobility LLC", + [3]byte{52, 188, 166}: "Beijing Ding Qing Technology, Ltd.", + [3]byte{52, 189, 200}: "Cisco Systems", + [3]byte{52, 189, 249}: "Shanghai WDK Industrial Co.,Ltd.", + [3]byte{52, 189, 250}: "Cisco SPVTG", + [3]byte{52, 190, 0}: "Samsung Electronics Co.,Ltd", + [3]byte{52, 191, 144}: "Fiberhome Telecommunication Tech.Co.,Ltd.", + [3]byte{52, 192, 89}: "Apple", + [3]byte{52, 195, 172}: "Samsung Electronics", + [3]byte{52, 197, 208}: "Hagleitner Hygiene International GmbH", + [3]byte{52, 198, 154}: "Enecsys Ltd", + [3]byte{52, 199, 49}: "ALPS Co,. Ltd.", + [3]byte{52, 200, 3}: "Nokia Corporation", + [3]byte{52, 201, 157}: "EIDOLON COMMUNICATIONS TECHNOLOGY CO. LTD.", + [3]byte{52, 205, 109}: "CommSky Technologies", + [3]byte{52, 205, 190}: "Huawei Technologies Co., Ltd", + [3]byte{52, 206, 148}: "Parsec (Pty) Ltd", + [3]byte{52, 208, 155}: "MobilMAX Technology Inc.", + [3]byte{52, 210, 196}: "RENA GmbH Print Systeme", + [3]byte{52, 215, 180}: "Tributary Systems, Inc.", + [3]byte{52, 219, 253}: "Cisco", + [3]byte{52, 222, 26}: "Intel Corporate", + [3]byte{52, 222, 52}: "zte corporation", + [3]byte{52, 223, 42}: "Fujikon Industrial Co.,Limited", + [3]byte{52, 224, 207}: "zte corporation", + [3]byte{52, 224, 215}: "DONGGUAN QISHENG ELECTRONICS INDUSTRIAL CO., LTD", + [3]byte{52, 226, 253}: "Apple", + [3]byte{52, 228, 42}: "Automatic Bar Controls Inc.", + [3]byte{52, 230, 173}: "Intel Corporate", + [3]byte{52, 230, 215}: "Dell Inc.", + [3]byte{52, 239, 68}: "2Wire", + [3]byte{52, 239, 139}: "NTT Communications Corporation", + [3]byte{52, 240, 202}: "Shenzhen Linghangyuan Digital Technology Co.,Ltd.", + [3]byte{52, 243, 155}: "WizLAN Ltd.", + [3]byte{52, 246, 45}: "SHARP Corporation", + [3]byte{52, 246, 210}: "Panasonic Taiwan Co.,Ltd.", + [3]byte{52, 249, 104}: "ATEK Products, LLC", + [3]byte{52, 250, 64}: "Guangzhou Robustel Technologies Co., Limited", + [3]byte{52, 252, 111}: "ALCEA", + [3]byte{56, 1, 151}: "Toshiba Samsung Storage Technolgoy Korea Corporation", + [3]byte{56, 6, 180}: "A.D.C. GmbH", + [3]byte{56, 8, 253}: "Silca Spa", + [3]byte{56, 10, 10}: "Sky-City Communication and Electronics Limited Company", + [3]byte{56, 10, 148}: "Samsung Electronics Co.,Ltd", + [3]byte{56, 11, 64}: "Samsung Electronics Co.,Ltd", + [3]byte{56, 13, 212}: "Primax Electronics LTD.", + [3]byte{56, 14, 123}: "V.P.S. Thai Co., Ltd", + [3]byte{56, 15, 74}: "Apple", + [3]byte{56, 15, 228}: "Dedicated Network Partners Oy", + [3]byte{56, 22, 209}: "Samsung Electronics Co.,Ltd", + [3]byte{56, 23, 102}: "PROMZAKAZ LTD.", + [3]byte{56, 25, 47}: "Nokia Corporation", + [3]byte{56, 28, 26}: "Cisco", + [3]byte{56, 28, 74}: "SIMCom Wireless Solutions Co.,Ltd.", + [3]byte{56, 34, 157}: "Pirelli Tyre S.p.A.", + [3]byte{56, 34, 214}: "H3C Technologies Co., Limited", + [3]byte{56, 38, 43}: "UTran Technology", + [3]byte{56, 38, 205}: "ANDTEK", + [3]byte{56, 40, 234}: "Fujian Netcom Technology Co., LTD", + [3]byte{56, 44, 74}: "ASUSTek COMPUTER INC.", + [3]byte{56, 45, 209}: "Samsung Electronics Co.,Ltd", + [3]byte{56, 49, 172}: "WEG", + [3]byte{56, 59, 200}: "2wire", + [3]byte{56, 63, 16}: "DBL Technology Ltd.", + [3]byte{56, 66, 51}: "Wildeboer Bauteile GmbH", + [3]byte{56, 66, 166}: "Ingenieurbuero Stahlkopf", + [3]byte{56, 67, 105}: "Patrol Products Consortium LLC", + [3]byte{56, 69, 140}: "MyCloud Technology corporation", + [3]byte{56, 70, 8}: "ZTE Corporation", + [3]byte{56, 72, 76}: "Apple", + [3]byte{56, 75, 118}: "AIRTAME ApS", + [3]byte{56, 79, 240}: "Azurewave Technologies, Inc.", + [3]byte{56, 82, 26}: "Alcatel-Lucent 7705", + [3]byte{56, 88, 12}: "Panaccess Systems GmbH", + [3]byte{56, 89, 248}: "MindMade sp. z o.o.", + [3]byte{56, 89, 249}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{56, 90, 168}: "Beijing Zhongdun Security Technology Development Co.", + [3]byte{56, 95, 195}: "Yu Jeong System, Co.Ltd", + [3]byte{56, 96, 119}: "PEGATRON CORPORATION", + [3]byte{56, 99, 187}: "Hewlett Packard", + [3]byte{56, 99, 246}: "3NOD MULTIMEDIA(SHENZHEN)CO.,LTD", + [3]byte{56, 102, 69}: "OOSIC Technology CO.,Ltd", + [3]byte{56, 103, 147}: "Asia Optical Co., Inc.", + [3]byte{56, 107, 187}: "ARRIS Group, Inc.", + [3]byte{56, 108, 155}: "Ivy Biomedical", + [3]byte{56, 110, 33}: "Wasion Group Ltd.", + [3]byte{56, 114, 192}: "COMTREND", + [3]byte{56, 123, 71}: "AKELA, Inc.", + [3]byte{56, 131, 69}: "TP-LINK TECHNOLOGIES CO., LTD.", + [3]byte{56, 137, 220}: "Opticon Sensors Europe B.V.", + [3]byte{56, 138, 183}: "ITC Networks", + [3]byte{56, 142, 231}: "Fanhattan LLC", + [3]byte{56, 145, 251}: "Xenox Holding BV", + [3]byte{56, 148, 150}: "Samsung Elec Co.,Ltd", + [3]byte{56, 149, 146}: "Beijing Tendyron Corporation", + [3]byte{56, 159, 131}: "OTN Systems N.V.", + [3]byte{56, 165, 60}: "Veenstra Instruments", + [3]byte{56, 165, 182}: "SHENZHEN MEGMEET ELECTRICAL CO.,LTD", + [3]byte{56, 168, 81}: "Moog, Ing", + [3]byte{56, 168, 107}: "Orga BV", + [3]byte{56, 169, 95}: "Actifio Inc", + [3]byte{56, 170, 60}: "SAMSUNG ELECTRO-MECHANICS", + [3]byte{56, 177, 45}: "Sonotronic Nagel GmbH", + [3]byte{56, 177, 219}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{56, 181, 189}: "E.G.O. Elektro-Ger", + [3]byte{56, 183, 77}: "Fijowave Limited", + [3]byte{56, 187, 35}: "OzVision America LLC", + [3]byte{56, 187, 60}: "Avaya, Inc", + [3]byte{56, 188, 26}: "Meizu technology co.,ltd", + [3]byte{56, 191, 47}: "Espec Corp.", + [3]byte{56, 191, 51}: "NEC CASIO Mobile Communications", + [3]byte{56, 192, 150}: "ALPS ELECTRIC CO.,LTD.", + [3]byte{56, 199, 186}: "CS Services Co.,Ltd.", + [3]byte{56, 200, 92}: "Cisco SPVTG", + [3]byte{56, 201, 169}: "SMART High Reliability Solutions, Inc.", + [3]byte{56, 202, 151}: "Contour Design LLC", + [3]byte{56, 209, 53}: "EasyIO Corporation Sdn. Bhd.", + [3]byte{56, 219, 187}: "Sunbow Telecom Co., Ltd.", + [3]byte{56, 222, 96}: "Mohlenhoff GmbH", + [3]byte{56, 224, 142}: "Mitsubishi Electric Corporation", + [3]byte{56, 229, 149}: "Shenzhen Gongjin Electronics Co.,Ltd", + [3]byte{56, 231, 216}: "HTC Corporation", + [3]byte{56, 232, 223}: "b gmbh medien + datenbanken", + [3]byte{56, 233, 140}: "Reco S.p.A.", + [3]byte{56, 234, 167}: "Hewlett Packard", + [3]byte{56, 236, 17}: "Novatek Microelectronics Corp.", + [3]byte{56, 236, 228}: "Samsung Electronics", + [3]byte{56, 238, 157}: "Anedo Ltd.", + [3]byte{56, 240, 152}: "Vapor Stone Rail Systems", + [3]byte{56, 243, 63}: "TATSUNO CORPORATION", + [3]byte{56, 245, 151}: "home2net GmbH", + [3]byte{56, 247, 8}: "National Resource Management, Inc.", + [3]byte{56, 248, 137}: "Huawei Technologies Co., Ltd", + [3]byte{56, 248, 183}: "V2COM PARTICIPACOES S.A.", + [3]byte{56, 254, 197}: "Ellips B.V.", + [3]byte{60, 2, 177}: "Creation Technologies LP", + [3]byte{60, 4, 191}: "PRAVIS SYSTEMS Co.Ltd.,", + [3]byte{60, 5, 171}: "Product Creation Studio", + [3]byte{60, 7, 84}: "Apple", + [3]byte{60, 7, 113}: "Sony Corporation", + [3]byte{60, 8, 30}: "Beijing Yupont Electric Power Technology Co.,Ltd", + [3]byte{60, 8, 246}: "Cisco", + [3]byte{60, 9, 109}: "Powerhouse Dynamics", + [3]byte{60, 12, 72}: "Servergy, Inc.", + [3]byte{60, 14, 35}: "Cisco", + [3]byte{60, 15, 193}: "KBC Networks", + [3]byte{60, 16, 64}: "daesung network", + [3]byte{60, 16, 111}: "ALBAHITH TECHNOLOGIES", + [3]byte{60, 21, 194}: "Apple", + [3]byte{60, 21, 234}: "TESCOM CO., LTD.", + [3]byte{60, 24, 159}: "Nokia Corporation", + [3]byte{60, 24, 160}: "Luxshare Precision Industry Co.,Ltd.", + [3]byte{60, 25, 21}: "GFI Chrono Time", + [3]byte{60, 25, 125}: "Ericsson AB", + [3]byte{60, 26, 87}: "Cardiopulmonary Corp", + [3]byte{60, 26, 121}: "Huayuan Technology CO.,LTD", + [3]byte{60, 28, 190}: "JADAK LLC", + [3]byte{60, 30, 19}: "HANGZHOU SUNRISE TECHNOLOGY CO., LTD", + [3]byte{60, 37, 215}: "Nokia Corporation", + [3]byte{60, 38, 213}: "Sotera Wireless", + [3]byte{60, 39, 99}: "SLE quality engineering GmbH & Co. KG", + [3]byte{60, 45, 183}: "Texas Instruments", + [3]byte{60, 47, 58}: "SFORZATO Corp.", + [3]byte{60, 48, 12}: "Dewar Electronics Pty Ltd", + [3]byte{60, 54, 61}: "Nokia Corporation", + [3]byte{60, 54, 228}: "Arris Group, Inc.", + [3]byte{60, 56, 136}: "ConnectQuest, llc", + [3]byte{60, 57, 195}: "JW Electronics Co., Ltd.", + [3]byte{60, 57, 231}: "IEEE REGISTRATION AUTHORITY - Please see MAM public listing for more information.", + [3]byte{60, 58, 115}: "Avaya, Inc", + [3]byte{60, 64, 79}: "Guangdong Pisen Electronics Co. Ltd.", + [3]byte{60, 67, 142}: "ARRIS Group, Inc.", + [3]byte{60, 70, 216}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{60, 73, 55}: "ASSMANN Electronic GmbH", + [3]byte{60, 74, 146}: "Hewlett-Packard Company", + [3]byte{60, 76, 105}: "Infinity System S.L.", + [3]byte{60, 78, 71}: "Etronic A/S", + [3]byte{60, 87, 189}: "Kessler Crane Inc.", + [3]byte{60, 87, 213}: "FiveCo", + [3]byte{60, 90, 55}: "Samsung Electronics", + [3]byte{60, 90, 180}: "Google", + [3]byte{60, 95, 1}: "Synerchip Co., Ltd.", + [3]byte{60, 97, 4}: "Juniper Networks", + [3]byte{60, 98, 0}: "Samsung electronics CO., LTD", + [3]byte{60, 98, 120}: "SHENZHEN JETNET TECHNOLOGY CO.,LTD.", + [3]byte{60, 103, 44}: "Sciovid Inc.", + [3]byte{60, 106, 125}: "Niigata Power Systems Co., Ltd.", + [3]byte{60, 110, 99}: "Mitron OY", + [3]byte{60, 111, 69}: "Fiberpro Inc.", + [3]byte{60, 111, 247}: "EnTek Systems, Inc.", + [3]byte{60, 112, 89}: "MakerBot Industries", + [3]byte{60, 116, 55}: "RIM", + [3]byte{60, 117, 74}: "ARRIS Group, Inc.", + [3]byte{60, 119, 230}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{60, 125, 177}: "Texas Instruments", + [3]byte{60, 129, 216}: "SAGEMCOM SAS", + [3]byte{60, 131, 181}: "Advance Vision Electronics Co. Ltd.", + [3]byte{60, 134, 168}: "Sangshin elecom .co,, LTD", + [3]byte{60, 137, 166}: "KAPELSE", + [3]byte{60, 138, 176}: "Juniper Networks", + [3]byte{60, 138, 229}: "Tensun Information Technology(Hangzhou) Co.,LTD", + [3]byte{60, 139, 254}: "Samsung Electronics", + [3]byte{60, 145, 87}: "Hangzhou Yulong Conmunication Co.,Ltd", + [3]byte{60, 145, 116}: "ALONG COMMUNICATION TECHNOLOGY", + [3]byte{60, 148, 213}: "Juniper Networks", + [3]byte{60, 151, 14}: "Wistron InfoComm(Kunshan)Co.,Ltd.", + [3]byte{60, 151, 126}: "IPS Technology Limited", + [3]byte{60, 152, 191}: "Quest Controls, Inc.", + [3]byte{60, 153, 247}: "Lansentechnology AB", + [3]byte{60, 159, 129}: "Shenzhen CATIC Bit Communications Technology Co.,Ltd", + [3]byte{60, 161, 13}: "Samsung Electronics Co.,Ltd", + [3]byte{60, 163, 21}: "Bless Information & Communications Co., Ltd", + [3]byte{60, 167, 43}: "MRV Communications (Networks) LTD", + [3]byte{60, 169, 244}: "Intel Corporate", + [3]byte{60, 170, 63}: "iKey, Ltd.", + [3]byte{60, 171, 142}: "Apple", + [3]byte{60, 174, 105}: "ESA Elektroschaltanlagen Grimma GmbH", + [3]byte{60, 177, 91}: "Avaya, Inc", + [3]byte{60, 177, 127}: "Wattwatchers Pty Ld", + [3]byte{60, 184, 122}: "PRIVATE", + [3]byte{60, 185, 166}: "Belden Deutschland GmbH", + [3]byte{60, 189, 216}: "LG ELECTRONICS INC", + [3]byte{60, 192, 198}: "d&b audiotechnik GmbH", + [3]byte{60, 193, 44}: "AES Corporation", + [3]byte{60, 193, 246}: "Melange Systems Pvt. Ltd.", + [3]byte{60, 194, 67}: "Nokia Corporation", + [3]byte{60, 201, 158}: "Huiyang Technology Co., Ltd", + [3]byte{60, 202, 135}: "Iders Incorporated", + [3]byte{60, 205, 90}: "Technische Alternative GmbH", + [3]byte{60, 205, 147}: "LG ELECTRONICS INC", + [3]byte{60, 206, 115}: "CISCO SYSTEMS, INC.", + [3]byte{60, 208, 248}: "Apple", + [3]byte{60, 209, 110}: "Telepower Communication Co., Ltd", + [3]byte{60, 212, 214}: "WirelessWERX, Inc", + [3]byte{60, 215, 218}: "SK Mtek microelectronics(shenzhen)limited", + [3]byte{60, 217, 43}: "Hewlett-Packard Company", + [3]byte{60, 217, 206}: "Eclipse WiFi", + [3]byte{60, 223, 30}: "CISCO SYSTEMS, INC.", + [3]byte{60, 223, 189}: "Huawei Technologies Co., Ltd", + [3]byte{60, 224, 114}: "Apple", + [3]byte{60, 229, 166}: "Hangzhou H3C Technologies Co., Ltd.", + [3]byte{60, 229, 180}: "KIDASEN INDUSTRIA E COMERCIO DE ANTENAS LTDA", + [3]byte{60, 230, 36}: "LG Display", + [3]byte{60, 234, 79}: "2Wire", + [3]byte{60, 234, 251}: "NSE AG", + [3]byte{60, 243, 146}: "Virtualtek. Co. Ltd", + [3]byte{60, 245, 44}: "DSPECIALISTS GmbH", + [3]byte{60, 247, 42}: "Nokia Corporation", + [3]byte{60, 247, 72}: "Shenzhen Linsn Technology Development Co.,Ltd", + [3]byte{60, 248, 8}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{60, 251, 150}: "Emcraft Systems LLC", + [3]byte{64, 1, 7}: "Arista Corp", + [3]byte{64, 1, 198}: "3COM EUROPE LTD", + [3]byte{64, 4, 12}: "A&T", + [3]byte{64, 7, 192}: "Railtec Systems GmbH", + [3]byte{64, 14, 103}: "Tremol Ltd.", + [3]byte{64, 14, 133}: "Samsung Electro Mechanics co.,LTD.", + [3]byte{64, 18, 228}: "Compass-EOS", + [3]byte{64, 19, 217}: "Global ES", + [3]byte{64, 21, 151}: "Protect America, Inc.", + [3]byte{64, 22, 126}: "ASUSTek COMPUTER INC.", + [3]byte{64, 22, 159}: "TP-LINK TECHNOLOGIES CO., LTD.", + [3]byte{64, 22, 250}: "EKM Metering", + [3]byte{64, 24, 177}: "Aerohive Networks Inc.", + [3]byte{64, 24, 215}: "Wyle Telemetry and Data Systems", + [3]byte{64, 29, 89}: "Biometric Associates, LP", + [3]byte{64, 34, 237}: "Digital Projection Ltd", + [3]byte{64, 37, 194}: "Intel Corporate", + [3]byte{64, 39, 11}: "Mobileeco Co., Ltd", + [3]byte{64, 43, 161}: "Sony Ericsson Mobile Communications AB", + [3]byte{64, 44, 244}: "Universal Global Scientific Industrial Co., Ltd.", + [3]byte{64, 48, 4}: "Apple", + [3]byte{64, 48, 103}: "Conlog (Pty) Ltd", + [3]byte{64, 51, 108}: "Godrej & Boyce Mfg. co. ltd", + [3]byte{64, 55, 173}: "Macro Image Technology, Inc.", + [3]byte{64, 60, 252}: "Apple", + [3]byte{64, 64, 34}: "ZIV", + [3]byte{64, 64, 107}: "Icomera", + [3]byte{64, 69, 218}: "Spreadtrum Communications (Shanghai) Co., Ltd.", + [3]byte{64, 74, 3}: "ZyXEL Communications Corporation", + [3]byte{64, 74, 24}: "Addrek Smart Solutions", + [3]byte{64, 77, 142}: "Shenzhen Huawei Communication Technologies Co., Ltd", + [3]byte{64, 78, 235}: "Higher Way Electronic Co., Ltd.", + [3]byte{64, 80, 224}: "Milton Security Group LLC", + [3]byte{64, 81, 108}: "Grandex International Corporation", + [3]byte{64, 82, 13}: "Pico Technology", + [3]byte{64, 85, 57}: "CISCO SYSTEMS, INC.", + [3]byte{64, 86, 12}: "In Home Displays Ltd", + [3]byte{64, 90, 155}: "ANOVO", + [3]byte{64, 95, 190}: "RIM", + [3]byte{64, 95, 194}: "Texas Instruments", + [3]byte{64, 96, 90}: "Hawkeye Tech Co. Ltd", + [3]byte{64, 97, 134}: "MICRO-STAR INT'L CO.,LTD", + [3]byte{64, 97, 142}: "Stella-Green Co", + [3]byte{64, 102, 122}: "mediola - connected living AG", + [3]byte{64, 104, 38}: "Thales UK Limited", + [3]byte{64, 106, 171}: "RIM", + [3]byte{64, 108, 143}: "Apple", + [3]byte{64, 111, 42}: "Research In Motion", + [3]byte{64, 112, 9}: "ARRIS Group, Inc.", + [3]byte{64, 112, 74}: "Power Idea Technology Limited", + [3]byte{64, 112, 116}: "Life Technology (China) Co., Ltd", + [3]byte{64, 116, 150}: "aFUN TECHNOLOGY INC.", + [3]byte{64, 120, 106}: "Motorola Mobility LLC", + [3]byte{64, 120, 117}: "IMBEL - Industria de Material Belico do Brasil", + [3]byte{64, 122, 128}: "Nokia Corporation", + [3]byte{64, 123, 27}: "Mettle Networks Inc.", + [3]byte{64, 130, 86}: "Continental Automotive GmbH", + [3]byte{64, 131, 222}: "Motorola", + [3]byte{64, 132, 147}: "Clavister AB", + [3]byte{64, 136, 224}: "Beijing Ereneben Information Technology Limited Shenzhen Branch", + [3]byte{64, 138, 154}: "TITENG CO., Ltd.", + [3]byte{64, 139, 7}: "Actiontec Electronics, Inc", + [3]byte{64, 139, 246}: "Shenzhen TCL New Technology Co; Ltd.", + [3]byte{64, 149, 88}: "Aisino Corporation", + [3]byte{64, 151, 209}: "BK Electronics cc", + [3]byte{64, 152, 76}: "Casacom Solutions AG", + [3]byte{64, 152, 78}: "Texas Instruments", + [3]byte{64, 152, 123}: "Aisino Corporation", + [3]byte{64, 155, 13}: "Shenzhen Yourf Kwan Industrial Co., Ltd", + [3]byte{64, 159, 199}: "BAEKCHUN I&C Co., Ltd.", + [3]byte{64, 166, 164}: "PassivSystems Ltd", + [3]byte{64, 166, 217}: "Apple", + [3]byte{64, 168, 240}: "Hewlett Packard", + [3]byte{64, 172, 141}: "Data Management, Inc.", + [3]byte{64, 176, 250}: "LG Electronics", + [3]byte{64, 178, 200}: "Nortel Networks", + [3]byte{64, 179, 149}: "Apple", + [3]byte{64, 179, 205}: "Chiyoda Electronics Co.,Ltd.", + [3]byte{64, 179, 252}: "Logital Co. Limited", + [3]byte{64, 180, 240}: "Juniper Networks", + [3]byte{64, 182, 177}: "SUNGSAM CO,.Ltd", + [3]byte{64, 183, 243}: "ARRIS Group, Inc.", + [3]byte{64, 186, 97}: "Arima Communications Corp.", + [3]byte{64, 188, 115}: "Cronoplast S.L.", + [3]byte{64, 188, 139}: "itelio GmbH", + [3]byte{64, 189, 158}: "Physio-Control, Inc", + [3]byte{64, 191, 23}: "Digistar Telecom. SA", + [3]byte{64, 194, 69}: "Shenzhen Hexicom Technology Co., Ltd.", + [3]byte{64, 196, 214}: "ChongQing Camyu Technology Development Co.,Ltd.", + [3]byte{64, 198, 42}: "Shanghai Jing Ren Electronic Technology Co., Ltd.", + [3]byte{64, 199, 201}: "Naviit Inc.", + [3]byte{64, 203, 168}: "Huawei Technologies Co., Ltd", + [3]byte{64, 205, 58}: "Z3 Technology", + [3]byte{64, 211, 45}: "Apple", + [3]byte{64, 212, 14}: "Biodata Ltd", + [3]byte{64, 213, 89}: "MICRO S.E.R.I.", + [3]byte{64, 216, 85}: "IEEE REGISTRATION AUTHORITY", + [3]byte{64, 226, 48}: "AzureWave Technologies, Inc.", + [3]byte{64, 231, 48}: "DEY Storage Systems, Inc.", + [3]byte{64, 231, 147}: "Shenzhen Siviton Technology Co.,Ltd", + [3]byte{64, 234, 206}: "FOUNDER BROADBAND NETWORK SERVICE CO.,LTD", + [3]byte{64, 236, 248}: "Siemens AG", + [3]byte{64, 239, 76}: "Fihonest communication co.,Ltd", + [3]byte{64, 240, 47}: "Liteon Technology Corporation", + [3]byte{64, 241, 76}: "ISE Europe SPRL", + [3]byte{64, 242, 1}: "SAGEMCOM", + [3]byte{64, 242, 233}: "IBM", + [3]byte{64, 243, 8}: "Murata Manufactuaring Co.,Ltd.", + [3]byte{64, 244, 7}: "Nintendo Co., Ltd.", + [3]byte{64, 244, 236}: "CISCO SYSTEMS, INC.", + [3]byte{64, 245, 46}: "Leica Microsystems (Schweiz) AG", + [3]byte{64, 252, 137}: "ARRIS Group, Inc.", + [3]byte{68, 3, 167}: "Cisco", + [3]byte{68, 12, 253}: "NetMan Co., Ltd.", + [3]byte{68, 17, 194}: "Telegartner Karl Gartner GmbH", + [3]byte{68, 19, 25}: "WKK TECHNOLOGY LTD.", + [3]byte{68, 24, 79}: "Fitview", + [3]byte{68, 25, 182}: "Hangzhou Hikvision Digital Technology Co.,Ltd.", + [3]byte{68, 30, 145}: "ARVIDA Intelligent Electronics Technology Co.,Ltd.", + [3]byte{68, 30, 161}: "Hewlett-Packard Company", + [3]byte{68, 35, 170}: "Farmage Co., Ltd.", + [3]byte{68, 37, 187}: "Bamboo Entertainment Corporation", + [3]byte{68, 41, 56}: "NietZsche enterprise Co.Ltd.", + [3]byte{68, 42, 96}: "Apple", + [3]byte{68, 42, 255}: "E3 Technology, Inc.", + [3]byte{68, 43, 3}: "CISCO SYSTEMS, INC.", + [3]byte{68, 49, 146}: "Hewlett Packard", + [3]byte{68, 50, 42}: "Avaya, Inc", + [3]byte{68, 50, 200}: "Technicolor USA Inc.", + [3]byte{68, 51, 76}: "Shenzhen Bilian electronic CO.,LTD", + [3]byte{68, 52, 143}: "MXT INDUSTRIAL LTDA", + [3]byte{68, 55, 25}: "2 Save Energy Ltd", + [3]byte{68, 55, 111}: "Young Electric Sign Co", + [3]byte{68, 55, 230}: "Hon Hai Precision Ind.Co.Ltd", + [3]byte{68, 56, 57}: "Cumulus Networks, inc", + [3]byte{68, 57, 196}: "Universal Global Scientific Industrial Co.,Ltd", + [3]byte{68, 60, 156}: "Pintsch Tiefenbach GmbH", + [3]byte{68, 61, 33}: "Nuvolt", + [3]byte{68, 62, 178}: "DEOTRON Co., LTD.", + [3]byte{68, 72, 145}: "HDMI Licensing, LLC", + [3]byte{68, 74, 101}: "Silverflare Ltd.", + [3]byte{68, 76, 12}: "Apple", + [3]byte{68, 78, 26}: "Samsung Electronics Co.,Ltd", + [3]byte{68, 79, 94}: "Pan Studios Co.,Ltd.", + [3]byte{68, 81, 219}: "Raytheon BBN Technologies", + [3]byte{68, 84, 192}: "Thompson Aerospace", + [3]byte{68, 86, 141}: "PNC Technologies Co., Ltd.", + [3]byte{68, 86, 183}: "Spawn Labs, Inc", + [3]byte{68, 88, 41}: "Cisco SPVTG", + [3]byte{68, 89, 159}: "Criticare Systems, Inc", + [3]byte{68, 94, 243}: "Tonalite Holding B.V.", + [3]byte{68, 95, 122}: "Shihlin Electric & Engineering Corp.", + [3]byte{68, 97, 50}: "ecobee inc", + [3]byte{68, 97, 156}: "FONsystem co. ltd.", + [3]byte{68, 102, 110}: "IP-LINE", + [3]byte{68, 103, 85}: "Orbit Irrigation", + [3]byte{68, 104, 171}: "JUIN COMPANY, LIMITED", + [3]byte{68, 108, 36}: "Reallin Electronic Co.,Ltd", + [3]byte{68, 109, 87}: "Liteon Technology Corporation", + [3]byte{68, 109, 108}: "Samsung Elec Co.,Ltd", + [3]byte{68, 112, 11}: "IFFU", + [3]byte{68, 112, 152}: "MING HONG TECHNOLOGY (SHEN ZHEN) LIMITED", + [3]byte{68, 116, 108}: "Sony Mobile Communications AB", + [3]byte{68, 123, 196}: "DualShine Technology(SZ)Co.,Ltd", + [3]byte{68, 124, 127}: "Innolight Technology Corporation", + [3]byte{68, 125, 165}: "VTION INFORMATION TECHNOLOGY (FUJIAN) CO.,LTD", + [3]byte{68, 126, 118}: "Trek Technology (S) Pte Ltd", + [3]byte{68, 126, 149}: "Alpha and Omega, Inc", + [3]byte{68, 131, 18}: "Star-Net", + [3]byte{68, 133, 0}: "Intel Corporate", + [3]byte{68, 134, 193}: "Siemens Low Voltage & Products", + [3]byte{68, 135, 252}: "ELITEGROUP COMPUTER SYSTEM CO., LTD.", + [3]byte{68, 136, 203}: "Camco Technologies NV", + [3]byte{68, 138, 91}: "Micro-Star INT'L CO., LTD.", + [3]byte{68, 140, 82}: "KTIS CO., Ltd", + [3]byte{68, 142, 18}: "DT Research, Inc.", + [3]byte{68, 142, 129}: "VIG", + [3]byte{68, 145, 219}: "Shanghai Huaqin Telecom Technology Co.,Ltd", + [3]byte{68, 148, 252}: "NETGEAR INC.,", + [3]byte{68, 149, 250}: "Qingdao Santong Digital Technology Co.Ltd", + [3]byte{68, 155, 120}: "The Now Factory", + [3]byte{68, 156, 181}: "Alcomp, Inc", + [3]byte{68, 164, 45}: "TCT Mobile Limited", + [3]byte{68, 166, 137}: "PROMAX ELECTRONICA SA", + [3]byte{68, 166, 229}: "THINKING TECHNOLOGY CO.,LTD", + [3]byte{68, 167, 207}: "Murata Manufacturing Co., Ltd.", + [3]byte{68, 168, 194}: "SEWOO TECH CO., LTD", + [3]byte{68, 170, 39}: "udworks Co., Ltd.", + [3]byte{68, 170, 232}: "Nanotec Electronic GmbH & Co. KG", + [3]byte{68, 173, 217}: "Cisco", + [3]byte{68, 179, 130}: "Kuang-chi Institute of Advanced Technology", + [3]byte{68, 193, 92}: "Texas Instruments", + [3]byte{68, 194, 51}: "Guangzhou Comet Technology Development Co.Ltd", + [3]byte{68, 195, 6}: "SIFROM Inc.", + [3]byte{68, 195, 155}: "OOO RUBEZH NPO", + [3]byte{68, 196, 169}: "Opticom Communication, LLC", + [3]byte{68, 197, 111}: "NGN Easy Satfinder (Tianjin) Electronic Co., Ltd", + [3]byte{68, 201, 162}: "Greenwald Industries", + [3]byte{68, 206, 125}: "SFR", + [3]byte{68, 209, 94}: "Shanghai Kingto Information Technology Ltd", + [3]byte{68, 210, 202}: "Anvia TV Oy", + [3]byte{68, 211, 202}: "CISCO SYSTEMS, INC.", + [3]byte{68, 212, 224}: "Sony Mobile Communications AB", + [3]byte{68, 214, 61}: "Talari Networks", + [3]byte{68, 216, 50}: "Azurewave Technologies, Inc.", + [3]byte{68, 216, 132}: "Apple", + [3]byte{68, 220, 145}: "PLANEX COMMUNICATIONS INC.", + [3]byte{68, 220, 203}: "SEMINDIA SYSTEMS PVT LTD", + [3]byte{68, 224, 142}: "Cisco SPVTG", + [3]byte{68, 225, 55}: "ARRIS Group, Inc.", + [3]byte{68, 228, 154}: "OMNITRONICS PTY LTD", + [3]byte{68, 228, 217}: "CISCO SYSTEMS, INC.", + [3]byte{68, 232, 165}: "Myreka Technologies Sdn. Bhd.", + [3]byte{68, 237, 87}: "Longicorn, inc.", + [3]byte{68, 238, 48}: "Budelmann Elektronik GmbH", + [3]byte{68, 244, 89}: "Samsung Electronics", + [3]byte{68, 248, 73}: "Union Pacific Railroad", + [3]byte{68, 251, 66}: "Apple", + [3]byte{72, 2, 42}: "B-Link Electronic Limited", + [3]byte{72, 3, 98}: "DESAY ELECTRONICS(HUIZHOU)CO.,LTD", + [3]byte{72, 12, 73}: "NAKAYO TELECOMMUNICATIONS,INC", + [3]byte{72, 18, 73}: "Luxcom Technologies Inc.", + [3]byte{72, 19, 243}: "BBK Electronics Corp., Ltd.", + [3]byte{72, 23, 76}: "MicroPower technologies", + [3]byte{72, 24, 66}: "Shanghai Winaas Co. Equipment Co. Ltd.", + [3]byte{72, 26, 132}: "Pointer Telocation Ltd", + [3]byte{72, 27, 210}: "Intron Scientific co., ltd.", + [3]byte{72, 38, 232}: "Tek-Air Systems, Inc.", + [3]byte{72, 40, 47}: "ZTE Corporation", + [3]byte{72, 44, 234}: "Motorola Inc Business Light Radios", + [3]byte{72, 51, 221}: "ZENNIO AVANCE Y TECNOLOGIA, S.L.", + [3]byte{72, 52, 61}: "IEP GmbH", + [3]byte{72, 61, 50}: "Syscor Controls & Automation", + [3]byte{72, 68, 135}: "Cisco SPVTG", + [3]byte{72, 68, 247}: "Samsung Electronics Co., LTD", + [3]byte{72, 70, 241}: "Uros Oy", + [3]byte{72, 70, 251}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{72, 81, 183}: "Intel Corporate", + [3]byte{72, 82, 97}: "SOREEL", + [3]byte{72, 87, 221}: "Facebook", + [3]byte{72, 89, 41}: "LG Electronics", + [3]byte{72, 90, 63}: "WISOL", + [3]byte{72, 90, 182}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{72, 91, 57}: "ASUSTek COMPUTER INC.", + [3]byte{72, 93, 96}: "Azurewave Technologies, Inc.", + [3]byte{72, 96, 188}: "Apple", + [3]byte{72, 97, 163}: "Concern \"Axion\" JSC", + [3]byte{72, 98, 118}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{72, 107, 44}: "BBK Electronics Corp., Ltd.,", + [3]byte{72, 107, 145}: "Fleetwood Group Inc.", + [3]byte{72, 110, 115}: "Pica8, Inc.", + [3]byte{72, 111, 210}: "StorSimple Inc", + [3]byte{72, 113, 25}: "SGB GROUP LTD.", + [3]byte{72, 116, 110}: "Apple", + [3]byte{72, 118, 4}: "PRIVATE", + [3]byte{72, 130, 68}: "Life Fitness / Div. of Brunswick", + [3]byte{72, 142, 66}: "DIGALOG GmbH", + [3]byte{72, 145, 83}: "Weinmann Geräte für Medizin GmbH + Co. KG", + [3]byte{72, 145, 246}: "Shenzhen Reach software technology CO.,LTD", + [3]byte{72, 155, 226}: "SCI Innovations Ltd", + [3]byte{72, 157, 24}: "Flashbay Limited", + [3]byte{72, 157, 36}: "Research In Motion", + [3]byte{72, 162, 45}: "Shenzhen Huaxuchang Telecom Technology Co.,Ltd", + [3]byte{72, 162, 183}: "Kodofon JSC", + [3]byte{72, 166, 210}: "GJsun Optical Science and Tech Co.,Ltd.", + [3]byte{72, 170, 93}: "Store Electronic Systems", + [3]byte{72, 178, 83}: "Marketaxess Corporation", + [3]byte{72, 181, 167}: "Glory Horse Industries Ltd.", + [3]byte{72, 184, 222}: "HOMEWINS TECHNOLOGY CO.,LTD.", + [3]byte{72, 185, 119}: "PulseOn Oy", + [3]byte{72, 185, 194}: "Teletics Inc.", + [3]byte{72, 190, 45}: "Symanitron", + [3]byte{72, 193, 172}: "PLANTRONICS, INC.", + [3]byte{72, 200, 98}: "Simo Wireless,Inc.", + [3]byte{72, 200, 182}: "SysTec GmbH", + [3]byte{72, 203, 110}: "Cello Electronics (UK) Ltd", + [3]byte{72, 208, 207}: "Universal Electronics, Inc.", + [3]byte{72, 209, 142}: "Metis Communication Co.,Ltd", + [3]byte{72, 210, 36}: "Liteon Technology Corporation", + [3]byte{72, 213, 76}: "Jeda Networks", + [3]byte{72, 215, 5}: "Apple", + [3]byte{72, 215, 255}: "BLANKOM Antennentechnik GmbH", + [3]byte{72, 216, 85}: "Telvent", + [3]byte{72, 216, 254}: "ClarIDy Solutions, Inc.", + [3]byte{72, 220, 251}: "Nokia Corporation", + [3]byte{72, 223, 28}: "Wuhan NEC Fibre Optic Communications industry Co. Ltd", + [3]byte{72, 225, 175}: "Vity", + [3]byte{72, 234, 99}: "Zhejiang Uniview Technologies Co., Ltd.", + [3]byte{72, 235, 48}: "ETERNA TECHNOLOGY, INC.", + [3]byte{72, 237, 128}: "daesung eltec", + [3]byte{72, 238, 7}: "Silver Palm Technologies LLC", + [3]byte{72, 238, 134}: "UTStarcom (China) Co.,Ltd", + [3]byte{72, 242, 48}: "Ubizcore Co.,LTD", + [3]byte{72, 243, 23}: "PRIVATE", + [3]byte{72, 244, 125}: "TechVision Holding Internation Limited", + [3]byte{72, 247, 241}: "Alcatel-Lucent", + [3]byte{72, 248, 179}: "Cisco-Linksys, LLC", + [3]byte{72, 248, 225}: "Alcatel Lucent WT", + [3]byte{72, 249, 37}: "Maestronic", + [3]byte{72, 252, 184}: "Woodstream Corporation", + [3]byte{72, 254, 234}: "HOMA B.V.", + [3]byte{76, 0, 130}: "Cisco", + [3]byte{76, 2, 46}: "CMR KOREA CO., LTD", + [3]byte{76, 2, 137}: "LEX COMPUTECH CO., LTD", + [3]byte{76, 6, 138}: "Basler Electric Company", + [3]byte{76, 7, 201}: "COMPUTER OFFICE Co.,Ltd.", + [3]byte{76, 9, 180}: "zte corporation", + [3]byte{76, 11, 58}: "TCT Mobile Limited", + [3]byte{76, 11, 190}: "Microsoft", + [3]byte{76, 13, 238}: "JABIL CIRCUIT (SHANGHAI) LTD.", + [3]byte{76, 15, 110}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{76, 15, 199}: "Earda Electronics Co.,Ltd", + [3]byte{76, 17, 191}: "ZHEJIANG DAHUA TECHNOLOGY CO.,LTD.", + [3]byte{76, 20, 128}: "NOREGON SYSTEMS, INC", + [3]byte{76, 20, 163}: "TCL Technoly Electronics (Huizhou) Co., Ltd.", + [3]byte{76, 22, 241}: "zte corporation", + [3]byte{76, 23, 235}: "SAGEMCOM", + [3]byte{76, 26, 58}: "PRIMA Research And Production Enterprise Ltd.", + [3]byte{76, 26, 149}: "Novakon Co., Ltd.", + [3]byte{76, 31, 204}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{76, 33, 208}: "Sony Mobile Communications AB", + [3]byte{76, 34, 88}: "cozybit, Inc.", + [3]byte{76, 37, 120}: "Nokia Corporation", + [3]byte{76, 38, 231}: "Welgate Co., Ltd.", + [3]byte{76, 44, 128}: "Beijing Skyway Technologies Co.,Ltd", + [3]byte{76, 44, 131}: "Zhejiang KaNong Network Technology Co.,Ltd.", + [3]byte{76, 47, 157}: "ICM Controls", + [3]byte{76, 48, 137}: "Thales Transportation Systems GmbH", + [3]byte{76, 50, 45}: "TELEDATA NETWORKS", + [3]byte{76, 50, 217}: "M Rutty Holdings Pty. Ltd.", + [3]byte{76, 57, 9}: "HPL Electric & Power Private Limited", + [3]byte{76, 57, 16}: "Newtek Electronics co., Ltd.", + [3]byte{76, 59, 116}: "VOGTEC(H.K.) Co., Ltd", + [3]byte{76, 60, 22}: "Samsung Electronics Co.,Ltd", + [3]byte{76, 72, 218}: "Beijing Autelan Technology Co.,Ltd", + [3]byte{76, 75, 104}: "Mobile Device, Inc.", + [3]byte{76, 78, 53}: "Cisco", + [3]byte{76, 84, 39}: "Linepro Sp. z o.o.", + [3]byte{76, 84, 153}: "Shenzhen Huawei Communication Technologies Co., Ltd", + [3]byte{76, 85, 133}: "Hamilton Systems", + [3]byte{76, 85, 184}: "Turkcell Teknoloji", + [3]byte{76, 85, 204}: "ACKme Networks Pty Ltd", + [3]byte{76, 93, 205}: "Oy Finnish Electric Vehicle Technologies Ltd", + [3]byte{76, 94, 12}: "Routerboard.com", + [3]byte{76, 95, 210}: "Alcatel-Lucent", + [3]byte{76, 96, 213}: "airPointe of New Hampshire", + [3]byte{76, 96, 222}: "NETGEAR", + [3]byte{76, 98, 85}: "SANMINA-SCI SYSTEM DE MEXICO S.A. DE C.V.", + [3]byte{76, 99, 235}: "Application Solutions (Electronics and Vision) Ltd", + [3]byte{76, 100, 217}: "Guangdong Leawin Group Co., Ltd", + [3]byte{76, 110, 110}: "Comnect Technology CO.,LTD", + [3]byte{76, 114, 185}: "Pegatron Corporation", + [3]byte{76, 115, 103}: "Genius Bytes Software Solutions GmbH", + [3]byte{76, 115, 165}: "KOVE", + [3]byte{76, 116, 3}: "Mundo Reader (bq)", + [3]byte{76, 119, 79}: "Embedded Wireless Labs", + [3]byte{76, 120, 151}: "Arrowhead Alarm Products Ltd", + [3]byte{76, 121, 186}: "Intel Corporate", + [3]byte{76, 127, 98}: "Nokia Corporation", + [3]byte{76, 128, 79}: "Armstrong Monitoring Corp", + [3]byte{76, 128, 147}: "Intel Corporate", + [3]byte{76, 130, 207}: "Echostar Technologies", + [3]byte{76, 131, 222}: "Cisco SPVTG", + [3]byte{76, 139, 48}: "Actiontec Electronics, Inc", + [3]byte{76, 139, 85}: "Grupo Digicon", + [3]byte{76, 139, 239}: "Huawei Technologies Co., Ltd", + [3]byte{76, 141, 121}: "Apple", + [3]byte{76, 143, 165}: "Jastec", + [3]byte{76, 150, 20}: "Juniper Networks", + [3]byte{76, 152, 239}: "Zeo", + [3]byte{76, 158, 128}: "KYOKKO ELECTRIC Co., Ltd.", + [3]byte{76, 158, 228}: "Hanyang Navicom Co.,Ltd.", + [3]byte{76, 158, 255}: "ZyXEL Communications Corp", + [3]byte{76, 165, 109}: "Samsung Electronics Co.,Ltd", + [3]byte{76, 167, 75}: "Alcatel Lucent", + [3]byte{76, 170, 22}: "AzureWave Technologies (Shanghai) Inc.", + [3]byte{76, 171, 51}: "KST technology", + [3]byte{76, 172, 10}: "ZTE Corporation", + [3]byte{76, 177, 108}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{76, 177, 153}: "Apple", + [3]byte{76, 180, 234}: "HRD (S) PTE., LTD.", + [3]byte{76, 184, 28}: "SAM Electronics GmbH", + [3]byte{76, 185, 200}: "CONET CO., LTD.", + [3]byte{76, 186, 163}: "Bison Electronics Inc.", + [3]byte{76, 187, 88}: "Chicony Electronics Co., Ltd.", + [3]byte{76, 188, 66}: "Shenzhen Hangsheng Electronics Co.,Ltd.", + [3]byte{76, 188, 165}: "Samsung Electronics Co.,Ltd", + [3]byte{76, 196, 82}: "Shang Hai Tyd. Electon Technology Ltd.", + [3]byte{76, 198, 2}: "Radios, Inc.", + [3]byte{76, 201, 79}: "Alcatel-Lucent", + [3]byte{76, 202, 83}: "Skyera, Inc.", + [3]byte{76, 203, 245}: "zte corporation", + [3]byte{76, 204, 52}: "Motorola Solutions Inc.", + [3]byte{76, 214, 55}: "Qsono Electronics Co., Ltd", + [3]byte{76, 215, 182}: "Helmer Scientific", + [3]byte{76, 217, 196}: "Magneti Marelli Automotive Electronics (Guangzhou) Co. Ltd", + [3]byte{76, 223, 61}: "TEAM ENGINEERS ADVANCE TECHNOLOGIES INDIA PVT LTD", + [3]byte{76, 225, 187}: "Zhuhai HiFocus Technology Co., Ltd.", + [3]byte{76, 226, 241}: "sclak srl", + [3]byte{76, 230, 118}: "Buffalo Inc.", + [3]byte{76, 233, 51}: "RailComm, LLC", + [3]byte{76, 235, 66}: "Intel Corporate", + [3]byte{76, 237, 222}: "Askey Computer Corp", + [3]byte{76, 240, 46}: "Vifa Denmark A/S", + [3]byte{76, 242, 191}: "Cambridge Industries(Group) Co.,Ltd.", + [3]byte{76, 244, 91}: "Blue Clover Devices", + [3]byte{76, 245, 160}: "Scalable Network Technologies Inc", + [3]byte{76, 247, 55}: "SamJi Electronics Co., Ltd", + [3]byte{80, 0, 140}: "Hong Kong Telecommunications (HKT) Limited", + [3]byte{80, 1, 187}: "Samsung Electronics", + [3]byte{80, 5, 61}: "CyWee Group Ltd", + [3]byte{80, 6, 4}: "Cisco", + [3]byte{80, 11, 50}: "Foxda Technology Industrial(ShenZhen)Co.,LTD", + [3]byte{80, 14, 109}: "TrafficCast International", + [3]byte{80, 17, 235}: "SilverNet Ltd", + [3]byte{80, 20, 181}: "Richfit Information Technology Co., Ltd", + [3]byte{80, 23, 255}: "Cisco", + [3]byte{80, 26, 197}: "Microsoft", + [3]byte{80, 28, 191}: "Cisco", + [3]byte{80, 32, 107}: "Emerson Climate Technologies Transportation Solutions", + [3]byte{80, 34, 103}: "PixeLINK", + [3]byte{80, 37, 43}: "Nethra Imaging Incorporated", + [3]byte{80, 38, 144}: "Fujitsu Limited", + [3]byte{80, 39, 199}: "TECHNART Co.,Ltd", + [3]byte{80, 41, 77}: "NANJING IOT SENSOR TECHNOLOGY CO,LTD", + [3]byte{80, 42, 126}: "Smart electronic GmbH", + [3]byte{80, 42, 139}: "Telekom Research and Development Sdn Bhd", + [3]byte{80, 45, 29}: "Nokia Corporation", + [3]byte{80, 45, 162}: "Intel Corporate", + [3]byte{80, 45, 244}: "Phytec Messtechnik GmbH", + [3]byte{80, 46, 92}: "HTC Corporation", + [3]byte{80, 46, 206}: "Asahi Electronics Co.,Ltd", + [3]byte{80, 50, 117}: "Samsung Electronics Co.,Ltd", + [3]byte{80, 57, 85}: "Cisco SPVTG", + [3]byte{80, 60, 196}: "Lenovo Mobile Communication Technology Ltd.", + [3]byte{80, 61, 229}: "CISCO SYSTEMS, INC.", + [3]byte{80, 63, 86}: "Syncmold Enterprise Corp", + [3]byte{80, 70, 93}: "ASUSTek COMPUTER INC.", + [3]byte{80, 72, 235}: "BEIJING HAIHEJINSHENG NETWORK TECHNOLOGY CO. LTD.", + [3]byte{80, 74, 94}: "Masimo Corporation", + [3]byte{80, 74, 110}: "NETGEAR INC.,", + [3]byte{80, 79, 148}: "Loxone Electronics GmbH", + [3]byte{80, 80, 101}: "TAKT Corporation", + [3]byte{80, 86, 99}: "Texas Instruments", + [3]byte{80, 86, 168}: "Jolla Ltd", + [3]byte{80, 86, 191}: "Samsung Electronics Co.,LTD", + [3]byte{80, 87, 168}: "CISCO SYSTEMS, INC.", + [3]byte{80, 88, 0}: "WyTec International, Inc.", + [3]byte{80, 90, 198}: "GUANGDONG SUPER TELECOM CO.,LTD.", + [3]byte{80, 96, 40}: "Xirrus Inc.", + [3]byte{80, 97, 132}: "Avaya, Inc", + [3]byte{80, 97, 214}: "Indu-Sol GmbH", + [3]byte{80, 99, 19}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{80, 100, 65}: "Greenlee", + [3]byte{80, 103, 135}: "iTellus", + [3]byte{80, 103, 174}: "Cisco", + [3]byte{80, 103, 240}: "ZyXEL Communications Corporation", + [3]byte{80, 111, 154}: "Wi-Fi Alliance", + [3]byte{80, 112, 229}: "He Shan World Fair Electronics Technology Limited", + [3]byte{80, 114, 77}: "BEG Brueck Electronic GmbH", + [3]byte{80, 118, 145}: "Tekpea, Inc.", + [3]byte{80, 118, 166}: "Ecil Informatica Ind. Com. Ltda", + [3]byte{80, 121, 91}: "Interexport Telecomunicaciones S.A.", + [3]byte{80, 125, 2}: "BIODIT", + [3]byte{80, 126, 93}: "Arcadyan Technology Corporation", + [3]byte{80, 133, 105}: "Samsung Electronics Co.,LTD", + [3]byte{80, 135, 137}: "Cisco", + [3]byte{80, 135, 184}: "Nuvyyo Inc", + [3]byte{80, 138, 66}: "Uptmate Technology Co., LTD", + [3]byte{80, 138, 203}: "SHENZHEN MAXMADE TECHNOLOGY CO., LTD.", + [3]byte{80, 140, 119}: "DIRMEIER Schanktechnik GmbH &Co KG", + [3]byte{80, 141, 111}: "CHAHOO Limited", + [3]byte{80, 147, 79}: "Gradual Tecnologia Ltda.", + [3]byte{80, 151, 114}: "Westinghouse Digital", + [3]byte{80, 152, 113}: "Inventum Technologies Private Limited", + [3]byte{80, 159, 39}: "Huawei Technologies Co., Ltd", + [3]byte{80, 160, 84}: "Actineon", + [3]byte{80, 160, 191}: "Alba Fiber Systems Inc.", + [3]byte{80, 164, 200}: "Samsung Electronics Co.,Ltd", + [3]byte{80, 166, 227}: "David Clark Company", + [3]byte{80, 167, 21}: "Aboundi, Inc.", + [3]byte{80, 167, 51}: "Ruckus Wireless", + [3]byte{80, 171, 191}: "Hoseo Telecom", + [3]byte{80, 173, 213}: "Dynalec Corporation", + [3]byte{80, 175, 115}: "Shenzhen Bitland Information Technology Co., Ltd.", + [3]byte{80, 182, 149}: "Micropoint Biotechnologies,Inc.", + [3]byte{80, 183, 195}: "Samsung Electronics CO., LTD", + [3]byte{80, 184, 136}: "wi2be Tecnologia S/A", + [3]byte{80, 184, 162}: "ImTech Technologies LLC,", + [3]byte{80, 189, 95}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{80, 192, 6}: "Carmanah Signs", + [3]byte{80, 194, 113}: "SECURETECH INC", + [3]byte{80, 197, 141}: "Juniper Networks", + [3]byte{80, 199, 191}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{80, 201, 113}: "GN Netcom A/S", + [3]byte{80, 201, 160}: "SKIPPER Electronics AS", + [3]byte{80, 204, 248}: "Samsung Electro Mechanics", + [3]byte{80, 205, 50}: "NanJing Chaoran Science & Technology Co.,Ltd.", + [3]byte{80, 206, 117}: "Measy Electronics Ltd", + [3]byte{80, 210, 116}: "Steffes Corporation", + [3]byte{80, 214, 215}: "Takahata Precision", + [3]byte{80, 224, 199}: "TurControlSystme AG", + [3]byte{80, 225, 74}: "PRIVATE", + [3]byte{80, 229, 73}: "GIGA-BYTE TECHNOLOGY CO.,LTD.", + [3]byte{80, 234, 214}: "Apple", + [3]byte{80, 235, 26}: "Brocade Communications Systems, Inc.", + [3]byte{80, 237, 120}: "Changzhou Yongse Infotech Co.,Ltd", + [3]byte{80, 237, 148}: "Egatel SL", + [3]byte{80, 240, 3}: "Open Stack, Inc.", + [3]byte{80, 244, 60}: "Leeo Inc", + [3]byte{80, 245, 32}: "Samsung Electronics Co.,Ltd", + [3]byte{80, 246, 26}: "Kunshan JADE Technologies co., Ltd.", + [3]byte{80, 250, 171}: "L-tek d.o.o.", + [3]byte{80, 252, 48}: "Treehouse Labs", + [3]byte{80, 252, 159}: "Samsung Electronics Co.,Ltd", + [3]byte{80, 254, 242}: "Sify Technologies Ltd", + [3]byte{84, 3, 245}: "EBN Technology Corp.", + [3]byte{84, 4, 150}: "Gigawave LTD", + [3]byte{84, 4, 166}: "ASUSTek COMPUTER INC.", + [3]byte{84, 5, 54}: "Vivago Oy", + [3]byte{84, 5, 95}: "Alcatel Lucent", + [3]byte{84, 9, 141}: "deister electronic GmbH", + [3]byte{84, 17, 47}: "Sulzer Pump Solutions Finland Oy", + [3]byte{84, 17, 95}: "Atamo Pty Ltd", + [3]byte{84, 27, 93}: "Techno-Innov", + [3]byte{84, 29, 251}: "Freestyle Energy Ltd", + [3]byte{84, 31, 213}: "Advantage Electronics", + [3]byte{84, 32, 24}: "Tely Labs", + [3]byte{84, 33, 96}: "Resolution Products", + [3]byte{84, 34, 248}: "zte corporation", + [3]byte{84, 38, 150}: "Apple", + [3]byte{84, 39, 30}: "AzureWave Technonloies, Inc.", + [3]byte{84, 42, 156}: "LSY Defense, LLC.", + [3]byte{84, 42, 162}: "Alpha Networks Inc.", + [3]byte{84, 44, 234}: "PROTECTRON", + [3]byte{84, 47, 137}: "Euclid Laboratories, Inc.", + [3]byte{84, 49, 49}: "Raster Vision Ltd", + [3]byte{84, 53, 48}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{84, 53, 223}: "Symeo GmbH", + [3]byte{84, 57, 104}: "Edgewater Networks Inc", + [3]byte{84, 57, 223}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{84, 61, 55}: "Ruckus Wireless", + [3]byte{84, 66, 73}: "Sony Corporation", + [3]byte{84, 68, 8}: "Nokia Corporation", + [3]byte{84, 70, 107}: "Shenzhen CZTIC Electronic Technology Co., Ltd", + [3]byte{84, 74, 0}: "Cisco", + [3]byte{84, 74, 5}: "wenglor sensoric gmbh", + [3]byte{84, 74, 22}: "Texas Instruments", + [3]byte{84, 81, 70}: "AMG Systems Ltd.", + [3]byte{84, 83, 237}: "Sony Corporation", + [3]byte{84, 84, 20}: "Digital RF Corea, Inc", + [3]byte{84, 94, 189}: "NL Technologies", + [3]byte{84, 95, 169}: "Teracom Limited", + [3]byte{84, 97, 234}: "Zaplox AB", + [3]byte{84, 114, 79}: "Apple", + [3]byte{84, 115, 152}: "Toyo Electronics Corporation", + [3]byte{84, 116, 230}: "Webtech Wireless", + [3]byte{84, 117, 208}: "CISCO SYSTEMS, INC.", + [3]byte{84, 120, 26}: "Cisco", + [3]byte{84, 121, 117}: "Nokia Corporation", + [3]byte{84, 127, 84}: "INGENICO", + [3]byte{84, 127, 168}: "TELCO systems, s.r.o.", + [3]byte{84, 127, 238}: "CISCO SYSTEMS, INC.", + [3]byte{84, 129, 173}: "Eagle Research Corporation", + [3]byte{84, 132, 123}: "Digital Devices GmbH", + [3]byte{84, 136, 14}: "Samsung Electro Mechanics co., LTD.", + [3]byte{84, 137, 34}: "Zelfy Inc", + [3]byte{84, 137, 152}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{84, 146, 190}: "Samsung Electronics Co.,Ltd", + [3]byte{84, 147, 89}: "SHENZHEN TWOWING TECHNOLOGIES CO.,LTD.", + [3]byte{84, 148, 120}: "Silvershore Technology Partners", + [3]byte{84, 154, 22}: "Uzushio Electric Co.,Ltd.", + [3]byte{84, 155, 18}: "Samsung Electronics", + [3]byte{84, 157, 133}: "EnerAccess inc", + [3]byte{84, 159, 53}: "Dell Inc.", + [3]byte{84, 160, 79}: "t-mac Technologies Ltd", + [3]byte{84, 160, 80}: "ASUSTek COMPUTER INC.", + [3]byte{84, 163, 27}: "Shenzhen Linkworld Technology Co,.LTD", + [3]byte{84, 165, 27}: "Shenzhen Huawei Communication Technologies Co., Ltd", + [3]byte{84, 165, 75}: "NSC Communications Siberia Ltd", + [3]byte{84, 166, 25}: "Alcatel-Lucent Shanghai Bell Co., Ltd", + [3]byte{84, 169, 212}: "Minibar Systems", + [3]byte{84, 174, 39}: "Apple", + [3]byte{84, 182, 32}: "SUHDOL E&C Co.Ltd.", + [3]byte{84, 183, 83}: "Hunan Fenghui Yinjia Science And Technology Co.,Ltd", + [3]byte{84, 190, 247}: "PEGATRON CORPORATION", + [3]byte{84, 200, 15}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{84, 205, 167}: "Fujian Shenzhou Electronic Co.,Ltd", + [3]byte{84, 205, 238}: "ShenZhen Apexis Electronic Co.,Ltd", + [3]byte{84, 208, 237}: "AXIM Communications", + [3]byte{84, 209, 99}: "MAX-TECH,INC", + [3]byte{84, 209, 176}: "Universal Laser Systems, Inc", + [3]byte{84, 212, 111}: "Cisco SPVTG", + [3]byte{84, 223, 0}: "Ulterius Technologies, LLC", + [3]byte{84, 223, 99}: "Intrakey technologies GmbH", + [3]byte{84, 224, 50}: "Juniper Networks", + [3]byte{84, 226, 224}: "Pace plc", + [3]byte{84, 227, 176}: "JVL Industri Elektronik", + [3]byte{84, 228, 58}: "Apple, Inc.", + [3]byte{84, 228, 189}: "FN-LINK TECHNOLOGY LIMITED", + [3]byte{84, 230, 63}: "ShenZhen LingKeWeiEr Technology Co., Ltd.", + [3]byte{84, 230, 252}: "TP-LINK TECHNOLOGIES CO., LTD.", + [3]byte{84, 234, 168}: "Apple, Inc.", + [3]byte{84, 238, 117}: "Wistron InfoComm(Kunshan)Co.,Ltd.", + [3]byte{84, 239, 146}: "Shenzhen Elink Technology Co., LTD", + [3]byte{84, 245, 182}: "ORIENTAL PACIFIC INTERNATIONAL LIMITED", + [3]byte{84, 246, 102}: "Berthold Technologies GmbH and Co.KG", + [3]byte{84, 248, 118}: "ABB AG", + [3]byte{84, 250, 62}: "Samsung Electronics Co.,LTD", + [3]byte{84, 251, 88}: "WISEWARE, Lda", + [3]byte{84, 253, 191}: "Scheidt & Bachmann GmbH", + [3]byte{84, 255, 207}: "Mopria Alliance", + [3]byte{88, 5, 40}: "LABRIS NETWORKS", + [3]byte{88, 5, 86}: "Elettronica GF S.r.L.", + [3]byte{88, 8, 250}: "Fiber Optic & telecommunication INC.", + [3]byte{88, 9, 67}: "PRIVATE", + [3]byte{88, 9, 229}: "Kivic Inc.", + [3]byte{88, 10, 32}: "Cisco", + [3]byte{88, 16, 140}: "Intelbras", + [3]byte{88, 18, 67}: "AcSiP Technology Corp.", + [3]byte{88, 22, 38}: "Avaya, Inc", + [3]byte{88, 23, 12}: "Sony Ericsson Mobile Communications AB", + [3]byte{88, 28, 189}: "Affinegy", + [3]byte{88, 29, 145}: "Advanced Mobile Telecom co.,ltd.", + [3]byte{88, 31, 103}: "Open-m technology limited", + [3]byte{88, 31, 170}: "Apple", + [3]byte{88, 31, 239}: "Tuttnaer LTD", + [3]byte{88, 33, 54}: "KMB systems, s.r.o.", + [3]byte{88, 35, 140}: "Technicolor CH USA", + [3]byte{88, 46, 254}: "Lighting Science Group", + [3]byte{88, 47, 66}: "Universal Electric Corporation", + [3]byte{88, 52, 59}: "Glovast Technology Ltd.", + [3]byte{88, 53, 217}: "CISCO SYSTEMS, INC.", + [3]byte{88, 60, 198}: "Omneality Ltd.", + [3]byte{88, 66, 228}: "Sigma International General Medical Apparatus, LLC.", + [3]byte{88, 70, 143}: "Koncar Electronics and Informatics", + [3]byte{88, 70, 225}: "Baxter Healthcare", + [3]byte{88, 72, 192}: "COFLEC", + [3]byte{88, 73, 59}: "Palo Alto Networks", + [3]byte{88, 73, 186}: "Chitai Electronic Corp.", + [3]byte{88, 76, 25}: "Chongqing Guohong Technology Development Company Limited", + [3]byte{88, 76, 238}: "Digital One Technologies, Limited", + [3]byte{88, 80, 118}: "Linear Equipamentos Eletronicos SA", + [3]byte{88, 80, 171}: "TLS Corporation", + [3]byte{88, 80, 230}: "Best Buy Corporation", + [3]byte{88, 85, 202}: "Apple", + [3]byte{88, 86, 232}: "ARRIS Group, Inc.", + [3]byte{88, 87, 13}: "Danfoss Solar Inverters", + [3]byte{88, 99, 154}: "TPL SYSTEMES", + [3]byte{88, 101, 230}: "INFOMARK CO., LTD.", + [3]byte{88, 102, 186}: "Hangzhou H3C Technologies Co., Limited", + [3]byte{88, 103, 26}: "BARNES&NOBLE.COM", + [3]byte{88, 103, 127}: "Clare Controls Inc.", + [3]byte{88, 105, 108}: "Fujian Ruijie Networks co, ltd", + [3]byte{88, 105, 249}: "Fusion Transactive Ltd.", + [3]byte{88, 106, 177}: "Hangzhou H3C Technologies Co., Limited", + [3]byte{88, 109, 143}: "Cisco-Linksys, LLC", + [3]byte{88, 110, 214}: "PRIVATE", + [3]byte{88, 117, 33}: "CJSC RTSoft", + [3]byte{88, 118, 117}: "Beijing ECHO Technologies Co.,Ltd", + [3]byte{88, 118, 197}: "DIGI I'S LTD", + [3]byte{88, 122, 77}: "Stonesoft Corporation", + [3]byte{88, 123, 233}: "AirPro Technology India Pvt. Ltd", + [3]byte{88, 126, 97}: "Hisense Electric Co., Ltd", + [3]byte{88, 127, 183}: "SONAR INDUSTRIAL CO., LTD.", + [3]byte{88, 127, 200}: "S2M", + [3]byte{88, 132, 228}: "IP500 Alliance e.V.", + [3]byte{88, 135, 76}: "LITE-ON CLEAN ENERGY TECHNOLOGY CORP.", + [3]byte{88, 135, 226}: "Shenzhen Coship Electronics Co., Ltd.", + [3]byte{88, 141, 9}: "CISCO SYSTEMS, INC.", + [3]byte{88, 145, 207}: "Intel Corporate", + [3]byte{88, 146, 13}: "Kinetic Avionics Limited", + [3]byte{88, 147, 150}: "Ruckus Wireless", + [3]byte{88, 148, 107}: "Intel Corporate", + [3]byte{88, 148, 207}: "Vertex Standard LMR, Inc.", + [3]byte{88, 151, 30}: "Cisco", + [3]byte{88, 152, 53}: "Technicolor", + [3]byte{88, 152, 111}: "Revolution Display", + [3]byte{88, 156, 252}: "FreeBSD Foundation", + [3]byte{88, 162, 181}: "LG Electronics", + [3]byte{88, 167, 111}: "iD corporation", + [3]byte{88, 176, 53}: "Apple", + [3]byte{88, 176, 212}: "ZuniData Systems Inc.", + [3]byte{88, 185, 97}: "SOLEM Electronique", + [3]byte{88, 185, 225}: "Crystalfontz America, Inc.", + [3]byte{88, 188, 39}: "CISCO SYSTEMS, INC.", + [3]byte{88, 189, 163}: "Nintendo Co., Ltd.", + [3]byte{88, 189, 249}: "Sigrand", + [3]byte{88, 191, 234}: "CISCO SYSTEMS, INC.", + [3]byte{88, 194, 50}: "NEC Corporation", + [3]byte{88, 195, 139}: "Samsung Electronics", + [3]byte{88, 207, 75}: "Lufkin Industries", + [3]byte{88, 208, 113}: "BW Broadcast", + [3]byte{88, 208, 143}: "IEEE 1904.1 Working Group", + [3]byte{88, 214, 211}: "Dairy Cheq Inc", + [3]byte{88, 219, 141}: "Fast Co., Ltd.", + [3]byte{88, 224, 44}: "Micro Technic A/S", + [3]byte{88, 227, 38}: "Compass Technologies Inc.", + [3]byte{88, 228, 118}: "CENTRON COMMUNICATIONS TECHNOLOGIES FUJIAN CO.,LTD", + [3]byte{88, 230, 54}: "EVRsafe Technologies", + [3]byte{88, 231, 71}: "Deltanet AG", + [3]byte{88, 232, 8}: "AUTONICS CORPORATION", + [3]byte{88, 235, 20}: "Proteus Digital Health", + [3]byte{88, 236, 225}: "Newport Corporation", + [3]byte{88, 238, 206}: "Icon Time Systems", + [3]byte{88, 243, 135}: "HCCP", + [3]byte{88, 243, 156}: "Cisco", + [3]byte{88, 246, 123}: "Xia Men UnionCore Technology LTD.", + [3]byte{88, 246, 191}: "Kyoto University", + [3]byte{88, 249, 142}: "SECUDOS GmbH", + [3]byte{88, 252, 219}: "IEEE REGISTRATION AUTHORITY - Please see MAM public listing for more information.", + [3]byte{88, 253, 32}: "Bravida Sakerhet AB", + [3]byte{92, 2, 106}: "Applied Vision Corporation", + [3]byte{92, 7, 111}: "Thought Creator", + [3]byte{92, 10, 91}: "SAMSUNG ELECTRO-MECHANICS CO., LTD.", + [3]byte{92, 12, 187}: "CELIZION Inc.", + [3]byte{92, 14, 139}: "Motorola", + [3]byte{92, 17, 147}: "Seal One AG", + [3]byte{92, 20, 55}: "Thyssenkrupp Aufzugswerke GmbH", + [3]byte{92, 21, 21}: "ADVAN", + [3]byte{92, 21, 225}: "AIDC TECHNOLOGY (S) PTE LTD", + [3]byte{92, 22, 199}: "Big Switch Networks", + [3]byte{92, 23, 55}: "I-View Now, LLC.", + [3]byte{92, 23, 211}: "LGE", + [3]byte{92, 24, 181}: "Talon Communications", + [3]byte{92, 32, 208}: "Asoni Communication Co., Ltd.", + [3]byte{92, 34, 196}: "DAE EUN ELETRONICS CO., LTD", + [3]byte{92, 36, 121}: "Baltech AG", + [3]byte{92, 37, 76}: "Avire Global Pte Ltd", + [3]byte{92, 38, 10}: "Dell Inc.", + [3]byte{92, 42, 239}: "Open Access Pty Ltd", + [3]byte{92, 43, 245}: "Vivint", + [3]byte{92, 46, 89}: "Samsung Electronics Co.,Ltd", + [3]byte{92, 46, 210}: "ABC(XiSheng) Electronics Co.,Ltd", + [3]byte{92, 49, 62}: "Texas Instruments", + [3]byte{92, 51, 39}: "Spazio Italia srl", + [3]byte{92, 51, 92}: "Swissphone Telecom AG", + [3]byte{92, 51, 142}: "Alpha Networkc Inc.", + [3]byte{92, 53, 59}: "Compal Broadband Networks Inc.", + [3]byte{92, 53, 218}: "There Corporation Oy", + [3]byte{92, 54, 184}: "TCL King Electrical Appliances (Huizhou) Ltd.", + [3]byte{92, 56, 224}: "Shanghai Super Electronics Technology Co.,LTD", + [3]byte{92, 60, 39}: "Samsung Electronics Co.,Ltd", + [3]byte{92, 64, 88}: "Jefferson Audio Video Systems, Inc.", + [3]byte{92, 67, 210}: "HAZEMEYER", + [3]byte{92, 74, 38}: "Enguity Technology Corp", + [3]byte{92, 76, 169}: "Shenzhen Huawei Communication Technologies Co., Ltd", + [3]byte{92, 80, 21}: "CISCO SYSTEMS, INC.", + [3]byte{92, 81, 79}: "Intel Corporate", + [3]byte{92, 86, 237}: "3pleplay Electronics Private Limited", + [3]byte{92, 87, 26}: "ARRIS Group, Inc.", + [3]byte{92, 87, 200}: "Nokia Corporation", + [3]byte{92, 89, 72}: "Apple", + [3]byte{92, 91, 194}: "YIK Corporation", + [3]byte{92, 94, 171}: "Juniper Networks", + [3]byte{92, 99, 191}: "TP-LINK TECHNOLOGIES CO., LTD.", + [3]byte{92, 105, 132}: "NUVICO", + [3]byte{92, 106, 125}: "KENTKART EGE ELEKTRONIK SAN. VE TIC. LTD. STI.", + [3]byte{92, 107, 50}: "Texas Instruments", + [3]byte{92, 109, 32}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{92, 111, 79}: "S.A. SISTEL", + [3]byte{92, 119, 87}: "Haivision Network Video", + [3]byte{92, 125, 94}: "Huawei Technologies Co., Ltd", + [3]byte{92, 132, 134}: "Brightsource Industries Israel LTD", + [3]byte{92, 134, 74}: "Secret Labs LLC", + [3]byte{92, 135, 120}: "Cybertelbridge co.,ltd", + [3]byte{92, 137, 212}: "Beijing Banner Electric Co.,Ltd", + [3]byte{92, 141, 78}: "Apple", + [3]byte{92, 143, 224}: "ARRIS Group, Inc.", + [3]byte{92, 147, 162}: "Liteon Technology Corporation", + [3]byte{92, 149, 174}: "Apple", + [3]byte{92, 150, 106}: "RTNET", + [3]byte{92, 150, 157}: "Apple", + [3]byte{92, 151, 243}: "Apple", + [3]byte{92, 154, 216}: "Fujitsu Limited", + [3]byte{92, 163, 157}: "SAMSUNG ELECTRO-MECHANICS CO., LTD.", + [3]byte{92, 163, 235}: "Lokel s.r.o.", + [3]byte{92, 164, 138}: "Cisco", + [3]byte{92, 170, 253}: "Sonos, Inc.", + [3]byte{92, 172, 76}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{92, 181, 36}: "Sony Ericsson Mobile Communications AB", + [3]byte{92, 182, 204}: "NovaComm Technologies Inc.", + [3]byte{92, 184, 203}: "Allis Communications", + [3]byte{92, 189, 158}: "HONGKONG MIRACLE EAGLE TECHNOLOGY(GROUP) LIMITED", + [3]byte{92, 194, 19}: "Fr. Sauter AG", + [3]byte{92, 197, 212}: "Intel Corporate", + [3]byte{92, 198, 208}: "Skyworth Digital technology(shenzhen)co.ltd.", + [3]byte{92, 201, 211}: "PALLADIUM ENERGY ELETRONICA DA AMAZONIA LTDA", + [3]byte{92, 202, 50}: "Theben AG", + [3]byte{92, 206, 173}: "CDYNE Corporation", + [3]byte{92, 209, 53}: "Xtreme Power Systems", + [3]byte{92, 210, 228}: "Intel Corporate", + [3]byte{92, 212, 27}: "UCZOON Technology Co., LTD", + [3]byte{92, 212, 171}: "Zektor", + [3]byte{92, 214, 31}: "Qardio, Inc", + [3]byte{92, 217, 152}: "D-Link Corporation", + [3]byte{92, 218, 212}: "Murata Manufacturing Co., Ltd.", + [3]byte{92, 221, 112}: "Hangzhou H3C Technologies Co., Limited", + [3]byte{92, 224, 197}: "Intel Corporate", + [3]byte{92, 224, 202}: "FeiTian United (Beijing) System Technology Co., Ltd.", + [3]byte{92, 224, 246}: "NIC.br- Nucleo de Informacao e Coordenacao do Ponto BR", + [3]byte{92, 226, 35}: "Delphin Technology AG", + [3]byte{92, 226, 134}: "Nortel Networks", + [3]byte{92, 226, 244}: "AcSiP Technology Corp.", + [3]byte{92, 231, 191}: "New Singularity International Technical Development Co.,Ltd", + [3]byte{92, 232, 235}: "Samsung Electronics", + [3]byte{92, 235, 78}: "R. STAHL HMI Systems GmbH", + [3]byte{92, 238, 121}: "Global Digitech Co LTD", + [3]byte{92, 242, 7}: "Speco Technologies", + [3]byte{92, 243, 112}: "CC&C Technologies, Inc", + [3]byte{92, 243, 252}: "IBM Corp", + [3]byte{92, 244, 171}: "ZyXEL Communications Corp", + [3]byte{92, 245, 13}: "Institute of microelectronic applications", + [3]byte{92, 246, 220}: "Samsung Electronics Co.,LTD", + [3]byte{92, 248, 161}: "Murata Manufactuaring Co.,Ltd.", + [3]byte{92, 249, 56}: "Apple, Inc", + [3]byte{92, 249, 106}: "Huawei Technologies Co., Ltd", + [3]byte{92, 249, 221}: "Dell Inc", + [3]byte{92, 249, 240}: "Atomos Engineering P/L", + [3]byte{92, 255, 53}: "Wistron Corporation", + [3]byte{92, 255, 255}: "Shenzhen Kezhonglong Optoelectronic Technology Co., Ltd", + [3]byte{96, 2, 146}: "PEGATRON CORPORATION", + [3]byte{96, 2, 180}: "Wistron NeWeb Corp.", + [3]byte{96, 3, 8}: "Apple", + [3]byte{96, 3, 71}: "Billion Electric Co. Ltd.", + [3]byte{96, 4, 23}: "POSBANK CO.,LTD", + [3]byte{96, 15, 119}: "SilverPlus, Inc", + [3]byte{96, 17, 153}: "Siama Systems Inc", + [3]byte{96, 18, 131}: "Soluciones Tecnologicas para la Salud y el Bienestar SA", + [3]byte{96, 21, 199}: "IdaTech", + [3]byte{96, 25, 12}: "RRAMAC", + [3]byte{96, 25, 41}: "VOLTRONIC POWER TECHNOLOGY(SHENZHEN) CORP.", + [3]byte{96, 29, 15}: "Midnite Solar", + [3]byte{96, 30, 2}: "EltexAlatau", + [3]byte{96, 33, 3}: "STCUBE.INC", + [3]byte{96, 33, 192}: "Murata Manufactuaring Co.,Ltd.", + [3]byte{96, 36, 193}: "Jiangsu Zhongxun Electronic Technology Co., Ltd", + [3]byte{96, 42, 84}: "CardioTek B.V.", + [3]byte{96, 42, 208}: "Cisco SPVTG", + [3]byte{96, 50, 240}: "Mplus technology", + [3]byte{96, 51, 75}: "Apple", + [3]byte{96, 53, 83}: "Buwon Technology", + [3]byte{96, 54, 150}: "The Sapling Company", + [3]byte{96, 54, 221}: "Intel Corporate", + [3]byte{96, 56, 14}: "Alps Electric Co.,", + [3]byte{96, 57, 31}: "ABB Ltd", + [3]byte{96, 63, 197}: "COX CO., LTD", + [3]byte{96, 68, 245}: "Easy Digital Ltd.", + [3]byte{96, 69, 94}: "Liptel s.r.o.", + [3]byte{96, 69, 189}: "Microsoft", + [3]byte{96, 70, 22}: "XIAMEN VANN INTELLIGENT CO., LTD", + [3]byte{96, 71, 212}: "FORICS Electronic Technology Co., Ltd.", + [3]byte{96, 72, 38}: "Newbridge Technologies Int. Ltd.", + [3]byte{96, 74, 28}: "SUYIN Corporation", + [3]byte{96, 80, 193}: "Kinetek Sports", + [3]byte{96, 81, 44}: "TCT mobile limited", + [3]byte{96, 82, 208}: "FACTS Engineering", + [3]byte{96, 84, 100}: "Eyedro Green Solutions Inc.", + [3]byte{96, 87, 24}: "Intel Corporate", + [3]byte{96, 96, 31}: "SZ DJI TECHNOLOGY CO.,LTD", + [3]byte{96, 99, 253}: "Transcend Communication Beijing Co.,Ltd.", + [3]byte{96, 100, 161}: "RADiflow Ltd.", + [3]byte{96, 103, 32}: "Intel Corporate", + [3]byte{96, 105, 68}: "Apple, Inc", + [3]byte{96, 105, 155}: "isepos GmbH", + [3]byte{96, 107, 189}: "Samsung Electronics Co., LTD", + [3]byte{96, 108, 102}: "Intel Corporate", + [3]byte{96, 115, 92}: "Cisco", + [3]byte{96, 116, 141}: "Atmaca Elektronik", + [3]byte{96, 118, 136}: "Velodyne", + [3]byte{96, 119, 226}: "Samsung Electronics Co.,Ltd", + [3]byte{96, 129, 43}: "Custom Control Concepts", + [3]byte{96, 129, 249}: "Helium Systems, Inc", + [3]byte{96, 131, 178}: "GkWare e.K.", + [3]byte{96, 132, 59}: "Soladigm, Inc.", + [3]byte{96, 134, 69}: "Avery Weigh-Tronix, LLC", + [3]byte{96, 137, 60}: "Thermo Fisher Scientific P.O.A.", + [3]byte{96, 137, 177}: "Key Digital Systems", + [3]byte{96, 137, 183}: "KAEL MÜHENDİSLİK ELEKTRONİK TİCARET SANAYİ LİMİTED ŞİRKETİ", + [3]byte{96, 140, 43}: "Hanson Technology", + [3]byte{96, 141, 23}: "Sentrus Government Systems Division, Inc", + [3]byte{96, 143, 92}: "Samsung Electronics Co.,Ltd", + [3]byte{96, 144, 132}: "DSSD Inc", + [3]byte{96, 146, 23}: "Apple", + [3]byte{96, 150, 32}: "PRIVATE", + [3]byte{96, 153, 209}: "Vuzix / Lenovo", + [3]byte{96, 154, 164}: "GVI SECURITY INC.", + [3]byte{96, 158, 100}: "Vivonic GmbH", + [3]byte{96, 159, 157}: "CloudSwitch", + [3]byte{96, 161, 10}: "Samsung Electronics Co.,Ltd", + [3]byte{96, 164, 76}: "ASUSTek COMPUTER INC.", + [3]byte{96, 168, 254}: "Nokia Solutions and Networks", + [3]byte{96, 169, 176}: "Merchandising Technologies, Inc", + [3]byte{96, 177, 133}: "ATH system", + [3]byte{96, 179, 196}: "Elber Srl", + [3]byte{96, 182, 6}: "Phorus", + [3]byte{96, 182, 23}: "Fiberhome Telecommunication Tech.Co.,Ltd.", + [3]byte{96, 185, 51}: "Deutron Electronics Corp.", + [3]byte{96, 185, 130}: "RO.VE.R. Laboratories S.p.A.", + [3]byte{96, 187, 12}: "Beijing HuaqinWorld Technology Co,Ltd", + [3]byte{96, 188, 76}: "EWM Hightec Welding GmbH", + [3]byte{96, 189, 145}: "Move Innovation", + [3]byte{96, 190, 181}: "Motorola Mobility LLC", + [3]byte{96, 193, 203}: "Fujian Great Power PLC Equipment Co.,Ltd", + [3]byte{96, 195, 151}: "2Wire Inc", + [3]byte{96, 197, 71}: "Apple", + [3]byte{96, 197, 168}: "Beijing LT Honway Technology Co.,Ltd", + [3]byte{96, 199, 152}: "Verifone, Inc.", + [3]byte{96, 201, 128}: "Trymus", + [3]byte{96, 203, 251}: "AirScape Inc.", + [3]byte{96, 205, 169}: "Abloomy", + [3]byte{96, 205, 197}: "Taiwan Carol Electronics., Ltd", + [3]byte{96, 208, 169}: "Samsung Electronics Co.,Ltd", + [3]byte{96, 209, 170}: "Vishal Telecommunications Pvt Ltd", + [3]byte{96, 210, 185}: "REALAND BIO CO., LTD.", + [3]byte{96, 211, 10}: "Quatius Limited", + [3]byte{96, 216, 25}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{96, 217, 199}: "Apple", + [3]byte{96, 218, 35}: "Estech Co.,Ltd", + [3]byte{96, 219, 42}: "HNS", + [3]byte{96, 222, 68}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{96, 224, 14}: "SHINSEI ELECTRONICS CO LTD", + [3]byte{96, 227, 39}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{96, 231, 1}: "Huawei Technologies Co., Ltd", + [3]byte{96, 233, 86}: "Ayla Networks, Inc", + [3]byte{96, 235, 105}: "Quanta computer Inc.", + [3]byte{96, 241, 61}: "JABLOCOM s.r.o.", + [3]byte{96, 242, 129}: "TRANWO TECHNOLOGY CO., LTD.", + [3]byte{96, 242, 239}: "VisionVera International Co., Ltd.", + [3]byte{96, 243, 218}: "Logic Way GmbH", + [3]byte{96, 244, 148}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{96, 245, 156}: "CRU-Dataport", + [3]byte{96, 246, 115}: "TERUMO CORPORATION", + [3]byte{96, 250, 205}: "Apple", + [3]byte{96, 251, 66}: "Apple", + [3]byte{96, 254, 30}: "China Palms Telecom.Ltd", + [3]byte{96, 254, 32}: "2 Wire", + [3]byte{96, 254, 197}: "Apple", + [3]byte{96, 254, 249}: "Thomas & Betts", + [3]byte{96, 255, 221}: "C.E. ELECTRONICS, INC", + [3]byte{100, 0, 45}: "Powerlinq Co., LTD", + [3]byte{100, 0, 241}: "CISCO SYSTEMS, INC.", + [3]byte{100, 5, 190}: "NEW LIGHT LED", + [3]byte{100, 9, 76}: "Beijing Superbee Wireless Technology Co.,Ltd", + [3]byte{100, 9, 128}: "XIAOMI Electronics,CO.,LTD", + [3]byte{100, 11, 74}: "Digital Telecom Technology Limited", + [3]byte{100, 14, 54}: "TAZTAG", + [3]byte{100, 14, 148}: "Pluribus Networks, Inc.", + [3]byte{100, 15, 40}: "2wire", + [3]byte{100, 16, 132}: "HEXIUM Technical Development Co., Ltd.", + [3]byte{100, 18, 37}: "Cisco", + [3]byte{100, 22, 141}: "CISCO SYSTEMS, INC.", + [3]byte{100, 22, 240}: "Shehzhen Huawei Communication Technologies Co., Ltd.", + [3]byte{100, 26, 34}: "Heliospectra/Woodhill Investments", + [3]byte{100, 28, 103}: "DIGIBRAS INDUSTRIA DO BRASILS/A", + [3]byte{100, 30, 129}: "Dowslake Microsystems", + [3]byte{100, 32, 12}: "Apple", + [3]byte{100, 33, 132}: "Nippon Denki Kagaku Co.,LTD", + [3]byte{100, 34, 22}: "Shandong Taixin Electronic co.,Ltd", + [3]byte{100, 36, 0}: "Xorcom Ltd.", + [3]byte{100, 39, 55}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{100, 45, 183}: "SEUNGIL ELECTRONICS", + [3]byte{100, 49, 80}: "Hewlett-Packard Company", + [3]byte{100, 49, 126}: "Dexin Corporation", + [3]byte{100, 52, 9}: "BITwave Pte Ltd", + [3]byte{100, 62, 140}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{100, 63, 95}: "Exablaze", + [3]byte{100, 66, 20}: "Swisscom Energy Solutions AG", + [3]byte{100, 67, 70}: "GuangDong Quick Network Computer CO.,LTD", + [3]byte{100, 75, 195}: "Shanghai WOASiS Telecommunications Ltd., Co.", + [3]byte{100, 75, 240}: "CalDigit, Inc", + [3]byte{100, 77, 112}: "dSPACE GmbH", + [3]byte{100, 79, 116}: "LENUS Co., Ltd.", + [3]byte{100, 79, 176}: "Hyunjin.com", + [3]byte{100, 81, 6}: "Hewlett Packard", + [3]byte{100, 81, 126}: "LONG BEN (DONGGUAN) ELECTRONIC TECHNOLOGY CO.,LTD.", + [3]byte{100, 82, 153}: "The Chamberlain Group, Inc", + [3]byte{100, 83, 93}: "Frauscher Sensortechnik", + [3]byte{100, 84, 34}: "Equinox Payments", + [3]byte{100, 85, 99}: "Intelight Inc.", + [3]byte{100, 85, 127}: "NSFOCUS Information Technology Co., Ltd.", + [3]byte{100, 85, 177}: "ARRIS Group, Inc.", + [3]byte{100, 86, 1}: "TP-LINK TECHNOLOGIES CO.,LTD", + [3]byte{100, 90, 4}: "Chicony Electronics Co., Ltd.", + [3]byte{100, 93, 215}: "Shenzhen Lifesense Medical Electronics Co., Ltd.", + [3]byte{100, 94, 190}: "Yahoo! JAPAN", + [3]byte{100, 95, 255}: "Nicolet Neuro", + [3]byte{100, 98, 35}: "Cellient Co., Ltd.", + [3]byte{100, 100, 155}: "juniper networks", + [3]byte{100, 101, 192}: "Nuvon, Inc", + [3]byte{100, 102, 179}: "TP-LINK TECHNOLOGIES CO., LTD.", + [3]byte{100, 103, 7}: "Beijing Omnific Technology, Ltd.", + [3]byte{100, 104, 12}: "COMTREND", + [3]byte{100, 105, 188}: "Hytera Communications Co .,ltd", + [3]byte{100, 108, 178}: "Samsung Electronics Co.,Ltd", + [3]byte{100, 110, 108}: "Radio Datacom LLC", + [3]byte{100, 110, 234}: "Iskratel d.o.o.", + [3]byte{100, 112, 2}: "TP-LINK TECHNOLOGIES CO., LTD.", + [3]byte{100, 114, 216}: "GooWi Technology Co.,Limited", + [3]byte{100, 115, 226}: "Arbiter Systems, Inc.", + [3]byte{100, 118, 87}: "Innovative Security Designs", + [3]byte{100, 118, 186}: "Apple", + [3]byte{100, 119, 145}: "Samsung Electronics Co.,Ltd", + [3]byte{100, 123, 212}: "Texas Instruments", + [3]byte{100, 124, 52}: "Ubee Interactive Corp.", + [3]byte{100, 125, 129}: "YOKOTA INDUSTRIAL CO,.LTD", + [3]byte{100, 127, 218}: "TEKTELIC Communications Inc.", + [3]byte{100, 128, 139}: "VG Controls, Inc.", + [3]byte{100, 128, 153}: "Intel Corporate", + [3]byte{100, 129, 37}: "Alphatron Marine BV", + [3]byte{100, 135, 136}: "Juniper Networks", + [3]byte{100, 135, 215}: "Pirelli Tyre S.p.A.", + [3]byte{100, 136, 255}: "Sichuan Changhong Electric Ltd.", + [3]byte{100, 137, 154}: "LG Electronics", + [3]byte{100, 141, 158}: "IVT Electronic Co.,Ltd", + [3]byte{100, 153, 93}: "LGE", + [3]byte{100, 153, 104}: "Elentec", + [3]byte{100, 153, 160}: "AG Elektronik AB", + [3]byte{100, 155, 36}: "V Technology Co., Ltd.", + [3]byte{100, 156, 129}: "Qualcomm iSkoot, Inc.", + [3]byte{100, 156, 142}: "Texas Instruments", + [3]byte{100, 158, 243}: "CISCO SYSTEMS, INC.", + [3]byte{100, 159, 247}: "Kone OYj", + [3]byte{100, 160, 231}: "CISCO SYSTEMS, INC.", + [3]byte{100, 162, 50}: "OOO Samlight", + [3]byte{100, 163, 65}: "Wonderlan (Beijing) Technology Co., Ltd.", + [3]byte{100, 163, 203}: "Apple", + [3]byte{100, 167, 105}: "HTC Corporation", + [3]byte{100, 167, 221}: "Avaya, Inc", + [3]byte{100, 168, 55}: "Juni Korea Co., Ltd", + [3]byte{100, 174, 12}: "CISCO SYSTEMS, INC.", + [3]byte{100, 174, 136}: "Polytec GmbH", + [3]byte{100, 178, 29}: "Chengdu Phycom Tech Co., Ltd.", + [3]byte{100, 179, 16}: "Samsung Electronics Co.,Ltd", + [3]byte{100, 179, 112}: "PowerComm Solutons LLC", + [3]byte{100, 180, 115}: "Xiaomi inc.", + [3]byte{100, 182, 74}: "ViVOtech, Inc.", + [3]byte{100, 184, 83}: "Samsung Elec Co.,Ltd", + [3]byte{100, 185, 232}: "Apple", + [3]byte{100, 186, 189}: "SDJ Technologies, Inc.", + [3]byte{100, 188, 17}: "CombiQ AB", + [3]byte{100, 197, 170}: "South African Broadcasting Corporation", + [3]byte{100, 198, 103}: "Barnes&Noble", + [3]byte{100, 198, 175}: "AXERRA Networks Ltd", + [3]byte{100, 201, 68}: "LARK Technologies, Inc", + [3]byte{100, 208, 45}: "Next Generation Integration (NGI)", + [3]byte{100, 209, 163}: "Sitecom Europe BV", + [3]byte{100, 210, 65}: "Keith & Koep GmbH", + [3]byte{100, 212, 189}: "ALPS ELECTRIC CO.,LTD.", + [3]byte{100, 212, 218}: "Intel Corporate", + [3]byte{100, 216, 20}: "CISCO SYSTEMS, INC.", + [3]byte{100, 217, 18}: "Solidica, Inc.", + [3]byte{100, 217, 84}: "TAICANG AND W ELECTRONICS CO LTD", + [3]byte{100, 217, 137}: "CISCO SYSTEMS, INC.", + [3]byte{100, 219, 24}: "OpenPattern", + [3]byte{100, 220, 1}: "Static Systems Group PLC", + [3]byte{100, 222, 28}: "Kingnetic Pte Ltd", + [3]byte{100, 225, 97}: "DEP Corp.", + [3]byte{100, 229, 153}: "EFM Networks", + [3]byte{100, 230, 37}: "Woxu Wireless Co., Ltd", + [3]byte{100, 230, 130}: "Apple", + [3]byte{100, 232, 79}: "Serialway Communication Technology Co. Ltd", + [3]byte{100, 232, 146}: "Morio Denki Co., Ltd.", + [3]byte{100, 232, 230}: "global moisture management system", + [3]byte{100, 233, 80}: "Cisco", + [3]byte{100, 234, 197}: "SiboTech Automation Co., Ltd.", + [3]byte{100, 235, 140}: "Seiko Epson Corporation", + [3]byte{100, 237, 87}: "ARRIS Group, Inc.", + [3]byte{100, 237, 98}: "WOORI SYSTEMS Co., Ltd", + [3]byte{100, 242, 66}: "Gerdes Aktiengesellschaft", + [3]byte{100, 245, 14}: "Kinion Technology Company Limited", + [3]byte{100, 249, 112}: "Kenade Electronics Technology Co.,LTD.", + [3]byte{100, 249, 135}: "Avvasi Inc.", + [3]byte{100, 252, 140}: "Zonar Systems", + [3]byte{104, 5, 113}: "Samsung Electronics Co.,Ltd", + [3]byte{104, 5, 202}: "Intel Corporate", + [3]byte{104, 9, 39}: "Apple", + [3]byte{104, 10, 215}: "Yancheng Kecheng Optoelectronic Technology Co., Ltd", + [3]byte{104, 18, 45}: "Special Instrument Development Co., Ltd.", + [3]byte{104, 21, 144}: "SAGEMCOM SAS", + [3]byte{104, 21, 211}: "Zaklady Elektroniki i Mechaniki Precyzyjnej R&G S.A.", + [3]byte{104, 22, 5}: "Systems And Electronic Development FZCO", + [3]byte{104, 23, 41}: "Intel Corporate", + [3]byte{104, 25, 63}: "Digital Airways", + [3]byte{104, 26, 178}: "zte corporation", + [3]byte{104, 28, 162}: "Rosewill Inc.", + [3]byte{104, 29, 100}: "Sunwave Communications Co., Ltd", + [3]byte{104, 30, 139}: "InfoSight Corporation", + [3]byte{104, 31, 216}: "Advanced Telemetry", + [3]byte{104, 35, 75}: "Nihon Dengyo Kousaku", + [3]byte{104, 40, 186}: "Dejai", + [3]byte{104, 45, 220}: "Wuhan Changjiang Electro-Communication Equipment CO.,LTD", + [3]byte{104, 54, 181}: "DriveScale, Inc.", + [3]byte{104, 59, 30}: "Countwise LTD", + [3]byte{104, 62, 236}: "ERECA", + [3]byte{104, 67, 82}: "Bhuu Limited", + [3]byte{104, 72, 152}: "Samsung Electronics Co.,Ltd", + [3]byte{104, 75, 136}: "Galtronics Telemetry Inc.", + [3]byte{104, 76, 168}: "Shenzhen Herotel Tech. Co., Ltd.", + [3]byte{104, 81, 183}: "PowerCloud Systems, Inc.", + [3]byte{104, 84, 237}: "Alcatel-Lucent - Nuage", + [3]byte{104, 84, 245}: "enLighted Inc", + [3]byte{104, 89, 127}: "Alcatel Lucent", + [3]byte{104, 91, 53}: "Apple", + [3]byte{104, 91, 54}: "POWERTECH INDUSTRIAL CO., LTD.", + [3]byte{104, 93, 67}: "Intel Corporate", + [3]byte{104, 94, 107}: "PowerRay Co., Ltd.", + [3]byte{104, 99, 89}: "Advanced Digital Broadcast SA", + [3]byte{104, 105, 46}: "Zycoo Co.,Ltd", + [3]byte{104, 105, 242}: "ComAp s.r.o.", + [3]byte{104, 110, 35}: "Wi3 Inc.", + [3]byte{104, 110, 72}: "Prophet Electronic Technology Corp.,Ltd", + [3]byte{104, 114, 81}: "Ubiquiti Networks", + [3]byte{104, 114, 220}: "CETORY.TV Company Limited", + [3]byte{104, 118, 79}: "Sony Mobile Communications AB", + [3]byte{104, 120, 72}: "Westunitis Co., Ltd.", + [3]byte{104, 120, 76}: "Nortel Networks", + [3]byte{104, 121, 36}: "ELS-GmbH & Co. KG", + [3]byte{104, 121, 237}: "SHARP Corporation", + [3]byte{104, 124, 200}: "Measurement Systems S. de R.L.", + [3]byte{104, 124, 213}: "Y Soft Corporation, a.s.", + [3]byte{104, 127, 116}: "Cisco-Linksys, LLC", + [3]byte{104, 131, 26}: "Pandora Mobility Corporation", + [3]byte{104, 132, 112}: "eSSys Co.,Ltd", + [3]byte{104, 133, 64}: "IGI Mobile, Inc.", + [3]byte{104, 133, 106}: "OuterLink Corporation", + [3]byte{104, 134, 167}: "Cisco", + [3]byte{104, 134, 231}: "Orbotix, Inc.", + [3]byte{104, 135, 107}: "INQ Mobile Limited", + [3]byte{104, 138, 181}: "EDP Servicos", + [3]byte{104, 146, 52}: "Ruckus Wireless", + [3]byte{104, 148, 35}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{104, 150, 123}: "Apple", + [3]byte{104, 151, 75}: "Shenzhen Costar Electronics Co. Ltd.", + [3]byte{104, 151, 232}: "Society of Motion Picture & Television Engineers", + [3]byte{104, 153, 205}: "Cisco", + [3]byte{104, 156, 94}: "AcSiP Technology Corp.", + [3]byte{104, 156, 112}: "Apple", + [3]byte{104, 160, 246}: "Huawei Technologies Co., Ltd", + [3]byte{104, 161, 183}: "Honghao Mingchuan Technology (Beijing) CO.,Ltd.", + [3]byte{104, 163, 196}: "Liteon Technology Corporation", + [3]byte{104, 164, 14}: "BSH Bosch and Siemens Home Appliances GmbH", + [3]byte{104, 168, 109}: "Apple", + [3]byte{104, 170, 210}: "DATECS LTD.,", + [3]byte{104, 171, 138}: "RF IDeas", + [3]byte{104, 174, 32}: "Apple", + [3]byte{104, 175, 19}: "Futura Mobility", + [3]byte{104, 176, 148}: "INESA ELECTRON CO.,LTD", + [3]byte{104, 180, 58}: "WaterFurnace International, Inc.", + [3]byte{104, 181, 153}: "Hewlett-Packard Company", + [3]byte{104, 182, 252}: "Hitron Technologies. Inc", + [3]byte{104, 184, 217}: "Act KDE, Inc.", + [3]byte{104, 188, 12}: "CISCO SYSTEMS, INC.", + [3]byte{104, 189, 171}: "CISCO SYSTEMS, INC.", + [3]byte{104, 201, 11}: "Texas Instruments", + [3]byte{104, 202, 0}: "Octopus Systems Limited", + [3]byte{104, 204, 156}: "Mine Site Technologies", + [3]byte{104, 205, 15}: "U Tek Company Limited", + [3]byte{104, 206, 78}: "L-3 Communications Infrared Products", + [3]byte{104, 209, 253}: "Shenzhen Trimax Technology Co.,Ltd", + [3]byte{104, 210, 71}: "Portalis LC", + [3]byte{104, 217, 37}: "ProSys Development Services", + [3]byte{104, 217, 60}: "Apple", + [3]byte{104, 219, 103}: "Nantong Coship Electronics Co., Ltd", + [3]byte{104, 219, 150}: "OPWILL Technologies CO .,LTD", + [3]byte{104, 220, 232}: "PacketStorm Communications", + [3]byte{104, 223, 221}: "Xiaomi inc.", + [3]byte{104, 225, 102}: "PRIVATE", + [3]byte{104, 228, 31}: "Unglaube Identech GmbH", + [3]byte{104, 235, 174}: "Samsung Electronics Co.,Ltd", + [3]byte{104, 235, 197}: "Angstrem Telecom", + [3]byte{104, 236, 98}: "YODO Technology Corp. Ltd.", + [3]byte{104, 237, 67}: "Research In Motion", + [3]byte{104, 238, 150}: "Cisco SPVTG", + [3]byte{104, 239, 189}: "CISCO SYSTEMS, INC.", + [3]byte{104, 240, 109}: "ALONG INDUSTRIAL CO., LIMITED", + [3]byte{104, 241, 37}: "Data Controls Inc.", + [3]byte{104, 247, 40}: "LCFC(HeFei) Electronics Technology co., ltd", + [3]byte{104, 248, 149}: "Redflow Limited", + [3]byte{104, 251, 149}: "Generalplus Technology Inc.", + [3]byte{104, 252, 179}: "Next Level Security Systems, Inc.", + [3]byte{108, 2, 115}: "Shenzhen Jin Yun Video Equipment Co., Ltd.", + [3]byte{108, 4, 96}: "RBH Access Technologies Inc.", + [3]byte{108, 9, 214}: "Digiquest Electronics LTD", + [3]byte{108, 11, 132}: "Universal Global Scientific Industrial Co.,Ltd.", + [3]byte{108, 14, 13}: "Sony Ericsson Mobile Communications AB", + [3]byte{108, 15, 106}: "JDC Tech Co., Ltd.", + [3]byte{108, 20, 247}: "Erhardt+Leimer GmbH", + [3]byte{108, 21, 249}: "Nautronix Limited", + [3]byte{108, 24, 17}: "Decatur Electronics", + [3]byte{108, 25, 143}: "D-Link International", + [3]byte{108, 32, 86}: "Cisco", + [3]byte{108, 34, 171}: "Ainsworth Game Technology", + [3]byte{108, 35, 185}: "Sony Ericsson Mobile Communications AB", + [3]byte{108, 37, 185}: "BBK Electronics Corp., Ltd.,", + [3]byte{108, 41, 149}: "Intel Corporate", + [3]byte{108, 44, 6}: "OOO NPP Systemotechnika-NN", + [3]byte{108, 46, 51}: "Accelink Technologies Co.,Ltd.", + [3]byte{108, 46, 133}: "SAGEMCOM", + [3]byte{108, 47, 44}: "Samsung Electronics Co.,Ltd", + [3]byte{108, 50, 222}: "Indieon Technologies Pvt. Ltd.", + [3]byte{108, 51, 169}: "Magicjack LP", + [3]byte{108, 57, 29}: "Beijing ZhongHuaHun Network Information center", + [3]byte{108, 58, 132}: "Shenzhen Aero-Startech. Co.Ltd", + [3]byte{108, 59, 229}: "Hewlett Packard", + [3]byte{108, 60, 83}: "SoundHawk Corp", + [3]byte{108, 62, 109}: "Apple", + [3]byte{108, 62, 156}: "KE Knestel Elektronik GmbH", + [3]byte{108, 64, 8}: "Apple", + [3]byte{108, 64, 198}: "Nimbus Data Systems, Inc.", + [3]byte{108, 65, 106}: "Cisco", + [3]byte{108, 75, 127}: "Vossloh-Schwabe Deutschland GmbH", + [3]byte{108, 80, 77}: "CISCO SYSTEMS, INC.", + [3]byte{108, 87, 121}: "Aclima, Inc.", + [3]byte{108, 90, 52}: "Shenzhen Haitianxiong Electronic Co., Ltd.", + [3]byte{108, 90, 181}: "TCL Technoly Electronics (Huizhou) Co., Ltd.", + [3]byte{108, 92, 222}: "SunReports, Inc.", + [3]byte{108, 93, 99}: "ShenZhen Rapoo Technology Co., Ltd.", + [3]byte{108, 94, 122}: "Ubiquitous Internet Telecom Co., Ltd", + [3]byte{108, 95, 28}: "Lenovo Mobile Communication Technology Ltd.", + [3]byte{108, 97, 38}: "Rinicom Holdings", + [3]byte{108, 98, 109}: "Micro-Star INT'L CO., LTD", + [3]byte{108, 100, 26}: "Penguin Computing", + [3]byte{108, 110, 254}: "Core Logic Inc.", + [3]byte{108, 111, 24}: "Stereotaxis, Inc.", + [3]byte{108, 112, 57}: "Novar GmbH", + [3]byte{108, 112, 159}: "Apple", + [3]byte{108, 113, 217}: "AzureWave Technologies, Inc", + [3]byte{108, 118, 96}: "KYOCERA Corporation", + [3]byte{108, 129, 254}: "Mitsuba Corporation", + [3]byte{108, 131, 54}: "Samsung Electronics Co.,Ltd", + [3]byte{108, 131, 102}: "Nanjing SAC Power Grid Automation Co., Ltd.", + [3]byte{108, 134, 134}: "Technonia", + [3]byte{108, 136, 20}: "Intel Corporate", + [3]byte{108, 139, 47}: "zte corporation", + [3]byte{108, 140, 219}: "Otus Technologies Ltd", + [3]byte{108, 141, 101}: "Wireless Glue Networks, Inc.", + [3]byte{108, 144, 177}: "SanLogic Inc", + [3]byte{108, 146, 191}: "Inspur Electronic Information Industry Co.,Ltd.", + [3]byte{108, 148, 248}: "Apple", + [3]byte{108, 152, 235}: "Ocedo GmbH", + [3]byte{108, 153, 137}: "Cisco", + [3]byte{108, 154, 201}: "Valentine Research, Inc.", + [3]byte{108, 155, 2}: "Nokia Corporation", + [3]byte{108, 156, 233}: "Nimble Storage", + [3]byte{108, 156, 237}: "CISCO SYSTEMS, INC.", + [3]byte{108, 166, 130}: "EDAM information & communications", + [3]byte{108, 167, 128}: "Nokia Corporation", + [3]byte{108, 169, 6}: "Telefield Ltd", + [3]byte{108, 169, 111}: "TransPacket AS", + [3]byte{108, 170, 179}: "Ruckus Wireless", + [3]byte{108, 171, 77}: "Digital Payment Technologies", + [3]byte{108, 172, 96}: "Venetex Corp", + [3]byte{108, 173, 63}: "Hubbell Building Automation, Inc.", + [3]byte{108, 173, 239}: "KZ Broadband Technologies, Ltd.", + [3]byte{108, 173, 248}: "Azurewave Technologies, Inc.", + [3]byte{108, 174, 139}: "IBM Corporation", + [3]byte{108, 176, 206}: "NETGEAR", + [3]byte{108, 179, 17}: "Shenzhen Lianrui Electronics Co.,Ltd", + [3]byte{108, 179, 80}: "Anhui comhigher tech co.,ltd", + [3]byte{108, 183, 244}: "Samsung Electronics Co.,Ltd", + [3]byte{108, 190, 233}: "Alcatel-Lucent-IPD", + [3]byte{108, 191, 181}: "Noon Technology Co., Ltd", + [3]byte{108, 193, 210}: "ARRIS Group, Inc.", + [3]byte{108, 194, 23}: "Hewlett Packard", + [3]byte{108, 194, 107}: "Apple", + [3]byte{108, 208, 50}: "LG Electronics", + [3]byte{108, 209, 70}: "Smartek d.o.o.", + [3]byte{108, 209, 176}: "WING SING ELECTRONICS HONG KONG LIMITED", + [3]byte{108, 214, 138}: "LG Electronics Inc", + [3]byte{108, 220, 106}: "Promethean Limited", + [3]byte{108, 224, 176}: "SOUND4", + [3]byte{108, 228, 206}: "Villiger Security Solutions AG", + [3]byte{108, 232, 115}: "TP-LINK TECHNOLOGIES CO., LTD.", + [3]byte{108, 233, 7}: "Nokia Corporation", + [3]byte{108, 233, 131}: "Gastron Co., LTD.", + [3]byte{108, 236, 161}: "SHENZHEN CLOU ELECTRONICS CO. LTD.", + [3]byte{108, 236, 235}: "Texas Instruments", + [3]byte{108, 240, 73}: "GIGA-BYTE TECHNOLOGY CO.,LTD.", + [3]byte{108, 243, 115}: "Samsung Electronics Co.,Ltd", + [3]byte{108, 243, 127}: "Aruba Networks", + [3]byte{108, 249, 124}: "Nanoptix Inc.", + [3]byte{108, 250, 88}: "Avaya, Inc", + [3]byte{108, 250, 137}: "Cisco", + [3]byte{108, 250, 167}: "AMPAK Technology Inc.", + [3]byte{108, 253, 185}: "Proware Technologies Co Ltd.", + [3]byte{108, 255, 190}: "MPB Communications Inc.", + [3]byte{112, 2, 88}: "01DB-METRAVIB", + [3]byte{112, 5, 20}: "LG Electronics", + [3]byte{112, 11, 192}: "Dewav Technology Company", + [3]byte{112, 15, 199}: "SHENZHEN IKINLOOP TECHNOLOGY CO.,LTD.", + [3]byte{112, 15, 236}: "Poindus Systems Corp.", + [3]byte{112, 16, 92}: "Cisco", + [3]byte{112, 17, 36}: "Apple", + [3]byte{112, 20, 4}: "Limited Liability Company", + [3]byte{112, 24, 139}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{112, 26, 4}: "Liteon Tech Corp.", + [3]byte{112, 26, 237}: "ADVAS CO., LTD.", + [3]byte{112, 29, 127}: "Comtech Technology Co., Ltd.", + [3]byte{112, 35, 147}: "fos4X GmbH", + [3]byte{112, 37, 38}: "Alcatel-Lucent", + [3]byte{112, 37, 89}: "CyberTAN Technology, Inc.", + [3]byte{112, 43, 29}: "E-Domus International Limited", + [3]byte{112, 44, 31}: "Wisol", + [3]byte{112, 45, 209}: "Newings Communication CO., LTD.", + [3]byte{112, 47, 75}: "PolyVision Inc.", + [3]byte{112, 47, 151}: "Aava Mobile Oy", + [3]byte{112, 48, 24}: "Avaya, Inc", + [3]byte{112, 48, 93}: "Ubiquoss Inc", + [3]byte{112, 48, 94}: "Nanjing Zhongke Menglian Information Technology Co.,LTD", + [3]byte{112, 49, 135}: "ACX GmbH", + [3]byte{112, 50, 213}: "Athena Wireless Communications Inc", + [3]byte{112, 56, 17}: "Invensys Rail", + [3]byte{112, 56, 180}: "Low Tech Solutions", + [3]byte{112, 56, 238}: "Avaya, Inc", + [3]byte{112, 58, 216}: "Shenzhen Afoundry Electronic Co., Ltd", + [3]byte{112, 60, 57}: "SEAWING Kft", + [3]byte{112, 62, 172}: "Apple", + [3]byte{112, 65, 183}: "Edwards Lifesciences LLC", + [3]byte{112, 70, 66}: "CHYNG HONG ELECTRONIC CO., LTD.", + [3]byte{112, 74, 174}: "Xstream Flow (Pty) Ltd", + [3]byte{112, 74, 228}: "Rinstrum Pty Ltd", + [3]byte{112, 76, 237}: "TMRG, Inc.", + [3]byte{112, 78, 1}: "KWANGWON TECH CO., LTD.", + [3]byte{112, 82, 197}: "Avaya, Inc.", + [3]byte{112, 83, 63}: "Alfa Instrumentos Eletronicos Ltda.", + [3]byte{112, 84, 210}: "PEGATRON CORPORATION", + [3]byte{112, 84, 245}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{112, 86, 129}: "Apple", + [3]byte{112, 88, 18}: "Panasonic AVC Networks Company", + [3]byte{112, 89, 87}: "Medallion Instrumentation Systems", + [3]byte{112, 89, 134}: "OOO TTV", + [3]byte{112, 90, 182}: "COMPAL INFORMATION (KUNSHAN) CO., LTD.", + [3]byte{112, 91, 46}: "M2Communication Inc.", + [3]byte{112, 92, 173}: "Konami Gaming Inc", + [3]byte{112, 94, 170}: "Action Target, Inc.", + [3]byte{112, 96, 222}: "LaVision GmbH", + [3]byte{112, 97, 115}: "Calantec GmbH", + [3]byte{112, 98, 184}: "D-Link International", + [3]byte{112, 100, 23}: "ORBIS TECNOLOGIA ELECTRICA S.A.", + [3]byte{112, 101, 130}: "Suzhou Hanming Technologies Co., Ltd.", + [3]byte{112, 111, 129}: "PRIVATE", + [3]byte{112, 112, 76}: "Purple Communications, Inc", + [3]byte{112, 113, 179}: "Brain Corporation", + [3]byte{112, 113, 188}: "PEGATRON CORPORATION", + [3]byte{112, 114, 13}: "Lenovo Mobile Communication Technology Ltd.", + [3]byte{112, 114, 60}: "Huawei Technologies Co., Ltd", + [3]byte{112, 114, 207}: "EdgeCore Networks", + [3]byte{112, 115, 203}: "Apple", + [3]byte{112, 118, 48}: "Pace plc.", + [3]byte{112, 118, 221}: "Oxyguard International A/S", + [3]byte{112, 118, 240}: "LevelOne Communications (India) Private Limited", + [3]byte{112, 118, 255}: "KERLINK", + [3]byte{112, 123, 232}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{112, 124, 24}: "ADATA Technology Co., Ltd", + [3]byte{112, 126, 67}: "ARRIS Group, Inc.", + [3]byte{112, 126, 222}: "NASTEC LTD.", + [3]byte{112, 129, 5}: "CISCO SYSTEMS, INC.", + [3]byte{112, 130, 14}: "as electronics GmbH", + [3]byte{112, 130, 142}: "OleumTech Corporation", + [3]byte{112, 133, 198}: "Pace plc.", + [3]byte{112, 139, 120}: "citygrow technology co., ltd", + [3]byte{112, 141, 9}: "Nokia Corporation", + [3]byte{112, 147, 131}: "Intelligent Optical Network High Tech CO.,LTD.", + [3]byte{112, 147, 248}: "Space Monkey, Inc.", + [3]byte{112, 151, 86}: "Happyelectronics Co.,Ltd", + [3]byte{112, 154, 11}: "Italian Institute of Technology", + [3]byte{112, 155, 165}: "Shenzhen Y&D Electronics Co.,LTD.", + [3]byte{112, 155, 252}: "Bryton Inc.", + [3]byte{112, 158, 41}: "Sony Computer Entertainment Inc.", + [3]byte{112, 158, 134}: "X6D Limited", + [3]byte{112, 161, 145}: "Trendsetter Medical, LLC", + [3]byte{112, 164, 28}: "Advanced Wireless Dynamics S.L.", + [3]byte{112, 166, 106}: "Prox Dynamics AS", + [3]byte{112, 168, 227}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{112, 170, 178}: "Research In Motion", + [3]byte{112, 175, 37}: "Nishiyama Industry Co.,LTD.", + [3]byte{112, 176, 53}: "Shenzhen Zowee Technology Co., Ltd", + [3]byte{112, 176, 140}: "Shenou Communication Equipment Co.,Ltd", + [3]byte{112, 177, 78}: "Pace plc", + [3]byte{112, 178, 101}: "Hiltron s.r.l.", + [3]byte{112, 179, 213}: "IEEE REGISTRATION AUTHORITY - Please see OUI36 public listing for more information.", + [3]byte{112, 181, 153}: "Embedded Technologies s.r.o.", + [3]byte{112, 185, 33}: "FiberHome Telecommunication Technologies CO.,LTD", + [3]byte{112, 186, 239}: "Hangzhou H3C Technologies Co., Limited", + [3]byte{112, 198, 172}: "Bosch Automotive Aftermarket", + [3]byte{112, 202, 155}: "CISCO SYSTEMS, INC.", + [3]byte{112, 205, 96}: "Apple", + [3]byte{112, 212, 242}: "RIM", + [3]byte{112, 213, 126}: "Scalar Corporation", + [3]byte{112, 213, 231}: "Wellcore Corporation", + [3]byte{112, 214, 182}: "Metrum Technologies", + [3]byte{112, 216, 128}: "Upos System sp. z o.o.", + [3]byte{112, 221, 161}: "Tellabs", + [3]byte{112, 222, 226}: "Apple", + [3]byte{112, 224, 39}: "HONGYU COMMUNICATION TECHNOLOGY LIMITED", + [3]byte{112, 225, 57}: "3view Ltd", + [3]byte{112, 226, 76}: "SAE IT-systems GmbH & Co. KG", + [3]byte{112, 226, 132}: "Wistron InfoComm(Zhongshan) Corporation", + [3]byte{112, 232, 67}: "Beijing C&W Optical Communication Technology Co.,Ltd.", + [3]byte{112, 238, 80}: "Netatmo", + [3]byte{112, 241, 118}: "Data Modul AG", + [3]byte{112, 241, 150}: "Actiontec Electronics, Inc", + [3]byte{112, 241, 161}: "Liteon Technology Corporation", + [3]byte{112, 241, 229}: "Xetawave LLC", + [3]byte{112, 243, 149}: "Universal Global Scientific Industrial Co., Ltd.", + [3]byte{112, 249, 39}: "Samsung Electronics", + [3]byte{112, 249, 109}: "Hangzhou H3C Technologies Co., Limited", + [3]byte{112, 252, 140}: "OneAccess SA", + [3]byte{112, 255, 92}: "Cheerzing Communication(Xiamen)Technology Co.,Ltd", + [3]byte{112, 255, 118}: "Texas Instruments", + [3]byte{116, 10, 188}: "JSJS Designs (Europe) Limited", + [3]byte{116, 14, 219}: "Optowiz Co., Ltd", + [3]byte{116, 20, 137}: "SRT Wireless", + [3]byte{116, 21, 226}: "Tri-Sen Systems Corporation", + [3]byte{116, 25, 248}: "IEEE REGISTRATION AUTHORITY - Please see MAM public listing for more information.", + [3]byte{116, 30, 147}: "Fiberhome Telecommunication Tech.Co.,Ltd.", + [3]byte{116, 37, 138}: "Hangzhou H3C Technologies Co., Limited", + [3]byte{116, 38, 172}: "Cisco", + [3]byte{116, 39, 60}: "ChangYang Technology (Nanjing) Co., LTD", + [3]byte{116, 39, 234}: "Elitegroup Computer Systems Co., Ltd.", + [3]byte{116, 41, 175}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{116, 43, 15}: "Infinidat Ltd.", + [3]byte{116, 43, 98}: "Fujitsu Limited", + [3]byte{116, 45, 10}: "Norfolk Elektronik AG", + [3]byte{116, 47, 104}: "Azurewave Technologies, Inc.", + [3]byte{116, 49, 112}: "Arcadyan Technology Corporation", + [3]byte{116, 50, 86}: "NT-ware Systemprg GmbH", + [3]byte{116, 55, 47}: "Tongfang Shenzhen Cloudcomputing Technology Co.,Ltd", + [3]byte{116, 56, 137}: "ANNAX Anzeigesysteme GmbH", + [3]byte{116, 62, 203}: "Gentrice tech", + [3]byte{116, 68, 1}: "NETGEAR", + [3]byte{116, 69, 138}: "Samsung Electronics Co.,Ltd", + [3]byte{116, 70, 160}: "Hewlett Packard", + [3]byte{116, 75, 233}: "EXPLORER HYPERTECH CO.,LTD", + [3]byte{116, 77, 121}: "Arrive Systems Inc.", + [3]byte{116, 83, 39}: "COMMSEN CO., LIMITED", + [3]byte{116, 84, 125}: "Cisco SPVTG", + [3]byte{116, 86, 18}: "ARRIS Group, Inc.", + [3]byte{116, 87, 152}: "TRUMPF Laser GmbH + Co. KG", + [3]byte{116, 92, 159}: "TCT mobile ltd.", + [3]byte{116, 94, 28}: "PIONEER CORPORATION", + [3]byte{116, 95, 0}: "Samsung Semiconductor Inc.", + [3]byte{116, 95, 174}: "TSL PPL", + [3]byte{116, 99, 223}: "VTS GmbH", + [3]byte{116, 101, 209}: "Atlinks", + [3]byte{116, 102, 48}: "T:mi Ytti", + [3]byte{116, 106, 137}: "Rezolt Corporation", + [3]byte{116, 106, 143}: "VS Vision Systems GmbH", + [3]byte{116, 107, 130}: "MOVEK", + [3]byte{116, 111, 61}: "Contec GmbH", + [3]byte{116, 114, 242}: "Chipsip Technology Co., Ltd.", + [3]byte{116, 117, 72}: "Amazon Technologies Inc.", + [3]byte{116, 120, 24}: "ServiceAssure", + [3]byte{116, 123, 122}: "ETH Inc.", + [3]byte{116, 125, 182}: "Aliwei Communications, Inc", + [3]byte{116, 126, 26}: "Red Embedded Design Limited", + [3]byte{116, 126, 45}: "Beijing Thomson CITIC Digital Technology Co. LTD.", + [3]byte{116, 134, 122}: "Dell Inc", + [3]byte{116, 136, 42}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{116, 136, 139}: "ADB Broadband Italia", + [3]byte{116, 142, 8}: "Bestek Corp.", + [3]byte{116, 142, 248}: "Brocade Communications Systems, Inc.", + [3]byte{116, 143, 27}: "MasterImage 3D", + [3]byte{116, 143, 77}: "MEN Mikro Elektronik GmbH", + [3]byte{116, 144, 80}: "Renesas Electronics Corporation", + [3]byte{116, 145, 26}: "Ruckus Wireless", + [3]byte{116, 147, 164}: "Zebra Technologies Corp.", + [3]byte{116, 148, 61}: "AgJunction", + [3]byte{116, 153, 117}: "IBM Corporation", + [3]byte{116, 156, 82}: "Huizhou Desay SV Automotive Co., Ltd.", + [3]byte{116, 157, 220}: "2Wire", + [3]byte{116, 164, 167}: "QRS Music Technologies, Inc.", + [3]byte{116, 164, 181}: "Powerleader Science and Technology Co. Ltd.", + [3]byte{116, 167, 34}: "LG Electronics", + [3]byte{116, 173, 183}: "China Mobile Group Device Co.,Ltd.", + [3]byte{116, 174, 118}: "iNovo Broadband, Inc.", + [3]byte{116, 176, 12}: "Network Video Technologies, Inc", + [3]byte{116, 185, 235}: "Fujian JinQianMao Electronic Technology Co.,Ltd", + [3]byte{116, 186, 219}: "Longconn Electornics(shenzhen)Co.,Ltd", + [3]byte{116, 190, 8}: "ATEK Products, LLC", + [3]byte{116, 191, 161}: "HYUNTECK", + [3]byte{116, 198, 33}: "Zhejiang Hite Renewable Energy Co.,LTD", + [3]byte{116, 201, 154}: "Ericsson AB", + [3]byte{116, 202, 37}: "Calxeda, Inc.", + [3]byte{116, 205, 12}: "Smith Myers Communications Ltd.", + [3]byte{116, 206, 86}: "Packet Force Technology Limited Company", + [3]byte{116, 208, 43}: "ASUSTek COMPUTER INC.", + [3]byte{116, 208, 220}: "ERICSSON AB", + [3]byte{116, 212, 53}: "GIGA-BYTE TECHNOLOGY CO.,LTD.", + [3]byte{116, 214, 117}: "WYMA Tecnologia", + [3]byte{116, 216, 80}: "Evrisko Systems", + [3]byte{116, 218, 56}: "Edimax Technology Co. Ltd.", + [3]byte{116, 219, 209}: "Ebay Inc", + [3]byte{116, 222, 43}: "Liteon Technology Corporation", + [3]byte{116, 224, 110}: "Ergophone GmbH", + [3]byte{116, 225, 74}: "IEEE REGISTRATION AUTHORITY - Please see MAM public listing for more information.", + [3]byte{116, 225, 182}: "Apple", + [3]byte{116, 226, 245}: "Apple", + [3]byte{116, 228, 36}: "APISTE CORPORATION", + [3]byte{116, 229, 11}: "Intel Corporate", + [3]byte{116, 229, 55}: "RADSPIN", + [3]byte{116, 229, 67}: "Liteon Technology Corporation", + [3]byte{116, 230, 226}: "Dell Inc.", + [3]byte{116, 231, 198}: "ARRIS Group, Inc.", + [3]byte{116, 234, 58}: "TP-LINK Technologies Co.,Ltd.", + [3]byte{116, 236, 241}: "Acumen", + [3]byte{116, 240, 109}: "AzureWave Technologies, Inc.", + [3]byte{116, 240, 125}: "BnCOM Co.,Ltd", + [3]byte{116, 241, 2}: "Beijing HCHCOM Technology Co., Ltd", + [3]byte{116, 244, 19}: "Maxwell Forest", + [3]byte{116, 246, 18}: "ARRIS Group, Inc.", + [3]byte{116, 247, 38}: "Neuron Robotics", + [3]byte{116, 248, 93}: "Berkeley Nucleonics Corp", + [3]byte{116, 253, 160}: "Compupal (Group) Corporation", + [3]byte{116, 254, 72}: "ADVANTECH CO., LTD.", + [3]byte{116, 255, 125}: "Wren Sound Systems, LLC", + [3]byte{120, 2, 143}: "Adaptive Spectrum and Signal Alignment (ASSIA), Inc.", + [3]byte{120, 7, 56}: "Z.U.K. Elzab S.A.", + [3]byte{120, 17, 133}: "NBS Payment Solutions Inc.", + [3]byte{120, 18, 184}: "ORANTEK LIMITED", + [3]byte{120, 24, 129}: "AzureWave Technologies, Inc.", + [3]byte{120, 25, 46}: "NASCENT Technology", + [3]byte{120, 25, 247}: "Juniper Networks", + [3]byte{120, 28, 90}: "SHARP Corporation", + [3]byte{120, 29, 186}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{120, 29, 253}: "Jabil Inc", + [3]byte{120, 31, 219}: "Samsung Electronics Co.,Ltd", + [3]byte{120, 34, 61}: "Affirmed Networks", + [3]byte{120, 36, 175}: "ASUSTek COMPUTER INC.", + [3]byte{120, 37, 68}: "Omnima Limited", + [3]byte{120, 37, 173}: "SAMSUNG ELECTRONICS CO., LTD.", + [3]byte{120, 43, 203}: "Dell Inc", + [3]byte{120, 46, 239}: "Nokia Corporation", + [3]byte{120, 48, 59}: "Stephen Technologies Co.,Limited", + [3]byte{120, 48, 225}: "UltraClenz, LLC", + [3]byte{120, 49, 43}: "zte corporation", + [3]byte{120, 49, 193}: "Apple", + [3]byte{120, 50, 79}: "Millennium Group, Inc.", + [3]byte{120, 58, 132}: "Apple", + [3]byte{120, 60, 227}: "Kai-EE", + [3]byte{120, 61, 91}: "TELNET Redes Inteligentes S.A.", + [3]byte{120, 62, 83}: "BSkyB Ltd", + [3]byte{120, 63, 21}: "EasySYNC Ltd.", + [3]byte{120, 68, 5}: "FUJITU(HONG KONG) ELECTRONIC Co.,LTD.", + [3]byte{120, 68, 118}: "Zioncom technology co.,ltd", + [3]byte{120, 69, 97}: "CyberTAN Technology Inc.", + [3]byte{120, 69, 196}: "Dell Inc", + [3]byte{120, 70, 196}: "DAEHAP HYPER-TECH", + [3]byte{120, 71, 29}: "Samsung Electronics Co.,Ltd", + [3]byte{120, 72, 89}: "Hewlett Packard", + [3]byte{120, 73, 29}: "The Will-Burt Company", + [3]byte{120, 75, 8}: "f.robotics acquisitions ltd", + [3]byte{120, 75, 135}: "Murata Manufacturing Co.,Ltd.", + [3]byte{120, 81, 12}: "LiveU Ltd.", + [3]byte{120, 82, 26}: "Samsung Electronics Co.,Ltd", + [3]byte{120, 82, 98}: "Shenzhen Hojy Software Co., Ltd.", + [3]byte{120, 84, 46}: "D-Link International", + [3]byte{120, 85, 23}: "SankyuElectronics", + [3]byte{120, 87, 18}: "Mobile Integration Workgroup", + [3]byte{120, 89, 62}: "RAFI GmbH & Co.KG", + [3]byte{120, 89, 94}: "Samsung Electronics Co.,Ltd", + [3]byte{120, 89, 104}: "Hon Hai Precision Ind.Co.,Ltd.", + [3]byte{120, 92, 114}: "Hioso Technology Co., Ltd.", + [3]byte{120, 97, 124}: "MITSUMI ELECTRIC CO.,LTD", + [3]byte{120, 102, 174}: "ZTEC Instruments, Inc.", + [3]byte{120, 106, 137}: "Huawei Technologies Co., Ltd", + [3]byte{120, 108, 28}: "Apple", + [3]byte{120, 127, 98}: "GiK mbH", + [3]byte{120, 129, 143}: "Server Racks Australia Pty Ltd", + [3]byte{120, 132, 60}: "Sony Corporation", + [3]byte{120, 132, 238}: "INDRA ESPACIO S.A.", + [3]byte{120, 137, 115}: "CMC", + [3]byte{120, 140, 84}: "Eltek Technologies LTD", + [3]byte{120, 141, 247}: "Hitron Technologies. Inc", + [3]byte{120, 146, 62}: "Nokia Corporation", + [3]byte{120, 146, 156}: "Intel Corporate", + [3]byte{120, 150, 132}: "ARRIS Group, Inc.", + [3]byte{120, 152, 253}: "Q9 Networks Inc.", + [3]byte{120, 153, 92}: "Nationz Technologies Inc", + [3]byte{120, 153, 102}: "Musilab Electronics (DongGuan)Co.,Ltd.", + [3]byte{120, 153, 143}: "MEDILINE ITALIA SRL", + [3]byte{120, 156, 231}: "Shenzhen Aikede Technology Co., Ltd", + [3]byte{120, 158, 208}: "Samsung Electronics", + [3]byte{120, 159, 76}: "HOERBIGER Elektronik GmbH", + [3]byte{120, 159, 135}: "Siemens AG I IA PP PRM", + [3]byte{120, 160, 81}: "iiNet Labs Pty Ltd", + [3]byte{120, 161, 6}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{120, 161, 131}: "Advidia", + [3]byte{120, 162, 160}: "Nintendo Co., Ltd.", + [3]byte{120, 163, 228}: "Apple", + [3]byte{120, 165, 4}: "Texas Instruments", + [3]byte{120, 165, 221}: "Shenzhen Smarteye Digital Electronics Co., Ltd", + [3]byte{120, 166, 131}: "Precidata", + [3]byte{120, 166, 189}: "DAEYEON Control&Instrument Co,.Ltd", + [3]byte{120, 167, 20}: "Amphenol", + [3]byte{120, 168, 115}: "Samsung Electronics Co.,Ltd", + [3]byte{120, 171, 96}: "ABB Australia", + [3]byte{120, 171, 187}: "Samsung Electronics Co.,LTD", + [3]byte{120, 172, 192}: "Hewlett-Packard Company", + [3]byte{120, 174, 12}: "Far South Networks", + [3]byte{120, 179, 185}: "ShangHai sunup lighting CO.,LTD", + [3]byte{120, 179, 206}: "Elo touch solutions", + [3]byte{120, 181, 210}: "Ever Treasure Industrial Limited", + [3]byte{120, 182, 193}: "AOBO Telecom Co.,Ltd", + [3]byte{120, 184, 26}: "INTER SALES A/S", + [3]byte{120, 186, 208}: "Shinybow Technology Co. Ltd.", + [3]byte{120, 190, 182}: "Enhanced Vision", + [3]byte{120, 190, 189}: "STULZ GmbH", + [3]byte{120, 196, 14}: "H&D Wireless", + [3]byte{120, 196, 171}: "Shenzhen Runsil Technology Co.,Ltd", + [3]byte{120, 197, 229}: "Texas Instruments", + [3]byte{120, 198, 187}: "Innovasic, Inc.", + [3]byte{120, 202, 4}: "Nokia Corporation", + [3]byte{120, 202, 57}: "Apple", + [3]byte{120, 202, 94}: "ELNO", + [3]byte{120, 203, 51}: "DHC Software Co.,Ltd", + [3]byte{120, 205, 142}: "SMC Networks Inc", + [3]byte{120, 208, 4}: "Neousys Technology Inc.", + [3]byte{120, 209, 41}: "Vicos", + [3]byte{120, 211, 79}: "Pace-O-Matic, Inc.", + [3]byte{120, 211, 141}: "HONGKONG YUNLINK TECHNOLOGY LIMITED", + [3]byte{120, 213, 181}: "NAVIELEKTRO KY", + [3]byte{120, 214, 111}: "Aristocrat Technologies Australia Pty. Ltd.", + [3]byte{120, 214, 240}: "Samsung Electro Mechanics", + [3]byte{120, 215, 82}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{120, 217, 159}: "NuCom HK Ltd.", + [3]byte{120, 218, 110}: "Cisco", + [3]byte{120, 218, 179}: "GBO Technology", + [3]byte{120, 221, 8}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{120, 221, 214}: "c-scape", + [3]byte{120, 222, 228}: "Texas Instruments", + [3]byte{120, 227, 181}: "Hewlett-Packard Company", + [3]byte{120, 228, 0}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{120, 231, 209}: "Hewlett-Packard Company", + [3]byte{120, 232, 182}: "zte corporation", + [3]byte{120, 235, 20}: "SHENZHEN FAST TECHNOLOGIES CO.,LTD", + [3]byte{120, 236, 34}: "Shanghai Qihui Telecom Technology Co., LTD", + [3]byte{120, 236, 116}: "Kyland-USA", + [3]byte{120, 239, 76}: "Unetconvergence Co., Ltd.", + [3]byte{120, 245, 229}: "BEGA Gantenbrink-Leuchten KG", + [3]byte{120, 245, 253}: "Huawei Technologies Co., Ltd", + [3]byte{120, 247, 190}: "Samsung Electronics Co.,Ltd", + [3]byte{120, 247, 208}: "Silverbrook Research", + [3]byte{120, 253, 148}: "Apple", + [3]byte{120, 254, 61}: "Juniper Networks", + [3]byte{120, 254, 65}: "Socus networks", + [3]byte{120, 254, 226}: "Shanghai Diveo Technology Co., Ltd", + [3]byte{120, 255, 87}: "Intel Corporate", + [3]byte{124, 1, 135}: "Curtis Instruments, Inc.", + [3]byte{124, 2, 188}: "Hansung Electronics Co. LTD", + [3]byte{124, 3, 76}: "SAGEMCOM", + [3]byte{124, 3, 216}: "SAGEMCOM SAS", + [3]byte{124, 5, 7}: "PEGATRON CORPORATION", + [3]byte{124, 5, 30}: "RAFAEL LTD.", + [3]byte{124, 6, 35}: "Ultra Electronics, CIS", + [3]byte{124, 8, 217}: "Shanghai B-Star Technology Co", + [3]byte{124, 9, 43}: "Bekey A/S", + [3]byte{124, 10, 80}: "J-MEX Inc.", + [3]byte{124, 14, 206}: "Cisco", + [3]byte{124, 17, 190}: "Apple", + [3]byte{124, 20, 118}: "Damall Technologies SAS", + [3]byte{124, 22, 13}: "Saia-Burgess Controls AG", + [3]byte{124, 26, 3}: "8Locations Co., Ltd.", + [3]byte{124, 26, 252}: "Dalian Co-Edifice Video Technology Co., Ltd", + [3]byte{124, 30, 82}: "Microsoft", + [3]byte{124, 30, 179}: "2N TELEKOMUNIKACE a.s.", + [3]byte{124, 32, 72}: "KoamTac", + [3]byte{124, 32, 100}: "Alcatel Lucent IPD", + [3]byte{124, 37, 135}: "chaowifi.com", + [3]byte{124, 44, 243}: "Secure Electrans Ltd", + [3]byte{124, 46, 13}: "Blackmagic Design", + [3]byte{124, 47, 128}: "Gigaset Communications GmbH", + [3]byte{124, 51, 110}: "MEG Electronics Inc.", + [3]byte{124, 56, 108}: "Real Time Logic", + [3]byte{124, 57, 32}: "SSOMA SECURITY", + [3]byte{124, 59, 213}: "Imago Group", + [3]byte{124, 62, 157}: "PATECH", + [3]byte{124, 67, 143}: "E-Band Communications Corp.", + [3]byte{124, 68, 76}: "Entertainment Solutions, S.L.", + [3]byte{124, 73, 185}: "Plexus Manufacturing Sdn Bhd", + [3]byte{124, 74, 130}: "Portsmith LLC", + [3]byte{124, 74, 168}: "MindTree Wireless PVT Ltd", + [3]byte{124, 75, 120}: "Red Sun Synthesis Pte Ltd", + [3]byte{124, 76, 88}: "Scale Computing, Inc.", + [3]byte{124, 76, 165}: "BSkyB Ltd", + [3]byte{124, 79, 181}: "Arcadyan Technology Corporation", + [3]byte{124, 85, 231}: "YSI, Inc.", + [3]byte{124, 96, 151}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{124, 97, 147}: "HTC Corporation", + [3]byte{124, 102, 157}: "Texas Instruments", + [3]byte{124, 105, 246}: "Cisco", + [3]byte{124, 106, 179}: "IBC TECHNOLOGIES INC.", + [3]byte{124, 106, 195}: "GatesAir, Inc", + [3]byte{124, 106, 219}: "SafeTone Technology Co.,Ltd", + [3]byte{124, 107, 51}: "Tenyu Tech Co. Ltd.", + [3]byte{124, 107, 82}: "Tigaro Wireless", + [3]byte{124, 108, 57}: "PIXSYS SRL", + [3]byte{124, 108, 143}: "AMS NEVE LTD", + [3]byte{124, 109, 98}: "Apple", + [3]byte{124, 109, 248}: "Apple", + [3]byte{124, 111, 6}: "Caterpillar Trimble Control Technologies", + [3]byte{124, 111, 248}: "ShenZhen ACTO Digital Video Technology Co.,Ltd.", + [3]byte{124, 112, 188}: "IEEE REGISTRATION AUTHORITY - Please see MAM public listing for more information.", + [3]byte{124, 114, 228}: "Unikey Technologies", + [3]byte{124, 118, 115}: "ENMAS GmbH", + [3]byte{124, 122, 145}: "Intel Corporate", + [3]byte{124, 123, 228}: "Z'SEDAI KENKYUSHO CORPORATION", + [3]byte{124, 125, 65}: "Jinmuyu Electronics Co., Ltd.", + [3]byte{124, 130, 45}: "Nortec", + [3]byte{124, 131, 6}: "Glen Dimplex Nordic as", + [3]byte{124, 141, 145}: "Shanghai Hongzhuo Information Technology co.,LTD", + [3]byte{124, 142, 228}: "Texas Instruments", + [3]byte{124, 148, 178}: "Philips Healthcare PCCI", + [3]byte{124, 149, 243}: "Cisco", + [3]byte{124, 151, 99}: "Openmatics s.r.o.", + [3]byte{124, 154, 155}: "VSE valencia smart energy", + [3]byte{124, 161, 93}: "GN ReSound A/S", + [3]byte{124, 162, 155}: "D.SignT GmbH & Co. KG", + [3]byte{124, 166, 29}: "MHL, LLC", + [3]byte{124, 172, 178}: "Bosch Software Innovations GmbH", + [3]byte{124, 173, 116}: "Cisco", + [3]byte{124, 176, 62}: "OSRAM GmbH", + [3]byte{124, 177, 119}: "Satelco AG", + [3]byte{124, 178, 27}: "Cisco SPVTG", + [3]byte{124, 178, 50}: "TCL King High Frequency EI,Co.,LTD", + [3]byte{124, 181, 66}: "ACES Technology", + [3]byte{124, 183, 51}: "ASKEY COMPUTER CORP", + [3]byte{124, 183, 123}: "Paradigm Electronics Inc", + [3]byte{124, 187, 111}: "Cosco Electronics Co., Ltd.", + [3]byte{124, 189, 6}: "AE REFUsol", + [3]byte{124, 191, 136}: "Mobilicom LTD", + [3]byte{124, 191, 177}: "ARRIS Group, Inc.", + [3]byte{124, 195, 161}: "Apple", + [3]byte{124, 196, 239}: "Devialet", + [3]byte{124, 197, 55}: "Apple", + [3]byte{124, 200, 171}: "Acro Associates, Inc.", + [3]byte{124, 200, 208}: "TIANJIN YAAN TECHNOLOGY CO., LTD.", + [3]byte{124, 200, 215}: "Damalisk", + [3]byte{124, 203, 13}: "Antaira Technologies, LLC", + [3]byte{124, 204, 184}: "Intel Corporate", + [3]byte{124, 205, 17}: "MS-Magnet", + [3]byte{124, 205, 60}: "Guangzhou Juzing Technology Co., Ltd", + [3]byte{124, 207, 207}: "Shanghai SEARI Intelligent System Co., Ltd", + [3]byte{124, 209, 195}: "Apple", + [3]byte{124, 211, 10}: "INVENTEC Corporation", + [3]byte{124, 215, 98}: "Freestyle Technology Pty Ltd", + [3]byte{124, 216, 68}: "Enmotus Inc", + [3]byte{124, 217, 254}: "New Cosmos Electric Co., Ltd.", + [3]byte{124, 218, 132}: "Dongnian Networks Inc.", + [3]byte{124, 221, 17}: "Chongqing MAS SCI&TECH.Co.,Ltd", + [3]byte{124, 221, 32}: "IOXOS Technologies S.A.", + [3]byte{124, 221, 144}: "Shenzhen Ogemray Technology Co., Ltd.", + [3]byte{124, 224, 68}: "NEON Inc", + [3]byte{124, 225, 255}: "Computer Performance, Inc. DBA Digital Loggers, Inc.", + [3]byte{124, 228, 170}: "PRIVATE", + [3]byte{124, 229, 36}: "Quirky, Inc.", + [3]byte{124, 229, 107}: "ESEN Optoelectronics Technology Co.,Ltd.", + [3]byte{124, 233, 211}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{124, 235, 234}: "ASCT", + [3]byte{124, 237, 141}: "MICROSOFT", + [3]byte{124, 239, 24}: "Creative Product Design Pty. Ltd.", + [3]byte{124, 239, 138}: "Inhon International Ltd.", + [3]byte{124, 240, 95}: "Apple", + [3]byte{124, 240, 152}: "Bee Beans Technologies, Inc.", + [3]byte{124, 240, 186}: "Linkwell Telesystems Pvt Ltd", + [3]byte{124, 244, 41}: "NUUO Inc.", + [3]byte{124, 250, 223}: "Apple", + [3]byte{124, 254, 40}: "Salutron Inc.", + [3]byte{124, 254, 78}: "Shenzhen Safe vision Technology Co.,LTD", + [3]byte{124, 255, 98}: "Huizhou Super Electron Technology Co.,Ltd.", + [3]byte{128, 0, 11}: "Intel Corporate", + [3]byte{128, 0, 16}: "ATT BELL LABORATORIES", + [3]byte{128, 0, 110}: "Apple", + [3]byte{128, 5, 223}: "Montage Technology Group Limited", + [3]byte{128, 7, 162}: "Esson Technology Inc.", + [3]byte{128, 9, 2}: "Keysight Technologies, Inc.", + [3]byte{128, 10, 6}: "COMTEC co.,ltd", + [3]byte{128, 14, 36}: "ForgetBox", + [3]byte{128, 20, 64}: "Sunlit System Technology Corp", + [3]byte{128, 20, 168}: "Guangzhou V-SOLUTION Electronic Technology Co., Ltd.", + [3]byte{128, 22, 183}: "Brunel University", + [3]byte{128, 23, 125}: "Nortel Networks", + [3]byte{128, 24, 167}: "Samsung Eletronics Co., Ltd", + [3]byte{128, 25, 52}: "Intel Corporate", + [3]byte{128, 25, 103}: "Shanghai Reallytek Information Technology Co.,Ltd", + [3]byte{128, 29, 170}: "Avaya Inc", + [3]byte{128, 31, 2}: "Edimax Technology Co. Ltd.", + [3]byte{128, 32, 175}: "Trade FIDES, a.s.", + [3]byte{128, 34, 117}: "Beijing Beny Wave Technology Co Ltd", + [3]byte{128, 42, 250}: "Germaneers GmbH", + [3]byte{128, 45, 225}: "Solarbridge Technologies", + [3]byte{128, 46, 20}: "azeti Networks AG", + [3]byte{128, 47, 222}: "Zurich Instruments AG", + [3]byte{128, 52, 87}: "OT Systems Limited", + [3]byte{128, 55, 115}: "Netgear Inc", + [3]byte{128, 56, 253}: "LeapFrog Enterprises, Inc.", + [3]byte{128, 57, 229}: "PATLITE CORPORATION", + [3]byte{128, 59, 154}: "ghe-ces electronic ag", + [3]byte{128, 63, 93}: "Winstars Technology Ltd", + [3]byte{128, 63, 214}: "bytes at work AG", + [3]byte{128, 65, 78}: "BBK Electronics Corp., Ltd.,", + [3]byte{128, 66, 124}: "Adolf Tedsen GmbH & Co. KG", + [3]byte{128, 71, 49}: "Packet Design, Inc.", + [3]byte{128, 72, 165}: "SICHUAN TIANYI COMHEART TELECOM CO.,LTD", + [3]byte{128, 73, 113}: "Apple", + [3]byte{128, 75, 32}: "Ventilation Control", + [3]byte{128, 79, 88}: "ThinkEco, Inc.", + [3]byte{128, 80, 27}: "Nokia Corporation", + [3]byte{128, 86, 242}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{128, 87, 25}: "Samsung Electronics Co.,Ltd", + [3]byte{128, 88, 197}: "NovaTec Kommunikationstechnik GmbH", + [3]byte{128, 89, 253}: "Noviga", + [3]byte{128, 96, 7}: "RIM", + [3]byte{128, 97, 143}: "Shenzhen sangfei consumer communications co.,ltd", + [3]byte{128, 100, 89}: "Nimbus Inc.", + [3]byte{128, 101, 233}: "BenQ Corporation", + [3]byte{128, 102, 41}: "Prescope Technologies CO.,LTD.", + [3]byte{128, 108, 27}: "Motorola Mobility LLC", + [3]byte{128, 108, 139}: "KAESER KOMPRESSOREN AG", + [3]byte{128, 108, 188}: "NET New Electronic Technology GmbH", + [3]byte{128, 113, 31}: "Juniper Networks", + [3]byte{128, 113, 122}: "Huawei Technologies Co., Ltd", + [3]byte{128, 118, 147}: "Newag SA", + [3]byte{128, 121, 174}: "ShanDong Tecsunrise Co.,Ltd", + [3]byte{128, 122, 127}: "ABB Genway Xiamen Electrical Equipment CO., LTD", + [3]byte{128, 123, 30}: "Corsair Components", + [3]byte{128, 125, 27}: "Neosystem Co. Ltd.", + [3]byte{128, 125, 227}: "Chongqing Sichuan Instrument Microcircuit Co.LTD.", + [3]byte{128, 129, 165}: "TONGQING COMMUNICATION EQUIPMENT (SHENZHEN) Co.,Ltd", + [3]byte{128, 130, 135}: "ATCOM Technology Co.Ltd.", + [3]byte{128, 134, 152}: "Netronics Technologies Inc.", + [3]byte{128, 134, 242}: "Intel Corporate", + [3]byte{128, 139, 92}: "Shenzhen Runhuicheng Technology Co., Ltd", + [3]byte{128, 145, 42}: "Lih Rong electronic Enterprise Co., Ltd.", + [3]byte{128, 145, 192}: "AgileMesh, Inc.", + [3]byte{128, 146, 159}: "Apple", + [3]byte{128, 147, 147}: "Xapt GmbH", + [3]byte{128, 148, 108}: "TOKYO RADAR CORPORATION", + [3]byte{128, 150, 177}: "ARRIS Group, Inc.", + [3]byte{128, 150, 202}: "Hon Hai Precision Ind Co.,Ltd", + [3]byte{128, 151, 27}: "Altenergy Power System,Inc.", + [3]byte{128, 155, 32}: "Intel Corporate", + [3]byte{128, 161, 215}: "Shanghai DareGlobal Technologies Co.,Ltd", + [3]byte{128, 170, 164}: "USAG", + [3]byte{128, 173, 103}: "Kasda Digital Technology Co.,Ltd", + [3]byte{128, 178, 25}: "ELEKTRON TECHNOLOGY UK LIMITED", + [3]byte{128, 178, 137}: "Forworld Electronics Ltd.", + [3]byte{128, 179, 42}: "Alstom Grid", + [3]byte{128, 182, 134}: "Huawei Technologies Co., Ltd", + [3]byte{128, 185, 92}: "ELFTECH Co., Ltd.", + [3]byte{128, 186, 172}: "TeleAdapt Ltd", + [3]byte{128, 186, 230}: "Neets", + [3]byte{128, 187, 235}: "Satmap Systems Ltd", + [3]byte{128, 190, 5}: "Apple", + [3]byte{128, 193, 110}: "Hewlett Packard", + [3]byte{128, 198, 63}: "Remec Broadband Wireless , LLC", + [3]byte{128, 198, 171}: "Technicolor USA Inc.", + [3]byte{128, 198, 202}: "Endian s.r.l.", + [3]byte{128, 200, 98}: "Openpeak, Inc", + [3]byte{128, 206, 177}: "Theissen Training Systems GmbH", + [3]byte{128, 207, 65}: "Lenovo Mobile Communication Technology Ltd.", + [3]byte{128, 208, 25}: "Embed, Inc", + [3]byte{128, 209, 139}: "Hangzhou I'converge Technology Co.,Ltd", + [3]byte{128, 210, 29}: "AzureWave Technologies, Inc", + [3]byte{128, 212, 51}: "LzLabs GmbH", + [3]byte{128, 215, 51}: "QSR Automations, Inc.", + [3]byte{128, 219, 49}: "Power Quotient International Co., Ltd.", + [3]byte{128, 230, 80}: "Apple", + [3]byte{128, 234, 150}: "Apple", + [3]byte{128, 234, 202}: "Dialog Semiconductor Hellas SA", + [3]byte{128, 238, 115}: "Shuttle Inc.", + [3]byte{128, 242, 94}: "Kyynel", + [3]byte{128, 245, 147}: "IRCO Sistemas de Telecomunicación S.A.", + [3]byte{128, 246, 46}: "Hangzhou H3C Technologies Co., Limited", + [3]byte{128, 248, 235}: "RayTight", + [3]byte{128, 250, 91}: "CLEVO CO.", + [3]byte{128, 251, 6}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{128, 255, 168}: "UNIDIS", + [3]byte{132, 0, 210}: "Sony Ericsson Mobile Communications AB", + [3]byte{132, 1, 167}: "Greyware Automation Products, Inc", + [3]byte{132, 11, 45}: "SAMSUNG ELECTRO-MECHANICS CO., LTD", + [3]byte{132, 15, 69}: "Shanghai GMT Digital Technologies Co., Ltd", + [3]byte{132, 23, 21}: "GP Electronics (HK) Ltd.", + [3]byte{132, 23, 102}: "Weifang GoerTek Electronics Co., Ltd", + [3]byte{132, 24, 38}: "Osram GmbH", + [3]byte{132, 24, 58}: "Ruckus Wireless", + [3]byte{132, 24, 136}: "Juniper Networks", + [3]byte{132, 27, 56}: "Shenzhen Excelsecu Data Technology Co.,Ltd", + [3]byte{132, 27, 94}: "NETGEAR", + [3]byte{132, 30, 38}: "KERNEL-I Co.,LTD", + [3]byte{132, 33, 65}: "Shenzhen Ginwave Technologies Ltd.", + [3]byte{132, 36, 141}: "Motorola Solutions Inc", + [3]byte{132, 37, 63}: "Silex Technology, Inc", + [3]byte{132, 37, 164}: "Tariox Limited", + [3]byte{132, 37, 219}: "Samsung Electronics Co.,Ltd", + [3]byte{132, 38, 21}: "ADB Broadband Italia", + [3]byte{132, 38, 43}: "Alcatel-Lucent", + [3]byte{132, 38, 144}: "BEIJING THOUGHT SCIENCE CO.,LTD.", + [3]byte{132, 39, 206}: "Corporation of the Presiding Bishop of The Church of Jesus Christ of Latter-day Saints", + [3]byte{132, 41, 20}: "EMPORIA TELECOM Produktions- und VertriebsgesmbH & Co KG", + [3]byte{132, 41, 153}: "Apple", + [3]byte{132, 43, 43}: "Dell Inc.", + [3]byte{132, 43, 80}: "Huria Co.,Ltd.", + [3]byte{132, 43, 188}: "Modelleisenbahn GmbH", + [3]byte{132, 47, 117}: "Innokas Group", + [3]byte{132, 48, 229}: "SkyHawke Technologies, LLC", + [3]byte{132, 50, 234}: "ANHUI WANZTEN P&T CO., LTD", + [3]byte{132, 52, 151}: "Hewlett Packard", + [3]byte{132, 54, 17}: "hyungseul publishing networks", + [3]byte{132, 56, 53}: "Apple", + [3]byte{132, 56, 56}: "Samsung Electro Mechanics co., LTD.", + [3]byte{132, 58, 75}: "Intel Corporate", + [3]byte{132, 63, 78}: "Tri-Tech Manufacturing, Inc.", + [3]byte{132, 68, 100}: "ServerU Inc", + [3]byte{132, 72, 35}: "WOXTER TECHNOLOGY Co. Ltd", + [3]byte{132, 73, 21}: "vArmour Networks, Inc.", + [3]byte{132, 75, 245}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{132, 79, 3}: "Ablelink Electronics Ltd", + [3]byte{132, 81, 129}: "Samsung Electronics Co.,Ltd", + [3]byte{132, 85, 165}: "Samsung Elec Co.,Ltd", + [3]byte{132, 86, 156}: "Coho Data, Inc.,", + [3]byte{132, 87, 135}: "DVR C&C Co., Ltd.", + [3]byte{132, 92, 147}: "Chabrier Services", + [3]byte{132, 93, 215}: "Shenzhen Netcom Electronics Co.,Ltd", + [3]byte{132, 98, 35}: "Shenzhen Coship Electronics Co., Ltd.", + [3]byte{132, 98, 166}: "EuroCB (Phils), Inc.", + [3]byte{132, 99, 214}: "Microsoft Corporation", + [3]byte{132, 106, 237}: "Wireless Tsukamoto.,co.LTD", + [3]byte{132, 110, 177}: "Park Assist LLC", + [3]byte{132, 114, 7}: "I&C Technology", + [3]byte{132, 116, 42}: "zte corporation", + [3]byte{132, 118, 22}: "Addat S.r.o.", + [3]byte{132, 120, 139}: "Apple", + [3]byte{132, 120, 172}: "Cisco", + [3]byte{132, 122, 136}: "HTC Corporation", + [3]byte{132, 126, 64}: "Texas Instruments", + [3]byte{132, 130, 244}: "Beijing Huasun Unicreate Technology Co., Ltd", + [3]byte{132, 131, 54}: "Newrun", + [3]byte{132, 131, 113}: "Avaya, Inc", + [3]byte{132, 132, 51}: "Paradox Engineering SA", + [3]byte{132, 133, 6}: "Apple", + [3]byte{132, 133, 10}: "Hella Sonnen- und Wetterschutztechnik GmbH", + [3]byte{132, 134, 243}: "Greenvity Communications", + [3]byte{132, 141, 132}: "Rajant Corporation", + [3]byte{132, 141, 199}: "Cisco SPVTG", + [3]byte{132, 142, 12}: "Apple", + [3]byte{132, 142, 150}: "Embertec Pty Ltd", + [3]byte{132, 142, 223}: "Sony Mobile Communications AB", + [3]byte{132, 143, 105}: "Dell Inc.", + [3]byte{132, 144, 0}: "Arnold & Richter Cine Technik", + [3]byte{132, 147, 12}: "InCoax Networks Europe AB", + [3]byte{132, 148, 140}: "Hitron Technologies. Inc", + [3]byte{132, 150, 129}: "Cathay Communication Co.,Ltd", + [3]byte{132, 150, 216}: "Pace plc", + [3]byte{132, 151, 184}: "Memjet Inc.", + [3]byte{132, 156, 166}: "Arcadyan Technology Corporation", + [3]byte{132, 157, 197}: "Centera Photonics Inc.", + [3]byte{132, 164, 102}: "Samsung Electronics Co.,Ltd", + [3]byte{132, 166, 200}: "Intel Corporate", + [3]byte{132, 167, 131}: "Alcatel Lucent", + [3]byte{132, 168, 228}: "Shenzhen Huawei Communication Technologies Co., Ltd", + [3]byte{132, 169, 145}: "Cyber Trans Japan Co.,Ltd.", + [3]byte{132, 172, 164}: "Beijing Novel Super Digital TV Technology Co., Ltd", + [3]byte{132, 175, 31}: "Beat System Service Co,. Ltd.", + [3]byte{132, 177, 83}: "Apple", + [3]byte{132, 181, 156}: "Juniper networks", + [3]byte{132, 194, 228}: "Jiangsu Qinheng Co., Ltd.", + [3]byte{132, 199, 39}: "Gnodal Ltd", + [3]byte{132, 199, 169}: "C3PO S.A.", + [3]byte{132, 200, 177}: "Incognito Software Inc.", + [3]byte{132, 201, 178}: "D-Link International", + [3]byte{132, 211, 42}: "IEEE 1905.1", + [3]byte{132, 217, 200}: "Unipattern Co.,", + [3]byte{132, 219, 47}: "Sierra Wireless Inc", + [3]byte{132, 221, 32}: "Texas Instruments", + [3]byte{132, 221, 183}: "Cilag GmbH International", + [3]byte{132, 222, 61}: "Crystal Vision Ltd", + [3]byte{132, 223, 12}: "NET2GRID BV", + [3]byte{132, 224, 88}: "Pace plc", + [3]byte{132, 228, 217}: "Shenzhen NEED technology Ltd.", + [3]byte{132, 230, 41}: "Bluwan SA", + [3]byte{132, 231, 20}: "Liang Herng Enterprise,Co.Ltd.", + [3]byte{132, 234, 153}: "Vieworks", + [3]byte{132, 235, 24}: "Texas Instruments", + [3]byte{132, 237, 51}: "BBMC Co.,Ltd", + [3]byte{132, 244, 147}: "OMS spol. s.r.o.", + [3]byte{132, 246, 76}: "Cross Point BV", + [3]byte{132, 252, 254}: "Apple", + [3]byte{132, 254, 158}: "RTC Industries, Inc.", + [3]byte{136, 3, 85}: "Arcadyan Technology Corp.", + [3]byte{136, 9, 5}: "MTMCommunications", + [3]byte{136, 15, 16}: "Huami Information Technology Co.,Ltd.", + [3]byte{136, 15, 182}: "Jabil Circuits India Pvt Ltd,-EHTP unit", + [3]byte{136, 16, 54}: "Panodic(ShenZhen) Electronics Limted", + [3]byte{136, 18, 78}: "Qualcomm Atheros", + [3]byte{136, 20, 43}: "Protonic Holland", + [3]byte{136, 21, 68}: "Meraki, Inc.", + [3]byte{136, 24, 174}: "Tamron Co., Ltd", + [3]byte{136, 29, 252}: "Cisco", + [3]byte{136, 31, 161}: "Apple", + [3]byte{136, 32, 18}: "LMI Technologies", + [3]byte{136, 33, 227}: "Nebusens, S.L.", + [3]byte{136, 35, 100}: "Watchnet DVR Inc", + [3]byte{136, 35, 254}: "TTTech Computertechnik AG", + [3]byte{136, 37, 44}: "Arcadyan Technology Corporation", + [3]byte{136, 41, 80}: "Dalian Netmoon Tech Develop Co.,Ltd", + [3]byte{136, 46, 90}: "storONE", + [3]byte{136, 48, 138}: "Murata Manufactuaring Co.,Ltd.", + [3]byte{136, 50, 155}: "Samsung Electro Mechanics co.,LTD.", + [3]byte{136, 51, 20}: "Texas Instruments", + [3]byte{136, 53, 76}: "Transics", + [3]byte{136, 54, 18}: "SRC Computers, LLC", + [3]byte{136, 65, 193}: "ORBISAT DA AMAZONIA IND E AEROL SA", + [3]byte{136, 65, 252}: "AirTies Wireless Netowrks", + [3]byte{136, 67, 225}: "CISCO SYSTEMS, INC.", + [3]byte{136, 68, 246}: "Nokia Corporation", + [3]byte{136, 70, 42}: "Telechips Inc.", + [3]byte{136, 75, 57}: "Siemens AG, Healthcare Sector", + [3]byte{136, 81, 251}: "Hewlett Packard", + [3]byte{136, 83, 46}: "Intel Corporate", + [3]byte{136, 83, 149}: "Apple", + [3]byte{136, 83, 212}: "Huawei Technologies Co., Ltd", + [3]byte{136, 87, 109}: "XTA Electronics Ltd", + [3]byte{136, 90, 146}: "Cisco", + [3]byte{136, 91, 221}: "Aerohive Networks Inc.", + [3]byte{136, 92, 71}: "Alcatel Lucent", + [3]byte{136, 97, 90}: "Siano Mobile Silicon Ltd.", + [3]byte{136, 99, 223}: "Apple", + [3]byte{136, 104, 92}: "Shenzhen ChuangDao & Perpetual Eternal Technology Co.,Ltd", + [3]byte{136, 107, 118}: "CHINA HOPEFUL GROUP HOPEFUL ELECTRIC CO.,LTD", + [3]byte{136, 112, 140}: "Lenovo Mobile Communication Technology Ltd.", + [3]byte{136, 112, 239}: "SC Professional Trading Co., Ltd.", + [3]byte{136, 115, 152}: "K2E Tekpoint", + [3]byte{136, 117, 86}: "Cisco", + [3]byte{136, 120, 156}: "Game Technologies SA", + [3]byte{136, 134, 3}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{136, 134, 160}: "Simton Technologies, Ltd.", + [3]byte{136, 135, 23}: "CANON INC.", + [3]byte{136, 135, 221}: "DarbeeVision Inc.", + [3]byte{136, 137, 20}: "All Components Incorporated", + [3]byte{136, 137, 100}: "GSI Electronics Inc.", + [3]byte{136, 139, 93}: "Storage Appliance Corporation", + [3]byte{136, 140, 25}: "Brady Corp Asia Pacific Ltd", + [3]byte{136, 145, 102}: "Viewcooper Corp.", + [3]byte{136, 145, 221}: "Racktivity", + [3]byte{136, 148, 113}: "Brocade Communications Systems, Inc.", + [3]byte{136, 148, 249}: "Gemicom Technology, Inc.", + [3]byte{136, 149, 185}: "Unified Packet Systems Crop", + [3]byte{136, 150, 118}: "TTC MARCONI s.r.o.", + [3]byte{136, 151, 223}: "Entrypass Corporation Sdn. Bhd.", + [3]byte{136, 152, 33}: "TERAON", + [3]byte{136, 155, 57}: "Samsung Electronics Co.,Ltd", + [3]byte{136, 156, 166}: "BTB Korea INC", + [3]byte{136, 159, 250}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{136, 163, 204}: "Amatis Controls", + [3]byte{136, 165, 189}: "QPCOM INC.", + [3]byte{136, 167, 60}: "Ragentek Technology Group", + [3]byte{136, 172, 193}: "Generiton Co., Ltd.", + [3]byte{136, 174, 29}: "COMPAL INFORMATION(KUNSHAN)CO.,LTD", + [3]byte{136, 177, 104}: "Delta Control GmbH", + [3]byte{136, 177, 225}: "AirTight Networks, Inc.", + [3]byte{136, 182, 39}: "Gembird Europe BV", + [3]byte{136, 186, 127}: "Qfiednet Co., Ltd.", + [3]byte{136, 191, 213}: "Simple Audio Ltd", + [3]byte{136, 195, 110}: "Beijing Ereneben lnformation Technology Limited", + [3]byte{136, 198, 38}: "Logitech - Ultimate Ears", + [3]byte{136, 198, 99}: "Apple", + [3]byte{136, 201, 208}: "LG Electronics", + [3]byte{136, 203, 135}: "Apple", + [3]byte{136, 215, 188}: "DEP Company", + [3]byte{136, 217, 98}: "Canopus Systems US LLC", + [3]byte{136, 220, 150}: "SENAO Networks, Inc.", + [3]byte{136, 221, 121}: "Voltaire", + [3]byte{136, 224, 160}: "Shenzhen VisionSTOR Technologies Co., Ltd", + [3]byte{136, 224, 243}: "Juniper Networks", + [3]byte{136, 227, 171}: "Huawei Technologies Co., Ltd", + [3]byte{136, 231, 18}: "Whirlpool Corporation", + [3]byte{136, 231, 166}: "iKnowledge Integration Corp.", + [3]byte{136, 232, 248}: "YONG TAI ELECTRONIC (DONGGUAN) LTD.", + [3]byte{136, 233, 23}: "Tamaggo", + [3]byte{136, 237, 28}: "Cudo Communication Co., Ltd.", + [3]byte{136, 240, 49}: "Cisco", + [3]byte{136, 240, 119}: "CISCO SYSTEMS, INC.", + [3]byte{136, 244, 136}: "cellon communications technology(shenzhen)Co.,Ltd.", + [3]byte{136, 244, 144}: "Jetmobile Pte Ltd", + [3]byte{136, 247, 199}: "Technicolor USA Inc.", + [3]byte{136, 253, 21}: "LINEEYE CO., LTD", + [3]byte{136, 254, 214}: "ShangHai WangYong Software Co., Ltd.", + [3]byte{140, 0, 109}: "Apple", + [3]byte{140, 4, 255}: "Technicolor USA Inc.", + [3]byte{140, 5, 81}: "Koubachi AG", + [3]byte{140, 7, 140}: "FLOW DATA INC", + [3]byte{140, 8, 139}: "Remote Solution", + [3]byte{140, 9, 244}: "ARRIS Group, Inc.", + [3]byte{140, 12, 144}: "Ruckus Wireless", + [3]byte{140, 12, 163}: "Amper", + [3]byte{140, 14, 227}: "GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD.", + [3]byte{140, 17, 203}: "ABUS Security-Center GmbH & Co. KG", + [3]byte{140, 24, 217}: "Shenzhen RF Technology Co., Ltd", + [3]byte{140, 31, 148}: "RF Surgical System Inc.", + [3]byte{140, 33, 10}: "TP-LINK TECHNOLOGIES CO., LTD.", + [3]byte{140, 39, 29}: "QuantHouse", + [3]byte{140, 39, 138}: "Vocollect Inc", + [3]byte{140, 41, 55}: "Apple", + [3]byte{140, 45, 170}: "Apple", + [3]byte{140, 47, 57}: "IBA Dosimetry GmbH", + [3]byte{140, 51, 48}: "EmFirst Co., Ltd.", + [3]byte{140, 51, 87}: "HiteVision Digital Media Technology Co.,Ltd.", + [3]byte{140, 58, 227}: "LG Electronics", + [3]byte{140, 60, 7}: "Skiva Technologies, Inc.", + [3]byte{140, 60, 74}: "NAKAYO TELECOMMUNICATIONS,INC.", + [3]byte{140, 65, 242}: "RDA Technologies Ltd.", + [3]byte{140, 68, 53}: "Shanghai BroadMobi Communication Technology Co., Ltd.", + [3]byte{140, 74, 238}: "GIGA TMS INC", + [3]byte{140, 75, 89}: "3D Imaging & Simulations Corp", + [3]byte{140, 76, 220}: "PLANEX COMMUNICATIONS INC.", + [3]byte{140, 77, 185}: "Unmonday Ltd", + [3]byte{140, 77, 234}: "Cerio Corporation", + [3]byte{140, 81, 5}: "Shenzhen ireadygo Information Technology CO.,LTD.", + [3]byte{140, 83, 247}: "A&D ENGINEERING CO., LTD.", + [3]byte{140, 84, 29}: "LGE", + [3]byte{140, 86, 157}: "Imaging Solutions Group", + [3]byte{140, 86, 197}: "Nintendo Co., Ltd.", + [3]byte{140, 87, 253}: "LVX Western", + [3]byte{140, 88, 119}: "Apple", + [3]byte{140, 89, 139}: "C Technologies AB", + [3]byte{140, 90, 240}: "Exeltech Solar Products", + [3]byte{140, 92, 161}: "d-broad,INC", + [3]byte{140, 93, 96}: "UCI Corporation Co.,Ltd.", + [3]byte{140, 95, 223}: "Beijing Railway Signal Factory", + [3]byte{140, 96, 79}: "CISCO SYSTEMS, INC.", + [3]byte{140, 100, 11}: "Beyond Devices d.o.o.", + [3]byte{140, 100, 34}: "Sony Ericsson Mobile Communications AB", + [3]byte{140, 104, 120}: "Nortek-AS", + [3]byte{140, 106, 228}: "Viogem Limited", + [3]byte{140, 112, 90}: "Intel Corporate", + [3]byte{140, 113, 248}: "Samsung Electronics Co.,Ltd", + [3]byte{140, 115, 110}: "Fujitsu Limited", + [3]byte{140, 118, 193}: "Goden Tech Limited", + [3]byte{140, 119, 18}: "Samsung Electronics Co.,Ltd", + [3]byte{140, 119, 22}: "LONGCHEER TELECOMMUNICATION LIMITED", + [3]byte{140, 123, 157}: "Apple", + [3]byte{140, 124, 146}: "Apple", + [3]byte{140, 124, 181}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{140, 124, 255}: "Brocade Communications Systems, Inc.", + [3]byte{140, 126, 179}: "Lytro, Inc.", + [3]byte{140, 127, 59}: "ARRIS Group, Inc.", + [3]byte{140, 130, 168}: "Insigma Technology Co.,Ltd", + [3]byte{140, 132, 1}: "PRIVATE", + [3]byte{140, 137, 165}: "Micro-Star INT'L CO., LTD", + [3]byte{140, 138, 110}: "ESTUN AUTOMATION TECHNOLOY CO., LTD", + [3]byte{140, 142, 118}: "taskit GmbH", + [3]byte{140, 144, 211}: "Alcatel Lucent", + [3]byte{140, 145, 9}: "Toyoshima Electric Technoeogy(Suzhou) Co.,Ltd.", + [3]byte{140, 146, 54}: "Aus.Linx Technology Co., Ltd.", + [3]byte{140, 148, 207}: "Encell Technology, Inc.", + [3]byte{140, 160, 72}: "Beijing NeTopChip Technology Co.,LTD", + [3]byte{140, 169, 130}: "Intel Corporate", + [3]byte{140, 174, 76}: "Plugable Technologies", + [3]byte{140, 174, 137}: "Y-cam Solutions Ltd", + [3]byte{140, 176, 148}: "Airtech I&C Co., Ltd", + [3]byte{140, 182, 79}: "CISCO SYSTEMS, INC.", + [3]byte{140, 183, 247}: "Shenzhen UniStrong Science & Technology Co., Ltd", + [3]byte{140, 184, 44}: "IPitomy Communications", + [3]byte{140, 184, 100}: "AcSiP Technology Corp.", + [3]byte{140, 190, 190}: "Xiaomi Technology Co.,Ltd", + [3]byte{140, 191, 157}: "Shanghai Xinyou Information Technology Ltd. Co.", + [3]byte{140, 193, 33}: "Panasonic Corporation AVC Networks Company", + [3]byte{140, 197, 225}: "ShenZhen Konka Telecommunication Technology Co.,Ltd", + [3]byte{140, 199, 170}: "Radinet Communications Inc.", + [3]byte{140, 199, 208}: "zhejiang ebang communication co.,ltd", + [3]byte{140, 200, 205}: "Samsung Electronics Co., LTD", + [3]byte{140, 205, 162}: "ACTP, Inc.", + [3]byte{140, 205, 232}: "Nintendo Co., Ltd.", + [3]byte{140, 207, 92}: "BEFEGA GmbH", + [3]byte{140, 209, 123}: "CG Mobile", + [3]byte{140, 211, 162}: "VisSim AS", + [3]byte{140, 214, 40}: "Ikor Metering", + [3]byte{140, 219, 37}: "ESG Solutions", + [3]byte{140, 220, 212}: "Hewlett Packard", + [3]byte{140, 221, 141}: "Wifly-City System Inc.", + [3]byte{140, 222, 82}: "ISSC Technologies Corp.", + [3]byte{140, 222, 153}: "Comlab Inc.", + [3]byte{140, 223, 157}: "NEC Corporation", + [3]byte{140, 224, 129}: "zte corporation", + [3]byte{140, 231, 72}: "PRIVATE", + [3]byte{140, 231, 140}: "DK Networks", + [3]byte{140, 231, 179}: "Sonardyne International Ltd", + [3]byte{140, 238, 198}: "Precepscion Pty. Ltd.", + [3]byte{140, 248, 19}: "ORANGE POLSKA", + [3]byte{140, 249, 69}: "Power Automation pte Ltd", + [3]byte{140, 249, 201}: "MESADA Technology Co.,Ltd.", + [3]byte{140, 250, 186}: "Apple", + [3]byte{140, 253, 240}: "QUALCOMM Incorporated", + [3]byte{144, 0, 78}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{144, 1, 59}: "SAGEMCOM", + [3]byte{144, 2, 138}: "Shenzhen Shidean Legrand Electronic Products Co.,Ltd", + [3]byte{144, 2, 169}: "ZHEJIANG DAHUA TECHNOLOGY CO.,LTD", + [3]byte{144, 3, 183}: "PARROT", + [3]byte{144, 9, 23}: "Far-sighted mobile", + [3]byte{144, 10, 58}: "PSG Plastic Service GmbH", + [3]byte{144, 12, 180}: "Alinket Electronic Technology Co., Ltd", + [3]byte{144, 13, 102}: "Digimore Electronics Co., Ltd", + [3]byte{144, 13, 203}: "ARRIS Group, Inc.", + [3]byte{144, 23, 155}: "Nanomegas", + [3]byte{144, 23, 172}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{144, 24, 94}: "Apex Tool Group GmbH & Co OHG", + [3]byte{144, 24, 124}: "Samsung Electro Mechanics co., LTD.", + [3]byte{144, 24, 174}: "Shanghai Meridian Technologies, Co. Ltd.", + [3]byte{144, 25, 0}: "SCS SA", + [3]byte{144, 26, 202}: "ARRIS Group, Inc.", + [3]byte{144, 27, 14}: "Fujitsu Technology Solutions GmbH", + [3]byte{144, 29, 39}: "zte corporation", + [3]byte{144, 30, 221}: "GREAT COMPUTER CORPORATION", + [3]byte{144, 32, 58}: "BYD Precision Manufacture Co.,Ltd", + [3]byte{144, 32, 131}: "General Engine Management Systems Ltd.", + [3]byte{144, 33, 85}: "HTC Corporation", + [3]byte{144, 33, 129}: "Shanghai Huaqin Telecom Technology Co.,Ltd", + [3]byte{144, 39, 228}: "Apple", + [3]byte{144, 43, 52}: "GIGA-BYTE TECHNOLOGY CO.,LTD.", + [3]byte{144, 44, 199}: "C-MAX Asia Limited", + [3]byte{144, 46, 135}: "LabJack", + [3]byte{144, 49, 205}: "Onyx Healthcare Inc.", + [3]byte{144, 52, 43}: "Gatekeeper Systems, Inc.", + [3]byte{144, 52, 252}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{144, 53, 110}: "Vodafone Omnitel N.V.", + [3]byte{144, 56, 223}: "Changzhou Tiannengbo System Co. Ltd.", + [3]byte{144, 58, 160}: "Alcatel-Lucent", + [3]byte{144, 60, 174}: "Yunnan KSEC Digital Technology Co.,Ltd.", + [3]byte{144, 61, 90}: "Shenzhen Wision Technology Holding Limited", + [3]byte{144, 61, 107}: "Zicon Technology Corp.", + [3]byte{144, 62, 171}: "ARRIS Group, Inc.", + [3]byte{144, 70, 183}: "Vadaro Pte Ltd", + [3]byte{144, 71, 22}: "RORZE CORPORATION", + [3]byte{144, 72, 154}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{144, 73, 250}: "Intel Corporation", + [3]byte{144, 76, 229}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{144, 78, 43}: "Huawei Technologies Co., Ltd", + [3]byte{144, 80, 123}: "Advanced PANMOBIL Systems GmbH & Co. KG", + [3]byte{144, 81, 63}: "Elettronica Santerno", + [3]byte{144, 84, 70}: "TES ELECTRONIC SOLUTIONS", + [3]byte{144, 85, 174}: "Ericsson, EAB/RWI/K", + [3]byte{144, 86, 130}: "Lenbrook Industries Limited", + [3]byte{144, 86, 146}: "Autotalks Ltd.", + [3]byte{144, 89, 175}: "Texas Instruments", + [3]byte{144, 95, 46}: "TCT Mobile Limited", + [3]byte{144, 95, 141}: "modas GmbH", + [3]byte{144, 97, 12}: "Fida International (S) Pte Ltd", + [3]byte{144, 103, 23}: "Alphion India Private Limited", + [3]byte{144, 103, 181}: "Alcatel-Lucent", + [3]byte{144, 103, 243}: "Alcatel Lucent", + [3]byte{144, 104, 195}: "Motorola Mobility LLC", + [3]byte{144, 109, 200}: "DLG Automação Industrial Ltda", + [3]byte{144, 110, 187}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{144, 112, 37}: "Garea Microsys Co.,Ltd.", + [3]byte{144, 114, 64}: "Apple", + [3]byte{144, 121, 144}: "Benchmark Electronics Romania SRL", + [3]byte{144, 122, 10}: "Gebr. Bode GmbH & Co KG", + [3]byte{144, 122, 40}: "Beijing Morncloud Information And Technology Co. Ltd.", + [3]byte{144, 122, 241}: "SNUPI Technologies", + [3]byte{144, 126, 186}: "UTEK TECHNOLOGY (SHENZHEN) CO.,LTD", + [3]byte{144, 127, 97}: "Chicony Electronics Co., Ltd.", + [3]byte{144, 130, 96}: "IEEE 1904.1 Working Group", + [3]byte{144, 131, 122}: "General Electric Water & Process Technologies", + [3]byte{144, 132, 13}: "Apple", + [3]byte{144, 136, 162}: "IONICS TECHNOLOGY ME LTDA", + [3]byte{144, 140, 9}: "Total Phase", + [3]byte{144, 140, 68}: "H.K ZONGMU TECHNOLOGY CO., LTD.", + [3]byte{144, 140, 99}: "GZ Weedong Networks Technology Co. , Ltd", + [3]byte{144, 141, 29}: "GH Technologies", + [3]byte{144, 143, 207}: "UNO System Co., Ltd", + [3]byte{144, 144, 60}: "TRISON TECHNOLOGY CORPORATION", + [3]byte{144, 144, 96}: "RSI VIDEO TECHNOLOGIES", + [3]byte{144, 146, 180}: "Diehl BGT Defence GmbH & Co. KG", + [3]byte{144, 148, 228}: "D-Link International", + [3]byte{144, 152, 100}: "Impex-Sat GmbH&Co KG", + [3]byte{144, 153, 22}: "ELVEES NeoTek OJSC", + [3]byte{144, 157, 224}: "Newland Design + Assoc. Inc.", + [3]byte{144, 159, 51}: "EFM Networks", + [3]byte{144, 159, 67}: "Accutron Instruments Inc.", + [3]byte{144, 162, 218}: "GHEO SA", + [3]byte{144, 164, 222}: "Wistron Neweb Corp.", + [3]byte{144, 167, 131}: "JSW PACIFIC CORPORATION", + [3]byte{144, 167, 193}: "Pakedge Device and Software Inc.", + [3]byte{144, 172, 63}: "BrightSign LLC", + [3]byte{144, 174, 27}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{144, 177, 28}: "Dell Inc.", + [3]byte{144, 177, 52}: "ARRIS Group, Inc.", + [3]byte{144, 178, 31}: "Apple", + [3]byte{144, 182, 134}: "Murata Manufacturing Co., Ltd.", + [3]byte{144, 184, 208}: "Joyent, Inc.", + [3]byte{144, 185, 49}: "Apple, Inc", + [3]byte{144, 185, 125}: "Johnson Outdoors Marine Electronics d/b/a Minnkota", + [3]byte{144, 193, 21}: "Sony Ericsson Mobile Communications AB", + [3]byte{144, 199, 146}: "ARRIS Group, Inc.", + [3]byte{144, 204, 36}: "Synaptics, Inc", + [3]byte{144, 207, 21}: "Nokia Corporation", + [3]byte{144, 207, 111}: "Dlogixs Co Ltd", + [3]byte{144, 207, 125}: "Qingdao Hisense Electric Co.,Ltd.", + [3]byte{144, 209, 27}: "Palomar Medical Technologies", + [3]byte{144, 215, 79}: "Bookeen", + [3]byte{144, 215, 235}: "Texas Instruments", + [3]byte{144, 216, 82}: "Comtec Co., Ltd.", + [3]byte{144, 217, 44}: "HUG-WITSCHI AG", + [3]byte{144, 218, 78}: "AVANU", + [3]byte{144, 218, 106}: "FOCUS H&S Co., Ltd.", + [3]byte{144, 219, 70}: "E-LEAD ELECTRONIC CO., LTD", + [3]byte{144, 223, 183}: "s.m.s smart microwave sensors GmbH", + [3]byte{144, 224, 240}: "IEEE 1722a Working Group", + [3]byte{144, 226, 186}: "Intel Corporate", + [3]byte{144, 230, 186}: "ASUSTek COMPUTER INC.", + [3]byte{144, 234, 96}: "SPI Lasers Ltd", + [3]byte{144, 239, 104}: "ZyXEL Communications Corporation", + [3]byte{144, 241, 170}: "Samsung Electronics Co.,LTD", + [3]byte{144, 241, 176}: "Hangzhou Anheng Info&Tech CO.,LTD", + [3]byte{144, 242, 120}: "Radius Gateway", + [3]byte{144, 243, 183}: "Kirisun Communications Co., Ltd.", + [3]byte{144, 244, 193}: "Rand McNally", + [3]byte{144, 246, 82}: "TP-LINK TECHNOLOGIES CO., LTD.", + [3]byte{144, 247, 47}: "Phillips Machine & Welding Co., Inc.", + [3]byte{144, 251, 91}: "Avaya, Inc", + [3]byte{144, 251, 166}: "Hon Hai Precision Ind.Co.Ltd", + [3]byte{144, 253, 97}: "Apple", + [3]byte{144, 255, 121}: "Metro Ethernet Forum", + [3]byte{148, 0, 112}: "Nokia Corporation", + [3]byte{148, 1, 73}: "AutoHotBox", + [3]byte{148, 1, 194}: "Samsung Electronics Co.,Ltd", + [3]byte{148, 5, 182}: "Liling FullRiver Electronics & Technology Ltd", + [3]byte{148, 11, 45}: "NetView Technologies(Shenzhen) Co., Ltd", + [3]byte{148, 11, 213}: "Himax Technologies, Inc", + [3]byte{148, 12, 109}: "TP-LINK Technologies Co.,Ltd.", + [3]byte{148, 16, 62}: "Belkin International Inc.", + [3]byte{148, 17, 218}: "ITF Fröschl GmbH", + [3]byte{148, 22, 115}: "Point Core SARL", + [3]byte{148, 29, 28}: "TLab West Systems AB", + [3]byte{148, 32, 83}: "Nokia Corporation", + [3]byte{148, 33, 151}: "Stalmart Technology Limited", + [3]byte{148, 35, 110}: "Shenzhen Junlan Electronic Ltd", + [3]byte{148, 46, 23}: "Schneider Electric Canada Inc", + [3]byte{148, 46, 99}: "Finsécur", + [3]byte{148, 49, 155}: "Alphatronics BV", + [3]byte{148, 51, 221}: "Taco Electronic Solutions, Inc.", + [3]byte{148, 53, 10}: "Samsung Electronics Co.,Ltd", + [3]byte{148, 54, 224}: "Sichuan Bihong Broadcast & Television New Technologies Co.,Ltd", + [3]byte{148, 57, 229}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{148, 58, 240}: "Nokia Corporation", + [3]byte{148, 59, 177}: "KAONMEDIA", + [3]byte{148, 64, 162}: "Anywave Communication Technologies, Inc.", + [3]byte{148, 68, 68}: "LG Innotek", + [3]byte{148, 68, 82}: "Belkin International Inc.", + [3]byte{148, 70, 150}: "BaudTec Corporation", + [3]byte{148, 74, 9}: "BitWise Controls", + [3]byte{148, 80, 71}: "Rechnerbetriebsgruppe", + [3]byte{148, 81, 3}: "Samsung Electronics", + [3]byte{148, 81, 191}: "Hyundai ESG", + [3]byte{148, 84, 147}: "Rigado, LLC", + [3]byte{148, 89, 45}: "EKE Building Technology Systems Ltd", + [3]byte{148, 91, 126}: "TRILOBIT LTDA.", + [3]byte{148, 97, 36}: "Pason Systems", + [3]byte{148, 98, 105}: "Arris Group, Inc.", + [3]byte{148, 99, 209}: "Samsung Electronics Co.,Ltd", + [3]byte{148, 112, 210}: "WINFIRM TECHNOLOGY", + [3]byte{148, 113, 172}: "TCT Mobile Limited", + [3]byte{148, 117, 110}: "QinetiQ North America", + [3]byte{148, 124, 62}: "Polewall Norge AS", + [3]byte{148, 129, 164}: "Azuray Technologies", + [3]byte{148, 133, 122}: "Evantage Industries Corp", + [3]byte{148, 134, 212}: "Surveillance Pro Corporation", + [3]byte{148, 135, 124}: "ARRIS Group, Inc.", + [3]byte{148, 136, 84}: "Texas Instruments", + [3]byte{148, 139, 3}: "EAGET Innovation and Technology Co., Ltd.", + [3]byte{148, 141, 80}: "Beamex Oy Ab", + [3]byte{148, 142, 137}: "INDUSTRIAS UNIDAS SA DE CV", + [3]byte{148, 143, 238}: "Hughes Telematics, Inc.", + [3]byte{148, 148, 38}: "Apple", + [3]byte{148, 152, 162}: "Shanghai LISTEN TECH.LTD", + [3]byte{148, 155, 253}: "Trans New Technology, Inc.", + [3]byte{148, 156, 85}: "Alta Data Technologies", + [3]byte{148, 159, 63}: "Optek Digital Technology company limited", + [3]byte{148, 159, 180}: "ChengDu JiaFaAnTai Technology Co.,Ltd", + [3]byte{148, 167, 188}: "BodyMedia, Inc.", + [3]byte{148, 170, 184}: "Joview(Beijing) Technology Co. Ltd.", + [3]byte{148, 172, 202}: "trivum technologies GmbH", + [3]byte{148, 174, 97}: "Alcatel Lucent", + [3]byte{148, 174, 227}: "Belden Hirschmann Industries (Suzhou) Ltd.", + [3]byte{148, 180, 15}: "Aruba Networks", + [3]byte{148, 184, 197}: "RuggedCom Inc.", + [3]byte{148, 185, 180}: "Aptos Technology", + [3]byte{148, 186, 49}: "Visiontec da Amazônia Ltda.", + [3]byte{148, 186, 86}: "Shenzhen Coship Electronics Co., Ltd.", + [3]byte{148, 191, 30}: "eflow Inc. / Smart Device Planning and Development Division", + [3]byte{148, 191, 149}: "Shenzhen Coship Electronics Co., Ltd", + [3]byte{148, 192, 20}: "Sorter Sp. j. Konrad Grzeszczyk MichaA, Ziomek", + [3]byte{148, 192, 56}: "Tallac Networks", + [3]byte{148, 193, 80}: "2Wire Inc", + [3]byte{148, 195, 228}: "SCA Schucker Gmbh & Co KG", + [3]byte{148, 196, 233}: "PowerLayer Microsystems HongKong Limited", + [3]byte{148, 198, 235}: "NOVA electronics, Inc.", + [3]byte{148, 199, 175}: "Raylios Technology", + [3]byte{148, 201, 98}: "Teseq AG", + [3]byte{148, 202, 15}: "Honeywell Analytics", + [3]byte{148, 204, 185}: "ARRIS Group, Inc.", + [3]byte{148, 205, 172}: "Creowave Oy", + [3]byte{148, 206, 44}: "Sony Mobile Communications AB", + [3]byte{148, 206, 49}: "CTS Limited", + [3]byte{148, 208, 25}: "Cydle Corp.", + [3]byte{148, 214, 14}: "shenzhen yunmao information technologies co., ltd", + [3]byte{148, 215, 35}: "Shanghai DareGlobal Technologies Co., Ltd", + [3]byte{148, 215, 113}: "Samsung Electronics Co.,Ltd", + [3]byte{148, 217, 60}: "ENELPS", + [3]byte{148, 219, 73}: "SITCORP", + [3]byte{148, 219, 201}: "Azurewave", + [3]byte{148, 221, 63}: "A+V Link Technologies, Corp.", + [3]byte{148, 222, 14}: "SmartOptics AS", + [3]byte{148, 222, 128}: "GIGA-BYTE TECHNOLOGY CO.,LTD.", + [3]byte{148, 223, 78}: "Wistron InfoComm(Kunshan)Co.,Ltd.", + [3]byte{148, 223, 88}: "IJ Electron CO.,Ltd.", + [3]byte{148, 224, 208}: "HealthStream Taiwan Inc.", + [3]byte{148, 226, 38}: "D. ORtiz Consulting, LLC", + [3]byte{148, 231, 17}: "Xirka Dama Persada PT", + [3]byte{148, 232, 72}: "FYLDE MICRO LTD", + [3]byte{148, 233, 140}: "Alcatel-Lucent", + [3]byte{148, 235, 44}: "Google Inc.", + [3]byte{148, 235, 205}: "Research In Motion Limited", + [3]byte{148, 246, 146}: "Geminico co.,Ltd.", + [3]byte{148, 247, 32}: "Tianjin Deviser Electronics Instrument Co., Ltd", + [3]byte{148, 250, 232}: "Shenzhen Eycom Technology Co., Ltd", + [3]byte{148, 251, 178}: "Shenzhen Gongjin Electronics Co.,Ltd", + [3]byte{148, 253, 29}: "WhereWhen Corp", + [3]byte{148, 253, 46}: "Shanghai Uniscope Technologies Co.,Ltd", + [3]byte{148, 254, 244}: "SAGEMCOM", + [3]byte{152, 2, 132}: "Theobroma Systems GmbH", + [3]byte{152, 3, 160}: "ABB n.v. Power Quality Products", + [3]byte{152, 3, 216}: "Apple", + [3]byte{152, 12, 130}: "Samsung Electro Mechanics", + [3]byte{152, 13, 46}: "HTC Corporation", + [3]byte{152, 14, 228}: "PRIVATE", + [3]byte{152, 16, 148}: "Shenzhen Vsun communication technology Co.,ltd", + [3]byte{152, 22, 236}: "IC Intracom", + [3]byte{152, 32, 142}: "Definium Technologies", + [3]byte{152, 38, 42}: "Applied Research Associates, Inc", + [3]byte{152, 41, 29}: "Jaguar de Mexico, SA de CV", + [3]byte{152, 41, 63}: "Fujian Start Computer Equipment Co.,Ltd", + [3]byte{152, 44, 190}: "2Wire", + [3]byte{152, 45, 86}: "Resolution Audio", + [3]byte{152, 47, 60}: "Sichuan Changhong Electric Ltd.", + [3]byte{152, 48, 0}: "Beijing KEMACOM Technologies Co., Ltd.", + [3]byte{152, 48, 113}: "DAIKYUNG VASCOM", + [3]byte{152, 52, 157}: "Krauss Maffei Technologies GmbH", + [3]byte{152, 53, 113}: "Sub10 Systems Ltd", + [3]byte{152, 53, 184}: "Assembled Products Corporation", + [3]byte{152, 55, 19}: "PT.Navicom Indonesia", + [3]byte{152, 59, 22}: "AMPAK Technology Inc", + [3]byte{152, 63, 159}: "China SSJ (Suzhou) Network Technology Inc.", + [3]byte{152, 66, 70}: "SOL INDUSTRY PTE., LTD", + [3]byte{152, 67, 218}: "INTERTECH", + [3]byte{152, 71, 60}: "SHANGHAI SUNMON COMMUNICATION TECHNOGY CO.,LTD", + [3]byte{152, 74, 71}: "CHG Hospital Beds", + [3]byte{152, 75, 74}: "ARRIS Group, Inc.", + [3]byte{152, 75, 225}: "Hewlett-Packard Company", + [3]byte{152, 76, 4}: "Zhangzhou Keneng Electrical Equipment Co Ltd", + [3]byte{152, 76, 211}: "Mantis Deposition", + [3]byte{152, 78, 151}: "Starlight Marketing (H. K.) Ltd.", + [3]byte{152, 79, 238}: "Intel Corporate", + [3]byte{152, 82, 177}: "Samsung Electronics", + [3]byte{152, 87, 211}: "HON HAI-CCPBG PRECISION IND.CO.,LTD.", + [3]byte{152, 88, 138}: "SYSGRATION Ltd.", + [3]byte{152, 89, 69}: "Texas Instruments", + [3]byte{152, 92, 147}: "SBG Systems SAS", + [3]byte{152, 93, 70}: "PeopleNet Communication", + [3]byte{152, 94, 27}: "ConversDigital Co., Ltd.", + [3]byte{152, 96, 34}: "EMW Co., Ltd.", + [3]byte{152, 102, 234}: "Industrial Control Communications, Inc.", + [3]byte{152, 107, 61}: "ARRIS Group, Inc.", + [3]byte{152, 108, 245}: "zte corporation", + [3]byte{152, 109, 200}: "TOSHIBA MITSUBISHI-ELECTRIC INDUSTRIAL SYSTEMS CORPORATION", + [3]byte{152, 115, 196}: "Sage Electronic Engineering LLC", + [3]byte{152, 118, 182}: "Adafruit", + [3]byte{152, 119, 112}: "Pep Digital Technology (Guangzhou) Co., Ltd", + [3]byte{152, 126, 70}: "Emizon Networks Limited", + [3]byte{152, 130, 23}: "Disruptive Ltd", + [3]byte{152, 134, 177}: "Flyaudio corporation (China)", + [3]byte{152, 137, 237}: "Anadem Information Inc.", + [3]byte{152, 139, 93}: "SAGEM COMMUNICATION", + [3]byte{152, 139, 173}: "Corintech Ltd.", + [3]byte{152, 142, 52}: "ZHEJIANG BOXSAM ELECTRONIC CO.,LTD", + [3]byte{152, 142, 74}: "NOXUS(BEIJING) TECHNOLOGY CO.,LTD", + [3]byte{152, 142, 221}: "TE Connectivity Limerick", + [3]byte{152, 144, 128}: "Linkpower Network System Inc Ltd.", + [3]byte{152, 144, 150}: "Dell Inc", + [3]byte{152, 147, 204}: "LG Electronics Inc.", + [3]byte{152, 148, 73}: "Skyworth Wireless Technology Ltd.", + [3]byte{152, 167, 176}: "MCST ZAO", + [3]byte{152, 170, 215}: "BLUE WAVE NETWORKING CO LTD", + [3]byte{152, 176, 57}: "Alcatel-Lucent", + [3]byte{152, 184, 227}: "Apple", + [3]byte{152, 188, 87}: "SVA TECHNOLOGIES CO.LTD", + [3]byte{152, 188, 153}: "Edeltech Co.,Ltd.", + [3]byte{152, 190, 148}: "IBM", + [3]byte{152, 192, 235}: "Global Regency Ltd", + [3]byte{152, 200, 69}: "PacketAccess", + [3]byte{152, 205, 180}: "Virident Systems, Inc.", + [3]byte{152, 211, 49}: "Shenzhen Bolutek Technology Co.,Ltd.", + [3]byte{152, 214, 134}: "Chyi Lee industry Co., ltd.", + [3]byte{152, 214, 187}: "Apple", + [3]byte{152, 214, 247}: "LG Electronics", + [3]byte{152, 216, 140}: "Nortel Networks", + [3]byte{152, 218, 146}: "Vuzix Corporation", + [3]byte{152, 220, 217}: "UNITEC Co., Ltd.", + [3]byte{152, 225, 101}: "Accutome", + [3]byte{152, 231, 154}: "Foxconn(NanJing) Communication Co.,Ltd.", + [3]byte{152, 236, 101}: "Cosesy ApS", + [3]byte{152, 240, 171}: "Apple", + [3]byte{152, 241, 112}: "Murata Manufacturing Co., Ltd.", + [3]byte{152, 245, 55}: "zte corporation", + [3]byte{152, 248, 193}: "IDT Technology Limited", + [3]byte{152, 248, 219}: "Marini Impianti Industriali s.r.l.", + [3]byte{152, 250, 227}: "Xiaomi inc.", + [3]byte{152, 251, 18}: "Grand Electronics (HK) Ltd", + [3]byte{152, 252, 17}: "Cisco-Linksys, LLC", + [3]byte{152, 254, 3}: "Ericsson - North America", + [3]byte{152, 254, 148}: "Apple", + [3]byte{152, 255, 106}: "OTEC(Shanghai)Technology Co.,Ltd.", + [3]byte{152, 255, 208}: "Lenovo Mobile Communication Technology Ltd.", + [3]byte{156, 1, 17}: "Shenzhen Newabel Electronic Co., Ltd.", + [3]byte{156, 2, 152}: "Samsung Electronics Co.,Ltd", + [3]byte{156, 3, 158}: "Beijing Winchannel Software Technology Co., Ltd", + [3]byte{156, 4, 115}: "Tecmobile (International) Ltd.", + [3]byte{156, 4, 235}: "Apple", + [3]byte{156, 6, 110}: "Hytera Communications Corporation Limited", + [3]byte{156, 13, 172}: "Tymphany HK Limited", + [3]byte{156, 20, 101}: "Edata Elektronik San. ve Tic. A.Ş.", + [3]byte{156, 24, 116}: "Nokia Danmark A/S", + [3]byte{156, 28, 18}: "Aruba Networks", + [3]byte{156, 31, 221}: "Accupix Inc.", + [3]byte{156, 32, 123}: "Apple", + [3]byte{156, 33, 106}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{156, 34, 14}: "TASCAN Service GmbH", + [3]byte{156, 40, 64}: "Discovery Technology,LTD..", + [3]byte{156, 40, 191}: "Continental Automotive Czech Republic s.r.o.", + [3]byte{156, 40, 239}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{156, 42, 112}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{156, 49, 120}: "Foshan Huadian Intelligent Communications Teachnologies Co.,Ltd", + [3]byte{156, 49, 182}: "Kulite Semiconductor Products Inc", + [3]byte{156, 53, 131}: "Nipro Diagnostics, Inc", + [3]byte{156, 58, 175}: "Samsung Electronics Co.,Ltd", + [3]byte{156, 62, 170}: "EnvyLogic Co.,Ltd.", + [3]byte{156, 65, 124}: "Hame Technology Co., Limited", + [3]byte{156, 68, 61}: "CHENGDU XUGUANG TECHNOLOGY CO, LTD", + [3]byte{156, 68, 166}: "SwiftTest, Inc.", + [3]byte{156, 69, 99}: "DIMEP Sistemas", + [3]byte{156, 74, 123}: "Nokia Corporation", + [3]byte{156, 76, 174}: "Mesa Labs", + [3]byte{156, 78, 32}: "CISCO SYSTEMS, INC.", + [3]byte{156, 78, 54}: "Intel Corporate", + [3]byte{156, 78, 142}: "ALT Systems Ltd", + [3]byte{156, 78, 191}: "BoxCast", + [3]byte{156, 83, 205}: "ENGICAM s.r.l.", + [3]byte{156, 84, 28}: "Shenzhen My-power Technology Co.,Ltd", + [3]byte{156, 84, 202}: "Zhengzhou VCOM Science and Technology Co.,Ltd", + [3]byte{156, 85, 180}: "I.S.E. S.r.l.", + [3]byte{156, 87, 17}: "Feitian Xunda(Beijing) Aeronautical Information Technology Co., Ltd.", + [3]byte{156, 91, 150}: "NMR Corporation", + [3]byte{156, 92, 141}: "FIREMAX INDÚSTRIA E COMÉRCIO DE PRODUTOS ELETRÔNICOS LTDA", + [3]byte{156, 93, 18}: "Aerohive Networks Inc", + [3]byte{156, 93, 149}: "VTC Electronics Corp.", + [3]byte{156, 94, 115}: "Calibre UK Ltd", + [3]byte{156, 97, 29}: "Omni-ID USA, Inc.", + [3]byte{156, 100, 94}: "Harman Consumer Group", + [3]byte{156, 101, 176}: "Samsung Electronics Co.,Ltd", + [3]byte{156, 101, 249}: "AcSiP Technology Corp.", + [3]byte{156, 102, 80}: "Glodio Technolies Co.,Ltd Tianjin Branch", + [3]byte{156, 106, 190}: "QEES ApS.", + [3]byte{156, 117, 20}: "Wildix srl", + [3]byte{156, 119, 170}: "NADASNV", + [3]byte{156, 121, 172}: "Suntec Software(Shanghai) Co., Ltd.", + [3]byte{156, 123, 210}: "NEOLAB Convergence", + [3]byte{156, 128, 125}: "SYSCABLE Korea Inc.", + [3]byte{156, 128, 223}: "Arcadyan Technology Corporation", + [3]byte{156, 134, 218}: "Phoenix Geophysics Ltd.", + [3]byte{156, 136, 136}: "Simac Techniek NV", + [3]byte{156, 139, 241}: "The Warehouse Limited", + [3]byte{156, 141, 26}: "INTEG process group inc", + [3]byte{156, 142, 153}: "Hewlett-Packard Company", + [3]byte{156, 142, 220}: "Teracom Limited", + [3]byte{156, 147, 78}: "Xerox Corporation", + [3]byte{156, 147, 228}: "PRIVATE", + [3]byte{156, 149, 248}: "SmartDoor Systems, LLC", + [3]byte{156, 151, 38}: "Technicolor", + [3]byte{156, 152, 17}: "Guangzhou Sunrise Electronics Development Co., Ltd", + [3]byte{156, 156, 29}: "Starkey Labs Inc.", + [3]byte{156, 161, 10}: "SCLE SFE", + [3]byte{156, 161, 52}: "Nike, Inc.", + [3]byte{156, 163, 186}: "SAKURA Internet Inc.", + [3]byte{156, 165, 119}: "Osorno Enterprises Inc.", + [3]byte{156, 169, 228}: "zte corporation", + [3]byte{156, 173, 151}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{156, 173, 239}: "Obihai Technology, Inc.", + [3]byte{156, 175, 202}: "CISCO SYSTEMS, INC.", + [3]byte{156, 176, 8}: "Ubiquitous Computing Technology Corporation", + [3]byte{156, 178, 6}: "PROCENTEC", + [3]byte{156, 182, 84}: "Hewlett Packard", + [3]byte{156, 183, 13}: "Liteon Technology Corporation", + [3]byte{156, 183, 147}: "Creatcomm Technology Inc.", + [3]byte{156, 187, 152}: "Shen Zhen RND Electronic Co.,LTD", + [3]byte{156, 189, 157}: "SkyDisk, Inc.", + [3]byte{156, 192, 119}: "PrintCounts, LLC", + [3]byte{156, 192, 210}: "Conductix-Wampfler AG", + [3]byte{156, 193, 114}: "Huawei Technologies Co., Ltd", + [3]byte{156, 199, 166}: "AVM GmbH", + [3]byte{156, 199, 209}: "SHARP Corporation", + [3]byte{156, 202, 217}: "Nokia Corporation", + [3]byte{156, 205, 130}: "CHENG UEI PRECISION INDUSTRY CO.,LTD", + [3]byte{156, 210, 30}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{156, 210, 75}: "zte corporation", + [3]byte{156, 211, 109}: "NETGEAR INC.,", + [3]byte{156, 214, 67}: "D-Link International", + [3]byte{156, 217, 23}: "Motorola Mobility LLC", + [3]byte{156, 223, 3}: "Harman/Becker Automotive Systems GmbH", + [3]byte{156, 225, 14}: "NCTech Ltd", + [3]byte{156, 225, 214}: "Junger Audio-Studiotechnik GmbH", + [3]byte{156, 230, 53}: "Nintendo Co., Ltd.", + [3]byte{156, 230, 231}: "Samsung Electronics Co.,Ltd", + [3]byte{156, 231, 189}: "Winduskorea co., Ltd", + [3]byte{156, 235, 232}: "BizLink (Kunshan) Co.,Ltd", + [3]byte{156, 246, 26}: "UTC Fire and Security", + [3]byte{156, 246, 125}: "Ricardo Prague, s.r.o.", + [3]byte{156, 248, 219}: "shenzhen eyunmei technology co,.ltd", + [3]byte{156, 249, 56}: "AREVA NP GmbH", + [3]byte{156, 251, 241}: "MESOMATIC GmbH & Co.KG", + [3]byte{156, 255, 190}: "OTSL Inc.", + [3]byte{160, 2, 220}: "Amazon Technologies Inc.", + [3]byte{160, 3, 99}: "Robert Bosch Healthcare GmbH", + [3]byte{160, 6, 39}: "NEXPA System", + [3]byte{160, 7, 152}: "Samsung Electronics", + [3]byte{160, 7, 182}: "Advanced Technical Support, Inc.", + [3]byte{160, 10, 191}: "Wieson Technologies Co., Ltd.", + [3]byte{160, 11, 186}: "SAMSUNG ELECTRO-MECHANICS", + [3]byte{160, 12, 161}: "SKTB SKiT", + [3]byte{160, 18, 144}: "Avaya, Inc", + [3]byte{160, 18, 219}: "TABUCHI ELECTRIC CO.,LTD", + [3]byte{160, 19, 59}: "Copyright © HiTi Digital, Inc.", + [3]byte{160, 20, 61}: "PARROT SA", + [3]byte{160, 22, 92}: "Triteka LTD", + [3]byte{160, 24, 89}: "Shenzhen Yidashi Electronics Co Ltd", + [3]byte{160, 25, 23}: "Bertel S.p.a.", + [3]byte{160, 28, 5}: "NIMAX TELECOM CO.,LTD.", + [3]byte{160, 29, 72}: "Hewlett Packard", + [3]byte{160, 33, 149}: "Samsung Electronics Digital Imaging", + [3]byte{160, 33, 183}: "NETGEAR", + [3]byte{160, 35, 27}: "TeleComp R&D Corp.", + [3]byte{160, 43, 184}: "Hewlett Packard", + [3]byte{160, 46, 243}: "United Integrated Services Co., Led.", + [3]byte{160, 54, 159}: "Intel Corporate", + [3]byte{160, 54, 240}: "Comprehensive Power", + [3]byte{160, 54, 250}: "Ettus Research LLC", + [3]byte{160, 58, 117}: "PSS Belgium N.V.", + [3]byte{160, 59, 27}: "Inspire Tech", + [3]byte{160, 64, 37}: "Actioncable, Inc.", + [3]byte{160, 64, 65}: "SAMWONFA Co.,Ltd.", + [3]byte{160, 65, 167}: "NL Ministry of Defense", + [3]byte{160, 66, 63}: "Tyan Computer Corp", + [3]byte{160, 72, 28}: "Hewlett Packard", + [3]byte{160, 76, 193}: "Helixtech Corp.", + [3]byte{160, 78, 4}: "Nokia Corporation", + [3]byte{160, 81, 198}: "Avaya, Inc", + [3]byte{160, 85, 222}: "Pace plc", + [3]byte{160, 86, 178}: "Harman/Becker Automotive Systems GmbH", + [3]byte{160, 89, 58}: "V.D.S. Video Display Systems srl", + [3]byte{160, 90, 164}: "Grand Products Nevada, Inc.", + [3]byte{160, 91, 33}: "ENVINET GmbH", + [3]byte{160, 93, 193}: "TMCT Co., LTD.", + [3]byte{160, 93, 231}: "DIRECTV, Inc.", + [3]byte{160, 94, 107}: "MELPER Co., Ltd.", + [3]byte{160, 101, 24}: "VNPT TECHNOLOGY", + [3]byte{160, 103, 190}: "Sicon s.r.l.", + [3]byte{160, 105, 134}: "Wellav Technologies Ltd", + [3]byte{160, 106, 0}: "Verilink Corporation", + [3]byte{160, 108, 236}: "RIM", + [3]byte{160, 109, 9}: "Intelcan Technosystems Inc.", + [3]byte{160, 110, 80}: "Nanotek Elektronik Sistemler Ltd. Sti.", + [3]byte{160, 113, 169}: "Nokia Corporation", + [3]byte{160, 115, 50}: "Cashmaster International Limited", + [3]byte{160, 115, 252}: "Rancore Technologies Private Limited", + [3]byte{160, 117, 145}: "Samsung Electronics Co.,Ltd", + [3]byte{160, 119, 113}: "Vialis BV", + [3]byte{160, 120, 186}: "Pantech Co., Ltd.", + [3]byte{160, 130, 31}: "Samsung Electronics Co.,Ltd", + [3]byte{160, 130, 199}: "P.T.I Co.,LTD", + [3]byte{160, 134, 29}: "Chengdu Fuhuaxin Technology co.,Ltd", + [3]byte{160, 134, 236}: "SAEHAN HITEC Co., Ltd", + [3]byte{160, 136, 105}: "Intel Corporate", + [3]byte{160, 136, 180}: "Intel Corporate", + [3]byte{160, 137, 228}: "Skyworth Digital Technology(Shenzhen) Co.,Ltd", + [3]byte{160, 138, 135}: "HuiZhou KaiYue Electronic Co.,Ltd", + [3]byte{160, 140, 21}: "Gerhard D. Wempe KG", + [3]byte{160, 140, 155}: "Xtreme Technologies Corp", + [3]byte{160, 144, 222}: "VEEDIMS,LLC", + [3]byte{160, 147, 71}: "GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD.", + [3]byte{160, 152, 5}: "OpenVox Communication Co Ltd", + [3]byte{160, 152, 237}: "Shandong Intelligent Optical Communication Development Co., Ltd.", + [3]byte{160, 154, 90}: "Time Domain", + [3]byte{160, 155, 189}: "Total Aviation Solutions Pty Ltd", + [3]byte{160, 161, 48}: "DLI Taiwan Branch office", + [3]byte{160, 162, 60}: "GPMS", + [3]byte{160, 163, 226}: "Actiontec Electronics, Inc", + [3]byte{160, 167, 99}: "Polytron Vertrieb GmbH", + [3]byte{160, 168, 205}: "Intel Corporate", + [3]byte{160, 170, 253}: "EraThink Technologies Corp.", + [3]byte{160, 177, 0}: "ShenZhen Cando Electronics Co.,Ltd", + [3]byte{160, 179, 204}: "Hewlett Packard", + [3]byte{160, 180, 165}: "Samsung Elec Co.,Ltd", + [3]byte{160, 181, 218}: "HongKong THTF Co., Ltd", + [3]byte{160, 182, 98}: "Acutvista Innovation Co., Ltd.", + [3]byte{160, 185, 237}: "Skytap", + [3]byte{160, 186, 184}: "Pixon Imaging", + [3]byte{160, 191, 80}: "S.C. ADD-PRODUCTION S.R.L.", + [3]byte{160, 191, 165}: "CORESYS", + [3]byte{160, 195, 222}: "Triton Electronic Systems Ltd.", + [3]byte{160, 198, 236}: "ShenZhen ANYK Technology Co.,LTD", + [3]byte{160, 206, 200}: "CE LINK LIMITED", + [3]byte{160, 207, 91}: "CISCO SYSTEMS, INC.", + [3]byte{160, 209, 42}: "AXPRO Technology Inc.", + [3]byte{160, 211, 193}: "Hewlett Packard", + [3]byte{160, 218, 146}: "Nanjing Glarun Atten Technology Co. Ltd.", + [3]byte{160, 220, 4}: "Becker-Antriebe GmbH", + [3]byte{160, 221, 151}: "PolarLink Technologies, Ltd", + [3]byte{160, 221, 229}: "SHARP Corporation", + [3]byte{160, 222, 5}: "JSC \"Irbis-T\"", + [3]byte{160, 226, 1}: "AVTrace Ltd.(China)", + [3]byte{160, 226, 90}: "Amicus SK, s.r.o.", + [3]byte{160, 226, 149}: "DAT System Co.,Ltd", + [3]byte{160, 228, 83}: "Sony Mobile Communications AB", + [3]byte{160, 229, 52}: "Stratec Biomedical AG", + [3]byte{160, 229, 233}: "enimai Inc", + [3]byte{160, 230, 248}: "Texas Instruments Inc", + [3]byte{160, 233, 219}: "Ningbo FreeWings Technologies Co.,Ltd", + [3]byte{160, 235, 118}: "AirCUVE Inc.", + [3]byte{160, 236, 128}: "zte corporation", + [3]byte{160, 237, 205}: "Apple", + [3]byte{160, 239, 132}: "Seine Image Int'l Co., Ltd", + [3]byte{160, 242, 23}: "GE Medical System(China) Co., Ltd.", + [3]byte{160, 243, 193}: "TP-LINK TECHNOLOGIES CO., LTD.", + [3]byte{160, 243, 228}: "Alcatel Lucent IPD", + [3]byte{160, 244, 25}: "Nokia Corporation", + [3]byte{160, 244, 80}: "HTC Corporation", + [3]byte{160, 244, 89}: "FN-LINK TECHNOLOGY LIMITED", + [3]byte{160, 252, 110}: "Telegrafia a.s.", + [3]byte{160, 254, 145}: "AVAT Automation GmbH", + [3]byte{164, 1, 48}: "ABIsystems Co., LTD", + [3]byte{164, 5, 158}: "STA Infinity LLP", + [3]byte{164, 9, 203}: "Alfred Kaercher GmbH & Co KG", + [3]byte{164, 11, 237}: "Carry Technology Co.,Ltd", + [3]byte{164, 12, 195}: "CISCO SYSTEMS, INC.", + [3]byte{164, 18, 66}: "NEC Platforms, Ltd.", + [3]byte{164, 19, 78}: "Luxul", + [3]byte{164, 21, 102}: "Wei Fang Goertek Electronics Co.,Ltd", + [3]byte{164, 23, 49}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{164, 24, 117}: "CISCO SYSTEMS, INC.", + [3]byte{164, 27, 192}: "Fastec Imaging Corporation", + [3]byte{164, 31, 114}: "Dell Inc.", + [3]byte{164, 33, 138}: "Nortel Networks", + [3]byte{164, 35, 5}: "Open Networking Laboratory", + [3]byte{164, 36, 179}: "FlatFrog Laboratories AB", + [3]byte{164, 37, 27}: "Avaya, Inc", + [3]byte{164, 41, 64}: "Shenzhen YOUHUA Technology Co., Ltd", + [3]byte{164, 41, 183}: "bluesky", + [3]byte{164, 44, 8}: "Masterwork Automodules", + [3]byte{164, 51, 209}: "Fibrlink Communications Co.,Ltd.", + [3]byte{164, 56, 252}: "Plastic Logic", + [3]byte{164, 58, 105}: "Vers Inc", + [3]byte{164, 59, 250}: "IEEE REGISTRATION AUTHORITY - Please see MAM public listing for more information.", + [3]byte{164, 61, 120}: "GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD", + [3]byte{164, 70, 107}: "EOC Technology", + [3]byte{164, 70, 250}: "AmTRAN Video Corporation", + [3]byte{164, 74, 211}: "ST Electronics(Shanghai) Co.,Ltd", + [3]byte{164, 75, 21}: "Sun Cupid Technology (HK) LTD", + [3]byte{164, 76, 17}: "CISCO SYSTEMS, INC.", + [3]byte{164, 78, 45}: "Adaptive Wireless Solutions, LLC", + [3]byte{164, 78, 49}: "Intel Corporate", + [3]byte{164, 80, 85}: "busware.de", + [3]byte{164, 82, 111}: "ADB Broadband Italia", + [3]byte{164, 86, 27}: "MCOT Corporation", + [3]byte{164, 86, 48}: "CISCO SYSTEMS, INC.", + [3]byte{164, 90, 28}: "smart-electronic GmbH", + [3]byte{164, 92, 39}: "Nintendo Co., Ltd.", + [3]byte{164, 93, 54}: "Hewlett Packard", + [3]byte{164, 93, 161}: "ADB Broadband Italia", + [3]byte{164, 96, 50}: "MRV Communications (Networks) LTD", + [3]byte{164, 103, 6}: "Apple", + [3]byte{164, 108, 193}: "LTi REEnergy GmbH", + [3]byte{164, 110, 121}: "DFT System Co.Ltd", + [3]byte{164, 112, 214}: "Motorola Mobility LLC", + [3]byte{164, 119, 51}: "Google", + [3]byte{164, 119, 96}: "Nokia Corporation", + [3]byte{164, 121, 228}: "KLINFO Corp", + [3]byte{164, 122, 164}: "ARRIS Group, Inc.", + [3]byte{164, 122, 207}: "VIBICOM COMMUNICATIONS INC.", + [3]byte{164, 124, 20}: "ChargeStorm AB", + [3]byte{164, 124, 31}: "Cobham plc", + [3]byte{164, 126, 57}: "zte corporation", + [3]byte{164, 129, 238}: "Nokia Corporation", + [3]byte{164, 133, 107}: "Q Electronics Ltd", + [3]byte{164, 137, 91}: "ARK INFOSOLUTIONS PVT LTD", + [3]byte{164, 144, 5}: "CHINA GREATWALL COMPUTER SHENZHEN CO.,LTD", + [3]byte{164, 147, 76}: "CISCO SYSTEMS, INC.", + [3]byte{164, 151, 187}: "Hitachi Industrial Equipment Systems Co.,Ltd", + [3]byte{164, 153, 71}: "Huawei Technologies Co., Ltd", + [3]byte{164, 153, 129}: "FuJian Elite Power Tech CO.,LTD.", + [3]byte{164, 154, 88}: "Samsung Electronics Co.,Ltd", + [3]byte{164, 155, 19}: "Burroughs Payment Systems, Inc.", + [3]byte{164, 157, 73}: "Ketra, Inc.", + [3]byte{164, 158, 219}: "AutoCrib, Inc.", + [3]byte{164, 159, 133}: "Lyve Minds, Inc", + [3]byte{164, 159, 137}: "Shanghai Rui Rui Communication Technology Co.Ltd.", + [3]byte{164, 161, 194}: "Ericsson AB (EAB)", + [3]byte{164, 162, 74}: "Cisco SPVTG", + [3]byte{164, 164, 211}: "Bluebank Communication Technology Co.Ltd", + [3]byte{164, 168, 15}: "Shenzhen Coship Electronics Co., Ltd.", + [3]byte{164, 173, 0}: "Ragsdale Technology", + [3]byte{164, 173, 184}: "Vitec Group, Camera Dynamics Ltd", + [3]byte{164, 174, 154}: "Maestro Wireless Solutions ltd.", + [3]byte{164, 177, 33}: "Arantia 2010 S.L.", + [3]byte{164, 177, 151}: "Apple", + [3]byte{164, 177, 233}: "Technicolor", + [3]byte{164, 177, 238}: "H. ZANDER GmbH & Co. KG", + [3]byte{164, 178, 167}: "Adaxys Solutions AG", + [3]byte{164, 179, 106}: "JSC SDO Chromatec", + [3]byte{164, 184, 24}: "PENTA Gesellschaft für elektronische Industriedatenverarbeitung mbH", + [3]byte{164, 185, 128}: "Parking BOXX Inc.", + [3]byte{164, 186, 219}: "Dell Inc.", + [3]byte{164, 187, 175}: "Lime Instruments", + [3]byte{164, 190, 97}: "EutroVision System, Inc.", + [3]byte{164, 192, 199}: "ShenZhen Hitom Communication Technology Co..LTD", + [3]byte{164, 192, 225}: "Nintendo Co., Ltd.", + [3]byte{164, 194, 171}: "Hangzhou LEAD-IT Information & Technology Co.,Ltd", + [3]byte{164, 195, 97}: "Apple", + [3]byte{164, 199, 222}: "Cambridge Industries(Group) Co.,Ltd.", + [3]byte{164, 208, 148}: "Erwin Peters Systemtechnik GmbH", + [3]byte{164, 209, 143}: "Shenzhen Skyee Optical Fiber Communication Technology Ltd.", + [3]byte{164, 209, 209}: "ECOtality North America", + [3]byte{164, 209, 210}: "Apple", + [3]byte{164, 211, 181}: "GLITEL Stropkov, s.r.o.", + [3]byte{164, 216, 86}: "Gimbal, Inc", + [3]byte{164, 218, 63}: "Bionics Corp.", + [3]byte{164, 219, 46}: "Kingspan Environmental Ltd", + [3]byte{164, 219, 48}: "Liteon Technology Corporation", + [3]byte{164, 222, 80}: "Total Walther GmbH", + [3]byte{164, 224, 230}: "FILIZOLA S.A. PESAGEM E AUTOMACAO", + [3]byte{164, 227, 46}: "Silicon & Software Systems Ltd.", + [3]byte{164, 227, 145}: "DENY FONTAINE", + [3]byte{164, 228, 184}: "BlackBerry Limited", + [3]byte{164, 231, 49}: "Nokia Corporation", + [3]byte{164, 231, 228}: "Connex GmbH", + [3]byte{164, 233, 145}: "SISTEMAS AUDIOVISUALES ITELSIS S.L.", + [3]byte{164, 233, 163}: "Honest Technology Co., Ltd", + [3]byte{164, 235, 211}: "Samsung Electronics Co.,Ltd", + [3]byte{164, 237, 78}: "ARRIS Group, Inc.", + [3]byte{164, 238, 87}: "SEIKO EPSON CORPORATION", + [3]byte{164, 239, 82}: "Telewave Co., Ltd.", + [3]byte{164, 243, 193}: "Open Source Robotics Foundation, Inc.", + [3]byte{164, 245, 34}: "CHOFU SEISAKUSHO CO.,LTD", + [3]byte{164, 247, 208}: "LAN Accessories Co., Ltd.", + [3]byte{164, 251, 141}: "Hangzhou Dunchong Technology Co.Ltd", + [3]byte{164, 252, 206}: "Security Expert Ltd.", + [3]byte{168, 1, 128}: "IMAGO Technologies GmbH", + [3]byte{168, 6, 0}: "Samsung Electronics Co.,Ltd", + [3]byte{168, 12, 13}: "Cisco", + [3]byte{168, 19, 116}: "Panasonic Corporation AVC Networks Company", + [3]byte{168, 21, 77}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{168, 22, 178}: "LG Electronics", + [3]byte{168, 23, 88}: "Elektronik System i Umeå AB", + [3]byte{168, 27, 24}: "XTS CORP", + [3]byte{168, 27, 93}: "Foxtel Management Pty Ltd", + [3]byte{168, 29, 22}: "AzureWave Technologies, Inc", + [3]byte{168, 31, 175}: "KRYPTON POLSKA", + [3]byte{168, 32, 102}: "Apple", + [3]byte{168, 36, 235}: "ZAO NPO Introtest", + [3]byte{168, 38, 217}: "HTC Corporation", + [3]byte{168, 41, 76}: "Precision Optical Transceivers, Inc.", + [3]byte{168, 43, 214}: "Shina System Co., Ltd", + [3]byte{168, 48, 173}: "Wei Fang Goertek Electronics Co.,Ltd", + [3]byte{168, 50, 154}: "Digicom Futuristic Technologies Ltd.", + [3]byte{168, 57, 68}: "Actiontec Electronics, Inc", + [3]byte{168, 64, 65}: "Dragino Technology Co., Limited", + [3]byte{168, 68, 129}: "Nokia Corporation", + [3]byte{168, 69, 233}: "Firich Enterprises CO., LTD.", + [3]byte{168, 73, 165}: "Lisantech Co., Ltd.", + [3]byte{168, 84, 178}: "Wistron Neweb Corp.", + [3]byte{168, 85, 106}: "Pocketnet Technology Inc.", + [3]byte{168, 87, 78}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{168, 91, 176}: "Shenzhen Dehoo Technology Co.,Ltd", + [3]byte{168, 91, 243}: "Audivo GmbH", + [3]byte{168, 97, 170}: "Cloudview Limited", + [3]byte{168, 98, 162}: "JIWUMEDIA CO., LTD.", + [3]byte{168, 99, 223}: "DISPLAIRE CORPORATION", + [3]byte{168, 99, 242}: "Texas Instruments", + [3]byte{168, 100, 5}: "nimbus 9, Inc", + [3]byte{168, 101, 178}: "DONGGUAN YISHANG ELECTRONIC TECHNOLOGY CO., LIMITED", + [3]byte{168, 106, 111}: "RIM", + [3]byte{168, 112, 165}: "UniComm Inc.", + [3]byte{168, 117, 214}: "FreeTek International Co., Ltd.", + [3]byte{168, 117, 226}: "Aventura Technologies, Inc.", + [3]byte{168, 119, 111}: "Zonoff", + [3]byte{168, 123, 57}: "Nokia Corporation", + [3]byte{168, 124, 1}: "Samsung Elec Co.,Ltd", + [3]byte{168, 126, 51}: "Nokia Danmark A/S", + [3]byte{168, 129, 241}: "BMEYE B.V.", + [3]byte{168, 134, 221}: "Apple, Inc.", + [3]byte{168, 135, 146}: "Broadband Antenna Tracking Systems", + [3]byte{168, 135, 237}: "ARC Wireless LLC", + [3]byte{168, 136, 8}: "Apple", + [3]byte{168, 140, 238}: "MicroMade Galka i Drozdz sp.j.", + [3]byte{168, 141, 123}: "SunDroid Global limited.", + [3]byte{168, 142, 36}: "Apple", + [3]byte{168, 146, 44}: "LG Electronics", + [3]byte{168, 147, 230}: "JIANGXI JINGGANGSHAN CKING COMMUNICATION TECHNOLOGY CO.,LTD", + [3]byte{168, 149, 176}: "Aker Subsea Ltd", + [3]byte{168, 150, 138}: "Apple", + [3]byte{168, 151, 220}: "IBM", + [3]byte{168, 152, 198}: "Shinbo Co., Ltd.", + [3]byte{168, 153, 92}: "aizo ag", + [3]byte{168, 155, 16}: "inMotion Ltd.", + [3]byte{168, 157, 210}: "Shanghai DareGlobal Technologies Co., Ltd", + [3]byte{168, 166, 104}: "zte corporation", + [3]byte{168, 173, 61}: "Alcatel-Lucent Shanghai Bell Co., Ltd", + [3]byte{168, 176, 174}: "LEONI", + [3]byte{168, 177, 212}: "CISCO SYSTEMS, INC.", + [3]byte{168, 185, 179}: "ESSYS", + [3]byte{168, 187, 207}: "Apple", + [3]byte{168, 189, 26}: "Honey Bee (Hong Kong) Limited", + [3]byte{168, 189, 58}: "UNIONMAN TECHNOLOGY CO.,LTD", + [3]byte{168, 194, 34}: "TM-Research Inc.", + [3]byte{168, 203, 149}: "EAST BEST CO., LTD.", + [3]byte{168, 204, 197}: "Saab AB (publ)", + [3]byte{168, 206, 144}: "CVC", + [3]byte{168, 208, 227}: "Systech Electronics Ltd.", + [3]byte{168, 208, 229}: "Juniper Networks", + [3]byte{168, 210, 54}: "Lightware Visual Engineering", + [3]byte{168, 211, 200}: "Wachendorff Elektronik GmbH & Co. KG", + [3]byte{168, 216, 138}: "Wyconn", + [3]byte{168, 224, 24}: "Nokia Corporation", + [3]byte{168, 227, 238}: "Sony Computer Entertainment Inc.", + [3]byte{168, 229, 57}: "Moimstone Co.,Ltd", + [3]byte{168, 239, 38}: "Tritonwave", + [3]byte{168, 242, 116}: "Samsung Electronics", + [3]byte{168, 244, 112}: "Fujian Newland Communication Science Technologies Co.,Ltd.", + [3]byte{168, 247, 224}: "PLANET Technology Corporation", + [3]byte{168, 249, 75}: "Eltex Enterprise Ltd.", + [3]byte{168, 250, 216}: "Apple", + [3]byte{168, 251, 112}: "WiseSec L.t.d", + [3]byte{168, 252, 183}: "Consolidated Resource Imaging", + [3]byte{170, 0, 0}: "DIGITAL EQUIPMENT CORPORATION", + [3]byte{170, 0, 1}: "DIGITAL EQUIPMENT CORPORATION", + [3]byte{170, 0, 2}: "DIGITAL EQUIPMENT CORPORATION", + [3]byte{170, 0, 3}: "DIGITAL EQUIPMENT CORPORATION", + [3]byte{170, 0, 4}: "DIGITAL EQUIPMENT CORPORATION", + [3]byte{172, 1, 66}: "Uriel Technologies SIA", + [3]byte{172, 2, 202}: "HI Solutions, Inc.", + [3]byte{172, 2, 207}: "RW Tecnologia Industria e Comercio Ltda", + [3]byte{172, 2, 239}: "Comsis", + [3]byte{172, 6, 19}: "Senselogix Ltd", + [3]byte{172, 10, 97}: "Labor S.r.L.", + [3]byte{172, 13, 254}: "Ekon GmbH - myGEKKO", + [3]byte{172, 17, 211}: "Suzhou HOTEK Video Technology Co. Ltd", + [3]byte{172, 20, 97}: "ATAW Co., Ltd.", + [3]byte{172, 20, 210}: "wi-daq, inc.", + [3]byte{172, 22, 45}: "Hewlett Packard", + [3]byte{172, 23, 2}: "Fibar Group sp. z o.o.", + [3]byte{172, 24, 38}: "SEIKO EPSON CORPORATION", + [3]byte{172, 25, 159}: "SUNGROW POWER SUPPLY CO.,LTD.", + [3]byte{172, 32, 170}: "DMATEK Co., Ltd.", + [3]byte{172, 34, 11}: "ASUSTek COMPUTER INC.", + [3]byte{172, 45, 163}: "TXTR GmbH", + [3]byte{172, 47, 168}: "Humannix Co.,Ltd.", + [3]byte{172, 49, 157}: "Shenzhen TG-NET Botone Technology Co.,Ltd.", + [3]byte{172, 52, 203}: "Shanhai GBCOM Communication Technology Co. Ltd", + [3]byte{172, 54, 19}: "Samsung Electronics Co.,Ltd", + [3]byte{172, 56, 112}: "Lenovo Mobile Communication Technology Ltd.", + [3]byte{172, 58, 122}: "Roku", + [3]byte{172, 60, 11}: "Apple", + [3]byte{172, 60, 180}: "Nilan A/S", + [3]byte{172, 61, 5}: "Instorescreen Aisa", + [3]byte{172, 61, 117}: "HANGZHOU ZHIWAY TECHNOLOGIES CO.,LTD.", + [3]byte{172, 63, 164}: "TAIYO YUDEN CO.,LTD", + [3]byte{172, 64, 234}: "C&T Solution Inc.", + [3]byte{172, 65, 34}: "Eclipse Electronic Systems Inc.", + [3]byte{172, 68, 242}: "Revolabs Inc", + [3]byte{172, 71, 35}: "Genelec", + [3]byte{172, 74, 254}: "Hisense Broadband Multimedia Technology Co.,Ltd.", + [3]byte{172, 75, 200}: "Juniper Networks", + [3]byte{172, 78, 145}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{172, 79, 252}: "SVS-VISTEK GmbH", + [3]byte{172, 80, 54}: "Pi-Coral Inc", + [3]byte{172, 81, 53}: "MPI TECH", + [3]byte{172, 81, 238}: "Cambridge Communication Systems Ltd", + [3]byte{172, 84, 236}: "IEEE P1823 Standards Working Group", + [3]byte{172, 88, 59}: "Human Assembler, Inc.", + [3]byte{172, 93, 16}: "Pace Americas", + [3]byte{172, 94, 140}: "Utillink", + [3]byte{172, 97, 35}: "Drivven, Inc.", + [3]byte{172, 103, 6}: "Ruckus Wireless", + [3]byte{172, 107, 172}: "Jenny Science AG", + [3]byte{172, 110, 26}: "Shenzhen Gongjin Electronics Co.,Ltd", + [3]byte{172, 111, 79}: "Enspert Inc", + [3]byte{172, 111, 187}: "TATUNG Technology Inc.", + [3]byte{172, 111, 217}: "Valueplus Inc.", + [3]byte{172, 114, 54}: "Lexking Technology Co., Ltd.", + [3]byte{172, 114, 137}: "Intel Corporate", + [3]byte{172, 122, 66}: "iConnectivity", + [3]byte{172, 123, 161}: "Intel Corporate", + [3]byte{172, 127, 62}: "Apple", + [3]byte{172, 128, 214}: "Hexatronic AB", + [3]byte{172, 129, 18}: "Gemtek Technology Co., Ltd.", + [3]byte{172, 129, 243}: "Nokia Corporation", + [3]byte{172, 131, 23}: "Shenzhen Furtunetel Communication Co., Ltd", + [3]byte{172, 131, 240}: "ImmediaTV Corporation", + [3]byte{172, 133, 61}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{172, 134, 116}: "Open Mesh, Inc.", + [3]byte{172, 134, 126}: "Create New Technology (HK) Limited Company", + [3]byte{172, 135, 163}: "Apple", + [3]byte{172, 138, 205}: "ROGER D.Wensker, G.Wensker sp.j.", + [3]byte{172, 141, 20}: "Smartrove Inc", + [3]byte{172, 147, 47}: "Nokia Corporation", + [3]byte{172, 148, 3}: "Envision Peripherals Inc", + [3]byte{172, 154, 150}: "Lantiq Deutschland GmbH", + [3]byte{172, 155, 132}: "Smak Tecnologia e Automacao", + [3]byte{172, 156, 228}: "Alcatel-Lucent Shanghai Bell Co., Ltd", + [3]byte{172, 160, 22}: "CISCO SYSTEMS, INC.", + [3]byte{172, 162, 19}: "Shenzhen Bilian electronic CO.,LTD", + [3]byte{172, 162, 44}: "Baycity Technologies Ltd", + [3]byte{172, 163, 30}: "Aruba Networks", + [3]byte{172, 164, 48}: "Peerless AV", + [3]byte{172, 169, 25}: "TrekStor GmbH", + [3]byte{172, 169, 160}: "Audioengine, Ltd.", + [3]byte{172, 171, 141}: "Lyngso Marine A/S", + [3]byte{172, 179, 19}: "ARRIS Group, Inc.", + [3]byte{172, 183, 79}: "METEL s.r.o.", + [3]byte{172, 184, 89}: "Uniband Electronic Corp,", + [3]byte{172, 189, 11}: "IMAC CO.,LTD", + [3]byte{172, 190, 117}: "Ufine Technologies Co.,Ltd.", + [3]byte{172, 190, 182}: "Visualedge Technology Co., Ltd.", + [3]byte{172, 194, 236}: "CLT INT'L IND. CORP.", + [3]byte{172, 197, 149}: "Graphite Systems", + [3]byte{172, 198, 152}: "Kohzu Precision Co., Ltd.", + [3]byte{172, 201, 53}: "Ness Corporation", + [3]byte{172, 202, 84}: "Telldus Technologies AB", + [3]byte{172, 202, 142}: "ODA Technologies", + [3]byte{172, 202, 186}: "Midokura Co., Ltd.", + [3]byte{172, 203, 9}: "Hefcom Metering (Pty) Ltd", + [3]byte{172, 204, 142}: "Axis Communications AB", + [3]byte{172, 206, 143}: "HWA YAO TECHNOLOGIES CO., LTD", + [3]byte{172, 207, 35}: "Hi-flying electronics technology Co.,Ltd", + [3]byte{172, 207, 92}: "Apple", + [3]byte{172, 209, 128}: "Crexendo Business Solutions, Inc.", + [3]byte{172, 211, 100}: "ABB SPA, ABB SACE DIV.", + [3]byte{172, 214, 87}: "Shaanxi Guolian Digital TV Technology Co., Ltd.", + [3]byte{172, 217, 214}: "tci GmbH", + [3]byte{172, 219, 218}: "Shenzhen Geniatech Inc, Ltd", + [3]byte{172, 222, 72}: "PRIVATE", + [3]byte{172, 224, 105}: "ISAAC Instruments", + [3]byte{172, 226, 21}: "Huawei Technologies Co., Ltd", + [3]byte{172, 227, 72}: "MadgeTech, Inc", + [3]byte{172, 228, 46}: "SK hynix", + [3]byte{172, 230, 75}: "Shenzhen Baojia Battery Technology Co., Ltd.", + [3]byte{172, 232, 123}: "Huawei Technologies Co., Ltd", + [3]byte{172, 232, 126}: "Bytemark Computer Consulting Ltd", + [3]byte{172, 233, 127}: "IoT Tech Limited", + [3]byte{172, 233, 170}: "Hay Systems Ltd", + [3]byte{172, 234, 106}: "GENIX INFOCOMM CO., LTD.", + [3]byte{172, 238, 59}: "6harmonics Inc", + [3]byte{172, 240, 178}: "Becker Electronics Taiwan Ltd.", + [3]byte{172, 241, 223}: "D-Link International", + [3]byte{172, 242, 197}: "Cisco", + [3]byte{172, 247, 243}: "XIAOMI CORPORATION", + [3]byte{172, 249, 126}: "ELESYS INC.", + [3]byte{172, 253, 206}: "Intel Corporate", + [3]byte{172, 253, 236}: "Apple, Inc", + [3]byte{176, 0, 180}: "Cisco", + [3]byte{176, 5, 148}: "Liteon Technology Corporation", + [3]byte{176, 9, 211}: "Avizia", + [3]byte{176, 16, 65}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{176, 18, 3}: "Dynamics Hong Kong Limited", + [3]byte{176, 18, 102}: "Futaba-Kikaku", + [3]byte{176, 20, 8}: "LIGHTSPEED INTERNATIONAL CO.", + [3]byte{176, 23, 67}: "EDISON GLOBAL CIRCUITS LLC", + [3]byte{176, 27, 124}: "Ontrol A.S.", + [3]byte{176, 28, 145}: "Elim Co", + [3]byte{176, 31, 129}: "IEEE REGISTRATION AUTHORITY - Please see MAM public listing for more information.", + [3]byte{176, 36, 243}: "Progeny Systems", + [3]byte{176, 37, 170}: "PRIVATE", + [3]byte{176, 52, 149}: "Apple", + [3]byte{176, 53, 141}: "Nokia Corporation", + [3]byte{176, 56, 41}: "Siliconware Precision Industries Co., Ltd.", + [3]byte{176, 56, 80}: "Nanjing CAS-ZDC IOT SYSTEM CO.,LTD", + [3]byte{176, 67, 93}: "NuLEDs, Inc.", + [3]byte{176, 69, 21}: "mira fitness,LLC.", + [3]byte{176, 69, 25}: "TCT mobile ltd", + [3]byte{176, 69, 69}: "YACOUB Automation GmbH", + [3]byte{176, 70, 252}: "MitraStar Technology Corp.", + [3]byte{176, 72, 122}: "TP-LINK TECHNOLOGIES CO., LTD.", + [3]byte{176, 76, 5}: "Fresenius Medical Care Deutschland GmbH", + [3]byte{176, 80, 188}: "SHENZHEN BASICOM ELECTRONIC CO.,LTD.", + [3]byte{176, 81, 142}: "Holl technology CO.Ltd.", + [3]byte{176, 87, 6}: "Vallox Oy", + [3]byte{176, 88, 196}: "Broadcast Microwave Services, Inc", + [3]byte{176, 91, 31}: "THERMO FISHER SCIENTIFIC S.P.A.", + [3]byte{176, 91, 103}: "Huawei Technologies Co., Ltd", + [3]byte{176, 92, 229}: "Nokia Corporation", + [3]byte{176, 97, 199}: "Ericsson-LG Enterprise", + [3]byte{176, 101, 99}: "Shanghai Railway Communication Factory", + [3]byte{176, 101, 189}: "Apple", + [3]byte{176, 104, 182}: "Hangzhou OYE Technology Co. Ltd", + [3]byte{176, 105, 113}: "DEI Sales, Inc.", + [3]byte{176, 108, 191}: "3ality Digital Systems GmbH", + [3]byte{176, 117, 12}: "QA Cafe", + [3]byte{176, 117, 77}: "Alcatel-Lucent", + [3]byte{176, 117, 213}: "ZTE Corporation", + [3]byte{176, 119, 172}: "ARRIS Group, Inc.", + [3]byte{176, 121, 8}: "Cummings Engineering", + [3]byte{176, 121, 60}: "Revolv Inc", + [3]byte{176, 121, 148}: "Motorola Mobility LLC", + [3]byte{176, 125, 98}: "Dipl.-Ing. H. Horstmann GmbH", + [3]byte{176, 128, 140}: "Laser Light Engines", + [3]byte{176, 129, 216}: "I-sys Corp", + [3]byte{176, 131, 254}: "Dell Inc", + [3]byte{176, 134, 158}: "Chloride S.r.L", + [3]byte{176, 136, 7}: "Strata Worldwide", + [3]byte{176, 137, 145}: "LGE", + [3]byte{176, 142, 26}: "URadio Systems Co., Ltd", + [3]byte{176, 144, 116}: "Fulan Electronics Limited", + [3]byte{176, 145, 52}: "Taleo", + [3]byte{176, 145, 55}: "ISis ImageStream Internet Solutions, Inc", + [3]byte{176, 151, 58}: "E-Fuel Corporation", + [3]byte{176, 152, 159}: "LG CNS", + [3]byte{176, 153, 40}: "Fujitsu Limited", + [3]byte{176, 154, 226}: "STEMMER IMAGING GmbH", + [3]byte{176, 155, 212}: "GNH Software India Private Limited", + [3]byte{176, 159, 186}: "Apple", + [3]byte{176, 161, 10}: "Pivotal Systems Corporation", + [3]byte{176, 163, 126}: "Qingdao Haier Electronics Co.,Ltd", + [3]byte{176, 167, 42}: "Ensemble Designs, Inc.", + [3]byte{176, 167, 55}: "Roku, Inc.", + [3]byte{176, 168, 110}: "Juniper Networks", + [3]byte{176, 170, 54}: "GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD.", + [3]byte{176, 172, 250}: "Fujitsu Limited", + [3]byte{176, 173, 170}: "Avaya, Inc", + [3]byte{176, 178, 220}: "Zyxel Communications Corporation", + [3]byte{176, 179, 43}: "Slican Sp. z o.o.", + [3]byte{176, 180, 72}: "Texas Instruments", + [3]byte{176, 184, 213}: "Nanjing Nengrui Auto Equipment CO.,Ltd", + [3]byte{176, 189, 109}: "Echostreams Innovative Solutions", + [3]byte{176, 189, 161}: "ZAKLAD ELEKTRONICZNY SIMS", + [3]byte{176, 191, 153}: "WIZITDONGDO", + [3]byte{176, 196, 231}: "Samsung Electronics", + [3]byte{176, 197, 84}: "D-Link International", + [3]byte{176, 198, 154}: "Juniper Networks", + [3]byte{176, 199, 69}: "Buffalo Inc.", + [3]byte{176, 200, 63}: "Jiangsu Cynray IOT Co., Ltd.", + [3]byte{176, 200, 173}: "People Power Company", + [3]byte{176, 201, 91}: "Beijing Symtech CO.,LTD", + [3]byte{176, 206, 24}: "Zhejiang shenghui lighting co.,Ltd", + [3]byte{176, 207, 77}: "MI-Zone Technology Ireland", + [3]byte{176, 208, 156}: "Samsung Electronics Co.,Ltd", + [3]byte{176, 210, 245}: "Vello Systems, Inc.", + [3]byte{176, 213, 157}: "Shenzhen Zowee Technology Co., Ltd", + [3]byte{176, 215, 197}: "STP KFT", + [3]byte{176, 218, 0}: "CERA ELECTRONIQUE", + [3]byte{176, 223, 58}: "Samsung Electronics Co.,Ltd", + [3]byte{176, 227, 157}: "CAT SYSTEM CO.,LTD.", + [3]byte{176, 229, 14}: "NRG SYSTEMS INC", + [3]byte{176, 231, 84}: "2Wire", + [3]byte{176, 232, 146}: "SEIKO EPSON CORPORATION", + [3]byte{176, 233, 126}: "Advanced Micro Peripherals", + [3]byte{176, 236, 113}: "Samsung Electronics Co.,Ltd", + [3]byte{176, 236, 143}: "GMX SAS", + [3]byte{176, 238, 69}: "AzureWave Technologies, Inc.", + [3]byte{176, 241, 188}: "Dhemax Ingenieros Ltda", + [3]byte{176, 250, 235}: "Cisco", + [3]byte{176, 254, 189}: "PRIVATE", + [3]byte{180, 0, 156}: "CableWorld Ltd.", + [3]byte{180, 1, 66}: "GCI Science & Technology Co.,LTD", + [3]byte{180, 4, 24}: "Smartchip Integrated Inc.", + [3]byte{180, 7, 249}: "SAMSUNG ELECTRO-MECHANICS", + [3]byte{180, 8, 50}: "TC Communications", + [3]byte{180, 10, 198}: "DEXON Systems Ltd.", + [3]byte{180, 11, 68}: "Smartisan Technology Co., Ltd.", + [3]byte{180, 11, 122}: "Brusa Elektronik AG", + [3]byte{180, 12, 37}: "Palo Alto Networks", + [3]byte{180, 14, 150}: "HERAN", + [3]byte{180, 14, 220}: "LG-Ericsson Co.,Ltd.", + [3]byte{180, 20, 137}: "CISCO SYSTEMS, INC.", + [3]byte{180, 21, 19}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{180, 23, 128}: "DTI Group Ltd", + [3]byte{180, 24, 209}: "Apple", + [3]byte{180, 29, 239}: "Internet Laboratories, Inc.", + [3]byte{180, 33, 29}: "Beijing GuangXin Technology Co., Ltd", + [3]byte{180, 33, 138}: "Dog Hunter LLC", + [3]byte{180, 36, 231}: "Codetek Technology Co.,Ltd", + [3]byte{180, 40, 241}: "E-Prime Co., Ltd.", + [3]byte{180, 42, 57}: "ORBIT MERRET, spol. s r. o.", + [3]byte{180, 44, 146}: "Zhejiang Weirong Electronic Co., Ltd", + [3]byte{180, 44, 190}: "Direct Payment Solutions Limited", + [3]byte{180, 49, 184}: "Aviwest", + [3]byte{180, 52, 108}: "MATSUNICHI DIGITAL TECHNOLOGY (HONG KONG) LIMITED", + [3]byte{180, 53, 100}: "Fujian Tian Cheng Electron Science & Technical Development Co.,Ltd.", + [3]byte{180, 53, 247}: "Zhejiang Pearmain Electronics Co.ltd.", + [3]byte{180, 55, 65}: "Consert, Inc.", + [3]byte{180, 57, 52}: "Pen Generations, Inc.", + [3]byte{180, 57, 214}: "ProCurve Networking by HP", + [3]byte{180, 58, 40}: "Samsung Electronics Co.,Ltd", + [3]byte{180, 61, 178}: "Degreane Horizon", + [3]byte{180, 62, 59}: "Viableware, Inc", + [3]byte{180, 65, 122}: "ShenZhen Gongjin Electronics Co.,Ltd", + [3]byte{180, 67, 13}: "Broadlink Pty Ltd", + [3]byte{180, 71, 94}: "Avaya, Inc", + [3]byte{180, 76, 194}: "NR ELECTRIC CO., LTD", + [3]byte{180, 81, 249}: "NB Software", + [3]byte{180, 82, 83}: "Seagate Technology", + [3]byte{180, 82, 125}: "Sony Mobile Communications AB", + [3]byte{180, 82, 126}: "Sony Mobile Communications AB", + [3]byte{180, 85, 112}: "Borea", + [3]byte{180, 88, 97}: "CRemote, LLC", + [3]byte{180, 92, 164}: "Thing-talk Wireless Communication Technologies Corporation Limited", + [3]byte{180, 97, 255}: "Lumigon A/S", + [3]byte{180, 98, 56}: "Exablox", + [3]byte{180, 98, 147}: "Samsung Electronics Co.,Ltd", + [3]byte{180, 98, 173}: "raytest GmbH", + [3]byte{180, 102, 152}: "Zealabs srl", + [3]byte{180, 103, 233}: "Qingdao GoerTek Technology Co., Ltd.", + [3]byte{180, 116, 159}: "askey computer corp", + [3]byte{180, 117, 14}: "Belkin International Inc.", + [3]byte{180, 121, 167}: "Samsung Electro Mechanics co., LTD.", + [3]byte{180, 124, 41}: "Shenzhen Guzidi Technology Co.,Ltd", + [3]byte{180, 127, 94}: "Foresight Manufacture (S) Pte Ltd", + [3]byte{180, 130, 85}: "Research Products Corporation", + [3]byte{180, 130, 123}: "AKG Acoustics GmbH", + [3]byte{180, 130, 197}: "Relay2, Inc.", + [3]byte{180, 130, 254}: "Askey Computer Corp", + [3]byte{180, 133, 71}: "Amptown System Company GmbH", + [3]byte{180, 137, 16}: "Coster T.E. S.P.A.", + [3]byte{180, 148, 78}: "WeTelecom Co., Ltd.", + [3]byte{180, 152, 66}: "zte corporation", + [3]byte{180, 153, 76}: "Texas Instruments", + [3]byte{180, 153, 186}: "Hewlett-Packard Company", + [3]byte{180, 157, 180}: "Axion Technologies Inc.", + [3]byte{180, 158, 172}: "Imagik Int'l Corp", + [3]byte{180, 158, 230}: "SHENZHEN TECHNOLOGY CO LTD", + [3]byte{180, 164, 181}: "Zen Eye Co.,Ltd", + [3]byte{180, 164, 227}: "CISCO SYSTEMS, INC.", + [3]byte{180, 165, 169}: "MODI GmbH", + [3]byte{180, 168, 40}: "Shenzhen Concox Information Technology Co., Ltd", + [3]byte{180, 168, 43}: "Histar Digital Electronics Co., Ltd.", + [3]byte{180, 169, 90}: "Avaya, Inc", + [3]byte{180, 170, 77}: "Ensequence, Inc.", + [3]byte{180, 171, 44}: "MtM Technology Corporation", + [3]byte{180, 174, 111}: "Circle Reliance, Inc.", + [3]byte{180, 176, 23}: "Avaya, Inc", + [3]byte{180, 179, 98}: "ZTE Corporation", + [3]byte{180, 181, 47}: "Hewlett Packard", + [3]byte{180, 181, 66}: "Hubbell Power Systems, Inc.", + [3]byte{180, 181, 175}: "Minsung Electronics", + [3]byte{180, 182, 118}: "Intel Corporate", + [3]byte{180, 184, 89}: "Texa Spa", + [3]byte{180, 184, 141}: "Thuh Company", + [3]byte{180, 196, 78}: "VXL eTech Pvt Ltd", + [3]byte{180, 199, 153}: "Motorola Solutions Inc.", + [3]byte{180, 200, 16}: "UMPI Elettronica", + [3]byte{180, 204, 233}: "PROSYST", + [3]byte{180, 206, 246}: "HTC Corporation", + [3]byte{180, 207, 219}: "Shenzhen Jiuzhou Electric Co.,LTD", + [3]byte{180, 216, 169}: "BetterBots", + [3]byte{180, 216, 222}: "iota Computing, Inc.", + [3]byte{180, 221, 21}: "ControlThings Oy Ab", + [3]byte{180, 223, 59}: "Chromlech", + [3]byte{180, 223, 250}: "Litemax Electronics Inc.", + [3]byte{180, 224, 205}: "Fusion-io, Inc", + [3]byte{180, 225, 235}: "PRIVATE", + [3]byte{180, 233, 176}: "Cisco", + [3]byte{180, 237, 25}: "Pie Digital, Inc.", + [3]byte{180, 237, 84}: "Wohler Technologies", + [3]byte{180, 238, 180}: "ASKEY COMPUTER CORP", + [3]byte{180, 238, 212}: "Texas Instruments", + [3]byte{180, 240, 171}: "Apple", + [3]byte{180, 242, 232}: "Pace plc", + [3]byte{180, 243, 35}: "PETATEL INC.", + [3]byte{180, 252, 117}: "SEMA Electronics(HK) CO.,LTD", + [3]byte{180, 254, 140}: "Centro Sicurezza Italia SpA", + [3]byte{184, 3, 5}: "Intel Corporate", + [3]byte{184, 4, 21}: "Bayan Audio", + [3]byte{184, 8, 207}: "Intel Corporate", + [3]byte{184, 11, 157}: "ROPEX Industrie-Elektronik GmbH", + [3]byte{184, 20, 19}: "Keen High Holding(HK) Ltd.", + [3]byte{184, 22, 25}: "ARRIS Group, Inc.", + [3]byte{184, 23, 194}: "Apple", + [3]byte{184, 24, 111}: "ORIENTAL MOTOR CO., LTD.", + [3]byte{184, 25, 153}: "Nesys", + [3]byte{184, 32, 231}: "Guangzhou Horizontal Information & Network Integration Co. Ltd", + [3]byte{184, 36, 16}: "Magneti Marelli Slovakia s.r.o.", + [3]byte{184, 36, 26}: "SWEDA INFORMATICA LTDA", + [3]byte{184, 38, 108}: "ANOV France", + [3]byte{184, 38, 212}: "Furukawa Industrial S.A. Produtos Elétricos", + [3]byte{184, 39, 235}: "Raspberry Pi Foundation", + [3]byte{184, 40, 139}: "Parker Hannifin", + [3]byte{184, 41, 247}: "Blaster Tech", + [3]byte{184, 42, 114}: "Dell Inc", + [3]byte{184, 42, 220}: "EFR Europäische Funk-Rundsteuerung GmbH", + [3]byte{184, 44, 160}: "Honeywell HomMed", + [3]byte{184, 48, 168}: "Road-Track Telematics Development", + [3]byte{184, 54, 216}: "Videoswitch", + [3]byte{184, 56, 97}: "Cisco", + [3]byte{184, 56, 202}: "Kyokko Tsushin System CO.,LTD", + [3]byte{184, 58, 123}: "Worldplay (Canada) Inc.", + [3]byte{184, 61, 78}: "Shenzhen Cultraview Digital Technology Co.,Ltd Shanghai Branch", + [3]byte{184, 62, 89}: "Roku, Inc", + [3]byte{184, 65, 95}: "ASP AG", + [3]byte{184, 67, 228}: "Vlatacom", + [3]byte{184, 71, 198}: "SanJet Technology Corp.", + [3]byte{184, 79, 213}: "Microsoft Corporation", + [3]byte{184, 85, 16}: "Zioncom Electronics (Shenzhen) Ltd.", + [3]byte{184, 88, 16}: "NUMERA, INC.", + [3]byte{184, 90, 247}: "Ouya, Inc", + [3]byte{184, 90, 254}: "Handaer Communication Technology (Beijing) Co., Ltd", + [3]byte{184, 94, 123}: "Samsung Electronics Co.,Ltd", + [3]byte{184, 96, 145}: "Onnet Technologies and Innovations LLC", + [3]byte{184, 97, 111}: "Accton Wireless Broadband(AWB), Corp.", + [3]byte{184, 98, 31}: "CISCO SYSTEMS, INC.", + [3]byte{184, 99, 188}: "ROBOTIS, Co, Ltd", + [3]byte{184, 100, 145}: "CK Telecom Ltd", + [3]byte{184, 101, 59}: "Bolymin, Inc.", + [3]byte{184, 107, 35}: "Toshiba", + [3]byte{184, 108, 232}: "Samsung Electronics Co.,Ltd", + [3]byte{184, 112, 244}: "COMPAL INFORMATION (KUNSHAN) CO., LTD.", + [3]byte{184, 116, 36}: "Viessmann Elektronik GmbH", + [3]byte{184, 116, 71}: "Convergence Technologies", + [3]byte{184, 117, 192}: "PayPal, Inc.", + [3]byte{184, 118, 63}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{184, 119, 195}: "Decagon Devices, Inc.", + [3]byte{184, 120, 46}: "Apple", + [3]byte{184, 121, 126}: "Secure Meters (UK) Limited", + [3]byte{184, 122, 201}: "Siemens Ltd.", + [3]byte{184, 124, 242}: "Aerohive Networks Inc.", + [3]byte{184, 135, 30}: "Good Mind Industries Co., Ltd.", + [3]byte{184, 135, 168}: "Step Ahead Innovations Inc.", + [3]byte{184, 136, 227}: "COMPAL INFORMATION (KUNSHAN) CO., LTD", + [3]byte{184, 137, 202}: "ILJIN ELECTRIC Co., Ltd.", + [3]byte{184, 138, 96}: "Intel Corporate", + [3]byte{184, 141, 18}: "Apple", + [3]byte{184, 142, 58}: "Infinite Technologies JLT", + [3]byte{184, 143, 20}: "Analytica GmbH", + [3]byte{184, 146, 29}: "BG T&A", + [3]byte{184, 148, 210}: "Retail Innovation HTT AB", + [3]byte{184, 150, 116}: "AllDSP GmbH & Co. KG", + [3]byte{184, 151, 90}: "BIOSTAR Microtech Int'l Corp.", + [3]byte{184, 152, 176}: "Atlona Inc.", + [3]byte{184, 152, 247}: "Gionee Communication Equipment Co,Ltd.ShenZhen", + [3]byte{184, 153, 25}: "7signal Solutions, Inc", + [3]byte{184, 154, 237}: "OceanServer Technology, Inc", + [3]byte{184, 155, 201}: "SMC Networks Inc", + [3]byte{184, 155, 228}: "ABB Power Systems Power Generation", + [3]byte{184, 163, 134}: "D-Link International", + [3]byte{184, 163, 224}: "BenRui Technology Co.,Ltd", + [3]byte{184, 168, 175}: "Logic S.p.A.", + [3]byte{184, 172, 111}: "Dell Inc", + [3]byte{184, 173, 62}: "BLUECOM", + [3]byte{184, 174, 110}: "Nintendo Co., Ltd.", + [3]byte{184, 174, 237}: "Elitegroup Computer Systems Co., Ltd.", + [3]byte{184, 175, 103}: "Hewlett-Packard Company", + [3]byte{184, 177, 199}: "BT&COM CO.,LTD", + [3]byte{184, 180, 46}: "Gionee Communication Equipment Co,Ltd.ShenZhen", + [3]byte{184, 183, 215}: "2GIG Technologies", + [3]byte{184, 185, 78}: "Shenzhen iBaby Labs, Inc.", + [3]byte{184, 186, 104}: "Xi'an Jizhong Digital Communication Co.,Ltd", + [3]byte{184, 186, 114}: "Cynove", + [3]byte{184, 187, 109}: "ENERES Co.,Ltd.", + [3]byte{184, 189, 121}: "TrendPoint Systems", + [3]byte{184, 190, 191}: "CISCO SYSTEMS, INC.", + [3]byte{184, 191, 131}: "Intel Corporate", + [3]byte{184, 193, 162}: "Dragon Path Technologies Co., Limited", + [3]byte{184, 196, 111}: "PRIMMCON INDUSTRIES INC", + [3]byte{184, 198, 142}: "Samsung Electronics Co.,Ltd", + [3]byte{184, 199, 22}: "Fiberhome Telecommunication Technologies Co.,LTD", + [3]byte{184, 199, 93}: "Apple", + [3]byte{184, 200, 85}: "Shanghai GBCOM Communication Technology Co.,Ltd.", + [3]byte{184, 202, 58}: "Dell Inc", + [3]byte{184, 205, 147}: "Penetek, Inc", + [3]byte{184, 205, 167}: "Maxeler Technologies Ltd.", + [3]byte{184, 208, 111}: "GUANGZHOU HKUST FOK YING TUNG RESEARCH INSTITUTE", + [3]byte{184, 212, 157}: "M Seven System Ltd.", + [3]byte{184, 216, 18}: "IEEE REGISTRATION AUTHORITY - Please see MAM public listing for more information.", + [3]byte{184, 217, 206}: "Samsung Electronics", + [3]byte{184, 218, 241}: "Strahlenschutz- Entwicklungs- und Ausruestungsgesellschaft mbH", + [3]byte{184, 218, 247}: "Advanced Photonics, Inc.", + [3]byte{184, 220, 135}: "IAI Corporation", + [3]byte{184, 223, 107}: "SpotCam Co., Ltd.", + [3]byte{184, 229, 137}: "Payter BV", + [3]byte{184, 230, 37}: "2Wire", + [3]byte{184, 231, 121}: "9Solutions Oy", + [3]byte{184, 232, 86}: "Apple", + [3]byte{184, 233, 55}: "Sonos, Inc.", + [3]byte{184, 238, 101}: "Liteon Technology Corporation", + [3]byte{184, 238, 121}: "YWire Technologies, Inc.", + [3]byte{184, 243, 23}: "iSun Smasher Communications Private Limited", + [3]byte{184, 244, 208}: "Herrmann Ultraschalltechnik GmbH & Co. Kg", + [3]byte{184, 245, 231}: "WayTools, LLC", + [3]byte{184, 246, 177}: "Apple", + [3]byte{184, 247, 50}: "Aryaka Networks Inc", + [3]byte{184, 248, 40}: "Changshu Gaoshida Optoelectronic Technology Co. Ltd.", + [3]byte{184, 249, 52}: "Sony Ericsson Mobile Communications AB", + [3]byte{184, 253, 50}: "Zhejiang ROICX Microelectronics", + [3]byte{184, 255, 97}: "Apple", + [3]byte{184, 255, 111}: "Shanghai Typrotech Technology Co.Ltd", + [3]byte{184, 255, 254}: "Texas Instruments", + [3]byte{188, 2, 0}: "Stewart Audio", + [3]byte{188, 5, 67}: "AVM GmbH", + [3]byte{188, 13, 165}: "Texas Instruments", + [3]byte{188, 15, 43}: "FORTUNE TECHGROUP CO.,LTD", + [3]byte{188, 18, 94}: "Beijing WisVideo INC.", + [3]byte{188, 20, 1}: "Hitron Technologies. Inc", + [3]byte{188, 20, 239}: "ITON Technology Limited", + [3]byte{188, 21, 166}: "Taiwan Jantek Electronics,Ltd.", + [3]byte{188, 22, 101}: "Cisco", + [3]byte{188, 22, 245}: "Cisco", + [3]byte{188, 26, 103}: "YF Technology Co., Ltd", + [3]byte{188, 32, 164}: "Samsung Electronics", + [3]byte{188, 32, 186}: "Inspur (Shandong) Electronic Information Co., Ltd", + [3]byte{188, 37, 240}: "3D Display Technologies Co., Ltd.", + [3]byte{188, 38, 29}: "HONG KONG TECON TECHNOLOGY", + [3]byte{188, 40, 70}: "NextBIT Computing Pvt. Ltd.", + [3]byte{188, 40, 214}: "Rowley Associates Limited", + [3]byte{188, 43, 107}: "Beijing Haier IC Design Co.,Ltd", + [3]byte{188, 43, 215}: "Revogi Innovation Co., Ltd.", + [3]byte{188, 44, 85}: "Bear Flag Design, Inc.", + [3]byte{188, 45, 152}: "ThinGlobal LLC", + [3]byte{188, 48, 91}: "Dell Inc.", + [3]byte{188, 48, 125}: "Wistron Neweb Corp.", + [3]byte{188, 52, 0}: "IEEE REGISTRATION AUTHORITY - Please see MAM public listing for more information.", + [3]byte{188, 53, 229}: "Hydro Systems Company", + [3]byte{188, 56, 210}: "Pandachip Limited", + [3]byte{188, 57, 166}: "CSUN System Technology Co.,LTD", + [3]byte{188, 59, 175}: "Apple", + [3]byte{188, 62, 19}: "Accordance Systems Inc.", + [3]byte{188, 65, 0}: "Codaco Electronic s.r.o.", + [3]byte{188, 67, 119}: "Hang Zhou Huite Technology Co.,ltd.", + [3]byte{188, 68, 134}: "Samsung Electronics Co.,Ltd", + [3]byte{188, 71, 96}: "Samsung Electronics Co.,Ltd", + [3]byte{188, 75, 121}: "SensingTek", + [3]byte{188, 77, 251}: "Hitron Technologies. Inc", + [3]byte{188, 78, 60}: "CORE STAFF CO., LTD.", + [3]byte{188, 78, 93}: "ZhongMiao Technology Co., Ltd.", + [3]byte{188, 81, 254}: "Swann Communications Pty Ltd", + [3]byte{188, 82, 180}: "Alcatel-Lucent", + [3]byte{188, 82, 183}: "Apple", + [3]byte{188, 95, 244}: "ASRock Incorporation", + [3]byte{188, 98, 159}: "Telenet Systems P. Ltd.", + [3]byte{188, 102, 65}: "IEEE REGISTRATION AUTHORITY - Please see MAM public listing for more information.", + [3]byte{188, 103, 28}: "Cisco", + [3]byte{188, 103, 120}: "Apple", + [3]byte{188, 103, 132}: "Environics Oy", + [3]byte{188, 106, 22}: "tdvine", + [3]byte{188, 106, 41}: "Texas Instruments", + [3]byte{188, 107, 77}: "Alcatel-Lucent", + [3]byte{188, 110, 118}: "Green Energy Options Ltd", + [3]byte{188, 113, 193}: "XTrillion, Inc.", + [3]byte{188, 114, 177}: "Samsung Electronics Co.,Ltd", + [3]byte{188, 116, 215}: "HangZhou JuRu Technology CO.,LTD", + [3]byte{188, 118, 78}: "Rackspace US, Inc.", + [3]byte{188, 118, 112}: "Shenzhen Huawei Communication Technologies Co., Ltd", + [3]byte{188, 119, 55}: "Intel Corporate", + [3]byte{188, 119, 159}: "SBM Co., Ltd.", + [3]byte{188, 121, 173}: "Samsung Electronics Co.,Ltd", + [3]byte{188, 125, 209}: "Radio Data Comms", + [3]byte{188, 129, 31}: "Ingate Systems", + [3]byte{188, 129, 153}: "BASIC Co.,Ltd.", + [3]byte{188, 131, 167}: "SHENZHEN CHUANGWEI-RGB ELECTRONICS CO.,LT", + [3]byte{188, 133, 31}: "Samsung Electronics", + [3]byte{188, 133, 86}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{188, 136, 147}: "VILLBAU Ltd.", + [3]byte{188, 139, 85}: "NPP ELIKS America Inc. DBA T&M Atlantic", + [3]byte{188, 140, 205}: "Samsung Electro Mechanics co.,LTD.", + [3]byte{188, 141, 14}: "Alcatel-Lucent", + [3]byte{188, 146, 107}: "Apple", + [3]byte{188, 150, 128}: "Shenzhen Gongjin Electronics Co.,Ltd", + [3]byte{188, 152, 137}: "Fiberhome Telecommunication Tech.Co.,Ltd.", + [3]byte{188, 153, 188}: "FonSee Technology Inc.", + [3]byte{188, 156, 197}: "Beijing Huafei Technology Co., Ltd.", + [3]byte{188, 157, 165}: "DASCOM Europe GmbH", + [3]byte{188, 164, 225}: "Nabto", + [3]byte{188, 169, 214}: "Cyber-Rain, Inc.", + [3]byte{188, 174, 197}: "ASUSTek COMPUTER INC.", + [3]byte{188, 177, 129}: "SHARP CORPORATION", + [3]byte{188, 177, 243}: "Samsung Electronics", + [3]byte{188, 184, 82}: "Cybera, Inc.", + [3]byte{188, 186, 225}: "AREC Inc.", + [3]byte{188, 187, 201}: "Kellendonk Elektronik GmbH", + [3]byte{188, 188, 70}: "SKS Welding Systems GmbH", + [3]byte{188, 193, 104}: "DinBox Sverige AB", + [3]byte{188, 194, 58}: "Thomson Video Networks", + [3]byte{188, 195, 66}: "Panasonic System Networks Co., Ltd.", + [3]byte{188, 198, 26}: "SPECTRA EMBEDDED SYSTEMS", + [3]byte{188, 198, 219}: "Nokia Corporation", + [3]byte{188, 200, 16}: "Cisco SPVTG", + [3]byte{188, 202, 181}: "ARRIS Group, Inc.", + [3]byte{188, 205, 69}: "VOISMART", + [3]byte{188, 207, 204}: "HTC Corporation", + [3]byte{188, 209, 119}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{188, 209, 211}: "Tinno Mobile Technology Corp", + [3]byte{188, 213, 182}: "d2d technologies", + [3]byte{188, 217, 64}: "ASR Co,.Ltd.", + [3]byte{188, 224, 157}: "Eoslink", + [3]byte{188, 229, 159}: "WATERWORLD Technology Co.,LTD", + [3]byte{188, 234, 43}: "CityCom GmbH", + [3]byte{188, 234, 250}: "Hewlett Packard", + [3]byte{188, 238, 123}: "ASUSTek COMPUTER INC.", + [3]byte{188, 242, 175}: "devolo AG", + [3]byte{188, 245, 172}: "LG Electronics", + [3]byte{188, 246, 28}: "Geomodeling Wuxi Technology Co. Ltd.", + [3]byte{188, 246, 133}: "D-Link International", + [3]byte{188, 254, 140}: "Altronic, LLC", + [3]byte{188, 255, 172}: "TOPCON CORPORATION", + [3]byte{192, 13, 126}: "Additech, Inc.", + [3]byte{192, 17, 166}: "Fort-Telecom ltd.", + [3]byte{192, 18, 66}: "Alpha Security Products", + [3]byte{192, 20, 61}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{192, 24, 133}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{192, 30, 155}: "Pixavi AS", + [3]byte{192, 34, 80}: "PRIVATE", + [3]byte{192, 37, 6}: "AVM GmbH", + [3]byte{192, 37, 92}: "Cisco", + [3]byte{192, 39, 185}: "Beijing National Railway Research & Design Institute of Signal & Communication Co., Ltd.", + [3]byte{192, 41, 115}: "Audyssey Laboratories Inc.", + [3]byte{192, 41, 243}: "XySystem", + [3]byte{192, 43, 252}: "iNES. applied informatics GmbH", + [3]byte{192, 44, 122}: "Shen Zhen Horn audio Co., Ltd.", + [3]byte{192, 52, 180}: "Gigastone Corporation", + [3]byte{192, 53, 128}: "A&R TECH", + [3]byte{192, 53, 189}: "Velocytech Aps", + [3]byte{192, 53, 197}: "Prosoft Systems LTD", + [3]byte{192, 56, 150}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{192, 56, 249}: "Nokia Danmark A/S", + [3]byte{192, 59, 143}: "Minicom Digital Signage", + [3]byte{192, 61, 70}: "Shanghai Mochui Network Technology Co., Ltd", + [3]byte{192, 62, 15}: "BSkyB Ltd", + [3]byte{192, 63, 14}: "NETGEAR", + [3]byte{192, 63, 42}: "Biscotti, Inc.", + [3]byte{192, 63, 213}: "Elitegroup Computer Systems Co., LTD", + [3]byte{192, 65, 246}: "LG Electronics Inc", + [3]byte{192, 67, 1}: "Epec Oy", + [3]byte{192, 68, 227}: "Shenzhen Sinkna Electronics Co., LTD", + [3]byte{192, 73, 61}: "MAITRISE TECHNOLOGIQUE", + [3]byte{192, 74, 0}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{192, 77, 247}: "SERELEC", + [3]byte{192, 86, 227}: "Hangzhou Hikvision Digital Technology Co.,Ltd.", + [3]byte{192, 87, 188}: "Avaya, Inc", + [3]byte{192, 88, 167}: "Pico Systems Co., Ltd.", + [3]byte{192, 94, 111}: "V. Stonkaus firma \"Kodinis Raktas\"", + [3]byte{192, 94, 121}: "SHENZHEN HUAXUN ARK TECHNOLOGIES CO.,LTD", + [3]byte{192, 97, 24}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{192, 98, 107}: "CISCO SYSTEMS, INC.", + [3]byte{192, 99, 148}: "Apple", + [3]byte{192, 100, 198}: "Nokia Corporation", + [3]byte{192, 101, 153}: "Samsung Electronics Co.,Ltd", + [3]byte{192, 103, 175}: "Cisco", + [3]byte{192, 108, 15}: "Dobbs Stanford", + [3]byte{192, 108, 109}: "MagneMotion, Inc.", + [3]byte{192, 123, 188}: "Cisco", + [3]byte{192, 126, 64}: "SHENZHEN XDK COMMUNICATION EQUIPMENT CO.,LTD", + [3]byte{192, 129, 112}: "Effigis GeoSolutions", + [3]byte{192, 131, 10}: "2Wire", + [3]byte{192, 132, 122}: "Apple", + [3]byte{192, 136, 91}: "SnD Tech Co., Ltd.", + [3]byte{192, 138, 222}: "Ruckus Wireless", + [3]byte{192, 139, 111}: "S I Sistemas Inteligentes Eletrônicos Ltda", + [3]byte{192, 140, 96}: "Cisco", + [3]byte{192, 145, 50}: "Patriot Memory", + [3]byte{192, 145, 52}: "ProCurve Networking by HP", + [3]byte{192, 152, 121}: "Acer Inc.", + [3]byte{192, 152, 229}: "University of Michigan", + [3]byte{192, 156, 146}: "COBY", + [3]byte{192, 157, 38}: "Topicon HK Lmd.", + [3]byte{192, 159, 66}: "Apple", + [3]byte{192, 160, 187}: "D-Link International", + [3]byte{192, 160, 199}: "FAIRFIELD INDUSTRIES", + [3]byte{192, 160, 222}: "Multi Touch Oy", + [3]byte{192, 160, 226}: "Eden Innovations", + [3]byte{192, 162, 109}: "Abbott Point of Care", + [3]byte{192, 163, 100}: "3D Systems Massachusetts", + [3]byte{192, 163, 158}: "EarthCam, Inc.", + [3]byte{192, 170, 104}: "OSASI Technos Inc.", + [3]byte{192, 172, 84}: "SAGEMCOM", + [3]byte{192, 179, 57}: "Comigo Ltd.", + [3]byte{192, 179, 87}: "Yoshiki Electronics Industry Ltd.", + [3]byte{192, 184, 177}: "BitBox Ltd", + [3]byte{192, 186, 230}: "Application Solutions (Electronics and Vision) Ltd", + [3]byte{192, 189, 66}: "ZPA Smart Energy a.s.", + [3]byte{192, 193, 192}: "Cisco-Linksys, LLC", + [3]byte{192, 195, 182}: "Automatic Systems", + [3]byte{192, 197, 32}: "Ruckus Wireless", + [3]byte{192, 197, 105}: "SHANGHAI LYNUC CNC TECHNOLOGY CO.,LTD", + [3]byte{192, 198, 135}: "Cisco SPVTG", + [3]byte{192, 201, 70}: "MITSUYA LABORATORIES INC.", + [3]byte{192, 203, 56}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{192, 207, 163}: "Creative Electronics & Software, Inc.", + [3]byte{192, 208, 68}: "SAGEMCOM", + [3]byte{192, 217, 98}: "Askey Computer Corp.", + [3]byte{192, 218, 116}: "Hangzhou Sunyard Technology Co., Ltd.", + [3]byte{192, 223, 119}: "Conrad Electronic SE", + [3]byte{192, 228, 34}: "Texas Instruments", + [3]byte{192, 229, 78}: "DENX Computer Systems GmbH", + [3]byte{192, 234, 228}: "Sonicwall", + [3]byte{192, 238, 251}: "OnePlus Tech (Shenzhen) Ltd", + [3]byte{192, 241, 196}: "Pacidal Corporation Ltd.", + [3]byte{192, 242, 251}: "Apple", + [3]byte{192, 247, 157}: "Powercode", + [3]byte{192, 248, 218}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{192, 249, 145}: "GME Standard Communications P/L", + [3]byte{196, 0, 6}: "Lipi Data Systems Ltd.", + [3]byte{196, 1, 66}: "MaxMedia Technology Limited", + [3]byte{196, 1, 124}: "Ruckus Wireless", + [3]byte{196, 1, 177}: "SeekTech INC", + [3]byte{196, 1, 206}: "PRESITION (2000) CO., LTD.", + [3]byte{196, 4, 21}: "NETGEAR INC.,", + [3]byte{196, 5, 40}: "Huawei Technologies Co., Ltd", + [3]byte{196, 8, 74}: "Alcatel-Lucent", + [3]byte{196, 8, 128}: "Shenzhen UTEPO Tech Co., Ltd.", + [3]byte{196, 9, 56}: "Fujian Star-net Communication Co., Ltd", + [3]byte{196, 10, 203}: "CISCO SYSTEMS, INC.", + [3]byte{196, 14, 69}: "ACK Networks,Inc.", + [3]byte{196, 15, 9}: "Hermes electronic GmbH", + [3]byte{196, 16, 138}: "Ruckus Wireless", + [3]byte{196, 20, 60}: "Cisco", + [3]byte{196, 22, 250}: "Prysm Inc", + [3]byte{196, 23, 254}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{196, 25, 139}: "Dominion Voting Systems Corporation", + [3]byte{196, 25, 236}: "Qualisys AB", + [3]byte{196, 30, 206}: "HMI Sources Ltd.", + [3]byte{196, 33, 200}: "KYOCERA Corporation", + [3]byte{196, 35, 122}: "WhizNets Inc.", + [3]byte{196, 36, 46}: "Galvanic Applied Sciences Inc", + [3]byte{196, 38, 40}: "Airo Wireless", + [3]byte{196, 39, 149}: "Technicolor USA Inc.", + [3]byte{196, 41, 29}: "KLEMSAN ELEKTRIK ELEKTRONIK SAN.VE TIC.AS.", + [3]byte{196, 44, 3}: "Apple", + [3]byte{196, 52, 107}: "Hewlett Packard", + [3]byte{196, 54, 218}: "Rusteletech Ltd.", + [3]byte{196, 56, 211}: "TAGATEC CO.,LTD", + [3]byte{196, 57, 58}: "SMC Networks Inc", + [3]byte{196, 58, 159}: "Siconix Inc.", + [3]byte{196, 60, 60}: "CYBELEC SA", + [3]byte{196, 61, 199}: "NETGEAR", + [3]byte{196, 66, 2}: "Samsung Electronics Co.,Ltd", + [3]byte{196, 67, 143}: "LG Electronics", + [3]byte{196, 69, 103}: "SAMBON PRECISON and ELECTRONICS", + [3]byte{196, 69, 236}: "Shanghai Yali Electron Co.,LTD", + [3]byte{196, 70, 25}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{196, 72, 56}: "Satcom Direct, Inc.", + [3]byte{196, 74, 208}: "FIREFLIES SYSTEMS", + [3]byte{196, 75, 68}: "Omniprint Inc.", + [3]byte{196, 75, 209}: "Wallys Communications Teachnologies Co.,Ltd.", + [3]byte{196, 78, 31}: "BlueN", + [3]byte{196, 78, 172}: "Shenzhen Shiningworth Technology Co., Ltd.", + [3]byte{196, 80, 6}: "Samsung Electronics Co.,Ltd", + [3]byte{196, 84, 68}: "QUANTA COMPUTER INC.", + [3]byte{196, 85, 166}: "Cadac Holdings Ltd", + [3]byte{196, 85, 194}: "Bach-Simpson", + [3]byte{196, 86, 0}: "Galleon Embedded Computing", + [3]byte{196, 86, 254}: "Lava International Ltd.", + [3]byte{196, 87, 110}: "Samsung Electronics Co.,LTD", + [3]byte{196, 88, 194}: "Shenzhen TATFOOK Technology Co., Ltd.", + [3]byte{196, 89, 118}: "Fugoo Coorporation", + [3]byte{196, 93, 216}: "HDMI Forum", + [3]byte{196, 96, 68}: "Everex Electronics Limited", + [3]byte{196, 98, 107}: "ZPT Vigantice", + [3]byte{196, 98, 234}: "Samsung Electronics Co.,Ltd", + [3]byte{196, 99, 84}: "U-Raku, Inc.", + [3]byte{196, 100, 19}: "CISCO SYSTEMS, INC.", + [3]byte{196, 103, 181}: "Libratone A/S", + [3]byte{196, 106, 183}: "Xiaomi Technology,Inc.", + [3]byte{196, 107, 180}: "myIDkey", + [3]byte{196, 109, 241}: "DataGravity", + [3]byte{196, 110, 31}: "TP-LINK TECHNOLOGIES CO.,LTD", + [3]byte{196, 113, 48}: "Fon Technology S.L.", + [3]byte{196, 113, 254}: "CISCO SYSTEMS, INC.", + [3]byte{196, 115, 30}: "Samsung Eletronics Co., Ltd", + [3]byte{196, 123, 47}: "Beijing JoinHope Image Technology Ltd.", + [3]byte{196, 123, 163}: "NAVIS Inc.", + [3]byte{196, 125, 79}: "CISCO SYSTEMS, INC.", + [3]byte{196, 125, 204}: "Motorola Solutions Inc.", + [3]byte{196, 125, 254}: "A.N. Solutions GmbH", + [3]byte{196, 127, 81}: "Inventek Systems", + [3]byte{196, 130, 63}: "Fujian Newland Auto-ID Tech. Co,.Ltd.", + [3]byte{196, 130, 78}: "Changzhou Uchip Electronics Co., LTD.", + [3]byte{196, 133, 8}: "Intel Corporate", + [3]byte{196, 136, 229}: "Samsung Electronics Co.,Ltd", + [3]byte{196, 145, 58}: "Shenzhen Sanland Electronic Co., ltd.", + [3]byte{196, 147, 0}: "8Devices", + [3]byte{196, 147, 19}: "100fio networks technology llc", + [3]byte{196, 147, 128}: "Speedytel technology", + [3]byte{196, 149, 162}: "SHENZHEN WEIJIU INDUSTRY AND TRADE DEVELOPMENT CO., LTD", + [3]byte{196, 152, 5}: "Minieum Networks, Inc", + [3]byte{196, 168, 29}: "D-Link International", + [3]byte{196, 170, 161}: "SUMMIT DEVELOPMENT, spol.s r.o.", + [3]byte{196, 173, 33}: "MEDIAEDGE Corporation", + [3]byte{196, 181, 18}: "General Electric Digital Energy", + [3]byte{196, 186, 153}: "I+ME Actia Informatik und Mikro-Elektronik GmbH", + [3]byte{196, 189, 106}: "SKF GmbH", + [3]byte{196, 190, 132}: "Texas Instruments.", + [3]byte{196, 192, 174}: "MIDORI ELECTRONIC CO., LTD.", + [3]byte{196, 193, 159}: "National Oilwell Varco Instrumentation, Monitoring, and Optimization (NOV IMO)", + [3]byte{196, 199, 85}: "Beijing HuaqinWorld Technology Co.,Ltd", + [3]byte{196, 201, 25}: "Energy Imports Ltd", + [3]byte{196, 201, 236}: "D&D GROUP sp. z o.o.", + [3]byte{196, 202, 217}: "Hangzhou H3C Technologies Co., Limited", + [3]byte{196, 205, 69}: "Beijing Boomsense Technology CO.,LTD.", + [3]byte{196, 212, 137}: "JiangSu Joyque Information Industry Co.,Ltd", + [3]byte{196, 214, 85}: "Tercel technology co.,ltd", + [3]byte{196, 217, 135}: "Intel Corporate", + [3]byte{196, 218, 38}: "NOBLEX SA", + [3]byte{196, 224, 50}: "IEEE 1904.1 Working Group", + [3]byte{196, 225, 124}: "U2S co.", + [3]byte{196, 231, 190}: "SCSpro Co.,Ltd", + [3]byte{196, 233, 47}: "AB Sciex", + [3]byte{196, 233, 132}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{196, 235, 227}: "RRCN SAS", + [3]byte{196, 237, 186}: "Texas Instruments", + [3]byte{196, 238, 174}: "VSS Monitoring", + [3]byte{196, 238, 245}: "Oclaro, Inc.", + [3]byte{196, 244, 100}: "Spica international", + [3]byte{196, 245, 124}: "Brocade Communications Systems, Inc.", + [3]byte{196, 252, 228}: "DishTV NZ Ltd", + [3]byte{200, 2, 16}: "LG Innotek", + [3]byte{200, 2, 88}: "ITW GSE ApS", + [3]byte{200, 2, 166}: "Beijing Newmine Technology", + [3]byte{200, 7, 24}: "TDSi", + [3]byte{200, 10, 169}: "Quanta Computer Inc.", + [3]byte{200, 14, 119}: "Le Shi Zhi Xin Electronic Technology (Tianjin) Co.,Ltd", + [3]byte{200, 14, 149}: "OmniLync Inc.", + [3]byte{200, 20, 121}: "Samsung Electronics Co.,Ltd", + [3]byte{200, 22, 189}: "HISENSE ELECTRIC CO.,LTD.", + [3]byte{200, 25, 247}: "Samsung Electronics Co.,Ltd", + [3]byte{200, 26, 254}: "DLOGIC GmbH", + [3]byte{200, 27, 107}: "Innova Security", + [3]byte{200, 30, 142}: "ADV Security (S) Pte Ltd", + [3]byte{200, 31, 102}: "Dell Inc", + [3]byte{200, 32, 142}: "Storagedata", + [3]byte{200, 41, 42}: "Barun Electronics", + [3]byte{200, 42, 20}: "Apple", + [3]byte{200, 46, 148}: "Halfa Enterprise Co., Ltd.", + [3]byte{200, 49, 104}: "eZEX corporation", + [3]byte{200, 50, 50}: "Hunting Innova", + [3]byte{200, 51, 75}: "Apple", + [3]byte{200, 53, 184}: "Ericsson, EAB/RWI/K", + [3]byte{200, 58, 53}: "Tenda Technology Co., Ltd.", + [3]byte{200, 59, 69}: "JRI-Maxant", + [3]byte{200, 61, 151}: "Nokia Corporation", + [3]byte{200, 62, 153}: "Texas Instruments", + [3]byte{200, 62, 167}: "KUNBUS GmbH", + [3]byte{200, 69, 41}: "IMK Networks Co.,Ltd", + [3]byte{200, 69, 68}: "Shanghai Enlogic Electric Technology Co., Ltd.", + [3]byte{200, 72, 245}: "MEDISON Xray Co., Ltd", + [3]byte{200, 76, 117}: "CISCO SYSTEMS, INC.", + [3]byte{200, 86, 69}: "Intermas France", + [3]byte{200, 86, 99}: "Sunflex Europe GmbH", + [3]byte{200, 96, 0}: "ASUSTek COMPUTER INC.", + [3]byte{200, 100, 199}: "zte corporation", + [3]byte{200, 108, 30}: "Display Systems Ltd", + [3]byte{200, 108, 135}: "Zyxel Communications Corp", + [3]byte{200, 108, 182}: "Optcom Co., Ltd.", + [3]byte{200, 111, 29}: "Apple", + [3]byte{200, 114, 72}: "Aplicom Oy", + [3]byte{200, 123, 91}: "zte corporation", + [3]byte{200, 124, 188}: "Valink Co., Ltd.", + [3]byte{200, 125, 119}: "Shenzhen Kingtech Communication Equipment Co.,Ltd", + [3]byte{200, 126, 117}: "Samsung Electronics Co.,Ltd", + [3]byte{200, 132, 57}: "Sunrise Technologies", + [3]byte{200, 132, 71}: "Beautiful Enterprise Co., Ltd", + [3]byte{200, 133, 80}: "Apple", + [3]byte{200, 135, 59}: "Net Optics", + [3]byte{200, 138, 131}: "Dongguan HuaHong Electronics Co.,Ltd", + [3]byte{200, 139, 71}: "Nolangroup S.P.A con Socio Unico", + [3]byte{200, 144, 62}: "Pakton Technologies", + [3]byte{200, 145, 249}: "SAGEMCOM", + [3]byte{200, 147, 70}: "MXCHIP Company Limited", + [3]byte{200, 147, 131}: "Embedded Automation, Inc.", + [3]byte{200, 148, 210}: "Jiangsu Datang Electronic Products Co., Ltd", + [3]byte{200, 151, 159}: "Nokia Corporation", + [3]byte{200, 156, 29}: "CISCO SYSTEMS, INC.", + [3]byte{200, 156, 220}: "ELITEGROUP COMPUTER SYSTEM CO., LTD.", + [3]byte{200, 159, 29}: "SHENZHEN COMMUNICATION TECHNOLOGIES CO.,LTD", + [3]byte{200, 159, 66}: "VDII Innovation AB", + [3]byte{200, 160, 48}: "Texas Instruments", + [3]byte{200, 161, 182}: "Shenzhen Longway Technologies Co., Ltd", + [3]byte{200, 161, 186}: "Neul Ltd", + [3]byte{200, 166, 32}: "Nebula, Inc", + [3]byte{200, 167, 10}: "Verizon Business", + [3]byte{200, 167, 41}: "SYStronics Co., Ltd.", + [3]byte{200, 170, 33}: "ARRIS Group, Inc.", + [3]byte{200, 170, 204}: "PRIVATE", + [3]byte{200, 174, 156}: "Shanghai TYD Elecronic Technology Co. Ltd", + [3]byte{200, 175, 64}: "marco Systemanalyse und Entwicklung GmbH", + [3]byte{200, 179, 115}: "Cisco-Linksys, LLC", + [3]byte{200, 181, 183}: "Apple", + [3]byte{200, 186, 148}: "Samsung Electro Mechanics co., LTD.", + [3]byte{200, 187, 211}: "Embrane", + [3]byte{200, 188, 200}: "Apple", + [3]byte{200, 190, 25}: "D-Link International", + [3]byte{200, 193, 38}: "ZPM Industria e Comercio Ltda", + [3]byte{200, 193, 60}: "RuggedTek Hangzhou Co., Ltd", + [3]byte{200, 199, 145}: "Zero1.tv GmbH", + [3]byte{200, 203, 184}: "Hewlett Packard", + [3]byte{200, 205, 114}: "SAGEMCOM", + [3]byte{200, 208, 25}: "Shanghai Tigercel Communication Technology Co.,Ltd", + [3]byte{200, 209, 11}: "Nokia Corporation", + [3]byte{200, 209, 94}: "Huawei Technologies Co., Ltd", + [3]byte{200, 209, 209}: "AGAiT Technology Corporation", + [3]byte{200, 210, 193}: "Jetlun (Shenzhen) Corporation", + [3]byte{200, 211, 163}: "D-Link International", + [3]byte{200, 212, 41}: "Muehlbauer AG", + [3]byte{200, 213, 144}: "FLIGHT DATA SYSTEMS", + [3]byte{200, 213, 254}: "Shenzhen Zowee Technology Co., Ltd", + [3]byte{200, 215, 25}: "Cisco Consumer Products, LLC", + [3]byte{200, 221, 201}: "Lenovo Mobile Communication Technology Ltd.", + [3]byte{200, 222, 81}: "Integra Networks, Inc.", + [3]byte{200, 223, 124}: "Nokia Corporation", + [3]byte{200, 224, 235}: "Apple", + [3]byte{200, 225, 167}: "Vertu Corporation Limited", + [3]byte{200, 228, 47}: "Technical Research Design and Development", + [3]byte{200, 231, 216}: "SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD.", + [3]byte{200, 238, 8}: "TANGTOP TECHNOLOGY CO.,LTD", + [3]byte{200, 238, 117}: "Pishion International Co. Ltd", + [3]byte{200, 238, 166}: "Shenzhen SHX Technology Co., Ltd", + [3]byte{200, 239, 46}: "Beijing Gefei Tech. Co., Ltd", + [3]byte{200, 243, 107}: "Yamato Scale Co.,Ltd.", + [3]byte{200, 243, 134}: "Shenzhen Xiaoniao Technology Co.,Ltd", + [3]byte{200, 244, 6}: "Avaya, Inc", + [3]byte{200, 246, 80}: "Apple", + [3]byte{200, 246, 141}: "S.E.TECHNOLOGIES LIMITED", + [3]byte{200, 247, 4}: "Building Block Video", + [3]byte{200, 247, 51}: "Intel Corporate", + [3]byte{200, 249, 129}: "Seneca s.r.l.", + [3]byte{200, 249, 249}: "CISCO SYSTEMS, INC.", + [3]byte{200, 251, 38}: "Cisco SPVTG", + [3]byte{200, 254, 48}: "Bejing DAYO Mobile Communication Technology Ltd.", + [3]byte{200, 255, 119}: "Dyson Limited", + [3]byte{204, 0, 128}: "BETTINI SRL", + [3]byte{204, 3, 250}: "Technicolor CH USA", + [3]byte{204, 4, 124}: "G-WAY Microwave", + [3]byte{204, 4, 180}: "Select Comfort", + [3]byte{204, 5, 27}: "Samsung Electronics Co.,Ltd", + [3]byte{204, 7, 171}: "Samsung Electronics Co.,Ltd", + [3]byte{204, 7, 228}: "Lenovo Mobile Communication Technology Ltd.", + [3]byte{204, 8, 224}: "Apple", + [3]byte{204, 9, 200}: "IMAQLIQ LTD", + [3]byte{204, 12, 218}: "Miljovakt AS", + [3]byte{204, 13, 236}: "Cisco SPVTG", + [3]byte{204, 16, 163}: "Beijing Nan Bao Technology Co., Ltd.", + [3]byte{204, 20, 166}: "Yichun MyEnergy Domain, Inc", + [3]byte{204, 24, 123}: "Manzanita Systems, Inc.", + [3]byte{204, 26, 250}: "zte corporation", + [3]byte{204, 30, 255}: "Metrological Group BV", + [3]byte{204, 34, 24}: "InnoDigital Co., Ltd.", + [3]byte{204, 38, 45}: "Verifi, LLC", + [3]byte{204, 42, 128}: "Micro-Biz intelligence solutions Co.,Ltd", + [3]byte{204, 45, 140}: "LG ELECTRONICS INC", + [3]byte{204, 48, 128}: "VAIO Corporation", + [3]byte{204, 51, 187}: "SAGEMCOM SAS", + [3]byte{204, 52, 41}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{204, 52, 215}: "GEWISS S.P.A.", + [3]byte{204, 53, 64}: "Technicolor USA Inc.", + [3]byte{204, 57, 140}: "Shiningtek", + [3]byte{204, 58, 97}: "SAMSUNG ELECTRO MECHANICS CO., LTD.", + [3]byte{204, 60, 63}: "SA.S.S. Datentechnik AG", + [3]byte{204, 61, 130}: "Intel Corporate", + [3]byte{204, 62, 95}: "Hewlett Packard", + [3]byte{204, 63, 29}: "Intesis Software SL", + [3]byte{204, 67, 227}: "Trump s.a.", + [3]byte{204, 71, 3}: "Intercon Systems Co., Ltd.", + [3]byte{204, 74, 225}: "Fourtec -Fourier Technologies", + [3]byte{204, 75, 251}: "Hellberg Safety AB", + [3]byte{204, 78, 36}: "Brocade Communications Systems, Inc.", + [3]byte{204, 80, 28}: "KVH Industries, Inc.", + [3]byte{204, 80, 118}: "Ocom Communications, Inc.", + [3]byte{204, 82, 175}: "Universal Global Scientific Industrial Co., Ltd.", + [3]byte{204, 83, 181}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{204, 84, 89}: "OnTime Networks AS", + [3]byte{204, 85, 173}: "RIM", + [3]byte{204, 89, 62}: "TOUMAZ LTD", + [3]byte{204, 92, 117}: "Weightech Com. Imp. Exp. Equip. Pesagem Ltda", + [3]byte{204, 93, 78}: "ZyXEL Communications Corporation", + [3]byte{204, 93, 87}: "Information System Research Institute,Inc.", + [3]byte{204, 96, 187}: "Empower RF Systems", + [3]byte{204, 101, 173}: "ARRIS Group, Inc.", + [3]byte{204, 105, 176}: "Global Traffic Technologies, LLC", + [3]byte{204, 107, 152}: "Minetec Wireless Technologies", + [3]byte{204, 107, 241}: "Sound Masking Inc.", + [3]byte{204, 109, 160}: "Roku, Inc.", + [3]byte{204, 109, 239}: "TJK Tietolaite Oy", + [3]byte{204, 114, 15}: "Viscount Systems Inc.", + [3]byte{204, 116, 152}: "Filmetrics Inc.", + [3]byte{204, 118, 105}: "SEETECH", + [3]byte{204, 120, 95}: "Apple", + [3]byte{204, 122, 48}: "CMAX Wireless Co., Ltd.", + [3]byte{204, 123, 53}: "zte corporation", + [3]byte{204, 125, 55}: "ARRIS Group, Inc.", + [3]byte{204, 126, 231}: "Panasonic AVC Networks Company", + [3]byte{204, 133, 108}: "SHENZHEN MDK DIGITAL TECHNOLOGY CO.,LTD", + [3]byte{204, 137, 253}: "Nokia Corporation", + [3]byte{204, 140, 227}: "Texas Instruments", + [3]byte{204, 144, 147}: "Hansong Tehnologies", + [3]byte{204, 145, 43}: "TE Connectivity Touch Solutions", + [3]byte{204, 148, 74}: "Pfeiffer Vacuum GmbH", + [3]byte{204, 149, 215}: "VIZIO, Inc", + [3]byte{204, 150, 160}: "Shenzhen Huawei Communication Technologies Co., Ltd", + [3]byte{204, 158, 0}: "Nintendo Co., Ltd.", + [3]byte{204, 159, 53}: "Transbit Sp. z o.o.", + [3]byte{204, 160, 229}: "DZG Metering GmbH", + [3]byte{204, 162, 35}: "Huawei Technologies Co., Ltd", + [3]byte{204, 163, 116}: "Guangdong Guanglian Electronic Technology Co.Ltd", + [3]byte{204, 164, 98}: "ARRIS Group, Inc.", + [3]byte{204, 166, 20}: "AIFA TECHNOLOGY CORP.", + [3]byte{204, 175, 120}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{204, 178, 85}: "D-Link International", + [3]byte{204, 179, 248}: "FUJITSU ISOTEC LIMITED", + [3]byte{204, 181, 90}: "Fraunhofer ITWM", + [3]byte{204, 182, 145}: "NECMagnusCommunications", + [3]byte{204, 184, 136}: "AnB Securite s.a.", + [3]byte{204, 184, 241}: "EAGLE KINGDOM TECHNOLOGIES LIMITED", + [3]byte{204, 189, 53}: "Steinel GmbH", + [3]byte{204, 189, 211}: "Ultimaker B.V.", + [3]byte{204, 190, 113}: "OptiLogix BV", + [3]byte{204, 193, 4}: "Applied Technical Systems", + [3]byte{204, 195, 234}: "Motorola Mobility LLC", + [3]byte{204, 197, 10}: "SHENZHEN DAJIAHAO TECHNOLOGY CO.,LTD", + [3]byte{204, 198, 43}: "Tri-Systems Corporation", + [3]byte{204, 200, 215}: "CIAS Elettronica srl", + [3]byte{204, 204, 78}: "Sun Fountainhead USA. Corp", + [3]byte{204, 204, 129}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{204, 205, 100}: "SM-Electronic GmbH", + [3]byte{204, 206, 64}: "Janteq Corp", + [3]byte{204, 210, 155}: "Shenzhen Bopengfa Elec&Technology CO.,Ltd", + [3]byte{204, 213, 57}: "Cisco", + [3]byte{204, 216, 17}: "Aiconn Technology Corporation", + [3]byte{204, 216, 193}: "Cisco", + [3]byte{204, 217, 233}: "SCR Engineers Ltd.", + [3]byte{204, 225, 127}: "juniper networks", + [3]byte{204, 225, 213}: "Buffalo Inc.", + [3]byte{204, 231, 152}: "My Social Stuff", + [3]byte{204, 231, 223}: "American Magnetics, Inc.", + [3]byte{204, 232, 172}: "SOYEA Technology Co.,Ltd.", + [3]byte{204, 234, 28}: "DCONWORKS Co., Ltd", + [3]byte{204, 238, 217}: "Deto Mechatronic GmbH", + [3]byte{204, 239, 72}: "CISCO SYSTEMS, INC.", + [3]byte{204, 243, 165}: "Chi Mei Communication Systems, Inc", + [3]byte{204, 244, 7}: "EUKREA ELECTROMATIQUE SARL", + [3]byte{204, 245, 56}: "3isysnetworks", + [3]byte{204, 246, 122}: "Ayecka Communication Systems LTD", + [3]byte{204, 248, 65}: "Lumewave", + [3]byte{204, 248, 240}: "Xi'an HISU Multimedia Technology Co.,Ltd.", + [3]byte{204, 249, 84}: "Avaya, Inc", + [3]byte{204, 249, 232}: "Samsung Electronics Co.,Ltd", + [3]byte{204, 250, 0}: "LG Electronics", + [3]byte{204, 251, 101}: "Nintendo Co., Ltd.", + [3]byte{204, 252, 109}: "RIZ TRANSMITTERS", + [3]byte{204, 252, 177}: "Wireless Technology, Inc.", + [3]byte{204, 254, 60}: "Samsung Electronics", + [3]byte{208, 7, 144}: "Texas Instruments", + [3]byte{208, 10, 171}: "Yokogawa Digital Computer Corporation", + [3]byte{208, 14, 164}: "Porsche Cars North America", + [3]byte{208, 18, 66}: "BIOS Corporation", + [3]byte{208, 19, 30}: "Sunrex Technology Corp", + [3]byte{208, 21, 74}: "zte corporation", + [3]byte{208, 23, 106}: "Samsung Electronics Co.,Ltd", + [3]byte{208, 26, 167}: "UniPrint", + [3]byte{208, 28, 187}: "Beijing Ctimes Digital Technology Co., Ltd.", + [3]byte{208, 34, 18}: "IEEE REGISTRATION AUTHORITY - Please see MAM public listing for more information.", + [3]byte{208, 34, 190}: "Samsung Electro Mechanics co.,LTD.", + [3]byte{208, 35, 219}: "Apple", + [3]byte{208, 39, 136}: "Hon Hai Precision Ind.Co.Ltd", + [3]byte{208, 44, 69}: "littleBits Electronics, Inc.", + [3]byte{208, 45, 179}: "Huawei Technologies Co., Ltd", + [3]byte{208, 49, 16}: "Ingenic Semiconductor Co.,Ltd", + [3]byte{208, 55, 97}: "Texas Instruments", + [3]byte{208, 57, 114}: "Texas Instruments", + [3]byte{208, 57, 179}: "ARRIS Group, Inc.", + [3]byte{208, 70, 220}: "Southwest Research Institute", + [3]byte{208, 76, 193}: "SINTRONES Technology Corp.", + [3]byte{208, 79, 126}: "Apple", + [3]byte{208, 80, 153}: "ASRock Incorporation", + [3]byte{208, 81, 98}: "Sony Mobile Communications AB", + [3]byte{208, 82, 168}: "Physical Graph Corporation", + [3]byte{208, 84, 45}: "Cambridge Industries(Group) Co.,Ltd.", + [3]byte{208, 87, 76}: "CISCO SYSTEMS, INC.", + [3]byte{208, 87, 133}: "Pantech Co., Ltd.", + [3]byte{208, 87, 161}: "Werma Signaltechnik GmbH & Co. KG", + [3]byte{208, 88, 117}: "Active Control Technology Inc.", + [3]byte{208, 89, 195}: "CeraMicro Technology Corporation", + [3]byte{208, 89, 228}: "Samsung Electronics Co.,Ltd", + [3]byte{208, 90, 15}: "I-BT DIGITAL CO.,LTD", + [3]byte{208, 90, 241}: "Shenzhen Pulier Tech CO.,Ltd", + [3]byte{208, 91, 168}: "zte corporation", + [3]byte{208, 95, 184}: "Texas Instruments", + [3]byte{208, 95, 206}: "Hitachi Data Systems", + [3]byte{208, 98, 160}: "China Essence Technology (Zhumadian) Co., Ltd.", + [3]byte{208, 99, 77}: "Meiko Maschinenbau GmbH & Co. KG", + [3]byte{208, 99, 180}: "SolidRun Ltd.", + [3]byte{208, 102, 123}: "Samsung Electronics Co., LTD", + [3]byte{208, 103, 229}: "Dell Inc", + [3]byte{208, 105, 158}: "LUMINEX Lighting Control Equipment", + [3]byte{208, 105, 208}: "Verto Medical Solutions, LLC", + [3]byte{208, 114, 220}: "Cisco", + [3]byte{208, 115, 127}: "Mini-Circuits", + [3]byte{208, 115, 142}: "DONG OH PRECISION CO., LTD.", + [3]byte{208, 115, 213}: "LIFI LABS MANAGEMENT PTY LTD", + [3]byte{208, 117, 190}: "Reno A&E", + [3]byte{208, 118, 80}: "IEEE REGISTRATION AUTHORITY - Please see MAM public listing for more information.", + [3]byte{208, 122, 181}: "Huawei Technologies Co., Ltd", + [3]byte{208, 125, 229}: "Forward Pay Systems, Inc.", + [3]byte{208, 126, 40}: "Hewlett Packard", + [3]byte{208, 126, 53}: "Intel Corporate", + [3]byte{208, 132, 176}: "Sagemcom", + [3]byte{208, 137, 153}: "APCON, Inc.", + [3]byte{208, 138, 85}: "Skullcandy", + [3]byte{208, 139, 126}: "Passif Semiconductor", + [3]byte{208, 140, 181}: "Texas Instruments", + [3]byte{208, 140, 255}: "UPWIS AB", + [3]byte{208, 147, 248}: "Stonestreet One LLC", + [3]byte{208, 149, 199}: "Pantech Co., Ltd.", + [3]byte{208, 155, 5}: "Emtronix", + [3]byte{208, 156, 48}: "Foster Electric Company, Limited", + [3]byte{208, 157, 10}: "LINKCOM", + [3]byte{208, 160, 214}: "Chengdu TD Tech Ltd.", + [3]byte{208, 163, 17}: "Neuberger Gebäudeautomation GmbH", + [3]byte{208, 174, 236}: "Alpha Networks Inc.", + [3]byte{208, 175, 182}: "Linktop Technology Co., LTD", + [3]byte{208, 179, 63}: "SHENZHEN TINNO MOBILE TECHNOLOGY CO.,LTD.", + [3]byte{208, 180, 152}: "Robert Bosch LLC Automotive Electronics", + [3]byte{208, 181, 35}: "Bestcare Cloucal Corp.", + [3]byte{208, 181, 61}: "SEPRO ROBOTIQUE", + [3]byte{208, 187, 128}: "SHL Telemedicine International Ltd.", + [3]byte{208, 189, 1}: "DS International", + [3]byte{208, 190, 44}: "CNSLink Co., Ltd.", + [3]byte{208, 193, 177}: "Samsung Electronics Co.,Ltd", + [3]byte{208, 194, 130}: "CISCO SYSTEMS, INC.", + [3]byte{208, 196, 47}: "Tamagawa Seiki Co.,Ltd.", + [3]byte{208, 199, 137}: "Cisco", + [3]byte{208, 199, 192}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{208, 205, 225}: "Scientech Electronics", + [3]byte{208, 207, 94}: "Energy Micro AS", + [3]byte{208, 208, 253}: "CISCO SYSTEMS, INC.", + [3]byte{208, 210, 18}: "K2NET Co.,Ltd.", + [3]byte{208, 210, 134}: "Beckman Coulter K.K.", + [3]byte{208, 211, 252}: "Mios, Ltd.", + [3]byte{208, 212, 18}: "ADB Broadband Italia", + [3]byte{208, 212, 113}: "MVTECH co., Ltd", + [3]byte{208, 214, 204}: "Wintop", + [3]byte{208, 219, 50}: "Nokia Corporation", + [3]byte{208, 223, 154}: "Liteon Technology Corporation", + [3]byte{208, 223, 178}: "Genie Networks Limited", + [3]byte{208, 223, 199}: "Samsung Electronics Co.,Ltd", + [3]byte{208, 225, 64}: "Apple, Inc", + [3]byte{208, 227, 71}: "Yoga", + [3]byte{208, 228, 11}: "Wearable Inc.", + [3]byte{208, 229, 77}: "Pace plc", + [3]byte{208, 231, 130}: "Azurewave Technologies, Inc.", + [3]byte{208, 235, 3}: "Zhehua technology limited", + [3]byte{208, 235, 158}: "Seowoo Inc.", + [3]byte{208, 240, 219}: "Ericsson", + [3]byte{208, 242, 127}: "SteadyServ Technoligies, LLC", + [3]byte{208, 247, 59}: "Helmut Mauell GmbH", + [3]byte{208, 250, 29}: "Qihoo 360 Technology Co.,Ltd", + [3]byte{208, 255, 80}: "Texas Instruments, Inc", + [3]byte{212, 0, 13}: "Phoenix Broadband Technologies, LLC.", + [3]byte{212, 0, 87}: "MC Technologies GmbH", + [3]byte{212, 1, 41}: "Broadcom Corporation", + [3]byte{212, 1, 109}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{212, 2, 74}: "Delphian Systems LLC", + [3]byte{212, 11, 185}: "Solid Semecs bv.", + [3]byte{212, 15, 178}: "Applied Micro Electronics AME bv", + [3]byte{212, 16, 144}: "iNFORM Systems AG", + [3]byte{212, 16, 207}: "Huanshun Network Science and Technology Co., Ltd.", + [3]byte{212, 17, 214}: "ShotSpotter, Inc.", + [3]byte{212, 18, 150}: "Anobit Technologies Ltd.", + [3]byte{212, 18, 187}: "Quadrant Components Inc. Ltd", + [3]byte{212, 19, 111}: "Asia Pacific Brands", + [3]byte{212, 28, 28}: "RCF S.P.A.", + [3]byte{212, 30, 53}: "TOHO Electronics INC.", + [3]byte{212, 31, 12}: "TVI Vision Oy", + [3]byte{212, 32, 109}: "HTC Corporation", + [3]byte{212, 33, 34}: "Sercomm Corporation", + [3]byte{212, 34, 63}: "Lenovo Mobile Communication Technology Ltd.", + [3]byte{212, 34, 78}: "Alcatel Lucent", + [3]byte{212, 39, 81}: "Infopia Co., Ltd", + [3]byte{212, 40, 178}: "ioBridge, Inc.", + [3]byte{212, 41, 234}: "Zimory GmbH", + [3]byte{212, 44, 61}: "Sky Light Digital Limited", + [3]byte{212, 47, 35}: "Akenori PTE Ltd", + [3]byte{212, 49, 157}: "Sinwatec", + [3]byte{212, 50, 102}: "Fike Corporation", + [3]byte{212, 55, 215}: "zte corporation", + [3]byte{212, 58, 101}: "IGRS Engineering Lab Ltd.", + [3]byte{212, 58, 233}: "DONGGUAN ipt INDUSTRIAL CO., LTD", + [3]byte{212, 61, 103}: "Carma Industries Inc.", + [3]byte{212, 61, 126}: "Micro-Star Int'l Co, Ltd", + [3]byte{212, 67, 168}: "Changzhou Haojie Electric Co., Ltd.", + [3]byte{212, 75, 94}: "TAIYO YUDEN CO., LTD.", + [3]byte{212, 76, 36}: "Vuppalamritha Magnetic Components LTD", + [3]byte{212, 76, 156}: "Shenzhen YOOBAO Technology Co.Ltd", + [3]byte{212, 76, 167}: "Informtekhnika & Communication, LLC", + [3]byte{212, 79, 128}: "Kemper Digital GmbH", + [3]byte{212, 80, 122}: "CEIVA Logic, Inc", + [3]byte{212, 82, 81}: "IBT Ingenieurbureau Broennimann Thun", + [3]byte{212, 82, 151}: "nSTREAMS Technologies, Inc.", + [3]byte{212, 83, 175}: "VIGO System S.A.", + [3]byte{212, 90, 178}: "Galleon Systems", + [3]byte{212, 92, 112}: "Wi-Fi Alliance", + [3]byte{212, 93, 66}: "Nokia Corporation", + [3]byte{212, 97, 50}: "Pro Concept Manufacturer Co.,Ltd.", + [3]byte{212, 100, 247}: "CHENGDU USEE DIGITAL TECHNOLOGY CO., LTD", + [3]byte{212, 102, 168}: "Riedo Networks GmbH", + [3]byte{212, 103, 97}: "SAHAB TECHNOLOGY", + [3]byte{212, 103, 231}: "Fiberhome Telecommunication Tech.Co.,Ltd.", + [3]byte{212, 104, 103}: "Neoventus Design Group", + [3]byte{212, 106, 145}: "Snap AV", + [3]byte{212, 106, 168}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{212, 108, 191}: "Goodrich ISR", + [3]byte{212, 108, 218}: "CSM GmbH", + [3]byte{212, 110, 92}: "Huawei Technologies Co., Ltd", + [3]byte{212, 111, 66}: "WAXESS USA Inc", + [3]byte{212, 121, 195}: "Cameronet GmbH & Co. KG", + [3]byte{212, 123, 53}: "NEO Monitors AS", + [3]byte{212, 123, 117}: "HARTING Electronics GmbH", + [3]byte{212, 129, 202}: "iDevices, LLC", + [3]byte{212, 130, 62}: "Argosy Technologies, Ltd.", + [3]byte{212, 133, 100}: "Hewlett-Packard Company", + [3]byte{212, 135, 216}: "Samsung Electronics", + [3]byte{212, 136, 144}: "Samsung Electronics Co.,Ltd", + [3]byte{212, 140, 181}: "CISCO SYSTEMS, INC.", + [3]byte{212, 141, 217}: "Meld Technology, Inc", + [3]byte{212, 143, 51}: "Microsoft Corporation", + [3]byte{212, 143, 170}: "Sogecam Industrial, S.A.", + [3]byte{212, 145, 175}: "Electroacustica General Iberica, S.A.", + [3]byte{212, 147, 152}: "Nokia Corporation", + [3]byte{212, 147, 160}: "Fidelix Oy", + [3]byte{212, 148, 90}: "COSMO CO., LTD", + [3]byte{212, 148, 161}: "Texas Instruments", + [3]byte{212, 149, 36}: "Clover Network, Inc.", + [3]byte{212, 150, 223}: "SUNGJIN C&T CO.,LTD", + [3]byte{212, 151, 11}: "XIAOMI CORPORATION", + [3]byte{212, 154, 32}: "Apple", + [3]byte{212, 156, 40}: "JayBird Gear LLC", + [3]byte{212, 156, 142}: "University of FUKUI", + [3]byte{212, 158, 109}: "Wuhan Zhongyuan Huadian Science & Technology Co.,", + [3]byte{212, 160, 42}: "CISCO SYSTEMS, INC.", + [3]byte{212, 164, 37}: "SMAX Technology Co., Ltd.", + [3]byte{212, 164, 153}: "InView Technology Corporation", + [3]byte{212, 169, 40}: "GreenWave Reality Inc", + [3]byte{212, 170, 255}: "MICRO WORLD", + [3]byte{212, 172, 78}: "BODi rS, LLC", + [3]byte{212, 173, 45}: "Fiberhome Telecommunication Tech.Co.,Ltd.", + [3]byte{212, 174, 82}: "Dell Inc", + [3]byte{212, 177, 16}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{212, 180, 62}: "Messcomp Datentechnik GmbH", + [3]byte{212, 190, 217}: "Dell Inc", + [3]byte{212, 191, 45}: "SE Controls Asia Pacific Ltd", + [3]byte{212, 191, 127}: "UPVEL", + [3]byte{212, 193, 252}: "Nokia Corporation", + [3]byte{212, 199, 102}: "Acentic GmbH", + [3]byte{212, 201, 239}: "Hewlett Packard", + [3]byte{212, 202, 109}: "Routerboard.com", + [3]byte{212, 202, 110}: "u-blox AG", + [3]byte{212, 203, 175}: "Nokia Corporation", + [3]byte{212, 206, 184}: "Enatel LTD", + [3]byte{212, 207, 249}: "Shenzhen Sen5 Technology Co., Ltd.", + [3]byte{212, 209, 132}: "ADB Broadband Italia", + [3]byte{212, 210, 73}: "Power Ethernet", + [3]byte{212, 213, 13}: "Southwest Microwave, Inc", + [3]byte{212, 215, 72}: "CISCO SYSTEMS, INC.", + [3]byte{212, 216, 152}: "Korea CNO Tech Co., Ltd", + [3]byte{212, 217, 25}: "GoPro", + [3]byte{212, 223, 87}: "Alpinion Medical Systems", + [3]byte{212, 224, 142}: "ValueHD Corporation", + [3]byte{212, 227, 44}: "S. Siedle & Sohne", + [3]byte{212, 227, 63}: "Alcatel-Lucent", + [3]byte{212, 232, 178}: "Samsung Electronics", + [3]byte{212, 234, 14}: "Avaya, Inc", + [3]byte{212, 236, 12}: "Harley-Davidson Motor Company", + [3]byte{212, 236, 134}: "LinkedHope Intelligent Technologies Co., Ltd", + [3]byte{212, 238, 7}: "HIWIFI Co., Ltd.", + [3]byte{212, 240, 39}: "Navetas Energy Management", + [3]byte{212, 240, 180}: "Napco Security Technologies", + [3]byte{212, 241, 67}: "IPROAD.,Inc", + [3]byte{212, 244, 111}: "Apple", + [3]byte{212, 245, 19}: "Texas Instruments", + [3]byte{212, 246, 63}: "IEA S.R.L.", + [3]byte{216, 0, 77}: "Apple", + [3]byte{216, 5, 46}: "Skyviia Corporation", + [3]byte{216, 6, 209}: "Honeywell Fire System (Shanghai) Co,. Ltd.", + [3]byte{216, 8, 245}: "Arcadia Networks Co. Ltd.", + [3]byte{216, 9, 195}: "Cercacor Labs", + [3]byte{216, 12, 207}: "C.G.V. S.A.S.", + [3]byte{216, 13, 227}: "FXI TECHNOLOGIES AS", + [3]byte{216, 21, 13}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{216, 22, 10}: "Nippon Electro-Sensory Devices", + [3]byte{216, 24, 43}: "Conti Temic Microelectronic GmbH", + [3]byte{216, 25, 206}: "Telesquare", + [3]byte{216, 27, 254}: "TWINLINX CORPORATION", + [3]byte{216, 28, 20}: "Compacta International, Ltd.", + [3]byte{216, 30, 222}: "B&W Group Ltd", + [3]byte{216, 36, 189}: "CISCO SYSTEMS, INC.", + [3]byte{216, 37, 34}: "Pace plc", + [3]byte{216, 38, 185}: "Guangdong Coagent Electronics S &T Co., Ltd.", + [3]byte{216, 39, 12}: "MaxTronic International Co., Ltd.", + [3]byte{216, 40, 201}: "General Electric Consumer and Industrial", + [3]byte{216, 41, 22}: "Ascent Communication Technology", + [3]byte{216, 41, 134}: "Best Wish Technology LTD", + [3]byte{216, 42, 21}: "Leitner SpA", + [3]byte{216, 42, 126}: "Nokia Corporation", + [3]byte{216, 45, 155}: "Shenzhen G.Credit Communication Technology Co., Ltd", + [3]byte{216, 45, 225}: "Tricascade Inc.", + [3]byte{216, 48, 98}: "Apple", + [3]byte{216, 49, 207}: "Samsung Electronics Co.,Ltd", + [3]byte{216, 51, 127}: "Office FA.com Co.,Ltd.", + [3]byte{216, 60, 105}: "Tinno Mobile Technology Corp", + [3]byte{216, 66, 172}: "Shanghai Feixun Communication Co.,Ltd.", + [3]byte{216, 70, 6}: "Silicon Valley Global Marketing", + [3]byte{216, 73, 11}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{216, 73, 47}: "CANON INC.", + [3]byte{216, 74, 135}: "OI ELECTRIC CO.,LTD", + [3]byte{216, 75, 42}: "Cognitas Technologies, Inc.", + [3]byte{216, 80, 230}: "ASUSTek COMPUTER INC.", + [3]byte{216, 84, 58}: "Texas Instruments", + [3]byte{216, 87, 239}: "Samsung Electronics", + [3]byte{216, 88, 215}: "CZ.NIC, z.s.p.o.", + [3]byte{216, 93, 76}: "TP-LINK Technologies Co.,Ltd.", + [3]byte{216, 93, 132}: "CAx soft GmbH", + [3]byte{216, 93, 251}: "PRIVATE", + [3]byte{216, 97, 148}: "Objetivos y Sevicios de Valor Añadido", + [3]byte{216, 98, 219}: "Eno Inc.", + [3]byte{216, 101, 149}: "Toy's Myth Inc.", + [3]byte{216, 102, 198}: "Shenzhen Daystar Technology Co.,ltd", + [3]byte{216, 102, 238}: "BOXIN COMMUNICATION CO.,LTD.", + [3]byte{216, 103, 217}: "CISCO SYSTEMS, INC.", + [3]byte{216, 105, 96}: "Steinsvik", + [3]byte{216, 107, 247}: "Nintendo Co., Ltd.", + [3]byte{216, 108, 233}: "SAGEMCOM SAS", + [3]byte{216, 113, 87}: "Lenovo Mobile Communication Technology Ltd.", + [3]byte{216, 117, 51}: "Nokia Corporation", + [3]byte{216, 118, 10}: "Escort, Inc.", + [3]byte{216, 120, 229}: "KUHN SA", + [3]byte{216, 121, 136}: "Hon Hai Precision Ind. Co., Ltd.", + [3]byte{216, 124, 221}: "SANIX INCORPORATED", + [3]byte{216, 126, 177}: "x.o.ware, inc.", + [3]byte{216, 128, 57}: "Microchip Technology Inc.", + [3]byte{216, 129, 206}: "AHN INC.", + [3]byte{216, 132, 102}: "Extreme Networks", + [3]byte{216, 138, 59}: "UNIT-EM", + [3]byte{216, 144, 232}: "Samsung Electronics Co.,Ltd", + [3]byte{216, 149, 47}: "Texas Instruments", + [3]byte{216, 150, 133}: "GoPro", + [3]byte{216, 150, 149}: "Apple", + [3]byte{216, 150, 224}: "Alibaba Cloud Computing Ltd.", + [3]byte{216, 151, 59}: "Artesyn Embedded Technologies", + [3]byte{216, 151, 96}: "C2 Development, Inc.", + [3]byte{216, 151, 124}: "Grey Innovation", + [3]byte{216, 151, 186}: "PEGATRON CORPORATION", + [3]byte{216, 157, 103}: "Hewlett Packard", + [3]byte{216, 157, 185}: "eMegatech International Corp.", + [3]byte{216, 158, 63}: "Apple", + [3]byte{216, 162, 94}: "Apple", + [3]byte{216, 174, 144}: "Itibia Technologies", + [3]byte{216, 175, 59}: "Hangzhou Bigbright Integrated communications system Co.,Ltd", + [3]byte{216, 175, 241}: "Panasonic Appliances Company", + [3]byte{216, 176, 46}: "Guangzhou Zonerich Business Machine Co., Ltd", + [3]byte{216, 176, 76}: "Jinan USR IOT Technology Co., Ltd.", + [3]byte{216, 177, 42}: "Panasonic Mobile Communications Co., Ltd.", + [3]byte{216, 179, 119}: "HTC Corporation", + [3]byte{216, 182, 183}: "Comtrend Corporation", + [3]byte{216, 182, 193}: "NetworkAccountant, Inc.", + [3]byte{216, 182, 214}: "Blu Tether Limited", + [3]byte{216, 184, 246}: "Nantworks", + [3]byte{216, 185, 14}: "Triple Domain Vision Co.,Ltd.", + [3]byte{216, 187, 44}: "Apple", + [3]byte{216, 191, 76}: "Victory Concept Electronics Limited", + [3]byte{216, 192, 104}: "Netgenetech.co.,ltd.", + [3]byte{216, 195, 251}: "DETRACOM", + [3]byte{216, 198, 145}: "Hichan Technology Corp.", + [3]byte{216, 199, 200}: "Aruba Networks", + [3]byte{216, 201, 157}: "EA DISPLAY LIMITED", + [3]byte{216, 203, 138}: "Micro-Star INTL CO., LTD.", + [3]byte{216, 207, 156}: "Apple", + [3]byte{216, 209, 203}: "Apple", + [3]byte{216, 210, 124}: "JEMA ENERGY, SA", + [3]byte{216, 211, 133}: "Hewlett-Packard Company", + [3]byte{216, 212, 60}: "Sony Corporation", + [3]byte{216, 213, 185}: "Rainforest Automation, Inc.", + [3]byte{216, 214, 126}: "GSK CNC EQUIPMENT CO.,LTD", + [3]byte{216, 218, 82}: "APATOR S.A.", + [3]byte{216, 220, 233}: "Kunshan Erlab ductless filtration system Co.,Ltd", + [3]byte{216, 221, 95}: "BALMUDA Inc.", + [3]byte{216, 221, 253}: "Texas Instruments", + [3]byte{216, 222, 206}: "ISUNG CO.,LTD", + [3]byte{216, 223, 13}: "beroNet GmbH", + [3]byte{216, 227, 174}: "CIRTEC MEDICAL SYSTEMS", + [3]byte{216, 229, 109}: "TCT Mobile Limited", + [3]byte{216, 231, 43}: "NetScout Systems, Inc.", + [3]byte{216, 231, 67}: "Wush, Inc", + [3]byte{216, 233, 82}: "KEOPSYS", + [3]byte{216, 235, 151}: "TRENDnet, Inc.", + [3]byte{216, 238, 120}: "Moog Protokraft", + [3]byte{216, 240, 242}: "Zeebo Inc", + [3]byte{216, 247, 16}: "Libre Wireless Technologies Inc.", + [3]byte{216, 251, 17}: "AXACORE", + [3]byte{216, 252, 147}: "Intel Corporate", + [3]byte{216, 254, 143}: "IDFone Co., Ltd.", + [3]byte{216, 254, 227}: "D-Link International", + [3]byte{220, 2, 101}: "Meditech Kft", + [3]byte{220, 2, 142}: "zte corporation", + [3]byte{220, 5, 47}: "National Products Inc.", + [3]byte{220, 5, 117}: "SIEMENS ENERGY AUTOMATION", + [3]byte{220, 5, 237}: "Nabtesco Corporation", + [3]byte{220, 7, 193}: "HangZhou QiYang Technology Co.,Ltd.", + [3]byte{220, 11, 26}: "ADB Broadband Italia", + [3]byte{220, 14, 161}: "COMPAL INFORMATION (KUNSHAN) CO., LTD", + [3]byte{220, 22, 162}: "Medtronic Diabetes", + [3]byte{220, 23, 90}: "Hitachi High-Technologies Corporation", + [3]byte{220, 23, 146}: "Captivate Network", + [3]byte{220, 29, 159}: "U & B tech", + [3]byte{220, 29, 212}: "Microstep-MIS spol. s r.o.", + [3]byte{220, 30, 163}: "Accensus LLC", + [3]byte{220, 32, 8}: "ASD Electronics Ltd", + [3]byte{220, 42, 20}: "Shanghai Longjing Technology Co.", + [3]byte{220, 43, 97}: "Apple", + [3]byte{220, 43, 102}: "InfoBLOCK S.A. de C.V.", + [3]byte{220, 43, 202}: "Zera GmbH", + [3]byte{220, 44, 38}: "Iton Technology Limited", + [3]byte{220, 46, 106}: "HCT. Co., Ltd.", + [3]byte{220, 47, 3}: "Step forward Group Co., Ltd.", + [3]byte{220, 48, 156}: "Heyrex Limited", + [3]byte{220, 51, 80}: "TechSAT GmbH", + [3]byte{220, 55, 210}: "Hunan HKT Electronic Technology Co., Ltd", + [3]byte{220, 56, 225}: "Juniper networks", + [3]byte{220, 57, 121}: "Skyport Systems", + [3]byte{220, 58, 94}: "Roku, Inc", + [3]byte{220, 60, 46}: "Manufacturing System Insights, Inc.", + [3]byte{220, 60, 132}: "Ticom Geomatics, Inc.", + [3]byte{220, 62, 81}: "Solberg & Andersen AS", + [3]byte{220, 62, 248}: "Nokia Corporation", + [3]byte{220, 69, 23}: "ARRIS Group, Inc.", + [3]byte{220, 73, 201}: "CASCO SIGNAL LTD", + [3]byte{220, 78, 222}: "SHINYEI TECHNOLOGY CO., LTD.", + [3]byte{220, 83, 124}: "Compal Broadband Networks, Inc.", + [3]byte{220, 87, 38}: "Power-One", + [3]byte{220, 94, 54}: "Paterson Technology", + [3]byte{220, 100, 124}: "C.R.S. iiMotion GmbH", + [3]byte{220, 102, 58}: "Apacer Technology Inc.", + [3]byte{220, 111, 0}: "Livescribe, Inc.", + [3]byte{220, 111, 8}: "Bay Storage Technology", + [3]byte{220, 112, 20}: "PRIVATE", + [3]byte{220, 113, 68}: "Samsung Electro Mechanics", + [3]byte{220, 123, 148}: "CISCO SYSTEMS, INC.", + [3]byte{220, 130, 91}: "JANUS, spol. s r.o.", + [3]byte{220, 133, 222}: "Azurewave Technologies., inc.", + [3]byte{220, 134, 216}: "Apple, Inc", + [3]byte{220, 155, 30}: "Intercom, Inc.", + [3]byte{220, 155, 156}: "Apple", + [3]byte{220, 156, 82}: "Sapphire Technology Limited.", + [3]byte{220, 159, 164}: "Nokia Corporation", + [3]byte{220, 159, 219}: "Ubiquiti Networks, Inc.", + [3]byte{220, 165, 244}: "Cisco", + [3]byte{220, 166, 189}: "Beijing Lanbo Technology Co., Ltd.", + [3]byte{220, 167, 217}: "Compressor Controls Corp", + [3]byte{220, 168, 207}: "New Spin Golf, LLC.", + [3]byte{220, 169, 113}: "Intel Corporate", + [3]byte{220, 169, 137}: "MACANDC", + [3]byte{220, 173, 158}: "GreenPriz", + [3]byte{220, 174, 4}: "CELOXICA Ltd", + [3]byte{220, 176, 88}: "Burkert Werke GmbH", + [3]byte{220, 180, 196}: "Microsoft XCG", + [3]byte{220, 191, 144}: "HUIZHOU QIAOXING TELECOMMUNICATION INDUSTRY CO.,LTD.", + [3]byte{220, 192, 219}: "Shenzhen Kaiboer Technology Co., Ltd.", + [3]byte{220, 193, 1}: "SOLiD Technologies, Inc.", + [3]byte{220, 196, 34}: "Systembase Limited", + [3]byte{220, 198, 34}: "BUHEUNG SYSTEM", + [3]byte{220, 199, 147}: "Nokia Corporation", + [3]byte{220, 203, 168}: "Explora Technologies Inc", + [3]byte{220, 206, 65}: "FE GLOBAL HONG KONG LIMITED", + [3]byte{220, 206, 188}: "Shenzhen JSR Technology Co.,Ltd.", + [3]byte{220, 207, 148}: "Beijing Rongcheng Hutong Technology Co., Ltd.", + [3]byte{220, 208, 247}: "Bentek Systems Ltd.", + [3]byte{220, 210, 252}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{220, 211, 33}: "HUMAX co.,tld", + [3]byte{220, 213, 42}: "Sunny Heart Limited", + [3]byte{220, 216, 127}: "Shenzhen JoinCyber Telecom Equipment Ltd", + [3]byte{220, 218, 79}: "GETCK TECHNOLOGY, INC", + [3]byte{220, 222, 202}: "Akyllor", + [3]byte{220, 226, 172}: "Lumens Digital Optics Inc.", + [3]byte{220, 229, 120}: "Experimental Factory of Scientific Engineering and Special Design Department", + [3]byte{220, 231, 28}: "AUG Elektronik GmbH", + [3]byte{220, 236, 6}: "Heimi Network Technology Co., Ltd.", + [3]byte{220, 240, 93}: "Letta Teknoloji", + [3]byte{220, 241, 16}: "Nokia Corporation", + [3]byte{220, 247, 85}: "SITRONIK", + [3]byte{220, 248, 88}: "Lorent Networks, Inc.", + [3]byte{220, 250, 213}: "STRONG Ges.m.b.H.", + [3]byte{220, 251, 2}: "Buffalo Inc.", + [3]byte{224, 5, 197}: "TP-LINK Technologies Co.,Ltd.", + [3]byte{224, 6, 230}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{224, 11, 40}: "Inovonics", + [3]byte{224, 12, 127}: "Nintendo Co., Ltd.", + [3]byte{224, 13, 185}: "PRIVATE", + [3]byte{224, 16, 127}: "Ruckus Wireless", + [3]byte{224, 20, 62}: "Modoosis Inc.", + [3]byte{224, 24, 119}: "Fujitsu Limited", + [3]byte{224, 28, 65}: "Aerohive Networks Inc.", + [3]byte{224, 28, 238}: "Bravo Tech, Inc.", + [3]byte{224, 29, 56}: "Beijing HuaqinWorld Technology Co.,Ltd", + [3]byte{224, 29, 59}: "Cambridge Industries(Group) Co.,Ltd", + [3]byte{224, 30, 7}: "Anite Telecoms US. Inc", + [3]byte{224, 31, 10}: "Xslent Energy Technologies. LLC", + [3]byte{224, 36, 127}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{224, 37, 56}: "Titan Pet Products", + [3]byte{224, 38, 48}: "Intrigue Technologies, Inc.", + [3]byte{224, 38, 54}: "Nortel Networks", + [3]byte{224, 39, 26}: "TTC Next-generation Home Network System WG", + [3]byte{224, 42, 130}: "Universal Global Scientific Industrial Co., Ltd.", + [3]byte{224, 47, 109}: "Cisco", + [3]byte{224, 48, 5}: "Alcatel-Lucent Shanghai Bell Co., Ltd", + [3]byte{224, 49, 208}: "SZ Telstar CO., LTD", + [3]byte{224, 54, 227}: "Stage One International Co., Ltd.", + [3]byte{224, 57, 215}: "Plexxi, Inc.", + [3]byte{224, 60, 91}: "SHENZHEN JIAXINJIE ELECTRON CO.,LTD", + [3]byte{224, 62, 68}: "Broadcom Corporation", + [3]byte{224, 62, 74}: "Cavanagh Group International", + [3]byte{224, 62, 125}: "data-complex GmbH", + [3]byte{224, 63, 73}: "ASUSTek COMPUTER INC.", + [3]byte{224, 70, 154}: "NETGEAR", + [3]byte{224, 85, 151}: "Emergent Vision Technologies Inc.", + [3]byte{224, 86, 244}: "AxesNetwork Solutions inc.", + [3]byte{224, 88, 158}: "Laerdal Medical", + [3]byte{224, 91, 112}: "Innovid, Co., Ltd.", + [3]byte{224, 93, 166}: "Detlef Fink Elektronik & Softwareentwicklung", + [3]byte{224, 95, 185}: "CISCO SYSTEMS, INC.", + [3]byte{224, 97, 178}: "HANGZHOU ZENOINTEL TECHNOLOGY CO., LTD", + [3]byte{224, 98, 144}: "Jinan Jovision Science & Technology Co., Ltd.", + [3]byte{224, 99, 229}: "Sony Mobile Communications AB", + [3]byte{224, 100, 187}: "DigiView S.r.l.", + [3]byte{224, 102, 120}: "Apple", + [3]byte{224, 103, 179}: "C-Data Technology Co., Ltd", + [3]byte{224, 105, 149}: "PEGATRON CORPORATION", + [3]byte{224, 117, 10}: "ALPS ERECTORIC CO.,LTD.", + [3]byte{224, 117, 125}: "Motorola Mobility LLC", + [3]byte{224, 124, 98}: "Whistle Labs, Inc.", + [3]byte{224, 127, 83}: "TECHBOARD SRL", + [3]byte{224, 127, 136}: "EVIDENCE Network SIA", + [3]byte{224, 129, 119}: "GreenBytes, Inc.", + [3]byte{224, 135, 177}: "Nata-Info Ltd.", + [3]byte{224, 136, 93}: "Technicolor CH USA Inc", + [3]byte{224, 138, 126}: "Exponent", + [3]byte{224, 143, 236}: "REPOTEC CO., LTD.", + [3]byte{224, 145, 83}: "XAVi Technologies Corp.", + [3]byte{224, 145, 245}: "NETGEAR", + [3]byte{224, 148, 103}: "Intel Corporate", + [3]byte{224, 149, 121}: "ORTHOsoft inc, d/b/a Zimmer CAS", + [3]byte{224, 151, 150}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{224, 151, 242}: "Atomax Inc.", + [3]byte{224, 157, 49}: "Intel Corporate", + [3]byte{224, 157, 184}: "PLANEX COMMUNICATIONS INC.", + [3]byte{224, 161, 152}: "NOJA Power Switchgear Pty Ltd", + [3]byte{224, 161, 215}: "SFR", + [3]byte{224, 163, 15}: "Pevco", + [3]byte{224, 166, 112}: "Nokia Corporation", + [3]byte{224, 170, 176}: "GENERAL VISION ELECTRONICS CO. LTD.", + [3]byte{224, 171, 254}: "Orb Networks, Inc.", + [3]byte{224, 172, 241}: "Cisco", + [3]byte{224, 174, 94}: "ALPS Co,. Ltd.", + [3]byte{224, 174, 178}: "Bender GmbH & Co.KG", + [3]byte{224, 174, 237}: "LOENK", + [3]byte{224, 175, 75}: "Pluribus Networks, Inc.", + [3]byte{224, 178, 241}: "FN-LINK TECHNOLOGY LIMITED", + [3]byte{224, 181, 45}: "Apple", + [3]byte{224, 183, 177}: "Pace plc", + [3]byte{224, 185, 165}: "Azurewave", + [3]byte{224, 185, 186}: "Apple", + [3]byte{224, 188, 67}: "C2 Microsystems, Inc.", + [3]byte{224, 194, 134}: "Aisai Communication Technology Co., Ltd.", + [3]byte{224, 194, 183}: "Masimo Corporation", + [3]byte{224, 195, 243}: "ZTE Corporation", + [3]byte{224, 198, 179}: "MilDef AB", + [3]byte{224, 199, 157}: "Texas Instruments", + [3]byte{224, 200, 106}: "SHENZHEN TW-SCIE Co., Ltd", + [3]byte{224, 201, 34}: "Jireh Energy Tech., Ltd.", + [3]byte{224, 201, 122}: "Apple", + [3]byte{224, 202, 77}: "Shenzhen Unistar Communication Co.,LTD", + [3]byte{224, 202, 148}: "Askey Computer", + [3]byte{224, 203, 29}: "PRIVATE", + [3]byte{224, 203, 78}: "ASUSTek COMPUTER INC.", + [3]byte{224, 203, 238}: "Samsung Electronics Co.,Ltd", + [3]byte{224, 206, 195}: "ASKEY COMPUTER CORP", + [3]byte{224, 207, 45}: "Gemintek Corporation", + [3]byte{224, 209, 10}: "Katoudenkikougyousyo co ltd", + [3]byte{224, 209, 230}: "Aliph dba Jawbone", + [3]byte{224, 211, 26}: "EQUES Technology Co., Limited", + [3]byte{224, 215, 186}: "Texas Instruments", + [3]byte{224, 217, 162}: "Hippih aps", + [3]byte{224, 218, 220}: "JVC KENWOOD Corporation", + [3]byte{224, 219, 85}: "Dell Inc", + [3]byte{224, 219, 136}: "Open Standard Digital-IF Interface for SATCOM Systems", + [3]byte{224, 220, 160}: "Siemens Electrical Apparatus Ltd., Suzhou Chengdu Branch", + [3]byte{224, 230, 49}: "SNB TECHNOLOGIES LIMITED", + [3]byte{224, 231, 81}: "Nintendo Co., Ltd.", + [3]byte{224, 232, 232}: "Olive Telecommunication Pvt. Ltd", + [3]byte{224, 237, 26}: "vastriver Technology Co., Ltd", + [3]byte{224, 237, 199}: "Shenzhen Friendcom Technology Development Co., Ltd", + [3]byte{224, 238, 27}: "Panasonic Automotive Systems Company of America", + [3]byte{224, 239, 37}: "Lintes Technology Co., Ltd.", + [3]byte{224, 242, 17}: "Digitalwatt", + [3]byte{224, 243, 121}: "Vaddio", + [3]byte{224, 245, 198}: "Apple", + [3]byte{224, 245, 202}: "CHENG UEI PRECISION INDUSTRY CO.,LTD.", + [3]byte{224, 248, 71}: "Apple", + [3]byte{224, 249, 190}: "Cloudena Corp.", + [3]byte{224, 250, 236}: "Platan sp. z o.o. sp. k.", + [3]byte{228, 4, 57}: "TomTom Software Ltd", + [3]byte{228, 17, 91}: "Hewlett Packard", + [3]byte{228, 18, 24}: "ShenZhen Rapoo Technology Co., Ltd.", + [3]byte{228, 18, 29}: "Samsung Electronics Co.,Ltd", + [3]byte{228, 18, 137}: "topsystem Systemhaus GmbH", + [3]byte{228, 28, 75}: "V2 TECHNOLOGY, INC.", + [3]byte{228, 29, 45}: "Mellanox Technologies, Inc.", + [3]byte{228, 31, 19}: "IBM Corp", + [3]byte{228, 35, 84}: "SHENZHEN FUZHI SOFTWARE TECHNOLOGY CO.,LTD", + [3]byte{228, 37, 231}: "Apple", + [3]byte{228, 37, 233}: "Color-Chip", + [3]byte{228, 39, 113}: "Smartlabs", + [3]byte{228, 42, 211}: "Magneti Marelli S.p.A. Powertrain", + [3]byte{228, 44, 86}: "Lilee Systems, Ltd.", + [3]byte{228, 45, 2}: "TCT Mobile Limited", + [3]byte{228, 47, 38}: "Fiberhome Telecommunication Tech.Co.,Ltd.", + [3]byte{228, 47, 246}: "Unicore communication Inc.", + [3]byte{228, 50, 203}: "Samsung Electronics Co.,Ltd", + [3]byte{228, 53, 147}: "Hangzhou GoTo technology Co.Ltd", + [3]byte{228, 53, 251}: "Sabre Technology (Hull) Ltd", + [3]byte{228, 55, 215}: "HENRI DEPAEPE S.A.S.", + [3]byte{228, 56, 242}: "Advantage Controls", + [3]byte{228, 63, 162}: "Wuxi DSP Technologies Inc.", + [3]byte{228, 64, 226}: "Samsung Electronics Co.,Ltd", + [3]byte{228, 65, 230}: "Ottec Technology GmbH", + [3]byte{228, 70, 189}: "C&C TECHNIC TAIWAN CO., LTD.", + [3]byte{228, 72, 199}: "Cisco SPVTG", + [3]byte{228, 76, 108}: "Shenzhen Guo Wei Electronic Co,. Ltd.", + [3]byte{228, 78, 24}: "Gardasoft VisionLimited", + [3]byte{228, 79, 41}: "MA Lighting Technology GmbH", + [3]byte{228, 79, 95}: "EDS Elektronik Destek San.Tic.Ltd.Sti", + [3]byte{228, 85, 234}: "Dedicated Computing", + [3]byte{228, 86, 20}: "Suttle Apparatus", + [3]byte{228, 87, 168}: "Stuart Manufacturing, Inc.", + [3]byte{228, 93, 82}: "Avaya, Inc", + [3]byte{228, 100, 73}: "ARRIS Group, Inc.", + [3]byte{228, 103, 186}: "Danish Interpretation Systems A/S", + [3]byte{228, 104, 163}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{228, 108, 33}: "messMa GmbH", + [3]byte{228, 113, 133}: "Securifi Ltd", + [3]byte{228, 117, 30}: "Getinge Sterilization AB", + [3]byte{228, 119, 35}: "zte corporation", + [3]byte{228, 119, 107}: "AARTESYS AG", + [3]byte{228, 119, 212}: "Minrray Industry Co.,Ltd", + [3]byte{228, 124, 249}: "Samsung Electronics Co., LTD", + [3]byte{228, 125, 90}: "Beijing Hanbang Technology Corp.", + [3]byte{228, 127, 178}: "Fujitsu Limited", + [3]byte{228, 129, 132}: "Alcatel-Lucent", + [3]byte{228, 129, 179}: "Shenzhen ACT Industrial Co.,Ltd.", + [3]byte{228, 131, 153}: "ARRIS Group, Inc.", + [3]byte{228, 138, 213}: "RF WINDOW CO., LTD.", + [3]byte{228, 139, 127}: "Apple", + [3]byte{228, 140, 15}: "Discovery Insure", + [3]byte{228, 144, 105}: "Rockwell Automation", + [3]byte{228, 146, 231}: "Gridlink Tech. Co.,Ltd.", + [3]byte{228, 146, 251}: "Samsung Electronics Co.,Ltd", + [3]byte{228, 149, 110}: "IEEE REGISTRATION AUTHORITY - Please see MAM public listing for more information.", + [3]byte{228, 150, 174}: "ALTOGRAPHICS Inc.", + [3]byte{228, 151, 240}: "Shanghai VLC Technologies Ltd. Co.", + [3]byte{228, 152, 214}: "Apple, Inc", + [3]byte{228, 165, 239}: "TRON LINK ELECTRONICS CO., LTD.", + [3]byte{228, 167, 253}: "Cellco Partnership", + [3]byte{228, 171, 70}: "UAB Selteka", + [3]byte{228, 173, 125}: "SCL Elements", + [3]byte{228, 175, 161}: "HES-SO", + [3]byte{228, 176, 33}: "Samsung Electronics Co.,Ltd", + [3]byte{228, 186, 217}: "360 Fly Inc.", + [3]byte{228, 193, 70}: "Objetivos y Servicios de Valor A", + [3]byte{228, 198, 43}: "Airware", + [3]byte{228, 198, 61}: "Apple, Inc.", + [3]byte{228, 198, 230}: "Mophie, LLC", + [3]byte{228, 199, 34}: "Cisco", + [3]byte{228, 200, 6}: "Ceiec Electric Technology Inc.", + [3]byte{228, 206, 143}: "Apple", + [3]byte{228, 211, 50}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{228, 211, 241}: "Cisco", + [3]byte{228, 213, 61}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{228, 215, 29}: "Oraya Therapeutics", + [3]byte{228, 221, 121}: "En-Vision America, Inc.", + [3]byte{228, 224, 197}: "Samsung Electronics Co., LTD", + [3]byte{228, 228, 9}: "LEIFHEIT AG", + [3]byte{228, 236, 16}: "Nokia Corporation", + [3]byte{228, 238, 253}: "MR&D Manufacturing", + [3]byte{228, 243, 101}: "Time-O-Matic, Inc.", + [3]byte{228, 243, 227}: "Shanghai iComhome Co.,Ltd.", + [3]byte{228, 244, 198}: "NETGEAR", + [3]byte{228, 247, 161}: "Datafox GmbH", + [3]byte{228, 248, 239}: "Samsung Elec Co.,Ltd", + [3]byte{228, 250, 29}: "PAD Peripheral Advanced Design Inc.", + [3]byte{228, 255, 221}: "ELECTRON INDIA", + [3]byte{232, 3, 154}: "Samsung Electronics CO., LTD", + [3]byte{232, 4, 11}: "Apple", + [3]byte{232, 4, 16}: "PRIVATE", + [3]byte{232, 4, 98}: "CISCO SYSTEMS, INC.", + [3]byte{232, 4, 243}: "Throughtek Co., Ltd.", + [3]byte{232, 5, 109}: "Nortel Networks", + [3]byte{232, 6, 136}: "Apple", + [3]byte{232, 8, 139}: "Huawei Technologies Co., Ltd", + [3]byte{232, 11, 19}: "Akib Systems Taiwan, INC", + [3]byte{232, 12, 56}: "DAEYOUNG INFORMATION SYSTEM CO., LTD", + [3]byte{232, 12, 117}: "Syncbak, Inc.", + [3]byte{232, 16, 46}: "Really Simple Software, Inc", + [3]byte{232, 17, 50}: "Samsung Electronics CO., LTD", + [3]byte{232, 19, 36}: "GuangZhou Bonsoninfo System CO.,LTD", + [3]byte{232, 21, 14}: "Nokia Corporation", + [3]byte{232, 23, 252}: "NIFTY Corporation", + [3]byte{232, 24, 99}: "IEEE REGISTRATION AUTHORITY - Please see MAM public listing for more information.", + [3]byte{232, 40, 119}: "TMY Co., Ltd.", + [3]byte{232, 40, 213}: "Cots Technology", + [3]byte{232, 42, 234}: "Intel Corporate", + [3]byte{232, 46, 36}: "Out of the Fog Research LLC", + [3]byte{232, 51, 129}: "ARRIS Group, Inc.", + [3]byte{232, 57, 53}: "Hewlett Packard", + [3]byte{232, 57, 223}: "Askey Computer", + [3]byte{232, 58, 151}: "OCZ Technology Group", + [3]byte{232, 62, 182}: "RIM", + [3]byte{232, 62, 251}: "GEODESIC LTD.", + [3]byte{232, 62, 252}: "ARRIS Group, Inc.", + [3]byte{232, 64, 64}: "CISCO SYSTEMS, INC.", + [3]byte{232, 64, 242}: "PEGATRON CORPORATION", + [3]byte{232, 67, 182}: "QNAP Systems, Inc.", + [3]byte{232, 72, 31}: "Advanced Automotive Antennas", + [3]byte{232, 78, 6}: "EDUP INTERNATIONAL (HK) CO., LTD", + [3]byte{232, 78, 132}: "Samsung Electronics Co.,Ltd", + [3]byte{232, 78, 206}: "Nintendo Co., Ltd.", + [3]byte{232, 81, 110}: "TSMART Inc.", + [3]byte{232, 81, 157}: "Yeonhab Precision Co.,LTD", + [3]byte{232, 84, 132}: "NEO INFORMATION SYSTEMS CO., LTD.", + [3]byte{232, 86, 214}: "NCTech Ltd", + [3]byte{232, 90, 167}: "LLC Emzior", + [3]byte{232, 91, 91}: "LG ELECTRONICS INC", + [3]byte{232, 91, 240}: "Imaging Diagnostics", + [3]byte{232, 93, 107}: "Luminate Wireless", + [3]byte{232, 94, 83}: "Infratec Datentechnik GmbH", + [3]byte{232, 97, 31}: "Dawning Information Industry Co.,Ltd", + [3]byte{232, 97, 126}: "Liteon Technology Corporation", + [3]byte{232, 97, 131}: "Black Diamond Advanced Technology, LLC", + [3]byte{232, 108, 218}: "Supercomputers and Neurocomputers Research Center", + [3]byte{232, 109, 82}: "ARRIS Group, Inc.", + [3]byte{232, 109, 84}: "Digit Mobile Inc", + [3]byte{232, 109, 110}: "Control & Display Systems Ltd t/a CDSRail", + [3]byte{232, 113, 141}: "Elsys Equipamentos Eletronicos Ltda", + [3]byte{232, 117, 127}: "FIRS Technologies(Shenzhen) Co., Ltd", + [3]byte{232, 120, 161}: "BEOVIEW INTERCOM DOO", + [3]byte{232, 122, 243}: "S5 Tech S.r.l.", + [3]byte{232, 128, 46}: "Apple", + [3]byte{232, 128, 216}: "GNTEK Electronics Co.,Ltd.", + [3]byte{232, 135, 163}: "Loxley Public Company Limited", + [3]byte{232, 137, 44}: "ARRIS Group, Inc.", + [3]byte{232, 141, 40}: "Apple", + [3]byte{232, 141, 245}: "ZNYX Networks, Inc.", + [3]byte{232, 142, 96}: "NSD Corporation", + [3]byte{232, 146, 24}: "Arcontia International AB", + [3]byte{232, 146, 164}: "LG Electronics", + [3]byte{232, 148, 76}: "Cogent Healthcare Systems Ltd", + [3]byte{232, 148, 246}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{232, 150, 6}: "testo Instruments (Shenzhen) Co., Ltd.", + [3]byte{232, 153, 90}: "PiiGAB, Processinformation i Goteborg AB", + [3]byte{232, 153, 196}: "HTC Corporation", + [3]byte{232, 154, 143}: "Quanta Computer Inc.", + [3]byte{232, 154, 255}: "Fujian Landi Commercial Equipment Co.,Ltd", + [3]byte{232, 157, 135}: "Toshiba", + [3]byte{232, 163, 100}: "Signal Path International / Peachtree Audio", + [3]byte{232, 164, 193}: "Deep Sea Electronics PLC", + [3]byte{232, 171, 250}: "Shenzhen Reecam Tech.Ltd.", + [3]byte{232, 177, 252}: "Intel Corporate", + [3]byte{232, 180, 174}: "Shenzhen C&D Electronics Co.,Ltd", + [3]byte{232, 183, 72}: "CISCO SYSTEMS, INC.", + [3]byte{232, 186, 112}: "CISCO SYSTEMS, INC.", + [3]byte{232, 187, 61}: "Sino Prime-Tech Limited", + [3]byte{232, 187, 168}: "GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD.", + [3]byte{232, 190, 129}: "SAGEMCOM", + [3]byte{232, 194, 41}: "H-Displays (MSC) Bhd", + [3]byte{232, 195, 32}: "Austco Communication Systems Pty Ltd", + [3]byte{232, 203, 161}: "Nokia Corporation", + [3]byte{232, 204, 24}: "D-Link International", + [3]byte{232, 204, 50}: "Micronet LTD", + [3]byte{232, 205, 45}: "Huawei Technologies Co., Ltd", + [3]byte{232, 206, 6}: "SkyHawke Technologies, LLC.", + [3]byte{232, 208, 250}: "MKS Instruments Deutschland GmbH", + [3]byte{232, 212, 131}: "ULTIMATE Europe Transportation Equipment GmbH", + [3]byte{232, 212, 224}: "Beijing BenyWave Technology Co., Ltd.", + [3]byte{232, 218, 150}: "Zhuhai Tianrui Electrical Power Tech. Co., Ltd.", + [3]byte{232, 218, 170}: "VideoHome Technology Corp.", + [3]byte{232, 222, 39}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{232, 223, 242}: "PRF Co., Ltd.", + [3]byte{232, 224, 143}: "GRAVOTECH MARKING SAS", + [3]byte{232, 224, 183}: "Toshiba", + [3]byte{232, 225, 226}: "Energotest", + [3]byte{232, 229, 214}: "Samsung Electronics Co.,Ltd", + [3]byte{232, 231, 50}: "Alcatel-Lucent", + [3]byte{232, 231, 112}: "Warp9 Tech Design, Inc.", + [3]byte{232, 231, 118}: "Shenzhen Kootion Technology Co., Ltd", + [3]byte{232, 232, 117}: "iS5 Communications Inc.", + [3]byte{232, 234, 106}: "StarTech.com", + [3]byte{232, 234, 218}: "Denkovi Assembly Electroncs LTD", + [3]byte{232, 237, 5}: "ARRIS Group, Inc.", + [3]byte{232, 237, 243}: "Cisco", + [3]byte{232, 239, 137}: "OPMEX Tech.", + [3]byte{232, 241, 176}: "SAGEMCOM SAS", + [3]byte{232, 242, 38}: "MILLSON CUSTOM SOLUTIONS INC.", + [3]byte{232, 249, 40}: "RFTECH SRL", + [3]byte{232, 252, 96}: "ELCOM Innovations Private Limited", + [3]byte{232, 252, 175}: "NETGEAR INC.,", + [3]byte{236, 14, 196}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{236, 14, 214}: "ITECH INSTRUMENTS SAS", + [3]byte{236, 17, 32}: "FloDesign Wind Turbine Corporation", + [3]byte{236, 19, 178}: "Netonix", + [3]byte{236, 20, 246}: "BioControl AS", + [3]byte{236, 23, 47}: "TP-LINK TECHNOLOGIES CO., LTD.", + [3]byte{236, 23, 102}: "Research Centre Module", + [3]byte{236, 26, 89}: "Belkin International Inc.", + [3]byte{236, 29, 127}: "zte corporation", + [3]byte{236, 33, 159}: "VidaBox LLC", + [3]byte{236, 34, 87}: "JiangSu NanJing University Electronic Information Technology Co.,Ltd", + [3]byte{236, 34, 128}: "D-Link International", + [3]byte{236, 35, 61}: "Huawei Technologies Co., Ltd", + [3]byte{236, 35, 104}: "IntelliVoice Co.,Ltd.", + [3]byte{236, 36, 184}: "Texas Instruments", + [3]byte{236, 42, 240}: "Ypsomed AG", + [3]byte{236, 44, 73}: "University of Tokyo", + [3]byte{236, 46, 78}: "HITACHI-LG DATA STORAGE INC", + [3]byte{236, 48, 145}: "CISCO SYSTEMS, INC.", + [3]byte{236, 53, 134}: "Apple", + [3]byte{236, 59, 240}: "NovelSat", + [3]byte{236, 60, 90}: "SHEN ZHEN HENG SHENG HUI DIGITAL TECHNOLOGY CO.,LTD", + [3]byte{236, 62, 9}: "PERFORMANCE DESIGNED PRODUCTS, LLC", + [3]byte{236, 63, 5}: "Institute 706, The Second Academy China Aerospace Science & Industry Corp", + [3]byte{236, 66, 240}: "ADL Embedded Solutions, Inc.", + [3]byte{236, 67, 230}: "AWCER Ltd.", + [3]byte{236, 67, 246}: "ZyXEL Communications Corporation", + [3]byte{236, 68, 118}: "CISCO SYSTEMS, INC.", + [3]byte{236, 70, 68}: "TTK SAS", + [3]byte{236, 70, 112}: "Meinberg Funkuhren GmbH & Co. KG", + [3]byte{236, 71, 60}: "Redwire, LLC", + [3]byte{236, 73, 147}: "Qihan Technology Co., Ltd", + [3]byte{236, 76, 77}: "ZAO NPK RoTeK", + [3]byte{236, 84, 46}: "Shanghai XiMei Electronic Technology Co. Ltd", + [3]byte{236, 85, 249}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{236, 89, 231}: "Microsoft Corporation", + [3]byte{236, 92, 105}: "MITSUBISHI HEAVY INDUSTRIES MECHATRONICS SYSTEMS,LTD.", + [3]byte{236, 98, 100}: "Global411 Internet Services, LLC", + [3]byte{236, 99, 229}: "ePBoard Design LLC", + [3]byte{236, 102, 209}: "B&W Group LTD", + [3]byte{236, 108, 159}: "Chengdu Volans Technology CO.,LTD", + [3]byte{236, 113, 219}: "Shenzhen Baichuan Digital Technology Co., Ltd.", + [3]byte{236, 124, 116}: "Justone Technologies Co., Ltd.", + [3]byte{236, 125, 157}: "MEI", + [3]byte{236, 128, 9}: "NovaSparks", + [3]byte{236, 131, 108}: "RM Tech Co., Ltd.", + [3]byte{236, 133, 47}: "Apple", + [3]byte{236, 136, 143}: "TP-LINK TECHNOLOGIES CO., LTD.", + [3]byte{236, 137, 245}: "Lenovo Mobile Communication Technology Ltd.", + [3]byte{236, 138, 76}: "zte corporation", + [3]byte{236, 142, 173}: "DLX", + [3]byte{236, 146, 51}: "Eddyfi NDT Inc", + [3]byte{236, 147, 39}: "MEMMERT GmbH + Co. KG", + [3]byte{236, 150, 129}: "2276427 Ontario Inc", + [3]byte{236, 152, 108}: "Lufft Mess- und Regeltechnik GmbH", + [3]byte{236, 152, 193}: "Beijing Risbo Network Technology Co.,Ltd", + [3]byte{236, 154, 116}: "Hewlett Packard", + [3]byte{236, 155, 91}: "Nokia Corporation", + [3]byte{236, 158, 205}: "Artesyn Embedded Technologies", + [3]byte{236, 162, 155}: "Kemppi Oy", + [3]byte{236, 168, 107}: "ELITEGROUP COMPUTER SYSTEMS CO., LTD.", + [3]byte{236, 177, 6}: "Acuro Networks, Inc", + [3]byte{236, 181, 65}: "SHINANO E and E Co.Ltd.", + [3]byte{236, 185, 7}: "CloudGenix Inc", + [3]byte{236, 187, 174}: "Digivoice Tecnologia em Eletronica Ltda", + [3]byte{236, 189, 9}: "FUSION Electronics Ltd", + [3]byte{236, 195, 138}: "Accuenergy (CANADA) Inc", + [3]byte{236, 200, 130}: "CISCO SYSTEMS, INC.", + [3]byte{236, 203, 48}: "Huawei Technologies Co., Ltd", + [3]byte{236, 205, 109}: "Allied Telesis, Inc.", + [3]byte{236, 208, 14}: "MiraeRecognition Co., Ltd.", + [3]byte{236, 208, 64}: "GEA Farm Technologies GmbH", + [3]byte{236, 209, 154}: "Zhuhai Liming Industries Co., Ltd", + [3]byte{236, 217, 37}: "RAMI", + [3]byte{236, 217, 80}: "IRT SA", + [3]byte{236, 217, 209}: "Shenzhen TG-NET Botone Technology Co.,Ltd.", + [3]byte{236, 222, 61}: "Lamprey Networks, Inc.", + [3]byte{236, 224, 155}: "Samsung electronics CO., LTD", + [3]byte{236, 225, 169}: "Cisco", + [3]byte{236, 229, 18}: "tado GmbH", + [3]byte{236, 229, 85}: "Hirschmann Automation", + [3]byte{236, 231, 68}: "Omntec mfg. inc", + [3]byte{236, 233, 11}: "SISTEMA SOLUCOES ELETRONICAS LTDA - EASYTECH", + [3]byte{236, 233, 21}: "STI Ltd", + [3]byte{236, 233, 248}: "Guang Zhou TRI-SUN Electronics Technology Co., Ltd", + [3]byte{236, 234, 3}: "DARFON LIGHTING CORP", + [3]byte{236, 240, 14}: "Abocom", + [3]byte{236, 242, 54}: "NEOMONTANA ELECTRONICS", + [3]byte{236, 243, 91}: "Nokia Corporation", + [3]byte{236, 244, 187}: "Dell Inc", + [3]byte{236, 247, 43}: "HD DIGITAL TECH CO., LTD.", + [3]byte{236, 250, 170}: "The IMS Company", + [3]byte{236, 252, 85}: "A. Eberle GmbH & Co. KG", + [3]byte{236, 254, 126}: "BlueRadios, Inc.", + [3]byte{240, 0, 127}: "Janz - Contadores de Energia, SA", + [3]byte{240, 2, 43}: "Chrontel", + [3]byte{240, 2, 72}: "SmarteBuilding", + [3]byte{240, 7, 134}: "Shandong Bittel Electronics Co., Ltd", + [3]byte{240, 8, 241}: "Samsung Electronics Co.,Ltd", + [3]byte{240, 19, 195}: "SHENZHEN FENDA TECHNOLOGY CO., LTD", + [3]byte{240, 21, 160}: "KyungDong One Co., Ltd.", + [3]byte{240, 28, 19}: "LG Electronics", + [3]byte{240, 28, 45}: "Juniper Networks", + [3]byte{240, 31, 175}: "Dell Inc", + [3]byte{240, 33, 157}: "Cal-Comp Electronics & Communications Company Ltd.", + [3]byte{240, 35, 41}: "SHOWA DENKI CO.,LTD.", + [3]byte{240, 36, 5}: "OPUS High Technology Corporation", + [3]byte{240, 36, 8}: "Talaris (Sweden) AB", + [3]byte{240, 37, 114}: "CISCO SYSTEMS, INC.", + [3]byte{240, 37, 183}: "Samsung Electro Mechanics co., LTD.", + [3]byte{240, 38, 76}: "Dr. Sigrist AG", + [3]byte{240, 39, 101}: "Murata Manufactuaring Co.,Ltd.", + [3]byte{240, 41, 41}: "Cisco", + [3]byte{240, 42, 97}: "Waldo Networks, Inc.", + [3]byte{240, 47, 216}: "Bi2-Vision", + [3]byte{240, 50, 26}: "Mita-Teknik A/S", + [3]byte{240, 55, 161}: "Huike Electronics (SHENZHEN) CO., LTD.", + [3]byte{240, 58, 75}: "Bloombase, Inc.", + [3]byte{240, 58, 85}: "Omega Elektronik AS", + [3]byte{240, 61, 41}: "Actility", + [3]byte{240, 63, 248}: "R L Drake", + [3]byte{240, 67, 53}: "DVN(Shanghai)Ltd.", + [3]byte{240, 74, 43}: "PYRAMID Computer GmbH", + [3]byte{240, 75, 106}: "Scientific Production Association Siberian Arsenal, Ltd.", + [3]byte{240, 75, 242}: "JTECH Communications, Inc.", + [3]byte{240, 77, 162}: "Dell Inc.", + [3]byte{240, 79, 124}: "PRIVATE", + [3]byte{240, 88, 73}: "CareView Communications", + [3]byte{240, 90, 9}: "Samsung Electronics Co.,Ltd", + [3]byte{240, 93, 137}: "Dycon Limited", + [3]byte{240, 93, 200}: "Duracell Powermat", + [3]byte{240, 95, 90}: "Getriebebau NORD GmbH and Co. KG", + [3]byte{240, 97, 48}: "Advantage Pharmacy Services, LLC", + [3]byte{240, 98, 13}: "Shenzhen Egreat Tech Corp.,Ltd", + [3]byte{240, 98, 129}: "ProCurve Networking by HP", + [3]byte{240, 101, 221}: "Primax Electronics Ltd.", + [3]byte{240, 104, 83}: "Integrated Corporation", + [3]byte{240, 107, 202}: "Samsung Electronics Co.,Ltd", + [3]byte{240, 114, 140}: "Samsung Electronics Co.,Ltd", + [3]byte{240, 115, 174}: "PEAK-System Technik", + [3]byte{240, 118, 28}: "COMPAL INFORMATION (KUNSHAN) CO., LTD.", + [3]byte{240, 119, 101}: "Sourcefire, Inc", + [3]byte{240, 119, 208}: "Xcellen", + [3]byte{240, 123, 203}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{240, 125, 104}: "D-Link Corporation", + [3]byte{240, 127, 6}: "Cisco", + [3]byte{240, 127, 12}: "Leopold Kostal GmbH &Co. KG", + [3]byte{240, 129, 175}: "IRZ AUTOMATION TECHNOLOGIES LTD", + [3]byte{240, 130, 97}: "SAGEMCOM", + [3]byte{240, 132, 47}: "ADB Broadband Italia", + [3]byte{240, 132, 201}: "zte corporation", + [3]byte{240, 138, 40}: "JIANGSU HENGSION ELECTRONIC S and T CO.,LTD", + [3]byte{240, 139, 254}: "COSTEL.,CO.LTD", + [3]byte{240, 140, 251}: "Fiberhome Telecommunication Tech.Co.,Ltd.", + [3]byte{240, 142, 219}: "VeloCloud Networks", + [3]byte{240, 146, 28}: "Hewlett Packard", + [3]byte{240, 147, 58}: "NxtConect", + [3]byte{240, 147, 197}: "Garland Technology", + [3]byte{240, 156, 187}: "RaonThink Inc.", + [3]byte{240, 156, 233}: "Aerohive Networks Inc", + [3]byte{240, 158, 99}: "Cisco", + [3]byte{240, 162, 37}: "PRIVATE", + [3]byte{240, 167, 100}: "GST Co., Ltd.", + [3]byte{240, 172, 164}: "HBC-radiomatic", + [3]byte{240, 173, 78}: "Globalscale Technologies, Inc.", + [3]byte{240, 174, 81}: "Xi3 Corp", + [3]byte{240, 180, 121}: "Apple", + [3]byte{240, 182, 235}: "Poslab Technology Co., Ltd.", + [3]byte{240, 188, 200}: "MaxID (Pty) Ltd", + [3]byte{240, 189, 241}: "Sipod Inc.", + [3]byte{240, 191, 151}: "Sony Corporation", + [3]byte{240, 193, 241}: "Apple, Inc.", + [3]byte{240, 194, 76}: "Zhejiang FeiYue Digital Technology Co., Ltd", + [3]byte{240, 194, 124}: "Mianyang Netop Telecom Equipment Co.,Ltd.", + [3]byte{240, 200, 140}: "LeddarTech Inc.", + [3]byte{240, 203, 161}: "Apple", + [3]byte{240, 209, 79}: "LINEAR LLC", + [3]byte{240, 209, 169}: "Apple", + [3]byte{240, 211, 167}: "CobaltRay Co., Ltd", + [3]byte{240, 211, 231}: "Sensometrix SA", + [3]byte{240, 215, 103}: "Axema Passagekontroll AB", + [3]byte{240, 218, 124}: "RLH INDUSTRIES,INC.", + [3]byte{240, 219, 48}: "Yottabyte", + [3]byte{240, 219, 248}: "Apple", + [3]byte{240, 220, 226}: "Apple", + [3]byte{240, 222, 113}: "Shanghai EDO Technologies Co.,Ltd.", + [3]byte{240, 222, 185}: "ShangHai Y&Y Electronics Co., Ltd", + [3]byte{240, 222, 241}: "Wistron InfoComm (Kunshan)Co", + [3]byte{240, 229, 195}: "Drägerwerk AG & Co. KG aA", + [3]byte{240, 231, 126}: "Samsung Electronics Co.,Ltd", + [3]byte{240, 235, 208}: "Shanghai Feixun Communication Co.,Ltd.", + [3]byte{240, 236, 57}: "Essec", + [3]byte{240, 237, 30}: "Bilkon Bilgisayar Kontrollu Cih. Im.Ltd.", + [3]byte{240, 238, 187}: "VIPAR GmbH", + [3]byte{240, 240, 2}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{240, 242, 96}: "Mobitec AB", + [3]byte{240, 243, 54}: "TP-LINK TECHNOLOGIES CO.,LTD", + [3]byte{240, 245, 174}: "Adaptrum Inc.", + [3]byte{240, 246, 28}: "Apple", + [3]byte{240, 246, 68}: "Whitesky Science & Technology Co.,Ltd.", + [3]byte{240, 246, 105}: "Motion Analysis Corporation", + [3]byte{240, 247, 85}: "CISCO SYSTEMS, INC.", + [3]byte{240, 247, 179}: "Phorm", + [3]byte{240, 248, 66}: "KEEBOX, Inc.", + [3]byte{240, 249, 247}: "IES GmbH & Co. KG", + [3]byte{240, 253, 160}: "Acurix Networks LP", + [3]byte{240, 254, 107}: "Shanghai High-Flying Electronics Technology Co., Ltd", + [3]byte{244, 3, 33}: "BeNeXt B.V.", + [3]byte{244, 4, 76}: "ValenceTech Limited", + [3]byte{244, 6, 105}: "Intel Corporate", + [3]byte{244, 6, 141}: "devolo AG", + [3]byte{244, 6, 165}: "Hangzhou Bianfeng Networking Technology Co., Ltd.", + [3]byte{244, 9, 216}: "Samsung Electro Mechanics co., LTD.", + [3]byte{244, 11, 147}: "Research In Motion", + [3]byte{244, 14, 17}: "IEEE REGISTRATION AUTHORITY - Please see MAM public listing for more information.", + [3]byte{244, 15, 27}: "Cisco", + [3]byte{244, 15, 155}: "WAVELINK", + [3]byte{244, 21, 253}: "Shanghai Pateo Electronic Equipment Manufacturing Co., Ltd.", + [3]byte{244, 27, 161}: "Apple", + [3]byte{244, 30, 38}: "Simon-Kaloi Engineering", + [3]byte{244, 31, 11}: "YAMABISHI Corporation", + [3]byte{244, 31, 194}: "Cisco", + [3]byte{244, 32, 18}: "Cuciniale GmbH", + [3]byte{244, 40, 51}: "MMPC Inc.", + [3]byte{244, 40, 83}: "Zioncom Electronics (Shenzhen) Ltd.", + [3]byte{244, 40, 150}: "SPECTO PAINEIS ELETRONICOS LTDA", + [3]byte{244, 54, 225}: "Abilis Systems SARL", + [3]byte{244, 55, 183}: "Apple", + [3]byte{244, 56, 20}: "Shanghai Howell Electronic Co.,Ltd", + [3]byte{244, 61, 128}: "FAG Industrial Services GmbH", + [3]byte{244, 62, 97}: "Shenzhen Gongjin Electronics Co., Ltd", + [3]byte{244, 62, 157}: "Benu Networks, Inc.", + [3]byte{244, 66, 39}: "S & S Research Inc.", + [3]byte{244, 68, 80}: "BND Co., Ltd.", + [3]byte{244, 69, 237}: "Portable Innovation Technology Ltd.", + [3]byte{244, 71, 42}: "Nanjing Rousing Sci. and Tech. Industrial Co., Ltd", + [3]byte{244, 72, 72}: "Amscreen Group Ltd", + [3]byte{244, 78, 5}: "Cisco", + [3]byte{244, 78, 253}: "Actions Semiconductor Co.,Ltd.(Cayman Islands)", + [3]byte{244, 80, 235}: "Telechips Inc", + [3]byte{244, 82, 20}: "Mellanox Technologies, Inc.", + [3]byte{244, 84, 51}: "Rockwell Automation", + [3]byte{244, 85, 149}: "HENGBAO Corporation LTD.", + [3]byte{244, 85, 156}: "Huawei Technologies Co., Ltd", + [3]byte{244, 85, 224}: "Niceway CNC Technology Co.,Ltd.Hunan Province", + [3]byte{244, 88, 66}: "Boxx TV Ltd", + [3]byte{244, 95, 105}: "Matsufu Electronics distribution Company", + [3]byte{244, 95, 212}: "Cisco SPVTG", + [3]byte{244, 95, 247}: "DQ Technology Inc.", + [3]byte{244, 96, 13}: "Panoptic Technology, Inc", + [3]byte{244, 99, 73}: "Diffon Corporation", + [3]byte{244, 106, 188}: "Adonit Corp. Ltd.", + [3]byte{244, 109, 4}: "ASUSTek COMPUTER INC.", + [3]byte{244, 109, 226}: "zte corporation", + [3]byte{244, 115, 202}: "Conversion Sound Inc.", + [3]byte{244, 118, 38}: "Viltechmeda UAB", + [3]byte{244, 122, 78}: "Woojeon&Handan", + [3]byte{244, 122, 204}: "SolidFire, Inc.", + [3]byte{244, 123, 94}: "Samsung Eletronics Co., Ltd", + [3]byte{244, 127, 53}: "CISCO SYSTEMS, INC.", + [3]byte{244, 129, 57}: "CANON INC.", + [3]byte{244, 135, 113}: "Infoblox", + [3]byte{244, 142, 9}: "Nokia Corporation", + [3]byte{244, 144, 202}: "Tensorcom", + [3]byte{244, 144, 234}: "Deciso B.V.", + [3]byte{244, 148, 97}: "NexGen Storage", + [3]byte{244, 148, 102}: "CountMax, ltd", + [3]byte{244, 153, 172}: "WEBER Schraubautomaten GmbH", + [3]byte{244, 159, 84}: "Samsung Electronics", + [3]byte{244, 159, 243}: "Huawei Technologies Co., Ltd", + [3]byte{244, 162, 148}: "EAGLE WORLD DEVELOPMENT CO., LIMITED", + [3]byte{244, 165, 42}: "Hawa Technologies Inc", + [3]byte{244, 172, 193}: "CISCO SYSTEMS, INC.", + [3]byte{244, 177, 100}: "Lightning Telecommunications Technology Co. Ltd", + [3]byte{244, 179, 129}: "WindowMaster A/S", + [3]byte{244, 181, 47}: "Juniper networks", + [3]byte{244, 181, 73}: "Yeastar Technology Co., Ltd.", + [3]byte{244, 182, 229}: "TerraSem Co.,Ltd", + [3]byte{244, 183, 42}: "TIME INTERCONNECT LTD", + [3]byte{244, 183, 226}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{244, 184, 94}: "Texas INstruments", + [3]byte{244, 189, 124}: "Chengdu jinshi communication Co., LTD", + [3]byte{244, 196, 71}: "Coagent International Enterprise Limited", + [3]byte{244, 198, 215}: "blackned GmbH", + [3]byte{244, 199, 20}: "Shenzhen Huawei Communication Technologies Co., Ltd", + [3]byte{244, 199, 149}: "WEY Elektronik AG", + [3]byte{244, 202, 229}: "FREEBOX SA", + [3]byte{244, 205, 144}: "Vispiron Rotec GmbH", + [3]byte{244, 206, 70}: "Hewlett-Packard Company", + [3]byte{244, 207, 226}: "Cisco", + [3]byte{244, 208, 50}: "Yunnan Ideal Information&Technology.,Ltd", + [3]byte{244, 210, 97}: "SEMOCON Co., Ltd", + [3]byte{244, 217, 251}: "Samsung Electronics CO., LTD", + [3]byte{244, 220, 77}: "Beijing CCD Digital Technology Co., Ltd", + [3]byte{244, 220, 218}: "Zhuhai Jiahe Communication Technology Co., limited", + [3]byte{244, 220, 249}: "Huawei Technologies Co., Ltd", + [3]byte{244, 221, 158}: "GoPro", + [3]byte{244, 225, 66}: "Delta Elektronika BV", + [3]byte{244, 230, 215}: "Solar Power Technologies, Inc.", + [3]byte{244, 234, 103}: "CISCO SYSTEMS, INC.", + [3]byte{244, 236, 56}: "TP-LINK TECHNOLOGIES CO., LTD.", + [3]byte{244, 238, 20}: "SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD.", + [3]byte{244, 241, 90}: "Apple", + [3]byte{244, 241, 225}: "Motorola Mobility LLC", + [3]byte{244, 242, 109}: "TP-LINK TECHNOLOGIES CO.,LTD.", + [3]byte{244, 245, 165}: "Nokia corporation", + [3]byte{244, 245, 232}: "Google", + [3]byte{244, 246, 70}: "Dediprog Technology Co. Ltd.", + [3]byte{244, 249, 81}: "Apple", + [3]byte{244, 252, 50}: "Texas Instruments", + [3]byte{244, 253, 43}: "ZOYI Company", + [3]byte{248, 1, 19}: "Huawei Technologies Co., Ltd", + [3]byte{248, 3, 50}: "Khomp", + [3]byte{248, 5, 28}: "DRS Imaging and Targeting Solutions", + [3]byte{248, 11, 190}: "ARRIS Group, Inc.", + [3]byte{248, 11, 208}: "Datang Telecom communication terminal (Tianjin) Co., Ltd.", + [3]byte{248, 12, 243}: "LG Electronics", + [3]byte{248, 13, 67}: "Hon Hai Precision Ind. Co., Ltd.", + [3]byte{248, 13, 234}: "ZyCast Technology Inc.", + [3]byte{248, 15, 65}: "Wistron InfoComm(ZhongShan) Corporation", + [3]byte{248, 15, 132}: "Natural Security SAS", + [3]byte{248, 16, 55}: "Atopia Systems, LP", + [3]byte{248, 21, 71}: "Avaya, Inc", + [3]byte{248, 22, 84}: "Intel Corporate", + [3]byte{248, 26, 103}: "TP-LINK TECHNOLOGIES CO., LTD.", + [3]byte{248, 28, 229}: "Telefonbau Behnke GmbH", + [3]byte{248, 29, 147}: "Longdhua(Beijing) Controls Technology Co.,Ltd", + [3]byte{248, 30, 223}: "Apple", + [3]byte{248, 34, 133}: "Cypress Technology CO., LTD.", + [3]byte{248, 36, 65}: "Yeelink", + [3]byte{248, 39, 147}: "Apple, Inc", + [3]byte{248, 43, 200}: "Jiangsu Switter Co., Ltd", + [3]byte{248, 46, 219}: "RTW GmbH & Co. KG", + [3]byte{248, 47, 91}: "eGauge Systems LLC", + [3]byte{248, 47, 168}: "Hon Hai Precision Ind. Co.,Ltd.", + [3]byte{248, 48, 148}: "Alcatel-Lucent Telecom Limited", + [3]byte{248, 49, 62}: "endeavour GmbH", + [3]byte{248, 51, 118}: "Good Mind Innovation Co., Ltd.", + [3]byte{248, 53, 83}: "Magenta Research Ltd.", + [3]byte{248, 53, 221}: "Gemtek Technology Co., Ltd.", + [3]byte{248, 61, 78}: "Softlink Automation System Co., Ltd", + [3]byte{248, 61, 255}: "Huawei Technologies Co., Ltd", + [3]byte{248, 66, 251}: "Yasuda Joho Co.,ltd.", + [3]byte{248, 67, 96}: "INGENICO", + [3]byte{248, 69, 173}: "Konka Group Co., Ltd.", + [3]byte{248, 70, 45}: "SYNTEC Incorporation", + [3]byte{248, 71, 45}: "X2gen Digital Corp. Ltd", + [3]byte{248, 72, 151}: "Hitachi, Ltd.", + [3]byte{248, 74, 115}: "EUMTECH CO., LTD", + [3]byte{248, 74, 127}: "Innometriks Inc", + [3]byte{248, 74, 191}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{248, 79, 87}: "Cisco", + [3]byte{248, 80, 99}: "Verathon", + [3]byte{248, 81, 109}: "Denwa Technology Corp.", + [3]byte{248, 82, 223}: "VNL Europe AB", + [3]byte{248, 84, 175}: "ECI Telecom Ltd.", + [3]byte{248, 87, 46}: "Core Brands, LLC", + [3]byte{248, 91, 201}: "M-Cube Spa", + [3]byte{248, 92, 69}: "IC Nexus Co. Ltd.", + [3]byte{248, 95, 42}: "Nokia Corporation", + [3]byte{248, 98, 170}: "xn systems", + [3]byte{248, 102, 1}: "Suzhou Chi-tek information technology Co., Ltd", + [3]byte{248, 102, 209}: "Hon Hai Precision Ind. Co., Ltd.", + [3]byte{248, 102, 242}: "CISCO SYSTEMS, INC.", + [3]byte{248, 105, 113}: "Seibu Electric Co.,", + [3]byte{248, 110, 207}: "Arcx Inc", + [3]byte{248, 113, 254}: "The Goldman Sachs Group, Inc.", + [3]byte{248, 114, 234}: "Cisco", + [3]byte{248, 115, 148}: "NETGEAR INC.,", + [3]byte{248, 118, 155}: "Neopis Co., Ltd.", + [3]byte{248, 123, 98}: "FASTWEL INTERNATIONAL CO., LTD. Taiwan Branch", + [3]byte{248, 123, 122}: "ARRIS Group, Inc.", + [3]byte{248, 123, 140}: "Amped Wireless", + [3]byte{248, 129, 26}: "OVERKIZ", + [3]byte{248, 132, 121}: "Yaojin Technology(Shenzhen)Co.,Ltd", + [3]byte{248, 132, 242}: "Samsung Electronics Co.,Ltd", + [3]byte{248, 140, 28}: "KAISHUN ELECTRONIC TECHNOLOGY CO., LTD. BEIJING", + [3]byte{248, 141, 239}: "Tenebraex", + [3]byte{248, 142, 133}: "COMTREND CORPORATION", + [3]byte{248, 143, 202}: "Google Fiber, Inc", + [3]byte{248, 145, 42}: "GLP German Light Products GmbH", + [3]byte{248, 147, 243}: "VOLANS", + [3]byte{248, 149, 80}: "Proton Products Chengdu Ltd", + [3]byte{248, 151, 207}: "DAESHIN-INFORMATION TECHNOLOGY CO., LTD.", + [3]byte{248, 153, 85}: "Fortress Technology Inc", + [3]byte{248, 157, 13}: "Control Technology Inc.", + [3]byte{248, 159, 184}: "YAZAKI Energy System Corporation", + [3]byte{248, 160, 61}: "Dinstar Technologies Co., Ltd.", + [3]byte{248, 162, 180}: "RHEWA-WAAGENFABRIK August Freudewald GmbH &Co. KG", + [3]byte{248, 164, 95}: "Beijing Xiaomi communications co.,ltd", + [3]byte{248, 169, 99}: "COMPAL INFORMATION (KUNSHAN) CO., LTD.", + [3]byte{248, 169, 208}: "LG Electronics", + [3]byte{248, 169, 222}: "PUISSANCE PLUS", + [3]byte{248, 170, 138}: "Axview Technology (Shenzhen) Co.,Ltd", + [3]byte{248, 172, 109}: "Deltenna Ltd", + [3]byte{248, 177, 86}: "Dell Inc", + [3]byte{248, 178, 243}: "GUANGZHOU BOSMA TECHNOLOGY CO.,LTD", + [3]byte{248, 181, 153}: "Guangzhou CHNAVS Digital Technology Co.,Ltd", + [3]byte{248, 188, 18}: "Dell Inc", + [3]byte{248, 188, 65}: "Rosslare Enterprises Limited", + [3]byte{248, 192, 1}: "Juniper Networks", + [3]byte{248, 192, 145}: "Highgates Technology", + [3]byte{248, 194, 136}: "Cisco", + [3]byte{248, 198, 120}: "Carefusion", + [3]byte{248, 208, 172}: "Sony Computer Entertainment Inc.", + [3]byte{248, 208, 189}: "Samsung Electronics Co.,Ltd", + [3]byte{248, 209, 17}: "TP-LINK TECHNOLOGIES CO., LTD.", + [3]byte{248, 211, 169}: "AXAN Networks", + [3]byte{248, 212, 98}: "Pumatronix Equipamentos Eletronicos Ltda.", + [3]byte{248, 215, 86}: "Simm Tronic Limited", + [3]byte{248, 215, 191}: "REV Ritter GmbH", + [3]byte{248, 218, 223}: "EcoTech, Inc.", + [3]byte{248, 218, 226}: "Beta LaserMike", + [3]byte{248, 218, 244}: "Taishan Online Technology Co., Ltd.", + [3]byte{248, 219, 76}: "PNY Technologies, INC.", + [3]byte{248, 219, 127}: "HTC Corporation", + [3]byte{248, 219, 136}: "Dell Inc", + [3]byte{248, 220, 122}: "Variscite LTD", + [3]byte{248, 223, 168}: "ZTE Corporation", + [3]byte{248, 224, 121}: "Motorola Mobility LLC", + [3]byte{248, 228, 251}: "Actiontec Electronics, Inc", + [3]byte{248, 231, 181}: "µTech Tecnologia LTDA", + [3]byte{248, 232, 17}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{248, 233, 3}: "D-Link International", + [3]byte{248, 233, 104}: "Egker Kft.", + [3]byte{248, 234, 10}: "Dipl.-Math. Michael Rauch", + [3]byte{248, 237, 165}: "ARRIS Group, Inc.", + [3]byte{248, 240, 5}: "Newport Media Inc.", + [3]byte{248, 240, 20}: "RackWare Inc.", + [3]byte{248, 240, 130}: "Orion Networks International, Inc", + [3]byte{248, 241, 182}: "Motorola Mobility LLC", + [3]byte{248, 242, 90}: "G-Lab GmbH", + [3]byte{248, 247, 211}: "International Communications Corporation", + [3]byte{248, 247, 255}: "SYN-TECH SYSTEMS INC", + [3]byte{248, 251, 47}: "Santur Corporation", + [3]byte{248, 254, 92}: "Reciprocal Labs Corp", + [3]byte{248, 254, 168}: "Technico Japan Corporation", + [3]byte{248, 255, 95}: "Shenzhen Communication Technology Co.,Ltd", + [3]byte{252, 0, 18}: "Toshiba Samsung Storage Technolgoy Korea Corporation", + [3]byte{252, 1, 158}: "VIEVU", + [3]byte{252, 1, 205}: "FUNDACION TEKNIKER", + [3]byte{252, 6, 71}: "Cortland Research, LLC", + [3]byte{252, 7, 160}: "LRE Medical GmbH", + [3]byte{252, 8, 119}: "Prentke Romich Company", + [3]byte{252, 9, 216}: "ACTEON Group", + [3]byte{252, 9, 246}: "GUANGDONG TONZE ELECTRIC CO.,LTD", + [3]byte{252, 10, 129}: "Motorola Solutions Inc.", + [3]byte{252, 15, 230}: "Sony Computer Entertainment Inc.", + [3]byte{252, 16, 189}: "Control Sistematizado S.A.", + [3]byte{252, 17, 134}: "Logic3 plc", + [3]byte{252, 19, 73}: "Global Apps Corp.", + [3]byte{252, 21, 180}: "Hewlett Packard", + [3]byte{252, 22, 7}: "Taian Technology(Wuxi) Co.,Ltd.", + [3]byte{252, 23, 148}: "InterCreative Co., Ltd", + [3]byte{252, 25, 16}: "Samsung Electronics Co.,Ltd", + [3]byte{252, 25, 208}: "Cloud Vision Networks Technology Co.,Ltd.", + [3]byte{252, 27, 255}: "V-ZUG AG", + [3]byte{252, 29, 89}: "I Smart Cities HK Ltd", + [3]byte{252, 29, 132}: "Autobase", + [3]byte{252, 30, 22}: "IPEVO corp", + [3]byte{252, 31, 25}: "SAMSUNG ELECTRO-MECHANICS CO., LTD.", + [3]byte{252, 31, 192}: "EURECAM", + [3]byte{252, 34, 156}: "Han Kyung I Net Co.,Ltd.", + [3]byte{252, 35, 37}: "EosTek (Shenzhen) Co., Ltd.", + [3]byte{252, 37, 63}: "Apple", + [3]byte{252, 39, 162}: "TRANS ELECTRIC CO., LTD.", + [3]byte{252, 42, 84}: "Connected Data, Inc.", + [3]byte{252, 46, 45}: "Lorom Industrial Co.LTD.", + [3]byte{252, 47, 64}: "Calxeda, Inc.", + [3]byte{252, 53, 152}: "Favite Inc.", + [3]byte{252, 53, 230}: "Visteon corp", + [3]byte{252, 63, 171}: "Henan Lanxin Technology Co., Ltd", + [3]byte{252, 68, 99}: "Universal Audio, Inc", + [3]byte{252, 68, 153}: "Swarco LEA d.o.o.", + [3]byte{252, 69, 95}: "JIANGXI SHANSHUI OPTOELECTRONIC TECHNOLOGY CO.,LTD", + [3]byte{252, 72, 239}: "HUAWEI TECHNOLOGIES CO.,LTD", + [3]byte{252, 74, 233}: "Castlenet Technology Inc.", + [3]byte{252, 75, 28}: "INTERSENSOR S.R.L.", + [3]byte{252, 75, 188}: "Sunplus Technology Co., Ltd.", + [3]byte{252, 77, 212}: "Universal Global Scientific Industrial Co., Ltd.", + [3]byte{252, 80, 144}: "SIMEX Sp. z o.o.", + [3]byte{252, 82, 206}: "Control iD", + [3]byte{252, 88, 250}: "Shen Zhen Shi Xin Zhong Xin Technology Co.,Ltd.", + [3]byte{252, 91, 36}: "Weibel Scientific A/S", + [3]byte{252, 91, 38}: "MikroBits", + [3]byte{252, 91, 57}: "Cisco", + [3]byte{252, 96, 24}: "Zhejiang Kangtai Electric Co., Ltd.", + [3]byte{252, 97, 152}: "NEC Personal Products, Ltd", + [3]byte{252, 98, 110}: "Beijing MDC Telecom", + [3]byte{252, 98, 185}: "ALPS ERECTRIC CO.,LTD", + [3]byte{252, 104, 62}: "Directed Perception, Inc", + [3]byte{252, 108, 49}: "LXinstruments GmbH", + [3]byte{252, 109, 192}: "BME CORPORATION", + [3]byte{252, 117, 22}: "D-Link International", + [3]byte{252, 117, 230}: "Handreamnet", + [3]byte{252, 121, 11}: "Hitachi High Technologies America, Inc.", + [3]byte{252, 124, 231}: "FCI USA LLC", + [3]byte{252, 131, 41}: "Trei technics", + [3]byte{252, 131, 153}: "Avaya, Inc", + [3]byte{252, 139, 151}: "Shenzhen Gongjin Electronics Co.,Ltd", + [3]byte{252, 142, 126}: "Pace plc", + [3]byte{252, 143, 196}: "Intelligent Technology Inc.", + [3]byte{252, 146, 59}: "Nokia Corporation", + [3]byte{252, 148, 108}: "UBIVELOX", + [3]byte{252, 148, 227}: "Technicolor USA Inc.", + [3]byte{252, 153, 71}: "Cisco", + [3]byte{252, 159, 174}: "Fidus Systems Inc", + [3]byte{252, 159, 225}: "CONWIN.Tech. Ltd", + [3]byte{252, 161, 62}: "Samsung Electronics", + [3]byte{252, 168, 65}: "Avaya, Inc", + [3]byte{252, 169, 176}: "MIARTECH (SHANGHAI),INC.", + [3]byte{252, 170, 20}: "GIGA-BYTE TECHNOLOGY CO.,LTD.", + [3]byte{252, 173, 15}: "QTS NETWORKS", + [3]byte{252, 175, 106}: "Conemtech AB", + [3]byte{252, 176, 196}: "Shanghai DareGlobal Technologies Co., Ltd", + [3]byte{252, 187, 161}: "Shenzhen Minicreate Technology Co.,Ltd", + [3]byte{252, 194, 61}: "Atmel Corporation", + [3]byte{252, 194, 222}: "Murata Manufacturing Co., Ltd.", + [3]byte{252, 199, 52}: "Samsung Electronics Co.,Ltd", + [3]byte{252, 200, 151}: "ZTE Corporation", + [3]byte{252, 204, 228}: "Ascon Ltd.", + [3]byte{252, 207, 98}: "IBM Corp", + [3]byte{252, 212, 242}: "The Coca Cola Company", + [3]byte{252, 212, 246}: "Messana Air.Ray Conditioning s.r.l.", + [3]byte{252, 213, 217}: "Shenzhen SDMC Technology Co., Ltd.", + [3]byte{252, 214, 189}: "Robert Bosch GmbH", + [3]byte{252, 216, 23}: "Beijing Hesun Technologies Co.Ltd.", + [3]byte{252, 219, 150}: "ENERVALLEY CO., LTD", + [3]byte{252, 219, 179}: "Murata Manufacturing Co., Ltd.", + [3]byte{252, 221, 85}: "Shenzhen WeWins wireless Co.,Ltd", + [3]byte{252, 225, 134}: "A3M Co., LTD", + [3]byte{252, 225, 146}: "Sichuan Jinwangtong Electronic Science&Technology Co,.Ltd", + [3]byte{252, 225, 217}: "Stable Imaging Solutions LLC", + [3]byte{252, 226, 63}: "CLAY PAKY SPA", + [3]byte{252, 229, 87}: "Nokia Corporation", + [3]byte{252, 232, 146}: "Hangzhou Lancable Technology Co.,Ltd", + [3]byte{252, 237, 185}: "Arrayent", + [3]byte{252, 241, 82}: "Sony Corporation", + [3]byte{252, 241, 205}: "OPTEX-FA CO.,LTD.", + [3]byte{252, 245, 40}: "ZyXEL Communications Corporation", + [3]byte{252, 246, 71}: "Fiberhome Telecommunication Tech.Co.,Ltd.", + [3]byte{252, 248, 174}: "Intel Corporate", + [3]byte{252, 248, 183}: "TRONTEQ Electronic", + [3]byte{252, 250, 247}: "Shanghai Baud Data Communication Co.,Ltd.", + [3]byte{252, 251, 251}: "CISCO SYSTEMS, INC.", + [3]byte{252, 254, 119}: "Hitachi Reftechno, Inc.", + [3]byte{252, 255, 170}: "IEEE REGISTRATION AUTHORITY - Please see MAL public listing for more information.", +} diff --git a/vendor/github.com/vtolstov/gopacket/pcap/doc.go b/vendor/github.com/vtolstov/gopacket/pcap/doc.go new file mode 100644 index 0000000..4838f37 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/pcap/doc.go @@ -0,0 +1,100 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +/* +Package pcap allows users of gopacket to read packets off the wire or from +pcap files. + +This package is meant to be used with its parent, +http://github.com/vtolstov/gopacket, although it can also be used independently +if you just want to get packet data from the wire. + +Reading PCAP Files + +The following code can be used to read in data from a pcap file. + + if handle, err := pcap.OpenOffline("/path/to/my/file"); err != nil { + panic(err) + } else { + packetSource := gopacket.NewPacketSource(handle, handle.LinkType()) + for packet := range packetSource.Packets() { + handlePacket(packet) // Do something with a packet here. + } + } + +Reading Live Packets + +The following code can be used to read in data from a live device, in this case +"eth0". + + if handle, err := pcap.OpenLive("eth0", 1600, true, pcap.BlockForever); err != nil { + panic(err) + } else if err := handle.SetBPFFilter("tcp and port 80"); err != nil { // optional + panic(err) + } else { + packetSource := gopacket.NewPacketSource(handle, handle.LinkType()) + for packet := range packetSource.Packets() { + handlePacket(packet) // Do something with a packet here. + } + } + +Inactive Handles + +Newer PCAP functionality requires the concept of an 'inactive' PCAP handle. +Instead of constantly adding new arguments to pcap_open_live, users now call +pcap_create to create a handle, set it up with a bunch of optional function +calls, then call pcap_activate to activate it. This library mirrors that +mechanism, for those that want to expose/use these new features: + + inactive, err := pcap.NewInactiveHandle(deviceName) + if err != nil { + log.Fatal(err) + } + defer inactive.CleanUp() + + // Call various functions on inactive to set it up the way you'd like: + if err = inactive.SetTimeout(time.Minute); err != nil { + log.Fatal(err) + } else if err = inactive.SetTimestampSource("foo"); err != nil { + log.Fatal(err) + } + + // Finally, create the actual handle by calling Activate: + handle, err := inactive.Activate() // after this, inactive is no longer valid + if err != nil { + log.Fatal(err) + } + defer handle.Close() + + // Now use your handle as you see fit. + +PCAP Timeouts + +pcap.OpenLive and pcap.SetTimeout both take timeouts. +If you don't care about timeouts, just pass in BlockForever, +which should do what you expect with minimal fuss. + +A timeout of 0 is not recommended. Some platforms, like Macs +(http://www.manpages.info/macosx/pcap.3.html) say: + The read timeout is used to arrange that the read not necessarily return + immediately when a packet is seen, but that it wait for some amount of time + to allow more packets to arrive and to read multiple packets from the OS + kernel in one operation. +This means that if you only capture one packet, the kernel might decide to wait +'timeout' for more packets to batch with it before returning. A timeout of +0, then, means 'wait forever for more packets', which is... not good. + +To get around this, we've introduced the following behavior: if a negative +timeout is passed in, we set the positive timeout in the handle, then loop +internally in ReadPacketData/ZeroCopyReadPacketData when we see timeout +errors. + +PCAP File Writing + +This package does not implement PCAP file writing. However, gopacket/pcapgo +does! Look there if you'd like to write PCAP files. +*/ +package pcap diff --git a/vendor/github.com/vtolstov/gopacket/pcap/gopacket_benchmark/benchmark.go b/vendor/github.com/vtolstov/gopacket/pcap/gopacket_benchmark/benchmark.go new file mode 100644 index 0000000..575ebe0 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/pcap/gopacket_benchmark/benchmark.go @@ -0,0 +1,247 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +// This benchmark reads in file /gopacket_benchmark.pcap and measures +// the time it takes to decode all packets from that file. If the file doesn't +// exist, it's pulled down from a publicly available location. However, you can +// feel free to substitute your own file at that location, in which case the +// benchmark will run on your own data. +// +// It's also useful for figuring out which packets may be causing errors. Pass +// in the --printErrors flag, and it'll print out error layers for each packet +// that has them. This includes any packets that it's just unable to decode, +// which is a great way to find new protocols to decode, and get test packets to +// write tests for them. +package main + +import ( + "compress/gzip" + "encoding/hex" + "flag" + "fmt" + "github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket/layers" + "github.com/vtolstov/gopacket/pcap" + "github.com/vtolstov/gopacket/tcpassembly" + "io" + "io/ioutil" + "net/http" + "os" + "runtime" + "runtime/pprof" + "time" +) + +var decodeLazy *bool = flag.Bool("lazy", false, "If true, use lazy decoding") +var decodeNoCopy *bool = flag.Bool("nocopy", true, "If true, avoid an extra copy when decoding packets") +var printErrors *bool = flag.Bool("printErrors", false, "If true, check for and print error layers.") +var printLayers *bool = flag.Bool("printLayers", false, "If true, print out the layers of each packet") +var repeat *int = flag.Int("repeat", 5, "Read over the file N times") +var cpuProfile *string = flag.String("cpuprofile", "", "If set, write CPU profile to filename") +var url *string = flag.String("url", "http://www.ll.mit.edu/mission/communications/cyber/CSTcorpora/ideval/data/1999/training/week1/tuesday/inside.tcpdump.gz", "URL to gzip'd pcap file") + +type BufferPacketSource struct { + index int + data [][]byte + ci []gopacket.CaptureInfo +} + +func NewBufferPacketSource(p gopacket.PacketDataSource) *BufferPacketSource { + start := time.Now() + b := &BufferPacketSource{} + for { + data, ci, err := p.ReadPacketData() + if err == io.EOF { + break + } + b.data = append(b.data, data) + b.ci = append(b.ci, ci) + } + duration := time.Since(start) + fmt.Printf("Reading packet data into memory: %d packets in %v, %v per packet\n", len(b.data), duration, duration/time.Duration(len(b.data))) + return b +} + +func (b *BufferPacketSource) ReadPacketData() (data []byte, ci gopacket.CaptureInfo, err error) { + if b.index >= len(b.data) { + err = io.EOF + return + } + data = b.data[b.index] + ci = b.ci[b.index] + b.index++ + return +} + +func (b *BufferPacketSource) Reset() { + runtime.GC() + b.index = 0 +} + +func main() { + flag.Parse() + filename := os.TempDir() + string(os.PathSeparator) + "gopacket_benchmark.pcap" + if _, err := os.Stat(filename); err != nil { + // This URL points to a publicly available packet data set from a DARPA + // intrusion detection evaluation. See + // http://www.ll.mit.edu/mission/communications/cyber/CSTcorpora/ideval/data/1999/training/week1/index.html + // for more details. + fmt.Println("Local pcap file", filename, "doesn't exist, reading from", *url) + if resp, err := http.Get(*url); err != nil { + panic(err) + } else if out, err := os.Create(filename); err != nil { + panic(err) + } else if gz, err := gzip.NewReader(resp.Body); err != nil { + panic(err) + } else if n, err := io.Copy(out, gz); err != nil { + panic(err) + } else if err := gz.Close(); err != nil { + panic(err) + } else if err := out.Close(); err != nil { + panic(err) + } else { + fmt.Println("Successfully read", n, "bytes from url, unzipped to local storage") + } + } + fmt.Println("Reading file once through to hopefully cache most of it") + if f, err := os.Open(filename); err != nil { + panic(err) + } else if n, err := io.Copy(ioutil.Discard, f); err != nil { + panic(err) + } else if err := f.Close(); err != nil { + panic(err) + } else { + fmt.Println("Read in file", filename, ", total of", n, "bytes") + } + if *cpuProfile != "" { + if cpu, err := os.Create(*cpuProfile); err != nil { + panic(err) + } else if err := pprof.StartCPUProfile(cpu); err != nil { + panic(err) + } else { + defer func() { + pprof.StopCPUProfile() + cpu.Close() + }() + } + } + var packetDataSource *BufferPacketSource + var packetSource *gopacket.PacketSource + fmt.Printf("Opening file %q for read\n", filename) + if h, err := pcap.OpenOffline(filename); err != nil { + panic(err) + } else { + fmt.Println("Reading all packets into memory with BufferPacketSource.") + start := time.Now() + packetDataSource = NewBufferPacketSource(h) + duration := time.Since(start) + fmt.Printf("Time to read packet data into memory from file: %v\n", duration) + packetSource = gopacket.NewPacketSource(packetDataSource, h.LinkType()) + packetSource.DecodeOptions.Lazy = *decodeLazy + packetSource.DecodeOptions.NoCopy = *decodeNoCopy + } + fmt.Println() + for i := 0; i < *repeat; i++ { + packetDataSource.Reset() + fmt.Printf("Benchmarking decode %d/%d\n", i+1, *repeat) + benchmarkPacketDecode(packetSource) + } + fmt.Println() + for i := 0; i < *repeat; i++ { + packetDataSource.Reset() + fmt.Printf("Benchmarking decoding layer parser %d/%d\n", i+1, *repeat) + benchmarkLayerDecode(packetDataSource, false) + } + fmt.Println() + for i := 0; i < *repeat; i++ { + packetDataSource.Reset() + fmt.Printf("Benchmarking decoding layer parser with assembly %d/%d\n", i+1, *repeat) + benchmarkLayerDecode(packetDataSource, true) + } +} + +func benchmarkPacketDecode(packetSource *gopacket.PacketSource) { + count, errors := 0, 0 + start := time.Now() + for packet, err := packetSource.NextPacket(); err != io.EOF; packet, err = packetSource.NextPacket() { + if err != nil { + fmt.Println("Error reading in packet:", err) + continue + } + count++ + var hasError bool + if *printErrors && packet.ErrorLayer() != nil { + fmt.Println("\n\n\nError decoding packet:", packet.ErrorLayer().Error()) + fmt.Println(hex.Dump(packet.Data())) + fmt.Printf("%#v\n", packet.Data()) + errors++ + hasError = true + } + if *printLayers || hasError { + fmt.Printf("\n=== PACKET %d ===\n", count) + for _, l := range packet.Layers() { + fmt.Printf("--- LAYER %v ---\n%#v\n\n", l.LayerType(), l) + } + fmt.Println() + } + } + duration := time.Since(start) + fmt.Printf("\tRead in %v packets in %v, %v per packet\n", count, duration, duration/time.Duration(count)) + if *printErrors { + fmt.Printf("%v errors, successfully decoded %.02f%%\n", errors, float64(count-errors)*100.0/float64(count)) + } +} + +type streamFactory struct { +} + +func (s *streamFactory) New(netFlow, tcpFlow gopacket.Flow) tcpassembly.Stream { + return s +} +func (s *streamFactory) Reassembled([]tcpassembly.Reassembly) { +} +func (s *streamFactory) ReassemblyComplete() { +} + +func benchmarkLayerDecode(source *BufferPacketSource, assemble bool) { + var tcp layers.TCP + var ip layers.IPv4 + var eth layers.Ethernet + var udp layers.UDP + var icmp layers.ICMPv4 + var payload gopacket.Payload + parser := gopacket.NewDecodingLayerParser( + layers.LayerTypeEthernet, + ð, &ip, &icmp, &tcp, &udp, &payload) + pool := tcpassembly.NewStreamPool(&streamFactory{}) + assembler := tcpassembly.NewAssembler(pool) + var decoded []gopacket.LayerType + start := time.Now() + packets, decodedlayers, assembled := 0, 0, 0 + for { + packets++ + data, ci, err := source.ReadPacketData() + if err == io.EOF { + break + } else if err != nil { + fmt.Println("Error reading packet: ", err) + continue + } + err = parser.DecodeLayers(data, &decoded) + for _, typ := range decoded { + decodedlayers++ + if typ == layers.LayerTypeTCP && assemble { + assembled++ + assembler.AssembleWithTimestamp(ip.NetworkFlow(), &tcp, ci.Timestamp) + } + } + } + if assemble { + assembler.FlushAll() + } + duration := time.Since(start) + fmt.Printf("\tRead in %d packets in %v, decoded %v layers, assembled %v packets: %v per packet\n", packets, duration, decodedlayers, assembled, duration/time.Duration(packets)) +} diff --git a/vendor/github.com/vtolstov/gopacket/pcap/pcap.go b/vendor/github.com/vtolstov/gopacket/pcap/pcap.go new file mode 100644 index 0000000..f7b0a30 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/pcap/pcap.go @@ -0,0 +1,776 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// Copyright 2009-2011 Andreas Krennmair. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +package pcap + +/* +#cgo linux LDFLAGS: -lpcap +#cgo freebsd LDFLAGS: -lpcap +#cgo openbsd LDFLAGS: -lpcap +#cgo darwin LDFLAGS: -lpcap +#cgo windows CFLAGS: -I C:/WpdPack/Include +#cgo windows,386 LDFLAGS: -L C:/WpdPack/Lib -lwpcap +#cgo windows,amd64 LDFLAGS: -L C:/WpdPack/Lib/x64 -lwpcap +#include +#include + +// Some old versions of pcap don't define this constant. +#ifndef PCAP_NETMASK_UNKNOWN +#define PCAP_NETMASK_UNKNOWN 0xffffffff +#endif + +// libpcap doesn't actually export its version in a #define-guardable way, +// so we have to use other defined things to differentiate versions. +// We assume at least libpcap v1.1 at the moment. +// See http://upstream-tracker.org/versions/libpcap.html + +#ifndef PCAP_ERROR_TSTAMP_PRECISION_NOTSUP // < v1.5 + +int pcap_set_immediate_mode(pcap_t *p, int mode) { + return PCAP_ERROR; +} + +#ifndef PCAP_TSTAMP_HOST // < v1.2 + +int pcap_set_tstamp_type(pcap_t* p, int t) { return -1; } +int pcap_list_tstamp_types(pcap_t* p, int** t) { return 0; } +void pcap_free_tstamp_types(int *tstamp_types) {} +const char* pcap_tstamp_type_val_to_name(int t) { + return "pcap timestamp types not supported"; +} +int pcap_tstamp_type_name_to_val(const char* t) { + return PCAP_ERROR; +} + +#endif // < v1.2 +#endif // < v1.5 + +#ifndef PCAP_ERROR_PROMISC_PERM_DENIED +#define PCAP_ERROR_PROMISC_PERM_DENIED -11 +#endif + +// WinPcap doesn't export a pcap_statustostr, so use the less-specific +// pcap_strerror. Note that linking against something like cygwin libpcap +// may result is less-specific error messages. +#ifdef WIN32 +#define pcap_statustostr pcap_strerror + +// WinPcap also doesn't export pcap_can_set_rfmon and pcap_set_rfmon, +// as those are handled by separate libraries (airpcap). +// https://www.winpcap.org/docs/docs_412/html/group__wpcapfunc.html +// Stub out those functions here, returning values that indicate rfmon +// setting is unavailable/unsuccessful. +int pcap_can_set_rfmon(pcap_t *p) { + return 0; +} + +int pcap_set_rfmon(pcap_t *p, int rfmon) { + return PCAP_ERROR; +} +#endif + +// Windows, Macs, and Linux all use different time types. Joy. +#ifdef WIN32 +#define gopacket_time_secs_t long +#define gopacket_time_usecs_t long +#elif __APPLE__ +#define gopacket_time_secs_t __darwin_time_t +#define gopacket_time_usecs_t __darwin_suseconds_t +#elif __GLIBC__ +#define gopacket_time_secs_t __time_t +#define gopacket_time_usecs_t __suseconds_t +#else +#define gopacket_time_secs_t time_t +#define gopacket_time_usecs_t suseconds_t +#endif +*/ +import "C" + +import ( + "errors" + "fmt" + "io" + "net" + "reflect" + "runtime" + "strconv" + "sync" + "syscall" + "time" + "unsafe" + + "github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket/layers" +) + +const errorBufferSize = 256 + +// Handle provides a connection to a pcap handle, allowing users to read packets +// off the wire (Next), inject packets onto the wire (Inject), and +// perform a number of other functions to affect and understand packet output. +// +// Handles are already pcap_activate'd +type Handle struct { + // cptr is the handle for the actual pcap C object. + cptr *C.pcap_t + blockForever bool + device string + mu sync.Mutex + // Since pointers to these objects are passed into a C function, if + // they're declared locally then the Go compiler thinks they may have + // escaped into C-land, so it allocates them on the heap. This causes a + // huge memory hit, so to handle that we store them here instead. + pkthdr *C.struct_pcap_pkthdr + buf_ptr *C.u_char +} + +// Stats contains statistics on how many packets were handled by a pcap handle, +// and what was done with those packets. +type Stats struct { + PacketsReceived int + PacketsDropped int + PacketsIfDropped int +} + +// Interface describes a single network interface on a machine. +type Interface struct { + Name string + Description string + Addresses []InterfaceAddress + // TODO: add more elements +} + +// Datalink describes the datalink +type Datalink struct { + Name string + Description string +} + +// InterfaceAddress describes an address associated with an Interface. +// Currently, it's IPv4/6 specific. +type InterfaceAddress struct { + IP net.IP + Netmask net.IPMask // Netmask may be nil if we were unable to retrieve it. + // TODO: add broadcast + PtP dst ? +} + +// BPF is a compiled filter program, useful for offline packet matching. +type BPF struct { + orig string + bpf _Ctype_struct_bpf_program // takes a finalizer, not overriden by outsiders +} + +// BlockForever, when passed into OpenLive/SetTimeout, causes it to block forever +// waiting for packets, while still returning incoming packets to userland relatively +// quickly. +const BlockForever = -time.Millisecond * 10 + +func timeoutMillis(timeout time.Duration) C.int { + // Flip sign if necessary. See package docs on timeout for reasoning behind this. + if timeout < 0 { + timeout *= -1 + } + // Round up + if timeout != 0 && timeout < time.Millisecond { + timeout = time.Millisecond + } + return C.int(timeout / time.Millisecond) +} + +// OpenLive opens a device and returns a *Handle. +// It takes as arguments the name of the device ("eth0"), the maximum size to +// read for each packet (snaplen), whether to put the interface in promiscuous +// mode, and a timeout. +// +// See the package documentation for important details regarding 'timeout'. +func OpenLive(device string, snaplen int32, promisc bool, timeout time.Duration) (handle *Handle, _ error) { + buf := (*C.char)(C.calloc(errorBufferSize, 1)) + defer C.free(unsafe.Pointer(buf)) + var pro C.int + if promisc { + pro = 1 + } + p := &Handle{} + p.blockForever = timeout < 0 + p.device = device + + dev := C.CString(device) + defer C.free(unsafe.Pointer(dev)) + + p.cptr = C.pcap_open_live(dev, C.int(snaplen), pro, timeoutMillis(timeout), buf) + if p.cptr == nil { + return nil, errors.New(C.GoString(buf)) + } + return p, nil +} + +// OpenOffline opens a file and returns its contents as a *Handle. +func OpenOffline(file string) (handle *Handle, err error) { + buf := (*C.char)(C.calloc(errorBufferSize, 1)) + defer C.free(unsafe.Pointer(buf)) + cf := C.CString(file) + defer C.free(unsafe.Pointer(cf)) + + cptr := C.pcap_open_offline(cf, buf) + if cptr == nil { + return nil, errors.New(C.GoString(buf)) + } + return &Handle{cptr: cptr}, nil +} + +// NextError is the return code from a call to Next. +type NextError int32 + +// NextError implements the error interface. +func (n NextError) Error() string { + switch n { + case NextErrorOk: + return "OK" + case NextErrorTimeoutExpired: + return "Timeout Expired" + case NextErrorReadError: + return "Read Error" + case NextErrorNoMorePackets: + return "No More Packets In File" + case NextErrorNotActivated: + return "Not Activated" + } + return strconv.Itoa(int(n)) +} + +const ( + NextErrorOk NextError = 1 + NextErrorTimeoutExpired NextError = 0 + NextErrorReadError NextError = -1 + // NextErrorNoMorePackets is returned when reading from a file (OpenOffline) and + // EOF is reached. When this happens, Next() returns io.EOF instead of this. + NextErrorNoMorePackets NextError = -2 + NextErrorNotActivated NextError = -3 +) + +// NextError returns the next packet read from the pcap handle, along with an error +// code associated with that packet. If the packet is read successfully, the +// returned error is nil. +func (p *Handle) ReadPacketData() (data []byte, ci gopacket.CaptureInfo, err error) { + p.mu.Lock() + err = p.getNextBufPtrLocked(&ci) + if err == nil { + data = C.GoBytes(unsafe.Pointer(p.buf_ptr), C.int(ci.CaptureLength)) + } + p.mu.Unlock() + return +} + +type activateError C.int + +const ( + aeNoError = 0 + aeActivated = C.PCAP_ERROR_ACTIVATED + aePromisc = C.PCAP_WARNING_PROMISC_NOTSUP + aeNoSuchDevice = C.PCAP_ERROR_NO_SUCH_DEVICE + aeDenied = C.PCAP_ERROR_PERM_DENIED + aeNotUp = C.PCAP_ERROR_IFACE_NOT_UP +) + +func (a activateError) Error() string { + switch a { + case aeNoError: + return "No Error" + case aeActivated: + return "Already Activated" + case aePromisc: + return "Cannot set as promisc" + case aeNoSuchDevice: + return "No Such Device" + case aeDenied: + return "Permission Denied" + case aeNotUp: + return "Interface Not Up" + default: + return fmt.Sprintf("unknown activated error: %d", a) + } +} + +// getNextBufPtrLocked is shared code for ReadPacketData and +// ZeroCopyReadPacketData. +func (p *Handle) getNextBufPtrLocked(ci *gopacket.CaptureInfo) error { + if p.cptr == nil { + return io.EOF + } + var result NextError + for { + result = NextError(C.pcap_next_ex(p.cptr, &p.pkthdr, &p.buf_ptr)) + if p.blockForever && result == NextErrorTimeoutExpired { + continue + } + break + } + if result != NextErrorOk { + if result == NextErrorNoMorePackets { + return io.EOF + } else { + return result + } + } + ci.Timestamp = time.Unix(int64(p.pkthdr.ts.tv_sec), + int64(p.pkthdr.ts.tv_usec)*1000) // convert micros to nanos + ci.CaptureLength = int(p.pkthdr.caplen) + ci.Length = int(p.pkthdr.len) + return nil +} + +// ZeroCopyReadPacketData reads the next packet off the wire, and returns its data. +// The slice returned by ZeroCopyReadPacketData points to bytes owned by the +// the Handle. Each call to ZeroCopyReadPacketData invalidates any data previously +// returned by ZeroCopyReadPacketData. Care must be taken not to keep pointers +// to old bytes when using ZeroCopyReadPacketData... if you need to keep data past +// the next time you call ZeroCopyReadPacketData, use ReadPacketData, which copies +// the bytes into a new buffer for you. +// data1, _, _ := handle.ZeroCopyReadPacketData() +// // do everything you want with data1 here, copying bytes out of it if you'd like to keep them around. +// data2, _, _ := handle.ZeroCopyReadPacketData() // invalidates bytes in data1 +func (p *Handle) ZeroCopyReadPacketData() (data []byte, ci gopacket.CaptureInfo, err error) { + p.mu.Lock() + err = p.getNextBufPtrLocked(&ci) + if err == nil { + slice := (*reflect.SliceHeader)(unsafe.Pointer(&data)) + slice.Data = uintptr(unsafe.Pointer(p.buf_ptr)) + slice.Len = ci.CaptureLength + slice.Cap = ci.CaptureLength + } + p.mu.Unlock() + return +} + +// Close closes the underlying pcap handle. +func (p *Handle) Close() { + p.mu.Lock() + if p.cptr == nil { + return + } + C.pcap_close(p.cptr) + p.cptr = nil + p.mu.Unlock() +} + +// Error returns the current error associated with a pcap handle (pcap_geterr). +func (p *Handle) Error() error { + return errors.New(C.GoString(C.pcap_geterr(p.cptr))) +} + +// Stats returns statistics on the underlying pcap handle. +func (p *Handle) Stats() (stat *Stats, err error) { + var cstats _Ctype_struct_pcap_stat + if -1 == C.pcap_stats(p.cptr, &cstats) { + return nil, p.Error() + } + return &Stats{ + PacketsReceived: int(cstats.ps_recv), + PacketsDropped: int(cstats.ps_drop), + PacketsIfDropped: int(cstats.ps_ifdrop), + }, nil +} + +// Obtains a list of all possible data link types supported for an interface. +func (p *Handle) ListDataLinks() (datalinks []Datalink, err error) { + var dlt_buf *C.int + + n := int(C.pcap_list_datalinks(p.cptr, &dlt_buf)) + if -1 == n { + return nil, p.Error() + } + + defer C.pcap_free_datalinks(dlt_buf) + + datalinks = make([]Datalink, n) + + dltArray := (*[100]C.int)(unsafe.Pointer(dlt_buf)) + + for i := 0; i < n; i++ { + expr := C.pcap_datalink_val_to_name((*dltArray)[i]) + datalinks[i].Name = C.GoString(expr) + + expr = C.pcap_datalink_val_to_description((*dltArray)[i]) + datalinks[i].Description = C.GoString(expr) + } + + return datalinks, nil +} + +// SetBPFFilter compiles and sets a BPF filter for the pcap handle. +func (p *Handle) SetBPFFilter(expr string) (err error) { + errorBuf := (*C.char)(C.calloc(errorBufferSize, 1)) + defer C.free(unsafe.Pointer(errorBuf)) + + var netp uint32 + var maskp uint32 + + // Only do the lookup on network interfaces. + // No device indicates we're handling a pcap file. + if len(p.device) > 0 { + dev := C.CString(p.device) + defer C.free(unsafe.Pointer(dev)) + if -1 == C.pcap_lookupnet( + dev, + (*C.bpf_u_int32)(unsafe.Pointer(&netp)), + (*C.bpf_u_int32)(unsafe.Pointer(&maskp)), + errorBuf, + ) { + // We can't lookup the network, but that could be because the interface + // doesn't have an IPv4. + } + } + + var bpf _Ctype_struct_bpf_program + cexpr := C.CString(expr) + defer C.free(unsafe.Pointer(cexpr)) + + if -1 == C.pcap_compile(p.cptr, &bpf, cexpr, 1, C.bpf_u_int32(maskp)) { + return p.Error() + } + + if -1 == C.pcap_setfilter(p.cptr, &bpf) { + C.pcap_freecode(&bpf) + return p.Error() + } + + C.pcap_freecode(&bpf) + + return nil +} + +// NewBPF compiles the given string into a new filter program. +// +// BPF filters need to be created from activated handles, because they need to +// know the underlying link type to correctly compile their offsets. +func (p *Handle) NewBPF(expr string) (*BPF, error) { + bpf := &BPF{orig: expr} + cexpr := C.CString(expr) + defer C.free(unsafe.Pointer(cexpr)) + + if C.pcap_compile(p.cptr, &bpf.bpf, cexpr /* optimize */, 1, C.PCAP_NETMASK_UNKNOWN) != 0 { + return nil, p.Error() + } + runtime.SetFinalizer(bpf, destroyBPF) + return bpf, nil +} +func destroyBPF(bpf *BPF) { + C.pcap_freecode(&bpf.bpf) +} + +// String returns the original string this BPF filter was compiled from. +func (b *BPF) String() string { + return b.orig +} + +// Matches returns true if the given packet data matches this filter. +func (b *BPF) Matches(ci gopacket.CaptureInfo, data []byte) bool { + var hdr C.struct_pcap_pkthdr + hdr.ts.tv_sec = C.gopacket_time_secs_t(ci.Timestamp.Unix()) + hdr.ts.tv_usec = C.gopacket_time_usecs_t(ci.Timestamp.Nanosecond() / 1000) + hdr.caplen = C.bpf_u_int32(len(data)) // Trust actual length over ci.Length. + hdr.len = C.bpf_u_int32(ci.Length) + dataptr := (*C.u_char)(unsafe.Pointer(&data[0])) + return C.pcap_offline_filter(&b.bpf, &hdr, dataptr) != 0 +} + +// Version returns pcap_lib_version. +func Version() string { + return C.GoString(C.pcap_lib_version()) +} + +// LinkType returns pcap_datalink, as a layers.LinkType. +func (p *Handle) LinkType() layers.LinkType { + return layers.LinkType(C.pcap_datalink(p.cptr)) +} + +// SetLinkType calls pcap_set_datalink on the pcap handle. +func (p *Handle) SetLinkType(dlt layers.LinkType) error { + if -1 == C.pcap_set_datalink(p.cptr, C.int(dlt)) { + return p.Error() + } + return nil +} + +// FindAllDevs attempts to enumerate all interfaces on the current machine. +func FindAllDevs() (ifs []Interface, err error) { + var buf *C.char + buf = (*C.char)(C.calloc(errorBufferSize, 1)) + defer C.free(unsafe.Pointer(buf)) + var alldevsp *C.pcap_if_t + + if -1 == C.pcap_findalldevs((**C.pcap_if_t)(&alldevsp), buf) { + return nil, errors.New(C.GoString(buf)) + } + defer C.pcap_freealldevs((*C.pcap_if_t)(alldevsp)) + dev := alldevsp + var i uint32 + for i = 0; dev != nil; dev = (*C.pcap_if_t)(dev.next) { + i++ + } + ifs = make([]Interface, i) + dev = alldevsp + for j := uint32(0); dev != nil; dev = (*C.pcap_if_t)(dev.next) { + var iface Interface + iface.Name = C.GoString(dev.name) + iface.Description = C.GoString(dev.description) + iface.Addresses = findalladdresses(dev.addresses) + // TODO: add more elements + ifs[j] = iface + j++ + } + return +} + +func findalladdresses(addresses *_Ctype_struct_pcap_addr) (retval []InterfaceAddress) { + // TODO - make it support more than IPv4 and IPv6? + retval = make([]InterfaceAddress, 0, 1) + for curaddr := addresses; curaddr != nil; curaddr = (*_Ctype_struct_pcap_addr)(curaddr.next) { + // Strangely, it appears that in some cases, we get a pcap address back from + // pcap_findalldevs with a nil .addr. It appears that we can skip over + // these. + if curaddr.addr == nil { + continue + } + var a InterfaceAddress + var err error + if a.IP, err = sockaddr_to_IP((*syscall.RawSockaddr)(unsafe.Pointer(curaddr.addr))); err != nil { + continue + } + // To be safe, we'll also check for netmask. + if curaddr.netmask == nil { + continue + } + if a.Netmask, err = sockaddr_to_IP((*syscall.RawSockaddr)(unsafe.Pointer(curaddr.netmask))); err != nil { + // If we got an IP address but we can't get a netmask, just return the IP + // address. + a.Netmask = nil + } + retval = append(retval, a) + } + return +} + +func sockaddr_to_IP(rsa *syscall.RawSockaddr) (IP []byte, err error) { + switch rsa.Family { + case syscall.AF_INET: + pp := (*syscall.RawSockaddrInet4)(unsafe.Pointer(rsa)) + IP = make([]byte, 4) + for i := 0; i < len(IP); i++ { + IP[i] = pp.Addr[i] + } + return + case syscall.AF_INET6: + pp := (*syscall.RawSockaddrInet6)(unsafe.Pointer(rsa)) + IP = make([]byte, 16) + for i := 0; i < len(IP); i++ { + IP[i] = pp.Addr[i] + } + return + } + err = errors.New("Unsupported address type") + return +} + +// WritePacketData calls pcap_sendpacket, injecting the given data into the pcap handle. +func (p *Handle) WritePacketData(data []byte) (err error) { + if -1 == C.pcap_sendpacket(p.cptr, (*C.u_char)(&data[0]), (C.int)(len(data))) { + err = p.Error() + } + return +} + +// Direction is used by Handle.SetDirection. +type Direction uint8 + +const ( + DirectionIn Direction = C.PCAP_D_IN + DirectionOut Direction = C.PCAP_D_OUT + DirectionInOut Direction = C.PCAP_D_INOUT +) + +// SetDirection sets the direction for which packets will be captured. +func (p *Handle) SetDirection(direction Direction) error { + if direction != DirectionIn && direction != DirectionOut && direction != DirectionInOut { + return fmt.Errorf("Invalid direction: %v", direction) + } + if status := C.pcap_setdirection(p.cptr, (C.pcap_direction_t)(direction)); status < 0 { + return statusError(status) + } + return nil +} + +// TimestampSource tells PCAP which type of timestamp to use for packets. +type TimestampSource C.int + +// String returns the timestamp type as a human-readable string. +func (t TimestampSource) String() string { + return C.GoString(C.pcap_tstamp_type_val_to_name(C.int(t))) +} + +// TimestampSourceFromString translates a string into a timestamp type, case +// insensitive. +func TimestampSourceFromString(s string) (TimestampSource, error) { + t := C.pcap_tstamp_type_name_to_val(C.CString(s)) + if t < 0 { + return 0, statusError(t) + } + return TimestampSource(t), nil +} + +func statusError(status C.int) error { + return errors.New(C.GoString(C.pcap_statustostr(status))) +} + +// InactiveHandle allows you to call pre-pcap_activate functions on your pcap +// handle to set it up just the way you'd like. +type InactiveHandle struct { + // cptr is the handle for the actual pcap C object. + cptr *C.pcap_t + device string + blockForever bool +} + +// Activate activates the handle. The current InactiveHandle becomes invalid +// and all future function calls on it will fail. +func (p *InactiveHandle) Activate() (*Handle, error) { + err := activateError(C.pcap_activate(p.cptr)) + if err != aeNoError { + return nil, err + } + h := &Handle{cptr: p.cptr, device: p.device, blockForever: p.blockForever} + p.cptr = nil + return h, nil +} + +// CleanUp cleans up any stuff left over from a successful or failed building +// of a handle. +func (p *InactiveHandle) CleanUp() { + if p.cptr != nil { + C.pcap_close(p.cptr) + } +} + +// NewInactiveHandle creates a new InactiveHandle, which wraps an un-activated PCAP handle. +// Callers of NewInactiveHandle should immediately defer 'CleanUp', as in: +// inactive := NewInactiveHandle("eth0") +// defer inactive.CleanUp() +func NewInactiveHandle(device string) (*InactiveHandle, error) { + buf := (*C.char)(C.calloc(errorBufferSize, 1)) + defer C.free(unsafe.Pointer(buf)) + dev := C.CString(device) + defer C.free(unsafe.Pointer(dev)) + + // This copies a bunch of the pcap_open_live implementation from pcap.c: + cptr := C.pcap_create(dev, buf) + if cptr == nil { + return nil, errors.New(C.GoString(buf)) + } + return &InactiveHandle{cptr: cptr, device: device}, nil +} + +// SetSnapLen sets the snap length (max bytes per packet to capture). +func (p *InactiveHandle) SetSnapLen(snaplen int) error { + if status := C.pcap_set_snaplen(p.cptr, C.int(snaplen)); status < 0 { + return statusError(status) + } + return nil +} + +// SetPromisc sets the handle to either be promiscuous (capture packets +// unrelated to this host) or not. +func (p *InactiveHandle) SetPromisc(promisc bool) error { + var pro C.int + if promisc { + pro = 1 + } + if status := C.pcap_set_promisc(p.cptr, pro); status < 0 { + return statusError(status) + } + return nil +} + +// SetTimeout sets the read timeout for the handle. +// +// See the package documentation for important details regarding 'timeout'. +func (p *InactiveHandle) SetTimeout(timeout time.Duration) error { + p.blockForever = timeout < 0 + if status := C.pcap_set_timeout(p.cptr, timeoutMillis(timeout)); status < 0 { + return statusError(status) + } + return nil +} + +// SupportedTimestamps returns a list of supported timstamp types for this +// handle. +func (p *InactiveHandle) SupportedTimestamps() (out []TimestampSource) { + var types *C.int + n := int(C.pcap_list_tstamp_types(p.cptr, &types)) + defer C.pcap_free_tstamp_types(types) + typesArray := (*[100]C.int)(unsafe.Pointer(types)) + for i := 0; i < n; i++ { + out = append(out, TimestampSource((*typesArray)[i])) + } + return +} + +// SetTimestampSource sets the type of timestamp generator PCAP uses when +// attaching timestamps to packets. +func (p *InactiveHandle) SetTimestampSource(t TimestampSource) error { + if status := C.pcap_set_tstamp_type(p.cptr, C.int(t)); status < 0 { + return statusError(status) + } + return nil +} + +// CannotSetRFMon is returned by SetRFMon if the handle does not allow +// setting RFMon because pcap_can_set_rfmon returns 0. +var CannotSetRFMon = errors.New("Cannot set rfmon for this handle") + +// SetRFMon turns on radio monitoring mode, similar to promiscuous mode but for +// wireless networks. If this mode is enabled, the interface will not need to +// associate with an access point before it can receive traffic. +func (p *InactiveHandle) SetRFMon(monitor bool) error { + var mon C.int + if monitor { + mon = 1 + } + switch canset := C.pcap_can_set_rfmon(p.cptr); canset { + case 0: + return CannotSetRFMon + case 1: + // success + default: + return statusError(canset) + } + if status := C.pcap_set_rfmon(p.cptr, mon); status != 0 { + return statusError(status) + } + return nil +} + +// SetBufferSize sets the buffer size (in bytes) of the handle. +func (p *InactiveHandle) SetBufferSize(bufferSize int) error { + if status := C.pcap_set_buffer_size(p.cptr, C.int(bufferSize)); status < 0 { + return statusError(status) + } + return nil +} + +// SetImmediateMode sets (or unsets) the immediate mode of the +// handle. In immediate mode, packets are delivered to the application +// as soon as they arrive. In other words, this overrides SetTimeout. +func (p *InactiveHandle) SetImmediateMode(mode bool) error { + var md C.int + if mode { + md = 1 + } + if status := C.pcap_set_immediate_mode(p.cptr, md); status < 0 { + return statusError(status) + } + return nil +} diff --git a/vendor/github.com/vtolstov/gopacket/pcap/pcap_test.go b/vendor/github.com/vtolstov/gopacket/pcap/pcap_test.go new file mode 100644 index 0000000..b6cb049 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/pcap/pcap_test.go @@ -0,0 +1,154 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +package pcap + +import ( + "fmt" + "io" + "log" + "testing" + + "github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket/layers" +) + +func TestPcapFileRead(t *testing.T) { + for _, file := range []struct { + filename string + num int + expectedLayers []gopacket.LayerType + }{ + {"test_loopback.pcap", + 24, + []gopacket.LayerType{ + layers.LayerTypeLoopback, + layers.LayerTypeIPv6, + layers.LayerTypeTCP, + }, + }, + {"test_ethernet.pcap", + 16, + []gopacket.LayerType{ + layers.LayerTypeEthernet, + layers.LayerTypeIPv4, + layers.LayerTypeTCP, + }, + }, + {"test_dns.pcap", + 10, + []gopacket.LayerType{ + layers.LayerTypeEthernet, + layers.LayerTypeIPv4, + layers.LayerTypeUDP, + layers.LayerTypeDNS, + }, + }, + } { + t.Logf("\n\n\n\nProcessing file %s\n\n\n\n", file.filename) + + packets := []gopacket.Packet{} + if handle, err := OpenOffline(file.filename); err != nil { + t.Fatal(err) + } else { + packetSource := gopacket.NewPacketSource(handle, handle.LinkType()) + for packet := range packetSource.Packets() { + packets = append(packets, packet) + } + } + if len(packets) != file.num { + t.Fatal("Incorrect number of packets, want", file.num, "got", len(packets)) + } + for i, p := range packets { + t.Log(p.Dump()) + for _, layertype := range file.expectedLayers { + if p.Layer(layertype) == nil { + t.Fatal("Packet", i, "has no layer type\n%s", layertype, p.Dump()) + } + } + } + } +} + +func TestBPF(t *testing.T) { + handle, err := OpenOffline("test_ethernet.pcap") + if err != nil { + t.Fatal(err) + } + + for _, expected := range []struct { + expr string + Error bool + Result bool + }{ + {"foobar", true, false}, + {"tcp[tcpflags] & (tcp-syn|tcp-ack) == (tcp-syn|tcp-ack)", false, true}, + {"tcp[tcpflags] & (tcp-syn|tcp-ack) == tcp-ack", false, true}, + {"udp", false, false}, + } { + data, ci, err := handle.ReadPacketData() + if err != nil { + t.Fatal(err) + } + t.Log("Testing filter", expected.expr) + if bpf, err := handle.NewBPF(expected.expr); err != nil { + if !expected.Error { + t.Error(err, "while compiling filter was unexpected") + } + } else if expected.Error { + t.Error("expected error but didn't see one") + } else if matches := bpf.Matches(ci, data); matches != expected.Result { + t.Error("Filter result was", matches, "but should be", expected.Result) + } + } +} + +func ExampleBPF() { + handle, err := OpenOffline("test_ethernet.pcap") + if err != nil { + log.Fatal(err) + } + synack, err := handle.NewBPF("tcp[tcpflags] & (tcp-syn|tcp-ack) == (tcp-syn|tcp-ack)") + if err != nil { + log.Fatal(err) + } + syn, err := handle.NewBPF("tcp[tcpflags] & (tcp-syn|tcp-ack) == tcp-syn") + if err != nil { + log.Fatal(err) + } + for { + data, ci, err := handle.ReadPacketData() + switch { + case err == io.EOF: + return + case err != nil: + log.Fatal(err) + case synack.Matches(ci, data): + fmt.Println("SYN/ACK packet") + case syn.Matches(ci, data): + fmt.Println("SYN packet") + default: + fmt.Println("SYN flag not set") + } + } + // Output: + // SYN packet + // SYN/ACK packet + // SYN flag not set + // SYN flag not set + // SYN flag not set + // SYN flag not set + // SYN flag not set + // SYN flag not set + // SYN flag not set + // SYN flag not set + // SYN flag not set + // SYN flag not set + // SYN flag not set + // SYN flag not set + // SYN flag not set + // SYN flag not set +} diff --git a/vendor/github.com/vtolstov/gopacket/pcap/pcap_tester.go b/vendor/github.com/vtolstov/gopacket/pcap/pcap_tester.go new file mode 100644 index 0000000..e5e5299 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/pcap/pcap_tester.go @@ -0,0 +1,107 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +// +build ignore + +// This binary tests that PCAP packet capture is working correctly by issuing +// HTTP requests, then making sure we actually capture data off the wire. +package main + +import ( + "flag" + "fmt" + "github.com/vtolstov/gopacket/pcap" + "log" + "net" + "net/http" + "os" + "time" +) + +var mode = flag.String("mode", "basic", "One of: basic,filtered,timestamp") + +func generatePackets() { + if resp, err := http.Get("http://code.google.com"); err != nil { + log.Printf("Could not get HTTP: %v", err) + } else { + resp.Body.Close() + } +} + +func main() { + flag.Parse() + ifaces, err := net.Interfaces() + if err != nil { + log.Fatal(err) + } + for _, iface := range ifaces { + log.Printf("Trying capture on %q", iface.Name) + if err := tryCapture(iface); err != nil { + log.Printf("Error capturing on %q: %v", iface.Name, err) + } else { + log.Printf("Successfully captured on %q", iface.Name) + return + } + } + os.Exit(1) +} + +func tryCapture(iface net.Interface) error { + if iface.Name[:2] == "lo" { + return fmt.Errorf("skipping loopback") + } + var h *pcap.Handle + var err error + switch *mode { + case "basic": + h, err = pcap.OpenLive(iface.Name, 65536, false, time.Second*3) + if err != nil { + return fmt.Errorf("openlive: %v", err) + } + defer h.Close() + case "filtered": + h, err = pcap.OpenLive(iface.Name, 65536, false, time.Second*3) + if err != nil { + return fmt.Errorf("openlive: %v", err) + } + defer h.Close() + if err := h.SetBPFFilter("port 80 or port 443"); err != nil { + return fmt.Errorf("setbpf: %v", err) + } + case "timestamp": + u, err := pcap.NewInactiveHandle(iface.Name) + if err != nil { + return err + } + defer u.CleanUp() + if err = u.SetSnapLen(65536); err != nil { + return err + } else if err = u.SetPromisc(false); err != nil { + return err + } else if err = u.SetTimeout(time.Second * 3); err != nil { + return err + } + sources := u.SupportedTimestamps() + if len(sources) == 0 { + return fmt.Errorf("no supported timestamp sources") + } else if err := u.SetTimestampSource(sources[0]); err != nil { + return fmt.Errorf("settimestampsource(%v): %v", sources[0], err) + } else if h, err = u.Activate(); err != nil { + return fmt.Errorf("could not activate: %v", err) + } + defer h.Close() + default: + panic("Invalid --mode: " + *mode) + } + go generatePackets() + h.ReadPacketData() // Do one dummy read to clear any timeouts. + data, ci, err := h.ReadPacketData() + if err != nil { + return fmt.Errorf("readpacketdata: %v", err) + } + log.Printf("Read packet, %v bytes, CI: %+v", len(data), ci) + return nil +} diff --git a/vendor/github.com/vtolstov/gopacket/pcap/pcapgo_test.go b/vendor/github.com/vtolstov/gopacket/pcap/pcapgo_test.go new file mode 100644 index 0000000..3be4e74 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/pcap/pcapgo_test.go @@ -0,0 +1,56 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +package pcap + +import ( + "bytes" + "github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket/layers" + "github.com/vtolstov/gopacket/pcapgo" + "io/ioutil" + "reflect" + "testing" + "time" +) + +func TestPCAPGoWrite(t *testing.T) { + f, err := ioutil.TempFile("", "pcapgo") + if err != nil { + t.Fatal(err) + } + data := []byte{0xab, 0xcd, 0xef, 0x01, 0x02, 0x03, 0x04} + ci := gopacket.CaptureInfo{ + Timestamp: time.Unix(12345667, 1234567000), + Length: 700, + CaptureLength: len(data), + } + func() { + defer f.Close() + w := pcapgo.NewWriter(f) + if err := w.WriteFileHeader(65536, layers.LinkTypeEthernet); err != nil { + t.Fatal(err) + } + if err := w.WritePacket(ci, data); err != nil { + t.Fatal(err) + } + }() + h, err := OpenOffline(f.Name()) + if err != nil { + t.Fatal(err) + } + defer h.Close() + gotData, gotCI, err := h.ReadPacketData() + if err != nil { + t.Fatal("could not read first packet:", err) + } + if !bytes.Equal(gotData, data) { + t.Errorf("byte mismatch:\nwant: %v\n got: %v", data, gotData) + } + if !reflect.DeepEqual(ci, gotCI) { + t.Errorf("CI mismatch:\nwant: %v\n got: %v", ci, gotCI) + } +} diff --git a/vendor/github.com/vtolstov/gopacket/pcap/test_dns.pcap b/vendor/github.com/vtolstov/gopacket/pcap/test_dns.pcap new file mode 100644 index 0000000000000000000000000000000000000000..3a79f928a5ab5cda84a2efdd4f2e6124a53420af GIT binary patch literal 1001 zcmca|c+)~A1{MYw`2U}Qff2|ljj#>*c8-f72*?Iu1|`XDbxI8Urn|WvI2c?R7+gA! zFfdpM>f7cXTEG&2Ifn1yG6quygQe5INiYb2jQ|?NQIMHjoRgWB%2ZSeG8bsFrU1~e z1|SC6U~rj>!4Jp=VGJ7_;$|^0SP52q%C%`=0@}d;{tD0rolVl4ih-&@jsybsw9LH3 zyyR5&vXcDV;%vA@Ak)v^;bMpYssUjP)4i&s9T-dm<-ISsDvE+k_tF5GZpQ3ykPlQ1 zF`bbmH!(AZBfYe!R5vfRggH4smw`bB>W^myifKMGV04Ifr>^j{Bny>x3 zW!(+9`3!6Y`RVy7iP$1{^?xpgNT5m(#xUIbiW>uinV{ZxR^0<(aL1d!@(byK8_vjF zR8YX3msp&USel%Xnv{qmlvasx<4HxLuNfEu1!u*q{o`K;vIrPqz*Llc{$m3oDj=z- zGO;MLxD1wxu!NQzH$yPcbs&u4A=l&YK~etg^dU|+P+s7>`w3`|VU%*88NwdU?9%L< N#H!3ZcrHN7ZU9N>+|&R7 literal 0 HcmV?d00001 diff --git a/vendor/github.com/vtolstov/gopacket/pcap/test_ethernet.pcap b/vendor/github.com/vtolstov/gopacket/pcap/test_ethernet.pcap new file mode 100644 index 0000000000000000000000000000000000000000..1f8a87c326fbd515a3e9333d55789606a7bf9c46 GIT binary patch literal 7672 zcmeHMU2GiH72bpZ(Sj>zr3z?EFB28V#5=QVuh;91y}_}a5NaoG>|m-^a_`RE-JN)L zW-@oi_6Dj3cR zF_qfA=h|0xU31NzUAy+CZ+rjmf1zi4cE{-NUfP?w7vJd>yQ3T=s4+m;`^14_ofa5m0sKU&L4e` z`2I?@hi@0?kDR-S9eB-y1{A*+86gv5^YY%*pMXZMZHRANH^lq zxn*XsdzP0MjhvnvNS~4-$V}IS8XtQPVa?)#3&SUlLU-Q0+t z9b%4M>D+k27w*#1yph!>^kTry;xUj%^s#~TJ)Q(=E<3Il^jx-}7e@xt)21nWtlnkZ zHIN=ilYk%Hnod-3V(eg7I5X(rw49({~{yAPkknx z`scMN_3A~u_G0;4gt+$cPKY=Dp&PNSEH;wOvJ+n%NZ-eUW{Jg;WaeDcvuw9Eke>0} z5PHlkH+@lJq1X(Kdf0FdGPBMDDZ;5JtY(UB6=Y6ww{w}Ryfiw_jxH>3oj)(!T39c! zv5DNoKzf#k;ASauL0Z@%%}s!=ly8wPiC|p>CERVT9)`Y!8_eq?;B_E9d1$lYFg%sE z=T2!kJ*zR%l6guywR|K~)YzeNdh(9h6En+SUYuhjG+R7%c>dT7(=vv!GCE@zv&*yW z{(F`e<{8Y+Fy@YHX@-9q9al1pjg1X`V^sHonz4M+*d&Ntj)>Zybt|+qoT9)JZgxgz z;M$c_SHRCrOiaY68f_{$xQ8iCxC&ix3x_ziyT$_HOldM~IzrZk2sIYsUZ*s5ucnk5 zs|TW*9AGzUQr}!NE#34Qh75UVoA^W2tFrC|;c7*MTvvpl9Xddo6;&QNp=RJjwNxhh z5`!ICb_i|5swR#2NqVvYa;P@+GvZ8SuTN?BXHHFLX1s=vqbiQjm>JvOly+=xN?0|a zfICDXF3c!oHa7O>-hky)N5)5WY;DVJH+W4Ln;At-EN>zI&jGm;iok{8whyN$WSbDw za}6GPjRUwiJd5=>jRja0>@vO)wL_;J-E8(n4W#S>J-M{R5bhF8Jiij8ijJWdnRTU@ zj2{Txzwb$5wMknRenkU`qwAIFb>FRNj6^W%u~}9;tBJ3cz0Pb4mgxBua=7h^fQ+|e zeO^>UT8bRJId*vxrlYLY;DK4U*M(M|jz3HqygX@OOZUFETh@7)v8#z;YvmQJuw&Ij z{pl(WuXPX|#@GG?GV}tGP#9Wyi59leD4*m}2vcsW*WeW|g0RySiu@1vkNn?Ok^fS6 zcEV+2m^FAiZHupWr+q!!8@6RRV#_TPGQv)8`KYM`(aPA_5$j_{ zBd1NJF6TI3C#`mQaSk5x;GIr*u){p#4a!3hh1L`Q$mPby45$c&my~OwIi>kpnP}M} zwrvCG%4$~A<*<(}#|&Tz$Zv`<@PHZyU$CR`LiZ6@}0oe$ePj)&~d+7$$7#VN3e zrw?{O$L`k-a*6}eOMiD#+a&niQgfFf-MMdc;^0cX$#@`G(~DqG5DAHw*)Ai4YVyE> zpYVXzIPeO4_6vbrOX5)z9|rBEF+?$$z?Y$+K^_bII8scjuBM&Bk_I2`IHM ziU3g;O#>=#l$@alOM!_ft1YQ&54CYS+8glXf`RxsV0AAf1elc} z8WmxY2@fR*-BET2pV$gcA-r6g2)poKRl-hbmMwjUqw8@!7sW$6O7=v*iWj05LnYdZ zsVeAQ#Y3gRixU%~nAcDHsCQcVYixu{uU1~mW${IY_$A>8GlZ+nP})Kb9!b&Q{*<;) z35AcU=EGl=>5@gni90fxwnEXc3BBfdHAkpw-8alS(w`kQ3|q=bNW((0Z99ihW#zKP zd~t#;P=;mj^@U>#bIcNGdM)mTI?H4z;{}2JQlVaU-B5Dv6xB(Nu#i(Gpgy?P7W2cIH2C1U=mYK^E$|Gg) zolV|pzRnXjpn@%KQ#%ajwB)``-VkrYfqhZREmFth*8V}M*cu#WgSo+>gRMsx6P$48 z@q7klUxk}%`>T18PlpcxHh(HY#7IhO5SlYvt1u;Y204dQ9z*=XQ(^i zOy;J>*0~em<5gu)_r5cf4JKMp@z8=gtIqAz*yCJ^{MUc3UoQFcQZF?@6z3Ya46RAg4F8QcCm%Q*mJD2?S*GVq99W$<)(#@GzsrV!9vry1zZkq;V zRB6~Glp>Hk(Lii8v8Tj$V9*_2&4A;+Wt$t|f{hAQhKC4bs@quZiq*f9*PPJ7Lg zYH!r&iN;UK5v^V&MD-~)5W4+(z-62rwDK~ovK1_|MYT>04(|wpyuzz0v1sKJ^jXQX z-<8#kp`EE{0wx<3Go!edE&8Q}!!!L)Bf2vi$VF#~L@UqQt|vK4%UJNM6LaZR(QZO& zM-8v2F512uZoAB*%D3u8upm2eR)TDK6(gmrKhKOn5c{QU9? z4`^D4sc%xgG0#K?P0Tq?6Uj#nY9#8Zz(eidZl>A(jk=BG)Zk63E+SVVjgvTxsyd8n z94ip+&@i4vGNRTaYT!X%DsEw_C_$rI6lNyuz!w2`GCT++s7`x< z9750EN~bE2S3NIuJ&fndD}q_Jg{lx^MRy%aR;>brNXtpQNH5FyWs-;zy=~5g)V?2T!~!ywdmFR zTg0xPl^>(X?|-2?^1rfAMgCh-h3`Mw9r?>?#Q~gkjW}!_Xu&)z5iq`O_+p|mg(cHa z5)GzQ1NIh?G%C%EYZ~~e1`adR+DKu8cCzU(!~{xJRGH(ROUoiKZI~bk*nBK0xq%Kp z@XM3155-zTpn0HHdJr9Tl>#Ta8q@R9Vxwb5k&I<1RZ`omBJ+M6606!n`|LRMv@wKB zM|Vvl_!hfK`P}-h(=P#9c>xn6)ZOBm|1)sjK@Bsx&gk1E+H=O)z3JX-q3aKI&eduHgn&rR2qEa$?c`VtLM>XK6d`) zq%?RAZRYI?akwAi-t&a`SF9wztk zxtmjk*FQ{5E{kI0IpXp04#aK0LFNyCL_B_NxrfJ(ANt_cr>G$M;Xe`{KZMlT{{pV; B*lhp+ literal 0 HcmV?d00001 diff --git a/vendor/github.com/vtolstov/gopacket/pcap/test_loopback.pcap b/vendor/github.com/vtolstov/gopacket/pcap/test_loopback.pcap new file mode 100644 index 0000000000000000000000000000000000000000..ddeb82cd783c7457e3b250e6672a90b29cd7affc GIT binary patch literal 58587 zcmdUYON?aKdERhDnVcI9KzNZ5hGAYcW2&0zuIj4lXU$B@!+DTn&X5gu)0Dt4?b}ti zx{Fg)w^aAm^fVO$TxuaF5)edL1;{E(IbINP0w;>?RW{iKh?lYrEgS?kkcC$Yl<)ih zbIv`t9^KUs1rEWUs=AN!_}~A3{_~&z{wII%Z?0c^@tXbb7r)SNfA$A|we#<4FJ4=@ zeog*<1DAgnf7f69mEXdL|KAJ#4}5>&XFq=J2QUBV@3(`v{Wo8{TKcQ&U&F;0UJkzc zlkflht3TQN{@V}s!ph+3Vdb!s9gPmk&7@a3Y$pAF-0fBllR?yc8fTU8oxQ!CO0`_Q z8N8FEStINw&8U0CubV5ID>s9Ce509ll71t68png>sM~oK<9gIQikERW8z$XG*o&So zM~CqpyzyZg50~#A#(lK*B>AkpZv0Vv@NOrotkpNl)oNIJ_no~bkC(!3=V=_i9XFpQi{ZVaVbY5$wR(A_ zT&-L;#4ZndF3BHAHUk`-ulj+ zmGaioo0T`^+vd&SgSZ_J<6$E_%CbSDQYivRAZ&YEe$a0wtxo^25gvZl87#Hpb~no6 zrL@&Na?d=D`iCQcsu9Nho|QhW=>x{pHQgwXNmq(kN>$Z_0BU zOFFXp&ERH0`uU%rpT{5w{t5lO@Vy^i3(uyX*M9J`ACq=o{?V(y{lzPF4`D zXWReeYcE}U{0iE}pKbe<^S1r!>(^g#ZU5evq)$t9VQpn4eE;2>!F_D)HI5Q2;N z>(0WgeipWaAPjG3ova&gTV4y7!@VQWa1!nelfz-u>w!{2OAfay`g9Q7?soc5!weHK z9W>K)AsoitI}2%c(v8!jIL;QrqhZ{>vruUz&5B$u^D&G)Z4Ntw%zyvW=vky!7s7Pd zG%p<{cr`75ikEIz^fpF)yKm!d`Ai1fe2a%BM~0xG>xNS^N2&VZT8~+h`#~rd@>8$_mk!bx3cth zCGzj$naaYp@?*alkKd-OTiD)#TmyGa+#DvKLX6=7;$Y`y(1HxpYh%3}#oYlOdj}tS zr_&#de0VMhJj`sue$)e=z5}9Am~{G_@UwU!d=_;_xV7u1UBSG)*%Q#90D#oZUq?5S zLLy*F+o%xEf-e3xS98D)0D%R}@n&F$B?!71Kx*Kvo530c8!6OcV$dC>NgpV@eb_MH z!?g1mhM)GLZWmbW_mfOy=beSVK3Q>(+5w=!qw4m}pb8E%cnB@^-wf8lb`{)5_s}-v zMEuJi8~Ai1=||5qfQ#8$!OS&!NjdN#LvUzSv>5=t?=L^jKa5e?=K5G1vj89 z;y&KXj-o7VLL?o;VLKW1TVbbXK7flhTfvPe%Z8nUQ5Iv6Sv1VRR@qUw0K#5g2(tuA z7CNw#g`M6YNz=|jmjfCGH!zqU?}H!P7`1uN^%8pRmQrX=g5vn7(>w}pG?O8~G)OQ4 zGyuv2BlojTyAu!7MV(Y|Be-$H;U@){vt_{&F5^0+r+l`yZxf{392|zeaGKe%aJwSU z0?!b)e7)k@@!GR|@j4+uG(GFY$BxtNg~t$=3)}CT+vM52Sv2psOIqplTk-RS?MM75 zJjzknKg??Uy>xWY>I@-4l3^!?$lNXbo@mL=2cP75Oc0bIv`V`R-1&_(d=HX?1UMMN zDgymQX(%dygh=v i*j&tNB6!U;)Z9xkSWB})zuyYcUIggzi$1v$RVhCMb&xdWrV)@)+o!8KIo0g3z`oE1#OgsK>TrNp&X`a6XtLa|KeZ%A=tZS(W%o`x-p_L zem(%DpTFlL(B$bo|0mb;joX9m3E2Y>C(qCbU@cZ}*oxIoBl`%fLHJ!`mz5!<&<5MF zvP%>`6kQtDLlDBU!C|WW8MRs+8kJEuY>)b)?O-EkC*esl0?VF2KJ;6`D2>~rZo@V{ zjJMxJmnUGeM)>Vy^v3J;ty>UX80kTD&^-z9JVplc00j&|5S?CJ4naYJ*&`Ab8>oDYRn%dI%AV_uF6=nAejn>^$86;L&?;pV0zP3&_LVtBVqUD@r@f z{SQ;B%We4)$`6oJeT)P$$ljEa-;z)S6A>&Mg&%)%Z~_oghzp$gm_b5hpQa!WB4~mB z@@Mfd3Hzho0n8@IVIY3>mI6q=0wWLLS}AP+)mA(UsL-ClT)-BM9%A>zCy4hlYp5Bh3HG%%Udpiao zW@Hqb(tgkZfiwrwV2BauRqdcO-W!@(yp=!x^*dp|(+$51Vr}=b@($&2w_g%82&18w zNcz@Rzbhl0tvx>^>|v&d zqDFsH^l~fB?9YGPmr($l%|Us0*xZ4#)gSlMj6W8G&k4FmnV1+MwWM&i_PV6%hMq?P zt2WL_jSfdZc_;IGpn7iV zw|v$QAMHF_59u!umyk1}6UhIE6g5^K1f9Xm-fNS+v(XuRXL}aX_WJDrU4!VPn?$Vu z^f$A&`ebjQ_PjI37QXn}OV?ift!wgUV+-H>vw7nd&s^N%n?JR23ym$5odB`4W`z9* z>Tm6hRc6&Zi^X7wzaY z11MDmh)Rj>3Go&U=}MG?M}0`#2+|o^RfrEXcN~F+p$dn%;V2ctUgQf6_+yY=9G2*K zEK%LZ!*i;2H2lw>N;ab^V`A0&M+;$ z*pHzkFhEdVnhi(rIKacn0X=N#C1*t$f@zp4KpPL-m^nC^OoRzJ1{O!t*f$Wu?r9h} z{ZG4|iZxC-Z;fLsm4|UQ8p5WI7^7oYS}c@4jH;7< z6A|8iGD=|x9}hcpi2L!eF*Jl8l$!H5o82TOTcJaHF{EjLpUQg*hwz9Z3@C~Ft>vV> ztggE;_+i}?o`oPMl~CK~gg%mPguQTOFyg#Lk0wEax#)#a<(Pt<7(jMMg*yc~AaQw_gs^wBMZfNThXG!bW zjo^&1m~gTL@{0N#MJEfAzW1y%ebs`2knEG|D6B;FgNGFIAUR8n;E8V6$vU-f?+K&f zA?jWgtQ=cyGintpl8?#Y|+We zFgjLA^!maK!<)UyJe0OPdsNIBl?0raC@V}yjnz};$KI(jqAmrRr5C7CihUV1BX0C) z;5p`;5s`Ey*hPOjFx`v|A8hK|sXzkAZrOrBCki2gcG(A-YmVTh^_wTlY1F1>*zM30 zGmVQazz6AG(;-9Xnf?>TD$Gp+q6l{u%Hh|><-|gBPs`90}u8_h%73{ z>sYA&k|AwF+||bAtv;5%bQBoVqqZYx3TA{CT71um{lf$X3B&?Kt(#FsZp)2gh9oSn z0@0tHpxHe#nY{?76m#)LV5o?OG+H8RINA0Hf*&Mnf+fO&h^06aDxYAWHihL+BURo@ z7z6g?ie8u^S>7UHh&!3vo=P1}v>-rA8RiA`rT_@x=hU+dH$}WpKpn^np3|*UTY|i{ z^O0eT+(k3Qn)u}*ES7kvHXkoae?bn^sNGhp$?+V)L@lNCqo}jm8!LzK$}&;Th{T}5 zz-wRUqTS};1pBIzP$N^U0HV@Bjf2IKunTtOK8s?klUcJ=LsAx4%b*_Z5QB}oZHpuZ zSiqd(KpVvlK2%i?B`#3W7gNIluyw=*GY%fH0RIpA9?kS(sFxF2m8MR^j3XTn0{0dc z09TK|H}PT)}y1`M5r#J)pLMYfB;bJH(3Z6x47}riNq`^^J!Q>D5OD*Av0P9Z<~QW z#x(u=7W0NZcj%@guDQRL?7!Pjj{Ey6&#*RU?$95RJ4VvwrojCX<9lw(OJOq}a*5Fj zQwm+-Nw)}NL<|JwF{pU?DLYiTE=!;c7d*tkOYWFlUCEJdmX)(T2M#^F)-1Rh>=2(Li{8Y(72IQa0oSCwZstcUvk?xU~=Wz$`x ztOj2pD?;7EG+qjqxWO#%feyE{%uz#ni?Pa%8j-v%YCXv*K^7?;ejmfT2|ypBJYo@L%-E3uC} zoMWyA7&k?Y*h6CzBk)#Xv<*Rhtc#`4h75^G*n5B#xlVJ`jZBDaDS*@hQIOFP;)ik; zRM7X<#Rht65-V|&B*M`Xz^d0NNy>qUO6X*+JVRA3Ntcdbi?8T-s6`djT;)8BhHxj+ zG*DSb7d6*8BIy_(^OqhV4H;UsO}My%SsR_|&rn_%AA%86I9Euh@hm?N^aA-3Laltl zi?YgF2p9mXY5ATe52Pi%P{Oli122RMmozZmi?Fl-j^`^9R@C?-*E%LbwhzVP_1}PN zcpHYFWBi{N-Ko0(hD9$-dvF9WVGs(`JQxm>p-jtqueb<53W^JBxeT#VLdK#g zQ}AaP^98o4?jjd+6*~s#R%TLLDjH@en~TTKfgy~-!%#j6;)eG;+)RK|o_3O0{8E8Y zaUM3}9T>xS+7G8c;A2fhGnf zbP{+q4u_+@x`$i_V+;jjOZqXzrMv|Z1m`(m^J!-M8?hY>r$H(XL#xe2+~>{`jbqsQ zO|guDcQ}}BiqWB{25FwwHF72}lpa$LG`3(=<3sq*`*-`T{RjP)M6(yRc`3xD&|b=w zp_O*(1{}*u8L3i@Vpvb|F7=UpS49Uh{d%Lm$X_TAs=K zwJPPT*UM?3AqrqY(OrSWAvCzCt+yz);0{P8gJl#A!+YwZpf{ueC#r>+#2qm5GSI9c z6>#uehRma3XA+=m6HHz>4r~acgi9FE)kBS_9`Gk;BTE^E-8@k!U0RG_0phL#5EF%4 zD3*|oVfGMdr}K$6=rJnq0s$7zfITS6NK2U)e!{Ny|h{PDGR*3B3+uNDs8Dc{ygVphfsIkUhoGzy=DO zN})=VPWPY}NZeH3c`vYqXmhFS2|L8-LgUZyT9a2m5mxt>BpIHPVV;mbXr=p<_;f1C;%n_ykOV_c;38P zcC*6$A?1G>+a@j7qLpK50k6VM93nDr7bJkyw`fS)R)m7&eZ$(~qrt?6B$T|69+t+R z#wQ>I zvKg1I$Ua8wOiViu>>BnbLQ`e~rOLfTvOio<9X%4uh#WXBc>^!f?=89O>Gm-SF4A{_ zmeoST;`5z5Lh`iqrkPru^ytJ)PPCJZ-VW2B1yjm@GZoX#FoBw0us|O|7x^SuP&f3j z#C58!AVnCG!ChEeS<&Sq!RMi{4G7W^qh-6UrW)WUUgg5LrP30cgn>Ex0d#@IYLdq( zFwQJFyn&3FTk=nsjZ*{RDBiF)*s1vjYP^b{!I_fJ!bez(fz6VKT&)e8FQXf~;*nkX zhQi#3aWmY1A8z-3i8CT+*S}5MXBgtPU24khjYnq9$>NdGM~M=^{+2}s#5j>U1`mjl z6}P;VFWc#o6&-Lj*@jeujM+eMIpqV(&P3szjb*u4qd*j3c~2UqjKbAr#i@Id}#~@X3kD4C>L)qrng2!w$kY>M`(UsamVAt{JDsd&w|{BVI+> zLqtYP+MRh84iB$qa-zRt$*BD{RDOfzpXYt`P`%#-H$;=u);z4m?z|*;T@_B z7=L44CHgh~)c`{Nd8XtvoKR_&^XRg1;t<79N(}Z3jVm7;u51LS$3Z=6&V%f-JWw!r zCKi;<*o3(XP!t{MFDlY1;q1YF;7co8xMDDTN=qE^7^+sp!zcJoTDMoN0ub5-D7pNP zb_0BciL3lnfmNaAPX@LXgTgVV+T@Z@>(YAd7fq5zE-m*;FfW&mR-S0Ad9j)VEVes{ zj%GHwMCN;U=g}=J#sHxZSQI)fx@WNQm}*VDGk^{g9}dX~zi_cUo(-HoZ?k?im6`+Q z-;}Ioh_DWagM{Yav0o>0nce$S8W|7zENl~OvX9G;{}tNQ!JO9Wy=cG{qDRQSFb#TF z&e@id*+XP0pheSK;o6M$49o;*Z}bn+!L87IqCSVdqOu|KDbWDcf;gJBymQ1z~qFiPjan=r$%UEQwyh}20C@+Li=$zhbz?v? z?N$jfbh@NWqe9BMKcpwPK>PDd;y5pDa&j}_$(xIGR{-q`2+U~{7~^a9VCOc4>`s*w zZr#VW=`NhJCB`XC8~i%u?KxPEZ$8B0zMVAeHZeCQu9sZM$3D6kmi8sQilhsy{D>8@ zc(GBK2#e|4{3>MyT9ROohE3ILT9nSGbT}_DagGeGS+;LWgHT$Gw}mA{S=|6GI4|kJ z!iz*R-j#pvN9e)JTCPJ!i|Bvk%DL)PQ-GndgF2X=|}cZV=v)DX6l z!6h?|D?w9HI=fCTDn-OdHtZ?ir%e7dIiW^2cYyni+~b8QEzN-@aFyStz_M_SmIeIN zk3W&eREXwpOzCvK;XjE66EncIDeawi64LVIJaGB+sZ8&EUa66T1nsz-152Dejc^H` za37ULY*Ip&$G#Sk<}=M+ks-)G#qGj*my%I70ZzGk1pqazPl8l#oDS4kV>mxprKJhL zrXFDBi7N!HN@kLOj-!i#)7nRlg$!LxTpu%<-1F9|@FJyCMshBoa&}`*T7eeT<0<-R zO|vDW7>1lOk~w(R&27wJD-6O}YbC4@h|Ha$a!=(CPSZlq=Mew;lnJoSneE!NHQS#3 zea?3L#Wd5Df9ag9srPK!(H~P z@(I`w`_Q6gF?>^>nK>k(_c_MpHzU!1yg zK7i4ydo!iyxlksJYNu{SLQkcMKF$5B?2^*9Kp*}bc@v#Eg>bnko-(_uomkN`@S*6m zma44D`OKm6~mV?2UfPY+yIa;-qs*pR31sJTtuWIQOBnR<< z6tz;ITT$=p&O#ej=`zbPHMUlMQx|vm%ni2^QGvUEcC9}q#FP)Qq+-5s%xvc(ZM7tf zEUme(mufF*YGd+wnU>mcT~lexe!EO-T`saq{TgYq@bl8`Qgr3bnqQY`b)dyAi<9%3`=XS!EO(tnUXqnVeciWydWnGlVw zmSKo3CFp~hDO|J0X66oe6{u7O5N_{Z}9k~q)+zGgoprjM4-4Uovre-$7 z5D8gKup3Kb@mqHVj0Uy=D^`fnncc~@c~hCkOBiP=TDv%wHn79e3i-|r?u^##k4}HC z&baxQ#9#{2a5_lrMZ%TttuOnH0y?^al2hd`jIf-jZhwcpk_7 z!wh+B`bn}Mr)M9IO%u~XhOnen$iffTc{CZ-(73|KW&bnt&^+J5z9PjGt8g*hMrugN zt^hobr^JLoh}zVQkXQ7ZSMf`!$`aL>3@dghTLp^ZOUfF63%xC+s)ekWQ=&ks43aLH<}b;g zcnhULNgh&oQY$R^JECw)>|*N^=>}`0F%gLn0w9{e?4i)D$)e`k(hX$+H%WmFWp@Bq z*Yy3oCIHC|Bar97Yk|Hwhvc-Dtx1wCz^9n4GoGt+8A@5LZ#C+x8|$Eyt%Yq#3NjRe zl5(I>R49Z3Qy=flEFnH>UfK?%EtBA<>Pc4dm@JE}Z%QxN_e^=zB7x$Ig%bOfcKDC` z0&b~`B~}DY0h`u6yh;$Qt<)R!wbiZHA8)R(DhNz$OFZWQRpC9S*>k<_&2#Qqk9nzA zI_dSzMt!|n$E2%f(x$ib&Uw;bc4U&HcJ3+D&HrT}d1Gy*QQz2F!+h7weA(4`C(Cz= zQ3y9#8g4=ae8%yGyHX(PJa;oEiyTtui$YRO6j{TzVN7XTF) zU|{moNZyhGKgV=qo?~_iaaXIZtTt-ZHIVfx>_-E0m#sEov*!=Urs$GQsooLKb$kKC zqMDfY-aHN{s$aB>nlpLpsuYne-{~RAX=1Z53qh%QX^acnJJy(@wLR0P&^?dFnnIqr z6z*}qhzH7r6a+uSzQ*Qg7K&kM;P9hIj~{bi0q-BWPQ~x)^d(va_k6A%0X|kW z;J(hZKm`W9LI+d*63gAJHN>L(hQ`gV79oqgr0}Hdrmz;nnbA5^;nOUk*_Q7Ve}C5- zhExT&Z#fclg*pV$DBXn=vJxw%r3fM8$D*kaB7U-c%WP+5Arm-6F=!JEVe4%I*4*6L zm92+xh#8L)Czy;>EEBdU4i8G$p|BK+CQg$72u1m|=3`#Q$bep2=AaD_hjEYlwGjwp z;L(ItJVF*CX7t699R@EOkk$PIov^yK)EHkvSr%5Akxg<3@iFL^GnJiz5IzVb+Nw*I z%-kr1o}?fjNR2y}1JoMi?kiVXj9YXf?M4DY1sQ%?H&V=KVnTVKQwbYmMs#UR&{$G3 zS}!Le>HNMp^0O$2kKiyF#Hz+=NnREgyV!zAdno}cPhdPV`#0k(zCTXG`q1<-m*wKbvKnR-Rx zS1e2G_2$iEEj^nB%!-Yj60e&}`1wIAsHPp?WYzeE+7)!b!71vTgBwTv zyi5tG96RCW>W&Ov=mR@ey(+a6+vE!JSiy3tc|9I8)K>s{!bMfS#L{W}$Poh!)+k~f zWL4B*QXk@|71ljD38avQRN;1}IA6^7En+V|R5;B%*;H&~SOy%>BF_}pEg_r0NqeG*Pxe(PMXEw1=?RI(8J;?s9^@BMU5b+ zQ+1Ff4S(aeQW9#FMIRc zkqHk*3|X&kg0`!OOxgxd4c6rwmx`N(5R)ptUjU4M%f;(RwXwhH8oq9tG&{0lDE5@N zNcNF&n7Nonk%VklWxD~*hB)nw%fJiAO|CSmD-3$o7|S(#+-4C}Dc@#w>V~)itZbux zIYBHBvc{>@`lU*cumt=K3mfBKd zj_g!)wv;%Pwxe?J&@K6+Y*S?b^wgy{&`x+GU7geYM(H-@w9P6`BEU&!hsMXNvn2 z3y8<90&fiQ+rt9nyahSTu05%t=>-{%MzEEZxj;)&2?Shbkxx&npnnTQ;jBBzX$?5w zHz$y7FL zL;b7Mh3j}$i{Cx1@b%T)vZP^IysuiH#&KCO>g zTsZC7vE3d1Q0*3lQ`OqEHfJb)PG7vvp{WqWz)yJC#i4Jgzk<_Xvhc}=yL$}QnRsGk z%NJ=lTgsi_6$!Q=$F9=^g5Q&}m}$7OytTDO#)jLVM_-DHury&JQLqXv3N5;rma6)b zUnUF>j(Ti6h!3R8NY7erm6=}~;16bgDeKNcUMc5t4r$7+VJAst9_}A};dlEt?i{c& zi|NaAe7&~TsIISIm8U+&@wN{$ztcG1K02olVb78zN2jtVXmp4~%Bkpmgc(9mV7rKa zA$}kYYDpq!o2d~QU;m$h+Rk>kBIm%a|ppStzTuC*jV?m6`L9P)6KiNw3vC;KhEl{-2CT$Us_wW|i311h~8w=<%4yj(Ycc zdJ)d%;DHe>yKZMp6Z0f9{%m&7BbcxQQzjcAXIMQ~S7MB!klZoWKk_(%2~KG!jt^^$ z1@^BDm)Z|e3)GE5?Lyvmqp*EK(c*MukrLDX$pr}SS|Rcfiv<_MmFI!g);FQiHdcWw z=9jU}8A5`$<`fE-3M@!JuEMOE8Jfmtmm`Kax&p!7L3m@!*tw`_l_CIL$>HZ=#tobD~Wm!0HNY z1g(*5E4p$q*NP#;T=qca?x&U)lZx7;eks{$kwFb8riJ+0Ze?4n4CNwM)Z7X-8VXjS zs_o!~Z#aQVhi>Xyo12Z*mHH-ps~WfhaTT^Z3-;#ryoD$V05|VW0rSLkr_Y%K^Q%+v z_hsy&`o?;V=~GA}tX7dDgen)a=I!c5Os|Adm?s`7IG28vSxXDT(MkuL)O_Bx%-^;^ zYO=22r2&DUEAlB%0zF=g^Zz2bb%=Q9+al0We4VBdmWSOqj7_(dP ztV~mFf~OagKfP2_TOz|wXl7B70=>AW3sgfXli#5NxDdIFRUx@FOg1+GlPwxN)vCCK zQkVNoDjBbOQUHLt>87u7+%_0POE<^H=HodW(w%dUt$dszB!z^$Iw_Z){d#@P-4s@MWMXya$kUp%F0 zfg&nl;~wP;bz|OzGmdl{gP5|gR0#+k$|@!%{hI*p&+07za`}zJ>=q=j{GK5_tajn2 zwJ@*59bnG&W}VJ}NyatM8FxaZvk4D?r-LXwP;&UxR5^K{3V{9~DaJ-0Gy>&>g?I%8 z*UY^Mgt+f>baoHxXHrMiVoK;#4{cCqQQQTIKePHht5MJB-8O|0XkzLd-POqnb1P{!qd5c&-3L5X3PRs(eZvWR$hfqJt(nzap1bss@9M!RFwL51 zfNVBF_}?5BA=?zWRymQksbOx7Enoov%L$SMDYGDEY@VDsd}H#A`!LirAO_-=0sxskVYXPSMlu4@me?MT3B)l$Tu;%HoQMsx=Aj+Q zW2Ev{91pP1i3_C`Hhh@VwsKOKecC^{Wj!GWq*l?z{7o64-OJ3xoJ}lg*J)uIksxiK zCKu#^3E?m^Hbi!kgG3x}c-#I^WgW2ffR+cF!7=tQHlE7l6Zp)&toYRib(a2%b}XgG zOwJ?SXkDlAAcovF^AyfdLE_%RI+uihh~mRxbb!N4aNsVo+%N!-b_3*hB8e63C4>XD zfU0HJS`dHv~M#7MvBS|qIXP=PJWgj#}36uNvEC(70 zK)1`787JN`H06j!7ZY{Z3U|*PkLZqzjoKFS9_n=xG(yT&q>drY0T!o9jP-BdK#WH2 z7*6d-OM5`c+s7MVFWVA!XYf2 zI6~|jPsl_JsU}Jy-l51b>_s(`-K^qYqMu$JDolk#w_%xX1nCvO6-2V40Hz*PGcs4 z_CSUzNdQ;GXt-t7 z9jBz{zsd4u#LWjxgv4XWoq{YuUP02t=2z-rO`{528Wno;(x^!4mWRWx3ZDF}kf#bR zSDAq20vQlo%!YwLVm%}TjeIJw8T2ZfG--i3nWDCtn2EOULTbwXq`*wB)W>Px87%-b z%5d_Xu*TC2C0J#)-ARW?ZkgSsI2znk%yaF~CF{H#V}q@3d>n=)O!Y*BC=33G>nKNT zAx4*ActX#^A@}<5kgG+HvvsjUcgLC;QI2nheg7Xwe7FSWO z4w6`JMegk?65Kc7rJu2!QgG(9u~Xn!Z0OvetofB8>lXy2x-J(3qM}`$#?3mC+dztl zxxnexR%gIZZ%#mN{`KJdEHr3kJ+nAPF;12AIz(T1@a23N^XzqJW?`sSVNW8WSX4yU ze6{%{+G2x|t~6j9FwOOT+{6|x_>q3!LRET%ZO&{nrI|e9dZ&QY{Z}%Eu_17&h)?JW z80{CaP5T`jil%jQIa6uTU#*&V6uNk20dbz8NPKk3AH>Z0!u-T|3&LB*C!Oo4<*PCL zPhUsBm!J1p03k|9j(89#;0Ghxl#8S}Eo=CSPaA+R^POw(@ahuT&>|stU_zTRIuynT zs+vjx46Zi8d9#M~0c>#-U$A9ATXS`IJjD7qLI6aDHzniHJ>s9%vEK^%_J5wlHo3D4m>3k~C~VKC#DP9Kis<_i<5MTR_uCJOJeJdH-qK+>lC zvjZ7;*w%}gl)f{WpT%Jji9^F`9b#E))T9WNi|SYQlm4=49UP=_Ain1ntMrL*W?vv% z>4fYMS<}~`++Smgor_bwZx5oQf z5G#yKk-VXiWNJoB0FuE3J8szPy{Lta6L9C5v|wrmP}weN05rfOCNBqavY3=36o#&4 z=Ng`~(>8Ie=|=TfGz&3Pox;VUSPFl&Wwy3ZT?RfsYlkCESeBHvZDY|)TRGAPithf! z56&rgw{B`q9d zK<7-MP-0TduA?SA3QKZlHEjJtm7cG5`>H$`Cjl zVw5y*u`B@vDvNXFLT@hNB6Fh{6Q&cS6l8@RMyac|-{R@weh+wVCtbLFY}0PpFcsEu z&sO+waYjQ1#tuNvUR1C*XM$&-3nscwspNt}E>e=mG)YQ9S)=S*S_43dNiIS@JdFp4 zi8IpJov%MFpw8D-z;zD$2})rXV1>?{sZw&^6k@pNn-V4ehkK%^=S#((?x}GFTpGXN zp3G%?DgUZ>X9AW7Fj*!)o%C$fOkT9Fzt=dg)K;D27xMkh-iac=P&zJkUTOOe?gF%6aWIzy(z;NQn&LmPe*M?qPcM7 z4_`UJNNrhxg!RTFD4N+=2~O`VED$`;%xd0n#y-vBgutS*OaWOZ>}=&7LL6FtlLaMB zyidX&N`zQ~P&~JmureW9HZNaHbLf?L9qo?(z|(YISuLWtOU&HKY^QH?aCL-p8pb zJ0HsYTKfakILSM49t~+#cwnG5bzUsaSUWUXF>|v$bv`lk$nBbI%*DpiLqp25s4XTs zpGEarooAiaDB|)ji>S`mec0@vF}Hr8NwJ(L0wj!&%r_=bFVz<#^kRg!pHdPxqmGN&>Hq z*D;h6EzHJbm|?}4e&}i#s!zp9m|}%4n@%!Zz|#mqQST55@$-(Rnv6XJYzNk7tH?1a zC9E3r3p`}nZH!hb#Dz4wlGtU9R`{)ur7+L~cfv}#$ZL6%Z8_?pwDWNPgGcYZJ-bmX z(;7=Sb!)X_aw7kEn#8y=X;H7%;k4C%#h6 z=ugaPsL*o6B*Tg=Tb4i;jZl_%&eG2ll(fe^MhGTUJhM(~FVm&qAkd|(si9tYmrg#e z&BevX*p#AF3rioBdQqHvM(Ck1_tU}TR?#j}fpA9znZXMQS|aXtj6&Iw30UOJX^%k_ zjPxX8gqk&OLD&}OWPa5ii(E^Zf+fd+G#Vtd>Lkf|3g+ZMn2Nm) zZ6%y%gOblcIxDZY5dEh$-US>{owN&aa?t5^vJ=Q&GZ3fTA}w|59hfSXvlvpyE=f=N z&7)z`M`1?*i9zQ$we_m0SZRYCfD$2D@Y&`NXOcfV1cIr@?=YEkgnz zTXY@Xxf7a!XjPj7bo3N$8N1#*Rj~h2_PD$QEt_@wC2-p6tp`M3L%vGq>fuv(6)*sFD@Wf#oUF3yao>SGr_`+9mLRa^DqsS4AA89yUTITm;J;U#{RUNE356;9$l zcQ%@iN@JJR`bHi5oa!5_s=BH>ovf6Z1w}panO=cT_^cDU$AD#F#LWxn?7ns1xleTbW>NQ@?4=M3^Ka-uCU zoU5`|>IB*C;Z9)(e;}E_co$A>HsbLyGhW7P1C&4E8Y~Yue&*E^zeRT{KrWfsJ|EuS z!MY+GuPhnlJ{F=Fh#_joaaEpEVw3J%*?XKJ!XaR_k>Z3C*XllZMQ6uX2L*8p40|bymbiN}1ow{PQ!zy7cszA$pZ_t8Sr$Z>>(`P1$8N zvA(Q&+(#S-gjoqx_}#;s+s4i7PNTRd4M@hUo0&>has10bFG@vJSF12)YDj%H9n6K< zD?q9yHD4u0S@6EPDp|P57|{0TnvFgRTtX~Eu6l@^U_i@<{Iq$*#bw6J>JyYfUO^dT zPGb$zC^l}UGhW`O_z;5vg*9>^Jh(8>3pR!7l$==ijJ#$e9;#Z5WS>YdrZOoc8Q1;H z*wwQ$V_6g6M_+sC+FyU=n*9C7wQJXY_l58M@GF1(E5C)W{(mp{Kk)s9*M9J`9|!IA ze;_phUVZ)gSNEgkfPt{=;S7II78Exr3*N z%ifvRh~$8T@-wdS+niM&+_#*MlyKy_a1sklD9bu;#ayKxVlYTNtI~a$yU6CF+1^I%H z*0xK`D3=$u%UFkqw()oiLjeTL^Z1Vc?OS|Jx6t2N=wsvyc^h5Y8);=>Tfg{?NoSLD z(kr${Y1+)KFcX^EJjF-bwTAh7#ENLcP9#W^1va?cL&NnSa z-Z3eDT>X?JtZ&u<7)*g3)po&sTJ2)-8!rO)ibt@E8<4LITyC1Okidz`mtVqEb)`a& zZKVJ(OBUfhyN^!7?{6p5rvVf)%?_j)1mylN!TpcH&ioVZC!2?7bN|nN{Mrx5`9b{b zZ@zft8-I1J%JNb-gN>V5J*t*h%5}VZfS1d+4?T{nW={hl0!Qp3>EYaCO+2I@m;h5cc_zXSrjqsm_fqUKn z<@os6hY3S@mALO&to-C=A1r&BKC;pixGiS2;+qli42LR@TME2i=&5q?Nv*Z+`>n2ZN-{mhtR2 zDB!)ezacjzB7nOr8gomOG~P&2pb;-{x+#bt8gx>B!k?y$WYY`RnXpwA$8-@AVHXUku86|Si&ck zu>?v4A1M#%2{(h4oA`(P_1`YdyMMd?#VfDgf(xQ3$!CokABbv3` zOw;h4y}g}EwOqX!yn};uU_2zqGQvr*Sz~i$6G(#Zi_I|P;sK3}XECm$JW;$% z&v=-08&I{+m!X#L;EhM^x;{C~Gfo%5xh_I&5eO<*>g7H5IfYY~y*fqiV3*fAsQ? ze(m-buPpqfN2#QypOSn3^&h=-?Vmx}^3Q6=YX@gjYN72{(e|eWO8u!N%doz(%5pfM z3q2qCW`K|vNov#wNv(&!jf@VER6XPYFes2+Qx#dC_f`aYIfpsyGc$)C=P;}7|MSN$U8?|A{Ihtt{*^iKAhw^u@vFC5*Z-cQz&|Hk zoUA-dpr}(Q%l|jB@<{^1uC7AVov5r_Sw}S_{Qq}RRzgJne=Zys{$z~o&nFyz@$!#; z{WS>3KlR9-y7+x6X*Ix_TckV(s{;oH3 Ij_xo1F93dgt^fc4 literal 0 HcmV?d00001 diff --git a/vendor/github.com/vtolstov/gopacket/pcapgo/read.go b/vendor/github.com/vtolstov/gopacket/pcapgo/read.go new file mode 100644 index 0000000..53a2d71 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/pcapgo/read.go @@ -0,0 +1,135 @@ +// Copyright 2014 Damjan Cvetko. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +package pcapgo + +import ( + "encoding/binary" + "errors" + "fmt" + "io" + "time" + + "github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket/layers" +) + +// Reader wraps an underlying io.Reader to read packet data in PCAP +// format. See http://wiki.wireshark.org/Development/LibpcapFileFormat +// for information on the file format. +// +// We currenty read v2.4 file format with nanosecond and microsecdond +// timestamp resolution in little-endian and big-endian encoding. +type Reader struct { + r io.Reader + byteOrder binary.ByteOrder + nanoSecsFactor uint32 + versionMajor uint16 + versionMinor uint16 + // timezone + // sigfigs + snaplen uint32 + linkType layers.LinkType + // reusable buffer + buf []byte +} + +const magicNanoseconds = 0xA1B23C4D +const magicMicrosecondsBigendian = 0xD4C3B2A1 +const magicNanosecondsBigendian = 0x4D3CB2A1 + +// NewReader returns a new reader object, for reading packet data from +// the given reader. The reader must be open and header data is +// read from it at this point. +// If the file format is not supported an error is returned +// +// // Create new reader: +// f, _ := os.Open("/tmp/file.pcap") +// defer f.Close() +// r, err := NewReader(f) +// data, ci, err := r.ReadPacketData() +func NewReader(r io.Reader) (*Reader, error) { + ret := Reader{r: r} + if err := ret.readHeader(); err != nil { + return nil, err + } + return &ret, nil +} + +func (r *Reader) readHeader() error { + buf := make([]byte, 24) + if n, err := io.ReadFull(r.r, buf); err != nil { + return err + } else if n < 24 { + return errors.New("Not enough data for read") + } + if magic := binary.LittleEndian.Uint32(buf[0:4]); magic == magicNanoseconds { + r.byteOrder = binary.LittleEndian + r.nanoSecsFactor = 1 + } else if magic == magicNanosecondsBigendian { + r.byteOrder = binary.BigEndian + r.nanoSecsFactor = 1 + } else if magic == magicMicroseconds { + r.byteOrder = binary.LittleEndian + r.nanoSecsFactor = 1000 + } else if magic == magicMicrosecondsBigendian { + r.byteOrder = binary.BigEndian + r.nanoSecsFactor = 1000 + } else { + return errors.New(fmt.Sprintf("Unknown maigc %x", magic)) + } + if r.versionMajor = r.byteOrder.Uint16(buf[4:6]); r.versionMajor != versionMajor { + return errors.New(fmt.Sprintf("Unknown major version %d", r.versionMajor)) + } + if r.versionMinor = r.byteOrder.Uint16(buf[6:8]); r.versionMinor != versionMinor { + return errors.New(fmt.Sprintf("Unknown minor version %d", r.versionMinor)) + } + // ignore timezone 8:12 and sigfigs 12:16 + r.snaplen = r.byteOrder.Uint32(buf[16:20]) + r.buf = make([]byte, r.snaplen+16) + r.linkType = layers.LinkType(r.byteOrder.Uint32(buf[20:24])) + return nil +} + +// Read next packet from file +func (r *Reader) ReadPacketData() (data []byte, ci gopacket.CaptureInfo, err error) { + if ci, err = r.readPacketHeader(); err != nil { + return + } + + var n int + data = r.buf[16 : 16+ci.CaptureLength] + if n, err = io.ReadFull(r.r, data); err != nil { + return + } else if n < ci.CaptureLength { + err = io.ErrUnexpectedEOF + } + return +} + +func (r *Reader) readPacketHeader() (ci gopacket.CaptureInfo, err error) { + var n int + if n, err = io.ReadFull(r.r, r.buf[0:16]); err != nil { + return + } else if n < 16 { + err = io.ErrUnexpectedEOF + return + } + ci.Timestamp = time.Unix(int64(r.byteOrder.Uint32(r.buf[0:4])), int64(r.byteOrder.Uint32(r.buf[4:8])*r.nanoSecsFactor)).UTC() + ci.CaptureLength = int(r.byteOrder.Uint32(r.buf[8:12])) + ci.Length = int(r.byteOrder.Uint32(r.buf[12:16])) + return +} + +// LinkType returns network, as a layers.LinkType. +func (r *Reader) LinkType() layers.LinkType { + return r.linkType +} + +// Reader formater +func (r *Reader) String() string { + return fmt.Sprintf("PcapFile maj: %x min: %x snaplen: %d linktype: %s", r.versionMajor, r.versionMinor, r.snaplen, r.linkType) +} diff --git a/vendor/github.com/vtolstov/gopacket/pcapgo/read_test.go b/vendor/github.com/vtolstov/gopacket/pcapgo/read_test.go new file mode 100644 index 0000000..c2e6397 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/pcapgo/read_test.go @@ -0,0 +1,119 @@ +// Copyright 2014 Damjan Cvetko. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. +package pcapgo + +import ( + "bytes" + "testing" + "time" +) + +// test header read +func TestCreatePcapReader(t *testing.T) { + test := []byte{ + 0xd4, 0xc3, 0xb2, 0xa1, 0x02, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + } + buf := bytes.NewBuffer(test) + _, err := NewReader(buf) + if err != nil { + t.Error(err) + t.FailNow() + } +} + +// test big endian file read +func TestCreatePcapReaderBigEndian(t *testing.T) { + test := []byte{ + 0xa1, 0xb2, 0xc3, 0xd4, 0x00, 0x02, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, + } + buf := bytes.NewBuffer(test) + _, err := NewReader(buf) + if err != nil { + t.Error(err) + t.FailNow() + } +} + +// test opening invalid data +func TestCreatePcapReaderFail(t *testing.T) { + test := []byte{ + 0xd0, 0xc3, 0xb2, 0xa1, 0x02, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + } + buf := bytes.NewBuffer(test) + _, err := NewReader(buf) + if err == nil { + t.Error("Should fail but did not") + t.FailNow() + } +} + +func TestPacket(t *testing.T) { + test := []byte{ + 0xd4, 0xc3, 0xb2, 0xa1, 0x02, 0x00, 0x04, 0x00, // magic, maj, min + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // tz, sigfigs + 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // snaplen, linkType + 0x5A, 0xCC, 0x1A, 0x54, 0x01, 0x00, 0x00, 0x00, // sec, usec + 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // cap len, full len + 0x01, 0x02, 0x03, 0x04, // data + } + + buf := bytes.NewBuffer(test) + r, err := NewReader(buf) + + data, ci, err := r.ReadPacketData() + if err != nil { + t.Error(err) + t.FailNow() + } + if !ci.Timestamp.Equal(time.Date(2014, 9, 18, 12, 13, 14, 1000, time.UTC)) { + t.Error("Invalid time read") + t.FailNow() + } + if ci.CaptureLength != 4 || ci.Length != 8 { + t.Error("Invalid CapLen or Len") + } + want := []byte{1, 2, 3, 4} + if !bytes.Equal(data, want) { + t.Errorf("buf mismatch:\nwant: %+v\ngot: %+v", want, data) + } +} + +func TestPacketNano(t *testing.T) { + test := []byte{ + 0x4d, 0x3c, 0xb2, 0xa1, 0x02, 0x00, 0x04, 0x00, // magic, maj, min + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // tz, sigfigs + 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // snaplen, linkType + 0x5A, 0xCC, 0x1A, 0x54, 0x01, 0x00, 0x00, 0x00, // sec, usec + 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // cap len, full len + 0x01, 0x02, 0x03, 0x04, // data + } + + buf := bytes.NewBuffer(test) + r, err := NewReader(buf) + + data, ci, err := r.ReadPacketData() + if err != nil { + t.Error(err) + t.FailNow() + } + if !ci.Timestamp.Equal(time.Date(2014, 9, 18, 12, 13, 14, 1, time.UTC)) { + t.Error("Invalid time read") + t.FailNow() + } + if ci.CaptureLength != 4 || ci.Length != 8 { + t.Error("Invalid CapLen or Len") + } + want := []byte{1, 2, 3, 4} + if !bytes.Equal(data, want) { + t.Errorf("buf mismatch:\nwant: %+v\ngot: %+v", want, data) + } +} diff --git a/vendor/github.com/vtolstov/gopacket/pcapgo/write.go b/vendor/github.com/vtolstov/gopacket/pcapgo/write.go new file mode 100644 index 0000000..858bf63 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/pcapgo/write.go @@ -0,0 +1,98 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +// Package pcapgo provides some native PCAP support, not requiring +// C libpcap to be installed. +package pcapgo + +import ( + "encoding/binary" + "fmt" + "io" + + "github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket/layers" +) + +// Writer wraps an underlying io.Writer to write packet data in PCAP +// format. See http://wiki.wireshark.org/Development/LibpcapFileFormat +// for information on the file format. +// +// For those that care, we currently write v2.4 files with nanosecond +// timestamp resolution and little-endian encoding. +type Writer struct { + w io.Writer +} + +const magicMicroseconds = 0xA1B2C3D4 +const versionMajor = 2 +const versionMinor = 4 + +// NewWriter returns a new writer object, for writing packet data out +// to the given writer. If this is a new empty writer (as opposed to +// an append), you must call WriteFileHeader before WritePacket. +// +// // Write a new file: +// f, _ := os.Create("/tmp/file.pcap") +// w := pcapgo.NewWriter(f) +// w.WriteFileHeader(65536, layers.LinkTypeEthernet) // new file, must do this. +// w.WritePacket(gopacket.CaptureInfo{...}, data1) +// f.Close() +// // Append to existing file (must have same snaplen and linktype) +// f2, _ := os.OpenFile("/tmp/file.pcap", os.O_APPEND, 0700) +// w2 := pcapgo.NewWriter(f2) +// // no need for file header, it's already written. +// w2.WritePacket(gopacket.CaptureInfo{...}, data2) +// f2.Close() +func NewWriter(w io.Writer) *Writer { + return &Writer{w: w} +} + +// WriteFileHeader writes a file header out to the writer. +// This must be called exactly once per output. +func (w *Writer) WriteFileHeader(snaplen uint32, linktype layers.LinkType) error { + var buf [24]byte + binary.LittleEndian.PutUint32(buf[0:4], magicMicroseconds) + binary.LittleEndian.PutUint16(buf[4:6], versionMajor) + binary.LittleEndian.PutUint16(buf[6:8], versionMinor) + // bytes 8:12 stay 0 (timezone = UTC) + // bytes 12:16 stay 0 (sigfigs is always set to zero, according to + // http://wiki.wireshark.org/Development/LibpcapFileFormat + binary.LittleEndian.PutUint32(buf[16:20], snaplen) + binary.LittleEndian.PutUint32(buf[20:24], uint32(linktype)) + _, err := w.w.Write(buf[:]) + return err +} + +const nanosPerMicro = 1000 +const microsPerSecond = 1000000 + +func (w *Writer) writePacketHeader(ci gopacket.CaptureInfo) error { + var buf [16]byte + micros := ci.Timestamp.UnixNano() / nanosPerMicro + secs, usecs := uint32(micros/microsPerSecond), uint32(micros%microsPerSecond) + binary.LittleEndian.PutUint32(buf[0:4], secs) + binary.LittleEndian.PutUint32(buf[4:8], usecs) + binary.LittleEndian.PutUint32(buf[8:12], uint32(ci.CaptureLength)) + binary.LittleEndian.PutUint32(buf[12:16], uint32(ci.Length)) + _, err := w.w.Write(buf[:]) + return err +} + +// WritePacket writes the given packet data out to the file. +func (w *Writer) WritePacket(ci gopacket.CaptureInfo, data []byte) error { + if ci.CaptureLength != len(data) { + return fmt.Errorf("capture length %d does not match data length %d", ci.CaptureLength, len(data)) + } + if ci.CaptureLength > ci.Length { + return fmt.Errorf("invalid capture info %+v: capture length > length", ci) + } + if err := w.writePacketHeader(ci); err != nil { + return fmt.Errorf("error writing packet header: %v", err) + } + _, err := w.w.Write(data) + return err +} diff --git a/vendor/github.com/vtolstov/gopacket/pcapgo/write_test.go b/vendor/github.com/vtolstov/gopacket/pcapgo/write_test.go new file mode 100644 index 0000000..da4a004 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/pcapgo/write_test.go @@ -0,0 +1,71 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +package pcapgo + +import ( + "bytes" + "github.com/vtolstov/gopacket" + "testing" + "time" +) + +func TestWriteHeader(t *testing.T) { + var buf bytes.Buffer + w := NewWriter(&buf) + w.WriteFileHeader(0x1234, 0x56) + want := []byte{ + 0xd4, 0xc3, 0xb2, 0xa1, 0x02, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x34, 0x12, 0x00, 0x00, 0x56, 0x00, 0x00, 0x00, + } + if got := buf.Bytes(); !bytes.Equal(got, want) { + t.Errorf("buf mismatch:\nwant: %+v\ngot: %+v", want, got) + } +} + +func TestWritePacket(t *testing.T) { + ci := gopacket.CaptureInfo{ + Timestamp: time.Unix(0x01020304, 0xAA*1000), + Length: 0xABCD, + CaptureLength: 10, + } + data := []byte{9, 8, 7, 6, 5, 4, 3, 2, 1, 0} + var buf bytes.Buffer + w := NewWriter(&buf) + w.WritePacket(ci, data) + want := []byte{ + 0x04, 0x03, 0x02, 0x01, 0xAA, 0x00, 0x00, 0x00, + 0x0A, 0x00, 0x00, 0x00, 0xCD, 0xAB, 0x00, 0x00, + 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, + } + if got := buf.Bytes(); !bytes.Equal(got, want) { + t.Errorf("buf mismatch:\nwant: %+v\ngot: %+v", want, got) + } +} + +func TestCaptureInfoErrors(t *testing.T) { + data := []byte{1, 2, 3, 4} + ts := time.Unix(0, 0) + for _, test := range []gopacket.CaptureInfo{ + gopacket.CaptureInfo{ + Timestamp: ts, + Length: 5, + CaptureLength: 5, + }, + gopacket.CaptureInfo{ + Timestamp: ts, + Length: 3, + CaptureLength: 4, + }, + } { + var buf bytes.Buffer + w := NewWriter(&buf) + if err := w.WritePacket(test, data); err == nil { + t.Errorf("CaptureInfo %+v should have error", test) + } + } +} diff --git a/vendor/github.com/vtolstov/gopacket/pfring/doc.go b/vendor/github.com/vtolstov/gopacket/pfring/doc.go new file mode 100644 index 0000000..3c2234b --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/pfring/doc.go @@ -0,0 +1,58 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +/* Package pfring wraps the PF_RING C library for Go. + +PF_RING is a high-performance packet capture library written by ntop.org (see +http://www.ntop.org/products/pf_ring/). This library allows you to utilize the +PF_RING library with gopacket to read packet data and decode it. + +This package is meant to be used with its parent, +http://github.com/vtolstov/gopacket, although it can also be used independently +if you just want to get packet data from the wire. + +Simple Example + +This is probably the simplest code you can use to start getting packets through +pfring: + + if ring, err := pfring.NewRing("eth0", 65536, pfring.FlagPromisc); err != nil { + panic(err) + } else if err := ring.SetBPFFilter("tcp and port 80"); err != nil { // optional + panic(err) + } else if err := ring.Enable(); err != nil { // Must do this!, or you get no packets! + panic(err) + } else { + packetSource := gopacket.NewPacketSource(ring, layers.LinkTypeEthernet) + for packet := range packetSource.Packets() { + handlePacket(packet) // Do something with a packet here. + } + } + +Pfring Tweaks + +PF_RING has a ton of optimizations and tweaks to make sure you get just the +packets you want. For example, if you're only using pfring to read packets, +consider running: + + ring.SetSocketMode(pfring.ReadOnly) + +If you only care about packets received on your interface (not those transmitted +by the interface), you can run: + + ring.SetDirection(pfring.ReceiveOnly) + +Pfring Clusters + +PF_RING has an idea of 'clusters', where multiple applications can all read from +the same cluster, and PF_RING will multiplex packets over that cluster such that +only one application receives each packet. We won't discuss this mechanism in +too much more detail (see the ntop.org docs for more info), but here's how to +utilize this with the pfring go library: + + ring.SetCluster(1, pfring.ClusterPerFlow5Tuple) +*/ +package pfring diff --git a/vendor/github.com/vtolstov/gopacket/pfring/pfring.go b/vendor/github.com/vtolstov/gopacket/pfring/pfring.go new file mode 100644 index 0000000..7c32668 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/pfring/pfring.go @@ -0,0 +1,304 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// Copyright 2009-2011 Andreas Krennmair. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +package pfring + +/* +#cgo LDFLAGS: -lpfring -lpcap +#include +#include +#include +*/ +import "C" + +// NOTE: If you install PF_RING with non-standard options, you may also need +// to use LDFLAGS -lnuma and/or -lrt. Both have been reported necessary if +// PF_RING is configured with --disable-bpf. + +import ( + "fmt" + "github.com/vtolstov/gopacket" + "os" + "strconv" + "sync" + "time" + "unsafe" +) + +const errorBufferSize = 256 + +// Ring provides a handle to a pf_ring. +type Ring struct { + // cptr is the handle for the actual pcap C object. + cptr *C.pfring + snaplen int + + mu sync.Mutex + // Since pointers to these objects are passed into a C function, if + // they're declared locally then the Go compiler thinks they may have + // escaped into C-land, so it allocates them on the heap. This causes a + // huge memory hit, so to handle that we store them here instead. + pkthdr C.struct_pfring_pkthdr + buf_ptr *C.u_char +} + +type Flag uint32 + +const ( + FlagReentrant Flag = C.PF_RING_REENTRANT + FlagLongHeader Flag = C.PF_RING_LONG_HEADER + FlagPromisc Flag = C.PF_RING_PROMISC + FlagDNASymmetricRSS Flag = C.PF_RING_DNA_SYMMETRIC_RSS + FlagTimestamp Flag = C.PF_RING_TIMESTAMP + FlagHWTimestamp Flag = C.PF_RING_HW_TIMESTAMP +) + +// NewRing creates a new PFRing. Note that when the ring is initially created, +// it is disabled. The caller must call Enable to start receiving packets. +// The caller should call Close on the given ring when finished with it. +func NewRing(device string, snaplen uint32, flags Flag) (ring *Ring, _ error) { + dev := C.CString(device) + defer C.free(unsafe.Pointer(dev)) + + cptr, err := C.pfring_open(dev, C.u_int32_t(snaplen), C.u_int32_t(flags)) + if cptr == nil || err != nil { + return nil, fmt.Errorf("pfring NewRing error: %v", err) + } + ring = &Ring{cptr: cptr, snaplen: int(snaplen)} + ring.SetApplicationName(os.Args[0]) + return +} + +// Close closes the given Ring. After this call, the Ring should no longer be +// used. +func (r *Ring) Close() { + C.pfring_close(r.cptr) +} + +// NextResult is the return code from a call to Next. +type NextResult int32 + +const ( + NextNoPacketNonblocking NextResult = 0 + NextError NextResult = -1 + NextOk NextResult = 1 + NextNotEnabled NextResult = -7 +) + +// NextResult implements the error interface. +func (n NextResult) Error() string { + switch n { + case NextNoPacketNonblocking: + return "No packet available, nonblocking socket" + case NextError: + return "Generic error" + case NextOk: + return "Success (not an error)" + case NextNotEnabled: + return "Ring not enabled" + } + return strconv.Itoa(int(n)) +} + +// ReadPacketDataTo reads packet data into a user-supplied buffer. +// This function ignores snaplen and instead reads up to the length of the +// passed-in slice. +// The number of bytes read into data will be returned in ci.CaptureLength. +func (r *Ring) ReadPacketDataTo(data []byte) (ci gopacket.CaptureInfo, err error) { + // This tricky buf_ptr points to the start of our slice data, so pfring_recv + // will actually write directly into our Go slice. Nice! + r.mu.Lock() + r.buf_ptr = (*C.u_char)(unsafe.Pointer(&data[0])) + result := NextResult(C.pfring_recv(r.cptr, &r.buf_ptr, C.u_int(len(data)), &r.pkthdr, 1)) + if result != NextOk { + err = result + r.mu.Unlock() + return + } + ci.Timestamp = time.Unix(int64(r.pkthdr.ts.tv_sec), + int64(r.pkthdr.ts.tv_usec)*1000) // convert micros to nanos + ci.CaptureLength = int(r.pkthdr.caplen) + ci.Length = int(r.pkthdr.len) + r.mu.Unlock() + return +} + +// ReadPacketData returns the next packet read from the pcap handle, along with an error +// code associated with that packet. If the packet is read successfully, the +// returned error is nil. +func (r *Ring) ReadPacketData() (data []byte, ci gopacket.CaptureInfo, err error) { + data = make([]byte, r.snaplen) + ci, err = r.ReadPacketDataTo(data) + if err != nil { + data = nil + return + } + data = data[:ci.CaptureLength] + return +} + +type ClusterType C.cluster_type + +const ( + // ClusterPerFlow clusters by + ClusterPerFlow ClusterType = C.cluster_per_flow + // ClusterRoundRobin round-robins packets between applications, ignoring + // packet information. + ClusterRoundRobin ClusterType = C.cluster_round_robin + // ClusterPerFlow2Tuple clusters by + ClusterPerFlow2Tuple ClusterType = C.cluster_per_flow_2_tuple + // ClusterPerFlow4Tuple clusters by + ClusterPerFlow4Tuple ClusterType = C.cluster_per_flow_4_tuple + // ClusterPerFlow5Tuple clusters by + ClusterPerFlow5Tuple ClusterType = C.cluster_per_flow_5_tuple + // ClusterPerFlowTCP5Tuple acts like ClusterPerFlow5Tuple for TCP packets and + // like ClusterPerFlow2Tuple for all other packets. + ClusterPerFlowTCP5Tuple ClusterType = C.cluster_per_flow_tcp_5_tuple +) + +// SetCluster sets which cluster the ring should be part of, and the cluster +// type to use. +func (r *Ring) SetCluster(cluster int, typ ClusterType) error { + if rv := C.pfring_set_cluster(r.cptr, C.u_int(cluster), C.cluster_type(typ)); rv != 0 { + return fmt.Errorf("Unable to set cluster, got error code %d", rv) + } + return nil +} + +// RemoveFromCluster removes the ring from the cluster it was put in with +// SetCluster. +func (r *Ring) RemoveFromCluster() error { + if rv := C.pfring_remove_from_cluster(r.cptr); rv != 0 { + return fmt.Errorf("Unable to remove from cluster, got error code %d", rv) + } + return nil +} + +// SetSamplingRate sets the sampling rate to 1/. +func (r *Ring) SetSamplingRate(rate int) error { + if rv := C.pfring_set_sampling_rate(r.cptr, C.u_int32_t(rate)); rv != 0 { + return fmt.Errorf("Unable to set sampling rate, got error code %d", rv) + } + return nil +} + +// SetBPFFilter sets the BPF filter for the ring. +func (r *Ring) SetBPFFilter(bpf_filter string) error { + filter := C.CString(bpf_filter) + defer C.free(unsafe.Pointer(filter)) + if rv := C.pfring_set_bpf_filter(r.cptr, filter); rv != 0 { + return fmt.Errorf("Unable to set BPF filter, got error code %d", rv) + } + return nil +} + +// RemoveBPFFilter removes the BPF filter from the ring. +func (r *Ring) RemoveBPFFilter() error { + if rv := C.pfring_remove_bpf_filter(r.cptr); rv != 0 { + return fmt.Errorf("Unable to remove BPF filter, got error code %d", rv) + } + return nil +} + +// WritePacketData uses the ring to send raw packet data to the interface. +func (r *Ring) WritePacketData(data []byte) error { + buf := (*C.char)(unsafe.Pointer(&data[0])) + if rv := C.pfring_send(r.cptr, buf, C.u_int(len(data)), 1); rv != 0 { + return fmt.Errorf("Unable to send packet data, got error code %d", rv) + } + return nil +} + +// Enable enables the given ring. This function MUST be called on each new +// ring after it has been set up, or that ring will NOT receive packets. +func (r *Ring) Enable() error { + if rv := C.pfring_enable_ring(r.cptr); rv != 0 { + return fmt.Errorf("Unable to enable ring, got error code %d", rv) + } + return nil +} + +// Disable disables the given ring. After this call, it will no longer receive +// packets. +func (r *Ring) Disable() error { + if rv := C.pfring_disable_ring(r.cptr); rv != 0 { + return fmt.Errorf("Unable to disable ring, got error code %d", rv) + } + return nil +} + +type Stats struct { + Received, Dropped uint64 +} + +// Stats returns statistsics for the ring. +func (r *Ring) Stats() (s Stats, err error) { + var stats C.pfring_stat + if rv := C.pfring_stats(r.cptr, &stats); rv != 0 { + err = fmt.Errorf("Unable to get ring stats, got error code %d", rv) + return + } + s.Received = uint64(stats.recv) + s.Dropped = uint64(stats.drop) + return +} + +type Direction C.packet_direction + +const ( + // TransmitOnly will only capture packets transmitted by the ring's + // interface(s). + TransmitOnly Direction = C.tx_only_direction + // ReceiveOnly will only capture packets received by the ring's + // interface(s). + ReceiveOnly Direction = C.rx_only_direction + // ReceiveAndTransmit will capture both received and transmitted packets on + // the ring's interface(s). + ReceiveAndTransmit Direction = C.rx_and_tx_direction +) + +// SetDirection sets which packets should be captured by the ring. +func (r *Ring) SetDirection(d Direction) error { + if rv := C.pfring_set_direction(r.cptr, C.packet_direction(d)); rv != 0 { + return fmt.Errorf("Unable to set ring direction, got error code %d", rv) + } + return nil +} + +type SocketMode C.socket_mode + +const ( + // WriteOnly sets up the ring to only send packets (Inject), not read them. + WriteOnly SocketMode = C.send_only_mode + // ReadOnly sets up the ring to only receive packets (ReadPacketData), not + // send them. + ReadOnly SocketMode = C.recv_only_mode + // WriteAndRead sets up the ring to both send and receive packets. + WriteAndRead SocketMode = C.send_and_recv_mode +) + +// SetSocketMode sets the mode of the ring socket to send, receive, or both. +func (r *Ring) SetSocketMode(s SocketMode) error { + if rv := C.pfring_set_socket_mode(r.cptr, C.socket_mode(s)); rv != 0 { + return fmt.Errorf("Unable to set socket mode, got error code %d", rv) + } + return nil +} + +// SetApplicationName sets a string name to the ring. This name is available in +// /proc stats for pf_ring. By default, NewRing automatically calls this with +// argv[0]. +func (r *Ring) SetApplicationName(name string) error { + buf := C.CString(name) + defer C.free(unsafe.Pointer(buf)) + if rv := C.pfring_set_application_name(r.cptr, buf); rv != 0 { + return fmt.Errorf("Unable to set ring application name, got error code %d", rv) + } + return nil +} diff --git a/vendor/github.com/vtolstov/gopacket/routing/common.go b/vendor/github.com/vtolstov/gopacket/routing/common.go new file mode 100644 index 0000000..a6746d4 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/routing/common.go @@ -0,0 +1,36 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +package routing + +import ( + "net" +) + +// Router implements simple IPv4/IPv6 routing based on the kernel's routing +// table. This routing library has very few features and may actually route +// incorrectly in some cases, but it should work the majority of the time. +type Router interface { + // Route returns where to route a packet based on the packet's source + // and destination IP address. + // + // Callers may pass in nil for src, in which case the src is treated as + // either 0.0.0.0 or ::, depending on whether dst is a v4 or v6 address. + // + // It returns the interface on which to send the packet, the gateway IP + // to send the packet to (if necessary), the preferred src IP to use (if + // available). If the preferred src address is not given in the routing + // table, the first IP address of the interface is provided. + // + // If an error is encountered, iface, geteway, and + // preferredSrc will be nil, and err will be set. + Route(dst net.IP) (iface *net.Interface, gateway, preferredSrc net.IP, err error) + + // RouteWithSrc routes based on source information as well as destination + // information. Either or both of input/src can be nil. If both are, this + // should behave exactly like Route(dst) + RouteWithSrc(input net.HardwareAddr, src, dst net.IP) (iface *net.Interface, gateway, preferredSrc net.IP, err error) +} diff --git a/vendor/github.com/vtolstov/gopacket/routing/other.go b/vendor/github.com/vtolstov/gopacket/routing/other.go new file mode 100644 index 0000000..b53fea9 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/routing/other.go @@ -0,0 +1,15 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +// +build !linux + +// Package routing is currently only supported in Linux, but the build system requires a valid go file for all architectures. + +package routing + +func New() (Router, error) { + panic("router only implemented in linux") +} diff --git a/vendor/github.com/vtolstov/gopacket/routing/routing.go b/vendor/github.com/vtolstov/gopacket/routing/routing.go new file mode 100644 index 0000000..7271cb6 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/routing/routing.go @@ -0,0 +1,241 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +// +build linux + +// Package routing provides a very basic but mostly functional implementation of +// a routing table for IPv4/IPv6 addresses. It uses a routing table pulled from +// the kernel via netlink to find the correct interface, gateway, and preferred +// source IP address for packets destined to a particular location. +// +// The routing package is meant to be used with applications that are sending +// raw packet data, which don't have the benefit of having the kernel route +// packets for them. +package routing + +import ( + "bytes" + "fmt" + "net" + "sort" + "strings" + "syscall" + "unsafe" +) + +// Pulled from http://man7.org/linux/man-pages/man7/rtnetlink.7.html +// See the section on RTM_NEWROUTE, specifically 'struct rtmsg'. +type routeInfoInMemory struct { + Family byte + DstLen byte + SrcLen byte + TOS byte + + Table byte + Protocol byte + Scope byte + Type byte + + Flags uint32 +} + +// rtInfo contains information on a single route. +type rtInfo struct { + Src, Dst *net.IPNet + Gateway, PrefSrc net.IP + // We currently ignore the InputIface. + InputIface, OutputIface uint32 + Priority uint32 +} + +// routeSlice implements sort.Interface to sort routes by Priority. +type routeSlice []*rtInfo + +func (r routeSlice) Len() int { + return len(r) +} +func (r routeSlice) Less(i, j int) bool { + return r[i].Priority < r[j].Priority +} +func (r routeSlice) Swap(i, j int) { + r[i], r[j] = r[j], r[i] +} + +type router struct { + ifaces []net.Interface + addrs []ipAddrs + v4, v6 routeSlice +} + +func (r *router) String() string { + strs := []string{"ROUTER", "--- V4 ---"} + for _, route := range r.v4 { + strs = append(strs, fmt.Sprintf("%+v", *route)) + } + strs = append(strs, "--- V6 ---") + for _, route := range r.v6 { + strs = append(strs, fmt.Sprintf("%+v", *route)) + } + return strings.Join(strs, "\n") +} + +type ipAddrs struct { + v4, v6 net.IP +} + +func (r *router) Route(dst net.IP) (iface *net.Interface, gateway, preferredSrc net.IP, err error) { + return r.RouteWithSrc(nil, nil, dst) +} + +func (r *router) RouteWithSrc(input net.HardwareAddr, src, dst net.IP) (iface *net.Interface, gateway, preferredSrc net.IP, err error) { + length := len(dst) + var ifaceIndex int + switch length { + case 4: + ifaceIndex, gateway, preferredSrc, err = r.route(r.v4, input, src, dst) + case 16: + ifaceIndex, gateway, preferredSrc, err = r.route(r.v6, input, src, dst) + default: + err = fmt.Errorf("IP length is not 4 or 16") + return + } + + // Interfaces are 1-indexed, but we store them in a 0-indexed array. + ifaceIndex-- + + iface = &r.ifaces[ifaceIndex] + if preferredSrc == nil { + switch length { + case 4: + preferredSrc = r.addrs[ifaceIndex].v4 + case 16: + preferredSrc = r.addrs[ifaceIndex].v6 + } + } + return +} + +func (r *router) route(routes routeSlice, input net.HardwareAddr, src, dst net.IP) (iface int, gateway, preferredSrc net.IP, err error) { + var inputIndex uint32 + if input != nil { + for i, iface := range r.ifaces { + if bytes.Equal(input, iface.HardwareAddr) { + // Convert from zero- to one-indexed. + inputIndex = uint32(i + 1) + break + } + } + } + for _, rt := range routes { + if rt.InputIface != 0 && rt.InputIface != inputIndex { + continue + } + if rt.Src != nil && !rt.Src.Contains(src) { + continue + } + if rt.Dst != nil && !rt.Dst.Contains(dst) { + continue + } + return int(rt.OutputIface), rt.Gateway, rt.PrefSrc, nil + } + err = fmt.Errorf("no route found for %v", dst) + return +} + +// New creates a new router object. The router returned by New currently does +// not update its routes after construction... care should be taken for +// long-running programs to call New() regularly to take into account any +// changes to the routing table which have occurred since the last New() call. +func New() (Router, error) { + rtr := &router{} + tab, err := syscall.NetlinkRIB(syscall.RTM_GETROUTE, syscall.AF_UNSPEC) + if err != nil { + return nil, err + } + msgs, err := syscall.ParseNetlinkMessage(tab) + if err != nil { + return nil, err + } +loop: + for _, m := range msgs { + switch m.Header.Type { + case syscall.NLMSG_DONE: + break loop + case syscall.RTM_NEWROUTE: + rt := (*routeInfoInMemory)(unsafe.Pointer(&m.Data[0])) + routeInfo := rtInfo{} + attrs, err := syscall.ParseNetlinkRouteAttr(&m) + if err != nil { + return nil, err + } + switch rt.Family { + case syscall.AF_INET: + rtr.v4 = append(rtr.v4, &routeInfo) + case syscall.AF_INET6: + rtr.v6 = append(rtr.v6, &routeInfo) + default: + continue loop + } + for _, attr := range attrs { + switch attr.Attr.Type { + case syscall.RTA_DST: + routeInfo.Dst = &net.IPNet{ + IP: net.IP(attr.Value), + Mask: net.CIDRMask(int(rt.DstLen), len(attr.Value)*8), + } + case syscall.RTA_SRC: + routeInfo.Src = &net.IPNet{ + IP: net.IP(attr.Value), + Mask: net.CIDRMask(int(rt.SrcLen), len(attr.Value)*8), + } + case syscall.RTA_GATEWAY: + routeInfo.Gateway = net.IP(attr.Value) + case syscall.RTA_PREFSRC: + routeInfo.PrefSrc = net.IP(attr.Value) + case syscall.RTA_IIF: + routeInfo.InputIface = *(*uint32)(unsafe.Pointer(&attr.Value[0])) + case syscall.RTA_OIF: + routeInfo.OutputIface = *(*uint32)(unsafe.Pointer(&attr.Value[0])) + case syscall.RTA_PRIORITY: + routeInfo.Priority = *(*uint32)(unsafe.Pointer(&attr.Value[0])) + } + } + } + } + sort.Sort(rtr.v4) + sort.Sort(rtr.v6) + if ifaces, err := net.Interfaces(); err != nil { + return nil, err + } else { + for i, iface := range ifaces { + if i != iface.Index-1 { + return nil, fmt.Errorf("out of order iface %d = %v", i, iface) + } + rtr.ifaces = append(rtr.ifaces, iface) + var addrs ipAddrs + if ifaceAddrs, err := iface.Addrs(); err != nil { + return nil, err + } else { + for _, addr := range ifaceAddrs { + if inet, ok := addr.(*net.IPNet); ok { + // Go has a nasty habit of giving you IPv4s as ::ffff:1.2.3.4 instead of 1.2.3.4. + // We want to use mapped v4 addresses as v4 preferred addresses, never as v6 + // preferred addresses. + if v4 := inet.IP.To4(); v4 != nil { + if addrs.v4 == nil { + addrs.v4 = v4 + } + } else if addrs.v6 == nil { + addrs.v6 = inet.IP + } + } + } + } + rtr.addrs = append(rtr.addrs, addrs) + } + } + return rtr, nil +} diff --git a/vendor/github.com/vtolstov/gopacket/tcpassembly/assembly.go b/vendor/github.com/vtolstov/gopacket/tcpassembly/assembly.go new file mode 100644 index 0000000..cbc4d40 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/tcpassembly/assembly.go @@ -0,0 +1,773 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +// Package tcpassembly provides TCP stream re-assembly. +// +// The tcpassembly package implements uni-directional TCP reassembly, for use in +// packet-sniffing applications. The caller reads packets off the wire, then +// presents them to an Assembler in the form of gopacket layers.TCP packets +// (github.com/vtolstov/gopacket, github.com/vtolstov/gopacket/layers). +// +// The Assembler uses a user-supplied +// StreamFactory to create a user-defined Stream interface, then passes packet +// data in stream order to that object. A concurrency-safe StreamPool keeps +// track of all current Streams being reassembled, so multiple Assemblers may +// run at once to assemble packets while taking advantage of multiple cores. +package tcpassembly + +import ( + "flag" + "fmt" + "github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket/layers" + "log" + "sync" + "time" +) + +var memLog = flag.Bool("assembly_memuse_log", false, "If true, the github.com/vtolstov/gopacket/tcpassembly library will log information regarding its memory use every once in a while.") +var debugLog = flag.Bool("assembly_debug_log", false, "If true, the github.com/vtolstov/gopacket/tcpassembly library will log verbose debugging information (at least one line per packet)") + +const invalidSequence = -1 +const uint32Max = 0xFFFFFFFF + +// Sequence is a TCP sequence number. It provides a few convenience functions +// for handling TCP wrap-around. The sequence should always be in the range +// [0,0xFFFFFFFF]... its other bits are simply used in wrap-around calculations +// and should never be set. +type Sequence int64 + +// Difference defines an ordering for comparing TCP sequences that's safe for +// roll-overs. It returns: +// > 0 : if t comes after s +// < 0 : if t comes before s +// 0 : if t == s +// The number returned is the sequence difference, so 4.Difference(8) will +// return 4. +// +// It handles rollovers by considering any sequence in the first quarter of the +// uint32 space to be after any sequence in the last quarter of that space, thus +// wrapping the uint32 space. +func (s Sequence) Difference(t Sequence) int { + if s > uint32Max-uint32Max/4 && t < uint32Max/4 { + t += uint32Max + } else if t > uint32Max-uint32Max/4 && s < uint32Max/4 { + s += uint32Max + } + return int(t - s) +} + +// Add adds an integer to a sequence and returns the resulting sequence. +func (s Sequence) Add(t int) Sequence { + return (s + Sequence(t)) & uint32Max +} + +// Reassembly objects are passed by an Assembler into Streams using the +// Reassembled call. Callers should not need to create these structs themselves +// except for testing. +type Reassembly struct { + // Bytes is the next set of bytes in the stream. May be empty. + Bytes []byte + // Skip is set to non-zero if bytes were skipped between this and the + // last Reassembly. If this is the first packet in a connection and we + // didn't see the start, we have no idea how many bytes we skipped, so + // we set it to -1. Otherwise, it's set to the number of bytes skipped. + Skip int + // Start is set if this set of bytes has a TCP SYN accompanying it. + Start bool + // End is set if this set of bytes has a TCP FIN or RST accompanying it. + End bool + // Seen is the timestamp this set of bytes was pulled off the wire. + Seen time.Time +} + +const pageBytes = 1900 + +// page is used to store TCP data we're not ready for yet (out-of-order +// packets). Unused pages are stored in and returned from a pageCache, which +// avoids memory allocation. Used pages are stored in a doubly-linked list in +// a connection. +type page struct { + Reassembly + seq Sequence + index int + prev, next *page + buf [pageBytes]byte +} + +// pageCache is a concurrency-unsafe store of page objects we use to avoid +// memory allocation as much as we can. It grows but never shrinks. +type pageCache struct { + free []*page + pcSize int + size, used int + pages [][]page + pageRequests int64 +} + +const initialAllocSize = 1024 + +func newPageCache() *pageCache { + pc := &pageCache{ + free: make([]*page, 0, initialAllocSize), + pcSize: initialAllocSize, + } + pc.grow() + return pc +} + +// grow exponentially increases the size of our page cache as much as necessary. +func (c *pageCache) grow() { + pages := make([]page, c.pcSize) + c.pages = append(c.pages, pages) + c.size += c.pcSize + for i, _ := range pages { + c.free = append(c.free, &pages[i]) + } + if *memLog { + log.Println("PageCache: created", c.pcSize, "new pages") + } + c.pcSize *= 2 +} + +// next returns a clean, ready-to-use page object. +func (c *pageCache) next(ts time.Time) (p *page) { + if *memLog { + c.pageRequests++ + if c.pageRequests&0xFFFF == 0 { + log.Println("PageCache:", c.pageRequests, "requested,", c.used, "used,", len(c.free), "free") + } + } + if len(c.free) == 0 { + c.grow() + } + i := len(c.free) - 1 + p, c.free = c.free[i], c.free[:i] + p.prev = nil + p.next = nil + p.Seen = ts + p.Bytes = p.buf[:0] + c.used++ + return p +} + +// replace replaces a page into the pageCache. +func (c *pageCache) replace(p *page) { + c.used-- + c.free = append(c.free, p) +} + +// Stream is implemented by the caller to handle incoming reassembled +// TCP data. Callers create a StreamFactory, then StreamPool uses +// it to create a new Stream for every TCP stream. +// +// assembly will, in order: +// 1) Create the stream via StreamFactory.New +// 2) Call Reassembled 0 or more times, passing in reassembled TCP data in order +// 3) Call ReassemblyComplete one time, after which the stream is dereferenced by assembly. +type Stream interface { + // Reassembled is called zero or more times. assembly guarantees + // that the set of all Reassembly objects passed in during all + // calls are presented in the order they appear in the TCP stream. + // Reassembly objects are reused after each Reassembled call, + // so it's important to copy anything you need out of them + // (specifically out of Reassembly.Bytes) that you need to stay + // around after you return from the Reassembled call. + Reassembled([]Reassembly) + // ReassemblyComplete is called when assembly decides there is + // no more data for this Stream, either because a FIN or RST packet + // was seen, or because the stream has timed out without any new + // packet data (due to a call to FlushOlderThan). + ReassemblyComplete() +} + +// StreamFactory is used by assembly to create a new stream for each +// new TCP session. +type StreamFactory interface { + // New should return a new stream for the given TCP key. + New(netFlow, tcpFlow gopacket.Flow) Stream +} + +func (p *StreamPool) connections() []*connection { + p.mu.RLock() + conns := make([]*connection, 0, len(p.conns)) + for _, conn := range p.conns { + conns = append(conns, conn) + } + p.mu.RUnlock() + return conns +} + +// FlushOlderThan finds any streams waiting for packets older than +// the given time, and pushes through the data they have (IE: tells +// them to stop waiting and skip the data they're waiting for). +// +// Each Stream maintains a list of zero or more sets of bytes it has received +// out-of-order. For example, if it has processed up through sequence number +// 10, it might have bytes [15-20), [20-25), [30,50) in its list. Each set of +// bytes also has the timestamp it was originally viewed. A flush call will +// look at the smallest subsequent set of bytes, in this case [15-20), and if +// its timestamp is older than the passed-in time, it will push it and all +// contiguous byte-sets out to the Stream's Reassembled function. In this case, +// it will push [15-20), but also [20-25), since that's contiguous. It will +// only push [30-50) if its timestamp is also older than the passed-in time, +// otherwise it will wait until the next FlushOlderThan to see if bytes [25-30) +// come in. +// +// If it pushes all bytes (or there were no sets of bytes to begin with) +// AND the connection has not received any bytes since the passed-in time, +// the connection will be closed. +// +// Returns the number of connections flushed, and of those, the number closed +// because of the flush. +func (a *Assembler) FlushOlderThan(t time.Time) (flushed, closed int) { + conns := a.connPool.connections() + closes := 0 + flushes := 0 + for _, conn := range conns { + flushed := false + conn.mu.Lock() + if conn.closed { + // Already closed connection, nothing to do here. + conn.mu.Unlock() + continue + } + for conn.first != nil && conn.first.Seen.Before(t) { + a.skipFlush(conn) + flushed = true + if conn.closed { + closes++ + break + } + } + if !conn.closed && conn.first == nil && conn.lastSeen.Before(t) { + flushed = true + a.closeConnection(conn) + closes++ + } + if flushed { + flushes++ + } + conn.mu.Unlock() + } + return flushes, closes +} + +// FlushAll flushes all remaining data into all remaining connections, closing +// those connections. It returns the total number of connections flushed/closed +// by the call. +func (a *Assembler) FlushAll() (closed int) { + conns := a.connPool.connections() + closed = len(conns) + for _, conn := range conns { + conn.mu.Lock() + for !conn.closed { + a.skipFlush(conn) + } + conn.mu.Unlock() + } + return +} + +type key [2]gopacket.Flow + +func (k *key) String() string { + return fmt.Sprintf("%s:%s", k[0], k[1]) +} + +// StreamPool stores all streams created by Assemblers, allowing multiple +// assemblers to work together on stream processing while enforcing the fact +// that a single stream receives its data serially. It is safe +// for concurrency, usable by multiple Assemblers at once. +// +// StreamPool handles the creation and storage of Stream objects used by one or +// more Assembler objects. When a new TCP stream is found by an Assembler, it +// creates an associated Stream by calling its StreamFactory's New method. +// Thereafter (until the stream is closed), that Stream object will receive +// assembled TCP data via Assembler's calls to the stream's Reassembled +// function. +// +// Like the Assembler, StreamPool attempts to minimize allocation. Unlike the +// Assembler, though, it does have to do some locking to make sure that the +// connection objects it stores are accessible to multiple Assemblers. +type StreamPool struct { + conns map[key]*connection + users int + mu sync.RWMutex + factory StreamFactory + free []*connection + all [][]connection + nextAlloc int + newConnectionCount int64 +} + +func (p *StreamPool) grow() { + conns := make([]connection, p.nextAlloc) + p.all = append(p.all, conns) + for i, _ := range conns { + p.free = append(p.free, &conns[i]) + } + if *memLog { + log.Println("StreamPool: created", p.nextAlloc, "new connections") + } + p.nextAlloc *= 2 +} + +// NewStreamPool creates a new connection pool. Streams will +// be created as necessary using the passed-in StreamFactory. +func NewStreamPool(factory StreamFactory) *StreamPool { + return &StreamPool{ + conns: make(map[key]*connection, initialAllocSize), + free: make([]*connection, 0, initialAllocSize), + factory: factory, + nextAlloc: initialAllocSize, + } +} + +const assemblerReturnValueInitialSize = 16 + +// NewAssembler creates a new assembler. Pass in the StreamPool +// to use, may be shared across assemblers. +// +// This sets some sane defaults for the assembler options, +// see DefaultAssemblerOptions for details. +func NewAssembler(pool *StreamPool) *Assembler { + pool.mu.Lock() + pool.users++ + pool.mu.Unlock() + return &Assembler{ + ret: make([]Reassembly, assemblerReturnValueInitialSize), + pc: newPageCache(), + connPool: pool, + AssemblerOptions: DefaultAssemblerOptions, + } +} + +// DefaultAssemblerOptions provides default options for an assembler. +// These options are used by default when calling NewAssembler, so if +// modified before a NewAssembler call they'll affect the resulting Assembler. +// +// Note that the default options can result in ever-increasing memory usage +// unless one of the Flush* methods is called on a regular basis. +var DefaultAssemblerOptions = AssemblerOptions{ + MaxBufferedPagesPerConnection: 0, // unlimited + MaxBufferedPagesTotal: 0, // unlimited +} + +type connection struct { + key key + pages int + first, last *page + nextSeq Sequence + created, lastSeen time.Time + stream Stream + closed bool + mu sync.Mutex +} + +func (c *connection) reset(k key, s Stream, ts time.Time) { + c.key = k + c.pages = 0 + c.first, c.last = nil, nil + c.nextSeq = invalidSequence + c.created = ts + c.stream = s + c.closed = false +} + +// AssemblerOptions controls the behavior of each assembler. Modify the +// options of each assembler you create to change their behavior. +type AssemblerOptions struct { + // MaxBufferedPagesTotal is an upper limit on the total number of pages to + // buffer while waiting for out-of-order packets. Once this limit is + // reached, the assembler will degrade to flushing every connection it + // gets a packet for. If <= 0, this is ignored. + MaxBufferedPagesTotal int + // MaxBufferedPagesPerConnection is an upper limit on the number of pages + // buffered for a single connection. Should this limit be reached for a + // particular connection, the smallest sequence number will be flushed, along + // with any contiguous data. If <= 0, this is ignored. + MaxBufferedPagesPerConnection int +} + +// Assembler handles reassembling TCP streams. It is not safe for +// concurrency... after passing a packet in via the Assemble call, the caller +// must wait for that call to return before calling Assemble again. Callers can +// get around this by creating multiple assemblers that share a StreamPool. In +// that case, each individual stream will still be handled serially (each stream +// has an individual mutex associated with it), however multiple assemblers can +// assemble different connections concurrently. +// +// The Assembler provides (hopefully) fast TCP stream re-assembly for sniffing +// applications written in Go. The Assembler uses the following methods to be +// as fast as possible, to keep packet processing speedy: +// +// Avoids Lock Contention +// +// Assemblers locks connections, but each connection has an individual lock, and +// rarely will two Assemblers be looking at the same connection. Assemblers +// lock the StreamPool when looking up connections, but they use Reader +// locks initially, and only force a write lock if they need to create a new +// connection or close one down. These happen much less frequently than +// individual packet handling. +// +// Each assembler runs in its own goroutine, and the only state shared between +// goroutines is through the StreamPool. Thus all internal Assembler state +// can be handled without any locking. +// +// NOTE: If you can guarantee that packets going to a set of Assemblers will +// contain information on different connections per Assembler (for example, +// they're already hashed by PF_RING hashing or some other hashing mechanism), +// then we recommend you use a seperate StreamPool per Assembler, thus +// avoiding all lock contention. Only when different Assemblers could receive +// packets for the same Stream should a StreamPool be shared between them. +// +// Avoids Memory Copying +// +// In the common case, handling of a single TCP packet should result in zero +// memory allocations. The Assembler will look up the connection, figure out +// that the packet has arrived in order, and immediately pass that packet on to +// the appropriate connection's handling code. Only if a packet arrives out of +// order is its contents copied and stored in memory for later. +// +// Avoids Memory Allocation +// +// Assemblers try very hard to not use memory allocation unless absolutely +// necessary. Packet data for sequential packets is passed directly to streams +// with no copying or allocation. Packet data for out-of-order packets is +// copied into reusable pages, and new pages are only allocated rarely when the +// page cache runs out. Page caches are Assembler-specific, thus not used +// concurrently and requiring no locking. +// +// Internal representations for connection objects are also reused over time. +// Because of this, the most common memory allocation done by the Assembler is +// generally what's done by the caller in StreamFactory.New. If no allocation +// is done there, then very little allocation is done ever, mostly to handle +// large increases in bandwidth or numbers of connections. +// +// TODO: The page caches used by an Assembler will grow to the size necessary +// to handle a workload, and currently will never shrink. This means that +// traffic spikes can result in large memory usage which isn't garbage +// collected when typical traffic levels return. +type Assembler struct { + AssemblerOptions + ret []Reassembly + pc *pageCache + connPool *StreamPool +} + +func (p *StreamPool) newConnection(k key, s Stream, ts time.Time) (c *connection) { + if *memLog { + p.newConnectionCount++ + if p.newConnectionCount&0x7FFF == 0 { + log.Println("StreamPool:", p.newConnectionCount, "requests,", len(p.conns), "used,", len(p.free), "free") + } + } + if len(p.free) == 0 { + p.grow() + } + index := len(p.free) - 1 + c, p.free = p.free[index], p.free[:index] + c.reset(k, s, ts) + return c +} + +// getConnection returns a connection. If end is true and a connection +// does not already exist, returns nil. This allows us to check for a +// connection without actually creating one if it doesn't already exist. +func (p *StreamPool) getConnection(k key, end bool, ts time.Time) *connection { + p.mu.RLock() + conn := p.conns[k] + p.mu.RUnlock() + if end || conn != nil { + return conn + } + s := p.factory.New(k[0], k[1]) + p.mu.Lock() + conn = p.newConnection(k, s, ts) + if conn2 := p.conns[k]; conn2 != nil { + p.mu.Unlock() + return conn2 + } + p.conns[k] = conn + p.mu.Unlock() + return conn +} + +// Assemble calls AssembleWithTimestamp with the current timestamp, useful for +// packets being read directly off the wire. +func (a *Assembler) Assemble(netFlow gopacket.Flow, t *layers.TCP) { + a.AssembleWithTimestamp(netFlow, t, time.Now()) +} + +// AssembleWithTimestamp reassembles the given TCP packet into its appropriate +// stream. +// +// The timestamp passed in must be the timestamp the packet was seen. +// For packets read off the wire, time.Now() should be fine. For packets read +// from PCAP files, CaptureInfo.Timestamp should be passed in. This timestamp +// will affect which streams are flushed by a call to FlushOlderThan. +// +// Each Assemble call results in, in order: +// +// zero or one calls to StreamFactory.New, creating a stream +// zero or one calls to Reassembled on a single stream +// zero or one calls to ReassemblyComplete on the same stream +func (a *Assembler) AssembleWithTimestamp(netFlow gopacket.Flow, t *layers.TCP, timestamp time.Time) { + // Ignore empty TCP packets + if !t.SYN && !t.FIN && !t.RST && len(t.LayerPayload()) == 0 { + if *debugLog { + log.Println("ignoring useless packet") + } + return + } + + a.ret = a.ret[:0] + key := key{netFlow, t.TransportFlow()} + var conn *connection + // This for loop handles a race condition where a connection will close, lock + // the connection pool, and remove itself, but before it locked the connection + // pool it's returned to another Assemble statement. This should loop 0-1 + // times for the VAST majority of cases. + for { + conn = a.connPool.getConnection( + key, !t.SYN && len(t.LayerPayload()) == 0, timestamp) + if conn == nil { + if *debugLog { + log.Printf("%v got empty packet on otherwise empty connection", key) + } + return + } + conn.mu.Lock() + if !conn.closed { + break + } + conn.mu.Unlock() + } + if conn.lastSeen.Before(timestamp) { + conn.lastSeen = timestamp + } + seq, bytes := Sequence(t.Seq), t.Payload + if conn.nextSeq == invalidSequence { + if t.SYN { + if *debugLog { + log.Printf("%v saw first SYN packet, returning immediately, seq=%v", key, seq) + } + a.ret = append(a.ret, Reassembly{ + Bytes: bytes, + Skip: 0, + Start: true, + Seen: timestamp, + }) + conn.nextSeq = seq.Add(len(bytes) + 1) + } else { + if *debugLog { + log.Printf("%v waiting for start, storing into connection", key) + } + a.insertIntoConn(t, conn, timestamp) + } + } else if diff := conn.nextSeq.Difference(seq); diff > 0 { + if *debugLog { + log.Printf("%v gap in sequence numbers (%v, %v) diff %v, storing into connection", key, conn.nextSeq, seq, diff) + } + a.insertIntoConn(t, conn, timestamp) + } else { + bytes, conn.nextSeq = byteSpan(conn.nextSeq, seq, bytes) + if *debugLog { + log.Printf("%v found contiguous data (%v, %v), returning immediately", key, seq, conn.nextSeq) + } + a.ret = append(a.ret, Reassembly{ + Bytes: bytes, + Skip: 0, + End: t.RST || t.FIN, + Seen: timestamp, + }) + } + if len(a.ret) > 0 { + a.sendToConnection(conn) + } + conn.mu.Unlock() +} + +func byteSpan(expected, received Sequence, bytes []byte) (toSend []byte, next Sequence) { + if expected == invalidSequence { + return bytes, received.Add(len(bytes)) + } + span := int(received.Difference(expected)) + if span <= 0 { + return bytes, received.Add(len(bytes)) + } else if len(bytes) < span { + return nil, expected + } + return bytes[span:], expected.Add(len(bytes) - span) +} + +// sendToConnection sends the current values in a.ret to the connection, closing +// the connection if the last thing sent had End set. +func (a *Assembler) sendToConnection(conn *connection) { + a.addContiguous(conn) + if conn.stream == nil { + panic("why?") + } + conn.stream.Reassembled(a.ret) + if a.ret[len(a.ret)-1].End { + a.closeConnection(conn) + } +} + +// addContiguous adds contiguous byte-sets to a connection. +func (a *Assembler) addContiguous(conn *connection) { + for conn.first != nil && conn.nextSeq.Difference(conn.first.seq) <= 0 { + a.addNextFromConn(conn) + } +} + +// skipFlush skips the first set of bytes we're waiting for and returns the +// first set of bytes we have. If we have no bytes pending, it closes the +// connection. +func (a *Assembler) skipFlush(conn *connection) { + if *debugLog { + log.Printf("%v skipFlush %v", conn.key, conn.nextSeq) + } + if conn.first == nil { + a.closeConnection(conn) + return + } + a.ret = a.ret[:0] + a.addNextFromConn(conn) + a.addContiguous(conn) + a.sendToConnection(conn) +} + +func (p *StreamPool) remove(conn *connection) { + p.mu.Lock() + delete(p.conns, conn.key) + p.free = append(p.free, conn) + p.mu.Unlock() +} + +func (a *Assembler) closeConnection(conn *connection) { + if *debugLog { + log.Printf("%v closing", conn.key) + } + conn.stream.ReassemblyComplete() + conn.closed = true + a.connPool.remove(conn) + for p := conn.first; p != nil; p = p.next { + a.pc.replace(p) + } +} + +// traverseConn traverses our doubly-linked list of pages for the correct +// position to put the given sequence number. Note that it traverses backwards, +// starting at the highest sequence number and going down, since we assume the +// common case is that TCP packets for a stream will appear in-order, with +// minimal loss or packet reordering. +func (conn *connection) traverseConn(seq Sequence) (prev, current *page) { + prev = conn.last + for prev != nil && prev.seq.Difference(seq) < 0 { + current = prev + prev = current.prev + } + return +} + +// pushBetween inserts the doubly-linked list first-...-last in between the +// nodes prev-next in another doubly-linked list. If prev is nil, makes first +// the new first page in the connection's list. If next is nil, makes last the +// new last page in the list. first/last may point to the same page. +func (conn *connection) pushBetween(prev, next, first, last *page) { + // Maintain our doubly linked list + if next == nil || conn.last == nil { + conn.last = last + } else { + last.next = next + next.prev = last + } + if prev == nil || conn.first == nil { + conn.first = first + } else { + first.prev = prev + prev.next = first + } +} + +func (a *Assembler) insertIntoConn(t *layers.TCP, conn *connection, ts time.Time) { + if conn.first != nil && conn.first.seq == conn.nextSeq { + panic("wtf") + } + p, p2, numPages := a.pagesFromTcp(t, ts) + prev, current := conn.traverseConn(Sequence(t.Seq)) + conn.pushBetween(prev, current, p, p2) + conn.pages += numPages + if (a.MaxBufferedPagesPerConnection > 0 && conn.pages >= a.MaxBufferedPagesPerConnection) || + (a.MaxBufferedPagesTotal > 0 && a.pc.used >= a.MaxBufferedPagesTotal) { + if *debugLog { + log.Printf("%v hit max buffer size: %+v, %v, %v", conn.key, a.AssemblerOptions, conn.pages, a.pc.used) + } + a.addNextFromConn(conn) + } +} + +// pagesFromTcp creates a page (or set of pages) from a TCP packet. Note that +// it should NEVER receive a SYN packet, as it doesn't handle sequences +// correctly. +// +// It returns the first and last page in its doubly-linked list of new pages. +func (a *Assembler) pagesFromTcp(t *layers.TCP, ts time.Time) (p, p2 *page, numPages int) { + first := a.pc.next(ts) + current := first + numPages++ + seq, bytes := Sequence(t.Seq), t.Payload + for { + length := min(len(bytes), pageBytes) + current.Bytes = current.buf[:length] + copy(current.Bytes, bytes) + current.seq = seq + bytes = bytes[length:] + if len(bytes) == 0 { + break + } + seq = seq.Add(length) + current.next = a.pc.next(ts) + current.next.prev = current + current = current.next + numPages++ + } + current.End = t.RST || t.FIN + return first, current, numPages +} + +// addNextFromConn pops the first page from a connection off and adds it to the +// return array. +func (a *Assembler) addNextFromConn(conn *connection) { + if conn.nextSeq == invalidSequence { + conn.first.Skip = -1 + } else if diff := conn.nextSeq.Difference(conn.first.seq); diff > 0 { + conn.first.Skip = int(diff) + } + conn.first.Bytes, conn.nextSeq = byteSpan(conn.nextSeq, conn.first.seq, conn.first.Bytes) + if *debugLog { + log.Printf("%v adding from conn (%v, %v)", conn.key, conn.first.seq, conn.nextSeq) + } + a.ret = append(a.ret, conn.first.Reassembly) + a.pc.replace(conn.first) + if conn.first == conn.last { + conn.first = nil + conn.last = nil + } else { + conn.first = conn.first.next + conn.first.prev = nil + } + conn.pages-- +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} diff --git a/vendor/github.com/vtolstov/gopacket/tcpassembly/assembly_test.go b/vendor/github.com/vtolstov/gopacket/tcpassembly/assembly_test.go new file mode 100644 index 0000000..6d5b055 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/tcpassembly/assembly_test.go @@ -0,0 +1,562 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +package tcpassembly + +import ( + "github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket/layers" + "net" + "reflect" + "testing" + "time" +) + +var netFlow gopacket.Flow + +func init() { + netFlow, _ = gopacket.FlowFromEndpoints( + layers.NewIPEndpoint(net.IP{1, 2, 3, 4}), + layers.NewIPEndpoint(net.IP{5, 6, 7, 8})) +} + +type testSequence struct { + in layers.TCP + want []Reassembly +} + +type testFactory struct { + reassembly []Reassembly +} + +func (t *testFactory) New(a, b gopacket.Flow) Stream { + return t +} +func (t *testFactory) Reassembled(r []Reassembly) { + t.reassembly = r + for i := 0; i < len(r); i++ { + t.reassembly[i].Seen = time.Time{} + } +} +func (t *testFactory) ReassemblyComplete() { +} + +func test(t *testing.T, s []testSequence) { + fact := &testFactory{} + p := NewStreamPool(fact) + a := NewAssembler(p) + a.MaxBufferedPagesPerConnection = 4 + for i, test := range s { + fact.reassembly = []Reassembly{} + a.Assemble(netFlow, &test.in) + if !reflect.DeepEqual(fact.reassembly, test.want) { + t.Fatalf("test %v:\nwant: %v\n got: %v\n", i, test.want, fact.reassembly) + } + } +} + +func TestReorder(t *testing.T) { + test(t, []testSequence{ + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + Seq: 1001, + BaseLayer: layers.BaseLayer{Payload: []byte{1, 2, 3}}, + }, + want: []Reassembly{}, + }, + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + Seq: 1004, + BaseLayer: layers.BaseLayer{Payload: []byte{2, 2, 3}}, + }, + want: []Reassembly{}, + }, + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + Seq: 1010, + BaseLayer: layers.BaseLayer{Payload: []byte{4, 2, 3}}, + }, + want: []Reassembly{}, + }, + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + Seq: 1007, + BaseLayer: layers.BaseLayer{Payload: []byte{3, 2, 3}}, + }, + want: []Reassembly{ + Reassembly{ + Skip: -1, + Bytes: []byte{1, 2, 3}, + }, + Reassembly{ + Bytes: []byte{2, 2, 3}, + }, + Reassembly{ + Bytes: []byte{3, 2, 3}, + }, + Reassembly{ + Bytes: []byte{4, 2, 3}, + }, + }, + }, + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + Seq: 1016, + BaseLayer: layers.BaseLayer{Payload: []byte{2, 2, 3}}, + }, + want: []Reassembly{}, + }, + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + Seq: 1019, + BaseLayer: layers.BaseLayer{Payload: []byte{3, 2, 3}}, + }, + want: []Reassembly{}, + }, + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + Seq: 1013, + BaseLayer: layers.BaseLayer{Payload: []byte{1, 2, 3}}, + }, + want: []Reassembly{ + Reassembly{ + Bytes: []byte{1, 2, 3}, + }, + Reassembly{ + Bytes: []byte{2, 2, 3}, + }, + Reassembly{ + Bytes: []byte{3, 2, 3}, + }, + }, + }, + }) +} + +func TestMaxPerSkip(t *testing.T) { + test(t, []testSequence{ + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + Seq: 1000, + SYN: true, + BaseLayer: layers.BaseLayer{Payload: []byte{1, 2, 3}}, + }, + want: []Reassembly{ + Reassembly{ + Start: true, + Bytes: []byte{1, 2, 3}, + }, + }, + }, + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + Seq: 1007, + BaseLayer: layers.BaseLayer{Payload: []byte{3, 2, 3}}, + }, + want: []Reassembly{}, + }, + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + Seq: 1010, + BaseLayer: layers.BaseLayer{Payload: []byte{4, 2, 3}}, + }, + want: []Reassembly{}, + }, + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + Seq: 1013, + BaseLayer: layers.BaseLayer{Payload: []byte{5, 2, 3}}, + }, + want: []Reassembly{}, + }, + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + Seq: 1016, + BaseLayer: layers.BaseLayer{Payload: []byte{6, 2, 3}}, + }, + want: []Reassembly{ + Reassembly{ + Skip: 3, + Bytes: []byte{3, 2, 3}, + }, + Reassembly{ + Bytes: []byte{4, 2, 3}, + }, + Reassembly{ + Bytes: []byte{5, 2, 3}, + }, + Reassembly{ + Bytes: []byte{6, 2, 3}, + }, + }, + }, + }) +} + +func TestReorderFast(t *testing.T) { + test(t, []testSequence{ + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + SYN: true, + Seq: 1000, + BaseLayer: layers.BaseLayer{Payload: []byte{1, 2, 3}}, + }, + want: []Reassembly{ + Reassembly{ + Start: true, + Bytes: []byte{1, 2, 3}, + }, + }, + }, + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + Seq: 1007, + BaseLayer: layers.BaseLayer{Payload: []byte{3, 2, 3}}, + }, + want: []Reassembly{}, + }, + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + Seq: 1004, + BaseLayer: layers.BaseLayer{Payload: []byte{2, 2, 3}}, + }, + want: []Reassembly{ + Reassembly{ + Bytes: []byte{2, 2, 3}, + }, + Reassembly{ + Bytes: []byte{3, 2, 3}, + }, + }, + }, + }) +} + +func TestOverlap(t *testing.T) { + test(t, []testSequence{ + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + SYN: true, + Seq: 1000, + BaseLayer: layers.BaseLayer{Payload: []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 0}}, + }, + want: []Reassembly{ + Reassembly{ + Start: true, + Bytes: []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 0}, + }, + }, + }, + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + Seq: 1007, + BaseLayer: layers.BaseLayer{Payload: []byte{7, 8, 9, 0, 1, 2, 3, 4, 5}}, + }, + want: []Reassembly{ + Reassembly{ + Bytes: []byte{1, 2, 3, 4, 5}, + }, + }, + }, + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + Seq: 1010, + BaseLayer: layers.BaseLayer{Payload: []byte{0, 1, 2, 3, 4, 5, 6, 7}}, + }, + want: []Reassembly{ + Reassembly{ + Bytes: []byte{6, 7}, + }, + }, + }, + }) +} + +func TestBufferedOverlap(t *testing.T) { + test(t, []testSequence{ + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + Seq: 1007, + BaseLayer: layers.BaseLayer{Payload: []byte{7, 8, 9, 0, 1, 2, 3, 4, 5}}, + }, + want: []Reassembly{}, + }, + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + Seq: 1010, + BaseLayer: layers.BaseLayer{Payload: []byte{0, 1, 2, 3, 4, 5, 6, 7}}, + }, + want: []Reassembly{}, + }, + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + SYN: true, + Seq: 1000, + BaseLayer: layers.BaseLayer{Payload: []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 0}}, + }, + want: []Reassembly{ + Reassembly{ + Start: true, + Bytes: []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 0}, + }, + Reassembly{ + Bytes: []byte{1, 2, 3, 4, 5}, + }, + Reassembly{ + Bytes: []byte{6, 7}, + }, + }, + }, + }) +} + +func TestOverrun1(t *testing.T) { + test(t, []testSequence{ + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + SYN: true, + Seq: 0xFFFFFFFF, + BaseLayer: layers.BaseLayer{Payload: []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 0}}, + }, + want: []Reassembly{ + Reassembly{ + Start: true, + Bytes: []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 0}, + }, + }, + }, + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + Seq: 10, + BaseLayer: layers.BaseLayer{Payload: []byte{1, 2, 3, 4}}, + }, + want: []Reassembly{ + Reassembly{ + Bytes: []byte{1, 2, 3, 4}, + }, + }, + }, + }) +} + +func TestOverrun2(t *testing.T) { + test(t, []testSequence{ + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + Seq: 10, + BaseLayer: layers.BaseLayer{Payload: []byte{1, 2, 3, 4}}, + }, + want: []Reassembly{}, + }, + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + SYN: true, + Seq: 0xFFFFFFFF, + BaseLayer: layers.BaseLayer{Payload: []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 0}}, + }, + want: []Reassembly{ + Reassembly{ + Start: true, + Bytes: []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 0}, + }, + Reassembly{ + Bytes: []byte{1, 2, 3, 4}, + }, + }, + }, + }) +} + +func TestCacheLargePacket(t *testing.T) { + data := make([]byte, pageBytes*3) + test(t, []testSequence{ + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + Seq: 1001, + BaseLayer: layers.BaseLayer{Payload: data}, + }, + want: []Reassembly{}, + }, + { + in: layers.TCP{ + SrcPort: 1, + DstPort: 2, + Seq: 1000, + SYN: true, + BaseLayer: layers.BaseLayer{Payload: []byte{}}, + }, + want: []Reassembly{ + Reassembly{ + Start: true, + Bytes: []byte{}, + }, + Reassembly{ + Bytes: data[:pageBytes], + }, + Reassembly{ + Bytes: data[pageBytes : pageBytes*2], + }, + Reassembly{ + Bytes: data[pageBytes*2 : pageBytes*3], + }, + }, + }, + }) +} + +func BenchmarkSingleStream(b *testing.B) { + t := layers.TCP{ + SrcPort: 1, + DstPort: 2, + SYN: true, + Seq: 1000, + BaseLayer: layers.BaseLayer{Payload: []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 0}}, + } + a := NewAssembler(NewStreamPool(&testFactory{})) + for i := 0; i < b.N; i++ { + a.Assemble(netFlow, &t) + if t.SYN { + t.SYN = false + t.Seq++ + } + t.Seq += 10 + } +} + +func BenchmarkSingleStreamSkips(b *testing.B) { + t := layers.TCP{ + SrcPort: 1, + DstPort: 2, + SYN: true, + Seq: 1000, + BaseLayer: layers.BaseLayer{Payload: []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 0}}, + } + a := NewAssembler(NewStreamPool(&testFactory{})) + skipped := false + for i := 0; i < b.N; i++ { + if i%10 == 9 { + t.Seq += 10 + skipped = true + } else if skipped { + t.Seq -= 20 + } + a.Assemble(netFlow, &t) + if t.SYN { + t.SYN = false + t.Seq++ + } + t.Seq += 10 + if skipped { + t.Seq += 10 + skipped = false + } + } +} + +func BenchmarkSingleStreamLoss(b *testing.B) { + t := layers.TCP{ + SrcPort: 1, + DstPort: 2, + SYN: true, + Seq: 1000, + BaseLayer: layers.BaseLayer{Payload: []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 0}}, + } + a := NewAssembler(NewStreamPool(&testFactory{})) + for i := 0; i < b.N; i++ { + a.Assemble(netFlow, &t) + t.SYN = false + t.Seq += 11 + } +} + +func BenchmarkMultiStreamGrow(b *testing.B) { + t := layers.TCP{ + SrcPort: 1, + DstPort: 2, + Seq: 0, + BaseLayer: layers.BaseLayer{Payload: []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 0}}, + } + a := NewAssembler(NewStreamPool(&testFactory{})) + for i := 0; i < b.N; i++ { + t.SrcPort = layers.TCPPort(i) + a.Assemble(netFlow, &t) + t.Seq += 10 + } +} + +func BenchmarkMultiStreamConn(b *testing.B) { + t := layers.TCP{ + SrcPort: 1, + DstPort: 2, + Seq: 0, + SYN: true, + BaseLayer: layers.BaseLayer{Payload: []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 0}}, + } + a := NewAssembler(NewStreamPool(&testFactory{})) + for i := 0; i < b.N; i++ { + t.SrcPort = layers.TCPPort(i) + a.Assemble(netFlow, &t) + if i%65536 == 65535 { + if t.SYN { + t.SYN = false + t.Seq += 1 + } + t.Seq += 10 + } + } +} diff --git a/vendor/github.com/vtolstov/gopacket/tcpassembly/tcpreader/reader.go b/vendor/github.com/vtolstov/gopacket/tcpassembly/tcpreader/reader.go new file mode 100644 index 0000000..90e7e45 --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/tcpassembly/tcpreader/reader.go @@ -0,0 +1,209 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +// Package tcpreader provides an implementation for tcpassembly.Stream which presents +// the caller with an io.Reader for easy processing. +// +// The assembly package handles packet data reordering, but its output is +// library-specific, thus not usable by the majority of external Go libraries. +// The io.Reader interface, on the other hand, is used throughout much of Go +// code as an easy mechanism for reading in data streams and decoding them. For +// example, the net/http package provides the ReadRequest function, which can +// parase an HTTP request from a live data stream, just what we'd want when +// sniffing HTTP traffic. Using ReaderStream, this is relatively easy to set +// up: +// +// // Create our StreamFactory +// type httpStreamFactory struct {} +// func (f *httpStreamFactory) New(a, b gopacket.Flow) { +// r := tcpreader.NewReaderStream(false) +// go printRequests(r) +// return &r +// } +// func printRequests(r io.Reader) { +// // Convert to bufio, since that's what ReadRequest wants. +// buf := bufio.NewReader(r) +// for { +// if req, err := http.ReadRequest(buf); err == io.EOF { +// return +// } else if err != nil { +// log.Println("Error parsing HTTP requests:", err) +// } else { +// fmt.Println("HTTP REQUEST:", req) +// fmt.Println("Body contains", tcpreader.DiscardBytesToEOF(req.Body), "bytes") +// } +// } +// } +// +// Using just this code, we're able to reference a powerful, built-in library +// for HTTP request parsing to do all the dirty-work of parsing requests from +// the wire in real-time. Pass this stream factory to an tcpassembly.StreamPool, +// start up an tcpassembly.Assembler, and you're good to go! +package tcpreader + +import ( + "errors" + "github.com/vtolstov/gopacket/tcpassembly" + "io" +) + +var discardBuffer = make([]byte, 4096) + +// DiscardBytesToFirstError will read in all bytes up to the first error +// reported by the given reader, then return the number of bytes discarded +// and the error encountered. +func DiscardBytesToFirstError(r io.Reader) (discarded int, err error) { + for { + n, e := r.Read(discardBuffer) + discarded += n + if e != nil { + return discarded, e + } + } +} + +// DiscardBytesToEOF will read in all bytes from a Reader until it +// encounters an io.EOF, then return the number of bytes. Be careful +// of this... if used on a Reader that returns a non-io.EOF error +// consistently, this will loop forever discarding that error while +// it waits for an EOF. +func DiscardBytesToEOF(r io.Reader) (discarded int) { + for { + n, e := DiscardBytesToFirstError(r) + discarded += n + if e == io.EOF { + return + } + } +} + +// ReaderStream implements both tcpassembly.Stream and io.Reader. You can use it +// as a building block to make simple, easy stream handlers. +// +// IMPORTANT: If you use a ReaderStream, you MUST read ALL BYTES from it, +// quickly. Not reading available bytes will block TCP stream reassembly. It's +// a common pattern to do this by starting a goroutine in the factory's New +// method: +// +// type myStreamHandler struct { +// r ReaderStream +// } +// func (m *myStreamHandler) run() { +// // Do something here that reads all of the ReaderStream, or your assembly +// // will block. +// fmt.Println(tcpreader.DiscardBytesToEOF(&m.r)) +// } +// func (f *myStreamFactory) New(a, b gopacket.Flow) tcpassembly.Stream { +// s := &myStreamHandler{} +// go s.run() +// // Return the ReaderStream as the stream that assembly should populate. +// return &s.r +// } +type ReaderStream struct { + ReaderStreamOptions + reassembled chan []tcpassembly.Reassembly + done chan bool + current []tcpassembly.Reassembly + closed bool + lossReported bool + first bool + initiated bool +} + +type ReaderStreamOptions struct { + // LossErrors determines whether this stream will return + // ReaderStreamDataLoss errors from its Read function whenever it + // determines data has been lost. + LossErrors bool +} + +// NewReaderStream returns a new ReaderStream object. +func NewReaderStream() ReaderStream { + r := ReaderStream{ + reassembled: make(chan []tcpassembly.Reassembly), + done: make(chan bool), + first: true, + initiated: true, + } + return r +} + +// Reassembled implements tcpassembly.Stream's Reassembled function. +func (r *ReaderStream) Reassembled(reassembly []tcpassembly.Reassembly) { + if !r.initiated { + panic("ReaderStream not created via NewReaderStream") + } + r.reassembled <- reassembly + <-r.done +} + +// ReassemblyComplete implements tcpassembly.Stream's ReassemblyComplete function. +func (r *ReaderStream) ReassemblyComplete() { + close(r.reassembled) + close(r.done) +} + +// stripEmpty strips empty reassembly slices off the front of its current set of +// slices. +func (r *ReaderStream) stripEmpty() { + for len(r.current) > 0 && len(r.current[0].Bytes) == 0 { + r.current = r.current[1:] + r.lossReported = false + } +} + +// DataLost is returned by the ReaderStream's Read function when it encounters +// a Reassembly with Skip != 0. +var DataLost error = errors.New("lost data") + +// Read implements io.Reader's Read function. +// Given a byte slice, it will either copy a non-zero number of bytes into +// that slice and return the number of bytes and a nil error, or it will +// leave slice p as is and return 0, io.EOF. +func (r *ReaderStream) Read(p []byte) (int, error) { + if !r.initiated { + panic("ReaderStream not created via NewReaderStream") + } + var ok bool + r.stripEmpty() + for !r.closed && len(r.current) == 0 { + if r.first { + r.first = false + } else { + r.done <- true + } + if r.current, ok = <-r.reassembled; ok { + r.stripEmpty() + } else { + r.closed = true + } + } + if len(r.current) > 0 { + current := &r.current[0] + if r.LossErrors && !r.lossReported && current.Skip != 0 { + r.lossReported = true + return 0, DataLost + } + length := copy(p, current.Bytes) + current.Bytes = current.Bytes[length:] + return length, nil + } + return 0, io.EOF +} + +// Close implements io.Closer's Close function, making ReaderStream a +// io.ReadCloser. It discards all remaining bytes in the reassembly in a +// manner that's safe for the assembler (IE: it doesn't block). +func (r *ReaderStream) Close() error { + r.current = nil + r.closed = true + for { + if _, ok := <-r.reassembled; !ok { + return nil + } + r.done <- true + } +} diff --git a/vendor/github.com/vtolstov/gopacket/tcpassembly/tcpreader/reader_test.go b/vendor/github.com/vtolstov/gopacket/tcpassembly/tcpreader/reader_test.go new file mode 100644 index 0000000..23e237f --- /dev/null +++ b/vendor/github.com/vtolstov/gopacket/tcpassembly/tcpreader/reader_test.go @@ -0,0 +1,129 @@ +// Copyright 2012 Google, Inc. All rights reserved. +// +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file in the root of the source +// tree. + +package tcpreader + +import ( + "bytes" + "fmt" + "github.com/vtolstov/gopacket" + "github.com/vtolstov/gopacket/layers" + "github.com/vtolstov/gopacket/tcpassembly" + "io" + "net" + "testing" +) + +var netFlow gopacket.Flow + +func init() { + netFlow, _ = gopacket.FlowFromEndpoints( + layers.NewIPEndpoint(net.IP{1, 2, 3, 4}), + layers.NewIPEndpoint(net.IP{5, 6, 7, 8})) +} + +type readReturn struct { + data []byte + err error +} +type readSequence struct { + in []layers.TCP + want []readReturn +} +type testReaderFactory struct { + lossErrors bool + readSize int + ReaderStream + output chan []byte +} + +func (t *testReaderFactory) New(a, b gopacket.Flow) tcpassembly.Stream { + return &t.ReaderStream +} + +func testReadSequence(t *testing.T, lossErrors bool, readSize int, seq readSequence) { + f := &testReaderFactory{ReaderStream: NewReaderStream()} + f.ReaderStream.LossErrors = lossErrors + p := tcpassembly.NewStreamPool(f) + a := tcpassembly.NewAssembler(p) + buf := make([]byte, readSize) + go func() { + for i, test := range seq.in { + fmt.Println("Assembling", i) + a.Assemble(netFlow, &test) + fmt.Println("Assembly done") + } + }() + for i, test := range seq.want { + fmt.Println("Waiting for read", i) + n, err := f.Read(buf[:]) + fmt.Println("Got read") + if n != len(test.data) { + t.Errorf("test %d want %d bytes, got %d bytes", i, len(test.data), n) + } else if err != test.err { + t.Errorf("test %d want err %v, got err %v", i, test.err, err) + } else if !bytes.Equal(buf[:n], test.data) { + t.Errorf("test %d\nwant: %v\n got: %v\n", i, test.data, buf[:n]) + } + } + fmt.Println("All done reads") +} + +func TestRead(t *testing.T) { + testReadSequence(t, false, 10, readSequence{ + in: []layers.TCP{ + { + SYN: true, + SrcPort: 1, + DstPort: 2, + Seq: 1000, + BaseLayer: layers.BaseLayer{Payload: []byte{1, 2, 3}}, + }, + { + FIN: true, + SrcPort: 1, + DstPort: 2, + Seq: 1004, + }, + }, + want: []readReturn{ + {data: []byte{1, 2, 3}}, + {err: io.EOF}, + }, + }) +} + +func TestReadSmallChunks(t *testing.T) { + testReadSequence(t, false, 2, readSequence{ + in: []layers.TCP{ + { + SYN: true, + SrcPort: 1, + DstPort: 2, + Seq: 1000, + BaseLayer: layers.BaseLayer{Payload: []byte{1, 2, 3}}, + }, + { + FIN: true, + SrcPort: 1, + DstPort: 2, + Seq: 1004, + }, + }, + want: []readReturn{ + {data: []byte{1, 2}}, + {data: []byte{3}}, + {err: io.EOF}, + }, + }) +} + +func ExampleDiscardBytesToEOF() { + b := bytes.NewBuffer([]byte{1, 2, 3, 4, 5}) + fmt.Println(DiscardBytesToEOF(b)) + // Output: + // 5 +} diff --git a/vendor/golang.org/x/net/.gitattributes b/vendor/golang.org/x/net/.gitattributes new file mode 100644 index 0000000..d2f212e --- /dev/null +++ b/vendor/golang.org/x/net/.gitattributes @@ -0,0 +1,10 @@ +# Treat all files in this repo as binary, with no git magic updating +# line endings. Windows users contributing to Go will need to use a +# modern version of git and editors capable of LF line endings. +# +# We'll prevent accidental CRLF line endings from entering the repo +# via the git-review gofmt checks. +# +# See golang.org/issue/9281 + +* -text diff --git a/vendor/golang.org/x/net/.gitignore b/vendor/golang.org/x/net/.gitignore new file mode 100644 index 0000000..8339fd6 --- /dev/null +++ b/vendor/golang.org/x/net/.gitignore @@ -0,0 +1,2 @@ +# Add no patterns to .hgignore except for files generated by the build. +last-change diff --git a/vendor/golang.org/x/net/AUTHORS b/vendor/golang.org/x/net/AUTHORS new file mode 100644 index 0000000..15167cd --- /dev/null +++ b/vendor/golang.org/x/net/AUTHORS @@ -0,0 +1,3 @@ +# This source code refers to The Go Authors for copyright purposes. +# The master list of authors is in the main Go distribution, +# visible at http://tip.golang.org/AUTHORS. diff --git a/vendor/golang.org/x/net/CONTRIBUTING.md b/vendor/golang.org/x/net/CONTRIBUTING.md new file mode 100644 index 0000000..88dff59 --- /dev/null +++ b/vendor/golang.org/x/net/CONTRIBUTING.md @@ -0,0 +1,31 @@ +# Contributing to Go + +Go is an open source project. + +It is the work of hundreds of contributors. We appreciate your help! + + +## Filing issues + +When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: + +1. What version of Go are you using (`go version`)? +2. What operating system and processor architecture are you using? +3. What did you do? +4. What did you expect to see? +5. What did you see instead? + +General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. +The gophers there will answer or ask you to file an issue if you've tripped over a bug. + +## Contributing code + +Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) +before sending patches. + +**We do not accept GitHub pull requests** +(we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review). + +Unless otherwise noted, the Go source files are distributed under +the BSD-style license found in the LICENSE file. + diff --git a/vendor/golang.org/x/net/CONTRIBUTORS b/vendor/golang.org/x/net/CONTRIBUTORS new file mode 100644 index 0000000..1c4577e --- /dev/null +++ b/vendor/golang.org/x/net/CONTRIBUTORS @@ -0,0 +1,3 @@ +# This source code was written by the Go contributors. +# The master list of contributors is in the main Go distribution, +# visible at http://tip.golang.org/CONTRIBUTORS. diff --git a/vendor/golang.org/x/net/LICENSE b/vendor/golang.org/x/net/LICENSE new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/vendor/golang.org/x/net/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/golang.org/x/net/PATENTS b/vendor/golang.org/x/net/PATENTS new file mode 100644 index 0000000..7330990 --- /dev/null +++ b/vendor/golang.org/x/net/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/vendor/golang.org/x/net/README b/vendor/golang.org/x/net/README new file mode 100644 index 0000000..6b13d8e --- /dev/null +++ b/vendor/golang.org/x/net/README @@ -0,0 +1,3 @@ +This repository holds supplementary Go networking libraries. + +To submit changes to this repository, see http://golang.org/doc/contribute.html. diff --git a/vendor/golang.org/x/net/codereview.cfg b/vendor/golang.org/x/net/codereview.cfg new file mode 100644 index 0000000..3f8b14b --- /dev/null +++ b/vendor/golang.org/x/net/codereview.cfg @@ -0,0 +1 @@ +issuerepo: golang/go diff --git a/vendor/golang.org/x/net/context/context.go b/vendor/golang.org/x/net/context/context.go new file mode 100644 index 0000000..e7ee376 --- /dev/null +++ b/vendor/golang.org/x/net/context/context.go @@ -0,0 +1,447 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package context defines the Context type, which carries deadlines, +// cancelation signals, and other request-scoped values across API boundaries +// and between processes. +// +// Incoming requests to a server should create a Context, and outgoing calls to +// servers should accept a Context. The chain of function calls between must +// propagate the Context, optionally replacing it with a modified copy created +// using WithDeadline, WithTimeout, WithCancel, or WithValue. +// +// Programs that use Contexts should follow these rules to keep interfaces +// consistent across packages and enable static analysis tools to check context +// propagation: +// +// Do not store Contexts inside a struct type; instead, pass a Context +// explicitly to each function that needs it. The Context should be the first +// parameter, typically named ctx: +// +// func DoSomething(ctx context.Context, arg Arg) error { +// // ... use ctx ... +// } +// +// Do not pass a nil Context, even if a function permits it. Pass context.TODO +// if you are unsure about which Context to use. +// +// Use context Values only for request-scoped data that transits processes and +// APIs, not for passing optional parameters to functions. +// +// The same Context may be passed to functions running in different goroutines; +// Contexts are safe for simultaneous use by multiple goroutines. +// +// See http://blog.golang.org/context for example code for a server that uses +// Contexts. +package context // import "golang.org/x/net/context" + +import ( + "errors" + "fmt" + "sync" + "time" +) + +// A Context carries a deadline, a cancelation signal, and other values across +// API boundaries. +// +// Context's methods may be called by multiple goroutines simultaneously. +type Context interface { + // Deadline returns the time when work done on behalf of this context + // should be canceled. Deadline returns ok==false when no deadline is + // set. Successive calls to Deadline return the same results. + Deadline() (deadline time.Time, ok bool) + + // Done returns a channel that's closed when work done on behalf of this + // context should be canceled. Done may return nil if this context can + // never be canceled. Successive calls to Done return the same value. + // + // WithCancel arranges for Done to be closed when cancel is called; + // WithDeadline arranges for Done to be closed when the deadline + // expires; WithTimeout arranges for Done to be closed when the timeout + // elapses. + // + // Done is provided for use in select statements: + // + // // Stream generates values with DoSomething and sends them to out + // // until DoSomething returns an error or ctx.Done is closed. + // func Stream(ctx context.Context, out <-chan Value) error { + // for { + // v, err := DoSomething(ctx) + // if err != nil { + // return err + // } + // select { + // case <-ctx.Done(): + // return ctx.Err() + // case out <- v: + // } + // } + // } + // + // See http://blog.golang.org/pipelines for more examples of how to use + // a Done channel for cancelation. + Done() <-chan struct{} + + // Err returns a non-nil error value after Done is closed. Err returns + // Canceled if the context was canceled or DeadlineExceeded if the + // context's deadline passed. No other values for Err are defined. + // After Done is closed, successive calls to Err return the same value. + Err() error + + // Value returns the value associated with this context for key, or nil + // if no value is associated with key. Successive calls to Value with + // the same key returns the same result. + // + // Use context values only for request-scoped data that transits + // processes and API boundaries, not for passing optional parameters to + // functions. + // + // A key identifies a specific value in a Context. Functions that wish + // to store values in Context typically allocate a key in a global + // variable then use that key as the argument to context.WithValue and + // Context.Value. A key can be any type that supports equality; + // packages should define keys as an unexported type to avoid + // collisions. + // + // Packages that define a Context key should provide type-safe accessors + // for the values stores using that key: + // + // // Package user defines a User type that's stored in Contexts. + // package user + // + // import "golang.org/x/net/context" + // + // // User is the type of value stored in the Contexts. + // type User struct {...} + // + // // key is an unexported type for keys defined in this package. + // // This prevents collisions with keys defined in other packages. + // type key int + // + // // userKey is the key for user.User values in Contexts. It is + // // unexported; clients use user.NewContext and user.FromContext + // // instead of using this key directly. + // var userKey key = 0 + // + // // NewContext returns a new Context that carries value u. + // func NewContext(ctx context.Context, u *User) context.Context { + // return context.WithValue(ctx, userKey, u) + // } + // + // // FromContext returns the User value stored in ctx, if any. + // func FromContext(ctx context.Context) (*User, bool) { + // u, ok := ctx.Value(userKey).(*User) + // return u, ok + // } + Value(key interface{}) interface{} +} + +// Canceled is the error returned by Context.Err when the context is canceled. +var Canceled = errors.New("context canceled") + +// DeadlineExceeded is the error returned by Context.Err when the context's +// deadline passes. +var DeadlineExceeded = errors.New("context deadline exceeded") + +// An emptyCtx is never canceled, has no values, and has no deadline. It is not +// struct{}, since vars of this type must have distinct addresses. +type emptyCtx int + +func (*emptyCtx) Deadline() (deadline time.Time, ok bool) { + return +} + +func (*emptyCtx) Done() <-chan struct{} { + return nil +} + +func (*emptyCtx) Err() error { + return nil +} + +func (*emptyCtx) Value(key interface{}) interface{} { + return nil +} + +func (e *emptyCtx) String() string { + switch e { + case background: + return "context.Background" + case todo: + return "context.TODO" + } + return "unknown empty Context" +} + +var ( + background = new(emptyCtx) + todo = new(emptyCtx) +) + +// Background returns a non-nil, empty Context. It is never canceled, has no +// values, and has no deadline. It is typically used by the main function, +// initialization, and tests, and as the top-level Context for incoming +// requests. +func Background() Context { + return background +} + +// TODO returns a non-nil, empty Context. Code should use context.TODO when +// it's unclear which Context to use or it's is not yet available (because the +// surrounding function has not yet been extended to accept a Context +// parameter). TODO is recognized by static analysis tools that determine +// whether Contexts are propagated correctly in a program. +func TODO() Context { + return todo +} + +// A CancelFunc tells an operation to abandon its work. +// A CancelFunc does not wait for the work to stop. +// After the first call, subsequent calls to a CancelFunc do nothing. +type CancelFunc func() + +// WithCancel returns a copy of parent with a new Done channel. The returned +// context's Done channel is closed when the returned cancel function is called +// or when the parent context's Done channel is closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithCancel(parent Context) (ctx Context, cancel CancelFunc) { + c := newCancelCtx(parent) + propagateCancel(parent, &c) + return &c, func() { c.cancel(true, Canceled) } +} + +// newCancelCtx returns an initialized cancelCtx. +func newCancelCtx(parent Context) cancelCtx { + return cancelCtx{ + Context: parent, + done: make(chan struct{}), + } +} + +// propagateCancel arranges for child to be canceled when parent is. +func propagateCancel(parent Context, child canceler) { + if parent.Done() == nil { + return // parent is never canceled + } + if p, ok := parentCancelCtx(parent); ok { + p.mu.Lock() + if p.err != nil { + // parent has already been canceled + child.cancel(false, p.err) + } else { + if p.children == nil { + p.children = make(map[canceler]bool) + } + p.children[child] = true + } + p.mu.Unlock() + } else { + go func() { + select { + case <-parent.Done(): + child.cancel(false, parent.Err()) + case <-child.Done(): + } + }() + } +} + +// parentCancelCtx follows a chain of parent references until it finds a +// *cancelCtx. This function understands how each of the concrete types in this +// package represents its parent. +func parentCancelCtx(parent Context) (*cancelCtx, bool) { + for { + switch c := parent.(type) { + case *cancelCtx: + return c, true + case *timerCtx: + return &c.cancelCtx, true + case *valueCtx: + parent = c.Context + default: + return nil, false + } + } +} + +// removeChild removes a context from its parent. +func removeChild(parent Context, child canceler) { + p, ok := parentCancelCtx(parent) + if !ok { + return + } + p.mu.Lock() + if p.children != nil { + delete(p.children, child) + } + p.mu.Unlock() +} + +// A canceler is a context type that can be canceled directly. The +// implementations are *cancelCtx and *timerCtx. +type canceler interface { + cancel(removeFromParent bool, err error) + Done() <-chan struct{} +} + +// A cancelCtx can be canceled. When canceled, it also cancels any children +// that implement canceler. +type cancelCtx struct { + Context + + done chan struct{} // closed by the first cancel call. + + mu sync.Mutex + children map[canceler]bool // set to nil by the first cancel call + err error // set to non-nil by the first cancel call +} + +func (c *cancelCtx) Done() <-chan struct{} { + return c.done +} + +func (c *cancelCtx) Err() error { + c.mu.Lock() + defer c.mu.Unlock() + return c.err +} + +func (c *cancelCtx) String() string { + return fmt.Sprintf("%v.WithCancel", c.Context) +} + +// cancel closes c.done, cancels each of c's children, and, if +// removeFromParent is true, removes c from its parent's children. +func (c *cancelCtx) cancel(removeFromParent bool, err error) { + if err == nil { + panic("context: internal error: missing cancel error") + } + c.mu.Lock() + if c.err != nil { + c.mu.Unlock() + return // already canceled + } + c.err = err + close(c.done) + for child := range c.children { + // NOTE: acquiring the child's lock while holding parent's lock. + child.cancel(false, err) + } + c.children = nil + c.mu.Unlock() + + if removeFromParent { + removeChild(c.Context, c) + } +} + +// WithDeadline returns a copy of the parent context with the deadline adjusted +// to be no later than d. If the parent's deadline is already earlier than d, +// WithDeadline(parent, d) is semantically equivalent to parent. The returned +// context's Done channel is closed when the deadline expires, when the returned +// cancel function is called, or when the parent context's Done channel is +// closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) { + if cur, ok := parent.Deadline(); ok && cur.Before(deadline) { + // The current deadline is already sooner than the new one. + return WithCancel(parent) + } + c := &timerCtx{ + cancelCtx: newCancelCtx(parent), + deadline: deadline, + } + propagateCancel(parent, c) + d := deadline.Sub(time.Now()) + if d <= 0 { + c.cancel(true, DeadlineExceeded) // deadline has already passed + return c, func() { c.cancel(true, Canceled) } + } + c.mu.Lock() + defer c.mu.Unlock() + if c.err == nil { + c.timer = time.AfterFunc(d, func() { + c.cancel(true, DeadlineExceeded) + }) + } + return c, func() { c.cancel(true, Canceled) } +} + +// A timerCtx carries a timer and a deadline. It embeds a cancelCtx to +// implement Done and Err. It implements cancel by stopping its timer then +// delegating to cancelCtx.cancel. +type timerCtx struct { + cancelCtx + timer *time.Timer // Under cancelCtx.mu. + + deadline time.Time +} + +func (c *timerCtx) Deadline() (deadline time.Time, ok bool) { + return c.deadline, true +} + +func (c *timerCtx) String() string { + return fmt.Sprintf("%v.WithDeadline(%s [%s])", c.cancelCtx.Context, c.deadline, c.deadline.Sub(time.Now())) +} + +func (c *timerCtx) cancel(removeFromParent bool, err error) { + c.cancelCtx.cancel(false, err) + if removeFromParent { + // Remove this timerCtx from its parent cancelCtx's children. + removeChild(c.cancelCtx.Context, c) + } + c.mu.Lock() + if c.timer != nil { + c.timer.Stop() + c.timer = nil + } + c.mu.Unlock() +} + +// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)). +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete: +// +// func slowOperationWithTimeout(ctx context.Context) (Result, error) { +// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond) +// defer cancel() // releases resources if slowOperation completes before timeout elapses +// return slowOperation(ctx) +// } +func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) { + return WithDeadline(parent, time.Now().Add(timeout)) +} + +// WithValue returns a copy of parent in which the value associated with key is +// val. +// +// Use context Values only for request-scoped data that transits processes and +// APIs, not for passing optional parameters to functions. +func WithValue(parent Context, key interface{}, val interface{}) Context { + return &valueCtx{parent, key, val} +} + +// A valueCtx carries a key-value pair. It implements Value for that key and +// delegates all other calls to the embedded Context. +type valueCtx struct { + Context + key, val interface{} +} + +func (c *valueCtx) String() string { + return fmt.Sprintf("%v.WithValue(%#v, %#v)", c.Context, c.key, c.val) +} + +func (c *valueCtx) Value(key interface{}) interface{} { + if c.key == key { + return c.val + } + return c.Context.Value(key) +} diff --git a/vendor/golang.org/x/net/context/context_test.go b/vendor/golang.org/x/net/context/context_test.go new file mode 100644 index 0000000..05345fc --- /dev/null +++ b/vendor/golang.org/x/net/context/context_test.go @@ -0,0 +1,575 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package context + +import ( + "fmt" + "math/rand" + "runtime" + "strings" + "sync" + "testing" + "time" +) + +// otherContext is a Context that's not one of the types defined in context.go. +// This lets us test code paths that differ based on the underlying type of the +// Context. +type otherContext struct { + Context +} + +func TestBackground(t *testing.T) { + c := Background() + if c == nil { + t.Fatalf("Background returned nil") + } + select { + case x := <-c.Done(): + t.Errorf("<-c.Done() == %v want nothing (it should block)", x) + default: + } + if got, want := fmt.Sprint(c), "context.Background"; got != want { + t.Errorf("Background().String() = %q want %q", got, want) + } +} + +func TestTODO(t *testing.T) { + c := TODO() + if c == nil { + t.Fatalf("TODO returned nil") + } + select { + case x := <-c.Done(): + t.Errorf("<-c.Done() == %v want nothing (it should block)", x) + default: + } + if got, want := fmt.Sprint(c), "context.TODO"; got != want { + t.Errorf("TODO().String() = %q want %q", got, want) + } +} + +func TestWithCancel(t *testing.T) { + c1, cancel := WithCancel(Background()) + + if got, want := fmt.Sprint(c1), "context.Background.WithCancel"; got != want { + t.Errorf("c1.String() = %q want %q", got, want) + } + + o := otherContext{c1} + c2, _ := WithCancel(o) + contexts := []Context{c1, o, c2} + + for i, c := range contexts { + if d := c.Done(); d == nil { + t.Errorf("c[%d].Done() == %v want non-nil", i, d) + } + if e := c.Err(); e != nil { + t.Errorf("c[%d].Err() == %v want nil", i, e) + } + + select { + case x := <-c.Done(): + t.Errorf("<-c.Done() == %v want nothing (it should block)", x) + default: + } + } + + cancel() + time.Sleep(100 * time.Millisecond) // let cancelation propagate + + for i, c := range contexts { + select { + case <-c.Done(): + default: + t.Errorf("<-c[%d].Done() blocked, but shouldn't have", i) + } + if e := c.Err(); e != Canceled { + t.Errorf("c[%d].Err() == %v want %v", i, e, Canceled) + } + } +} + +func TestParentFinishesChild(t *testing.T) { + // Context tree: + // parent -> cancelChild + // parent -> valueChild -> timerChild + parent, cancel := WithCancel(Background()) + cancelChild, stop := WithCancel(parent) + defer stop() + valueChild := WithValue(parent, "key", "value") + timerChild, stop := WithTimeout(valueChild, 10000*time.Hour) + defer stop() + + select { + case x := <-parent.Done(): + t.Errorf("<-parent.Done() == %v want nothing (it should block)", x) + case x := <-cancelChild.Done(): + t.Errorf("<-cancelChild.Done() == %v want nothing (it should block)", x) + case x := <-timerChild.Done(): + t.Errorf("<-timerChild.Done() == %v want nothing (it should block)", x) + case x := <-valueChild.Done(): + t.Errorf("<-valueChild.Done() == %v want nothing (it should block)", x) + default: + } + + // The parent's children should contain the two cancelable children. + pc := parent.(*cancelCtx) + cc := cancelChild.(*cancelCtx) + tc := timerChild.(*timerCtx) + pc.mu.Lock() + if len(pc.children) != 2 || !pc.children[cc] || !pc.children[tc] { + t.Errorf("bad linkage: pc.children = %v, want %v and %v", + pc.children, cc, tc) + } + pc.mu.Unlock() + + if p, ok := parentCancelCtx(cc.Context); !ok || p != pc { + t.Errorf("bad linkage: parentCancelCtx(cancelChild.Context) = %v, %v want %v, true", p, ok, pc) + } + if p, ok := parentCancelCtx(tc.Context); !ok || p != pc { + t.Errorf("bad linkage: parentCancelCtx(timerChild.Context) = %v, %v want %v, true", p, ok, pc) + } + + cancel() + + pc.mu.Lock() + if len(pc.children) != 0 { + t.Errorf("pc.cancel didn't clear pc.children = %v", pc.children) + } + pc.mu.Unlock() + + // parent and children should all be finished. + check := func(ctx Context, name string) { + select { + case <-ctx.Done(): + default: + t.Errorf("<-%s.Done() blocked, but shouldn't have", name) + } + if e := ctx.Err(); e != Canceled { + t.Errorf("%s.Err() == %v want %v", name, e, Canceled) + } + } + check(parent, "parent") + check(cancelChild, "cancelChild") + check(valueChild, "valueChild") + check(timerChild, "timerChild") + + // WithCancel should return a canceled context on a canceled parent. + precanceledChild := WithValue(parent, "key", "value") + select { + case <-precanceledChild.Done(): + default: + t.Errorf("<-precanceledChild.Done() blocked, but shouldn't have") + } + if e := precanceledChild.Err(); e != Canceled { + t.Errorf("precanceledChild.Err() == %v want %v", e, Canceled) + } +} + +func TestChildFinishesFirst(t *testing.T) { + cancelable, stop := WithCancel(Background()) + defer stop() + for _, parent := range []Context{Background(), cancelable} { + child, cancel := WithCancel(parent) + + select { + case x := <-parent.Done(): + t.Errorf("<-parent.Done() == %v want nothing (it should block)", x) + case x := <-child.Done(): + t.Errorf("<-child.Done() == %v want nothing (it should block)", x) + default: + } + + cc := child.(*cancelCtx) + pc, pcok := parent.(*cancelCtx) // pcok == false when parent == Background() + if p, ok := parentCancelCtx(cc.Context); ok != pcok || (ok && pc != p) { + t.Errorf("bad linkage: parentCancelCtx(cc.Context) = %v, %v want %v, %v", p, ok, pc, pcok) + } + + if pcok { + pc.mu.Lock() + if len(pc.children) != 1 || !pc.children[cc] { + t.Errorf("bad linkage: pc.children = %v, cc = %v", pc.children, cc) + } + pc.mu.Unlock() + } + + cancel() + + if pcok { + pc.mu.Lock() + if len(pc.children) != 0 { + t.Errorf("child's cancel didn't remove self from pc.children = %v", pc.children) + } + pc.mu.Unlock() + } + + // child should be finished. + select { + case <-child.Done(): + default: + t.Errorf("<-child.Done() blocked, but shouldn't have") + } + if e := child.Err(); e != Canceled { + t.Errorf("child.Err() == %v want %v", e, Canceled) + } + + // parent should not be finished. + select { + case x := <-parent.Done(): + t.Errorf("<-parent.Done() == %v want nothing (it should block)", x) + default: + } + if e := parent.Err(); e != nil { + t.Errorf("parent.Err() == %v want nil", e) + } + } +} + +func testDeadline(c Context, wait time.Duration, t *testing.T) { + select { + case <-time.After(wait): + t.Fatalf("context should have timed out") + case <-c.Done(): + } + if e := c.Err(); e != DeadlineExceeded { + t.Errorf("c.Err() == %v want %v", e, DeadlineExceeded) + } +} + +func TestDeadline(t *testing.T) { + c, _ := WithDeadline(Background(), time.Now().Add(100*time.Millisecond)) + if got, prefix := fmt.Sprint(c), "context.Background.WithDeadline("; !strings.HasPrefix(got, prefix) { + t.Errorf("c.String() = %q want prefix %q", got, prefix) + } + testDeadline(c, 200*time.Millisecond, t) + + c, _ = WithDeadline(Background(), time.Now().Add(100*time.Millisecond)) + o := otherContext{c} + testDeadline(o, 200*time.Millisecond, t) + + c, _ = WithDeadline(Background(), time.Now().Add(100*time.Millisecond)) + o = otherContext{c} + c, _ = WithDeadline(o, time.Now().Add(300*time.Millisecond)) + testDeadline(c, 200*time.Millisecond, t) +} + +func TestTimeout(t *testing.T) { + c, _ := WithTimeout(Background(), 100*time.Millisecond) + if got, prefix := fmt.Sprint(c), "context.Background.WithDeadline("; !strings.HasPrefix(got, prefix) { + t.Errorf("c.String() = %q want prefix %q", got, prefix) + } + testDeadline(c, 200*time.Millisecond, t) + + c, _ = WithTimeout(Background(), 100*time.Millisecond) + o := otherContext{c} + testDeadline(o, 200*time.Millisecond, t) + + c, _ = WithTimeout(Background(), 100*time.Millisecond) + o = otherContext{c} + c, _ = WithTimeout(o, 300*time.Millisecond) + testDeadline(c, 200*time.Millisecond, t) +} + +func TestCanceledTimeout(t *testing.T) { + c, _ := WithTimeout(Background(), 200*time.Millisecond) + o := otherContext{c} + c, cancel := WithTimeout(o, 400*time.Millisecond) + cancel() + time.Sleep(100 * time.Millisecond) // let cancelation propagate + select { + case <-c.Done(): + default: + t.Errorf("<-c.Done() blocked, but shouldn't have") + } + if e := c.Err(); e != Canceled { + t.Errorf("c.Err() == %v want %v", e, Canceled) + } +} + +type key1 int +type key2 int + +var k1 = key1(1) +var k2 = key2(1) // same int as k1, different type +var k3 = key2(3) // same type as k2, different int + +func TestValues(t *testing.T) { + check := func(c Context, nm, v1, v2, v3 string) { + if v, ok := c.Value(k1).(string); ok == (len(v1) == 0) || v != v1 { + t.Errorf(`%s.Value(k1).(string) = %q, %t want %q, %t`, nm, v, ok, v1, len(v1) != 0) + } + if v, ok := c.Value(k2).(string); ok == (len(v2) == 0) || v != v2 { + t.Errorf(`%s.Value(k2).(string) = %q, %t want %q, %t`, nm, v, ok, v2, len(v2) != 0) + } + if v, ok := c.Value(k3).(string); ok == (len(v3) == 0) || v != v3 { + t.Errorf(`%s.Value(k3).(string) = %q, %t want %q, %t`, nm, v, ok, v3, len(v3) != 0) + } + } + + c0 := Background() + check(c0, "c0", "", "", "") + + c1 := WithValue(Background(), k1, "c1k1") + check(c1, "c1", "c1k1", "", "") + + if got, want := fmt.Sprint(c1), `context.Background.WithValue(1, "c1k1")`; got != want { + t.Errorf("c.String() = %q want %q", got, want) + } + + c2 := WithValue(c1, k2, "c2k2") + check(c2, "c2", "c1k1", "c2k2", "") + + c3 := WithValue(c2, k3, "c3k3") + check(c3, "c2", "c1k1", "c2k2", "c3k3") + + c4 := WithValue(c3, k1, nil) + check(c4, "c4", "", "c2k2", "c3k3") + + o0 := otherContext{Background()} + check(o0, "o0", "", "", "") + + o1 := otherContext{WithValue(Background(), k1, "c1k1")} + check(o1, "o1", "c1k1", "", "") + + o2 := WithValue(o1, k2, "o2k2") + check(o2, "o2", "c1k1", "o2k2", "") + + o3 := otherContext{c4} + check(o3, "o3", "", "c2k2", "c3k3") + + o4 := WithValue(o3, k3, nil) + check(o4, "o4", "", "c2k2", "") +} + +func TestAllocs(t *testing.T) { + bg := Background() + for _, test := range []struct { + desc string + f func() + limit float64 + gccgoLimit float64 + }{ + { + desc: "Background()", + f: func() { Background() }, + limit: 0, + gccgoLimit: 0, + }, + { + desc: fmt.Sprintf("WithValue(bg, %v, nil)", k1), + f: func() { + c := WithValue(bg, k1, nil) + c.Value(k1) + }, + limit: 3, + gccgoLimit: 3, + }, + { + desc: "WithTimeout(bg, 15*time.Millisecond)", + f: func() { + c, _ := WithTimeout(bg, 15*time.Millisecond) + <-c.Done() + }, + limit: 8, + gccgoLimit: 15, + }, + { + desc: "WithCancel(bg)", + f: func() { + c, cancel := WithCancel(bg) + cancel() + <-c.Done() + }, + limit: 5, + gccgoLimit: 8, + }, + { + desc: "WithTimeout(bg, 100*time.Millisecond)", + f: func() { + c, cancel := WithTimeout(bg, 100*time.Millisecond) + cancel() + <-c.Done() + }, + limit: 8, + gccgoLimit: 25, + }, + } { + limit := test.limit + if runtime.Compiler == "gccgo" { + // gccgo does not yet do escape analysis. + // TOOD(iant): Remove this when gccgo does do escape analysis. + limit = test.gccgoLimit + } + if n := testing.AllocsPerRun(100, test.f); n > limit { + t.Errorf("%s allocs = %f want %d", test.desc, n, int(limit)) + } + } +} + +func TestSimultaneousCancels(t *testing.T) { + root, cancel := WithCancel(Background()) + m := map[Context]CancelFunc{root: cancel} + q := []Context{root} + // Create a tree of contexts. + for len(q) != 0 && len(m) < 100 { + parent := q[0] + q = q[1:] + for i := 0; i < 4; i++ { + ctx, cancel := WithCancel(parent) + m[ctx] = cancel + q = append(q, ctx) + } + } + // Start all the cancels in a random order. + var wg sync.WaitGroup + wg.Add(len(m)) + for _, cancel := range m { + go func(cancel CancelFunc) { + cancel() + wg.Done() + }(cancel) + } + // Wait on all the contexts in a random order. + for ctx := range m { + select { + case <-ctx.Done(): + case <-time.After(1 * time.Second): + buf := make([]byte, 10<<10) + n := runtime.Stack(buf, true) + t.Fatalf("timed out waiting for <-ctx.Done(); stacks:\n%s", buf[:n]) + } + } + // Wait for all the cancel functions to return. + done := make(chan struct{}) + go func() { + wg.Wait() + close(done) + }() + select { + case <-done: + case <-time.After(1 * time.Second): + buf := make([]byte, 10<<10) + n := runtime.Stack(buf, true) + t.Fatalf("timed out waiting for cancel functions; stacks:\n%s", buf[:n]) + } +} + +func TestInterlockedCancels(t *testing.T) { + parent, cancelParent := WithCancel(Background()) + child, cancelChild := WithCancel(parent) + go func() { + parent.Done() + cancelChild() + }() + cancelParent() + select { + case <-child.Done(): + case <-time.After(1 * time.Second): + buf := make([]byte, 10<<10) + n := runtime.Stack(buf, true) + t.Fatalf("timed out waiting for child.Done(); stacks:\n%s", buf[:n]) + } +} + +func TestLayersCancel(t *testing.T) { + testLayers(t, time.Now().UnixNano(), false) +} + +func TestLayersTimeout(t *testing.T) { + testLayers(t, time.Now().UnixNano(), true) +} + +func testLayers(t *testing.T, seed int64, testTimeout bool) { + rand.Seed(seed) + errorf := func(format string, a ...interface{}) { + t.Errorf(fmt.Sprintf("seed=%d: %s", seed, format), a...) + } + const ( + timeout = 200 * time.Millisecond + minLayers = 30 + ) + type value int + var ( + vals []*value + cancels []CancelFunc + numTimers int + ctx = Background() + ) + for i := 0; i < minLayers || numTimers == 0 || len(cancels) == 0 || len(vals) == 0; i++ { + switch rand.Intn(3) { + case 0: + v := new(value) + ctx = WithValue(ctx, v, v) + vals = append(vals, v) + case 1: + var cancel CancelFunc + ctx, cancel = WithCancel(ctx) + cancels = append(cancels, cancel) + case 2: + var cancel CancelFunc + ctx, cancel = WithTimeout(ctx, timeout) + cancels = append(cancels, cancel) + numTimers++ + } + } + checkValues := func(when string) { + for _, key := range vals { + if val := ctx.Value(key).(*value); key != val { + errorf("%s: ctx.Value(%p) = %p want %p", when, key, val, key) + } + } + } + select { + case <-ctx.Done(): + errorf("ctx should not be canceled yet") + default: + } + if s, prefix := fmt.Sprint(ctx), "context.Background."; !strings.HasPrefix(s, prefix) { + t.Errorf("ctx.String() = %q want prefix %q", s, prefix) + } + t.Log(ctx) + checkValues("before cancel") + if testTimeout { + select { + case <-ctx.Done(): + case <-time.After(timeout + 100*time.Millisecond): + errorf("ctx should have timed out") + } + checkValues("after timeout") + } else { + cancel := cancels[rand.Intn(len(cancels))] + cancel() + select { + case <-ctx.Done(): + default: + errorf("ctx should be canceled") + } + checkValues("after cancel") + } +} + +func TestCancelRemoves(t *testing.T) { + checkChildren := func(when string, ctx Context, want int) { + if got := len(ctx.(*cancelCtx).children); got != want { + t.Errorf("%s: context has %d children, want %d", when, got, want) + } + } + + ctx, _ := WithCancel(Background()) + checkChildren("after creation", ctx, 0) + _, cancel := WithCancel(ctx) + checkChildren("with WithCancel child ", ctx, 1) + cancel() + checkChildren("after cancelling WithCancel child", ctx, 0) + + ctx, _ = WithCancel(Background()) + checkChildren("after creation", ctx, 0) + _, cancel = WithTimeout(ctx, 60*time.Minute) + checkChildren("with WithTimeout child ", ctx, 1) + cancel() + checkChildren("after cancelling WithTimeout child", ctx, 0) +} diff --git a/vendor/golang.org/x/net/context/ctxhttp/cancelreq.go b/vendor/golang.org/x/net/context/ctxhttp/cancelreq.go new file mode 100644 index 0000000..48610e3 --- /dev/null +++ b/vendor/golang.org/x/net/context/ctxhttp/cancelreq.go @@ -0,0 +1,18 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.5 + +package ctxhttp + +import "net/http" + +func canceler(client *http.Client, req *http.Request) func() { + ch := make(chan struct{}) + req.Cancel = ch + + return func() { + close(ch) + } +} diff --git a/vendor/golang.org/x/net/context/ctxhttp/cancelreq_go14.go b/vendor/golang.org/x/net/context/ctxhttp/cancelreq_go14.go new file mode 100644 index 0000000..56bcbad --- /dev/null +++ b/vendor/golang.org/x/net/context/ctxhttp/cancelreq_go14.go @@ -0,0 +1,23 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.5 + +package ctxhttp + +import "net/http" + +type requestCanceler interface { + CancelRequest(*http.Request) +} + +func canceler(client *http.Client, req *http.Request) func() { + rc, ok := client.Transport.(requestCanceler) + if !ok { + return func() {} + } + return func() { + rc.CancelRequest(req) + } +} diff --git a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go b/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go new file mode 100644 index 0000000..504dd63 --- /dev/null +++ b/vendor/golang.org/x/net/context/ctxhttp/ctxhttp.go @@ -0,0 +1,79 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package ctxhttp provides helper functions for performing context-aware HTTP requests. +package ctxhttp // import "golang.org/x/net/context/ctxhttp" + +import ( + "io" + "net/http" + "net/url" + "strings" + + "golang.org/x/net/context" +) + +// Do sends an HTTP request with the provided http.Client and returns an HTTP response. +// If the client is nil, http.DefaultClient is used. +// If the context is canceled or times out, ctx.Err() will be returned. +func Do(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) { + if client == nil { + client = http.DefaultClient + } + + // Request cancelation changed in Go 1.5, see cancelreq.go and cancelreq_go14.go. + cancel := canceler(client, req) + + type responseAndError struct { + resp *http.Response + err error + } + result := make(chan responseAndError, 1) + + go func() { + resp, err := client.Do(req) + result <- responseAndError{resp, err} + }() + + select { + case <-ctx.Done(): + cancel() + return nil, ctx.Err() + case r := <-result: + return r.resp, r.err + } +} + +// Get issues a GET request via the Do function. +func Get(ctx context.Context, client *http.Client, url string) (*http.Response, error) { + req, err := http.NewRequest("GET", url, nil) + if err != nil { + return nil, err + } + return Do(ctx, client, req) +} + +// Head issues a HEAD request via the Do function. +func Head(ctx context.Context, client *http.Client, url string) (*http.Response, error) { + req, err := http.NewRequest("HEAD", url, nil) + if err != nil { + return nil, err + } + return Do(ctx, client, req) +} + +// Post issues a POST request via the Do function. +func Post(ctx context.Context, client *http.Client, url string, bodyType string, body io.Reader) (*http.Response, error) { + req, err := http.NewRequest("POST", url, body) + if err != nil { + return nil, err + } + req.Header.Set("Content-Type", bodyType) + return Do(ctx, client, req) +} + +// PostForm issues a POST request via the Do function. +func PostForm(ctx context.Context, client *http.Client, url string, data url.Values) (*http.Response, error) { + return Post(ctx, client, url, "application/x-www-form-urlencoded", strings.NewReader(data.Encode())) +} diff --git a/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_test.go b/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_test.go new file mode 100644 index 0000000..47b53d7 --- /dev/null +++ b/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_test.go @@ -0,0 +1,72 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package ctxhttp + +import ( + "io/ioutil" + "net/http" + "net/http/httptest" + "testing" + "time" + + "golang.org/x/net/context" +) + +const ( + requestDuration = 100 * time.Millisecond + requestBody = "ok" +) + +func TestNoTimeout(t *testing.T) { + ctx := context.Background() + resp, err := doRequest(ctx) + + if resp == nil || err != nil { + t.Fatalf("error received from client: %v %v", err, resp) + } +} +func TestCancel(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + go func() { + time.Sleep(requestDuration / 2) + cancel() + }() + + resp, err := doRequest(ctx) + + if resp != nil || err == nil { + t.Fatalf("expected error, didn't get one. resp: %v", resp) + } + if err != ctx.Err() { + t.Fatalf("expected error from context but got: %v", err) + } +} + +func TestCancelAfterRequest(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + + resp, err := doRequest(ctx) + + // Cancel before reading the body. + // Request.Body should still be readable after the context is canceled. + cancel() + + b, err := ioutil.ReadAll(resp.Body) + if err != nil || string(b) != requestBody { + t.Fatalf("could not read body: %q %v", b, err) + } +} + +func doRequest(ctx context.Context) (*http.Response, error) { + var okHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + time.Sleep(requestDuration) + w.Write([]byte(requestBody)) + }) + + serv := httptest.NewServer(okHandler) + defer serv.Close() + + return Get(ctx, nil, serv.URL) +} diff --git a/vendor/golang.org/x/net/context/withtimeout_test.go b/vendor/golang.org/x/net/context/withtimeout_test.go new file mode 100644 index 0000000..a6754dc --- /dev/null +++ b/vendor/golang.org/x/net/context/withtimeout_test.go @@ -0,0 +1,26 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package context_test + +import ( + "fmt" + "time" + + "golang.org/x/net/context" +) + +func ExampleWithTimeout() { + // Pass a context with a timeout to tell a blocking function that it + // should abandon its work after the timeout elapses. + ctx, _ := context.WithTimeout(context.Background(), 100*time.Millisecond) + select { + case <-time.After(200 * time.Millisecond): + fmt.Println("overslept") + case <-ctx.Done(): + fmt.Println(ctx.Err()) // prints "context deadline exceeded" + } + // Output: + // context deadline exceeded +} diff --git a/vendor/golang.org/x/net/dict/dict.go b/vendor/golang.org/x/net/dict/dict.go new file mode 100644 index 0000000..58fef89 --- /dev/null +++ b/vendor/golang.org/x/net/dict/dict.go @@ -0,0 +1,210 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package dict implements the Dictionary Server Protocol +// as defined in RFC 2229. +package dict // import "golang.org/x/net/dict" + +import ( + "net/textproto" + "strconv" + "strings" +) + +// A Client represents a client connection to a dictionary server. +type Client struct { + text *textproto.Conn +} + +// Dial returns a new client connected to a dictionary server at +// addr on the given network. +func Dial(network, addr string) (*Client, error) { + text, err := textproto.Dial(network, addr) + if err != nil { + return nil, err + } + _, _, err = text.ReadCodeLine(220) + if err != nil { + text.Close() + return nil, err + } + return &Client{text: text}, nil +} + +// Close closes the connection to the dictionary server. +func (c *Client) Close() error { + return c.text.Close() +} + +// A Dict represents a dictionary available on the server. +type Dict struct { + Name string // short name of dictionary + Desc string // long description +} + +// Dicts returns a list of the dictionaries available on the server. +func (c *Client) Dicts() ([]Dict, error) { + id, err := c.text.Cmd("SHOW DB") + if err != nil { + return nil, err + } + + c.text.StartResponse(id) + defer c.text.EndResponse(id) + + _, _, err = c.text.ReadCodeLine(110) + if err != nil { + return nil, err + } + lines, err := c.text.ReadDotLines() + if err != nil { + return nil, err + } + _, _, err = c.text.ReadCodeLine(250) + + dicts := make([]Dict, len(lines)) + for i := range dicts { + d := &dicts[i] + a, _ := fields(lines[i]) + if len(a) < 2 { + return nil, textproto.ProtocolError("invalid dictionary: " + lines[i]) + } + d.Name = a[0] + d.Desc = a[1] + } + return dicts, err +} + +// A Defn represents a definition. +type Defn struct { + Dict Dict // Dict where definition was found + Word string // Word being defined + Text []byte // Definition text, typically multiple lines +} + +// Define requests the definition of the given word. +// The argument dict names the dictionary to use, +// the Name field of a Dict returned by Dicts. +// +// The special dictionary name "*" means to look in all the +// server's dictionaries. +// The special dictionary name "!" means to look in all the +// server's dictionaries in turn, stopping after finding the word +// in one of them. +func (c *Client) Define(dict, word string) ([]*Defn, error) { + id, err := c.text.Cmd("DEFINE %s %q", dict, word) + if err != nil { + return nil, err + } + + c.text.StartResponse(id) + defer c.text.EndResponse(id) + + _, line, err := c.text.ReadCodeLine(150) + if err != nil { + return nil, err + } + a, _ := fields(line) + if len(a) < 1 { + return nil, textproto.ProtocolError("malformed response: " + line) + } + n, err := strconv.Atoi(a[0]) + if err != nil { + return nil, textproto.ProtocolError("invalid definition count: " + a[0]) + } + def := make([]*Defn, n) + for i := 0; i < n; i++ { + _, line, err = c.text.ReadCodeLine(151) + if err != nil { + return nil, err + } + a, _ := fields(line) + if len(a) < 3 { + // skip it, to keep protocol in sync + i-- + n-- + def = def[0:n] + continue + } + d := &Defn{Word: a[0], Dict: Dict{a[1], a[2]}} + d.Text, err = c.text.ReadDotBytes() + if err != nil { + return nil, err + } + def[i] = d + } + _, _, err = c.text.ReadCodeLine(250) + return def, err +} + +// Fields returns the fields in s. +// Fields are space separated unquoted words +// or quoted with single or double quote. +func fields(s string) ([]string, error) { + var v []string + i := 0 + for { + for i < len(s) && (s[i] == ' ' || s[i] == '\t') { + i++ + } + if i >= len(s) { + break + } + if s[i] == '"' || s[i] == '\'' { + q := s[i] + // quoted string + var j int + for j = i + 1; ; j++ { + if j >= len(s) { + return nil, textproto.ProtocolError("malformed quoted string") + } + if s[j] == '\\' { + j++ + continue + } + if s[j] == q { + j++ + break + } + } + v = append(v, unquote(s[i+1:j-1])) + i = j + } else { + // atom + var j int + for j = i; j < len(s); j++ { + if s[j] == ' ' || s[j] == '\t' || s[j] == '\\' || s[j] == '"' || s[j] == '\'' { + break + } + } + v = append(v, s[i:j]) + i = j + } + if i < len(s) { + c := s[i] + if c != ' ' && c != '\t' { + return nil, textproto.ProtocolError("quotes not on word boundaries") + } + } + } + return v, nil +} + +func unquote(s string) string { + if strings.Index(s, "\\") < 0 { + return s + } + b := []byte(s) + w := 0 + for r := 0; r < len(b); r++ { + c := b[r] + if c == '\\' { + r++ + c = b[r] + } + b[w] = c + w++ + } + return string(b[0:w]) +} diff --git a/vendor/golang.org/x/net/html/atom/atom.go b/vendor/golang.org/x/net/html/atom/atom.go new file mode 100644 index 0000000..cd0a8ac --- /dev/null +++ b/vendor/golang.org/x/net/html/atom/atom.go @@ -0,0 +1,78 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package atom provides integer codes (also known as atoms) for a fixed set of +// frequently occurring HTML strings: tag names and attribute keys such as "p" +// and "id". +// +// Sharing an atom's name between all elements with the same tag can result in +// fewer string allocations when tokenizing and parsing HTML. Integer +// comparisons are also generally faster than string comparisons. +// +// The value of an atom's particular code is not guaranteed to stay the same +// between versions of this package. Neither is any ordering guaranteed: +// whether atom.H1 < atom.H2 may also change. The codes are not guaranteed to +// be dense. The only guarantees are that e.g. looking up "div" will yield +// atom.Div, calling atom.Div.String will return "div", and atom.Div != 0. +package atom // import "golang.org/x/net/html/atom" + +// Atom is an integer code for a string. The zero value maps to "". +type Atom uint32 + +// String returns the atom's name. +func (a Atom) String() string { + start := uint32(a >> 8) + n := uint32(a & 0xff) + if start+n > uint32(len(atomText)) { + return "" + } + return atomText[start : start+n] +} + +func (a Atom) string() string { + return atomText[a>>8 : a>>8+a&0xff] +} + +// fnv computes the FNV hash with an arbitrary starting value h. +func fnv(h uint32, s []byte) uint32 { + for i := range s { + h ^= uint32(s[i]) + h *= 16777619 + } + return h +} + +func match(s string, t []byte) bool { + for i, c := range t { + if s[i] != c { + return false + } + } + return true +} + +// Lookup returns the atom whose name is s. It returns zero if there is no +// such atom. The lookup is case sensitive. +func Lookup(s []byte) Atom { + if len(s) == 0 || len(s) > maxAtomLen { + return 0 + } + h := fnv(hash0, s) + if a := table[h&uint32(len(table)-1)]; int(a&0xff) == len(s) && match(a.string(), s) { + return a + } + if a := table[(h>>16)&uint32(len(table)-1)]; int(a&0xff) == len(s) && match(a.string(), s) { + return a + } + return 0 +} + +// String returns a string whose contents are equal to s. In that sense, it is +// equivalent to string(s) but may be more efficient. +func String(s []byte) string { + if a := Lookup(s); a != 0 { + return a.String() + } + return string(s) +} diff --git a/vendor/golang.org/x/net/html/atom/atom_test.go b/vendor/golang.org/x/net/html/atom/atom_test.go new file mode 100644 index 0000000..6e33704 --- /dev/null +++ b/vendor/golang.org/x/net/html/atom/atom_test.go @@ -0,0 +1,109 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package atom + +import ( + "sort" + "testing" +) + +func TestKnown(t *testing.T) { + for _, s := range testAtomList { + if atom := Lookup([]byte(s)); atom.String() != s { + t.Errorf("Lookup(%q) = %#x (%q)", s, uint32(atom), atom.String()) + } + } +} + +func TestHits(t *testing.T) { + for _, a := range table { + if a == 0 { + continue + } + got := Lookup([]byte(a.String())) + if got != a { + t.Errorf("Lookup(%q) = %#x, want %#x", a.String(), uint32(got), uint32(a)) + } + } +} + +func TestMisses(t *testing.T) { + testCases := []string{ + "", + "\x00", + "\xff", + "A", + "DIV", + "Div", + "dIV", + "aa", + "a\x00", + "ab", + "abb", + "abbr0", + "abbr ", + " abbr", + " a", + "acceptcharset", + "acceptCharset", + "accept_charset", + "h0", + "h1h2", + "h7", + "onClick", + "λ", + // The following string has the same hash (0xa1d7fab7) as "onmouseover". + "\x00\x00\x00\x00\x00\x50\x18\xae\x38\xd0\xb7", + } + for _, tc := range testCases { + got := Lookup([]byte(tc)) + if got != 0 { + t.Errorf("Lookup(%q): got %d, want 0", tc, got) + } + } +} + +func TestForeignObject(t *testing.T) { + const ( + afo = Foreignobject + afO = ForeignObject + sfo = "foreignobject" + sfO = "foreignObject" + ) + if got := Lookup([]byte(sfo)); got != afo { + t.Errorf("Lookup(%q): got %#v, want %#v", sfo, got, afo) + } + if got := Lookup([]byte(sfO)); got != afO { + t.Errorf("Lookup(%q): got %#v, want %#v", sfO, got, afO) + } + if got := afo.String(); got != sfo { + t.Errorf("Atom(%#v).String(): got %q, want %q", afo, got, sfo) + } + if got := afO.String(); got != sfO { + t.Errorf("Atom(%#v).String(): got %q, want %q", afO, got, sfO) + } +} + +func BenchmarkLookup(b *testing.B) { + sortedTable := make([]string, 0, len(table)) + for _, a := range table { + if a != 0 { + sortedTable = append(sortedTable, a.String()) + } + } + sort.Strings(sortedTable) + + x := make([][]byte, 1000) + for i := range x { + x[i] = []byte(sortedTable[i%len(sortedTable)]) + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + for _, s := range x { + Lookup(s) + } + } +} diff --git a/vendor/golang.org/x/net/html/atom/gen.go b/vendor/golang.org/x/net/html/atom/gen.go new file mode 100644 index 0000000..6bfa866 --- /dev/null +++ b/vendor/golang.org/x/net/html/atom/gen.go @@ -0,0 +1,648 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +package main + +// This program generates table.go and table_test.go. +// Invoke as +// +// go run gen.go |gofmt >table.go +// go run gen.go -test |gofmt >table_test.go + +import ( + "flag" + "fmt" + "math/rand" + "os" + "sort" + "strings" +) + +// identifier converts s to a Go exported identifier. +// It converts "div" to "Div" and "accept-charset" to "AcceptCharset". +func identifier(s string) string { + b := make([]byte, 0, len(s)) + cap := true + for _, c := range s { + if c == '-' { + cap = true + continue + } + if cap && 'a' <= c && c <= 'z' { + c -= 'a' - 'A' + } + cap = false + b = append(b, byte(c)) + } + return string(b) +} + +var test = flag.Bool("test", false, "generate table_test.go") + +func main() { + flag.Parse() + + var all []string + all = append(all, elements...) + all = append(all, attributes...) + all = append(all, eventHandlers...) + all = append(all, extra...) + sort.Strings(all) + + if *test { + fmt.Printf("// generated by go run gen.go -test; DO NOT EDIT\n\n") + fmt.Printf("package atom\n\n") + fmt.Printf("var testAtomList = []string{\n") + for _, s := range all { + fmt.Printf("\t%q,\n", s) + } + fmt.Printf("}\n") + return + } + + // uniq - lists have dups + // compute max len too + maxLen := 0 + w := 0 + for _, s := range all { + if w == 0 || all[w-1] != s { + if maxLen < len(s) { + maxLen = len(s) + } + all[w] = s + w++ + } + } + all = all[:w] + + // Find hash that minimizes table size. + var best *table + for i := 0; i < 1000000; i++ { + if best != nil && 1<<(best.k-1) < len(all) { + break + } + h := rand.Uint32() + for k := uint(0); k <= 16; k++ { + if best != nil && k >= best.k { + break + } + var t table + if t.init(h, k, all) { + best = &t + break + } + } + } + if best == nil { + fmt.Fprintf(os.Stderr, "failed to construct string table\n") + os.Exit(1) + } + + // Lay out strings, using overlaps when possible. + layout := append([]string{}, all...) + + // Remove strings that are substrings of other strings + for changed := true; changed; { + changed = false + for i, s := range layout { + if s == "" { + continue + } + for j, t := range layout { + if i != j && t != "" && strings.Contains(s, t) { + changed = true + layout[j] = "" + } + } + } + } + + // Join strings where one suffix matches another prefix. + for { + // Find best i, j, k such that layout[i][len-k:] == layout[j][:k], + // maximizing overlap length k. + besti := -1 + bestj := -1 + bestk := 0 + for i, s := range layout { + if s == "" { + continue + } + for j, t := range layout { + if i == j { + continue + } + for k := bestk + 1; k <= len(s) && k <= len(t); k++ { + if s[len(s)-k:] == t[:k] { + besti = i + bestj = j + bestk = k + } + } + } + } + if bestk > 0 { + layout[besti] += layout[bestj][bestk:] + layout[bestj] = "" + continue + } + break + } + + text := strings.Join(layout, "") + + atom := map[string]uint32{} + for _, s := range all { + off := strings.Index(text, s) + if off < 0 { + panic("lost string " + s) + } + atom[s] = uint32(off<<8 | len(s)) + } + + // Generate the Go code. + fmt.Printf("// generated by go run gen.go; DO NOT EDIT\n\n") + fmt.Printf("package atom\n\nconst (\n") + for _, s := range all { + fmt.Printf("\t%s Atom = %#x\n", identifier(s), atom[s]) + } + fmt.Printf(")\n\n") + + fmt.Printf("const hash0 = %#x\n\n", best.h0) + fmt.Printf("const maxAtomLen = %d\n\n", maxLen) + + fmt.Printf("var table = [1<<%d]Atom{\n", best.k) + for i, s := range best.tab { + if s == "" { + continue + } + fmt.Printf("\t%#x: %#x, // %s\n", i, atom[s], s) + } + fmt.Printf("}\n") + datasize := (1 << best.k) * 4 + + fmt.Printf("const atomText =\n") + textsize := len(text) + for len(text) > 60 { + fmt.Printf("\t%q +\n", text[:60]) + text = text[60:] + } + fmt.Printf("\t%q\n\n", text) + + fmt.Fprintf(os.Stderr, "%d atoms; %d string bytes + %d tables = %d total data\n", len(all), textsize, datasize, textsize+datasize) +} + +type byLen []string + +func (x byLen) Less(i, j int) bool { return len(x[i]) > len(x[j]) } +func (x byLen) Swap(i, j int) { x[i], x[j] = x[j], x[i] } +func (x byLen) Len() int { return len(x) } + +// fnv computes the FNV hash with an arbitrary starting value h. +func fnv(h uint32, s string) uint32 { + for i := 0; i < len(s); i++ { + h ^= uint32(s[i]) + h *= 16777619 + } + return h +} + +// A table represents an attempt at constructing the lookup table. +// The lookup table uses cuckoo hashing, meaning that each string +// can be found in one of two positions. +type table struct { + h0 uint32 + k uint + mask uint32 + tab []string +} + +// hash returns the two hashes for s. +func (t *table) hash(s string) (h1, h2 uint32) { + h := fnv(t.h0, s) + h1 = h & t.mask + h2 = (h >> 16) & t.mask + return +} + +// init initializes the table with the given parameters. +// h0 is the initial hash value, +// k is the number of bits of hash value to use, and +// x is the list of strings to store in the table. +// init returns false if the table cannot be constructed. +func (t *table) init(h0 uint32, k uint, x []string) bool { + t.h0 = h0 + t.k = k + t.tab = make([]string, 1< len(t.tab) { + return false + } + s := t.tab[i] + h1, h2 := t.hash(s) + j := h1 + h2 - i + if t.tab[j] != "" && !t.push(j, depth+1) { + return false + } + t.tab[j] = s + return true +} + +// The lists of element names and attribute keys were taken from +// https://html.spec.whatwg.org/multipage/indices.html#index +// as of the "HTML Living Standard - Last Updated 21 February 2015" version. + +var elements = []string{ + "a", + "abbr", + "address", + "area", + "article", + "aside", + "audio", + "b", + "base", + "bdi", + "bdo", + "blockquote", + "body", + "br", + "button", + "canvas", + "caption", + "cite", + "code", + "col", + "colgroup", + "command", + "data", + "datalist", + "dd", + "del", + "details", + "dfn", + "dialog", + "div", + "dl", + "dt", + "em", + "embed", + "fieldset", + "figcaption", + "figure", + "footer", + "form", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "head", + "header", + "hgroup", + "hr", + "html", + "i", + "iframe", + "img", + "input", + "ins", + "kbd", + "keygen", + "label", + "legend", + "li", + "link", + "map", + "mark", + "menu", + "menuitem", + "meta", + "meter", + "nav", + "noscript", + "object", + "ol", + "optgroup", + "option", + "output", + "p", + "param", + "pre", + "progress", + "q", + "rp", + "rt", + "ruby", + "s", + "samp", + "script", + "section", + "select", + "small", + "source", + "span", + "strong", + "style", + "sub", + "summary", + "sup", + "table", + "tbody", + "td", + "template", + "textarea", + "tfoot", + "th", + "thead", + "time", + "title", + "tr", + "track", + "u", + "ul", + "var", + "video", + "wbr", +} + +// https://html.spec.whatwg.org/multipage/indices.html#attributes-3 + +var attributes = []string{ + "abbr", + "accept", + "accept-charset", + "accesskey", + "action", + "alt", + "async", + "autocomplete", + "autofocus", + "autoplay", + "challenge", + "charset", + "checked", + "cite", + "class", + "cols", + "colspan", + "command", + "content", + "contenteditable", + "contextmenu", + "controls", + "coords", + "crossorigin", + "data", + "datetime", + "default", + "defer", + "dir", + "dirname", + "disabled", + "download", + "draggable", + "dropzone", + "enctype", + "for", + "form", + "formaction", + "formenctype", + "formmethod", + "formnovalidate", + "formtarget", + "headers", + "height", + "hidden", + "high", + "href", + "hreflang", + "http-equiv", + "icon", + "id", + "inputmode", + "ismap", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "keytype", + "kind", + "label", + "lang", + "list", + "loop", + "low", + "manifest", + "max", + "maxlength", + "media", + "mediagroup", + "method", + "min", + "minlength", + "multiple", + "muted", + "name", + "novalidate", + "open", + "optimum", + "pattern", + "ping", + "placeholder", + "poster", + "preload", + "radiogroup", + "readonly", + "rel", + "required", + "reversed", + "rows", + "rowspan", + "sandbox", + "spellcheck", + "scope", + "scoped", + "seamless", + "selected", + "shape", + "size", + "sizes", + "sortable", + "sorted", + "span", + "src", + "srcdoc", + "srclang", + "start", + "step", + "style", + "tabindex", + "target", + "title", + "translate", + "type", + "typemustmatch", + "usemap", + "value", + "width", + "wrap", +} + +var eventHandlers = []string{ + "onabort", + "onautocomplete", + "onautocompleteerror", + "onafterprint", + "onbeforeprint", + "onbeforeunload", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "onhashchange", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onlanguagechange", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmessage", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onoffline", + "ononline", + "onpagehide", + "onpageshow", + "onpause", + "onplay", + "onplaying", + "onpopstate", + "onprogress", + "onratechange", + "onreset", + "onresize", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onsort", + "onstalled", + "onstorage", + "onsubmit", + "onsuspend", + "ontimeupdate", + "ontoggle", + "onunload", + "onvolumechange", + "onwaiting", +} + +// extra are ad-hoc values not covered by any of the lists above. +var extra = []string{ + "align", + "annotation", + "annotation-xml", + "applet", + "basefont", + "bgsound", + "big", + "blink", + "center", + "color", + "desc", + "face", + "font", + "foreignObject", // HTML is case-insensitive, but SVG-embedded-in-HTML is case-sensitive. + "foreignobject", + "frame", + "frameset", + "image", + "isindex", + "listing", + "malignmark", + "marquee", + "math", + "mglyph", + "mi", + "mn", + "mo", + "ms", + "mtext", + "nobr", + "noembed", + "noframes", + "plaintext", + "prompt", + "public", + "spacer", + "strike", + "svg", + "system", + "tt", + "xmp", +} diff --git a/vendor/golang.org/x/net/html/atom/table.go b/vendor/golang.org/x/net/html/atom/table.go new file mode 100644 index 0000000..2605ba3 --- /dev/null +++ b/vendor/golang.org/x/net/html/atom/table.go @@ -0,0 +1,713 @@ +// generated by go run gen.go; DO NOT EDIT + +package atom + +const ( + A Atom = 0x1 + Abbr Atom = 0x4 + Accept Atom = 0x2106 + AcceptCharset Atom = 0x210e + Accesskey Atom = 0x3309 + Action Atom = 0x1f606 + Address Atom = 0x4f307 + Align Atom = 0x1105 + Alt Atom = 0x4503 + Annotation Atom = 0x1670a + AnnotationXml Atom = 0x1670e + Applet Atom = 0x2b306 + Area Atom = 0x2fa04 + Article Atom = 0x38807 + Aside Atom = 0x8305 + Async Atom = 0x7b05 + Audio Atom = 0xa605 + Autocomplete Atom = 0x1fc0c + Autofocus Atom = 0xb309 + Autoplay Atom = 0xce08 + B Atom = 0x101 + Base Atom = 0xd604 + Basefont Atom = 0xd608 + Bdi Atom = 0x1a03 + Bdo Atom = 0xe703 + Bgsound Atom = 0x11807 + Big Atom = 0x12403 + Blink Atom = 0x12705 + Blockquote Atom = 0x12c0a + Body Atom = 0x2f04 + Br Atom = 0x202 + Button Atom = 0x13606 + Canvas Atom = 0x7f06 + Caption Atom = 0x1bb07 + Center Atom = 0x5b506 + Challenge Atom = 0x21f09 + Charset Atom = 0x2807 + Checked Atom = 0x32807 + Cite Atom = 0x3c804 + Class Atom = 0x4de05 + Code Atom = 0x14904 + Col Atom = 0x15003 + Colgroup Atom = 0x15008 + Color Atom = 0x15d05 + Cols Atom = 0x16204 + Colspan Atom = 0x16207 + Command Atom = 0x17507 + Content Atom = 0x42307 + Contenteditable Atom = 0x4230f + Contextmenu Atom = 0x3310b + Controls Atom = 0x18808 + Coords Atom = 0x19406 + Crossorigin Atom = 0x19f0b + Data Atom = 0x44a04 + Datalist Atom = 0x44a08 + Datetime Atom = 0x23c08 + Dd Atom = 0x26702 + Default Atom = 0x8607 + Defer Atom = 0x14b05 + Del Atom = 0x3ef03 + Desc Atom = 0x4db04 + Details Atom = 0x4807 + Dfn Atom = 0x6103 + Dialog Atom = 0x1b06 + Dir Atom = 0x6903 + Dirname Atom = 0x6907 + Disabled Atom = 0x10c08 + Div Atom = 0x11303 + Dl Atom = 0x11e02 + Download Atom = 0x40008 + Draggable Atom = 0x17b09 + Dropzone Atom = 0x39108 + Dt Atom = 0x50902 + Em Atom = 0x6502 + Embed Atom = 0x6505 + Enctype Atom = 0x21107 + Face Atom = 0x5b304 + Fieldset Atom = 0x1b008 + Figcaption Atom = 0x1b80a + Figure Atom = 0x1cc06 + Font Atom = 0xda04 + Footer Atom = 0x8d06 + For Atom = 0x1d803 + ForeignObject Atom = 0x1d80d + Foreignobject Atom = 0x1e50d + Form Atom = 0x1f204 + Formaction Atom = 0x1f20a + Formenctype Atom = 0x20d0b + Formmethod Atom = 0x2280a + Formnovalidate Atom = 0x2320e + Formtarget Atom = 0x2470a + Frame Atom = 0x9a05 + Frameset Atom = 0x9a08 + H1 Atom = 0x26e02 + H2 Atom = 0x29402 + H3 Atom = 0x2a702 + H4 Atom = 0x2e902 + H5 Atom = 0x2f302 + H6 Atom = 0x50b02 + Head Atom = 0x2d504 + Header Atom = 0x2d506 + Headers Atom = 0x2d507 + Height Atom = 0x25106 + Hgroup Atom = 0x25906 + Hidden Atom = 0x26506 + High Atom = 0x26b04 + Hr Atom = 0x27002 + Href Atom = 0x27004 + Hreflang Atom = 0x27008 + Html Atom = 0x25504 + HttpEquiv Atom = 0x2780a + I Atom = 0x601 + Icon Atom = 0x42204 + Id Atom = 0x8502 + Iframe Atom = 0x29606 + Image Atom = 0x29c05 + Img Atom = 0x2a103 + Input Atom = 0x3e805 + Inputmode Atom = 0x3e809 + Ins Atom = 0x1a803 + Isindex Atom = 0x2a907 + Ismap Atom = 0x2b005 + Itemid Atom = 0x33c06 + Itemprop Atom = 0x3c908 + Itemref Atom = 0x5ad07 + Itemscope Atom = 0x2b909 + Itemtype Atom = 0x2c308 + Kbd Atom = 0x1903 + Keygen Atom = 0x3906 + Keytype Atom = 0x53707 + Kind Atom = 0x10904 + Label Atom = 0xf005 + Lang Atom = 0x27404 + Legend Atom = 0x18206 + Li Atom = 0x1202 + Link Atom = 0x12804 + List Atom = 0x44e04 + Listing Atom = 0x44e07 + Loop Atom = 0xf404 + Low Atom = 0x11f03 + Malignmark Atom = 0x100a + Manifest Atom = 0x5f108 + Map Atom = 0x2b203 + Mark Atom = 0x1604 + Marquee Atom = 0x2cb07 + Math Atom = 0x2d204 + Max Atom = 0x2e103 + Maxlength Atom = 0x2e109 + Media Atom = 0x6e05 + Mediagroup Atom = 0x6e0a + Menu Atom = 0x33804 + Menuitem Atom = 0x33808 + Meta Atom = 0x45d04 + Meter Atom = 0x24205 + Method Atom = 0x22c06 + Mglyph Atom = 0x2a206 + Mi Atom = 0x2eb02 + Min Atom = 0x2eb03 + Minlength Atom = 0x2eb09 + Mn Atom = 0x23502 + Mo Atom = 0x3ed02 + Ms Atom = 0x2bc02 + Mtext Atom = 0x2f505 + Multiple Atom = 0x30308 + Muted Atom = 0x30b05 + Name Atom = 0x6c04 + Nav Atom = 0x3e03 + Nobr Atom = 0x5704 + Noembed Atom = 0x6307 + Noframes Atom = 0x9808 + Noscript Atom = 0x3d208 + Novalidate Atom = 0x2360a + Object Atom = 0x1ec06 + Ol Atom = 0xc902 + Onabort Atom = 0x13a07 + Onafterprint Atom = 0x1c00c + Onautocomplete Atom = 0x1fa0e + Onautocompleteerror Atom = 0x1fa13 + Onbeforeprint Atom = 0x6040d + Onbeforeunload Atom = 0x4e70e + Onblur Atom = 0xaa06 + Oncancel Atom = 0xe908 + Oncanplay Atom = 0x28509 + Oncanplaythrough Atom = 0x28510 + Onchange Atom = 0x3a708 + Onclick Atom = 0x31007 + Onclose Atom = 0x31707 + Oncontextmenu Atom = 0x32f0d + Oncuechange Atom = 0x3420b + Ondblclick Atom = 0x34d0a + Ondrag Atom = 0x35706 + Ondragend Atom = 0x35709 + Ondragenter Atom = 0x3600b + Ondragleave Atom = 0x36b0b + Ondragover Atom = 0x3760a + Ondragstart Atom = 0x3800b + Ondrop Atom = 0x38f06 + Ondurationchange Atom = 0x39f10 + Onemptied Atom = 0x39609 + Onended Atom = 0x3af07 + Onerror Atom = 0x3b607 + Onfocus Atom = 0x3bd07 + Onhashchange Atom = 0x3da0c + Oninput Atom = 0x3e607 + Oninvalid Atom = 0x3f209 + Onkeydown Atom = 0x3fb09 + Onkeypress Atom = 0x4080a + Onkeyup Atom = 0x41807 + Onlanguagechange Atom = 0x43210 + Onload Atom = 0x44206 + Onloadeddata Atom = 0x4420c + Onloadedmetadata Atom = 0x45510 + Onloadstart Atom = 0x46b0b + Onmessage Atom = 0x47609 + Onmousedown Atom = 0x47f0b + Onmousemove Atom = 0x48a0b + Onmouseout Atom = 0x4950a + Onmouseover Atom = 0x4a20b + Onmouseup Atom = 0x4ad09 + Onmousewheel Atom = 0x4b60c + Onoffline Atom = 0x4c209 + Ononline Atom = 0x4cb08 + Onpagehide Atom = 0x4d30a + Onpageshow Atom = 0x4fe0a + Onpause Atom = 0x50d07 + Onplay Atom = 0x51706 + Onplaying Atom = 0x51709 + Onpopstate Atom = 0x5200a + Onprogress Atom = 0x52a0a + Onratechange Atom = 0x53e0c + Onreset Atom = 0x54a07 + Onresize Atom = 0x55108 + Onscroll Atom = 0x55f08 + Onseeked Atom = 0x56708 + Onseeking Atom = 0x56f09 + Onselect Atom = 0x57808 + Onshow Atom = 0x58206 + Onsort Atom = 0x58b06 + Onstalled Atom = 0x59509 + Onstorage Atom = 0x59e09 + Onsubmit Atom = 0x5a708 + Onsuspend Atom = 0x5bb09 + Ontimeupdate Atom = 0xdb0c + Ontoggle Atom = 0x5c408 + Onunload Atom = 0x5cc08 + Onvolumechange Atom = 0x5d40e + Onwaiting Atom = 0x5e209 + Open Atom = 0x3cf04 + Optgroup Atom = 0xf608 + Optimum Atom = 0x5eb07 + Option Atom = 0x60006 + Output Atom = 0x49c06 + P Atom = 0xc01 + Param Atom = 0xc05 + Pattern Atom = 0x5107 + Ping Atom = 0x7704 + Placeholder Atom = 0xc30b + Plaintext Atom = 0xfd09 + Poster Atom = 0x15706 + Pre Atom = 0x25e03 + Preload Atom = 0x25e07 + Progress Atom = 0x52c08 + Prompt Atom = 0x5fa06 + Public Atom = 0x41e06 + Q Atom = 0x13101 + Radiogroup Atom = 0x30a + Readonly Atom = 0x2fb08 + Rel Atom = 0x25f03 + Required Atom = 0x1d008 + Reversed Atom = 0x5a08 + Rows Atom = 0x9204 + Rowspan Atom = 0x9207 + Rp Atom = 0x1c602 + Rt Atom = 0x13f02 + Ruby Atom = 0xaf04 + S Atom = 0x2c01 + Samp Atom = 0x4e04 + Sandbox Atom = 0xbb07 + Scope Atom = 0x2bd05 + Scoped Atom = 0x2bd06 + Script Atom = 0x3d406 + Seamless Atom = 0x31c08 + Section Atom = 0x4e207 + Select Atom = 0x57a06 + Selected Atom = 0x57a08 + Shape Atom = 0x4f905 + Size Atom = 0x55504 + Sizes Atom = 0x55505 + Small Atom = 0x18f05 + Sortable Atom = 0x58d08 + Sorted Atom = 0x19906 + Source Atom = 0x1aa06 + Spacer Atom = 0x2db06 + Span Atom = 0x9504 + Spellcheck Atom = 0x3230a + Src Atom = 0x3c303 + Srcdoc Atom = 0x3c306 + Srclang Atom = 0x41107 + Start Atom = 0x38605 + Step Atom = 0x5f704 + Strike Atom = 0x53306 + Strong Atom = 0x55906 + Style Atom = 0x61105 + Sub Atom = 0x5a903 + Summary Atom = 0x61607 + Sup Atom = 0x61d03 + Svg Atom = 0x62003 + System Atom = 0x62306 + Tabindex Atom = 0x46308 + Table Atom = 0x42d05 + Target Atom = 0x24b06 + Tbody Atom = 0x2e05 + Td Atom = 0x4702 + Template Atom = 0x62608 + Textarea Atom = 0x2f608 + Tfoot Atom = 0x8c05 + Th Atom = 0x22e02 + Thead Atom = 0x2d405 + Time Atom = 0xdd04 + Title Atom = 0xa105 + Tr Atom = 0x10502 + Track Atom = 0x10505 + Translate Atom = 0x14009 + Tt Atom = 0x5302 + Type Atom = 0x21404 + Typemustmatch Atom = 0x2140d + U Atom = 0xb01 + Ul Atom = 0x8a02 + Usemap Atom = 0x51106 + Value Atom = 0x4005 + Var Atom = 0x11503 + Video Atom = 0x28105 + Wbr Atom = 0x12103 + Width Atom = 0x50705 + Wrap Atom = 0x58704 + Xmp Atom = 0xc103 +) + +const hash0 = 0xc17da63e + +const maxAtomLen = 19 + +var table = [1 << 9]Atom{ + 0x1: 0x48a0b, // onmousemove + 0x2: 0x5e209, // onwaiting + 0x3: 0x1fa13, // onautocompleteerror + 0x4: 0x5fa06, // prompt + 0x7: 0x5eb07, // optimum + 0x8: 0x1604, // mark + 0xa: 0x5ad07, // itemref + 0xb: 0x4fe0a, // onpageshow + 0xc: 0x57a06, // select + 0xd: 0x17b09, // draggable + 0xe: 0x3e03, // nav + 0xf: 0x17507, // command + 0x11: 0xb01, // u + 0x14: 0x2d507, // headers + 0x15: 0x44a08, // datalist + 0x17: 0x4e04, // samp + 0x1a: 0x3fb09, // onkeydown + 0x1b: 0x55f08, // onscroll + 0x1c: 0x15003, // col + 0x20: 0x3c908, // itemprop + 0x21: 0x2780a, // http-equiv + 0x22: 0x61d03, // sup + 0x24: 0x1d008, // required + 0x2b: 0x25e07, // preload + 0x2c: 0x6040d, // onbeforeprint + 0x2d: 0x3600b, // ondragenter + 0x2e: 0x50902, // dt + 0x2f: 0x5a708, // onsubmit + 0x30: 0x27002, // hr + 0x31: 0x32f0d, // oncontextmenu + 0x33: 0x29c05, // image + 0x34: 0x50d07, // onpause + 0x35: 0x25906, // hgroup + 0x36: 0x7704, // ping + 0x37: 0x57808, // onselect + 0x3a: 0x11303, // div + 0x3b: 0x1fa0e, // onautocomplete + 0x40: 0x2eb02, // mi + 0x41: 0x31c08, // seamless + 0x42: 0x2807, // charset + 0x43: 0x8502, // id + 0x44: 0x5200a, // onpopstate + 0x45: 0x3ef03, // del + 0x46: 0x2cb07, // marquee + 0x47: 0x3309, // accesskey + 0x49: 0x8d06, // footer + 0x4a: 0x44e04, // list + 0x4b: 0x2b005, // ismap + 0x51: 0x33804, // menu + 0x52: 0x2f04, // body + 0x55: 0x9a08, // frameset + 0x56: 0x54a07, // onreset + 0x57: 0x12705, // blink + 0x58: 0xa105, // title + 0x59: 0x38807, // article + 0x5b: 0x22e02, // th + 0x5d: 0x13101, // q + 0x5e: 0x3cf04, // open + 0x5f: 0x2fa04, // area + 0x61: 0x44206, // onload + 0x62: 0xda04, // font + 0x63: 0xd604, // base + 0x64: 0x16207, // colspan + 0x65: 0x53707, // keytype + 0x66: 0x11e02, // dl + 0x68: 0x1b008, // fieldset + 0x6a: 0x2eb03, // min + 0x6b: 0x11503, // var + 0x6f: 0x2d506, // header + 0x70: 0x13f02, // rt + 0x71: 0x15008, // colgroup + 0x72: 0x23502, // mn + 0x74: 0x13a07, // onabort + 0x75: 0x3906, // keygen + 0x76: 0x4c209, // onoffline + 0x77: 0x21f09, // challenge + 0x78: 0x2b203, // map + 0x7a: 0x2e902, // h4 + 0x7b: 0x3b607, // onerror + 0x7c: 0x2e109, // maxlength + 0x7d: 0x2f505, // mtext + 0x7e: 0xbb07, // sandbox + 0x7f: 0x58b06, // onsort + 0x80: 0x100a, // malignmark + 0x81: 0x45d04, // meta + 0x82: 0x7b05, // async + 0x83: 0x2a702, // h3 + 0x84: 0x26702, // dd + 0x85: 0x27004, // href + 0x86: 0x6e0a, // mediagroup + 0x87: 0x19406, // coords + 0x88: 0x41107, // srclang + 0x89: 0x34d0a, // ondblclick + 0x8a: 0x4005, // value + 0x8c: 0xe908, // oncancel + 0x8e: 0x3230a, // spellcheck + 0x8f: 0x9a05, // frame + 0x91: 0x12403, // big + 0x94: 0x1f606, // action + 0x95: 0x6903, // dir + 0x97: 0x2fb08, // readonly + 0x99: 0x42d05, // table + 0x9a: 0x61607, // summary + 0x9b: 0x12103, // wbr + 0x9c: 0x30a, // radiogroup + 0x9d: 0x6c04, // name + 0x9f: 0x62306, // system + 0xa1: 0x15d05, // color + 0xa2: 0x7f06, // canvas + 0xa3: 0x25504, // html + 0xa5: 0x56f09, // onseeking + 0xac: 0x4f905, // shape + 0xad: 0x25f03, // rel + 0xae: 0x28510, // oncanplaythrough + 0xaf: 0x3760a, // ondragover + 0xb0: 0x62608, // template + 0xb1: 0x1d80d, // foreignObject + 0xb3: 0x9204, // rows + 0xb6: 0x44e07, // listing + 0xb7: 0x49c06, // output + 0xb9: 0x3310b, // contextmenu + 0xbb: 0x11f03, // low + 0xbc: 0x1c602, // rp + 0xbd: 0x5bb09, // onsuspend + 0xbe: 0x13606, // button + 0xbf: 0x4db04, // desc + 0xc1: 0x4e207, // section + 0xc2: 0x52a0a, // onprogress + 0xc3: 0x59e09, // onstorage + 0xc4: 0x2d204, // math + 0xc5: 0x4503, // alt + 0xc7: 0x8a02, // ul + 0xc8: 0x5107, // pattern + 0xc9: 0x4b60c, // onmousewheel + 0xca: 0x35709, // ondragend + 0xcb: 0xaf04, // ruby + 0xcc: 0xc01, // p + 0xcd: 0x31707, // onclose + 0xce: 0x24205, // meter + 0xcf: 0x11807, // bgsound + 0xd2: 0x25106, // height + 0xd4: 0x101, // b + 0xd5: 0x2c308, // itemtype + 0xd8: 0x1bb07, // caption + 0xd9: 0x10c08, // disabled + 0xdb: 0x33808, // menuitem + 0xdc: 0x62003, // svg + 0xdd: 0x18f05, // small + 0xde: 0x44a04, // data + 0xe0: 0x4cb08, // ononline + 0xe1: 0x2a206, // mglyph + 0xe3: 0x6505, // embed + 0xe4: 0x10502, // tr + 0xe5: 0x46b0b, // onloadstart + 0xe7: 0x3c306, // srcdoc + 0xeb: 0x5c408, // ontoggle + 0xed: 0xe703, // bdo + 0xee: 0x4702, // td + 0xef: 0x8305, // aside + 0xf0: 0x29402, // h2 + 0xf1: 0x52c08, // progress + 0xf2: 0x12c0a, // blockquote + 0xf4: 0xf005, // label + 0xf5: 0x601, // i + 0xf7: 0x9207, // rowspan + 0xfb: 0x51709, // onplaying + 0xfd: 0x2a103, // img + 0xfe: 0xf608, // optgroup + 0xff: 0x42307, // content + 0x101: 0x53e0c, // onratechange + 0x103: 0x3da0c, // onhashchange + 0x104: 0x4807, // details + 0x106: 0x40008, // download + 0x109: 0x14009, // translate + 0x10b: 0x4230f, // contenteditable + 0x10d: 0x36b0b, // ondragleave + 0x10e: 0x2106, // accept + 0x10f: 0x57a08, // selected + 0x112: 0x1f20a, // formaction + 0x113: 0x5b506, // center + 0x115: 0x45510, // onloadedmetadata + 0x116: 0x12804, // link + 0x117: 0xdd04, // time + 0x118: 0x19f0b, // crossorigin + 0x119: 0x3bd07, // onfocus + 0x11a: 0x58704, // wrap + 0x11b: 0x42204, // icon + 0x11d: 0x28105, // video + 0x11e: 0x4de05, // class + 0x121: 0x5d40e, // onvolumechange + 0x122: 0xaa06, // onblur + 0x123: 0x2b909, // itemscope + 0x124: 0x61105, // style + 0x127: 0x41e06, // public + 0x129: 0x2320e, // formnovalidate + 0x12a: 0x58206, // onshow + 0x12c: 0x51706, // onplay + 0x12d: 0x3c804, // cite + 0x12e: 0x2bc02, // ms + 0x12f: 0xdb0c, // ontimeupdate + 0x130: 0x10904, // kind + 0x131: 0x2470a, // formtarget + 0x135: 0x3af07, // onended + 0x136: 0x26506, // hidden + 0x137: 0x2c01, // s + 0x139: 0x2280a, // formmethod + 0x13a: 0x3e805, // input + 0x13c: 0x50b02, // h6 + 0x13d: 0xc902, // ol + 0x13e: 0x3420b, // oncuechange + 0x13f: 0x1e50d, // foreignobject + 0x143: 0x4e70e, // onbeforeunload + 0x144: 0x2bd05, // scope + 0x145: 0x39609, // onemptied + 0x146: 0x14b05, // defer + 0x147: 0xc103, // xmp + 0x148: 0x39f10, // ondurationchange + 0x149: 0x1903, // kbd + 0x14c: 0x47609, // onmessage + 0x14d: 0x60006, // option + 0x14e: 0x2eb09, // minlength + 0x14f: 0x32807, // checked + 0x150: 0xce08, // autoplay + 0x152: 0x202, // br + 0x153: 0x2360a, // novalidate + 0x156: 0x6307, // noembed + 0x159: 0x31007, // onclick + 0x15a: 0x47f0b, // onmousedown + 0x15b: 0x3a708, // onchange + 0x15e: 0x3f209, // oninvalid + 0x15f: 0x2bd06, // scoped + 0x160: 0x18808, // controls + 0x161: 0x30b05, // muted + 0x162: 0x58d08, // sortable + 0x163: 0x51106, // usemap + 0x164: 0x1b80a, // figcaption + 0x165: 0x35706, // ondrag + 0x166: 0x26b04, // high + 0x168: 0x3c303, // src + 0x169: 0x15706, // poster + 0x16b: 0x1670e, // annotation-xml + 0x16c: 0x5f704, // step + 0x16d: 0x4, // abbr + 0x16e: 0x1b06, // dialog + 0x170: 0x1202, // li + 0x172: 0x3ed02, // mo + 0x175: 0x1d803, // for + 0x176: 0x1a803, // ins + 0x178: 0x55504, // size + 0x179: 0x43210, // onlanguagechange + 0x17a: 0x8607, // default + 0x17b: 0x1a03, // bdi + 0x17c: 0x4d30a, // onpagehide + 0x17d: 0x6907, // dirname + 0x17e: 0x21404, // type + 0x17f: 0x1f204, // form + 0x181: 0x28509, // oncanplay + 0x182: 0x6103, // dfn + 0x183: 0x46308, // tabindex + 0x186: 0x6502, // em + 0x187: 0x27404, // lang + 0x189: 0x39108, // dropzone + 0x18a: 0x4080a, // onkeypress + 0x18b: 0x23c08, // datetime + 0x18c: 0x16204, // cols + 0x18d: 0x1, // a + 0x18e: 0x4420c, // onloadeddata + 0x190: 0xa605, // audio + 0x192: 0x2e05, // tbody + 0x193: 0x22c06, // method + 0x195: 0xf404, // loop + 0x196: 0x29606, // iframe + 0x198: 0x2d504, // head + 0x19e: 0x5f108, // manifest + 0x19f: 0xb309, // autofocus + 0x1a0: 0x14904, // code + 0x1a1: 0x55906, // strong + 0x1a2: 0x30308, // multiple + 0x1a3: 0xc05, // param + 0x1a6: 0x21107, // enctype + 0x1a7: 0x5b304, // face + 0x1a8: 0xfd09, // plaintext + 0x1a9: 0x26e02, // h1 + 0x1aa: 0x59509, // onstalled + 0x1ad: 0x3d406, // script + 0x1ae: 0x2db06, // spacer + 0x1af: 0x55108, // onresize + 0x1b0: 0x4a20b, // onmouseover + 0x1b1: 0x5cc08, // onunload + 0x1b2: 0x56708, // onseeked + 0x1b4: 0x2140d, // typemustmatch + 0x1b5: 0x1cc06, // figure + 0x1b6: 0x4950a, // onmouseout + 0x1b7: 0x25e03, // pre + 0x1b8: 0x50705, // width + 0x1b9: 0x19906, // sorted + 0x1bb: 0x5704, // nobr + 0x1be: 0x5302, // tt + 0x1bf: 0x1105, // align + 0x1c0: 0x3e607, // oninput + 0x1c3: 0x41807, // onkeyup + 0x1c6: 0x1c00c, // onafterprint + 0x1c7: 0x210e, // accept-charset + 0x1c8: 0x33c06, // itemid + 0x1c9: 0x3e809, // inputmode + 0x1cb: 0x53306, // strike + 0x1cc: 0x5a903, // sub + 0x1cd: 0x10505, // track + 0x1ce: 0x38605, // start + 0x1d0: 0xd608, // basefont + 0x1d6: 0x1aa06, // source + 0x1d7: 0x18206, // legend + 0x1d8: 0x2d405, // thead + 0x1da: 0x8c05, // tfoot + 0x1dd: 0x1ec06, // object + 0x1de: 0x6e05, // media + 0x1df: 0x1670a, // annotation + 0x1e0: 0x20d0b, // formenctype + 0x1e2: 0x3d208, // noscript + 0x1e4: 0x55505, // sizes + 0x1e5: 0x1fc0c, // autocomplete + 0x1e6: 0x9504, // span + 0x1e7: 0x9808, // noframes + 0x1e8: 0x24b06, // target + 0x1e9: 0x38f06, // ondrop + 0x1ea: 0x2b306, // applet + 0x1ec: 0x5a08, // reversed + 0x1f0: 0x2a907, // isindex + 0x1f3: 0x27008, // hreflang + 0x1f5: 0x2f302, // h5 + 0x1f6: 0x4f307, // address + 0x1fa: 0x2e103, // max + 0x1fb: 0xc30b, // placeholder + 0x1fc: 0x2f608, // textarea + 0x1fe: 0x4ad09, // onmouseup + 0x1ff: 0x3800b, // ondragstart +} + +const atomText = "abbradiogrouparamalignmarkbdialogaccept-charsetbodyaccesskey" + + "genavaluealtdetailsampatternobreversedfnoembedirnamediagroup" + + "ingasyncanvasidefaultfooterowspanoframesetitleaudionblurubya" + + "utofocusandboxmplaceholderautoplaybasefontimeupdatebdoncance" + + "labelooptgrouplaintextrackindisabledivarbgsoundlowbrbigblink" + + "blockquotebuttonabortranslatecodefercolgroupostercolorcolspa" + + "nnotation-xmlcommandraggablegendcontrolsmallcoordsortedcross" + + "originsourcefieldsetfigcaptionafterprintfigurequiredforeignO" + + "bjectforeignobjectformactionautocompleteerrorformenctypemust" + + "matchallengeformmethodformnovalidatetimeterformtargetheightm" + + "lhgroupreloadhiddenhigh1hreflanghttp-equivideoncanplaythroug" + + "h2iframeimageimglyph3isindexismappletitemscopeditemtypemarqu" + + "eematheaderspacermaxlength4minlength5mtextareadonlymultiplem" + + "utedonclickoncloseamlesspellcheckedoncontextmenuitemidoncuec" + + "hangeondblclickondragendondragenterondragleaveondragoverondr" + + "agstarticleondropzonemptiedondurationchangeonendedonerroronf" + + "ocusrcdocitempropenoscriptonhashchangeoninputmodeloninvalido" + + "nkeydownloadonkeypressrclangonkeyupublicontenteditableonlang" + + "uagechangeonloadeddatalistingonloadedmetadatabindexonloadsta" + + "rtonmessageonmousedownonmousemoveonmouseoutputonmouseoveronm" + + "ouseuponmousewheelonofflineononlineonpagehidesclassectionbef" + + "oreunloaddresshapeonpageshowidth6onpausemaponplayingonpopsta" + + "teonprogresstrikeytypeonratechangeonresetonresizestrongonscr" + + "ollonseekedonseekingonselectedonshowraponsortableonstalledon" + + "storageonsubmitemrefacenteronsuspendontoggleonunloadonvolume" + + "changeonwaitingoptimumanifestepromptoptionbeforeprintstylesu" + + "mmarysupsvgsystemplate" diff --git a/vendor/golang.org/x/net/html/atom/table_test.go b/vendor/golang.org/x/net/html/atom/table_test.go new file mode 100644 index 0000000..0f2ecce --- /dev/null +++ b/vendor/golang.org/x/net/html/atom/table_test.go @@ -0,0 +1,351 @@ +// generated by go run gen.go -test; DO NOT EDIT + +package atom + +var testAtomList = []string{ + "a", + "abbr", + "abbr", + "accept", + "accept-charset", + "accesskey", + "action", + "address", + "align", + "alt", + "annotation", + "annotation-xml", + "applet", + "area", + "article", + "aside", + "async", + "audio", + "autocomplete", + "autofocus", + "autoplay", + "b", + "base", + "basefont", + "bdi", + "bdo", + "bgsound", + "big", + "blink", + "blockquote", + "body", + "br", + "button", + "canvas", + "caption", + "center", + "challenge", + "charset", + "checked", + "cite", + "cite", + "class", + "code", + "col", + "colgroup", + "color", + "cols", + "colspan", + "command", + "command", + "content", + "contenteditable", + "contextmenu", + "controls", + "coords", + "crossorigin", + "data", + "data", + "datalist", + "datetime", + "dd", + "default", + "defer", + "del", + "desc", + "details", + "dfn", + "dialog", + "dir", + "dirname", + "disabled", + "div", + "dl", + "download", + "draggable", + "dropzone", + "dt", + "em", + "embed", + "enctype", + "face", + "fieldset", + "figcaption", + "figure", + "font", + "footer", + "for", + "foreignObject", + "foreignobject", + "form", + "form", + "formaction", + "formenctype", + "formmethod", + "formnovalidate", + "formtarget", + "frame", + "frameset", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "head", + "header", + "headers", + "height", + "hgroup", + "hidden", + "high", + "hr", + "href", + "hreflang", + "html", + "http-equiv", + "i", + "icon", + "id", + "iframe", + "image", + "img", + "input", + "inputmode", + "ins", + "isindex", + "ismap", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "kbd", + "keygen", + "keytype", + "kind", + "label", + "label", + "lang", + "legend", + "li", + "link", + "list", + "listing", + "loop", + "low", + "malignmark", + "manifest", + "map", + "mark", + "marquee", + "math", + "max", + "maxlength", + "media", + "mediagroup", + "menu", + "menuitem", + "meta", + "meter", + "method", + "mglyph", + "mi", + "min", + "minlength", + "mn", + "mo", + "ms", + "mtext", + "multiple", + "muted", + "name", + "nav", + "nobr", + "noembed", + "noframes", + "noscript", + "novalidate", + "object", + "ol", + "onabort", + "onafterprint", + "onautocomplete", + "onautocompleteerror", + "onbeforeprint", + "onbeforeunload", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "onhashchange", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onlanguagechange", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmessage", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onoffline", + "ononline", + "onpagehide", + "onpageshow", + "onpause", + "onplay", + "onplaying", + "onpopstate", + "onprogress", + "onratechange", + "onreset", + "onresize", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onsort", + "onstalled", + "onstorage", + "onsubmit", + "onsuspend", + "ontimeupdate", + "ontoggle", + "onunload", + "onvolumechange", + "onwaiting", + "open", + "optgroup", + "optimum", + "option", + "output", + "p", + "param", + "pattern", + "ping", + "placeholder", + "plaintext", + "poster", + "pre", + "preload", + "progress", + "prompt", + "public", + "q", + "radiogroup", + "readonly", + "rel", + "required", + "reversed", + "rows", + "rowspan", + "rp", + "rt", + "ruby", + "s", + "samp", + "sandbox", + "scope", + "scoped", + "script", + "seamless", + "section", + "select", + "selected", + "shape", + "size", + "sizes", + "small", + "sortable", + "sorted", + "source", + "spacer", + "span", + "span", + "spellcheck", + "src", + "srcdoc", + "srclang", + "start", + "step", + "strike", + "strong", + "style", + "style", + "sub", + "summary", + "sup", + "svg", + "system", + "tabindex", + "table", + "target", + "tbody", + "td", + "template", + "textarea", + "tfoot", + "th", + "thead", + "time", + "title", + "title", + "tr", + "track", + "translate", + "tt", + "type", + "typemustmatch", + "u", + "ul", + "usemap", + "value", + "var", + "video", + "wbr", + "width", + "wrap", + "xmp", +} diff --git a/vendor/golang.org/x/net/html/charset/charset.go b/vendor/golang.org/x/net/html/charset/charset.go new file mode 100644 index 0000000..464c821 --- /dev/null +++ b/vendor/golang.org/x/net/html/charset/charset.go @@ -0,0 +1,244 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package charset provides common text encodings for HTML documents. +// +// The mapping from encoding labels to encodings is defined at +// https://encoding.spec.whatwg.org/. +package charset // import "golang.org/x/net/html/charset" + +import ( + "bytes" + "fmt" + "io" + "mime" + "strings" + "unicode/utf8" + + "golang.org/x/net/html" + "golang.org/x/text/encoding" + "golang.org/x/text/encoding/charmap" + "golang.org/x/text/transform" +) + +// Lookup returns the encoding with the specified label, and its canonical +// name. It returns nil and the empty string if label is not one of the +// standard encodings for HTML. Matching is case-insensitive and ignores +// leading and trailing whitespace. +func Lookup(label string) (e encoding.Encoding, name string) { + label = strings.ToLower(strings.Trim(label, "\t\n\r\f ")) + enc := encodings[label] + return enc.e, enc.name +} + +// DetermineEncoding determines the encoding of an HTML document by examining +// up to the first 1024 bytes of content and the declared Content-Type. +// +// See http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#determining-the-character-encoding +func DetermineEncoding(content []byte, contentType string) (e encoding.Encoding, name string, certain bool) { + if len(content) > 1024 { + content = content[:1024] + } + + for _, b := range boms { + if bytes.HasPrefix(content, b.bom) { + e, name = Lookup(b.enc) + return e, name, true + } + } + + if _, params, err := mime.ParseMediaType(contentType); err == nil { + if cs, ok := params["charset"]; ok { + if e, name = Lookup(cs); e != nil { + return e, name, true + } + } + } + + if len(content) > 0 { + e, name = prescan(content) + if e != nil { + return e, name, false + } + } + + // Try to detect UTF-8. + // First eliminate any partial rune at the end. + for i := len(content) - 1; i >= 0 && i > len(content)-4; i-- { + b := content[i] + if b < 0x80 { + break + } + if utf8.RuneStart(b) { + content = content[:i] + break + } + } + hasHighBit := false + for _, c := range content { + if c >= 0x80 { + hasHighBit = true + break + } + } + if hasHighBit && utf8.Valid(content) { + return encoding.Nop, "utf-8", false + } + + // TODO: change default depending on user's locale? + return charmap.Windows1252, "windows-1252", false +} + +// NewReader returns an io.Reader that converts the content of r to UTF-8. +// It calls DetermineEncoding to find out what r's encoding is. +func NewReader(r io.Reader, contentType string) (io.Reader, error) { + preview := make([]byte, 1024) + n, err := io.ReadFull(r, preview) + switch { + case err == io.ErrUnexpectedEOF: + preview = preview[:n] + r = bytes.NewReader(preview) + case err != nil: + return nil, err + default: + r = io.MultiReader(bytes.NewReader(preview), r) + } + + if e, _, _ := DetermineEncoding(preview, contentType); e != encoding.Nop { + r = transform.NewReader(r, e.NewDecoder()) + } + return r, nil +} + +// NewReaderLabel returns a reader that converts from the specified charset to +// UTF-8. It uses Lookup to find the encoding that corresponds to label, and +// returns an error if Lookup returns nil. It is suitable for use as +// encoding/xml.Decoder's CharsetReader function. +func NewReaderLabel(label string, input io.Reader) (io.Reader, error) { + e, _ := Lookup(label) + if e == nil { + return nil, fmt.Errorf("unsupported charset: %q", label) + } + return transform.NewReader(input, e.NewDecoder()), nil +} + +func prescan(content []byte) (e encoding.Encoding, name string) { + z := html.NewTokenizer(bytes.NewReader(content)) + for { + switch z.Next() { + case html.ErrorToken: + return nil, "" + + case html.StartTagToken, html.SelfClosingTagToken: + tagName, hasAttr := z.TagName() + if !bytes.Equal(tagName, []byte("meta")) { + continue + } + attrList := make(map[string]bool) + gotPragma := false + + const ( + dontKnow = iota + doNeedPragma + doNotNeedPragma + ) + needPragma := dontKnow + + name = "" + e = nil + for hasAttr { + var key, val []byte + key, val, hasAttr = z.TagAttr() + ks := string(key) + if attrList[ks] { + continue + } + attrList[ks] = true + for i, c := range val { + if 'A' <= c && c <= 'Z' { + val[i] = c + 0x20 + } + } + + switch ks { + case "http-equiv": + if bytes.Equal(val, []byte("content-type")) { + gotPragma = true + } + + case "content": + if e == nil { + name = fromMetaElement(string(val)) + if name != "" { + e, name = Lookup(name) + if e != nil { + needPragma = doNeedPragma + } + } + } + + case "charset": + e, name = Lookup(string(val)) + needPragma = doNotNeedPragma + } + } + + if needPragma == dontKnow || needPragma == doNeedPragma && !gotPragma { + continue + } + + if strings.HasPrefix(name, "utf-16") { + name = "utf-8" + e = encoding.Nop + } + + if e != nil { + return e, name + } + } + } +} + +func fromMetaElement(s string) string { + for s != "" { + csLoc := strings.Index(s, "charset") + if csLoc == -1 { + return "" + } + s = s[csLoc+len("charset"):] + s = strings.TrimLeft(s, " \t\n\f\r") + if !strings.HasPrefix(s, "=") { + continue + } + s = s[1:] + s = strings.TrimLeft(s, " \t\n\f\r") + if s == "" { + return "" + } + if q := s[0]; q == '"' || q == '\'' { + s = s[1:] + closeQuote := strings.IndexRune(s, rune(q)) + if closeQuote == -1 { + return "" + } + return s[:closeQuote] + } + + end := strings.IndexAny(s, "; \t\n\f\r") + if end == -1 { + end = len(s) + } + return s[:end] + } + return "" +} + +var boms = []struct { + bom []byte + enc string +}{ + {[]byte{0xfe, 0xff}, "utf-16be"}, + {[]byte{0xff, 0xfe}, "utf-16le"}, + {[]byte{0xef, 0xbb, 0xbf}, "utf-8"}, +} diff --git a/vendor/golang.org/x/net/html/charset/charset_test.go b/vendor/golang.org/x/net/html/charset/charset_test.go new file mode 100644 index 0000000..8b10399 --- /dev/null +++ b/vendor/golang.org/x/net/html/charset/charset_test.go @@ -0,0 +1,236 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package charset + +import ( + "bytes" + "encoding/xml" + "io/ioutil" + "runtime" + "strings" + "testing" + + "golang.org/x/text/transform" +) + +func transformString(t transform.Transformer, s string) (string, error) { + r := transform.NewReader(strings.NewReader(s), t) + b, err := ioutil.ReadAll(r) + return string(b), err +} + +var testCases = []struct { + utf8, other, otherEncoding string +}{ + {"Résumé", "Résumé", "utf8"}, + {"Résumé", "R\xe9sum\xe9", "latin1"}, + {"これは漢字です。", "S0\x8c0o0\"oW[g0Y0\x020", "UTF-16LE"}, + {"これは漢字です。", "0S0\x8c0oo\"[W0g0Y0\x02", "UTF-16BE"}, + {"Hello, world", "Hello, world", "ASCII"}, + {"Gdańsk", "Gda\xf1sk", "ISO-8859-2"}, + {"Ââ Čč Đđ Ŋŋ Õõ Šš Žž Åå Ää", "\xc2\xe2 \xc8\xe8 \xa9\xb9 \xaf\xbf \xd5\xf5 \xaa\xba \xac\xbc \xc5\xe5 \xc4\xe4", "ISO-8859-10"}, + {"สำหรับ", "\xca\xd3\xcb\xc3\u047a", "ISO-8859-11"}, + {"latviešu", "latvie\xf0u", "ISO-8859-13"}, + {"Seònaid", "Se\xf2naid", "ISO-8859-14"}, + {"€1 is cheap", "\xa41 is cheap", "ISO-8859-15"}, + {"românește", "rom\xe2ne\xbate", "ISO-8859-16"}, + {"nutraĵo", "nutra\xbco", "ISO-8859-3"}, + {"Kalâdlit", "Kal\xe2dlit", "ISO-8859-4"}, + {"русский", "\xe0\xe3\xe1\xe1\xda\xd8\xd9", "ISO-8859-5"}, + {"ελληνικά", "\xe5\xeb\xeb\xe7\xed\xe9\xea\xdc", "ISO-8859-7"}, + {"Kağan", "Ka\xf0an", "ISO-8859-9"}, + {"Résumé", "R\x8esum\x8e", "macintosh"}, + {"Gdańsk", "Gda\xf1sk", "windows-1250"}, + {"русский", "\xf0\xf3\xf1\xf1\xea\xe8\xe9", "windows-1251"}, + {"Résumé", "R\xe9sum\xe9", "windows-1252"}, + {"ελληνικά", "\xe5\xeb\xeb\xe7\xed\xe9\xea\xdc", "windows-1253"}, + {"Kağan", "Ka\xf0an", "windows-1254"}, + {"עִבְרִית", "\xf2\xc4\xe1\xc0\xf8\xc4\xe9\xfa", "windows-1255"}, + {"العربية", "\xc7\xe1\xda\xd1\xc8\xed\xc9", "windows-1256"}, + {"latviešu", "latvie\xf0u", "windows-1257"}, + {"Việt", "Vi\xea\xf2t", "windows-1258"}, + {"สำหรับ", "\xca\xd3\xcb\xc3\u047a", "windows-874"}, + {"русский", "\xd2\xd5\xd3\xd3\xcb\xc9\xca", "KOI8-R"}, + {"українська", "\xd5\xcb\xd2\xc1\xa7\xce\xd3\xd8\xcb\xc1", "KOI8-U"}, + {"Hello 常用國字標準字體表", "Hello \xb1`\xa5\u03b0\xea\xa6r\xbc\u0437\u01e6r\xc5\xe9\xaa\xed", "big5"}, + {"Hello 常用國字標準字體表", "Hello \xb3\xa3\xd3\xc3\x87\xf8\xd7\xd6\x98\xcb\x9c\xca\xd7\xd6\xf3\x77\xb1\xed", "gbk"}, + {"Hello 常用國字標準字體表", "Hello \xb3\xa3\xd3\xc3\x87\xf8\xd7\xd6\x98\xcb\x9c\xca\xd7\xd6\xf3\x77\xb1\xed", "gb18030"}, + {"עִבְרִית", "\x81\x30\xfb\x30\x81\x30\xf6\x34\x81\x30\xf9\x33\x81\x30\xf6\x30\x81\x30\xfb\x36\x81\x30\xf6\x34\x81\x30\xfa\x31\x81\x30\xfb\x38", "gb18030"}, + {"㧯", "\x82\x31\x89\x38", "gb18030"}, + {"これは漢字です。", "\x82\xb1\x82\xea\x82\xcd\x8a\xbf\x8e\x9a\x82\xc5\x82\xb7\x81B", "SJIS"}, + {"Hello, 世界!", "Hello, \x90\xa2\x8aE!", "SJIS"}, + {"イウエオカ", "\xb2\xb3\xb4\xb5\xb6", "SJIS"}, + {"これは漢字です。", "\xa4\xb3\xa4\xec\xa4\u03f4\xc1\xbb\xfa\xa4\u01e4\xb9\xa1\xa3", "EUC-JP"}, + {"Hello, 世界!", "Hello, \x1b$B@$3&\x1b(B!", "ISO-2022-JP"}, + {"네이트 | 즐거움의 시작, 슈파스(Spaβ) NATE", "\xb3\xd7\xc0\xcc\xc6\xae | \xc1\xf1\xb0\xc5\xbf\xf2\xc0\xc7 \xbd\xc3\xc0\xdb, \xbd\xb4\xc6\xc4\xbd\xba(Spa\xa5\xe2) NATE", "EUC-KR"}, +} + +func TestDecode(t *testing.T) { + for _, tc := range testCases { + e, _ := Lookup(tc.otherEncoding) + if e == nil { + t.Errorf("%s: not found", tc.otherEncoding) + continue + } + s, err := transformString(e.NewDecoder(), tc.other) + if err != nil { + t.Errorf("%s: decode %q: %v", tc.otherEncoding, tc.other, err) + continue + } + if s != tc.utf8 { + t.Errorf("%s: got %q, want %q", tc.otherEncoding, s, tc.utf8) + } + } +} + +func TestEncode(t *testing.T) { + for _, tc := range testCases { + e, _ := Lookup(tc.otherEncoding) + if e == nil { + t.Errorf("%s: not found", tc.otherEncoding) + continue + } + s, err := transformString(e.NewEncoder(), tc.utf8) + if err != nil { + t.Errorf("%s: encode %q: %s", tc.otherEncoding, tc.utf8, err) + continue + } + if s != tc.other { + t.Errorf("%s: got %q, want %q", tc.otherEncoding, s, tc.other) + } + } +} + +// TestNames verifies that you can pass an encoding's name to Lookup and get +// the same encoding back (except for "replacement"). +func TestNames(t *testing.T) { + for _, e := range encodings { + if e.name == "replacement" { + continue + } + _, got := Lookup(e.name) + if got != e.name { + t.Errorf("got %q, want %q", got, e.name) + continue + } + } +} + +var sniffTestCases = []struct { + filename, declared, want string +}{ + {"HTTP-charset.html", "text/html; charset=iso-8859-15", "iso-8859-15"}, + {"UTF-16LE-BOM.html", "", "utf-16le"}, + {"UTF-16BE-BOM.html", "", "utf-16be"}, + {"meta-content-attribute.html", "text/html", "iso-8859-15"}, + {"meta-charset-attribute.html", "text/html", "iso-8859-15"}, + {"No-encoding-declaration.html", "text/html", "utf-8"}, + {"HTTP-vs-UTF-8-BOM.html", "text/html; charset=iso-8859-15", "utf-8"}, + {"HTTP-vs-meta-content.html", "text/html; charset=iso-8859-15", "iso-8859-15"}, + {"HTTP-vs-meta-charset.html", "text/html; charset=iso-8859-15", "iso-8859-15"}, + {"UTF-8-BOM-vs-meta-content.html", "text/html", "utf-8"}, + {"UTF-8-BOM-vs-meta-charset.html", "text/html", "utf-8"}, +} + +func TestSniff(t *testing.T) { + switch runtime.GOOS { + case "nacl": // platforms that don't permit direct file system access + t.Skipf("not supported on %q", runtime.GOOS) + } + + for _, tc := range sniffTestCases { + content, err := ioutil.ReadFile("testdata/" + tc.filename) + if err != nil { + t.Errorf("%s: error reading file: %v", tc.filename, err) + continue + } + + _, name, _ := DetermineEncoding(content, tc.declared) + if name != tc.want { + t.Errorf("%s: got %q, want %q", tc.filename, name, tc.want) + continue + } + } +} + +func TestReader(t *testing.T) { + switch runtime.GOOS { + case "nacl": // platforms that don't permit direct file system access + t.Skipf("not supported on %q", runtime.GOOS) + } + + for _, tc := range sniffTestCases { + content, err := ioutil.ReadFile("testdata/" + tc.filename) + if err != nil { + t.Errorf("%s: error reading file: %v", tc.filename, err) + continue + } + + r, err := NewReader(bytes.NewReader(content), tc.declared) + if err != nil { + t.Errorf("%s: error creating reader: %v", tc.filename, err) + continue + } + + got, err := ioutil.ReadAll(r) + if err != nil { + t.Errorf("%s: error reading from charset.NewReader: %v", tc.filename, err) + continue + } + + e, _ := Lookup(tc.want) + want, err := ioutil.ReadAll(transform.NewReader(bytes.NewReader(content), e.NewDecoder())) + if err != nil { + t.Errorf("%s: error decoding with hard-coded charset name: %v", tc.filename, err) + continue + } + + if !bytes.Equal(got, want) { + t.Errorf("%s: got %q, want %q", tc.filename, got, want) + continue + } + } +} + +var metaTestCases = []struct { + meta, want string +}{ + {"", ""}, + {"text/html", ""}, + {"text/html; charset utf-8", ""}, + {"text/html; charset=latin-2", "latin-2"}, + {"text/html; charset; charset = utf-8", "utf-8"}, + {`charset="big5"`, "big5"}, + {"charset='shift_jis'", "shift_jis"}, +} + +func TestFromMeta(t *testing.T) { + for _, tc := range metaTestCases { + got := fromMetaElement(tc.meta) + if got != tc.want { + t.Errorf("%q: got %q, want %q", tc.meta, got, tc.want) + } + } +} + +func TestXML(t *testing.T) { + const s = "r\xe9sum\xe9" + + d := xml.NewDecoder(strings.NewReader(s)) + d.CharsetReader = NewReaderLabel + + var a struct { + Word string + } + err := d.Decode(&a) + if err != nil { + t.Fatalf("Decode: %v", err) + } + + want := "résumé" + if a.Word != want { + t.Errorf("got %q, want %q", a.Word, want) + } +} diff --git a/vendor/golang.org/x/net/html/charset/gen.go b/vendor/golang.org/x/net/html/charset/gen.go new file mode 100644 index 0000000..828347f --- /dev/null +++ b/vendor/golang.org/x/net/html/charset/gen.go @@ -0,0 +1,111 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +package main + +// Download https://encoding.spec.whatwg.org/encodings.json and use it to +// generate table.go. + +import ( + "encoding/json" + "fmt" + "log" + "net/http" + "strings" +) + +type enc struct { + Name string + Labels []string +} + +type group struct { + Encodings []enc + Heading string +} + +const specURL = "https://encoding.spec.whatwg.org/encodings.json" + +func main() { + resp, err := http.Get(specURL) + if err != nil { + log.Fatalf("error fetching %s: %s", specURL, err) + } + if resp.StatusCode != 200 { + log.Fatalf("error fetching %s: HTTP status %s", specURL, resp.Status) + } + defer resp.Body.Close() + + var groups []group + d := json.NewDecoder(resp.Body) + err = d.Decode(&groups) + if err != nil { + log.Fatalf("error reading encodings.json: %s", err) + } + + fmt.Println("// generated by go run gen.go; DO NOT EDIT") + fmt.Println() + fmt.Println("package charset") + fmt.Println() + + fmt.Println("import (") + fmt.Println(`"golang.org/x/text/encoding"`) + for _, pkg := range []string{"charmap", "japanese", "korean", "simplifiedchinese", "traditionalchinese", "unicode"} { + fmt.Printf("\"golang.org/x/text/encoding/%s\"\n", pkg) + } + fmt.Println(")") + fmt.Println() + + fmt.Println("var encodings = map[string]struct{e encoding.Encoding; name string} {") + for _, g := range groups { + for _, e := range g.Encodings { + goName, ok := miscNames[e.Name] + if !ok { + for k, v := range prefixes { + if strings.HasPrefix(e.Name, k) { + goName = v + e.Name[len(k):] + break + } + } + if goName == "" { + log.Fatalf("unrecognized encoding name: %s", e.Name) + } + } + + for _, label := range e.Labels { + fmt.Printf("%q: {%s, %q},\n", label, goName, e.Name) + } + } + } + fmt.Println("}") +} + +var prefixes = map[string]string{ + "iso-8859-": "charmap.ISO8859_", + "windows-": "charmap.Windows", +} + +var miscNames = map[string]string{ + "utf-8": "encoding.Nop", + "ibm866": "charmap.CodePage866", + "iso-8859-8-i": "charmap.ISO8859_8", + "koi8-r": "charmap.KOI8R", + "koi8-u": "charmap.KOI8U", + "macintosh": "charmap.Macintosh", + "x-mac-cyrillic": "charmap.MacintoshCyrillic", + "gbk": "simplifiedchinese.GBK", + "gb18030": "simplifiedchinese.GB18030", + "hz-gb-2312": "simplifiedchinese.HZGB2312", + "big5": "traditionalchinese.Big5", + "euc-jp": "japanese.EUCJP", + "iso-2022-jp": "japanese.ISO2022JP", + "shift_jis": "japanese.ShiftJIS", + "euc-kr": "korean.EUCKR", + "replacement": "encoding.Replacement", + "utf-16be": "unicode.UTF16(unicode.BigEndian, unicode.IgnoreBOM)", + "utf-16le": "unicode.UTF16(unicode.LittleEndian, unicode.IgnoreBOM)", + "x-user-defined": "charmap.XUserDefined", +} diff --git a/vendor/golang.org/x/net/html/charset/table.go b/vendor/golang.org/x/net/html/charset/table.go new file mode 100644 index 0000000..aa0d948 --- /dev/null +++ b/vendor/golang.org/x/net/html/charset/table.go @@ -0,0 +1,235 @@ +// generated by go run gen.go; DO NOT EDIT + +package charset + +import ( + "golang.org/x/text/encoding" + "golang.org/x/text/encoding/charmap" + "golang.org/x/text/encoding/japanese" + "golang.org/x/text/encoding/korean" + "golang.org/x/text/encoding/simplifiedchinese" + "golang.org/x/text/encoding/traditionalchinese" + "golang.org/x/text/encoding/unicode" +) + +var encodings = map[string]struct { + e encoding.Encoding + name string +}{ + "unicode-1-1-utf-8": {encoding.Nop, "utf-8"}, + "utf-8": {encoding.Nop, "utf-8"}, + "utf8": {encoding.Nop, "utf-8"}, + "866": {charmap.CodePage866, "ibm866"}, + "cp866": {charmap.CodePage866, "ibm866"}, + "csibm866": {charmap.CodePage866, "ibm866"}, + "ibm866": {charmap.CodePage866, "ibm866"}, + "csisolatin2": {charmap.ISO8859_2, "iso-8859-2"}, + "iso-8859-2": {charmap.ISO8859_2, "iso-8859-2"}, + "iso-ir-101": {charmap.ISO8859_2, "iso-8859-2"}, + "iso8859-2": {charmap.ISO8859_2, "iso-8859-2"}, + "iso88592": {charmap.ISO8859_2, "iso-8859-2"}, + "iso_8859-2": {charmap.ISO8859_2, "iso-8859-2"}, + "iso_8859-2:1987": {charmap.ISO8859_2, "iso-8859-2"}, + "l2": {charmap.ISO8859_2, "iso-8859-2"}, + "latin2": {charmap.ISO8859_2, "iso-8859-2"}, + "csisolatin3": {charmap.ISO8859_3, "iso-8859-3"}, + "iso-8859-3": {charmap.ISO8859_3, "iso-8859-3"}, + "iso-ir-109": {charmap.ISO8859_3, "iso-8859-3"}, + "iso8859-3": {charmap.ISO8859_3, "iso-8859-3"}, + "iso88593": {charmap.ISO8859_3, "iso-8859-3"}, + "iso_8859-3": {charmap.ISO8859_3, "iso-8859-3"}, + "iso_8859-3:1988": {charmap.ISO8859_3, "iso-8859-3"}, + "l3": {charmap.ISO8859_3, "iso-8859-3"}, + "latin3": {charmap.ISO8859_3, "iso-8859-3"}, + "csisolatin4": {charmap.ISO8859_4, "iso-8859-4"}, + "iso-8859-4": {charmap.ISO8859_4, "iso-8859-4"}, + "iso-ir-110": {charmap.ISO8859_4, "iso-8859-4"}, + "iso8859-4": {charmap.ISO8859_4, "iso-8859-4"}, + "iso88594": {charmap.ISO8859_4, "iso-8859-4"}, + "iso_8859-4": {charmap.ISO8859_4, "iso-8859-4"}, + "iso_8859-4:1988": {charmap.ISO8859_4, "iso-8859-4"}, + "l4": {charmap.ISO8859_4, "iso-8859-4"}, + "latin4": {charmap.ISO8859_4, "iso-8859-4"}, + "csisolatincyrillic": {charmap.ISO8859_5, "iso-8859-5"}, + "cyrillic": {charmap.ISO8859_5, "iso-8859-5"}, + "iso-8859-5": {charmap.ISO8859_5, "iso-8859-5"}, + "iso-ir-144": {charmap.ISO8859_5, "iso-8859-5"}, + "iso8859-5": {charmap.ISO8859_5, "iso-8859-5"}, + "iso88595": {charmap.ISO8859_5, "iso-8859-5"}, + "iso_8859-5": {charmap.ISO8859_5, "iso-8859-5"}, + "iso_8859-5:1988": {charmap.ISO8859_5, "iso-8859-5"}, + "arabic": {charmap.ISO8859_6, "iso-8859-6"}, + "asmo-708": {charmap.ISO8859_6, "iso-8859-6"}, + "csiso88596e": {charmap.ISO8859_6, "iso-8859-6"}, + "csiso88596i": {charmap.ISO8859_6, "iso-8859-6"}, + "csisolatinarabic": {charmap.ISO8859_6, "iso-8859-6"}, + "ecma-114": {charmap.ISO8859_6, "iso-8859-6"}, + "iso-8859-6": {charmap.ISO8859_6, "iso-8859-6"}, + "iso-8859-6-e": {charmap.ISO8859_6, "iso-8859-6"}, + "iso-8859-6-i": {charmap.ISO8859_6, "iso-8859-6"}, + "iso-ir-127": {charmap.ISO8859_6, "iso-8859-6"}, + "iso8859-6": {charmap.ISO8859_6, "iso-8859-6"}, + "iso88596": {charmap.ISO8859_6, "iso-8859-6"}, + "iso_8859-6": {charmap.ISO8859_6, "iso-8859-6"}, + "iso_8859-6:1987": {charmap.ISO8859_6, "iso-8859-6"}, + "csisolatingreek": {charmap.ISO8859_7, "iso-8859-7"}, + "ecma-118": {charmap.ISO8859_7, "iso-8859-7"}, + "elot_928": {charmap.ISO8859_7, "iso-8859-7"}, + "greek": {charmap.ISO8859_7, "iso-8859-7"}, + "greek8": {charmap.ISO8859_7, "iso-8859-7"}, + "iso-8859-7": {charmap.ISO8859_7, "iso-8859-7"}, + "iso-ir-126": {charmap.ISO8859_7, "iso-8859-7"}, + "iso8859-7": {charmap.ISO8859_7, "iso-8859-7"}, + "iso88597": {charmap.ISO8859_7, "iso-8859-7"}, + "iso_8859-7": {charmap.ISO8859_7, "iso-8859-7"}, + "iso_8859-7:1987": {charmap.ISO8859_7, "iso-8859-7"}, + "sun_eu_greek": {charmap.ISO8859_7, "iso-8859-7"}, + "csiso88598e": {charmap.ISO8859_8, "iso-8859-8"}, + "csisolatinhebrew": {charmap.ISO8859_8, "iso-8859-8"}, + "hebrew": {charmap.ISO8859_8, "iso-8859-8"}, + "iso-8859-8": {charmap.ISO8859_8, "iso-8859-8"}, + "iso-8859-8-e": {charmap.ISO8859_8, "iso-8859-8"}, + "iso-ir-138": {charmap.ISO8859_8, "iso-8859-8"}, + "iso8859-8": {charmap.ISO8859_8, "iso-8859-8"}, + "iso88598": {charmap.ISO8859_8, "iso-8859-8"}, + "iso_8859-8": {charmap.ISO8859_8, "iso-8859-8"}, + "iso_8859-8:1988": {charmap.ISO8859_8, "iso-8859-8"}, + "visual": {charmap.ISO8859_8, "iso-8859-8"}, + "csiso88598i": {charmap.ISO8859_8, "iso-8859-8-i"}, + "iso-8859-8-i": {charmap.ISO8859_8, "iso-8859-8-i"}, + "logical": {charmap.ISO8859_8, "iso-8859-8-i"}, + "csisolatin6": {charmap.ISO8859_10, "iso-8859-10"}, + "iso-8859-10": {charmap.ISO8859_10, "iso-8859-10"}, + "iso-ir-157": {charmap.ISO8859_10, "iso-8859-10"}, + "iso8859-10": {charmap.ISO8859_10, "iso-8859-10"}, + "iso885910": {charmap.ISO8859_10, "iso-8859-10"}, + "l6": {charmap.ISO8859_10, "iso-8859-10"}, + "latin6": {charmap.ISO8859_10, "iso-8859-10"}, + "iso-8859-13": {charmap.ISO8859_13, "iso-8859-13"}, + "iso8859-13": {charmap.ISO8859_13, "iso-8859-13"}, + "iso885913": {charmap.ISO8859_13, "iso-8859-13"}, + "iso-8859-14": {charmap.ISO8859_14, "iso-8859-14"}, + "iso8859-14": {charmap.ISO8859_14, "iso-8859-14"}, + "iso885914": {charmap.ISO8859_14, "iso-8859-14"}, + "csisolatin9": {charmap.ISO8859_15, "iso-8859-15"}, + "iso-8859-15": {charmap.ISO8859_15, "iso-8859-15"}, + "iso8859-15": {charmap.ISO8859_15, "iso-8859-15"}, + "iso885915": {charmap.ISO8859_15, "iso-8859-15"}, + "iso_8859-15": {charmap.ISO8859_15, "iso-8859-15"}, + "l9": {charmap.ISO8859_15, "iso-8859-15"}, + "iso-8859-16": {charmap.ISO8859_16, "iso-8859-16"}, + "cskoi8r": {charmap.KOI8R, "koi8-r"}, + "koi": {charmap.KOI8R, "koi8-r"}, + "koi8": {charmap.KOI8R, "koi8-r"}, + "koi8-r": {charmap.KOI8R, "koi8-r"}, + "koi8_r": {charmap.KOI8R, "koi8-r"}, + "koi8-u": {charmap.KOI8U, "koi8-u"}, + "csmacintosh": {charmap.Macintosh, "macintosh"}, + "mac": {charmap.Macintosh, "macintosh"}, + "macintosh": {charmap.Macintosh, "macintosh"}, + "x-mac-roman": {charmap.Macintosh, "macintosh"}, + "dos-874": {charmap.Windows874, "windows-874"}, + "iso-8859-11": {charmap.Windows874, "windows-874"}, + "iso8859-11": {charmap.Windows874, "windows-874"}, + "iso885911": {charmap.Windows874, "windows-874"}, + "tis-620": {charmap.Windows874, "windows-874"}, + "windows-874": {charmap.Windows874, "windows-874"}, + "cp1250": {charmap.Windows1250, "windows-1250"}, + "windows-1250": {charmap.Windows1250, "windows-1250"}, + "x-cp1250": {charmap.Windows1250, "windows-1250"}, + "cp1251": {charmap.Windows1251, "windows-1251"}, + "windows-1251": {charmap.Windows1251, "windows-1251"}, + "x-cp1251": {charmap.Windows1251, "windows-1251"}, + "ansi_x3.4-1968": {charmap.Windows1252, "windows-1252"}, + "ascii": {charmap.Windows1252, "windows-1252"}, + "cp1252": {charmap.Windows1252, "windows-1252"}, + "cp819": {charmap.Windows1252, "windows-1252"}, + "csisolatin1": {charmap.Windows1252, "windows-1252"}, + "ibm819": {charmap.Windows1252, "windows-1252"}, + "iso-8859-1": {charmap.Windows1252, "windows-1252"}, + "iso-ir-100": {charmap.Windows1252, "windows-1252"}, + "iso8859-1": {charmap.Windows1252, "windows-1252"}, + "iso88591": {charmap.Windows1252, "windows-1252"}, + "iso_8859-1": {charmap.Windows1252, "windows-1252"}, + "iso_8859-1:1987": {charmap.Windows1252, "windows-1252"}, + "l1": {charmap.Windows1252, "windows-1252"}, + "latin1": {charmap.Windows1252, "windows-1252"}, + "us-ascii": {charmap.Windows1252, "windows-1252"}, + "windows-1252": {charmap.Windows1252, "windows-1252"}, + "x-cp1252": {charmap.Windows1252, "windows-1252"}, + "cp1253": {charmap.Windows1253, "windows-1253"}, + "windows-1253": {charmap.Windows1253, "windows-1253"}, + "x-cp1253": {charmap.Windows1253, "windows-1253"}, + "cp1254": {charmap.Windows1254, "windows-1254"}, + "csisolatin5": {charmap.Windows1254, "windows-1254"}, + "iso-8859-9": {charmap.Windows1254, "windows-1254"}, + "iso-ir-148": {charmap.Windows1254, "windows-1254"}, + "iso8859-9": {charmap.Windows1254, "windows-1254"}, + "iso88599": {charmap.Windows1254, "windows-1254"}, + "iso_8859-9": {charmap.Windows1254, "windows-1254"}, + "iso_8859-9:1989": {charmap.Windows1254, "windows-1254"}, + "l5": {charmap.Windows1254, "windows-1254"}, + "latin5": {charmap.Windows1254, "windows-1254"}, + "windows-1254": {charmap.Windows1254, "windows-1254"}, + "x-cp1254": {charmap.Windows1254, "windows-1254"}, + "cp1255": {charmap.Windows1255, "windows-1255"}, + "windows-1255": {charmap.Windows1255, "windows-1255"}, + "x-cp1255": {charmap.Windows1255, "windows-1255"}, + "cp1256": {charmap.Windows1256, "windows-1256"}, + "windows-1256": {charmap.Windows1256, "windows-1256"}, + "x-cp1256": {charmap.Windows1256, "windows-1256"}, + "cp1257": {charmap.Windows1257, "windows-1257"}, + "windows-1257": {charmap.Windows1257, "windows-1257"}, + "x-cp1257": {charmap.Windows1257, "windows-1257"}, + "cp1258": {charmap.Windows1258, "windows-1258"}, + "windows-1258": {charmap.Windows1258, "windows-1258"}, + "x-cp1258": {charmap.Windows1258, "windows-1258"}, + "x-mac-cyrillic": {charmap.MacintoshCyrillic, "x-mac-cyrillic"}, + "x-mac-ukrainian": {charmap.MacintoshCyrillic, "x-mac-cyrillic"}, + "chinese": {simplifiedchinese.GBK, "gbk"}, + "csgb2312": {simplifiedchinese.GBK, "gbk"}, + "csiso58gb231280": {simplifiedchinese.GBK, "gbk"}, + "gb2312": {simplifiedchinese.GBK, "gbk"}, + "gb_2312": {simplifiedchinese.GBK, "gbk"}, + "gb_2312-80": {simplifiedchinese.GBK, "gbk"}, + "gbk": {simplifiedchinese.GBK, "gbk"}, + "iso-ir-58": {simplifiedchinese.GBK, "gbk"}, + "x-gbk": {simplifiedchinese.GBK, "gbk"}, + "gb18030": {simplifiedchinese.GB18030, "gb18030"}, + "hz-gb-2312": {simplifiedchinese.HZGB2312, "hz-gb-2312"}, + "big5": {traditionalchinese.Big5, "big5"}, + "big5-hkscs": {traditionalchinese.Big5, "big5"}, + "cn-big5": {traditionalchinese.Big5, "big5"}, + "csbig5": {traditionalchinese.Big5, "big5"}, + "x-x-big5": {traditionalchinese.Big5, "big5"}, + "cseucpkdfmtjapanese": {japanese.EUCJP, "euc-jp"}, + "euc-jp": {japanese.EUCJP, "euc-jp"}, + "x-euc-jp": {japanese.EUCJP, "euc-jp"}, + "csiso2022jp": {japanese.ISO2022JP, "iso-2022-jp"}, + "iso-2022-jp": {japanese.ISO2022JP, "iso-2022-jp"}, + "csshiftjis": {japanese.ShiftJIS, "shift_jis"}, + "ms_kanji": {japanese.ShiftJIS, "shift_jis"}, + "shift-jis": {japanese.ShiftJIS, "shift_jis"}, + "shift_jis": {japanese.ShiftJIS, "shift_jis"}, + "sjis": {japanese.ShiftJIS, "shift_jis"}, + "windows-31j": {japanese.ShiftJIS, "shift_jis"}, + "x-sjis": {japanese.ShiftJIS, "shift_jis"}, + "cseuckr": {korean.EUCKR, "euc-kr"}, + "csksc56011987": {korean.EUCKR, "euc-kr"}, + "euc-kr": {korean.EUCKR, "euc-kr"}, + "iso-ir-149": {korean.EUCKR, "euc-kr"}, + "korean": {korean.EUCKR, "euc-kr"}, + "ks_c_5601-1987": {korean.EUCKR, "euc-kr"}, + "ks_c_5601-1989": {korean.EUCKR, "euc-kr"}, + "ksc5601": {korean.EUCKR, "euc-kr"}, + "ksc_5601": {korean.EUCKR, "euc-kr"}, + "windows-949": {korean.EUCKR, "euc-kr"}, + "csiso2022kr": {encoding.Replacement, "replacement"}, + "iso-2022-kr": {encoding.Replacement, "replacement"}, + "iso-2022-cn": {encoding.Replacement, "replacement"}, + "iso-2022-cn-ext": {encoding.Replacement, "replacement"}, + "utf-16be": {unicode.UTF16(unicode.BigEndian, unicode.IgnoreBOM), "utf-16be"}, + "utf-16": {unicode.UTF16(unicode.LittleEndian, unicode.IgnoreBOM), "utf-16le"}, + "utf-16le": {unicode.UTF16(unicode.LittleEndian, unicode.IgnoreBOM), "utf-16le"}, + "x-user-defined": {charmap.XUserDefined, "x-user-defined"}, +} diff --git a/vendor/golang.org/x/net/html/charset/testdata/HTTP-charset.html b/vendor/golang.org/x/net/html/charset/testdata/HTTP-charset.html new file mode 100644 index 0000000..9915fa0 --- /dev/null +++ b/vendor/golang.org/x/net/html/charset/testdata/HTTP-charset.html @@ -0,0 +1,48 @@ + + + + HTTP charset + + + + + + + + + + + +

HTTP charset

+ + +
+ + +
 
+ + + + + +
+

The character encoding of a page can be set using the HTTP header charset declaration.

+

The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ÜÀÚ. This matches the sequence of bytes above when they are interpreted as ISO 8859-15. If the class name matches the selector then the test will pass.

The only character encoding declaration for this HTML file is in the HTTP header, which sets the encoding to ISO 8859-15.

+
+
+
HTML5
+

the-input-byte-stream-001
Result summary & related tests
Detailed results for this test
Link to spec

+
Assumptions:
  • The default encoding for the browser you are testing is not set to ISO 8859-15.
  • +
  • The test is read from a server that supports HTTP.
+
+ + + + + + diff --git a/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-UTF-8-BOM.html b/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-UTF-8-BOM.html new file mode 100644 index 0000000..26e5d8b --- /dev/null +++ b/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-UTF-8-BOM.html @@ -0,0 +1,48 @@ + + + + HTTP vs UTF-8 BOM + + + + + + + + + + + +

HTTP vs UTF-8 BOM

+ + +
+ + +
 
+ + + + + +
+

A character encoding set in the HTTP header has lower precedence than the UTF-8 signature.

+

The HTTP header attempts to set the character encoding to ISO 8859-15. The page starts with a UTF-8 signature.

The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ýäè. This matches the sequence of bytes above when they are interpreted as UTF-8. If the class name matches the selector then the test will pass.

If the test is unsuccessful, the characters  should appear at the top of the page. These represent the bytes that make up the UTF-8 signature when encountered in the ISO 8859-15 encoding.

+
+
+
HTML5
+

the-input-byte-stream-034
Result summary & related tests
Detailed results for this test
Link to spec

+
Assumptions:
  • The default encoding for the browser you are testing is not set to ISO 8859-15.
  • +
  • The test is read from a server that supports HTTP.
+
+ + + + + + diff --git a/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-charset.html b/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-charset.html new file mode 100644 index 0000000..2f07e95 --- /dev/null +++ b/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-charset.html @@ -0,0 +1,49 @@ + + + + HTTP vs meta charset + + + + + + + + + + + +

HTTP vs meta charset

+ + +
+ + +
 
+ + + + + +
+

The HTTP header has a higher precedence than an encoding declaration in a meta charset attribute.

+

The HTTP header attempts to set the character encoding to ISO 8859-15. The page contains an encoding declaration in a meta charset attribute that attempts to set the character encoding to ISO 8859-1.

The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ÜÀÚ. This matches the sequence of bytes above when they are interpreted as ISO 8859-15. If the class name matches the selector then the test will pass.

+
+
+
HTML5
+

the-input-byte-stream-018
Result summary & related tests
Detailed results for this test
Link to spec

+
Assumptions:
  • The default encoding for the browser you are testing is not set to ISO 8859-15.
  • +
  • The test is read from a server that supports HTTP.
+
+ + + + + + diff --git a/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-content.html b/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-content.html new file mode 100644 index 0000000..6853cdd --- /dev/null +++ b/vendor/golang.org/x/net/html/charset/testdata/HTTP-vs-meta-content.html @@ -0,0 +1,49 @@ + + + + HTTP vs meta content + + + + + + + + + + + +

HTTP vs meta content

+ + +
+ + +
 
+ + + + + +
+

The HTTP header has a higher precedence than an encoding declaration in a meta content attribute.

+

The HTTP header attempts to set the character encoding to ISO 8859-15. The page contains an encoding declaration in a meta content attribute that attempts to set the character encoding to ISO 8859-1.

The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ÜÀÚ. This matches the sequence of bytes above when they are interpreted as ISO 8859-15. If the class name matches the selector then the test will pass.

+
+
+
HTML5
+

the-input-byte-stream-016
Result summary & related tests
Detailed results for this test
Link to spec

+
Assumptions:
  • The default encoding for the browser you are testing is not set to ISO 8859-15.
  • +
  • The test is read from a server that supports HTTP.
+
+ + + + + + diff --git a/vendor/golang.org/x/net/html/charset/testdata/No-encoding-declaration.html b/vendor/golang.org/x/net/html/charset/testdata/No-encoding-declaration.html new file mode 100644 index 0000000..612e26c --- /dev/null +++ b/vendor/golang.org/x/net/html/charset/testdata/No-encoding-declaration.html @@ -0,0 +1,47 @@ + + + + No encoding declaration + + + + + + + + + + + +

No encoding declaration

+ + +
+ + +
 
+ + + + + +
+

A page with no encoding information in HTTP, BOM, XML declaration or meta element will be treated as UTF-8.

+

The test on this page contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ýäè. This matches the sequence of bytes above when they are interpreted as UTF-8. If the class name matches the selector then the test will pass.

+
+
+
HTML5
+

the-input-byte-stream-015
Result summary & related tests
Detailed results for this test
Link to spec

+
Assumptions:
  • The test is read from a server that supports HTTP.
+
+ + + + + + diff --git a/vendor/golang.org/x/net/html/charset/testdata/README b/vendor/golang.org/x/net/html/charset/testdata/README new file mode 100644 index 0000000..38ef0f9 --- /dev/null +++ b/vendor/golang.org/x/net/html/charset/testdata/README @@ -0,0 +1,9 @@ +These test cases come from +http://www.w3.org/International/tests/repository/html5/the-input-byte-stream/results-basics + +Distributed under both the W3C Test Suite License +(http://www.w3.org/Consortium/Legal/2008/04-testsuite-license) +and the W3C 3-clause BSD License +(http://www.w3.org/Consortium/Legal/2008/03-bsd-license). +To contribute to a W3C Test Suite, see the policies and contribution +forms (http://www.w3.org/2004/10/27-testcases). diff --git a/vendor/golang.org/x/net/html/charset/testdata/UTF-16BE-BOM.html b/vendor/golang.org/x/net/html/charset/testdata/UTF-16BE-BOM.html new file mode 100644 index 0000000000000000000000000000000000000000..3abf7a9343c20518e57dfea58b374fb0f4fb58a1 GIT binary patch literal 2670 zcmcJR?QRoS5Qc}JAoU&=BQ-(7b^;2j8i*i3RV1JlO@;VXIsPurV!WHiDdLW}i`*CO z^UnC>tih=KsVr;H&Y7?C&O3AV(?534uG?e##U9y_y|!QNi4``n+D>d{2lky^LnFNx z?9HrarH$>rwQR_$g)Hk0*&STI*EYq|47~&U9sfUB+ji})9eR{QqCUra7oDsZ5obtB zdxP%<)-$4Q;rSHJiM>U(#ZI=;?n^BC?Dp6lu=~_1-lnX3u03&2BlmQIY>L+!Uq7XoytKw^Q#oZSM?3*J?)&ojG&yzQRkC!Ml5JE?ax;lp_NYEcdUht`ZswOviB~L5hmJ|pXI71nn20w;>vG! zQGB$EE9&wC``&J#_Ym~PgRu-Bd>1!pOp0||k`kr=VJ zfH6I6rmRaeHA7U-A^OTsT+|d2a^i(>DePzZ{)ibXoCBvJnuYrd-3kkN$uy{qQK;=*Y;S87ro12aTgu^i*%f8zC3>a}9DIe4cfxOzsCw&(cqvP9{ud{N6f` z#TNDY(B6@Gpr|uN+%&x^XZjBHdc@2vsM(Tyc2=vshHQ5w+obmp>tuWT(t4BTUGAQw zxeI$UGSLUBg=WFbF;4f@4=^P2AgY@CFn8A`bcC=_&~)fiDe)#cUARRBzJ^k|%X)69 z+{Cb`wq}Rsg%B62CC_tK!AV(W{(MV?#mndR46CU#BUN<{8e?*oT+!pE5wF#O#TR#a z$9qRT)tpbw8zAI~QQJg2C3|6$I%(T(;`zOMy6SO+&;pG=c#2P|P-WZn$$DpWJlC3U z3*nvmz zwP{u~r$L?-m3uqp9I1+#3yE|3M$(s-BEtih=LQ>`qYoiktOop(wi%!;yh%+Rm z{e|xntY<{q!1F1Z6MKtngPm-p-4|H&+3m4AVE3_AyiHm6Tzlf4M(*ht*%YrezJ6kr zHGj45pc?64*$Cm%-zseWMA`x;)v*~jA=i}szqts9xmQkS`M11|(H7bTXAycsXU53+ zJ?120SRZeyiFjW7enPN`bxk$IaWV3o48oJF7D&2ysoY;6(s6%6vVfaYd&mC=erK!) zNGI^7upQgN)53OHe_VE<@J+G8*Y|p*)zB2Thdi}+YR<5QWHm!|a_*AoZXuv7)$xe| zm3Q$D7{|#}{m4X&UY!6(ZhyYi2(5JLzGE$H)W6BQklnjPMwn<Yvv7Z*TVWwD*=E3QpH37* z#lqXJA0A~J9T_<^W5smspmDg2p6ac5Bjn+~LAoow%1TCdZ*$K8`O zw_$HaCi+0N&@7la#_7KL5r$+QL{)Pi=I&aDjt~|Knht#`CEi4*3%97i_fSfASlwUz0=3V0GCxY}z81UC-nP=CGt2OqYV$ zoRCo+qM9YX*3FFORLC=E3B~S@+KROyk4r5 yX7?DaslDfIebqXgC!KKp4IYy+W~X?ddE6o=`A+x#x0AK&6MF#W&AXxbRrv+SX}PNa literal 0 HcmV?d00001 diff --git a/vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-charset.html b/vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-charset.html new file mode 100644 index 0000000..83de433 --- /dev/null +++ b/vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-charset.html @@ -0,0 +1,49 @@ + + + + UTF-8 BOM vs meta charset + + + + + + + + + + + +

UTF-8 BOM vs meta charset

+ + +
+ + +
 
+ + + + + +
+

A page with a UTF-8 BOM will be recognized as UTF-8 even if the meta charset attribute declares a different encoding.

+

The page contains an encoding declaration in a meta charset attribute that attempts to set the character encoding to ISO 8859-15, but the file starts with a UTF-8 signature.

The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ýäè. This matches the sequence of bytes above when they are interpreted as UTF-8. If the class name matches the selector then the test will pass.

+
+
+
HTML5
+

the-input-byte-stream-038
Result summary & related tests
Detailed results for this test
Link to spec

+
Assumptions:
  • The default encoding for the browser you are testing is not set to ISO 8859-15.
  • +
  • The test is read from a server that supports HTTP.
+
+ + + + + + diff --git a/vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-content.html b/vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-content.html new file mode 100644 index 0000000..501aac2 --- /dev/null +++ b/vendor/golang.org/x/net/html/charset/testdata/UTF-8-BOM-vs-meta-content.html @@ -0,0 +1,48 @@ + + + + UTF-8 BOM vs meta content + + + + + + + + + + + +

UTF-8 BOM vs meta content

+ + +
+ + +
 
+ + + + + +
+

A page with a UTF-8 BOM will be recognized as UTF-8 even if the meta content attribute declares a different encoding.

+

The page contains an encoding declaration in a meta content attribute that attempts to set the character encoding to ISO 8859-15, but the file starts with a UTF-8 signature.

The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ýäè. This matches the sequence of bytes above when they are interpreted as UTF-8. If the class name matches the selector then the test will pass.

+
+
+
HTML5
+

the-input-byte-stream-037
Result summary & related tests
Detailed results for this test
Link to spec

+
Assumptions:
  • The default encoding for the browser you are testing is not set to ISO 8859-15.
  • +
  • The test is read from a server that supports HTTP.
+
+ + + + + + diff --git a/vendor/golang.org/x/net/html/charset/testdata/meta-charset-attribute.html b/vendor/golang.org/x/net/html/charset/testdata/meta-charset-attribute.html new file mode 100644 index 0000000..2d7d25a --- /dev/null +++ b/vendor/golang.org/x/net/html/charset/testdata/meta-charset-attribute.html @@ -0,0 +1,48 @@ + + + + meta charset attribute + + + + + + + + + + + +

meta charset attribute

+ + +
+ + +
 
+ + + + + +
+

The character encoding of the page can be set by a meta element with charset attribute.

+

The only character encoding declaration for this HTML file is in the charset attribute of the meta element, which declares the encoding to be ISO 8859-15.

The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ÜÀÚ. This matches the sequence of bytes above when they are interpreted as ISO 8859-15. If the class name matches the selector then the test will pass.

+
+
+
HTML5
+

the-input-byte-stream-009
Result summary & related tests
Detailed results for this test
Link to spec

+
Assumptions:
  • The default encoding for the browser you are testing is not set to ISO 8859-15.
  • +
  • The test is read from a server that supports HTTP.
+
+ + + + + + diff --git a/vendor/golang.org/x/net/html/charset/testdata/meta-content-attribute.html b/vendor/golang.org/x/net/html/charset/testdata/meta-content-attribute.html new file mode 100644 index 0000000..1c3f228 --- /dev/null +++ b/vendor/golang.org/x/net/html/charset/testdata/meta-content-attribute.html @@ -0,0 +1,48 @@ + + + + meta content attribute + + + + + + + + + + + +

meta content attribute

+ + +
+ + +
 
+ + + + + +
+

The character encoding of the page can be set by a meta element with http-equiv and content attributes.

+

The only character encoding declaration for this HTML file is in the content attribute of the meta element, which declares the encoding to be ISO 8859-15.

The test contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ÜÀÚ. This matches the sequence of bytes above when they are interpreted as ISO 8859-15. If the class name matches the selector then the test will pass.

+
+
+
HTML5
+

the-input-byte-stream-007
Result summary & related tests
Detailed results for this test
Link to spec

+
Assumptions:
  • The default encoding for the browser you are testing is not set to ISO 8859-15.
  • +
  • The test is read from a server that supports HTTP.
+
+ + + + + + diff --git a/vendor/golang.org/x/net/html/const.go b/vendor/golang.org/x/net/html/const.go new file mode 100644 index 0000000..52f651f --- /dev/null +++ b/vendor/golang.org/x/net/html/const.go @@ -0,0 +1,102 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package html + +// Section 12.2.3.2 of the HTML5 specification says "The following elements +// have varying levels of special parsing rules". +// https://html.spec.whatwg.org/multipage/syntax.html#the-stack-of-open-elements +var isSpecialElementMap = map[string]bool{ + "address": true, + "applet": true, + "area": true, + "article": true, + "aside": true, + "base": true, + "basefont": true, + "bgsound": true, + "blockquote": true, + "body": true, + "br": true, + "button": true, + "caption": true, + "center": true, + "col": true, + "colgroup": true, + "dd": true, + "details": true, + "dir": true, + "div": true, + "dl": true, + "dt": true, + "embed": true, + "fieldset": true, + "figcaption": true, + "figure": true, + "footer": true, + "form": true, + "frame": true, + "frameset": true, + "h1": true, + "h2": true, + "h3": true, + "h4": true, + "h5": true, + "h6": true, + "head": true, + "header": true, + "hgroup": true, + "hr": true, + "html": true, + "iframe": true, + "img": true, + "input": true, + "isindex": true, + "li": true, + "link": true, + "listing": true, + "marquee": true, + "menu": true, + "meta": true, + "nav": true, + "noembed": true, + "noframes": true, + "noscript": true, + "object": true, + "ol": true, + "p": true, + "param": true, + "plaintext": true, + "pre": true, + "script": true, + "section": true, + "select": true, + "source": true, + "style": true, + "summary": true, + "table": true, + "tbody": true, + "td": true, + "template": true, + "textarea": true, + "tfoot": true, + "th": true, + "thead": true, + "title": true, + "tr": true, + "track": true, + "ul": true, + "wbr": true, + "xmp": true, +} + +func isSpecialElement(element *Node) bool { + switch element.Namespace { + case "", "html": + return isSpecialElementMap[element.Data] + case "svg": + return element.Data == "foreignObject" + } + return false +} diff --git a/vendor/golang.org/x/net/html/doc.go b/vendor/golang.org/x/net/html/doc.go new file mode 100644 index 0000000..94f4968 --- /dev/null +++ b/vendor/golang.org/x/net/html/doc.go @@ -0,0 +1,106 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/* +Package html implements an HTML5-compliant tokenizer and parser. + +Tokenization is done by creating a Tokenizer for an io.Reader r. It is the +caller's responsibility to ensure that r provides UTF-8 encoded HTML. + + z := html.NewTokenizer(r) + +Given a Tokenizer z, the HTML is tokenized by repeatedly calling z.Next(), +which parses the next token and returns its type, or an error: + + for { + tt := z.Next() + if tt == html.ErrorToken { + // ... + return ... + } + // Process the current token. + } + +There are two APIs for retrieving the current token. The high-level API is to +call Token; the low-level API is to call Text or TagName / TagAttr. Both APIs +allow optionally calling Raw after Next but before Token, Text, TagName, or +TagAttr. In EBNF notation, the valid call sequence per token is: + + Next {Raw} [ Token | Text | TagName {TagAttr} ] + +Token returns an independent data structure that completely describes a token. +Entities (such as "<") are unescaped, tag names and attribute keys are +lower-cased, and attributes are collected into a []Attribute. For example: + + for { + if z.Next() == html.ErrorToken { + // Returning io.EOF indicates success. + return z.Err() + } + emitToken(z.Token()) + } + +The low-level API performs fewer allocations and copies, but the contents of +the []byte values returned by Text, TagName and TagAttr may change on the next +call to Next. For example, to extract an HTML page's anchor text: + + depth := 0 + for { + tt := z.Next() + switch tt { + case ErrorToken: + return z.Err() + case TextToken: + if depth > 0 { + // emitBytes should copy the []byte it receives, + // if it doesn't process it immediately. + emitBytes(z.Text()) + } + case StartTagToken, EndTagToken: + tn, _ := z.TagName() + if len(tn) == 1 && tn[0] == 'a' { + if tt == StartTagToken { + depth++ + } else { + depth-- + } + } + } + } + +Parsing is done by calling Parse with an io.Reader, which returns the root of +the parse tree (the document element) as a *Node. It is the caller's +responsibility to ensure that the Reader provides UTF-8 encoded HTML. For +example, to process each anchor node in depth-first order: + + doc, err := html.Parse(r) + if err != nil { + // ... + } + var f func(*html.Node) + f = func(n *html.Node) { + if n.Type == html.ElementNode && n.Data == "a" { + // Do something with n... + } + for c := n.FirstChild; c != nil; c = c.NextSibling { + f(c) + } + } + f(doc) + +The relevant specifications include: +https://html.spec.whatwg.org/multipage/syntax.html and +https://html.spec.whatwg.org/multipage/syntax.html#tokenization +*/ +package html // import "golang.org/x/net/html" + +// The tokenization algorithm implemented by this package is not a line-by-line +// transliteration of the relatively verbose state-machine in the WHATWG +// specification. A more direct approach is used instead, where the program +// counter implies the state, such as whether it is tokenizing a tag or a text +// node. Specification compliance is verified by checking expected and actual +// outputs over a test suite rather than aiming for algorithmic fidelity. + +// TODO(nigeltao): Does a DOM API belong in this package or a separate one? +// TODO(nigeltao): How does parsing interact with a JavaScript engine? diff --git a/vendor/golang.org/x/net/html/doctype.go b/vendor/golang.org/x/net/html/doctype.go new file mode 100644 index 0000000..c484e5a --- /dev/null +++ b/vendor/golang.org/x/net/html/doctype.go @@ -0,0 +1,156 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package html + +import ( + "strings" +) + +// parseDoctype parses the data from a DoctypeToken into a name, +// public identifier, and system identifier. It returns a Node whose Type +// is DoctypeNode, whose Data is the name, and which has attributes +// named "system" and "public" for the two identifiers if they were present. +// quirks is whether the document should be parsed in "quirks mode". +func parseDoctype(s string) (n *Node, quirks bool) { + n = &Node{Type: DoctypeNode} + + // Find the name. + space := strings.IndexAny(s, whitespace) + if space == -1 { + space = len(s) + } + n.Data = s[:space] + // The comparison to "html" is case-sensitive. + if n.Data != "html" { + quirks = true + } + n.Data = strings.ToLower(n.Data) + s = strings.TrimLeft(s[space:], whitespace) + + if len(s) < 6 { + // It can't start with "PUBLIC" or "SYSTEM". + // Ignore the rest of the string. + return n, quirks || s != "" + } + + key := strings.ToLower(s[:6]) + s = s[6:] + for key == "public" || key == "system" { + s = strings.TrimLeft(s, whitespace) + if s == "" { + break + } + quote := s[0] + if quote != '"' && quote != '\'' { + break + } + s = s[1:] + q := strings.IndexRune(s, rune(quote)) + var id string + if q == -1 { + id = s + s = "" + } else { + id = s[:q] + s = s[q+1:] + } + n.Attr = append(n.Attr, Attribute{Key: key, Val: id}) + if key == "public" { + key = "system" + } else { + key = "" + } + } + + if key != "" || s != "" { + quirks = true + } else if len(n.Attr) > 0 { + if n.Attr[0].Key == "public" { + public := strings.ToLower(n.Attr[0].Val) + switch public { + case "-//w3o//dtd w3 html strict 3.0//en//", "-/w3d/dtd html 4.0 transitional/en", "html": + quirks = true + default: + for _, q := range quirkyIDs { + if strings.HasPrefix(public, q) { + quirks = true + break + } + } + } + // The following two public IDs only cause quirks mode if there is no system ID. + if len(n.Attr) == 1 && (strings.HasPrefix(public, "-//w3c//dtd html 4.01 frameset//") || + strings.HasPrefix(public, "-//w3c//dtd html 4.01 transitional//")) { + quirks = true + } + } + if lastAttr := n.Attr[len(n.Attr)-1]; lastAttr.Key == "system" && + strings.ToLower(lastAttr.Val) == "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd" { + quirks = true + } + } + + return n, quirks +} + +// quirkyIDs is a list of public doctype identifiers that cause a document +// to be interpreted in quirks mode. The identifiers should be in lower case. +var quirkyIDs = []string{ + "+//silmaril//dtd html pro v0r11 19970101//", + "-//advasoft ltd//dtd html 3.0 aswedit + extensions//", + "-//as//dtd html 3.0 aswedit + extensions//", + "-//ietf//dtd html 2.0 level 1//", + "-//ietf//dtd html 2.0 level 2//", + "-//ietf//dtd html 2.0 strict level 1//", + "-//ietf//dtd html 2.0 strict level 2//", + "-//ietf//dtd html 2.0 strict//", + "-//ietf//dtd html 2.0//", + "-//ietf//dtd html 2.1e//", + "-//ietf//dtd html 3.0//", + "-//ietf//dtd html 3.2 final//", + "-//ietf//dtd html 3.2//", + "-//ietf//dtd html 3//", + "-//ietf//dtd html level 0//", + "-//ietf//dtd html level 1//", + "-//ietf//dtd html level 2//", + "-//ietf//dtd html level 3//", + "-//ietf//dtd html strict level 0//", + "-//ietf//dtd html strict level 1//", + "-//ietf//dtd html strict level 2//", + "-//ietf//dtd html strict level 3//", + "-//ietf//dtd html strict//", + "-//ietf//dtd html//", + "-//metrius//dtd metrius presentational//", + "-//microsoft//dtd internet explorer 2.0 html strict//", + "-//microsoft//dtd internet explorer 2.0 html//", + "-//microsoft//dtd internet explorer 2.0 tables//", + "-//microsoft//dtd internet explorer 3.0 html strict//", + "-//microsoft//dtd internet explorer 3.0 html//", + "-//microsoft//dtd internet explorer 3.0 tables//", + "-//netscape comm. corp.//dtd html//", + "-//netscape comm. corp.//dtd strict html//", + "-//o'reilly and associates//dtd html 2.0//", + "-//o'reilly and associates//dtd html extended 1.0//", + "-//o'reilly and associates//dtd html extended relaxed 1.0//", + "-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//", + "-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//", + "-//spyglass//dtd html 2.0 extended//", + "-//sq//dtd html 2.0 hotmetal + extensions//", + "-//sun microsystems corp.//dtd hotjava html//", + "-//sun microsystems corp.//dtd hotjava strict html//", + "-//w3c//dtd html 3 1995-03-24//", + "-//w3c//dtd html 3.2 draft//", + "-//w3c//dtd html 3.2 final//", + "-//w3c//dtd html 3.2//", + "-//w3c//dtd html 3.2s draft//", + "-//w3c//dtd html 4.0 frameset//", + "-//w3c//dtd html 4.0 transitional//", + "-//w3c//dtd html experimental 19960712//", + "-//w3c//dtd html experimental 970421//", + "-//w3c//dtd w3 html//", + "-//w3o//dtd w3 html 3.0//", + "-//webtechs//dtd mozilla html 2.0//", + "-//webtechs//dtd mozilla html//", +} diff --git a/vendor/golang.org/x/net/html/entity.go b/vendor/golang.org/x/net/html/entity.go new file mode 100644 index 0000000..a50c04c --- /dev/null +++ b/vendor/golang.org/x/net/html/entity.go @@ -0,0 +1,2253 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package html + +// All entities that do not end with ';' are 6 or fewer bytes long. +const longestEntityWithoutSemicolon = 6 + +// entity is a map from HTML entity names to their values. The semicolon matters: +// https://html.spec.whatwg.org/multipage/syntax.html#named-character-references +// lists both "amp" and "amp;" as two separate entries. +// +// Note that the HTML5 list is larger than the HTML4 list at +// http://www.w3.org/TR/html4/sgml/entities.html +var entity = map[string]rune{ + "AElig;": '\U000000C6', + "AMP;": '\U00000026', + "Aacute;": '\U000000C1', + "Abreve;": '\U00000102', + "Acirc;": '\U000000C2', + "Acy;": '\U00000410', + "Afr;": '\U0001D504', + "Agrave;": '\U000000C0', + "Alpha;": '\U00000391', + "Amacr;": '\U00000100', + "And;": '\U00002A53', + "Aogon;": '\U00000104', + "Aopf;": '\U0001D538', + "ApplyFunction;": '\U00002061', + "Aring;": '\U000000C5', + "Ascr;": '\U0001D49C', + "Assign;": '\U00002254', + "Atilde;": '\U000000C3', + "Auml;": '\U000000C4', + "Backslash;": '\U00002216', + "Barv;": '\U00002AE7', + "Barwed;": '\U00002306', + "Bcy;": '\U00000411', + "Because;": '\U00002235', + "Bernoullis;": '\U0000212C', + "Beta;": '\U00000392', + "Bfr;": '\U0001D505', + "Bopf;": '\U0001D539', + "Breve;": '\U000002D8', + "Bscr;": '\U0000212C', + "Bumpeq;": '\U0000224E', + "CHcy;": '\U00000427', + "COPY;": '\U000000A9', + "Cacute;": '\U00000106', + "Cap;": '\U000022D2', + "CapitalDifferentialD;": '\U00002145', + "Cayleys;": '\U0000212D', + "Ccaron;": '\U0000010C', + "Ccedil;": '\U000000C7', + "Ccirc;": '\U00000108', + "Cconint;": '\U00002230', + "Cdot;": '\U0000010A', + "Cedilla;": '\U000000B8', + "CenterDot;": '\U000000B7', + "Cfr;": '\U0000212D', + "Chi;": '\U000003A7', + "CircleDot;": '\U00002299', + "CircleMinus;": '\U00002296', + "CirclePlus;": '\U00002295', + "CircleTimes;": '\U00002297', + "ClockwiseContourIntegral;": '\U00002232', + "CloseCurlyDoubleQuote;": '\U0000201D', + "CloseCurlyQuote;": '\U00002019', + "Colon;": '\U00002237', + "Colone;": '\U00002A74', + "Congruent;": '\U00002261', + "Conint;": '\U0000222F', + "ContourIntegral;": '\U0000222E', + "Copf;": '\U00002102', + "Coproduct;": '\U00002210', + "CounterClockwiseContourIntegral;": '\U00002233', + "Cross;": '\U00002A2F', + "Cscr;": '\U0001D49E', + "Cup;": '\U000022D3', + "CupCap;": '\U0000224D', + "DD;": '\U00002145', + "DDotrahd;": '\U00002911', + "DJcy;": '\U00000402', + "DScy;": '\U00000405', + "DZcy;": '\U0000040F', + "Dagger;": '\U00002021', + "Darr;": '\U000021A1', + "Dashv;": '\U00002AE4', + "Dcaron;": '\U0000010E', + "Dcy;": '\U00000414', + "Del;": '\U00002207', + "Delta;": '\U00000394', + "Dfr;": '\U0001D507', + "DiacriticalAcute;": '\U000000B4', + "DiacriticalDot;": '\U000002D9', + "DiacriticalDoubleAcute;": '\U000002DD', + "DiacriticalGrave;": '\U00000060', + "DiacriticalTilde;": '\U000002DC', + "Diamond;": '\U000022C4', + "DifferentialD;": '\U00002146', + "Dopf;": '\U0001D53B', + "Dot;": '\U000000A8', + "DotDot;": '\U000020DC', + "DotEqual;": '\U00002250', + "DoubleContourIntegral;": '\U0000222F', + "DoubleDot;": '\U000000A8', + "DoubleDownArrow;": '\U000021D3', + "DoubleLeftArrow;": '\U000021D0', + "DoubleLeftRightArrow;": '\U000021D4', + "DoubleLeftTee;": '\U00002AE4', + "DoubleLongLeftArrow;": '\U000027F8', + "DoubleLongLeftRightArrow;": '\U000027FA', + "DoubleLongRightArrow;": '\U000027F9', + "DoubleRightArrow;": '\U000021D2', + "DoubleRightTee;": '\U000022A8', + "DoubleUpArrow;": '\U000021D1', + "DoubleUpDownArrow;": '\U000021D5', + "DoubleVerticalBar;": '\U00002225', + "DownArrow;": '\U00002193', + "DownArrowBar;": '\U00002913', + "DownArrowUpArrow;": '\U000021F5', + "DownBreve;": '\U00000311', + "DownLeftRightVector;": '\U00002950', + "DownLeftTeeVector;": '\U0000295E', + "DownLeftVector;": '\U000021BD', + "DownLeftVectorBar;": '\U00002956', + "DownRightTeeVector;": '\U0000295F', + "DownRightVector;": '\U000021C1', + "DownRightVectorBar;": '\U00002957', + "DownTee;": '\U000022A4', + "DownTeeArrow;": '\U000021A7', + "Downarrow;": '\U000021D3', + "Dscr;": '\U0001D49F', + "Dstrok;": '\U00000110', + "ENG;": '\U0000014A', + "ETH;": '\U000000D0', + "Eacute;": '\U000000C9', + "Ecaron;": '\U0000011A', + "Ecirc;": '\U000000CA', + "Ecy;": '\U0000042D', + "Edot;": '\U00000116', + "Efr;": '\U0001D508', + "Egrave;": '\U000000C8', + "Element;": '\U00002208', + "Emacr;": '\U00000112', + "EmptySmallSquare;": '\U000025FB', + "EmptyVerySmallSquare;": '\U000025AB', + "Eogon;": '\U00000118', + "Eopf;": '\U0001D53C', + "Epsilon;": '\U00000395', + "Equal;": '\U00002A75', + "EqualTilde;": '\U00002242', + "Equilibrium;": '\U000021CC', + "Escr;": '\U00002130', + "Esim;": '\U00002A73', + "Eta;": '\U00000397', + "Euml;": '\U000000CB', + "Exists;": '\U00002203', + "ExponentialE;": '\U00002147', + "Fcy;": '\U00000424', + "Ffr;": '\U0001D509', + "FilledSmallSquare;": '\U000025FC', + "FilledVerySmallSquare;": '\U000025AA', + "Fopf;": '\U0001D53D', + "ForAll;": '\U00002200', + "Fouriertrf;": '\U00002131', + "Fscr;": '\U00002131', + "GJcy;": '\U00000403', + "GT;": '\U0000003E', + "Gamma;": '\U00000393', + "Gammad;": '\U000003DC', + "Gbreve;": '\U0000011E', + "Gcedil;": '\U00000122', + "Gcirc;": '\U0000011C', + "Gcy;": '\U00000413', + "Gdot;": '\U00000120', + "Gfr;": '\U0001D50A', + "Gg;": '\U000022D9', + "Gopf;": '\U0001D53E', + "GreaterEqual;": '\U00002265', + "GreaterEqualLess;": '\U000022DB', + "GreaterFullEqual;": '\U00002267', + "GreaterGreater;": '\U00002AA2', + "GreaterLess;": '\U00002277', + "GreaterSlantEqual;": '\U00002A7E', + "GreaterTilde;": '\U00002273', + "Gscr;": '\U0001D4A2', + "Gt;": '\U0000226B', + "HARDcy;": '\U0000042A', + "Hacek;": '\U000002C7', + "Hat;": '\U0000005E', + "Hcirc;": '\U00000124', + "Hfr;": '\U0000210C', + "HilbertSpace;": '\U0000210B', + "Hopf;": '\U0000210D', + "HorizontalLine;": '\U00002500', + "Hscr;": '\U0000210B', + "Hstrok;": '\U00000126', + "HumpDownHump;": '\U0000224E', + "HumpEqual;": '\U0000224F', + "IEcy;": '\U00000415', + "IJlig;": '\U00000132', + "IOcy;": '\U00000401', + "Iacute;": '\U000000CD', + "Icirc;": '\U000000CE', + "Icy;": '\U00000418', + "Idot;": '\U00000130', + "Ifr;": '\U00002111', + "Igrave;": '\U000000CC', + "Im;": '\U00002111', + "Imacr;": '\U0000012A', + "ImaginaryI;": '\U00002148', + "Implies;": '\U000021D2', + "Int;": '\U0000222C', + "Integral;": '\U0000222B', + "Intersection;": '\U000022C2', + "InvisibleComma;": '\U00002063', + "InvisibleTimes;": '\U00002062', + "Iogon;": '\U0000012E', + "Iopf;": '\U0001D540', + "Iota;": '\U00000399', + "Iscr;": '\U00002110', + "Itilde;": '\U00000128', + "Iukcy;": '\U00000406', + "Iuml;": '\U000000CF', + "Jcirc;": '\U00000134', + "Jcy;": '\U00000419', + "Jfr;": '\U0001D50D', + "Jopf;": '\U0001D541', + "Jscr;": '\U0001D4A5', + "Jsercy;": '\U00000408', + "Jukcy;": '\U00000404', + "KHcy;": '\U00000425', + "KJcy;": '\U0000040C', + "Kappa;": '\U0000039A', + "Kcedil;": '\U00000136', + "Kcy;": '\U0000041A', + "Kfr;": '\U0001D50E', + "Kopf;": '\U0001D542', + "Kscr;": '\U0001D4A6', + "LJcy;": '\U00000409', + "LT;": '\U0000003C', + "Lacute;": '\U00000139', + "Lambda;": '\U0000039B', + "Lang;": '\U000027EA', + "Laplacetrf;": '\U00002112', + "Larr;": '\U0000219E', + "Lcaron;": '\U0000013D', + "Lcedil;": '\U0000013B', + "Lcy;": '\U0000041B', + "LeftAngleBracket;": '\U000027E8', + "LeftArrow;": '\U00002190', + "LeftArrowBar;": '\U000021E4', + "LeftArrowRightArrow;": '\U000021C6', + "LeftCeiling;": '\U00002308', + "LeftDoubleBracket;": '\U000027E6', + "LeftDownTeeVector;": '\U00002961', + "LeftDownVector;": '\U000021C3', + "LeftDownVectorBar;": '\U00002959', + "LeftFloor;": '\U0000230A', + "LeftRightArrow;": '\U00002194', + "LeftRightVector;": '\U0000294E', + "LeftTee;": '\U000022A3', + "LeftTeeArrow;": '\U000021A4', + "LeftTeeVector;": '\U0000295A', + "LeftTriangle;": '\U000022B2', + "LeftTriangleBar;": '\U000029CF', + "LeftTriangleEqual;": '\U000022B4', + "LeftUpDownVector;": '\U00002951', + "LeftUpTeeVector;": '\U00002960', + "LeftUpVector;": '\U000021BF', + "LeftUpVectorBar;": '\U00002958', + "LeftVector;": '\U000021BC', + "LeftVectorBar;": '\U00002952', + "Leftarrow;": '\U000021D0', + "Leftrightarrow;": '\U000021D4', + "LessEqualGreater;": '\U000022DA', + "LessFullEqual;": '\U00002266', + "LessGreater;": '\U00002276', + "LessLess;": '\U00002AA1', + "LessSlantEqual;": '\U00002A7D', + "LessTilde;": '\U00002272', + "Lfr;": '\U0001D50F', + "Ll;": '\U000022D8', + "Lleftarrow;": '\U000021DA', + "Lmidot;": '\U0000013F', + "LongLeftArrow;": '\U000027F5', + "LongLeftRightArrow;": '\U000027F7', + "LongRightArrow;": '\U000027F6', + "Longleftarrow;": '\U000027F8', + "Longleftrightarrow;": '\U000027FA', + "Longrightarrow;": '\U000027F9', + "Lopf;": '\U0001D543', + "LowerLeftArrow;": '\U00002199', + "LowerRightArrow;": '\U00002198', + "Lscr;": '\U00002112', + "Lsh;": '\U000021B0', + "Lstrok;": '\U00000141', + "Lt;": '\U0000226A', + "Map;": '\U00002905', + "Mcy;": '\U0000041C', + "MediumSpace;": '\U0000205F', + "Mellintrf;": '\U00002133', + "Mfr;": '\U0001D510', + "MinusPlus;": '\U00002213', + "Mopf;": '\U0001D544', + "Mscr;": '\U00002133', + "Mu;": '\U0000039C', + "NJcy;": '\U0000040A', + "Nacute;": '\U00000143', + "Ncaron;": '\U00000147', + "Ncedil;": '\U00000145', + "Ncy;": '\U0000041D', + "NegativeMediumSpace;": '\U0000200B', + "NegativeThickSpace;": '\U0000200B', + "NegativeThinSpace;": '\U0000200B', + "NegativeVeryThinSpace;": '\U0000200B', + "NestedGreaterGreater;": '\U0000226B', + "NestedLessLess;": '\U0000226A', + "NewLine;": '\U0000000A', + "Nfr;": '\U0001D511', + "NoBreak;": '\U00002060', + "NonBreakingSpace;": '\U000000A0', + "Nopf;": '\U00002115', + "Not;": '\U00002AEC', + "NotCongruent;": '\U00002262', + "NotCupCap;": '\U0000226D', + "NotDoubleVerticalBar;": '\U00002226', + "NotElement;": '\U00002209', + "NotEqual;": '\U00002260', + "NotExists;": '\U00002204', + "NotGreater;": '\U0000226F', + "NotGreaterEqual;": '\U00002271', + "NotGreaterLess;": '\U00002279', + "NotGreaterTilde;": '\U00002275', + "NotLeftTriangle;": '\U000022EA', + "NotLeftTriangleEqual;": '\U000022EC', + "NotLess;": '\U0000226E', + "NotLessEqual;": '\U00002270', + "NotLessGreater;": '\U00002278', + "NotLessTilde;": '\U00002274', + "NotPrecedes;": '\U00002280', + "NotPrecedesSlantEqual;": '\U000022E0', + "NotReverseElement;": '\U0000220C', + "NotRightTriangle;": '\U000022EB', + "NotRightTriangleEqual;": '\U000022ED', + "NotSquareSubsetEqual;": '\U000022E2', + "NotSquareSupersetEqual;": '\U000022E3', + "NotSubsetEqual;": '\U00002288', + "NotSucceeds;": '\U00002281', + "NotSucceedsSlantEqual;": '\U000022E1', + "NotSupersetEqual;": '\U00002289', + "NotTilde;": '\U00002241', + "NotTildeEqual;": '\U00002244', + "NotTildeFullEqual;": '\U00002247', + "NotTildeTilde;": '\U00002249', + "NotVerticalBar;": '\U00002224', + "Nscr;": '\U0001D4A9', + "Ntilde;": '\U000000D1', + "Nu;": '\U0000039D', + "OElig;": '\U00000152', + "Oacute;": '\U000000D3', + "Ocirc;": '\U000000D4', + "Ocy;": '\U0000041E', + "Odblac;": '\U00000150', + "Ofr;": '\U0001D512', + "Ograve;": '\U000000D2', + "Omacr;": '\U0000014C', + "Omega;": '\U000003A9', + "Omicron;": '\U0000039F', + "Oopf;": '\U0001D546', + "OpenCurlyDoubleQuote;": '\U0000201C', + "OpenCurlyQuote;": '\U00002018', + "Or;": '\U00002A54', + "Oscr;": '\U0001D4AA', + "Oslash;": '\U000000D8', + "Otilde;": '\U000000D5', + "Otimes;": '\U00002A37', + "Ouml;": '\U000000D6', + "OverBar;": '\U0000203E', + "OverBrace;": '\U000023DE', + "OverBracket;": '\U000023B4', + "OverParenthesis;": '\U000023DC', + "PartialD;": '\U00002202', + "Pcy;": '\U0000041F', + "Pfr;": '\U0001D513', + "Phi;": '\U000003A6', + "Pi;": '\U000003A0', + "PlusMinus;": '\U000000B1', + "Poincareplane;": '\U0000210C', + "Popf;": '\U00002119', + "Pr;": '\U00002ABB', + "Precedes;": '\U0000227A', + "PrecedesEqual;": '\U00002AAF', + "PrecedesSlantEqual;": '\U0000227C', + "PrecedesTilde;": '\U0000227E', + "Prime;": '\U00002033', + "Product;": '\U0000220F', + "Proportion;": '\U00002237', + "Proportional;": '\U0000221D', + "Pscr;": '\U0001D4AB', + "Psi;": '\U000003A8', + "QUOT;": '\U00000022', + "Qfr;": '\U0001D514', + "Qopf;": '\U0000211A', + "Qscr;": '\U0001D4AC', + "RBarr;": '\U00002910', + "REG;": '\U000000AE', + "Racute;": '\U00000154', + "Rang;": '\U000027EB', + "Rarr;": '\U000021A0', + "Rarrtl;": '\U00002916', + "Rcaron;": '\U00000158', + "Rcedil;": '\U00000156', + "Rcy;": '\U00000420', + "Re;": '\U0000211C', + "ReverseElement;": '\U0000220B', + "ReverseEquilibrium;": '\U000021CB', + "ReverseUpEquilibrium;": '\U0000296F', + "Rfr;": '\U0000211C', + "Rho;": '\U000003A1', + "RightAngleBracket;": '\U000027E9', + "RightArrow;": '\U00002192', + "RightArrowBar;": '\U000021E5', + "RightArrowLeftArrow;": '\U000021C4', + "RightCeiling;": '\U00002309', + "RightDoubleBracket;": '\U000027E7', + "RightDownTeeVector;": '\U0000295D', + "RightDownVector;": '\U000021C2', + "RightDownVectorBar;": '\U00002955', + "RightFloor;": '\U0000230B', + "RightTee;": '\U000022A2', + "RightTeeArrow;": '\U000021A6', + "RightTeeVector;": '\U0000295B', + "RightTriangle;": '\U000022B3', + "RightTriangleBar;": '\U000029D0', + "RightTriangleEqual;": '\U000022B5', + "RightUpDownVector;": '\U0000294F', + "RightUpTeeVector;": '\U0000295C', + "RightUpVector;": '\U000021BE', + "RightUpVectorBar;": '\U00002954', + "RightVector;": '\U000021C0', + "RightVectorBar;": '\U00002953', + "Rightarrow;": '\U000021D2', + "Ropf;": '\U0000211D', + "RoundImplies;": '\U00002970', + "Rrightarrow;": '\U000021DB', + "Rscr;": '\U0000211B', + "Rsh;": '\U000021B1', + "RuleDelayed;": '\U000029F4', + "SHCHcy;": '\U00000429', + "SHcy;": '\U00000428', + "SOFTcy;": '\U0000042C', + "Sacute;": '\U0000015A', + "Sc;": '\U00002ABC', + "Scaron;": '\U00000160', + "Scedil;": '\U0000015E', + "Scirc;": '\U0000015C', + "Scy;": '\U00000421', + "Sfr;": '\U0001D516', + "ShortDownArrow;": '\U00002193', + "ShortLeftArrow;": '\U00002190', + "ShortRightArrow;": '\U00002192', + "ShortUpArrow;": '\U00002191', + "Sigma;": '\U000003A3', + "SmallCircle;": '\U00002218', + "Sopf;": '\U0001D54A', + "Sqrt;": '\U0000221A', + "Square;": '\U000025A1', + "SquareIntersection;": '\U00002293', + "SquareSubset;": '\U0000228F', + "SquareSubsetEqual;": '\U00002291', + "SquareSuperset;": '\U00002290', + "SquareSupersetEqual;": '\U00002292', + "SquareUnion;": '\U00002294', + "Sscr;": '\U0001D4AE', + "Star;": '\U000022C6', + "Sub;": '\U000022D0', + "Subset;": '\U000022D0', + "SubsetEqual;": '\U00002286', + "Succeeds;": '\U0000227B', + "SucceedsEqual;": '\U00002AB0', + "SucceedsSlantEqual;": '\U0000227D', + "SucceedsTilde;": '\U0000227F', + "SuchThat;": '\U0000220B', + "Sum;": '\U00002211', + "Sup;": '\U000022D1', + "Superset;": '\U00002283', + "SupersetEqual;": '\U00002287', + "Supset;": '\U000022D1', + "THORN;": '\U000000DE', + "TRADE;": '\U00002122', + "TSHcy;": '\U0000040B', + "TScy;": '\U00000426', + "Tab;": '\U00000009', + "Tau;": '\U000003A4', + "Tcaron;": '\U00000164', + "Tcedil;": '\U00000162', + "Tcy;": '\U00000422', + "Tfr;": '\U0001D517', + "Therefore;": '\U00002234', + "Theta;": '\U00000398', + "ThinSpace;": '\U00002009', + "Tilde;": '\U0000223C', + "TildeEqual;": '\U00002243', + "TildeFullEqual;": '\U00002245', + "TildeTilde;": '\U00002248', + "Topf;": '\U0001D54B', + "TripleDot;": '\U000020DB', + "Tscr;": '\U0001D4AF', + "Tstrok;": '\U00000166', + "Uacute;": '\U000000DA', + "Uarr;": '\U0000219F', + "Uarrocir;": '\U00002949', + "Ubrcy;": '\U0000040E', + "Ubreve;": '\U0000016C', + "Ucirc;": '\U000000DB', + "Ucy;": '\U00000423', + "Udblac;": '\U00000170', + "Ufr;": '\U0001D518', + "Ugrave;": '\U000000D9', + "Umacr;": '\U0000016A', + "UnderBar;": '\U0000005F', + "UnderBrace;": '\U000023DF', + "UnderBracket;": '\U000023B5', + "UnderParenthesis;": '\U000023DD', + "Union;": '\U000022C3', + "UnionPlus;": '\U0000228E', + "Uogon;": '\U00000172', + "Uopf;": '\U0001D54C', + "UpArrow;": '\U00002191', + "UpArrowBar;": '\U00002912', + "UpArrowDownArrow;": '\U000021C5', + "UpDownArrow;": '\U00002195', + "UpEquilibrium;": '\U0000296E', + "UpTee;": '\U000022A5', + "UpTeeArrow;": '\U000021A5', + "Uparrow;": '\U000021D1', + "Updownarrow;": '\U000021D5', + "UpperLeftArrow;": '\U00002196', + "UpperRightArrow;": '\U00002197', + "Upsi;": '\U000003D2', + "Upsilon;": '\U000003A5', + "Uring;": '\U0000016E', + "Uscr;": '\U0001D4B0', + "Utilde;": '\U00000168', + "Uuml;": '\U000000DC', + "VDash;": '\U000022AB', + "Vbar;": '\U00002AEB', + "Vcy;": '\U00000412', + "Vdash;": '\U000022A9', + "Vdashl;": '\U00002AE6', + "Vee;": '\U000022C1', + "Verbar;": '\U00002016', + "Vert;": '\U00002016', + "VerticalBar;": '\U00002223', + "VerticalLine;": '\U0000007C', + "VerticalSeparator;": '\U00002758', + "VerticalTilde;": '\U00002240', + "VeryThinSpace;": '\U0000200A', + "Vfr;": '\U0001D519', + "Vopf;": '\U0001D54D', + "Vscr;": '\U0001D4B1', + "Vvdash;": '\U000022AA', + "Wcirc;": '\U00000174', + "Wedge;": '\U000022C0', + "Wfr;": '\U0001D51A', + "Wopf;": '\U0001D54E', + "Wscr;": '\U0001D4B2', + "Xfr;": '\U0001D51B', + "Xi;": '\U0000039E', + "Xopf;": '\U0001D54F', + "Xscr;": '\U0001D4B3', + "YAcy;": '\U0000042F', + "YIcy;": '\U00000407', + "YUcy;": '\U0000042E', + "Yacute;": '\U000000DD', + "Ycirc;": '\U00000176', + "Ycy;": '\U0000042B', + "Yfr;": '\U0001D51C', + "Yopf;": '\U0001D550', + "Yscr;": '\U0001D4B4', + "Yuml;": '\U00000178', + "ZHcy;": '\U00000416', + "Zacute;": '\U00000179', + "Zcaron;": '\U0000017D', + "Zcy;": '\U00000417', + "Zdot;": '\U0000017B', + "ZeroWidthSpace;": '\U0000200B', + "Zeta;": '\U00000396', + "Zfr;": '\U00002128', + "Zopf;": '\U00002124', + "Zscr;": '\U0001D4B5', + "aacute;": '\U000000E1', + "abreve;": '\U00000103', + "ac;": '\U0000223E', + "acd;": '\U0000223F', + "acirc;": '\U000000E2', + "acute;": '\U000000B4', + "acy;": '\U00000430', + "aelig;": '\U000000E6', + "af;": '\U00002061', + "afr;": '\U0001D51E', + "agrave;": '\U000000E0', + "alefsym;": '\U00002135', + "aleph;": '\U00002135', + "alpha;": '\U000003B1', + "amacr;": '\U00000101', + "amalg;": '\U00002A3F', + "amp;": '\U00000026', + "and;": '\U00002227', + "andand;": '\U00002A55', + "andd;": '\U00002A5C', + "andslope;": '\U00002A58', + "andv;": '\U00002A5A', + "ang;": '\U00002220', + "ange;": '\U000029A4', + "angle;": '\U00002220', + "angmsd;": '\U00002221', + "angmsdaa;": '\U000029A8', + "angmsdab;": '\U000029A9', + "angmsdac;": '\U000029AA', + "angmsdad;": '\U000029AB', + "angmsdae;": '\U000029AC', + "angmsdaf;": '\U000029AD', + "angmsdag;": '\U000029AE', + "angmsdah;": '\U000029AF', + "angrt;": '\U0000221F', + "angrtvb;": '\U000022BE', + "angrtvbd;": '\U0000299D', + "angsph;": '\U00002222', + "angst;": '\U000000C5', + "angzarr;": '\U0000237C', + "aogon;": '\U00000105', + "aopf;": '\U0001D552', + "ap;": '\U00002248', + "apE;": '\U00002A70', + "apacir;": '\U00002A6F', + "ape;": '\U0000224A', + "apid;": '\U0000224B', + "apos;": '\U00000027', + "approx;": '\U00002248', + "approxeq;": '\U0000224A', + "aring;": '\U000000E5', + "ascr;": '\U0001D4B6', + "ast;": '\U0000002A', + "asymp;": '\U00002248', + "asympeq;": '\U0000224D', + "atilde;": '\U000000E3', + "auml;": '\U000000E4', + "awconint;": '\U00002233', + "awint;": '\U00002A11', + "bNot;": '\U00002AED', + "backcong;": '\U0000224C', + "backepsilon;": '\U000003F6', + "backprime;": '\U00002035', + "backsim;": '\U0000223D', + "backsimeq;": '\U000022CD', + "barvee;": '\U000022BD', + "barwed;": '\U00002305', + "barwedge;": '\U00002305', + "bbrk;": '\U000023B5', + "bbrktbrk;": '\U000023B6', + "bcong;": '\U0000224C', + "bcy;": '\U00000431', + "bdquo;": '\U0000201E', + "becaus;": '\U00002235', + "because;": '\U00002235', + "bemptyv;": '\U000029B0', + "bepsi;": '\U000003F6', + "bernou;": '\U0000212C', + "beta;": '\U000003B2', + "beth;": '\U00002136', + "between;": '\U0000226C', + "bfr;": '\U0001D51F', + "bigcap;": '\U000022C2', + "bigcirc;": '\U000025EF', + "bigcup;": '\U000022C3', + "bigodot;": '\U00002A00', + "bigoplus;": '\U00002A01', + "bigotimes;": '\U00002A02', + "bigsqcup;": '\U00002A06', + "bigstar;": '\U00002605', + "bigtriangledown;": '\U000025BD', + "bigtriangleup;": '\U000025B3', + "biguplus;": '\U00002A04', + "bigvee;": '\U000022C1', + "bigwedge;": '\U000022C0', + "bkarow;": '\U0000290D', + "blacklozenge;": '\U000029EB', + "blacksquare;": '\U000025AA', + "blacktriangle;": '\U000025B4', + "blacktriangledown;": '\U000025BE', + "blacktriangleleft;": '\U000025C2', + "blacktriangleright;": '\U000025B8', + "blank;": '\U00002423', + "blk12;": '\U00002592', + "blk14;": '\U00002591', + "blk34;": '\U00002593', + "block;": '\U00002588', + "bnot;": '\U00002310', + "bopf;": '\U0001D553', + "bot;": '\U000022A5', + "bottom;": '\U000022A5', + "bowtie;": '\U000022C8', + "boxDL;": '\U00002557', + "boxDR;": '\U00002554', + "boxDl;": '\U00002556', + "boxDr;": '\U00002553', + "boxH;": '\U00002550', + "boxHD;": '\U00002566', + "boxHU;": '\U00002569', + "boxHd;": '\U00002564', + "boxHu;": '\U00002567', + "boxUL;": '\U0000255D', + "boxUR;": '\U0000255A', + "boxUl;": '\U0000255C', + "boxUr;": '\U00002559', + "boxV;": '\U00002551', + "boxVH;": '\U0000256C', + "boxVL;": '\U00002563', + "boxVR;": '\U00002560', + "boxVh;": '\U0000256B', + "boxVl;": '\U00002562', + "boxVr;": '\U0000255F', + "boxbox;": '\U000029C9', + "boxdL;": '\U00002555', + "boxdR;": '\U00002552', + "boxdl;": '\U00002510', + "boxdr;": '\U0000250C', + "boxh;": '\U00002500', + "boxhD;": '\U00002565', + "boxhU;": '\U00002568', + "boxhd;": '\U0000252C', + "boxhu;": '\U00002534', + "boxminus;": '\U0000229F', + "boxplus;": '\U0000229E', + "boxtimes;": '\U000022A0', + "boxuL;": '\U0000255B', + "boxuR;": '\U00002558', + "boxul;": '\U00002518', + "boxur;": '\U00002514', + "boxv;": '\U00002502', + "boxvH;": '\U0000256A', + "boxvL;": '\U00002561', + "boxvR;": '\U0000255E', + "boxvh;": '\U0000253C', + "boxvl;": '\U00002524', + "boxvr;": '\U0000251C', + "bprime;": '\U00002035', + "breve;": '\U000002D8', + "brvbar;": '\U000000A6', + "bscr;": '\U0001D4B7', + "bsemi;": '\U0000204F', + "bsim;": '\U0000223D', + "bsime;": '\U000022CD', + "bsol;": '\U0000005C', + "bsolb;": '\U000029C5', + "bsolhsub;": '\U000027C8', + "bull;": '\U00002022', + "bullet;": '\U00002022', + "bump;": '\U0000224E', + "bumpE;": '\U00002AAE', + "bumpe;": '\U0000224F', + "bumpeq;": '\U0000224F', + "cacute;": '\U00000107', + "cap;": '\U00002229', + "capand;": '\U00002A44', + "capbrcup;": '\U00002A49', + "capcap;": '\U00002A4B', + "capcup;": '\U00002A47', + "capdot;": '\U00002A40', + "caret;": '\U00002041', + "caron;": '\U000002C7', + "ccaps;": '\U00002A4D', + "ccaron;": '\U0000010D', + "ccedil;": '\U000000E7', + "ccirc;": '\U00000109', + "ccups;": '\U00002A4C', + "ccupssm;": '\U00002A50', + "cdot;": '\U0000010B', + "cedil;": '\U000000B8', + "cemptyv;": '\U000029B2', + "cent;": '\U000000A2', + "centerdot;": '\U000000B7', + "cfr;": '\U0001D520', + "chcy;": '\U00000447', + "check;": '\U00002713', + "checkmark;": '\U00002713', + "chi;": '\U000003C7', + "cir;": '\U000025CB', + "cirE;": '\U000029C3', + "circ;": '\U000002C6', + "circeq;": '\U00002257', + "circlearrowleft;": '\U000021BA', + "circlearrowright;": '\U000021BB', + "circledR;": '\U000000AE', + "circledS;": '\U000024C8', + "circledast;": '\U0000229B', + "circledcirc;": '\U0000229A', + "circleddash;": '\U0000229D', + "cire;": '\U00002257', + "cirfnint;": '\U00002A10', + "cirmid;": '\U00002AEF', + "cirscir;": '\U000029C2', + "clubs;": '\U00002663', + "clubsuit;": '\U00002663', + "colon;": '\U0000003A', + "colone;": '\U00002254', + "coloneq;": '\U00002254', + "comma;": '\U0000002C', + "commat;": '\U00000040', + "comp;": '\U00002201', + "compfn;": '\U00002218', + "complement;": '\U00002201', + "complexes;": '\U00002102', + "cong;": '\U00002245', + "congdot;": '\U00002A6D', + "conint;": '\U0000222E', + "copf;": '\U0001D554', + "coprod;": '\U00002210', + "copy;": '\U000000A9', + "copysr;": '\U00002117', + "crarr;": '\U000021B5', + "cross;": '\U00002717', + "cscr;": '\U0001D4B8', + "csub;": '\U00002ACF', + "csube;": '\U00002AD1', + "csup;": '\U00002AD0', + "csupe;": '\U00002AD2', + "ctdot;": '\U000022EF', + "cudarrl;": '\U00002938', + "cudarrr;": '\U00002935', + "cuepr;": '\U000022DE', + "cuesc;": '\U000022DF', + "cularr;": '\U000021B6', + "cularrp;": '\U0000293D', + "cup;": '\U0000222A', + "cupbrcap;": '\U00002A48', + "cupcap;": '\U00002A46', + "cupcup;": '\U00002A4A', + "cupdot;": '\U0000228D', + "cupor;": '\U00002A45', + "curarr;": '\U000021B7', + "curarrm;": '\U0000293C', + "curlyeqprec;": '\U000022DE', + "curlyeqsucc;": '\U000022DF', + "curlyvee;": '\U000022CE', + "curlywedge;": '\U000022CF', + "curren;": '\U000000A4', + "curvearrowleft;": '\U000021B6', + "curvearrowright;": '\U000021B7', + "cuvee;": '\U000022CE', + "cuwed;": '\U000022CF', + "cwconint;": '\U00002232', + "cwint;": '\U00002231', + "cylcty;": '\U0000232D', + "dArr;": '\U000021D3', + "dHar;": '\U00002965', + "dagger;": '\U00002020', + "daleth;": '\U00002138', + "darr;": '\U00002193', + "dash;": '\U00002010', + "dashv;": '\U000022A3', + "dbkarow;": '\U0000290F', + "dblac;": '\U000002DD', + "dcaron;": '\U0000010F', + "dcy;": '\U00000434', + "dd;": '\U00002146', + "ddagger;": '\U00002021', + "ddarr;": '\U000021CA', + "ddotseq;": '\U00002A77', + "deg;": '\U000000B0', + "delta;": '\U000003B4', + "demptyv;": '\U000029B1', + "dfisht;": '\U0000297F', + "dfr;": '\U0001D521', + "dharl;": '\U000021C3', + "dharr;": '\U000021C2', + "diam;": '\U000022C4', + "diamond;": '\U000022C4', + "diamondsuit;": '\U00002666', + "diams;": '\U00002666', + "die;": '\U000000A8', + "digamma;": '\U000003DD', + "disin;": '\U000022F2', + "div;": '\U000000F7', + "divide;": '\U000000F7', + "divideontimes;": '\U000022C7', + "divonx;": '\U000022C7', + "djcy;": '\U00000452', + "dlcorn;": '\U0000231E', + "dlcrop;": '\U0000230D', + "dollar;": '\U00000024', + "dopf;": '\U0001D555', + "dot;": '\U000002D9', + "doteq;": '\U00002250', + "doteqdot;": '\U00002251', + "dotminus;": '\U00002238', + "dotplus;": '\U00002214', + "dotsquare;": '\U000022A1', + "doublebarwedge;": '\U00002306', + "downarrow;": '\U00002193', + "downdownarrows;": '\U000021CA', + "downharpoonleft;": '\U000021C3', + "downharpoonright;": '\U000021C2', + "drbkarow;": '\U00002910', + "drcorn;": '\U0000231F', + "drcrop;": '\U0000230C', + "dscr;": '\U0001D4B9', + "dscy;": '\U00000455', + "dsol;": '\U000029F6', + "dstrok;": '\U00000111', + "dtdot;": '\U000022F1', + "dtri;": '\U000025BF', + "dtrif;": '\U000025BE', + "duarr;": '\U000021F5', + "duhar;": '\U0000296F', + "dwangle;": '\U000029A6', + "dzcy;": '\U0000045F', + "dzigrarr;": '\U000027FF', + "eDDot;": '\U00002A77', + "eDot;": '\U00002251', + "eacute;": '\U000000E9', + "easter;": '\U00002A6E', + "ecaron;": '\U0000011B', + "ecir;": '\U00002256', + "ecirc;": '\U000000EA', + "ecolon;": '\U00002255', + "ecy;": '\U0000044D', + "edot;": '\U00000117', + "ee;": '\U00002147', + "efDot;": '\U00002252', + "efr;": '\U0001D522', + "eg;": '\U00002A9A', + "egrave;": '\U000000E8', + "egs;": '\U00002A96', + "egsdot;": '\U00002A98', + "el;": '\U00002A99', + "elinters;": '\U000023E7', + "ell;": '\U00002113', + "els;": '\U00002A95', + "elsdot;": '\U00002A97', + "emacr;": '\U00000113', + "empty;": '\U00002205', + "emptyset;": '\U00002205', + "emptyv;": '\U00002205', + "emsp;": '\U00002003', + "emsp13;": '\U00002004', + "emsp14;": '\U00002005', + "eng;": '\U0000014B', + "ensp;": '\U00002002', + "eogon;": '\U00000119', + "eopf;": '\U0001D556', + "epar;": '\U000022D5', + "eparsl;": '\U000029E3', + "eplus;": '\U00002A71', + "epsi;": '\U000003B5', + "epsilon;": '\U000003B5', + "epsiv;": '\U000003F5', + "eqcirc;": '\U00002256', + "eqcolon;": '\U00002255', + "eqsim;": '\U00002242', + "eqslantgtr;": '\U00002A96', + "eqslantless;": '\U00002A95', + "equals;": '\U0000003D', + "equest;": '\U0000225F', + "equiv;": '\U00002261', + "equivDD;": '\U00002A78', + "eqvparsl;": '\U000029E5', + "erDot;": '\U00002253', + "erarr;": '\U00002971', + "escr;": '\U0000212F', + "esdot;": '\U00002250', + "esim;": '\U00002242', + "eta;": '\U000003B7', + "eth;": '\U000000F0', + "euml;": '\U000000EB', + "euro;": '\U000020AC', + "excl;": '\U00000021', + "exist;": '\U00002203', + "expectation;": '\U00002130', + "exponentiale;": '\U00002147', + "fallingdotseq;": '\U00002252', + "fcy;": '\U00000444', + "female;": '\U00002640', + "ffilig;": '\U0000FB03', + "fflig;": '\U0000FB00', + "ffllig;": '\U0000FB04', + "ffr;": '\U0001D523', + "filig;": '\U0000FB01', + "flat;": '\U0000266D', + "fllig;": '\U0000FB02', + "fltns;": '\U000025B1', + "fnof;": '\U00000192', + "fopf;": '\U0001D557', + "forall;": '\U00002200', + "fork;": '\U000022D4', + "forkv;": '\U00002AD9', + "fpartint;": '\U00002A0D', + "frac12;": '\U000000BD', + "frac13;": '\U00002153', + "frac14;": '\U000000BC', + "frac15;": '\U00002155', + "frac16;": '\U00002159', + "frac18;": '\U0000215B', + "frac23;": '\U00002154', + "frac25;": '\U00002156', + "frac34;": '\U000000BE', + "frac35;": '\U00002157', + "frac38;": '\U0000215C', + "frac45;": '\U00002158', + "frac56;": '\U0000215A', + "frac58;": '\U0000215D', + "frac78;": '\U0000215E', + "frasl;": '\U00002044', + "frown;": '\U00002322', + "fscr;": '\U0001D4BB', + "gE;": '\U00002267', + "gEl;": '\U00002A8C', + "gacute;": '\U000001F5', + "gamma;": '\U000003B3', + "gammad;": '\U000003DD', + "gap;": '\U00002A86', + "gbreve;": '\U0000011F', + "gcirc;": '\U0000011D', + "gcy;": '\U00000433', + "gdot;": '\U00000121', + "ge;": '\U00002265', + "gel;": '\U000022DB', + "geq;": '\U00002265', + "geqq;": '\U00002267', + "geqslant;": '\U00002A7E', + "ges;": '\U00002A7E', + "gescc;": '\U00002AA9', + "gesdot;": '\U00002A80', + "gesdoto;": '\U00002A82', + "gesdotol;": '\U00002A84', + "gesles;": '\U00002A94', + "gfr;": '\U0001D524', + "gg;": '\U0000226B', + "ggg;": '\U000022D9', + "gimel;": '\U00002137', + "gjcy;": '\U00000453', + "gl;": '\U00002277', + "glE;": '\U00002A92', + "gla;": '\U00002AA5', + "glj;": '\U00002AA4', + "gnE;": '\U00002269', + "gnap;": '\U00002A8A', + "gnapprox;": '\U00002A8A', + "gne;": '\U00002A88', + "gneq;": '\U00002A88', + "gneqq;": '\U00002269', + "gnsim;": '\U000022E7', + "gopf;": '\U0001D558', + "grave;": '\U00000060', + "gscr;": '\U0000210A', + "gsim;": '\U00002273', + "gsime;": '\U00002A8E', + "gsiml;": '\U00002A90', + "gt;": '\U0000003E', + "gtcc;": '\U00002AA7', + "gtcir;": '\U00002A7A', + "gtdot;": '\U000022D7', + "gtlPar;": '\U00002995', + "gtquest;": '\U00002A7C', + "gtrapprox;": '\U00002A86', + "gtrarr;": '\U00002978', + "gtrdot;": '\U000022D7', + "gtreqless;": '\U000022DB', + "gtreqqless;": '\U00002A8C', + "gtrless;": '\U00002277', + "gtrsim;": '\U00002273', + "hArr;": '\U000021D4', + "hairsp;": '\U0000200A', + "half;": '\U000000BD', + "hamilt;": '\U0000210B', + "hardcy;": '\U0000044A', + "harr;": '\U00002194', + "harrcir;": '\U00002948', + "harrw;": '\U000021AD', + "hbar;": '\U0000210F', + "hcirc;": '\U00000125', + "hearts;": '\U00002665', + "heartsuit;": '\U00002665', + "hellip;": '\U00002026', + "hercon;": '\U000022B9', + "hfr;": '\U0001D525', + "hksearow;": '\U00002925', + "hkswarow;": '\U00002926', + "hoarr;": '\U000021FF', + "homtht;": '\U0000223B', + "hookleftarrow;": '\U000021A9', + "hookrightarrow;": '\U000021AA', + "hopf;": '\U0001D559', + "horbar;": '\U00002015', + "hscr;": '\U0001D4BD', + "hslash;": '\U0000210F', + "hstrok;": '\U00000127', + "hybull;": '\U00002043', + "hyphen;": '\U00002010', + "iacute;": '\U000000ED', + "ic;": '\U00002063', + "icirc;": '\U000000EE', + "icy;": '\U00000438', + "iecy;": '\U00000435', + "iexcl;": '\U000000A1', + "iff;": '\U000021D4', + "ifr;": '\U0001D526', + "igrave;": '\U000000EC', + "ii;": '\U00002148', + "iiiint;": '\U00002A0C', + "iiint;": '\U0000222D', + "iinfin;": '\U000029DC', + "iiota;": '\U00002129', + "ijlig;": '\U00000133', + "imacr;": '\U0000012B', + "image;": '\U00002111', + "imagline;": '\U00002110', + "imagpart;": '\U00002111', + "imath;": '\U00000131', + "imof;": '\U000022B7', + "imped;": '\U000001B5', + "in;": '\U00002208', + "incare;": '\U00002105', + "infin;": '\U0000221E', + "infintie;": '\U000029DD', + "inodot;": '\U00000131', + "int;": '\U0000222B', + "intcal;": '\U000022BA', + "integers;": '\U00002124', + "intercal;": '\U000022BA', + "intlarhk;": '\U00002A17', + "intprod;": '\U00002A3C', + "iocy;": '\U00000451', + "iogon;": '\U0000012F', + "iopf;": '\U0001D55A', + "iota;": '\U000003B9', + "iprod;": '\U00002A3C', + "iquest;": '\U000000BF', + "iscr;": '\U0001D4BE', + "isin;": '\U00002208', + "isinE;": '\U000022F9', + "isindot;": '\U000022F5', + "isins;": '\U000022F4', + "isinsv;": '\U000022F3', + "isinv;": '\U00002208', + "it;": '\U00002062', + "itilde;": '\U00000129', + "iukcy;": '\U00000456', + "iuml;": '\U000000EF', + "jcirc;": '\U00000135', + "jcy;": '\U00000439', + "jfr;": '\U0001D527', + "jmath;": '\U00000237', + "jopf;": '\U0001D55B', + "jscr;": '\U0001D4BF', + "jsercy;": '\U00000458', + "jukcy;": '\U00000454', + "kappa;": '\U000003BA', + "kappav;": '\U000003F0', + "kcedil;": '\U00000137', + "kcy;": '\U0000043A', + "kfr;": '\U0001D528', + "kgreen;": '\U00000138', + "khcy;": '\U00000445', + "kjcy;": '\U0000045C', + "kopf;": '\U0001D55C', + "kscr;": '\U0001D4C0', + "lAarr;": '\U000021DA', + "lArr;": '\U000021D0', + "lAtail;": '\U0000291B', + "lBarr;": '\U0000290E', + "lE;": '\U00002266', + "lEg;": '\U00002A8B', + "lHar;": '\U00002962', + "lacute;": '\U0000013A', + "laemptyv;": '\U000029B4', + "lagran;": '\U00002112', + "lambda;": '\U000003BB', + "lang;": '\U000027E8', + "langd;": '\U00002991', + "langle;": '\U000027E8', + "lap;": '\U00002A85', + "laquo;": '\U000000AB', + "larr;": '\U00002190', + "larrb;": '\U000021E4', + "larrbfs;": '\U0000291F', + "larrfs;": '\U0000291D', + "larrhk;": '\U000021A9', + "larrlp;": '\U000021AB', + "larrpl;": '\U00002939', + "larrsim;": '\U00002973', + "larrtl;": '\U000021A2', + "lat;": '\U00002AAB', + "latail;": '\U00002919', + "late;": '\U00002AAD', + "lbarr;": '\U0000290C', + "lbbrk;": '\U00002772', + "lbrace;": '\U0000007B', + "lbrack;": '\U0000005B', + "lbrke;": '\U0000298B', + "lbrksld;": '\U0000298F', + "lbrkslu;": '\U0000298D', + "lcaron;": '\U0000013E', + "lcedil;": '\U0000013C', + "lceil;": '\U00002308', + "lcub;": '\U0000007B', + "lcy;": '\U0000043B', + "ldca;": '\U00002936', + "ldquo;": '\U0000201C', + "ldquor;": '\U0000201E', + "ldrdhar;": '\U00002967', + "ldrushar;": '\U0000294B', + "ldsh;": '\U000021B2', + "le;": '\U00002264', + "leftarrow;": '\U00002190', + "leftarrowtail;": '\U000021A2', + "leftharpoondown;": '\U000021BD', + "leftharpoonup;": '\U000021BC', + "leftleftarrows;": '\U000021C7', + "leftrightarrow;": '\U00002194', + "leftrightarrows;": '\U000021C6', + "leftrightharpoons;": '\U000021CB', + "leftrightsquigarrow;": '\U000021AD', + "leftthreetimes;": '\U000022CB', + "leg;": '\U000022DA', + "leq;": '\U00002264', + "leqq;": '\U00002266', + "leqslant;": '\U00002A7D', + "les;": '\U00002A7D', + "lescc;": '\U00002AA8', + "lesdot;": '\U00002A7F', + "lesdoto;": '\U00002A81', + "lesdotor;": '\U00002A83', + "lesges;": '\U00002A93', + "lessapprox;": '\U00002A85', + "lessdot;": '\U000022D6', + "lesseqgtr;": '\U000022DA', + "lesseqqgtr;": '\U00002A8B', + "lessgtr;": '\U00002276', + "lesssim;": '\U00002272', + "lfisht;": '\U0000297C', + "lfloor;": '\U0000230A', + "lfr;": '\U0001D529', + "lg;": '\U00002276', + "lgE;": '\U00002A91', + "lhard;": '\U000021BD', + "lharu;": '\U000021BC', + "lharul;": '\U0000296A', + "lhblk;": '\U00002584', + "ljcy;": '\U00000459', + "ll;": '\U0000226A', + "llarr;": '\U000021C7', + "llcorner;": '\U0000231E', + "llhard;": '\U0000296B', + "lltri;": '\U000025FA', + "lmidot;": '\U00000140', + "lmoust;": '\U000023B0', + "lmoustache;": '\U000023B0', + "lnE;": '\U00002268', + "lnap;": '\U00002A89', + "lnapprox;": '\U00002A89', + "lne;": '\U00002A87', + "lneq;": '\U00002A87', + "lneqq;": '\U00002268', + "lnsim;": '\U000022E6', + "loang;": '\U000027EC', + "loarr;": '\U000021FD', + "lobrk;": '\U000027E6', + "longleftarrow;": '\U000027F5', + "longleftrightarrow;": '\U000027F7', + "longmapsto;": '\U000027FC', + "longrightarrow;": '\U000027F6', + "looparrowleft;": '\U000021AB', + "looparrowright;": '\U000021AC', + "lopar;": '\U00002985', + "lopf;": '\U0001D55D', + "loplus;": '\U00002A2D', + "lotimes;": '\U00002A34', + "lowast;": '\U00002217', + "lowbar;": '\U0000005F', + "loz;": '\U000025CA', + "lozenge;": '\U000025CA', + "lozf;": '\U000029EB', + "lpar;": '\U00000028', + "lparlt;": '\U00002993', + "lrarr;": '\U000021C6', + "lrcorner;": '\U0000231F', + "lrhar;": '\U000021CB', + "lrhard;": '\U0000296D', + "lrm;": '\U0000200E', + "lrtri;": '\U000022BF', + "lsaquo;": '\U00002039', + "lscr;": '\U0001D4C1', + "lsh;": '\U000021B0', + "lsim;": '\U00002272', + "lsime;": '\U00002A8D', + "lsimg;": '\U00002A8F', + "lsqb;": '\U0000005B', + "lsquo;": '\U00002018', + "lsquor;": '\U0000201A', + "lstrok;": '\U00000142', + "lt;": '\U0000003C', + "ltcc;": '\U00002AA6', + "ltcir;": '\U00002A79', + "ltdot;": '\U000022D6', + "lthree;": '\U000022CB', + "ltimes;": '\U000022C9', + "ltlarr;": '\U00002976', + "ltquest;": '\U00002A7B', + "ltrPar;": '\U00002996', + "ltri;": '\U000025C3', + "ltrie;": '\U000022B4', + "ltrif;": '\U000025C2', + "lurdshar;": '\U0000294A', + "luruhar;": '\U00002966', + "mDDot;": '\U0000223A', + "macr;": '\U000000AF', + "male;": '\U00002642', + "malt;": '\U00002720', + "maltese;": '\U00002720', + "map;": '\U000021A6', + "mapsto;": '\U000021A6', + "mapstodown;": '\U000021A7', + "mapstoleft;": '\U000021A4', + "mapstoup;": '\U000021A5', + "marker;": '\U000025AE', + "mcomma;": '\U00002A29', + "mcy;": '\U0000043C', + "mdash;": '\U00002014', + "measuredangle;": '\U00002221', + "mfr;": '\U0001D52A', + "mho;": '\U00002127', + "micro;": '\U000000B5', + "mid;": '\U00002223', + "midast;": '\U0000002A', + "midcir;": '\U00002AF0', + "middot;": '\U000000B7', + "minus;": '\U00002212', + "minusb;": '\U0000229F', + "minusd;": '\U00002238', + "minusdu;": '\U00002A2A', + "mlcp;": '\U00002ADB', + "mldr;": '\U00002026', + "mnplus;": '\U00002213', + "models;": '\U000022A7', + "mopf;": '\U0001D55E', + "mp;": '\U00002213', + "mscr;": '\U0001D4C2', + "mstpos;": '\U0000223E', + "mu;": '\U000003BC', + "multimap;": '\U000022B8', + "mumap;": '\U000022B8', + "nLeftarrow;": '\U000021CD', + "nLeftrightarrow;": '\U000021CE', + "nRightarrow;": '\U000021CF', + "nVDash;": '\U000022AF', + "nVdash;": '\U000022AE', + "nabla;": '\U00002207', + "nacute;": '\U00000144', + "nap;": '\U00002249', + "napos;": '\U00000149', + "napprox;": '\U00002249', + "natur;": '\U0000266E', + "natural;": '\U0000266E', + "naturals;": '\U00002115', + "nbsp;": '\U000000A0', + "ncap;": '\U00002A43', + "ncaron;": '\U00000148', + "ncedil;": '\U00000146', + "ncong;": '\U00002247', + "ncup;": '\U00002A42', + "ncy;": '\U0000043D', + "ndash;": '\U00002013', + "ne;": '\U00002260', + "neArr;": '\U000021D7', + "nearhk;": '\U00002924', + "nearr;": '\U00002197', + "nearrow;": '\U00002197', + "nequiv;": '\U00002262', + "nesear;": '\U00002928', + "nexist;": '\U00002204', + "nexists;": '\U00002204', + "nfr;": '\U0001D52B', + "nge;": '\U00002271', + "ngeq;": '\U00002271', + "ngsim;": '\U00002275', + "ngt;": '\U0000226F', + "ngtr;": '\U0000226F', + "nhArr;": '\U000021CE', + "nharr;": '\U000021AE', + "nhpar;": '\U00002AF2', + "ni;": '\U0000220B', + "nis;": '\U000022FC', + "nisd;": '\U000022FA', + "niv;": '\U0000220B', + "njcy;": '\U0000045A', + "nlArr;": '\U000021CD', + "nlarr;": '\U0000219A', + "nldr;": '\U00002025', + "nle;": '\U00002270', + "nleftarrow;": '\U0000219A', + "nleftrightarrow;": '\U000021AE', + "nleq;": '\U00002270', + "nless;": '\U0000226E', + "nlsim;": '\U00002274', + "nlt;": '\U0000226E', + "nltri;": '\U000022EA', + "nltrie;": '\U000022EC', + "nmid;": '\U00002224', + "nopf;": '\U0001D55F', + "not;": '\U000000AC', + "notin;": '\U00002209', + "notinva;": '\U00002209', + "notinvb;": '\U000022F7', + "notinvc;": '\U000022F6', + "notni;": '\U0000220C', + "notniva;": '\U0000220C', + "notnivb;": '\U000022FE', + "notnivc;": '\U000022FD', + "npar;": '\U00002226', + "nparallel;": '\U00002226', + "npolint;": '\U00002A14', + "npr;": '\U00002280', + "nprcue;": '\U000022E0', + "nprec;": '\U00002280', + "nrArr;": '\U000021CF', + "nrarr;": '\U0000219B', + "nrightarrow;": '\U0000219B', + "nrtri;": '\U000022EB', + "nrtrie;": '\U000022ED', + "nsc;": '\U00002281', + "nsccue;": '\U000022E1', + "nscr;": '\U0001D4C3', + "nshortmid;": '\U00002224', + "nshortparallel;": '\U00002226', + "nsim;": '\U00002241', + "nsime;": '\U00002244', + "nsimeq;": '\U00002244', + "nsmid;": '\U00002224', + "nspar;": '\U00002226', + "nsqsube;": '\U000022E2', + "nsqsupe;": '\U000022E3', + "nsub;": '\U00002284', + "nsube;": '\U00002288', + "nsubseteq;": '\U00002288', + "nsucc;": '\U00002281', + "nsup;": '\U00002285', + "nsupe;": '\U00002289', + "nsupseteq;": '\U00002289', + "ntgl;": '\U00002279', + "ntilde;": '\U000000F1', + "ntlg;": '\U00002278', + "ntriangleleft;": '\U000022EA', + "ntrianglelefteq;": '\U000022EC', + "ntriangleright;": '\U000022EB', + "ntrianglerighteq;": '\U000022ED', + "nu;": '\U000003BD', + "num;": '\U00000023', + "numero;": '\U00002116', + "numsp;": '\U00002007', + "nvDash;": '\U000022AD', + "nvHarr;": '\U00002904', + "nvdash;": '\U000022AC', + "nvinfin;": '\U000029DE', + "nvlArr;": '\U00002902', + "nvrArr;": '\U00002903', + "nwArr;": '\U000021D6', + "nwarhk;": '\U00002923', + "nwarr;": '\U00002196', + "nwarrow;": '\U00002196', + "nwnear;": '\U00002927', + "oS;": '\U000024C8', + "oacute;": '\U000000F3', + "oast;": '\U0000229B', + "ocir;": '\U0000229A', + "ocirc;": '\U000000F4', + "ocy;": '\U0000043E', + "odash;": '\U0000229D', + "odblac;": '\U00000151', + "odiv;": '\U00002A38', + "odot;": '\U00002299', + "odsold;": '\U000029BC', + "oelig;": '\U00000153', + "ofcir;": '\U000029BF', + "ofr;": '\U0001D52C', + "ogon;": '\U000002DB', + "ograve;": '\U000000F2', + "ogt;": '\U000029C1', + "ohbar;": '\U000029B5', + "ohm;": '\U000003A9', + "oint;": '\U0000222E', + "olarr;": '\U000021BA', + "olcir;": '\U000029BE', + "olcross;": '\U000029BB', + "oline;": '\U0000203E', + "olt;": '\U000029C0', + "omacr;": '\U0000014D', + "omega;": '\U000003C9', + "omicron;": '\U000003BF', + "omid;": '\U000029B6', + "ominus;": '\U00002296', + "oopf;": '\U0001D560', + "opar;": '\U000029B7', + "operp;": '\U000029B9', + "oplus;": '\U00002295', + "or;": '\U00002228', + "orarr;": '\U000021BB', + "ord;": '\U00002A5D', + "order;": '\U00002134', + "orderof;": '\U00002134', + "ordf;": '\U000000AA', + "ordm;": '\U000000BA', + "origof;": '\U000022B6', + "oror;": '\U00002A56', + "orslope;": '\U00002A57', + "orv;": '\U00002A5B', + "oscr;": '\U00002134', + "oslash;": '\U000000F8', + "osol;": '\U00002298', + "otilde;": '\U000000F5', + "otimes;": '\U00002297', + "otimesas;": '\U00002A36', + "ouml;": '\U000000F6', + "ovbar;": '\U0000233D', + "par;": '\U00002225', + "para;": '\U000000B6', + "parallel;": '\U00002225', + "parsim;": '\U00002AF3', + "parsl;": '\U00002AFD', + "part;": '\U00002202', + "pcy;": '\U0000043F', + "percnt;": '\U00000025', + "period;": '\U0000002E', + "permil;": '\U00002030', + "perp;": '\U000022A5', + "pertenk;": '\U00002031', + "pfr;": '\U0001D52D', + "phi;": '\U000003C6', + "phiv;": '\U000003D5', + "phmmat;": '\U00002133', + "phone;": '\U0000260E', + "pi;": '\U000003C0', + "pitchfork;": '\U000022D4', + "piv;": '\U000003D6', + "planck;": '\U0000210F', + "planckh;": '\U0000210E', + "plankv;": '\U0000210F', + "plus;": '\U0000002B', + "plusacir;": '\U00002A23', + "plusb;": '\U0000229E', + "pluscir;": '\U00002A22', + "plusdo;": '\U00002214', + "plusdu;": '\U00002A25', + "pluse;": '\U00002A72', + "plusmn;": '\U000000B1', + "plussim;": '\U00002A26', + "plustwo;": '\U00002A27', + "pm;": '\U000000B1', + "pointint;": '\U00002A15', + "popf;": '\U0001D561', + "pound;": '\U000000A3', + "pr;": '\U0000227A', + "prE;": '\U00002AB3', + "prap;": '\U00002AB7', + "prcue;": '\U0000227C', + "pre;": '\U00002AAF', + "prec;": '\U0000227A', + "precapprox;": '\U00002AB7', + "preccurlyeq;": '\U0000227C', + "preceq;": '\U00002AAF', + "precnapprox;": '\U00002AB9', + "precneqq;": '\U00002AB5', + "precnsim;": '\U000022E8', + "precsim;": '\U0000227E', + "prime;": '\U00002032', + "primes;": '\U00002119', + "prnE;": '\U00002AB5', + "prnap;": '\U00002AB9', + "prnsim;": '\U000022E8', + "prod;": '\U0000220F', + "profalar;": '\U0000232E', + "profline;": '\U00002312', + "profsurf;": '\U00002313', + "prop;": '\U0000221D', + "propto;": '\U0000221D', + "prsim;": '\U0000227E', + "prurel;": '\U000022B0', + "pscr;": '\U0001D4C5', + "psi;": '\U000003C8', + "puncsp;": '\U00002008', + "qfr;": '\U0001D52E', + "qint;": '\U00002A0C', + "qopf;": '\U0001D562', + "qprime;": '\U00002057', + "qscr;": '\U0001D4C6', + "quaternions;": '\U0000210D', + "quatint;": '\U00002A16', + "quest;": '\U0000003F', + "questeq;": '\U0000225F', + "quot;": '\U00000022', + "rAarr;": '\U000021DB', + "rArr;": '\U000021D2', + "rAtail;": '\U0000291C', + "rBarr;": '\U0000290F', + "rHar;": '\U00002964', + "racute;": '\U00000155', + "radic;": '\U0000221A', + "raemptyv;": '\U000029B3', + "rang;": '\U000027E9', + "rangd;": '\U00002992', + "range;": '\U000029A5', + "rangle;": '\U000027E9', + "raquo;": '\U000000BB', + "rarr;": '\U00002192', + "rarrap;": '\U00002975', + "rarrb;": '\U000021E5', + "rarrbfs;": '\U00002920', + "rarrc;": '\U00002933', + "rarrfs;": '\U0000291E', + "rarrhk;": '\U000021AA', + "rarrlp;": '\U000021AC', + "rarrpl;": '\U00002945', + "rarrsim;": '\U00002974', + "rarrtl;": '\U000021A3', + "rarrw;": '\U0000219D', + "ratail;": '\U0000291A', + "ratio;": '\U00002236', + "rationals;": '\U0000211A', + "rbarr;": '\U0000290D', + "rbbrk;": '\U00002773', + "rbrace;": '\U0000007D', + "rbrack;": '\U0000005D', + "rbrke;": '\U0000298C', + "rbrksld;": '\U0000298E', + "rbrkslu;": '\U00002990', + "rcaron;": '\U00000159', + "rcedil;": '\U00000157', + "rceil;": '\U00002309', + "rcub;": '\U0000007D', + "rcy;": '\U00000440', + "rdca;": '\U00002937', + "rdldhar;": '\U00002969', + "rdquo;": '\U0000201D', + "rdquor;": '\U0000201D', + "rdsh;": '\U000021B3', + "real;": '\U0000211C', + "realine;": '\U0000211B', + "realpart;": '\U0000211C', + "reals;": '\U0000211D', + "rect;": '\U000025AD', + "reg;": '\U000000AE', + "rfisht;": '\U0000297D', + "rfloor;": '\U0000230B', + "rfr;": '\U0001D52F', + "rhard;": '\U000021C1', + "rharu;": '\U000021C0', + "rharul;": '\U0000296C', + "rho;": '\U000003C1', + "rhov;": '\U000003F1', + "rightarrow;": '\U00002192', + "rightarrowtail;": '\U000021A3', + "rightharpoondown;": '\U000021C1', + "rightharpoonup;": '\U000021C0', + "rightleftarrows;": '\U000021C4', + "rightleftharpoons;": '\U000021CC', + "rightrightarrows;": '\U000021C9', + "rightsquigarrow;": '\U0000219D', + "rightthreetimes;": '\U000022CC', + "ring;": '\U000002DA', + "risingdotseq;": '\U00002253', + "rlarr;": '\U000021C4', + "rlhar;": '\U000021CC', + "rlm;": '\U0000200F', + "rmoust;": '\U000023B1', + "rmoustache;": '\U000023B1', + "rnmid;": '\U00002AEE', + "roang;": '\U000027ED', + "roarr;": '\U000021FE', + "robrk;": '\U000027E7', + "ropar;": '\U00002986', + "ropf;": '\U0001D563', + "roplus;": '\U00002A2E', + "rotimes;": '\U00002A35', + "rpar;": '\U00000029', + "rpargt;": '\U00002994', + "rppolint;": '\U00002A12', + "rrarr;": '\U000021C9', + "rsaquo;": '\U0000203A', + "rscr;": '\U0001D4C7', + "rsh;": '\U000021B1', + "rsqb;": '\U0000005D', + "rsquo;": '\U00002019', + "rsquor;": '\U00002019', + "rthree;": '\U000022CC', + "rtimes;": '\U000022CA', + "rtri;": '\U000025B9', + "rtrie;": '\U000022B5', + "rtrif;": '\U000025B8', + "rtriltri;": '\U000029CE', + "ruluhar;": '\U00002968', + "rx;": '\U0000211E', + "sacute;": '\U0000015B', + "sbquo;": '\U0000201A', + "sc;": '\U0000227B', + "scE;": '\U00002AB4', + "scap;": '\U00002AB8', + "scaron;": '\U00000161', + "sccue;": '\U0000227D', + "sce;": '\U00002AB0', + "scedil;": '\U0000015F', + "scirc;": '\U0000015D', + "scnE;": '\U00002AB6', + "scnap;": '\U00002ABA', + "scnsim;": '\U000022E9', + "scpolint;": '\U00002A13', + "scsim;": '\U0000227F', + "scy;": '\U00000441', + "sdot;": '\U000022C5', + "sdotb;": '\U000022A1', + "sdote;": '\U00002A66', + "seArr;": '\U000021D8', + "searhk;": '\U00002925', + "searr;": '\U00002198', + "searrow;": '\U00002198', + "sect;": '\U000000A7', + "semi;": '\U0000003B', + "seswar;": '\U00002929', + "setminus;": '\U00002216', + "setmn;": '\U00002216', + "sext;": '\U00002736', + "sfr;": '\U0001D530', + "sfrown;": '\U00002322', + "sharp;": '\U0000266F', + "shchcy;": '\U00000449', + "shcy;": '\U00000448', + "shortmid;": '\U00002223', + "shortparallel;": '\U00002225', + "shy;": '\U000000AD', + "sigma;": '\U000003C3', + "sigmaf;": '\U000003C2', + "sigmav;": '\U000003C2', + "sim;": '\U0000223C', + "simdot;": '\U00002A6A', + "sime;": '\U00002243', + "simeq;": '\U00002243', + "simg;": '\U00002A9E', + "simgE;": '\U00002AA0', + "siml;": '\U00002A9D', + "simlE;": '\U00002A9F', + "simne;": '\U00002246', + "simplus;": '\U00002A24', + "simrarr;": '\U00002972', + "slarr;": '\U00002190', + "smallsetminus;": '\U00002216', + "smashp;": '\U00002A33', + "smeparsl;": '\U000029E4', + "smid;": '\U00002223', + "smile;": '\U00002323', + "smt;": '\U00002AAA', + "smte;": '\U00002AAC', + "softcy;": '\U0000044C', + "sol;": '\U0000002F', + "solb;": '\U000029C4', + "solbar;": '\U0000233F', + "sopf;": '\U0001D564', + "spades;": '\U00002660', + "spadesuit;": '\U00002660', + "spar;": '\U00002225', + "sqcap;": '\U00002293', + "sqcup;": '\U00002294', + "sqsub;": '\U0000228F', + "sqsube;": '\U00002291', + "sqsubset;": '\U0000228F', + "sqsubseteq;": '\U00002291', + "sqsup;": '\U00002290', + "sqsupe;": '\U00002292', + "sqsupset;": '\U00002290', + "sqsupseteq;": '\U00002292', + "squ;": '\U000025A1', + "square;": '\U000025A1', + "squarf;": '\U000025AA', + "squf;": '\U000025AA', + "srarr;": '\U00002192', + "sscr;": '\U0001D4C8', + "ssetmn;": '\U00002216', + "ssmile;": '\U00002323', + "sstarf;": '\U000022C6', + "star;": '\U00002606', + "starf;": '\U00002605', + "straightepsilon;": '\U000003F5', + "straightphi;": '\U000003D5', + "strns;": '\U000000AF', + "sub;": '\U00002282', + "subE;": '\U00002AC5', + "subdot;": '\U00002ABD', + "sube;": '\U00002286', + "subedot;": '\U00002AC3', + "submult;": '\U00002AC1', + "subnE;": '\U00002ACB', + "subne;": '\U0000228A', + "subplus;": '\U00002ABF', + "subrarr;": '\U00002979', + "subset;": '\U00002282', + "subseteq;": '\U00002286', + "subseteqq;": '\U00002AC5', + "subsetneq;": '\U0000228A', + "subsetneqq;": '\U00002ACB', + "subsim;": '\U00002AC7', + "subsub;": '\U00002AD5', + "subsup;": '\U00002AD3', + "succ;": '\U0000227B', + "succapprox;": '\U00002AB8', + "succcurlyeq;": '\U0000227D', + "succeq;": '\U00002AB0', + "succnapprox;": '\U00002ABA', + "succneqq;": '\U00002AB6', + "succnsim;": '\U000022E9', + "succsim;": '\U0000227F', + "sum;": '\U00002211', + "sung;": '\U0000266A', + "sup;": '\U00002283', + "sup1;": '\U000000B9', + "sup2;": '\U000000B2', + "sup3;": '\U000000B3', + "supE;": '\U00002AC6', + "supdot;": '\U00002ABE', + "supdsub;": '\U00002AD8', + "supe;": '\U00002287', + "supedot;": '\U00002AC4', + "suphsol;": '\U000027C9', + "suphsub;": '\U00002AD7', + "suplarr;": '\U0000297B', + "supmult;": '\U00002AC2', + "supnE;": '\U00002ACC', + "supne;": '\U0000228B', + "supplus;": '\U00002AC0', + "supset;": '\U00002283', + "supseteq;": '\U00002287', + "supseteqq;": '\U00002AC6', + "supsetneq;": '\U0000228B', + "supsetneqq;": '\U00002ACC', + "supsim;": '\U00002AC8', + "supsub;": '\U00002AD4', + "supsup;": '\U00002AD6', + "swArr;": '\U000021D9', + "swarhk;": '\U00002926', + "swarr;": '\U00002199', + "swarrow;": '\U00002199', + "swnwar;": '\U0000292A', + "szlig;": '\U000000DF', + "target;": '\U00002316', + "tau;": '\U000003C4', + "tbrk;": '\U000023B4', + "tcaron;": '\U00000165', + "tcedil;": '\U00000163', + "tcy;": '\U00000442', + "tdot;": '\U000020DB', + "telrec;": '\U00002315', + "tfr;": '\U0001D531', + "there4;": '\U00002234', + "therefore;": '\U00002234', + "theta;": '\U000003B8', + "thetasym;": '\U000003D1', + "thetav;": '\U000003D1', + "thickapprox;": '\U00002248', + "thicksim;": '\U0000223C', + "thinsp;": '\U00002009', + "thkap;": '\U00002248', + "thksim;": '\U0000223C', + "thorn;": '\U000000FE', + "tilde;": '\U000002DC', + "times;": '\U000000D7', + "timesb;": '\U000022A0', + "timesbar;": '\U00002A31', + "timesd;": '\U00002A30', + "tint;": '\U0000222D', + "toea;": '\U00002928', + "top;": '\U000022A4', + "topbot;": '\U00002336', + "topcir;": '\U00002AF1', + "topf;": '\U0001D565', + "topfork;": '\U00002ADA', + "tosa;": '\U00002929', + "tprime;": '\U00002034', + "trade;": '\U00002122', + "triangle;": '\U000025B5', + "triangledown;": '\U000025BF', + "triangleleft;": '\U000025C3', + "trianglelefteq;": '\U000022B4', + "triangleq;": '\U0000225C', + "triangleright;": '\U000025B9', + "trianglerighteq;": '\U000022B5', + "tridot;": '\U000025EC', + "trie;": '\U0000225C', + "triminus;": '\U00002A3A', + "triplus;": '\U00002A39', + "trisb;": '\U000029CD', + "tritime;": '\U00002A3B', + "trpezium;": '\U000023E2', + "tscr;": '\U0001D4C9', + "tscy;": '\U00000446', + "tshcy;": '\U0000045B', + "tstrok;": '\U00000167', + "twixt;": '\U0000226C', + "twoheadleftarrow;": '\U0000219E', + "twoheadrightarrow;": '\U000021A0', + "uArr;": '\U000021D1', + "uHar;": '\U00002963', + "uacute;": '\U000000FA', + "uarr;": '\U00002191', + "ubrcy;": '\U0000045E', + "ubreve;": '\U0000016D', + "ucirc;": '\U000000FB', + "ucy;": '\U00000443', + "udarr;": '\U000021C5', + "udblac;": '\U00000171', + "udhar;": '\U0000296E', + "ufisht;": '\U0000297E', + "ufr;": '\U0001D532', + "ugrave;": '\U000000F9', + "uharl;": '\U000021BF', + "uharr;": '\U000021BE', + "uhblk;": '\U00002580', + "ulcorn;": '\U0000231C', + "ulcorner;": '\U0000231C', + "ulcrop;": '\U0000230F', + "ultri;": '\U000025F8', + "umacr;": '\U0000016B', + "uml;": '\U000000A8', + "uogon;": '\U00000173', + "uopf;": '\U0001D566', + "uparrow;": '\U00002191', + "updownarrow;": '\U00002195', + "upharpoonleft;": '\U000021BF', + "upharpoonright;": '\U000021BE', + "uplus;": '\U0000228E', + "upsi;": '\U000003C5', + "upsih;": '\U000003D2', + "upsilon;": '\U000003C5', + "upuparrows;": '\U000021C8', + "urcorn;": '\U0000231D', + "urcorner;": '\U0000231D', + "urcrop;": '\U0000230E', + "uring;": '\U0000016F', + "urtri;": '\U000025F9', + "uscr;": '\U0001D4CA', + "utdot;": '\U000022F0', + "utilde;": '\U00000169', + "utri;": '\U000025B5', + "utrif;": '\U000025B4', + "uuarr;": '\U000021C8', + "uuml;": '\U000000FC', + "uwangle;": '\U000029A7', + "vArr;": '\U000021D5', + "vBar;": '\U00002AE8', + "vBarv;": '\U00002AE9', + "vDash;": '\U000022A8', + "vangrt;": '\U0000299C', + "varepsilon;": '\U000003F5', + "varkappa;": '\U000003F0', + "varnothing;": '\U00002205', + "varphi;": '\U000003D5', + "varpi;": '\U000003D6', + "varpropto;": '\U0000221D', + "varr;": '\U00002195', + "varrho;": '\U000003F1', + "varsigma;": '\U000003C2', + "vartheta;": '\U000003D1', + "vartriangleleft;": '\U000022B2', + "vartriangleright;": '\U000022B3', + "vcy;": '\U00000432', + "vdash;": '\U000022A2', + "vee;": '\U00002228', + "veebar;": '\U000022BB', + "veeeq;": '\U0000225A', + "vellip;": '\U000022EE', + "verbar;": '\U0000007C', + "vert;": '\U0000007C', + "vfr;": '\U0001D533', + "vltri;": '\U000022B2', + "vopf;": '\U0001D567', + "vprop;": '\U0000221D', + "vrtri;": '\U000022B3', + "vscr;": '\U0001D4CB', + "vzigzag;": '\U0000299A', + "wcirc;": '\U00000175', + "wedbar;": '\U00002A5F', + "wedge;": '\U00002227', + "wedgeq;": '\U00002259', + "weierp;": '\U00002118', + "wfr;": '\U0001D534', + "wopf;": '\U0001D568', + "wp;": '\U00002118', + "wr;": '\U00002240', + "wreath;": '\U00002240', + "wscr;": '\U0001D4CC', + "xcap;": '\U000022C2', + "xcirc;": '\U000025EF', + "xcup;": '\U000022C3', + "xdtri;": '\U000025BD', + "xfr;": '\U0001D535', + "xhArr;": '\U000027FA', + "xharr;": '\U000027F7', + "xi;": '\U000003BE', + "xlArr;": '\U000027F8', + "xlarr;": '\U000027F5', + "xmap;": '\U000027FC', + "xnis;": '\U000022FB', + "xodot;": '\U00002A00', + "xopf;": '\U0001D569', + "xoplus;": '\U00002A01', + "xotime;": '\U00002A02', + "xrArr;": '\U000027F9', + "xrarr;": '\U000027F6', + "xscr;": '\U0001D4CD', + "xsqcup;": '\U00002A06', + "xuplus;": '\U00002A04', + "xutri;": '\U000025B3', + "xvee;": '\U000022C1', + "xwedge;": '\U000022C0', + "yacute;": '\U000000FD', + "yacy;": '\U0000044F', + "ycirc;": '\U00000177', + "ycy;": '\U0000044B', + "yen;": '\U000000A5', + "yfr;": '\U0001D536', + "yicy;": '\U00000457', + "yopf;": '\U0001D56A', + "yscr;": '\U0001D4CE', + "yucy;": '\U0000044E', + "yuml;": '\U000000FF', + "zacute;": '\U0000017A', + "zcaron;": '\U0000017E', + "zcy;": '\U00000437', + "zdot;": '\U0000017C', + "zeetrf;": '\U00002128', + "zeta;": '\U000003B6', + "zfr;": '\U0001D537', + "zhcy;": '\U00000436', + "zigrarr;": '\U000021DD', + "zopf;": '\U0001D56B', + "zscr;": '\U0001D4CF', + "zwj;": '\U0000200D', + "zwnj;": '\U0000200C', + "AElig": '\U000000C6', + "AMP": '\U00000026', + "Aacute": '\U000000C1', + "Acirc": '\U000000C2', + "Agrave": '\U000000C0', + "Aring": '\U000000C5', + "Atilde": '\U000000C3', + "Auml": '\U000000C4', + "COPY": '\U000000A9', + "Ccedil": '\U000000C7', + "ETH": '\U000000D0', + "Eacute": '\U000000C9', + "Ecirc": '\U000000CA', + "Egrave": '\U000000C8', + "Euml": '\U000000CB', + "GT": '\U0000003E', + "Iacute": '\U000000CD', + "Icirc": '\U000000CE', + "Igrave": '\U000000CC', + "Iuml": '\U000000CF', + "LT": '\U0000003C', + "Ntilde": '\U000000D1', + "Oacute": '\U000000D3', + "Ocirc": '\U000000D4', + "Ograve": '\U000000D2', + "Oslash": '\U000000D8', + "Otilde": '\U000000D5', + "Ouml": '\U000000D6', + "QUOT": '\U00000022', + "REG": '\U000000AE', + "THORN": '\U000000DE', + "Uacute": '\U000000DA', + "Ucirc": '\U000000DB', + "Ugrave": '\U000000D9', + "Uuml": '\U000000DC', + "Yacute": '\U000000DD', + "aacute": '\U000000E1', + "acirc": '\U000000E2', + "acute": '\U000000B4', + "aelig": '\U000000E6', + "agrave": '\U000000E0', + "amp": '\U00000026', + "aring": '\U000000E5', + "atilde": '\U000000E3', + "auml": '\U000000E4', + "brvbar": '\U000000A6', + "ccedil": '\U000000E7', + "cedil": '\U000000B8', + "cent": '\U000000A2', + "copy": '\U000000A9', + "curren": '\U000000A4', + "deg": '\U000000B0', + "divide": '\U000000F7', + "eacute": '\U000000E9', + "ecirc": '\U000000EA', + "egrave": '\U000000E8', + "eth": '\U000000F0', + "euml": '\U000000EB', + "frac12": '\U000000BD', + "frac14": '\U000000BC', + "frac34": '\U000000BE', + "gt": '\U0000003E', + "iacute": '\U000000ED', + "icirc": '\U000000EE', + "iexcl": '\U000000A1', + "igrave": '\U000000EC', + "iquest": '\U000000BF', + "iuml": '\U000000EF', + "laquo": '\U000000AB', + "lt": '\U0000003C', + "macr": '\U000000AF', + "micro": '\U000000B5', + "middot": '\U000000B7', + "nbsp": '\U000000A0', + "not": '\U000000AC', + "ntilde": '\U000000F1', + "oacute": '\U000000F3', + "ocirc": '\U000000F4', + "ograve": '\U000000F2', + "ordf": '\U000000AA', + "ordm": '\U000000BA', + "oslash": '\U000000F8', + "otilde": '\U000000F5', + "ouml": '\U000000F6', + "para": '\U000000B6', + "plusmn": '\U000000B1', + "pound": '\U000000A3', + "quot": '\U00000022', + "raquo": '\U000000BB', + "reg": '\U000000AE', + "sect": '\U000000A7', + "shy": '\U000000AD', + "sup1": '\U000000B9', + "sup2": '\U000000B2', + "sup3": '\U000000B3', + "szlig": '\U000000DF', + "thorn": '\U000000FE', + "times": '\U000000D7', + "uacute": '\U000000FA', + "ucirc": '\U000000FB', + "ugrave": '\U000000F9', + "uml": '\U000000A8', + "uuml": '\U000000FC', + "yacute": '\U000000FD', + "yen": '\U000000A5', + "yuml": '\U000000FF', +} + +// HTML entities that are two unicode codepoints. +var entity2 = map[string][2]rune{ + // TODO(nigeltao): Handle replacements that are wider than their names. + // "nLt;": {'\u226A', '\u20D2'}, + // "nGt;": {'\u226B', '\u20D2'}, + "NotEqualTilde;": {'\u2242', '\u0338'}, + "NotGreaterFullEqual;": {'\u2267', '\u0338'}, + "NotGreaterGreater;": {'\u226B', '\u0338'}, + "NotGreaterSlantEqual;": {'\u2A7E', '\u0338'}, + "NotHumpDownHump;": {'\u224E', '\u0338'}, + "NotHumpEqual;": {'\u224F', '\u0338'}, + "NotLeftTriangleBar;": {'\u29CF', '\u0338'}, + "NotLessLess;": {'\u226A', '\u0338'}, + "NotLessSlantEqual;": {'\u2A7D', '\u0338'}, + "NotNestedGreaterGreater;": {'\u2AA2', '\u0338'}, + "NotNestedLessLess;": {'\u2AA1', '\u0338'}, + "NotPrecedesEqual;": {'\u2AAF', '\u0338'}, + "NotRightTriangleBar;": {'\u29D0', '\u0338'}, + "NotSquareSubset;": {'\u228F', '\u0338'}, + "NotSquareSuperset;": {'\u2290', '\u0338'}, + "NotSubset;": {'\u2282', '\u20D2'}, + "NotSucceedsEqual;": {'\u2AB0', '\u0338'}, + "NotSucceedsTilde;": {'\u227F', '\u0338'}, + "NotSuperset;": {'\u2283', '\u20D2'}, + "ThickSpace;": {'\u205F', '\u200A'}, + "acE;": {'\u223E', '\u0333'}, + "bne;": {'\u003D', '\u20E5'}, + "bnequiv;": {'\u2261', '\u20E5'}, + "caps;": {'\u2229', '\uFE00'}, + "cups;": {'\u222A', '\uFE00'}, + "fjlig;": {'\u0066', '\u006A'}, + "gesl;": {'\u22DB', '\uFE00'}, + "gvertneqq;": {'\u2269', '\uFE00'}, + "gvnE;": {'\u2269', '\uFE00'}, + "lates;": {'\u2AAD', '\uFE00'}, + "lesg;": {'\u22DA', '\uFE00'}, + "lvertneqq;": {'\u2268', '\uFE00'}, + "lvnE;": {'\u2268', '\uFE00'}, + "nGg;": {'\u22D9', '\u0338'}, + "nGtv;": {'\u226B', '\u0338'}, + "nLl;": {'\u22D8', '\u0338'}, + "nLtv;": {'\u226A', '\u0338'}, + "nang;": {'\u2220', '\u20D2'}, + "napE;": {'\u2A70', '\u0338'}, + "napid;": {'\u224B', '\u0338'}, + "nbump;": {'\u224E', '\u0338'}, + "nbumpe;": {'\u224F', '\u0338'}, + "ncongdot;": {'\u2A6D', '\u0338'}, + "nedot;": {'\u2250', '\u0338'}, + "nesim;": {'\u2242', '\u0338'}, + "ngE;": {'\u2267', '\u0338'}, + "ngeqq;": {'\u2267', '\u0338'}, + "ngeqslant;": {'\u2A7E', '\u0338'}, + "nges;": {'\u2A7E', '\u0338'}, + "nlE;": {'\u2266', '\u0338'}, + "nleqq;": {'\u2266', '\u0338'}, + "nleqslant;": {'\u2A7D', '\u0338'}, + "nles;": {'\u2A7D', '\u0338'}, + "notinE;": {'\u22F9', '\u0338'}, + "notindot;": {'\u22F5', '\u0338'}, + "nparsl;": {'\u2AFD', '\u20E5'}, + "npart;": {'\u2202', '\u0338'}, + "npre;": {'\u2AAF', '\u0338'}, + "npreceq;": {'\u2AAF', '\u0338'}, + "nrarrc;": {'\u2933', '\u0338'}, + "nrarrw;": {'\u219D', '\u0338'}, + "nsce;": {'\u2AB0', '\u0338'}, + "nsubE;": {'\u2AC5', '\u0338'}, + "nsubset;": {'\u2282', '\u20D2'}, + "nsubseteqq;": {'\u2AC5', '\u0338'}, + "nsucceq;": {'\u2AB0', '\u0338'}, + "nsupE;": {'\u2AC6', '\u0338'}, + "nsupset;": {'\u2283', '\u20D2'}, + "nsupseteqq;": {'\u2AC6', '\u0338'}, + "nvap;": {'\u224D', '\u20D2'}, + "nvge;": {'\u2265', '\u20D2'}, + "nvgt;": {'\u003E', '\u20D2'}, + "nvle;": {'\u2264', '\u20D2'}, + "nvlt;": {'\u003C', '\u20D2'}, + "nvltrie;": {'\u22B4', '\u20D2'}, + "nvrtrie;": {'\u22B5', '\u20D2'}, + "nvsim;": {'\u223C', '\u20D2'}, + "race;": {'\u223D', '\u0331'}, + "smtes;": {'\u2AAC', '\uFE00'}, + "sqcaps;": {'\u2293', '\uFE00'}, + "sqcups;": {'\u2294', '\uFE00'}, + "varsubsetneq;": {'\u228A', '\uFE00'}, + "varsubsetneqq;": {'\u2ACB', '\uFE00'}, + "varsupsetneq;": {'\u228B', '\uFE00'}, + "varsupsetneqq;": {'\u2ACC', '\uFE00'}, + "vnsub;": {'\u2282', '\u20D2'}, + "vnsup;": {'\u2283', '\u20D2'}, + "vsubnE;": {'\u2ACB', '\uFE00'}, + "vsubne;": {'\u228A', '\uFE00'}, + "vsupnE;": {'\u2ACC', '\uFE00'}, + "vsupne;": {'\u228B', '\uFE00'}, +} diff --git a/vendor/golang.org/x/net/html/entity_test.go b/vendor/golang.org/x/net/html/entity_test.go new file mode 100644 index 0000000..b53f866 --- /dev/null +++ b/vendor/golang.org/x/net/html/entity_test.go @@ -0,0 +1,29 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package html + +import ( + "testing" + "unicode/utf8" +) + +func TestEntityLength(t *testing.T) { + // We verify that the length of UTF-8 encoding of each value is <= 1 + len(key). + // The +1 comes from the leading "&". This property implies that the length of + // unescaped text is <= the length of escaped text. + for k, v := range entity { + if 1+len(k) < utf8.RuneLen(v) { + t.Error("escaped entity &" + k + " is shorter than its UTF-8 encoding " + string(v)) + } + if len(k) > longestEntityWithoutSemicolon && k[len(k)-1] != ';' { + t.Errorf("entity name %s is %d characters, but longestEntityWithoutSemicolon=%d", k, len(k), longestEntityWithoutSemicolon) + } + } + for k, v := range entity2 { + if 1+len(k) < utf8.RuneLen(v[0])+utf8.RuneLen(v[1]) { + t.Error("escaped entity &" + k + " is shorter than its UTF-8 encoding " + string(v[0]) + string(v[1])) + } + } +} diff --git a/vendor/golang.org/x/net/html/escape.go b/vendor/golang.org/x/net/html/escape.go new file mode 100644 index 0000000..d856139 --- /dev/null +++ b/vendor/golang.org/x/net/html/escape.go @@ -0,0 +1,258 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package html + +import ( + "bytes" + "strings" + "unicode/utf8" +) + +// These replacements permit compatibility with old numeric entities that +// assumed Windows-1252 encoding. +// https://html.spec.whatwg.org/multipage/syntax.html#consume-a-character-reference +var replacementTable = [...]rune{ + '\u20AC', // First entry is what 0x80 should be replaced with. + '\u0081', + '\u201A', + '\u0192', + '\u201E', + '\u2026', + '\u2020', + '\u2021', + '\u02C6', + '\u2030', + '\u0160', + '\u2039', + '\u0152', + '\u008D', + '\u017D', + '\u008F', + '\u0090', + '\u2018', + '\u2019', + '\u201C', + '\u201D', + '\u2022', + '\u2013', + '\u2014', + '\u02DC', + '\u2122', + '\u0161', + '\u203A', + '\u0153', + '\u009D', + '\u017E', + '\u0178', // Last entry is 0x9F. + // 0x00->'\uFFFD' is handled programmatically. + // 0x0D->'\u000D' is a no-op. +} + +// unescapeEntity reads an entity like "<" from b[src:] and writes the +// corresponding "<" to b[dst:], returning the incremented dst and src cursors. +// Precondition: b[src] == '&' && dst <= src. +// attribute should be true if parsing an attribute value. +func unescapeEntity(b []byte, dst, src int, attribute bool) (dst1, src1 int) { + // https://html.spec.whatwg.org/multipage/syntax.html#consume-a-character-reference + + // i starts at 1 because we already know that s[0] == '&'. + i, s := 1, b[src:] + + if len(s) <= 1 { + b[dst] = b[src] + return dst + 1, src + 1 + } + + if s[i] == '#' { + if len(s) <= 3 { // We need to have at least "&#.". + b[dst] = b[src] + return dst + 1, src + 1 + } + i++ + c := s[i] + hex := false + if c == 'x' || c == 'X' { + hex = true + i++ + } + + x := '\x00' + for i < len(s) { + c = s[i] + i++ + if hex { + if '0' <= c && c <= '9' { + x = 16*x + rune(c) - '0' + continue + } else if 'a' <= c && c <= 'f' { + x = 16*x + rune(c) - 'a' + 10 + continue + } else if 'A' <= c && c <= 'F' { + x = 16*x + rune(c) - 'A' + 10 + continue + } + } else if '0' <= c && c <= '9' { + x = 10*x + rune(c) - '0' + continue + } + if c != ';' { + i-- + } + break + } + + if i <= 3 { // No characters matched. + b[dst] = b[src] + return dst + 1, src + 1 + } + + if 0x80 <= x && x <= 0x9F { + // Replace characters from Windows-1252 with UTF-8 equivalents. + x = replacementTable[x-0x80] + } else if x == 0 || (0xD800 <= x && x <= 0xDFFF) || x > 0x10FFFF { + // Replace invalid characters with the replacement character. + x = '\uFFFD' + } + + return dst + utf8.EncodeRune(b[dst:], x), src + i + } + + // Consume the maximum number of characters possible, with the + // consumed characters matching one of the named references. + + for i < len(s) { + c := s[i] + i++ + // Lower-cased characters are more common in entities, so we check for them first. + if 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z' || '0' <= c && c <= '9' { + continue + } + if c != ';' { + i-- + } + break + } + + entityName := string(s[1:i]) + if entityName == "" { + // No-op. + } else if attribute && entityName[len(entityName)-1] != ';' && len(s) > i && s[i] == '=' { + // No-op. + } else if x := entity[entityName]; x != 0 { + return dst + utf8.EncodeRune(b[dst:], x), src + i + } else if x := entity2[entityName]; x[0] != 0 { + dst1 := dst + utf8.EncodeRune(b[dst:], x[0]) + return dst1 + utf8.EncodeRune(b[dst1:], x[1]), src + i + } else if !attribute { + maxLen := len(entityName) - 1 + if maxLen > longestEntityWithoutSemicolon { + maxLen = longestEntityWithoutSemicolon + } + for j := maxLen; j > 1; j-- { + if x := entity[entityName[:j]]; x != 0 { + return dst + utf8.EncodeRune(b[dst:], x), src + j + 1 + } + } + } + + dst1, src1 = dst+i, src+i + copy(b[dst:dst1], b[src:src1]) + return dst1, src1 +} + +// unescape unescapes b's entities in-place, so that "a<b" becomes "a': + esc = ">" + case '"': + // """ is shorter than """. + esc = """ + case '\r': + esc = " " + default: + panic("unrecognized escape character") + } + s = s[i+1:] + if _, err := w.WriteString(esc); err != nil { + return err + } + i = strings.IndexAny(s, escapedChars) + } + _, err := w.WriteString(s) + return err +} + +// EscapeString escapes special characters like "<" to become "<". It +// escapes only five such characters: <, >, &, ' and ". +// UnescapeString(EscapeString(s)) == s always holds, but the converse isn't +// always true. +func EscapeString(s string) string { + if strings.IndexAny(s, escapedChars) == -1 { + return s + } + var buf bytes.Buffer + escape(&buf, s) + return buf.String() +} + +// UnescapeString unescapes entities like "<" to become "<". It unescapes a +// larger range of entities than EscapeString escapes. For example, "á" +// unescapes to "á", as does "á" and "&xE1;". +// UnescapeString(EscapeString(s)) == s always holds, but the converse isn't +// always true. +func UnescapeString(s string) string { + for _, c := range s { + if c == '&' { + return string(unescape([]byte(s), false)) + } + } + return s +} diff --git a/vendor/golang.org/x/net/html/escape_test.go b/vendor/golang.org/x/net/html/escape_test.go new file mode 100644 index 0000000..b405d4b --- /dev/null +++ b/vendor/golang.org/x/net/html/escape_test.go @@ -0,0 +1,97 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package html + +import "testing" + +type unescapeTest struct { + // A short description of the test case. + desc string + // The HTML text. + html string + // The unescaped text. + unescaped string +} + +var unescapeTests = []unescapeTest{ + // Handle no entities. + { + "copy", + "A\ttext\nstring", + "A\ttext\nstring", + }, + // Handle simple named entities. + { + "simple", + "& > <", + "& > <", + }, + // Handle hitting the end of the string. + { + "stringEnd", + "& &", + "& &", + }, + // Handle entities with two codepoints. + { + "multiCodepoint", + "text ⋛︀ blah", + "text \u22db\ufe00 blah", + }, + // Handle decimal numeric entities. + { + "decimalEntity", + "Delta = Δ ", + "Delta = Δ ", + }, + // Handle hexadecimal numeric entities. + { + "hexadecimalEntity", + "Lambda = λ = λ ", + "Lambda = λ = λ ", + }, + // Handle numeric early termination. + { + "numericEnds", + "&# &#x €43 © = ©f = ©", + "&# &#x €43 © = ©f = ©", + }, + // Handle numeric ISO-8859-1 entity replacements. + { + "numericReplacements", + "Footnote‡", + "Footnote‡", + }, +} + +func TestUnescape(t *testing.T) { + for _, tt := range unescapeTests { + unescaped := UnescapeString(tt.html) + if unescaped != tt.unescaped { + t.Errorf("TestUnescape %s: want %q, got %q", tt.desc, tt.unescaped, unescaped) + } + } +} + +func TestUnescapeEscape(t *testing.T) { + ss := []string{ + ``, + `abc def`, + `a & b`, + `a&b`, + `a & b`, + `"`, + `"`, + `"<&>"`, + `"<&>"`, + `3&5==1 && 0<1, "0<1", a+acute=á`, + `The special characters are: <, >, &, ' and "`, + } + for _, s := range ss { + if got := UnescapeString(EscapeString(s)); got != s { + t.Errorf("got %q want %q", got, s) + } + } +} diff --git a/vendor/golang.org/x/net/html/example_test.go b/vendor/golang.org/x/net/html/example_test.go new file mode 100644 index 0000000..0b06ed7 --- /dev/null +++ b/vendor/golang.org/x/net/html/example_test.go @@ -0,0 +1,40 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// This example demonstrates parsing HTML data and walking the resulting tree. +package html_test + +import ( + "fmt" + "log" + "strings" + + "golang.org/x/net/html" +) + +func ExampleParse() { + s := `

Links:

` + doc, err := html.Parse(strings.NewReader(s)) + if err != nil { + log.Fatal(err) + } + var f func(*html.Node) + f = func(n *html.Node) { + if n.Type == html.ElementNode && n.Data == "a" { + for _, a := range n.Attr { + if a.Key == "href" { + fmt.Println(a.Val) + break + } + } + } + for c := n.FirstChild; c != nil; c = c.NextSibling { + f(c) + } + } + f(doc) + // Output: + // foo + // /bar/baz +} diff --git a/vendor/golang.org/x/net/html/foreign.go b/vendor/golang.org/x/net/html/foreign.go new file mode 100644 index 0000000..d3b3844 --- /dev/null +++ b/vendor/golang.org/x/net/html/foreign.go @@ -0,0 +1,226 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package html + +import ( + "strings" +) + +func adjustAttributeNames(aa []Attribute, nameMap map[string]string) { + for i := range aa { + if newName, ok := nameMap[aa[i].Key]; ok { + aa[i].Key = newName + } + } +} + +func adjustForeignAttributes(aa []Attribute) { + for i, a := range aa { + if a.Key == "" || a.Key[0] != 'x' { + continue + } + switch a.Key { + case "xlink:actuate", "xlink:arcrole", "xlink:href", "xlink:role", "xlink:show", + "xlink:title", "xlink:type", "xml:base", "xml:lang", "xml:space", "xmlns:xlink": + j := strings.Index(a.Key, ":") + aa[i].Namespace = a.Key[:j] + aa[i].Key = a.Key[j+1:] + } + } +} + +func htmlIntegrationPoint(n *Node) bool { + if n.Type != ElementNode { + return false + } + switch n.Namespace { + case "math": + if n.Data == "annotation-xml" { + for _, a := range n.Attr { + if a.Key == "encoding" { + val := strings.ToLower(a.Val) + if val == "text/html" || val == "application/xhtml+xml" { + return true + } + } + } + } + case "svg": + switch n.Data { + case "desc", "foreignObject", "title": + return true + } + } + return false +} + +func mathMLTextIntegrationPoint(n *Node) bool { + if n.Namespace != "math" { + return false + } + switch n.Data { + case "mi", "mo", "mn", "ms", "mtext": + return true + } + return false +} + +// Section 12.2.5.5. +var breakout = map[string]bool{ + "b": true, + "big": true, + "blockquote": true, + "body": true, + "br": true, + "center": true, + "code": true, + "dd": true, + "div": true, + "dl": true, + "dt": true, + "em": true, + "embed": true, + "h1": true, + "h2": true, + "h3": true, + "h4": true, + "h5": true, + "h6": true, + "head": true, + "hr": true, + "i": true, + "img": true, + "li": true, + "listing": true, + "menu": true, + "meta": true, + "nobr": true, + "ol": true, + "p": true, + "pre": true, + "ruby": true, + "s": true, + "small": true, + "span": true, + "strong": true, + "strike": true, + "sub": true, + "sup": true, + "table": true, + "tt": true, + "u": true, + "ul": true, + "var": true, +} + +// Section 12.2.5.5. +var svgTagNameAdjustments = map[string]string{ + "altglyph": "altGlyph", + "altglyphdef": "altGlyphDef", + "altglyphitem": "altGlyphItem", + "animatecolor": "animateColor", + "animatemotion": "animateMotion", + "animatetransform": "animateTransform", + "clippath": "clipPath", + "feblend": "feBlend", + "fecolormatrix": "feColorMatrix", + "fecomponenttransfer": "feComponentTransfer", + "fecomposite": "feComposite", + "feconvolvematrix": "feConvolveMatrix", + "fediffuselighting": "feDiffuseLighting", + "fedisplacementmap": "feDisplacementMap", + "fedistantlight": "feDistantLight", + "feflood": "feFlood", + "fefunca": "feFuncA", + "fefuncb": "feFuncB", + "fefuncg": "feFuncG", + "fefuncr": "feFuncR", + "fegaussianblur": "feGaussianBlur", + "feimage": "feImage", + "femerge": "feMerge", + "femergenode": "feMergeNode", + "femorphology": "feMorphology", + "feoffset": "feOffset", + "fepointlight": "fePointLight", + "fespecularlighting": "feSpecularLighting", + "fespotlight": "feSpotLight", + "fetile": "feTile", + "feturbulence": "feTurbulence", + "foreignobject": "foreignObject", + "glyphref": "glyphRef", + "lineargradient": "linearGradient", + "radialgradient": "radialGradient", + "textpath": "textPath", +} + +// Section 12.2.5.1 +var mathMLAttributeAdjustments = map[string]string{ + "definitionurl": "definitionURL", +} + +var svgAttributeAdjustments = map[string]string{ + "attributename": "attributeName", + "attributetype": "attributeType", + "basefrequency": "baseFrequency", + "baseprofile": "baseProfile", + "calcmode": "calcMode", + "clippathunits": "clipPathUnits", + "contentscripttype": "contentScriptType", + "contentstyletype": "contentStyleType", + "diffuseconstant": "diffuseConstant", + "edgemode": "edgeMode", + "externalresourcesrequired": "externalResourcesRequired", + "filterres": "filterRes", + "filterunits": "filterUnits", + "glyphref": "glyphRef", + "gradienttransform": "gradientTransform", + "gradientunits": "gradientUnits", + "kernelmatrix": "kernelMatrix", + "kernelunitlength": "kernelUnitLength", + "keypoints": "keyPoints", + "keysplines": "keySplines", + "keytimes": "keyTimes", + "lengthadjust": "lengthAdjust", + "limitingconeangle": "limitingConeAngle", + "markerheight": "markerHeight", + "markerunits": "markerUnits", + "markerwidth": "markerWidth", + "maskcontentunits": "maskContentUnits", + "maskunits": "maskUnits", + "numoctaves": "numOctaves", + "pathlength": "pathLength", + "patterncontentunits": "patternContentUnits", + "patterntransform": "patternTransform", + "patternunits": "patternUnits", + "pointsatx": "pointsAtX", + "pointsaty": "pointsAtY", + "pointsatz": "pointsAtZ", + "preservealpha": "preserveAlpha", + "preserveaspectratio": "preserveAspectRatio", + "primitiveunits": "primitiveUnits", + "refx": "refX", + "refy": "refY", + "repeatcount": "repeatCount", + "repeatdur": "repeatDur", + "requiredextensions": "requiredExtensions", + "requiredfeatures": "requiredFeatures", + "specularconstant": "specularConstant", + "specularexponent": "specularExponent", + "spreadmethod": "spreadMethod", + "startoffset": "startOffset", + "stddeviation": "stdDeviation", + "stitchtiles": "stitchTiles", + "surfacescale": "surfaceScale", + "systemlanguage": "systemLanguage", + "tablevalues": "tableValues", + "targetx": "targetX", + "targety": "targetY", + "textlength": "textLength", + "viewbox": "viewBox", + "viewtarget": "viewTarget", + "xchannelselector": "xChannelSelector", + "ychannelselector": "yChannelSelector", + "zoomandpan": "zoomAndPan", +} diff --git a/vendor/golang.org/x/net/html/node.go b/vendor/golang.org/x/net/html/node.go new file mode 100644 index 0000000..26b657a --- /dev/null +++ b/vendor/golang.org/x/net/html/node.go @@ -0,0 +1,193 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package html + +import ( + "golang.org/x/net/html/atom" +) + +// A NodeType is the type of a Node. +type NodeType uint32 + +const ( + ErrorNode NodeType = iota + TextNode + DocumentNode + ElementNode + CommentNode + DoctypeNode + scopeMarkerNode +) + +// Section 12.2.3.3 says "scope markers are inserted when entering applet +// elements, buttons, object elements, marquees, table cells, and table +// captions, and are used to prevent formatting from 'leaking'". +var scopeMarker = Node{Type: scopeMarkerNode} + +// A Node consists of a NodeType and some Data (tag name for element nodes, +// content for text) and are part of a tree of Nodes. Element nodes may also +// have a Namespace and contain a slice of Attributes. Data is unescaped, so +// that it looks like "a 0 { + return (*s)[i-1] + } + return nil +} + +// index returns the index of the top-most occurrence of n in the stack, or -1 +// if n is not present. +func (s *nodeStack) index(n *Node) int { + for i := len(*s) - 1; i >= 0; i-- { + if (*s)[i] == n { + return i + } + } + return -1 +} + +// insert inserts a node at the given index. +func (s *nodeStack) insert(i int, n *Node) { + (*s) = append(*s, nil) + copy((*s)[i+1:], (*s)[i:]) + (*s)[i] = n +} + +// remove removes a node from the stack. It is a no-op if n is not present. +func (s *nodeStack) remove(n *Node) { + i := s.index(n) + if i == -1 { + return + } + copy((*s)[i:], (*s)[i+1:]) + j := len(*s) - 1 + (*s)[j] = nil + *s = (*s)[:j] +} diff --git a/vendor/golang.org/x/net/html/node_test.go b/vendor/golang.org/x/net/html/node_test.go new file mode 100644 index 0000000..471102f --- /dev/null +++ b/vendor/golang.org/x/net/html/node_test.go @@ -0,0 +1,146 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package html + +import ( + "fmt" +) + +// checkTreeConsistency checks that a node and its descendants are all +// consistent in their parent/child/sibling relationships. +func checkTreeConsistency(n *Node) error { + return checkTreeConsistency1(n, 0) +} + +func checkTreeConsistency1(n *Node, depth int) error { + if depth == 1e4 { + return fmt.Errorf("html: tree looks like it contains a cycle") + } + if err := checkNodeConsistency(n); err != nil { + return err + } + for c := n.FirstChild; c != nil; c = c.NextSibling { + if err := checkTreeConsistency1(c, depth+1); err != nil { + return err + } + } + return nil +} + +// checkNodeConsistency checks that a node's parent/child/sibling relationships +// are consistent. +func checkNodeConsistency(n *Node) error { + if n == nil { + return nil + } + + nParent := 0 + for p := n.Parent; p != nil; p = p.Parent { + nParent++ + if nParent == 1e4 { + return fmt.Errorf("html: parent list looks like an infinite loop") + } + } + + nForward := 0 + for c := n.FirstChild; c != nil; c = c.NextSibling { + nForward++ + if nForward == 1e6 { + return fmt.Errorf("html: forward list of children looks like an infinite loop") + } + if c.Parent != n { + return fmt.Errorf("html: inconsistent child/parent relationship") + } + } + + nBackward := 0 + for c := n.LastChild; c != nil; c = c.PrevSibling { + nBackward++ + if nBackward == 1e6 { + return fmt.Errorf("html: backward list of children looks like an infinite loop") + } + if c.Parent != n { + return fmt.Errorf("html: inconsistent child/parent relationship") + } + } + + if n.Parent != nil { + if n.Parent == n { + return fmt.Errorf("html: inconsistent parent relationship") + } + if n.Parent == n.FirstChild { + return fmt.Errorf("html: inconsistent parent/first relationship") + } + if n.Parent == n.LastChild { + return fmt.Errorf("html: inconsistent parent/last relationship") + } + if n.Parent == n.PrevSibling { + return fmt.Errorf("html: inconsistent parent/prev relationship") + } + if n.Parent == n.NextSibling { + return fmt.Errorf("html: inconsistent parent/next relationship") + } + + parentHasNAsAChild := false + for c := n.Parent.FirstChild; c != nil; c = c.NextSibling { + if c == n { + parentHasNAsAChild = true + break + } + } + if !parentHasNAsAChild { + return fmt.Errorf("html: inconsistent parent/child relationship") + } + } + + if n.PrevSibling != nil && n.PrevSibling.NextSibling != n { + return fmt.Errorf("html: inconsistent prev/next relationship") + } + if n.NextSibling != nil && n.NextSibling.PrevSibling != n { + return fmt.Errorf("html: inconsistent next/prev relationship") + } + + if (n.FirstChild == nil) != (n.LastChild == nil) { + return fmt.Errorf("html: inconsistent first/last relationship") + } + if n.FirstChild != nil && n.FirstChild == n.LastChild { + // We have a sole child. + if n.FirstChild.PrevSibling != nil || n.FirstChild.NextSibling != nil { + return fmt.Errorf("html: inconsistent sole child's sibling relationship") + } + } + + seen := map[*Node]bool{} + + var last *Node + for c := n.FirstChild; c != nil; c = c.NextSibling { + if seen[c] { + return fmt.Errorf("html: inconsistent repeated child") + } + seen[c] = true + last = c + } + if last != n.LastChild { + return fmt.Errorf("html: inconsistent last relationship") + } + + var first *Node + for c := n.LastChild; c != nil; c = c.PrevSibling { + if !seen[c] { + return fmt.Errorf("html: inconsistent missing child") + } + delete(seen, c) + first = c + } + if first != n.FirstChild { + return fmt.Errorf("html: inconsistent first relationship") + } + + if len(seen) != 0 { + return fmt.Errorf("html: inconsistent forwards/backwards child list") + } + + return nil +} diff --git a/vendor/golang.org/x/net/html/parse.go b/vendor/golang.org/x/net/html/parse.go new file mode 100644 index 0000000..be4b2bf --- /dev/null +++ b/vendor/golang.org/x/net/html/parse.go @@ -0,0 +1,2094 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package html + +import ( + "errors" + "fmt" + "io" + "strings" + + a "golang.org/x/net/html/atom" +) + +// A parser implements the HTML5 parsing algorithm: +// https://html.spec.whatwg.org/multipage/syntax.html#tree-construction +type parser struct { + // tokenizer provides the tokens for the parser. + tokenizer *Tokenizer + // tok is the most recently read token. + tok Token + // Self-closing tags like
are treated as start tags, except that + // hasSelfClosingToken is set while they are being processed. + hasSelfClosingToken bool + // doc is the document root element. + doc *Node + // The stack of open elements (section 12.2.3.2) and active formatting + // elements (section 12.2.3.3). + oe, afe nodeStack + // Element pointers (section 12.2.3.4). + head, form *Node + // Other parsing state flags (section 12.2.3.5). + scripting, framesetOK bool + // im is the current insertion mode. + im insertionMode + // originalIM is the insertion mode to go back to after completing a text + // or inTableText insertion mode. + originalIM insertionMode + // fosterParenting is whether new elements should be inserted according to + // the foster parenting rules (section 12.2.5.3). + fosterParenting bool + // quirks is whether the parser is operating in "quirks mode." + quirks bool + // fragment is whether the parser is parsing an HTML fragment. + fragment bool + // context is the context element when parsing an HTML fragment + // (section 12.4). + context *Node +} + +func (p *parser) top() *Node { + if n := p.oe.top(); n != nil { + return n + } + return p.doc +} + +// Stop tags for use in popUntil. These come from section 12.2.3.2. +var ( + defaultScopeStopTags = map[string][]a.Atom{ + "": {a.Applet, a.Caption, a.Html, a.Table, a.Td, a.Th, a.Marquee, a.Object, a.Template}, + "math": {a.AnnotationXml, a.Mi, a.Mn, a.Mo, a.Ms, a.Mtext}, + "svg": {a.Desc, a.ForeignObject, a.Title}, + } +) + +type scope int + +const ( + defaultScope scope = iota + listItemScope + buttonScope + tableScope + tableRowScope + tableBodyScope + selectScope +) + +// popUntil pops the stack of open elements at the highest element whose tag +// is in matchTags, provided there is no higher element in the scope's stop +// tags (as defined in section 12.2.3.2). It returns whether or not there was +// such an element. If there was not, popUntil leaves the stack unchanged. +// +// For example, the set of stop tags for table scope is: "html", "table". If +// the stack was: +// ["html", "body", "font", "table", "b", "i", "u"] +// then popUntil(tableScope, "font") would return false, but +// popUntil(tableScope, "i") would return true and the stack would become: +// ["html", "body", "font", "table", "b"] +// +// If an element's tag is in both the stop tags and matchTags, then the stack +// will be popped and the function returns true (provided, of course, there was +// no higher element in the stack that was also in the stop tags). For example, +// popUntil(tableScope, "table") returns true and leaves: +// ["html", "body", "font"] +func (p *parser) popUntil(s scope, matchTags ...a.Atom) bool { + if i := p.indexOfElementInScope(s, matchTags...); i != -1 { + p.oe = p.oe[:i] + return true + } + return false +} + +// indexOfElementInScope returns the index in p.oe of the highest element whose +// tag is in matchTags that is in scope. If no matching element is in scope, it +// returns -1. +func (p *parser) indexOfElementInScope(s scope, matchTags ...a.Atom) int { + for i := len(p.oe) - 1; i >= 0; i-- { + tagAtom := p.oe[i].DataAtom + if p.oe[i].Namespace == "" { + for _, t := range matchTags { + if t == tagAtom { + return i + } + } + switch s { + case defaultScope: + // No-op. + case listItemScope: + if tagAtom == a.Ol || tagAtom == a.Ul { + return -1 + } + case buttonScope: + if tagAtom == a.Button { + return -1 + } + case tableScope: + if tagAtom == a.Html || tagAtom == a.Table { + return -1 + } + case selectScope: + if tagAtom != a.Optgroup && tagAtom != a.Option { + return -1 + } + default: + panic("unreachable") + } + } + switch s { + case defaultScope, listItemScope, buttonScope: + for _, t := range defaultScopeStopTags[p.oe[i].Namespace] { + if t == tagAtom { + return -1 + } + } + } + } + return -1 +} + +// elementInScope is like popUntil, except that it doesn't modify the stack of +// open elements. +func (p *parser) elementInScope(s scope, matchTags ...a.Atom) bool { + return p.indexOfElementInScope(s, matchTags...) != -1 +} + +// clearStackToContext pops elements off the stack of open elements until a +// scope-defined element is found. +func (p *parser) clearStackToContext(s scope) { + for i := len(p.oe) - 1; i >= 0; i-- { + tagAtom := p.oe[i].DataAtom + switch s { + case tableScope: + if tagAtom == a.Html || tagAtom == a.Table { + p.oe = p.oe[:i+1] + return + } + case tableRowScope: + if tagAtom == a.Html || tagAtom == a.Tr { + p.oe = p.oe[:i+1] + return + } + case tableBodyScope: + if tagAtom == a.Html || tagAtom == a.Tbody || tagAtom == a.Tfoot || tagAtom == a.Thead { + p.oe = p.oe[:i+1] + return + } + default: + panic("unreachable") + } + } +} + +// generateImpliedEndTags pops nodes off the stack of open elements as long as +// the top node has a tag name of dd, dt, li, option, optgroup, p, rp, or rt. +// If exceptions are specified, nodes with that name will not be popped off. +func (p *parser) generateImpliedEndTags(exceptions ...string) { + var i int +loop: + for i = len(p.oe) - 1; i >= 0; i-- { + n := p.oe[i] + if n.Type == ElementNode { + switch n.DataAtom { + case a.Dd, a.Dt, a.Li, a.Option, a.Optgroup, a.P, a.Rp, a.Rt: + for _, except := range exceptions { + if n.Data == except { + break loop + } + } + continue + } + } + break + } + + p.oe = p.oe[:i+1] +} + +// addChild adds a child node n to the top element, and pushes n onto the stack +// of open elements if it is an element node. +func (p *parser) addChild(n *Node) { + if p.shouldFosterParent() { + p.fosterParent(n) + } else { + p.top().AppendChild(n) + } + + if n.Type == ElementNode { + p.oe = append(p.oe, n) + } +} + +// shouldFosterParent returns whether the next node to be added should be +// foster parented. +func (p *parser) shouldFosterParent() bool { + if p.fosterParenting { + switch p.top().DataAtom { + case a.Table, a.Tbody, a.Tfoot, a.Thead, a.Tr: + return true + } + } + return false +} + +// fosterParent adds a child node according to the foster parenting rules. +// Section 12.2.5.3, "foster parenting". +func (p *parser) fosterParent(n *Node) { + var table, parent, prev *Node + var i int + for i = len(p.oe) - 1; i >= 0; i-- { + if p.oe[i].DataAtom == a.Table { + table = p.oe[i] + break + } + } + + if table == nil { + // The foster parent is the html element. + parent = p.oe[0] + } else { + parent = table.Parent + } + if parent == nil { + parent = p.oe[i-1] + } + + if table != nil { + prev = table.PrevSibling + } else { + prev = parent.LastChild + } + if prev != nil && prev.Type == TextNode && n.Type == TextNode { + prev.Data += n.Data + return + } + + parent.InsertBefore(n, table) +} + +// addText adds text to the preceding node if it is a text node, or else it +// calls addChild with a new text node. +func (p *parser) addText(text string) { + if text == "" { + return + } + + if p.shouldFosterParent() { + p.fosterParent(&Node{ + Type: TextNode, + Data: text, + }) + return + } + + t := p.top() + if n := t.LastChild; n != nil && n.Type == TextNode { + n.Data += text + return + } + p.addChild(&Node{ + Type: TextNode, + Data: text, + }) +} + +// addElement adds a child element based on the current token. +func (p *parser) addElement() { + p.addChild(&Node{ + Type: ElementNode, + DataAtom: p.tok.DataAtom, + Data: p.tok.Data, + Attr: p.tok.Attr, + }) +} + +// Section 12.2.3.3. +func (p *parser) addFormattingElement() { + tagAtom, attr := p.tok.DataAtom, p.tok.Attr + p.addElement() + + // Implement the Noah's Ark clause, but with three per family instead of two. + identicalElements := 0 +findIdenticalElements: + for i := len(p.afe) - 1; i >= 0; i-- { + n := p.afe[i] + if n.Type == scopeMarkerNode { + break + } + if n.Type != ElementNode { + continue + } + if n.Namespace != "" { + continue + } + if n.DataAtom != tagAtom { + continue + } + if len(n.Attr) != len(attr) { + continue + } + compareAttributes: + for _, t0 := range n.Attr { + for _, t1 := range attr { + if t0.Key == t1.Key && t0.Namespace == t1.Namespace && t0.Val == t1.Val { + // Found a match for this attribute, continue with the next attribute. + continue compareAttributes + } + } + // If we get here, there is no attribute that matches a. + // Therefore the element is not identical to the new one. + continue findIdenticalElements + } + + identicalElements++ + if identicalElements >= 3 { + p.afe.remove(n) + } + } + + p.afe = append(p.afe, p.top()) +} + +// Section 12.2.3.3. +func (p *parser) clearActiveFormattingElements() { + for { + n := p.afe.pop() + if len(p.afe) == 0 || n.Type == scopeMarkerNode { + return + } + } +} + +// Section 12.2.3.3. +func (p *parser) reconstructActiveFormattingElements() { + n := p.afe.top() + if n == nil { + return + } + if n.Type == scopeMarkerNode || p.oe.index(n) != -1 { + return + } + i := len(p.afe) - 1 + for n.Type != scopeMarkerNode && p.oe.index(n) == -1 { + if i == 0 { + i = -1 + break + } + i-- + n = p.afe[i] + } + for { + i++ + clone := p.afe[i].clone() + p.addChild(clone) + p.afe[i] = clone + if i == len(p.afe)-1 { + break + } + } +} + +// Section 12.2.4. +func (p *parser) acknowledgeSelfClosingTag() { + p.hasSelfClosingToken = false +} + +// An insertion mode (section 12.2.3.1) is the state transition function from +// a particular state in the HTML5 parser's state machine. It updates the +// parser's fields depending on parser.tok (where ErrorToken means EOF). +// It returns whether the token was consumed. +type insertionMode func(*parser) bool + +// setOriginalIM sets the insertion mode to return to after completing a text or +// inTableText insertion mode. +// Section 12.2.3.1, "using the rules for". +func (p *parser) setOriginalIM() { + if p.originalIM != nil { + panic("html: bad parser state: originalIM was set twice") + } + p.originalIM = p.im +} + +// Section 12.2.3.1, "reset the insertion mode". +func (p *parser) resetInsertionMode() { + for i := len(p.oe) - 1; i >= 0; i-- { + n := p.oe[i] + if i == 0 && p.context != nil { + n = p.context + } + + switch n.DataAtom { + case a.Select: + p.im = inSelectIM + case a.Td, a.Th: + p.im = inCellIM + case a.Tr: + p.im = inRowIM + case a.Tbody, a.Thead, a.Tfoot: + p.im = inTableBodyIM + case a.Caption: + p.im = inCaptionIM + case a.Colgroup: + p.im = inColumnGroupIM + case a.Table: + p.im = inTableIM + case a.Head: + p.im = inBodyIM + case a.Body: + p.im = inBodyIM + case a.Frameset: + p.im = inFramesetIM + case a.Html: + p.im = beforeHeadIM + default: + continue + } + return + } + p.im = inBodyIM +} + +const whitespace = " \t\r\n\f" + +// Section 12.2.5.4.1. +func initialIM(p *parser) bool { + switch p.tok.Type { + case TextToken: + p.tok.Data = strings.TrimLeft(p.tok.Data, whitespace) + if len(p.tok.Data) == 0 { + // It was all whitespace, so ignore it. + return true + } + case CommentToken: + p.doc.AppendChild(&Node{ + Type: CommentNode, + Data: p.tok.Data, + }) + return true + case DoctypeToken: + n, quirks := parseDoctype(p.tok.Data) + p.doc.AppendChild(n) + p.quirks = quirks + p.im = beforeHTMLIM + return true + } + p.quirks = true + p.im = beforeHTMLIM + return false +} + +// Section 12.2.5.4.2. +func beforeHTMLIM(p *parser) bool { + switch p.tok.Type { + case DoctypeToken: + // Ignore the token. + return true + case TextToken: + p.tok.Data = strings.TrimLeft(p.tok.Data, whitespace) + if len(p.tok.Data) == 0 { + // It was all whitespace, so ignore it. + return true + } + case StartTagToken: + if p.tok.DataAtom == a.Html { + p.addElement() + p.im = beforeHeadIM + return true + } + case EndTagToken: + switch p.tok.DataAtom { + case a.Head, a.Body, a.Html, a.Br: + p.parseImpliedToken(StartTagToken, a.Html, a.Html.String()) + return false + default: + // Ignore the token. + return true + } + case CommentToken: + p.doc.AppendChild(&Node{ + Type: CommentNode, + Data: p.tok.Data, + }) + return true + } + p.parseImpliedToken(StartTagToken, a.Html, a.Html.String()) + return false +} + +// Section 12.2.5.4.3. +func beforeHeadIM(p *parser) bool { + switch p.tok.Type { + case TextToken: + p.tok.Data = strings.TrimLeft(p.tok.Data, whitespace) + if len(p.tok.Data) == 0 { + // It was all whitespace, so ignore it. + return true + } + case StartTagToken: + switch p.tok.DataAtom { + case a.Head: + p.addElement() + p.head = p.top() + p.im = inHeadIM + return true + case a.Html: + return inBodyIM(p) + } + case EndTagToken: + switch p.tok.DataAtom { + case a.Head, a.Body, a.Html, a.Br: + p.parseImpliedToken(StartTagToken, a.Head, a.Head.String()) + return false + default: + // Ignore the token. + return true + } + case CommentToken: + p.addChild(&Node{ + Type: CommentNode, + Data: p.tok.Data, + }) + return true + case DoctypeToken: + // Ignore the token. + return true + } + + p.parseImpliedToken(StartTagToken, a.Head, a.Head.String()) + return false +} + +// Section 12.2.5.4.4. +func inHeadIM(p *parser) bool { + switch p.tok.Type { + case TextToken: + s := strings.TrimLeft(p.tok.Data, whitespace) + if len(s) < len(p.tok.Data) { + // Add the initial whitespace to the current node. + p.addText(p.tok.Data[:len(p.tok.Data)-len(s)]) + if s == "" { + return true + } + p.tok.Data = s + } + case StartTagToken: + switch p.tok.DataAtom { + case a.Html: + return inBodyIM(p) + case a.Base, a.Basefont, a.Bgsound, a.Command, a.Link, a.Meta: + p.addElement() + p.oe.pop() + p.acknowledgeSelfClosingTag() + return true + case a.Script, a.Title, a.Noscript, a.Noframes, a.Style: + p.addElement() + p.setOriginalIM() + p.im = textIM + return true + case a.Head: + // Ignore the token. + return true + } + case EndTagToken: + switch p.tok.DataAtom { + case a.Head: + n := p.oe.pop() + if n.DataAtom != a.Head { + panic("html: bad parser state: element not found, in the in-head insertion mode") + } + p.im = afterHeadIM + return true + case a.Body, a.Html, a.Br: + p.parseImpliedToken(EndTagToken, a.Head, a.Head.String()) + return false + default: + // Ignore the token. + return true + } + case CommentToken: + p.addChild(&Node{ + Type: CommentNode, + Data: p.tok.Data, + }) + return true + case DoctypeToken: + // Ignore the token. + return true + } + + p.parseImpliedToken(EndTagToken, a.Head, a.Head.String()) + return false +} + +// Section 12.2.5.4.6. +func afterHeadIM(p *parser) bool { + switch p.tok.Type { + case TextToken: + s := strings.TrimLeft(p.tok.Data, whitespace) + if len(s) < len(p.tok.Data) { + // Add the initial whitespace to the current node. + p.addText(p.tok.Data[:len(p.tok.Data)-len(s)]) + if s == "" { + return true + } + p.tok.Data = s + } + case StartTagToken: + switch p.tok.DataAtom { + case a.Html: + return inBodyIM(p) + case a.Body: + p.addElement() + p.framesetOK = false + p.im = inBodyIM + return true + case a.Frameset: + p.addElement() + p.im = inFramesetIM + return true + case a.Base, a.Basefont, a.Bgsound, a.Link, a.Meta, a.Noframes, a.Script, a.Style, a.Title: + p.oe = append(p.oe, p.head) + defer p.oe.remove(p.head) + return inHeadIM(p) + case a.Head: + // Ignore the token. + return true + } + case EndTagToken: + switch p.tok.DataAtom { + case a.Body, a.Html, a.Br: + // Drop down to creating an implied tag. + default: + // Ignore the token. + return true + } + case CommentToken: + p.addChild(&Node{ + Type: CommentNode, + Data: p.tok.Data, + }) + return true + case DoctypeToken: + // Ignore the token. + return true + } + + p.parseImpliedToken(StartTagToken, a.Body, a.Body.String()) + p.framesetOK = true + return false +} + +// copyAttributes copies attributes of src not found on dst to dst. +func copyAttributes(dst *Node, src Token) { + if len(src.Attr) == 0 { + return + } + attr := map[string]string{} + for _, t := range dst.Attr { + attr[t.Key] = t.Val + } + for _, t := range src.Attr { + if _, ok := attr[t.Key]; !ok { + dst.Attr = append(dst.Attr, t) + attr[t.Key] = t.Val + } + } +} + +// Section 12.2.5.4.7. +func inBodyIM(p *parser) bool { + switch p.tok.Type { + case TextToken: + d := p.tok.Data + switch n := p.oe.top(); n.DataAtom { + case a.Pre, a.Listing: + if n.FirstChild == nil { + // Ignore a newline at the start of a
 block.
+				if d != "" && d[0] == '\r' {
+					d = d[1:]
+				}
+				if d != "" && d[0] == '\n' {
+					d = d[1:]
+				}
+			}
+		}
+		d = strings.Replace(d, "\x00", "", -1)
+		if d == "" {
+			return true
+		}
+		p.reconstructActiveFormattingElements()
+		p.addText(d)
+		if p.framesetOK && strings.TrimLeft(d, whitespace) != "" {
+			// There were non-whitespace characters inserted.
+			p.framesetOK = false
+		}
+	case StartTagToken:
+		switch p.tok.DataAtom {
+		case a.Html:
+			copyAttributes(p.oe[0], p.tok)
+		case a.Base, a.Basefont, a.Bgsound, a.Command, a.Link, a.Meta, a.Noframes, a.Script, a.Style, a.Title:
+			return inHeadIM(p)
+		case a.Body:
+			if len(p.oe) >= 2 {
+				body := p.oe[1]
+				if body.Type == ElementNode && body.DataAtom == a.Body {
+					p.framesetOK = false
+					copyAttributes(body, p.tok)
+				}
+			}
+		case a.Frameset:
+			if !p.framesetOK || len(p.oe) < 2 || p.oe[1].DataAtom != a.Body {
+				// Ignore the token.
+				return true
+			}
+			body := p.oe[1]
+			if body.Parent != nil {
+				body.Parent.RemoveChild(body)
+			}
+			p.oe = p.oe[:1]
+			p.addElement()
+			p.im = inFramesetIM
+			return true
+		case a.Address, a.Article, a.Aside, a.Blockquote, a.Center, a.Details, a.Dir, a.Div, a.Dl, a.Fieldset, a.Figcaption, a.Figure, a.Footer, a.Header, a.Hgroup, a.Menu, a.Nav, a.Ol, a.P, a.Section, a.Summary, a.Ul:
+			p.popUntil(buttonScope, a.P)
+			p.addElement()
+		case a.H1, a.H2, a.H3, a.H4, a.H5, a.H6:
+			p.popUntil(buttonScope, a.P)
+			switch n := p.top(); n.DataAtom {
+			case a.H1, a.H2, a.H3, a.H4, a.H5, a.H6:
+				p.oe.pop()
+			}
+			p.addElement()
+		case a.Pre, a.Listing:
+			p.popUntil(buttonScope, a.P)
+			p.addElement()
+			// The newline, if any, will be dealt with by the TextToken case.
+			p.framesetOK = false
+		case a.Form:
+			if p.form == nil {
+				p.popUntil(buttonScope, a.P)
+				p.addElement()
+				p.form = p.top()
+			}
+		case a.Li:
+			p.framesetOK = false
+			for i := len(p.oe) - 1; i >= 0; i-- {
+				node := p.oe[i]
+				switch node.DataAtom {
+				case a.Li:
+					p.oe = p.oe[:i]
+				case a.Address, a.Div, a.P:
+					continue
+				default:
+					if !isSpecialElement(node) {
+						continue
+					}
+				}
+				break
+			}
+			p.popUntil(buttonScope, a.P)
+			p.addElement()
+		case a.Dd, a.Dt:
+			p.framesetOK = false
+			for i := len(p.oe) - 1; i >= 0; i-- {
+				node := p.oe[i]
+				switch node.DataAtom {
+				case a.Dd, a.Dt:
+					p.oe = p.oe[:i]
+				case a.Address, a.Div, a.P:
+					continue
+				default:
+					if !isSpecialElement(node) {
+						continue
+					}
+				}
+				break
+			}
+			p.popUntil(buttonScope, a.P)
+			p.addElement()
+		case a.Plaintext:
+			p.popUntil(buttonScope, a.P)
+			p.addElement()
+		case a.Button:
+			p.popUntil(defaultScope, a.Button)
+			p.reconstructActiveFormattingElements()
+			p.addElement()
+			p.framesetOK = false
+		case a.A:
+			for i := len(p.afe) - 1; i >= 0 && p.afe[i].Type != scopeMarkerNode; i-- {
+				if n := p.afe[i]; n.Type == ElementNode && n.DataAtom == a.A {
+					p.inBodyEndTagFormatting(a.A)
+					p.oe.remove(n)
+					p.afe.remove(n)
+					break
+				}
+			}
+			p.reconstructActiveFormattingElements()
+			p.addFormattingElement()
+		case a.B, a.Big, a.Code, a.Em, a.Font, a.I, a.S, a.Small, a.Strike, a.Strong, a.Tt, a.U:
+			p.reconstructActiveFormattingElements()
+			p.addFormattingElement()
+		case a.Nobr:
+			p.reconstructActiveFormattingElements()
+			if p.elementInScope(defaultScope, a.Nobr) {
+				p.inBodyEndTagFormatting(a.Nobr)
+				p.reconstructActiveFormattingElements()
+			}
+			p.addFormattingElement()
+		case a.Applet, a.Marquee, a.Object:
+			p.reconstructActiveFormattingElements()
+			p.addElement()
+			p.afe = append(p.afe, &scopeMarker)
+			p.framesetOK = false
+		case a.Table:
+			if !p.quirks {
+				p.popUntil(buttonScope, a.P)
+			}
+			p.addElement()
+			p.framesetOK = false
+			p.im = inTableIM
+			return true
+		case a.Area, a.Br, a.Embed, a.Img, a.Input, a.Keygen, a.Wbr:
+			p.reconstructActiveFormattingElements()
+			p.addElement()
+			p.oe.pop()
+			p.acknowledgeSelfClosingTag()
+			if p.tok.DataAtom == a.Input {
+				for _, t := range p.tok.Attr {
+					if t.Key == "type" {
+						if strings.ToLower(t.Val) == "hidden" {
+							// Skip setting framesetOK = false
+							return true
+						}
+					}
+				}
+			}
+			p.framesetOK = false
+		case a.Param, a.Source, a.Track:
+			p.addElement()
+			p.oe.pop()
+			p.acknowledgeSelfClosingTag()
+		case a.Hr:
+			p.popUntil(buttonScope, a.P)
+			p.addElement()
+			p.oe.pop()
+			p.acknowledgeSelfClosingTag()
+			p.framesetOK = false
+		case a.Image:
+			p.tok.DataAtom = a.Img
+			p.tok.Data = a.Img.String()
+			return false
+		case a.Isindex:
+			if p.form != nil {
+				// Ignore the token.
+				return true
+			}
+			action := ""
+			prompt := "This is a searchable index. Enter search keywords: "
+			attr := []Attribute{{Key: "name", Val: "isindex"}}
+			for _, t := range p.tok.Attr {
+				switch t.Key {
+				case "action":
+					action = t.Val
+				case "name":
+					// Ignore the attribute.
+				case "prompt":
+					prompt = t.Val
+				default:
+					attr = append(attr, t)
+				}
+			}
+			p.acknowledgeSelfClosingTag()
+			p.popUntil(buttonScope, a.P)
+			p.parseImpliedToken(StartTagToken, a.Form, a.Form.String())
+			if action != "" {
+				p.form.Attr = []Attribute{{Key: "action", Val: action}}
+			}
+			p.parseImpliedToken(StartTagToken, a.Hr, a.Hr.String())
+			p.parseImpliedToken(StartTagToken, a.Label, a.Label.String())
+			p.addText(prompt)
+			p.addChild(&Node{
+				Type:     ElementNode,
+				DataAtom: a.Input,
+				Data:     a.Input.String(),
+				Attr:     attr,
+			})
+			p.oe.pop()
+			p.parseImpliedToken(EndTagToken, a.Label, a.Label.String())
+			p.parseImpliedToken(StartTagToken, a.Hr, a.Hr.String())
+			p.parseImpliedToken(EndTagToken, a.Form, a.Form.String())
+		case a.Textarea:
+			p.addElement()
+			p.setOriginalIM()
+			p.framesetOK = false
+			p.im = textIM
+		case a.Xmp:
+			p.popUntil(buttonScope, a.P)
+			p.reconstructActiveFormattingElements()
+			p.framesetOK = false
+			p.addElement()
+			p.setOriginalIM()
+			p.im = textIM
+		case a.Iframe:
+			p.framesetOK = false
+			p.addElement()
+			p.setOriginalIM()
+			p.im = textIM
+		case a.Noembed, a.Noscript:
+			p.addElement()
+			p.setOriginalIM()
+			p.im = textIM
+		case a.Select:
+			p.reconstructActiveFormattingElements()
+			p.addElement()
+			p.framesetOK = false
+			p.im = inSelectIM
+			return true
+		case a.Optgroup, a.Option:
+			if p.top().DataAtom == a.Option {
+				p.oe.pop()
+			}
+			p.reconstructActiveFormattingElements()
+			p.addElement()
+		case a.Rp, a.Rt:
+			if p.elementInScope(defaultScope, a.Ruby) {
+				p.generateImpliedEndTags()
+			}
+			p.addElement()
+		case a.Math, a.Svg:
+			p.reconstructActiveFormattingElements()
+			if p.tok.DataAtom == a.Math {
+				adjustAttributeNames(p.tok.Attr, mathMLAttributeAdjustments)
+			} else {
+				adjustAttributeNames(p.tok.Attr, svgAttributeAdjustments)
+			}
+			adjustForeignAttributes(p.tok.Attr)
+			p.addElement()
+			p.top().Namespace = p.tok.Data
+			if p.hasSelfClosingToken {
+				p.oe.pop()
+				p.acknowledgeSelfClosingTag()
+			}
+			return true
+		case a.Caption, a.Col, a.Colgroup, a.Frame, a.Head, a.Tbody, a.Td, a.Tfoot, a.Th, a.Thead, a.Tr:
+			// Ignore the token.
+		default:
+			p.reconstructActiveFormattingElements()
+			p.addElement()
+		}
+	case EndTagToken:
+		switch p.tok.DataAtom {
+		case a.Body:
+			if p.elementInScope(defaultScope, a.Body) {
+				p.im = afterBodyIM
+			}
+		case a.Html:
+			if p.elementInScope(defaultScope, a.Body) {
+				p.parseImpliedToken(EndTagToken, a.Body, a.Body.String())
+				return false
+			}
+			return true
+		case a.Address, a.Article, a.Aside, a.Blockquote, a.Button, a.Center, a.Details, a.Dir, a.Div, a.Dl, a.Fieldset, a.Figcaption, a.Figure, a.Footer, a.Header, a.Hgroup, a.Listing, a.Menu, a.Nav, a.Ol, a.Pre, a.Section, a.Summary, a.Ul:
+			p.popUntil(defaultScope, p.tok.DataAtom)
+		case a.Form:
+			node := p.form
+			p.form = nil
+			i := p.indexOfElementInScope(defaultScope, a.Form)
+			if node == nil || i == -1 || p.oe[i] != node {
+				// Ignore the token.
+				return true
+			}
+			p.generateImpliedEndTags()
+			p.oe.remove(node)
+		case a.P:
+			if !p.elementInScope(buttonScope, a.P) {
+				p.parseImpliedToken(StartTagToken, a.P, a.P.String())
+			}
+			p.popUntil(buttonScope, a.P)
+		case a.Li:
+			p.popUntil(listItemScope, a.Li)
+		case a.Dd, a.Dt:
+			p.popUntil(defaultScope, p.tok.DataAtom)
+		case a.H1, a.H2, a.H3, a.H4, a.H5, a.H6:
+			p.popUntil(defaultScope, a.H1, a.H2, a.H3, a.H4, a.H5, a.H6)
+		case a.A, a.B, a.Big, a.Code, a.Em, a.Font, a.I, a.Nobr, a.S, a.Small, a.Strike, a.Strong, a.Tt, a.U:
+			p.inBodyEndTagFormatting(p.tok.DataAtom)
+		case a.Applet, a.Marquee, a.Object:
+			if p.popUntil(defaultScope, p.tok.DataAtom) {
+				p.clearActiveFormattingElements()
+			}
+		case a.Br:
+			p.tok.Type = StartTagToken
+			return false
+		default:
+			p.inBodyEndTagOther(p.tok.DataAtom)
+		}
+	case CommentToken:
+		p.addChild(&Node{
+			Type: CommentNode,
+			Data: p.tok.Data,
+		})
+	}
+
+	return true
+}
+
+func (p *parser) inBodyEndTagFormatting(tagAtom a.Atom) {
+	// This is the "adoption agency" algorithm, described at
+	// https://html.spec.whatwg.org/multipage/syntax.html#adoptionAgency
+
+	// TODO: this is a fairly literal line-by-line translation of that algorithm.
+	// Once the code successfully parses the comprehensive test suite, we should
+	// refactor this code to be more idiomatic.
+
+	// Steps 1-4. The outer loop.
+	for i := 0; i < 8; i++ {
+		// Step 5. Find the formatting element.
+		var formattingElement *Node
+		for j := len(p.afe) - 1; j >= 0; j-- {
+			if p.afe[j].Type == scopeMarkerNode {
+				break
+			}
+			if p.afe[j].DataAtom == tagAtom {
+				formattingElement = p.afe[j]
+				break
+			}
+		}
+		if formattingElement == nil {
+			p.inBodyEndTagOther(tagAtom)
+			return
+		}
+		feIndex := p.oe.index(formattingElement)
+		if feIndex == -1 {
+			p.afe.remove(formattingElement)
+			return
+		}
+		if !p.elementInScope(defaultScope, tagAtom) {
+			// Ignore the tag.
+			return
+		}
+
+		// Steps 9-10. Find the furthest block.
+		var furthestBlock *Node
+		for _, e := range p.oe[feIndex:] {
+			if isSpecialElement(e) {
+				furthestBlock = e
+				break
+			}
+		}
+		if furthestBlock == nil {
+			e := p.oe.pop()
+			for e != formattingElement {
+				e = p.oe.pop()
+			}
+			p.afe.remove(e)
+			return
+		}
+
+		// Steps 11-12. Find the common ancestor and bookmark node.
+		commonAncestor := p.oe[feIndex-1]
+		bookmark := p.afe.index(formattingElement)
+
+		// Step 13. The inner loop. Find the lastNode to reparent.
+		lastNode := furthestBlock
+		node := furthestBlock
+		x := p.oe.index(node)
+		// Steps 13.1-13.2
+		for j := 0; j < 3; j++ {
+			// Step 13.3.
+			x--
+			node = p.oe[x]
+			// Step 13.4 - 13.5.
+			if p.afe.index(node) == -1 {
+				p.oe.remove(node)
+				continue
+			}
+			// Step 13.6.
+			if node == formattingElement {
+				break
+			}
+			// Step 13.7.
+			clone := node.clone()
+			p.afe[p.afe.index(node)] = clone
+			p.oe[p.oe.index(node)] = clone
+			node = clone
+			// Step 13.8.
+			if lastNode == furthestBlock {
+				bookmark = p.afe.index(node) + 1
+			}
+			// Step 13.9.
+			if lastNode.Parent != nil {
+				lastNode.Parent.RemoveChild(lastNode)
+			}
+			node.AppendChild(lastNode)
+			// Step 13.10.
+			lastNode = node
+		}
+
+		// Step 14. Reparent lastNode to the common ancestor,
+		// or for misnested table nodes, to the foster parent.
+		if lastNode.Parent != nil {
+			lastNode.Parent.RemoveChild(lastNode)
+		}
+		switch commonAncestor.DataAtom {
+		case a.Table, a.Tbody, a.Tfoot, a.Thead, a.Tr:
+			p.fosterParent(lastNode)
+		default:
+			commonAncestor.AppendChild(lastNode)
+		}
+
+		// Steps 15-17. Reparent nodes from the furthest block's children
+		// to a clone of the formatting element.
+		clone := formattingElement.clone()
+		reparentChildren(clone, furthestBlock)
+		furthestBlock.AppendChild(clone)
+
+		// Step 18. Fix up the list of active formatting elements.
+		if oldLoc := p.afe.index(formattingElement); oldLoc != -1 && oldLoc < bookmark {
+			// Move the bookmark with the rest of the list.
+			bookmark--
+		}
+		p.afe.remove(formattingElement)
+		p.afe.insert(bookmark, clone)
+
+		// Step 19. Fix up the stack of open elements.
+		p.oe.remove(formattingElement)
+		p.oe.insert(p.oe.index(furthestBlock)+1, clone)
+	}
+}
+
+// inBodyEndTagOther performs the "any other end tag" algorithm for inBodyIM.
+// "Any other end tag" handling from 12.2.5.5 The rules for parsing tokens in foreign content
+// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inforeign
+func (p *parser) inBodyEndTagOther(tagAtom a.Atom) {
+	for i := len(p.oe) - 1; i >= 0; i-- {
+		if p.oe[i].DataAtom == tagAtom {
+			p.oe = p.oe[:i]
+			break
+		}
+		if isSpecialElement(p.oe[i]) {
+			break
+		}
+	}
+}
+
+// Section 12.2.5.4.8.
+func textIM(p *parser) bool {
+	switch p.tok.Type {
+	case ErrorToken:
+		p.oe.pop()
+	case TextToken:
+		d := p.tok.Data
+		if n := p.oe.top(); n.DataAtom == a.Textarea && n.FirstChild == nil {
+			// Ignore a newline at the start of a -->
+#errors
+#document
+| 
+|   
+|   
+|     -->
+#errors
+#document
+| 
+|   
+|   
+|     
+#errors
+Line: 1 Col: 10 Unexpected start tag (textarea). Expected DOCTYPE.
+#document
+| 
+|   
+|   
+|     
+#errors
+Line: 1 Col: 9 Unexpected end tag (strong). Expected DOCTYPE.
+Line: 1 Col: 9 Unexpected end tag (strong) after the (implied) root element.
+Line: 1 Col: 13 Unexpected end tag (b) after the (implied) root element.
+Line: 1 Col: 18 Unexpected end tag (em) after the (implied) root element.
+Line: 1 Col: 22 Unexpected end tag (i) after the (implied) root element.
+Line: 1 Col: 26 Unexpected end tag (u) after the (implied) root element.
+Line: 1 Col: 35 Unexpected end tag (strike) after the (implied) root element.
+Line: 1 Col: 39 Unexpected end tag (s) after the (implied) root element.
+Line: 1 Col: 47 Unexpected end tag (blink) after the (implied) root element.
+Line: 1 Col: 52 Unexpected end tag (tt) after the (implied) root element.
+Line: 1 Col: 58 Unexpected end tag (pre) after the (implied) root element.
+Line: 1 Col: 64 Unexpected end tag (big) after the (implied) root element.
+Line: 1 Col: 72 Unexpected end tag (small) after the (implied) root element.
+Line: 1 Col: 79 Unexpected end tag (font) after the (implied) root element.
+Line: 1 Col: 88 Unexpected end tag (select) after the (implied) root element.
+Line: 1 Col: 93 Unexpected end tag (h1) after the (implied) root element.
+Line: 1 Col: 98 Unexpected end tag (h2) after the (implied) root element.
+Line: 1 Col: 103 Unexpected end tag (h3) after the (implied) root element.
+Line: 1 Col: 108 Unexpected end tag (h4) after the (implied) root element.
+Line: 1 Col: 113 Unexpected end tag (h5) after the (implied) root element.
+Line: 1 Col: 118 Unexpected end tag (h6) after the (implied) root element.
+Line: 1 Col: 125 Unexpected end tag (body) after the (implied) root element.
+Line: 1 Col: 130 Unexpected end tag (br). Treated as br element.
+Line: 1 Col: 134 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm.
+Line: 1 Col: 140 This element (img) has no end tag.
+Line: 1 Col: 148 Unexpected end tag (title). Ignored.
+Line: 1 Col: 155 Unexpected end tag (span). Ignored.
+Line: 1 Col: 163 Unexpected end tag (style). Ignored.
+Line: 1 Col: 172 Unexpected end tag (script). Ignored.
+Line: 1 Col: 180 Unexpected end tag (table). Ignored.
+Line: 1 Col: 185 Unexpected end tag (th). Ignored.
+Line: 1 Col: 190 Unexpected end tag (td). Ignored.
+Line: 1 Col: 195 Unexpected end tag (tr). Ignored.
+Line: 1 Col: 203 This element (frame) has no end tag.
+Line: 1 Col: 210 This element (area) has no end tag.
+Line: 1 Col: 217 Unexpected end tag (link). Ignored.
+Line: 1 Col: 225 This element (param) has no end tag.
+Line: 1 Col: 230 This element (hr) has no end tag.
+Line: 1 Col: 238 This element (input) has no end tag.
+Line: 1 Col: 244 Unexpected end tag (col). Ignored.
+Line: 1 Col: 251 Unexpected end tag (base). Ignored.
+Line: 1 Col: 258 Unexpected end tag (meta). Ignored.
+Line: 1 Col: 269 This element (basefont) has no end tag.
+Line: 1 Col: 279 This element (bgsound) has no end tag.
+Line: 1 Col: 287 This element (embed) has no end tag.
+Line: 1 Col: 296 This element (spacer) has no end tag.
+Line: 1 Col: 300 Unexpected end tag (p). Ignored.
+Line: 1 Col: 305 End tag (dd) seen too early. Expected other end tag.
+Line: 1 Col: 310 End tag (dt) seen too early. Expected other end tag.
+Line: 1 Col: 320 Unexpected end tag (caption). Ignored.
+Line: 1 Col: 331 Unexpected end tag (colgroup). Ignored.
+Line: 1 Col: 339 Unexpected end tag (tbody). Ignored.
+Line: 1 Col: 347 Unexpected end tag (tfoot). Ignored.
+Line: 1 Col: 355 Unexpected end tag (thead). Ignored.
+Line: 1 Col: 365 End tag (address) seen too early. Expected other end tag.
+Line: 1 Col: 378 End tag (blockquote) seen too early. Expected other end tag.
+Line: 1 Col: 387 End tag (center) seen too early. Expected other end tag.
+Line: 1 Col: 393 Unexpected end tag (dir). Ignored.
+Line: 1 Col: 399 End tag (div) seen too early. Expected other end tag.
+Line: 1 Col: 404 End tag (dl) seen too early. Expected other end tag.
+Line: 1 Col: 415 End tag (fieldset) seen too early. Expected other end tag.
+Line: 1 Col: 425 End tag (listing) seen too early. Expected other end tag.
+Line: 1 Col: 432 End tag (menu) seen too early. Expected other end tag.
+Line: 1 Col: 437 End tag (ol) seen too early. Expected other end tag.
+Line: 1 Col: 442 End tag (ul) seen too early. Expected other end tag.
+Line: 1 Col: 447 End tag (li) seen too early. Expected other end tag.
+Line: 1 Col: 454 End tag (nobr) violates step 1, paragraph 1 of the adoption agency algorithm.
+Line: 1 Col: 460 This element (wbr) has no end tag.
+Line: 1 Col: 476 End tag (button) seen too early. Expected other end tag.
+Line: 1 Col: 486 End tag (marquee) seen too early. Expected other end tag.
+Line: 1 Col: 495 End tag (object) seen too early. Expected other end tag.
+Line: 1 Col: 513 Unexpected end tag (html). Ignored.
+Line: 1 Col: 513 Unexpected end tag (frameset). Ignored.
+Line: 1 Col: 520 Unexpected end tag (head). Ignored.
+Line: 1 Col: 529 Unexpected end tag (iframe). Ignored.
+Line: 1 Col: 537 This element (image) has no end tag.
+Line: 1 Col: 547 This element (isindex) has no end tag.
+Line: 1 Col: 557 Unexpected end tag (noembed). Ignored.
+Line: 1 Col: 568 Unexpected end tag (noframes). Ignored.
+Line: 1 Col: 579 Unexpected end tag (noscript). Ignored.
+Line: 1 Col: 590 Unexpected end tag (optgroup). Ignored.
+Line: 1 Col: 599 Unexpected end tag (option). Ignored.
+Line: 1 Col: 611 Unexpected end tag (plaintext). Ignored.
+Line: 1 Col: 622 Unexpected end tag (textarea). Ignored.
+#document
+| 
+|   
+|   
+|     
+|

+ +#data +

+#errors +Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. +Line: 1 Col: 20 Unexpected end tag (strong) in table context caused voodoo mode. +Line: 1 Col: 20 End tag (strong) violates step 1, paragraph 1 of the adoption agency algorithm. +Line: 1 Col: 24 Unexpected end tag (b) in table context caused voodoo mode. +Line: 1 Col: 24 End tag (b) violates step 1, paragraph 1 of the adoption agency algorithm. +Line: 1 Col: 29 Unexpected end tag (em) in table context caused voodoo mode. +Line: 1 Col: 29 End tag (em) violates step 1, paragraph 1 of the adoption agency algorithm. +Line: 1 Col: 33 Unexpected end tag (i) in table context caused voodoo mode. +Line: 1 Col: 33 End tag (i) violates step 1, paragraph 1 of the adoption agency algorithm. +Line: 1 Col: 37 Unexpected end tag (u) in table context caused voodoo mode. +Line: 1 Col: 37 End tag (u) violates step 1, paragraph 1 of the adoption agency algorithm. +Line: 1 Col: 46 Unexpected end tag (strike) in table context caused voodoo mode. +Line: 1 Col: 46 End tag (strike) violates step 1, paragraph 1 of the adoption agency algorithm. +Line: 1 Col: 50 Unexpected end tag (s) in table context caused voodoo mode. +Line: 1 Col: 50 End tag (s) violates step 1, paragraph 1 of the adoption agency algorithm. +Line: 1 Col: 58 Unexpected end tag (blink) in table context caused voodoo mode. +Line: 1 Col: 58 Unexpected end tag (blink). Ignored. +Line: 1 Col: 63 Unexpected end tag (tt) in table context caused voodoo mode. +Line: 1 Col: 63 End tag (tt) violates step 1, paragraph 1 of the adoption agency algorithm. +Line: 1 Col: 69 Unexpected end tag (pre) in table context caused voodoo mode. +Line: 1 Col: 69 End tag (pre) seen too early. Expected other end tag. +Line: 1 Col: 75 Unexpected end tag (big) in table context caused voodoo mode. +Line: 1 Col: 75 End tag (big) violates step 1, paragraph 1 of the adoption agency algorithm. +Line: 1 Col: 83 Unexpected end tag (small) in table context caused voodoo mode. +Line: 1 Col: 83 End tag (small) violates step 1, paragraph 1 of the adoption agency algorithm. +Line: 1 Col: 90 Unexpected end tag (font) in table context caused voodoo mode. +Line: 1 Col: 90 End tag (font) violates step 1, paragraph 1 of the adoption agency algorithm. +Line: 1 Col: 99 Unexpected end tag (select) in table context caused voodoo mode. +Line: 1 Col: 99 Unexpected end tag (select). Ignored. +Line: 1 Col: 104 Unexpected end tag (h1) in table context caused voodoo mode. +Line: 1 Col: 104 End tag (h1) seen too early. Expected other end tag. +Line: 1 Col: 109 Unexpected end tag (h2) in table context caused voodoo mode. +Line: 1 Col: 109 End tag (h2) seen too early. Expected other end tag. +Line: 1 Col: 114 Unexpected end tag (h3) in table context caused voodoo mode. +Line: 1 Col: 114 End tag (h3) seen too early. Expected other end tag. +Line: 1 Col: 119 Unexpected end tag (h4) in table context caused voodoo mode. +Line: 1 Col: 119 End tag (h4) seen too early. Expected other end tag. +Line: 1 Col: 124 Unexpected end tag (h5) in table context caused voodoo mode. +Line: 1 Col: 124 End tag (h5) seen too early. Expected other end tag. +Line: 1 Col: 129 Unexpected end tag (h6) in table context caused voodoo mode. +Line: 1 Col: 129 End tag (h6) seen too early. Expected other end tag. +Line: 1 Col: 136 Unexpected end tag (body) in the table row phase. Ignored. +Line: 1 Col: 141 Unexpected end tag (br) in table context caused voodoo mode. +Line: 1 Col: 141 Unexpected end tag (br). Treated as br element. +Line: 1 Col: 145 Unexpected end tag (a) in table context caused voodoo mode. +Line: 1 Col: 145 End tag (a) violates step 1, paragraph 1 of the adoption agency algorithm. +Line: 1 Col: 151 Unexpected end tag (img) in table context caused voodoo mode. +Line: 1 Col: 151 This element (img) has no end tag. +Line: 1 Col: 159 Unexpected end tag (title) in table context caused voodoo mode. +Line: 1 Col: 159 Unexpected end tag (title). Ignored. +Line: 1 Col: 166 Unexpected end tag (span) in table context caused voodoo mode. +Line: 1 Col: 166 Unexpected end tag (span). Ignored. +Line: 1 Col: 174 Unexpected end tag (style) in table context caused voodoo mode. +Line: 1 Col: 174 Unexpected end tag (style). Ignored. +Line: 1 Col: 183 Unexpected end tag (script) in table context caused voodoo mode. +Line: 1 Col: 183 Unexpected end tag (script). Ignored. +Line: 1 Col: 196 Unexpected end tag (th). Ignored. +Line: 1 Col: 201 Unexpected end tag (td). Ignored. +Line: 1 Col: 206 Unexpected end tag (tr). Ignored. +Line: 1 Col: 214 This element (frame) has no end tag. +Line: 1 Col: 221 This element (area) has no end tag. +Line: 1 Col: 228 Unexpected end tag (link). Ignored. +Line: 1 Col: 236 This element (param) has no end tag. +Line: 1 Col: 241 This element (hr) has no end tag. +Line: 1 Col: 249 This element (input) has no end tag. +Line: 1 Col: 255 Unexpected end tag (col). Ignored. +Line: 1 Col: 262 Unexpected end tag (base). Ignored. +Line: 1 Col: 269 Unexpected end tag (meta). Ignored. +Line: 1 Col: 280 This element (basefont) has no end tag. +Line: 1 Col: 290 This element (bgsound) has no end tag. +Line: 1 Col: 298 This element (embed) has no end tag. +Line: 1 Col: 307 This element (spacer) has no end tag. +Line: 1 Col: 311 Unexpected end tag (p). Ignored. +Line: 1 Col: 316 End tag (dd) seen too early. Expected other end tag. +Line: 1 Col: 321 End tag (dt) seen too early. Expected other end tag. +Line: 1 Col: 331 Unexpected end tag (caption). Ignored. +Line: 1 Col: 342 Unexpected end tag (colgroup). Ignored. +Line: 1 Col: 350 Unexpected end tag (tbody). Ignored. +Line: 1 Col: 358 Unexpected end tag (tfoot). Ignored. +Line: 1 Col: 366 Unexpected end tag (thead). Ignored. +Line: 1 Col: 376 End tag (address) seen too early. Expected other end tag. +Line: 1 Col: 389 End tag (blockquote) seen too early. Expected other end tag. +Line: 1 Col: 398 End tag (center) seen too early. Expected other end tag. +Line: 1 Col: 404 Unexpected end tag (dir). Ignored. +Line: 1 Col: 410 End tag (div) seen too early. Expected other end tag. +Line: 1 Col: 415 End tag (dl) seen too early. Expected other end tag. +Line: 1 Col: 426 End tag (fieldset) seen too early. Expected other end tag. +Line: 1 Col: 436 End tag (listing) seen too early. Expected other end tag. +Line: 1 Col: 443 End tag (menu) seen too early. Expected other end tag. +Line: 1 Col: 448 End tag (ol) seen too early. Expected other end tag. +Line: 1 Col: 453 End tag (ul) seen too early. Expected other end tag. +Line: 1 Col: 458 End tag (li) seen too early. Expected other end tag. +Line: 1 Col: 465 End tag (nobr) violates step 1, paragraph 1 of the adoption agency algorithm. +Line: 1 Col: 471 This element (wbr) has no end tag. +Line: 1 Col: 487 End tag (button) seen too early. Expected other end tag. +Line: 1 Col: 497 End tag (marquee) seen too early. Expected other end tag. +Line: 1 Col: 506 End tag (object) seen too early. Expected other end tag. +Line: 1 Col: 524 Unexpected end tag (html). Ignored. +Line: 1 Col: 524 Unexpected end tag (frameset). Ignored. +Line: 1 Col: 531 Unexpected end tag (head). Ignored. +Line: 1 Col: 540 Unexpected end tag (iframe). Ignored. +Line: 1 Col: 548 This element (image) has no end tag. +Line: 1 Col: 558 This element (isindex) has no end tag. +Line: 1 Col: 568 Unexpected end tag (noembed). Ignored. +Line: 1 Col: 579 Unexpected end tag (noframes). Ignored. +Line: 1 Col: 590 Unexpected end tag (noscript). Ignored. +Line: 1 Col: 601 Unexpected end tag (optgroup). Ignored. +Line: 1 Col: 610 Unexpected end tag (option). Ignored. +Line: 1 Col: 622 Unexpected end tag (plaintext). Ignored. +Line: 1 Col: 633 Unexpected end tag (textarea). Ignored. +#document +| +| +| +|
+| +| +| +|

+ +#data + +#errors +Line: 1 Col: 10 Unexpected start tag (frameset). Expected DOCTYPE. +Line: 1 Col: 10 Expected closing tag. Unexpected end of file. +#document +| +| +| diff --git a/vendor/golang.org/x/net/html/testdata/webkit/tests10.dat b/vendor/golang.org/x/net/html/testdata/webkit/tests10.dat new file mode 100644 index 0000000..4f8df86 --- /dev/null +++ b/vendor/golang.org/x/net/html/testdata/webkit/tests10.dat @@ -0,0 +1,799 @@ +#data + +#errors +#document +| +| +| +| +| + +#data +a +#errors +29: Bogus comment +#document +| +| +| +| +| +| + +#data + +#errors +#document +| +| +| +| +| + +#data + +#errors +35: Stray “svg” start tag. +42: Stray end tag “svg” +#document +| +| +| +| +| +#errors +43: Stray “svg” start tag. +50: Stray end tag “svg” +#document +| +| +| +| +|

+#errors +34: Start tag “svg” seen in “table”. +41: Stray end tag “svg”. +#document +| +| +| +| +| +| + +#data +
foo
+#errors +34: Start tag “svg” seen in “table”. +46: Stray end tag “g”. +53: Stray end tag “svg”. +#document +| +| +| +| +| +| +| "foo" +| + +#data +
foobar
+#errors +34: Start tag “svg” seen in “table”. +46: Stray end tag “g”. +58: Stray end tag “g”. +65: Stray end tag “svg”. +#document +| +| +| +| +| +| +| "foo" +| +| "bar" +| + +#data +
foobar
+#errors +41: Start tag “svg” seen in “table”. +53: Stray end tag “g”. +65: Stray end tag “g”. +72: Stray end tag “svg”. +#document +| +| +| +| +| +| +| "foo" +| +| "bar" +| +| + +#data +
foobar
+#errors +45: Start tag “svg” seen in “table”. +57: Stray end tag “g”. +69: Stray end tag “g”. +76: Stray end tag “svg”. +#document +| +| +| +| +| +| +| "foo" +| +| "bar" +| +| +| + +#data +
foobar
+#errors +#document +| +| +| +| +| +| +| +|
+| +| +| "foo" +| +| "bar" + +#data +
foobar

baz

+#errors +#document +| +| +| +| +| +| +| +|
+| +| +| "foo" +| +| "bar" +|

+| "baz" + +#data +
foobar

baz

+#errors +#document +| +| +| +| +| +|
+| +| +| "foo" +| +| "bar" +|

+| "baz" + +#data +
foobar

baz

quux +#errors +70: HTML start tag “p” in a foreign namespace context. +81: “table” closed but “caption” was still open. +#document +| +| +| +| +| +|
+| +| +| "foo" +| +| "bar" +|

+| "baz" +|

+| "quux" + +#data +
foobarbaz

quux +#errors +78: “table” closed but “caption” was still open. +78: Unclosed elements on stack. +#document +| +| +| +| +| +|
+| +| +| "foo" +| +| "bar" +| "baz" +|

+| "quux" + +#data +foobar

baz

quux +#errors +44: Start tag “svg” seen in “table”. +56: Stray end tag “g”. +68: Stray end tag “g”. +71: HTML start tag “p” in a foreign namespace context. +71: Start tag “p” seen in “table”. +#document +| +| +| +| +| +| +| "foo" +| +| "bar" +|

+| "baz" +| +| +|

+| "quux" + +#data +

quux +#errors +50: Stray “svg” start tag. +54: Stray “g” start tag. +62: Stray end tag “g” +66: Stray “g” start tag. +74: Stray end tag “g” +77: Stray “p” start tag. +88: “table” end tag with “select” open. +#document +| +| +| +| +| +| +| +|
+|

quux +#errors +36: Start tag “select” seen in “table”. +42: Stray “svg” start tag. +46: Stray “g” start tag. +54: Stray end tag “g” +58: Stray “g” start tag. +66: Stray end tag “g” +69: Stray “p” start tag. +80: “table” end tag with “select” open. +#document +| +| +| +| +| +|

+| "quux" + +#data +foobar

baz +#errors +41: Stray “svg” start tag. +68: HTML start tag “p” in a foreign namespace context. +#document +| +| +| +| +| +| +| "foo" +| +| "bar" +|

+| "baz" + +#data +foobar

baz +#errors +34: Stray “svg” start tag. +61: HTML start tag “p” in a foreign namespace context. +#document +| +| +| +| +| +| +| "foo" +| +| "bar" +|

+| "baz" + +#data +

+#errors +31: Stray “svg” start tag. +35: Stray “g” start tag. +40: Stray end tag “g” +44: Stray “g” start tag. +49: Stray end tag “g” +52: Stray “p” start tag. +58: Stray “span” start tag. +58: End of file seen and there were open elements. +#document +| +| +| +| + +#data +

+#errors +42: Stray “svg” start tag. +46: Stray “g” start tag. +51: Stray end tag “g” +55: Stray “g” start tag. +60: Stray end tag “g” +63: Stray “p” start tag. +69: Stray “span” start tag. +#document +| +| +| +| + +#data + +#errors +#document +| +| +| +| +| xlink:href="foo" +| +| xlink href="foo" + +#data + +#errors +#document +| +| +| +| +| xlink:href="foo" +| xml:lang="en" +| +| +| xlink href="foo" +| xml lang="en" + +#data + +#errors +#document +| +| +| +| +| xlink:href="foo" +| xml:lang="en" +| +| +| xlink href="foo" +| xml lang="en" + +#data +bar +#errors +#document +| +| +| +| +| xlink:href="foo" +| xml:lang="en" +| +| +| xlink href="foo" +| xml lang="en" +| "bar" + +#data + +#errors +#document +| +| +| +| + +#data +

a +#errors +#document +| +| +| +|
+| +| "a" + +#data +
a +#errors +#document +| +| +| +|
+| +| +| "a" + +#data +
+#errors +#document +| +| +| +|
+| +| +| + +#data +
a +#errors +#document +| +| +| +|
+| +| +| +| +| "a" + +#data +

a +#errors +#document +| +| +| +|

+| +| +| +|

+| "a" + +#data +
    a +#errors +40: HTML start tag “ul” in a foreign namespace context. +41: End of file in a foreign namespace context. +#document +| +| +| +| +| +| +|
    +| +|
      +| "a" + +#data +
        a +#errors +35: HTML start tag “ul” in a foreign namespace context. +36: End of file in a foreign namespace context. +#document +| +| +| +| +| +| +| +|
          +| "a" + +#data +

          +#errors +#document +| +| +| +| +|

          +| +| +|

          + +#data +

          +#errors +#document +| +| +| +| +|

          +| +| +|

          + +#data +

          +#errors +#document +| +| +| +|

          +| +| +| +|

          +|

          + +#data +
          +#errors +#document +| +| +| +| +| +|
          +| +|
          +| +| + +#data +
          +#errors +#document +| +| +| +| +| +| +| +|
          +|
          +| + +#data + +#errors +#document +| +| +| +| +| +| + +#data +

+#errors +#document +| +| +| +| +|
+| +| + +#data + +#errors +#document +| +| +| +| +| +| + +#data + +#errors +#document +| +| +| +| +| +| + +#data + +#errors +#document +| +| +| +| +| +| + +#data + +#errors +#document +| +| +| +| +| +| + +#data + +#errors +#document +| +| +| +| +| +| + +#data + +#errors +#document +| +| +| +| +| +| + +#data + +#errors +#document +| +| +| +| +| +| + +#data + +#errors +#document +| +| +| +| +| +| + +#data + +#errors +#document +| +| +| +| +| +| + +#data + +#errors +#document +| +| +| +| +| +| + +#data + +#errors +#document +| +| +| +| +| +| +| + +#data +
+#errors +#document +| +| +| +| +| +| +| +|
+| +| +| +| +| + +#data + +#errors +#document +| +| +| +| +| +| +| +| +| +| +| +| +| +| diff --git a/vendor/golang.org/x/net/html/testdata/webkit/tests11.dat b/vendor/golang.org/x/net/html/testdata/webkit/tests11.dat new file mode 100644 index 0000000..638cde4 --- /dev/null +++ b/vendor/golang.org/x/net/html/testdata/webkit/tests11.dat @@ -0,0 +1,482 @@ +#data + +#errors +#document +| +| +| +| +| +| attributeName="" +| attributeType="" +| baseFrequency="" +| baseProfile="" +| calcMode="" +| clipPathUnits="" +| contentScriptType="" +| contentStyleType="" +| diffuseConstant="" +| edgeMode="" +| externalResourcesRequired="" +| filterRes="" +| filterUnits="" +| glyphRef="" +| gradientTransform="" +| gradientUnits="" +| kernelMatrix="" +| kernelUnitLength="" +| keyPoints="" +| keySplines="" +| keyTimes="" +| lengthAdjust="" +| limitingConeAngle="" +| markerHeight="" +| markerUnits="" +| markerWidth="" +| maskContentUnits="" +| maskUnits="" +| numOctaves="" +| pathLength="" +| patternContentUnits="" +| patternTransform="" +| patternUnits="" +| pointsAtX="" +| pointsAtY="" +| pointsAtZ="" +| preserveAlpha="" +| preserveAspectRatio="" +| primitiveUnits="" +| refX="" +| refY="" +| repeatCount="" +| repeatDur="" +| requiredExtensions="" +| requiredFeatures="" +| specularConstant="" +| specularExponent="" +| spreadMethod="" +| startOffset="" +| stdDeviation="" +| stitchTiles="" +| surfaceScale="" +| systemLanguage="" +| tableValues="" +| targetX="" +| targetY="" +| textLength="" +| viewBox="" +| viewTarget="" +| xChannelSelector="" +| yChannelSelector="" +| zoomAndPan="" + +#data + +#errors +#document +| +| +| +| +| +| attributeName="" +| attributeType="" +| baseFrequency="" +| baseProfile="" +| calcMode="" +| clipPathUnits="" +| contentScriptType="" +| contentStyleType="" +| diffuseConstant="" +| edgeMode="" +| externalResourcesRequired="" +| filterRes="" +| filterUnits="" +| glyphRef="" +| gradientTransform="" +| gradientUnits="" +| kernelMatrix="" +| kernelUnitLength="" +| keyPoints="" +| keySplines="" +| keyTimes="" +| lengthAdjust="" +| limitingConeAngle="" +| markerHeight="" +| markerUnits="" +| markerWidth="" +| maskContentUnits="" +| maskUnits="" +| numOctaves="" +| pathLength="" +| patternContentUnits="" +| patternTransform="" +| patternUnits="" +| pointsAtX="" +| pointsAtY="" +| pointsAtZ="" +| preserveAlpha="" +| preserveAspectRatio="" +| primitiveUnits="" +| refX="" +| refY="" +| repeatCount="" +| repeatDur="" +| requiredExtensions="" +| requiredFeatures="" +| specularConstant="" +| specularExponent="" +| spreadMethod="" +| startOffset="" +| stdDeviation="" +| stitchTiles="" +| surfaceScale="" +| systemLanguage="" +| tableValues="" +| targetX="" +| targetY="" +| textLength="" +| viewBox="" +| viewTarget="" +| xChannelSelector="" +| yChannelSelector="" +| zoomAndPan="" + +#data + +#errors +#document +| +| +| +| +| +| attributeName="" +| attributeType="" +| baseFrequency="" +| baseProfile="" +| calcMode="" +| clipPathUnits="" +| contentScriptType="" +| contentStyleType="" +| diffuseConstant="" +| edgeMode="" +| externalResourcesRequired="" +| filterRes="" +| filterUnits="" +| glyphRef="" +| gradientTransform="" +| gradientUnits="" +| kernelMatrix="" +| kernelUnitLength="" +| keyPoints="" +| keySplines="" +| keyTimes="" +| lengthAdjust="" +| limitingConeAngle="" +| markerHeight="" +| markerUnits="" +| markerWidth="" +| maskContentUnits="" +| maskUnits="" +| numOctaves="" +| pathLength="" +| patternContentUnits="" +| patternTransform="" +| patternUnits="" +| pointsAtX="" +| pointsAtY="" +| pointsAtZ="" +| preserveAlpha="" +| preserveAspectRatio="" +| primitiveUnits="" +| refX="" +| refY="" +| repeatCount="" +| repeatDur="" +| requiredExtensions="" +| requiredFeatures="" +| specularConstant="" +| specularExponent="" +| spreadMethod="" +| startOffset="" +| stdDeviation="" +| stitchTiles="" +| surfaceScale="" +| systemLanguage="" +| tableValues="" +| targetX="" +| targetY="" +| textLength="" +| viewBox="" +| viewTarget="" +| xChannelSelector="" +| yChannelSelector="" +| zoomAndPan="" + +#data + +#errors +#document +| +| +| +| +| +| attributename="" +| attributetype="" +| basefrequency="" +| baseprofile="" +| calcmode="" +| clippathunits="" +| contentscripttype="" +| contentstyletype="" +| diffuseconstant="" +| edgemode="" +| externalresourcesrequired="" +| filterres="" +| filterunits="" +| glyphref="" +| gradienttransform="" +| gradientunits="" +| kernelmatrix="" +| kernelunitlength="" +| keypoints="" +| keysplines="" +| keytimes="" +| lengthadjust="" +| limitingconeangle="" +| markerheight="" +| markerunits="" +| markerwidth="" +| maskcontentunits="" +| maskunits="" +| numoctaves="" +| pathlength="" +| patterncontentunits="" +| patterntransform="" +| patternunits="" +| pointsatx="" +| pointsaty="" +| pointsatz="" +| preservealpha="" +| preserveaspectratio="" +| primitiveunits="" +| refx="" +| refy="" +| repeatcount="" +| repeatdur="" +| requiredextensions="" +| requiredfeatures="" +| specularconstant="" +| specularexponent="" +| spreadmethod="" +| startoffset="" +| stddeviation="" +| stitchtiles="" +| surfacescale="" +| systemlanguage="" +| tablevalues="" +| targetx="" +| targety="" +| textlength="" +| viewbox="" +| viewtarget="" +| xchannelselector="" +| ychannelselector="" +| zoomandpan="" + +#data + +#errors +#document +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| + +#data + +#errors +#document +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| + +#data + +#errors +#document +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| + +#data + +#errors +#document +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| + +#data + +#errors +#document +| +| +| +| +| +| diff --git a/vendor/golang.org/x/net/html/testdata/webkit/tests12.dat b/vendor/golang.org/x/net/html/testdata/webkit/tests12.dat new file mode 100644 index 0000000..63107d2 --- /dev/null +++ b/vendor/golang.org/x/net/html/testdata/webkit/tests12.dat @@ -0,0 +1,62 @@ +#data +

foobazeggs

spam

quuxbar +#errors +#document +| +| +| +| +|

+| "foo" +| +| +| +| "baz" +| +| +| +| +| "eggs" +| +| +|

+| "spam" +| +| +| +|
+| +| +| "quux" +| "bar" + +#data +foobazeggs

spam
quuxbar +#errors +#document +| +| +| +| +| "foo" +| +| +| +| "baz" +| +| +| +| +| "eggs" +| +| +|

+| "spam" +| +| +| +|
+| +| +| "quux" +| "bar" diff --git a/vendor/golang.org/x/net/html/testdata/webkit/tests14.dat b/vendor/golang.org/x/net/html/testdata/webkit/tests14.dat new file mode 100644 index 0000000..b8713f8 --- /dev/null +++ b/vendor/golang.org/x/net/html/testdata/webkit/tests14.dat @@ -0,0 +1,74 @@ +#data + +#errors +#document +| +| +| +| +| + +#data + +#errors +#document +| +| +| +| +| +| + +#data + +#errors +15: Unexpected start tag html +#document +| +| +| abc:def="gh" +| +| +| + +#data + +#errors +15: Unexpected start tag html +#document +| +| +| xml:lang="bar" +| +| + +#data + +#errors +#document +| +| +| 123="456" +| +| + +#data + +#errors +#document +| +| +| 123="456" +| 789="012" +| +| + +#data + +#errors +#document +| +| +| +| +| 789="012" diff --git a/vendor/golang.org/x/net/html/testdata/webkit/tests15.dat b/vendor/golang.org/x/net/html/testdata/webkit/tests15.dat new file mode 100644 index 0000000..6ce1c0d --- /dev/null +++ b/vendor/golang.org/x/net/html/testdata/webkit/tests15.dat @@ -0,0 +1,208 @@ +#data +

X +#errors +Line: 1 Col: 31 Unexpected end tag (p). Ignored. +Line: 1 Col: 36 Expected closing tag. Unexpected end of file. +#document +| +| +| +| +|

+| +| +| +| +| +| +| " " +|

+| "X" + +#data +

+

X +#errors +Line: 1 Col: 3 Unexpected start tag (p). Expected DOCTYPE. +Line: 1 Col: 16 Unexpected end tag (p). Ignored. +Line: 2 Col: 4 Expected closing tag. Unexpected end of file. +#document +| +| +| +|

+| +| +| +| +| +| +| " +" +|

+| "X" + +#data + +#errors +Line: 1 Col: 22 Unexpected end tag (html) after the (implied) root element. +#document +| +| +| +| +| " " + +#data + +#errors +Line: 1 Col: 22 Unexpected end tag (body) after the (implied) root element. +#document +| +| +| +| +| + +#data + +#errors +Line: 1 Col: 6 Unexpected start tag (html). Expected DOCTYPE. +Line: 1 Col: 13 Unexpected end tag (html) after the (implied) root element. +#document +| +| +| +| + +#data +X +#errors +Line: 1 Col: 22 Unexpected end tag (body) after the (implied) root element. +#document +| +| +| +| +| +| "X" + +#data +<!doctype html><table> X<meta></table> +#errors +Line: 1 Col: 24 Unexpected non-space characters in table context caused voodoo mode. +Line: 1 Col: 30 Unexpected start tag (meta) in table context caused voodoo mode. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| " X" +| <meta> +| <table> + +#data +<!doctype html><table> x</table> +#errors +Line: 1 Col: 24 Unexpected non-space characters in table context caused voodoo mode. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| " x" +| <table> + +#data +<!doctype html><table> x </table> +#errors +Line: 1 Col: 25 Unexpected non-space characters in table context caused voodoo mode. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| " x " +| <table> + +#data +<!doctype html><table><tr> x</table> +#errors +Line: 1 Col: 28 Unexpected non-space characters in table context caused voodoo mode. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| " x" +| <table> +| <tbody> +| <tr> + +#data +<!doctype html><table>X<style> <tr>x </style> </table> +#errors +Line: 1 Col: 23 Unexpected non-space characters in table context caused voodoo mode. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| "X" +| <table> +| <style> +| " <tr>x " +| " " + +#data +<!doctype html><div><table><a>foo</a> <tr><td>bar</td> </tr></table></div> +#errors +Line: 1 Col: 30 Unexpected start tag (a) in table context caused voodoo mode. +Line: 1 Col: 37 Unexpected end tag (a) in table context caused voodoo mode. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <div> +| <a> +| "foo" +| <table> +| " " +| <tbody> +| <tr> +| <td> +| "bar" +| " " + +#data +<frame></frame></frame><frameset><frame><frameset><frame></frameset><noframes></frameset><noframes> +#errors +6: Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”. +13: Stray start tag “frame”. +21: Stray end tag “frame”. +29: Stray end tag “frame”. +39: “frameset” start tag after “body” already open. +105: End of file seen inside an [R]CDATA element. +105: End of file seen and there were open elements. +XXX: These errors are wrong, please fix me! +#document +| <html> +| <head> +| <frameset> +| <frame> +| <frameset> +| <frame> +| <noframes> +| "</frameset><noframes>" + +#data +<!DOCTYPE html><object></html> +#errors +1: Expected closing tag. Unexpected end of file +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <object> diff --git a/vendor/golang.org/x/net/html/testdata/webkit/tests16.dat b/vendor/golang.org/x/net/html/testdata/webkit/tests16.dat new file mode 100644 index 0000000..c8ef66f --- /dev/null +++ b/vendor/golang.org/x/net/html/testdata/webkit/tests16.dat @@ -0,0 +1,2299 @@ +#data +<!doctype html><script> +#errors +Line: 1 Col: 23 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| <body> + +#data +<!doctype html><script>a +#errors +Line: 1 Col: 24 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "a" +| <body> + +#data +<!doctype html><script>< +#errors +Line: 1 Col: 24 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<" +| <body> + +#data +<!doctype html><script></ +#errors +Line: 1 Col: 25 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "</" +| <body> + +#data +<!doctype html><script></S +#errors +Line: 1 Col: 26 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "</S" +| <body> + +#data +<!doctype html><script></SC +#errors +Line: 1 Col: 27 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "</SC" +| <body> + +#data +<!doctype html><script></SCR +#errors +Line: 1 Col: 28 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "</SCR" +| <body> + +#data +<!doctype html><script></SCRI +#errors +Line: 1 Col: 29 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "</SCRI" +| <body> + +#data +<!doctype html><script></SCRIP +#errors +Line: 1 Col: 30 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "</SCRIP" +| <body> + +#data +<!doctype html><script></SCRIPT +#errors +Line: 1 Col: 31 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "</SCRIPT" +| <body> + +#data +<!doctype html><script></SCRIPT +#errors +Line: 1 Col: 32 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| <body> + +#data +<!doctype html><script></s +#errors +Line: 1 Col: 26 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "</s" +| <body> + +#data +<!doctype html><script></sc +#errors +Line: 1 Col: 27 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "</sc" +| <body> + +#data +<!doctype html><script></scr +#errors +Line: 1 Col: 28 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "</scr" +| <body> + +#data +<!doctype html><script></scri +#errors +Line: 1 Col: 29 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "</scri" +| <body> + +#data +<!doctype html><script></scrip +#errors +Line: 1 Col: 30 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "</scrip" +| <body> + +#data +<!doctype html><script></script +#errors +Line: 1 Col: 31 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "</script" +| <body> + +#data +<!doctype html><script></script +#errors +Line: 1 Col: 32 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| <body> + +#data +<!doctype html><script><! +#errors +Line: 1 Col: 25 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!" +| <body> + +#data +<!doctype html><script><!a +#errors +Line: 1 Col: 26 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!a" +| <body> + +#data +<!doctype html><script><!- +#errors +Line: 1 Col: 26 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!-" +| <body> + +#data +<!doctype html><script><!-a +#errors +Line: 1 Col: 27 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!-a" +| <body> + +#data +<!doctype html><script><!-- +#errors +Line: 1 Col: 27 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--" +| <body> + +#data +<!doctype html><script><!--a +#errors +Line: 1 Col: 28 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--a" +| <body> + +#data +<!doctype html><script><!--< +#errors +Line: 1 Col: 28 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<" +| <body> + +#data +<!doctype html><script><!--<a +#errors +Line: 1 Col: 29 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<a" +| <body> + +#data +<!doctype html><script><!--</ +#errors +Line: 1 Col: 27 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--</" +| <body> + +#data +<!doctype html><script><!--</script +#errors +Line: 1 Col: 35 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--</script" +| <body> + +#data +<!doctype html><script><!--</script +#errors +Line: 1 Col: 36 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--" +| <body> + +#data +<!doctype html><script><!--<s +#errors +Line: 1 Col: 29 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<s" +| <body> + +#data +<!doctype html><script><!--<script +#errors +Line: 1 Col: 34 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script" +| <body> + +#data +<!doctype html><script><!--<script +#errors +Line: 1 Col: 35 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script " +| <body> + +#data +<!doctype html><script><!--<script < +#errors +Line: 1 Col: 36 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script <" +| <body> + +#data +<!doctype html><script><!--<script <a +#errors +Line: 1 Col: 37 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script <a" +| <body> + +#data +<!doctype html><script><!--<script </ +#errors +Line: 1 Col: 37 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script </" +| <body> + +#data +<!doctype html><script><!--<script </s +#errors +Line: 1 Col: 38 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script </s" +| <body> + +#data +<!doctype html><script><!--<script </script +#errors +Line: 1 Col: 43 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script </script" +| <body> + +#data +<!doctype html><script><!--<script </scripta +#errors +Line: 1 Col: 44 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script </scripta" +| <body> + +#data +<!doctype html><script><!--<script </script +#errors +Line: 1 Col: 44 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script </script " +| <body> + +#data +<!doctype html><script><!--<script </script> +#errors +Line: 1 Col: 44 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script </script>" +| <body> + +#data +<!doctype html><script><!--<script </script/ +#errors +Line: 1 Col: 44 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script </script/" +| <body> + +#data +<!doctype html><script><!--<script </script < +#errors +Line: 1 Col: 45 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script </script <" +| <body> + +#data +<!doctype html><script><!--<script </script <a +#errors +Line: 1 Col: 46 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script </script <a" +| <body> + +#data +<!doctype html><script><!--<script </script </ +#errors +Line: 1 Col: 46 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script </script </" +| <body> + +#data +<!doctype html><script><!--<script </script </script +#errors +Line: 1 Col: 52 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script </script </script" +| <body> + +#data +<!doctype html><script><!--<script </script </script +#errors +Line: 1 Col: 53 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script </script " +| <body> + +#data +<!doctype html><script><!--<script </script </script/ +#errors +Line: 1 Col: 53 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script </script " +| <body> + +#data +<!doctype html><script><!--<script </script </script> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script </script " +| <body> + +#data +<!doctype html><script><!--<script - +#errors +Line: 1 Col: 36 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script -" +| <body> + +#data +<!doctype html><script><!--<script -a +#errors +Line: 1 Col: 37 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script -a" +| <body> + +#data +<!doctype html><script><!--<script -< +#errors +Line: 1 Col: 37 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script -<" +| <body> + +#data +<!doctype html><script><!--<script -- +#errors +Line: 1 Col: 37 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script --" +| <body> + +#data +<!doctype html><script><!--<script --a +#errors +Line: 1 Col: 38 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script --a" +| <body> + +#data +<!doctype html><script><!--<script --< +#errors +Line: 1 Col: 38 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script --<" +| <body> + +#data +<!doctype html><script><!--<script --> +#errors +Line: 1 Col: 38 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script -->" +| <body> + +#data +<!doctype html><script><!--<script -->< +#errors +Line: 1 Col: 39 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script --><" +| <body> + +#data +<!doctype html><script><!--<script --></ +#errors +Line: 1 Col: 40 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script --></" +| <body> + +#data +<!doctype html><script><!--<script --></script +#errors +Line: 1 Col: 46 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script --></script" +| <body> + +#data +<!doctype html><script><!--<script --></script +#errors +Line: 1 Col: 47 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script -->" +| <body> + +#data +<!doctype html><script><!--<script --></script/ +#errors +Line: 1 Col: 47 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script -->" +| <body> + +#data +<!doctype html><script><!--<script --></script> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script -->" +| <body> + +#data +<!doctype html><script><!--<script><\/script>--></script> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script><\/script>-->" +| <body> + +#data +<!doctype html><script><!--<script></scr'+'ipt>--></script> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script></scr'+'ipt>-->" +| <body> + +#data +<!doctype html><script><!--<script></script><script></script></script> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script></script><script></script>" +| <body> + +#data +<!doctype html><script><!--<script></script><script></script>--><!--</script> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script></script><script></script>--><!--" +| <body> + +#data +<!doctype html><script><!--<script></script><script></script>-- ></script> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script></script><script></script>-- >" +| <body> + +#data +<!doctype html><script><!--<script></script><script></script>- -></script> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script></script><script></script>- ->" +| <body> + +#data +<!doctype html><script><!--<script></script><script></script>- - ></script> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script></script><script></script>- - >" +| <body> + +#data +<!doctype html><script><!--<script></script><script></script>-></script> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script></script><script></script>->" +| <body> + +#data +<!doctype html><script><!--<script>--!></script>X +#errors +Line: 1 Col: 49 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script>--!></script>X" +| <body> + +#data +<!doctype html><script><!--<scr'+'ipt></script>--></script> +#errors +Line: 1 Col: 59 Unexpected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<scr'+'ipt>" +| <body> +| "-->" + +#data +<!doctype html><script><!--<script></scr'+'ipt></script>X +#errors +Line: 1 Col: 57 Unexpected end of file. Expected end tag (script). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| "<!--<script></scr'+'ipt></script>X" +| <body> + +#data +<!doctype html><style><!--<style></style>--></style> +#errors +Line: 1 Col: 52 Unexpected end tag (style). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <style> +| "<!--<style>" +| <body> +| "-->" + +#data +<!doctype html><style><!--</style>X +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <style> +| "<!--" +| <body> +| "X" + +#data +<!doctype html><style><!--...</style>...--></style> +#errors +Line: 1 Col: 51 Unexpected end tag (style). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <style> +| "<!--..." +| <body> +| "...-->" + +#data +<!doctype html><style><!--<br><html xmlns:v="urn:schemas-microsoft-com:vml"><!--[if !mso]><style></style>X +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <style> +| "<!--<br><html xmlns:v="urn:schemas-microsoft-com:vml"><!--[if !mso]><style>" +| <body> +| "X" + +#data +<!doctype html><style><!--...<style><!--...--!></style>--></style> +#errors +Line: 1 Col: 66 Unexpected end tag (style). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <style> +| "<!--...<style><!--...--!>" +| <body> +| "-->" + +#data +<!doctype html><style><!--...</style><!-- --><style>@import ...</style> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <style> +| "<!--..." +| <!-- --> +| <style> +| "@import ..." +| <body> + +#data +<!doctype html><style>...<style><!--...</style><!-- --></style> +#errors +Line: 1 Col: 63 Unexpected end tag (style). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <style> +| "...<style><!--..." +| <!-- --> +| <body> + +#data +<!doctype html><style>...<!--[if IE]><style>...</style>X +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <style> +| "...<!--[if IE]><style>..." +| <body> +| "X" + +#data +<!doctype html><title><!--<title>--> +#errors +Line: 1 Col: 52 Unexpected end tag (title). +#document +| +| +| +| +| "<!--<title>" +| <body> +| "-->" + +#data +<!doctype html><title></title> +#errors +#document +| +| +| +| +| "" +| + +#data +foo/title><link></head><body>X +#errors +Line: 1 Col: 52 Unexpected end of file. Expected end tag (title). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <title> +| "foo/title><link></head><body>X" +| <body> + +#data +<!doctype html><noscript><!--<noscript></noscript>--></noscript> +#errors +Line: 1 Col: 64 Unexpected end tag (noscript). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <noscript> +| "<!--<noscript>" +| <body> +| "-->" + +#data +<!doctype html><noscript><!--</noscript>X<noscript>--></noscript> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <noscript> +| "<!--" +| <body> +| "X" +| <noscript> +| "-->" + +#data +<!doctype html><noscript><iframe></noscript>X +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <noscript> +| "<iframe>" +| <body> +| "X" + +#data +<!doctype html><noframes><!--<noframes></noframes>--></noframes> +#errors +Line: 1 Col: 64 Unexpected end tag (noframes). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <noframes> +| "<!--<noframes>" +| <body> +| "-->" + +#data +<!doctype html><noframes><body><script><!--...</script></body></noframes></html> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <noframes> +| "<body><script><!--...</script></body>" +| <body> + +#data +<!doctype html><textarea><!--<textarea></textarea>--></textarea> +#errors +Line: 1 Col: 64 Unexpected end tag (textarea). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <textarea> +| "<!--<textarea>" +| "-->" + +#data +<!doctype html><textarea></textarea></textarea> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <textarea> +| "</textarea>" + +#data +<!doctype html><textarea><</textarea> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <textarea> +| "<" + +#data +<!doctype html><textarea>a<b</textarea> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <textarea> +| "a<b" + +#data +<!doctype html><iframe><!--<iframe></iframe>--></iframe> +#errors +Line: 1 Col: 56 Unexpected end tag (iframe). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <iframe> +| "<!--<iframe>" +| "-->" + +#data +<!doctype html><iframe>...<!--X->...<!--/X->...</iframe> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <iframe> +| "...<!--X->...<!--/X->..." + +#data +<!doctype html><xmp><!--<xmp></xmp>--></xmp> +#errors +Line: 1 Col: 44 Unexpected end tag (xmp). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <xmp> +| "<!--<xmp>" +| "-->" + +#data +<!doctype html><noembed><!--<noembed></noembed>--></noembed> +#errors +Line: 1 Col: 60 Unexpected end tag (noembed). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <noembed> +| "<!--<noembed>" +| "-->" + +#data +<script> +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 8 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| <body> + +#data +<script>a +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 9 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "a" +| <body> + +#data +<script>< +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 9 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<" +| <body> + +#data +<script></ +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 10 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "</" +| <body> + +#data +<script></S +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 11 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "</S" +| <body> + +#data +<script></SC +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 12 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "</SC" +| <body> + +#data +<script></SCR +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 13 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "</SCR" +| <body> + +#data +<script></SCRI +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 14 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "</SCRI" +| <body> + +#data +<script></SCRIP +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 15 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "</SCRIP" +| <body> + +#data +<script></SCRIPT +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 16 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "</SCRIPT" +| <body> + +#data +<script></SCRIPT +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 17 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| <body> + +#data +<script></s +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 11 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "</s" +| <body> + +#data +<script></sc +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 12 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "</sc" +| <body> + +#data +<script></scr +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 13 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "</scr" +| <body> + +#data +<script></scri +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 14 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "</scri" +| <body> + +#data +<script></scrip +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 15 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "</scrip" +| <body> + +#data +<script></script +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 16 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "</script" +| <body> + +#data +<script></script +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 17 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| <body> + +#data +<script><! +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 10 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!" +| <body> + +#data +<script><!a +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 11 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!a" +| <body> + +#data +<script><!- +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 11 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!-" +| <body> + +#data +<script><!-a +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 12 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!-a" +| <body> + +#data +<script><!-- +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 12 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--" +| <body> + +#data +<script><!--a +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 13 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--a" +| <body> + +#data +<script><!--< +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 13 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<" +| <body> + +#data +<script><!--<a +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 14 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<a" +| <body> + +#data +<script><!--</ +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 14 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--</" +| <body> + +#data +<script><!--</script +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 20 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--</script" +| <body> + +#data +<script><!--</script +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 21 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--" +| <body> + +#data +<script><!--<s +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 14 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<s" +| <body> + +#data +<script><!--<script +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 19 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script" +| <body> + +#data +<script><!--<script +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 20 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script " +| <body> + +#data +<script><!--<script < +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 21 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script <" +| <body> + +#data +<script><!--<script <a +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 22 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script <a" +| <body> + +#data +<script><!--<script </ +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 22 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script </" +| <body> + +#data +<script><!--<script </s +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 23 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script </s" +| <body> + +#data +<script><!--<script </script +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 28 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script </script" +| <body> + +#data +<script><!--<script </scripta +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 29 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script </scripta" +| <body> + +#data +<script><!--<script </script +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 29 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script </script " +| <body> + +#data +<script><!--<script </script> +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 29 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script </script>" +| <body> + +#data +<script><!--<script </script/ +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 29 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script </script/" +| <body> + +#data +<script><!--<script </script < +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 30 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script </script <" +| <body> + +#data +<script><!--<script </script <a +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 31 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script </script <a" +| <body> + +#data +<script><!--<script </script </ +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 31 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script </script </" +| <body> + +#data +<script><!--<script </script </script +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 38 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script </script </script" +| <body> + +#data +<script><!--<script </script </script +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 38 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script </script " +| <body> + +#data +<script><!--<script </script </script/ +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 38 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script </script " +| <body> + +#data +<script><!--<script </script </script> +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +#document +| <html> +| <head> +| <script> +| "<!--<script </script " +| <body> + +#data +<script><!--<script - +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 21 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script -" +| <body> + +#data +<script><!--<script -a +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 22 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script -a" +| <body> + +#data +<script><!--<script -- +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 22 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script --" +| <body> + +#data +<script><!--<script --a +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 23 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script --a" +| <body> + +#data +<script><!--<script --> +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 23 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script -->" +| <body> + +#data +<script><!--<script -->< +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 24 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script --><" +| <body> + +#data +<script><!--<script --></ +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 25 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script --></" +| <body> + +#data +<script><!--<script --></script +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 31 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script --></script" +| <body> + +#data +<script><!--<script --></script +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 32 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script -->" +| <body> + +#data +<script><!--<script --></script/ +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 32 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script -->" +| <body> + +#data +<script><!--<script --></script> +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +#document +| <html> +| <head> +| <script> +| "<!--<script -->" +| <body> + +#data +<script><!--<script><\/script>--></script> +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +#document +| <html> +| <head> +| <script> +| "<!--<script><\/script>-->" +| <body> + +#data +<script><!--<script></scr'+'ipt>--></script> +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +#document +| <html> +| <head> +| <script> +| "<!--<script></scr'+'ipt>-->" +| <body> + +#data +<script><!--<script></script><script></script></script> +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +#document +| <html> +| <head> +| <script> +| "<!--<script></script><script></script>" +| <body> + +#data +<script><!--<script></script><script></script>--><!--</script> +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +#document +| <html> +| <head> +| <script> +| "<!--<script></script><script></script>--><!--" +| <body> + +#data +<script><!--<script></script><script></script>-- ></script> +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +#document +| <html> +| <head> +| <script> +| "<!--<script></script><script></script>-- >" +| <body> + +#data +<script><!--<script></script><script></script>- -></script> +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +#document +| <html> +| <head> +| <script> +| "<!--<script></script><script></script>- ->" +| <body> + +#data +<script><!--<script></script><script></script>- - ></script> +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +#document +| <html> +| <head> +| <script> +| "<!--<script></script><script></script>- - >" +| <body> + +#data +<script><!--<script></script><script></script>-></script> +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +#document +| <html> +| <head> +| <script> +| "<!--<script></script><script></script>->" +| <body> + +#data +<script><!--<script>--!></script>X +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 34 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script>--!></script>X" +| <body> + +#data +<script><!--<scr'+'ipt></script>--></script> +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 44 Unexpected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<scr'+'ipt>" +| <body> +| "-->" + +#data +<script><!--<script></scr'+'ipt></script>X +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 42 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "<!--<script></scr'+'ipt></script>X" +| <body> + +#data +<style><!--<style></style>--></style> +#errors +Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. +Line: 1 Col: 37 Unexpected end tag (style). +#document +| <html> +| <head> +| <style> +| "<!--<style>" +| <body> +| "-->" + +#data +<style><!--</style>X +#errors +Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. +#document +| <html> +| <head> +| <style> +| "<!--" +| <body> +| "X" + +#data +<style><!--...</style>...--></style> +#errors +Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. +Line: 1 Col: 36 Unexpected end tag (style). +#document +| <html> +| <head> +| <style> +| "<!--..." +| <body> +| "...-->" + +#data +<style><!--<br><html xmlns:v="urn:schemas-microsoft-com:vml"><!--[if !mso]><style></style>X +#errors +Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. +#document +| <html> +| <head> +| <style> +| "<!--<br><html xmlns:v="urn:schemas-microsoft-com:vml"><!--[if !mso]><style>" +| <body> +| "X" + +#data +<style><!--...<style><!--...--!></style>--></style> +#errors +Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. +Line: 1 Col: 51 Unexpected end tag (style). +#document +| <html> +| <head> +| <style> +| "<!--...<style><!--...--!>" +| <body> +| "-->" + +#data +<style><!--...</style><!-- --><style>@import ...</style> +#errors +Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. +#document +| <html> +| <head> +| <style> +| "<!--..." +| <!-- --> +| <style> +| "@import ..." +| <body> + +#data +<style>...<style><!--...</style><!-- --></style> +#errors +Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. +Line: 1 Col: 48 Unexpected end tag (style). +#document +| <html> +| <head> +| <style> +| "...<style><!--..." +| <!-- --> +| <body> + +#data +<style>...<!--[if IE]><style>...</style>X +#errors +Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. +#document +| <html> +| <head> +| <style> +| "...<!--[if IE]><style>..." +| <body> +| "X" + +#data +<title><!--<title>--> +#errors +Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE. +Line: 1 Col: 37 Unexpected end tag (title). +#document +| +| +| +| "<!--<title>" +| <body> +| "-->" + +#data +<title></title> +#errors +Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE. +#document +| +| +| +| "" +| + +#data +foo/title><link></head><body>X +#errors +Line: 1 Col: 7 Unexpected start tag (title). Expected DOCTYPE. +Line: 1 Col: 37 Unexpected end of file. Expected end tag (title). +#document +| <html> +| <head> +| <title> +| "foo/title><link></head><body>X" +| <body> + +#data +<noscript><!--<noscript></noscript>--></noscript> +#errors +Line: 1 Col: 10 Unexpected start tag (noscript). Expected DOCTYPE. +Line: 1 Col: 49 Unexpected end tag (noscript). +#document +| <html> +| <head> +| <noscript> +| "<!--<noscript>" +| <body> +| "-->" + +#data +<noscript><!--</noscript>X<noscript>--></noscript> +#errors +Line: 1 Col: 10 Unexpected start tag (noscript). Expected DOCTYPE. +#document +| <html> +| <head> +| <noscript> +| "<!--" +| <body> +| "X" +| <noscript> +| "-->" + +#data +<noscript><iframe></noscript>X +#errors +Line: 1 Col: 10 Unexpected start tag (noscript). Expected DOCTYPE. +#document +| <html> +| <head> +| <noscript> +| "<iframe>" +| <body> +| "X" + +#data +<noframes><!--<noframes></noframes>--></noframes> +#errors +Line: 1 Col: 10 Unexpected start tag (noframes). Expected DOCTYPE. +Line: 1 Col: 49 Unexpected end tag (noframes). +#document +| <html> +| <head> +| <noframes> +| "<!--<noframes>" +| <body> +| "-->" + +#data +<noframes><body><script><!--...</script></body></noframes></html> +#errors +Line: 1 Col: 10 Unexpected start tag (noframes). Expected DOCTYPE. +#document +| <html> +| <head> +| <noframes> +| "<body><script><!--...</script></body>" +| <body> + +#data +<textarea><!--<textarea></textarea>--></textarea> +#errors +Line: 1 Col: 10 Unexpected start tag (textarea). Expected DOCTYPE. +Line: 1 Col: 49 Unexpected end tag (textarea). +#document +| <html> +| <head> +| <body> +| <textarea> +| "<!--<textarea>" +| "-->" + +#data +<textarea></textarea></textarea> +#errors +Line: 1 Col: 10 Unexpected start tag (textarea). Expected DOCTYPE. +#document +| <html> +| <head> +| <body> +| <textarea> +| "</textarea>" + +#data +<iframe><!--<iframe></iframe>--></iframe> +#errors +Line: 1 Col: 8 Unexpected start tag (iframe). Expected DOCTYPE. +Line: 1 Col: 41 Unexpected end tag (iframe). +#document +| <html> +| <head> +| <body> +| <iframe> +| "<!--<iframe>" +| "-->" + +#data +<iframe>...<!--X->...<!--/X->...</iframe> +#errors +Line: 1 Col: 8 Unexpected start tag (iframe). Expected DOCTYPE. +#document +| <html> +| <head> +| <body> +| <iframe> +| "...<!--X->...<!--/X->..." + +#data +<xmp><!--<xmp></xmp>--></xmp> +#errors +Line: 1 Col: 5 Unexpected start tag (xmp). Expected DOCTYPE. +Line: 1 Col: 29 Unexpected end tag (xmp). +#document +| <html> +| <head> +| <body> +| <xmp> +| "<!--<xmp>" +| "-->" + +#data +<noembed><!--<noembed></noembed>--></noembed> +#errors +Line: 1 Col: 9 Unexpected start tag (noembed). Expected DOCTYPE. +Line: 1 Col: 45 Unexpected end tag (noembed). +#document +| <html> +| <head> +| <body> +| <noembed> +| "<!--<noembed>" +| "-->" + +#data +<!doctype html><table> + +#errors +Line 2 Col 0 Unexpected end of file. Expected table content. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <table> +| " +" + +#data +<!doctype html><table><td><span><font></span><span> +#errors +Line 1 Col 26 Unexpected table cell start tag (td) in the table body phase. +Line 1 Col 45 Unexpected end tag (span). +Line 1 Col 51 Expected closing tag. Unexpected end of file. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <table> +| <tbody> +| <tr> +| <td> +| <span> +| <font> +| <font> +| <span> + +#data +<!doctype html><form><table></form><form></table></form> +#errors +35: Stray end tag “form”. +41: Start tag “form” seen in “table”. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <form> +| <table> +| <form> diff --git a/vendor/golang.org/x/net/html/testdata/webkit/tests17.dat b/vendor/golang.org/x/net/html/testdata/webkit/tests17.dat new file mode 100644 index 0000000..7b555f8 --- /dev/null +++ b/vendor/golang.org/x/net/html/testdata/webkit/tests17.dat @@ -0,0 +1,153 @@ +#data +<!doctype html><table><tbody><select><tr> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <select> +| <table> +| <tbody> +| <tr> + +#data +<!doctype html><table><tr><select><td> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <select> +| <table> +| <tbody> +| <tr> +| <td> + +#data +<!doctype html><table><tr><td><select><td> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <table> +| <tbody> +| <tr> +| <td> +| <select> +| <td> + +#data +<!doctype html><table><tr><th><select><td> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <table> +| <tbody> +| <tr> +| <th> +| <select> +| <td> + +#data +<!doctype html><table><caption><select><tr> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <table> +| <caption> +| <select> +| <tbody> +| <tr> + +#data +<!doctype html><select><tr> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <select> + +#data +<!doctype html><select><td> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <select> + +#data +<!doctype html><select><th> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <select> + +#data +<!doctype html><select><tbody> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <select> + +#data +<!doctype html><select><thead> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <select> + +#data +<!doctype html><select><tfoot> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <select> + +#data +<!doctype html><select><caption> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <select> + +#data +<!doctype html><table><tr></table>a +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <table> +| <tbody> +| <tr> +| "a" diff --git a/vendor/golang.org/x/net/html/testdata/webkit/tests18.dat b/vendor/golang.org/x/net/html/testdata/webkit/tests18.dat new file mode 100644 index 0000000..680e1f0 --- /dev/null +++ b/vendor/golang.org/x/net/html/testdata/webkit/tests18.dat @@ -0,0 +1,269 @@ +#data +<!doctype html><plaintext></plaintext> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <plaintext> +| "</plaintext>" + +#data +<!doctype html><table><plaintext></plaintext> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <plaintext> +| "</plaintext>" +| <table> + +#data +<!doctype html><table><tbody><plaintext></plaintext> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <plaintext> +| "</plaintext>" +| <table> +| <tbody> + +#data +<!doctype html><table><tbody><tr><plaintext></plaintext> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <plaintext> +| "</plaintext>" +| <table> +| <tbody> +| <tr> + +#data +<!doctype html><table><tbody><tr><plaintext></plaintext> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <plaintext> +| "</plaintext>" +| <table> +| <tbody> +| <tr> + +#data +<!doctype html><table><td><plaintext></plaintext> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <table> +| <tbody> +| <tr> +| <td> +| <plaintext> +| "</plaintext>" + +#data +<!doctype html><table><caption><plaintext></plaintext> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <table> +| <caption> +| <plaintext> +| "</plaintext>" + +#data +<!doctype html><table><tr><style></script></style>abc +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| "abc" +| <table> +| <tbody> +| <tr> +| <style> +| "</script>" + +#data +<!doctype html><table><tr><script></style></script>abc +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| "abc" +| <table> +| <tbody> +| <tr> +| <script> +| "</style>" + +#data +<!doctype html><table><caption><style></script></style>abc +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <table> +| <caption> +| <style> +| "</script>" +| "abc" + +#data +<!doctype html><table><td><style></script></style>abc +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <table> +| <tbody> +| <tr> +| <td> +| <style> +| "</script>" +| "abc" + +#data +<!doctype html><select><script></style></script>abc +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <select> +| <script> +| "</style>" +| "abc" + +#data +<!doctype html><table><select><script></style></script>abc +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <select> +| <script> +| "</style>" +| "abc" +| <table> + +#data +<!doctype html><table><tr><select><script></style></script>abc +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <select> +| <script> +| "</style>" +| "abc" +| <table> +| <tbody> +| <tr> + +#data +<!doctype html><frameset></frameset><noframes>abc +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> +| <noframes> +| "abc" + +#data +<!doctype html><frameset></frameset><noframes>abc</noframes><!--abc--> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> +| <noframes> +| "abc" +| <!-- abc --> + +#data +<!doctype html><frameset></frameset></html><noframes>abc +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> +| <noframes> +| "abc" + +#data +<!doctype html><frameset></frameset></html><noframes>abc</noframes><!--abc--> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> +| <noframes> +| "abc" +| <!-- abc --> + +#data +<!doctype html><table><tr></tbody><tfoot> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <table> +| <tbody> +| <tr> +| <tfoot> + +#data +<!doctype html><table><td><svg></svg>abc<td> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <table> +| <tbody> +| <tr> +| <td> +| <svg svg> +| "abc" +| <td> diff --git a/vendor/golang.org/x/net/html/testdata/webkit/tests19.dat b/vendor/golang.org/x/net/html/testdata/webkit/tests19.dat new file mode 100644 index 0000000..0d62f5a --- /dev/null +++ b/vendor/golang.org/x/net/html/testdata/webkit/tests19.dat @@ -0,0 +1,1237 @@ +#data +<!doctype html><math><mn DefinitionUrl="foo"> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <math math> +| <math mn> +| definitionURL="foo" + +#data +<!doctype html><html></p><!--foo--> +#errors +#document +| <!DOCTYPE html> +| <html> +| <!-- foo --> +| <head> +| <body> + +#data +<!doctype html><head></head></p><!--foo--> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <!-- foo --> +| <body> + +#data +<!doctype html><body><p><pre> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <p> +| <pre> + +#data +<!doctype html><body><p><listing> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <p> +| <listing> + +#data +<!doctype html><p><plaintext> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <p> +| <plaintext> + +#data +<!doctype html><p><h1> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <p> +| <h1> + +#data +<!doctype html><form><isindex> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <form> + +#data +<!doctype html><isindex action="POST"> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <form> +| action="POST" +| <hr> +| <label> +| "This is a searchable index. Enter search keywords: " +| <input> +| name="isindex" +| <hr> + +#data +<!doctype html><isindex prompt="this is isindex"> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <form> +| <hr> +| <label> +| "this is isindex" +| <input> +| name="isindex" +| <hr> + +#data +<!doctype html><isindex type="hidden"> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <form> +| <hr> +| <label> +| "This is a searchable index. Enter search keywords: " +| <input> +| name="isindex" +| type="hidden" +| <hr> + +#data +<!doctype html><isindex name="foo"> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <form> +| <hr> +| <label> +| "This is a searchable index. Enter search keywords: " +| <input> +| name="isindex" +| <hr> + +#data +<!doctype html><ruby><p><rp> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <ruby> +| <p> +| <rp> + +#data +<!doctype html><ruby><div><span><rp> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <ruby> +| <div> +| <span> +| <rp> + +#data +<!doctype html><ruby><div><p><rp> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <ruby> +| <div> +| <p> +| <rp> + +#data +<!doctype html><ruby><p><rt> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <ruby> +| <p> +| <rt> + +#data +<!doctype html><ruby><div><span><rt> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <ruby> +| <div> +| <span> +| <rt> + +#data +<!doctype html><ruby><div><p><rt> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <ruby> +| <div> +| <p> +| <rt> + +#data +<!doctype html><math/><foo> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <math math> +| <foo> + +#data +<!doctype html><svg/><foo> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <svg svg> +| <foo> + +#data +<!doctype html><div></body><!--foo--> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <div> +| <!-- foo --> + +#data +<!doctype html><h1><div><h3><span></h1>foo +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <h1> +| <div> +| <h3> +| <span> +| "foo" + +#data +<!doctype html><p></h3>foo +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <p> +| "foo" + +#data +<!doctype html><h3><li>abc</h2>foo +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <h3> +| <li> +| "abc" +| "foo" + +#data +<!doctype html><table>abc<!--foo--> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| "abc" +| <table> +| <!-- foo --> + +#data +<!doctype html><table> <!--foo--> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <table> +| " " +| <!-- foo --> + +#data +<!doctype html><table> b <!--foo--> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| " b " +| <table> +| <!-- foo --> + +#data +<!doctype html><select><option><option> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <select> +| <option> +| <option> + +#data +<!doctype html><select><option></optgroup> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <select> +| <option> + +#data +<!doctype html><select><option></optgroup> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <select> +| <option> + +#data +<!doctype html><p><math><mi><p><h1> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <p> +| <math math> +| <math mi> +| <p> +| <h1> + +#data +<!doctype html><p><math><mo><p><h1> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <p> +| <math math> +| <math mo> +| <p> +| <h1> + +#data +<!doctype html><p><math><mn><p><h1> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <p> +| <math math> +| <math mn> +| <p> +| <h1> + +#data +<!doctype html><p><math><ms><p><h1> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <p> +| <math math> +| <math ms> +| <p> +| <h1> + +#data +<!doctype html><p><math><mtext><p><h1> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <p> +| <math math> +| <math mtext> +| <p> +| <h1> + +#data +<!doctype html><frameset></noframes> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> + +#data +<!doctype html><html c=d><body></html><html a=b> +#errors +#document +| <!DOCTYPE html> +| <html> +| a="b" +| c="d" +| <head> +| <body> + +#data +<!doctype html><html c=d><frameset></frameset></html><html a=b> +#errors +#document +| <!DOCTYPE html> +| <html> +| a="b" +| c="d" +| <head> +| <frameset> + +#data +<!doctype html><html><frameset></frameset></html><!--foo--> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> +| <!-- foo --> + +#data +<!doctype html><html><frameset></frameset></html> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> +| " " + +#data +<!doctype html><html><frameset></frameset></html>abc +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> + +#data +<!doctype html><html><frameset></frameset></html><p> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> + +#data +<!doctype html><html><frameset></frameset></html></p> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> + +#data +<html><frameset></frameset></html><!doctype html> +#errors +#document +| <html> +| <head> +| <frameset> + +#data +<!doctype html><body><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> + +#data +<!doctype html><p><frameset><frame> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> +| <frame> + +#data +<!doctype html><p>a<frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <p> +| "a" + +#data +<!doctype html><p> <frameset><frame> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> +| <frame> + +#data +<!doctype html><pre><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <pre> + +#data +<!doctype html><listing><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <listing> + +#data +<!doctype html><li><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <li> + +#data +<!doctype html><dd><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <dd> + +#data +<!doctype html><dt><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <dt> + +#data +<!doctype html><button><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <button> + +#data +<!doctype html><applet><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <applet> + +#data +<!doctype html><marquee><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <marquee> + +#data +<!doctype html><object><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <object> + +#data +<!doctype html><table><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <table> + +#data +<!doctype html><area><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <area> + +#data +<!doctype html><basefont><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <basefont> +| <frameset> + +#data +<!doctype html><bgsound><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <bgsound> +| <frameset> + +#data +<!doctype html><br><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <br> + +#data +<!doctype html><embed><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <embed> + +#data +<!doctype html><img><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <img> + +#data +<!doctype html><input><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <input> + +#data +<!doctype html><keygen><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <keygen> + +#data +<!doctype html><wbr><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <wbr> + +#data +<!doctype html><hr><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <hr> + +#data +<!doctype html><textarea></textarea><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <textarea> + +#data +<!doctype html><xmp></xmp><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <xmp> + +#data +<!doctype html><iframe></iframe><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <iframe> + +#data +<!doctype html><select></select><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <select> + +#data +<!doctype html><svg></svg><frameset><frame> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> +| <frame> + +#data +<!doctype html><math></math><frameset><frame> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> +| <frame> + +#data +<!doctype html><svg><foreignObject><div> <frameset><frame> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> +| <frame> + +#data +<!doctype html><svg>a</svg><frameset><frame> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <svg svg> +| "a" + +#data +<!doctype html><svg> </svg><frameset><frame> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> +| <frame> + +#data +<html>aaa<frameset></frameset> +#errors +#document +| <html> +| <head> +| <body> +| "aaa" + +#data +<html> a <frameset></frameset> +#errors +#document +| <html> +| <head> +| <body> +| "a " + +#data +<!doctype html><div><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> + +#data +<!doctype html><div><body><frameset> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <div> + +#data +<!doctype html><p><math></p>a +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <p> +| <math math> +| "a" + +#data +<!doctype html><p><math><mn><span></p>a +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <p> +| <math math> +| <math mn> +| <span> +| <p> +| "a" + +#data +<!doctype html><math></html> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <math math> + +#data +<!doctype html><meta charset="ascii"> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <meta> +| charset="ascii" +| <body> + +#data +<!doctype html><meta http-equiv="content-type" content="text/html;charset=ascii"> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <meta> +| content="text/html;charset=ascii" +| http-equiv="content-type" +| <body> + +#data +<!doctype html><head><!--aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa--><meta charset="utf8"> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <!-- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa --> +| <meta> +| charset="utf8" +| <body> + +#data +<!doctype html><html a=b><head></head><html c=d> +#errors +#document +| <!DOCTYPE html> +| <html> +| a="b" +| c="d" +| <head> +| <body> + +#data +<!doctype html><image/> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <img> + +#data +<!doctype html>a<i>b<table>c<b>d</i>e</b>f +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| "a" +| <i> +| "bc" +| <b> +| "de" +| "f" +| <table> + +#data +<!doctype html><table><i>a<b>b<div>c<a>d</i>e</b>f +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <i> +| "a" +| <b> +| "b" +| <b> +| <div> +| <b> +| <i> +| "c" +| <a> +| "d" +| <a> +| "e" +| <a> +| "f" +| <table> + +#data +<!doctype html><i>a<b>b<div>c<a>d</i>e</b>f +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <i> +| "a" +| <b> +| "b" +| <b> +| <div> +| <b> +| <i> +| "c" +| <a> +| "d" +| <a> +| "e" +| <a> +| "f" + +#data +<!doctype html><table><i>a<b>b<div>c</i> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <i> +| "a" +| <b> +| "b" +| <b> +| <div> +| <i> +| "c" +| <table> + +#data +<!doctype html><table><i>a<b>b<div>c<a>d</i>e</b>f +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <i> +| "a" +| <b> +| "b" +| <b> +| <div> +| <b> +| <i> +| "c" +| <a> +| "d" +| <a> +| "e" +| <a> +| "f" +| <table> + +#data +<!doctype html><table><i>a<div>b<tr>c<b>d</i>e +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <i> +| "a" +| <div> +| "b" +| <i> +| "c" +| <b> +| "d" +| <b> +| "e" +| <table> +| <tbody> +| <tr> + +#data +<!doctype html><table><td><table><i>a<div>b<b>c</i>d +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <table> +| <tbody> +| <tr> +| <td> +| <i> +| "a" +| <div> +| <i> +| "b" +| <b> +| "c" +| <b> +| "d" +| <table> + +#data +<!doctype html><body><bgsound> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <bgsound> + +#data +<!doctype html><body><basefont> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <basefont> + +#data +<!doctype html><a><b></a><basefont> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <a> +| <b> +| <basefont> + +#data +<!doctype html><a><b></a><bgsound> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <a> +| <b> +| <bgsound> + +#data +<!doctype html><figcaption><article></figcaption>a +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <figcaption> +| <article> +| "a" + +#data +<!doctype html><summary><article></summary>a +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <summary> +| <article> +| "a" + +#data +<!doctype html><p><a><plaintext>b +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <p> +| <a> +| <plaintext> +| <a> +| "b" + +#data +<!DOCTYPE html><div>a<a></div>b<p>c</p>d +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <div> +| "a" +| <a> +| <a> +| "b" +| <p> +| "c" +| "d" diff --git a/vendor/golang.org/x/net/html/testdata/webkit/tests2.dat b/vendor/golang.org/x/net/html/testdata/webkit/tests2.dat new file mode 100644 index 0000000..60d8592 --- /dev/null +++ b/vendor/golang.org/x/net/html/testdata/webkit/tests2.dat @@ -0,0 +1,763 @@ +#data +<!DOCTYPE html>Test +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| "Test" + +#data +<textarea>test</div>test +#errors +Line: 1 Col: 10 Unexpected start tag (textarea). Expected DOCTYPE. +Line: 1 Col: 24 Expected closing tag. Unexpected end of file. +#document +| <html> +| <head> +| <body> +| <textarea> +| "test</div>test" + +#data +<table><td> +#errors +Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. +Line: 1 Col: 11 Unexpected table cell start tag (td) in the table body phase. +Line: 1 Col: 11 Expected closing tag. Unexpected end of file. +#document +| <html> +| <head> +| <body> +| <table> +| <tbody> +| <tr> +| <td> + +#data +<table><td>test</tbody></table> +#errors +Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. +Line: 1 Col: 11 Unexpected table cell start tag (td) in the table body phase. +#document +| <html> +| <head> +| <body> +| <table> +| <tbody> +| <tr> +| <td> +| "test" + +#data +<frame>test +#errors +Line: 1 Col: 7 Unexpected start tag (frame). Expected DOCTYPE. +Line: 1 Col: 7 Unexpected start tag frame. Ignored. +#document +| <html> +| <head> +| <body> +| "test" + +#data +<!DOCTYPE html><frameset>test +#errors +Line: 1 Col: 29 Unepxected characters in the frameset phase. Characters ignored. +Line: 1 Col: 29 Expected closing tag. Unexpected end of file. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> + +#data +<!DOCTYPE html><frameset><!DOCTYPE html> +#errors +Line: 1 Col: 40 Unexpected DOCTYPE. Ignored. +Line: 1 Col: 40 Expected closing tag. Unexpected end of file. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <frameset> + +#data +<!DOCTYPE html><font><p><b>test</font> +#errors +Line: 1 Col: 38 End tag (font) violates step 1, paragraph 3 of the adoption agency algorithm. +Line: 1 Col: 38 End tag (font) violates step 1, paragraph 3 of the adoption agency algorithm. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <font> +| <p> +| <font> +| <b> +| "test" + +#data +<!DOCTYPE html><dt><div><dd> +#errors +Line: 1 Col: 28 Missing end tag (div, dt). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <dt> +| <div> +| <dd> + +#data +<script></x +#errors +Line: 1 Col: 8 Unexpected start tag (script). Expected DOCTYPE. +Line: 1 Col: 11 Unexpected end of file. Expected end tag (script). +#document +| <html> +| <head> +| <script> +| "</x" +| <body> + +#data +<table><plaintext><td> +#errors +Line: 1 Col: 7 Unexpected start tag (table). Expected DOCTYPE. +Line: 1 Col: 18 Unexpected start tag (plaintext) in table context caused voodoo mode. +Line: 1 Col: 22 Unexpected end of file. Expected table content. +#document +| <html> +| <head> +| <body> +| <plaintext> +| "<td>" +| <table> + +#data +<plaintext></plaintext> +#errors +Line: 1 Col: 11 Unexpected start tag (plaintext). Expected DOCTYPE. +Line: 1 Col: 23 Expected closing tag. Unexpected end of file. +#document +| <html> +| <head> +| <body> +| <plaintext> +| "</plaintext>" + +#data +<!DOCTYPE html><table><tr>TEST +#errors +Line: 1 Col: 30 Unexpected non-space characters in table context caused voodoo mode. +Line: 1 Col: 30 Unexpected end of file. Expected table content. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| "TEST" +| <table> +| <tbody> +| <tr> + +#data +<!DOCTYPE html><body t1=1><body t2=2><body t3=3 t4=4> +#errors +Line: 1 Col: 37 Unexpected start tag (body). +Line: 1 Col: 53 Unexpected start tag (body). +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| t1="1" +| t2="2" +| t3="3" +| t4="4" + +#data +</b test +#errors +Line: 1 Col: 8 Unexpected end of file in attribute name. +Line: 1 Col: 8 End tag contains unexpected attributes. +Line: 1 Col: 8 Unexpected end tag (b). Expected DOCTYPE. +Line: 1 Col: 8 Unexpected end tag (b) after the (implied) root element. +#document +| <html> +| <head> +| <body> + +#data +<!DOCTYPE html></b test<b &=&>X +#errors +Line: 1 Col: 32 Named entity didn't end with ';'. +Line: 1 Col: 33 End tag contains unexpected attributes. +Line: 1 Col: 33 Unexpected end tag (b) after the (implied) root element. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| "X" + +#data +<!doctypehtml><scrIPt type=text/x-foobar;baz>X</SCRipt +#errors +Line: 1 Col: 9 No space after literal string 'DOCTYPE'. +Line: 1 Col: 54 Unexpected end of file in the tag name. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <script> +| type="text/x-foobar;baz" +| "X</SCRipt" +| <body> + +#data +& +#errors +Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE. +#document +| <html> +| <head> +| <body> +| "&" + +#data +&# +#errors +Line: 1 Col: 1 Numeric entity expected. Got end of file instead. +Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE. +#document +| <html> +| <head> +| <body> +| "&#" + +#data +&#X +#errors +Line: 1 Col: 3 Numeric entity expected but none found. +Line: 1 Col: 3 Unexpected non-space characters. Expected DOCTYPE. +#document +| <html> +| <head> +| <body> +| "&#X" + +#data +&#x +#errors +Line: 1 Col: 3 Numeric entity expected but none found. +Line: 1 Col: 3 Unexpected non-space characters. Expected DOCTYPE. +#document +| <html> +| <head> +| <body> +| "&#x" + +#data +- +#errors +Line: 1 Col: 4 Numeric entity didn't end with ';'. +Line: 1 Col: 4 Unexpected non-space characters. Expected DOCTYPE. +#document +| <html> +| <head> +| <body> +| "-" + +#data +&x-test +#errors +Line: 1 Col: 1 Named entity expected. Got none. +Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE. +#document +| <html> +| <head> +| <body> +| "&x-test" + +#data +<!doctypehtml><p><li> +#errors +Line: 1 Col: 9 No space after literal string 'DOCTYPE'. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <p> +| <li> + +#data +<!doctypehtml><p><dt> +#errors +Line: 1 Col: 9 No space after literal string 'DOCTYPE'. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <p> +| <dt> + +#data +<!doctypehtml><p><dd> +#errors +Line: 1 Col: 9 No space after literal string 'DOCTYPE'. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <p> +| <dd> + +#data +<!doctypehtml><p><form> +#errors +Line: 1 Col: 9 No space after literal string 'DOCTYPE'. +Line: 1 Col: 23 Expected closing tag. Unexpected end of file. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <p> +| <form> + +#data +<!DOCTYPE html><p></P>X +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <p> +| "X" + +#data +& +#errors +Line: 1 Col: 4 Named entity didn't end with ';'. +Line: 1 Col: 4 Unexpected non-space characters. Expected DOCTYPE. +#document +| <html> +| <head> +| <body> +| "&" + +#data +&AMp; +#errors +Line: 1 Col: 1 Named entity expected. Got none. +Line: 1 Col: 1 Unexpected non-space characters. Expected DOCTYPE. +#document +| <html> +| <head> +| <body> +| "&AMp;" + +#data +<!DOCTYPE html><html><head></head><body><thisISasillyTESTelementNameToMakeSureCrazyTagNamesArePARSEDcorrectLY> +#errors +Line: 1 Col: 110 Expected closing tag. Unexpected end of file. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <thisisasillytestelementnametomakesurecrazytagnamesareparsedcorrectly> + +#data +<!DOCTYPE html>X</body>X +#errors +Line: 1 Col: 24 Unexpected non-space characters in the after body phase. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| "XX" + +#data +<!DOCTYPE html><!-- X +#errors +Line: 1 Col: 21 Unexpected end of file in comment. +#document +| <!DOCTYPE html> +| <!-- X --> +| <html> +| <head> +| <body> + +#data +<!DOCTYPE html><table><caption>test TEST</caption><td>test +#errors +Line: 1 Col: 54 Unexpected table cell start tag (td) in the table body phase. +Line: 1 Col: 58 Expected closing tag. Unexpected end of file. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <table> +| <caption> +| "test TEST" +| <tbody> +| <tr> +| <td> +| "test" + +#data +<!DOCTYPE html><select><option><optgroup> +#errors +Line: 1 Col: 41 Expected closing tag. Unexpected end of file. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <select> +| <option> +| <optgroup> + +#data +<!DOCTYPE html><select><optgroup><option></optgroup><option><select><option> +#errors +Line: 1 Col: 68 Unexpected select start tag in the select phase treated as select end tag. +Line: 1 Col: 76 Expected closing tag. Unexpected end of file. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <select> +| <optgroup> +| <option> +| <option> +| <option> + +#data +<!DOCTYPE html><select><optgroup><option><optgroup> +#errors +Line: 1 Col: 51 Expected closing tag. Unexpected end of file. +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <select> +| <optgroup> +| <option> +| <optgroup> + +#data +<!DOCTYPE html><datalist><option>foo</datalist>bar +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <datalist> +| <option> +| "foo" +| "bar" + +#data +<!DOCTYPE html><font><input><input></font> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <font> +| <input> +| <input> + +#data +<!DOCTYPE html><!-- XXX - XXX --> +#errors +#document +| <!DOCTYPE html> +| <!-- XXX - XXX --> +| <html> +| <head> +| <body> + +#data +<!DOCTYPE html><!-- XXX - XXX +#errors +Line: 1 Col: 29 Unexpected end of file in comment (-) +#document +| <!DOCTYPE html> +| <!-- XXX - XXX --> +| <html> +| <head> +| <body> + +#data +<!DOCTYPE html><!-- XXX - XXX - XXX --> +#errors +#document +| <!DOCTYPE html> +| <!-- XXX - XXX - XXX --> +| <html> +| <head> +| <body> + +#data +<isindex test=x name=x> +#errors +Line: 1 Col: 23 Unexpected start tag (isindex). Expected DOCTYPE. +Line: 1 Col: 23 Unexpected start tag isindex. Don't use it! +#document +| <html> +| <head> +| <body> +| <form> +| <hr> +| <label> +| "This is a searchable index. Enter search keywords: " +| <input> +| name="isindex" +| test="x" +| <hr> + +#data +test +test +#errors +Line: 2 Col: 4 Unexpected non-space characters. Expected DOCTYPE. +#document +| <html> +| <head> +| <body> +| "test +test" + +#data +<!DOCTYPE html><body><title>test</body> +#errors +#document +| +| +| +| +| +| "test</body>" + +#data +<!DOCTYPE html><body><title>X +#errors +#document +| +| +| +| +| +| "X" +| <meta> +| name="z" +| <link> +| rel="foo" +| <style> +| " +x { content:"</style" } " + +#data +<!DOCTYPE html><select><optgroup></optgroup></select> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> +| <select> +| <optgroup> + +#data + + +#errors +Line: 2 Col: 1 Unexpected End of file. Expected DOCTYPE. +#document +| <html> +| <head> +| <body> + +#data +<!DOCTYPE html> <html> +#errors +#document +| <!DOCTYPE html> +| <html> +| <head> +| <body> + +#data +<!DOCTYPE html><script> +</script> <title>x +#errors +#document +| +| +| +| +#errors +Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE. +Line: 1 Col: 21 Unexpected start tag (script) that can be in head. Moved. +#document +| +| +| +#errors +Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE. +Line: 1 Col: 28 Unexpected start tag (style) that can be in head. Moved. +#document +| +| +| +#errors +Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE. +#document +| +| +| +| +| "x" +| x +#errors +Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. +Line: 1 Col: 22 Unexpected end of file. Expected end tag (style). +#document +| +| +| --> x +#errors +Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. +#document +| +| +| x +#errors +Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. +#document +| +| +| x +#errors +Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. +#document +| +| +| x +#errors +Line: 1 Col: 7 Unexpected start tag (style). Expected DOCTYPE. +#document +| +| +|

+#errors +#document +| +| +| +| +| +| ddd +#errors +#document +| +| +| +#errors +#document +| +| +| +| +|
  • +| +| ", + " +
    << Back to Go HTTP/2 demo server`) + }) +} + +func httpsHost() string { + if *hostHTTPS != "" { + return *hostHTTPS + } + if v := *httpsAddr; strings.HasPrefix(v, ":") { + return "localhost" + v + } else { + return v + } +} + +func httpHost() string { + if *hostHTTP != "" { + return *hostHTTP + } + if v := *httpAddr; strings.HasPrefix(v, ":") { + return "localhost" + v + } else { + return v + } +} + +func serveProdTLS() error { + c, err := googlestorage.NewServiceClient() + if err != nil { + return err + } + slurp := func(key string) ([]byte, error) { + const bucket = "http2-demo-server-tls" + rc, _, err := c.GetObject(&googlestorage.Object{ + Bucket: bucket, + Key: key, + }) + if err != nil { + return nil, fmt.Errorf("Error fetching GCS object %q in bucket %q: %v", key, bucket, err) + } + defer rc.Close() + return ioutil.ReadAll(rc) + } + certPem, err := slurp("http2.golang.org.chained.pem") + if err != nil { + return err + } + keyPem, err := slurp("http2.golang.org.key") + if err != nil { + return err + } + cert, err := tls.X509KeyPair(certPem, keyPem) + if err != nil { + return err + } + srv := &http.Server{ + TLSConfig: &tls.Config{ + Certificates: []tls.Certificate{cert}, + }, + } + http2.ConfigureServer(srv, &http2.Server{}) + ln, err := net.Listen("tcp", ":443") + if err != nil { + return err + } + return srv.Serve(tls.NewListener(tcpKeepAliveListener{ln.(*net.TCPListener)}, srv.TLSConfig)) +} + +type tcpKeepAliveListener struct { + *net.TCPListener +} + +func (ln tcpKeepAliveListener) Accept() (c net.Conn, err error) { + tc, err := ln.AcceptTCP() + if err != nil { + return + } + tc.SetKeepAlive(true) + tc.SetKeepAlivePeriod(3 * time.Minute) + return tc, nil +} + +func serveProd() error { + errc := make(chan error, 2) + go func() { errc <- http.ListenAndServe(":80", nil) }() + go func() { errc <- serveProdTLS() }() + return <-errc +} + +func main() { + var srv http.Server + flag.BoolVar(&http2.VerboseLogs, "verbose", false, "Verbose HTTP/2 debugging.") + flag.Parse() + srv.Addr = *httpsAddr + + registerHandlers() + + if *prod { + *hostHTTP = "http2.golang.org" + *hostHTTPS = "http2.golang.org" + log.Fatal(serveProd()) + } + + url := "https://" + httpsHost() + "/" + log.Printf("Listening on " + url) + http2.ConfigureServer(&srv, &http2.Server{}) + + if *httpAddr != "" { + go func() { + log.Printf("Listening on http://" + httpHost() + "/ (for unencrypted HTTP/1)") + log.Fatal(http.ListenAndServe(*httpAddr, nil)) + }() + } + + go func() { + log.Fatal(srv.ListenAndServeTLS("server.crt", "server.key")) + }() + select {} +} diff --git a/vendor/golang.org/x/net/http2/h2demo/launch.go b/vendor/golang.org/x/net/http2/h2demo/launch.go new file mode 100644 index 0000000..7466615 --- /dev/null +++ b/vendor/golang.org/x/net/http2/h2demo/launch.go @@ -0,0 +1,302 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +package main + +import ( + "bufio" + "bytes" + "encoding/json" + "flag" + "fmt" + "io" + "io/ioutil" + "log" + "net/http" + "os" + "strings" + "time" + + "golang.org/x/oauth2" + "golang.org/x/oauth2/google" + compute "google.golang.org/api/compute/v1" +) + +var ( + proj = flag.String("project", "symbolic-datum-552", "name of Project") + zone = flag.String("zone", "us-central1-a", "GCE zone") + mach = flag.String("machinetype", "n1-standard-1", "Machine type") + instName = flag.String("instance_name", "http2-demo", "Name of VM instance.") + sshPub = flag.String("ssh_public_key", "", "ssh public key file to authorize. Can modify later in Google's web UI anyway.") + staticIP = flag.String("static_ip", "130.211.116.44", "Static IP to use. If empty, automatic.") + + writeObject = flag.String("write_object", "", "If non-empty, a VM isn't created and the flag value is Google Cloud Storage bucket/object to write. The contents from stdin.") + publicObject = flag.Bool("write_object_is_public", false, "Whether the object created by --write_object should be public.") +) + +func readFile(v string) string { + slurp, err := ioutil.ReadFile(v) + if err != nil { + log.Fatalf("Error reading %s: %v", v, err) + } + return strings.TrimSpace(string(slurp)) +} + +var config = &oauth2.Config{ + // The client-id and secret should be for an "Installed Application" when using + // the CLI. Later we'll use a web application with a callback. + ClientID: readFile("client-id.dat"), + ClientSecret: readFile("client-secret.dat"), + Endpoint: google.Endpoint, + Scopes: []string{ + compute.DevstorageFull_controlScope, + compute.ComputeScope, + "https://www.googleapis.com/auth/sqlservice", + "https://www.googleapis.com/auth/sqlservice.admin", + }, + RedirectURL: "urn:ietf:wg:oauth:2.0:oob", +} + +const baseConfig = `#cloud-config +coreos: + units: + - name: h2demo.service + command: start + content: | + [Unit] + Description=HTTP2 Demo + + [Service] + ExecStartPre=/bin/bash -c 'mkdir -p /opt/bin && curl -s -o /opt/bin/h2demo http://storage.googleapis.com/http2-demo-server-tls/h2demo && chmod +x /opt/bin/h2demo' + ExecStart=/opt/bin/h2demo --prod + RestartSec=5s + Restart=always + Type=simple + + [Install] + WantedBy=multi-user.target +` + +func main() { + flag.Parse() + if *proj == "" { + log.Fatalf("Missing --project flag") + } + prefix := "https://www.googleapis.com/compute/v1/projects/" + *proj + machType := prefix + "/zones/" + *zone + "/machineTypes/" + *mach + + const tokenFileName = "token.dat" + tokenFile := tokenCacheFile(tokenFileName) + tokenSource := oauth2.ReuseTokenSource(nil, tokenFile) + token, err := tokenSource.Token() + if err != nil { + if *writeObject != "" { + log.Fatalf("Can't use --write_object without a valid token.dat file already cached.") + } + log.Printf("Error getting token from %s: %v", tokenFileName, err) + log.Printf("Get auth code from %v", config.AuthCodeURL("my-state")) + fmt.Print("\nEnter auth code: ") + sc := bufio.NewScanner(os.Stdin) + sc.Scan() + authCode := strings.TrimSpace(sc.Text()) + token, err = config.Exchange(oauth2.NoContext, authCode) + if err != nil { + log.Fatalf("Error exchanging auth code for a token: %v", err) + } + if err := tokenFile.WriteToken(token); err != nil { + log.Fatalf("Error writing to %s: %v", tokenFileName, err) + } + tokenSource = oauth2.ReuseTokenSource(token, nil) + } + + oauthClient := oauth2.NewClient(oauth2.NoContext, tokenSource) + + if *writeObject != "" { + writeCloudStorageObject(oauthClient) + return + } + + computeService, _ := compute.New(oauthClient) + + natIP := *staticIP + if natIP == "" { + // Try to find it by name. + aggAddrList, err := computeService.Addresses.AggregatedList(*proj).Do() + if err != nil { + log.Fatal(err) + } + // http://godoc.org/code.google.com/p/google-api-go-client/compute/v1#AddressAggregatedList + IPLoop: + for _, asl := range aggAddrList.Items { + for _, addr := range asl.Addresses { + if addr.Name == *instName+"-ip" && addr.Status == "RESERVED" { + natIP = addr.Address + break IPLoop + } + } + } + } + + cloudConfig := baseConfig + if *sshPub != "" { + key := strings.TrimSpace(readFile(*sshPub)) + cloudConfig += fmt.Sprintf("\nssh_authorized_keys:\n - %s\n", key) + } + if os.Getenv("USER") == "bradfitz" { + cloudConfig += fmt.Sprintf("\nssh_authorized_keys:\n - %s\n", "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAwks9dwWKlRC+73gRbvYtVg0vdCwDSuIlyt4z6xa/YU/jTDynM4R4W10hm2tPjy8iR1k8XhDv4/qdxe6m07NjG/By1tkmGpm1mGwho4Pr5kbAAy/Qg+NLCSdAYnnE00FQEcFOC15GFVMOW2AzDGKisReohwH9eIzHPzdYQNPRWXE= bradfitz@papag.bradfitz.com") + } + const maxCloudConfig = 32 << 10 // per compute API docs + if len(cloudConfig) > maxCloudConfig { + log.Fatalf("cloud config length of %d bytes is over %d byte limit", len(cloudConfig), maxCloudConfig) + } + + instance := &compute.Instance{ + Name: *instName, + Description: "Go Builder", + MachineType: machType, + Disks: []*compute.AttachedDisk{instanceDisk(computeService)}, + Tags: &compute.Tags{ + Items: []string{"http-server", "https-server"}, + }, + Metadata: &compute.Metadata{ + Items: []*compute.MetadataItems{ + { + Key: "user-data", + Value: cloudConfig, + }, + }, + }, + NetworkInterfaces: []*compute.NetworkInterface{ + &compute.NetworkInterface{ + AccessConfigs: []*compute.AccessConfig{ + &compute.AccessConfig{ + Type: "ONE_TO_ONE_NAT", + Name: "External NAT", + NatIP: natIP, + }, + }, + Network: prefix + "/global/networks/default", + }, + }, + ServiceAccounts: []*compute.ServiceAccount{ + { + Email: "default", + Scopes: []string{ + compute.DevstorageFull_controlScope, + compute.ComputeScope, + }, + }, + }, + } + + log.Printf("Creating instance...") + op, err := computeService.Instances.Insert(*proj, *zone, instance).Do() + if err != nil { + log.Fatalf("Failed to create instance: %v", err) + } + opName := op.Name + log.Printf("Created. Waiting on operation %v", opName) +OpLoop: + for { + time.Sleep(2 * time.Second) + op, err := computeService.ZoneOperations.Get(*proj, *zone, opName).Do() + if err != nil { + log.Fatalf("Failed to get op %s: %v", opName, err) + } + switch op.Status { + case "PENDING", "RUNNING": + log.Printf("Waiting on operation %v", opName) + continue + case "DONE": + if op.Error != nil { + for _, operr := range op.Error.Errors { + log.Printf("Error: %+v", operr) + } + log.Fatalf("Failed to start.") + } + log.Printf("Success. %+v", op) + break OpLoop + default: + log.Fatalf("Unknown status %q: %+v", op.Status, op) + } + } + + inst, err := computeService.Instances.Get(*proj, *zone, *instName).Do() + if err != nil { + log.Fatalf("Error getting instance after creation: %v", err) + } + ij, _ := json.MarshalIndent(inst, "", " ") + log.Printf("Instance: %s", ij) +} + +func instanceDisk(svc *compute.Service) *compute.AttachedDisk { + const imageURL = "https://www.googleapis.com/compute/v1/projects/coreos-cloud/global/images/coreos-stable-444-5-0-v20141016" + diskName := *instName + "-disk" + + return &compute.AttachedDisk{ + AutoDelete: true, + Boot: true, + Type: "PERSISTENT", + InitializeParams: &compute.AttachedDiskInitializeParams{ + DiskName: diskName, + SourceImage: imageURL, + DiskSizeGb: 50, + }, + } +} + +func writeCloudStorageObject(httpClient *http.Client) { + content := os.Stdin + const maxSlurp = 1 << 20 + var buf bytes.Buffer + n, err := io.CopyN(&buf, content, maxSlurp) + if err != nil && err != io.EOF { + log.Fatalf("Error reading from stdin: %v, %v", n, err) + } + contentType := http.DetectContentType(buf.Bytes()) + + req, err := http.NewRequest("PUT", "https://storage.googleapis.com/"+*writeObject, io.MultiReader(&buf, content)) + if err != nil { + log.Fatal(err) + } + req.Header.Set("x-goog-api-version", "2") + if *publicObject { + req.Header.Set("x-goog-acl", "public-read") + } + req.Header.Set("Content-Type", contentType) + res, err := httpClient.Do(req) + if err != nil { + log.Fatal(err) + } + if res.StatusCode != 200 { + res.Write(os.Stderr) + log.Fatalf("Failed.") + } + log.Printf("Success.") + os.Exit(0) +} + +type tokenCacheFile string + +func (f tokenCacheFile) Token() (*oauth2.Token, error) { + slurp, err := ioutil.ReadFile(string(f)) + if err != nil { + return nil, err + } + t := new(oauth2.Token) + if err := json.Unmarshal(slurp, t); err != nil { + return nil, err + } + return t, nil +} + +func (f tokenCacheFile) WriteToken(t *oauth2.Token) error { + jt, err := json.Marshal(t) + if err != nil { + return err + } + return ioutil.WriteFile(string(f), jt, 0600) +} diff --git a/vendor/golang.org/x/net/http2/h2demo/rootCA.key b/vendor/golang.org/x/net/http2/h2demo/rootCA.key new file mode 100644 index 0000000..a15a6ab --- /dev/null +++ b/vendor/golang.org/x/net/http2/h2demo/rootCA.key @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEAt5fAjp4fTcekWUTfzsp0kyih1OYbsGL0KX1eRbSSR8Od0+9Q +62Hyny+GFwMTb4A/KU8mssoHvcceSAAbwfbxFK/+s51TobqUnORZrOoTZjkUygby +XDSK99YBbcR1Pip8vwMTm4XKuLtCigeBBdjjAQdgUO28LENGlsMnmeYkJfODVGnV +mr5Ltb9ANA8IKyTfsnHJ4iOCS/PlPbUj2q7YnoVLposUBMlgUb/CykX3mOoLb4yJ +JQyA/iST6ZxiIEj36D4yWZ5lg7YJl+UiiBQHGCnPdGyipqV06ex0heYWcaiW8LWZ +SUQ93jQ+WVCH8hT7DQO1dmsvUmXlq/JeAlwQ/QIDAQABAoIBAFFHV7JMAqPWnMYA +nezY6J81v9+XN+7xABNWM2Q8uv4WdksbigGLTXR3/680Z2hXqJ7LMeC5XJACFT/e +/Gr0vmpgOCygnCPfjGehGKpavtfksXV3edikUlnCXsOP1C//c1bFL+sMYmFCVgTx +qYdDK8yKzXNGrKYT6q5YG7IglyRNV1rsQa8lM/5taFYiD1Ck/3tQi3YIq8Lcuser +hrxsMABcQ6mi+EIvG6Xr4mfJug0dGJMHG4RG1UGFQn6RXrQq2+q53fC8ZbVUSi0j +NQ918aKFzktwv+DouKU0ME4I9toks03gM860bAL7zCbKGmwR3hfgX/TqzVCWpG9E +LDVfvekCgYEA8fk9N53jbBRmULUGEf4qWypcLGiZnNU0OeXWpbPV9aa3H0VDytA7 +8fCN2dPAVDPqlthMDdVe983NCNwp2Yo8ZimDgowyIAKhdC25s1kejuaiH9OAPj3c +0f8KbriYX4n8zNHxFwK6Ae3pQ6EqOLJVCUsziUaZX9nyKY5aZlyX6xcCgYEAwjws +K62PjC64U5wYddNLp+kNdJ4edx+a7qBb3mEgPvSFT2RO3/xafJyG8kQB30Mfstjd +bRxyUV6N0vtX1zA7VQtRUAvfGCecpMo+VQZzcHXKzoRTnQ7eZg4Lmj5fQ9tOAKAo +QCVBoSW/DI4PZL26CAMDcAba4Pa22ooLapoRIQsCgYA6pIfkkbxLNkpxpt2YwLtt +Kr/590O7UaR9n6k8sW/aQBRDXNsILR1KDl2ifAIxpf9lnXgZJiwE7HiTfCAcW7c1 +nzwDCI0hWuHcMTS/NYsFYPnLsstyyjVZI3FY0h4DkYKV9Q9z3zJLQ2hz/nwoD3gy +b2pHC7giFcTts1VPV4Nt8wKBgHeFn4ihHJweg76vZz3Z78w7VNRWGFklUalVdDK7 +gaQ7w2y/ROn/146mo0OhJaXFIFRlrpvdzVrU3GDf2YXJYDlM5ZRkObwbZADjksev +WInzcgDy3KDg7WnPasRXbTfMU4t/AkW2p1QKbi3DnSVYuokDkbH2Beo45vxDxhKr +C69RAoGBAIyo3+OJenoZmoNzNJl2WPW5MeBUzSh8T/bgyjFTdqFHF5WiYRD/lfHj +x9Glyw2nutuT4hlOqHvKhgTYdDMsF2oQ72fe3v8Q5FU7FuKndNPEAyvKNXZaShVA +hnlhv5DjXKb0wFWnt5PCCiQLtzG0yyHaITrrEme7FikkIcTxaX/Y +-----END RSA PRIVATE KEY----- diff --git a/vendor/golang.org/x/net/http2/h2demo/rootCA.pem b/vendor/golang.org/x/net/http2/h2demo/rootCA.pem new file mode 100644 index 0000000..3a323e7 --- /dev/null +++ b/vendor/golang.org/x/net/http2/h2demo/rootCA.pem @@ -0,0 +1,26 @@ +-----BEGIN CERTIFICATE----- +MIIEWjCCA0KgAwIBAgIJALfRlWsI8YQHMA0GCSqGSIb3DQEBBQUAMHsxCzAJBgNV +BAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEUMBIG +A1UEChMLQnJhZGZpdHppbmMxEjAQBgNVBAMTCWxvY2FsaG9zdDEdMBsGCSqGSIb3 +DQEJARYOYnJhZEBkYW5nYS5jb20wHhcNMTQwNzE1MjA0NjA1WhcNMTcwNTA0MjA0 +NjA1WjB7MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xFDASBgNVBAoTC0JyYWRmaXR6aW5jMRIwEAYDVQQDEwlsb2NhbGhv +c3QxHTAbBgkqhkiG9w0BCQEWDmJyYWRAZGFuZ2EuY29tMIIBIjANBgkqhkiG9w0B +AQEFAAOCAQ8AMIIBCgKCAQEAt5fAjp4fTcekWUTfzsp0kyih1OYbsGL0KX1eRbSS +R8Od0+9Q62Hyny+GFwMTb4A/KU8mssoHvcceSAAbwfbxFK/+s51TobqUnORZrOoT +ZjkUygbyXDSK99YBbcR1Pip8vwMTm4XKuLtCigeBBdjjAQdgUO28LENGlsMnmeYk +JfODVGnVmr5Ltb9ANA8IKyTfsnHJ4iOCS/PlPbUj2q7YnoVLposUBMlgUb/CykX3 +mOoLb4yJJQyA/iST6ZxiIEj36D4yWZ5lg7YJl+UiiBQHGCnPdGyipqV06ex0heYW +caiW8LWZSUQ93jQ+WVCH8hT7DQO1dmsvUmXlq/JeAlwQ/QIDAQABo4HgMIHdMB0G +A1UdDgQWBBRcAROthS4P4U7vTfjByC569R7E6DCBrQYDVR0jBIGlMIGigBRcAROt +hS4P4U7vTfjByC569R7E6KF/pH0wezELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNB +MRYwFAYDVQQHEw1TYW4gRnJhbmNpc2NvMRQwEgYDVQQKEwtCcmFkZml0emluYzES +MBAGA1UEAxMJbG9jYWxob3N0MR0wGwYJKoZIhvcNAQkBFg5icmFkQGRhbmdhLmNv +bYIJALfRlWsI8YQHMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAG6h +U9f9sNH0/6oBbGGy2EVU0UgITUQIrFWo9rFkrW5k/XkDjQm+3lzjT0iGR4IxE/Ao +eU6sQhua7wrWeFEn47GL98lnCsJdD7oZNhFmQ95Tb/LnDUjs5Yj9brP0NWzXfYU4 +UK2ZnINJRcJpB8iRCaCxE8DdcUF0XqIEq6pA272snoLmiXLMvNl3kYEdm+je6voD +58SNVEUsztzQyXmJEhCpwVI0A6QCjzXj+qvpmw3ZZHi8JwXei8ZZBLTSFBki8Z7n +sH9BBH38/SzUmAN4QHSPy1gjqm00OAE8NaYDkh/bzE4d7mLGGMWp/WE3KPSu82HF +kPe6XoSbiLm/kxk32T0= +-----END CERTIFICATE----- diff --git a/vendor/golang.org/x/net/http2/h2demo/rootCA.srl b/vendor/golang.org/x/net/http2/h2demo/rootCA.srl new file mode 100644 index 0000000..6db3891 --- /dev/null +++ b/vendor/golang.org/x/net/http2/h2demo/rootCA.srl @@ -0,0 +1 @@ +E2CE26BF3285059C diff --git a/vendor/golang.org/x/net/http2/h2demo/server.crt b/vendor/golang.org/x/net/http2/h2demo/server.crt new file mode 100644 index 0000000..c59059b --- /dev/null +++ b/vendor/golang.org/x/net/http2/h2demo/server.crt @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDPjCCAiYCCQDizia/MoUFnDANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJV +UzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xFDASBgNVBAoT +C0JyYWRmaXR6aW5jMRIwEAYDVQQDEwlsb2NhbGhvc3QxHTAbBgkqhkiG9w0BCQEW +DmJyYWRAZGFuZ2EuY29tMB4XDTE0MDcxNTIwNTAyN1oXDTE1MTEyNzIwNTAyN1ow +RzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMQswCQYDVQQHEwJTRjEeMBwGA1UE +ChMVYnJhZGZpdHogaHR0cDIgc2VydmVyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEAs1Y9CyLFrdL8VQWN1WaifDqaZFnoqjHhCMlc1TfG2zA+InDifx2l +gZD3o8FeNnAcfM2sPlk3+ZleOYw9P/CklFVDlvqmpCv9ss/BEp/dDaWvy1LmJ4c2 +dbQJfmTxn7CV1H3TsVJvKdwFmdoABb41NoBp6+NNO7OtDyhbIMiCI0pL3Nefb3HL +A7hIMo3DYbORTtJLTIH9W8YKrEWL0lwHLrYFx/UdutZnv+HjdmO6vCN4na55mjws +/vjKQUmc7xeY7Xe20xDEG2oDKVkL2eD7FfyrYMS3rO1ExP2KSqlXYG/1S9I/fz88 +F0GK7HX55b5WjZCl2J3ERVdnv/0MQv+sYQIDAQABMA0GCSqGSIb3DQEBBQUAA4IB +AQC0zL+n/YpRZOdulSu9tS8FxrstXqGWoxfe+vIUgqfMZ5+0MkjJ/vW0FqlLDl2R +rn4XaR3e7FmWkwdDVbq/UB6lPmoAaFkCgh9/5oapMaclNVNnfF3fjCJfRr+qj/iD +EmJStTIN0ZuUjAlpiACmfnpEU55PafT5Zx+i1yE4FGjw8bJpFoyD4Hnm54nGjX19 +KeCuvcYFUPnBm3lcL0FalF2AjqV02WTHYNQk7YF/oeO7NKBoEgvGvKG3x+xaOeBI +dwvdq175ZsGul30h+QjrRlXhH/twcuaT3GSdoysDl9cCYE8f1Mk8PD6gan3uBCJU +90p6/CbU71bGbfpM2PHot2fm +-----END CERTIFICATE----- diff --git a/vendor/golang.org/x/net/http2/h2demo/server.key b/vendor/golang.org/x/net/http2/h2demo/server.key new file mode 100644 index 0000000..f329c14 --- /dev/null +++ b/vendor/golang.org/x/net/http2/h2demo/server.key @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEAs1Y9CyLFrdL8VQWN1WaifDqaZFnoqjHhCMlc1TfG2zA+InDi +fx2lgZD3o8FeNnAcfM2sPlk3+ZleOYw9P/CklFVDlvqmpCv9ss/BEp/dDaWvy1Lm +J4c2dbQJfmTxn7CV1H3TsVJvKdwFmdoABb41NoBp6+NNO7OtDyhbIMiCI0pL3Nef +b3HLA7hIMo3DYbORTtJLTIH9W8YKrEWL0lwHLrYFx/UdutZnv+HjdmO6vCN4na55 +mjws/vjKQUmc7xeY7Xe20xDEG2oDKVkL2eD7FfyrYMS3rO1ExP2KSqlXYG/1S9I/ +fz88F0GK7HX55b5WjZCl2J3ERVdnv/0MQv+sYQIDAQABAoIBADQ2spUwbY+bcz4p +3M66ECrNQTBggP40gYl2XyHxGGOu2xhZ94f9ELf1hjRWU2DUKWco1rJcdZClV6q3 +qwmXvcM2Q/SMS8JW0ImkNVl/0/NqPxGatEnj8zY30d/L8hGFb0orzFu/XYA5gCP4 +NbN2WrXgk3ZLeqwcNxHHtSiJWGJ/fPyeDWAu/apy75u9Xf2GlzBZmV6HYD9EfK80 +LTlI60f5FO487CrJnboL7ovPJrIHn+k05xRQqwma4orpz932rTXnTjs9Lg6KtbQN +a7PrqfAntIISgr11a66Mng3IYH1lYqJsWJJwX/xHT4WLEy0EH4/0+PfYemJekz2+ +Co62drECgYEA6O9zVJZXrLSDsIi54cfxA7nEZWm5CAtkYWeAHa4EJ+IlZ7gIf9sL +W8oFcEfFGpvwVqWZ+AsQ70dsjXAv3zXaG0tmg9FtqWp7pzRSMPidifZcQwWkKeTO +gJnFmnVyed8h6GfjTEu4gxo1/S5U0V+mYSha01z5NTnN6ltKx1Or3b0CgYEAxRgm +S30nZxnyg/V7ys61AZhst1DG2tkZXEMcA7dYhabMoXPJAP/EfhlWwpWYYUs/u0gS +Wwmf5IivX5TlYScgmkvb/NYz0u4ZmOXkLTnLPtdKKFXhjXJcHjUP67jYmOxNlJLp +V4vLRnFxTpffAV+OszzRxsXX6fvruwZBANYJeXUCgYBVouLFsFgfWGYp2rpr9XP4 +KK25kvrBqF6JKOIDB1zjxNJ3pUMKrl8oqccCFoCyXa4oTM2kUX0yWxHfleUjrMq4 +yimwQKiOZmV7fVLSSjSw6e/VfBd0h3gb82ygcplZkN0IclkwTY5SNKqwn/3y07V5 +drqdhkrgdJXtmQ6O5YYECQKBgATERcDToQ1USlI4sKrB/wyv1AlG8dg/IebiVJ4e +ZAyvcQmClFzq0qS+FiQUnB/WQw9TeeYrwGs1hxBHuJh16srwhLyDrbMvQP06qh8R +48F8UXXSRec22dV9MQphaROhu2qZdv1AC0WD3tqov6L33aqmEOi+xi8JgbT/PLk5 +c/c1AoGBAI1A/02ryksW6/wc7/6SP2M2rTy4m1sD/GnrTc67EHnRcVBdKO6qH2RY +nqC8YcveC2ZghgPTDsA3VGuzuBXpwY6wTyV99q6jxQJ6/xcrD9/NUG6Uwv/xfCxl +IJLeBYEqQundSSny3VtaAUK8Ul1nxpTvVRNwtcyWTo8RHAAyNPWd +-----END RSA PRIVATE KEY----- diff --git a/vendor/golang.org/x/net/http2/h2i/README.md b/vendor/golang.org/x/net/http2/h2i/README.md new file mode 100644 index 0000000..fb5c5ef --- /dev/null +++ b/vendor/golang.org/x/net/http2/h2i/README.md @@ -0,0 +1,97 @@ +# h2i + +**h2i** is an interactive HTTP/2 ("h2") console debugger. Miss the good ol' +days of telnetting to your HTTP/1.n servers? We're bringing you +back. + +Features: +- send raw HTTP/2 frames + - PING + - SETTINGS + - HEADERS + - etc +- type in HTTP/1.n and have it auto-HPACK/frame-ify it for HTTP/2 +- pretty print all received HTTP/2 frames from the peer (including HPACK decoding) +- tab completion of commands, options + +Not yet features, but soon: +- unnecessary CONTINUATION frames on short boundaries, to test peer implementations +- request bodies (DATA frames) +- send invalid frames for testing server implementations (supported by underlying Framer) + +Later: +- act like a server + +## Installation + +``` +$ go get golang.org/x/net/http2/h2i +$ h2i +``` + +## Demo + +``` +$ h2i +Usage: h2i + + -insecure + Whether to skip TLS cert validation + -nextproto string + Comma-separated list of NPN/ALPN protocol names to negotiate. (default "h2,h2-14") + +$ h2i google.com +Connecting to google.com:443 ... +Connected to 74.125.224.41:443 +Negotiated protocol "h2-14" +[FrameHeader SETTINGS len=18] + [MAX_CONCURRENT_STREAMS = 100] + [INITIAL_WINDOW_SIZE = 1048576] + [MAX_FRAME_SIZE = 16384] +[FrameHeader WINDOW_UPDATE len=4] + Window-Increment = 983041 + +h2i> PING h2iSayHI +[FrameHeader PING flags=ACK len=8] + Data = "h2iSayHI" +h2i> headers +(as HTTP/1.1)> GET / HTTP/1.1 +(as HTTP/1.1)> Host: ip.appspot.com +(as HTTP/1.1)> User-Agent: h2i/brad-n-blake +(as HTTP/1.1)> +Opening Stream-ID 1: + :authority = ip.appspot.com + :method = GET + :path = / + :scheme = https + user-agent = h2i/brad-n-blake +[FrameHeader HEADERS flags=END_HEADERS stream=1 len=77] + :status = "200" + alternate-protocol = "443:quic,p=1" + content-length = "15" + content-type = "text/html" + date = "Fri, 01 May 2015 23:06:56 GMT" + server = "Google Frontend" +[FrameHeader DATA flags=END_STREAM stream=1 len=15] + "173.164.155.78\n" +[FrameHeader PING len=8] + Data = "\x00\x00\x00\x00\x00\x00\x00\x00" +h2i> ping +[FrameHeader PING flags=ACK len=8] + Data = "h2i_ping" +h2i> ping +[FrameHeader PING flags=ACK len=8] + Data = "h2i_ping" +h2i> ping +[FrameHeader GOAWAY len=22] + Last-Stream-ID = 1; Error-Code = PROTOCOL_ERROR (1) + +ReadFrame: EOF +``` + +## Status + +Quick few hour hack. So much yet to do. Feel free to file issues for +bugs or wishlist items, but [@bmizerany](https://github.com/bmizerany/) +and I aren't yet accepting pull requests until things settle down. + diff --git a/vendor/golang.org/x/net/http2/h2i/h2i.go b/vendor/golang.org/x/net/http2/h2i/h2i.go new file mode 100644 index 0000000..ac26208 --- /dev/null +++ b/vendor/golang.org/x/net/http2/h2i/h2i.go @@ -0,0 +1,486 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/* +The h2i command is an interactive HTTP/2 console. + +Usage: + $ h2i [flags] + +Interactive commands in the console: (all parts case-insensitive) + + ping [data] + settings ack + settings FOO=n BAR=z + headers (open a new stream by typing HTTP/1.1) +*/ +package main + +import ( + "bufio" + "bytes" + "crypto/tls" + "errors" + "flag" + "fmt" + "io" + "log" + "net" + "net/http" + "os" + "regexp" + "strconv" + "strings" + + "golang.org/x/crypto/ssh/terminal" + "golang.org/x/net/http2" + "golang.org/x/net/http2/hpack" +) + +// Flags +var ( + flagNextProto = flag.String("nextproto", "h2,h2-14", "Comma-separated list of NPN/ALPN protocol names to negotiate.") + flagInsecure = flag.Bool("insecure", false, "Whether to skip TLS cert validation") +) + +type command struct { + run func(*h2i, []string) error // required + + // complete optionally specifies tokens (case-insensitive) which are + // valid for this subcommand. + complete func() []string +} + +var commands = map[string]command{ + "ping": command{run: (*h2i).cmdPing}, + "settings": command{ + run: (*h2i).cmdSettings, + complete: func() []string { + return []string{ + "ACK", + http2.SettingHeaderTableSize.String(), + http2.SettingEnablePush.String(), + http2.SettingMaxConcurrentStreams.String(), + http2.SettingInitialWindowSize.String(), + http2.SettingMaxFrameSize.String(), + http2.SettingMaxHeaderListSize.String(), + } + }, + }, + "quit": command{run: (*h2i).cmdQuit}, + "headers": command{run: (*h2i).cmdHeaders}, +} + +func usage() { + fmt.Fprintf(os.Stderr, "Usage: h2i \n\n") + flag.PrintDefaults() + os.Exit(1) +} + +// withPort adds ":443" if another port isn't already present. +func withPort(host string) string { + if _, _, err := net.SplitHostPort(host); err != nil { + return net.JoinHostPort(host, "443") + } + return host +} + +// h2i is the app's state. +type h2i struct { + host string + tc *tls.Conn + framer *http2.Framer + term *terminal.Terminal + + // owned by the command loop: + streamID uint32 + hbuf bytes.Buffer + henc *hpack.Encoder + + // owned by the readFrames loop: + peerSetting map[http2.SettingID]uint32 + hdec *hpack.Decoder +} + +func main() { + flag.Usage = usage + flag.Parse() + if flag.NArg() != 1 { + usage() + } + log.SetFlags(0) + + host := flag.Arg(0) + app := &h2i{ + host: host, + peerSetting: make(map[http2.SettingID]uint32), + } + app.henc = hpack.NewEncoder(&app.hbuf) + + if err := app.Main(); err != nil { + if app.term != nil { + app.logf("%v\n", err) + } else { + fmt.Fprintf(os.Stderr, "%v\n", err) + } + os.Exit(1) + } + fmt.Fprintf(os.Stdout, "\n") +} + +func (app *h2i) Main() error { + cfg := &tls.Config{ + ServerName: app.host, + NextProtos: strings.Split(*flagNextProto, ","), + InsecureSkipVerify: *flagInsecure, + } + + hostAndPort := withPort(app.host) + log.Printf("Connecting to %s ...", hostAndPort) + tc, err := tls.Dial("tcp", hostAndPort, cfg) + if err != nil { + return fmt.Errorf("Error dialing %s: %v", withPort(app.host), err) + } + log.Printf("Connected to %v", tc.RemoteAddr()) + defer tc.Close() + + if err := tc.Handshake(); err != nil { + return fmt.Errorf("TLS handshake: %v", err) + } + if !*flagInsecure { + if err := tc.VerifyHostname(app.host); err != nil { + return fmt.Errorf("VerifyHostname: %v", err) + } + } + state := tc.ConnectionState() + log.Printf("Negotiated protocol %q", state.NegotiatedProtocol) + if !state.NegotiatedProtocolIsMutual || state.NegotiatedProtocol == "" { + return fmt.Errorf("Could not negotiate protocol mutually") + } + + if _, err := io.WriteString(tc, http2.ClientPreface); err != nil { + return err + } + + app.framer = http2.NewFramer(tc, tc) + + oldState, err := terminal.MakeRaw(0) + if err != nil { + return err + } + defer terminal.Restore(0, oldState) + + var screen = struct { + io.Reader + io.Writer + }{os.Stdin, os.Stdout} + + app.term = terminal.NewTerminal(screen, "h2i> ") + lastWord := regexp.MustCompile(`.+\W(\w+)$`) + app.term.AutoCompleteCallback = func(line string, pos int, key rune) (newLine string, newPos int, ok bool) { + if key != '\t' { + return + } + if pos != len(line) { + // TODO: we're being lazy for now, only supporting tab completion at the end. + return + } + // Auto-complete for the command itself. + if !strings.Contains(line, " ") { + var name string + name, _, ok = lookupCommand(line) + if !ok { + return + } + return name, len(name), true + } + _, c, ok := lookupCommand(line[:strings.IndexByte(line, ' ')]) + if !ok || c.complete == nil { + return + } + if strings.HasSuffix(line, " ") { + app.logf("%s", strings.Join(c.complete(), " ")) + return line, pos, true + } + m := lastWord.FindStringSubmatch(line) + if m == nil { + return line, len(line), true + } + soFar := m[1] + var match []string + for _, cand := range c.complete() { + if len(soFar) > len(cand) || !strings.EqualFold(cand[:len(soFar)], soFar) { + continue + } + match = append(match, cand) + } + if len(match) == 0 { + return + } + if len(match) > 1 { + // TODO: auto-complete any common prefix + app.logf("%s", strings.Join(match, " ")) + return line, pos, true + } + newLine = line[:len(line)-len(soFar)] + match[0] + return newLine, len(newLine), true + + } + + errc := make(chan error, 2) + go func() { errc <- app.readFrames() }() + go func() { errc <- app.readConsole() }() + return <-errc +} + +func (app *h2i) logf(format string, args ...interface{}) { + fmt.Fprintf(app.term, format+"\n", args...) +} + +func (app *h2i) readConsole() error { + for { + line, err := app.term.ReadLine() + if err == io.EOF { + return nil + } + if err != nil { + return fmt.Errorf("terminal.ReadLine: %v", err) + } + f := strings.Fields(line) + if len(f) == 0 { + continue + } + cmd, args := f[0], f[1:] + if _, c, ok := lookupCommand(cmd); ok { + err = c.run(app, args) + } else { + app.logf("Unknown command %q", line) + } + if err == errExitApp { + return nil + } + if err != nil { + return err + } + } +} + +func lookupCommand(prefix string) (name string, c command, ok bool) { + prefix = strings.ToLower(prefix) + if c, ok = commands[prefix]; ok { + return prefix, c, ok + } + + for full, candidate := range commands { + if strings.HasPrefix(full, prefix) { + if c.run != nil { + return "", command{}, false // ambiguous + } + c = candidate + name = full + } + } + return name, c, c.run != nil +} + +var errExitApp = errors.New("internal sentinel error value to quit the console reading loop") + +func (a *h2i) cmdQuit(args []string) error { + if len(args) > 0 { + a.logf("the QUIT command takes no argument") + return nil + } + return errExitApp +} + +func (a *h2i) cmdSettings(args []string) error { + if len(args) == 1 && strings.EqualFold(args[0], "ACK") { + return a.framer.WriteSettingsAck() + } + var settings []http2.Setting + for _, arg := range args { + if strings.EqualFold(arg, "ACK") { + a.logf("Error: ACK must be only argument with the SETTINGS command") + return nil + } + eq := strings.Index(arg, "=") + if eq == -1 { + a.logf("Error: invalid argument %q (expected SETTING_NAME=nnnn)", arg) + return nil + } + sid, ok := settingByName(arg[:eq]) + if !ok { + a.logf("Error: unknown setting name %q", arg[:eq]) + return nil + } + val, err := strconv.ParseUint(arg[eq+1:], 10, 32) + if err != nil { + a.logf("Error: invalid argument %q (expected SETTING_NAME=nnnn)", arg) + return nil + } + settings = append(settings, http2.Setting{ + ID: sid, + Val: uint32(val), + }) + } + a.logf("Sending: %v", settings) + return a.framer.WriteSettings(settings...) +} + +func settingByName(name string) (http2.SettingID, bool) { + for _, sid := range [...]http2.SettingID{ + http2.SettingHeaderTableSize, + http2.SettingEnablePush, + http2.SettingMaxConcurrentStreams, + http2.SettingInitialWindowSize, + http2.SettingMaxFrameSize, + http2.SettingMaxHeaderListSize, + } { + if strings.EqualFold(sid.String(), name) { + return sid, true + } + } + return 0, false +} + +func (app *h2i) cmdPing(args []string) error { + if len(args) > 1 { + app.logf("invalid PING usage: only accepts 0 or 1 args") + return nil // nil means don't end the program + } + var data [8]byte + if len(args) == 1 { + copy(data[:], args[0]) + } else { + copy(data[:], "h2i_ping") + } + return app.framer.WritePing(false, data) +} + +func (app *h2i) cmdHeaders(args []string) error { + if len(args) > 0 { + app.logf("Error: HEADERS doesn't yet take arguments.") + // TODO: flags for restricting window size, to force CONTINUATION + // frames. + return nil + } + var h1req bytes.Buffer + app.term.SetPrompt("(as HTTP/1.1)> ") + defer app.term.SetPrompt("h2i> ") + for { + line, err := app.term.ReadLine() + if err != nil { + return err + } + h1req.WriteString(line) + h1req.WriteString("\r\n") + if line == "" { + break + } + } + req, err := http.ReadRequest(bufio.NewReader(&h1req)) + if err != nil { + app.logf("Invalid HTTP/1.1 request: %v", err) + return nil + } + if app.streamID == 0 { + app.streamID = 1 + } else { + app.streamID += 2 + } + app.logf("Opening Stream-ID %d:", app.streamID) + hbf := app.encodeHeaders(req) + if len(hbf) > 16<<10 { + app.logf("TODO: h2i doesn't yet write CONTINUATION frames. Copy it from transport.go") + return nil + } + return app.framer.WriteHeaders(http2.HeadersFrameParam{ + StreamID: app.streamID, + BlockFragment: hbf, + EndStream: req.Method == "GET" || req.Method == "HEAD", // good enough for now + EndHeaders: true, // for now + }) +} + +func (app *h2i) readFrames() error { + for { + f, err := app.framer.ReadFrame() + if err != nil { + return fmt.Errorf("ReadFrame: %v", err) + } + app.logf("%v", f) + switch f := f.(type) { + case *http2.PingFrame: + app.logf(" Data = %q", f.Data) + case *http2.SettingsFrame: + f.ForeachSetting(func(s http2.Setting) error { + app.logf(" %v", s) + app.peerSetting[s.ID] = s.Val + return nil + }) + case *http2.WindowUpdateFrame: + app.logf(" Window-Increment = %v\n", f.Increment) + case *http2.GoAwayFrame: + app.logf(" Last-Stream-ID = %d; Error-Code = %v (%d)\n", f.LastStreamID, f.ErrCode, f.ErrCode) + case *http2.DataFrame: + app.logf(" %q", f.Data()) + case *http2.HeadersFrame: + if f.HasPriority() { + app.logf(" PRIORITY = %v", f.Priority) + } + if app.hdec == nil { + // TODO: if the user uses h2i to send a SETTINGS frame advertising + // something larger, we'll need to respect SETTINGS_HEADER_TABLE_SIZE + // and stuff here instead of using the 4k default. But for now: + tableSize := uint32(4 << 10) + app.hdec = hpack.NewDecoder(tableSize, app.onNewHeaderField) + } + app.hdec.Write(f.HeaderBlockFragment()) + } + } +} + +// called from readLoop +func (app *h2i) onNewHeaderField(f hpack.HeaderField) { + if f.Sensitive { + app.logf(" %s = %q (SENSITIVE)", f.Name, f.Value) + } + app.logf(" %s = %q", f.Name, f.Value) +} + +func (app *h2i) encodeHeaders(req *http.Request) []byte { + app.hbuf.Reset() + + // TODO(bradfitz): figure out :authority-vs-Host stuff between http2 and Go + host := req.Host + if host == "" { + host = req.URL.Host + } + + path := req.URL.Path + if path == "" { + path = "/" + } + + app.writeHeader(":authority", host) // probably not right for all sites + app.writeHeader(":method", req.Method) + app.writeHeader(":path", path) + app.writeHeader(":scheme", "https") + + for k, vv := range req.Header { + lowKey := strings.ToLower(k) + if lowKey == "host" { + continue + } + for _, v := range vv { + app.writeHeader(lowKey, v) + } + } + return app.hbuf.Bytes() +} + +func (app *h2i) writeHeader(name, value string) { + app.henc.WriteField(hpack.HeaderField{Name: name, Value: value}) + app.logf(" %s = %s", name, value) +} diff --git a/vendor/golang.org/x/net/http2/headermap.go b/vendor/golang.org/x/net/http2/headermap.go new file mode 100644 index 0000000..014f789 --- /dev/null +++ b/vendor/golang.org/x/net/http2/headermap.go @@ -0,0 +1,77 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import ( + "net/http" + "strings" +) + +var ( + commonLowerHeader = map[string]string{} // Go-Canonical-Case -> lower-case + commonCanonHeader = map[string]string{} // lower-case -> Go-Canonical-Case +) + +func init() { + for _, v := range []string{ + "accept", + "accept-charset", + "accept-encoding", + "accept-language", + "accept-ranges", + "age", + "access-control-allow-origin", + "allow", + "authorization", + "cache-control", + "content-disposition", + "content-encoding", + "content-language", + "content-length", + "content-location", + "content-range", + "content-type", + "cookie", + "date", + "etag", + "expect", + "expires", + "from", + "host", + "if-match", + "if-modified-since", + "if-none-match", + "if-unmodified-since", + "last-modified", + "link", + "location", + "max-forwards", + "proxy-authenticate", + "proxy-authorization", + "range", + "referer", + "refresh", + "retry-after", + "server", + "set-cookie", + "strict-transport-security", + "transfer-encoding", + "user-agent", + "vary", + "via", + "www-authenticate", + } { + chk := http.CanonicalHeaderKey(v) + commonLowerHeader[chk] = v + commonCanonHeader[v] = chk + } +} + +func lowerHeader(v string) string { + if s, ok := commonLowerHeader[v]; ok { + return s + } + return strings.ToLower(v) +} diff --git a/vendor/golang.org/x/net/http2/hpack/encode.go b/vendor/golang.org/x/net/http2/hpack/encode.go new file mode 100644 index 0000000..80d621c --- /dev/null +++ b/vendor/golang.org/x/net/http2/hpack/encode.go @@ -0,0 +1,251 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package hpack + +import ( + "io" +) + +const ( + uint32Max = ^uint32(0) + initialHeaderTableSize = 4096 +) + +type Encoder struct { + dynTab dynamicTable + // minSize is the minimum table size set by + // SetMaxDynamicTableSize after the previous Header Table Size + // Update. + minSize uint32 + // maxSizeLimit is the maximum table size this encoder + // supports. This will protect the encoder from too large + // size. + maxSizeLimit uint32 + // tableSizeUpdate indicates whether "Header Table Size + // Update" is required. + tableSizeUpdate bool + w io.Writer + buf []byte +} + +// NewEncoder returns a new Encoder which performs HPACK encoding. An +// encoded data is written to w. +func NewEncoder(w io.Writer) *Encoder { + e := &Encoder{ + minSize: uint32Max, + maxSizeLimit: initialHeaderTableSize, + tableSizeUpdate: false, + w: w, + } + e.dynTab.setMaxSize(initialHeaderTableSize) + return e +} + +// WriteField encodes f into a single Write to e's underlying Writer. +// This function may also produce bytes for "Header Table Size Update" +// if necessary. If produced, it is done before encoding f. +func (e *Encoder) WriteField(f HeaderField) error { + e.buf = e.buf[:0] + + if e.tableSizeUpdate { + e.tableSizeUpdate = false + if e.minSize < e.dynTab.maxSize { + e.buf = appendTableSize(e.buf, e.minSize) + } + e.minSize = uint32Max + e.buf = appendTableSize(e.buf, e.dynTab.maxSize) + } + + idx, nameValueMatch := e.searchTable(f) + if nameValueMatch { + e.buf = appendIndexed(e.buf, idx) + } else { + indexing := e.shouldIndex(f) + if indexing { + e.dynTab.add(f) + } + + if idx == 0 { + e.buf = appendNewName(e.buf, f, indexing) + } else { + e.buf = appendIndexedName(e.buf, f, idx, indexing) + } + } + n, err := e.w.Write(e.buf) + if err == nil && n != len(e.buf) { + err = io.ErrShortWrite + } + return err +} + +// searchTable searches f in both stable and dynamic header tables. +// The static header table is searched first. Only when there is no +// exact match for both name and value, the dynamic header table is +// then searched. If there is no match, i is 0. If both name and value +// match, i is the matched index and nameValueMatch becomes true. If +// only name matches, i points to that index and nameValueMatch +// becomes false. +func (e *Encoder) searchTable(f HeaderField) (i uint64, nameValueMatch bool) { + for idx, hf := range staticTable { + if !constantTimeStringCompare(hf.Name, f.Name) { + continue + } + if i == 0 { + i = uint64(idx + 1) + } + if f.Sensitive { + continue + } + if !constantTimeStringCompare(hf.Value, f.Value) { + continue + } + i = uint64(idx + 1) + nameValueMatch = true + return + } + + j, nameValueMatch := e.dynTab.search(f) + if nameValueMatch || (i == 0 && j != 0) { + i = j + uint64(len(staticTable)) + } + return +} + +// SetMaxDynamicTableSize changes the dynamic header table size to v. +// The actual size is bounded by the value passed to +// SetMaxDynamicTableSizeLimit. +func (e *Encoder) SetMaxDynamicTableSize(v uint32) { + if v > e.maxSizeLimit { + v = e.maxSizeLimit + } + if v < e.minSize { + e.minSize = v + } + e.tableSizeUpdate = true + e.dynTab.setMaxSize(v) +} + +// SetMaxDynamicTableSizeLimit changes the maximum value that can be +// specified in SetMaxDynamicTableSize to v. By default, it is set to +// 4096, which is the same size of the default dynamic header table +// size described in HPACK specification. If the current maximum +// dynamic header table size is strictly greater than v, "Header Table +// Size Update" will be done in the next WriteField call and the +// maximum dynamic header table size is truncated to v. +func (e *Encoder) SetMaxDynamicTableSizeLimit(v uint32) { + e.maxSizeLimit = v + if e.dynTab.maxSize > v { + e.tableSizeUpdate = true + e.dynTab.setMaxSize(v) + } +} + +// shouldIndex reports whether f should be indexed. +func (e *Encoder) shouldIndex(f HeaderField) bool { + return !f.Sensitive && f.size() <= e.dynTab.maxSize +} + +// appendIndexed appends index i, as encoded in "Indexed Header Field" +// representation, to dst and returns the extended buffer. +func appendIndexed(dst []byte, i uint64) []byte { + first := len(dst) + dst = appendVarInt(dst, 7, i) + dst[first] |= 0x80 + return dst +} + +// appendNewName appends f, as encoded in one of "Literal Header field +// - New Name" representation variants, to dst and returns the +// extended buffer. +// +// If f.Sensitive is true, "Never Indexed" representation is used. If +// f.Sensitive is false and indexing is true, "Inremental Indexing" +// representation is used. +func appendNewName(dst []byte, f HeaderField, indexing bool) []byte { + dst = append(dst, encodeTypeByte(indexing, f.Sensitive)) + dst = appendHpackString(dst, f.Name) + return appendHpackString(dst, f.Value) +} + +// appendIndexedName appends f and index i referring indexed name +// entry, as encoded in one of "Literal Header field - Indexed Name" +// representation variants, to dst and returns the extended buffer. +// +// If f.Sensitive is true, "Never Indexed" representation is used. If +// f.Sensitive is false and indexing is true, "Incremental Indexing" +// representation is used. +func appendIndexedName(dst []byte, f HeaderField, i uint64, indexing bool) []byte { + first := len(dst) + var n byte + if indexing { + n = 6 + } else { + n = 4 + } + dst = appendVarInt(dst, n, i) + dst[first] |= encodeTypeByte(indexing, f.Sensitive) + return appendHpackString(dst, f.Value) +} + +// appendTableSize appends v, as encoded in "Header Table Size Update" +// representation, to dst and returns the extended buffer. +func appendTableSize(dst []byte, v uint32) []byte { + first := len(dst) + dst = appendVarInt(dst, 5, uint64(v)) + dst[first] |= 0x20 + return dst +} + +// appendVarInt appends i, as encoded in variable integer form using n +// bit prefix, to dst and returns the extended buffer. +// +// See +// http://http2.github.io/http2-spec/compression.html#integer.representation +func appendVarInt(dst []byte, n byte, i uint64) []byte { + k := uint64((1 << n) - 1) + if i < k { + return append(dst, byte(i)) + } + dst = append(dst, byte(k)) + i -= k + for ; i >= 128; i >>= 7 { + dst = append(dst, byte(0x80|(i&0x7f))) + } + return append(dst, byte(i)) +} + +// appendHpackString appends s, as encoded in "String Literal" +// representation, to dst and returns the the extended buffer. +// +// s will be encoded in Huffman codes only when it produces strictly +// shorter byte string. +func appendHpackString(dst []byte, s string) []byte { + huffmanLength := HuffmanEncodeLength(s) + if huffmanLength < uint64(len(s)) { + first := len(dst) + dst = appendVarInt(dst, 7, huffmanLength) + dst = AppendHuffmanString(dst, s) + dst[first] |= 0x80 + } else { + dst = appendVarInt(dst, 7, uint64(len(s))) + dst = append(dst, s...) + } + return dst +} + +// encodeTypeByte returns type byte. If sensitive is true, type byte +// for "Never Indexed" representation is returned. If sensitive is +// false and indexing is true, type byte for "Incremental Indexing" +// representation is returned. Otherwise, type byte for "Without +// Indexing" is returned. +func encodeTypeByte(indexing, sensitive bool) byte { + if sensitive { + return 0x10 + } + if indexing { + return 0x40 + } + return 0 +} diff --git a/vendor/golang.org/x/net/http2/hpack/encode_test.go b/vendor/golang.org/x/net/http2/hpack/encode_test.go new file mode 100644 index 0000000..92286f3 --- /dev/null +++ b/vendor/golang.org/x/net/http2/hpack/encode_test.go @@ -0,0 +1,330 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package hpack + +import ( + "bytes" + "encoding/hex" + "reflect" + "strings" + "testing" +) + +func TestEncoderTableSizeUpdate(t *testing.T) { + tests := []struct { + size1, size2 uint32 + wantHex string + }{ + // Should emit 2 table size updates (2048 and 4096) + {2048, 4096, "3fe10f 3fe11f 82"}, + + // Should emit 1 table size update (2048) + {16384, 2048, "3fe10f 82"}, + } + for _, tt := range tests { + var buf bytes.Buffer + e := NewEncoder(&buf) + e.SetMaxDynamicTableSize(tt.size1) + e.SetMaxDynamicTableSize(tt.size2) + if err := e.WriteField(pair(":method", "GET")); err != nil { + t.Fatal(err) + } + want := removeSpace(tt.wantHex) + if got := hex.EncodeToString(buf.Bytes()); got != want { + t.Errorf("e.SetDynamicTableSize %v, %v = %q; want %q", tt.size1, tt.size2, got, want) + } + } +} + +func TestEncoderWriteField(t *testing.T) { + var buf bytes.Buffer + e := NewEncoder(&buf) + var got []HeaderField + d := NewDecoder(4<<10, func(f HeaderField) { + got = append(got, f) + }) + + tests := []struct { + hdrs []HeaderField + }{ + {[]HeaderField{ + pair(":method", "GET"), + pair(":scheme", "http"), + pair(":path", "/"), + pair(":authority", "www.example.com"), + }}, + {[]HeaderField{ + pair(":method", "GET"), + pair(":scheme", "http"), + pair(":path", "/"), + pair(":authority", "www.example.com"), + pair("cache-control", "no-cache"), + }}, + {[]HeaderField{ + pair(":method", "GET"), + pair(":scheme", "https"), + pair(":path", "/index.html"), + pair(":authority", "www.example.com"), + pair("custom-key", "custom-value"), + }}, + } + for i, tt := range tests { + buf.Reset() + got = got[:0] + for _, hf := range tt.hdrs { + if err := e.WriteField(hf); err != nil { + t.Fatal(err) + } + } + _, err := d.Write(buf.Bytes()) + if err != nil { + t.Errorf("%d. Decoder Write = %v", i, err) + } + if !reflect.DeepEqual(got, tt.hdrs) { + t.Errorf("%d. Decoded %+v; want %+v", i, got, tt.hdrs) + } + } +} + +func TestEncoderSearchTable(t *testing.T) { + e := NewEncoder(nil) + + e.dynTab.add(pair("foo", "bar")) + e.dynTab.add(pair("blake", "miz")) + e.dynTab.add(pair(":method", "GET")) + + tests := []struct { + hf HeaderField + wantI uint64 + wantMatch bool + }{ + // Name and Value match + {pair("foo", "bar"), uint64(len(staticTable) + 3), true}, + {pair("blake", "miz"), uint64(len(staticTable) + 2), true}, + {pair(":method", "GET"), 2, true}, + + // Only name match because Sensitive == true + {HeaderField{":method", "GET", true}, 2, false}, + + // Only Name matches + {pair("foo", "..."), uint64(len(staticTable) + 3), false}, + {pair("blake", "..."), uint64(len(staticTable) + 2), false}, + {pair(":method", "..."), 2, false}, + + // None match + {pair("foo-", "bar"), 0, false}, + } + for _, tt := range tests { + if gotI, gotMatch := e.searchTable(tt.hf); gotI != tt.wantI || gotMatch != tt.wantMatch { + t.Errorf("d.search(%+v) = %v, %v; want %v, %v", tt.hf, gotI, gotMatch, tt.wantI, tt.wantMatch) + } + } +} + +func TestAppendVarInt(t *testing.T) { + tests := []struct { + n byte + i uint64 + want []byte + }{ + // Fits in a byte: + {1, 0, []byte{0}}, + {2, 2, []byte{2}}, + {3, 6, []byte{6}}, + {4, 14, []byte{14}}, + {5, 30, []byte{30}}, + {6, 62, []byte{62}}, + {7, 126, []byte{126}}, + {8, 254, []byte{254}}, + + // Multiple bytes: + {5, 1337, []byte{31, 154, 10}}, + } + for _, tt := range tests { + got := appendVarInt(nil, tt.n, tt.i) + if !bytes.Equal(got, tt.want) { + t.Errorf("appendVarInt(nil, %v, %v) = %v; want %v", tt.n, tt.i, got, tt.want) + } + } +} + +func TestAppendHpackString(t *testing.T) { + tests := []struct { + s, wantHex string + }{ + // Huffman encoded + {"www.example.com", "8c f1e3 c2e5 f23a 6ba0 ab90 f4ff"}, + + // Not Huffman encoded + {"a", "01 61"}, + + // zero length + {"", "00"}, + } + for _, tt := range tests { + want := removeSpace(tt.wantHex) + buf := appendHpackString(nil, tt.s) + if got := hex.EncodeToString(buf); want != got { + t.Errorf("appendHpackString(nil, %q) = %q; want %q", tt.s, got, want) + } + } +} + +func TestAppendIndexed(t *testing.T) { + tests := []struct { + i uint64 + wantHex string + }{ + // 1 byte + {1, "81"}, + {126, "fe"}, + + // 2 bytes + {127, "ff00"}, + {128, "ff01"}, + } + for _, tt := range tests { + want := removeSpace(tt.wantHex) + buf := appendIndexed(nil, tt.i) + if got := hex.EncodeToString(buf); want != got { + t.Errorf("appendIndex(nil, %v) = %q; want %q", tt.i, got, want) + } + } +} + +func TestAppendNewName(t *testing.T) { + tests := []struct { + f HeaderField + indexing bool + wantHex string + }{ + // Incremental indexing + {HeaderField{"custom-key", "custom-value", false}, true, "40 88 25a8 49e9 5ba9 7d7f 89 25a8 49e9 5bb8 e8b4 bf"}, + + // Without indexing + {HeaderField{"custom-key", "custom-value", false}, false, "00 88 25a8 49e9 5ba9 7d7f 89 25a8 49e9 5bb8 e8b4 bf"}, + + // Never indexed + {HeaderField{"custom-key", "custom-value", true}, true, "10 88 25a8 49e9 5ba9 7d7f 89 25a8 49e9 5bb8 e8b4 bf"}, + {HeaderField{"custom-key", "custom-value", true}, false, "10 88 25a8 49e9 5ba9 7d7f 89 25a8 49e9 5bb8 e8b4 bf"}, + } + for _, tt := range tests { + want := removeSpace(tt.wantHex) + buf := appendNewName(nil, tt.f, tt.indexing) + if got := hex.EncodeToString(buf); want != got { + t.Errorf("appendNewName(nil, %+v, %v) = %q; want %q", tt.f, tt.indexing, got, want) + } + } +} + +func TestAppendIndexedName(t *testing.T) { + tests := []struct { + f HeaderField + i uint64 + indexing bool + wantHex string + }{ + // Incremental indexing + {HeaderField{":status", "302", false}, 8, true, "48 82 6402"}, + + // Without indexing + {HeaderField{":status", "302", false}, 8, false, "08 82 6402"}, + + // Never indexed + {HeaderField{":status", "302", true}, 8, true, "18 82 6402"}, + {HeaderField{":status", "302", true}, 8, false, "18 82 6402"}, + } + for _, tt := range tests { + want := removeSpace(tt.wantHex) + buf := appendIndexedName(nil, tt.f, tt.i, tt.indexing) + if got := hex.EncodeToString(buf); want != got { + t.Errorf("appendIndexedName(nil, %+v, %v) = %q; want %q", tt.f, tt.indexing, got, want) + } + } +} + +func TestAppendTableSize(t *testing.T) { + tests := []struct { + i uint32 + wantHex string + }{ + // Fits into 1 byte + {30, "3e"}, + + // Extra byte + {31, "3f00"}, + {32, "3f01"}, + } + for _, tt := range tests { + want := removeSpace(tt.wantHex) + buf := appendTableSize(nil, tt.i) + if got := hex.EncodeToString(buf); want != got { + t.Errorf("appendTableSize(nil, %v) = %q; want %q", tt.i, got, want) + } + } +} + +func TestEncoderSetMaxDynamicTableSize(t *testing.T) { + var buf bytes.Buffer + e := NewEncoder(&buf) + tests := []struct { + v uint32 + wantUpdate bool + wantMinSize uint32 + wantMaxSize uint32 + }{ + // Set new table size to 2048 + {2048, true, 2048, 2048}, + + // Set new table size to 16384, but still limited to + // 4096 + {16384, true, 2048, 4096}, + } + for _, tt := range tests { + e.SetMaxDynamicTableSize(tt.v) + if got := e.tableSizeUpdate; tt.wantUpdate != got { + t.Errorf("e.tableSizeUpdate = %v; want %v", got, tt.wantUpdate) + } + if got := e.minSize; tt.wantMinSize != got { + t.Errorf("e.minSize = %v; want %v", got, tt.wantMinSize) + } + if got := e.dynTab.maxSize; tt.wantMaxSize != got { + t.Errorf("e.maxSize = %v; want %v", got, tt.wantMaxSize) + } + } +} + +func TestEncoderSetMaxDynamicTableSizeLimit(t *testing.T) { + e := NewEncoder(nil) + // 4095 < initialHeaderTableSize means maxSize is truncated to + // 4095. + e.SetMaxDynamicTableSizeLimit(4095) + if got, want := e.dynTab.maxSize, uint32(4095); got != want { + t.Errorf("e.dynTab.maxSize = %v; want %v", got, want) + } + if got, want := e.maxSizeLimit, uint32(4095); got != want { + t.Errorf("e.maxSizeLimit = %v; want %v", got, want) + } + if got, want := e.tableSizeUpdate, true; got != want { + t.Errorf("e.tableSizeUpdate = %v; want %v", got, want) + } + // maxSize will be truncated to maxSizeLimit + e.SetMaxDynamicTableSize(16384) + if got, want := e.dynTab.maxSize, uint32(4095); got != want { + t.Errorf("e.dynTab.maxSize = %v; want %v", got, want) + } + // 8192 > current maxSizeLimit, so maxSize does not change. + e.SetMaxDynamicTableSizeLimit(8192) + if got, want := e.dynTab.maxSize, uint32(4095); got != want { + t.Errorf("e.dynTab.maxSize = %v; want %v", got, want) + } + if got, want := e.maxSizeLimit, uint32(8192); got != want { + t.Errorf("e.maxSizeLimit = %v; want %v", got, want) + } +} + +func removeSpace(s string) string { + return strings.Replace(s, " ", "", -1) +} diff --git a/vendor/golang.org/x/net/http2/hpack/hpack.go b/vendor/golang.org/x/net/http2/hpack/hpack.go new file mode 100644 index 0000000..8e9b2f2 --- /dev/null +++ b/vendor/golang.org/x/net/http2/hpack/hpack.go @@ -0,0 +1,518 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package hpack implements HPACK, a compression format for +// efficiently representing HTTP header fields in the context of HTTP/2. +// +// See http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-09 +package hpack + +import ( + "bytes" + "errors" + "fmt" +) + +// A DecodingError is something the spec defines as a decoding error. +type DecodingError struct { + Err error +} + +func (de DecodingError) Error() string { + return fmt.Sprintf("decoding error: %v", de.Err) +} + +// An InvalidIndexError is returned when an encoder references a table +// entry before the static table or after the end of the dynamic table. +type InvalidIndexError int + +func (e InvalidIndexError) Error() string { + return fmt.Sprintf("invalid indexed representation index %d", int(e)) +} + +// A HeaderField is a name-value pair. Both the name and value are +// treated as opaque sequences of octets. +type HeaderField struct { + Name, Value string + + // Sensitive means that this header field should never be + // indexed. + Sensitive bool +} + +func (hf *HeaderField) size() uint32 { + // http://http2.github.io/http2-spec/compression.html#rfc.section.4.1 + // "The size of the dynamic table is the sum of the size of + // its entries. The size of an entry is the sum of its name's + // length in octets (as defined in Section 5.2), its value's + // length in octets (see Section 5.2), plus 32. The size of + // an entry is calculated using the length of the name and + // value without any Huffman encoding applied." + + // This can overflow if somebody makes a large HeaderField + // Name and/or Value by hand, but we don't care, because that + // won't happen on the wire because the encoding doesn't allow + // it. + return uint32(len(hf.Name) + len(hf.Value) + 32) +} + +// A Decoder is the decoding context for incremental processing of +// header blocks. +type Decoder struct { + dynTab dynamicTable + emit func(f HeaderField) + + emitEnabled bool // whether calls to emit are enabled + maxStrLen int // 0 means unlimited + + // buf is the unparsed buffer. It's only written to + // saveBuf if it was truncated in the middle of a header + // block. Because it's usually not owned, we can only + // process it under Write. + buf []byte // not owned; only valid during Write + + // saveBuf is previous data passed to Write which we weren't able + // to fully parse before. Unlike buf, we own this data. + saveBuf bytes.Buffer +} + +// NewDecoder returns a new decoder with the provided maximum dynamic +// table size. The emitFunc will be called for each valid field +// parsed, in the same goroutine as calls to Write, before Write returns. +func NewDecoder(maxDynamicTableSize uint32, emitFunc func(f HeaderField)) *Decoder { + d := &Decoder{ + emit: emitFunc, + emitEnabled: true, + } + d.dynTab.allowedMaxSize = maxDynamicTableSize + d.dynTab.setMaxSize(maxDynamicTableSize) + return d +} + +// ErrStringLength is returned by Decoder.Write when the max string length +// (as configured by Decoder.SetMaxStringLength) would be violated. +var ErrStringLength = errors.New("hpack: string too long") + +// SetMaxStringLength sets the maximum size of a HeaderField name or +// value string. If a string exceeds this length (even after any +// decompression), Write will return ErrStringLength. +// A value of 0 means unlimited and is the default from NewDecoder. +func (d *Decoder) SetMaxStringLength(n int) { + d.maxStrLen = n +} + +// SetEmitEnabled controls whether the emitFunc provided to NewDecoder +// should be called. The default is true. +// +// This facility exists to let servers enforce MAX_HEADER_LIST_SIZE +// while still decoding and keeping in-sync with decoder state, but +// without doing unnecessary decompression or generating unnecessary +// garbage for header fields past the limit. +func (d *Decoder) SetEmitEnabled(v bool) { d.emitEnabled = v } + +// EmitEnabled reports whether calls to the emitFunc provided to NewDecoder +// are currently enabled. The default is true. +func (d *Decoder) EmitEnabled() bool { return d.emitEnabled } + +// TODO: add method *Decoder.Reset(maxSize, emitFunc) to let callers re-use Decoders and their +// underlying buffers for garbage reasons. + +func (d *Decoder) SetMaxDynamicTableSize(v uint32) { + d.dynTab.setMaxSize(v) +} + +// SetAllowedMaxDynamicTableSize sets the upper bound that the encoded +// stream (via dynamic table size updates) may set the maximum size +// to. +func (d *Decoder) SetAllowedMaxDynamicTableSize(v uint32) { + d.dynTab.allowedMaxSize = v +} + +type dynamicTable struct { + // ents is the FIFO described at + // http://http2.github.io/http2-spec/compression.html#rfc.section.2.3.2 + // The newest (low index) is append at the end, and items are + // evicted from the front. + ents []HeaderField + size uint32 + maxSize uint32 // current maxSize + allowedMaxSize uint32 // maxSize may go up to this, inclusive +} + +func (dt *dynamicTable) setMaxSize(v uint32) { + dt.maxSize = v + dt.evict() +} + +// TODO: change dynamicTable to be a struct with a slice and a size int field, +// per http://http2.github.io/http2-spec/compression.html#rfc.section.4.1: +// +// +// Then make add increment the size. maybe the max size should move from Decoder to +// dynamicTable and add should return an ok bool if there was enough space. +// +// Later we'll need a remove operation on dynamicTable. + +func (dt *dynamicTable) add(f HeaderField) { + dt.ents = append(dt.ents, f) + dt.size += f.size() + dt.evict() +} + +// If we're too big, evict old stuff (front of the slice) +func (dt *dynamicTable) evict() { + base := dt.ents // keep base pointer of slice + for dt.size > dt.maxSize { + dt.size -= dt.ents[0].size() + dt.ents = dt.ents[1:] + } + + // Shift slice contents down if we evicted things. + if len(dt.ents) != len(base) { + copy(base, dt.ents) + dt.ents = base[:len(dt.ents)] + } +} + +// constantTimeStringCompare compares string a and b in a constant +// time manner. +func constantTimeStringCompare(a, b string) bool { + if len(a) != len(b) { + return false + } + + c := byte(0) + + for i := 0; i < len(a); i++ { + c |= a[i] ^ b[i] + } + + return c == 0 +} + +// Search searches f in the table. The return value i is 0 if there is +// no name match. If there is name match or name/value match, i is the +// index of that entry (1-based). If both name and value match, +// nameValueMatch becomes true. +func (dt *dynamicTable) search(f HeaderField) (i uint64, nameValueMatch bool) { + l := len(dt.ents) + for j := l - 1; j >= 0; j-- { + ent := dt.ents[j] + if !constantTimeStringCompare(ent.Name, f.Name) { + continue + } + if i == 0 { + i = uint64(l - j) + } + if f.Sensitive { + continue + } + if !constantTimeStringCompare(ent.Value, f.Value) { + continue + } + i = uint64(l - j) + nameValueMatch = true + return + } + return +} + +func (d *Decoder) maxTableIndex() int { + return len(d.dynTab.ents) + len(staticTable) +} + +func (d *Decoder) at(i uint64) (hf HeaderField, ok bool) { + if i < 1 { + return + } + if i > uint64(d.maxTableIndex()) { + return + } + if i <= uint64(len(staticTable)) { + return staticTable[i-1], true + } + dents := d.dynTab.ents + return dents[len(dents)-(int(i)-len(staticTable))], true +} + +// Decode decodes an entire block. +// +// TODO: remove this method and make it incremental later? This is +// easier for debugging now. +func (d *Decoder) DecodeFull(p []byte) ([]HeaderField, error) { + var hf []HeaderField + saveFunc := d.emit + defer func() { d.emit = saveFunc }() + d.emit = func(f HeaderField) { hf = append(hf, f) } + if _, err := d.Write(p); err != nil { + return nil, err + } + if err := d.Close(); err != nil { + return nil, err + } + return hf, nil +} + +func (d *Decoder) Close() error { + if d.saveBuf.Len() > 0 { + d.saveBuf.Reset() + return DecodingError{errors.New("truncated headers")} + } + return nil +} + +func (d *Decoder) Write(p []byte) (n int, err error) { + if len(p) == 0 { + // Prevent state machine CPU attacks (making us redo + // work up to the point of finding out we don't have + // enough data) + return + } + // Only copy the data if we have to. Optimistically assume + // that p will contain a complete header block. + if d.saveBuf.Len() == 0 { + d.buf = p + } else { + d.saveBuf.Write(p) + d.buf = d.saveBuf.Bytes() + d.saveBuf.Reset() + } + + for len(d.buf) > 0 { + err = d.parseHeaderFieldRepr() + if err == errNeedMore { + // Extra paranoia, making sure saveBuf won't + // get too large. All the varint and string + // reading code earlier should already catch + // overlong things and return ErrStringLength, + // but keep this as a last resort. + const varIntOverhead = 8 // conservative + if d.maxStrLen != 0 && int64(len(d.buf)) > 2*(int64(d.maxStrLen)+varIntOverhead) { + return 0, ErrStringLength + } + d.saveBuf.Write(d.buf) + return len(p), nil + } + if err != nil { + break + } + } + return len(p), err +} + +// errNeedMore is an internal sentinel error value that means the +// buffer is truncated and we need to read more data before we can +// continue parsing. +var errNeedMore = errors.New("need more data") + +type indexType int + +const ( + indexedTrue indexType = iota + indexedFalse + indexedNever +) + +func (v indexType) indexed() bool { return v == indexedTrue } +func (v indexType) sensitive() bool { return v == indexedNever } + +// returns errNeedMore if there isn't enough data available. +// any other error is fatal. +// consumes d.buf iff it returns nil. +// precondition: must be called with len(d.buf) > 0 +func (d *Decoder) parseHeaderFieldRepr() error { + b := d.buf[0] + switch { + case b&128 != 0: + // Indexed representation. + // High bit set? + // http://http2.github.io/http2-spec/compression.html#rfc.section.6.1 + return d.parseFieldIndexed() + case b&192 == 64: + // 6.2.1 Literal Header Field with Incremental Indexing + // 0b10xxxxxx: top two bits are 10 + // http://http2.github.io/http2-spec/compression.html#rfc.section.6.2.1 + return d.parseFieldLiteral(6, indexedTrue) + case b&240 == 0: + // 6.2.2 Literal Header Field without Indexing + // 0b0000xxxx: top four bits are 0000 + // http://http2.github.io/http2-spec/compression.html#rfc.section.6.2.2 + return d.parseFieldLiteral(4, indexedFalse) + case b&240 == 16: + // 6.2.3 Literal Header Field never Indexed + // 0b0001xxxx: top four bits are 0001 + // http://http2.github.io/http2-spec/compression.html#rfc.section.6.2.3 + return d.parseFieldLiteral(4, indexedNever) + case b&224 == 32: + // 6.3 Dynamic Table Size Update + // Top three bits are '001'. + // http://http2.github.io/http2-spec/compression.html#rfc.section.6.3 + return d.parseDynamicTableSizeUpdate() + } + + return DecodingError{errors.New("invalid encoding")} +} + +// (same invariants and behavior as parseHeaderFieldRepr) +func (d *Decoder) parseFieldIndexed() error { + buf := d.buf + idx, buf, err := readVarInt(7, buf) + if err != nil { + return err + } + hf, ok := d.at(idx) + if !ok { + return DecodingError{InvalidIndexError(idx)} + } + d.buf = buf + return d.callEmit(HeaderField{Name: hf.Name, Value: hf.Value}) +} + +// (same invariants and behavior as parseHeaderFieldRepr) +func (d *Decoder) parseFieldLiteral(n uint8, it indexType) error { + buf := d.buf + nameIdx, buf, err := readVarInt(n, buf) + if err != nil { + return err + } + + var hf HeaderField + wantStr := d.emitEnabled || it.indexed() + if nameIdx > 0 { + ihf, ok := d.at(nameIdx) + if !ok { + return DecodingError{InvalidIndexError(nameIdx)} + } + hf.Name = ihf.Name + } else { + hf.Name, buf, err = d.readString(buf, wantStr) + if err != nil { + return err + } + } + hf.Value, buf, err = d.readString(buf, wantStr) + if err != nil { + return err + } + d.buf = buf + if it.indexed() { + d.dynTab.add(hf) + } + hf.Sensitive = it.sensitive() + return d.callEmit(hf) +} + +func (d *Decoder) callEmit(hf HeaderField) error { + if d.maxStrLen != 0 { + if len(hf.Name) > d.maxStrLen || len(hf.Value) > d.maxStrLen { + return ErrStringLength + } + } + if d.emitEnabled { + d.emit(hf) + } + return nil +} + +// (same invariants and behavior as parseHeaderFieldRepr) +func (d *Decoder) parseDynamicTableSizeUpdate() error { + buf := d.buf + size, buf, err := readVarInt(5, buf) + if err != nil { + return err + } + if size > uint64(d.dynTab.allowedMaxSize) { + return DecodingError{errors.New("dynamic table size update too large")} + } + d.dynTab.setMaxSize(uint32(size)) + d.buf = buf + return nil +} + +var errVarintOverflow = DecodingError{errors.New("varint integer overflow")} + +// readVarInt reads an unsigned variable length integer off the +// beginning of p. n is the parameter as described in +// http://http2.github.io/http2-spec/compression.html#rfc.section.5.1. +// +// n must always be between 1 and 8. +// +// The returned remain buffer is either a smaller suffix of p, or err != nil. +// The error is errNeedMore if p doesn't contain a complete integer. +func readVarInt(n byte, p []byte) (i uint64, remain []byte, err error) { + if n < 1 || n > 8 { + panic("bad n") + } + if len(p) == 0 { + return 0, p, errNeedMore + } + i = uint64(p[0]) + if n < 8 { + i &= (1 << uint64(n)) - 1 + } + if i < (1< 0 { + b := p[0] + p = p[1:] + i += uint64(b&127) << m + if b&128 == 0 { + return i, p, nil + } + m += 7 + if m >= 63 { // TODO: proper overflow check. making this up. + return 0, origP, errVarintOverflow + } + } + return 0, origP, errNeedMore +} + +// readString decodes an hpack string from p. +// +// wantStr is whether s will be used. If false, decompression and +// []byte->string garbage are skipped if s will be ignored +// anyway. This does mean that huffman decoding errors for non-indexed +// strings past the MAX_HEADER_LIST_SIZE are ignored, but the server +// is returning an error anyway, and because they're not indexed, the error +// won't affect the decoding state. +func (d *Decoder) readString(p []byte, wantStr bool) (s string, remain []byte, err error) { + if len(p) == 0 { + return "", p, errNeedMore + } + isHuff := p[0]&128 != 0 + strLen, p, err := readVarInt(7, p) + if err != nil { + return "", p, err + } + if d.maxStrLen != 0 && strLen > uint64(d.maxStrLen) { + return "", nil, ErrStringLength + } + if uint64(len(p)) < strLen { + return "", p, errNeedMore + } + if !isHuff { + if wantStr { + s = string(p[:strLen]) + } + return s, p[strLen:], nil + } + + if wantStr { + buf := bufPool.Get().(*bytes.Buffer) + buf.Reset() // don't trust others + defer bufPool.Put(buf) + if err := huffmanDecode(buf, d.maxStrLen, p[:strLen]); err != nil { + buf.Reset() + return "", nil, err + } + s = buf.String() + buf.Reset() // be nice to GC + } + return s, p[strLen:], nil +} diff --git a/vendor/golang.org/x/net/http2/hpack/hpack_test.go b/vendor/golang.org/x/net/http2/hpack/hpack_test.go new file mode 100644 index 0000000..6dc69f9 --- /dev/null +++ b/vendor/golang.org/x/net/http2/hpack/hpack_test.go @@ -0,0 +1,813 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package hpack + +import ( + "bufio" + "bytes" + "encoding/hex" + "fmt" + "math/rand" + "reflect" + "regexp" + "strconv" + "strings" + "testing" + "time" +) + +func TestStaticTable(t *testing.T) { + fromSpec := ` + +-------+-----------------------------+---------------+ + | 1 | :authority | | + | 2 | :method | GET | + | 3 | :method | POST | + | 4 | :path | / | + | 5 | :path | /index.html | + | 6 | :scheme | http | + | 7 | :scheme | https | + | 8 | :status | 200 | + | 9 | :status | 204 | + | 10 | :status | 206 | + | 11 | :status | 304 | + | 12 | :status | 400 | + | 13 | :status | 404 | + | 14 | :status | 500 | + | 15 | accept-charset | | + | 16 | accept-encoding | gzip, deflate | + | 17 | accept-language | | + | 18 | accept-ranges | | + | 19 | accept | | + | 20 | access-control-allow-origin | | + | 21 | age | | + | 22 | allow | | + | 23 | authorization | | + | 24 | cache-control | | + | 25 | content-disposition | | + | 26 | content-encoding | | + | 27 | content-language | | + | 28 | content-length | | + | 29 | content-location | | + | 30 | content-range | | + | 31 | content-type | | + | 32 | cookie | | + | 33 | date | | + | 34 | etag | | + | 35 | expect | | + | 36 | expires | | + | 37 | from | | + | 38 | host | | + | 39 | if-match | | + | 40 | if-modified-since | | + | 41 | if-none-match | | + | 42 | if-range | | + | 43 | if-unmodified-since | | + | 44 | last-modified | | + | 45 | link | | + | 46 | location | | + | 47 | max-forwards | | + | 48 | proxy-authenticate | | + | 49 | proxy-authorization | | + | 50 | range | | + | 51 | referer | | + | 52 | refresh | | + | 53 | retry-after | | + | 54 | server | | + | 55 | set-cookie | | + | 56 | strict-transport-security | | + | 57 | transfer-encoding | | + | 58 | user-agent | | + | 59 | vary | | + | 60 | via | | + | 61 | www-authenticate | | + +-------+-----------------------------+---------------+ +` + bs := bufio.NewScanner(strings.NewReader(fromSpec)) + re := regexp.MustCompile(`\| (\d+)\s+\| (\S+)\s*\| (\S(.*\S)?)?\s+\|`) + for bs.Scan() { + l := bs.Text() + if !strings.Contains(l, "|") { + continue + } + m := re.FindStringSubmatch(l) + if m == nil { + continue + } + i, err := strconv.Atoi(m[1]) + if err != nil { + t.Errorf("Bogus integer on line %q", l) + continue + } + if i < 1 || i > len(staticTable) { + t.Errorf("Bogus index %d on line %q", i, l) + continue + } + if got, want := staticTable[i-1].Name, m[2]; got != want { + t.Errorf("header index %d name = %q; want %q", i, got, want) + } + if got, want := staticTable[i-1].Value, m[3]; got != want { + t.Errorf("header index %d value = %q; want %q", i, got, want) + } + } + if err := bs.Err(); err != nil { + t.Error(err) + } +} + +func (d *Decoder) mustAt(idx int) HeaderField { + if hf, ok := d.at(uint64(idx)); !ok { + panic(fmt.Sprintf("bogus index %d", idx)) + } else { + return hf + } +} + +func TestDynamicTableAt(t *testing.T) { + d := NewDecoder(4096, nil) + at := d.mustAt + if got, want := at(2), (pair(":method", "GET")); got != want { + t.Errorf("at(2) = %v; want %v", got, want) + } + d.dynTab.add(pair("foo", "bar")) + d.dynTab.add(pair("blake", "miz")) + if got, want := at(len(staticTable)+1), (pair("blake", "miz")); got != want { + t.Errorf("at(dyn 1) = %v; want %v", got, want) + } + if got, want := at(len(staticTable)+2), (pair("foo", "bar")); got != want { + t.Errorf("at(dyn 2) = %v; want %v", got, want) + } + if got, want := at(3), (pair(":method", "POST")); got != want { + t.Errorf("at(3) = %v; want %v", got, want) + } +} + +func TestDynamicTableSearch(t *testing.T) { + dt := dynamicTable{} + dt.setMaxSize(4096) + + dt.add(pair("foo", "bar")) + dt.add(pair("blake", "miz")) + dt.add(pair(":method", "GET")) + + tests := []struct { + hf HeaderField + wantI uint64 + wantMatch bool + }{ + // Name and Value match + {pair("foo", "bar"), 3, true}, + {pair(":method", "GET"), 1, true}, + + // Only name match because of Sensitive == true + {HeaderField{"blake", "miz", true}, 2, false}, + + // Only Name matches + {pair("foo", "..."), 3, false}, + {pair("blake", "..."), 2, false}, + {pair(":method", "..."), 1, false}, + + // None match + {pair("foo-", "bar"), 0, false}, + } + for _, tt := range tests { + if gotI, gotMatch := dt.search(tt.hf); gotI != tt.wantI || gotMatch != tt.wantMatch { + t.Errorf("d.search(%+v) = %v, %v; want %v, %v", tt.hf, gotI, gotMatch, tt.wantI, tt.wantMatch) + } + } +} + +func TestDynamicTableSizeEvict(t *testing.T) { + d := NewDecoder(4096, nil) + if want := uint32(0); d.dynTab.size != want { + t.Fatalf("size = %d; want %d", d.dynTab.size, want) + } + add := d.dynTab.add + add(pair("blake", "eats pizza")) + if want := uint32(15 + 32); d.dynTab.size != want { + t.Fatalf("after pizza, size = %d; want %d", d.dynTab.size, want) + } + add(pair("foo", "bar")) + if want := uint32(15 + 32 + 6 + 32); d.dynTab.size != want { + t.Fatalf("after foo bar, size = %d; want %d", d.dynTab.size, want) + } + d.dynTab.setMaxSize(15 + 32 + 1 /* slop */) + if want := uint32(6 + 32); d.dynTab.size != want { + t.Fatalf("after setMaxSize, size = %d; want %d", d.dynTab.size, want) + } + if got, want := d.mustAt(len(staticTable)+1), (pair("foo", "bar")); got != want { + t.Errorf("at(dyn 1) = %v; want %v", got, want) + } + add(pair("long", strings.Repeat("x", 500))) + if want := uint32(0); d.dynTab.size != want { + t.Fatalf("after big one, size = %d; want %d", d.dynTab.size, want) + } +} + +func TestDecoderDecode(t *testing.T) { + tests := []struct { + name string + in []byte + want []HeaderField + wantDynTab []HeaderField // newest entry first + }{ + // C.2.1 Literal Header Field with Indexing + // http://http2.github.io/http2-spec/compression.html#rfc.section.C.2.1 + {"C.2.1", dehex("400a 6375 7374 6f6d 2d6b 6579 0d63 7573 746f 6d2d 6865 6164 6572"), + []HeaderField{pair("custom-key", "custom-header")}, + []HeaderField{pair("custom-key", "custom-header")}, + }, + + // C.2.2 Literal Header Field without Indexing + // http://http2.github.io/http2-spec/compression.html#rfc.section.C.2.2 + {"C.2.2", dehex("040c 2f73 616d 706c 652f 7061 7468"), + []HeaderField{pair(":path", "/sample/path")}, + []HeaderField{}}, + + // C.2.3 Literal Header Field never Indexed + // http://http2.github.io/http2-spec/compression.html#rfc.section.C.2.3 + {"C.2.3", dehex("1008 7061 7373 776f 7264 0673 6563 7265 74"), + []HeaderField{{"password", "secret", true}}, + []HeaderField{}}, + + // C.2.4 Indexed Header Field + // http://http2.github.io/http2-spec/compression.html#rfc.section.C.2.4 + {"C.2.4", []byte("\x82"), + []HeaderField{pair(":method", "GET")}, + []HeaderField{}}, + } + for _, tt := range tests { + d := NewDecoder(4096, nil) + hf, err := d.DecodeFull(tt.in) + if err != nil { + t.Errorf("%s: %v", tt.name, err) + continue + } + if !reflect.DeepEqual(hf, tt.want) { + t.Errorf("%s: Got %v; want %v", tt.name, hf, tt.want) + } + gotDynTab := d.dynTab.reverseCopy() + if !reflect.DeepEqual(gotDynTab, tt.wantDynTab) { + t.Errorf("%s: dynamic table after = %v; want %v", tt.name, gotDynTab, tt.wantDynTab) + } + } +} + +func (dt *dynamicTable) reverseCopy() (hf []HeaderField) { + hf = make([]HeaderField, len(dt.ents)) + for i := range hf { + hf[i] = dt.ents[len(dt.ents)-1-i] + } + return +} + +type encAndWant struct { + enc []byte + want []HeaderField + wantDynTab []HeaderField + wantDynSize uint32 +} + +// C.3 Request Examples without Huffman Coding +// http://http2.github.io/http2-spec/compression.html#rfc.section.C.3 +func TestDecodeC3_NoHuffman(t *testing.T) { + testDecodeSeries(t, 4096, []encAndWant{ + {dehex("8286 8441 0f77 7777 2e65 7861 6d70 6c65 2e63 6f6d"), + []HeaderField{ + pair(":method", "GET"), + pair(":scheme", "http"), + pair(":path", "/"), + pair(":authority", "www.example.com"), + }, + []HeaderField{ + pair(":authority", "www.example.com"), + }, + 57, + }, + {dehex("8286 84be 5808 6e6f 2d63 6163 6865"), + []HeaderField{ + pair(":method", "GET"), + pair(":scheme", "http"), + pair(":path", "/"), + pair(":authority", "www.example.com"), + pair("cache-control", "no-cache"), + }, + []HeaderField{ + pair("cache-control", "no-cache"), + pair(":authority", "www.example.com"), + }, + 110, + }, + {dehex("8287 85bf 400a 6375 7374 6f6d 2d6b 6579 0c63 7573 746f 6d2d 7661 6c75 65"), + []HeaderField{ + pair(":method", "GET"), + pair(":scheme", "https"), + pair(":path", "/index.html"), + pair(":authority", "www.example.com"), + pair("custom-key", "custom-value"), + }, + []HeaderField{ + pair("custom-key", "custom-value"), + pair("cache-control", "no-cache"), + pair(":authority", "www.example.com"), + }, + 164, + }, + }) +} + +// C.4 Request Examples with Huffman Coding +// http://http2.github.io/http2-spec/compression.html#rfc.section.C.4 +func TestDecodeC4_Huffman(t *testing.T) { + testDecodeSeries(t, 4096, []encAndWant{ + {dehex("8286 8441 8cf1 e3c2 e5f2 3a6b a0ab 90f4 ff"), + []HeaderField{ + pair(":method", "GET"), + pair(":scheme", "http"), + pair(":path", "/"), + pair(":authority", "www.example.com"), + }, + []HeaderField{ + pair(":authority", "www.example.com"), + }, + 57, + }, + {dehex("8286 84be 5886 a8eb 1064 9cbf"), + []HeaderField{ + pair(":method", "GET"), + pair(":scheme", "http"), + pair(":path", "/"), + pair(":authority", "www.example.com"), + pair("cache-control", "no-cache"), + }, + []HeaderField{ + pair("cache-control", "no-cache"), + pair(":authority", "www.example.com"), + }, + 110, + }, + {dehex("8287 85bf 4088 25a8 49e9 5ba9 7d7f 8925 a849 e95b b8e8 b4bf"), + []HeaderField{ + pair(":method", "GET"), + pair(":scheme", "https"), + pair(":path", "/index.html"), + pair(":authority", "www.example.com"), + pair("custom-key", "custom-value"), + }, + []HeaderField{ + pair("custom-key", "custom-value"), + pair("cache-control", "no-cache"), + pair(":authority", "www.example.com"), + }, + 164, + }, + }) +} + +// http://http2.github.io/http2-spec/compression.html#rfc.section.C.5 +// "This section shows several consecutive header lists, corresponding +// to HTTP responses, on the same connection. The HTTP/2 setting +// parameter SETTINGS_HEADER_TABLE_SIZE is set to the value of 256 +// octets, causing some evictions to occur." +func TestDecodeC5_ResponsesNoHuff(t *testing.T) { + testDecodeSeries(t, 256, []encAndWant{ + {dehex(` +4803 3330 3258 0770 7269 7661 7465 611d +4d6f 6e2c 2032 3120 4f63 7420 3230 3133 +2032 303a 3133 3a32 3120 474d 546e 1768 +7474 7073 3a2f 2f77 7777 2e65 7861 6d70 +6c65 2e63 6f6d +`), + []HeaderField{ + pair(":status", "302"), + pair("cache-control", "private"), + pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"), + pair("location", "https://www.example.com"), + }, + []HeaderField{ + pair("location", "https://www.example.com"), + pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"), + pair("cache-control", "private"), + pair(":status", "302"), + }, + 222, + }, + {dehex("4803 3330 37c1 c0bf"), + []HeaderField{ + pair(":status", "307"), + pair("cache-control", "private"), + pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"), + pair("location", "https://www.example.com"), + }, + []HeaderField{ + pair(":status", "307"), + pair("location", "https://www.example.com"), + pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"), + pair("cache-control", "private"), + }, + 222, + }, + {dehex(` +88c1 611d 4d6f 6e2c 2032 3120 4f63 7420 +3230 3133 2032 303a 3133 3a32 3220 474d +54c0 5a04 677a 6970 7738 666f 6f3d 4153 +444a 4b48 514b 425a 584f 5157 454f 5049 +5541 5851 5745 4f49 553b 206d 6178 2d61 +6765 3d33 3630 303b 2076 6572 7369 6f6e +3d31 +`), + []HeaderField{ + pair(":status", "200"), + pair("cache-control", "private"), + pair("date", "Mon, 21 Oct 2013 20:13:22 GMT"), + pair("location", "https://www.example.com"), + pair("content-encoding", "gzip"), + pair("set-cookie", "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"), + }, + []HeaderField{ + pair("set-cookie", "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"), + pair("content-encoding", "gzip"), + pair("date", "Mon, 21 Oct 2013 20:13:22 GMT"), + }, + 215, + }, + }) +} + +// http://http2.github.io/http2-spec/compression.html#rfc.section.C.6 +// "This section shows the same examples as the previous section, but +// using Huffman encoding for the literal values. The HTTP/2 setting +// parameter SETTINGS_HEADER_TABLE_SIZE is set to the value of 256 +// octets, causing some evictions to occur. The eviction mechanism +// uses the length of the decoded literal values, so the same +// evictions occurs as in the previous section." +func TestDecodeC6_ResponsesHuffman(t *testing.T) { + testDecodeSeries(t, 256, []encAndWant{ + {dehex(` +4882 6402 5885 aec3 771a 4b61 96d0 7abe +9410 54d4 44a8 2005 9504 0b81 66e0 82a6 +2d1b ff6e 919d 29ad 1718 63c7 8f0b 97c8 +e9ae 82ae 43d3 +`), + []HeaderField{ + pair(":status", "302"), + pair("cache-control", "private"), + pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"), + pair("location", "https://www.example.com"), + }, + []HeaderField{ + pair("location", "https://www.example.com"), + pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"), + pair("cache-control", "private"), + pair(":status", "302"), + }, + 222, + }, + {dehex("4883 640e ffc1 c0bf"), + []HeaderField{ + pair(":status", "307"), + pair("cache-control", "private"), + pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"), + pair("location", "https://www.example.com"), + }, + []HeaderField{ + pair(":status", "307"), + pair("location", "https://www.example.com"), + pair("date", "Mon, 21 Oct 2013 20:13:21 GMT"), + pair("cache-control", "private"), + }, + 222, + }, + {dehex(` +88c1 6196 d07a be94 1054 d444 a820 0595 +040b 8166 e084 a62d 1bff c05a 839b d9ab +77ad 94e7 821d d7f2 e6c7 b335 dfdf cd5b +3960 d5af 2708 7f36 72c1 ab27 0fb5 291f +9587 3160 65c0 03ed 4ee5 b106 3d50 07 +`), + []HeaderField{ + pair(":status", "200"), + pair("cache-control", "private"), + pair("date", "Mon, 21 Oct 2013 20:13:22 GMT"), + pair("location", "https://www.example.com"), + pair("content-encoding", "gzip"), + pair("set-cookie", "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"), + }, + []HeaderField{ + pair("set-cookie", "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"), + pair("content-encoding", "gzip"), + pair("date", "Mon, 21 Oct 2013 20:13:22 GMT"), + }, + 215, + }, + }) +} + +func testDecodeSeries(t *testing.T, size uint32, steps []encAndWant) { + d := NewDecoder(size, nil) + for i, step := range steps { + hf, err := d.DecodeFull(step.enc) + if err != nil { + t.Fatalf("Error at step index %d: %v", i, err) + } + if !reflect.DeepEqual(hf, step.want) { + t.Fatalf("At step index %d: Got headers %v; want %v", i, hf, step.want) + } + gotDynTab := d.dynTab.reverseCopy() + if !reflect.DeepEqual(gotDynTab, step.wantDynTab) { + t.Errorf("After step index %d, dynamic table = %v; want %v", i, gotDynTab, step.wantDynTab) + } + if d.dynTab.size != step.wantDynSize { + t.Errorf("After step index %d, dynamic table size = %v; want %v", i, d.dynTab.size, step.wantDynSize) + } + } +} + +func TestHuffmanDecode(t *testing.T) { + tests := []struct { + inHex, want string + }{ + {"f1e3 c2e5 f23a 6ba0 ab90 f4ff", "www.example.com"}, + {"a8eb 1064 9cbf", "no-cache"}, + {"25a8 49e9 5ba9 7d7f", "custom-key"}, + {"25a8 49e9 5bb8 e8b4 bf", "custom-value"}, + {"6402", "302"}, + {"aec3 771a 4b", "private"}, + {"d07a be94 1054 d444 a820 0595 040b 8166 e082 a62d 1bff", "Mon, 21 Oct 2013 20:13:21 GMT"}, + {"9d29 ad17 1863 c78f 0b97 c8e9 ae82 ae43 d3", "https://www.example.com"}, + {"9bd9 ab", "gzip"}, + {"94e7 821d d7f2 e6c7 b335 dfdf cd5b 3960 d5af 2708 7f36 72c1 ab27 0fb5 291f 9587 3160 65c0 03ed 4ee5 b106 3d50 07", + "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"}, + } + for i, tt := range tests { + var buf bytes.Buffer + in, err := hex.DecodeString(strings.Replace(tt.inHex, " ", "", -1)) + if err != nil { + t.Errorf("%d. hex input error: %v", i, err) + continue + } + if _, err := HuffmanDecode(&buf, in); err != nil { + t.Errorf("%d. decode error: %v", i, err) + continue + } + if got := buf.String(); tt.want != got { + t.Errorf("%d. decode = %q; want %q", i, got, tt.want) + } + } +} + +func TestAppendHuffmanString(t *testing.T) { + tests := []struct { + in, want string + }{ + {"www.example.com", "f1e3 c2e5 f23a 6ba0 ab90 f4ff"}, + {"no-cache", "a8eb 1064 9cbf"}, + {"custom-key", "25a8 49e9 5ba9 7d7f"}, + {"custom-value", "25a8 49e9 5bb8 e8b4 bf"}, + {"302", "6402"}, + {"private", "aec3 771a 4b"}, + {"Mon, 21 Oct 2013 20:13:21 GMT", "d07a be94 1054 d444 a820 0595 040b 8166 e082 a62d 1bff"}, + {"https://www.example.com", "9d29 ad17 1863 c78f 0b97 c8e9 ae82 ae43 d3"}, + {"gzip", "9bd9 ab"}, + {"foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1", + "94e7 821d d7f2 e6c7 b335 dfdf cd5b 3960 d5af 2708 7f36 72c1 ab27 0fb5 291f 9587 3160 65c0 03ed 4ee5 b106 3d50 07"}, + } + for i, tt := range tests { + buf := []byte{} + want := strings.Replace(tt.want, " ", "", -1) + buf = AppendHuffmanString(buf, tt.in) + if got := hex.EncodeToString(buf); want != got { + t.Errorf("%d. encode = %q; want %q", i, got, want) + } + } +} + +func TestHuffmanMaxStrLen(t *testing.T) { + const msg = "Some string" + huff := AppendHuffmanString(nil, msg) + + testGood := func(max int) { + var out bytes.Buffer + if err := huffmanDecode(&out, max, huff); err != nil { + t.Errorf("For maxLen=%d, unexpected error: %v", max, err) + } + if out.String() != msg { + t.Errorf("For maxLen=%d, out = %q; want %q", max, out.String(), msg) + } + } + testGood(0) + testGood(len(msg)) + testGood(len(msg) + 1) + + var out bytes.Buffer + if err := huffmanDecode(&out, len(msg)-1, huff); err != ErrStringLength { + t.Errorf("err = %v; want ErrStringLength", err) + } +} + +func TestHuffmanRoundtripStress(t *testing.T) { + const Len = 50 // of uncompressed string + input := make([]byte, Len) + var output bytes.Buffer + var huff []byte + + n := 5000 + if testing.Short() { + n = 100 + } + seed := time.Now().UnixNano() + t.Logf("Seed = %v", seed) + src := rand.New(rand.NewSource(seed)) + var encSize int64 + for i := 0; i < n; i++ { + for l := range input { + input[l] = byte(src.Intn(256)) + } + huff = AppendHuffmanString(huff[:0], string(input)) + encSize += int64(len(huff)) + output.Reset() + if err := huffmanDecode(&output, 0, huff); err != nil { + t.Errorf("Failed to decode %q -> %q -> error %v", input, huff, err) + continue + } + if !bytes.Equal(output.Bytes(), input) { + t.Errorf("Roundtrip failure on %q -> %q -> %q", input, huff, output.Bytes()) + } + } + t.Logf("Compressed size of original: %0.02f%% (%v -> %v)", 100*(float64(encSize)/(Len*float64(n))), Len*n, encSize) +} + +func TestHuffmanDecodeFuzz(t *testing.T) { + const Len = 50 // of compressed + var buf, zbuf bytes.Buffer + + n := 5000 + if testing.Short() { + n = 100 + } + seed := time.Now().UnixNano() + t.Logf("Seed = %v", seed) + src := rand.New(rand.NewSource(seed)) + numFail := 0 + for i := 0; i < n; i++ { + zbuf.Reset() + if i == 0 { + // Start with at least one invalid one. + zbuf.WriteString("00\x91\xff\xff\xff\xff\xc8") + } else { + for l := 0; l < Len; l++ { + zbuf.WriteByte(byte(src.Intn(256))) + } + } + + buf.Reset() + if err := huffmanDecode(&buf, 0, zbuf.Bytes()); err != nil { + if err == ErrInvalidHuffman { + numFail++ + continue + } + t.Errorf("Failed to decode %q: %v", zbuf.Bytes(), err) + continue + } + } + t.Logf("%0.02f%% are invalid (%d / %d)", 100*float64(numFail)/float64(n), numFail, n) + if numFail < 1 { + t.Error("expected at least one invalid huffman encoding (test starts with one)") + } +} + +func TestReadVarInt(t *testing.T) { + type res struct { + i uint64 + consumed int + err error + } + tests := []struct { + n byte + p []byte + want res + }{ + // Fits in a byte: + {1, []byte{0}, res{0, 1, nil}}, + {2, []byte{2}, res{2, 1, nil}}, + {3, []byte{6}, res{6, 1, nil}}, + {4, []byte{14}, res{14, 1, nil}}, + {5, []byte{30}, res{30, 1, nil}}, + {6, []byte{62}, res{62, 1, nil}}, + {7, []byte{126}, res{126, 1, nil}}, + {8, []byte{254}, res{254, 1, nil}}, + + // Doesn't fit in a byte: + {1, []byte{1}, res{0, 0, errNeedMore}}, + {2, []byte{3}, res{0, 0, errNeedMore}}, + {3, []byte{7}, res{0, 0, errNeedMore}}, + {4, []byte{15}, res{0, 0, errNeedMore}}, + {5, []byte{31}, res{0, 0, errNeedMore}}, + {6, []byte{63}, res{0, 0, errNeedMore}}, + {7, []byte{127}, res{0, 0, errNeedMore}}, + {8, []byte{255}, res{0, 0, errNeedMore}}, + + // Ignoring top bits: + {5, []byte{255, 154, 10}, res{1337, 3, nil}}, // high dummy three bits: 111 + {5, []byte{159, 154, 10}, res{1337, 3, nil}}, // high dummy three bits: 100 + {5, []byte{191, 154, 10}, res{1337, 3, nil}}, // high dummy three bits: 101 + + // Extra byte: + {5, []byte{191, 154, 10, 2}, res{1337, 3, nil}}, // extra byte + + // Short a byte: + {5, []byte{191, 154}, res{0, 0, errNeedMore}}, + + // integer overflow: + {1, []byte{255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128}, res{0, 0, errVarintOverflow}}, + } + for _, tt := range tests { + i, remain, err := readVarInt(tt.n, tt.p) + consumed := len(tt.p) - len(remain) + got := res{i, consumed, err} + if got != tt.want { + t.Errorf("readVarInt(%d, %v ~ %x) = %+v; want %+v", tt.n, tt.p, tt.p, got, tt.want) + } + } +} + +// Fuzz crash, originally reported at https://github.com/bradfitz/http2/issues/56 +func TestHuffmanFuzzCrash(t *testing.T) { + got, err := HuffmanDecodeToString([]byte("00\x91\xff\xff\xff\xff\xc8")) + if got != "" { + t.Errorf("Got %q; want empty string", got) + } + if err != ErrInvalidHuffman { + t.Errorf("Err = %v; want ErrInvalidHuffman", err) + } +} + +func dehex(s string) []byte { + s = strings.Replace(s, " ", "", -1) + s = strings.Replace(s, "\n", "", -1) + b, err := hex.DecodeString(s) + if err != nil { + panic(err) + } + return b +} + +func TestEmitEnabled(t *testing.T) { + var buf bytes.Buffer + enc := NewEncoder(&buf) + enc.WriteField(HeaderField{Name: "foo", Value: "bar"}) + enc.WriteField(HeaderField{Name: "foo", Value: "bar"}) + + numCallback := 0 + var dec *Decoder + dec = NewDecoder(8<<20, func(HeaderField) { + numCallback++ + dec.SetEmitEnabled(false) + }) + if !dec.EmitEnabled() { + t.Errorf("initial emit enabled = false; want true") + } + if _, err := dec.Write(buf.Bytes()); err != nil { + t.Error(err) + } + if numCallback != 1 { + t.Errorf("num callbacks = %d; want 1", numCallback) + } + if dec.EmitEnabled() { + t.Errorf("emit enabled = true; want false") + } +} + +func TestSaveBufLimit(t *testing.T) { + const maxStr = 1 << 10 + var got []HeaderField + dec := NewDecoder(initialHeaderTableSize, func(hf HeaderField) { + got = append(got, hf) + }) + dec.SetMaxStringLength(maxStr) + var frag []byte + frag = append(frag[:0], encodeTypeByte(false, false)) + frag = appendVarInt(frag, 7, 3) + frag = append(frag, "foo"...) + frag = appendVarInt(frag, 7, 3) + frag = append(frag, "bar"...) + + if _, err := dec.Write(frag); err != nil { + t.Fatal(err) + } + + want := []HeaderField{{Name: "foo", Value: "bar"}} + if !reflect.DeepEqual(got, want) { + t.Errorf("After small writes, got %v; want %v", got, want) + } + + frag = append(frag[:0], encodeTypeByte(false, false)) + frag = appendVarInt(frag, 7, maxStr*3) + frag = append(frag, make([]byte, maxStr*3)...) + + _, err := dec.Write(frag) + if err != ErrStringLength { + t.Fatalf("Write error = %v; want ErrStringLength", err) + } +} diff --git a/vendor/golang.org/x/net/http2/hpack/huffman.go b/vendor/golang.org/x/net/http2/hpack/huffman.go new file mode 100644 index 0000000..eb4b1f0 --- /dev/null +++ b/vendor/golang.org/x/net/http2/hpack/huffman.go @@ -0,0 +1,190 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package hpack + +import ( + "bytes" + "errors" + "io" + "sync" +) + +var bufPool = sync.Pool{ + New: func() interface{} { return new(bytes.Buffer) }, +} + +// HuffmanDecode decodes the string in v and writes the expanded +// result to w, returning the number of bytes written to w and the +// Write call's return value. At most one Write call is made. +func HuffmanDecode(w io.Writer, v []byte) (int, error) { + buf := bufPool.Get().(*bytes.Buffer) + buf.Reset() + defer bufPool.Put(buf) + if err := huffmanDecode(buf, 0, v); err != nil { + return 0, err + } + return w.Write(buf.Bytes()) +} + +// HuffmanDecodeToString decodes the string in v. +func HuffmanDecodeToString(v []byte) (string, error) { + buf := bufPool.Get().(*bytes.Buffer) + buf.Reset() + defer bufPool.Put(buf) + if err := huffmanDecode(buf, 0, v); err != nil { + return "", err + } + return buf.String(), nil +} + +// ErrInvalidHuffman is returned for errors found decoding +// Huffman-encoded strings. +var ErrInvalidHuffman = errors.New("hpack: invalid Huffman-encoded data") + +// huffmanDecode decodes v to buf. +// If maxLen is greater than 0, attempts to write more to buf than +// maxLen bytes will return ErrStringLength. +func huffmanDecode(buf *bytes.Buffer, maxLen int, v []byte) error { + n := rootHuffmanNode + cur, nbits := uint(0), uint8(0) + for _, b := range v { + cur = cur<<8 | uint(b) + nbits += 8 + for nbits >= 8 { + idx := byte(cur >> (nbits - 8)) + n = n.children[idx] + if n == nil { + return ErrInvalidHuffman + } + if n.children == nil { + if maxLen != 0 && buf.Len() == maxLen { + return ErrStringLength + } + buf.WriteByte(n.sym) + nbits -= n.codeLen + n = rootHuffmanNode + } else { + nbits -= 8 + } + } + } + for nbits > 0 { + n = n.children[byte(cur<<(8-nbits))] + if n.children != nil || n.codeLen > nbits { + break + } + buf.WriteByte(n.sym) + nbits -= n.codeLen + n = rootHuffmanNode + } + return nil +} + +type node struct { + // children is non-nil for internal nodes + children []*node + + // The following are only valid if children is nil: + codeLen uint8 // number of bits that led to the output of sym + sym byte // output symbol +} + +func newInternalNode() *node { + return &node{children: make([]*node, 256)} +} + +var rootHuffmanNode = newInternalNode() + +func init() { + if len(huffmanCodes) != 256 { + panic("unexpected size") + } + for i, code := range huffmanCodes { + addDecoderNode(byte(i), code, huffmanCodeLen[i]) + } +} + +func addDecoderNode(sym byte, code uint32, codeLen uint8) { + cur := rootHuffmanNode + for codeLen > 8 { + codeLen -= 8 + i := uint8(code >> codeLen) + if cur.children[i] == nil { + cur.children[i] = newInternalNode() + } + cur = cur.children[i] + } + shift := 8 - codeLen + start, end := int(uint8(code<> (nbits - rembits)) + dst[len(dst)-1] |= t + } + + return dst +} + +// HuffmanEncodeLength returns the number of bytes required to encode +// s in Huffman codes. The result is round up to byte boundary. +func HuffmanEncodeLength(s string) uint64 { + n := uint64(0) + for i := 0; i < len(s); i++ { + n += uint64(huffmanCodeLen[s[i]]) + } + return (n + 7) / 8 +} + +// appendByteToHuffmanCode appends Huffman code for c to dst and +// returns the extended buffer and the remaining bits in the last +// element. The appending is not byte aligned and the remaining bits +// in the last element of dst is given in rembits. +func appendByteToHuffmanCode(dst []byte, rembits uint8, c byte) ([]byte, uint8) { + code := huffmanCodes[c] + nbits := huffmanCodeLen[c] + + for { + if rembits > nbits { + t := uint8(code << (rembits - nbits)) + dst[len(dst)-1] |= t + rembits -= nbits + break + } + + t := uint8(code >> (nbits - rembits)) + dst[len(dst)-1] |= t + + nbits -= rembits + rembits = 8 + + if nbits == 0 { + break + } + + dst = append(dst, 0) + } + + return dst, rembits +} diff --git a/vendor/golang.org/x/net/http2/hpack/tables.go b/vendor/golang.org/x/net/http2/hpack/tables.go new file mode 100644 index 0000000..b9283a0 --- /dev/null +++ b/vendor/golang.org/x/net/http2/hpack/tables.go @@ -0,0 +1,352 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package hpack + +func pair(name, value string) HeaderField { + return HeaderField{Name: name, Value: value} +} + +// http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-07#appendix-B +var staticTable = [...]HeaderField{ + pair(":authority", ""), // index 1 (1-based) + pair(":method", "GET"), + pair(":method", "POST"), + pair(":path", "/"), + pair(":path", "/index.html"), + pair(":scheme", "http"), + pair(":scheme", "https"), + pair(":status", "200"), + pair(":status", "204"), + pair(":status", "206"), + pair(":status", "304"), + pair(":status", "400"), + pair(":status", "404"), + pair(":status", "500"), + pair("accept-charset", ""), + pair("accept-encoding", "gzip, deflate"), + pair("accept-language", ""), + pair("accept-ranges", ""), + pair("accept", ""), + pair("access-control-allow-origin", ""), + pair("age", ""), + pair("allow", ""), + pair("authorization", ""), + pair("cache-control", ""), + pair("content-disposition", ""), + pair("content-encoding", ""), + pair("content-language", ""), + pair("content-length", ""), + pair("content-location", ""), + pair("content-range", ""), + pair("content-type", ""), + pair("cookie", ""), + pair("date", ""), + pair("etag", ""), + pair("expect", ""), + pair("expires", ""), + pair("from", ""), + pair("host", ""), + pair("if-match", ""), + pair("if-modified-since", ""), + pair("if-none-match", ""), + pair("if-range", ""), + pair("if-unmodified-since", ""), + pair("last-modified", ""), + pair("link", ""), + pair("location", ""), + pair("max-forwards", ""), + pair("proxy-authenticate", ""), + pair("proxy-authorization", ""), + pair("range", ""), + pair("referer", ""), + pair("refresh", ""), + pair("retry-after", ""), + pair("server", ""), + pair("set-cookie", ""), + pair("strict-transport-security", ""), + pair("transfer-encoding", ""), + pair("user-agent", ""), + pair("vary", ""), + pair("via", ""), + pair("www-authenticate", ""), +} + +var huffmanCodes = [256]uint32{ + 0x1ff8, + 0x7fffd8, + 0xfffffe2, + 0xfffffe3, + 0xfffffe4, + 0xfffffe5, + 0xfffffe6, + 0xfffffe7, + 0xfffffe8, + 0xffffea, + 0x3ffffffc, + 0xfffffe9, + 0xfffffea, + 0x3ffffffd, + 0xfffffeb, + 0xfffffec, + 0xfffffed, + 0xfffffee, + 0xfffffef, + 0xffffff0, + 0xffffff1, + 0xffffff2, + 0x3ffffffe, + 0xffffff3, + 0xffffff4, + 0xffffff5, + 0xffffff6, + 0xffffff7, + 0xffffff8, + 0xffffff9, + 0xffffffa, + 0xffffffb, + 0x14, + 0x3f8, + 0x3f9, + 0xffa, + 0x1ff9, + 0x15, + 0xf8, + 0x7fa, + 0x3fa, + 0x3fb, + 0xf9, + 0x7fb, + 0xfa, + 0x16, + 0x17, + 0x18, + 0x0, + 0x1, + 0x2, + 0x19, + 0x1a, + 0x1b, + 0x1c, + 0x1d, + 0x1e, + 0x1f, + 0x5c, + 0xfb, + 0x7ffc, + 0x20, + 0xffb, + 0x3fc, + 0x1ffa, + 0x21, + 0x5d, + 0x5e, + 0x5f, + 0x60, + 0x61, + 0x62, + 0x63, + 0x64, + 0x65, + 0x66, + 0x67, + 0x68, + 0x69, + 0x6a, + 0x6b, + 0x6c, + 0x6d, + 0x6e, + 0x6f, + 0x70, + 0x71, + 0x72, + 0xfc, + 0x73, + 0xfd, + 0x1ffb, + 0x7fff0, + 0x1ffc, + 0x3ffc, + 0x22, + 0x7ffd, + 0x3, + 0x23, + 0x4, + 0x24, + 0x5, + 0x25, + 0x26, + 0x27, + 0x6, + 0x74, + 0x75, + 0x28, + 0x29, + 0x2a, + 0x7, + 0x2b, + 0x76, + 0x2c, + 0x8, + 0x9, + 0x2d, + 0x77, + 0x78, + 0x79, + 0x7a, + 0x7b, + 0x7ffe, + 0x7fc, + 0x3ffd, + 0x1ffd, + 0xffffffc, + 0xfffe6, + 0x3fffd2, + 0xfffe7, + 0xfffe8, + 0x3fffd3, + 0x3fffd4, + 0x3fffd5, + 0x7fffd9, + 0x3fffd6, + 0x7fffda, + 0x7fffdb, + 0x7fffdc, + 0x7fffdd, + 0x7fffde, + 0xffffeb, + 0x7fffdf, + 0xffffec, + 0xffffed, + 0x3fffd7, + 0x7fffe0, + 0xffffee, + 0x7fffe1, + 0x7fffe2, + 0x7fffe3, + 0x7fffe4, + 0x1fffdc, + 0x3fffd8, + 0x7fffe5, + 0x3fffd9, + 0x7fffe6, + 0x7fffe7, + 0xffffef, + 0x3fffda, + 0x1fffdd, + 0xfffe9, + 0x3fffdb, + 0x3fffdc, + 0x7fffe8, + 0x7fffe9, + 0x1fffde, + 0x7fffea, + 0x3fffdd, + 0x3fffde, + 0xfffff0, + 0x1fffdf, + 0x3fffdf, + 0x7fffeb, + 0x7fffec, + 0x1fffe0, + 0x1fffe1, + 0x3fffe0, + 0x1fffe2, + 0x7fffed, + 0x3fffe1, + 0x7fffee, + 0x7fffef, + 0xfffea, + 0x3fffe2, + 0x3fffe3, + 0x3fffe4, + 0x7ffff0, + 0x3fffe5, + 0x3fffe6, + 0x7ffff1, + 0x3ffffe0, + 0x3ffffe1, + 0xfffeb, + 0x7fff1, + 0x3fffe7, + 0x7ffff2, + 0x3fffe8, + 0x1ffffec, + 0x3ffffe2, + 0x3ffffe3, + 0x3ffffe4, + 0x7ffffde, + 0x7ffffdf, + 0x3ffffe5, + 0xfffff1, + 0x1ffffed, + 0x7fff2, + 0x1fffe3, + 0x3ffffe6, + 0x7ffffe0, + 0x7ffffe1, + 0x3ffffe7, + 0x7ffffe2, + 0xfffff2, + 0x1fffe4, + 0x1fffe5, + 0x3ffffe8, + 0x3ffffe9, + 0xffffffd, + 0x7ffffe3, + 0x7ffffe4, + 0x7ffffe5, + 0xfffec, + 0xfffff3, + 0xfffed, + 0x1fffe6, + 0x3fffe9, + 0x1fffe7, + 0x1fffe8, + 0x7ffff3, + 0x3fffea, + 0x3fffeb, + 0x1ffffee, + 0x1ffffef, + 0xfffff4, + 0xfffff5, + 0x3ffffea, + 0x7ffff4, + 0x3ffffeb, + 0x7ffffe6, + 0x3ffffec, + 0x3ffffed, + 0x7ffffe7, + 0x7ffffe8, + 0x7ffffe9, + 0x7ffffea, + 0x7ffffeb, + 0xffffffe, + 0x7ffffec, + 0x7ffffed, + 0x7ffffee, + 0x7ffffef, + 0x7fffff0, + 0x3ffffee, +} + +var huffmanCodeLen = [256]uint8{ + 13, 23, 28, 28, 28, 28, 28, 28, 28, 24, 30, 28, 28, 30, 28, 28, + 28, 28, 28, 28, 28, 28, 30, 28, 28, 28, 28, 28, 28, 28, 28, 28, + 6, 10, 10, 12, 13, 6, 8, 11, 10, 10, 8, 11, 8, 6, 6, 6, + 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 8, 15, 6, 12, 10, + 13, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 8, 7, 8, 13, 19, 13, 14, 6, + 15, 5, 6, 5, 6, 5, 6, 6, 6, 5, 7, 7, 6, 6, 6, 5, + 6, 7, 6, 5, 5, 6, 7, 7, 7, 7, 7, 15, 11, 14, 13, 28, + 20, 22, 20, 20, 22, 22, 22, 23, 22, 23, 23, 23, 23, 23, 24, 23, + 24, 24, 22, 23, 24, 23, 23, 23, 23, 21, 22, 23, 22, 23, 23, 24, + 22, 21, 20, 22, 22, 23, 23, 21, 23, 22, 22, 24, 21, 22, 23, 23, + 21, 21, 22, 21, 23, 22, 23, 23, 20, 22, 22, 22, 23, 22, 22, 23, + 26, 26, 20, 19, 22, 23, 22, 25, 26, 26, 26, 27, 27, 26, 24, 25, + 19, 21, 26, 27, 27, 26, 27, 24, 21, 21, 26, 26, 28, 27, 27, 27, + 20, 24, 20, 21, 22, 21, 21, 23, 22, 22, 25, 25, 24, 24, 26, 23, + 26, 27, 26, 26, 27, 27, 27, 27, 27, 28, 27, 27, 27, 27, 27, 26, +} diff --git a/vendor/golang.org/x/net/http2/http2.go b/vendor/golang.org/x/net/http2/http2.go new file mode 100644 index 0000000..03ad05c --- /dev/null +++ b/vendor/golang.org/x/net/http2/http2.go @@ -0,0 +1,253 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package http2 implements the HTTP/2 protocol. +// +// This is a work in progress. This package is low-level and intended +// to be used directly by very few people. Most users will use it +// indirectly through integration with the net/http package. See +// ConfigureServer. That ConfigureServer call will likely be automatic +// or available via an empty import in the future. +// +// See http://http2.github.io/ +package http2 + +import ( + "bufio" + "fmt" + "io" + "net/http" + "strconv" + "sync" +) + +var VerboseLogs = false + +const ( + // ClientPreface is the string that must be sent by new + // connections from clients. + ClientPreface = "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" + + // SETTINGS_MAX_FRAME_SIZE default + // http://http2.github.io/http2-spec/#rfc.section.6.5.2 + initialMaxFrameSize = 16384 + + // NextProtoTLS is the NPN/ALPN protocol negotiated during + // HTTP/2's TLS setup. + NextProtoTLS = "h2" + + // http://http2.github.io/http2-spec/#SettingValues + initialHeaderTableSize = 4096 + + initialWindowSize = 65535 // 6.9.2 Initial Flow Control Window Size + + defaultMaxReadFrameSize = 1 << 20 +) + +var ( + clientPreface = []byte(ClientPreface) +) + +type streamState int + +const ( + stateIdle streamState = iota + stateOpen + stateHalfClosedLocal + stateHalfClosedRemote + stateResvLocal + stateResvRemote + stateClosed +) + +var stateName = [...]string{ + stateIdle: "Idle", + stateOpen: "Open", + stateHalfClosedLocal: "HalfClosedLocal", + stateHalfClosedRemote: "HalfClosedRemote", + stateResvLocal: "ResvLocal", + stateResvRemote: "ResvRemote", + stateClosed: "Closed", +} + +func (st streamState) String() string { + return stateName[st] +} + +// Setting is a setting parameter: which setting it is, and its value. +type Setting struct { + // ID is which setting is being set. + // See http://http2.github.io/http2-spec/#SettingValues + ID SettingID + + // Val is the value. + Val uint32 +} + +func (s Setting) String() string { + return fmt.Sprintf("[%v = %d]", s.ID, s.Val) +} + +// Valid reports whether the setting is valid. +func (s Setting) Valid() error { + // Limits and error codes from 6.5.2 Defined SETTINGS Parameters + switch s.ID { + case SettingEnablePush: + if s.Val != 1 && s.Val != 0 { + return ConnectionError(ErrCodeProtocol) + } + case SettingInitialWindowSize: + if s.Val > 1<<31-1 { + return ConnectionError(ErrCodeFlowControl) + } + case SettingMaxFrameSize: + if s.Val < 16384 || s.Val > 1<<24-1 { + return ConnectionError(ErrCodeProtocol) + } + } + return nil +} + +// A SettingID is an HTTP/2 setting as defined in +// http://http2.github.io/http2-spec/#iana-settings +type SettingID uint16 + +const ( + SettingHeaderTableSize SettingID = 0x1 + SettingEnablePush SettingID = 0x2 + SettingMaxConcurrentStreams SettingID = 0x3 + SettingInitialWindowSize SettingID = 0x4 + SettingMaxFrameSize SettingID = 0x5 + SettingMaxHeaderListSize SettingID = 0x6 +) + +var settingName = map[SettingID]string{ + SettingHeaderTableSize: "HEADER_TABLE_SIZE", + SettingEnablePush: "ENABLE_PUSH", + SettingMaxConcurrentStreams: "MAX_CONCURRENT_STREAMS", + SettingInitialWindowSize: "INITIAL_WINDOW_SIZE", + SettingMaxFrameSize: "MAX_FRAME_SIZE", + SettingMaxHeaderListSize: "MAX_HEADER_LIST_SIZE", +} + +func (s SettingID) String() string { + if v, ok := settingName[s]; ok { + return v + } + return fmt.Sprintf("UNKNOWN_SETTING_%d", uint16(s)) +} + +func validHeader(v string) bool { + if len(v) == 0 { + return false + } + for _, r := range v { + // "Just as in HTTP/1.x, header field names are + // strings of ASCII characters that are compared in a + // case-insensitive fashion. However, header field + // names MUST be converted to lowercase prior to their + // encoding in HTTP/2. " + if r >= 127 || ('A' <= r && r <= 'Z') { + return false + } + } + return true +} + +var httpCodeStringCommon = map[int]string{} // n -> strconv.Itoa(n) + +func init() { + for i := 100; i <= 999; i++ { + if v := http.StatusText(i); v != "" { + httpCodeStringCommon[i] = strconv.Itoa(i) + } + } +} + +func httpCodeString(code int) string { + if s, ok := httpCodeStringCommon[code]; ok { + return s + } + return strconv.Itoa(code) +} + +// from pkg io +type stringWriter interface { + WriteString(s string) (n int, err error) +} + +// A gate lets two goroutines coordinate their activities. +type gate chan struct{} + +func (g gate) Done() { g <- struct{}{} } +func (g gate) Wait() { <-g } + +// A closeWaiter is like a sync.WaitGroup but only goes 1 to 0 (open to closed). +type closeWaiter chan struct{} + +// Init makes a closeWaiter usable. +// It exists because so a closeWaiter value can be placed inside a +// larger struct and have the Mutex and Cond's memory in the same +// allocation. +func (cw *closeWaiter) Init() { + *cw = make(chan struct{}) +} + +// Close marks the closeWaiter as closed and unblocks any waiters. +func (cw closeWaiter) Close() { + close(cw) +} + +// Wait waits for the closeWaiter to become closed. +func (cw closeWaiter) Wait() { + <-cw +} + +// bufferedWriter is a buffered writer that writes to w. +// Its buffered writer is lazily allocated as needed, to minimize +// idle memory usage with many connections. +type bufferedWriter struct { + w io.Writer // immutable + bw *bufio.Writer // non-nil when data is buffered +} + +func newBufferedWriter(w io.Writer) *bufferedWriter { + return &bufferedWriter{w: w} +} + +var bufWriterPool = sync.Pool{ + New: func() interface{} { + // TODO: pick something better? this is a bit under + // (3 x typical 1500 byte MTU) at least. + return bufio.NewWriterSize(nil, 4<<10) + }, +} + +func (w *bufferedWriter) Write(p []byte) (n int, err error) { + if w.bw == nil { + bw := bufWriterPool.Get().(*bufio.Writer) + bw.Reset(w.w) + w.bw = bw + } + return w.bw.Write(p) +} + +func (w *bufferedWriter) Flush() error { + bw := w.bw + if bw == nil { + return nil + } + err := bw.Flush() + bw.Reset(nil) + bufWriterPool.Put(bw) + w.bw = nil + return err +} + +func mustUint31(v int32) uint32 { + if v < 0 || v > 2147483647 { + panic("out of range") + } + return uint32(v) +} diff --git a/vendor/golang.org/x/net/http2/http2_test.go b/vendor/golang.org/x/net/http2/http2_test.go new file mode 100644 index 0000000..938341b --- /dev/null +++ b/vendor/golang.org/x/net/http2/http2_test.go @@ -0,0 +1,168 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import ( + "bytes" + "errors" + "flag" + "fmt" + "net/http" + "os/exec" + "strconv" + "strings" + "testing" + + "golang.org/x/net/http2/hpack" +) + +var knownFailing = flag.Bool("known_failing", false, "Run known-failing tests.") + +func condSkipFailingTest(t *testing.T) { + if !*knownFailing { + t.Skip("Skipping known-failing test without --known_failing") + } +} + +func init() { + DebugGoroutines = true + flag.BoolVar(&VerboseLogs, "verboseh2", false, "Verbose HTTP/2 debug logging") +} + +func TestSettingString(t *testing.T) { + tests := []struct { + s Setting + want string + }{ + {Setting{SettingMaxFrameSize, 123}, "[MAX_FRAME_SIZE = 123]"}, + {Setting{1<<16 - 1, 123}, "[UNKNOWN_SETTING_65535 = 123]"}, + } + for i, tt := range tests { + got := fmt.Sprint(tt.s) + if got != tt.want { + t.Errorf("%d. for %#v, string = %q; want %q", i, tt.s, got, tt.want) + } + } +} + +type twriter struct { + t testing.TB + st *serverTester // optional +} + +func (w twriter) Write(p []byte) (n int, err error) { + if w.st != nil { + ps := string(p) + for _, phrase := range w.st.logFilter { + if strings.Contains(ps, phrase) { + return len(p), nil // no logging + } + } + } + w.t.Logf("%s", p) + return len(p), nil +} + +// like encodeHeader, but don't add implicit psuedo headers. +func encodeHeaderNoImplicit(t *testing.T, headers ...string) []byte { + var buf bytes.Buffer + enc := hpack.NewEncoder(&buf) + for len(headers) > 0 { + k, v := headers[0], headers[1] + headers = headers[2:] + if err := enc.WriteField(hpack.HeaderField{Name: k, Value: v}); err != nil { + t.Fatalf("HPACK encoding error for %q/%q: %v", k, v, err) + } + } + return buf.Bytes() +} + +// Verify that curl has http2. +func requireCurl(t *testing.T) { + out, err := dockerLogs(curl(t, "--version")) + if err != nil { + t.Skipf("failed to determine curl features; skipping test") + } + if !strings.Contains(string(out), "HTTP2") { + t.Skip("curl doesn't support HTTP2; skipping test") + } +} + +func curl(t *testing.T, args ...string) (container string) { + out, err := exec.Command("docker", append([]string{"run", "-d", "--net=host", "gohttp2/curl"}, args...)...).Output() + if err != nil { + t.Skipf("Failed to run curl in docker: %v, %s", err, out) + } + return strings.TrimSpace(string(out)) +} + +// Verify that h2load exists. +func requireH2load(t *testing.T) { + out, err := dockerLogs(h2load(t, "--version")) + if err != nil { + t.Skipf("failed to probe h2load; skipping test: %s", out) + } + if !strings.Contains(string(out), "h2load nghttp2/") { + t.Skipf("h2load not present; skipping test. (Output=%q)", out) + } +} + +func h2load(t *testing.T, args ...string) (container string) { + out, err := exec.Command("docker", append([]string{"run", "-d", "--net=host", "--entrypoint=/usr/local/bin/h2load", "gohttp2/curl"}, args...)...).Output() + if err != nil { + t.Skipf("Failed to run h2load in docker: %v, %s", err, out) + } + return strings.TrimSpace(string(out)) +} + +type puppetCommand struct { + fn func(w http.ResponseWriter, r *http.Request) + done chan<- bool +} + +type handlerPuppet struct { + ch chan puppetCommand +} + +func newHandlerPuppet() *handlerPuppet { + return &handlerPuppet{ + ch: make(chan puppetCommand), + } +} + +func (p *handlerPuppet) act(w http.ResponseWriter, r *http.Request) { + for cmd := range p.ch { + cmd.fn(w, r) + cmd.done <- true + } +} + +func (p *handlerPuppet) done() { close(p.ch) } +func (p *handlerPuppet) do(fn func(http.ResponseWriter, *http.Request)) { + done := make(chan bool) + p.ch <- puppetCommand{fn, done} + <-done +} +func dockerLogs(container string) ([]byte, error) { + out, err := exec.Command("docker", "wait", container).CombinedOutput() + if err != nil { + return out, err + } + exitStatus, err := strconv.Atoi(strings.TrimSpace(string(out))) + if err != nil { + return out, errors.New("unexpected exit status from docker wait") + } + out, err = exec.Command("docker", "logs", container).CombinedOutput() + exec.Command("docker", "rm", container).Run() + if err == nil && exitStatus != 0 { + err = fmt.Errorf("exit status %d: %s", exitStatus, out) + } + return out, err +} + +func kill(container string) { + exec.Command("docker", "kill", container).Run() + exec.Command("docker", "rm", container).Run() +} diff --git a/vendor/golang.org/x/net/http2/pipe.go b/vendor/golang.org/x/net/http2/pipe.go new file mode 100644 index 0000000..96a3eb8 --- /dev/null +++ b/vendor/golang.org/x/net/http2/pipe.go @@ -0,0 +1,90 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import ( + "errors" + "io" + "sync" +) + +// pipe is a goroutine-safe io.Reader/io.Writer pair. It's like +// io.Pipe except there are no PipeReader/PipeWriter halves, and the +// underlying buffer is an interface. (io.Pipe is always unbuffered) +type pipe struct { + mu sync.Mutex + c sync.Cond // c.L must point to + b pipeBuffer + err error // read error once empty. non-nil means closed. +} + +type pipeBuffer interface { + Len() int + io.Writer + io.Reader +} + +// Read waits until data is available and copies bytes +// from the buffer into p. +func (p *pipe) Read(d []byte) (n int, err error) { + p.mu.Lock() + defer p.mu.Unlock() + if p.c.L == nil { + p.c.L = &p.mu + } + for { + if p.b.Len() > 0 { + return p.b.Read(d) + } + if p.err != nil { + return 0, p.err + } + p.c.Wait() + } +} + +var errClosedPipeWrite = errors.New("write on closed buffer") + +// Write copies bytes from p into the buffer and wakes a reader. +// It is an error to write more data than the buffer can hold. +func (p *pipe) Write(d []byte) (n int, err error) { + p.mu.Lock() + defer p.mu.Unlock() + if p.c.L == nil { + p.c.L = &p.mu + } + defer p.c.Signal() + if p.err != nil { + return 0, errClosedPipeWrite + } + return p.b.Write(d) +} + +// CloseWithError causes Reads to wake up and return the +// provided err after all data has been read. +// +// The error must be non-nil. +func (p *pipe) CloseWithError(err error) { + if err == nil { + panic("CloseWithError must be non-nil") + } + p.mu.Lock() + defer p.mu.Unlock() + if p.c.L == nil { + p.c.L = &p.mu + } + defer p.c.Signal() + if p.err == nil { + p.err = err + } +} + +// Err returns the error (if any) first set with CloseWithError. +// This is the error which will be returned after the reader is exhausted. +func (p *pipe) Err() error { + p.mu.Lock() + defer p.mu.Unlock() + return p.err +} diff --git a/vendor/golang.org/x/net/http2/pipe_test.go b/vendor/golang.org/x/net/http2/pipe_test.go new file mode 100644 index 0000000..002ce05 --- /dev/null +++ b/vendor/golang.org/x/net/http2/pipe_test.go @@ -0,0 +1,24 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import ( + "bytes" + "errors" + "testing" +) + +func TestPipeClose(t *testing.T) { + var p pipe + p.b = new(bytes.Buffer) + a := errors.New("a") + b := errors.New("b") + p.CloseWithError(a) + p.CloseWithError(b) + _, err := p.Read(make([]byte, 1)) + if err != a { + t.Errorf("err = %v want %v", err, a) + } +} diff --git a/vendor/golang.org/x/net/http2/priority_test.go b/vendor/golang.org/x/net/http2/priority_test.go new file mode 100644 index 0000000..a3fe2bb --- /dev/null +++ b/vendor/golang.org/x/net/http2/priority_test.go @@ -0,0 +1,118 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import ( + "testing" +) + +func TestPriority(t *testing.T) { + // A -> B + // move A's parent to B + streams := make(map[uint32]*stream) + a := &stream{ + parent: nil, + weight: 16, + } + streams[1] = a + b := &stream{ + parent: a, + weight: 16, + } + streams[2] = b + adjustStreamPriority(streams, 1, PriorityParam{ + Weight: 20, + StreamDep: 2, + }) + if a.parent != b { + t.Errorf("Expected A's parent to be B") + } + if a.weight != 20 { + t.Errorf("Expected A's weight to be 20; got %d", a.weight) + } + if b.parent != nil { + t.Errorf("Expected B to have no parent") + } + if b.weight != 16 { + t.Errorf("Expected B's weight to be 16; got %d", b.weight) + } +} + +func TestPriorityExclusiveZero(t *testing.T) { + // A B and C are all children of the 0 stream. + // Exclusive reprioritization to any of the streams + // should bring the rest of the streams under the + // reprioritized stream + streams := make(map[uint32]*stream) + a := &stream{ + parent: nil, + weight: 16, + } + streams[1] = a + b := &stream{ + parent: nil, + weight: 16, + } + streams[2] = b + c := &stream{ + parent: nil, + weight: 16, + } + streams[3] = c + adjustStreamPriority(streams, 3, PriorityParam{ + Weight: 20, + StreamDep: 0, + Exclusive: true, + }) + if a.parent != c { + t.Errorf("Expected A's parent to be C") + } + if a.weight != 16 { + t.Errorf("Expected A's weight to be 16; got %d", a.weight) + } + if b.parent != c { + t.Errorf("Expected B's parent to be C") + } + if b.weight != 16 { + t.Errorf("Expected B's weight to be 16; got %d", b.weight) + } + if c.parent != nil { + t.Errorf("Expected C to have no parent") + } + if c.weight != 20 { + t.Errorf("Expected C's weight to be 20; got %d", b.weight) + } +} + +func TestPriorityOwnParent(t *testing.T) { + streams := make(map[uint32]*stream) + a := &stream{ + parent: nil, + weight: 16, + } + streams[1] = a + b := &stream{ + parent: a, + weight: 16, + } + streams[2] = b + adjustStreamPriority(streams, 1, PriorityParam{ + Weight: 20, + StreamDep: 1, + }) + if a.parent != nil { + t.Errorf("Expected A's parent to be nil") + } + if a.weight != 20 { + t.Errorf("Expected A's weight to be 20; got %d", a.weight) + } + if b.parent != a { + t.Errorf("Expected B's parent to be A") + } + if b.weight != 16 { + t.Errorf("Expected B's weight to be 16; got %d", b.weight) + } + +} diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go new file mode 100644 index 0000000..86069c2 --- /dev/null +++ b/vendor/golang.org/x/net/http2/server.go @@ -0,0 +1,1894 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// TODO: replace all <-sc.doneServing with reads from the stream's cw +// instead, and make sure that on close we close all open +// streams. then remove doneServing? + +// TODO: finish GOAWAY support. Consider each incoming frame type and +// whether it should be ignored during a shutdown race. + +// TODO: disconnect idle clients. GFE seems to do 4 minutes. make +// configurable? or maximum number of idle clients and remove the +// oldest? + +// TODO: turn off the serve goroutine when idle, so +// an idle conn only has the readFrames goroutine active. (which could +// also be optimized probably to pin less memory in crypto/tls). This +// would involve tracking when the serve goroutine is active (atomic +// int32 read/CAS probably?) and starting it up when frames arrive, +// and shutting it down when all handlers exit. the occasional PING +// packets could use time.AfterFunc to call sc.wakeStartServeLoop() +// (which is a no-op if already running) and then queue the PING write +// as normal. The serve loop would then exit in most cases (if no +// Handlers running) and not be woken up again until the PING packet +// returns. + +// TODO (maybe): add a mechanism for Handlers to going into +// half-closed-local mode (rw.(io.Closer) test?) but not exit their +// handler, and continue to be able to read from the +// Request.Body. This would be a somewhat semantic change from HTTP/1 +// (or at least what we expose in net/http), so I'd probably want to +// add it there too. For now, this package says that returning from +// the Handler ServeHTTP function means you're both done reading and +// done writing, without a way to stop just one or the other. + +package http2 + +import ( + "bufio" + "bytes" + "crypto/tls" + "errors" + "fmt" + "io" + "log" + "net" + "net/http" + "net/url" + "strconv" + "strings" + "sync" + "time" + + "golang.org/x/net/http2/hpack" +) + +const ( + prefaceTimeout = 10 * time.Second + firstSettingsTimeout = 2 * time.Second // should be in-flight with preface anyway + handlerChunkWriteSize = 4 << 10 + defaultMaxStreams = 250 // TODO: make this 100 as the GFE seems to? +) + +var ( + errClientDisconnected = errors.New("client disconnected") + errClosedBody = errors.New("body closed by handler") + errHandlerComplete = errors.New("http2: request body closed due to handler exiting") + errStreamClosed = errors.New("http2: stream closed") +) + +var responseWriterStatePool = sync.Pool{ + New: func() interface{} { + rws := &responseWriterState{} + rws.bw = bufio.NewWriterSize(chunkWriter{rws}, handlerChunkWriteSize) + return rws + }, +} + +// Test hooks. +var ( + testHookOnConn func() + testHookGetServerConn func(*serverConn) + testHookOnPanicMu *sync.Mutex // nil except in tests + testHookOnPanic func(sc *serverConn, panicVal interface{}) (rePanic bool) +) + +// Server is an HTTP/2 server. +type Server struct { + // MaxHandlers limits the number of http.Handler ServeHTTP goroutines + // which may run at a time over all connections. + // Negative or zero no limit. + // TODO: implement + MaxHandlers int + + // MaxConcurrentStreams optionally specifies the number of + // concurrent streams that each client may have open at a + // time. This is unrelated to the number of http.Handler goroutines + // which may be active globally, which is MaxHandlers. + // If zero, MaxConcurrentStreams defaults to at least 100, per + // the HTTP/2 spec's recommendations. + MaxConcurrentStreams uint32 + + // MaxReadFrameSize optionally specifies the largest frame + // this server is willing to read. A valid value is between + // 16k and 16M, inclusive. If zero or otherwise invalid, a + // default value is used. + MaxReadFrameSize uint32 + + // PermitProhibitedCipherSuites, if true, permits the use of + // cipher suites prohibited by the HTTP/2 spec. + PermitProhibitedCipherSuites bool +} + +func (s *Server) maxReadFrameSize() uint32 { + if v := s.MaxReadFrameSize; v >= minMaxFrameSize && v <= maxFrameSize { + return v + } + return defaultMaxReadFrameSize +} + +func (s *Server) maxConcurrentStreams() uint32 { + if v := s.MaxConcurrentStreams; v > 0 { + return v + } + return defaultMaxStreams +} + +// ConfigureServer adds HTTP/2 support to a net/http Server. +// +// The configuration conf may be nil. +// +// ConfigureServer must be called before s begins serving. +func ConfigureServer(s *http.Server, conf *Server) error { + if conf == nil { + conf = new(Server) + } + + if s.TLSConfig == nil { + s.TLSConfig = new(tls.Config) + } else if s.TLSConfig.CipherSuites != nil { + // If they already provided a CipherSuite list, return + // an error if it has a bad order or is missing + // ECDHE_RSA_WITH_AES_128_GCM_SHA256. + const requiredCipher = tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 + haveRequired := false + sawBad := false + for i, cs := range s.TLSConfig.CipherSuites { + if cs == requiredCipher { + haveRequired = true + } + if isBadCipher(cs) { + sawBad = true + } else if sawBad { + return fmt.Errorf("http2: TLSConfig.CipherSuites index %d contains an HTTP/2-approved cipher suite (%#04x), but it comes after unapproved cipher suites. With this configuration, clients that don't support previous, approved cipher suites may be given an unapproved one and reject the connection.", i, cs) + } + } + if !haveRequired { + return fmt.Errorf("http2: TLSConfig.CipherSuites is missing HTTP/2-required TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256") + } + } + + // Note: not setting MinVersion to tls.VersionTLS12, + // as we don't want to interfere with HTTP/1.1 traffic + // on the user's server. We enforce TLS 1.2 later once + // we accept a connection. Ideally this should be done + // during next-proto selection, but using TLS <1.2 with + // HTTP/2 is still the client's bug. + + s.TLSConfig.PreferServerCipherSuites = true + + haveNPN := false + for _, p := range s.TLSConfig.NextProtos { + if p == NextProtoTLS { + haveNPN = true + break + } + } + if !haveNPN { + s.TLSConfig.NextProtos = append(s.TLSConfig.NextProtos, NextProtoTLS) + } + // h2-14 is temporary (as of 2015-03-05) while we wait for all browsers + // to switch to "h2". + s.TLSConfig.NextProtos = append(s.TLSConfig.NextProtos, "h2-14") + + if s.TLSNextProto == nil { + s.TLSNextProto = map[string]func(*http.Server, *tls.Conn, http.Handler){} + } + protoHandler := func(hs *http.Server, c *tls.Conn, h http.Handler) { + if testHookOnConn != nil { + testHookOnConn() + } + conf.handleConn(hs, c, h) + } + s.TLSNextProto[NextProtoTLS] = protoHandler + s.TLSNextProto["h2-14"] = protoHandler // temporary; see above. + return nil +} + +func (srv *Server) handleConn(hs *http.Server, c net.Conn, h http.Handler) { + sc := &serverConn{ + srv: srv, + hs: hs, + conn: c, + remoteAddrStr: c.RemoteAddr().String(), + bw: newBufferedWriter(c), + handler: h, + streams: make(map[uint32]*stream), + readFrameCh: make(chan readFrameResult), + wantWriteFrameCh: make(chan frameWriteMsg, 8), + wroteFrameCh: make(chan frameWriteResult, 1), // buffered; one send in writeFrameAsync + bodyReadCh: make(chan bodyReadMsg), // buffering doesn't matter either way + doneServing: make(chan struct{}), + advMaxStreams: srv.maxConcurrentStreams(), + writeSched: writeScheduler{ + maxFrameSize: initialMaxFrameSize, + }, + initialWindowSize: initialWindowSize, + headerTableSize: initialHeaderTableSize, + serveG: newGoroutineLock(), + pushEnabled: true, + } + sc.flow.add(initialWindowSize) + sc.inflow.add(initialWindowSize) + sc.hpackEncoder = hpack.NewEncoder(&sc.headerWriteBuf) + sc.hpackDecoder = hpack.NewDecoder(initialHeaderTableSize, sc.onNewHeaderField) + sc.hpackDecoder.SetMaxStringLength(sc.maxHeaderStringLen()) + + fr := NewFramer(sc.bw, c) + fr.SetMaxReadFrameSize(srv.maxReadFrameSize()) + sc.framer = fr + + if tc, ok := c.(*tls.Conn); ok { + sc.tlsState = new(tls.ConnectionState) + *sc.tlsState = tc.ConnectionState() + // 9.2 Use of TLS Features + // An implementation of HTTP/2 over TLS MUST use TLS + // 1.2 or higher with the restrictions on feature set + // and cipher suite described in this section. Due to + // implementation limitations, it might not be + // possible to fail TLS negotiation. An endpoint MUST + // immediately terminate an HTTP/2 connection that + // does not meet the TLS requirements described in + // this section with a connection error (Section + // 5.4.1) of type INADEQUATE_SECURITY. + if sc.tlsState.Version < tls.VersionTLS12 { + sc.rejectConn(ErrCodeInadequateSecurity, "TLS version too low") + return + } + + if sc.tlsState.ServerName == "" { + // Client must use SNI, but we don't enforce that anymore, + // since it was causing problems when connecting to bare IP + // addresses during development. + // + // TODO: optionally enforce? Or enforce at the time we receive + // a new request, and verify the the ServerName matches the :authority? + // But that precludes proxy situations, perhaps. + // + // So for now, do nothing here again. + } + + if !srv.PermitProhibitedCipherSuites && isBadCipher(sc.tlsState.CipherSuite) { + // "Endpoints MAY choose to generate a connection error + // (Section 5.4.1) of type INADEQUATE_SECURITY if one of + // the prohibited cipher suites are negotiated." + // + // We choose that. In my opinion, the spec is weak + // here. It also says both parties must support at least + // TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 so there's no + // excuses here. If we really must, we could allow an + // "AllowInsecureWeakCiphers" option on the server later. + // Let's see how it plays out first. + sc.rejectConn(ErrCodeInadequateSecurity, fmt.Sprintf("Prohibited TLS 1.2 Cipher Suite: %x", sc.tlsState.CipherSuite)) + return + } + } + + if hook := testHookGetServerConn; hook != nil { + hook(sc) + } + sc.serve() +} + +// isBadCipher reports whether the cipher is blacklisted by the HTTP/2 spec. +func isBadCipher(cipher uint16) bool { + switch cipher { + case tls.TLS_RSA_WITH_RC4_128_SHA, + tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA, + tls.TLS_RSA_WITH_AES_128_CBC_SHA, + tls.TLS_RSA_WITH_AES_256_CBC_SHA, + tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, + tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, + tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, + tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA, + tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, + tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, + tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA: + // Reject cipher suites from Appendix A. + // "This list includes those cipher suites that do not + // offer an ephemeral key exchange and those that are + // based on the TLS null, stream or block cipher type" + return true + default: + return false + } +} + +func (sc *serverConn) rejectConn(err ErrCode, debug string) { + sc.vlogf("REJECTING conn: %v, %s", err, debug) + // ignoring errors. hanging up anyway. + sc.framer.WriteGoAway(0, err, []byte(debug)) + sc.bw.Flush() + sc.conn.Close() +} + +type serverConn struct { + // Immutable: + srv *Server + hs *http.Server + conn net.Conn + bw *bufferedWriter // writing to conn + handler http.Handler + framer *Framer + hpackDecoder *hpack.Decoder + doneServing chan struct{} // closed when serverConn.serve ends + readFrameCh chan readFrameResult // written by serverConn.readFrames + wantWriteFrameCh chan frameWriteMsg // from handlers -> serve + wroteFrameCh chan frameWriteResult // from writeFrameAsync -> serve, tickles more frame writes + bodyReadCh chan bodyReadMsg // from handlers -> serve + testHookCh chan func(int) // code to run on the serve loop + flow flow // conn-wide (not stream-specific) outbound flow control + inflow flow // conn-wide inbound flow control + tlsState *tls.ConnectionState // shared by all handlers, like net/http + remoteAddrStr string + + // Everything following is owned by the serve loop; use serveG.check(): + serveG goroutineLock // used to verify funcs are on serve() + pushEnabled bool + sawFirstSettings bool // got the initial SETTINGS frame after the preface + needToSendSettingsAck bool + unackedSettings int // how many SETTINGS have we sent without ACKs? + clientMaxStreams uint32 // SETTINGS_MAX_CONCURRENT_STREAMS from client (our PUSH_PROMISE limit) + advMaxStreams uint32 // our SETTINGS_MAX_CONCURRENT_STREAMS advertised the client + curOpenStreams uint32 // client's number of open streams + maxStreamID uint32 // max ever seen + streams map[uint32]*stream + initialWindowSize int32 + headerTableSize uint32 + peerMaxHeaderListSize uint32 // zero means unknown (default) + canonHeader map[string]string // http2-lower-case -> Go-Canonical-Case + req requestParam // non-zero while reading request headers + writingFrame bool // started write goroutine but haven't heard back on wroteFrameCh + needsFrameFlush bool // last frame write wasn't a flush + writeSched writeScheduler + inGoAway bool // we've started to or sent GOAWAY + needToSendGoAway bool // we need to schedule a GOAWAY frame write + goAwayCode ErrCode + shutdownTimerCh <-chan time.Time // nil until used + shutdownTimer *time.Timer // nil until used + + // Owned by the writeFrameAsync goroutine: + headerWriteBuf bytes.Buffer + hpackEncoder *hpack.Encoder +} + +func (sc *serverConn) maxHeaderStringLen() int { + v := sc.maxHeaderListSize() + if uint32(int(v)) == v { + return int(v) + } + // They had a crazy big number for MaxHeaderBytes anyway, + // so give them unlimited header lengths: + return 0 +} + +func (sc *serverConn) maxHeaderListSize() uint32 { + n := sc.hs.MaxHeaderBytes + if n <= 0 { + n = http.DefaultMaxHeaderBytes + } + // http2's count is in a slightly different unit and includes 32 bytes per pair. + // So, take the net/http.Server value and pad it up a bit, assuming 10 headers. + const perFieldOverhead = 32 // per http2 spec + const typicalHeaders = 10 // conservative + return uint32(n + typicalHeaders*perFieldOverhead) +} + +// requestParam is the state of the next request, initialized over +// potentially several frames HEADERS + zero or more CONTINUATION +// frames. +type requestParam struct { + // stream is non-nil if we're reading (HEADER or CONTINUATION) + // frames for a request (but not DATA). + stream *stream + header http.Header + method, path string + scheme, authority string + sawRegularHeader bool // saw a non-pseudo header already + invalidHeader bool // an invalid header was seen + headerListSize int64 // actually uint32, but easier math this way +} + +// stream represents a stream. This is the minimal metadata needed by +// the serve goroutine. Most of the actual stream state is owned by +// the http.Handler's goroutine in the responseWriter. Because the +// responseWriter's responseWriterState is recycled at the end of a +// handler, this struct intentionally has no pointer to the +// *responseWriter{,State} itself, as the Handler ending nils out the +// responseWriter's state field. +type stream struct { + // immutable: + id uint32 + body *pipe // non-nil if expecting DATA frames + cw closeWaiter // closed wait stream transitions to closed state + + // owned by serverConn's serve loop: + bodyBytes int64 // body bytes seen so far + declBodyBytes int64 // or -1 if undeclared + flow flow // limits writing from Handler to client + inflow flow // what the client is allowed to POST/etc to us + parent *stream // or nil + weight uint8 + state streamState + sentReset bool // only true once detached from streams map + gotReset bool // only true once detacted from streams map +} + +func (sc *serverConn) Framer() *Framer { return sc.framer } +func (sc *serverConn) CloseConn() error { return sc.conn.Close() } +func (sc *serverConn) Flush() error { return sc.bw.Flush() } +func (sc *serverConn) HeaderEncoder() (*hpack.Encoder, *bytes.Buffer) { + return sc.hpackEncoder, &sc.headerWriteBuf +} + +func (sc *serverConn) state(streamID uint32) (streamState, *stream) { + sc.serveG.check() + // http://http2.github.io/http2-spec/#rfc.section.5.1 + if st, ok := sc.streams[streamID]; ok { + return st.state, st + } + // "The first use of a new stream identifier implicitly closes all + // streams in the "idle" state that might have been initiated by + // that peer with a lower-valued stream identifier. For example, if + // a client sends a HEADERS frame on stream 7 without ever sending a + // frame on stream 5, then stream 5 transitions to the "closed" + // state when the first frame for stream 7 is sent or received." + if streamID <= sc.maxStreamID { + return stateClosed, nil + } + return stateIdle, nil +} + +// setConnState calls the net/http ConnState hook for this connection, if configured. +// Note that the net/http package does StateNew and StateClosed for us. +// There is currently no plan for StateHijacked or hijacking HTTP/2 connections. +func (sc *serverConn) setConnState(state http.ConnState) { + if sc.hs.ConnState != nil { + sc.hs.ConnState(sc.conn, state) + } +} + +func (sc *serverConn) vlogf(format string, args ...interface{}) { + if VerboseLogs { + sc.logf(format, args...) + } +} + +func (sc *serverConn) logf(format string, args ...interface{}) { + if lg := sc.hs.ErrorLog; lg != nil { + lg.Printf(format, args...) + } else { + log.Printf(format, args...) + } +} + +func (sc *serverConn) condlogf(err error, format string, args ...interface{}) { + if err == nil { + return + } + str := err.Error() + if err == io.EOF || strings.Contains(str, "use of closed network connection") { + // Boring, expected errors. + sc.vlogf(format, args...) + } else { + sc.logf(format, args...) + } +} + +func (sc *serverConn) onNewHeaderField(f hpack.HeaderField) { + sc.serveG.check() + sc.vlogf("got header field %+v", f) + switch { + case !validHeader(f.Name): + sc.req.invalidHeader = true + case strings.HasPrefix(f.Name, ":"): + if sc.req.sawRegularHeader { + sc.logf("pseudo-header after regular header") + sc.req.invalidHeader = true + return + } + var dst *string + switch f.Name { + case ":method": + dst = &sc.req.method + case ":path": + dst = &sc.req.path + case ":scheme": + dst = &sc.req.scheme + case ":authority": + dst = &sc.req.authority + default: + // 8.1.2.1 Pseudo-Header Fields + // "Endpoints MUST treat a request or response + // that contains undefined or invalid + // pseudo-header fields as malformed (Section + // 8.1.2.6)." + sc.logf("invalid pseudo-header %q", f.Name) + sc.req.invalidHeader = true + return + } + if *dst != "" { + sc.logf("duplicate pseudo-header %q sent", f.Name) + sc.req.invalidHeader = true + return + } + *dst = f.Value + default: + sc.req.sawRegularHeader = true + sc.req.header.Add(sc.canonicalHeader(f.Name), f.Value) + const headerFieldOverhead = 32 // per spec + sc.req.headerListSize += int64(len(f.Name)) + int64(len(f.Value)) + headerFieldOverhead + if sc.req.headerListSize > int64(sc.maxHeaderListSize()) { + sc.hpackDecoder.SetEmitEnabled(false) + } + } +} + +func (sc *serverConn) canonicalHeader(v string) string { + sc.serveG.check() + cv, ok := commonCanonHeader[v] + if ok { + return cv + } + cv, ok = sc.canonHeader[v] + if ok { + return cv + } + if sc.canonHeader == nil { + sc.canonHeader = make(map[string]string) + } + cv = http.CanonicalHeaderKey(v) + sc.canonHeader[v] = cv + return cv +} + +type readFrameResult struct { + f Frame // valid until readMore is called + err error + + // readMore should be called once the consumer no longer needs or + // retains f. After readMore, f is invalid and more frames can be + // read. + readMore func() +} + +// readFrames is the loop that reads incoming frames. +// It takes care to only read one frame at a time, blocking until the +// consumer is done with the frame. +// It's run on its own goroutine. +func (sc *serverConn) readFrames() { + gate := make(gate) + for { + f, err := sc.framer.ReadFrame() + select { + case sc.readFrameCh <- readFrameResult{f, err, gate.Done}: + case <-sc.doneServing: + return + } + select { + case <-gate: + case <-sc.doneServing: + return + } + } +} + +// frameWriteResult is the message passed from writeFrameAsync to the serve goroutine. +type frameWriteResult struct { + wm frameWriteMsg // what was written (or attempted) + err error // result of the writeFrame call +} + +// writeFrameAsync runs in its own goroutine and writes a single frame +// and then reports when it's done. +// At most one goroutine can be running writeFrameAsync at a time per +// serverConn. +func (sc *serverConn) writeFrameAsync(wm frameWriteMsg) { + err := wm.write.writeFrame(sc) + sc.wroteFrameCh <- frameWriteResult{wm, err} +} + +func (sc *serverConn) closeAllStreamsOnConnClose() { + sc.serveG.check() + for _, st := range sc.streams { + sc.closeStream(st, errClientDisconnected) + } +} + +func (sc *serverConn) stopShutdownTimer() { + sc.serveG.check() + if t := sc.shutdownTimer; t != nil { + t.Stop() + } +} + +func (sc *serverConn) notePanic() { + if testHookOnPanicMu != nil { + testHookOnPanicMu.Lock() + defer testHookOnPanicMu.Unlock() + } + if testHookOnPanic != nil { + if e := recover(); e != nil { + if testHookOnPanic(sc, e) { + panic(e) + } + } + } +} + +func (sc *serverConn) serve() { + sc.serveG.check() + defer sc.notePanic() + defer sc.conn.Close() + defer sc.closeAllStreamsOnConnClose() + defer sc.stopShutdownTimer() + defer close(sc.doneServing) // unblocks handlers trying to send + + sc.vlogf("HTTP/2 connection from %v on %p", sc.conn.RemoteAddr(), sc.hs) + + sc.writeFrame(frameWriteMsg{ + write: writeSettings{ + {SettingMaxFrameSize, sc.srv.maxReadFrameSize()}, + {SettingMaxConcurrentStreams, sc.advMaxStreams}, + {SettingMaxHeaderListSize, sc.maxHeaderListSize()}, + + // TODO: more actual settings, notably + // SettingInitialWindowSize, but then we also + // want to bump up the conn window size the + // same amount here right after the settings + }, + }) + sc.unackedSettings++ + + if err := sc.readPreface(); err != nil { + sc.condlogf(err, "error reading preface from client %v: %v", sc.conn.RemoteAddr(), err) + return + } + // Now that we've got the preface, get us out of the + // "StateNew" state. We can't go directly to idle, though. + // Active means we read some data and anticipate a request. We'll + // do another Active when we get a HEADERS frame. + sc.setConnState(http.StateActive) + sc.setConnState(http.StateIdle) + + go sc.readFrames() // closed by defer sc.conn.Close above + + settingsTimer := time.NewTimer(firstSettingsTimeout) + loopNum := 0 + for { + loopNum++ + select { + case wm := <-sc.wantWriteFrameCh: + sc.writeFrame(wm) + case res := <-sc.wroteFrameCh: + sc.wroteFrame(res) + case res := <-sc.readFrameCh: + if !sc.processFrameFromReader(res) { + return + } + res.readMore() + if settingsTimer.C != nil { + settingsTimer.Stop() + settingsTimer.C = nil + } + case m := <-sc.bodyReadCh: + sc.noteBodyRead(m.st, m.n) + case <-settingsTimer.C: + sc.logf("timeout waiting for SETTINGS frames from %v", sc.conn.RemoteAddr()) + return + case <-sc.shutdownTimerCh: + sc.vlogf("GOAWAY close timer fired; closing conn from %v", sc.conn.RemoteAddr()) + return + case fn := <-sc.testHookCh: + fn(loopNum) + } + } +} + +// readPreface reads the ClientPreface greeting from the peer +// or returns an error on timeout or an invalid greeting. +func (sc *serverConn) readPreface() error { + errc := make(chan error, 1) + go func() { + // Read the client preface + buf := make([]byte, len(ClientPreface)) + if _, err := io.ReadFull(sc.conn, buf); err != nil { + errc <- err + } else if !bytes.Equal(buf, clientPreface) { + errc <- fmt.Errorf("bogus greeting %q", buf) + } else { + errc <- nil + } + }() + timer := time.NewTimer(prefaceTimeout) // TODO: configurable on *Server? + defer timer.Stop() + select { + case <-timer.C: + return errors.New("timeout waiting for client preface") + case err := <-errc: + if err == nil { + sc.vlogf("client %v said hello", sc.conn.RemoteAddr()) + } + return err + } +} + +var errChanPool = sync.Pool{ + New: func() interface{} { return make(chan error, 1) }, +} + +var writeDataPool = sync.Pool{ + New: func() interface{} { return new(writeData) }, +} + +// writeDataFromHandler writes DATA response frames from a handler on +// the given stream. +func (sc *serverConn) writeDataFromHandler(stream *stream, data []byte, endStream bool) error { + ch := errChanPool.Get().(chan error) + writeArg := writeDataPool.Get().(*writeData) + *writeArg = writeData{stream.id, data, endStream} + err := sc.writeFrameFromHandler(frameWriteMsg{ + write: writeArg, + stream: stream, + done: ch, + }) + if err != nil { + return err + } + var frameWriteDone bool // the frame write is done (successfully or not) + select { + case err = <-ch: + frameWriteDone = true + case <-sc.doneServing: + return errClientDisconnected + case <-stream.cw: + // If both ch and stream.cw were ready (as might + // happen on the final Write after an http.Handler + // ends), prefer the write result. Otherwise this + // might just be us successfully closing the stream. + // The writeFrameAsync and serve goroutines guarantee + // that the ch send will happen before the stream.cw + // close. + select { + case err = <-ch: + frameWriteDone = true + default: + return errStreamClosed + } + } + errChanPool.Put(ch) + if frameWriteDone { + writeDataPool.Put(writeArg) + } + return err +} + +// writeFrameFromHandler sends wm to sc.wantWriteFrameCh, but aborts +// if the connection has gone away. +// +// This must not be run from the serve goroutine itself, else it might +// deadlock writing to sc.wantWriteFrameCh (which is only mildly +// buffered and is read by serve itself). If you're on the serve +// goroutine, call writeFrame instead. +func (sc *serverConn) writeFrameFromHandler(wm frameWriteMsg) error { + sc.serveG.checkNotOn() // NOT + select { + case sc.wantWriteFrameCh <- wm: + return nil + case <-sc.doneServing: + // Serve loop is gone. + // Client has closed their connection to the server. + return errClientDisconnected + } +} + +// writeFrame schedules a frame to write and sends it if there's nothing +// already being written. +// +// There is no pushback here (the serve goroutine never blocks). It's +// the http.Handlers that block, waiting for their previous frames to +// make it onto the wire +// +// If you're not on the serve goroutine, use writeFrameFromHandler instead. +func (sc *serverConn) writeFrame(wm frameWriteMsg) { + sc.serveG.check() + sc.writeSched.add(wm) + sc.scheduleFrameWrite() +} + +// startFrameWrite starts a goroutine to write wm (in a separate +// goroutine since that might block on the network), and updates the +// serve goroutine's state about the world, updated from info in wm. +func (sc *serverConn) startFrameWrite(wm frameWriteMsg) { + sc.serveG.check() + if sc.writingFrame { + panic("internal error: can only be writing one frame at a time") + } + + st := wm.stream + if st != nil { + switch st.state { + case stateHalfClosedLocal: + panic("internal error: attempt to send frame on half-closed-local stream") + case stateClosed: + if st.sentReset || st.gotReset { + // Skip this frame. + sc.scheduleFrameWrite() + return + } + panic(fmt.Sprintf("internal error: attempt to send a write %v on a closed stream", wm)) + } + } + + sc.writingFrame = true + sc.needsFrameFlush = true + go sc.writeFrameAsync(wm) +} + +// wroteFrame is called on the serve goroutine with the result of +// whatever happened on writeFrameAsync. +func (sc *serverConn) wroteFrame(res frameWriteResult) { + sc.serveG.check() + if !sc.writingFrame { + panic("internal error: expected to be already writing a frame") + } + sc.writingFrame = false + + wm := res.wm + st := wm.stream + + closeStream := endsStream(wm.write) + + // Reply (if requested) to the blocked ServeHTTP goroutine. + if ch := wm.done; ch != nil { + select { + case ch <- res.err: + default: + panic(fmt.Sprintf("unbuffered done channel passed in for type %T", wm.write)) + } + } + wm.write = nil // prevent use (assume it's tainted after wm.done send) + + if closeStream { + if st == nil { + panic("internal error: expecting non-nil stream") + } + switch st.state { + case stateOpen: + // Here we would go to stateHalfClosedLocal in + // theory, but since our handler is done and + // the net/http package provides no mechanism + // for finishing writing to a ResponseWriter + // while still reading data (see possible TODO + // at top of this file), we go into closed + // state here anyway, after telling the peer + // we're hanging up on them. + st.state = stateHalfClosedLocal // won't last long, but necessary for closeStream via resetStream + errCancel := StreamError{st.id, ErrCodeCancel} + sc.resetStream(errCancel) + case stateHalfClosedRemote: + sc.closeStream(st, errHandlerComplete) + } + } + + sc.scheduleFrameWrite() +} + +// scheduleFrameWrite tickles the frame writing scheduler. +// +// If a frame is already being written, nothing happens. This will be called again +// when the frame is done being written. +// +// If a frame isn't being written we need to send one, the best frame +// to send is selected, preferring first things that aren't +// stream-specific (e.g. ACKing settings), and then finding the +// highest priority stream. +// +// If a frame isn't being written and there's nothing else to send, we +// flush the write buffer. +func (sc *serverConn) scheduleFrameWrite() { + sc.serveG.check() + if sc.writingFrame { + return + } + if sc.needToSendGoAway { + sc.needToSendGoAway = false + sc.startFrameWrite(frameWriteMsg{ + write: &writeGoAway{ + maxStreamID: sc.maxStreamID, + code: sc.goAwayCode, + }, + }) + return + } + if sc.needToSendSettingsAck { + sc.needToSendSettingsAck = false + sc.startFrameWrite(frameWriteMsg{write: writeSettingsAck{}}) + return + } + if !sc.inGoAway { + if wm, ok := sc.writeSched.take(); ok { + sc.startFrameWrite(wm) + return + } + } + if sc.needsFrameFlush { + sc.startFrameWrite(frameWriteMsg{write: flushFrameWriter{}}) + sc.needsFrameFlush = false // after startFrameWrite, since it sets this true + return + } +} + +func (sc *serverConn) goAway(code ErrCode) { + sc.serveG.check() + if sc.inGoAway { + return + } + if code != ErrCodeNo { + sc.shutDownIn(250 * time.Millisecond) + } else { + // TODO: configurable + sc.shutDownIn(1 * time.Second) + } + sc.inGoAway = true + sc.needToSendGoAway = true + sc.goAwayCode = code + sc.scheduleFrameWrite() +} + +func (sc *serverConn) shutDownIn(d time.Duration) { + sc.serveG.check() + sc.shutdownTimer = time.NewTimer(d) + sc.shutdownTimerCh = sc.shutdownTimer.C +} + +func (sc *serverConn) resetStream(se StreamError) { + sc.serveG.check() + sc.writeFrame(frameWriteMsg{write: se}) + if st, ok := sc.streams[se.StreamID]; ok { + st.sentReset = true + sc.closeStream(st, se) + } +} + +// curHeaderStreamID returns the stream ID of the header block we're +// currently in the middle of reading. If this returns non-zero, the +// next frame must be a CONTINUATION with this stream id. +func (sc *serverConn) curHeaderStreamID() uint32 { + sc.serveG.check() + st := sc.req.stream + if st == nil { + return 0 + } + return st.id +} + +// processFrameFromReader processes the serve loop's read from readFrameCh from the +// frame-reading goroutine. +// processFrameFromReader returns whether the connection should be kept open. +func (sc *serverConn) processFrameFromReader(res readFrameResult) bool { + sc.serveG.check() + err := res.err + if err != nil { + if err == ErrFrameTooLarge { + sc.goAway(ErrCodeFrameSize) + return true // goAway will close the loop + } + clientGone := err == io.EOF || strings.Contains(err.Error(), "use of closed network connection") + if clientGone { + // TODO: could we also get into this state if + // the peer does a half close + // (e.g. CloseWrite) because they're done + // sending frames but they're still wanting + // our open replies? Investigate. + // TODO: add CloseWrite to crypto/tls.Conn first + // so we have a way to test this? I suppose + // just for testing we could have a non-TLS mode. + return false + } + } else { + f := res.f + sc.vlogf("got %v: %#v", f.Header(), f) + err = sc.processFrame(f) + if err == nil { + return true + } + } + + switch ev := err.(type) { + case StreamError: + sc.resetStream(ev) + return true + case goAwayFlowError: + sc.goAway(ErrCodeFlowControl) + return true + case ConnectionError: + sc.logf("%v: %v", sc.conn.RemoteAddr(), ev) + sc.goAway(ErrCode(ev)) + return true // goAway will handle shutdown + default: + if res.err != nil { + sc.logf("disconnecting; error reading frame from client %s: %v", sc.conn.RemoteAddr(), err) + } else { + sc.logf("disconnection due to other error: %v", err) + } + return false + } +} + +func (sc *serverConn) processFrame(f Frame) error { + sc.serveG.check() + + // First frame received must be SETTINGS. + if !sc.sawFirstSettings { + if _, ok := f.(*SettingsFrame); !ok { + return ConnectionError(ErrCodeProtocol) + } + sc.sawFirstSettings = true + } + + if s := sc.curHeaderStreamID(); s != 0 { + if cf, ok := f.(*ContinuationFrame); !ok { + return ConnectionError(ErrCodeProtocol) + } else if cf.Header().StreamID != s { + return ConnectionError(ErrCodeProtocol) + } + } + + switch f := f.(type) { + case *SettingsFrame: + return sc.processSettings(f) + case *HeadersFrame: + return sc.processHeaders(f) + case *ContinuationFrame: + return sc.processContinuation(f) + case *WindowUpdateFrame: + return sc.processWindowUpdate(f) + case *PingFrame: + return sc.processPing(f) + case *DataFrame: + return sc.processData(f) + case *RSTStreamFrame: + return sc.processResetStream(f) + case *PriorityFrame: + return sc.processPriority(f) + case *PushPromiseFrame: + // A client cannot push. Thus, servers MUST treat the receipt of a PUSH_PROMISE + // frame as a connection error (Section 5.4.1) of type PROTOCOL_ERROR. + return ConnectionError(ErrCodeProtocol) + default: + sc.vlogf("Ignoring frame: %v", f.Header()) + return nil + } +} + +func (sc *serverConn) processPing(f *PingFrame) error { + sc.serveG.check() + if f.IsAck() { + // 6.7 PING: " An endpoint MUST NOT respond to PING frames + // containing this flag." + return nil + } + if f.StreamID != 0 { + // "PING frames are not associated with any individual + // stream. If a PING frame is received with a stream + // identifier field value other than 0x0, the recipient MUST + // respond with a connection error (Section 5.4.1) of type + // PROTOCOL_ERROR." + return ConnectionError(ErrCodeProtocol) + } + sc.writeFrame(frameWriteMsg{write: writePingAck{f}}) + return nil +} + +func (sc *serverConn) processWindowUpdate(f *WindowUpdateFrame) error { + sc.serveG.check() + switch { + case f.StreamID != 0: // stream-level flow control + st := sc.streams[f.StreamID] + if st == nil { + // "WINDOW_UPDATE can be sent by a peer that has sent a + // frame bearing the END_STREAM flag. This means that a + // receiver could receive a WINDOW_UPDATE frame on a "half + // closed (remote)" or "closed" stream. A receiver MUST + // NOT treat this as an error, see Section 5.1." + return nil + } + if !st.flow.add(int32(f.Increment)) { + return StreamError{f.StreamID, ErrCodeFlowControl} + } + default: // connection-level flow control + if !sc.flow.add(int32(f.Increment)) { + return goAwayFlowError{} + } + } + sc.scheduleFrameWrite() + return nil +} + +func (sc *serverConn) processResetStream(f *RSTStreamFrame) error { + sc.serveG.check() + + state, st := sc.state(f.StreamID) + if state == stateIdle { + // 6.4 "RST_STREAM frames MUST NOT be sent for a + // stream in the "idle" state. If a RST_STREAM frame + // identifying an idle stream is received, the + // recipient MUST treat this as a connection error + // (Section 5.4.1) of type PROTOCOL_ERROR. + return ConnectionError(ErrCodeProtocol) + } + if st != nil { + st.gotReset = true + sc.closeStream(st, StreamError{f.StreamID, f.ErrCode}) + } + return nil +} + +func (sc *serverConn) closeStream(st *stream, err error) { + sc.serveG.check() + if st.state == stateIdle || st.state == stateClosed { + panic(fmt.Sprintf("invariant; can't close stream in state %v", st.state)) + } + st.state = stateClosed + sc.curOpenStreams-- + if sc.curOpenStreams == 0 { + sc.setConnState(http.StateIdle) + } + delete(sc.streams, st.id) + if p := st.body; p != nil { + p.CloseWithError(err) + } + st.cw.Close() // signals Handler's CloseNotifier, unblocks writes, etc + sc.writeSched.forgetStream(st.id) +} + +func (sc *serverConn) processSettings(f *SettingsFrame) error { + sc.serveG.check() + if f.IsAck() { + sc.unackedSettings-- + if sc.unackedSettings < 0 { + // Why is the peer ACKing settings we never sent? + // The spec doesn't mention this case, but + // hang up on them anyway. + return ConnectionError(ErrCodeProtocol) + } + return nil + } + if err := f.ForeachSetting(sc.processSetting); err != nil { + return err + } + sc.needToSendSettingsAck = true + sc.scheduleFrameWrite() + return nil +} + +func (sc *serverConn) processSetting(s Setting) error { + sc.serveG.check() + if err := s.Valid(); err != nil { + return err + } + sc.vlogf("processing setting %v", s) + switch s.ID { + case SettingHeaderTableSize: + sc.headerTableSize = s.Val + sc.hpackEncoder.SetMaxDynamicTableSize(s.Val) + case SettingEnablePush: + sc.pushEnabled = s.Val != 0 + case SettingMaxConcurrentStreams: + sc.clientMaxStreams = s.Val + case SettingInitialWindowSize: + return sc.processSettingInitialWindowSize(s.Val) + case SettingMaxFrameSize: + sc.writeSched.maxFrameSize = s.Val + case SettingMaxHeaderListSize: + sc.peerMaxHeaderListSize = s.Val + default: + // Unknown setting: "An endpoint that receives a SETTINGS + // frame with any unknown or unsupported identifier MUST + // ignore that setting." + } + return nil +} + +func (sc *serverConn) processSettingInitialWindowSize(val uint32) error { + sc.serveG.check() + // Note: val already validated to be within range by + // processSetting's Valid call. + + // "A SETTINGS frame can alter the initial flow control window + // size for all current streams. When the value of + // SETTINGS_INITIAL_WINDOW_SIZE changes, a receiver MUST + // adjust the size of all stream flow control windows that it + // maintains by the difference between the new value and the + // old value." + old := sc.initialWindowSize + sc.initialWindowSize = int32(val) + growth := sc.initialWindowSize - old // may be negative + for _, st := range sc.streams { + if !st.flow.add(growth) { + // 6.9.2 Initial Flow Control Window Size + // "An endpoint MUST treat a change to + // SETTINGS_INITIAL_WINDOW_SIZE that causes any flow + // control window to exceed the maximum size as a + // connection error (Section 5.4.1) of type + // FLOW_CONTROL_ERROR." + return ConnectionError(ErrCodeFlowControl) + } + } + return nil +} + +func (sc *serverConn) processData(f *DataFrame) error { + sc.serveG.check() + // "If a DATA frame is received whose stream is not in "open" + // or "half closed (local)" state, the recipient MUST respond + // with a stream error (Section 5.4.2) of type STREAM_CLOSED." + id := f.Header().StreamID + st, ok := sc.streams[id] + if !ok || st.state != stateOpen { + // This includes sending a RST_STREAM if the stream is + // in stateHalfClosedLocal (which currently means that + // the http.Handler returned, so it's done reading & + // done writing). Try to stop the client from sending + // more DATA. + return StreamError{id, ErrCodeStreamClosed} + } + if st.body == nil { + panic("internal error: should have a body in this state") + } + data := f.Data() + + // Sender sending more than they'd declared? + if st.declBodyBytes != -1 && st.bodyBytes+int64(len(data)) > st.declBodyBytes { + st.body.CloseWithError(fmt.Errorf("sender tried to send more than declared Content-Length of %d bytes", st.declBodyBytes)) + return StreamError{id, ErrCodeStreamClosed} + } + if len(data) > 0 { + // Check whether the client has flow control quota. + if int(st.inflow.available()) < len(data) { + return StreamError{id, ErrCodeFlowControl} + } + st.inflow.take(int32(len(data))) + wrote, err := st.body.Write(data) + if err != nil { + return StreamError{id, ErrCodeStreamClosed} + } + if wrote != len(data) { + panic("internal error: bad Writer") + } + st.bodyBytes += int64(len(data)) + } + if f.StreamEnded() { + if st.declBodyBytes != -1 && st.declBodyBytes != st.bodyBytes { + st.body.CloseWithError(fmt.Errorf("request declared a Content-Length of %d but only wrote %d bytes", + st.declBodyBytes, st.bodyBytes)) + } else { + st.body.CloseWithError(io.EOF) + } + st.state = stateHalfClosedRemote + } + return nil +} + +func (sc *serverConn) processHeaders(f *HeadersFrame) error { + sc.serveG.check() + id := f.Header().StreamID + if sc.inGoAway { + // Ignore. + return nil + } + // http://http2.github.io/http2-spec/#rfc.section.5.1.1 + if id%2 != 1 || id <= sc.maxStreamID || sc.req.stream != nil { + // Streams initiated by a client MUST use odd-numbered + // stream identifiers. [...] The identifier of a newly + // established stream MUST be numerically greater than all + // streams that the initiating endpoint has opened or + // reserved. [...] An endpoint that receives an unexpected + // stream identifier MUST respond with a connection error + // (Section 5.4.1) of type PROTOCOL_ERROR. + return ConnectionError(ErrCodeProtocol) + } + if id > sc.maxStreamID { + sc.maxStreamID = id + } + st := &stream{ + id: id, + state: stateOpen, + } + if f.StreamEnded() { + st.state = stateHalfClosedRemote + } + st.cw.Init() + + st.flow.conn = &sc.flow // link to conn-level counter + st.flow.add(sc.initialWindowSize) + st.inflow.conn = &sc.inflow // link to conn-level counter + st.inflow.add(initialWindowSize) // TODO: update this when we send a higher initial window size in the initial settings + + sc.streams[id] = st + if f.HasPriority() { + adjustStreamPriority(sc.streams, st.id, f.Priority) + } + sc.curOpenStreams++ + if sc.curOpenStreams == 1 { + sc.setConnState(http.StateActive) + } + sc.req = requestParam{ + stream: st, + header: make(http.Header), + } + sc.hpackDecoder.SetEmitEnabled(true) + return sc.processHeaderBlockFragment(st, f.HeaderBlockFragment(), f.HeadersEnded()) +} + +func (sc *serverConn) processContinuation(f *ContinuationFrame) error { + sc.serveG.check() + st := sc.streams[f.Header().StreamID] + if st == nil || sc.curHeaderStreamID() != st.id { + return ConnectionError(ErrCodeProtocol) + } + return sc.processHeaderBlockFragment(st, f.HeaderBlockFragment(), f.HeadersEnded()) +} + +func (sc *serverConn) processHeaderBlockFragment(st *stream, frag []byte, end bool) error { + sc.serveG.check() + if _, err := sc.hpackDecoder.Write(frag); err != nil { + return ConnectionError(ErrCodeCompression) + } + if !end { + return nil + } + if err := sc.hpackDecoder.Close(); err != nil { + return ConnectionError(ErrCodeCompression) + } + defer sc.resetPendingRequest() + if sc.curOpenStreams > sc.advMaxStreams { + // "Endpoints MUST NOT exceed the limit set by their + // peer. An endpoint that receives a HEADERS frame + // that causes their advertised concurrent stream + // limit to be exceeded MUST treat this as a stream + // error (Section 5.4.2) of type PROTOCOL_ERROR or + // REFUSED_STREAM." + if sc.unackedSettings == 0 { + // They should know better. + return StreamError{st.id, ErrCodeProtocol} + } + // Assume it's a network race, where they just haven't + // received our last SETTINGS update. But actually + // this can't happen yet, because we don't yet provide + // a way for users to adjust server parameters at + // runtime. + return StreamError{st.id, ErrCodeRefusedStream} + } + + rw, req, err := sc.newWriterAndRequest() + if err != nil { + return err + } + st.body = req.Body.(*requestBody).pipe // may be nil + st.declBodyBytes = req.ContentLength + + handler := sc.handler.ServeHTTP + if !sc.hpackDecoder.EmitEnabled() { + // Their header list was too long. Send a 431 error. + handler = handleHeaderListTooLong + } + + go sc.runHandler(rw, req, handler) + return nil +} + +func (sc *serverConn) processPriority(f *PriorityFrame) error { + adjustStreamPriority(sc.streams, f.StreamID, f.PriorityParam) + return nil +} + +func adjustStreamPriority(streams map[uint32]*stream, streamID uint32, priority PriorityParam) { + st, ok := streams[streamID] + if !ok { + // TODO: not quite correct (this streamID might + // already exist in the dep tree, but be closed), but + // close enough for now. + return + } + st.weight = priority.Weight + parent := streams[priority.StreamDep] // might be nil + if parent == st { + // if client tries to set this stream to be the parent of itself + // ignore and keep going + return + } + + // section 5.3.3: If a stream is made dependent on one of its + // own dependencies, the formerly dependent stream is first + // moved to be dependent on the reprioritized stream's previous + // parent. The moved dependency retains its weight. + for piter := parent; piter != nil; piter = piter.parent { + if piter == st { + parent.parent = st.parent + break + } + } + st.parent = parent + if priority.Exclusive && (st.parent != nil || priority.StreamDep == 0) { + for _, openStream := range streams { + if openStream != st && openStream.parent == st.parent { + openStream.parent = st + } + } + } +} + +// resetPendingRequest zeros out all state related to a HEADERS frame +// and its zero or more CONTINUATION frames sent to start a new +// request. +func (sc *serverConn) resetPendingRequest() { + sc.serveG.check() + sc.req = requestParam{} +} + +func (sc *serverConn) newWriterAndRequest() (*responseWriter, *http.Request, error) { + sc.serveG.check() + rp := &sc.req + if rp.invalidHeader || rp.method == "" || rp.path == "" || + (rp.scheme != "https" && rp.scheme != "http") { + // See 8.1.2.6 Malformed Requests and Responses: + // + // Malformed requests or responses that are detected + // MUST be treated as a stream error (Section 5.4.2) + // of type PROTOCOL_ERROR." + // + // 8.1.2.3 Request Pseudo-Header Fields + // "All HTTP/2 requests MUST include exactly one valid + // value for the :method, :scheme, and :path + // pseudo-header fields" + return nil, nil, StreamError{rp.stream.id, ErrCodeProtocol} + } + var tlsState *tls.ConnectionState // nil if not scheme https + if rp.scheme == "https" { + tlsState = sc.tlsState + } + authority := rp.authority + if authority == "" { + authority = rp.header.Get("Host") + } + needsContinue := rp.header.Get("Expect") == "100-continue" + if needsContinue { + rp.header.Del("Expect") + } + // Merge Cookie headers into one "; "-delimited value. + if cookies := rp.header["Cookie"]; len(cookies) > 1 { + rp.header.Set("Cookie", strings.Join(cookies, "; ")) + } + bodyOpen := rp.stream.state == stateOpen + body := &requestBody{ + conn: sc, + stream: rp.stream, + needsContinue: needsContinue, + } + // TODO: handle asterisk '*' requests + test + url, err := url.ParseRequestURI(rp.path) + if err != nil { + // TODO: find the right error code? + return nil, nil, StreamError{rp.stream.id, ErrCodeProtocol} + } + req := &http.Request{ + Method: rp.method, + URL: url, + RemoteAddr: sc.remoteAddrStr, + Header: rp.header, + RequestURI: rp.path, + Proto: "HTTP/2.0", + ProtoMajor: 2, + ProtoMinor: 0, + TLS: tlsState, + Host: authority, + Body: body, + } + if bodyOpen { + body.pipe = &pipe{ + b: &fixedBuffer{buf: make([]byte, initialWindowSize)}, // TODO: share/remove XXX + } + + if vv, ok := rp.header["Content-Length"]; ok { + req.ContentLength, _ = strconv.ParseInt(vv[0], 10, 64) + } else { + req.ContentLength = -1 + } + } + + rws := responseWriterStatePool.Get().(*responseWriterState) + bwSave := rws.bw + *rws = responseWriterState{} // zero all the fields + rws.conn = sc + rws.bw = bwSave + rws.bw.Reset(chunkWriter{rws}) + rws.stream = rp.stream + rws.req = req + rws.body = body + + rw := &responseWriter{rws: rws} + return rw, req, nil +} + +// Run on its own goroutine. +func (sc *serverConn) runHandler(rw *responseWriter, req *http.Request, handler func(http.ResponseWriter, *http.Request)) { + defer rw.handlerDone() + // TODO: catch panics like net/http.Server + handler(rw, req) +} + +func handleHeaderListTooLong(w http.ResponseWriter, r *http.Request) { + // 10.5.1 Limits on Header Block Size: + // .. "A server that receives a larger header block than it is + // willing to handle can send an HTTP 431 (Request Header Fields Too + // Large) status code" + const statusRequestHeaderFieldsTooLarge = 431 // only in Go 1.6+ + w.WriteHeader(statusRequestHeaderFieldsTooLarge) + io.WriteString(w, "

    HTTP Error 431

    Request Header Field(s) Too Large

    ") +} + +// called from handler goroutines. +// h may be nil. +func (sc *serverConn) writeHeaders(st *stream, headerData *writeResHeaders) error { + sc.serveG.checkNotOn() // NOT on + var errc chan error + if headerData.h != nil { + // If there's a header map (which we don't own), so we have to block on + // waiting for this frame to be written, so an http.Flush mid-handler + // writes out the correct value of keys, before a handler later potentially + // mutates it. + errc = errChanPool.Get().(chan error) + } + if err := sc.writeFrameFromHandler(frameWriteMsg{ + write: headerData, + stream: st, + done: errc, + }); err != nil { + return err + } + if errc != nil { + select { + case err := <-errc: + errChanPool.Put(errc) + return err + case <-sc.doneServing: + return errClientDisconnected + case <-st.cw: + return errStreamClosed + } + } + return nil +} + +// called from handler goroutines. +func (sc *serverConn) write100ContinueHeaders(st *stream) { + sc.writeFrameFromHandler(frameWriteMsg{ + write: write100ContinueHeadersFrame{st.id}, + stream: st, + }) +} + +// A bodyReadMsg tells the server loop that the http.Handler read n +// bytes of the DATA from the client on the given stream. +type bodyReadMsg struct { + st *stream + n int +} + +// called from handler goroutines. +// Notes that the handler for the given stream ID read n bytes of its body +// and schedules flow control tokens to be sent. +func (sc *serverConn) noteBodyReadFromHandler(st *stream, n int) { + sc.serveG.checkNotOn() // NOT on + select { + case sc.bodyReadCh <- bodyReadMsg{st, n}: + case <-sc.doneServing: + } +} + +func (sc *serverConn) noteBodyRead(st *stream, n int) { + sc.serveG.check() + sc.sendWindowUpdate(nil, n) // conn-level + if st.state != stateHalfClosedRemote && st.state != stateClosed { + // Don't send this WINDOW_UPDATE if the stream is closed + // remotely. + sc.sendWindowUpdate(st, n) + } +} + +// st may be nil for conn-level +func (sc *serverConn) sendWindowUpdate(st *stream, n int) { + sc.serveG.check() + // "The legal range for the increment to the flow control + // window is 1 to 2^31-1 (2,147,483,647) octets." + // A Go Read call on 64-bit machines could in theory read + // a larger Read than this. Very unlikely, but we handle it here + // rather than elsewhere for now. + const maxUint31 = 1<<31 - 1 + for n >= maxUint31 { + sc.sendWindowUpdate32(st, maxUint31) + n -= maxUint31 + } + sc.sendWindowUpdate32(st, int32(n)) +} + +// st may be nil for conn-level +func (sc *serverConn) sendWindowUpdate32(st *stream, n int32) { + sc.serveG.check() + if n == 0 { + return + } + if n < 0 { + panic("negative update") + } + var streamID uint32 + if st != nil { + streamID = st.id + } + sc.writeFrame(frameWriteMsg{ + write: writeWindowUpdate{streamID: streamID, n: uint32(n)}, + stream: st, + }) + var ok bool + if st == nil { + ok = sc.inflow.add(n) + } else { + ok = st.inflow.add(n) + } + if !ok { + panic("internal error; sent too many window updates without decrements?") + } +} + +type requestBody struct { + stream *stream + conn *serverConn + closed bool + pipe *pipe // non-nil if we have a HTTP entity message body + needsContinue bool // need to send a 100-continue +} + +func (b *requestBody) Close() error { + if b.pipe != nil { + b.pipe.CloseWithError(errClosedBody) + } + b.closed = true + return nil +} + +func (b *requestBody) Read(p []byte) (n int, err error) { + if b.needsContinue { + b.needsContinue = false + b.conn.write100ContinueHeaders(b.stream) + } + if b.pipe == nil { + return 0, io.EOF + } + n, err = b.pipe.Read(p) + if n > 0 { + b.conn.noteBodyReadFromHandler(b.stream, n) + } + return +} + +// responseWriter is the http.ResponseWriter implementation. It's +// intentionally small (1 pointer wide) to minimize garbage. The +// responseWriterState pointer inside is zeroed at the end of a +// request (in handlerDone) and calls on the responseWriter thereafter +// simply crash (caller's mistake), but the much larger responseWriterState +// and buffers are reused between multiple requests. +type responseWriter struct { + rws *responseWriterState +} + +// Optional http.ResponseWriter interfaces implemented. +var ( + _ http.CloseNotifier = (*responseWriter)(nil) + _ http.Flusher = (*responseWriter)(nil) + _ stringWriter = (*responseWriter)(nil) +) + +type responseWriterState struct { + // immutable within a request: + stream *stream + req *http.Request + body *requestBody // to close at end of request, if DATA frames didn't + conn *serverConn + + // TODO: adjust buffer writing sizes based on server config, frame size updates from peer, etc + bw *bufio.Writer // writing to a chunkWriter{this *responseWriterState} + + // mutated by http.Handler goroutine: + handlerHeader http.Header // nil until called + snapHeader http.Header // snapshot of handlerHeader at WriteHeader time + status int // status code passed to WriteHeader + wroteHeader bool // WriteHeader called (explicitly or implicitly). Not necessarily sent to user yet. + sentHeader bool // have we sent the header frame? + handlerDone bool // handler has finished + + closeNotifierMu sync.Mutex // guards closeNotifierCh + closeNotifierCh chan bool // nil until first used +} + +type chunkWriter struct{ rws *responseWriterState } + +func (cw chunkWriter) Write(p []byte) (n int, err error) { return cw.rws.writeChunk(p) } + +// writeChunk writes chunks from the bufio.Writer. But because +// bufio.Writer may bypass its chunking, sometimes p may be +// arbitrarily large. +// +// writeChunk is also responsible (on the first chunk) for sending the +// HEADER response. +func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) { + if !rws.wroteHeader { + rws.writeHeader(200) + } + if !rws.sentHeader { + rws.sentHeader = true + var ctype, clen string // implicit ones, if we can calculate it + if rws.handlerDone && rws.snapHeader.Get("Content-Length") == "" { + clen = strconv.Itoa(len(p)) + } + if rws.snapHeader.Get("Content-Type") == "" { + ctype = http.DetectContentType(p) + } + endStream := rws.handlerDone && len(p) == 0 + err = rws.conn.writeHeaders(rws.stream, &writeResHeaders{ + streamID: rws.stream.id, + httpResCode: rws.status, + h: rws.snapHeader, + endStream: endStream, + contentType: ctype, + contentLength: clen, + }) + if err != nil { + return 0, err + } + if endStream { + return 0, nil + } + } + if len(p) == 0 && !rws.handlerDone { + return 0, nil + } + + if err := rws.conn.writeDataFromHandler(rws.stream, p, rws.handlerDone); err != nil { + return 0, err + } + return len(p), nil +} + +func (w *responseWriter) Flush() { + rws := w.rws + if rws == nil { + panic("Header called after Handler finished") + } + if rws.bw.Buffered() > 0 { + if err := rws.bw.Flush(); err != nil { + // Ignore the error. The frame writer already knows. + return + } + } else { + // The bufio.Writer won't call chunkWriter.Write + // (writeChunk with zero bytes, so we have to do it + // ourselves to force the HTTP response header and/or + // final DATA frame (with END_STREAM) to be sent. + rws.writeChunk(nil) + } +} + +func (w *responseWriter) CloseNotify() <-chan bool { + rws := w.rws + if rws == nil { + panic("CloseNotify called after Handler finished") + } + rws.closeNotifierMu.Lock() + ch := rws.closeNotifierCh + if ch == nil { + ch = make(chan bool, 1) + rws.closeNotifierCh = ch + go func() { + rws.stream.cw.Wait() // wait for close + ch <- true + }() + } + rws.closeNotifierMu.Unlock() + return ch +} + +func (w *responseWriter) Header() http.Header { + rws := w.rws + if rws == nil { + panic("Header called after Handler finished") + } + if rws.handlerHeader == nil { + rws.handlerHeader = make(http.Header) + } + return rws.handlerHeader +} + +func (w *responseWriter) WriteHeader(code int) { + rws := w.rws + if rws == nil { + panic("WriteHeader called after Handler finished") + } + rws.writeHeader(code) +} + +func (rws *responseWriterState) writeHeader(code int) { + if !rws.wroteHeader { + rws.wroteHeader = true + rws.status = code + if len(rws.handlerHeader) > 0 { + rws.snapHeader = cloneHeader(rws.handlerHeader) + } + } +} + +func cloneHeader(h http.Header) http.Header { + h2 := make(http.Header, len(h)) + for k, vv := range h { + vv2 := make([]string, len(vv)) + copy(vv2, vv) + h2[k] = vv2 + } + return h2 +} + +// The Life Of A Write is like this: +// +// * Handler calls w.Write or w.WriteString -> +// * -> rws.bw (*bufio.Writer) -> +// * (Handler migth call Flush) +// * -> chunkWriter{rws} +// * -> responseWriterState.writeChunk(p []byte) +// * -> responseWriterState.writeChunk (most of the magic; see comment there) +func (w *responseWriter) Write(p []byte) (n int, err error) { + return w.write(len(p), p, "") +} + +func (w *responseWriter) WriteString(s string) (n int, err error) { + return w.write(len(s), nil, s) +} + +// either dataB or dataS is non-zero. +func (w *responseWriter) write(lenData int, dataB []byte, dataS string) (n int, err error) { + rws := w.rws + if rws == nil { + panic("Write called after Handler finished") + } + if !rws.wroteHeader { + w.WriteHeader(200) + } + if dataB != nil { + return rws.bw.Write(dataB) + } else { + return rws.bw.WriteString(dataS) + } +} + +func (w *responseWriter) handlerDone() { + rws := w.rws + if rws == nil { + panic("handlerDone called twice") + } + rws.handlerDone = true + w.Flush() + w.rws = nil + responseWriterStatePool.Put(rws) +} diff --git a/vendor/golang.org/x/net/http2/server_test.go b/vendor/golang.org/x/net/http2/server_test.go new file mode 100644 index 0000000..57fad6d --- /dev/null +++ b/vendor/golang.org/x/net/http2/server_test.go @@ -0,0 +1,2622 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import ( + "bytes" + "crypto/tls" + "errors" + "flag" + "fmt" + "io" + "io/ioutil" + "log" + "net" + "net/http" + "net/http/httptest" + "os" + "os/exec" + "reflect" + "runtime" + "strconv" + "strings" + "sync" + "sync/atomic" + "testing" + "time" + + "golang.org/x/net/http2/hpack" +) + +var stderrVerbose = flag.Bool("stderr_verbose", false, "Mirror verbosity to stderr, unbuffered") + +func stderrv() io.Writer { + if *stderrVerbose { + return os.Stderr + } + + return ioutil.Discard +} + +type serverTester struct { + cc net.Conn // client conn + t testing.TB + ts *httptest.Server + fr *Framer + logBuf *bytes.Buffer + logFilter []string // substrings to filter out + scMu sync.Mutex // guards sc + sc *serverConn + + // writing headers: + headerBuf bytes.Buffer + hpackEnc *hpack.Encoder + + // reading frames: + frc chan Frame + frErrc chan error + readTimer *time.Timer +} + +func init() { + testHookOnPanicMu = new(sync.Mutex) +} + +func resetHooks() { + testHookOnPanicMu.Lock() + testHookOnPanic = nil + testHookOnPanicMu.Unlock() +} + +type serverTesterOpt string + +var optOnlyServer = serverTesterOpt("only_server") + +func newServerTester(t testing.TB, handler http.HandlerFunc, opts ...interface{}) *serverTester { + resetHooks() + + logBuf := new(bytes.Buffer) + ts := httptest.NewUnstartedServer(handler) + + tlsConfig := &tls.Config{ + InsecureSkipVerify: true, + // The h2-14 is temporary, until curl is updated. (as used by unit tests + // in Docker) + NextProtos: []string{NextProtoTLS, "h2-14"}, + } + + onlyServer := false + for _, opt := range opts { + switch v := opt.(type) { + case func(*tls.Config): + v(tlsConfig) + case func(*httptest.Server): + v(ts) + case serverTesterOpt: + onlyServer = (v == optOnlyServer) + default: + t.Fatalf("unknown newServerTester option type %T", v) + } + } + + ConfigureServer(ts.Config, &Server{}) + + st := &serverTester{ + t: t, + ts: ts, + logBuf: logBuf, + frc: make(chan Frame, 1), + frErrc: make(chan error, 1), + } + st.hpackEnc = hpack.NewEncoder(&st.headerBuf) + + ts.TLS = ts.Config.TLSConfig // the httptest.Server has its own copy of this TLS config + ts.Config.ErrorLog = log.New(io.MultiWriter(stderrv(), twriter{t: t, st: st}, logBuf), "", log.LstdFlags) + ts.StartTLS() + + if VerboseLogs { + t.Logf("Running test server at: %s", ts.URL) + } + testHookGetServerConn = func(v *serverConn) { + st.scMu.Lock() + defer st.scMu.Unlock() + st.sc = v + st.sc.testHookCh = make(chan func(int)) + } + log.SetOutput(io.MultiWriter(stderrv(), twriter{t: t, st: st})) + if !onlyServer { + cc, err := tls.Dial("tcp", ts.Listener.Addr().String(), tlsConfig) + if err != nil { + t.Fatal(err) + } + st.cc = cc + st.fr = NewFramer(cc, cc) + } + + return st +} + +func (st *serverTester) closeConn() { + st.scMu.Lock() + defer st.scMu.Unlock() + st.sc.conn.Close() +} + +func (st *serverTester) addLogFilter(phrase string) { + st.logFilter = append(st.logFilter, phrase) +} + +func (st *serverTester) stream(id uint32) *stream { + ch := make(chan *stream, 1) + st.sc.testHookCh <- func(int) { + ch <- st.sc.streams[id] + } + return <-ch +} + +func (st *serverTester) streamState(id uint32) streamState { + ch := make(chan streamState, 1) + st.sc.testHookCh <- func(int) { + state, _ := st.sc.state(id) + ch <- state + } + return <-ch +} + +// loopNum reports how many times this conn's select loop has gone around. +func (st *serverTester) loopNum() int { + lastc := make(chan int, 1) + st.sc.testHookCh <- func(loopNum int) { + lastc <- loopNum + } + return <-lastc +} + +// awaitIdle heuristically awaits for the server conn's select loop to be idle. +// The heuristic is that the server connection's serve loop must schedule +// 50 times in a row without any channel sends or receives occuring. +func (st *serverTester) awaitIdle() { + remain := 50 + last := st.loopNum() + for remain > 0 { + n := st.loopNum() + if n == last+1 { + remain-- + } else { + remain = 50 + } + last = n + } +} + +func (st *serverTester) Close() { + st.ts.Close() + if st.cc != nil { + st.cc.Close() + } + log.SetOutput(os.Stderr) +} + +// greet initiates the client's HTTP/2 connection into a state where +// frames may be sent. +func (st *serverTester) greet() { + st.writePreface() + st.writeInitialSettings() + st.wantSettings() + st.writeSettingsAck() + st.wantSettingsAck() +} + +func (st *serverTester) writePreface() { + n, err := st.cc.Write(clientPreface) + if err != nil { + st.t.Fatalf("Error writing client preface: %v", err) + } + if n != len(clientPreface) { + st.t.Fatalf("Writing client preface, wrote %d bytes; want %d", n, len(clientPreface)) + } +} + +func (st *serverTester) writeInitialSettings() { + if err := st.fr.WriteSettings(); err != nil { + st.t.Fatalf("Error writing initial SETTINGS frame from client to server: %v", err) + } +} + +func (st *serverTester) writeSettingsAck() { + if err := st.fr.WriteSettingsAck(); err != nil { + st.t.Fatalf("Error writing ACK of server's SETTINGS: %v", err) + } +} + +func (st *serverTester) writeHeaders(p HeadersFrameParam) { + if err := st.fr.WriteHeaders(p); err != nil { + st.t.Fatalf("Error writing HEADERS: %v", err) + } +} + +func (st *serverTester) encodeHeaderField(k, v string) { + err := st.hpackEnc.WriteField(hpack.HeaderField{Name: k, Value: v}) + if err != nil { + st.t.Fatalf("HPACK encoding error for %q/%q: %v", k, v, err) + } +} + +// encodeHeader encodes headers and returns their HPACK bytes. headers +// must contain an even number of key/value pairs. There may be +// multiple pairs for keys (e.g. "cookie"). The :method, :path, and +// :scheme headers default to GET, / and https. +func (st *serverTester) encodeHeader(headers ...string) []byte { + if len(headers)%2 == 1 { + panic("odd number of kv args") + } + + st.headerBuf.Reset() + + if len(headers) == 0 { + // Fast path, mostly for benchmarks, so test code doesn't pollute + // profiles when we're looking to improve server allocations. + st.encodeHeaderField(":method", "GET") + st.encodeHeaderField(":path", "/") + st.encodeHeaderField(":scheme", "https") + return st.headerBuf.Bytes() + } + + if len(headers) == 2 && headers[0] == ":method" { + // Another fast path for benchmarks. + st.encodeHeaderField(":method", headers[1]) + st.encodeHeaderField(":path", "/") + st.encodeHeaderField(":scheme", "https") + return st.headerBuf.Bytes() + } + + pseudoCount := map[string]int{} + keys := []string{":method", ":path", ":scheme"} + vals := map[string][]string{ + ":method": {"GET"}, + ":path": {"/"}, + ":scheme": {"https"}, + } + for len(headers) > 0 { + k, v := headers[0], headers[1] + headers = headers[2:] + if _, ok := vals[k]; !ok { + keys = append(keys, k) + } + if strings.HasPrefix(k, ":") { + pseudoCount[k]++ + if pseudoCount[k] == 1 { + vals[k] = []string{v} + } else { + // Allows testing of invalid headers w/ dup pseudo fields. + vals[k] = append(vals[k], v) + } + } else { + vals[k] = append(vals[k], v) + } + } + st.headerBuf.Reset() + for _, k := range keys { + for _, v := range vals[k] { + st.encodeHeaderField(k, v) + } + } + return st.headerBuf.Bytes() +} + +// bodylessReq1 writes a HEADERS frames with StreamID 1 and EndStream and EndHeaders set. +func (st *serverTester) bodylessReq1(headers ...string) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader(headers...), + EndStream: true, + EndHeaders: true, + }) +} + +func (st *serverTester) writeData(streamID uint32, endStream bool, data []byte) { + if err := st.fr.WriteData(streamID, endStream, data); err != nil { + st.t.Fatalf("Error writing DATA: %v", err) + } +} + +func (st *serverTester) readFrame() (Frame, error) { + go func() { + fr, err := st.fr.ReadFrame() + if err != nil { + st.frErrc <- err + } else { + st.frc <- fr + } + }() + t := st.readTimer + if t == nil { + t = time.NewTimer(2 * time.Second) + st.readTimer = t + } + t.Reset(2 * time.Second) + defer t.Stop() + select { + case f := <-st.frc: + return f, nil + case err := <-st.frErrc: + return nil, err + case <-t.C: + return nil, errors.New("timeout waiting for frame") + } +} + +func (st *serverTester) wantHeaders() *HeadersFrame { + f, err := st.readFrame() + if err != nil { + st.t.Fatalf("Error while expecting a HEADERS frame: %v", err) + } + hf, ok := f.(*HeadersFrame) + if !ok { + st.t.Fatalf("got a %T; want *HeadersFrame", f) + } + return hf +} + +func (st *serverTester) wantContinuation() *ContinuationFrame { + f, err := st.readFrame() + if err != nil { + st.t.Fatalf("Error while expecting a CONTINUATION frame: %v", err) + } + cf, ok := f.(*ContinuationFrame) + if !ok { + st.t.Fatalf("got a %T; want *ContinuationFrame", f) + } + return cf +} + +func (st *serverTester) wantData() *DataFrame { + f, err := st.readFrame() + if err != nil { + st.t.Fatalf("Error while expecting a DATA frame: %v", err) + } + df, ok := f.(*DataFrame) + if !ok { + st.t.Fatalf("got a %T; want *DataFrame", f) + } + return df +} + +func (st *serverTester) wantSettings() *SettingsFrame { + f, err := st.readFrame() + if err != nil { + st.t.Fatalf("Error while expecting a SETTINGS frame: %v", err) + } + sf, ok := f.(*SettingsFrame) + if !ok { + st.t.Fatalf("got a %T; want *SettingsFrame", f) + } + return sf +} + +func (st *serverTester) wantPing() *PingFrame { + f, err := st.readFrame() + if err != nil { + st.t.Fatalf("Error while expecting a PING frame: %v", err) + } + pf, ok := f.(*PingFrame) + if !ok { + st.t.Fatalf("got a %T; want *PingFrame", f) + } + return pf +} + +func (st *serverTester) wantGoAway() *GoAwayFrame { + f, err := st.readFrame() + if err != nil { + st.t.Fatalf("Error while expecting a GOAWAY frame: %v", err) + } + gf, ok := f.(*GoAwayFrame) + if !ok { + st.t.Fatalf("got a %T; want *GoAwayFrame", f) + } + return gf +} + +func (st *serverTester) wantRSTStream(streamID uint32, errCode ErrCode) { + f, err := st.readFrame() + if err != nil { + st.t.Fatalf("Error while expecting an RSTStream frame: %v", err) + } + rs, ok := f.(*RSTStreamFrame) + if !ok { + st.t.Fatalf("got a %T; want *RSTStreamFrame", f) + } + if rs.FrameHeader.StreamID != streamID { + st.t.Fatalf("RSTStream StreamID = %d; want %d", rs.FrameHeader.StreamID, streamID) + } + if rs.ErrCode != errCode { + st.t.Fatalf("RSTStream ErrCode = %d (%s); want %d (%s)", rs.ErrCode, rs.ErrCode, errCode, errCode) + } +} + +func (st *serverTester) wantWindowUpdate(streamID, incr uint32) { + f, err := st.readFrame() + if err != nil { + st.t.Fatalf("Error while expecting a WINDOW_UPDATE frame: %v", err) + } + wu, ok := f.(*WindowUpdateFrame) + if !ok { + st.t.Fatalf("got a %T; want *WindowUpdateFrame", f) + } + if wu.FrameHeader.StreamID != streamID { + st.t.Fatalf("WindowUpdate StreamID = %d; want %d", wu.FrameHeader.StreamID, streamID) + } + if wu.Increment != incr { + st.t.Fatalf("WindowUpdate increment = %d; want %d", wu.Increment, incr) + } +} + +func (st *serverTester) wantSettingsAck() { + f, err := st.readFrame() + if err != nil { + st.t.Fatal(err) + } + sf, ok := f.(*SettingsFrame) + if !ok { + st.t.Fatalf("Wanting a settings ACK, received a %T", f) + } + if !sf.Header().Flags.Has(FlagSettingsAck) { + st.t.Fatal("Settings Frame didn't have ACK set") + } + +} + +func TestServer(t *testing.T) { + gotReq := make(chan bool, 1) + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Foo", "Bar") + gotReq <- true + }) + defer st.Close() + + covers("3.5", ` + The server connection preface consists of a potentially empty + SETTINGS frame ([SETTINGS]) that MUST be the first frame the + server sends in the HTTP/2 connection. + `) + + st.writePreface() + st.writeInitialSettings() + st.wantSettings() + st.writeSettingsAck() + st.wantSettingsAck() + + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader(), + EndStream: true, // no DATA frames + EndHeaders: true, + }) + + select { + case <-gotReq: + case <-time.After(2 * time.Second): + t.Error("timeout waiting for request") + } +} + +func TestServer_Request_Get(t *testing.T) { + testServerRequest(t, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader("foo-bar", "some-value"), + EndStream: true, // no DATA frames + EndHeaders: true, + }) + }, func(r *http.Request) { + if r.Method != "GET" { + t.Errorf("Method = %q; want GET", r.Method) + } + if r.URL.Path != "/" { + t.Errorf("URL.Path = %q; want /", r.URL.Path) + } + if r.ContentLength != 0 { + t.Errorf("ContentLength = %v; want 0", r.ContentLength) + } + if r.Close { + t.Error("Close = true; want false") + } + if !strings.Contains(r.RemoteAddr, ":") { + t.Errorf("RemoteAddr = %q; want something with a colon", r.RemoteAddr) + } + if r.Proto != "HTTP/2.0" || r.ProtoMajor != 2 || r.ProtoMinor != 0 { + t.Errorf("Proto = %q Major=%v,Minor=%v; want HTTP/2.0", r.Proto, r.ProtoMajor, r.ProtoMinor) + } + wantHeader := http.Header{ + "Foo-Bar": []string{"some-value"}, + } + if !reflect.DeepEqual(r.Header, wantHeader) { + t.Errorf("Header = %#v; want %#v", r.Header, wantHeader) + } + if n, err := r.Body.Read([]byte(" ")); err != io.EOF || n != 0 { + t.Errorf("Read = %d, %v; want 0, EOF", n, err) + } + }) +} + +func TestServer_Request_Get_PathSlashes(t *testing.T) { + testServerRequest(t, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader(":path", "/%2f/"), + EndStream: true, // no DATA frames + EndHeaders: true, + }) + }, func(r *http.Request) { + if r.RequestURI != "/%2f/" { + t.Errorf("RequestURI = %q; want /%%2f/", r.RequestURI) + } + if r.URL.Path != "///" { + t.Errorf("URL.Path = %q; want ///", r.URL.Path) + } + }) +} + +// TODO: add a test with EndStream=true on the HEADERS but setting a +// Content-Length anyway. Should we just omit it and force it to +// zero? + +func TestServer_Request_Post_NoContentLength_EndStream(t *testing.T) { + testServerRequest(t, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader(":method", "POST"), + EndStream: true, + EndHeaders: true, + }) + }, func(r *http.Request) { + if r.Method != "POST" { + t.Errorf("Method = %q; want POST", r.Method) + } + if r.ContentLength != 0 { + t.Errorf("ContentLength = %v; want 0", r.ContentLength) + } + if n, err := r.Body.Read([]byte(" ")); err != io.EOF || n != 0 { + t.Errorf("Read = %d, %v; want 0, EOF", n, err) + } + }) +} + +func TestServer_Request_Post_Body_ImmediateEOF(t *testing.T) { + testBodyContents(t, -1, "", func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader(":method", "POST"), + EndStream: false, // to say DATA frames are coming + EndHeaders: true, + }) + st.writeData(1, true, nil) // just kidding. empty body. + }) +} + +func TestServer_Request_Post_Body_OneData(t *testing.T) { + const content = "Some content" + testBodyContents(t, -1, content, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader(":method", "POST"), + EndStream: false, // to say DATA frames are coming + EndHeaders: true, + }) + st.writeData(1, true, []byte(content)) + }) +} + +func TestServer_Request_Post_Body_TwoData(t *testing.T) { + const content = "Some content" + testBodyContents(t, -1, content, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader(":method", "POST"), + EndStream: false, // to say DATA frames are coming + EndHeaders: true, + }) + st.writeData(1, false, []byte(content[:5])) + st.writeData(1, true, []byte(content[5:])) + }) +} + +func TestServer_Request_Post_Body_ContentLength_Correct(t *testing.T) { + const content = "Some content" + testBodyContents(t, int64(len(content)), content, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader( + ":method", "POST", + "content-length", strconv.Itoa(len(content)), + ), + EndStream: false, // to say DATA frames are coming + EndHeaders: true, + }) + st.writeData(1, true, []byte(content)) + }) +} + +func TestServer_Request_Post_Body_ContentLength_TooLarge(t *testing.T) { + testBodyContentsFail(t, 3, "request declared a Content-Length of 3 but only wrote 2 bytes", + func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader( + ":method", "POST", + "content-length", "3", + ), + EndStream: false, // to say DATA frames are coming + EndHeaders: true, + }) + st.writeData(1, true, []byte("12")) + }) +} + +func TestServer_Request_Post_Body_ContentLength_TooSmall(t *testing.T) { + testBodyContentsFail(t, 4, "sender tried to send more than declared Content-Length of 4 bytes", + func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader( + ":method", "POST", + "content-length", "4", + ), + EndStream: false, // to say DATA frames are coming + EndHeaders: true, + }) + st.writeData(1, true, []byte("12345")) + }) +} + +func testBodyContents(t *testing.T, wantContentLength int64, wantBody string, write func(st *serverTester)) { + testServerRequest(t, write, func(r *http.Request) { + if r.Method != "POST" { + t.Errorf("Method = %q; want POST", r.Method) + } + if r.ContentLength != wantContentLength { + t.Errorf("ContentLength = %v; want %d", r.ContentLength, wantContentLength) + } + all, err := ioutil.ReadAll(r.Body) + if err != nil { + t.Fatal(err) + } + if string(all) != wantBody { + t.Errorf("Read = %q; want %q", all, wantBody) + } + if err := r.Body.Close(); err != nil { + t.Fatalf("Close: %v", err) + } + }) +} + +func testBodyContentsFail(t *testing.T, wantContentLength int64, wantReadError string, write func(st *serverTester)) { + testServerRequest(t, write, func(r *http.Request) { + if r.Method != "POST" { + t.Errorf("Method = %q; want POST", r.Method) + } + if r.ContentLength != wantContentLength { + t.Errorf("ContentLength = %v; want %d", r.ContentLength, wantContentLength) + } + all, err := ioutil.ReadAll(r.Body) + if err == nil { + t.Fatalf("expected an error (%q) reading from the body. Successfully read %q instead.", + wantReadError, all) + } + if !strings.Contains(err.Error(), wantReadError) { + t.Fatalf("Body.Read = %v; want substring %q", err, wantReadError) + } + if err := r.Body.Close(); err != nil { + t.Fatalf("Close: %v", err) + } + }) +} + +// Using a Host header, instead of :authority +func TestServer_Request_Get_Host(t *testing.T) { + const host = "example.com" + testServerRequest(t, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader("host", host), + EndStream: true, + EndHeaders: true, + }) + }, func(r *http.Request) { + if r.Host != host { + t.Errorf("Host = %q; want %q", r.Host, host) + } + }) +} + +// Using an :authority pseudo-header, instead of Host +func TestServer_Request_Get_Authority(t *testing.T) { + const host = "example.com" + testServerRequest(t, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader(":authority", host), + EndStream: true, + EndHeaders: true, + }) + }, func(r *http.Request) { + if r.Host != host { + t.Errorf("Host = %q; want %q", r.Host, host) + } + }) +} + +func TestServer_Request_WithContinuation(t *testing.T) { + wantHeader := http.Header{ + "Foo-One": []string{"value-one"}, + "Foo-Two": []string{"value-two"}, + "Foo-Three": []string{"value-three"}, + } + testServerRequest(t, func(st *serverTester) { + fullHeaders := st.encodeHeader( + "foo-one", "value-one", + "foo-two", "value-two", + "foo-three", "value-three", + ) + remain := fullHeaders + chunks := 0 + for len(remain) > 0 { + const maxChunkSize = 5 + chunk := remain + if len(chunk) > maxChunkSize { + chunk = chunk[:maxChunkSize] + } + remain = remain[len(chunk):] + + if chunks == 0 { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: chunk, + EndStream: true, // no DATA frames + EndHeaders: false, // we'll have continuation frames + }) + } else { + err := st.fr.WriteContinuation(1, len(remain) == 0, chunk) + if err != nil { + t.Fatal(err) + } + } + chunks++ + } + if chunks < 2 { + t.Fatal("too few chunks") + } + }, func(r *http.Request) { + if !reflect.DeepEqual(r.Header, wantHeader) { + t.Errorf("Header = %#v; want %#v", r.Header, wantHeader) + } + }) +} + +// Concatenated cookie headers. ("8.1.2.5 Compressing the Cookie Header Field") +func TestServer_Request_CookieConcat(t *testing.T) { + const host = "example.com" + testServerRequest(t, func(st *serverTester) { + st.bodylessReq1( + ":authority", host, + "cookie", "a=b", + "cookie", "c=d", + "cookie", "e=f", + ) + }, func(r *http.Request) { + const want = "a=b; c=d; e=f" + if got := r.Header.Get("Cookie"); got != want { + t.Errorf("Cookie = %q; want %q", got, want) + } + }) +} + +func TestServer_Request_Reject_CapitalHeader(t *testing.T) { + testRejectRequest(t, func(st *serverTester) { st.bodylessReq1("UPPER", "v") }) +} + +func TestServer_Request_Reject_Pseudo_Missing_method(t *testing.T) { + testRejectRequest(t, func(st *serverTester) { st.bodylessReq1(":method", "") }) +} + +func TestServer_Request_Reject_Pseudo_ExactlyOne(t *testing.T) { + // 8.1.2.3 Request Pseudo-Header Fields + // "All HTTP/2 requests MUST include exactly one valid value" ... + testRejectRequest(t, func(st *serverTester) { + st.addLogFilter("duplicate pseudo-header") + st.bodylessReq1(":method", "GET", ":method", "POST") + }) +} + +func TestServer_Request_Reject_Pseudo_AfterRegular(t *testing.T) { + // 8.1.2.3 Request Pseudo-Header Fields + // "All pseudo-header fields MUST appear in the header block + // before regular header fields. Any request or response that + // contains a pseudo-header field that appears in a header + // block after a regular header field MUST be treated as + // malformed (Section 8.1.2.6)." + testRejectRequest(t, func(st *serverTester) { + st.addLogFilter("pseudo-header after regular header") + var buf bytes.Buffer + enc := hpack.NewEncoder(&buf) + enc.WriteField(hpack.HeaderField{Name: ":method", Value: "GET"}) + enc.WriteField(hpack.HeaderField{Name: "regular", Value: "foobar"}) + enc.WriteField(hpack.HeaderField{Name: ":path", Value: "/"}) + enc.WriteField(hpack.HeaderField{Name: ":scheme", Value: "https"}) + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: buf.Bytes(), + EndStream: true, + EndHeaders: true, + }) + }) +} + +func TestServer_Request_Reject_Pseudo_Missing_path(t *testing.T) { + testRejectRequest(t, func(st *serverTester) { st.bodylessReq1(":path", "") }) +} + +func TestServer_Request_Reject_Pseudo_Missing_scheme(t *testing.T) { + testRejectRequest(t, func(st *serverTester) { st.bodylessReq1(":scheme", "") }) +} + +func TestServer_Request_Reject_Pseudo_scheme_invalid(t *testing.T) { + testRejectRequest(t, func(st *serverTester) { st.bodylessReq1(":scheme", "bogus") }) +} + +func TestServer_Request_Reject_Pseudo_Unknown(t *testing.T) { + testRejectRequest(t, func(st *serverTester) { + st.addLogFilter(`invalid pseudo-header ":unknown_thing"`) + st.bodylessReq1(":unknown_thing", "") + }) +} + +func testRejectRequest(t *testing.T, send func(*serverTester)) { + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + t.Fatal("server request made it to handler; should've been rejected") + }) + defer st.Close() + + st.greet() + send(st) + st.wantRSTStream(1, ErrCodeProtocol) +} + +func TestServer_Ping(t *testing.T) { + st := newServerTester(t, nil) + defer st.Close() + st.greet() + + // Server should ignore this one, since it has ACK set. + ackPingData := [8]byte{1, 2, 4, 8, 16, 32, 64, 128} + if err := st.fr.WritePing(true, ackPingData); err != nil { + t.Fatal(err) + } + + // But the server should reply to this one, since ACK is false. + pingData := [8]byte{1, 2, 3, 4, 5, 6, 7, 8} + if err := st.fr.WritePing(false, pingData); err != nil { + t.Fatal(err) + } + + pf := st.wantPing() + if !pf.Flags.Has(FlagPingAck) { + t.Error("response ping doesn't have ACK set") + } + if pf.Data != pingData { + t.Errorf("response ping has data %q; want %q", pf.Data, pingData) + } +} + +func TestServer_RejectsLargeFrames(t *testing.T) { + st := newServerTester(t, nil) + defer st.Close() + st.greet() + + // Write too large of a frame (too large by one byte) + // We ignore the return value because it's expected that the server + // will only read the first 9 bytes (the headre) and then disconnect. + st.fr.WriteRawFrame(0xff, 0, 0, make([]byte, defaultMaxReadFrameSize+1)) + + gf := st.wantGoAway() + if gf.ErrCode != ErrCodeFrameSize { + t.Errorf("GOAWAY err = %v; want %v", gf.ErrCode, ErrCodeFrameSize) + } +} + +func TestServer_Handler_Sends_WindowUpdate(t *testing.T) { + puppet := newHandlerPuppet() + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + puppet.act(w, r) + }) + defer st.Close() + defer puppet.done() + + st.greet() + + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader(":method", "POST"), + EndStream: false, // data coming + EndHeaders: true, + }) + st.writeData(1, false, []byte("abcdef")) + puppet.do(readBodyHandler(t, "abc")) + st.wantWindowUpdate(0, 3) + st.wantWindowUpdate(1, 3) + + puppet.do(readBodyHandler(t, "def")) + st.wantWindowUpdate(0, 3) + st.wantWindowUpdate(1, 3) + + st.writeData(1, true, []byte("ghijkl")) // END_STREAM here + puppet.do(readBodyHandler(t, "ghi")) + puppet.do(readBodyHandler(t, "jkl")) + st.wantWindowUpdate(0, 3) + st.wantWindowUpdate(0, 3) // no more stream-level, since END_STREAM +} + +func TestServer_Send_GoAway_After_Bogus_WindowUpdate(t *testing.T) { + st := newServerTester(t, nil) + defer st.Close() + st.greet() + if err := st.fr.WriteWindowUpdate(0, 1<<31-1); err != nil { + t.Fatal(err) + } + gf := st.wantGoAway() + if gf.ErrCode != ErrCodeFlowControl { + t.Errorf("GOAWAY err = %v; want %v", gf.ErrCode, ErrCodeFlowControl) + } + if gf.LastStreamID != 0 { + t.Errorf("GOAWAY last stream ID = %v; want %v", gf.LastStreamID, 0) + } +} + +func TestServer_Send_RstStream_After_Bogus_WindowUpdate(t *testing.T) { + inHandler := make(chan bool) + blockHandler := make(chan bool) + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + inHandler <- true + <-blockHandler + }) + defer st.Close() + defer close(blockHandler) + st.greet() + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeader(":method", "POST"), + EndStream: false, // keep it open + EndHeaders: true, + }) + <-inHandler + // Send a bogus window update: + if err := st.fr.WriteWindowUpdate(1, 1<<31-1); err != nil { + t.Fatal(err) + } + st.wantRSTStream(1, ErrCodeFlowControl) +} + +// testServerPostUnblock sends a hanging POST with unsent data to handler, +// then runs fn once in the handler, and verifies that the error returned from +// handler is acceptable. It fails if takes over 5 seconds for handler to exit. +func testServerPostUnblock(t *testing.T, + handler func(http.ResponseWriter, *http.Request) error, + fn func(*serverTester), + checkErr func(error), + otherHeaders ...string) { + inHandler := make(chan bool) + errc := make(chan error, 1) + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + inHandler <- true + errc <- handler(w, r) + }) + st.greet() + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeader(append([]string{":method", "POST"}, otherHeaders...)...), + EndStream: false, // keep it open + EndHeaders: true, + }) + <-inHandler + fn(st) + select { + case err := <-errc: + if checkErr != nil { + checkErr(err) + } + case <-time.After(5 * time.Second): + t.Fatal("timeout waiting for Handler to return") + } + st.Close() +} + +func TestServer_RSTStream_Unblocks_Read(t *testing.T) { + testServerPostUnblock(t, + func(w http.ResponseWriter, r *http.Request) (err error) { + _, err = r.Body.Read(make([]byte, 1)) + return + }, + func(st *serverTester) { + if err := st.fr.WriteRSTStream(1, ErrCodeCancel); err != nil { + t.Fatal(err) + } + }, + func(err error) { + if err == nil { + t.Error("unexpected nil error from Request.Body.Read") + } + }, + ) +} + +func TestServer_RSTStream_Unblocks_Header_Write(t *testing.T) { + // Run this test a bunch, because it doesn't always + // deadlock. But with a bunch, it did. + n := 50 + if testing.Short() { + n = 5 + } + for i := 0; i < n; i++ { + testServer_RSTStream_Unblocks_Header_Write(t) + } +} + +func testServer_RSTStream_Unblocks_Header_Write(t *testing.T) { + inHandler := make(chan bool, 1) + unblockHandler := make(chan bool, 1) + headerWritten := make(chan bool, 1) + wroteRST := make(chan bool, 1) + + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + inHandler <- true + <-wroteRST + w.Header().Set("foo", "bar") + w.WriteHeader(200) + w.(http.Flusher).Flush() + headerWritten <- true + <-unblockHandler + }) + defer st.Close() + + st.greet() + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeader(":method", "POST"), + EndStream: false, // keep it open + EndHeaders: true, + }) + <-inHandler + if err := st.fr.WriteRSTStream(1, ErrCodeCancel); err != nil { + t.Fatal(err) + } + wroteRST <- true + st.awaitIdle() + select { + case <-headerWritten: + case <-time.After(2 * time.Second): + t.Error("timeout waiting for header write") + } + unblockHandler <- true +} + +func TestServer_DeadConn_Unblocks_Read(t *testing.T) { + testServerPostUnblock(t, + func(w http.ResponseWriter, r *http.Request) (err error) { + _, err = r.Body.Read(make([]byte, 1)) + return + }, + func(st *serverTester) { st.cc.Close() }, + func(err error) { + if err == nil { + t.Error("unexpected nil error from Request.Body.Read") + } + }, + ) +} + +var blockUntilClosed = func(w http.ResponseWriter, r *http.Request) error { + <-w.(http.CloseNotifier).CloseNotify() + return nil +} + +func TestServer_CloseNotify_After_RSTStream(t *testing.T) { + testServerPostUnblock(t, blockUntilClosed, func(st *serverTester) { + if err := st.fr.WriteRSTStream(1, ErrCodeCancel); err != nil { + t.Fatal(err) + } + }, nil) +} + +func TestServer_CloseNotify_After_ConnClose(t *testing.T) { + testServerPostUnblock(t, blockUntilClosed, func(st *serverTester) { st.cc.Close() }, nil) +} + +// that CloseNotify unblocks after a stream error due to the client's +// problem that's unrelated to them explicitly canceling it (which is +// TestServer_CloseNotify_After_RSTStream above) +func TestServer_CloseNotify_After_StreamError(t *testing.T) { + testServerPostUnblock(t, blockUntilClosed, func(st *serverTester) { + // data longer than declared Content-Length => stream error + st.writeData(1, true, []byte("1234")) + }, nil, "content-length", "3") +} + +func TestServer_StateTransitions(t *testing.T) { + var st *serverTester + inHandler := make(chan bool) + writeData := make(chan bool) + leaveHandler := make(chan bool) + st = newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + inHandler <- true + if st.stream(1) == nil { + t.Errorf("nil stream 1 in handler") + } + if got, want := st.streamState(1), stateOpen; got != want { + t.Errorf("in handler, state is %v; want %v", got, want) + } + writeData <- true + if n, err := r.Body.Read(make([]byte, 1)); n != 0 || err != io.EOF { + t.Errorf("body read = %d, %v; want 0, EOF", n, err) + } + if got, want := st.streamState(1), stateHalfClosedRemote; got != want { + t.Errorf("in handler, state is %v; want %v", got, want) + } + + <-leaveHandler + }) + st.greet() + if st.stream(1) != nil { + t.Fatal("stream 1 should be empty") + } + if got := st.streamState(1); got != stateIdle { + t.Fatalf("stream 1 should be idle; got %v", got) + } + + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeader(":method", "POST"), + EndStream: false, // keep it open + EndHeaders: true, + }) + <-inHandler + <-writeData + st.writeData(1, true, nil) + + leaveHandler <- true + hf := st.wantHeaders() + if !hf.StreamEnded() { + t.Fatal("expected END_STREAM flag") + } + + if got, want := st.streamState(1), stateClosed; got != want { + t.Errorf("at end, state is %v; want %v", got, want) + } + if st.stream(1) != nil { + t.Fatal("at end, stream 1 should be gone") + } +} + +// test HEADERS w/o EndHeaders + another HEADERS (should get rejected) +func TestServer_Rejects_HeadersNoEnd_Then_Headers(t *testing.T) { + testServerRejects(t, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeader(), + EndStream: true, + EndHeaders: false, + }) + st.writeHeaders(HeadersFrameParam{ // Not a continuation. + StreamID: 3, // different stream. + BlockFragment: st.encodeHeader(), + EndStream: true, + EndHeaders: true, + }) + }) +} + +// test HEADERS w/o EndHeaders + PING (should get rejected) +func TestServer_Rejects_HeadersNoEnd_Then_Ping(t *testing.T) { + testServerRejects(t, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeader(), + EndStream: true, + EndHeaders: false, + }) + if err := st.fr.WritePing(false, [8]byte{}); err != nil { + t.Fatal(err) + } + }) +} + +// test HEADERS w/ EndHeaders + a continuation HEADERS (should get rejected) +func TestServer_Rejects_HeadersEnd_Then_Continuation(t *testing.T) { + testServerRejects(t, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeader(), + EndStream: true, + EndHeaders: true, + }) + st.wantHeaders() + if err := st.fr.WriteContinuation(1, true, encodeHeaderNoImplicit(t, "foo", "bar")); err != nil { + t.Fatal(err) + } + }) +} + +// test HEADERS w/o EndHeaders + a continuation HEADERS on wrong stream ID +func TestServer_Rejects_HeadersNoEnd_Then_ContinuationWrongStream(t *testing.T) { + testServerRejects(t, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeader(), + EndStream: true, + EndHeaders: false, + }) + if err := st.fr.WriteContinuation(3, true, encodeHeaderNoImplicit(t, "foo", "bar")); err != nil { + t.Fatal(err) + } + }) +} + +// No HEADERS on stream 0. +func TestServer_Rejects_Headers0(t *testing.T) { + testServerRejects(t, func(st *serverTester) { + st.fr.AllowIllegalWrites = true + st.writeHeaders(HeadersFrameParam{ + StreamID: 0, + BlockFragment: st.encodeHeader(), + EndStream: true, + EndHeaders: true, + }) + }) +} + +// No CONTINUATION on stream 0. +func TestServer_Rejects_Continuation0(t *testing.T) { + testServerRejects(t, func(st *serverTester) { + st.fr.AllowIllegalWrites = true + if err := st.fr.WriteContinuation(0, true, st.encodeHeader()); err != nil { + t.Fatal(err) + } + }) +} + +func TestServer_Rejects_PushPromise(t *testing.T) { + testServerRejects(t, func(st *serverTester) { + pp := PushPromiseParam{ + StreamID: 1, + PromiseID: 3, + } + if err := st.fr.WritePushPromise(pp); err != nil { + t.Fatal(err) + } + }) +} + +// testServerRejects tests that the server hangs up with a GOAWAY +// frame and a server close after the client does something +// deserving a CONNECTION_ERROR. +func testServerRejects(t *testing.T, writeReq func(*serverTester)) { + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {}) + st.addLogFilter("connection error: PROTOCOL_ERROR") + defer st.Close() + st.greet() + writeReq(st) + + st.wantGoAway() + errc := make(chan error, 1) + go func() { + fr, err := st.fr.ReadFrame() + if err == nil { + err = fmt.Errorf("got frame of type %T", fr) + } + errc <- err + }() + select { + case err := <-errc: + if err != io.EOF { + t.Errorf("ReadFrame = %v; want io.EOF", err) + } + case <-time.After(2 * time.Second): + t.Error("timeout waiting for disconnect") + } +} + +// testServerRequest sets up an idle HTTP/2 connection and lets you +// write a single request with writeReq, and then verify that the +// *http.Request is built correctly in checkReq. +func testServerRequest(t *testing.T, writeReq func(*serverTester), checkReq func(*http.Request)) { + gotReq := make(chan bool, 1) + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + if r.Body == nil { + t.Fatal("nil Body") + } + checkReq(r) + gotReq <- true + }) + defer st.Close() + + st.greet() + writeReq(st) + + select { + case <-gotReq: + case <-time.After(2 * time.Second): + t.Error("timeout waiting for request") + } +} + +func getSlash(st *serverTester) { st.bodylessReq1() } + +func TestServer_Response_NoData(t *testing.T) { + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + // Nothing. + return nil + }, func(st *serverTester) { + getSlash(st) + hf := st.wantHeaders() + if !hf.StreamEnded() { + t.Fatal("want END_STREAM flag") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + }) +} + +func TestServer_Response_NoData_Header_FooBar(t *testing.T) { + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + w.Header().Set("Foo-Bar", "some-value") + return nil + }, func(st *serverTester) { + getSlash(st) + hf := st.wantHeaders() + if !hf.StreamEnded() { + t.Fatal("want END_STREAM flag") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + goth := decodeHeader(t, hf.HeaderBlockFragment()) + wanth := [][2]string{ + {":status", "200"}, + {"foo-bar", "some-value"}, + {"content-type", "text/plain; charset=utf-8"}, + {"content-length", "0"}, + } + if !reflect.DeepEqual(goth, wanth) { + t.Errorf("Got headers %v; want %v", goth, wanth) + } + }) +} + +func TestServer_Response_Data_Sniff_DoesntOverride(t *testing.T) { + const msg = "this is HTML." + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + w.Header().Set("Content-Type", "foo/bar") + io.WriteString(w, msg) + return nil + }, func(st *serverTester) { + getSlash(st) + hf := st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("don't want END_STREAM, expecting data") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + goth := decodeHeader(t, hf.HeaderBlockFragment()) + wanth := [][2]string{ + {":status", "200"}, + {"content-type", "foo/bar"}, + {"content-length", strconv.Itoa(len(msg))}, + } + if !reflect.DeepEqual(goth, wanth) { + t.Errorf("Got headers %v; want %v", goth, wanth) + } + df := st.wantData() + if !df.StreamEnded() { + t.Error("expected DATA to have END_STREAM flag") + } + if got := string(df.Data()); got != msg { + t.Errorf("got DATA %q; want %q", got, msg) + } + }) +} + +func TestServer_Response_TransferEncoding_chunked(t *testing.T) { + const msg = "hi" + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + w.Header().Set("Transfer-Encoding", "chunked") // should be stripped + io.WriteString(w, msg) + return nil + }, func(st *serverTester) { + getSlash(st) + hf := st.wantHeaders() + goth := decodeHeader(t, hf.HeaderBlockFragment()) + wanth := [][2]string{ + {":status", "200"}, + {"content-type", "text/plain; charset=utf-8"}, + {"content-length", strconv.Itoa(len(msg))}, + } + if !reflect.DeepEqual(goth, wanth) { + t.Errorf("Got headers %v; want %v", goth, wanth) + } + }) +} + +// Header accessed only after the initial write. +func TestServer_Response_Data_IgnoreHeaderAfterWrite_After(t *testing.T) { + const msg = "this is HTML." + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + io.WriteString(w, msg) + w.Header().Set("foo", "should be ignored") + return nil + }, func(st *serverTester) { + getSlash(st) + hf := st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("unexpected END_STREAM") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + goth := decodeHeader(t, hf.HeaderBlockFragment()) + wanth := [][2]string{ + {":status", "200"}, + {"content-type", "text/html; charset=utf-8"}, + {"content-length", strconv.Itoa(len(msg))}, + } + if !reflect.DeepEqual(goth, wanth) { + t.Errorf("Got headers %v; want %v", goth, wanth) + } + }) +} + +// Header accessed before the initial write and later mutated. +func TestServer_Response_Data_IgnoreHeaderAfterWrite_Overwrite(t *testing.T) { + const msg = "this is HTML." + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + w.Header().Set("foo", "proper value") + io.WriteString(w, msg) + w.Header().Set("foo", "should be ignored") + return nil + }, func(st *serverTester) { + getSlash(st) + hf := st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("unexpected END_STREAM") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + goth := decodeHeader(t, hf.HeaderBlockFragment()) + wanth := [][2]string{ + {":status", "200"}, + {"foo", "proper value"}, + {"content-type", "text/html; charset=utf-8"}, + {"content-length", strconv.Itoa(len(msg))}, + } + if !reflect.DeepEqual(goth, wanth) { + t.Errorf("Got headers %v; want %v", goth, wanth) + } + }) +} + +func TestServer_Response_Data_SniffLenType(t *testing.T) { + const msg = "this is HTML." + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + io.WriteString(w, msg) + return nil + }, func(st *serverTester) { + getSlash(st) + hf := st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("don't want END_STREAM, expecting data") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + goth := decodeHeader(t, hf.HeaderBlockFragment()) + wanth := [][2]string{ + {":status", "200"}, + {"content-type", "text/html; charset=utf-8"}, + {"content-length", strconv.Itoa(len(msg))}, + } + if !reflect.DeepEqual(goth, wanth) { + t.Errorf("Got headers %v; want %v", goth, wanth) + } + df := st.wantData() + if !df.StreamEnded() { + t.Error("expected DATA to have END_STREAM flag") + } + if got := string(df.Data()); got != msg { + t.Errorf("got DATA %q; want %q", got, msg) + } + }) +} + +func TestServer_Response_Header_Flush_MidWrite(t *testing.T) { + const msg = "this is HTML" + const msg2 = ", and this is the next chunk" + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + io.WriteString(w, msg) + w.(http.Flusher).Flush() + io.WriteString(w, msg2) + return nil + }, func(st *serverTester) { + getSlash(st) + hf := st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("unexpected END_STREAM flag") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + goth := decodeHeader(t, hf.HeaderBlockFragment()) + wanth := [][2]string{ + {":status", "200"}, + {"content-type", "text/html; charset=utf-8"}, // sniffed + // and no content-length + } + if !reflect.DeepEqual(goth, wanth) { + t.Errorf("Got headers %v; want %v", goth, wanth) + } + { + df := st.wantData() + if df.StreamEnded() { + t.Error("unexpected END_STREAM flag") + } + if got := string(df.Data()); got != msg { + t.Errorf("got DATA %q; want %q", got, msg) + } + } + { + df := st.wantData() + if !df.StreamEnded() { + t.Error("wanted END_STREAM flag on last data chunk") + } + if got := string(df.Data()); got != msg2 { + t.Errorf("got DATA %q; want %q", got, msg2) + } + } + }) +} + +func TestServer_Response_LargeWrite(t *testing.T) { + const size = 1 << 20 + const maxFrameSize = 16 << 10 + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + n, err := w.Write(bytes.Repeat([]byte("a"), size)) + if err != nil { + return fmt.Errorf("Write error: %v", err) + } + if n != size { + return fmt.Errorf("wrong size %d from Write", n) + } + return nil + }, func(st *serverTester) { + if err := st.fr.WriteSettings( + Setting{SettingInitialWindowSize, 0}, + Setting{SettingMaxFrameSize, maxFrameSize}, + ); err != nil { + t.Fatal(err) + } + st.wantSettingsAck() + + getSlash(st) // make the single request + + // Give the handler quota to write: + if err := st.fr.WriteWindowUpdate(1, size); err != nil { + t.Fatal(err) + } + // Give the handler quota to write to connection-level + // window as well + if err := st.fr.WriteWindowUpdate(0, size); err != nil { + t.Fatal(err) + } + hf := st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("unexpected END_STREAM flag") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + goth := decodeHeader(t, hf.HeaderBlockFragment()) + wanth := [][2]string{ + {":status", "200"}, + {"content-type", "text/plain; charset=utf-8"}, // sniffed + // and no content-length + } + if !reflect.DeepEqual(goth, wanth) { + t.Errorf("Got headers %v; want %v", goth, wanth) + } + var bytes, frames int + for { + df := st.wantData() + bytes += len(df.Data()) + frames++ + for _, b := range df.Data() { + if b != 'a' { + t.Fatal("non-'a' byte seen in DATA") + } + } + if df.StreamEnded() { + break + } + } + if bytes != size { + t.Errorf("Got %d bytes; want %d", bytes, size) + } + if want := int(size / maxFrameSize); frames < want || frames > want*2 { + t.Errorf("Got %d frames; want %d", frames, size) + } + }) +} + +// Test that the handler can't write more than the client allows +func TestServer_Response_LargeWrite_FlowControlled(t *testing.T) { + const size = 1 << 20 + const maxFrameSize = 16 << 10 + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + w.(http.Flusher).Flush() + n, err := w.Write(bytes.Repeat([]byte("a"), size)) + if err != nil { + return fmt.Errorf("Write error: %v", err) + } + if n != size { + return fmt.Errorf("wrong size %d from Write", n) + } + return nil + }, func(st *serverTester) { + // Set the window size to something explicit for this test. + // It's also how much initial data we expect. + const initWindowSize = 123 + if err := st.fr.WriteSettings( + Setting{SettingInitialWindowSize, initWindowSize}, + Setting{SettingMaxFrameSize, maxFrameSize}, + ); err != nil { + t.Fatal(err) + } + st.wantSettingsAck() + + getSlash(st) // make the single request + defer func() { st.fr.WriteRSTStream(1, ErrCodeCancel) }() + + hf := st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("unexpected END_STREAM flag") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + + df := st.wantData() + if got := len(df.Data()); got != initWindowSize { + t.Fatalf("Initial window size = %d but got DATA with %d bytes", initWindowSize, got) + } + + for _, quota := range []int{1, 13, 127} { + if err := st.fr.WriteWindowUpdate(1, uint32(quota)); err != nil { + t.Fatal(err) + } + df := st.wantData() + if int(quota) != len(df.Data()) { + t.Fatalf("read %d bytes after giving %d quota", len(df.Data()), quota) + } + } + + if err := st.fr.WriteRSTStream(1, ErrCodeCancel); err != nil { + t.Fatal(err) + } + }) +} + +// Test that the handler blocked in a Write is unblocked if the server sends a RST_STREAM. +func TestServer_Response_RST_Unblocks_LargeWrite(t *testing.T) { + const size = 1 << 20 + const maxFrameSize = 16 << 10 + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + w.(http.Flusher).Flush() + errc := make(chan error, 1) + go func() { + _, err := w.Write(bytes.Repeat([]byte("a"), size)) + errc <- err + }() + select { + case err := <-errc: + if err == nil { + return errors.New("unexpected nil error from Write in handler") + } + return nil + case <-time.After(2 * time.Second): + return errors.New("timeout waiting for Write in handler") + } + }, func(st *serverTester) { + if err := st.fr.WriteSettings( + Setting{SettingInitialWindowSize, 0}, + Setting{SettingMaxFrameSize, maxFrameSize}, + ); err != nil { + t.Fatal(err) + } + st.wantSettingsAck() + + getSlash(st) // make the single request + + hf := st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("unexpected END_STREAM flag") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + + if err := st.fr.WriteRSTStream(1, ErrCodeCancel); err != nil { + t.Fatal(err) + } + }) +} + +func TestServer_Response_Empty_Data_Not_FlowControlled(t *testing.T) { + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + w.(http.Flusher).Flush() + // Nothing; send empty DATA + return nil + }, func(st *serverTester) { + // Handler gets no data quota: + if err := st.fr.WriteSettings(Setting{SettingInitialWindowSize, 0}); err != nil { + t.Fatal(err) + } + st.wantSettingsAck() + + getSlash(st) // make the single request + + hf := st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("unexpected END_STREAM flag") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + + df := st.wantData() + if got := len(df.Data()); got != 0 { + t.Fatalf("unexpected %d DATA bytes; want 0", got) + } + if !df.StreamEnded() { + t.Fatal("DATA didn't have END_STREAM") + } + }) +} + +func TestServer_Response_Automatic100Continue(t *testing.T) { + const msg = "foo" + const reply = "bar" + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + if v := r.Header.Get("Expect"); v != "" { + t.Errorf("Expect header = %q; want empty", v) + } + buf := make([]byte, len(msg)) + // This read should trigger the 100-continue being sent. + if n, err := io.ReadFull(r.Body, buf); err != nil || n != len(msg) || string(buf) != msg { + return fmt.Errorf("ReadFull = %q, %v; want %q, nil", buf[:n], err, msg) + } + _, err := io.WriteString(w, reply) + return err + }, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, // clients send odd numbers + BlockFragment: st.encodeHeader(":method", "POST", "expect", "100-continue"), + EndStream: false, + EndHeaders: true, + }) + hf := st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("unexpected END_STREAM flag") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + goth := decodeHeader(t, hf.HeaderBlockFragment()) + wanth := [][2]string{ + {":status", "100"}, + } + if !reflect.DeepEqual(goth, wanth) { + t.Fatalf("Got headers %v; want %v", goth, wanth) + } + + // Okay, they sent status 100, so we can send our + // gigantic and/or sensitive "foo" payload now. + st.writeData(1, true, []byte(msg)) + + st.wantWindowUpdate(0, uint32(len(msg))) + + hf = st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("expected data to follow") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + goth = decodeHeader(t, hf.HeaderBlockFragment()) + wanth = [][2]string{ + {":status", "200"}, + {"content-type", "text/plain; charset=utf-8"}, + {"content-length", strconv.Itoa(len(reply))}, + } + if !reflect.DeepEqual(goth, wanth) { + t.Errorf("Got headers %v; want %v", goth, wanth) + } + + df := st.wantData() + if string(df.Data()) != reply { + t.Errorf("Client read %q; want %q", df.Data(), reply) + } + if !df.StreamEnded() { + t.Errorf("expect data stream end") + } + }) +} + +func TestServer_HandlerWriteErrorOnDisconnect(t *testing.T) { + errc := make(chan error, 1) + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + p := []byte("some data.\n") + for { + _, err := w.Write(p) + if err != nil { + errc <- err + return nil + } + } + }, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeader(), + EndStream: false, + EndHeaders: true, + }) + hf := st.wantHeaders() + if hf.StreamEnded() { + t.Fatal("unexpected END_STREAM flag") + } + if !hf.HeadersEnded() { + t.Fatal("want END_HEADERS flag") + } + // Close the connection and wait for the handler to (hopefully) notice. + st.cc.Close() + select { + case <-errc: + case <-time.After(5 * time.Second): + t.Error("timeout") + } + }) +} + +func TestServer_Rejects_Too_Many_Streams(t *testing.T) { + const testPath = "/some/path" + + inHandler := make(chan uint32) + leaveHandler := make(chan bool) + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + id := w.(*responseWriter).rws.stream.id + inHandler <- id + if id == 1+(defaultMaxStreams+1)*2 && r.URL.Path != testPath { + t.Errorf("decoded final path as %q; want %q", r.URL.Path, testPath) + } + <-leaveHandler + }) + defer st.Close() + st.greet() + nextStreamID := uint32(1) + streamID := func() uint32 { + defer func() { nextStreamID += 2 }() + return nextStreamID + } + sendReq := func(id uint32, headers ...string) { + st.writeHeaders(HeadersFrameParam{ + StreamID: id, + BlockFragment: st.encodeHeader(headers...), + EndStream: true, + EndHeaders: true, + }) + } + for i := 0; i < defaultMaxStreams; i++ { + sendReq(streamID()) + <-inHandler + } + defer func() { + for i := 0; i < defaultMaxStreams; i++ { + leaveHandler <- true + } + }() + + // And this one should cross the limit: + // (It's also sent as a CONTINUATION, to verify we still track the decoder context, + // even if we're rejecting it) + rejectID := streamID() + headerBlock := st.encodeHeader(":path", testPath) + frag1, frag2 := headerBlock[:3], headerBlock[3:] + st.writeHeaders(HeadersFrameParam{ + StreamID: rejectID, + BlockFragment: frag1, + EndStream: true, + EndHeaders: false, // CONTINUATION coming + }) + if err := st.fr.WriteContinuation(rejectID, true, frag2); err != nil { + t.Fatal(err) + } + st.wantRSTStream(rejectID, ErrCodeProtocol) + + // But let a handler finish: + leaveHandler <- true + st.wantHeaders() + + // And now another stream should be able to start: + goodID := streamID() + sendReq(goodID, ":path", testPath) + select { + case got := <-inHandler: + if got != goodID { + t.Errorf("Got stream %d; want %d", got, goodID) + } + case <-time.After(3 * time.Second): + t.Error("timeout waiting for handler") + } +} + +// So many response headers that the server needs to use CONTINUATION frames: +func TestServer_Response_ManyHeaders_With_Continuation(t *testing.T) { + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + h := w.Header() + for i := 0; i < 5000; i++ { + h.Set(fmt.Sprintf("x-header-%d", i), fmt.Sprintf("x-value-%d", i)) + } + return nil + }, func(st *serverTester) { + getSlash(st) + hf := st.wantHeaders() + if hf.HeadersEnded() { + t.Fatal("got unwanted END_HEADERS flag") + } + n := 0 + for { + n++ + cf := st.wantContinuation() + if cf.HeadersEnded() { + break + } + } + if n < 5 { + t.Errorf("Only got %d CONTINUATION frames; expected 5+ (currently 6)", n) + } + }) +} + +// This previously crashed (reported by Mathieu Lonjaret as observed +// while using Camlistore) because we got a DATA frame from the client +// after the handler exited and our logic at the time was wrong, +// keeping a stream in the map in stateClosed, which tickled an +// invariant check later when we tried to remove that stream (via +// defer sc.closeAllStreamsOnConnClose) when the serverConn serve loop +// ended. +func TestServer_NoCrash_HandlerClose_Then_ClientClose(t *testing.T) { + testServerResponse(t, func(w http.ResponseWriter, r *http.Request) error { + // nothing + return nil + }, func(st *serverTester) { + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.encodeHeader(), + EndStream: false, // DATA is coming + EndHeaders: true, + }) + hf := st.wantHeaders() + if !hf.HeadersEnded() || !hf.StreamEnded() { + t.Fatalf("want END_HEADERS+END_STREAM, got %v", hf) + } + + // Sent when the a Handler closes while a client has + // indicated it's still sending DATA: + st.wantRSTStream(1, ErrCodeCancel) + + // Now the handler has ended, so it's ended its + // stream, but the client hasn't closed its side + // (stateClosedLocal). So send more data and verify + // it doesn't crash with an internal invariant panic, like + // it did before. + st.writeData(1, true, []byte("foo")) + + // Sent after a peer sends data anyway (admittedly the + // previous RST_STREAM might've still been in-flight), + // but they'll get the more friendly 'cancel' code + // first. + st.wantRSTStream(1, ErrCodeStreamClosed) + + // Set up a bunch of machinery to record the panic we saw + // previously. + var ( + panMu sync.Mutex + panicVal interface{} + ) + + testHookOnPanicMu.Lock() + testHookOnPanic = func(sc *serverConn, pv interface{}) bool { + panMu.Lock() + panicVal = pv + panMu.Unlock() + return true + } + testHookOnPanicMu.Unlock() + + // Now force the serve loop to end, via closing the connection. + st.cc.Close() + select { + case <-st.sc.doneServing: + // Loop has exited. + panMu.Lock() + got := panicVal + panMu.Unlock() + if got != nil { + t.Errorf("Got panic: %v", got) + } + case <-time.After(5 * time.Second): + t.Error("timeout") + } + }) +} + +func TestServer_Rejects_TLS10(t *testing.T) { testRejectTLS(t, tls.VersionTLS10) } +func TestServer_Rejects_TLS11(t *testing.T) { testRejectTLS(t, tls.VersionTLS11) } + +func testRejectTLS(t *testing.T, max uint16) { + st := newServerTester(t, nil, func(c *tls.Config) { + c.MaxVersion = max + }) + defer st.Close() + gf := st.wantGoAway() + if got, want := gf.ErrCode, ErrCodeInadequateSecurity; got != want { + t.Errorf("Got error code %v; want %v", got, want) + } +} + +func TestServer_Rejects_TLSBadCipher(t *testing.T) { + st := newServerTester(t, nil, func(c *tls.Config) { + // Only list bad ones: + c.CipherSuites = []uint16{ + tls.TLS_RSA_WITH_RC4_128_SHA, + tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA, + tls.TLS_RSA_WITH_AES_128_CBC_SHA, + tls.TLS_RSA_WITH_AES_256_CBC_SHA, + tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, + tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, + tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, + tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA, + tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, + tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, + tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, + } + }) + defer st.Close() + gf := st.wantGoAway() + if got, want := gf.ErrCode, ErrCodeInadequateSecurity; got != want { + t.Errorf("Got error code %v; want %v", got, want) + } +} + +func TestServer_Advertises_Common_Cipher(t *testing.T) { + const requiredSuite = tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 + st := newServerTester(t, nil, func(c *tls.Config) { + // Have the client only support the one required by the spec. + c.CipherSuites = []uint16{requiredSuite} + }, func(ts *httptest.Server) { + var srv *http.Server = ts.Config + // Have the server configured with no specific cipher suites. + // This tests that Go's defaults include the required one. + srv.TLSConfig = nil + }) + defer st.Close() + st.greet() +} + +// TODO: move this onto *serverTester, and re-use the same hpack +// decoding context throughout. We're just getting lucky here with +// creating a new decoder each time. +func decodeHeader(t *testing.T, headerBlock []byte) (pairs [][2]string) { + d := hpack.NewDecoder(initialHeaderTableSize, func(f hpack.HeaderField) { + pairs = append(pairs, [2]string{f.Name, f.Value}) + }) + if _, err := d.Write(headerBlock); err != nil { + t.Fatalf("hpack decoding error: %v", err) + } + if err := d.Close(); err != nil { + t.Fatalf("hpack decoding error: %v", err) + } + return +} + +// testServerResponse sets up an idle HTTP/2 connection and lets you +// write a single request with writeReq, and then reply to it in some way with the provided handler, +// and then verify the output with the serverTester again (assuming the handler returns nil) +func testServerResponse(t testing.TB, + handler func(http.ResponseWriter, *http.Request) error, + client func(*serverTester), +) { + errc := make(chan error, 1) + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + if r.Body == nil { + t.Fatal("nil Body") + } + errc <- handler(w, r) + }) + defer st.Close() + + donec := make(chan bool) + go func() { + defer close(donec) + st.greet() + client(st) + }() + + select { + case <-donec: + return + case <-time.After(5 * time.Second): + t.Fatal("timeout") + } + + select { + case err := <-errc: + if err != nil { + t.Fatalf("Error in handler: %v", err) + } + case <-time.After(2 * time.Second): + t.Error("timeout waiting for handler to finish") + } +} + +// readBodyHandler returns an http Handler func that reads len(want) +// bytes from r.Body and fails t if the contents read were not +// the value of want. +func readBodyHandler(t *testing.T, want string) func(w http.ResponseWriter, r *http.Request) { + return func(w http.ResponseWriter, r *http.Request) { + buf := make([]byte, len(want)) + _, err := io.ReadFull(r.Body, buf) + if err != nil { + t.Error(err) + return + } + if string(buf) != want { + t.Errorf("read %q; want %q", buf, want) + } + } +} + +// TestServerWithCurl currently fails, hence the LenientCipherSuites test. See: +// https://github.com/tatsuhiro-t/nghttp2/issues/140 & +// http://sourceforge.net/p/curl/bugs/1472/ +func TestServerWithCurl(t *testing.T) { testServerWithCurl(t, false) } +func TestServerWithCurl_LenientCipherSuites(t *testing.T) { testServerWithCurl(t, true) } + +func testServerWithCurl(t *testing.T, permitProhibitedCipherSuites bool) { + if runtime.GOOS != "linux" { + t.Skip("skipping Docker test when not on Linux; requires --net which won't work with boot2docker anyway") + } + if testing.Short() { + t.Skip("skipping curl test in short mode") + } + requireCurl(t) + const msg = "Hello from curl!\n" + ts := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Set("Foo", "Bar") + w.Header().Set("Client-Proto", r.Proto) + io.WriteString(w, msg) + })) + ConfigureServer(ts.Config, &Server{ + PermitProhibitedCipherSuites: permitProhibitedCipherSuites, + }) + ts.TLS = ts.Config.TLSConfig // the httptest.Server has its own copy of this TLS config + ts.StartTLS() + defer ts.Close() + + var gotConn int32 + testHookOnConn = func() { atomic.StoreInt32(&gotConn, 1) } + + t.Logf("Running test server for curl to hit at: %s", ts.URL) + container := curl(t, "--silent", "--http2", "--insecure", "-v", ts.URL) + defer kill(container) + resc := make(chan interface{}, 1) + go func() { + res, err := dockerLogs(container) + if err != nil { + resc <- err + } else { + resc <- res + } + }() + select { + case res := <-resc: + if err, ok := res.(error); ok { + t.Fatal(err) + } + body := string(res.([]byte)) + // Search for both "key: value" and "key:value", since curl changed their format + // Our Dockerfile contains the latest version (no space), but just in case people + // didn't rebuild, check both. + if !strings.Contains(body, "foo: Bar") && !strings.Contains(body, "foo:Bar") { + t.Errorf("didn't see foo: Bar header") + t.Logf("Got: %s", body) + } + if !strings.Contains(body, "client-proto: HTTP/2") && !strings.Contains(body, "client-proto:HTTP/2") { + t.Errorf("didn't see client-proto: HTTP/2 header") + t.Logf("Got: %s", res) + } + if !strings.Contains(string(res.([]byte)), msg) { + t.Errorf("didn't see %q content", msg) + t.Logf("Got: %s", res) + } + case <-time.After(3 * time.Second): + t.Errorf("timeout waiting for curl") + } + + if atomic.LoadInt32(&gotConn) == 0 { + t.Error("never saw an http2 connection") + } +} + +var doh2load = flag.Bool("h2load", false, "Run h2load test") + +func TestServerWithH2Load(t *testing.T) { + if !*doh2load { + t.Skip("Skipping without --h2load flag.") + } + if runtime.GOOS != "linux" { + t.Skip("skipping Docker test when not on Linux; requires --net which won't work with boot2docker anyway") + } + requireH2load(t) + + msg := strings.Repeat("Hello, h2load!\n", 5000) + ts := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + io.WriteString(w, msg) + w.(http.Flusher).Flush() + io.WriteString(w, msg) + })) + ts.StartTLS() + defer ts.Close() + + cmd := exec.Command("docker", "run", "--net=host", "--entrypoint=/usr/local/bin/h2load", "gohttp2/curl", + "-n100000", "-c100", "-m100", ts.URL) + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr + if err := cmd.Run(); err != nil { + t.Fatal(err) + } +} + +// Issue 12843 +func TestServerDoS_MaxHeaderListSize(t *testing.T) { + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {}) + defer st.Close() + + // shake hands + st.writePreface() + st.writeInitialSettings() + frameSize := defaultMaxReadFrameSize + var advHeaderListSize *uint32 + st.wantSettings().ForeachSetting(func(s Setting) error { + switch s.ID { + case SettingMaxFrameSize: + if s.Val < minMaxFrameSize { + frameSize = minMaxFrameSize + } else if s.Val > maxFrameSize { + frameSize = maxFrameSize + } else { + frameSize = int(s.Val) + } + case SettingMaxHeaderListSize: + advHeaderListSize = &s.Val + } + return nil + }) + st.writeSettingsAck() + st.wantSettingsAck() + + if advHeaderListSize == nil { + t.Errorf("server didn't advertise a max header list size") + } else if *advHeaderListSize == 0 { + t.Errorf("server advertised a max header list size of 0") + } + + st.encodeHeaderField(":method", "GET") + st.encodeHeaderField(":path", "/") + st.encodeHeaderField(":scheme", "https") + cookie := strings.Repeat("*", 4058) + st.encodeHeaderField("cookie", cookie) + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: st.headerBuf.Bytes(), + EndStream: true, + EndHeaders: false, + }) + + // Capture the short encoding of a duplicate ~4K cookie, now + // that we've already sent it once. + st.headerBuf.Reset() + st.encodeHeaderField("cookie", cookie) + + // Now send 1MB of it. + const size = 1 << 20 + b := bytes.Repeat(st.headerBuf.Bytes(), size/st.headerBuf.Len()) + for len(b) > 0 { + chunk := b + if len(chunk) > frameSize { + chunk = chunk[:frameSize] + } + b = b[len(chunk):] + st.fr.WriteContinuation(1, len(b) == 0, chunk) + } + + h := st.wantHeaders() + if !h.HeadersEnded() { + t.Fatalf("Got HEADERS without END_HEADERS set: %v", h) + } + headers := decodeHeader(t, h.HeaderBlockFragment()) + want := [][2]string{ + {":status", "431"}, + {"content-type", "text/html; charset=utf-8"}, + {"content-length", "63"}, + } + if !reflect.DeepEqual(headers, want) { + t.Errorf("Headers mismatch.\n got: %q\nwant: %q\n", headers, want) + } +} + +func TestCompressionErrorOnWrite(t *testing.T) { + const maxStrLen = 8 << 10 + var serverConfig *http.Server + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + // No response body. + }, func(ts *httptest.Server) { + serverConfig = ts.Config + serverConfig.MaxHeaderBytes = maxStrLen + }) + defer st.Close() + st.greet() + + maxAllowed := st.sc.maxHeaderStringLen() + + // Crank this up, now that we have a conn connected with the + // hpack.Decoder's max string length set has been initialized + // from the earlier low ~8K value. We want this higher so don't + // hit the max header list size. We only want to test hitting + // the max string size. + serverConfig.MaxHeaderBytes = 1 << 20 + + // First a request with a header that's exactly the max allowed size. + hbf := st.encodeHeader("foo", strings.Repeat("a", maxAllowed)) + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: hbf, + EndStream: true, + EndHeaders: true, + }) + h := st.wantHeaders() + if !h.HeadersEnded() || !h.StreamEnded() { + t.Errorf("Unexpected HEADER frame %v", h) + } + + // And now send one that's just one byte too big. + hbf = st.encodeHeader("bar", strings.Repeat("b", maxAllowed+1)) + st.writeHeaders(HeadersFrameParam{ + StreamID: 3, + BlockFragment: hbf, + EndStream: true, + EndHeaders: true, + }) + ga := st.wantGoAway() + if ga.ErrCode != ErrCodeCompression { + t.Errorf("GOAWAY err = %v; want ErrCodeCompression", ga.ErrCode) + } +} + +func TestCompressionErrorOnClose(t *testing.T) { + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + // No response body. + }) + defer st.Close() + st.greet() + + hbf := st.encodeHeader("foo", "bar") + hbf = hbf[:len(hbf)-1] // truncate one byte from the end, so hpack.Decoder.Close fails. + st.writeHeaders(HeadersFrameParam{ + StreamID: 1, + BlockFragment: hbf, + EndStream: true, + EndHeaders: true, + }) + ga := st.wantGoAway() + if ga.ErrCode != ErrCodeCompression { + t.Errorf("GOAWAY err = %v; want ErrCodeCompression", ga.ErrCode) + } +} + +func BenchmarkServerGets(b *testing.B) { + b.ReportAllocs() + + const msg = "Hello, world" + st := newServerTester(b, func(w http.ResponseWriter, r *http.Request) { + io.WriteString(w, msg) + }) + defer st.Close() + st.greet() + + // Give the server quota to reply. (plus it has the the 64KB) + if err := st.fr.WriteWindowUpdate(0, uint32(b.N*len(msg))); err != nil { + b.Fatal(err) + } + + for i := 0; i < b.N; i++ { + id := 1 + uint32(i)*2 + st.writeHeaders(HeadersFrameParam{ + StreamID: id, + BlockFragment: st.encodeHeader(), + EndStream: true, + EndHeaders: true, + }) + st.wantHeaders() + df := st.wantData() + if !df.StreamEnded() { + b.Fatalf("DATA didn't have END_STREAM; got %v", df) + } + } +} + +func BenchmarkServerPosts(b *testing.B) { + b.ReportAllocs() + + const msg = "Hello, world" + st := newServerTester(b, func(w http.ResponseWriter, r *http.Request) { + io.WriteString(w, msg) + }) + defer st.Close() + st.greet() + + // Give the server quota to reply. (plus it has the the 64KB) + if err := st.fr.WriteWindowUpdate(0, uint32(b.N*len(msg))); err != nil { + b.Fatal(err) + } + + for i := 0; i < b.N; i++ { + id := 1 + uint32(i)*2 + st.writeHeaders(HeadersFrameParam{ + StreamID: id, + BlockFragment: st.encodeHeader(":method", "POST"), + EndStream: false, + EndHeaders: true, + }) + st.writeData(id, true, nil) + st.wantHeaders() + df := st.wantData() + if !df.StreamEnded() { + b.Fatalf("DATA didn't have END_STREAM; got %v", df) + } + } +} + +// go-fuzz bug, originally reported at https://github.com/bradfitz/http2/issues/53 +// Verify we don't hang. +func TestIssue53(t *testing.T) { + const data = "PRI * HTTP/2.0\r\n\r\nSM" + + "\r\n\r\n\x00\x00\x00\x01\ainfinfin\ad" + s := &http.Server{ + ErrorLog: log.New(io.MultiWriter(stderrv(), twriter{t: t}), "", log.LstdFlags), + } + s2 := &Server{MaxReadFrameSize: 1 << 16, PermitProhibitedCipherSuites: true} + c := &issue53Conn{[]byte(data), false, false} + s2.handleConn(s, c, http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + w.Write([]byte("hello")) + })) + if !c.closed { + t.Fatal("connection is not closed") + } +} + +type issue53Conn struct { + data []byte + closed bool + written bool +} + +func (c *issue53Conn) Read(b []byte) (n int, err error) { + if len(c.data) == 0 { + return 0, io.EOF + } + n = copy(b, c.data) + c.data = c.data[n:] + return +} + +func (c *issue53Conn) Write(b []byte) (n int, err error) { + c.written = true + return len(b), nil +} + +func (c *issue53Conn) Close() error { + c.closed = true + return nil +} + +func (c *issue53Conn) LocalAddr() net.Addr { return &net.TCPAddr{net.IP{127, 0, 0, 1}, 49706, ""} } +func (c *issue53Conn) RemoteAddr() net.Addr { return &net.TCPAddr{net.IP{127, 0, 0, 1}, 49706, ""} } +func (c *issue53Conn) SetDeadline(t time.Time) error { return nil } +func (c *issue53Conn) SetReadDeadline(t time.Time) error { return nil } +func (c *issue53Conn) SetWriteDeadline(t time.Time) error { return nil } + +// golang.org/issue/12895 +func TestConfigureServer(t *testing.T) { + tests := []struct { + name string + in http.Server + wantErr string + }{ + { + name: "empty server", + in: http.Server{}, + }, + { + name: "just the required cipher suite", + in: http.Server{ + TLSConfig: &tls.Config{ + CipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256}, + }, + }, + }, + { + name: "missing required cipher suite", + in: http.Server{ + TLSConfig: &tls.Config{ + CipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384}, + }, + }, + wantErr: "is missing HTTP/2-required TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", + }, + { + name: "required after bad", + in: http.Server{ + TLSConfig: &tls.Config{ + CipherSuites: []uint16{tls.TLS_RSA_WITH_RC4_128_SHA, tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256}, + }, + }, + wantErr: "contains an HTTP/2-approved cipher suite (0xc02f), but it comes after", + }, + { + name: "bad after required", + in: http.Server{ + TLSConfig: &tls.Config{ + CipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, tls.TLS_RSA_WITH_RC4_128_SHA}, + }, + }, + }, + } + for _, tt := range tests { + err := ConfigureServer(&tt.in, nil) + if (err != nil) != (tt.wantErr != "") { + if tt.wantErr != "" { + t.Errorf("%s: success, but want error", tt.name) + } else { + t.Errorf("%s: unexpected error: %v", tt.name, err) + } + } + if err != nil && tt.wantErr != "" && !strings.Contains(err.Error(), tt.wantErr) { + t.Errorf("%s: err = %v; want substring %q", tt.name, err, tt.wantErr) + } + if err == nil && !tt.in.TLSConfig.PreferServerCipherSuites { + t.Error("%s: PreferServerCipherSuite is false; want true", tt.name) + } + } +} diff --git a/vendor/golang.org/x/net/http2/testdata/draft-ietf-httpbis-http2.xml b/vendor/golang.org/x/net/http2/testdata/draft-ietf-httpbis-http2.xml new file mode 100644 index 0000000..31a84be --- /dev/null +++ b/vendor/golang.org/x/net/http2/testdata/draft-ietf-httpbis-http2.xml @@ -0,0 +1,5021 @@ + + + + + + + + + + + + + + + + + + + Hypertext Transfer Protocol version 2 + + + Twist +
    + mbelshe@chromium.org +
    +
    + + + Google, Inc +
    + fenix@google.com +
    +
    + + + Mozilla +
    + + 331 E Evelyn Street + Mountain View + CA + 94041 + US + + martin.thomson@gmail.com +
    +
    + + + Applications + HTTPbis + HTTP + SPDY + Web + + + + This specification describes an optimized expression of the semantics of the Hypertext + Transfer Protocol (HTTP). HTTP/2 enables a more efficient use of network resources and a + reduced perception of latency by introducing header field compression and allowing multiple + concurrent messages on the same connection. It also introduces unsolicited push of + representations from servers to clients. + + + This specification is an alternative to, but does not obsolete, the HTTP/1.1 message syntax. + HTTP's existing semantics remain unchanged. + + + + + + Discussion of this draft takes place on the HTTPBIS working group mailing list + (ietf-http-wg@w3.org), which is archived at . + + + Working Group information can be found at ; that specific to HTTP/2 are at . + + + The changes in this draft are summarized in . + + + +
    + + +
    + + + The Hypertext Transfer Protocol (HTTP) is a wildly successful protocol. However, the + HTTP/1.1 message format () has + several characteristics that have a negative overall effect on application performance + today. + + + In particular, HTTP/1.0 allowed only one request to be outstanding at a time on a given + TCP connection. HTTP/1.1 added request pipelining, but this only partially addressed + request concurrency and still suffers from head-of-line blocking. Therefore, HTTP/1.1 + clients that need to make many requests typically use multiple connections to a server in + order to achieve concurrency and thereby reduce latency. + + + Furthermore, HTTP header fields are often repetitive and verbose, causing unnecessary + network traffic, as well as causing the initial TCP congestion + window to quickly fill. This can result in excessive latency when multiple requests are + made on a new TCP connection. + + + HTTP/2 addresses these issues by defining an optimized mapping of HTTP's semantics to an + underlying connection. Specifically, it allows interleaving of request and response + messages on the same connection and uses an efficient coding for HTTP header fields. It + also allows prioritization of requests, letting more important requests complete more + quickly, further improving performance. + + + The resulting protocol is more friendly to the network, because fewer TCP connections can + be used in comparison to HTTP/1.x. This means less competition with other flows, and + longer-lived connections, which in turn leads to better utilization of available network + capacity. + + + Finally, HTTP/2 also enables more efficient processing of messages through use of binary + message framing. + +
    + +
    + + HTTP/2 provides an optimized transport for HTTP semantics. HTTP/2 supports all of the core + features of HTTP/1.1, but aims to be more efficient in several ways. + + + The basic protocol unit in HTTP/2 is a frame. Each frame + type serves a different purpose. For example, HEADERS and + DATA frames form the basis of HTTP requests and + responses; other frame types like SETTINGS, + WINDOW_UPDATE, and PUSH_PROMISE are used in support of other + HTTP/2 features. + + + Multiplexing of requests is achieved by having each HTTP request-response exchange + associated with its own stream. Streams are largely + independent of each other, so a blocked or stalled request or response does not prevent + progress on other streams. + + + Flow control and prioritization ensure that it is possible to efficiently use multiplexed + streams. Flow control helps to ensure that only data that + can be used by a receiver is transmitted. Prioritization ensures that limited resources can be directed + to the most important streams first. + + + HTTP/2 adds a new interaction mode, whereby a server can push + responses to a client. Server push allows a server to speculatively send a client + data that the server anticipates the client will need, trading off some network usage + against a potential latency gain. The server does this by synthesizing a request, which it + sends as a PUSH_PROMISE frame. The server is then able to send a response to + the synthetic request on a separate stream. + + + Frames that contain HTTP header fields are compressed. + HTTP requests can be highly redundant, so compression can reduce the size of requests and + responses significantly. + + +
    + + The HTTP/2 specification is split into four parts: + + + Starting HTTP/2 covers how an HTTP/2 connection is + initiated. + + + The framing and streams layers describe the way HTTP/2 frames are + structured and formed into multiplexed streams. + + + Frame and error + definitions include details of the frame and error types used in HTTP/2. + + + HTTP mappings and additional + requirements describe how HTTP semantics are expressed using frames and + streams. + + + + + While some of the frame and stream layer concepts are isolated from HTTP, this + specification does not define a completely generic framing layer. The framing and streams + layers are tailored to the needs of the HTTP protocol and server push. + +
    + +
    + + The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD + NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as + described in RFC 2119. + + + All numeric values are in network byte order. Values are unsigned unless otherwise + indicated. Literal values are provided in decimal or hexadecimal as appropriate. + Hexadecimal literals are prefixed with 0x to distinguish them + from decimal literals. + + + The following terms are used: + + + The endpoint initiating the HTTP/2 connection. + + + A transport-layer connection between two endpoints. + + + An error that affects the entire HTTP/2 connection. + + + Either the client or server of the connection. + + + The smallest unit of communication within an HTTP/2 connection, consisting of a header + and a variable-length sequence of octets structured according to the frame type. + + + An endpoint. When discussing a particular endpoint, "peer" refers to the endpoint + that is remote to the primary subject of discussion. + + + An endpoint that is receiving frames. + + + An endpoint that is transmitting frames. + + + The endpoint which did not initiate the HTTP/2 connection. + + + A bi-directional flow of frames across a virtual channel within the HTTP/2 connection. + + + An error on the individual HTTP/2 stream. + + + + + Finally, the terms "gateway", "intermediary", "proxy", and "tunnel" are defined + in . + +
    +
    + +
    + + An HTTP/2 connection is an application layer protocol running on top of a TCP connection + (). The client is the TCP connection initiator. + + + HTTP/2 uses the same "http" and "https" URI schemes used by HTTP/1.1. HTTP/2 shares the same + default port numbers: 80 for "http" URIs and 443 for "https" URIs. As a result, + implementations processing requests for target resource URIs like http://example.org/foo or https://example.com/bar are required to first discover whether the + upstream server (the immediate peer to which the client wishes to establish a connection) + supports HTTP/2. + + + + The means by which support for HTTP/2 is determined is different for "http" and "https" + URIs. Discovery for "http" URIs is described in . Discovery + for "https" URIs is described in . + + +
    + + The protocol defined in this document has two identifiers. + + + + The string "h2" identifies the protocol where HTTP/2 uses TLS. This identifier is used in the TLS application layer protocol negotiation extension (ALPN) + field and any place that HTTP/2 over TLS is identified. + + + The "h2" string is serialized into an ALPN protocol identifier as the two octet + sequence: 0x68, 0x32. + + + + + The string "h2c" identifies the protocol where HTTP/2 is run over cleartext TCP. + This identifier is used in the HTTP/1.1 Upgrade header field and any place that + HTTP/2 over TCP is identified. + + + + + + Negotiating "h2" or "h2c" implies the use of the transport, security, framing and message + semantics described in this document. + + + RFC Editor's Note: please remove the remainder of this section prior to the + publication of a final version of this document. + + + Only implementations of the final, published RFC can identify themselves as "h2" or "h2c". + Until such an RFC exists, implementations MUST NOT identify themselves using these + strings. + + + Examples and text throughout the rest of this document use "h2" as a matter of + editorial convenience only. Implementations of draft versions MUST NOT identify using + this string. + + + Implementations of draft versions of the protocol MUST add the string "-" and the + corresponding draft number to the identifier. For example, draft-ietf-httpbis-http2-11 + over TLS is identified using the string "h2-11". + + + Non-compatible experiments that are based on these draft versions MUST append the string + "-" and an experiment name to the identifier. For example, an experimental implementation + of packet mood-based encoding based on draft-ietf-httpbis-http2-09 might identify itself + as "h2-09-emo". Note that any label MUST conform to the "token" syntax defined in + . Experimenters are + encouraged to coordinate their experiments on the ietf-http-wg@w3.org mailing list. + +
    + +
    + + A client that makes a request for an "http" URI without prior knowledge about support for + HTTP/2 uses the HTTP Upgrade mechanism (). The client makes an HTTP/1.1 request that includes an Upgrade + header field identifying HTTP/2 with the "h2c" token. The HTTP/1.1 request MUST include + exactly one HTTP2-Settings header field. + +
    + For example: + + +]]> +
    + + Requests that contain an entity body MUST be sent in their entirety before the client can + send HTTP/2 frames. This means that a large request entity can block the use of the + connection until it is completely sent. + + + If concurrency of an initial request with subsequent requests is important, an OPTIONS + request can be used to perform the upgrade to HTTP/2, at the cost of an additional + round-trip. + + + A server that does not support HTTP/2 can respond to the request as though the Upgrade + header field were absent: + +
    + +HTTP/1.1 200 OK +Content-Length: 243 +Content-Type: text/html + +... + +
    + + A server MUST ignore a "h2" token in an Upgrade header field. Presence of a token with + "h2" implies HTTP/2 over TLS, which is instead negotiated as described in . + + + A server that supports HTTP/2 can accept the upgrade with a 101 (Switching Protocols) + response. After the empty line that terminates the 101 response, the server can begin + sending HTTP/2 frames. These frames MUST include a response to the request that initiated + the Upgrade. + + +
    + + For example: + + +HTTP/1.1 101 Switching Protocols +Connection: Upgrade +Upgrade: h2c + +[ HTTP/2 connection ... + +
    + + The first HTTP/2 frame sent by the server is a SETTINGS frame () as the server connection preface (). Upon receiving the 101 response, the client sends a connection preface, which includes a + SETTINGS frame. + + + The HTTP/1.1 request that is sent prior to upgrade is assigned stream identifier 1 and is + assigned default priority values. Stream 1 is + implicitly half closed from the client toward the server, since the request is completed + as an HTTP/1.1 request. After commencing the HTTP/2 connection, stream 1 is used for the + response. + + +
    + + A request that upgrades from HTTP/1.1 to HTTP/2 MUST include exactly one HTTP2-Settings header field. The HTTP2-Settings header field is a connection-specific header field + that includes parameters that govern the HTTP/2 connection, provided in anticipation of + the server accepting the request to upgrade. + +
    + +
    + + A server MUST NOT upgrade the connection to HTTP/2 if this header field is not present, + or if more than one is present. A server MUST NOT send this header field. + + + + The content of the HTTP2-Settings header field is the + payload of a SETTINGS frame (), encoded as a + base64url string (that is, the URL- and filename-safe Base64 encoding described in , with any trailing '=' characters omitted). The + ABNF production for token68 is + defined in . + + + Since the upgrade is only intended to apply to the immediate connection, a client + sending HTTP2-Settings MUST also send HTTP2-Settings as a connection option in the Connection header field to prevent it from being forwarded + downstream. + + + A server decodes and interprets these values as it would any other + SETTINGS frame. Acknowledgement of the + SETTINGS parameters is not necessary, since a 101 response serves as implicit + acknowledgment. Providing these values in the Upgrade request gives a client an + opportunity to provide parameters prior to receiving any frames from the server. + +
    +
    + +
    + + A client that makes a request to an "https" URI uses TLS + with the application layer protocol negotiation extension. + + + HTTP/2 over TLS uses the "h2" application token. The "h2c" token MUST NOT be sent by a + client or selected by a server. + + + Once TLS negotiation is complete, both the client and the server send a connection preface. + +
    + +
    + + A client can learn that a particular server supports HTTP/2 by other means. For example, + describes a mechanism for advertising this capability. + + + A client MAY immediately send HTTP/2 frames to a server that is known to support HTTP/2, + after the connection preface; a server can + identify such a connection by the presence of the connection preface. This only affects + the establishment of HTTP/2 connections over cleartext TCP; implementations that support + HTTP/2 over TLS MUST use protocol negotiation in TLS. + + + Without additional information, prior support for HTTP/2 is not a strong signal that a + given server will support HTTP/2 for future connections. For example, it is possible for + server configurations to change, for configurations to differ between instances in + clustered servers, or for network conditions to change. + +
    + +
    + + Upon establishment of a TCP connection and determination that HTTP/2 will be used by both + peers, each endpoint MUST send a connection preface as a final confirmation and to + establish the initial SETTINGS parameters for the HTTP/2 connection. The client and + server each send a different connection preface. + + + The client connection preface starts with a sequence of 24 octets, which in hex notation + are: + +
    + +
    + + (the string PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n). This sequence + is followed by a SETTINGS frame (). The + SETTINGS frame MAY be empty. The client sends the client connection + preface immediately upon receipt of a 101 Switching Protocols response (indicating a + successful upgrade), or as the first application data octets of a TLS connection. If + starting an HTTP/2 connection with prior knowledge of server support for the protocol, the + client connection preface is sent upon connection establishment. + + + + + The client connection preface is selected so that a large proportion of HTTP/1.1 or + HTTP/1.0 servers and intermediaries do not attempt to process further frames. Note + that this does not address the concerns raised in . + + + + + The server connection preface consists of a potentially empty SETTINGS + frame () that MUST be the first frame the server sends in the + HTTP/2 connection. + + + The SETTINGS frames received from a peer as part of the connection preface + MUST be acknowledged (see ) after sending the connection + preface. + + + To avoid unnecessary latency, clients are permitted to send additional frames to the + server immediately after sending the client connection preface, without waiting to receive + the server connection preface. It is important to note, however, that the server + connection preface SETTINGS frame might include parameters that necessarily + alter how a client is expected to communicate with the server. Upon receiving the + SETTINGS frame, the client is expected to honor any parameters established. + In some configurations, it is possible for the server to transmit SETTINGS + before the client sends additional frames, providing an opportunity to avoid this issue. + + + Clients and servers MUST treat an invalid connection preface as a connection error of type + PROTOCOL_ERROR. A GOAWAY frame () + MAY be omitted in this case, since an invalid preface indicates that the peer is not using + HTTP/2. + +
    +
    + +
    + + Once the HTTP/2 connection is established, endpoints can begin exchanging frames. + + +
    + + All frames begin with a fixed 9-octet header followed by a variable-length payload. + +
    + +
    + + The fields of the frame header are defined as: + + + + The length of the frame payload expressed as an unsigned 24-bit integer. Values + greater than 214 (16,384) MUST NOT be sent unless the receiver has + set a larger value for SETTINGS_MAX_FRAME_SIZE. + + + The 9 octets of the frame header are not included in this value. + + + + + The 8-bit type of the frame. The frame type determines the format and semantics of + the frame. Implementations MUST ignore and discard any frame that has a type that + is unknown. + + + + + An 8-bit field reserved for frame-type specific boolean flags. + + + Flags are assigned semantics specific to the indicated frame type. Flags that have + no defined semantics for a particular frame type MUST be ignored, and MUST be left + unset (0) when sending. + + + + + A reserved 1-bit field. The semantics of this bit are undefined and the bit MUST + remain unset (0) when sending and MUST be ignored when receiving. + + + + + A 31-bit stream identifier (see ). The value 0 is + reserved for frames that are associated with the connection as a whole as opposed to + an individual stream. + + + + + + The structure and content of the frame payload is dependent entirely on the frame type. + +
    + +
    + + The size of a frame payload is limited by the maximum size that a receiver advertises in + the SETTINGS_MAX_FRAME_SIZE setting. This setting can have any value + between 214 (16,384) and 224-1 (16,777,215) octets, + inclusive. + + + All implementations MUST be capable of receiving and minimally processing frames up to + 214 octets in length, plus the 9 octet frame + header. The size of the frame header is not included when describing frame sizes. + + + Certain frame types, such as PING, impose additional limits + on the amount of payload data allowed. + + + + + If a frame size exceeds any defined limit, or is too small to contain mandatory frame + data, the endpoint MUST send a FRAME_SIZE_ERROR error. A frame size error + in a frame that could alter the state of the entire connection MUST be treated as a connection error; this includes any frame carrying + a header block (that is, HEADERS, + PUSH_PROMISE, and CONTINUATION), SETTINGS, + and any WINDOW_UPDATE frame with a stream identifier of 0. + + + Endpoints are not obligated to use all available space in a frame. Responsiveness can be + improved by using frames that are smaller than the permitted maximum size. Sending large + frames can result in delays in sending time-sensitive frames (such + RST_STREAM, WINDOW_UPDATE, or PRIORITY) + which if blocked by the transmission of a large frame, could affect performance. + +
    + +
    + + Just as in HTTP/1, a header field in HTTP/2 is a name with one or more associated values. + They are used within HTTP request and response messages as well as server push operations + (see ). + + + Header lists are collections of zero or more header fields. When transmitted over a + connection, a header list is serialized into a header block using HTTP Header Compression. The serialized header block is then + divided into one or more octet sequences, called header block fragments, and transmitted + within the payload of HEADERS, PUSH_PROMISE or CONTINUATION frames. + + + The Cookie header field is treated specially by the HTTP + mapping (see ). + + + A receiving endpoint reassembles the header block by concatenating its fragments, then + decompresses the block to reconstruct the header list. + + + A complete header block consists of either: + + + a single HEADERS or PUSH_PROMISE frame, + with the END_HEADERS flag set, or + + + a HEADERS or PUSH_PROMISE frame with the END_HEADERS + flag cleared and one or more CONTINUATION frames, + where the last CONTINUATION frame has the END_HEADERS flag set. + + + + + Header compression is stateful. One compression context and one decompression context is + used for the entire connection. Each header block is processed as a discrete unit. + Header blocks MUST be transmitted as a contiguous sequence of frames, with no interleaved + frames of any other type or from any other stream. The last frame in a sequence of + HEADERS or CONTINUATION frames MUST have the END_HEADERS + flag set. The last frame in a sequence of PUSH_PROMISE or + CONTINUATION frames MUST have the END_HEADERS flag set. This allows a + header block to be logically equivalent to a single frame. + + + Header block fragments can only be sent as the payload of HEADERS, + PUSH_PROMISE or CONTINUATION frames, because these frames + carry data that can modify the compression context maintained by a receiver. An endpoint + receiving HEADERS, PUSH_PROMISE or + CONTINUATION frames MUST reassemble header blocks and perform decompression + even if the frames are to be discarded. A receiver MUST terminate the connection with a + connection error of type + COMPRESSION_ERROR if it does not decompress a header block. + +
    +
    + +
    + + A "stream" is an independent, bi-directional sequence of frames exchanged between the client + and server within an HTTP/2 connection. Streams have several important characteristics: + + + A single HTTP/2 connection can contain multiple concurrently open streams, with either + endpoint interleaving frames from multiple streams. + + + Streams can be established and used unilaterally or shared by either the client or + server. + + + Streams can be closed by either endpoint. + + + The order in which frames are sent on a stream is significant. Recipients process frames + in the order they are received. In particular, the order of HEADERS, + and DATA frames is semantically significant. + + + Streams are identified by an integer. Stream identifiers are assigned to streams by the + endpoint initiating the stream. + + + + +
    + + The lifecycle of a stream is shown in . + + +
    + + | |<-----------' | + | R | closed | R | + `-------------------->| |<--------------------' + +--------+ + + H: HEADERS frame (with implied CONTINUATIONs) + PP: PUSH_PROMISE frame (with implied CONTINUATIONs) + ES: END_STREAM flag + R: RST_STREAM frame +]]> + +
    + + + Note that this diagram shows stream state transitions and the frames and flags that affect + those transitions only. In this regard, CONTINUATION frames do not result + in state transitions; they are effectively part of the HEADERS or + PUSH_PROMISE that they follow. For this purpose, the END_STREAM flag is + processed as a separate event to the frame that bears it; a HEADERS frame + with the END_STREAM flag set can cause two state transitions. + + + Both endpoints have a subjective view of the state of a stream that could be different + when frames are in transit. Endpoints do not coordinate the creation of streams; they are + created unilaterally by either endpoint. The negative consequences of a mismatch in + states are limited to the "closed" state after sending RST_STREAM, where + frames might be received for some time after closing. + + + Streams have the following states: + + + + + + All streams start in the "idle" state. In this state, no frames have been + exchanged. + + + The following transitions are valid from this state: + + + Sending or receiving a HEADERS frame causes the stream to become + "open". The stream identifier is selected as described in . The same HEADERS frame can also + cause a stream to immediately become "half closed". + + + Sending a PUSH_PROMISE frame marks the associated stream for + later use. The stream state for the reserved stream transitions to "reserved + (local)". + + + Receiving a PUSH_PROMISE frame marks the associated stream as + reserved by the remote peer. The state of the stream becomes "reserved + (remote)". + + + + + Receiving any frames other than HEADERS or + PUSH_PROMISE on a stream in this state MUST be treated as a connection error of type + PROTOCOL_ERROR. + + + + + + + A stream in the "reserved (local)" state is one that has been promised by sending a + PUSH_PROMISE frame. A PUSH_PROMISE frame reserves an + idle stream by associating the stream with an open stream that was initiated by the + remote peer (see ). + + + In this state, only the following transitions are possible: + + + The endpoint can send a HEADERS frame. This causes the stream to + open in a "half closed (remote)" state. + + + Either endpoint can send a RST_STREAM frame to cause the stream + to become "closed". This releases the stream reservation. + + + + + An endpoint MUST NOT send any type of frame other than HEADERS or + RST_STREAM in this state. + + + A PRIORITY frame MAY be received in this state. Receiving any type + of frame other than RST_STREAM or PRIORITY on a stream + in this state MUST be treated as a connection + error of type PROTOCOL_ERROR. + + + + + + + A stream in the "reserved (remote)" state has been reserved by a remote peer. + + + In this state, only the following transitions are possible: + + + Receiving a HEADERS frame causes the stream to transition to + "half closed (local)". + + + Either endpoint can send a RST_STREAM frame to cause the stream + to become "closed". This releases the stream reservation. + + + + + An endpoint MAY send a PRIORITY frame in this state to reprioritize + the reserved stream. An endpoint MUST NOT send any type of frame other than + RST_STREAM, WINDOW_UPDATE, or PRIORITY + in this state. + + + Receiving any type of frame other than HEADERS or + RST_STREAM on a stream in this state MUST be treated as a connection error of type + PROTOCOL_ERROR. + + + + + + + A stream in the "open" state may be used by both peers to send frames of any type. + In this state, sending peers observe advertised stream + level flow control limits. + + + From this state either endpoint can send a frame with an END_STREAM flag set, which + causes the stream to transition into one of the "half closed" states: an endpoint + sending an END_STREAM flag causes the stream state to become "half closed (local)"; + an endpoint receiving an END_STREAM flag causes the stream state to become "half + closed (remote)". + + + Either endpoint can send a RST_STREAM frame from this state, causing + it to transition immediately to "closed". + + + + + + + A stream that is in the "half closed (local)" state cannot be used for sending + frames. Only WINDOW_UPDATE, PRIORITY and + RST_STREAM frames can be sent in this state. + + + A stream transitions from this state to "closed" when a frame that contains an + END_STREAM flag is received, or when either peer sends a RST_STREAM + frame. + + + A receiver can ignore WINDOW_UPDATE frames in this state, which might + arrive for a short period after a frame bearing the END_STREAM flag is sent. + + + PRIORITY frames received in this state are used to reprioritize + streams that depend on the current stream. + + + + + + + A stream that is "half closed (remote)" is no longer being used by the peer to send + frames. In this state, an endpoint is no longer obligated to maintain a receiver + flow control window if it performs flow control. + + + If an endpoint receives additional frames for a stream that is in this state, other + than WINDOW_UPDATE, PRIORITY or + RST_STREAM, it MUST respond with a stream error of type + STREAM_CLOSED. + + + A stream that is "half closed (remote)" can be used by the endpoint to send frames + of any type. In this state, the endpoint continues to observe advertised stream level flow control limits. + + + A stream can transition from this state to "closed" by sending a frame that contains + an END_STREAM flag, or when either peer sends a RST_STREAM frame. + + + + + + + The "closed" state is the terminal state. + + + An endpoint MUST NOT send frames other than PRIORITY on a closed + stream. An endpoint that receives any frame other than PRIORITY + after receiving a RST_STREAM MUST treat that as a stream error of type + STREAM_CLOSED. Similarly, an endpoint that receives any frames after + receiving a frame with the END_STREAM flag set MUST treat that as a connection error of type + STREAM_CLOSED, unless the frame is permitted as described below. + + + WINDOW_UPDATE or RST_STREAM frames can be received in + this state for a short period after a DATA or HEADERS + frame containing an END_STREAM flag is sent. Until the remote peer receives and + processes RST_STREAM or the frame bearing the END_STREAM flag, it + might send frames of these types. Endpoints MUST ignore + WINDOW_UPDATE or RST_STREAM frames received in this + state, though endpoints MAY choose to treat frames that arrive a significant time + after sending END_STREAM as a connection + error of type PROTOCOL_ERROR. + + + PRIORITY frames can be sent on closed streams to prioritize streams + that are dependent on the closed stream. Endpoints SHOULD process + PRIORITY frame, though they can be ignored if the stream has been + removed from the dependency tree (see ). + + + If this state is reached as a result of sending a RST_STREAM frame, + the peer that receives the RST_STREAM might have already sent - or + enqueued for sending - frames on the stream that cannot be withdrawn. An endpoint + MUST ignore frames that it receives on closed streams after it has sent a + RST_STREAM frame. An endpoint MAY choose to limit the period over + which it ignores frames and treat frames that arrive after this time as being in + error. + + + Flow controlled frames (i.e., DATA) received after sending + RST_STREAM are counted toward the connection flow control window. + Even though these frames might be ignored, because they are sent before the sender + receives the RST_STREAM, the sender will consider the frames to count + against the flow control window. + + + An endpoint might receive a PUSH_PROMISE frame after it sends + RST_STREAM. PUSH_PROMISE causes a stream to become + "reserved" even if the associated stream has been reset. Therefore, a + RST_STREAM is needed to close an unwanted promised stream. + + + + + + In the absence of more specific guidance elsewhere in this document, implementations + SHOULD treat the receipt of a frame that is not expressly permitted in the description of + a state as a connection error of type + PROTOCOL_ERROR. Frame of unknown types are ignored. + + + An example of the state transitions for an HTTP request/response exchange can be found in + . An example of the state transitions for server push can be + found in and . + + +
    + + Streams are identified with an unsigned 31-bit integer. Streams initiated by a client + MUST use odd-numbered stream identifiers; those initiated by the server MUST use + even-numbered stream identifiers. A stream identifier of zero (0x0) is used for + connection control messages; the stream identifier zero cannot be used to establish a + new stream. + + + HTTP/1.1 requests that are upgraded to HTTP/2 (see ) are + responded to with a stream identifier of one (0x1). After the upgrade + completes, stream 0x1 is "half closed (local)" to the client. Therefore, stream 0x1 + cannot be selected as a new stream identifier by a client that upgrades from HTTP/1.1. + + + The identifier of a newly established stream MUST be numerically greater than all + streams that the initiating endpoint has opened or reserved. This governs streams that + are opened using a HEADERS frame and streams that are reserved using + PUSH_PROMISE. An endpoint that receives an unexpected stream identifier + MUST respond with a connection error of + type PROTOCOL_ERROR. + + + The first use of a new stream identifier implicitly closes all streams in the "idle" + state that might have been initiated by that peer with a lower-valued stream identifier. + For example, if a client sends a HEADERS frame on stream 7 without ever + sending a frame on stream 5, then stream 5 transitions to the "closed" state when the + first frame for stream 7 is sent or received. + + + Stream identifiers cannot be reused. Long-lived connections can result in an endpoint + exhausting the available range of stream identifiers. A client that is unable to + establish a new stream identifier can establish a new connection for new streams. A + server that is unable to establish a new stream identifier can send a + GOAWAY frame so that the client is forced to open a new connection for + new streams. + +
    + +
    + + A peer can limit the number of concurrently active streams using the + SETTINGS_MAX_CONCURRENT_STREAMS parameter (see ) within a SETTINGS frame. The maximum concurrent + streams setting is specific to each endpoint and applies only to the peer that receives + the setting. That is, clients specify the maximum number of concurrent streams the + server can initiate, and servers specify the maximum number of concurrent streams the + client can initiate. + + + Streams that are in the "open" state, or either of the "half closed" states count toward + the maximum number of streams that an endpoint is permitted to open. Streams in any of + these three states count toward the limit advertised in the + SETTINGS_MAX_CONCURRENT_STREAMS setting. Streams in either of the + "reserved" states do not count toward the stream limit. + + + Endpoints MUST NOT exceed the limit set by their peer. An endpoint that receives a + HEADERS frame that causes their advertised concurrent stream limit to be + exceeded MUST treat this as a stream error. An + endpoint that wishes to reduce the value of + SETTINGS_MAX_CONCURRENT_STREAMS to a value that is below the current + number of open streams can either close streams that exceed the new value or allow + streams to complete. + +
    +
    + +
    + + Using streams for multiplexing introduces contention over use of the TCP connection, + resulting in blocked streams. A flow control scheme ensures that streams on the same + connection do not destructively interfere with each other. Flow control is used for both + individual streams and for the connection as a whole. + + + HTTP/2 provides for flow control through use of the WINDOW_UPDATE frame. + + +
    + + HTTP/2 stream flow control aims to allow a variety of flow control algorithms to be + used without requiring protocol changes. Flow control in HTTP/2 has the following + characteristics: + + + Flow control is specific to a connection; i.e., it is "hop-by-hop", not + "end-to-end". + + + Flow control is based on window update frames. Receivers advertise how many octets + they are prepared to receive on a stream and for the entire connection. This is a + credit-based scheme. + + + Flow control is directional with overall control provided by the receiver. A + receiver MAY choose to set any window size that it desires for each stream and for + the entire connection. A sender MUST respect flow control limits imposed by a + receiver. Clients, servers and intermediaries all independently advertise their + flow control window as a receiver and abide by the flow control limits set by + their peer when sending. + + + The initial value for the flow control window is 65,535 octets for both new streams + and the overall connection. + + + The frame type determines whether flow control applies to a frame. Of the frames + specified in this document, only DATA frames are subject to flow + control; all other frame types do not consume space in the advertised flow control + window. This ensures that important control frames are not blocked by flow control. + + + Flow control cannot be disabled. + + + HTTP/2 defines only the format and semantics of the WINDOW_UPDATE + frame (). This document does not stipulate how a + receiver decides when to send this frame or the value that it sends, nor does it + specify how a sender chooses to send packets. Implementations are able to select + any algorithm that suits their needs. + + + + + Implementations are also responsible for managing how requests and responses are sent + based on priority; choosing how to avoid head of line blocking for requests; and + managing the creation of new streams. Algorithm choices for these could interact with + any flow control algorithm. + +
    + +
    + + Flow control is defined to protect endpoints that are operating under resource + constraints. For example, a proxy needs to share memory between many connections, and + also might have a slow upstream connection and a fast downstream one. Flow control + addresses cases where the receiver is unable process data on one stream, yet wants to + continue to process other streams in the same connection. + + + Deployments that do not require this capability can advertise a flow control window of + the maximum size, incrementing the available space when new data is received. This + effectively disables flow control for that receiver. Conversely, a sender is always + subject to the flow control window advertised by the receiver. + + + Deployments with constrained resources (for example, memory) can employ flow control to + limit the amount of memory a peer can consume. Note, however, that this can lead to + suboptimal use of available network resources if flow control is enabled without + knowledge of the bandwidth-delay product (see ). + + + Even with full awareness of the current bandwidth-delay product, implementation of flow + control can be difficult. When using flow control, the receiver MUST read from the TCP + receive buffer in a timely fashion. Failure to do so could lead to a deadlock when + critical frames, such as WINDOW_UPDATE, are not read and acted upon. + +
    +
    + +
    + + A client can assign a priority for a new stream by including prioritization information in + the HEADERS frame that opens the stream. For an existing + stream, the PRIORITY frame can be used to change the + priority. + + + The purpose of prioritization is to allow an endpoint to express how it would prefer its + peer allocate resources when managing concurrent streams. Most importantly, priority can + be used to select streams for transmitting frames when there is limited capacity for + sending. + + + Streams can be prioritized by marking them as dependent on the completion of other streams + (). Each dependency is assigned a relative weight, a number + that is used to determine the relative proportion of available resources that are assigned + to streams dependent on the same stream. + + + + Explicitly setting the priority for a stream is input to a prioritization process. It + does not guarantee any particular processing or transmission order for the stream relative + to any other stream. An endpoint cannot force a peer to process concurrent streams in a + particular order using priority. Expressing priority is therefore only ever a suggestion. + + + Providing prioritization information is optional, so default values are used if no + explicit indicator is provided (). + + +
    + + Each stream can be given an explicit dependency on another stream. Including a + dependency expresses a preference to allocate resources to the identified stream rather + than to the dependent stream. + + + A stream that is not dependent on any other stream is given a stream dependency of 0x0. + In other words, the non-existent stream 0 forms the root of the tree. + + + A stream that depends on another stream is a dependent stream. The stream upon which a + stream is dependent is a parent stream. A dependency on a stream that is not currently + in the tree - such as a stream in the "idle" state - results in that stream being given + a default priority. + + + When assigning a dependency on another stream, the stream is added as a new dependency + of the parent stream. Dependent streams that share the same parent are not ordered with + respect to each other. For example, if streams B and C are dependent on stream A, and + if stream D is created with a dependency on stream A, this results in a dependency order + of A followed by B, C, and D in any order. + +
    + /|\ + B C B D C +]]> +
    + + An exclusive flag allows for the insertion of a new level of dependencies. The + exclusive flag causes the stream to become the sole dependency of its parent stream, + causing other dependencies to become dependent on the exclusive stream. In the + previous example, if stream D is created with an exclusive dependency on stream A, this + results in D becoming the dependency parent of B and C. + +
    + D + B C / \ + B C +]]> +
    + + Inside the dependency tree, a dependent stream SHOULD only be allocated resources if all + of the streams that it depends on (the chain of parent streams up to 0x0) are either + closed, or it is not possible to make progress on them. + + + A stream cannot depend on itself. An endpoint MUST treat this as a stream error of type PROTOCOL_ERROR. + +
    + +
    + + All dependent streams are allocated an integer weight between 1 and 256 (inclusive). + + + Streams with the same parent SHOULD be allocated resources proportionally based on their + weight. Thus, if stream B depends on stream A with weight 4, and C depends on stream A + with weight 12, and if no progress can be made on A, stream B ideally receives one third + of the resources allocated to stream C. + +
    + +
    + + Stream priorities are changed using the PRIORITY frame. Setting a + dependency causes a stream to become dependent on the identified parent stream. + + + Dependent streams move with their parent stream if the parent is reprioritized. Setting + a dependency with the exclusive flag for a reprioritized stream moves all the + dependencies of the new parent stream to become dependent on the reprioritized stream. + + + If a stream is made dependent on one of its own dependencies, the formerly dependent + stream is first moved to be dependent on the reprioritized stream's previous parent. + The moved dependency retains its weight. + +
    + + For example, consider an original dependency tree where B and C depend on A, D and E + depend on C, and F depends on D. If A is made dependent on D, then D takes the place + of A. All other dependency relationships stay the same, except for F, which becomes + dependent on A if the reprioritization is exclusive. + + F B C ==> F A OR A + / \ | / \ /|\ + D E E B C B C F + | | | + F E E + (intermediate) (non-exclusive) (exclusive) +]]> +
    +
    + +
    + + When a stream is removed from the dependency tree, its dependencies can be moved to + become dependent on the parent of the closed stream. The weights of new dependencies + are recalculated by distributing the weight of the dependency of the closed stream + proportionally based on the weights of its dependencies. + + + Streams that are removed from the dependency tree cause some prioritization information + to be lost. Resources are shared between streams with the same parent stream, which + means that if a stream in that set closes or becomes blocked, any spare capacity + allocated to a stream is distributed to the immediate neighbors of the stream. However, + if the common dependency is removed from the tree, those streams share resources with + streams at the next highest level. + + + For example, assume streams A and B share a parent, and streams C and D both depend on + stream A. Prior to the removal of stream A, if streams A and D are unable to proceed, + then stream C receives all the resources dedicated to stream A. If stream A is removed + from the tree, the weight of stream A is divided between streams C and D. If stream D + is still unable to proceed, this results in stream C receiving a reduced proportion of + resources. For equal starting weights, C receives one third, rather than one half, of + available resources. + + + It is possible for a stream to become closed while prioritization information that + creates a dependency on that stream is in transit. If a stream identified in a + dependency has no associated priority information, then the dependent stream is instead + assigned a default priority. This potentially creates + suboptimal prioritization, since the stream could be given a priority that is different + to what is intended. + + + To avoid these problems, an endpoint SHOULD retain stream prioritization state for a + period after streams become closed. The longer state is retained, the lower the chance + that streams are assigned incorrect or default priority values. + + + This could create a large state burden for an endpoint, so this state MAY be limited. + An endpoint MAY apply a fixed upper limit on the number of closed streams for which + prioritization state is tracked to limit state exposure. The amount of additional state + an endpoint maintains could be dependent on load; under high load, prioritization state + can be discarded to limit resource commitments. In extreme cases, an endpoint could + even discard prioritization state for active or reserved streams. If a fixed limit is + applied, endpoints SHOULD maintain state for at least as many streams as allowed by + their setting for SETTINGS_MAX_CONCURRENT_STREAMS. + + + An endpoint receiving a PRIORITY frame that changes the priority of a + closed stream SHOULD alter the dependencies of the streams that depend on it, if it has + retained enough state to do so. + +
    + +
    + + Providing priority information is optional. Streams are assigned a non-exclusive + dependency on stream 0x0 by default. Pushed streams + initially depend on their associated stream. In both cases, streams are assigned a + default weight of 16. + +
    +
    + +
    + + HTTP/2 framing permits two classes of error: + + + An error condition that renders the entire connection unusable is a connection error. + + + An error in an individual stream is a stream error. + + + + + A list of error codes is included in . + + +
    + + A connection error is any error which prevents further processing of the framing layer, + or which corrupts any connection state. + + + An endpoint that encounters a connection error SHOULD first send a GOAWAY + frame () with the stream identifier of the last stream that it + successfully received from its peer. The GOAWAY frame includes an error + code that indicates why the connection is terminating. After sending the + GOAWAY frame, the endpoint MUST close the TCP connection. + + + It is possible that the GOAWAY will not be reliably received by the + receiving endpoint (see ). In the event of a connection error, + GOAWAY only provides a best effort attempt to communicate with the peer + about why the connection is being terminated. + + + An endpoint can end a connection at any time. In particular, an endpoint MAY choose to + treat a stream error as a connection error. Endpoints SHOULD send a + GOAWAY frame when ending a connection, providing that circumstances + permit it. + +
    + +
    + + A stream error is an error related to a specific stream that does not affect processing + of other streams. + + + An endpoint that detects a stream error sends a RST_STREAM frame () that contains the stream identifier of the stream where the error + occurred. The RST_STREAM frame includes an error code that indicates the + type of error. + + + A RST_STREAM is the last frame that an endpoint can send on a stream. + The peer that sends the RST_STREAM frame MUST be prepared to receive any + frames that were sent or enqueued for sending by the remote peer. These frames can be + ignored, except where they modify connection state (such as the state maintained for + header compression, or flow control). + + + Normally, an endpoint SHOULD NOT send more than one RST_STREAM frame for + any stream. However, an endpoint MAY send additional RST_STREAM frames if + it receives frames on a closed stream after more than a round-trip time. This behavior + is permitted to deal with misbehaving implementations. + + + An endpoint MUST NOT send a RST_STREAM in response to an + RST_STREAM frame, to avoid looping. + +
    + +
    + + If the TCP connection is closed or reset while streams remain in open or half closed + states, then the endpoint MUST assume that those streams were abnormally interrupted and + could be incomplete. + +
    +
    + +
    + + HTTP/2 permits extension of the protocol. Protocol extensions can be used to provide + additional services or alter any aspect of the protocol, within the limitations described + in this section. Extensions are effective only within the scope of a single HTTP/2 + connection. + + + Extensions are permitted to use new frame types, new + settings, or new error + codes. Registries are established for managing these extension points: frame types, settings and + error codes. + + + Implementations MUST ignore unknown or unsupported values in all extensible protocol + elements. Implementations MUST discard frames that have unknown or unsupported types. + This means that any of these extension points can be safely used by extensions without + prior arrangement or negotiation. However, extension frames that appear in the middle of + a header block are not permitted; these MUST be treated + as a connection error of type + PROTOCOL_ERROR. + + + However, extensions that could change the semantics of existing protocol components MUST + be negotiated before being used. For example, an extension that changes the layout of the + HEADERS frame cannot be used until the peer has given a positive signal + that this is acceptable. In this case, it could also be necessary to coordinate when the + revised layout comes into effect. Note that treating any frame other than + DATA frames as flow controlled is such a change in semantics, and can only + be done through negotiation. + + + This document doesn't mandate a specific method for negotiating the use of an extension, + but notes that a setting could be used for that + purpose. If both peers set a value that indicates willingness to use the extension, then + the extension can be used. If a setting is used for extension negotiation, the initial + value MUST be defined so that the extension is initially disabled. + +
    +
    + +
    + + This specification defines a number of frame types, each identified by a unique 8-bit type + code. Each frame type serves a distinct purpose either in the establishment and management + of the connection as a whole, or of individual streams. + + + The transmission of specific frame types can alter the state of a connection. If endpoints + fail to maintain a synchronized view of the connection state, successful communication + within the connection will no longer be possible. Therefore, it is important that endpoints + have a shared comprehension of how the state is affected by the use any given frame. + + +
    + + DATA frames (type=0x0) convey arbitrary, variable-length sequences of octets associated + with a stream. One or more DATA frames are used, for instance, to carry HTTP request or + response payloads. + + + DATA frames MAY also contain arbitrary padding. Padding can be added to DATA frames to + obscure the size of messages. + +
    + +
    + + The DATA frame contains the following fields: + + + An 8-bit field containing the length of the frame padding in units of octets. This + field is optional and is only present if the PADDED flag is set. + + + Application data. The amount of data is the remainder of the frame payload after + subtracting the length of the other fields that are present. + + + Padding octets that contain no application semantic value. Padding octets MUST be set + to zero when sending and ignored when receiving. + + + + + + The DATA frame defines the following flags: + + + Bit 1 being set indicates that this frame is the last that the endpoint will send for + the identified stream. Setting this flag causes the stream to enter one of the "half closed" states or the "closed" state. + + + Bit 4 being set indicates that the Pad Length field and any padding that it describes + is present. + + + + + DATA frames MUST be associated with a stream. If a DATA frame is received whose stream + identifier field is 0x0, the recipient MUST respond with a connection error of type + PROTOCOL_ERROR. + + + DATA frames are subject to flow control and can only be sent when a stream is in the + "open" or "half closed (remote)" states. The entire DATA frame payload is included in flow + control, including Pad Length and Padding fields if present. If a DATA frame is received + whose stream is not in "open" or "half closed (local)" state, the recipient MUST respond + with a stream error of type + STREAM_CLOSED. + + + The total number of padding octets is determined by the value of the Pad Length field. If + the length of the padding is greater than the length of the frame payload, the recipient + MUST treat this as a connection error of + type PROTOCOL_ERROR. + + + A frame can be increased in size by one octet by including a Pad Length field with a + value of zero. + + + + + Padding is a security feature; see . + +
    + +
    + + The HEADERS frame (type=0x1) is used to open a stream, + and additionally carries a header block fragment. HEADERS frames can be sent on a stream + in the "open" or "half closed (remote)" states. + +
    + +
    + + The HEADERS frame payload has the following fields: + + + An 8-bit field containing the length of the frame padding in units of octets. This + field is only present if the PADDED flag is set. + + + A single bit flag indicates that the stream dependency is exclusive, see . This field is only present if the PRIORITY flag is set. + + + A 31-bit stream identifier for the stream that this stream depends on, see . This field is only present if the PRIORITY flag is set. + + + An 8-bit weight for the stream, see . Add one to the + value to obtain a weight between 1 and 256. This field is only present if the + PRIORITY flag is set. + + + A header block fragment. + + + Padding octets that contain no application semantic value. Padding octets MUST be set + to zero when sending and ignored when receiving. + + + + + + The HEADERS frame defines the following flags: + + + + Bit 1 being set indicates that the header block is + the last that the endpoint will send for the identified stream. Setting this flag + causes the stream to enter one of "half closed" + states. + + + A HEADERS frame carries the END_STREAM flag that signals the end of a stream. + However, a HEADERS frame with the END_STREAM flag set can be followed by + CONTINUATION frames on the same stream. Logically, the + CONTINUATION frames are part of the HEADERS frame. + + + + + Bit 3 being set indicates that this frame contains an entire header block and is not followed by any + CONTINUATION frames. + + + A HEADERS frame without the END_HEADERS flag set MUST be followed by a + CONTINUATION frame for the same stream. A receiver MUST treat the + receipt of any other type of frame or a frame on a different stream as a connection error of type + PROTOCOL_ERROR. + + + + + Bit 4 being set indicates that the Pad Length field and any padding that it + describes is present. + + + + + Bit 6 being set indicates that the Exclusive Flag (E), Stream Dependency, and Weight + fields are present; see . + + + + + + + The payload of a HEADERS frame contains a header block + fragment. A header block that does not fit within a HEADERS frame is continued in + a CONTINUATION frame. + + + + HEADERS frames MUST be associated with a stream. If a HEADERS frame is received whose + stream identifier field is 0x0, the recipient MUST respond with a connection error of type + PROTOCOL_ERROR. + + + + The HEADERS frame changes the connection state as described in . + + + + The HEADERS frame includes optional padding. Padding fields and flags are identical to + those defined for DATA frames. + + + Prioritization information in a HEADERS frame is logically equivalent to a separate + PRIORITY frame, but inclusion in HEADERS avoids the potential for churn in + stream prioritization when new streams are created. Priorization fields in HEADERS frames + subsequent to the first on a stream reprioritize the + stream. + +
    + +
    + + The PRIORITY frame (type=0x2) specifies the sender-advised + priority of a stream. It can be sent at any time for an existing stream, including + closed streams. This enables reprioritization of existing streams. + +
    + +
    + + The payload of a PRIORITY frame contains the following fields: + + + A single bit flag indicates that the stream dependency is exclusive, see . + + + A 31-bit stream identifier for the stream that this stream depends on, see . + + + An 8-bit weight for the identified stream dependency, see . Add one to the value to obtain a weight between 1 and 256. + + + + + + The PRIORITY frame does not define any flags. + + + + The PRIORITY frame is associated with an existing stream. If a PRIORITY frame is received + with a stream identifier of 0x0, the recipient MUST respond with a connection error of type + PROTOCOL_ERROR. + + + The PRIORITY frame can be sent on a stream in any of the "reserved (remote)", "open", + "half closed (local)", "half closed (remote)", or "closed" states, though it cannot be + sent between consecutive frames that comprise a single header + block. Note that this frame could arrive after processing or frame sending has + completed, which would cause it to have no effect on the current stream. For a stream + that is in the "half closed (remote)" or "closed" - state, this frame can only affect + processing of the current stream and not frame transmission. + + + The PRIORITY frame is the only frame that can be sent for a stream in the "closed" state. + This allows for the reprioritization of a group of dependent streams by altering the + priority of a parent stream, which might be closed. However, a PRIORITY frame sent on a + closed stream risks being ignored due to the peer having discarded priority state + information for that stream. + +
    + +
    + + The RST_STREAM frame (type=0x3) allows for abnormal termination of a stream. When sent by + the initiator of a stream, it indicates that they wish to cancel the stream or that an + error condition has occurred. When sent by the receiver of a stream, it indicates that + either the receiver is rejecting the stream, requesting that the stream be cancelled, or + that an error condition has occurred. + +
    + +
    + + + The RST_STREAM frame contains a single unsigned, 32-bit integer identifying the error code. The error code indicates why the stream is being + terminated. + + + + The RST_STREAM frame does not define any flags. + + + + The RST_STREAM frame fully terminates the referenced stream and causes it to enter the + closed state. After receiving a RST_STREAM on a stream, the receiver MUST NOT send + additional frames for that stream, with the exception of PRIORITY. However, + after sending the RST_STREAM, the sending endpoint MUST be prepared to receive and process + additional frames sent on the stream that might have been sent by the peer prior to the + arrival of the RST_STREAM. + + + + RST_STREAM frames MUST be associated with a stream. If a RST_STREAM frame is received + with a stream identifier of 0x0, the recipient MUST treat this as a connection error of type + PROTOCOL_ERROR. + + + + RST_STREAM frames MUST NOT be sent for a stream in the "idle" state. If a RST_STREAM + frame identifying an idle stream is received, the recipient MUST treat this as a connection error of type + PROTOCOL_ERROR. + + +
    + +
    + + The SETTINGS frame (type=0x4) conveys configuration parameters that affect how endpoints + communicate, such as preferences and constraints on peer behavior. The SETTINGS frame is + also used to acknowledge the receipt of those parameters. Individually, a SETTINGS + parameter can also be referred to as a "setting". + + + SETTINGS parameters are not negotiated; they describe characteristics of the sending peer, + which are used by the receiving peer. Different values for the same parameter can be + advertised by each peer. For example, a client might set a high initial flow control + window, whereas a server might set a lower value to conserve resources. + + + + A SETTINGS frame MUST be sent by both endpoints at the start of a connection, and MAY be + sent at any other time by either endpoint over the lifetime of the connection. + Implementations MUST support all of the parameters defined by this specification. + + + + Each parameter in a SETTINGS frame replaces any existing value for that parameter. + Parameters are processed in the order in which they appear, and a receiver of a SETTINGS + frame does not need to maintain any state other than the current value of its + parameters. Therefore, the value of a SETTINGS parameter is the last value that is seen by + a receiver. + + + SETTINGS parameters are acknowledged by the receiving peer. To enable this, the SETTINGS + frame defines the following flag: + + + Bit 1 being set indicates that this frame acknowledges receipt and application of the + peer's SETTINGS frame. When this bit is set, the payload of the SETTINGS frame MUST + be empty. Receipt of a SETTINGS frame with the ACK flag set and a length field value + other than 0 MUST be treated as a connection + error of type FRAME_SIZE_ERROR. For more info, see Settings Synchronization. + + + + + SETTINGS frames always apply to a connection, never a single stream. The stream + identifier for a SETTINGS frame MUST be zero (0x0). If an endpoint receives a SETTINGS + frame whose stream identifier field is anything other than 0x0, the endpoint MUST respond + with a connection error of type + PROTOCOL_ERROR. + + + The SETTINGS frame affects connection state. A badly formed or incomplete SETTINGS frame + MUST be treated as a connection error of type + PROTOCOL_ERROR. + + +
    + + The payload of a SETTINGS frame consists of zero or more parameters, each consisting of + an unsigned 16-bit setting identifier and an unsigned 32-bit value. + + +
    + +
    +
    + +
    + + The following parameters are defined: + + + + Allows the sender to inform the remote endpoint of the maximum size of the header + compression table used to decode header blocks, in octets. The encoder can select + any size equal to or less than this value by using signaling specific to the + header compression format inside a header block. The initial value is 4,096 + octets. + + + + + This setting can be use to disable server + push. An endpoint MUST NOT send a PUSH_PROMISE frame if it + receives this parameter set to a value of 0. An endpoint that has both set this + parameter to 0 and had it acknowledged MUST treat the receipt of a + PUSH_PROMISE frame as a connection error of type + PROTOCOL_ERROR. + + + The initial value is 1, which indicates that server push is permitted. Any value + other than 0 or 1 MUST be treated as a connection error of type + PROTOCOL_ERROR. + + + + + Indicates the maximum number of concurrent streams that the sender will allow. + This limit is directional: it applies to the number of streams that the sender + permits the receiver to create. Initially there is no limit to this value. It is + recommended that this value be no smaller than 100, so as to not unnecessarily + limit parallelism. + + + A value of 0 for SETTINGS_MAX_CONCURRENT_STREAMS SHOULD NOT be treated as special + by endpoints. A zero value does prevent the creation of new streams, however this + can also happen for any limit that is exhausted with active streams. Servers + SHOULD only set a zero value for short durations; if a server does not wish to + accept requests, closing the connection could be preferable. + + + + + Indicates the sender's initial window size (in octets) for stream level flow + control. The initial value is 216-1 (65,535) octets. + + + This setting affects the window size of all streams, including existing streams, + see . + + + Values above the maximum flow control window size of 231-1 MUST + be treated as a connection error of + type FLOW_CONTROL_ERROR. + + + + + Indicates the size of the largest frame payload that the sender is willing to + receive, in octets. + + + The initial value is 214 (16,384) octets. The value advertised by + an endpoint MUST be between this initial value and the maximum allowed frame size + (224-1 or 16,777,215 octets), inclusive. Values outside this range + MUST be treated as a connection error + of type PROTOCOL_ERROR. + + + + + This advisory setting informs a peer of the maximum size of header list that the + sender is prepared to accept, in octets. The value is based on the uncompressed + size of header fields, including the length of the name and value in octets plus + an overhead of 32 octets for each header field. + + + For any given request, a lower limit than what is advertised MAY be enforced. The + initial value of this setting is unlimited. + + + + + + An endpoint that receives a SETTINGS frame with any unknown or unsupported identifier + MUST ignore that setting. + +
    + +
    + + Most values in SETTINGS benefit from or require an understanding of when the peer has + received and applied the changed parameter values. In order to provide + such synchronization timepoints, the recipient of a SETTINGS frame in which the ACK flag + is not set MUST apply the updated parameters as soon as possible upon receipt. + + + The values in the SETTINGS frame MUST be processed in the order they appear, with no + other frame processing between values. Unsupported parameters MUST be ignored. Once + all values have been processed, the recipient MUST immediately emit a SETTINGS frame + with the ACK flag set. Upon receiving a SETTINGS frame with the ACK flag set, the sender + of the altered parameters can rely on the setting having been applied. + + + If the sender of a SETTINGS frame does not receive an acknowledgement within a + reasonable amount of time, it MAY issue a connection error of type + SETTINGS_TIMEOUT. + +
    +
    + +
    + + The PUSH_PROMISE frame (type=0x5) is used to notify the peer endpoint in advance of + streams the sender intends to initiate. The PUSH_PROMISE frame includes the unsigned + 31-bit identifier of the stream the endpoint plans to create along with a set of headers + that provide additional context for the stream. contains a + thorough description of the use of PUSH_PROMISE frames. + + +
    + +
    + + The PUSH_PROMISE frame payload has the following fields: + + + An 8-bit field containing the length of the frame padding in units of octets. This + field is only present if the PADDED flag is set. + + + A single reserved bit. + + + An unsigned 31-bit integer that identifies the stream that is reserved by the + PUSH_PROMISE. The promised stream identifier MUST be a valid choice for the next + stream sent by the sender (see new stream + identifier). + + + A header block fragment containing request header + fields. + + + Padding octets. + + + + + + The PUSH_PROMISE frame defines the following flags: + + + + Bit 3 being set indicates that this frame contains an entire header block and is not followed by any + CONTINUATION frames. + + + A PUSH_PROMISE frame without the END_HEADERS flag set MUST be followed by a + CONTINUATION frame for the same stream. A receiver MUST treat the receipt of any + other type of frame or a frame on a different stream as a connection error of type + PROTOCOL_ERROR. + + + + + Bit 4 being set indicates that the Pad Length field and any padding that it + describes is present. + + + + + + + PUSH_PROMISE frames MUST be associated with an existing, peer-initiated stream. The stream + identifier of a PUSH_PROMISE frame indicates the stream it is associated with. If the + stream identifier field specifies the value 0x0, a recipient MUST respond with a connection error of type + PROTOCOL_ERROR. + + + + Promised streams are not required to be used in the order they are promised. The + PUSH_PROMISE only reserves stream identifiers for later use. + + + + PUSH_PROMISE MUST NOT be sent if the SETTINGS_ENABLE_PUSH setting of the + peer endpoint is set to 0. An endpoint that has set this setting and has received + acknowledgement MUST treat the receipt of a PUSH_PROMISE frame as a connection error of type + PROTOCOL_ERROR. + + + Recipients of PUSH_PROMISE frames can choose to reject promised streams by returning a + RST_STREAM referencing the promised stream identifier back to the sender of + the PUSH_PROMISE. + + + + A PUSH_PROMISE frame modifies the connection state in two ways. The inclusion of a header block potentially modifies the state maintained for + header compression. PUSH_PROMISE also reserves a stream for later use, causing the + promised stream to enter the "reserved" state. A sender MUST NOT send a PUSH_PROMISE on a + stream unless that stream is either "open" or "half closed (remote)"; the sender MUST + ensure that the promised stream is a valid choice for a new stream identifier (that is, the promised stream MUST + be in the "idle" state). + + + Since PUSH_PROMISE reserves a stream, ignoring a PUSH_PROMISE frame causes the stream + state to become indeterminate. A receiver MUST treat the receipt of a PUSH_PROMISE on a + stream that is neither "open" nor "half closed (local)" as a connection error of type + PROTOCOL_ERROR. However, an endpoint that has sent + RST_STREAM on the associated stream MUST handle PUSH_PROMISE frames that + might have been created before the RST_STREAM frame is received and + processed. + + + A receiver MUST treat the receipt of a PUSH_PROMISE that promises an illegal stream identifier (that is, an identifier for a + stream that is not currently in the "idle" state) as a connection error of type + PROTOCOL_ERROR. + + + + The PUSH_PROMISE frame includes optional padding. Padding fields and flags are identical + to those defined for DATA frames. + +
    + +
    + + The PING frame (type=0x6) is a mechanism for measuring a minimal round trip time from the + sender, as well as determining whether an idle connection is still functional. PING + frames can be sent from any endpoint. + +
    + +
    + + + In addition to the frame header, PING frames MUST contain 8 octets of data in the payload. + A sender can include any value it chooses and use those bytes in any fashion. + + + Receivers of a PING frame that does not include an ACK flag MUST send a PING frame with + the ACK flag set in response, with an identical payload. PING responses SHOULD be given + higher priority than any other frame. + + + + The PING frame defines the following flags: + + + Bit 1 being set indicates that this PING frame is a PING response. An endpoint MUST + set this flag in PING responses. An endpoint MUST NOT respond to PING frames + containing this flag. + + + + + PING frames are not associated with any individual stream. If a PING frame is received + with a stream identifier field value other than 0x0, the recipient MUST respond with a + connection error of type + PROTOCOL_ERROR. + + + Receipt of a PING frame with a length field value other than 8 MUST be treated as a connection error of type + FRAME_SIZE_ERROR. + + +
    + +
    + + The GOAWAY frame (type=0x7) informs the remote peer to stop creating streams on this + connection. GOAWAY can be sent by either the client or the server. Once sent, the sender + will ignore frames sent on any new streams with identifiers higher than the included last + stream identifier. Receivers of a GOAWAY frame MUST NOT open additional streams on the + connection, although a new connection can be established for new streams. + + + The purpose of this frame is to allow an endpoint to gracefully stop accepting new + streams, while still finishing processing of previously established streams. This enables + administrative actions, like server maintainance. + + + There is an inherent race condition between an endpoint starting new streams and the + remote sending a GOAWAY frame. To deal with this case, the GOAWAY contains the stream + identifier of the last peer-initiated stream which was or might be processed on the + sending endpoint in this connection. For instance, if the server sends a GOAWAY frame, + the identified stream is the highest numbered stream initiated by the client. + + + If the receiver of the GOAWAY has sent data on streams with a higher stream identifier + than what is indicated in the GOAWAY frame, those streams are not or will not be + processed. The receiver of the GOAWAY frame can treat the streams as though they had + never been created at all, thereby allowing those streams to be retried later on a new + connection. + + + Endpoints SHOULD always send a GOAWAY frame before closing a connection so that the remote + can know whether a stream has been partially processed or not. For example, if an HTTP + client sends a POST at the same time that a server closes a connection, the client cannot + know if the server started to process that POST request if the server does not send a + GOAWAY frame to indicate what streams it might have acted on. + + + An endpoint might choose to close a connection without sending GOAWAY for misbehaving + peers. + + +
    + +
    + + The GOAWAY frame does not define any flags. + + + The GOAWAY frame applies to the connection, not a specific stream. An endpoint MUST treat + a GOAWAY frame with a stream identifier other than 0x0 as a connection error of type + PROTOCOL_ERROR. + + + The last stream identifier in the GOAWAY frame contains the highest numbered stream + identifier for which the sender of the GOAWAY frame might have taken some action on, or + might yet take action on. All streams up to and including the identified stream might + have been processed in some way. The last stream identifier can be set to 0 if no streams + were processed. + + + In this context, "processed" means that some data from the stream was passed to some + higher layer of software that might have taken some action as a result. + + + If a connection terminates without a GOAWAY frame, the last stream identifier is + effectively the highest possible stream identifier. + + + On streams with lower or equal numbered identifiers that were not closed completely prior + to the connection being closed, re-attempting requests, transactions, or any protocol + activity is not possible, with the exception of idempotent actions like HTTP GET, PUT, or + DELETE. Any protocol activity that uses higher numbered streams can be safely retried + using a new connection. + + + Activity on streams numbered lower or equal to the last stream identifier might still + complete successfully. The sender of a GOAWAY frame might gracefully shut down a + connection by sending a GOAWAY frame, maintaining the connection in an open state until + all in-progress streams complete. + + + An endpoint MAY send multiple GOAWAY frames if circumstances change. For instance, an + endpoint that sends GOAWAY with NO_ERROR during graceful shutdown could + subsequently encounter an condition that requires immediate termination of the connection. + The last stream identifier from the last GOAWAY frame received indicates which streams + could have been acted upon. Endpoints MUST NOT increase the value they send in the last + stream identifier, since the peers might already have retried unprocessed requests on + another connection. + + + A client that is unable to retry requests loses all requests that are in flight when the + server closes the connection. This is especially true for intermediaries that might + not be serving clients using HTTP/2. A server that is attempting to gracefully shut down + a connection SHOULD send an initial GOAWAY frame with the last stream identifier set to + 231-1 and a NO_ERROR code. This signals to the client that + a shutdown is imminent and that no further requests can be initiated. After waiting at + least one round trip time, the server can send another GOAWAY frame with an updated last + stream identifier. This ensures that a connection can be cleanly shut down without losing + requests. + + + + After sending a GOAWAY frame, the sender can discard frames for streams with identifiers + higher than the identified last stream. However, any frames that alter connection state + cannot be completely ignored. For instance, HEADERS, + PUSH_PROMISE and CONTINUATION frames MUST be minimally + processed to ensure the state maintained for header compression is consistent (see ); similarly DATA frames MUST be counted toward the connection flow + control window. Failure to process these frames can cause flow control or header + compression state to become unsynchronized. + + + + The GOAWAY frame also contains a 32-bit error code that + contains the reason for closing the connection. + + + Endpoints MAY append opaque data to the payload of any GOAWAY frame. Additional debug + data is intended for diagnostic purposes only and carries no semantic value. Debug + information could contain security- or privacy-sensitive data. Logged or otherwise + persistently stored debug data MUST have adequate safeguards to prevent unauthorized + access. + +
    + +
    + + The WINDOW_UPDATE frame (type=0x8) is used to implement flow control; see for an overview. + + + Flow control operates at two levels: on each individual stream and on the entire + connection. + + + Both types of flow control are hop-by-hop; that is, only between the two endpoints. + Intermediaries do not forward WINDOW_UPDATE frames between dependent connections. + However, throttling of data transfer by any receiver can indirectly cause the propagation + of flow control information toward the original sender. + + + Flow control only applies to frames that are identified as being subject to flow control. + Of the frame types defined in this document, this includes only DATA frames. + Frames that are exempt from flow control MUST be accepted and processed, unless the + receiver is unable to assign resources to handling the frame. A receiver MAY respond with + a stream error or connection error of type + FLOW_CONTROL_ERROR if it is unable to accept a frame. + +
    + +
    + + The payload of a WINDOW_UPDATE frame is one reserved bit, plus an unsigned 31-bit integer + indicating the number of octets that the sender can transmit in addition to the existing + flow control window. The legal range for the increment to the flow control window is 1 to + 231-1 (0x7fffffff) octets. + + + The WINDOW_UPDATE frame does not define any flags. + + + The WINDOW_UPDATE frame can be specific to a stream or to the entire connection. In the + former case, the frame's stream identifier indicates the affected stream; in the latter, + the value "0" indicates that the entire connection is the subject of the frame. + + + A receiver MUST treat the receipt of a WINDOW_UPDATE frame with an flow control window + increment of 0 as a stream error of type + PROTOCOL_ERROR; errors on the connection flow control window MUST be + treated as a connection error. + + + WINDOW_UPDATE can be sent by a peer that has sent a frame bearing the END_STREAM flag. + This means that a receiver could receive a WINDOW_UPDATE frame on a "half closed (remote)" + or "closed" stream. A receiver MUST NOT treat this as an error, see . + + + A receiver that receives a flow controlled frame MUST always account for its contribution + against the connection flow control window, unless the receiver treats this as a connection error. This is necessary even if the + frame is in error. Since the sender counts the frame toward the flow control window, if + the receiver does not, the flow control window at sender and receiver can become + different. + + +
    + + Flow control in HTTP/2 is implemented using a window kept by each sender on every + stream. The flow control window is a simple integer value that indicates how many octets + of data the sender is permitted to transmit; as such, its size is a measure of the + buffering capacity of the receiver. + + + Two flow control windows are applicable: the stream flow control window and the + connection flow control window. The sender MUST NOT send a flow controlled frame with a + length that exceeds the space available in either of the flow control windows advertised + by the receiver. Frames with zero length with the END_STREAM flag set (that is, an + empty DATA frame) MAY be sent if there is no available space in either + flow control window. + + + For flow control calculations, the 9 octet frame header is not counted. + + + After sending a flow controlled frame, the sender reduces the space available in both + windows by the length of the transmitted frame. + + + The receiver of a frame sends a WINDOW_UPDATE frame as it consumes data and frees up + space in flow control windows. Separate WINDOW_UPDATE frames are sent for the stream + and connection level flow control windows. + + + A sender that receives a WINDOW_UPDATE frame updates the corresponding window by the + amount specified in the frame. + + + A sender MUST NOT allow a flow control window to exceed 231-1 octets. + If a sender receives a WINDOW_UPDATE that causes a flow control window to exceed this + maximum it MUST terminate either the stream or the connection, as appropriate. For + streams, the sender sends a RST_STREAM with the error code of + FLOW_CONTROL_ERROR code; for the connection, a GOAWAY + frame with a FLOW_CONTROL_ERROR code. + + + Flow controlled frames from the sender and WINDOW_UPDATE frames from the receiver are + completely asynchronous with respect to each other. This property allows a receiver to + aggressively update the window size kept by the sender to prevent streams from stalling. + +
    + +
    + + When an HTTP/2 connection is first established, new streams are created with an initial + flow control window size of 65,535 octets. The connection flow control window is 65,535 + octets. Both endpoints can adjust the initial window size for new streams by including + a value for SETTINGS_INITIAL_WINDOW_SIZE in the SETTINGS + frame that forms part of the connection preface. The connection flow control window can + only be changed using WINDOW_UPDATE frames. + + + Prior to receiving a SETTINGS frame that sets a value for + SETTINGS_INITIAL_WINDOW_SIZE, an endpoint can only use the default + initial window size when sending flow controlled frames. Similarly, the connection flow + control window is set to the default initial window size until a WINDOW_UPDATE frame is + received. + + + A SETTINGS frame can alter the initial flow control window size for all + current streams. When the value of SETTINGS_INITIAL_WINDOW_SIZE changes, + a receiver MUST adjust the size of all stream flow control windows that it maintains by + the difference between the new value and the old value. + + + A change to SETTINGS_INITIAL_WINDOW_SIZE can cause the available space in + a flow control window to become negative. A sender MUST track the negative flow control + window, and MUST NOT send new flow controlled frames until it receives WINDOW_UPDATE + frames that cause the flow control window to become positive. + + + For example, if the client sends 60KB immediately on connection establishment, and the + server sets the initial window size to be 16KB, the client will recalculate the + available flow control window to be -44KB on receipt of the SETTINGS + frame. The client retains a negative flow control window until WINDOW_UPDATE frames + restore the window to being positive, after which the client can resume sending. + + + A SETTINGS frame cannot alter the connection flow control window. + + + An endpoint MUST treat a change to SETTINGS_INITIAL_WINDOW_SIZE that + causes any flow control window to exceed the maximum size as a connection error of type + FLOW_CONTROL_ERROR. + +
    + +
    + + A receiver that wishes to use a smaller flow control window than the current size can + send a new SETTINGS frame. However, the receiver MUST be prepared to + receive data that exceeds this window size, since the sender might send data that + exceeds the lower limit prior to processing the SETTINGS frame. + + + After sending a SETTINGS frame that reduces the initial flow control window size, a + receiver has two options for handling streams that exceed flow control limits: + + + The receiver can immediately send RST_STREAM with + FLOW_CONTROL_ERROR error code for the affected streams. + + + The receiver can accept the streams and tolerate the resulting head of line + blocking, sending WINDOW_UPDATE frames as it consumes data. + + + +
    +
    + +
    + + The CONTINUATION frame (type=0x9) is used to continue a sequence of header block fragments. Any number of CONTINUATION frames can + be sent on an existing stream, as long as the preceding frame is on the same stream and is + a HEADERS, PUSH_PROMISE or CONTINUATION frame without the + END_HEADERS flag set. + + +
    + +
    + + The CONTINUATION frame payload contains a header block + fragment. + + + + The CONTINUATION frame defines the following flag: + + + + Bit 3 being set indicates that this frame ends a header + block. + + + If the END_HEADERS bit is not set, this frame MUST be followed by another + CONTINUATION frame. A receiver MUST treat the receipt of any other type of frame or + a frame on a different stream as a connection + error of type PROTOCOL_ERROR. + + + + + + + The CONTINUATION frame changes the connection state as defined in . + + + + CONTINUATION frames MUST be associated with a stream. If a CONTINUATION frame is received + whose stream identifier field is 0x0, the recipient MUST respond with a connection error of type PROTOCOL_ERROR. + + + + A CONTINUATION frame MUST be preceded by a HEADERS, + PUSH_PROMISE or CONTINUATION frame without the END_HEADERS flag set. A + recipient that observes violation of this rule MUST respond with a connection error of type + PROTOCOL_ERROR. + +
    +
    + +
    + + Error codes are 32-bit fields that are used in RST_STREAM and + GOAWAY frames to convey the reasons for the stream or connection error. + + + + Error codes share a common code space. Some error codes apply only to either streams or the + entire connection and have no defined semantics in the other context. + + + + The following error codes are defined: + + + The associated condition is not as a result of an error. For example, a + GOAWAY might include this code to indicate graceful shutdown of a + connection. + + + The endpoint detected an unspecific protocol error. This error is for use when a more + specific error code is not available. + + + The endpoint encountered an unexpected internal error. + + + The endpoint detected that its peer violated the flow control protocol. + + + The endpoint sent a SETTINGS frame, but did not receive a response in a + timely manner. See Settings Synchronization. + + + The endpoint received a frame after a stream was half closed. + + + The endpoint received a frame with an invalid size. + + + The endpoint refuses the stream prior to performing any application processing, see + for details. + + + Used by the endpoint to indicate that the stream is no longer needed. + + + The endpoint is unable to maintain the header compression context for the connection. + + + The connection established in response to a CONNECT + request was reset or abnormally closed. + + + The endpoint detected that its peer is exhibiting a behavior that might be generating + excessive load. + + + The underlying transport has properties that do not meet minimum security + requirements (see ). + + + + + Unknown or unsupported error codes MUST NOT trigger any special behavior. These MAY be + treated by an implementation as being equivalent to INTERNAL_ERROR. + +
    + +
    + + HTTP/2 is intended to be as compatible as possible with current uses of HTTP. This means + that, from the application perspective, the features of the protocol are largely + unchanged. To achieve this, all request and response semantics are preserved, although the + syntax of conveying those semantics has changed. + + + Thus, the specification and requirements of HTTP/1.1 Semantics and Content , Conditional Requests , Range Requests , Caching and Authentication are applicable to HTTP/2. Selected portions of HTTP/1.1 Message Syntax + and Routing , such as the HTTP and HTTPS URI schemes, are also + applicable in HTTP/2, but the expression of those semantics for this protocol are defined + in the sections below. + + +
    + + A client sends an HTTP request on a new stream, using a previously unused stream identifier. A server sends an HTTP response on + the same stream as the request. + + + An HTTP message (request or response) consists of: + + + for a response only, zero or more HEADERS frames (each followed by zero + or more CONTINUATION frames) containing the message headers of + informational (1xx) HTTP responses (see and ), + and + + + one HEADERS frame (followed by zero or more CONTINUATION + frames) containing the message headers (see ), and + + + zero or more DATA frames containing the message payload (see ), and + + + optionally, one HEADERS frame, followed by zero or more + CONTINUATION frames containing the trailer-part, if present (see ). + + + The last frame in the sequence bears an END_STREAM flag, noting that a + HEADERS frame bearing the END_STREAM flag can be followed by + CONTINUATION frames that carry any remaining portions of the header block. + + + Other frames (from any stream) MUST NOT occur between either HEADERS frame + and any CONTINUATION frames that might follow. + + + + Trailing header fields are carried in a header block that also terminates the stream. + That is, a sequence starting with a HEADERS frame, followed by zero or more + CONTINUATION frames, where the HEADERS frame bears an + END_STREAM flag. Header blocks after the first that do not terminate the stream are not + part of an HTTP request or response. + + + A HEADERS frame (and associated CONTINUATION frames) can + only appear at the start or end of a stream. An endpoint that receives a + HEADERS frame without the END_STREAM flag set after receiving a final + (non-informational) status code MUST treat the corresponding request or response as malformed. + + + + An HTTP request/response exchange fully consumes a single stream. A request starts with + the HEADERS frame that puts the stream into an "open" state. The request + ends with a frame bearing END_STREAM, which causes the stream to become "half closed + (local)" for the client and "half closed (remote)" for the server. A response starts with + a HEADERS frame and ends with a frame bearing END_STREAM, which places the + stream in the "closed" state. + + + +
    + + HTTP/2 removes support for the 101 (Switching Protocols) informational status code + (). + + + The semantics of 101 (Switching Protocols) aren't applicable to a multiplexed protocol. + Alternative protocols are able to use the same mechanisms that HTTP/2 uses to negotiate + their use (see ). + +
    + +
    + + HTTP header fields carry information as a series of key-value pairs. For a listing of + registered HTTP headers, see the Message Header Field Registry maintained at . + + +
    + + While HTTP/1.x used the message start-line (see ) to convey the target URI and method of the request, and the + status code for the response, HTTP/2 uses special pseudo-header fields beginning with + ':' character (ASCII 0x3a) for this purpose. + + + Pseudo-header fields are not HTTP header fields. Endpoints MUST NOT generate + pseudo-header fields other than those defined in this document. + + + Pseudo-header fields are only valid in the context in which they are defined. + Pseudo-header fields defined for requests MUST NOT appear in responses; pseudo-header + fields defined for responses MUST NOT appear in requests. Pseudo-header fields MUST + NOT appear in trailers. Endpoints MUST treat a request or response that contains + undefined or invalid pseudo-header fields as malformed. + + + Just as in HTTP/1.x, header field names are strings of ASCII characters that are + compared in a case-insensitive fashion. However, header field names MUST be converted + to lowercase prior to their encoding in HTTP/2. A request or response containing + uppercase header field names MUST be treated as malformed. + + + All pseudo-header fields MUST appear in the header block before regular header fields. + Any request or response that contains a pseudo-header field that appears in a header + block after a regular header field MUST be treated as malformed. + +
    + +
    + + HTTP/2 does not use the Connection header field to + indicate connection-specific header fields; in this protocol, connection-specific + metadata is conveyed by other means. An endpoint MUST NOT generate a HTTP/2 message + containing connection-specific header fields; any message containing + connection-specific header fields MUST be treated as malformed. + + + This means that an intermediary transforming an HTTP/1.x message to HTTP/2 will need + to remove any header fields nominated by the Connection header field, along with the + Connection header field itself. Such intermediaries SHOULD also remove other + connection-specific header fields, such as Keep-Alive, Proxy-Connection, + Transfer-Encoding and Upgrade, even if they are not nominated by Connection. + + + One exception to this is the TE header field, which MAY be present in an HTTP/2 + request, but when it is MUST NOT contain any value other than "trailers". + + + + + HTTP/2 purposefully does not support upgrade to another protocol. The handshake + methods described in are believed sufficient to + negotiate the use of alternative protocols. + + + +
    + +
    + + The following pseudo-header fields are defined for HTTP/2 requests: + + + + The :method pseudo-header field includes the HTTP + method (). + + + + + The :scheme pseudo-header field includes the scheme + portion of the target URI (). + + + :scheme is not restricted to http and https schemed URIs. A + proxy or gateway can translate requests for non-HTTP schemes, enabling the use + of HTTP to interact with non-HTTP services. + + + + + The :authority pseudo-header field includes the + authority portion of the target URI (). The authority MUST NOT include the deprecated userinfo subcomponent for http + or https schemed URIs. + + + To ensure that the HTTP/1.1 request line can be reproduced accurately, this + pseudo-header field MUST be omitted when translating from an HTTP/1.1 request + that has a request target in origin or asterisk form (see ). Clients that generate + HTTP/2 requests directly SHOULD use the :authority pseudo-header + field instead of the Host header field. An + intermediary that converts an HTTP/2 request to HTTP/1.1 MUST create a Host header field if one is not present in a request by + copying the value of the :authority pseudo-header + field. + + + + + The :path pseudo-header field includes the path and + query parts of the target URI (the path-absolute + production from and optionally a '?' character + followed by the query production, see and ). A request in asterisk form includes the value '*' for the + :path pseudo-header field. + + + This pseudo-header field MUST NOT be empty for http + or https URIs; http or + https URIs that do not contain a path component + MUST include a value of '/'. The exception to this rule is an OPTIONS request + for an http or https + URI that does not include a path component; these MUST include a :path pseudo-header field with a value of '*' (see ). + + + + + + All HTTP/2 requests MUST include exactly one valid value for the :method, :scheme, and :path pseudo-header fields, unless it is a CONNECT request. An HTTP request that omits mandatory + pseudo-header fields is malformed. + + + HTTP/2 does not define a way to carry the version identifier that is included in the + HTTP/1.1 request line. + +
    + +
    + + For HTTP/2 responses, a single :status pseudo-header + field is defined that carries the HTTP status code field (see ). This pseudo-header field MUST be included in all + responses, otherwise the response is malformed. + + + HTTP/2 does not define a way to carry the version or reason phrase that is included in + an HTTP/1.1 status line. + +
    + +
    + + The Cookie header field can carry a significant amount of + redundant data. + + + The Cookie header field uses a semi-colon (";") to delimit cookie-pairs (or "crumbs"). + This header field doesn't follow the list construction rules in HTTP (see ), which prevents cookie-pairs from + being separated into different name-value pairs. This can significantly reduce + compression efficiency as individual cookie-pairs are updated. + + + To allow for better compression efficiency, the Cookie header field MAY be split into + separate header fields, each with one or more cookie-pairs. If there are multiple + Cookie header fields after decompression, these MUST be concatenated into a single + octet string using the two octet delimiter of 0x3B, 0x20 (the ASCII string "; ") + before being passed into a non-HTTP/2 context, such as an HTTP/1.1 connection, or a + generic HTTP server application. + +
    + + Therefore, the following two lists of Cookie header fields are semantically + equivalent. + + +
    +
    + +
    + + A malformed request or response is one that is an otherwise valid sequence of HTTP/2 + frames, but is otherwise invalid due to the presence of extraneous frames, prohibited + header fields, the absence of mandatory header fields, or the inclusion of uppercase + header field names. + + + A request or response that includes an entity body can include a content-length header field. A request or response is also + malformed if the value of a content-length header field + does not equal the sum of the DATA frame payload lengths that form the + body. A response that is defined to have no payload, as described in , can have a non-zero + content-length header field, even though no content is + included in DATA frames. + + + Intermediaries that process HTTP requests or responses (i.e., any intermediary not + acting as a tunnel) MUST NOT forward a malformed request or response. Malformed + requests or responses that are detected MUST be treated as a stream error of type PROTOCOL_ERROR. + + + For malformed requests, a server MAY send an HTTP response prior to closing or + resetting the stream. Clients MUST NOT accept a malformed response. Note that these + requirements are intended to protect against several types of common attacks against + HTTP; they are deliberately strict, because being permissive can expose + implementations to these vulnerabilities. + +
    +
    + +
    + + This section shows HTTP/1.1 requests and responses, with illustrations of equivalent + HTTP/2 requests and responses. + + + An HTTP GET request includes request header fields and no body and is therefore + transmitted as a single HEADERS frame, followed by zero or more + CONTINUATION frames containing the serialized block of request header + fields. The HEADERS frame in the following has both the END_HEADERS and + END_STREAM flags set; no CONTINUATION frames are sent: + + +
    + + END_STREAM + Accept: image/jpeg + END_HEADERS + :method = GET + :scheme = https + :path = /resource + host = example.org + accept = image/jpeg +]]> +
    + + + Similarly, a response that includes only response header fields is transmitted as a + HEADERS frame (again, followed by zero or more + CONTINUATION frames) containing the serialized block of response header + fields. + + +
    + + END_STREAM + Expires: Thu, 23 Jan ... + END_HEADERS + :status = 304 + etag = "xyzzy" + expires = Thu, 23 Jan ... +]]> +
    + + + An HTTP POST request that includes request header fields and payload data is transmitted + as one HEADERS frame, followed by zero or more + CONTINUATION frames containing the request header fields, followed by one + or more DATA frames, with the last CONTINUATION (or + HEADERS) frame having the END_HEADERS flag set and the final + DATA frame having the END_STREAM flag set: + + +
    + - END_STREAM + Content-Type: image/jpeg - END_HEADERS + Content-Length: 123 :method = POST + :path = /resource + {binary data} :scheme = https + + CONTINUATION + + END_HEADERS + content-type = image/jpeg + host = example.org + content-length = 123 + + DATA + + END_STREAM + {binary data} +]]> + + Note that data contributing to any given header field could be spread between header + block fragments. The allocation of header fields to frames in this example is + illustrative only. + +
    + + + A response that includes header fields and payload data is transmitted as a + HEADERS frame, followed by zero or more CONTINUATION + frames, followed by one or more DATA frames, with the last + DATA frame in the sequence having the END_STREAM flag set: + + +
    + - END_STREAM + Content-Length: 123 + END_HEADERS + :status = 200 + {binary data} content-type = image/jpeg + content-length = 123 + + DATA + + END_STREAM + {binary data} +]]> +
    + + + Trailing header fields are sent as a header block after both the request or response + header block and all the DATA frames have been sent. The + HEADERS frame starting the trailers header block has the END_STREAM flag + set. + + +
    + - END_STREAM + Transfer-Encoding: chunked + END_HEADERS + Trailer: Foo :status = 200 + content-length = 123 + 123 content-type = image/jpeg + {binary data} trailer = Foo + 0 + Foo: bar DATA + - END_STREAM + {binary data} + + HEADERS + + END_STREAM + + END_HEADERS + foo = bar +]]> +
    + + +
    + + An informational response using a 1xx status code other than 101 is transmitted as a + HEADERS frame, followed by zero or more CONTINUATION + frames: + + - END_STREAM + + END_HEADERS + :status = 103 + extension-field = bar +]]> +
    +
    + +
    + + In HTTP/1.1, an HTTP client is unable to retry a non-idempotent request when an error + occurs, because there is no means to determine the nature of the error. It is possible + that some server processing occurred prior to the error, which could result in + undesirable effects if the request were reattempted. + + + HTTP/2 provides two mechanisms for providing a guarantee to a client that a request has + not been processed: + + + The GOAWAY frame indicates the highest stream number that might have + been processed. Requests on streams with higher numbers are therefore guaranteed to + be safe to retry. + + + The REFUSED_STREAM error code can be included in a + RST_STREAM frame to indicate that the stream is being closed prior to + any processing having occurred. Any request that was sent on the reset stream can + be safely retried. + + + + + Requests that have not been processed have not failed; clients MAY automatically retry + them, even those with non-idempotent methods. + + + A server MUST NOT indicate that a stream has not been processed unless it can guarantee + that fact. If frames that are on a stream are passed to the application layer for any + stream, then REFUSED_STREAM MUST NOT be used for that stream, and a + GOAWAY frame MUST include a stream identifier that is greater than or + equal to the given stream identifier. + + + In addition to these mechanisms, the PING frame provides a way for a + client to easily test a connection. Connections that remain idle can become broken as + some middleboxes (for instance, network address translators, or load balancers) silently + discard connection bindings. The PING frame allows a client to safely + test whether a connection is still active without sending a request. + +
    +
    + +
    + + HTTP/2 allows a server to pre-emptively send (or "push") responses (along with + corresponding "promised" requests) to a client in association with a previous + client-initiated request. This can be useful when the server knows the client will need + to have those responses available in order to fully process the response to the original + request. + + + + Pushing additional message exchanges in this fashion is optional, and is negotiated + between individual endpoints. The SETTINGS_ENABLE_PUSH setting can be set + to 0 to indicate that server push is disabled. + + + Promised requests MUST be cacheable (see ), MUST be safe (see ) and MUST NOT include a request body. Clients that receive a + promised request that is not cacheable, unsafe or that includes a request body MUST + reset the stream with a stream error of type + PROTOCOL_ERROR. + + + Pushed responses that are cacheable (see ) can be stored by the client, if it implements a HTTP + cache. Pushed responses are considered successfully validated on the origin server (e.g., + if the "no-cache" cache response directive is present) while the stream identified by the + promised stream ID is still open. + + + Pushed responses that are not cacheable MUST NOT be stored by any HTTP cache. They MAY + be made available to the application separately. + + + An intermediary can receive pushes from the server and choose not to forward them on to + the client. In other words, how to make use of the pushed information is up to that + intermediary. Equally, the intermediary might choose to make additional pushes to the + client, without any action taken by the server. + + + A client cannot push. Thus, servers MUST treat the receipt of a + PUSH_PROMISE frame as a connection + error of type PROTOCOL_ERROR. Clients MUST reject any attempt to + change the SETTINGS_ENABLE_PUSH setting to a value other than 0 by treating + the message as a connection error of type + PROTOCOL_ERROR. + + +
    + + Server push is semantically equivalent to a server responding to a request; however, in + this case that request is also sent by the server, as a PUSH_PROMISE + frame. + + + The PUSH_PROMISE frame includes a header block that contains a complete + set of request header fields that the server attributes to the request. It is not + possible to push a response to a request that includes a request body. + + + + Pushed responses are always associated with an explicit request from the client. The + PUSH_PROMISE frames sent by the server are sent on that explicit + request's stream. The PUSH_PROMISE frame also includes a promised stream + identifier, chosen from the stream identifiers available to the server (see ). + + + + The header fields in PUSH_PROMISE and any subsequent + CONTINUATION frames MUST be a valid and complete set of request header fields. The server MUST include a method in + the :method header field that is safe and cacheable. If a + client receives a PUSH_PROMISE that does not include a complete and valid + set of header fields, or the :method header field identifies + a method that is not safe, it MUST respond with a stream error of type PROTOCOL_ERROR. + + + + The server SHOULD send PUSH_PROMISE () + frames prior to sending any frames that reference the promised responses. This avoids a + race where clients issue requests prior to receiving any PUSH_PROMISE + frames. + + + For example, if the server receives a request for a document containing embedded links + to multiple image files, and the server chooses to push those additional images to the + client, sending push promises before the DATA frames that contain the + image links ensures that the client is able to see the promises before discovering + embedded links. Similarly, if the server pushes responses referenced by the header block + (for instance, in Link header fields), sending the push promises before sending the + header block ensures that clients do not request them. + + + + PUSH_PROMISE frames MUST NOT be sent by the client. + + + PUSH_PROMISE frames can be sent by the server in response to any + client-initiated stream, but the stream MUST be in either the "open" or "half closed + (remote)" state with respect to the server. PUSH_PROMISE frames are + interspersed with the frames that comprise a response, though they cannot be + interspersed with HEADERS and CONTINUATION frames that + comprise a single header block. + + + Sending a PUSH_PROMISE frame creates a new stream and puts the stream + into the “reserved (local)” state for the server and the “reserved (remote)” state for + the client. + +
    + +
    + + After sending the PUSH_PROMISE frame, the server can begin delivering the + pushed response as a response on a server-initiated + stream that uses the promised stream identifier. The server uses this stream to + transmit an HTTP response, using the same sequence of frames as defined in . This stream becomes "half closed" + to the client after the initial HEADERS frame is sent. + + + + Once a client receives a PUSH_PROMISE frame and chooses to accept the + pushed response, the client SHOULD NOT issue any requests for the promised response + until after the promised stream has closed. + + + + If the client determines, for any reason, that it does not wish to receive the pushed + response from the server, or if the server takes too long to begin sending the promised + response, the client can send an RST_STREAM frame, using either the + CANCEL or REFUSED_STREAM codes, and referencing the pushed + stream's identifier. + + + A client can use the SETTINGS_MAX_CONCURRENT_STREAMS setting to limit the + number of responses that can be concurrently pushed by a server. Advertising a + SETTINGS_MAX_CONCURRENT_STREAMS value of zero disables server push by + preventing the server from creating the necessary streams. This does not prohibit a + server from sending PUSH_PROMISE frames; clients need to reset any + promised streams that are not wanted. + + + + Clients receiving a pushed response MUST validate that either the server is + authoritative (see ), or the proxy that provided the pushed + response is configured for the corresponding request. For example, a server that offers + a certificate for only the example.com DNS-ID or Common Name + is not permitted to push a response for https://www.example.org/doc. + + + The response for a PUSH_PROMISE stream begins with a + HEADERS frame, which immediately puts the stream into the “half closed + (remote)” state for the server and “half closed (local)” state for the client, and ends + with a frame bearing END_STREAM, which places the stream in the "closed" state. + + + The client never sends a frame with the END_STREAM flag for a server push. + + + +
    + +
    + +
    + + In HTTP/1.x, the pseudo-method CONNECT () is used to convert an HTTP connection into a tunnel to a remote host. + CONNECT is primarily used with HTTP proxies to establish a TLS session with an origin + server for the purposes of interacting with https resources. + + + In HTTP/2, the CONNECT method is used to establish a tunnel over a single HTTP/2 stream to + a remote host, for similar purposes. The HTTP header field mapping works as defined in + Request Header Fields, with a few + differences. Specifically: + + + The :method header field is set to CONNECT. + + + The :scheme and :path header + fields MUST be omitted. + + + The :authority header field contains the host and port to + connect to (equivalent to the authority-form of the request-target of CONNECT + requests, see ). + + + + + A proxy that supports CONNECT establishes a TCP connection to + the server identified in the :authority header field. Once + this connection is successfully established, the proxy sends a HEADERS + frame containing a 2xx series status code to the client, as defined in . + + + After the initial HEADERS frame sent by each peer, all subsequent + DATA frames correspond to data sent on the TCP connection. The payload of + any DATA frames sent by the client is transmitted by the proxy to the TCP + server; data received from the TCP server is assembled into DATA frames by + the proxy. Frame types other than DATA or stream management frames + (RST_STREAM, WINDOW_UPDATE, and PRIORITY) + MUST NOT be sent on a connected stream, and MUST be treated as a stream error if received. + + + The TCP connection can be closed by either peer. The END_STREAM flag on a + DATA frame is treated as being equivalent to the TCP FIN bit. A client is + expected to send a DATA frame with the END_STREAM flag set after receiving + a frame bearing the END_STREAM flag. A proxy that receives a DATA frame + with the END_STREAM flag set sends the attached data with the FIN bit set on the last TCP + segment. A proxy that receives a TCP segment with the FIN bit set sends a + DATA frame with the END_STREAM flag set. Note that the final TCP segment + or DATA frame could be empty. + + + A TCP connection error is signaled with RST_STREAM. A proxy treats any + error in the TCP connection, which includes receiving a TCP segment with the RST bit set, + as a stream error of type + CONNECT_ERROR. Correspondingly, a proxy MUST send a TCP segment with the + RST bit set if it detects an error with the stream or the HTTP/2 connection. + +
    +
    + +
    + + This section outlines attributes of the HTTP protocol that improve interoperability, reduce + exposure to known security vulnerabilities, or reduce the potential for implementation + variation. + + +
    + + HTTP/2 connections are persistent. For best performance, it is expected clients will not + close connections until it is determined that no further communication with a server is + necessary (for example, when a user navigates away from a particular web page), or until + the server closes the connection. + + + Clients SHOULD NOT open more than one HTTP/2 connection to a given host and port pair, + where host is derived from a URI, a selected alternative + service, or a configured proxy. + + + A client can create additional connections as replacements, either to replace connections + that are near to exhausting the available stream + identifier space, to refresh the keying material for a TLS connection, or to + replace connections that have encountered errors. + + + A client MAY open multiple connections to the same IP address and TCP port using different + Server Name Indication values or to provide different TLS + client certificates, but SHOULD avoid creating multiple connections with the same + configuration. + + + Servers are encouraged to maintain open connections for as long as possible, but are + permitted to terminate idle connections if necessary. When either endpoint chooses to + close the transport-layer TCP connection, the terminating endpoint SHOULD first send a + GOAWAY () frame so that both endpoints can reliably + determine whether previously sent frames have been processed and gracefully complete or + terminate any necessary remaining tasks. + + +
    + + Connections that are made to an origin servers, either directly or through a tunnel + created using the CONNECT method MAY be reused for + requests with multiple different URI authority components. A connection can be reused + as long as the origin server is authoritative. For + http resources, this depends on the host having resolved to + the same IP address. + + + For https resources, connection reuse additionally depends + on having a certificate that is valid for the host in the URI. An origin server might + offer a certificate with multiple subjectAltName attributes, + or names with wildcards, one of which is valid for the authority in the URI. For + example, a certificate with a subjectAltName of *.example.com might permit the use of the same connection for + requests to URIs starting with https://a.example.com/ and + https://b.example.com/. + + + In some deployments, reusing a connection for multiple origins can result in requests + being directed to the wrong origin server. For example, TLS termination might be + performed by a middlebox that uses the TLS Server Name Indication + (SNI) extension to select an origin server. This means that it is possible + for clients to send confidential information to servers that might not be the intended + target for the request, even though the server is otherwise authoritative. + + + A server that does not wish clients to reuse connections can indicate that it is not + authoritative for a request by sending a 421 (Misdirected Request) status code in response + to the request (see ). + + + A client that is configured to use a proxy over HTTP/2 directs requests to that proxy + through a single connection. That is, all requests sent via a proxy reuse the + connection to the proxy. + +
    + +
    + + The 421 (Misdirected Request) status code indicates that the request was directed at a + server that is not able to produce a response. This can be sent by a server that is not + configured to produce responses for the combination of scheme and authority that are + included in the request URI. + + + Clients receiving a 421 (Misdirected Request) response from a server MAY retry the + request - whether the request method is idempotent or not - over a different connection. + This is possible if a connection is reused () or if an alternative + service is selected (). + + + This status code MUST NOT be generated by proxies. + + + A 421 response is cacheable by default; i.e., unless otherwise indicated by the method + definition or explicit cache controls (see ). + +
    +
    + +
    + + Implementations of HTTP/2 MUST support TLS 1.2 for HTTP/2 over + TLS. The general TLS usage guidance in SHOULD be followed, with + some additional restrictions that are specific to HTTP/2. + + + + An implementation of HTTP/2 over TLS MUST use TLS 1.2 or higher with the restrictions on + feature set and cipher suite described in this section. Due to implementation + limitations, it might not be possible to fail TLS negotiation. An endpoint MUST + immediately terminate an HTTP/2 connection that does not meet these minimum requirements + with a connection error of type + INADEQUATE_SECURITY. + + +
    + + The TLS implementation MUST support the Server Name Indication + (SNI) extension to TLS. HTTP/2 clients MUST indicate the target domain name when + negotiating TLS. + + + The TLS implementation MUST disable compression. TLS compression can lead to the + exposure of information that would not otherwise be revealed . + Generic compression is unnecessary since HTTP/2 provides compression features that are + more aware of context and therefore likely to be more appropriate for use for + performance, security or other reasons. + + + The TLS implementation MUST disable renegotiation. An endpoint MUST treat a TLS + renegotiation as a connection error of type + PROTOCOL_ERROR. Note that disabling renegotiation can result in + long-lived connections becoming unusable due to limits on the number of messages the + underlying cipher suite can encipher. + + + A client MAY use renegotiation to provide confidentiality protection for client + credentials offered in the handshake, but any renegotiation MUST occur prior to sending + the connection preface. A server SHOULD request a client certificate if it sees a + renegotiation request immediately after establishing a connection. + + + This effectively prevents the use of renegotiation in response to a request for a + specific protected resource. A future specification might provide a way to support this + use case. + +
    + +
    + + The set of TLS cipher suites that are permitted in HTTP/2 is restricted. HTTP/2 MUST + only be used with cipher suites that have ephemeral key exchange, such as the ephemeral Diffie-Hellman (DHE) or the elliptic curve variant (ECDHE). Ephemeral key exchange MUST + have a minimum size of 2048 bits for DHE or security level of 128 bits for ECDHE. + Clients MUST accept DHE sizes of up to 4096 bits. HTTP MUST NOT be used with cipher + suites that use stream or block ciphers. Authenticated Encryption with Additional Data + (AEAD) modes, such as the Galois Counter Model (GCM) mode for + AES are acceptable. + + + The effect of these restrictions is that TLS 1.2 implementations could have + non-intersecting sets of available cipher suites, since these prevent the use of the + cipher suite that TLS 1.2 makes mandatory. To avoid this problem, implementations of + HTTP/2 that use TLS 1.2 MUST support TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 with P256 . + + + Clients MAY advertise support of cipher suites that are prohibited by the above + restrictions in order to allow for connection to servers that do not support HTTP/2. + This enables a fallback to protocols without these constraints without the additional + latency imposed by using a separate connection for fallback. + +
    +
    +
    + +
    +
    + + HTTP/2 relies on the HTTP/1.1 definition of authority for determining whether a server is + authoritative in providing a given response, see . This relies on local name resolution for the "http" + URI scheme, and the authenticated server identity for the "https" scheme (see ). + +
    + +
    + + In a cross-protocol attack, an attacker causes a client to initiate a transaction in one + protocol toward a server that understands a different protocol. An attacker might be able + to cause the transaction to appear as valid transaction in the second protocol. In + combination with the capabilities of the web context, this can be used to interact with + poorly protected servers in private networks. + + + Completing a TLS handshake with an ALPN identifier for HTTP/2 can be considered sufficient + protection against cross protocol attacks. ALPN provides a positive indication that a + server is willing to proceed with HTTP/2, which prevents attacks on other TLS-based + protocols. + + + The encryption in TLS makes it difficult for attackers to control the data which could be + used in a cross-protocol attack on a cleartext protocol. + + + The cleartext version of HTTP/2 has minimal protection against cross-protocol attacks. + The connection preface contains a string that is + designed to confuse HTTP/1.1 servers, but no special protection is offered for other + protocols. A server that is willing to ignore parts of an HTTP/1.1 request containing an + Upgrade header field in addition to the client connection preface could be exposed to a + cross-protocol attack. + +
    + +
    + + HTTP/2 header field names and values are encoded as sequences of octets with a length + prefix. This enables HTTP/2 to carry any string of octets as the name or value of a + header field. An intermediary that translates HTTP/2 requests or responses into HTTP/1.1 + directly could permit the creation of corrupted HTTP/1.1 messages. An attacker might + exploit this behavior to cause the intermediary to create HTTP/1.1 messages with illegal + header fields, extra header fields, or even new messages that are entirely falsified. + + + Header field names or values that contain characters not permitted by HTTP/1.1, including + carriage return (ASCII 0xd) or line feed (ASCII 0xa) MUST NOT be translated verbatim by an + intermediary, as stipulated in . + + + Translation from HTTP/1.x to HTTP/2 does not produce the same opportunity to an attacker. + Intermediaries that perform translation to HTTP/2 MUST remove any instances of the obs-fold production from header field values. + +
    + +
    + + Pushed responses do not have an explicit request from the client; the request + is provided by the server in the PUSH_PROMISE frame. + + + Caching responses that are pushed is possible based on the guidance provided by the origin + server in the Cache-Control header field. However, this can cause issues if a single + server hosts more than one tenant. For example, a server might offer multiple users each + a small portion of its URI space. + + + Where multiple tenants share space on the same server, that server MUST ensure that + tenants are not able to push representations of resources that they do not have authority + over. Failure to enforce this would allow a tenant to provide a representation that would + be served out of cache, overriding the actual representation that the authoritative tenant + provides. + + + Pushed responses for which an origin server is not authoritative (see + ) are never cached or used. + +
    + +
    + + An HTTP/2 connection can demand a greater commitment of resources to operate than a + HTTP/1.1 connection. The use of header compression and flow control depend on a + commitment of resources for storing a greater amount of state. Settings for these + features ensure that memory commitments for these features are strictly bounded. + + + The number of PUSH_PROMISE frames is not constrained in the same fashion. + A client that accepts server push SHOULD limit the number of streams it allows to be in + the "reserved (remote)" state. Excessive number of server push streams can be treated as + a stream error of type + ENHANCE_YOUR_CALM. + + + Processing capacity cannot be guarded as effectively as state capacity. + + + The SETTINGS frame can be abused to cause a peer to expend additional + processing time. This might be done by pointlessly changing SETTINGS parameters, setting + multiple undefined parameters, or changing the same setting multiple times in the same + frame. WINDOW_UPDATE or PRIORITY frames can be abused to + cause an unnecessary waste of resources. + + + Large numbers of small or empty frames can be abused to cause a peer to expend time + processing frame headers. Note however that some uses are entirely legitimate, such as + the sending of an empty DATA frame to end a stream. + + + Header compression also offers some opportunities to waste processing resources; see for more details on potential abuses. + + + Limits in SETTINGS parameters cannot be reduced instantaneously, which + leaves an endpoint exposed to behavior from a peer that could exceed the new limits. In + particular, immediately after establishing a connection, limits set by a server are not + known to clients and could be exceeded without being an obvious protocol violation. + + + All these features - i.e., SETTINGS changes, small frames, header + compression - have legitimate uses. These features become a burden only when they are + used unnecessarily or to excess. + + + An endpoint that doesn't monitor this behavior exposes itself to a risk of denial of + service attack. Implementations SHOULD track the use of these features and set limits on + their use. An endpoint MAY treat activity that is suspicious as a connection error of type + ENHANCE_YOUR_CALM. + + +
    + + A large header block can cause an implementation to + commit a large amount of state. Header fields that are critical for routing can appear + toward the end of a header block, which prevents streaming of header fields to their + ultimate destination. For this an other reasons, such as ensuring cache correctness, + means that an endpoint might need to buffer the entire header block. Since there is no + hard limit to the size of a header block, some endpoints could be forced commit a large + amount of available memory for header fields. + + + An endpoint can use the SETTINGS_MAX_HEADER_LIST_SIZE to advise peers of + limits that might apply on the size of header blocks. This setting is only advisory, so + endpoints MAY choose to send header blocks that exceed this limit and risk having the + request or response being treated as malformed. This setting specific to a connection, + so any request or response could encounter a hop with a lower, unknown limit. An + intermediary can attempt to avoid this problem by passing on values presented by + different peers, but they are not obligated to do so. + + + A server that receives a larger header block than it is willing to handle can send an + HTTP 431 (Request Header Fields Too Large) status code . A + client can discard responses that it cannot process. The header block MUST be processed + to ensure a consistent connection state, unless the connection is closed. + +
    +
    + +
    + + HTTP/2 enables greater use of compression for both header fields () and entity bodies. Compression can allow an attacker to recover + secret data when it is compressed in the same context as data under attacker control. + + + There are demonstrable attacks on compression that exploit the characteristics of the web + (e.g., ). The attacker induces multiple requests containing + varying plaintext, observing the length of the resulting ciphertext in each, which + reveals a shorter length when a guess about the secret is correct. + + + Implementations communicating on a secure channel MUST NOT compress content that includes + both confidential and attacker-controlled data unless separate compression dictionaries + are used for each source of data. Compression MUST NOT be used if the source of data + cannot be reliably determined. Generic stream compression, such as that provided by TLS + MUST NOT be used with HTTP/2 (). + + + Further considerations regarding the compression of header fields are described in . + +
    + +
    + + Padding within HTTP/2 is not intended as a replacement for general purpose padding, such + as might be provided by TLS. Redundant padding could even be + counterproductive. Correct application can depend on having specific knowledge of the + data that is being padded. + + + To mitigate attacks that rely on compression, disabling or limiting compression might be + preferable to padding as a countermeasure. + + + Padding can be used to obscure the exact size of frame content, and is provided to + mitigate specific attacks within HTTP. For example, attacks where compressed content + includes both attacker-controlled plaintext and secret data (see for example, ). + + + Use of padding can result in less protection than might seem immediately obvious. At + best, padding only makes it more difficult for an attacker to infer length information by + increasing the number of frames an attacker has to observe. Incorrectly implemented + padding schemes can be easily defeated. In particular, randomized padding with a + predictable distribution provides very little protection; similarly, padding payloads to a + fixed size exposes information as payload sizes cross the fixed size boundary, which could + be possible if an attacker can control plaintext. + + + Intermediaries SHOULD retain padding for DATA frames, but MAY drop padding + for HEADERS and PUSH_PROMISE frames. A valid reason for an + intermediary to change the amount of padding of frames is to improve the protections that + padding provides. + +
    + +
    + + Several characteristics of HTTP/2 provide an observer an opportunity to correlate actions + of a single client or server over time. This includes the value of settings, the manner + in which flow control windows are managed, the way priorities are allocated to streams, + timing of reactions to stimulus, and handling of any optional features. + + + As far as this creates observable differences in behavior, they could be used as a basis + for fingerprinting a specific client, as defined in . + +
    +
    + +
    + + A string for identifying HTTP/2 is entered into the "Application Layer Protocol Negotiation + (ALPN) Protocol IDs" registry established in . + + + This document establishes a registry for frame types, settings, and error codes. These new + registries are entered into a new "Hypertext Transfer Protocol (HTTP) 2 Parameters" section. + + + This document registers the HTTP2-Settings header field for + use in HTTP; and the 421 (Misdirected Request) status code. + + + This document registers the PRI method for use in HTTP, to avoid + collisions with the connection preface. + + +
    + + This document creates two registrations for the identification of HTTP/2 in the + "Application Layer Protocol Negotiation (ALPN) Protocol IDs" registry established in . + + + The "h2" string identifies HTTP/2 when used over TLS: + + HTTP/2 over TLS + 0x68 0x32 ("h2") + This document + + + + The "h2c" string identifies HTTP/2 when used over cleartext TCP: + + HTTP/2 over TCP + 0x68 0x32 0x63 ("h2c") + This document + + +
    + +
    + + This document establishes a registry for HTTP/2 frame type codes. The "HTTP/2 Frame + Type" registry manages an 8-bit space. The "HTTP/2 Frame Type" registry operates under + either of the "IETF Review" or "IESG Approval" policies for + values between 0x00 and 0xef, with values between 0xf0 and 0xff being reserved for + experimental use. + + + New entries in this registry require the following information: + + + A name or label for the frame type. + + + The 8-bit code assigned to the frame type. + + + A reference to a specification that includes a description of the frame layout, + it's semantics and flags that the frame type uses, including any parts of the frame + that are conditionally present based on the value of flags. + + + + + The entries in the following table are registered by this document. + + + Frame Type + Code + Section + DATA0x0 + HEADERS0x1 + PRIORITY0x2 + RST_STREAM0x3 + SETTINGS0x4 + PUSH_PROMISE0x5 + PING0x6 + GOAWAY0x7 + WINDOW_UPDATE0x8 + CONTINUATION0x9 + +
    + +
    + + This document establishes a registry for HTTP/2 settings. The "HTTP/2 Settings" registry + manages a 16-bit space. The "HTTP/2 Settings" registry operates under the "Expert Review" policy for values in the range from 0x0000 to + 0xefff, with values between and 0xf000 and 0xffff being reserved for experimental use. + + + New registrations are advised to provide the following information: + + + A symbolic name for the setting. Specifying a setting name is optional. + + + The 16-bit code assigned to the setting. + + + An initial value for the setting. + + + An optional reference to a specification that describes the use of the setting. + + + + + An initial set of setting registrations can be found in . + + + Name + Code + Initial Value + Specification + HEADER_TABLE_SIZE + 0x14096 + ENABLE_PUSH + 0x21 + MAX_CONCURRENT_STREAMS + 0x3(infinite) + INITIAL_WINDOW_SIZE + 0x465535 + MAX_FRAME_SIZE + 0x516384 + MAX_HEADER_LIST_SIZE + 0x6(infinite) + + +
    + +
    + + This document establishes a registry for HTTP/2 error codes. The "HTTP/2 Error Code" + registry manages a 32-bit space. The "HTTP/2 Error Code" registry operates under the + "Expert Review" policy. + + + Registrations for error codes are required to include a description of the error code. An + expert reviewer is advised to examine new registrations for possible duplication with + existing error codes. Use of existing registrations is to be encouraged, but not + mandated. + + + New registrations are advised to provide the following information: + + + A name for the error code. Specifying an error code name is optional. + + + The 32-bit error code value. + + + A brief description of the error code semantics, longer if no detailed specification + is provided. + + + An optional reference for a specification that defines the error code. + + + + + The entries in the following table are registered by this document. + + + Name + Code + Description + Specification + NO_ERROR0x0 + Graceful shutdown + + PROTOCOL_ERROR0x1 + Protocol error detected + + INTERNAL_ERROR0x2 + Implementation fault + + FLOW_CONTROL_ERROR0x3 + Flow control limits exceeded + + SETTINGS_TIMEOUT0x4 + Settings not acknowledged + + STREAM_CLOSED0x5 + Frame received for closed stream + + FRAME_SIZE_ERROR0x6 + Frame size incorrect + + REFUSED_STREAM0x7 + Stream not processed + + CANCEL0x8 + Stream cancelled + + COMPRESSION_ERROR0x9 + Compression state not updated + + CONNECT_ERROR0xa + TCP connection error for CONNECT method + + ENHANCE_YOUR_CALM0xb + Processing capacity exceeded + + INADEQUATE_SECURITY0xc + Negotiated TLS parameters not acceptable + + + +
    + +
    + + This section registers the HTTP2-Settings header field in the + Permanent Message Header Field Registry. + + + HTTP2-Settings + + + http + + + standard + + + IETF + + + of this document + + + This header field is only used by an HTTP/2 client for Upgrade-based negotiation. + + + +
    + +
    + + This section registers the PRI method in the HTTP Method + Registry (). + + + PRI + + + No + + + No + + + of this document + + + This method is never used by an actual client. This method will appear to be used + when an HTTP/1.1 server or intermediary attempts to parse an HTTP/2 connection + preface. + + + +
    + +
    + + This document registers the 421 (Misdirected Request) HTTP Status code in the Hypertext + Transfer Protocol (HTTP) Status Code Registry (). + + + + + 421 + + + Misdirected Request + + + of this document + + + +
    + +
    + +
    + + This document includes substantial input from the following individuals: + + + Adam Langley, Wan-Teh Chang, Jim Morrison, Mark Nottingham, Alyssa Wilk, Costin + Manolache, William Chan, Vitaliy Lvin, Joe Chan, Adam Barth, Ryan Hamilton, Gavin + Peters, Kent Alstad, Kevin Lindsay, Paul Amer, Fan Yang, Jonathan Leighton (SPDY + contributors). + + + Gabriel Montenegro and Willy Tarreau (Upgrade mechanism). + + + William Chan, Salvatore Loreto, Osama Mazahir, Gabriel Montenegro, Jitu Padhye, Roberto + Peon, Rob Trace (Flow control). + + + Mike Bishop (Extensibility). + + + Mark Nottingham, Julian Reschke, James Snell, Jeff Pinner, Mike Bishop, Herve Ruellan + (Substantial editorial contributions). + + + Kari Hurtta, Tatsuhiro Tsujikawa, Greg Wilkins, Poul-Henning Kamp. + + + Alexey Melnikov was an editor of this document during 2013. + + + A substantial proportion of Martin's contribution was supported by Microsoft during his + employment there. + + + +
    +
    + + + + + + HPACK - Header Compression for HTTP/2 + + + + + + + + + + + + Transmission Control Protocol + + + University of Southern California (USC)/Information Sciences + Institute + + + + + + + + + + + Key words for use in RFCs to Indicate Requirement Levels + + + Harvard University +
    sob@harvard.edu
    +
    + +
    + + +
    + + + + + HTTP Over TLS + + + + + + + + + + Uniform Resource Identifier (URI): Generic + Syntax + + + + + + + + + + + + The Base16, Base32, and Base64 Data Encodings + + + + + + + + + Guidelines for Writing an IANA Considerations Section in RFCs + + + + + + + + + + + Augmented BNF for Syntax Specifications: ABNF + + + + + + + + + + + The Transport Layer Security (TLS) Protocol Version 1.2 + + + + + + + + + + + Transport Layer Security (TLS) Extensions: Extension Definitions + + + + + + + + + + Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension + + + + + + + + + + + + + TLS Elliptic Curve Cipher Suites with SHA-256/384 and AES Galois + Counter Mode (GCM) + + + + + + + + + + + Digital Signature Standard (DSS) + + NIST + + + + + + + + + Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing + + Adobe Systems Incorporated +
    fielding@gbiv.com
    +
    + + greenbytes GmbH +
    julian.reschke@greenbytes.de
    +
    + +
    + + +
    + + + + Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content + + Adobe Systems Incorporated +
    fielding@gbiv.com
    +
    + + greenbytes GmbH +
    julian.reschke@greenbytes.de
    +
    + +
    + + +
    + + + Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests + + Adobe Systems Incorporated +
    fielding@gbiv.com
    +
    + + greenbytes GmbH +
    julian.reschke@greenbytes.de
    +
    + +
    + +
    + + + Hypertext Transfer Protocol (HTTP/1.1): Range Requests + + Adobe Systems Incorporated +
    fielding@gbiv.com
    +
    + + World Wide Web Consortium +
    ylafon@w3.org
    +
    + + greenbytes GmbH +
    julian.reschke@greenbytes.de
    +
    + +
    + +
    + + + Hypertext Transfer Protocol (HTTP/1.1): Caching + + Adobe Systems Incorporated +
    fielding@gbiv.com
    +
    + + Akamai +
    mnot@mnot.net
    +
    + + greenbytes GmbH +
    julian.reschke@greenbytes.de
    +
    + +
    + + +
    + + + Hypertext Transfer Protocol (HTTP/1.1): Authentication + + Adobe Systems Incorporated +
    fielding@gbiv.com
    +
    + + greenbytes GmbH +
    julian.reschke@greenbytes.de
    +
    + +
    + + +
    + + + + HTTP State Management Mechanism + + + + + +
    + + + + + + TCP Extensions for High Performance + + + + + + + + + + + + Transport Layer Security Protocol Compression Methods + + + + + + + + + Additional HTTP Status Codes + + + + + + + + + + + Elliptic Curve Cryptography (ECC) Cipher Suites for Transport Layer Security (TLS) + + + + + + + + + + + + + + + AES Galois Counter Mode (GCM) Cipher Suites for TLS + + + + + + + + + + + + HTML5 + + + + + + + + + + + Latest version available at + . + + + + + + + Talking to Yourself for Fun and Profit + + + + + + + + + + + + + + BREACH: Reviving the CRIME Attack + + + + + + + + + + + Registration Procedures for Message Header Fields + + Nine by Nine +
    GK-IETF@ninebynine.org
    +
    + + BEA Systems +
    mnot@pobox.com
    +
    + + HP Labs +
    JeffMogul@acm.org
    +
    + +
    + + +
    + + + + Recommendations for Secure Use of TLS and DTLS + + + + + + + + + + + + + + + + + + HTTP Alternative Services + + + Akamai + + + Mozilla + + + greenbytes + + + + + + +
    + +
    + + This section is to be removed by RFC Editor before publication. + + +
    + + Renamed Not Authoritative status code to Misdirected Request. + +
    + +
    + + Pseudo-header fields are now required to appear strictly before regular ones. + + + Restored 1xx series status codes, except 101. + + + Changed frame length field 24-bits. Expanded frame header to 9 octets. Added a setting + to limit the damage. + + + Added a setting to advise peers of header set size limits. + + + Removed segments. + + + Made non-semantic-bearing HEADERS frames illegal in the HTTP mapping. + +
    + +
    + + Restored extensibility options. + + + Restricting TLS cipher suites to AEAD only. + + + Removing Content-Encoding requirements. + + + Permitting the use of PRIORITY after stream close. + + + Removed ALTSVC frame. + + + Removed BLOCKED frame. + + + Reducing the maximum padding size to 256 octets; removing padding from + CONTINUATION frames. + + + Removed per-frame GZIP compression. + +
    + +
    + + Added BLOCKED frame (at risk). + + + Simplified priority scheme. + + + Added DATA per-frame GZIP compression. + +
    + +
    + + Changed "connection header" to "connection preface" to avoid confusion. + + + Added dependency-based stream prioritization. + + + Added "h2c" identifier to distinguish between cleartext and secured HTTP/2. + + + Adding missing padding to PUSH_PROMISE. + + + Integrate ALTSVC frame and supporting text. + + + Dropping requirement on "deflate" Content-Encoding. + + + Improving security considerations around use of compression. + +
    + +
    + + Adding padding for data frames. + + + Renumbering frame types, error codes, and settings. + + + Adding INADEQUATE_SECURITY error code. + + + Updating TLS usage requirements to 1.2; forbidding TLS compression. + + + Removing extensibility for frames and settings. + + + Changing setting identifier size. + + + Removing the ability to disable flow control. + + + Changing the protocol identification token to "h2". + + + Changing the use of :authority to make it optional and to allow userinfo in non-HTTP + cases. + + + Allowing split on 0x0 for Cookie. + + + Reserved PRI method in HTTP/1.1 to avoid possible future collisions. + +
    + +
    + + Added cookie crumbling for more efficient header compression. + + + Added header field ordering with the value-concatenation mechanism. + +
    + +
    + + Marked draft for implementation. + +
    + +
    + + Adding definition for CONNECT method. + + + Constraining the use of push to safe, cacheable methods with no request body. + + + Changing from :host to :authority to remove any potential confusion. + + + Adding setting for header compression table size. + + + Adding settings acknowledgement. + + + Removing unnecessary and potentially problematic flags from CONTINUATION. + + + Added denial of service considerations. + +
    +
    + + Marking the draft ready for implementation. + + + Renumbering END_PUSH_PROMISE flag. + + + Editorial clarifications and changes. + +
    + +
    + + Added CONTINUATION frame for HEADERS and PUSH_PROMISE. + + + PUSH_PROMISE is no longer implicitly prohibited if SETTINGS_MAX_CONCURRENT_STREAMS is + zero. + + + Push expanded to allow all safe methods without a request body. + + + Clarified the use of HTTP header fields in requests and responses. Prohibited HTTP/1.1 + hop-by-hop header fields. + + + Requiring that intermediaries not forward requests with missing or illegal routing + :-headers. + + + Clarified requirements around handling different frames after stream close, stream reset + and GOAWAY. + + + Added more specific prohibitions for sending of different frame types in various stream + states. + + + Making the last received setting value the effective value. + + + Clarified requirements on TLS version, extension and ciphers. + +
    + +
    + + Committed major restructuring atrocities. + + + Added reference to first header compression draft. + + + Added more formal description of frame lifecycle. + + + Moved END_STREAM (renamed from FINAL) back to HEADERS/DATA. + + + Removed HEADERS+PRIORITY, added optional priority to HEADERS frame. + + + Added PRIORITY frame. + +
    + +
    + + Added continuations to frames carrying header blocks. + + + Replaced use of "session" with "connection" to avoid confusion with other HTTP stateful + concepts, like cookies. + + + Removed "message". + + + Switched to TLS ALPN from NPN. + + + Editorial changes. + +
    + +
    + + Added IANA considerations section for frame types, error codes and settings. + + + Removed data frame compression. + + + Added PUSH_PROMISE. + + + Added globally applicable flags to framing. + + + Removed zlib-based header compression mechanism. + + + Updated references. + + + Clarified stream identifier reuse. + + + Removed CREDENTIALS frame and associated mechanisms. + + + Added advice against naive implementation of flow control. + + + Added session header section. + + + Restructured frame header. Removed distinction between data and control frames. + + + Altered flow control properties to include session-level limits. + + + Added note on cacheability of pushed resources and multiple tenant servers. + + + Changed protocol label form based on discussions. + +
    + +
    + + Changed title throughout. + + + Removed section on Incompatibilities with SPDY draft#2. + + + Changed INTERNAL_ERROR on GOAWAY to have a value of 2 . + + + Replaced abstract and introduction. + + + Added section on starting HTTP/2.0, including upgrade mechanism. + + + Removed unused references. + + + Added flow control principles based on . + +
    + +
    + + Adopted as base for draft-ietf-httpbis-http2. + + + Updated authors/editors list. + + + Added status note. + +
    +
    + +
    +
    + diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go new file mode 100644 index 0000000..9d53d44 --- /dev/null +++ b/vendor/golang.org/x/net/http2/transport.go @@ -0,0 +1,1096 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Transport code. + +package http2 + +import ( + "bufio" + "bytes" + "crypto/tls" + "errors" + "fmt" + "io" + "io/ioutil" + "log" + "net" + "net/http" + "strconv" + "strings" + "sync" + + "golang.org/x/net/http2/hpack" +) + +const ( + // transportDefaultConnFlow is how many connection-level flow control + // tokens we give the server at start-up, past the default 64k. + transportDefaultConnFlow = 1 << 30 + + // transportDefaultStreamFlow is how many stream-level flow + // control tokens we announce to the peer, and how many bytes + // we buffer per stream. + transportDefaultStreamFlow = 4 << 20 + + // transportDefaultStreamMinRefresh is the minimum number of bytes we'll send + // a stream-level WINDOW_UPDATE for at a time. + transportDefaultStreamMinRefresh = 4 << 10 +) + +// Transport is an HTTP/2 Transport. +// +// A Transport internally caches connections to servers. It is safe +// for concurrent use by multiple goroutines. +type Transport struct { + // DialTLS specifies an optional dial function for creating + // TLS connections for requests. + // + // If DialTLS is nil, tls.Dial is used. + // + // If the returned net.Conn has a ConnectionState method like tls.Conn, + // it will be used to set http.Response.TLS. + DialTLS func(network, addr string, cfg *tls.Config) (net.Conn, error) + + // TLSClientConfig specifies the TLS configuration to use with + // tls.Client. If nil, the default configuration is used. + TLSClientConfig *tls.Config + + // ConnPool optionally specifies an alternate connection pool to use. + // If nil, the default is used. + ConnPool ClientConnPool + + connPoolOnce sync.Once + connPoolOrDef ClientConnPool // non-nil version of ConnPool +} + +var errTransportVersion = errors.New("http2: ConfigureTransport is only supported starting at Go 1.6") + +// ConfigureTransport configures a net/http HTTP/1 Transport to use HTTP/2. +// It requires Go 1.6 or later and returns an error if the net/http package is too old +// or if t1 has already been HTTP/2-enabled. +func ConfigureTransport(t1 *http.Transport) error { + return configureTransport(t1) // in configure_transport.go (go1.6) or go15.go +} + +func (t *Transport) connPool() ClientConnPool { + t.connPoolOnce.Do(t.initConnPool) + return t.connPoolOrDef +} + +func (t *Transport) initConnPool() { + if t.ConnPool != nil { + t.connPoolOrDef = t.ConnPool + } else { + t.connPoolOrDef = &clientConnPool{t: t} + } +} + +// ClientConn is the state of a single HTTP/2 client connection to an +// HTTP/2 server. +type ClientConn struct { + t *Transport + tconn net.Conn // usually *tls.Conn, except specialized impls + tlsState *tls.ConnectionState // nil only for specialized impls + + // readLoop goroutine fields: + readerDone chan struct{} // closed on error + readerErr error // set before readerDone is closed + + mu sync.Mutex // guards following + cond *sync.Cond // hold mu; broadcast on flow/closed changes + flow flow // our conn-level flow control quota (cs.flow is per stream) + inflow flow // peer's conn-level flow control + closed bool + goAway *GoAwayFrame // if non-nil, the GoAwayFrame we received + streams map[uint32]*clientStream // client-initiated + nextStreamID uint32 + bw *bufio.Writer + br *bufio.Reader + fr *Framer + // Settings from peer: + maxFrameSize uint32 + maxConcurrentStreams uint32 + initialWindowSize uint32 + hbuf bytes.Buffer // HPACK encoder writes into this + henc *hpack.Encoder + freeBuf [][]byte + + wmu sync.Mutex // held while writing; acquire AFTER wmu if holding both + werr error // first write error that has occurred +} + +// clientStream is the state for a single HTTP/2 stream. One of these +// is created for each Transport.RoundTrip call. +type clientStream struct { + cc *ClientConn + ID uint32 + resc chan resAndError + bufPipe pipe // buffered pipe with the flow-controlled response payload + + flow flow // guarded by cc.mu + inflow flow // guarded by cc.mu + + peerReset chan struct{} // closed on peer reset + resetErr error // populated before peerReset is closed +} + +// checkReset reports any error sent in a RST_STREAM frame by the +// server. +func (cs *clientStream) checkReset() error { + select { + case <-cs.peerReset: + return cs.resetErr + default: + return nil + } +} + +type stickyErrWriter struct { + w io.Writer + err *error +} + +func (sew stickyErrWriter) Write(p []byte) (n int, err error) { + if *sew.err != nil { + return 0, *sew.err + } + n, err = sew.w.Write(p) + *sew.err = err + return +} + +var ErrNoCachedConn = errors.New("http2: no cached connection was available") + +// RoundTripOpt are options for the Transport.RoundTripOpt method. +type RoundTripOpt struct { + // OnlyCachedConn controls whether RoundTripOpt may + // create a new TCP connection. If set true and + // no cached connection is available, RoundTripOpt + // will return ErrNoCachedConn. + OnlyCachedConn bool +} + +func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) { + return t.RoundTripOpt(req, RoundTripOpt{}) +} + +// authorityAddr returns a given authority (a host/IP, or host:port / ip:port) +// and returns a host:port. The port 443 is added if needed. +func authorityAddr(authority string) (addr string) { + if _, _, err := net.SplitHostPort(authority); err == nil { + return authority + } + return net.JoinHostPort(authority, "443") +} + +// RoundTripOpt is like RoundTrip, but takes options. +func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Response, error) { + if req.URL.Scheme != "https" { + return nil, errors.New("http2: unsupported scheme") + } + + addr := authorityAddr(req.URL.Host) + for { + cc, err := t.connPool().GetClientConn(req, addr) + if err != nil { + return nil, err + } + res, err := cc.RoundTrip(req) + if shouldRetryRequest(err) { // TODO: or clientconn is overloaded (too many outstanding requests)? + continue + } + if err != nil { + return nil, err + } + return res, nil + } +} + +// CloseIdleConnections closes any connections which were previously +// connected from previous requests but are now sitting idle. +// It does not interrupt any connections currently in use. +func (t *Transport) CloseIdleConnections() { + if cp, ok := t.connPool().(*clientConnPool); ok { + cp.closeIdleConnections() + } +} + +var errClientConnClosed = errors.New("http2: client conn is closed") + +func shouldRetryRequest(err error) bool { + // TODO: or GOAWAY graceful shutdown stuff + return err == errClientConnClosed +} + +func (t *Transport) dialClientConn(addr string) (*ClientConn, error) { + host, _, err := net.SplitHostPort(addr) + if err != nil { + return nil, err + } + tconn, err := t.dialTLS()("tcp", addr, t.newTLSConfig(host)) + if err != nil { + return nil, err + } + return t.NewClientConn(tconn) +} + +func (t *Transport) newTLSConfig(host string) *tls.Config { + cfg := new(tls.Config) + if t.TLSClientConfig != nil { + *cfg = *t.TLSClientConfig + } + cfg.NextProtos = []string{NextProtoTLS} // TODO: don't override if already in list + cfg.ServerName = host + return cfg +} + +func (t *Transport) dialTLS() func(string, string, *tls.Config) (net.Conn, error) { + if t.DialTLS != nil { + return t.DialTLS + } + return t.dialTLSDefault +} + +func (t *Transport) dialTLSDefault(network, addr string, cfg *tls.Config) (net.Conn, error) { + cn, err := tls.Dial(network, addr, cfg) + if err != nil { + return nil, err + } + if err := cn.Handshake(); err != nil { + return nil, err + } + if !cfg.InsecureSkipVerify { + if err := cn.VerifyHostname(cfg.ServerName); err != nil { + return nil, err + } + } + state := cn.ConnectionState() + if p := state.NegotiatedProtocol; p != NextProtoTLS { + return nil, fmt.Errorf("http2: unexpected ALPN protocol %q; want %q", p, NextProtoTLS) + } + if !state.NegotiatedProtocolIsMutual { + return nil, errors.New("http2: could not negotiate protocol mutually") + } + return cn, nil +} + +func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) { + if _, err := c.Write(clientPreface); err != nil { + return nil, err + } + + cc := &ClientConn{ + t: t, + tconn: c, + readerDone: make(chan struct{}), + nextStreamID: 1, + maxFrameSize: 16 << 10, // spec default + initialWindowSize: 65535, // spec default + maxConcurrentStreams: 1000, // "infinite", per spec. 1000 seems good enough. + streams: make(map[uint32]*clientStream), + } + cc.cond = sync.NewCond(&cc.mu) + cc.flow.add(int32(initialWindowSize)) + + // TODO: adjust this writer size to account for frame size + + // MTU + crypto/tls record padding. + cc.bw = bufio.NewWriter(stickyErrWriter{c, &cc.werr}) + cc.br = bufio.NewReader(c) + cc.fr = NewFramer(cc.bw, cc.br) + cc.henc = hpack.NewEncoder(&cc.hbuf) + + type connectionStater interface { + ConnectionState() tls.ConnectionState + } + if cs, ok := c.(connectionStater); ok { + state := cs.ConnectionState() + cc.tlsState = &state + } + + cc.fr.WriteSettings( + Setting{ID: SettingEnablePush, Val: 0}, + Setting{ID: SettingInitialWindowSize, Val: transportDefaultStreamFlow}, + ) + cc.fr.WriteWindowUpdate(0, transportDefaultConnFlow) + cc.inflow.add(transportDefaultConnFlow + initialWindowSize) + cc.bw.Flush() + if cc.werr != nil { + return nil, cc.werr + } + + // Read the obligatory SETTINGS frame + f, err := cc.fr.ReadFrame() + if err != nil { + return nil, err + } + sf, ok := f.(*SettingsFrame) + if !ok { + return nil, fmt.Errorf("expected settings frame, got: %T", f) + } + cc.fr.WriteSettingsAck() + cc.bw.Flush() + + sf.ForeachSetting(func(s Setting) error { + switch s.ID { + case SettingMaxFrameSize: + cc.maxFrameSize = s.Val + case SettingMaxConcurrentStreams: + cc.maxConcurrentStreams = s.Val + case SettingInitialWindowSize: + cc.initialWindowSize = s.Val + default: + // TODO(bradfitz): handle more + t.vlogf("Unhandled Setting: %v", s) + } + return nil + }) + + go cc.readLoop() + return cc, nil +} + +func (cc *ClientConn) setGoAway(f *GoAwayFrame) { + cc.mu.Lock() + defer cc.mu.Unlock() + cc.goAway = f +} + +func (cc *ClientConn) CanTakeNewRequest() bool { + cc.mu.Lock() + defer cc.mu.Unlock() + return cc.goAway == nil && + int64(len(cc.streams)+1) < int64(cc.maxConcurrentStreams) && + cc.nextStreamID < 2147483647 +} + +func (cc *ClientConn) closeIfIdle() { + cc.mu.Lock() + if len(cc.streams) > 0 { + cc.mu.Unlock() + return + } + cc.closed = true + // TODO: do clients send GOAWAY too? maybe? Just Close: + cc.mu.Unlock() + + cc.tconn.Close() +} + +const maxAllocFrameSize = 512 << 10 + +// frameBuffer returns a scratch buffer suitable for writing DATA frames. +// They're capped at the min of the peer's max frame size or 512KB +// (kinda arbitrarily), but definitely capped so we don't allocate 4GB +// bufers. +func (cc *ClientConn) frameScratchBuffer() []byte { + cc.mu.Lock() + size := cc.maxFrameSize + if size > maxAllocFrameSize { + size = maxAllocFrameSize + } + for i, buf := range cc.freeBuf { + if len(buf) >= int(size) { + cc.freeBuf[i] = nil + cc.mu.Unlock() + return buf[:size] + } + } + cc.mu.Unlock() + return make([]byte, size) +} + +func (cc *ClientConn) putFrameScratchBuffer(buf []byte) { + cc.mu.Lock() + defer cc.mu.Unlock() + const maxBufs = 4 // arbitrary; 4 concurrent requests per conn? investigate. + if len(cc.freeBuf) < maxBufs { + cc.freeBuf = append(cc.freeBuf, buf) + return + } + for i, old := range cc.freeBuf { + if old == nil { + cc.freeBuf[i] = buf + return + } + } + // forget about it. +} + +func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) { + cc.mu.Lock() + + if cc.closed { + cc.mu.Unlock() + return nil, errClientConnClosed + } + + cs := cc.newStream() + hasBody := req.Body != nil + + // we send: HEADERS[+CONTINUATION] + (DATA?) + hdrs := cc.encodeHeaders(req) + first := true + + cc.wmu.Lock() + frameSize := int(cc.maxFrameSize) + for len(hdrs) > 0 && cc.werr == nil { + chunk := hdrs + if len(chunk) > frameSize { + chunk = chunk[:frameSize] + } + hdrs = hdrs[len(chunk):] + endHeaders := len(hdrs) == 0 + if first { + cc.fr.WriteHeaders(HeadersFrameParam{ + StreamID: cs.ID, + BlockFragment: chunk, + EndStream: !hasBody, + EndHeaders: endHeaders, + }) + first = false + } else { + cc.fr.WriteContinuation(cs.ID, endHeaders, chunk) + } + } + cc.bw.Flush() + werr := cc.werr + cc.wmu.Unlock() + cc.mu.Unlock() + + if werr != nil { + return nil, werr + } + + var bodyCopyErrc chan error + var gotResHeaders chan struct{} // closed on resheaders + if hasBody { + bodyCopyErrc = make(chan error, 1) + gotResHeaders = make(chan struct{}) + go func() { + bodyCopyErrc <- cs.writeRequestBody(req.Body, gotResHeaders) + }() + } + + for { + select { + case re := <-cs.resc: + if gotResHeaders != nil { + close(gotResHeaders) + } + if re.err != nil { + return nil, re.err + } + res := re.res + res.Request = req + res.TLS = cc.tlsState + return res, nil + case err := <-bodyCopyErrc: + if err != nil { + return nil, err + } + } + } +} + +var errServerResponseBeforeRequestBody = errors.New("http2: server sent response while still writing request body") + +func (cs *clientStream) writeRequestBody(body io.Reader, gotResHeaders <-chan struct{}) error { + cc := cs.cc + sentEnd := false // whether we sent the final DATA frame w/ END_STREAM + buf := cc.frameScratchBuffer() + defer cc.putFrameScratchBuffer(buf) + + for !sentEnd { + var sawEOF bool + n, err := io.ReadFull(body, buf) + if err == io.ErrUnexpectedEOF { + sawEOF = true + err = nil + } else if err == io.EOF { + break + } else if err != nil { + return err + } + + toWrite := buf[:n] + for len(toWrite) > 0 && err == nil { + var allowed int32 + allowed, err = cs.awaitFlowControl(int32(len(toWrite))) + if err != nil { + return err + } + + cc.wmu.Lock() + select { + case <-gotResHeaders: + err = errServerResponseBeforeRequestBody + case <-cs.peerReset: + err = cs.resetErr + default: + data := toWrite[:allowed] + toWrite = toWrite[allowed:] + sentEnd = sawEOF && len(toWrite) == 0 + err = cc.fr.WriteData(cs.ID, sentEnd, data) + } + cc.wmu.Unlock() + } + if err != nil { + return err + } + } + + var err error + + cc.wmu.Lock() + if !sentEnd { + err = cc.fr.WriteData(cs.ID, true, nil) + } + if ferr := cc.bw.Flush(); ferr != nil && err == nil { + err = ferr + } + cc.wmu.Unlock() + + return err +} + +// awaitFlowControl waits for [1, min(maxBytes, cc.cs.maxFrameSize)] flow +// control tokens from the server. +// It returns either the non-zero number of tokens taken or an error +// if the stream is dead. +func (cs *clientStream) awaitFlowControl(maxBytes int32) (taken int32, err error) { + cc := cs.cc + cc.mu.Lock() + defer cc.mu.Unlock() + for { + if cc.closed { + return 0, errClientConnClosed + } + if err := cs.checkReset(); err != nil { + return 0, err + } + if a := cs.flow.available(); a > 0 { + take := a + if take > maxBytes { + take = maxBytes + } + if take > int32(cc.maxFrameSize) { + take = int32(cc.maxFrameSize) + } + cs.flow.take(take) + return take, nil + } + cc.cond.Wait() + } +} + +// requires cc.mu be held. +func (cc *ClientConn) encodeHeaders(req *http.Request) []byte { + cc.hbuf.Reset() + + // TODO(bradfitz): figure out :authority-vs-Host stuff between http2 and Go + host := req.Host + if host == "" { + host = req.URL.Host + } + + // 8.1.2.3 Request Pseudo-Header Fields + // The :path pseudo-header field includes the path and query parts of the + // target URI (the path-absolute production and optionally a '?' character + // followed by the query production (see Sections 3.3 and 3.4 of + // [RFC3986]). + cc.writeHeader(":authority", host) // probably not right for all sites + cc.writeHeader(":method", req.Method) + cc.writeHeader(":path", req.URL.RequestURI()) + cc.writeHeader(":scheme", "https") + + for k, vv := range req.Header { + lowKey := strings.ToLower(k) + if lowKey == "host" { + continue + } + for _, v := range vv { + cc.writeHeader(lowKey, v) + } + } + return cc.hbuf.Bytes() +} + +func (cc *ClientConn) writeHeader(name, value string) { + cc.henc.WriteField(hpack.HeaderField{Name: name, Value: value}) +} + +type resAndError struct { + res *http.Response + err error +} + +// requires cc.mu be held. +func (cc *ClientConn) newStream() *clientStream { + cs := &clientStream{ + cc: cc, + ID: cc.nextStreamID, + resc: make(chan resAndError, 1), + peerReset: make(chan struct{}), + } + cs.flow.add(int32(cc.initialWindowSize)) + cs.flow.setConnFlow(&cc.flow) + cs.inflow.add(transportDefaultStreamFlow) + cs.inflow.setConnFlow(&cc.inflow) + cc.nextStreamID += 2 + cc.streams[cs.ID] = cs + return cs +} + +func (cc *ClientConn) streamByID(id uint32, andRemove bool) *clientStream { + cc.mu.Lock() + defer cc.mu.Unlock() + cs := cc.streams[id] + if andRemove { + delete(cc.streams, id) + } + return cs +} + +// clientConnReadLoop is the state owned by the clientConn's frame-reading readLoop. +type clientConnReadLoop struct { + cc *ClientConn + activeRes map[uint32]*clientStream // keyed by streamID + + // continueStreamID is the stream ID we're waiting for + // continuation frames for. + continueStreamID uint32 + + hdec *hpack.Decoder + + // Fields reset on each HEADERS: + nextRes *http.Response + sawRegHeader bool // saw non-pseudo header + reqMalformed error // non-nil once known to be malformed +} + +// readLoop runs in its own goroutine and reads and dispatches frames. +func (cc *ClientConn) readLoop() { + rl := &clientConnReadLoop{ + cc: cc, + activeRes: make(map[uint32]*clientStream), + } + // TODO: figure out henc size + rl.hdec = hpack.NewDecoder(initialHeaderTableSize, rl.onNewHeaderField) + + defer rl.cleanup() + cc.readerErr = rl.run() + if ce, ok := cc.readerErr.(ConnectionError); ok { + cc.wmu.Lock() + cc.fr.WriteGoAway(0, ErrCode(ce), nil) + cc.wmu.Unlock() + } +} + +func (rl *clientConnReadLoop) cleanup() { + cc := rl.cc + defer cc.tconn.Close() + defer cc.t.connPool().MarkDead(cc) + defer close(cc.readerDone) + + // Close any response bodies if the server closes prematurely. + // TODO: also do this if we've written the headers but not + // gotten a response yet. + err := cc.readerErr + if err == io.EOF { + err = io.ErrUnexpectedEOF + } + cc.mu.Lock() + for _, cs := range rl.activeRes { + cs.bufPipe.CloseWithError(err) + } + for _, cs := range cc.streams { + select { + case cs.resc <- resAndError{err: err}: + default: + } + } + cc.closed = true + cc.cond.Broadcast() + cc.mu.Unlock() +} + +func (rl *clientConnReadLoop) run() error { + cc := rl.cc + for { + f, err := cc.fr.ReadFrame() + if se, ok := err.(StreamError); ok { + // TODO: deal with stream errors from the framer. + return se + } else if err != nil { + return err + } + cc.vlogf("Transport received %v: %#v", f.Header(), f) + + streamID := f.Header().StreamID + + _, isContinue := f.(*ContinuationFrame) + if isContinue { + if streamID != rl.continueStreamID { + cc.logf("Protocol violation: got CONTINUATION with id %d; want %d", streamID, rl.continueStreamID) + return ConnectionError(ErrCodeProtocol) + } + } else if rl.continueStreamID != 0 { + // Continue frames need to be adjacent in the stream + // and we were in the middle of headers. + cc.logf("Protocol violation: got %T for stream %d, want CONTINUATION for %d", f, streamID, rl.continueStreamID) + return ConnectionError(ErrCodeProtocol) + } + + switch f := f.(type) { + case *HeadersFrame: + err = rl.processHeaders(f) + case *ContinuationFrame: + err = rl.processContinuation(f) + case *DataFrame: + err = rl.processData(f) + case *GoAwayFrame: + err = rl.processGoAway(f) + case *RSTStreamFrame: + err = rl.processResetStream(f) + case *SettingsFrame: + err = rl.processSettings(f) + case *PushPromiseFrame: + err = rl.processPushPromise(f) + case *WindowUpdateFrame: + err = rl.processWindowUpdate(f) + case *PingFrame: + err = rl.processPing(f) + default: + cc.logf("Transport: unhandled response frame type %T", f) + } + if err != nil { + return err + } + } +} + +func (rl *clientConnReadLoop) processHeaders(f *HeadersFrame) error { + rl.sawRegHeader = false + rl.reqMalformed = nil + rl.nextRes = &http.Response{ + Proto: "HTTP/2.0", + ProtoMajor: 2, + Header: make(http.Header), + } + return rl.processHeaderBlockFragment(f.HeaderBlockFragment(), f.StreamID, f.HeadersEnded(), f.StreamEnded()) +} + +func (rl *clientConnReadLoop) processContinuation(f *ContinuationFrame) error { + return rl.processHeaderBlockFragment(f.HeaderBlockFragment(), f.StreamID, f.HeadersEnded(), f.StreamEnded()) +} + +func (rl *clientConnReadLoop) processHeaderBlockFragment(frag []byte, streamID uint32, headersEnded, streamEnded bool) error { + cc := rl.cc + cs := cc.streamByID(streamID, streamEnded) + if cs == nil { + // We could return a ConnectionError(ErrCodeProtocol) + // here, except that in the case of us canceling + // client requests, we may also delete from the + // streams map, in which case we forgot that we sent + // this request. So, just ignore any responses for + // now. They might've been in-flight before the + // server got our RST_STREAM. + return nil + } + _, err := rl.hdec.Write(frag) + if err != nil { + return err + } + if !headersEnded { + rl.continueStreamID = cs.ID + return nil + } + + // HEADERS (or CONTINUATION) are now over. + rl.continueStreamID = 0 + + if rl.reqMalformed != nil { + cs.resc <- resAndError{err: rl.reqMalformed} + rl.cc.writeStreamReset(cs.ID, ErrCodeProtocol, rl.reqMalformed) + return nil + } + + res := rl.nextRes + if streamEnded { + res.Body = noBody + } else { + buf := new(bytes.Buffer) // TODO(bradfitz): recycle this garbage + cs.bufPipe = pipe{b: buf} + res.Body = transportResponseBody{cs} + } + rl.activeRes[cs.ID] = cs + cs.resc <- resAndError{res: res} + rl.nextRes = nil // unused now; will be reset next HEADERS frame + return nil +} + +// transportResponseBody is the concrete type of Transport.RoundTrip's +// Response.Body. It is an io.ReadCloser. On Read, it reads from cs.body. +// On Close it sends RST_STREAM if EOF wasn't already seen. +type transportResponseBody struct { + cs *clientStream +} + +func (b transportResponseBody) Read(p []byte) (n int, err error) { + n, err = b.cs.bufPipe.Read(p) + if n == 0 { + return + } + + cs := b.cs + cc := cs.cc + cc.mu.Lock() + defer cc.mu.Unlock() + + var connAdd, streamAdd int32 + // Check the conn-level first, before the stream-level. + if v := cc.inflow.available(); v < transportDefaultConnFlow/2 { + connAdd = transportDefaultConnFlow - v + cc.inflow.add(connAdd) + } + if err == nil { // No need to refresh if the stream is over or failed. + if v := cs.inflow.available(); v < transportDefaultStreamFlow-transportDefaultStreamMinRefresh { + streamAdd = transportDefaultStreamFlow - v + cs.inflow.add(streamAdd) + } + } + if connAdd != 0 || streamAdd != 0 { + cc.wmu.Lock() + defer cc.wmu.Unlock() + if connAdd != 0 { + cc.fr.WriteWindowUpdate(0, mustUint31(connAdd)) + } + if streamAdd != 0 { + cc.fr.WriteWindowUpdate(cs.ID, mustUint31(streamAdd)) + } + cc.bw.Flush() + } + return +} + +func (b transportResponseBody) Close() error { + if b.cs.bufPipe.Err() != io.EOF { + // TODO: write test for this + b.cs.cc.writeStreamReset(b.cs.ID, ErrCodeCancel, nil) + } + return nil +} + +func (rl *clientConnReadLoop) processData(f *DataFrame) error { + cc := rl.cc + cs := cc.streamByID(f.StreamID, f.StreamEnded()) + if cs == nil { + return nil + } + data := f.Data() + if VerboseLogs { + rl.cc.logf("DATA: %q", data) + } + + // Check connection-level flow control. + cc.mu.Lock() + if cs.inflow.available() >= int32(len(data)) { + cs.inflow.take(int32(len(data))) + } else { + cc.mu.Unlock() + return ConnectionError(ErrCodeFlowControl) + } + cc.mu.Unlock() + + if _, err := cs.bufPipe.Write(data); err != nil { + return err + } + + if f.StreamEnded() { + cs.bufPipe.CloseWithError(io.EOF) + delete(rl.activeRes, cs.ID) + } + return nil +} + +func (rl *clientConnReadLoop) processGoAway(f *GoAwayFrame) error { + cc := rl.cc + cc.t.connPool().MarkDead(cc) + if f.ErrCode != 0 { + // TODO: deal with GOAWAY more. particularly the error code + cc.vlogf("transport got GOAWAY with error code = %v", f.ErrCode) + } + cc.setGoAway(f) + return nil +} + +func (rl *clientConnReadLoop) processSettings(f *SettingsFrame) error { + cc := rl.cc + cc.mu.Lock() + defer cc.mu.Unlock() + return f.ForeachSetting(func(s Setting) error { + switch s.ID { + case SettingMaxFrameSize: + cc.maxFrameSize = s.Val + case SettingMaxConcurrentStreams: + cc.maxConcurrentStreams = s.Val + case SettingInitialWindowSize: + // TODO: error if this is too large. + + // TODO: adjust flow control of still-open + // frames by the difference of the old initial + // window size and this one. + cc.initialWindowSize = s.Val + default: + // TODO(bradfitz): handle more settings? + cc.vlogf("Unhandled Setting: %v", s) + } + return nil + }) +} + +func (rl *clientConnReadLoop) processWindowUpdate(f *WindowUpdateFrame) error { + cc := rl.cc + cs := cc.streamByID(f.StreamID, false) + if f.StreamID != 0 && cs == nil { + return nil + } + + cc.mu.Lock() + defer cc.mu.Unlock() + + fl := &cc.flow + if cs != nil { + fl = &cs.flow + } + if !fl.add(int32(f.Increment)) { + return ConnectionError(ErrCodeFlowControl) + } + cc.cond.Broadcast() + return nil +} + +func (rl *clientConnReadLoop) processResetStream(f *RSTStreamFrame) error { + cs := rl.cc.streamByID(f.StreamID, true) + if cs == nil { + // TODO: return error if server tries to RST_STEAM an idle stream + return nil + } + select { + case <-cs.peerReset: + // Already reset. + // This is the only goroutine + // which closes this, so there + // isn't a race. + default: + err := StreamError{cs.ID, f.ErrCode} + cs.resetErr = err + close(cs.peerReset) + cs.bufPipe.CloseWithError(err) + } + delete(rl.activeRes, cs.ID) + return nil +} + +func (rl *clientConnReadLoop) processPing(f *PingFrame) error { + if f.IsAck() { + // 6.7 PING: " An endpoint MUST NOT respond to PING frames + // containing this flag." + return nil + } + cc := rl.cc + cc.wmu.Lock() + defer cc.wmu.Unlock() + if err := cc.fr.WritePing(true, f.Data); err != nil { + return err + } + return cc.bw.Flush() +} + +func (rl *clientConnReadLoop) processPushPromise(f *PushPromiseFrame) error { + // We told the peer we don't want them. + // Spec says: + // "PUSH_PROMISE MUST NOT be sent if the SETTINGS_ENABLE_PUSH + // setting of the peer endpoint is set to 0. An endpoint that + // has set this setting and has received acknowledgement MUST + // treat the receipt of a PUSH_PROMISE frame as a connection + // error (Section 5.4.1) of type PROTOCOL_ERROR." + return ConnectionError(ErrCodeProtocol) +} + +func (cc *ClientConn) writeStreamReset(streamID uint32, code ErrCode, err error) { + // TODO: do something with err? send it as a debug frame to the peer? + // But that's only in GOAWAY. Invent a new frame type? Is there one already? + cc.wmu.Lock() + cc.fr.WriteRSTStream(streamID, code) + cc.wmu.Unlock() +} + +// onNewHeaderField runs on the readLoop goroutine whenever a new +// hpack header field is decoded. +func (rl *clientConnReadLoop) onNewHeaderField(f hpack.HeaderField) { + cc := rl.cc + if VerboseLogs { + cc.logf("Header field: %+v", f) + } + isPseudo := strings.HasPrefix(f.Name, ":") + if isPseudo { + if rl.sawRegHeader { + rl.reqMalformed = errors.New("http2: invalid pseudo header after regular header") + return + } + switch f.Name { + case ":status": + code, err := strconv.Atoi(f.Value) + if err != nil { + rl.reqMalformed = errors.New("http2: invalid :status") + return + } + rl.nextRes.Status = f.Value + " " + http.StatusText(code) + rl.nextRes.StatusCode = code + default: + // "Endpoints MUST NOT generate pseudo-header + // fields other than those defined in this + // document." + rl.reqMalformed = fmt.Errorf("http2: unknown response pseudo header %q", f.Name) + } + } else { + rl.sawRegHeader = true + rl.nextRes.Header.Add(http.CanonicalHeaderKey(f.Name), f.Value) + } +} + +func (cc *ClientConn) logf(format string, args ...interface{}) { + cc.t.logf(format, args...) +} + +func (cc *ClientConn) vlogf(format string, args ...interface{}) { + cc.t.vlogf(format, args...) +} + +func (t *Transport) vlogf(format string, args ...interface{}) { + if VerboseLogs { + t.logf(format, args...) + } +} + +func (t *Transport) logf(format string, args ...interface{}) { + log.Printf(format, args...) +} + +var noBody io.ReadCloser = ioutil.NopCloser(bytes.NewReader(nil)) + +func strSliceContains(ss []string, s string) bool { + for _, v := range ss { + if v == s { + return true + } + } + return false +} + +type erringRoundTripper struct{ err error } + +func (rt erringRoundTripper) RoundTrip(*http.Request) (*http.Response, error) { return nil, rt.err } diff --git a/vendor/golang.org/x/net/http2/transport_test.go b/vendor/golang.org/x/net/http2/transport_test.go new file mode 100644 index 0000000..b7385d6 --- /dev/null +++ b/vendor/golang.org/x/net/http2/transport_test.go @@ -0,0 +1,375 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import ( + "crypto/tls" + "flag" + "fmt" + "io" + "io/ioutil" + "math/rand" + "net" + "net/http" + "net/url" + "os" + "reflect" + "strings" + "sync" + "testing" + "time" +) + +var ( + extNet = flag.Bool("extnet", false, "do external network tests") + transportHost = flag.String("transporthost", "http2.golang.org", "hostname to use for TestTransport") + insecure = flag.Bool("insecure", false, "insecure TLS dials") // TODO: dead code. remove? +) + +var tlsConfigInsecure = &tls.Config{InsecureSkipVerify: true} + +func TestTransportExternal(t *testing.T) { + if !*extNet { + t.Skip("skipping external network test") + } + req, _ := http.NewRequest("GET", "https://"+*transportHost+"/", nil) + rt := &Transport{TLSClientConfig: tlsConfigInsecure} + res, err := rt.RoundTrip(req) + if err != nil { + t.Fatalf("%v", err) + } + res.Write(os.Stdout) +} + +func TestTransport(t *testing.T) { + const body = "sup" + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + io.WriteString(w, body) + }, optOnlyServer) + defer st.Close() + + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + + req, err := http.NewRequest("GET", st.ts.URL, nil) + if err != nil { + t.Fatal(err) + } + res, err := tr.RoundTrip(req) + if err != nil { + t.Fatal(err) + } + defer res.Body.Close() + + t.Logf("Got res: %+v", res) + if g, w := res.StatusCode, 200; g != w { + t.Errorf("StatusCode = %v; want %v", g, w) + } + if g, w := res.Status, "200 OK"; g != w { + t.Errorf("Status = %q; want %q", g, w) + } + wantHeader := http.Header{ + "Content-Length": []string{"3"}, + "Content-Type": []string{"text/plain; charset=utf-8"}, + } + if !reflect.DeepEqual(res.Header, wantHeader) { + t.Errorf("res Header = %v; want %v", res.Header, wantHeader) + } + if res.Request != req { + t.Errorf("Response.Request = %p; want %p", res.Request, req) + } + if res.TLS == nil { + t.Error("Response.TLS = nil; want non-nil") + } + slurp, err := ioutil.ReadAll(res.Body) + if err != nil { + t.Errorf("Body read: %v", err) + } else if string(slurp) != body { + t.Errorf("Body = %q; want %q", slurp, body) + } + +} + +func TestTransportReusesConns(t *testing.T) { + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + io.WriteString(w, r.RemoteAddr) + }, optOnlyServer) + defer st.Close() + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + get := func() string { + req, err := http.NewRequest("GET", st.ts.URL, nil) + if err != nil { + t.Fatal(err) + } + res, err := tr.RoundTrip(req) + if err != nil { + t.Fatal(err) + } + defer res.Body.Close() + slurp, err := ioutil.ReadAll(res.Body) + if err != nil { + t.Fatalf("Body read: %v", err) + } + addr := strings.TrimSpace(string(slurp)) + if addr == "" { + t.Fatalf("didn't get an addr in response") + } + return addr + } + first := get() + second := get() + if first != second { + t.Errorf("first and second responses were on different connections: %q vs %q", first, second) + } +} + +func TestTransportAbortClosesPipes(t *testing.T) { + shutdown := make(chan struct{}) + st := newServerTester(t, + func(w http.ResponseWriter, r *http.Request) { + w.(http.Flusher).Flush() + <-shutdown + }, + optOnlyServer, + ) + defer st.Close() + defer close(shutdown) // we must shutdown before st.Close() to avoid hanging + + done := make(chan struct{}) + requestMade := make(chan struct{}) + go func() { + defer close(done) + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + req, err := http.NewRequest("GET", st.ts.URL, nil) + if err != nil { + t.Fatal(err) + } + res, err := tr.RoundTrip(req) + if err != nil { + t.Fatal(err) + } + defer res.Body.Close() + close(requestMade) + _, err = ioutil.ReadAll(res.Body) + if err == nil { + t.Error("expected error from res.Body.Read") + } + }() + + <-requestMade + // Now force the serve loop to end, via closing the connection. + st.closeConn() + // deadlock? that's a bug. + select { + case <-done: + case <-time.After(3 * time.Second): + t.Fatal("timeout") + } +} + +// TODO: merge this with TestTransportBody to make TestTransportRequest? This +// could be a table-driven test with extra goodies. +func TestTransportPath(t *testing.T) { + gotc := make(chan *url.URL, 1) + st := newServerTester(t, + func(w http.ResponseWriter, r *http.Request) { + gotc <- r.URL + }, + optOnlyServer, + ) + defer st.Close() + + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + const ( + path = "/testpath" + query = "q=1" + ) + surl := st.ts.URL + path + "?" + query + req, err := http.NewRequest("POST", surl, nil) + if err != nil { + t.Fatal(err) + } + c := &http.Client{Transport: tr} + res, err := c.Do(req) + if err != nil { + t.Fatal(err) + } + defer res.Body.Close() + got := <-gotc + if got.Path != path { + t.Errorf("Read Path = %q; want %q", got.Path, path) + } + if got.RawQuery != query { + t.Errorf("Read RawQuery = %q; want %q", got.RawQuery, query) + } +} + +func randString(n int) string { + rnd := rand.New(rand.NewSource(int64(n))) + b := make([]byte, n) + for i := range b { + b[i] = byte(rnd.Intn(256)) + } + return string(b) +} + +var bodyTests = []struct { + body string + noContentLen bool +}{ + {body: "some message"}, + {body: "some message", noContentLen: true}, + {body: ""}, + {body: "", noContentLen: true}, + {body: strings.Repeat("a", 1<<20), noContentLen: true}, + {body: strings.Repeat("a", 1<<20)}, + {body: randString(16<<10 - 1)}, + {body: randString(16 << 10)}, + {body: randString(16<<10 + 1)}, + {body: randString(512<<10 - 1)}, + {body: randString(512 << 10)}, + {body: randString(512<<10 + 1)}, + {body: randString(1<<20 - 1)}, + {body: randString(1 << 20)}, + {body: randString(1<<20 + 2)}, +} + +func TestTransportBody(t *testing.T) { + gotc := make(chan interface{}, 1) + st := newServerTester(t, + func(w http.ResponseWriter, r *http.Request) { + slurp, err := ioutil.ReadAll(r.Body) + if err != nil { + gotc <- err + } else { + gotc <- string(slurp) + } + }, + optOnlyServer, + ) + defer st.Close() + + for i, tt := range bodyTests { + tr := &Transport{TLSClientConfig: tlsConfigInsecure} + defer tr.CloseIdleConnections() + + var body io.Reader = strings.NewReader(tt.body) + if tt.noContentLen { + body = struct{ io.Reader }{body} // just a Reader, hiding concrete type and other methods + } + req, err := http.NewRequest("POST", st.ts.URL, body) + if err != nil { + t.Fatalf("#%d: %v", i, err) + } + c := &http.Client{Transport: tr} + res, err := c.Do(req) + if err != nil { + t.Fatalf("#%d: %v", i, err) + } + defer res.Body.Close() + got := <-gotc + if err, ok := got.(error); ok { + t.Fatalf("#%d: %v", i, err) + } else if got.(string) != tt.body { + got := got.(string) + t.Errorf("#%d: Read body mismatch.\n got: %q (len %d)\nwant: %q (len %d)", i, shortString(got), len(got), shortString(tt.body), len(tt.body)) + } + } +} + +func shortString(v string) string { + const maxLen = 100 + if len(v) <= maxLen { + return v + } + return fmt.Sprintf("%v[...%d bytes omitted...]%v", v[:maxLen/2], len(v)-maxLen, v[len(v)-maxLen/2:]) +} + +func TestTransportDialTLS(t *testing.T) { + var mu sync.Mutex // guards following + var gotReq, didDial bool + + ts := newServerTester(t, + func(w http.ResponseWriter, r *http.Request) { + mu.Lock() + gotReq = true + mu.Unlock() + }, + optOnlyServer, + ) + defer ts.Close() + tr := &Transport{ + DialTLS: func(netw, addr string, cfg *tls.Config) (net.Conn, error) { + mu.Lock() + didDial = true + mu.Unlock() + cfg.InsecureSkipVerify = true + c, err := tls.Dial(netw, addr, cfg) + if err != nil { + return nil, err + } + return c, c.Handshake() + }, + } + defer tr.CloseIdleConnections() + client := &http.Client{Transport: tr} + res, err := client.Get(ts.ts.URL) + if err != nil { + t.Fatal(err) + } + res.Body.Close() + mu.Lock() + if !gotReq { + t.Error("didn't get request") + } + if !didDial { + t.Error("didn't use dial hook") + } +} + +func TestConfigureTransport(t *testing.T) { + t1 := &http.Transport{} + err := ConfigureTransport(t1) + if err == errTransportVersion { + t.Skip(err) + } + if err != nil { + t.Fatal(err) + } + if got := fmt.Sprintf("%#v", *t1); !strings.Contains(got, `"h2"`) { + // Laziness, to avoid buildtags. + t.Errorf("stringification of HTTP/1 transport didn't contain \"h2\": %v", got) + } + if t1.TLSClientConfig == nil { + t.Errorf("nil t1.TLSClientConfig") + } else if !reflect.DeepEqual(t1.TLSClientConfig.NextProtos, []string{"h2"}) { + t.Errorf("TLSClientConfig.NextProtos = %q; want just 'h2'", t1.TLSClientConfig.NextProtos) + } + if err := ConfigureTransport(t1); err == nil { + t.Error("unexpected success on second call to ConfigureTransport") + } + + // And does it work? + st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { + io.WriteString(w, r.Proto) + }, optOnlyServer) + defer st.Close() + + t1.TLSClientConfig.InsecureSkipVerify = true + c := &http.Client{Transport: t1} + res, err := c.Get(st.ts.URL) + if err != nil { + t.Fatal(err) + } + slurp, err := ioutil.ReadAll(res.Body) + if err != nil { + t.Fatal(err) + } + if got, want := string(slurp), "HTTP/2.0"; got != want { + t.Errorf("body = %q; want %q", got, want) + } +} diff --git a/vendor/golang.org/x/net/http2/write.go b/vendor/golang.org/x/net/http2/write.go new file mode 100644 index 0000000..9050beb --- /dev/null +++ b/vendor/golang.org/x/net/http2/write.go @@ -0,0 +1,206 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import ( + "bytes" + "fmt" + "net/http" + "time" + + "golang.org/x/net/http2/hpack" +) + +// writeFramer is implemented by any type that is used to write frames. +type writeFramer interface { + writeFrame(writeContext) error +} + +// writeContext is the interface needed by the various frame writer +// types below. All the writeFrame methods below are scheduled via the +// frame writing scheduler (see writeScheduler in writesched.go). +// +// This interface is implemented by *serverConn. +// TODO: use it from the client code too, once it exists. +type writeContext interface { + Framer() *Framer + Flush() error + CloseConn() error + // HeaderEncoder returns an HPACK encoder that writes to the + // returned buffer. + HeaderEncoder() (*hpack.Encoder, *bytes.Buffer) +} + +// endsStream reports whether the given frame writer w will locally +// close the stream. +func endsStream(w writeFramer) bool { + switch v := w.(type) { + case *writeData: + return v.endStream + case *writeResHeaders: + return v.endStream + case nil: + // This can only happen if the caller reuses w after it's + // been intentionally nil'ed out to prevent use. Keep this + // here to catch future refactoring breaking it. + panic("endsStream called on nil writeFramer") + } + return false +} + +type flushFrameWriter struct{} + +func (flushFrameWriter) writeFrame(ctx writeContext) error { + return ctx.Flush() +} + +type writeSettings []Setting + +func (s writeSettings) writeFrame(ctx writeContext) error { + return ctx.Framer().WriteSettings([]Setting(s)...) +} + +type writeGoAway struct { + maxStreamID uint32 + code ErrCode +} + +func (p *writeGoAway) writeFrame(ctx writeContext) error { + err := ctx.Framer().WriteGoAway(p.maxStreamID, p.code, nil) + if p.code != 0 { + ctx.Flush() // ignore error: we're hanging up on them anyway + time.Sleep(50 * time.Millisecond) + ctx.CloseConn() + } + return err +} + +type writeData struct { + streamID uint32 + p []byte + endStream bool +} + +func (w *writeData) String() string { + return fmt.Sprintf("writeData(stream=%d, p=%d, endStream=%v)", w.streamID, len(w.p), w.endStream) +} + +func (w *writeData) writeFrame(ctx writeContext) error { + return ctx.Framer().WriteData(w.streamID, w.endStream, w.p) +} + +func (se StreamError) writeFrame(ctx writeContext) error { + return ctx.Framer().WriteRSTStream(se.StreamID, se.Code) +} + +type writePingAck struct{ pf *PingFrame } + +func (w writePingAck) writeFrame(ctx writeContext) error { + return ctx.Framer().WritePing(true, w.pf.Data) +} + +type writeSettingsAck struct{} + +func (writeSettingsAck) writeFrame(ctx writeContext) error { + return ctx.Framer().WriteSettingsAck() +} + +// writeResHeaders is a request to write a HEADERS and 0+ CONTINUATION frames +// for HTTP response headers from a server handler. +type writeResHeaders struct { + streamID uint32 + httpResCode int + h http.Header // may be nil + endStream bool + + contentType string + contentLength string +} + +func (w *writeResHeaders) writeFrame(ctx writeContext) error { + enc, buf := ctx.HeaderEncoder() + buf.Reset() + enc.WriteField(hpack.HeaderField{Name: ":status", Value: httpCodeString(w.httpResCode)}) + for k, vv := range w.h { + k = lowerHeader(k) + for _, v := range vv { + // TODO: more of "8.1.2.2 Connection-Specific Header Fields" + if k == "transfer-encoding" && v != "trailers" { + continue + } + enc.WriteField(hpack.HeaderField{Name: k, Value: v}) + } + } + if w.contentType != "" { + enc.WriteField(hpack.HeaderField{Name: "content-type", Value: w.contentType}) + } + if w.contentLength != "" { + enc.WriteField(hpack.HeaderField{Name: "content-length", Value: w.contentLength}) + } + + headerBlock := buf.Bytes() + if len(headerBlock) == 0 { + panic("unexpected empty hpack") + } + + // For now we're lazy and just pick the minimum MAX_FRAME_SIZE + // that all peers must support (16KB). Later we could care + // more and send larger frames if the peer advertised it, but + // there's little point. Most headers are small anyway (so we + // generally won't have CONTINUATION frames), and extra frames + // only waste 9 bytes anyway. + const maxFrameSize = 16384 + + first := true + for len(headerBlock) > 0 { + frag := headerBlock + if len(frag) > maxFrameSize { + frag = frag[:maxFrameSize] + } + headerBlock = headerBlock[len(frag):] + endHeaders := len(headerBlock) == 0 + var err error + if first { + first = false + err = ctx.Framer().WriteHeaders(HeadersFrameParam{ + StreamID: w.streamID, + BlockFragment: frag, + EndStream: w.endStream, + EndHeaders: endHeaders, + }) + } else { + err = ctx.Framer().WriteContinuation(w.streamID, endHeaders, frag) + } + if err != nil { + return err + } + } + return nil +} + +type write100ContinueHeadersFrame struct { + streamID uint32 +} + +func (w write100ContinueHeadersFrame) writeFrame(ctx writeContext) error { + enc, buf := ctx.HeaderEncoder() + buf.Reset() + enc.WriteField(hpack.HeaderField{Name: ":status", Value: "100"}) + return ctx.Framer().WriteHeaders(HeadersFrameParam{ + StreamID: w.streamID, + BlockFragment: buf.Bytes(), + EndStream: false, + EndHeaders: true, + }) +} + +type writeWindowUpdate struct { + streamID uint32 // or 0 for conn-level + n uint32 +} + +func (wu writeWindowUpdate) writeFrame(ctx writeContext) error { + return ctx.Framer().WriteWindowUpdate(wu.streamID, wu.n) +} diff --git a/vendor/golang.org/x/net/http2/writesched.go b/vendor/golang.org/x/net/http2/writesched.go new file mode 100644 index 0000000..c24316c --- /dev/null +++ b/vendor/golang.org/x/net/http2/writesched.go @@ -0,0 +1,283 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import "fmt" + +// frameWriteMsg is a request to write a frame. +type frameWriteMsg struct { + // write is the interface value that does the writing, once the + // writeScheduler (below) has decided to select this frame + // to write. The write functions are all defined in write.go. + write writeFramer + + stream *stream // used for prioritization. nil for non-stream frames. + + // done, if non-nil, must be a buffered channel with space for + // 1 message and is sent the return value from write (or an + // earlier error) when the frame has been written. + done chan error +} + +// for debugging only: +func (wm frameWriteMsg) String() string { + var streamID uint32 + if wm.stream != nil { + streamID = wm.stream.id + } + var des string + if s, ok := wm.write.(fmt.Stringer); ok { + des = s.String() + } else { + des = fmt.Sprintf("%T", wm.write) + } + return fmt.Sprintf("[frameWriteMsg stream=%d, ch=%v, type: %v]", streamID, wm.done != nil, des) +} + +// writeScheduler tracks pending frames to write, priorities, and decides +// the next one to use. It is not thread-safe. +type writeScheduler struct { + // zero are frames not associated with a specific stream. + // They're sent before any stream-specific freams. + zero writeQueue + + // maxFrameSize is the maximum size of a DATA frame + // we'll write. Must be non-zero and between 16K-16M. + maxFrameSize uint32 + + // sq contains the stream-specific queues, keyed by stream ID. + // when a stream is idle, it's deleted from the map. + sq map[uint32]*writeQueue + + // canSend is a slice of memory that's reused between frame + // scheduling decisions to hold the list of writeQueues (from sq) + // which have enough flow control data to send. After canSend is + // built, the best is selected. + canSend []*writeQueue + + // pool of empty queues for reuse. + queuePool []*writeQueue +} + +func (ws *writeScheduler) putEmptyQueue(q *writeQueue) { + if len(q.s) != 0 { + panic("queue must be empty") + } + ws.queuePool = append(ws.queuePool, q) +} + +func (ws *writeScheduler) getEmptyQueue() *writeQueue { + ln := len(ws.queuePool) + if ln == 0 { + return new(writeQueue) + } + q := ws.queuePool[ln-1] + ws.queuePool = ws.queuePool[:ln-1] + return q +} + +func (ws *writeScheduler) empty() bool { return ws.zero.empty() && len(ws.sq) == 0 } + +func (ws *writeScheduler) add(wm frameWriteMsg) { + st := wm.stream + if st == nil { + ws.zero.push(wm) + } else { + ws.streamQueue(st.id).push(wm) + } +} + +func (ws *writeScheduler) streamQueue(streamID uint32) *writeQueue { + if q, ok := ws.sq[streamID]; ok { + return q + } + if ws.sq == nil { + ws.sq = make(map[uint32]*writeQueue) + } + q := ws.getEmptyQueue() + ws.sq[streamID] = q + return q +} + +// take returns the most important frame to write and removes it from the scheduler. +// It is illegal to call this if the scheduler is empty or if there are no connection-level +// flow control bytes available. +func (ws *writeScheduler) take() (wm frameWriteMsg, ok bool) { + if ws.maxFrameSize == 0 { + panic("internal error: ws.maxFrameSize not initialized or invalid") + } + + // If there any frames not associated with streams, prefer those first. + // These are usually SETTINGS, etc. + if !ws.zero.empty() { + return ws.zero.shift(), true + } + if len(ws.sq) == 0 { + return + } + + // Next, prioritize frames on streams that aren't DATA frames (no cost). + for id, q := range ws.sq { + if q.firstIsNoCost() { + return ws.takeFrom(id, q) + } + } + + // Now, all that remains are DATA frames with non-zero bytes to + // send. So pick the best one. + if len(ws.canSend) != 0 { + panic("should be empty") + } + for _, q := range ws.sq { + if n := ws.streamWritableBytes(q); n > 0 { + ws.canSend = append(ws.canSend, q) + } + } + if len(ws.canSend) == 0 { + return + } + defer ws.zeroCanSend() + + // TODO: find the best queue + q := ws.canSend[0] + + return ws.takeFrom(q.streamID(), q) +} + +// zeroCanSend is defered from take. +func (ws *writeScheduler) zeroCanSend() { + for i := range ws.canSend { + ws.canSend[i] = nil + } + ws.canSend = ws.canSend[:0] +} + +// streamWritableBytes returns the number of DATA bytes we could write +// from the given queue's stream, if this stream/queue were +// selected. It is an error to call this if q's head isn't a +// *writeData. +func (ws *writeScheduler) streamWritableBytes(q *writeQueue) int32 { + wm := q.head() + ret := wm.stream.flow.available() // max we can write + if ret == 0 { + return 0 + } + if int32(ws.maxFrameSize) < ret { + ret = int32(ws.maxFrameSize) + } + if ret == 0 { + panic("internal error: ws.maxFrameSize not initialized or invalid") + } + wd := wm.write.(*writeData) + if len(wd.p) < int(ret) { + ret = int32(len(wd.p)) + } + return ret +} + +func (ws *writeScheduler) takeFrom(id uint32, q *writeQueue) (wm frameWriteMsg, ok bool) { + wm = q.head() + // If the first item in this queue costs flow control tokens + // and we don't have enough, write as much as we can. + if wd, ok := wm.write.(*writeData); ok && len(wd.p) > 0 { + allowed := wm.stream.flow.available() // max we can write + if allowed == 0 { + // No quota available. Caller can try the next stream. + return frameWriteMsg{}, false + } + if int32(ws.maxFrameSize) < allowed { + allowed = int32(ws.maxFrameSize) + } + // TODO: further restrict the allowed size, because even if + // the peer says it's okay to write 16MB data frames, we might + // want to write smaller ones to properly weight competing + // streams' priorities. + + if len(wd.p) > int(allowed) { + wm.stream.flow.take(allowed) + chunk := wd.p[:allowed] + wd.p = wd.p[allowed:] + // Make up a new write message of a valid size, rather + // than shifting one off the queue. + return frameWriteMsg{ + stream: wm.stream, + write: &writeData{ + streamID: wd.streamID, + p: chunk, + // even if the original had endStream set, there + // arebytes remaining because len(wd.p) > allowed, + // so we know endStream is false: + endStream: false, + }, + // our caller is blocking on the final DATA frame, not + // these intermediates, so no need to wait: + done: nil, + }, true + } + wm.stream.flow.take(int32(len(wd.p))) + } + + q.shift() + if q.empty() { + ws.putEmptyQueue(q) + delete(ws.sq, id) + } + return wm, true +} + +func (ws *writeScheduler) forgetStream(id uint32) { + q, ok := ws.sq[id] + if !ok { + return + } + delete(ws.sq, id) + + // But keep it for others later. + for i := range q.s { + q.s[i] = frameWriteMsg{} + } + q.s = q.s[:0] + ws.putEmptyQueue(q) +} + +type writeQueue struct { + s []frameWriteMsg +} + +// streamID returns the stream ID for a non-empty stream-specific queue. +func (q *writeQueue) streamID() uint32 { return q.s[0].stream.id } + +func (q *writeQueue) empty() bool { return len(q.s) == 0 } + +func (q *writeQueue) push(wm frameWriteMsg) { + q.s = append(q.s, wm) +} + +// head returns the next item that would be removed by shift. +func (q *writeQueue) head() frameWriteMsg { + if len(q.s) == 0 { + panic("invalid use of queue") + } + return q.s[0] +} + +func (q *writeQueue) shift() frameWriteMsg { + if len(q.s) == 0 { + panic("invalid use of queue") + } + wm := q.s[0] + // TODO: less copy-happy queue. + copy(q.s, q.s[1:]) + q.s[len(q.s)-1] = frameWriteMsg{} + q.s = q.s[:len(q.s)-1] + return wm +} + +func (q *writeQueue) firstIsNoCost() bool { + if df, ok := q.s[0].write.(*writeData); ok { + return len(df.p) == 0 + } + return true +} diff --git a/vendor/golang.org/x/net/http2/z_spec_test.go b/vendor/golang.org/x/net/http2/z_spec_test.go new file mode 100644 index 0000000..e0f420a --- /dev/null +++ b/vendor/golang.org/x/net/http2/z_spec_test.go @@ -0,0 +1,356 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package http2 + +import ( + "bytes" + "encoding/xml" + "flag" + "fmt" + "io" + "os" + "reflect" + "regexp" + "sort" + "strconv" + "strings" + "sync" + "testing" +) + +var coverSpec = flag.Bool("coverspec", false, "Run spec coverage tests") + +// The global map of sentence coverage for the http2 spec. +var defaultSpecCoverage specCoverage + +var loadSpecOnce sync.Once + +func loadSpec() { + if f, err := os.Open("testdata/draft-ietf-httpbis-http2.xml"); err != nil { + panic(err) + } else { + defaultSpecCoverage = readSpecCov(f) + f.Close() + } +} + +// covers marks all sentences for section sec in defaultSpecCoverage. Sentences not +// "covered" will be included in report outputed by TestSpecCoverage. +func covers(sec, sentences string) { + loadSpecOnce.Do(loadSpec) + defaultSpecCoverage.cover(sec, sentences) +} + +type specPart struct { + section string + sentence string +} + +func (ss specPart) Less(oo specPart) bool { + atoi := func(s string) int { + n, err := strconv.Atoi(s) + if err != nil { + panic(err) + } + return n + } + a := strings.Split(ss.section, ".") + b := strings.Split(oo.section, ".") + for len(a) > 0 { + if len(b) == 0 { + return false + } + x, y := atoi(a[0]), atoi(b[0]) + if x == y { + a, b = a[1:], b[1:] + continue + } + return x < y + } + if len(b) > 0 { + return true + } + return false +} + +type bySpecSection []specPart + +func (a bySpecSection) Len() int { return len(a) } +func (a bySpecSection) Less(i, j int) bool { return a[i].Less(a[j]) } +func (a bySpecSection) Swap(i, j int) { a[i], a[j] = a[j], a[i] } + +type specCoverage struct { + coverage map[specPart]bool + d *xml.Decoder +} + +func joinSection(sec []int) string { + s := fmt.Sprintf("%d", sec[0]) + for _, n := range sec[1:] { + s = fmt.Sprintf("%s.%d", s, n) + } + return s +} + +func (sc specCoverage) readSection(sec []int) { + var ( + buf = new(bytes.Buffer) + sub = 0 + ) + for { + tk, err := sc.d.Token() + if err != nil { + if err == io.EOF { + return + } + panic(err) + } + switch v := tk.(type) { + case xml.StartElement: + if skipElement(v) { + if err := sc.d.Skip(); err != nil { + panic(err) + } + if v.Name.Local == "section" { + sub++ + } + break + } + switch v.Name.Local { + case "section": + sub++ + sc.readSection(append(sec, sub)) + case "xref": + buf.Write(sc.readXRef(v)) + } + case xml.CharData: + if len(sec) == 0 { + break + } + buf.Write(v) + case xml.EndElement: + if v.Name.Local == "section" { + sc.addSentences(joinSection(sec), buf.String()) + return + } + } + } +} + +func (sc specCoverage) readXRef(se xml.StartElement) []byte { + var b []byte + for { + tk, err := sc.d.Token() + if err != nil { + panic(err) + } + switch v := tk.(type) { + case xml.CharData: + if b != nil { + panic("unexpected CharData") + } + b = []byte(string(v)) + case xml.EndElement: + if v.Name.Local != "xref" { + panic("expected ") + } + if b != nil { + return b + } + sig := attrSig(se) + switch sig { + case "target": + return []byte(fmt.Sprintf("[%s]", attrValue(se, "target"))) + case "fmt-of,rel,target", "fmt-,,rel,target": + return []byte(fmt.Sprintf("[%s, %s]", attrValue(se, "target"), attrValue(se, "rel"))) + case "fmt-of,sec,target", "fmt-,,sec,target": + return []byte(fmt.Sprintf("[section %s of %s]", attrValue(se, "sec"), attrValue(se, "target"))) + case "fmt-of,rel,sec,target": + return []byte(fmt.Sprintf("[section %s of %s, %s]", attrValue(se, "sec"), attrValue(se, "target"), attrValue(se, "rel"))) + default: + panic(fmt.Sprintf("unknown attribute signature %q in %#v", sig, fmt.Sprintf("%#v", se))) + } + default: + panic(fmt.Sprintf("unexpected tag %q", v)) + } + } +} + +var skipAnchor = map[string]bool{ + "intro": true, + "Overview": true, +} + +var skipTitle = map[string]bool{ + "Acknowledgements": true, + "Change Log": true, + "Document Organization": true, + "Conventions and Terminology": true, +} + +func skipElement(s xml.StartElement) bool { + switch s.Name.Local { + case "artwork": + return true + case "section": + for _, attr := range s.Attr { + switch attr.Name.Local { + case "anchor": + if skipAnchor[attr.Value] || strings.HasPrefix(attr.Value, "changes.since.") { + return true + } + case "title": + if skipTitle[attr.Value] { + return true + } + } + } + } + return false +} + +func readSpecCov(r io.Reader) specCoverage { + sc := specCoverage{ + coverage: map[specPart]bool{}, + d: xml.NewDecoder(r)} + sc.readSection(nil) + return sc +} + +func (sc specCoverage) addSentences(sec string, sentence string) { + for _, s := range parseSentences(sentence) { + sc.coverage[specPart{sec, s}] = false + } +} + +func (sc specCoverage) cover(sec string, sentence string) { + for _, s := range parseSentences(sentence) { + p := specPart{sec, s} + if _, ok := sc.coverage[p]; !ok { + panic(fmt.Sprintf("Not found in spec: %q, %q", sec, s)) + } + sc.coverage[specPart{sec, s}] = true + } + +} + +var whitespaceRx = regexp.MustCompile(`\s+`) + +func parseSentences(sens string) []string { + sens = strings.TrimSpace(sens) + if sens == "" { + return nil + } + ss := strings.Split(whitespaceRx.ReplaceAllString(sens, " "), ". ") + for i, s := range ss { + s = strings.TrimSpace(s) + if !strings.HasSuffix(s, ".") { + s += "." + } + ss[i] = s + } + return ss +} + +func TestSpecParseSentences(t *testing.T) { + tests := []struct { + ss string + want []string + }{ + {"Sentence 1. Sentence 2.", + []string{ + "Sentence 1.", + "Sentence 2.", + }}, + {"Sentence 1. \nSentence 2.\tSentence 3.", + []string{ + "Sentence 1.", + "Sentence 2.", + "Sentence 3.", + }}, + } + + for i, tt := range tests { + got := parseSentences(tt.ss) + if !reflect.DeepEqual(got, tt.want) { + t.Errorf("%d: got = %q, want %q", i, got, tt.want) + } + } +} + +func TestSpecCoverage(t *testing.T) { + if !*coverSpec { + t.Skip() + } + + loadSpecOnce.Do(loadSpec) + + var ( + list []specPart + cv = defaultSpecCoverage.coverage + total = len(cv) + complete = 0 + ) + + for sp, touched := range defaultSpecCoverage.coverage { + if touched { + complete++ + } else { + list = append(list, sp) + } + } + sort.Stable(bySpecSection(list)) + + if testing.Short() && len(list) > 5 { + list = list[:5] + } + + for _, p := range list { + t.Errorf("\tSECTION %s: %s", p.section, p.sentence) + } + + t.Logf("%d/%d (%d%%) sentances covered", complete, total, (complete/total)*100) +} + +func attrSig(se xml.StartElement) string { + var names []string + for _, attr := range se.Attr { + if attr.Name.Local == "fmt" { + names = append(names, "fmt-"+attr.Value) + } else { + names = append(names, attr.Name.Local) + } + } + sort.Strings(names) + return strings.Join(names, ",") +} + +func attrValue(se xml.StartElement, attr string) string { + for _, a := range se.Attr { + if a.Name.Local == attr { + return a.Value + } + } + panic("unknown attribute " + attr) +} + +func TestSpecPartLess(t *testing.T) { + tests := []struct { + sec1, sec2 string + want bool + }{ + {"6.2.1", "6.2", false}, + {"6.2", "6.2.1", true}, + {"6.10", "6.10.1", true}, + {"6.10", "6.1.1", false}, // 10, not 1 + {"6.1", "6.1", false}, // equal, so not less + } + for _, tt := range tests { + got := (specPart{tt.sec1, "foo"}).Less(specPart{tt.sec2, "foo"}) + if got != tt.want { + t.Errorf("Less(%q, %q) = %v; want %v", tt.sec1, tt.sec2, got, tt.want) + } + } +} diff --git a/vendor/golang.org/x/net/icmp/dstunreach.go b/vendor/golang.org/x/net/icmp/dstunreach.go index d1905a9..01dc660 100644 --- a/vendor/golang.org/x/net/icmp/dstunreach.go +++ b/vendor/golang.org/x/net/icmp/dstunreach.go @@ -12,31 +12,30 @@ type DstUnreach struct { } // Len implements the Len method of MessageBody interface. -func (p *DstUnreach) Len() int { +func (p *DstUnreach) Len(proto int) int { if p == nil { return 0 } - return 4 + len(p.Data) + l, _ := multipartMessageBodyDataLen(proto, p.Data, p.Extensions) + return l } // Marshal implements the Marshal method of MessageBody interface. func (p *DstUnreach) Marshal(proto int) ([]byte, error) { - b := make([]byte, 4+len(p.Data)) - copy(b[4:], p.Data) - return b, nil + return marshalMultipartMessageBody(proto, p.Data, p.Extensions) } // parseDstUnreach parses b as an ICMP destination unreachable message // body. func parseDstUnreach(proto int, b []byte) (MessageBody, error) { - bodyLen := len(b) - if bodyLen < 4 { + if len(b) < 4 { return nil, errMessageTooShort } p := &DstUnreach{} - if bodyLen > 4 { - p.Data = make([]byte, bodyLen-4) - copy(p.Data, b[4:]) + var err error + p.Data, p.Extensions, err = parseMultipartMessageBody(proto, b) + if err != nil { + return nil, err } return p, nil } diff --git a/vendor/golang.org/x/net/icmp/echo.go b/vendor/golang.org/x/net/icmp/echo.go index 6b373fc..8943eab 100644 --- a/vendor/golang.org/x/net/icmp/echo.go +++ b/vendor/golang.org/x/net/icmp/echo.go @@ -12,7 +12,7 @@ type Echo struct { } // Len implements the Len method of MessageBody interface. -func (p *Echo) Len() int { +func (p *Echo) Len(proto int) int { if p == nil { return 0 } diff --git a/vendor/golang.org/x/net/icmp/endpoint.go b/vendor/golang.org/x/net/icmp/endpoint.go index cf7ff58..0213d1a 100644 --- a/vendor/golang.org/x/net/icmp/endpoint.go +++ b/vendor/golang.org/x/net/icmp/endpoint.go @@ -10,19 +10,18 @@ import ( "syscall" "time" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv4" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv6" + "golang.org/x/net/ipv4" + "golang.org/x/net/ipv6" ) var _ net.PacketConn = &PacketConn{} -type ipc interface{} - // A PacketConn represents a packet network endpoint that uses either // ICMPv4 or ICMPv6. type PacketConn struct { - c net.PacketConn - ipc // either ipv4.PacketConn or ipv6.PacketConn + c net.PacketConn + p4 *ipv4.PacketConn + p6 *ipv6.PacketConn } func (c *PacketConn) ok() bool { return c != nil && c.c != nil } @@ -33,8 +32,7 @@ func (c *PacketConn) IPv4PacketConn() *ipv4.PacketConn { if !c.ok() { return nil } - p, _ := c.ipc.(*ipv4.PacketConn) - return p + return c.p4 } // IPv6PacketConn returns the ipv6.PacketConn of c. @@ -43,8 +41,7 @@ func (c *PacketConn) IPv6PacketConn() *ipv6.PacketConn { if !c.ok() { return nil } - p, _ := c.ipc.(*ipv6.PacketConn) - return p + return c.p6 } // ReadFrom reads an ICMP message from the connection. @@ -55,11 +52,9 @@ func (c *PacketConn) ReadFrom(b []byte) (int, net.Addr, error) { // Please be informed that ipv4.NewPacketConn enables // IP_STRIPHDR option by default on Darwin. // See golang.org/issue/9395 for futher information. - if runtime.GOOS == "darwin" { - if p, _ := c.ipc.(*ipv4.PacketConn); p != nil { - n, _, peer, err := p.ReadFrom(b) - return n, peer, err - } + if runtime.GOOS == "darwin" && c.p4 != nil { + n, _, peer, err := c.p4.ReadFrom(b) + return n, peer, err } return c.c.ReadFrom(b) } diff --git a/vendor/golang.org/x/net/icmp/example_test.go b/vendor/golang.org/x/net/icmp/example_test.go index 73de662..1df4cec 100644 --- a/vendor/golang.org/x/net/icmp/example_test.go +++ b/vendor/golang.org/x/net/icmp/example_test.go @@ -8,13 +8,22 @@ import ( "log" "net" "os" + "runtime" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/icmp" - "github.com/vtolstov/svirtnet/internal/iana" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv6" + "golang.org/x/net/icmp" + "golang.org/x/net/ipv6" ) func ExamplePacketConn_nonPrivilegedPing() { + switch runtime.GOOS { + case "darwin": + case "linux": + log.Println("you may need to adjust the net.ipv4.ping_group_range kernel state") + default: + log.Println("not supported on", runtime.GOOS) + return + } + c, err := icmp.ListenPacket("udp6", "fe80::1%en0") if err != nil { log.Fatal(err) @@ -41,7 +50,7 @@ func ExamplePacketConn_nonPrivilegedPing() { if err != nil { log.Fatal(err) } - rm, err := icmp.ParseMessage(iana.ProtocolIPv6ICMP, rb[:n]) + rm, err := icmp.ParseMessage(58, rb[:n]) if err != nil { log.Fatal(err) } diff --git a/vendor/golang.org/x/net/icmp/extension.go b/vendor/golang.org/x/net/icmp/extension.go index 7575f02..720e167 100644 --- a/vendor/golang.org/x/net/icmp/extension.go +++ b/vendor/golang.org/x/net/icmp/extension.go @@ -7,10 +7,81 @@ package icmp // An Extension represents an ICMP extension. type Extension interface { // Len returns the length of ICMP extension. - Len() int + // Proto must be either the ICMPv4 or ICMPv6 protocol number. + Len(proto int) int // Marshal returns the binary enconding of ICMP extension. - Marshal() ([]byte, error) + // Proto must be either the ICMPv4 or ICMPv6 protocol number. + Marshal(proto int) ([]byte, error) } const extensionVersion = 2 + +func validExtensionHeader(b []byte) bool { + v := int(b[0]&0xf0) >> 4 + s := uint16(b[2])<<8 | uint16(b[3]) + if s != 0 { + s = checksum(b) + } + if v != extensionVersion || s != 0 { + return false + } + return true +} + +// parseExtensions parses b as a list of ICMP extensions. +// The length attribute l must be the length attribute field in +// received icmp messages. +// +// It will return a list of ICMP extensions and an adjusted length +// attribute that represents the length of the padded original +// datagram field. Otherwise, it returns an error. +func parseExtensions(b []byte, l int) ([]Extension, int, error) { + // Still a lot of non-RFC 4884 compliant implementations are + // out there. Set the length attribute l to 128 when it looks + // inappropriate for backwards compatibility. + // + // A minimal extension at least requires 8 octets; 4 octets + // for an extension header, and 4 octets for a single object + // header. + // + // See RFC 4884 for further information. + if 128 > l || l+8 > len(b) { + l = 128 + } + if l+8 > len(b) { + return nil, -1, errNoExtension + } + if !validExtensionHeader(b[l:]) { + if l == 128 { + return nil, -1, errNoExtension + } + l = 128 + if !validExtensionHeader(b[l:]) { + return nil, -1, errNoExtension + } + } + var exts []Extension + for b = b[l+4:]; len(b) >= 4; { + ol := int(b[0])<<8 | int(b[1]) + if 4 > ol || ol > len(b) { + break + } + switch b[2] { + case classMPLSLabelStack: + ext, err := parseMPLSLabelStack(b[:ol]) + if err != nil { + return nil, -1, err + } + exts = append(exts, ext) + case classInterfaceInfo: + ext, err := parseInterfaceInfo(b[:ol]) + if err != nil { + return nil, -1, err + } + exts = append(exts, ext) + } + b = b[ol:] + } + return exts, l, nil +} diff --git a/vendor/golang.org/x/net/icmp/extension_test.go b/vendor/golang.org/x/net/icmp/extension_test.go new file mode 100644 index 0000000..0b3f7b9 --- /dev/null +++ b/vendor/golang.org/x/net/icmp/extension_test.go @@ -0,0 +1,259 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package icmp + +import ( + "net" + "reflect" + "testing" + + "golang.org/x/net/internal/iana" +) + +var marshalAndParseExtensionTests = []struct { + proto int + hdr []byte + obj []byte + exts []Extension +}{ + // MPLS label stack with no label + { + proto: iana.ProtocolICMP, + hdr: []byte{ + 0x20, 0x00, 0x00, 0x00, + }, + obj: []byte{ + 0x00, 0x04, 0x01, 0x01, + }, + exts: []Extension{ + &MPLSLabelStack{ + Class: classMPLSLabelStack, + Type: typeIncomingMPLSLabelStack, + }, + }, + }, + // MPLS label stack with a single label + { + proto: iana.ProtocolIPv6ICMP, + hdr: []byte{ + 0x20, 0x00, 0x00, 0x00, + }, + obj: []byte{ + 0x00, 0x08, 0x01, 0x01, + 0x03, 0xe8, 0xe9, 0xff, + }, + exts: []Extension{ + &MPLSLabelStack{ + Class: classMPLSLabelStack, + Type: typeIncomingMPLSLabelStack, + Labels: []MPLSLabel{ + { + Label: 16014, + TC: 0x4, + S: true, + TTL: 255, + }, + }, + }, + }, + }, + // MPLS label stack with multiple labels + { + proto: iana.ProtocolICMP, + hdr: []byte{ + 0x20, 0x00, 0x00, 0x00, + }, + obj: []byte{ + 0x00, 0x0c, 0x01, 0x01, + 0x03, 0xe8, 0xde, 0xfe, + 0x03, 0xe8, 0xe1, 0xff, + }, + exts: []Extension{ + &MPLSLabelStack{ + Class: classMPLSLabelStack, + Type: typeIncomingMPLSLabelStack, + Labels: []MPLSLabel{ + { + Label: 16013, + TC: 0x7, + S: false, + TTL: 254, + }, + { + Label: 16014, + TC: 0, + S: true, + TTL: 255, + }, + }, + }, + }, + }, + // Interface information with no attribute + { + proto: iana.ProtocolICMP, + hdr: []byte{ + 0x20, 0x00, 0x00, 0x00, + }, + obj: []byte{ + 0x00, 0x04, 0x02, 0x00, + }, + exts: []Extension{ + &InterfaceInfo{ + Class: classInterfaceInfo, + }, + }, + }, + // Interface information with ifIndex and name + { + proto: iana.ProtocolICMP, + hdr: []byte{ + 0x20, 0x00, 0x00, 0x00, + }, + obj: []byte{ + 0x00, 0x10, 0x02, 0x0a, + 0x00, 0x00, 0x00, 0x10, + 0x08, byte('e'), byte('n'), byte('1'), + byte('0'), byte('1'), 0x00, 0x00, + }, + exts: []Extension{ + &InterfaceInfo{ + Class: classInterfaceInfo, + Type: 0x0a, + Interface: &net.Interface{ + Index: 16, + Name: "en101", + }, + }, + }, + }, + // Interface information with ifIndex, IPAddr, name and MTU + { + proto: iana.ProtocolIPv6ICMP, + hdr: []byte{ + 0x20, 0x00, 0x00, 0x00, + }, + obj: []byte{ + 0x00, 0x28, 0x02, 0x0f, + 0x00, 0x00, 0x00, 0x0f, + 0x00, 0x02, 0x00, 0x00, + 0xfe, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, + 0x08, byte('e'), byte('n'), byte('1'), + byte('0'), byte('1'), 0x00, 0x00, + 0x00, 0x00, 0x20, 0x00, + }, + exts: []Extension{ + &InterfaceInfo{ + Class: classInterfaceInfo, + Type: 0x0f, + Interface: &net.Interface{ + Index: 15, + Name: "en101", + MTU: 8192, + }, + Addr: &net.IPAddr{ + IP: net.ParseIP("fe80::1"), + Zone: "en101", + }, + }, + }, + }, +} + +func TestMarshalAndParseExtension(t *testing.T) { + for i, tt := range marshalAndParseExtensionTests { + for j, ext := range tt.exts { + var err error + var b []byte + switch ext := ext.(type) { + case *MPLSLabelStack: + b, err = ext.Marshal(tt.proto) + if err != nil { + t.Errorf("#%v/%v: %v", i, j, err) + continue + } + case *InterfaceInfo: + b, err = ext.Marshal(tt.proto) + if err != nil { + t.Errorf("#%v/%v: %v", i, j, err) + continue + } + } + if !reflect.DeepEqual(b, tt.obj) { + t.Errorf("#%v/%v: got %#v; want %#v", i, j, b, tt.obj) + continue + } + } + + for j, wire := range []struct { + data []byte // original datagram + inlattr int // length of padded original datagram, a hint + outlattr int // length of padded original datagram, a want + err error + }{ + {nil, 0, -1, errNoExtension}, + {make([]byte, 127), 128, -1, errNoExtension}, + + {make([]byte, 128), 127, -1, errNoExtension}, + {make([]byte, 128), 128, -1, errNoExtension}, + {make([]byte, 128), 129, -1, errNoExtension}, + + {append(make([]byte, 128), append(tt.hdr, tt.obj...)...), 127, 128, nil}, + {append(make([]byte, 128), append(tt.hdr, tt.obj...)...), 128, 128, nil}, + {append(make([]byte, 128), append(tt.hdr, tt.obj...)...), 129, 128, nil}, + + {append(make([]byte, 512), append(tt.hdr, tt.obj...)...), 511, -1, errNoExtension}, + {append(make([]byte, 512), append(tt.hdr, tt.obj...)...), 512, 512, nil}, + {append(make([]byte, 512), append(tt.hdr, tt.obj...)...), 513, -1, errNoExtension}, + } { + exts, l, err := parseExtensions(wire.data, wire.inlattr) + if err != wire.err { + t.Errorf("#%v/%v: got %v; want %v", i, j, err, wire.err) + continue + } + if wire.err != nil { + continue + } + if l != wire.outlattr { + t.Errorf("#%v/%v: got %v; want %v", i, j, l, wire.outlattr) + } + if !reflect.DeepEqual(exts, tt.exts) { + for j, ext := range exts { + switch ext := ext.(type) { + case *MPLSLabelStack: + want := tt.exts[j].(*MPLSLabelStack) + t.Errorf("#%v/%v: got %#v; want %#v", i, j, ext, want) + case *InterfaceInfo: + want := tt.exts[j].(*InterfaceInfo) + t.Errorf("#%v/%v: got %#v; want %#v", i, j, ext, want) + } + } + continue + } + } + } +} + +var parseInterfaceNameTests = []struct { + b []byte + error +}{ + {[]byte{0, 'e', 'n', '0'}, errInvalidExtension}, + {[]byte{4, 'e', 'n', '0'}, nil}, + {[]byte{7, 'e', 'n', '0', 0xff, 0xff, 0xff, 0xff}, errInvalidExtension}, + {[]byte{8, 'e', 'n', '0', 0xff, 0xff, 0xff}, errMessageTooShort}, +} + +func TestParseInterfaceName(t *testing.T) { + ifi := InterfaceInfo{Interface: &net.Interface{}} + for i, tt := range parseInterfaceNameTests { + if _, err := ifi.parseName(tt.b); err != tt.error { + t.Errorf("#%d: got %v; want %v", i, err, tt.error) + } + } +} diff --git a/vendor/golang.org/x/net/icmp/interface.go b/vendor/golang.org/x/net/icmp/interface.go new file mode 100644 index 0000000..c7bf8dd --- /dev/null +++ b/vendor/golang.org/x/net/icmp/interface.go @@ -0,0 +1,235 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package icmp + +import ( + "net" + "strings" + + "golang.org/x/net/internal/iana" +) + +const ( + classInterfaceInfo = 2 + + afiIPv4 = 1 + afiIPv6 = 2 +) + +const ( + attrMTU = 1 << iota + attrName + attrIPAddr + attrIfIndex +) + +// An InterfaceInfo represents interface and next-hop identification. +type InterfaceInfo struct { + Class int // extension object class number + Type int // extension object sub-type + Interface *net.Interface + Addr *net.IPAddr +} + +func (ifi *InterfaceInfo) nameLen() int { + if len(ifi.Interface.Name) > 63 { + return 64 + } + l := 1 + len(ifi.Interface.Name) + return (l + 3) &^ 3 +} + +func (ifi *InterfaceInfo) attrsAndLen(proto int) (attrs, l int) { + l = 4 + if ifi.Interface != nil && ifi.Interface.Index > 0 { + attrs |= attrIfIndex + l += 4 + if len(ifi.Interface.Name) > 0 { + attrs |= attrName + l += ifi.nameLen() + } + if ifi.Interface.MTU > 0 { + attrs |= attrMTU + l += 4 + } + } + if ifi.Addr != nil { + switch proto { + case iana.ProtocolICMP: + if ifi.Addr.IP.To4() != nil { + attrs |= attrIPAddr + l += 4 + net.IPv4len + } + case iana.ProtocolIPv6ICMP: + if ifi.Addr.IP.To16() != nil && ifi.Addr.IP.To4() == nil { + attrs |= attrIPAddr + l += 4 + net.IPv6len + } + } + } + return +} + +// Len implements the Len method of Extension interface. +func (ifi *InterfaceInfo) Len(proto int) int { + _, l := ifi.attrsAndLen(proto) + return l +} + +// Marshal implements the Marshal method of Extension interface. +func (ifi *InterfaceInfo) Marshal(proto int) ([]byte, error) { + attrs, l := ifi.attrsAndLen(proto) + b := make([]byte, l) + if err := ifi.marshal(proto, b, attrs, l); err != nil { + return nil, err + } + return b, nil +} + +func (ifi *InterfaceInfo) marshal(proto int, b []byte, attrs, l int) error { + b[0], b[1] = byte(l>>8), byte(l) + b[2], b[3] = classInterfaceInfo, byte(ifi.Type) + for b = b[4:]; len(b) > 0 && attrs != 0; { + switch { + case attrs&attrIfIndex != 0: + b = ifi.marshalIfIndex(proto, b) + attrs &^= attrIfIndex + case attrs&attrIPAddr != 0: + b = ifi.marshalIPAddr(proto, b) + attrs &^= attrIPAddr + case attrs&attrName != 0: + b = ifi.marshalName(proto, b) + attrs &^= attrName + case attrs&attrMTU != 0: + b = ifi.marshalMTU(proto, b) + attrs &^= attrMTU + } + } + return nil +} + +func (ifi *InterfaceInfo) marshalIfIndex(proto int, b []byte) []byte { + b[0], b[1], b[2], b[3] = byte(ifi.Interface.Index>>24), byte(ifi.Interface.Index>>16), byte(ifi.Interface.Index>>8), byte(ifi.Interface.Index) + return b[4:] +} + +func (ifi *InterfaceInfo) parseIfIndex(b []byte) ([]byte, error) { + if len(b) < 4 { + return nil, errMessageTooShort + } + ifi.Interface.Index = int(b[0])<<24 | int(b[1])<<16 | int(b[2])<<8 | int(b[3]) + return b[4:], nil +} + +func (ifi *InterfaceInfo) marshalIPAddr(proto int, b []byte) []byte { + switch proto { + case iana.ProtocolICMP: + b[0], b[1] = byte(afiIPv4>>8), byte(afiIPv4) + copy(b[4:4+net.IPv4len], ifi.Addr.IP.To4()) + b = b[4+net.IPv4len:] + case iana.ProtocolIPv6ICMP: + b[0], b[1] = byte(afiIPv6>>8), byte(afiIPv6) + copy(b[4:4+net.IPv6len], ifi.Addr.IP.To16()) + b = b[4+net.IPv6len:] + } + return b +} + +func (ifi *InterfaceInfo) parseIPAddr(b []byte) ([]byte, error) { + if len(b) < 4 { + return nil, errMessageTooShort + } + afi := int(b[0])<<8 | int(b[1]) + b = b[4:] + switch afi { + case afiIPv4: + if len(b) < net.IPv4len { + return nil, errMessageTooShort + } + ifi.Addr.IP = make(net.IP, net.IPv4len) + copy(ifi.Addr.IP, b[:net.IPv4len]) + b = b[net.IPv4len:] + case afiIPv6: + if len(b) < net.IPv6len { + return nil, errMessageTooShort + } + ifi.Addr.IP = make(net.IP, net.IPv6len) + copy(ifi.Addr.IP, b[:net.IPv6len]) + b = b[net.IPv6len:] + } + return b, nil +} + +func (ifi *InterfaceInfo) marshalName(proto int, b []byte) []byte { + l := byte(ifi.nameLen()) + b[0] = l + copy(b[1:], []byte(ifi.Interface.Name)) + return b[l:] +} + +func (ifi *InterfaceInfo) parseName(b []byte) ([]byte, error) { + if 4 > len(b) || len(b) < int(b[0]) { + return nil, errMessageTooShort + } + l := int(b[0]) + if l%4 != 0 || 4 > l || l > 64 { + return nil, errInvalidExtension + } + var name [63]byte + copy(name[:], b[1:l]) + ifi.Interface.Name = strings.Trim(string(name[:]), "\000") + return b[l:], nil +} + +func (ifi *InterfaceInfo) marshalMTU(proto int, b []byte) []byte { + b[0], b[1], b[2], b[3] = byte(ifi.Interface.MTU>>24), byte(ifi.Interface.MTU>>16), byte(ifi.Interface.MTU>>8), byte(ifi.Interface.MTU) + return b[4:] +} + +func (ifi *InterfaceInfo) parseMTU(b []byte) ([]byte, error) { + if len(b) < 4 { + return nil, errMessageTooShort + } + ifi.Interface.MTU = int(b[0])<<24 | int(b[1])<<16 | int(b[2])<<8 | int(b[3]) + return b[4:], nil +} + +func parseInterfaceInfo(b []byte) (Extension, error) { + ifi := &InterfaceInfo{ + Class: int(b[2]), + Type: int(b[3]), + } + if ifi.Type&(attrIfIndex|attrName|attrMTU) != 0 { + ifi.Interface = &net.Interface{} + } + if ifi.Type&attrIPAddr != 0 { + ifi.Addr = &net.IPAddr{} + } + attrs := ifi.Type & (attrIfIndex | attrIPAddr | attrName | attrMTU) + for b = b[4:]; len(b) > 0 && attrs != 0; { + var err error + switch { + case attrs&attrIfIndex != 0: + b, err = ifi.parseIfIndex(b) + attrs &^= attrIfIndex + case attrs&attrIPAddr != 0: + b, err = ifi.parseIPAddr(b) + attrs &^= attrIPAddr + case attrs&attrName != 0: + b, err = ifi.parseName(b) + attrs &^= attrName + case attrs&attrMTU != 0: + b, err = ifi.parseMTU(b) + attrs &^= attrMTU + } + if err != nil { + return nil, err + } + } + if ifi.Interface != nil && ifi.Interface.Name != "" && ifi.Addr != nil && ifi.Addr.IP.To16() != nil && ifi.Addr.IP.To4() == nil { + ifi.Addr.Zone = ifi.Interface.Name + } + return ifi, nil +} diff --git a/vendor/golang.org/x/net/icmp/ipv4.go b/vendor/golang.org/x/net/icmp/ipv4.go index 4fd53af..a252d73 100644 --- a/vendor/golang.org/x/net/icmp/ipv4.go +++ b/vendor/golang.org/x/net/icmp/ipv4.go @@ -9,7 +9,7 @@ import ( "runtime" "unsafe" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv4" + "golang.org/x/net/ipv4" ) // See http://www.freebsd.org/doc/en/books/porters-handbook/freebsd-versions.html. diff --git a/vendor/golang.org/x/net/icmp/ipv4_test.go b/vendor/golang.org/x/net/icmp/ipv4_test.go index 6b7db16..b05c697 100644 --- a/vendor/golang.org/x/net/icmp/ipv4_test.go +++ b/vendor/golang.org/x/net/icmp/ipv4_test.go @@ -10,7 +10,7 @@ import ( "runtime" "testing" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv4" + "golang.org/x/net/ipv4" ) var ( diff --git a/vendor/golang.org/x/net/icmp/ipv6.go b/vendor/golang.org/x/net/icmp/ipv6.go index 5dbde59..fe4031a 100644 --- a/vendor/golang.org/x/net/icmp/ipv6.go +++ b/vendor/golang.org/x/net/icmp/ipv6.go @@ -7,7 +7,7 @@ package icmp import ( "net" - "github.com/vtolstov/svirtnet/internal/iana" + "golang.org/x/net/internal/iana" ) const ipv6PseudoHeaderLen = 2*net.IPv6len + 8 diff --git a/vendor/golang.org/x/net/icmp/listen_posix.go b/vendor/golang.org/x/net/icmp/listen_posix.go index be144de..b9f2607 100644 --- a/vendor/golang.org/x/net/icmp/listen_posix.go +++ b/vendor/golang.org/x/net/icmp/listen_posix.go @@ -12,9 +12,9 @@ import ( "runtime" "syscall" - "github.com/vtolstov/svirtnet/internal/iana" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv4" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv6" + "golang.org/x/net/internal/iana" + "golang.org/x/net/ipv4" + "golang.org/x/net/ipv6" ) const sysIP_STRIPHDR = 0x17 // for now only darwin supports this option @@ -57,7 +57,7 @@ func ListenPacket(network, address string) (*PacketConn, error) { proto = iana.ProtocolIPv6ICMP } } - var err error + var cerr error var c net.PacketConn switch family { case syscall.AF_INET, syscall.AF_INET6: @@ -80,18 +80,18 @@ func ListenPacket(network, address string) (*PacketConn, error) { } f := os.NewFile(uintptr(s), "datagram-oriented icmp") defer f.Close() - c, err = net.FilePacketConn(f) + c, cerr = net.FilePacketConn(f) default: - c, err = net.ListenPacket(network, address) + c, cerr = net.ListenPacket(network, address) } - if err != nil { - return nil, err + if cerr != nil { + return nil, cerr } switch proto { case iana.ProtocolICMP: - return &PacketConn{c: c, ipc: ipv4.NewPacketConn(c)}, nil + return &PacketConn{c: c, p4: ipv4.NewPacketConn(c)}, nil case iana.ProtocolIPv6ICMP: - return &PacketConn{c: c, ipc: ipv6.NewPacketConn(c)}, nil + return &PacketConn{c: c, p6: ipv6.NewPacketConn(c)}, nil default: return &PacketConn{c: c}, nil } diff --git a/vendor/golang.org/x/net/icmp/message.go b/vendor/golang.org/x/net/icmp/message.go index 88d369e..3f9ccb1 100644 --- a/vendor/golang.org/x/net/icmp/message.go +++ b/vendor/golang.org/x/net/icmp/message.go @@ -8,25 +8,44 @@ // // ICMPv4 and ICMPv6 are defined in RFC 792 and RFC 4443. // Multi-part message support for ICMP is defined in RFC 4884. -package icmp +// ICMP extensions for MPLS are defined in RFC 4950. +// ICMP extensions for interface and next-hop identification are +// defined in RFC 5837. +package icmp // import "golang.org/x/net/icmp" import ( "errors" "net" "syscall" - "github.com/vtolstov/svirtnet/internal/iana" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv4" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv6" + "golang.org/x/net/internal/iana" + "golang.org/x/net/ipv4" + "golang.org/x/net/ipv6" ) var ( - errMessageTooShort = errors.New("message too short") - errHeaderTooShort = errors.New("header too short") - errBufferTooShort = errors.New("buffer too short") - errOpNoSupport = errors.New("operation not supported") + errMessageTooShort = errors.New("message too short") + errHeaderTooShort = errors.New("header too short") + errBufferTooShort = errors.New("buffer too short") + errOpNoSupport = errors.New("operation not supported") + errNoExtension = errors.New("no extension") + errInvalidExtension = errors.New("invalid extension") ) +func checksum(b []byte) uint16 { + csumcv := len(b) - 1 // checksum coverage + s := uint32(0) + for i := 0; i < csumcv; i += 2 { + s += uint32(b[i+1])<<8 | uint32(b[i]) + } + if csumcv&1 == 0 { + s += uint32(b[csumcv]) + } + s = s>>16 + s&0xffff + s = s + s>>16 + return ^uint16(s) +} + // A Type represents an ICMP message type. type Type interface { Protocol() int @@ -63,7 +82,7 @@ func (m *Message) Marshal(psh []byte) ([]byte, error) { if m.Type.Protocol() == iana.ProtocolIPv6ICMP && psh != nil { b = append(psh, b...) } - if m.Body != nil && m.Body.Len() != 0 { + if m.Body != nil && m.Body.Len(m.Type.Protocol()) != 0 { mb, err := m.Body.Marshal(m.Type.Protocol()) if err != nil { return nil, err @@ -77,20 +96,11 @@ func (m *Message) Marshal(psh []byte) ([]byte, error) { off, l := 2*net.IPv6len, len(b)-len(psh) b[off], b[off+1], b[off+2], b[off+3] = byte(l>>24), byte(l>>16), byte(l>>8), byte(l) } - csumcv := len(b) - 1 // checksum coverage - s := uint32(0) - for i := 0; i < csumcv; i += 2 { - s += uint32(b[i+1])<<8 | uint32(b[i]) - } - if csumcv&1 == 0 { - s += uint32(b[csumcv]) - } - s = s>>16 + s&0xffff - s = s + s>>16 + s := checksum(b) // Place checksum back in header; using ^= avoids the // assumption the checksum bytes are zero. - b[len(psh)+2] ^= byte(^s) - b[len(psh)+3] ^= byte(^s >> 8) + b[len(psh)+2] ^= byte(s) + b[len(psh)+3] ^= byte(s >> 8) return b[len(psh):], nil } diff --git a/vendor/golang.org/x/net/icmp/message_test.go b/vendor/golang.org/x/net/icmp/message_test.go index 3e3b1e5..5d2605f 100644 --- a/vendor/golang.org/x/net/icmp/message_test.go +++ b/vendor/golang.org/x/net/icmp/message_test.go @@ -9,10 +9,10 @@ import ( "reflect" "testing" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/icmp" - "github.com/vtolstov/svirtnet/internal/iana" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv4" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv6" + "golang.org/x/net/icmp" + "golang.org/x/net/internal/iana" + "golang.org/x/net/ipv4" + "golang.org/x/net/ipv6" ) var marshalAndParseMessageForIPv4Tests = []icmp.Message{ @@ -51,7 +51,7 @@ var marshalAndParseMessageForIPv4Tests = []icmp.Message{ } func TestMarshalAndParseMessageForIPv4(t *testing.T) { - for _, tt := range marshalAndParseMessageForIPv4Tests { + for i, tt := range marshalAndParseMessageForIPv4Tests { b, err := tt.Marshal(nil) if err != nil { t.Fatal(err) @@ -61,10 +61,10 @@ func TestMarshalAndParseMessageForIPv4(t *testing.T) { t.Fatal(err) } if m.Type != tt.Type || m.Code != tt.Code { - t.Errorf("got %v; want %v", m, &tt) + t.Errorf("#%v: got %v; want %v", i, m, &tt) } if !reflect.DeepEqual(m.Body, tt.Body) { - t.Errorf("got %v; want %v", m.Body, tt.Body) + t.Errorf("#%v: got %v; want %v", i, m.Body, tt.Body) } } } @@ -113,7 +113,7 @@ var marshalAndParseMessageForIPv6Tests = []icmp.Message{ func TestMarshalAndParseMessageForIPv6(t *testing.T) { pshicmp := icmp.IPv6PseudoHeader(net.ParseIP("fe80::1"), net.ParseIP("ff02::1")) - for _, tt := range marshalAndParseMessageForIPv6Tests { + for i, tt := range marshalAndParseMessageForIPv6Tests { for _, psh := range [][]byte{pshicmp, nil} { b, err := tt.Marshal(psh) if err != nil { @@ -124,10 +124,10 @@ func TestMarshalAndParseMessageForIPv6(t *testing.T) { t.Fatal(err) } if m.Type != tt.Type || m.Code != tt.Code { - t.Errorf("got %v; want %v", m, &tt) + t.Errorf("#%v: got %v; want %v", i, m, &tt) } if !reflect.DeepEqual(m.Body, tt.Body) { - t.Errorf("got %v; want %v", m.Body, tt.Body) + t.Errorf("#%v: got %v; want %v", i, m.Body, tt.Body) } } } diff --git a/vendor/golang.org/x/net/icmp/messagebody.go b/vendor/golang.org/x/net/icmp/messagebody.go index 30f2df8..d314480 100644 --- a/vendor/golang.org/x/net/icmp/messagebody.go +++ b/vendor/golang.org/x/net/icmp/messagebody.go @@ -7,7 +7,8 @@ package icmp // A MessageBody represents an ICMP message body. type MessageBody interface { // Len returns the length of ICMP message body. - Len() int + // Proto must be either the ICMPv4 or ICMPv6 protocol number. + Len(proto int) int // Marshal returns the binary enconding of ICMP message body. // Proto must be either the ICMPv4 or ICMPv6 protocol number. @@ -20,7 +21,7 @@ type DefaultMessageBody struct { } // Len implements the Len method of MessageBody interface. -func (p *DefaultMessageBody) Len() int { +func (p *DefaultMessageBody) Len(proto int) int { if p == nil { return 0 } diff --git a/vendor/golang.org/x/net/icmp/mpls.go b/vendor/golang.org/x/net/icmp/mpls.go new file mode 100644 index 0000000..31bcfe8 --- /dev/null +++ b/vendor/golang.org/x/net/icmp/mpls.go @@ -0,0 +1,75 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package icmp + +// A MPLSLabel represents a MPLS label stack entry. +type MPLSLabel struct { + Label int // label value + TC int // traffic class; formerly experimental use + S bool // bottom of stack + TTL int // time to live +} + +const ( + classMPLSLabelStack = 1 + typeIncomingMPLSLabelStack = 1 +) + +// A MPLSLabelStack represents a MPLS label stack. +type MPLSLabelStack struct { + Class int // extension object class number + Type int // extension object sub-type + Labels []MPLSLabel +} + +// Len implements the Len method of Extension interface. +func (ls *MPLSLabelStack) Len(proto int) int { + return 4 + (4 * len(ls.Labels)) +} + +// Marshal implements the Marshal method of Extension interface. +func (ls *MPLSLabelStack) Marshal(proto int) ([]byte, error) { + b := make([]byte, ls.Len(proto)) + if err := ls.marshal(proto, b); err != nil { + return nil, err + } + return b, nil +} + +func (ls *MPLSLabelStack) marshal(proto int, b []byte) error { + l := ls.Len(proto) + b[0], b[1] = byte(l>>8), byte(l) + b[2], b[3] = classMPLSLabelStack, typeIncomingMPLSLabelStack + off := 4 + for _, ll := range ls.Labels { + b[off], b[off+1], b[off+2] = byte(ll.Label>>12), byte(ll.Label>>4&0xff), byte(ll.Label<<4&0xf0) + b[off+2] |= byte(ll.TC << 1 & 0x0e) + if ll.S { + b[off+2] |= 0x1 + } + b[off+3] = byte(ll.TTL) + off += 4 + } + return nil +} + +func parseMPLSLabelStack(b []byte) (Extension, error) { + ls := &MPLSLabelStack{ + Class: int(b[2]), + Type: int(b[3]), + } + for b = b[4:]; len(b) >= 4; b = b[4:] { + ll := MPLSLabel{ + Label: int(b[0])<<12 | int(b[1])<<4 | int(b[2])>>4, + TC: int(b[2]&0x0e) >> 1, + TTL: int(b[3]), + } + if b[2]&0x1 != 0 { + ll.S = true + } + ls.Labels = append(ls.Labels, ll) + } + return ls, nil +} diff --git a/vendor/golang.org/x/net/icmp/multipart.go b/vendor/golang.org/x/net/icmp/multipart.go new file mode 100644 index 0000000..54ac8bc --- /dev/null +++ b/vendor/golang.org/x/net/icmp/multipart.go @@ -0,0 +1,109 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package icmp + +import "golang.org/x/net/internal/iana" + +// multipartMessageBodyDataLen takes b as an original datagram and +// exts as extensions, and returns a required length for message body +// and a required length for a padded original datagram in wire +// format. +func multipartMessageBodyDataLen(proto int, b []byte, exts []Extension) (bodyLen, dataLen int) { + for _, ext := range exts { + bodyLen += ext.Len(proto) + } + if bodyLen > 0 { + dataLen = multipartMessageOrigDatagramLen(proto, b) + bodyLen += 4 // length of extension header + } else { + dataLen = len(b) + } + bodyLen += dataLen + return bodyLen, dataLen +} + +// multipartMessageOrigDatagramLen takes b as an original datagram, +// and returns a required length for a padded orignal datagram in wire +// format. +func multipartMessageOrigDatagramLen(proto int, b []byte) int { + roundup := func(b []byte, align int) int { + // According to RFC 4884, the padded original datagram + // field must contain at least 128 octets. + if len(b) < 128 { + return 128 + } + r := len(b) + return (r + align) &^ (align - 1) + } + switch proto { + case iana.ProtocolICMP: + return roundup(b, 4) + case iana.ProtocolIPv6ICMP: + return roundup(b, 8) + default: + return len(b) + } +} + +// marshalMultipartMessageBody takes data as an original datagram and +// exts as extesnsions, and returns a binary encoding of message body. +// It can be used for non-multipart message bodies when exts is nil. +func marshalMultipartMessageBody(proto int, data []byte, exts []Extension) ([]byte, error) { + bodyLen, dataLen := multipartMessageBodyDataLen(proto, data, exts) + b := make([]byte, 4+bodyLen) + copy(b[4:], data) + off := dataLen + 4 + if len(exts) > 0 { + b[dataLen+4] = byte(extensionVersion << 4) + off += 4 // length of object header + for _, ext := range exts { + switch ext := ext.(type) { + case *MPLSLabelStack: + if err := ext.marshal(proto, b[off:]); err != nil { + return nil, err + } + off += ext.Len(proto) + case *InterfaceInfo: + attrs, l := ext.attrsAndLen(proto) + if err := ext.marshal(proto, b[off:], attrs, l); err != nil { + return nil, err + } + off += ext.Len(proto) + } + } + s := checksum(b[dataLen+4:]) + b[dataLen+4+2] ^= byte(s) + b[dataLen+4+3] ^= byte(s >> 8) + switch proto { + case iana.ProtocolICMP: + b[1] = byte(dataLen / 4) + case iana.ProtocolIPv6ICMP: + b[0] = byte(dataLen / 8) + } + } + return b, nil +} + +// parseMultipartMessageBody parses b as either a non-multipart +// message body or a multipart message body. +func parseMultipartMessageBody(proto int, b []byte) ([]byte, []Extension, error) { + var l int + switch proto { + case iana.ProtocolICMP: + l = 4 * int(b[1]) + case iana.ProtocolIPv6ICMP: + l = 8 * int(b[0]) + } + if len(b) == 4 { + return nil, nil, nil + } + exts, l, err := parseExtensions(b[4:], l) + if err != nil { + l = len(b) - 4 + } + data := make([]byte, l) + copy(data, b[4:]) + return data, exts, nil +} diff --git a/vendor/golang.org/x/net/icmp/multipart_test.go b/vendor/golang.org/x/net/icmp/multipart_test.go new file mode 100644 index 0000000..9248e47 --- /dev/null +++ b/vendor/golang.org/x/net/icmp/multipart_test.go @@ -0,0 +1,315 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package icmp_test + +import ( + "fmt" + "net" + "reflect" + "testing" + + "golang.org/x/net/icmp" + "golang.org/x/net/internal/iana" + "golang.org/x/net/ipv4" + "golang.org/x/net/ipv6" +) + +var marshalAndParseMultipartMessageForIPv4Tests = []icmp.Message{ + { + Type: ipv4.ICMPTypeDestinationUnreachable, Code: 15, + Body: &icmp.DstUnreach{ + Data: []byte("ERROR-INVOKING-PACKET"), + Extensions: []icmp.Extension{ + &icmp.MPLSLabelStack{ + Class: 1, + Type: 1, + Labels: []icmp.MPLSLabel{ + { + Label: 16014, + TC: 0x4, + S: true, + TTL: 255, + }, + }, + }, + &icmp.InterfaceInfo{ + Class: 2, + Type: 0x0f, + Interface: &net.Interface{ + Index: 15, + Name: "en101", + MTU: 8192, + }, + Addr: &net.IPAddr{ + IP: net.IPv4(192, 168, 0, 1).To4(), + }, + }, + }, + }, + }, + { + Type: ipv4.ICMPTypeTimeExceeded, Code: 1, + Body: &icmp.TimeExceeded{ + Data: []byte("ERROR-INVOKING-PACKET"), + Extensions: []icmp.Extension{ + &icmp.InterfaceInfo{ + Class: 2, + Type: 0x0f, + Interface: &net.Interface{ + Index: 15, + Name: "en101", + MTU: 8192, + }, + Addr: &net.IPAddr{ + IP: net.IPv4(192, 168, 0, 1).To4(), + }, + }, + &icmp.MPLSLabelStack{ + Class: 1, + Type: 1, + Labels: []icmp.MPLSLabel{ + { + Label: 16014, + TC: 0x4, + S: true, + TTL: 255, + }, + }, + }, + }, + }, + }, + { + Type: ipv4.ICMPTypeParameterProblem, Code: 2, + Body: &icmp.ParamProb{ + Pointer: 8, + Data: []byte("ERROR-INVOKING-PACKET"), + Extensions: []icmp.Extension{ + &icmp.MPLSLabelStack{ + Class: 1, + Type: 1, + Labels: []icmp.MPLSLabel{ + { + Label: 16014, + TC: 0x4, + S: true, + TTL: 255, + }, + }, + }, + &icmp.InterfaceInfo{ + Class: 2, + Type: 0x0f, + Interface: &net.Interface{ + Index: 15, + Name: "en101", + MTU: 8192, + }, + Addr: &net.IPAddr{ + IP: net.IPv4(192, 168, 0, 1).To4(), + }, + }, + &icmp.InterfaceInfo{ + Class: 2, + Type: 0x2f, + Interface: &net.Interface{ + Index: 16, + Name: "en102", + MTU: 8192, + }, + Addr: &net.IPAddr{ + IP: net.IPv4(192, 168, 0, 2).To4(), + }, + }, + }, + }, + }, +} + +func TestMarshalAndParseMultipartMessageForIPv4(t *testing.T) { + for i, tt := range marshalAndParseMultipartMessageForIPv4Tests { + b, err := tt.Marshal(nil) + if err != nil { + t.Fatal(err) + } + if b[5] != 32 { + t.Errorf("#%v: got %v; want 32", i, b[5]) + } + m, err := icmp.ParseMessage(iana.ProtocolICMP, b) + if err != nil { + t.Fatal(err) + } + if m.Type != tt.Type || m.Code != tt.Code { + t.Errorf("#%v: got %v; want %v", i, m, &tt) + } + switch m.Type { + case ipv4.ICMPTypeDestinationUnreachable: + got, want := m.Body.(*icmp.DstUnreach), tt.Body.(*icmp.DstUnreach) + if !reflect.DeepEqual(got.Extensions, want.Extensions) { + t.Error(dumpExtensions(i, got.Extensions, want.Extensions)) + } + if len(got.Data) != 128 { + t.Errorf("#%v: got %v; want 128", i, len(got.Data)) + } + case ipv4.ICMPTypeTimeExceeded: + got, want := m.Body.(*icmp.TimeExceeded), tt.Body.(*icmp.TimeExceeded) + if !reflect.DeepEqual(got.Extensions, want.Extensions) { + t.Error(dumpExtensions(i, got.Extensions, want.Extensions)) + } + if len(got.Data) != 128 { + t.Errorf("#%v: got %v; want 128", i, len(got.Data)) + } + case ipv4.ICMPTypeParameterProblem: + got, want := m.Body.(*icmp.ParamProb), tt.Body.(*icmp.ParamProb) + if !reflect.DeepEqual(got.Extensions, want.Extensions) { + t.Error(dumpExtensions(i, got.Extensions, want.Extensions)) + } + if len(got.Data) != 128 { + t.Errorf("#%v: got %v; want 128", i, len(got.Data)) + } + } + } +} + +var marshalAndParseMultipartMessageForIPv6Tests = []icmp.Message{ + { + Type: ipv6.ICMPTypeDestinationUnreachable, Code: 6, + Body: &icmp.DstUnreach{ + Data: []byte("ERROR-INVOKING-PACKET"), + Extensions: []icmp.Extension{ + &icmp.MPLSLabelStack{ + Class: 1, + Type: 1, + Labels: []icmp.MPLSLabel{ + { + Label: 16014, + TC: 0x4, + S: true, + TTL: 255, + }, + }, + }, + &icmp.InterfaceInfo{ + Class: 2, + Type: 0x0f, + Interface: &net.Interface{ + Index: 15, + Name: "en101", + MTU: 8192, + }, + Addr: &net.IPAddr{ + IP: net.ParseIP("fe80::1"), + Zone: "en101", + }, + }, + }, + }, + }, + { + Type: ipv6.ICMPTypeTimeExceeded, Code: 1, + Body: &icmp.TimeExceeded{ + Data: []byte("ERROR-INVOKING-PACKET"), + Extensions: []icmp.Extension{ + &icmp.InterfaceInfo{ + Class: 2, + Type: 0x0f, + Interface: &net.Interface{ + Index: 15, + Name: "en101", + MTU: 8192, + }, + Addr: &net.IPAddr{ + IP: net.ParseIP("fe80::1"), + Zone: "en101", + }, + }, + &icmp.MPLSLabelStack{ + Class: 1, + Type: 1, + Labels: []icmp.MPLSLabel{ + { + Label: 16014, + TC: 0x4, + S: true, + TTL: 255, + }, + }, + }, + &icmp.InterfaceInfo{ + Class: 2, + Type: 0x2f, + Interface: &net.Interface{ + Index: 16, + Name: "en102", + MTU: 8192, + }, + Addr: &net.IPAddr{ + IP: net.ParseIP("fe80::1"), + Zone: "en102", + }, + }, + }, + }, + }, +} + +func TestMarshalAndParseMultipartMessageForIPv6(t *testing.T) { + pshicmp := icmp.IPv6PseudoHeader(net.ParseIP("fe80::1"), net.ParseIP("ff02::1")) + for i, tt := range marshalAndParseMultipartMessageForIPv6Tests { + for _, psh := range [][]byte{pshicmp, nil} { + b, err := tt.Marshal(psh) + if err != nil { + t.Fatal(err) + } + if b[4] != 16 { + t.Errorf("#%v: got %v; want 16", i, b[4]) + } + m, err := icmp.ParseMessage(iana.ProtocolIPv6ICMP, b) + if err != nil { + t.Fatal(err) + } + if m.Type != tt.Type || m.Code != tt.Code { + t.Errorf("#%v: got %v; want %v", i, m, &tt) + } + switch m.Type { + case ipv6.ICMPTypeDestinationUnreachable: + got, want := m.Body.(*icmp.DstUnreach), tt.Body.(*icmp.DstUnreach) + if !reflect.DeepEqual(got.Extensions, want.Extensions) { + t.Error(dumpExtensions(i, got.Extensions, want.Extensions)) + } + if len(got.Data) != 128 { + t.Errorf("#%v: got %v; want 128", i, len(got.Data)) + } + case ipv6.ICMPTypeTimeExceeded: + got, want := m.Body.(*icmp.TimeExceeded), tt.Body.(*icmp.TimeExceeded) + if !reflect.DeepEqual(got.Extensions, want.Extensions) { + t.Error(dumpExtensions(i, got.Extensions, want.Extensions)) + } + if len(got.Data) != 128 { + t.Errorf("#%v: got %v; want 128", i, len(got.Data)) + } + } + } + } +} + +func dumpExtensions(i int, gotExts, wantExts []icmp.Extension) string { + var s string + for j, got := range gotExts { + switch got := got.(type) { + case *icmp.MPLSLabelStack: + want := wantExts[j].(*icmp.MPLSLabelStack) + if !reflect.DeepEqual(got, want) { + s += fmt.Sprintf("#%v/%v: got %#v; want %#v\n", i, j, got, want) + } + case *icmp.InterfaceInfo: + want := wantExts[j].(*icmp.InterfaceInfo) + if !reflect.DeepEqual(got, want) { + s += fmt.Sprintf("#%v/%v: got %#v, %#v, %#v; want %#v, %#v, %#v\n", i, j, got, got.Interface, got.Addr, want, want.Interface, want.Addr) + } + } + } + return s[:len(s)-1] +} diff --git a/vendor/golang.org/x/net/icmp/packettoobig.go b/vendor/golang.org/x/net/icmp/packettoobig.go index 0628e38..91d289b 100644 --- a/vendor/golang.org/x/net/icmp/packettoobig.go +++ b/vendor/golang.org/x/net/icmp/packettoobig.go @@ -7,11 +7,11 @@ package icmp // A PacketTooBig represents an ICMP packet too big message body. type PacketTooBig struct { MTU int // maximum transmission unit of the nexthop link - Data []byte // data + Data []byte // data, known as original datagram field } // Len implements the Len method of MessageBody interface. -func (p *PacketTooBig) Len() int { +func (p *PacketTooBig) Len(proto int) int { if p == nil { return 0 } diff --git a/vendor/golang.org/x/net/icmp/paramprob.go b/vendor/golang.org/x/net/icmp/paramprob.go index 037d2a0..f200a7c 100644 --- a/vendor/golang.org/x/net/icmp/paramprob.go +++ b/vendor/golang.org/x/net/icmp/paramprob.go @@ -4,7 +4,7 @@ package icmp -import "github.com/vtolstov/svirtnet/internal/iana" +import "golang.org/x/net/internal/iana" // A ParamProb represents an ICMP parameter problem message body. type ParamProb struct { @@ -14,42 +14,47 @@ type ParamProb struct { } // Len implements the Len method of MessageBody interface. -func (p *ParamProb) Len() int { +func (p *ParamProb) Len(proto int) int { if p == nil { return 0 } - return 4 + len(p.Data) + l, _ := multipartMessageBodyDataLen(proto, p.Data, p.Extensions) + return l } // Marshal implements the Marshal method of MessageBody interface. func (p *ParamProb) Marshal(proto int) ([]byte, error) { - b := make([]byte, 4+len(p.Data)) - switch proto { - case iana.ProtocolICMP: - b[0] = byte(p.Pointer) - case iana.ProtocolIPv6ICMP: + if proto == iana.ProtocolIPv6ICMP { + b := make([]byte, 4+p.Len(proto)) b[0], b[1], b[2], b[3] = byte(p.Pointer>>24), byte(p.Pointer>>16), byte(p.Pointer>>8), byte(p.Pointer) + copy(b[4:], p.Data) + return b, nil } - copy(b[4:], p.Data) + b, err := marshalMultipartMessageBody(proto, p.Data, p.Extensions) + if err != nil { + return nil, err + } + b[0] = byte(p.Pointer) return b, nil } // parseParamProb parses b as an ICMP parameter problem message body. func parseParamProb(proto int, b []byte) (MessageBody, error) { - bodyLen := len(b) - if bodyLen < 4 { + if len(b) < 4 { return nil, errMessageTooShort } p := &ParamProb{} - switch proto { - case iana.ProtocolICMP: - p.Pointer = uintptr(b[0]) - case iana.ProtocolIPv6ICMP: + if proto == iana.ProtocolIPv6ICMP { p.Pointer = uintptr(b[0])<<24 | uintptr(b[1])<<16 | uintptr(b[2])<<8 | uintptr(b[3]) - } - if bodyLen > 4 { - p.Data = make([]byte, bodyLen-4) + p.Data = make([]byte, len(b)-4) copy(p.Data, b[4:]) + return p, nil + } + p.Pointer = uintptr(b[0]) + var err error + p.Data, p.Extensions, err = parseMultipartMessageBody(proto, b) + if err != nil { + return nil, err } return p, nil } diff --git a/vendor/golang.org/x/net/icmp/ping_test.go b/vendor/golang.org/x/net/icmp/ping_test.go index 9b42fd7..4ec2692 100644 --- a/vendor/golang.org/x/net/icmp/ping_test.go +++ b/vendor/golang.org/x/net/icmp/ping_test.go @@ -6,15 +6,18 @@ package icmp_test import ( "errors" + "fmt" "net" "os" "runtime" "testing" + "time" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/icmp" - "github.com/vtolstov/svirtnet/internal/iana" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv4" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv6" + "golang.org/x/net/icmp" + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/nettest" + "golang.org/x/net/ipv4" + "golang.org/x/net/ipv6" ) func googleAddr(c *icmp.PacketConn, protocol int) (net.Addr, error) { @@ -48,83 +51,116 @@ func googleAddr(c *icmp.PacketConn, protocol int) (net.Addr, error) { return nil, errors.New("no A or AAAA record") } -var pingGoogleTests = []struct { +type pingTest struct { network, address string protocol int mtype icmp.Type -}{ +} + +var nonPrivilegedPingTests = []pingTest{ {"udp4", "0.0.0.0", iana.ProtocolICMP, ipv4.ICMPTypeEcho}, - {"ip4:icmp", "0.0.0.0", iana.ProtocolICMP, ipv4.ICMPTypeEcho}, {"udp6", "::", iana.ProtocolIPv6ICMP, ipv6.ICMPTypeEchoRequest}, - {"ip6:ipv6-icmp", "::", iana.ProtocolIPv6ICMP, ipv6.ICMPTypeEchoRequest}, } -func TestPingGoogle(t *testing.T) { +func TestNonPrivilegedPing(t *testing.T) { if testing.Short() { - t.Skip("to avoid external network") + t.Skip("avoid external network") } switch runtime.GOOS { case "darwin": case "linux": t.Log("you may need to adjust the net.ipv4.ping_group_range kernel state") default: - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } - for i, tt := range pingGoogleTests { - if tt.network[:2] == "ip" && os.Getuid() != 0 { - continue - } - c, err := icmp.ListenPacket(tt.network, tt.address) - if err != nil { + for i, tt := range nonPrivilegedPingTests { + if err := doPing(tt, i); err != nil { t.Error(err) - continue } - defer c.Close() + } +} - dst, err := googleAddr(c, tt.protocol) - if err != nil { - t.Error(err) - continue - } +var privilegedPingTests = []pingTest{ + {"ip4:icmp", "0.0.0.0", iana.ProtocolICMP, ipv4.ICMPTypeEcho}, - wm := icmp.Message{ - Type: tt.mtype, Code: 0, - Body: &icmp.Echo{ - ID: os.Getpid() & 0xffff, Seq: 1 << uint(i), - Data: []byte("HELLO-R-U-THERE"), - }, - } - wb, err := wm.Marshal(nil) - if err != nil { - t.Error(err) - continue - } - if n, err := c.WriteTo(wb, dst); err != nil { - t.Error(err, dst) - continue - } else if n != len(wb) { - t.Errorf("got %v; want %v", n, len(wb)) - continue - } + {"ip6:ipv6-icmp", "::", iana.ProtocolIPv6ICMP, ipv6.ICMPTypeEchoRequest}, +} - rb := make([]byte, 1500) - n, peer, err := c.ReadFrom(rb) - if err != nil { - t.Error(err) - continue - } - rm, err := icmp.ParseMessage(tt.protocol, rb[:n]) - if err != nil { +func TestPrivilegedPing(t *testing.T) { + if testing.Short() { + t.Skip("avoid external network") + } + if m, ok := nettest.SupportsRawIPSocket(); !ok { + t.Skip(m) + } + + for i, tt := range privilegedPingTests { + if err := doPing(tt, i); err != nil { t.Error(err) - continue } - switch rm.Type { - case ipv4.ICMPTypeEchoReply, ipv6.ICMPTypeEchoReply: - t.Logf("got reflection from %v", peer) - default: - t.Errorf("got %+v; want echo reply", rm) + } +} + +func doPing(tt pingTest, seq int) error { + c, err := icmp.ListenPacket(tt.network, tt.address) + if err != nil { + return err + } + defer c.Close() + + dst, err := googleAddr(c, tt.protocol) + if err != nil { + return err + } + + if tt.network != "udp6" && tt.protocol == iana.ProtocolIPv6ICMP { + var f ipv6.ICMPFilter + f.SetAll(true) + f.Accept(ipv6.ICMPTypeDestinationUnreachable) + f.Accept(ipv6.ICMPTypePacketTooBig) + f.Accept(ipv6.ICMPTypeTimeExceeded) + f.Accept(ipv6.ICMPTypeParameterProblem) + f.Accept(ipv6.ICMPTypeEchoReply) + if err := c.IPv6PacketConn().SetICMPFilter(&f); err != nil { + return err } } + + wm := icmp.Message{ + Type: tt.mtype, Code: 0, + Body: &icmp.Echo{ + ID: os.Getpid() & 0xffff, Seq: 1 << uint(seq), + Data: []byte("HELLO-R-U-THERE"), + }, + } + wb, err := wm.Marshal(nil) + if err != nil { + return err + } + if n, err := c.WriteTo(wb, dst); err != nil { + return err + } else if n != len(wb) { + return fmt.Errorf("got %v; want %v", n, len(wb)) + } + + rb := make([]byte, 1500) + if err := c.SetReadDeadline(time.Now().Add(3 * time.Second)); err != nil { + return err + } + n, peer, err := c.ReadFrom(rb) + if err != nil { + return err + } + rm, err := icmp.ParseMessage(tt.protocol, rb[:n]) + if err != nil { + return err + } + switch rm.Type { + case ipv4.ICMPTypeEchoReply, ipv6.ICMPTypeEchoReply: + return nil + default: + return fmt.Errorf("got %+v from %v; want echo reply", rm, peer) + } } diff --git a/vendor/golang.org/x/net/icmp/timeexceeded.go b/vendor/golang.org/x/net/icmp/timeexceeded.go index f61f431..18628c8 100644 --- a/vendor/golang.org/x/net/icmp/timeexceeded.go +++ b/vendor/golang.org/x/net/icmp/timeexceeded.go @@ -11,30 +11,29 @@ type TimeExceeded struct { } // Len implements the Len method of MessageBody interface. -func (p *TimeExceeded) Len() int { +func (p *TimeExceeded) Len(proto int) int { if p == nil { return 0 } - return 4 + len(p.Data) + l, _ := multipartMessageBodyDataLen(proto, p.Data, p.Extensions) + return l } // Marshal implements the Marshal method of MessageBody interface. func (p *TimeExceeded) Marshal(proto int) ([]byte, error) { - b := make([]byte, 4+len(p.Data)) - copy(b[4:], p.Data) - return b, nil + return marshalMultipartMessageBody(proto, p.Data, p.Extensions) } // parseTimeExceeded parses b as an ICMP time exceeded message body. func parseTimeExceeded(proto int, b []byte) (MessageBody, error) { - bodyLen := len(b) - if bodyLen < 4 { + if len(b) < 4 { return nil, errMessageTooShort } p := &TimeExceeded{} - if bodyLen > 4 { - p.Data = make([]byte, bodyLen-4) - copy(p.Data, b[4:]) + var err error + p.Data, p.Extensions, err = parseMultipartMessageBody(proto, b) + if err != nil { + return nil, err } return p, nil } diff --git a/vendor/golang.org/x/net/idna/idna.go b/vendor/golang.org/x/net/idna/idna.go new file mode 100644 index 0000000..3daa897 --- /dev/null +++ b/vendor/golang.org/x/net/idna/idna.go @@ -0,0 +1,68 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package idna implements IDNA2008 (Internationalized Domain Names for +// Applications), defined in RFC 5890, RFC 5891, RFC 5892, RFC 5893 and +// RFC 5894. +package idna // import "golang.org/x/net/idna" + +import ( + "strings" + "unicode/utf8" +) + +// TODO(nigeltao): specify when errors occur. For example, is ToASCII(".") or +// ToASCII("foo\x00") an error? See also http://www.unicode.org/faq/idn.html#11 + +// acePrefix is the ASCII Compatible Encoding prefix. +const acePrefix = "xn--" + +// ToASCII converts a domain or domain label to its ASCII form. For example, +// ToASCII("bücher.example.com") is "xn--bcher-kva.example.com", and +// ToASCII("golang") is "golang". +func ToASCII(s string) (string, error) { + if ascii(s) { + return s, nil + } + labels := strings.Split(s, ".") + for i, label := range labels { + if !ascii(label) { + a, err := encode(acePrefix, label) + if err != nil { + return "", err + } + labels[i] = a + } + } + return strings.Join(labels, "."), nil +} + +// ToUnicode converts a domain or domain label to its Unicode form. For example, +// ToUnicode("xn--bcher-kva.example.com") is "bücher.example.com", and +// ToUnicode("golang") is "golang". +func ToUnicode(s string) (string, error) { + if !strings.Contains(s, acePrefix) { + return s, nil + } + labels := strings.Split(s, ".") + for i, label := range labels { + if strings.HasPrefix(label, acePrefix) { + u, err := decode(label[len(acePrefix):]) + if err != nil { + return "", err + } + labels[i] = u + } + } + return strings.Join(labels, "."), nil +} + +func ascii(s string) bool { + for i := 0; i < len(s); i++ { + if s[i] >= utf8.RuneSelf { + return false + } + } + return true +} diff --git a/vendor/golang.org/x/net/idna/idna_test.go b/vendor/golang.org/x/net/idna/idna_test.go new file mode 100644 index 0000000..b1bc6fa --- /dev/null +++ b/vendor/golang.org/x/net/idna/idna_test.go @@ -0,0 +1,43 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package idna + +import ( + "testing" +) + +var idnaTestCases = [...]struct { + ascii, unicode string +}{ + // Labels. + {"books", "books"}, + {"xn--bcher-kva", "bücher"}, + + // Domains. + {"foo--xn--bar.org", "foo--xn--bar.org"}, + {"golang.org", "golang.org"}, + {"example.xn--p1ai", "example.рф"}, + {"xn--czrw28b.tw", "商業.tw"}, + {"www.xn--mller-kva.de", "www.müller.de"}, +} + +func TestIDNA(t *testing.T) { + for _, tc := range idnaTestCases { + if a, err := ToASCII(tc.unicode); err != nil { + t.Errorf("ToASCII(%q): %v", tc.unicode, err) + } else if a != tc.ascii { + t.Errorf("ToASCII(%q): got %q, want %q", tc.unicode, a, tc.ascii) + } + + if u, err := ToUnicode(tc.ascii); err != nil { + t.Errorf("ToUnicode(%q): %v", tc.ascii, err) + } else if u != tc.unicode { + t.Errorf("ToUnicode(%q): got %q, want %q", tc.ascii, u, tc.unicode) + } + } +} + +// TODO(nigeltao): test errors, once we've specified when ToASCII and ToUnicode +// return errors. diff --git a/vendor/golang.org/x/net/idna/punycode.go b/vendor/golang.org/x/net/idna/punycode.go new file mode 100644 index 0000000..92e733f --- /dev/null +++ b/vendor/golang.org/x/net/idna/punycode.go @@ -0,0 +1,200 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package idna + +// This file implements the Punycode algorithm from RFC 3492. + +import ( + "fmt" + "math" + "strings" + "unicode/utf8" +) + +// These parameter values are specified in section 5. +// +// All computation is done with int32s, so that overflow behavior is identical +// regardless of whether int is 32-bit or 64-bit. +const ( + base int32 = 36 + damp int32 = 700 + initialBias int32 = 72 + initialN int32 = 128 + skew int32 = 38 + tmax int32 = 26 + tmin int32 = 1 +) + +// decode decodes a string as specified in section 6.2. +func decode(encoded string) (string, error) { + if encoded == "" { + return "", nil + } + pos := 1 + strings.LastIndex(encoded, "-") + if pos == 1 { + return "", fmt.Errorf("idna: invalid label %q", encoded) + } + if pos == len(encoded) { + return encoded[:len(encoded)-1], nil + } + output := make([]rune, 0, len(encoded)) + if pos != 0 { + for _, r := range encoded[:pos-1] { + output = append(output, r) + } + } + i, n, bias := int32(0), initialN, initialBias + for pos < len(encoded) { + oldI, w := i, int32(1) + for k := base; ; k += base { + if pos == len(encoded) { + return "", fmt.Errorf("idna: invalid label %q", encoded) + } + digit, ok := decodeDigit(encoded[pos]) + if !ok { + return "", fmt.Errorf("idna: invalid label %q", encoded) + } + pos++ + i += digit * w + if i < 0 { + return "", fmt.Errorf("idna: invalid label %q", encoded) + } + t := k - bias + if t < tmin { + t = tmin + } else if t > tmax { + t = tmax + } + if digit < t { + break + } + w *= base - t + if w >= math.MaxInt32/base { + return "", fmt.Errorf("idna: invalid label %q", encoded) + } + } + x := int32(len(output) + 1) + bias = adapt(i-oldI, x, oldI == 0) + n += i / x + i %= x + if n > utf8.MaxRune || len(output) >= 1024 { + return "", fmt.Errorf("idna: invalid label %q", encoded) + } + output = append(output, 0) + copy(output[i+1:], output[i:]) + output[i] = n + i++ + } + return string(output), nil +} + +// encode encodes a string as specified in section 6.3 and prepends prefix to +// the result. +// +// The "while h < length(input)" line in the specification becomes "for +// remaining != 0" in the Go code, because len(s) in Go is in bytes, not runes. +func encode(prefix, s string) (string, error) { + output := make([]byte, len(prefix), len(prefix)+1+2*len(s)) + copy(output, prefix) + delta, n, bias := int32(0), initialN, initialBias + b, remaining := int32(0), int32(0) + for _, r := range s { + if r < 0x80 { + b++ + output = append(output, byte(r)) + } else { + remaining++ + } + } + h := b + if b > 0 { + output = append(output, '-') + } + for remaining != 0 { + m := int32(0x7fffffff) + for _, r := range s { + if m > r && r >= n { + m = r + } + } + delta += (m - n) * (h + 1) + if delta < 0 { + return "", fmt.Errorf("idna: invalid label %q", s) + } + n = m + for _, r := range s { + if r < n { + delta++ + if delta < 0 { + return "", fmt.Errorf("idna: invalid label %q", s) + } + continue + } + if r > n { + continue + } + q := delta + for k := base; ; k += base { + t := k - bias + if t < tmin { + t = tmin + } else if t > tmax { + t = tmax + } + if q < t { + break + } + output = append(output, encodeDigit(t+(q-t)%(base-t))) + q = (q - t) / (base - t) + } + output = append(output, encodeDigit(q)) + bias = adapt(delta, h+1, h == b) + delta = 0 + h++ + remaining-- + } + delta++ + n++ + } + return string(output), nil +} + +func decodeDigit(x byte) (digit int32, ok bool) { + switch { + case '0' <= x && x <= '9': + return int32(x - ('0' - 26)), true + case 'A' <= x && x <= 'Z': + return int32(x - 'A'), true + case 'a' <= x && x <= 'z': + return int32(x - 'a'), true + } + return 0, false +} + +func encodeDigit(digit int32) byte { + switch { + case 0 <= digit && digit < 26: + return byte(digit + 'a') + case 26 <= digit && digit < 36: + return byte(digit + ('0' - 26)) + } + panic("idna: internal error in punycode encoding") +} + +// adapt is the bias adaptation function specified in section 6.1. +func adapt(delta, numPoints int32, firstTime bool) int32 { + if firstTime { + delta /= damp + } else { + delta /= 2 + } + delta += delta / numPoints + k := int32(0) + for delta > ((base-tmin)*tmax)/2 { + delta /= base - tmin + k += base + } + return k + (base-tmin+1)*delta/(delta+skew) +} diff --git a/vendor/golang.org/x/net/idna/punycode_test.go b/vendor/golang.org/x/net/idna/punycode_test.go new file mode 100644 index 0000000..bfec81d --- /dev/null +++ b/vendor/golang.org/x/net/idna/punycode_test.go @@ -0,0 +1,198 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package idna + +import ( + "strings" + "testing" +) + +var punycodeTestCases = [...]struct { + s, encoded string +}{ + {"", ""}, + {"-", "--"}, + {"-a", "-a-"}, + {"-a-", "-a--"}, + {"a", "a-"}, + {"a-", "a--"}, + {"a-b", "a-b-"}, + {"books", "books-"}, + {"bücher", "bcher-kva"}, + {"Hello世界", "Hello-ck1hg65u"}, + {"ü", "tda"}, + {"üý", "tdac"}, + + // The test cases below come from RFC 3492 section 7.1 with Errata 3026. + { + // (A) Arabic (Egyptian). + "\u0644\u064A\u0647\u0645\u0627\u0628\u062A\u0643\u0644" + + "\u0645\u0648\u0634\u0639\u0631\u0628\u064A\u061F", + "egbpdaj6bu4bxfgehfvwxn", + }, + { + // (B) Chinese (simplified). + "\u4ED6\u4EEC\u4E3A\u4EC0\u4E48\u4E0D\u8BF4\u4E2D\u6587", + "ihqwcrb4cv8a8dqg056pqjye", + }, + { + // (C) Chinese (traditional). + "\u4ED6\u5011\u7232\u4EC0\u9EBD\u4E0D\u8AAA\u4E2D\u6587", + "ihqwctvzc91f659drss3x8bo0yb", + }, + { + // (D) Czech. + "\u0050\u0072\u006F\u010D\u0070\u0072\u006F\u0073\u0074" + + "\u011B\u006E\u0065\u006D\u006C\u0075\u0076\u00ED\u010D" + + "\u0065\u0073\u006B\u0079", + "Proprostnemluvesky-uyb24dma41a", + }, + { + // (E) Hebrew. + "\u05DC\u05DE\u05D4\u05D4\u05DD\u05E4\u05E9\u05D5\u05D8" + + "\u05DC\u05D0\u05DE\u05D3\u05D1\u05E8\u05D9\u05DD\u05E2" + + "\u05D1\u05E8\u05D9\u05EA", + "4dbcagdahymbxekheh6e0a7fei0b", + }, + { + // (F) Hindi (Devanagari). + "\u092F\u0939\u0932\u094B\u0917\u0939\u093F\u0928\u094D" + + "\u0926\u0940\u0915\u094D\u092F\u094B\u0902\u0928\u0939" + + "\u0940\u0902\u092C\u094B\u0932\u0938\u0915\u0924\u0947" + + "\u0939\u0948\u0902", + "i1baa7eci9glrd9b2ae1bj0hfcgg6iyaf8o0a1dig0cd", + }, + { + // (G) Japanese (kanji and hiragana). + "\u306A\u305C\u307F\u3093\u306A\u65E5\u672C\u8A9E\u3092" + + "\u8A71\u3057\u3066\u304F\u308C\u306A\u3044\u306E\u304B", + "n8jok5ay5dzabd5bym9f0cm5685rrjetr6pdxa", + }, + { + // (H) Korean (Hangul syllables). + "\uC138\uACC4\uC758\uBAA8\uB4E0\uC0AC\uB78C\uB4E4\uC774" + + "\uD55C\uAD6D\uC5B4\uB97C\uC774\uD574\uD55C\uB2E4\uBA74" + + "\uC5BC\uB9C8\uB098\uC88B\uC744\uAE4C", + "989aomsvi5e83db1d2a355cv1e0vak1dwrv93d5xbh15a0dt30a5j" + + "psd879ccm6fea98c", + }, + { + // (I) Russian (Cyrillic). + "\u043F\u043E\u0447\u0435\u043C\u0443\u0436\u0435\u043E" + + "\u043D\u0438\u043D\u0435\u0433\u043E\u0432\u043E\u0440" + + "\u044F\u0442\u043F\u043E\u0440\u0443\u0441\u0441\u043A" + + "\u0438", + "b1abfaaepdrnnbgefbadotcwatmq2g4l", + }, + { + // (J) Spanish. + "\u0050\u006F\u0072\u0071\u0075\u00E9\u006E\u006F\u0070" + + "\u0075\u0065\u0064\u0065\u006E\u0073\u0069\u006D\u0070" + + "\u006C\u0065\u006D\u0065\u006E\u0074\u0065\u0068\u0061" + + "\u0062\u006C\u0061\u0072\u0065\u006E\u0045\u0073\u0070" + + "\u0061\u00F1\u006F\u006C", + "PorqunopuedensimplementehablarenEspaol-fmd56a", + }, + { + // (K) Vietnamese. + "\u0054\u1EA1\u0069\u0073\u0061\u006F\u0068\u1ECD\u006B" + + "\u0068\u00F4\u006E\u0067\u0074\u0068\u1EC3\u0063\u0068" + + "\u1EC9\u006E\u00F3\u0069\u0074\u0069\u1EBF\u006E\u0067" + + "\u0056\u0069\u1EC7\u0074", + "TisaohkhngthchnitingVit-kjcr8268qyxafd2f1b9g", + }, + { + // (L) 3B. + "\u0033\u5E74\u0042\u7D44\u91D1\u516B\u5148\u751F", + "3B-ww4c5e180e575a65lsy2b", + }, + { + // (M) -with-SUPER-MONKEYS. + "\u5B89\u5BA4\u5948\u7F8E\u6075\u002D\u0077\u0069\u0074" + + "\u0068\u002D\u0053\u0055\u0050\u0045\u0052\u002D\u004D" + + "\u004F\u004E\u004B\u0045\u0059\u0053", + "-with-SUPER-MONKEYS-pc58ag80a8qai00g7n9n", + }, + { + // (N) Hello-Another-Way-. + "\u0048\u0065\u006C\u006C\u006F\u002D\u0041\u006E\u006F" + + "\u0074\u0068\u0065\u0072\u002D\u0057\u0061\u0079\u002D" + + "\u305D\u308C\u305E\u308C\u306E\u5834\u6240", + "Hello-Another-Way--fc4qua05auwb3674vfr0b", + }, + { + // (O) 2. + "\u3072\u3068\u3064\u5C4B\u6839\u306E\u4E0B\u0032", + "2-u9tlzr9756bt3uc0v", + }, + { + // (P) MajiKoi5 + "\u004D\u0061\u006A\u0069\u3067\u004B\u006F\u0069\u3059" + + "\u308B\u0035\u79D2\u524D", + "MajiKoi5-783gue6qz075azm5e", + }, + { + // (Q) de + "\u30D1\u30D5\u30A3\u30FC\u0064\u0065\u30EB\u30F3\u30D0", + "de-jg4avhby1noc0d", + }, + { + // (R) + "\u305D\u306E\u30B9\u30D4\u30FC\u30C9\u3067", + "d9juau41awczczp", + }, + { + // (S) -> $1.00 <- + "\u002D\u003E\u0020\u0024\u0031\u002E\u0030\u0030\u0020" + + "\u003C\u002D", + "-> $1.00 <--", + }, +} + +func TestPunycode(t *testing.T) { + for _, tc := range punycodeTestCases { + if got, err := decode(tc.encoded); err != nil { + t.Errorf("decode(%q): %v", tc.encoded, err) + } else if got != tc.s { + t.Errorf("decode(%q): got %q, want %q", tc.encoded, got, tc.s) + } + + if got, err := encode("", tc.s); err != nil { + t.Errorf(`encode("", %q): %v`, tc.s, err) + } else if got != tc.encoded { + t.Errorf(`encode("", %q): got %q, want %q`, tc.s, got, tc.encoded) + } + } +} + +var punycodeErrorTestCases = [...]string{ + "decode -", // A sole '-' is invalid. + "decode foo\x00bar", // '\x00' is not in [0-9A-Za-z]. + "decode foo#bar", // '#' is not in [0-9A-Za-z]. + "decode foo\u00A3bar", // '\u00A3' is not in [0-9A-Za-z]. + "decode 9", // "9a" decodes to codepoint \u00A3; "9" is truncated. + "decode 99999a", // "99999a" decodes to codepoint \U0048A3C1, which is > \U0010FFFF. + "decode 9999999999a", // "9999999999a" overflows the int32 calculation. + + "encode " + strings.Repeat("x", 65536) + "\uff00", // int32 overflow. +} + +func TestPunycodeErrors(t *testing.T) { + for _, tc := range punycodeErrorTestCases { + var err error + switch { + case strings.HasPrefix(tc, "decode "): + _, err = decode(tc[7:]) + case strings.HasPrefix(tc, "encode "): + _, err = encode("", tc[7:]) + } + if err == nil { + if len(tc) > 256 { + tc = tc[:100] + "..." + tc[len(tc)-100:] + } + t.Errorf("no error for %s", tc) + } + } +} diff --git a/vendor/golang.org/x/net/internal/iana/const.go b/vendor/golang.org/x/net/internal/iana/const.go new file mode 100644 index 0000000..7fe8822 --- /dev/null +++ b/vendor/golang.org/x/net/internal/iana/const.go @@ -0,0 +1,181 @@ +// go generate gen.go +// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA). +package iana // import "golang.org/x/net/internal/iana" + +// Differentiated Services Field Codepoints (DSCP), Updated: 2013-06-25 +const ( + DiffServCS0 = 0x0 // CS0 + DiffServCS1 = 0x20 // CS1 + DiffServCS2 = 0x40 // CS2 + DiffServCS3 = 0x60 // CS3 + DiffServCS4 = 0x80 // CS4 + DiffServCS5 = 0xa0 // CS5 + DiffServCS6 = 0xc0 // CS6 + DiffServCS7 = 0xe0 // CS7 + DiffServAF11 = 0x28 // AF11 + DiffServAF12 = 0x30 // AF12 + DiffServAF13 = 0x38 // AF13 + DiffServAF21 = 0x48 // AF21 + DiffServAF22 = 0x50 // AF22 + DiffServAF23 = 0x58 // AF23 + DiffServAF31 = 0x68 // AF31 + DiffServAF32 = 0x70 // AF32 + DiffServAF33 = 0x78 // AF33 + DiffServAF41 = 0x88 // AF41 + DiffServAF42 = 0x90 // AF42 + DiffServAF43 = 0x98 // AF43 + DiffServEFPHB = 0xb8 // EF PHB + DiffServVOICEADMIT = 0xb0 // VOICE-ADMIT +) + +// IPv4 TOS Byte and IPv6 Traffic Class Octet, Updated: 2001-09-06 +const ( + NotECNTransport = 0x0 // Not-ECT (Not ECN-Capable Transport) + ECNTransport1 = 0x1 // ECT(1) (ECN-Capable Transport(1)) + ECNTransport0 = 0x2 // ECT(0) (ECN-Capable Transport(0)) + CongestionExperienced = 0x3 // CE (Congestion Experienced) +) + +// Protocol Numbers, Updated: 2015-06-23 +const ( + ProtocolIP = 0 // IPv4 encapsulation, pseudo protocol number + ProtocolHOPOPT = 0 // IPv6 Hop-by-Hop Option + ProtocolICMP = 1 // Internet Control Message + ProtocolIGMP = 2 // Internet Group Management + ProtocolGGP = 3 // Gateway-to-Gateway + ProtocolIPv4 = 4 // IPv4 encapsulation + ProtocolST = 5 // Stream + ProtocolTCP = 6 // Transmission Control + ProtocolCBT = 7 // CBT + ProtocolEGP = 8 // Exterior Gateway Protocol + ProtocolIGP = 9 // any private interior gateway (used by Cisco for their IGRP) + ProtocolBBNRCCMON = 10 // BBN RCC Monitoring + ProtocolNVPII = 11 // Network Voice Protocol + ProtocolPUP = 12 // PUP + ProtocolARGUS = 13 // ARGUS + ProtocolEMCON = 14 // EMCON + ProtocolXNET = 15 // Cross Net Debugger + ProtocolCHAOS = 16 // Chaos + ProtocolUDP = 17 // User Datagram + ProtocolMUX = 18 // Multiplexing + ProtocolDCNMEAS = 19 // DCN Measurement Subsystems + ProtocolHMP = 20 // Host Monitoring + ProtocolPRM = 21 // Packet Radio Measurement + ProtocolXNSIDP = 22 // XEROX NS IDP + ProtocolTRUNK1 = 23 // Trunk-1 + ProtocolTRUNK2 = 24 // Trunk-2 + ProtocolLEAF1 = 25 // Leaf-1 + ProtocolLEAF2 = 26 // Leaf-2 + ProtocolRDP = 27 // Reliable Data Protocol + ProtocolIRTP = 28 // Internet Reliable Transaction + ProtocolISOTP4 = 29 // ISO Transport Protocol Class 4 + ProtocolNETBLT = 30 // Bulk Data Transfer Protocol + ProtocolMFENSP = 31 // MFE Network Services Protocol + ProtocolMERITINP = 32 // MERIT Internodal Protocol + ProtocolDCCP = 33 // Datagram Congestion Control Protocol + Protocol3PC = 34 // Third Party Connect Protocol + ProtocolIDPR = 35 // Inter-Domain Policy Routing Protocol + ProtocolXTP = 36 // XTP + ProtocolDDP = 37 // Datagram Delivery Protocol + ProtocolIDPRCMTP = 38 // IDPR Control Message Transport Proto + ProtocolTPPP = 39 // TP++ Transport Protocol + ProtocolIL = 40 // IL Transport Protocol + ProtocolIPv6 = 41 // IPv6 encapsulation + ProtocolSDRP = 42 // Source Demand Routing Protocol + ProtocolIPv6Route = 43 // Routing Header for IPv6 + ProtocolIPv6Frag = 44 // Fragment Header for IPv6 + ProtocolIDRP = 45 // Inter-Domain Routing Protocol + ProtocolRSVP = 46 // Reservation Protocol + ProtocolGRE = 47 // Generic Routing Encapsulation + ProtocolDSR = 48 // Dynamic Source Routing Protocol + ProtocolBNA = 49 // BNA + ProtocolESP = 50 // Encap Security Payload + ProtocolAH = 51 // Authentication Header + ProtocolINLSP = 52 // Integrated Net Layer Security TUBA + ProtocolNARP = 54 // NBMA Address Resolution Protocol + ProtocolMOBILE = 55 // IP Mobility + ProtocolTLSP = 56 // Transport Layer Security Protocol using Kryptonet key management + ProtocolSKIP = 57 // SKIP + ProtocolIPv6ICMP = 58 // ICMP for IPv6 + ProtocolIPv6NoNxt = 59 // No Next Header for IPv6 + ProtocolIPv6Opts = 60 // Destination Options for IPv6 + ProtocolCFTP = 62 // CFTP + ProtocolSATEXPAK = 64 // SATNET and Backroom EXPAK + ProtocolKRYPTOLAN = 65 // Kryptolan + ProtocolRVD = 66 // MIT Remote Virtual Disk Protocol + ProtocolIPPC = 67 // Internet Pluribus Packet Core + ProtocolSATMON = 69 // SATNET Monitoring + ProtocolVISA = 70 // VISA Protocol + ProtocolIPCV = 71 // Internet Packet Core Utility + ProtocolCPNX = 72 // Computer Protocol Network Executive + ProtocolCPHB = 73 // Computer Protocol Heart Beat + ProtocolWSN = 74 // Wang Span Network + ProtocolPVP = 75 // Packet Video Protocol + ProtocolBRSATMON = 76 // Backroom SATNET Monitoring + ProtocolSUNND = 77 // SUN ND PROTOCOL-Temporary + ProtocolWBMON = 78 // WIDEBAND Monitoring + ProtocolWBEXPAK = 79 // WIDEBAND EXPAK + ProtocolISOIP = 80 // ISO Internet Protocol + ProtocolVMTP = 81 // VMTP + ProtocolSECUREVMTP = 82 // SECURE-VMTP + ProtocolVINES = 83 // VINES + ProtocolTTP = 84 // Transaction Transport Protocol + ProtocolIPTM = 84 // Internet Protocol Traffic Manager + ProtocolNSFNETIGP = 85 // NSFNET-IGP + ProtocolDGP = 86 // Dissimilar Gateway Protocol + ProtocolTCF = 87 // TCF + ProtocolEIGRP = 88 // EIGRP + ProtocolOSPFIGP = 89 // OSPFIGP + ProtocolSpriteRPC = 90 // Sprite RPC Protocol + ProtocolLARP = 91 // Locus Address Resolution Protocol + ProtocolMTP = 92 // Multicast Transport Protocol + ProtocolAX25 = 93 // AX.25 Frames + ProtocolIPIP = 94 // IP-within-IP Encapsulation Protocol + ProtocolSCCSP = 96 // Semaphore Communications Sec. Pro. + ProtocolETHERIP = 97 // Ethernet-within-IP Encapsulation + ProtocolENCAP = 98 // Encapsulation Header + ProtocolGMTP = 100 // GMTP + ProtocolIFMP = 101 // Ipsilon Flow Management Protocol + ProtocolPNNI = 102 // PNNI over IP + ProtocolPIM = 103 // Protocol Independent Multicast + ProtocolARIS = 104 // ARIS + ProtocolSCPS = 105 // SCPS + ProtocolQNX = 106 // QNX + ProtocolAN = 107 // Active Networks + ProtocolIPComp = 108 // IP Payload Compression Protocol + ProtocolSNP = 109 // Sitara Networks Protocol + ProtocolCompaqPeer = 110 // Compaq Peer Protocol + ProtocolIPXinIP = 111 // IPX in IP + ProtocolVRRP = 112 // Virtual Router Redundancy Protocol + ProtocolPGM = 113 // PGM Reliable Transport Protocol + ProtocolL2TP = 115 // Layer Two Tunneling Protocol + ProtocolDDX = 116 // D-II Data Exchange (DDX) + ProtocolIATP = 117 // Interactive Agent Transfer Protocol + ProtocolSTP = 118 // Schedule Transfer Protocol + ProtocolSRP = 119 // SpectraLink Radio Protocol + ProtocolUTI = 120 // UTI + ProtocolSMP = 121 // Simple Message Protocol + ProtocolPTP = 123 // Performance Transparency Protocol + ProtocolISIS = 124 // ISIS over IPv4 + ProtocolFIRE = 125 // FIRE + ProtocolCRTP = 126 // Combat Radio Transport Protocol + ProtocolCRUDP = 127 // Combat Radio User Datagram + ProtocolSSCOPMCE = 128 // SSCOPMCE + ProtocolIPLT = 129 // IPLT + ProtocolSPS = 130 // Secure Packet Shield + ProtocolPIPE = 131 // Private IP Encapsulation within IP + ProtocolSCTP = 132 // Stream Control Transmission Protocol + ProtocolFC = 133 // Fibre Channel + ProtocolRSVPE2EIGNORE = 134 // RSVP-E2E-IGNORE + ProtocolMobilityHeader = 135 // Mobility Header + ProtocolUDPLite = 136 // UDPLite + ProtocolMPLSinIP = 137 // MPLS-in-IP + ProtocolMANET = 138 // MANET Protocols + ProtocolHIP = 139 // Host Identity Protocol + ProtocolShim6 = 140 // Shim6 Protocol + ProtocolWESP = 141 // Wrapped Encapsulating Security Payload + ProtocolROHC = 142 // Robust Header Compression + ProtocolReserved = 255 // Reserved +) diff --git a/vendor/golang.org/x/net/internal/iana/gen.go b/vendor/golang.org/x/net/internal/iana/gen.go new file mode 100644 index 0000000..2d8c07c --- /dev/null +++ b/vendor/golang.org/x/net/internal/iana/gen.go @@ -0,0 +1,293 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +//go:generate go run gen.go + +// This program generates internet protocol constants and tables by +// reading IANA protocol registries. +package main + +import ( + "bytes" + "encoding/xml" + "fmt" + "go/format" + "io" + "io/ioutil" + "net/http" + "os" + "strconv" + "strings" +) + +var registries = []struct { + url string + parse func(io.Writer, io.Reader) error +}{ + { + "http://www.iana.org/assignments/dscp-registry/dscp-registry.xml", + parseDSCPRegistry, + }, + { + "http://www.iana.org/assignments/ipv4-tos-byte/ipv4-tos-byte.xml", + parseTOSTCByte, + }, + { + "http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml", + parseProtocolNumbers, + }, +} + +func main() { + var bb bytes.Buffer + fmt.Fprintf(&bb, "// go generate gen.go\n") + fmt.Fprintf(&bb, "// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT\n\n") + fmt.Fprintf(&bb, "// Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA).\n") + fmt.Fprintf(&bb, `package iana // import "golang.org/x/net/internal/iana"`+"\n\n") + for _, r := range registries { + resp, err := http.Get(r.url) + if err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } + defer resp.Body.Close() + if resp.StatusCode != http.StatusOK { + fmt.Fprintf(os.Stderr, "got HTTP status code %v for %v\n", resp.StatusCode, r.url) + os.Exit(1) + } + if err := r.parse(&bb, resp.Body); err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } + fmt.Fprintf(&bb, "\n") + } + b, err := format.Source(bb.Bytes()) + if err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } + if err := ioutil.WriteFile("const.go", b, 0644); err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } +} + +func parseDSCPRegistry(w io.Writer, r io.Reader) error { + dec := xml.NewDecoder(r) + var dr dscpRegistry + if err := dec.Decode(&dr); err != nil { + return err + } + drs := dr.escape() + fmt.Fprintf(w, "// %s, Updated: %s\n", dr.Title, dr.Updated) + fmt.Fprintf(w, "const (\n") + for _, dr := range drs { + fmt.Fprintf(w, "DiffServ%s = %#x", dr.Name, dr.Value) + fmt.Fprintf(w, "// %s\n", dr.OrigName) + } + fmt.Fprintf(w, ")\n") + return nil +} + +type dscpRegistry struct { + XMLName xml.Name `xml:"registry"` + Title string `xml:"title"` + Updated string `xml:"updated"` + Note string `xml:"note"` + RegTitle string `xml:"registry>title"` + PoolRecords []struct { + Name string `xml:"name"` + Space string `xml:"space"` + } `xml:"registry>record"` + Records []struct { + Name string `xml:"name"` + Space string `xml:"space"` + } `xml:"registry>registry>record"` +} + +type canonDSCPRecord struct { + OrigName string + Name string + Value int +} + +func (drr *dscpRegistry) escape() []canonDSCPRecord { + drs := make([]canonDSCPRecord, len(drr.Records)) + sr := strings.NewReplacer( + "+", "", + "-", "", + "/", "", + ".", "", + " ", "", + ) + for i, dr := range drr.Records { + s := strings.TrimSpace(dr.Name) + drs[i].OrigName = s + drs[i].Name = sr.Replace(s) + n, err := strconv.ParseUint(dr.Space, 2, 8) + if err != nil { + continue + } + drs[i].Value = int(n) << 2 + } + return drs +} + +func parseTOSTCByte(w io.Writer, r io.Reader) error { + dec := xml.NewDecoder(r) + var ttb tosTCByte + if err := dec.Decode(&ttb); err != nil { + return err + } + trs := ttb.escape() + fmt.Fprintf(w, "// %s, Updated: %s\n", ttb.Title, ttb.Updated) + fmt.Fprintf(w, "const (\n") + for _, tr := range trs { + fmt.Fprintf(w, "%s = %#x", tr.Keyword, tr.Value) + fmt.Fprintf(w, "// %s\n", tr.OrigKeyword) + } + fmt.Fprintf(w, ")\n") + return nil +} + +type tosTCByte struct { + XMLName xml.Name `xml:"registry"` + Title string `xml:"title"` + Updated string `xml:"updated"` + Note string `xml:"note"` + RegTitle string `xml:"registry>title"` + Records []struct { + Binary string `xml:"binary"` + Keyword string `xml:"keyword"` + } `xml:"registry>record"` +} + +type canonTOSTCByteRecord struct { + OrigKeyword string + Keyword string + Value int +} + +func (ttb *tosTCByte) escape() []canonTOSTCByteRecord { + trs := make([]canonTOSTCByteRecord, len(ttb.Records)) + sr := strings.NewReplacer( + "Capable", "", + "(", "", + ")", "", + "+", "", + "-", "", + "/", "", + ".", "", + " ", "", + ) + for i, tr := range ttb.Records { + s := strings.TrimSpace(tr.Keyword) + trs[i].OrigKeyword = s + ss := strings.Split(s, " ") + if len(ss) > 1 { + trs[i].Keyword = strings.Join(ss[1:], " ") + } else { + trs[i].Keyword = ss[0] + } + trs[i].Keyword = sr.Replace(trs[i].Keyword) + n, err := strconv.ParseUint(tr.Binary, 2, 8) + if err != nil { + continue + } + trs[i].Value = int(n) + } + return trs +} + +func parseProtocolNumbers(w io.Writer, r io.Reader) error { + dec := xml.NewDecoder(r) + var pn protocolNumbers + if err := dec.Decode(&pn); err != nil { + return err + } + prs := pn.escape() + prs = append([]canonProtocolRecord{{ + Name: "IP", + Descr: "IPv4 encapsulation, pseudo protocol number", + Value: 0, + }}, prs...) + fmt.Fprintf(w, "// %s, Updated: %s\n", pn.Title, pn.Updated) + fmt.Fprintf(w, "const (\n") + for _, pr := range prs { + if pr.Name == "" { + continue + } + fmt.Fprintf(w, "Protocol%s = %d", pr.Name, pr.Value) + s := pr.Descr + if s == "" { + s = pr.OrigName + } + fmt.Fprintf(w, "// %s\n", s) + } + fmt.Fprintf(w, ")\n") + return nil +} + +type protocolNumbers struct { + XMLName xml.Name `xml:"registry"` + Title string `xml:"title"` + Updated string `xml:"updated"` + RegTitle string `xml:"registry>title"` + Note string `xml:"registry>note"` + Records []struct { + Value string `xml:"value"` + Name string `xml:"name"` + Descr string `xml:"description"` + } `xml:"registry>record"` +} + +type canonProtocolRecord struct { + OrigName string + Name string + Descr string + Value int +} + +func (pn *protocolNumbers) escape() []canonProtocolRecord { + prs := make([]canonProtocolRecord, len(pn.Records)) + sr := strings.NewReplacer( + "-in-", "in", + "-within-", "within", + "-over-", "over", + "+", "P", + "-", "", + "/", "", + ".", "", + " ", "", + ) + for i, pr := range pn.Records { + if strings.Contains(pr.Name, "Deprecated") || + strings.Contains(pr.Name, "deprecated") { + continue + } + prs[i].OrigName = pr.Name + s := strings.TrimSpace(pr.Name) + switch pr.Name { + case "ISIS over IPv4": + prs[i].Name = "ISIS" + case "manet": + prs[i].Name = "MANET" + default: + prs[i].Name = sr.Replace(s) + } + ss := strings.Split(pr.Descr, "\n") + for i := range ss { + ss[i] = strings.TrimSpace(ss[i]) + } + if len(ss) > 1 { + prs[i].Descr = strings.Join(ss, " ") + } else { + prs[i].Descr = ss[0] + } + prs[i].Value, _ = strconv.Atoi(pr.Value) + } + return prs +} diff --git a/vendor/golang.org/x/net/internal/nettest/error_posix.go b/vendor/golang.org/x/net/internal/nettest/error_posix.go new file mode 100644 index 0000000..963ed99 --- /dev/null +++ b/vendor/golang.org/x/net/internal/nettest/error_posix.go @@ -0,0 +1,31 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows + +package nettest + +import ( + "os" + "syscall" +) + +func protocolNotSupported(err error) bool { + switch err := err.(type) { + case syscall.Errno: + switch err { + case syscall.EPROTONOSUPPORT, syscall.ENOPROTOOPT: + return true + } + case *os.SyscallError: + switch err := err.Err.(type) { + case syscall.Errno: + switch err { + case syscall.EPROTONOSUPPORT, syscall.ENOPROTOOPT: + return true + } + } + } + return false +} diff --git a/vendor/golang.org/x/net/internal/nettest/error_stub.go b/vendor/golang.org/x/net/internal/nettest/error_stub.go new file mode 100644 index 0000000..3c74d81 --- /dev/null +++ b/vendor/golang.org/x/net/internal/nettest/error_stub.go @@ -0,0 +1,11 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build nacl plan9 + +package nettest + +func protocolNotSupported(err error) bool { + return false +} diff --git a/vendor/golang.org/x/net/internal/nettest/interface.go b/vendor/golang.org/x/net/internal/nettest/interface.go new file mode 100644 index 0000000..53ae13a --- /dev/null +++ b/vendor/golang.org/x/net/internal/nettest/interface.go @@ -0,0 +1,94 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package nettest + +import "net" + +// IsMulticastCapable reports whether ifi is an IP multicast-capable +// network interface. Network must be "ip", "ip4" or "ip6". +func IsMulticastCapable(network string, ifi *net.Interface) (net.IP, bool) { + switch network { + case "ip", "ip4", "ip6": + default: + return nil, false + } + if ifi == nil || ifi.Flags&net.FlagUp == 0 || ifi.Flags&net.FlagMulticast == 0 { + return nil, false + } + return hasRoutableIP(network, ifi) +} + +// RoutedInterface returns a network interface that can route IP +// traffic and satisfies flags. It returns nil when an appropriate +// network interface is not found. Network must be "ip", "ip4" or +// "ip6". +func RoutedInterface(network string, flags net.Flags) *net.Interface { + switch network { + case "ip", "ip4", "ip6": + default: + return nil + } + ift, err := net.Interfaces() + if err != nil { + return nil + } + for _, ifi := range ift { + if ifi.Flags&flags != flags { + continue + } + if _, ok := hasRoutableIP(network, &ifi); !ok { + continue + } + return &ifi + } + return nil +} + +func hasRoutableIP(network string, ifi *net.Interface) (net.IP, bool) { + ifat, err := ifi.Addrs() + if err != nil { + return nil, false + } + for _, ifa := range ifat { + switch ifa := ifa.(type) { + case *net.IPAddr: + if ip := routableIP(network, ifa.IP); ip != nil { + return ip, true + } + case *net.IPNet: + if ip := routableIP(network, ifa.IP); ip != nil { + return ip, true + } + } + } + return nil, false +} + +func routableIP(network string, ip net.IP) net.IP { + if !ip.IsLoopback() && !ip.IsLinkLocalUnicast() && !ip.IsGlobalUnicast() { + return nil + } + switch network { + case "ip4": + if ip := ip.To4(); ip != nil { + return ip + } + case "ip6": + if ip.IsLoopback() { // addressing scope of the loopback address depends on each implementation + return nil + } + if ip := ip.To16(); ip != nil && ip.To4() == nil { + return ip + } + default: + if ip := ip.To4(); ip != nil { + return ip + } + if ip := ip.To16(); ip != nil { + return ip + } + } + return nil +} diff --git a/vendor/golang.org/x/net/internal/nettest/rlimit.go b/vendor/golang.org/x/net/internal/nettest/rlimit.go new file mode 100644 index 0000000..bb34aec --- /dev/null +++ b/vendor/golang.org/x/net/internal/nettest/rlimit.go @@ -0,0 +1,11 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package nettest + +const defaultMaxOpenFiles = 256 + +// MaxOpenFiles returns the maximum number of open files for the +// caller's process. +func MaxOpenFiles() int { return maxOpenFiles() } diff --git a/vendor/golang.org/x/net/internal/nettest/rlimit_stub.go b/vendor/golang.org/x/net/internal/nettest/rlimit_stub.go new file mode 100644 index 0000000..102bef9 --- /dev/null +++ b/vendor/golang.org/x/net/internal/nettest/rlimit_stub.go @@ -0,0 +1,9 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build nacl plan9 + +package nettest + +func maxOpenFiles() int { return defaultMaxOpenFiles } diff --git a/vendor/golang.org/x/net/internal/nettest/rlimit_unix.go b/vendor/golang.org/x/net/internal/nettest/rlimit_unix.go new file mode 100644 index 0000000..eb4312c --- /dev/null +++ b/vendor/golang.org/x/net/internal/nettest/rlimit_unix.go @@ -0,0 +1,17 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package nettest + +import "syscall" + +func maxOpenFiles() int { + var rlim syscall.Rlimit + if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rlim); err != nil { + return defaultMaxOpenFiles + } + return int(rlim.Cur) +} diff --git a/vendor/golang.org/x/net/internal/nettest/rlimit_windows.go b/vendor/golang.org/x/net/internal/nettest/rlimit_windows.go new file mode 100644 index 0000000..de927b5 --- /dev/null +++ b/vendor/golang.org/x/net/internal/nettest/rlimit_windows.go @@ -0,0 +1,7 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package nettest + +func maxOpenFiles() int { return 4 * defaultMaxOpenFiles /* actually it's 16581375 */ } diff --git a/vendor/golang.org/x/net/internal/nettest/stack.go b/vendor/golang.org/x/net/internal/nettest/stack.go new file mode 100644 index 0000000..e07c015 --- /dev/null +++ b/vendor/golang.org/x/net/internal/nettest/stack.go @@ -0,0 +1,36 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package nettest provides utilities for IP testing. +package nettest // import "golang.org/x/net/internal/nettest" + +import "net" + +// SupportsIPv4 reports whether the platform supports IPv4 networking +// functionality. +func SupportsIPv4() bool { + ln, err := net.Listen("tcp4", "127.0.0.1:0") + if err != nil { + return false + } + ln.Close() + return true +} + +// SupportsIPv6 reports whether the platform supports IPv6 networking +// functionality. +func SupportsIPv6() bool { + ln, err := net.Listen("tcp6", "[::1]:0") + if err != nil { + return false + } + ln.Close() + return true +} + +// ProtocolNotSupported reports whether err is a protocol not +// supported error. +func ProtocolNotSupported(err error) bool { + return protocolNotSupported(err) +} diff --git a/vendor/golang.org/x/net/internal/nettest/stack_stub.go b/vendor/golang.org/x/net/internal/nettest/stack_stub.go new file mode 100644 index 0000000..1b5fde1 --- /dev/null +++ b/vendor/golang.org/x/net/internal/nettest/stack_stub.go @@ -0,0 +1,18 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build nacl plan9 + +package nettest + +import ( + "fmt" + "runtime" +) + +// SupportsRawIPSocket reports whether the platform supports raw IP +// sockets. +func SupportsRawIPSocket() (string, bool) { + return fmt.Sprintf("not supported on %s", runtime.GOOS), false +} diff --git a/vendor/golang.org/x/net/internal/nettest/stack_unix.go b/vendor/golang.org/x/net/internal/nettest/stack_unix.go new file mode 100644 index 0000000..af89229 --- /dev/null +++ b/vendor/golang.org/x/net/internal/nettest/stack_unix.go @@ -0,0 +1,22 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package nettest + +import ( + "fmt" + "os" + "runtime" +) + +// SupportsRawIPSocket reports whether the platform supports raw IP +// sockets. +func SupportsRawIPSocket() (string, bool) { + if os.Getuid() != 0 { + return fmt.Sprintf("must be root on %s", runtime.GOOS), false + } + return "", true +} diff --git a/vendor/golang.org/x/net/internal/nettest/stack_windows.go b/vendor/golang.org/x/net/internal/nettest/stack_windows.go new file mode 100644 index 0000000..a21f499 --- /dev/null +++ b/vendor/golang.org/x/net/internal/nettest/stack_windows.go @@ -0,0 +1,32 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package nettest + +import ( + "fmt" + "runtime" + "syscall" +) + +// SupportsRawIPSocket reports whether the platform supports raw IP +// sockets. +func SupportsRawIPSocket() (string, bool) { + // From http://msdn.microsoft.com/en-us/library/windows/desktop/ms740548.aspx: + // Note: To use a socket of type SOCK_RAW requires administrative privileges. + // Users running Winsock applications that use raw sockets must be a member of + // the Administrators group on the local computer, otherwise raw socket calls + // will fail with an error code of WSAEACCES. On Windows Vista and later, access + // for raw sockets is enforced at socket creation. In earlier versions of Windows, + // access for raw sockets is enforced during other socket operations. + s, err := syscall.Socket(syscall.AF_INET, syscall.SOCK_RAW, 0) + if err == syscall.WSAEACCES { + return fmt.Sprintf("no access to raw socket allowed on %s", runtime.GOOS), false + } + if err != nil { + return err.Error(), false + } + syscall.Closesocket(s) + return "", true +} diff --git a/vendor/golang.org/x/net/internal/timeseries/timeseries.go b/vendor/golang.org/x/net/internal/timeseries/timeseries.go new file mode 100644 index 0000000..1119f34 --- /dev/null +++ b/vendor/golang.org/x/net/internal/timeseries/timeseries.go @@ -0,0 +1,525 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package timeseries implements a time series structure for stats collection. +package timeseries // import "golang.org/x/net/internal/timeseries" + +import ( + "fmt" + "log" + "time" +) + +const ( + timeSeriesNumBuckets = 64 + minuteHourSeriesNumBuckets = 60 +) + +var timeSeriesResolutions = []time.Duration{ + 1 * time.Second, + 10 * time.Second, + 1 * time.Minute, + 10 * time.Minute, + 1 * time.Hour, + 6 * time.Hour, + 24 * time.Hour, // 1 day + 7 * 24 * time.Hour, // 1 week + 4 * 7 * 24 * time.Hour, // 4 weeks + 16 * 7 * 24 * time.Hour, // 16 weeks +} + +var minuteHourSeriesResolutions = []time.Duration{ + 1 * time.Second, + 1 * time.Minute, +} + +// An Observable is a kind of data that can be aggregated in a time series. +type Observable interface { + Multiply(ratio float64) // Multiplies the data in self by a given ratio + Add(other Observable) // Adds the data from a different observation to self + Clear() // Clears the observation so it can be reused. + CopyFrom(other Observable) // Copies the contents of a given observation to self +} + +// Float attaches the methods of Observable to a float64. +type Float float64 + +// NewFloat returns a Float. +func NewFloat() Observable { + f := Float(0) + return &f +} + +// String returns the float as a string. +func (f *Float) String() string { return fmt.Sprintf("%g", f.Value()) } + +// Value returns the float's value. +func (f *Float) Value() float64 { return float64(*f) } + +func (f *Float) Multiply(ratio float64) { *f *= Float(ratio) } + +func (f *Float) Add(other Observable) { + o := other.(*Float) + *f += *o +} + +func (f *Float) Clear() { *f = 0 } + +func (f *Float) CopyFrom(other Observable) { + o := other.(*Float) + *f = *o +} + +// A Clock tells the current time. +type Clock interface { + Time() time.Time +} + +type defaultClock int + +var defaultClockInstance defaultClock + +func (defaultClock) Time() time.Time { return time.Now() } + +// Information kept per level. Each level consists of a circular list of +// observations. The start of the level may be derived from end and the +// len(buckets) * sizeInMillis. +type tsLevel struct { + oldest int // index to oldest bucketed Observable + newest int // index to newest bucketed Observable + end time.Time // end timestamp for this level + size time.Duration // duration of the bucketed Observable + buckets []Observable // collections of observations + provider func() Observable // used for creating new Observable +} + +func (l *tsLevel) Clear() { + l.oldest = 0 + l.newest = len(l.buckets) - 1 + l.end = time.Time{} + for i := range l.buckets { + if l.buckets[i] != nil { + l.buckets[i].Clear() + l.buckets[i] = nil + } + } +} + +func (l *tsLevel) InitLevel(size time.Duration, numBuckets int, f func() Observable) { + l.size = size + l.provider = f + l.buckets = make([]Observable, numBuckets) +} + +// Keeps a sequence of levels. Each level is responsible for storing data at +// a given resolution. For example, the first level stores data at a one +// minute resolution while the second level stores data at a one hour +// resolution. + +// Each level is represented by a sequence of buckets. Each bucket spans an +// interval equal to the resolution of the level. New observations are added +// to the last bucket. +type timeSeries struct { + provider func() Observable // make more Observable + numBuckets int // number of buckets in each level + levels []*tsLevel // levels of bucketed Observable + lastAdd time.Time // time of last Observable tracked + total Observable // convenient aggregation of all Observable + clock Clock // Clock for getting current time + pending Observable // observations not yet bucketed + pendingTime time.Time // what time are we keeping in pending + dirty bool // if there are pending observations +} + +// init initializes a level according to the supplied criteria. +func (ts *timeSeries) init(resolutions []time.Duration, f func() Observable, numBuckets int, clock Clock) { + ts.provider = f + ts.numBuckets = numBuckets + ts.clock = clock + ts.levels = make([]*tsLevel, len(resolutions)) + + for i := range resolutions { + if i > 0 && resolutions[i-1] >= resolutions[i] { + log.Print("timeseries: resolutions must be monotonically increasing") + break + } + newLevel := new(tsLevel) + newLevel.InitLevel(resolutions[i], ts.numBuckets, ts.provider) + ts.levels[i] = newLevel + } + + ts.Clear() +} + +// Clear removes all observations from the time series. +func (ts *timeSeries) Clear() { + ts.lastAdd = time.Time{} + ts.total = ts.resetObservation(ts.total) + ts.pending = ts.resetObservation(ts.pending) + ts.pendingTime = time.Time{} + ts.dirty = false + + for i := range ts.levels { + ts.levels[i].Clear() + } +} + +// Add records an observation at the current time. +func (ts *timeSeries) Add(observation Observable) { + ts.AddWithTime(observation, ts.clock.Time()) +} + +// AddWithTime records an observation at the specified time. +func (ts *timeSeries) AddWithTime(observation Observable, t time.Time) { + + smallBucketDuration := ts.levels[0].size + + if t.After(ts.lastAdd) { + ts.lastAdd = t + } + + if t.After(ts.pendingTime) { + ts.advance(t) + ts.mergePendingUpdates() + ts.pendingTime = ts.levels[0].end + ts.pending.CopyFrom(observation) + ts.dirty = true + } else if t.After(ts.pendingTime.Add(-1 * smallBucketDuration)) { + // The observation is close enough to go into the pending bucket. + // This compensates for clock skewing and small scheduling delays + // by letting the update stay in the fast path. + ts.pending.Add(observation) + ts.dirty = true + } else { + ts.mergeValue(observation, t) + } +} + +// mergeValue inserts the observation at the specified time in the past into all levels. +func (ts *timeSeries) mergeValue(observation Observable, t time.Time) { + for _, level := range ts.levels { + index := (ts.numBuckets - 1) - int(level.end.Sub(t)/level.size) + if 0 <= index && index < ts.numBuckets { + bucketNumber := (level.oldest + index) % ts.numBuckets + if level.buckets[bucketNumber] == nil { + level.buckets[bucketNumber] = level.provider() + } + level.buckets[bucketNumber].Add(observation) + } + } + ts.total.Add(observation) +} + +// mergePendingUpdates applies the pending updates into all levels. +func (ts *timeSeries) mergePendingUpdates() { + if ts.dirty { + ts.mergeValue(ts.pending, ts.pendingTime) + ts.pending = ts.resetObservation(ts.pending) + ts.dirty = false + } +} + +// advance cycles the buckets at each level until the latest bucket in +// each level can hold the time specified. +func (ts *timeSeries) advance(t time.Time) { + if !t.After(ts.levels[0].end) { + return + } + for i := 0; i < len(ts.levels); i++ { + level := ts.levels[i] + if !level.end.Before(t) { + break + } + + // If the time is sufficiently far, just clear the level and advance + // directly. + if !t.Before(level.end.Add(level.size * time.Duration(ts.numBuckets))) { + for _, b := range level.buckets { + ts.resetObservation(b) + } + level.end = time.Unix(0, (t.UnixNano()/level.size.Nanoseconds())*level.size.Nanoseconds()) + } + + for t.After(level.end) { + level.end = level.end.Add(level.size) + level.newest = level.oldest + level.oldest = (level.oldest + 1) % ts.numBuckets + ts.resetObservation(level.buckets[level.newest]) + } + + t = level.end + } +} + +// Latest returns the sum of the num latest buckets from the level. +func (ts *timeSeries) Latest(level, num int) Observable { + now := ts.clock.Time() + if ts.levels[0].end.Before(now) { + ts.advance(now) + } + + ts.mergePendingUpdates() + + result := ts.provider() + l := ts.levels[level] + index := l.newest + + for i := 0; i < num; i++ { + if l.buckets[index] != nil { + result.Add(l.buckets[index]) + } + if index == 0 { + index = ts.numBuckets + } + index-- + } + + return result +} + +// LatestBuckets returns a copy of the num latest buckets from level. +func (ts *timeSeries) LatestBuckets(level, num int) []Observable { + if level < 0 || level > len(ts.levels) { + log.Print("timeseries: bad level argument: ", level) + return nil + } + if num < 0 || num >= ts.numBuckets { + log.Print("timeseries: bad num argument: ", num) + return nil + } + + results := make([]Observable, num) + now := ts.clock.Time() + if ts.levels[0].end.Before(now) { + ts.advance(now) + } + + ts.mergePendingUpdates() + + l := ts.levels[level] + index := l.newest + + for i := 0; i < num; i++ { + result := ts.provider() + results[i] = result + if l.buckets[index] != nil { + result.CopyFrom(l.buckets[index]) + } + + if index == 0 { + index = ts.numBuckets + } + index -= 1 + } + return results +} + +// ScaleBy updates observations by scaling by factor. +func (ts *timeSeries) ScaleBy(factor float64) { + for _, l := range ts.levels { + for i := 0; i < ts.numBuckets; i++ { + l.buckets[i].Multiply(factor) + } + } + + ts.total.Multiply(factor) + ts.pending.Multiply(factor) +} + +// Range returns the sum of observations added over the specified time range. +// If start or finish times don't fall on bucket boundaries of the same +// level, then return values are approximate answers. +func (ts *timeSeries) Range(start, finish time.Time) Observable { + return ts.ComputeRange(start, finish, 1)[0] +} + +// Recent returns the sum of observations from the last delta. +func (ts *timeSeries) Recent(delta time.Duration) Observable { + now := ts.clock.Time() + return ts.Range(now.Add(-delta), now) +} + +// Total returns the total of all observations. +func (ts *timeSeries) Total() Observable { + ts.mergePendingUpdates() + return ts.total +} + +// ComputeRange computes a specified number of values into a slice using +// the observations recorded over the specified time period. The return +// values are approximate if the start or finish times don't fall on the +// bucket boundaries at the same level or if the number of buckets spanning +// the range is not an integral multiple of num. +func (ts *timeSeries) ComputeRange(start, finish time.Time, num int) []Observable { + if start.After(finish) { + log.Printf("timeseries: start > finish, %v>%v", start, finish) + return nil + } + + if num < 0 { + log.Printf("timeseries: num < 0, %v", num) + return nil + } + + results := make([]Observable, num) + + for _, l := range ts.levels { + if !start.Before(l.end.Add(-l.size * time.Duration(ts.numBuckets))) { + ts.extract(l, start, finish, num, results) + return results + } + } + + // Failed to find a level that covers the desired range. So just + // extract from the last level, even if it doesn't cover the entire + // desired range. + ts.extract(ts.levels[len(ts.levels)-1], start, finish, num, results) + + return results +} + +// RecentList returns the specified number of values in slice over the most +// recent time period of the specified range. +func (ts *timeSeries) RecentList(delta time.Duration, num int) []Observable { + if delta < 0 { + return nil + } + now := ts.clock.Time() + return ts.ComputeRange(now.Add(-delta), now, num) +} + +// extract returns a slice of specified number of observations from a given +// level over a given range. +func (ts *timeSeries) extract(l *tsLevel, start, finish time.Time, num int, results []Observable) { + ts.mergePendingUpdates() + + srcInterval := l.size + dstInterval := finish.Sub(start) / time.Duration(num) + dstStart := start + srcStart := l.end.Add(-srcInterval * time.Duration(ts.numBuckets)) + + srcIndex := 0 + + // Where should scanning start? + if dstStart.After(srcStart) { + advance := dstStart.Sub(srcStart) / srcInterval + srcIndex += int(advance) + srcStart = srcStart.Add(advance * srcInterval) + } + + // The i'th value is computed as show below. + // interval = (finish/start)/num + // i'th value = sum of observation in range + // [ start + i * interval, + // start + (i + 1) * interval ) + for i := 0; i < num; i++ { + results[i] = ts.resetObservation(results[i]) + dstEnd := dstStart.Add(dstInterval) + for srcIndex < ts.numBuckets && srcStart.Before(dstEnd) { + srcEnd := srcStart.Add(srcInterval) + if srcEnd.After(ts.lastAdd) { + srcEnd = ts.lastAdd + } + + if !srcEnd.Before(dstStart) { + srcValue := l.buckets[(srcIndex+l.oldest)%ts.numBuckets] + if !srcStart.Before(dstStart) && !srcEnd.After(dstEnd) { + // dst completely contains src. + if srcValue != nil { + results[i].Add(srcValue) + } + } else { + // dst partially overlaps src. + overlapStart := maxTime(srcStart, dstStart) + overlapEnd := minTime(srcEnd, dstEnd) + base := srcEnd.Sub(srcStart) + fraction := overlapEnd.Sub(overlapStart).Seconds() / base.Seconds() + + used := ts.provider() + if srcValue != nil { + used.CopyFrom(srcValue) + } + used.Multiply(fraction) + results[i].Add(used) + } + + if srcEnd.After(dstEnd) { + break + } + } + srcIndex++ + srcStart = srcStart.Add(srcInterval) + } + dstStart = dstStart.Add(dstInterval) + } +} + +// resetObservation clears the content so the struct may be reused. +func (ts *timeSeries) resetObservation(observation Observable) Observable { + if observation == nil { + observation = ts.provider() + } else { + observation.Clear() + } + return observation +} + +// TimeSeries tracks data at granularities from 1 second to 16 weeks. +type TimeSeries struct { + timeSeries +} + +// NewTimeSeries creates a new TimeSeries using the function provided for creating new Observable. +func NewTimeSeries(f func() Observable) *TimeSeries { + return NewTimeSeriesWithClock(f, defaultClockInstance) +} + +// NewTimeSeriesWithClock creates a new TimeSeries using the function provided for creating new Observable and the clock for +// assigning timestamps. +func NewTimeSeriesWithClock(f func() Observable, clock Clock) *TimeSeries { + ts := new(TimeSeries) + ts.timeSeries.init(timeSeriesResolutions, f, timeSeriesNumBuckets, clock) + return ts +} + +// MinuteHourSeries tracks data at granularities of 1 minute and 1 hour. +type MinuteHourSeries struct { + timeSeries +} + +// NewMinuteHourSeries creates a new MinuteHourSeries using the function provided for creating new Observable. +func NewMinuteHourSeries(f func() Observable) *MinuteHourSeries { + return NewMinuteHourSeriesWithClock(f, defaultClockInstance) +} + +// NewMinuteHourSeriesWithClock creates a new MinuteHourSeries using the function provided for creating new Observable and the clock for +// assigning timestamps. +func NewMinuteHourSeriesWithClock(f func() Observable, clock Clock) *MinuteHourSeries { + ts := new(MinuteHourSeries) + ts.timeSeries.init(minuteHourSeriesResolutions, f, + minuteHourSeriesNumBuckets, clock) + return ts +} + +func (ts *MinuteHourSeries) Minute() Observable { + return ts.timeSeries.Latest(0, 60) +} + +func (ts *MinuteHourSeries) Hour() Observable { + return ts.timeSeries.Latest(1, 60) +} + +func minTime(a, b time.Time) time.Time { + if a.Before(b) { + return a + } + return b +} + +func maxTime(a, b time.Time) time.Time { + if a.After(b) { + return a + } + return b +} diff --git a/vendor/golang.org/x/net/internal/timeseries/timeseries_test.go b/vendor/golang.org/x/net/internal/timeseries/timeseries_test.go new file mode 100644 index 0000000..66325a9 --- /dev/null +++ b/vendor/golang.org/x/net/internal/timeseries/timeseries_test.go @@ -0,0 +1,170 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package timeseries + +import ( + "math" + "testing" + "time" +) + +func isNear(x *Float, y float64, tolerance float64) bool { + return math.Abs(x.Value()-y) < tolerance +} + +func isApproximate(x *Float, y float64) bool { + return isNear(x, y, 1e-2) +} + +func checkApproximate(t *testing.T, o Observable, y float64) { + x := o.(*Float) + if !isApproximate(x, y) { + t.Errorf("Wanted %g, got %g", y, x.Value()) + } +} + +func checkNear(t *testing.T, o Observable, y, tolerance float64) { + x := o.(*Float) + if !isNear(x, y, tolerance) { + t.Errorf("Wanted %g +- %g, got %g", y, tolerance, x.Value()) + } +} + +var baseTime = time.Date(2013, 1, 1, 0, 0, 0, 0, time.UTC) + +func tu(s int64) time.Time { + return baseTime.Add(time.Duration(s) * time.Second) +} + +func tu2(s int64, ns int64) time.Time { + return baseTime.Add(time.Duration(s)*time.Second + time.Duration(ns)*time.Nanosecond) +} + +func TestBasicTimeSeries(t *testing.T) { + ts := NewTimeSeries(NewFloat) + fo := new(Float) + *fo = Float(10) + ts.AddWithTime(fo, tu(1)) + ts.AddWithTime(fo, tu(1)) + ts.AddWithTime(fo, tu(1)) + ts.AddWithTime(fo, tu(1)) + checkApproximate(t, ts.Range(tu(0), tu(1)), 40) + checkApproximate(t, ts.Total(), 40) + ts.AddWithTime(fo, tu(3)) + ts.AddWithTime(fo, tu(3)) + ts.AddWithTime(fo, tu(3)) + checkApproximate(t, ts.Range(tu(0), tu(2)), 40) + checkApproximate(t, ts.Range(tu(2), tu(4)), 30) + checkApproximate(t, ts.Total(), 70) + ts.AddWithTime(fo, tu(1)) + ts.AddWithTime(fo, tu(1)) + checkApproximate(t, ts.Range(tu(0), tu(2)), 60) + checkApproximate(t, ts.Range(tu(2), tu(4)), 30) + checkApproximate(t, ts.Total(), 90) + *fo = Float(100) + ts.AddWithTime(fo, tu(100)) + checkApproximate(t, ts.Range(tu(99), tu(100)), 100) + checkApproximate(t, ts.Range(tu(0), tu(4)), 36) + checkApproximate(t, ts.Total(), 190) + *fo = Float(10) + ts.AddWithTime(fo, tu(1)) + ts.AddWithTime(fo, tu(1)) + checkApproximate(t, ts.Range(tu(0), tu(4)), 44) + checkApproximate(t, ts.Range(tu(37), tu2(100, 100e6)), 100) + checkApproximate(t, ts.Range(tu(50), tu2(100, 100e6)), 100) + checkApproximate(t, ts.Range(tu(99), tu2(100, 100e6)), 100) + checkApproximate(t, ts.Total(), 210) + + for i, l := range ts.ComputeRange(tu(36), tu(100), 64) { + if i == 63 { + checkApproximate(t, l, 100) + } else { + checkApproximate(t, l, 0) + } + } + + checkApproximate(t, ts.Range(tu(0), tu(100)), 210) + checkApproximate(t, ts.Range(tu(10), tu(100)), 100) + + for i, l := range ts.ComputeRange(tu(0), tu(100), 100) { + if i < 10 { + checkApproximate(t, l, 11) + } else if i >= 90 { + checkApproximate(t, l, 10) + } else { + checkApproximate(t, l, 0) + } + } +} + +func TestFloat(t *testing.T) { + f := Float(1) + if g, w := f.String(), "1"; g != w { + t.Errorf("Float(1).String = %q; want %q", g, w) + } + f2 := Float(2) + var o Observable = &f2 + f.Add(o) + if g, w := f.Value(), 3.0; g != w { + t.Errorf("Float post-add = %v; want %v", g, w) + } + f.Multiply(2) + if g, w := f.Value(), 6.0; g != w { + t.Errorf("Float post-multiply = %v; want %v", g, w) + } + f.Clear() + if g, w := f.Value(), 0.0; g != w { + t.Errorf("Float post-clear = %v; want %v", g, w) + } + f.CopyFrom(&f2) + if g, w := f.Value(), 2.0; g != w { + t.Errorf("Float post-CopyFrom = %v; want %v", g, w) + } +} + +type mockClock struct { + time time.Time +} + +func (m *mockClock) Time() time.Time { return m.time } +func (m *mockClock) Set(t time.Time) { m.time = t } + +const buckets = 6 + +var testResolutions = []time.Duration{ + 10 * time.Second, // level holds one minute of observations + 100 * time.Second, // level holds ten minutes of observations + 10 * time.Minute, // level holds one hour of observations +} + +// TestTimeSeries uses a small number of buckets to force a higher +// error rate on approximations from the timeseries. +type TestTimeSeries struct { + timeSeries +} + +func TestExpectedErrorRate(t *testing.T) { + ts := new(TestTimeSeries) + fake := new(mockClock) + fake.Set(time.Now()) + ts.timeSeries.init(testResolutions, NewFloat, buckets, fake) + for i := 1; i <= 61*61; i++ { + fake.Set(fake.Time().Add(1 * time.Second)) + ob := Float(1) + ts.AddWithTime(&ob, fake.Time()) + + // The results should be accurate within one missing bucket (1/6) of the observations recorded. + checkNear(t, ts.Latest(0, buckets), min(float64(i), 60), 10) + checkNear(t, ts.Latest(1, buckets), min(float64(i), 600), 100) + checkNear(t, ts.Latest(2, buckets), min(float64(i), 3600), 600) + } +} + +func min(a, b float64) float64 { + if a < b { + return a + } + return b +} diff --git a/vendor/golang.org/x/net/ipv4/control_bsd.go b/vendor/golang.org/x/net/ipv4/control_bsd.go index 75060d1..33d8bc8 100644 --- a/vendor/golang.org/x/net/ipv4/control_bsd.go +++ b/vendor/golang.org/x/net/ipv4/control_bsd.go @@ -11,7 +11,7 @@ import ( "syscall" "unsafe" - "github.com/vtolstov/svirtnet/internal/iana" + "golang.org/x/net/internal/iana" ) func marshalDst(b []byte, cm *ControlMessage) []byte { diff --git a/vendor/golang.org/x/net/ipv4/control_pktinfo.go b/vendor/golang.org/x/net/ipv4/control_pktinfo.go index 2414b69..444782f 100644 --- a/vendor/golang.org/x/net/ipv4/control_pktinfo.go +++ b/vendor/golang.org/x/net/ipv4/control_pktinfo.go @@ -10,7 +10,7 @@ import ( "syscall" "unsafe" - "github.com/vtolstov/svirtnet/internal/iana" + "golang.org/x/net/internal/iana" ) func marshalPacketInfo(b []byte, cm *ControlMessage) []byte { diff --git a/vendor/golang.org/x/net/ipv4/control_unix.go b/vendor/golang.org/x/net/ipv4/control_unix.go index ce616be..3000c52 100644 --- a/vendor/golang.org/x/net/ipv4/control_unix.go +++ b/vendor/golang.org/x/net/ipv4/control_unix.go @@ -11,7 +11,7 @@ import ( "syscall" "unsafe" - "github.com/vtolstov/svirtnet/internal/iana" + "golang.org/x/net/internal/iana" ) func setControlMessage(fd int, opt *rawOpt, cf ControlFlags, on bool) error { diff --git a/vendor/golang.org/x/net/ipv4/doc.go b/vendor/golang.org/x/net/ipv4/doc.go index 64aeef0..9a79bad 100644 --- a/vendor/golang.org/x/net/ipv4/doc.go +++ b/vendor/golang.org/x/net/ipv4/doc.go @@ -42,7 +42,7 @@ // The outgoing packets will be labeled DiffServ assured forwarding // class 1 low drop precedence, known as AF11 packets. // -// if err := ipv4.NewConn(c).SetTOS(DiffServAF11); err != nil { +// if err := ipv4.NewConn(c).SetTOS(0x28); err != nil { // // error handling // } // if _, err := c.Write(data); err != nil { @@ -114,7 +114,7 @@ // // error handling // } // if cm.Dst.IsMulticast() { -// if cm.Dst.Equal(group) +// if cm.Dst.Equal(group) { // // joined group, do something // } else { // // unknown group, discard @@ -124,7 +124,7 @@ // // The application can also send both unicast and multicast packets. // -// p.SetTOS(DiffServCS0) +// p.SetTOS(0x0) // p.SetTTL(16) // if _, err := p.WriteTo(data, nil, src); err != nil { // // error handling @@ -239,4 +239,4 @@ // IGMPv1 or IGMPv2 and starts to listen to multicast traffic. // In the fallback case, ExcludeSourceSpecificGroup and // IncludeSourceSpecificGroup may return an error. -package ipv4 +package ipv4 // import "golang.org/x/net/ipv4" diff --git a/vendor/golang.org/x/net/ipv4/example_test.go b/vendor/golang.org/x/net/ipv4/example_test.go index 8293b82..2fdc6c6 100644 --- a/vendor/golang.org/x/net/ipv4/example_test.go +++ b/vendor/golang.org/x/net/ipv4/example_test.go @@ -12,9 +12,8 @@ import ( "runtime" "time" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/icmp" - "github.com/vtolstov/svirtnet/internal/iana" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv4" + "golang.org/x/net/icmp" + "golang.org/x/net/ipv4" ) func ExampleConn_markingTCP() { @@ -32,7 +31,7 @@ func ExampleConn_markingTCP() { go func(c net.Conn) { defer c.Close() p := ipv4.NewConn(c) - if err := p.SetTOS(iana.DiffServAF11); err != nil { + if err := p.SetTOS(0x28); err != nil { // DSCP AF11 log.Fatal(err) } if err := p.SetTTL(128); err != nil { @@ -102,7 +101,7 @@ func ExamplePacketConn_tracingIPPacketRoute() { log.Fatal("no A record found") } - c, err := net.ListenPacket(fmt.Sprintf("ip4:%d", iana.ProtocolICMP), "0.0.0.0") // ICMP for IPv4 + c, err := net.ListenPacket("ip4:1", "0.0.0.0") // ICMP for IPv4 if err != nil { log.Fatal(err) } @@ -149,7 +148,7 @@ func ExamplePacketConn_tracingIPPacketRoute() { } log.Fatal(err) } - rm, err := icmp.ParseMessage(iana.ProtocolICMP, rb[:n]) + rm, err := icmp.ParseMessage(1, rb[:n]) if err != nil { log.Fatal(err) } @@ -173,7 +172,7 @@ func ExamplePacketConn_tracingIPPacketRoute() { } func ExampleRawConn_advertisingOSPFHello() { - c, err := net.ListenPacket(fmt.Sprintf("ip4:%d", iana.ProtocolOSPFIGP), "0.0.0.0") // OSPF for IPv4 + c, err := net.ListenPacket("ip4:89", "0.0.0.0") // OSPF for IPv4 if err != nil { log.Fatal(err) } @@ -201,10 +200,10 @@ func ExampleRawConn_advertisingOSPFHello() { iph := &ipv4.Header{ Version: ipv4.Version, Len: ipv4.HeaderLen, - TOS: iana.DiffServCS6, + TOS: 0xc0, // DSCP CS6 TotalLen: ipv4.HeaderLen + len(ospf), TTL: 1, - Protocol: iana.ProtocolOSPFIGP, + Protocol: 89, Dst: allSPFRouters.IP.To4(), } diff --git a/vendor/golang.org/x/net/ipv4/gen.go b/vendor/golang.org/x/net/ipv4/gen.go index 09dcd03..8cef7b3 100644 --- a/vendor/golang.org/x/net/ipv4/gen.go +++ b/vendor/golang.org/x/net/ipv4/gen.go @@ -52,12 +52,14 @@ func genzsys() error { if err != nil { return err } - switch runtime.GOOS { - case "dragonfly", "solaris": - // The ipv4 pacakge still supports go1.2, and so we - // need to take care of additional platforms in go1.3 - // and above for working with go1.2. + // The ipv4 pacakge still supports go1.2, and so we need to + // take care of additional platforms in go1.3 and above for + // working with go1.2. + switch { + case runtime.GOOS == "dragonfly" || runtime.GOOS == "solaris": b = bytes.Replace(b, []byte("package ipv4\n"), []byte("// +build "+runtime.GOOS+"\n\npackage ipv4\n"), 1) + case runtime.GOOS == "linux" && (runtime.GOARCH == "arm64" || runtime.GOARCH == "ppc64" || runtime.GOARCH == "ppc64le"): + b = bytes.Replace(b, []byte("package ipv4\n"), []byte("// +build "+runtime.GOOS+","+runtime.GOARCH+"\n\npackage ipv4\n"), 1) } b, err = format.Source(b) if err != nil { diff --git a/vendor/golang.org/x/net/ipv4/icmp.go b/vendor/golang.org/x/net/ipv4/icmp.go index 95f5b23..dbd05cf 100644 --- a/vendor/golang.org/x/net/ipv4/icmp.go +++ b/vendor/golang.org/x/net/ipv4/icmp.go @@ -4,7 +4,7 @@ package ipv4 -import "github.com/vtolstov/svirtnet/internal/iana" +import "golang.org/x/net/internal/iana" // An ICMPType represents a type of ICMP message. type ICMPType int diff --git a/vendor/golang.org/x/net/ipv4/icmp_test.go b/vendor/golang.org/x/net/ipv4/icmp_test.go index e8acbd7..3324b54 100644 --- a/vendor/golang.org/x/net/ipv4/icmp_test.go +++ b/vendor/golang.org/x/net/ipv4/icmp_test.go @@ -6,12 +6,12 @@ package ipv4_test import ( "net" - "os" "reflect" "runtime" "testing" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv4" + "golang.org/x/net/internal/nettest" + "golang.org/x/net/ipv4" ) var icmpStringTests = []struct { @@ -36,7 +36,7 @@ func TestICMPFilter(t *testing.T) { switch runtime.GOOS { case "linux": default: - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } var f ipv4.ICMPFilter @@ -64,10 +64,10 @@ func TestSetICMPFilter(t *testing.T) { switch runtime.GOOS { case "linux": default: - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } - if os.Getuid() != 0 { - t.Skip("must be root") + if m, ok := nettest.SupportsRawIPSocket(); !ok { + t.Skip(m) } c, err := net.ListenPacket("ip4:icmp", "127.0.0.1") diff --git a/vendor/golang.org/x/net/ipv4/multicast_test.go b/vendor/golang.org/x/net/ipv4/multicast_test.go index 4883031..3f03048 100644 --- a/vendor/golang.org/x/net/ipv4/multicast_test.go +++ b/vendor/golang.org/x/net/ipv4/multicast_test.go @@ -12,10 +12,10 @@ import ( "testing" "time" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/icmp" - "github.com/vtolstov/svirtnet/internal/iana" - "github.com/vtolstov/svirtnet/internal/nettest" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv4" + "golang.org/x/net/icmp" + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/nettest" + "golang.org/x/net/ipv4" ) var packetConnReadWriteMulticastUDPTests = []struct { @@ -30,11 +30,11 @@ var packetConnReadWriteMulticastUDPTests = []struct { func TestPacketConnReadWriteMulticastUDP(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagMulticast|net.FlagLoopback) if ifi == nil { - t.Skipf("not available on %q", runtime.GOOS) + t.Skipf("not available on %s", runtime.GOOS) } for _, tt := range packetConnReadWriteMulticastUDPTests { @@ -58,7 +58,7 @@ func TestPacketConnReadWriteMulticastUDP(t *testing.T) { switch runtime.GOOS { case "freebsd", "linux": default: // platforms that don't support IGMPv2/3 fail here - t.Logf("not supported on %q", runtime.GOOS) + t.Logf("not supported on %s", runtime.GOOS) continue } t.Fatal(err) @@ -83,7 +83,7 @@ func TestPacketConnReadWriteMulticastUDP(t *testing.T) { for i, toggle := range []bool{true, false, true} { if err := p.SetControlMessage(cf, toggle); err != nil { if nettest.ProtocolNotSupported(err) { - t.Logf("not supported on %q", runtime.GOOS) + t.Logf("not supported on %s", runtime.GOOS) continue } t.Fatal(err) @@ -120,14 +120,14 @@ var packetConnReadWriteMulticastICMPTests = []struct { func TestPacketConnReadWriteMulticastICMP(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } - if os.Getuid() != 0 { - t.Skip("must be root") + if m, ok := nettest.SupportsRawIPSocket(); !ok { + t.Skip(m) } ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagMulticast|net.FlagLoopback) if ifi == nil { - t.Skipf("not available on %q", runtime.GOOS) + t.Skipf("not available on %s", runtime.GOOS) } for _, tt := range packetConnReadWriteMulticastICMPTests { @@ -149,7 +149,7 @@ func TestPacketConnReadWriteMulticastICMP(t *testing.T) { switch runtime.GOOS { case "freebsd", "linux": default: // platforms that don't support IGMPv2/3 fail here - t.Logf("not supported on %q", runtime.GOOS) + t.Logf("not supported on %s", runtime.GOOS) continue } t.Fatal(err) @@ -183,7 +183,7 @@ func TestPacketConnReadWriteMulticastICMP(t *testing.T) { } if err := p.SetControlMessage(cf, toggle); err != nil { if nettest.ProtocolNotSupported(err) { - t.Logf("not supported on %q", runtime.GOOS) + t.Logf("not supported on %s", runtime.GOOS) continue } t.Fatal(err) @@ -229,12 +229,12 @@ func TestRawConnReadWriteMulticastICMP(t *testing.T) { if testing.Short() { t.Skip("to avoid external network") } - if os.Getuid() != 0 { - t.Skip("must be root") + if m, ok := nettest.SupportsRawIPSocket(); !ok { + t.Skip(m) } ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagMulticast|net.FlagLoopback) if ifi == nil { - t.Skipf("not available on %q", runtime.GOOS) + t.Skipf("not available on %s", runtime.GOOS) } for _, tt := range rawConnReadWriteMulticastICMPTests { @@ -259,7 +259,7 @@ func TestRawConnReadWriteMulticastICMP(t *testing.T) { switch runtime.GOOS { case "freebsd", "linux": default: // platforms that don't support IGMPv2/3 fail here - t.Logf("not supported on %q", runtime.GOOS) + t.Logf("not supported on %s", runtime.GOOS) continue } t.Fatal(err) @@ -301,7 +301,7 @@ func TestRawConnReadWriteMulticastICMP(t *testing.T) { } if err := r.SetControlMessage(cf, toggle); err != nil { if nettest.ProtocolNotSupported(err) { - t.Logf("not supported on %q", runtime.GOOS) + t.Logf("not supported on %s", runtime.GOOS) continue } t.Fatal(err) diff --git a/vendor/golang.org/x/net/ipv4/multicastlistener_test.go b/vendor/golang.org/x/net/ipv4/multicastlistener_test.go index 056e548..e342bf1 100644 --- a/vendor/golang.org/x/net/ipv4/multicastlistener_test.go +++ b/vendor/golang.org/x/net/ipv4/multicastlistener_test.go @@ -6,12 +6,11 @@ package ipv4_test import ( "net" - "os" "runtime" "testing" - "github.com/vtolstov/svirtnet/internal/nettest" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv4" + "golang.org/x/net/internal/nettest" + "golang.org/x/net/ipv4" ) var udpMultipleGroupListenerTests = []net.Addr{ @@ -23,7 +22,7 @@ var udpMultipleGroupListenerTests = []net.Addr{ func TestUDPSinglePacketConnWithMultipleGroupListeners(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } if testing.Short() { t.Skip("to avoid external network") @@ -63,7 +62,7 @@ func TestUDPSinglePacketConnWithMultipleGroupListeners(t *testing.T) { func TestUDPMultiplePacketConnWithMultipleGroupListeners(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } if testing.Short() { t.Skip("to avoid external network") @@ -115,7 +114,7 @@ func TestUDPMultiplePacketConnWithMultipleGroupListeners(t *testing.T) { func TestUDPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } if testing.Short() { t.Skip("to avoid external network") @@ -158,13 +157,13 @@ func TestUDPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) { func TestIPSingleRawConnWithSingleGroupListener(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } if testing.Short() { t.Skip("to avoid external network") } - if os.Getuid() != 0 { - t.Skip("must be root") + if m, ok := nettest.SupportsRawIPSocket(); !ok { + t.Skip(m) } c, err := net.ListenPacket("ip4:icmp", "0.0.0.0") // wildcard address @@ -203,13 +202,13 @@ func TestIPSingleRawConnWithSingleGroupListener(t *testing.T) { func TestIPPerInterfaceSingleRawConnWithSingleGroupListener(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } if testing.Short() { t.Skip("to avoid external network") } - if os.Getuid() != 0 { - t.Skip("must be root") + if m, ok := nettest.SupportsRawIPSocket(); !ok { + t.Skip(m) } gaddr := net.IPAddr{IP: net.IPv4(224, 0, 0, 254)} // see RFC 4727 diff --git a/vendor/golang.org/x/net/ipv4/multicastsockopt_test.go b/vendor/golang.org/x/net/ipv4/multicastsockopt_test.go index d4b048f..c76dbe4 100644 --- a/vendor/golang.org/x/net/ipv4/multicastsockopt_test.go +++ b/vendor/golang.org/x/net/ipv4/multicastsockopt_test.go @@ -6,12 +6,11 @@ package ipv4_test import ( "net" - "os" "runtime" "testing" - "github.com/vtolstov/svirtnet/internal/nettest" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv4" + "golang.org/x/net/internal/nettest" + "golang.org/x/net/ipv4" ) var packetConnMulticastSocketOptionTests = []struct { @@ -28,16 +27,17 @@ var packetConnMulticastSocketOptionTests = []struct { func TestPacketConnMulticastSocketOptions(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagMulticast|net.FlagLoopback) if ifi == nil { - t.Skipf("not available on %q", runtime.GOOS) + t.Skipf("not available on %s", runtime.GOOS) } + m, ok := nettest.SupportsRawIPSocket() for _, tt := range packetConnMulticastSocketOptionTests { - if tt.net == "ip4" && os.Getuid() != 0 { - t.Log("must be root") + if tt.net == "ip4" && !ok { + t.Log(m) continue } c, err := net.ListenPacket(tt.net+tt.proto, tt.addr) @@ -67,14 +67,14 @@ var rawConnMulticastSocketOptionTests = []struct { func TestRawConnMulticastSocketOptions(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } - if os.Getuid() != 0 { - t.Skip("must be root") + if m, ok := nettest.SupportsRawIPSocket(); !ok { + t.Skip(m) } ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagMulticast|net.FlagLoopback) if ifi == nil { - t.Skipf("not available on %q", runtime.GOOS) + t.Skipf("not available on %s", runtime.GOOS) } for _, tt := range rawConnMulticastSocketOptionTests { @@ -158,7 +158,7 @@ func testSourceSpecificMulticastSocketOptions(t *testing.T, c testIPv4MulticastC switch runtime.GOOS { case "freebsd", "linux": default: // platforms that don't support IGMPv2/3 fail here - t.Logf("not supported on %q", runtime.GOOS) + t.Logf("not supported on %s", runtime.GOOS) return } t.Error(err) diff --git a/vendor/golang.org/x/net/ipv4/readwrite_test.go b/vendor/golang.org/x/net/ipv4/readwrite_test.go index e9c9e41..5e6533e 100644 --- a/vendor/golang.org/x/net/ipv4/readwrite_test.go +++ b/vendor/golang.org/x/net/ipv4/readwrite_test.go @@ -11,8 +11,8 @@ import ( "sync" "testing" - "github.com/vtolstov/svirtnet/internal/nettest" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv4" + "golang.org/x/net/internal/nettest" + "golang.org/x/net/ipv4" ) func benchmarkUDPListener() (net.PacketConn, net.Addr, error) { @@ -91,7 +91,7 @@ func benchmarkReadWriteIPv4UDP(b *testing.B, p *ipv4.PacketConn, wb, rb []byte, func TestPacketConnConcurrentReadWriteUnicastUDP(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } c, err := net.ListenPacket("udp4", "127.0.0.1:0") @@ -113,7 +113,7 @@ func TestPacketConnConcurrentReadWriteUnicastUDP(t *testing.T) { if err := p.SetControlMessage(cf, true); err != nil { // probe before test if nettest.ProtocolNotSupported(err) { - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } t.Fatal(err) } diff --git a/vendor/golang.org/x/net/ipv4/sockopt_asmreq_unix.go b/vendor/golang.org/x/net/ipv4/sockopt_asmreq_unix.go index e7f6f33..fefa901 100644 --- a/vendor/golang.org/x/net/ipv4/sockopt_asmreq_unix.go +++ b/vendor/golang.org/x/net/ipv4/sockopt_asmreq_unix.go @@ -11,7 +11,7 @@ import ( "os" "unsafe" - "github.com/vtolstov/svirtnet/internal/iana" + "golang.org/x/net/internal/iana" ) func setsockoptIPMreq(fd, name int, ifi *net.Interface, grp net.IP) error { diff --git a/vendor/golang.org/x/net/ipv4/sockopt_asmreq_windows.go b/vendor/golang.org/x/net/ipv4/sockopt_asmreq_windows.go index dec2ce6..431930d 100644 --- a/vendor/golang.org/x/net/ipv4/sockopt_asmreq_windows.go +++ b/vendor/golang.org/x/net/ipv4/sockopt_asmreq_windows.go @@ -10,7 +10,7 @@ import ( "syscall" "unsafe" - "github.com/vtolstov/svirtnet/internal/iana" + "golang.org/x/net/internal/iana" ) func setsockoptIPMreq(fd syscall.Handle, name int, ifi *net.Interface, grp net.IP) error { diff --git a/vendor/golang.org/x/net/ipv4/sockopt_asmreqn_unix.go b/vendor/golang.org/x/net/ipv4/sockopt_asmreqn_unix.go index 8a3e745..92c8e34 100644 --- a/vendor/golang.org/x/net/ipv4/sockopt_asmreqn_unix.go +++ b/vendor/golang.org/x/net/ipv4/sockopt_asmreqn_unix.go @@ -11,7 +11,7 @@ import ( "os" "unsafe" - "github.com/vtolstov/svirtnet/internal/iana" + "golang.org/x/net/internal/iana" ) func getsockoptIPMreqn(fd, name int) (*net.Interface, error) { diff --git a/vendor/golang.org/x/net/ipv4/sockopt_ssmreq_unix.go b/vendor/golang.org/x/net/ipv4/sockopt_ssmreq_unix.go index a70ebe5..6f647bc 100644 --- a/vendor/golang.org/x/net/ipv4/sockopt_ssmreq_unix.go +++ b/vendor/golang.org/x/net/ipv4/sockopt_ssmreq_unix.go @@ -11,16 +11,31 @@ import ( "os" "unsafe" - "github.com/vtolstov/svirtnet/internal/iana" + "golang.org/x/net/internal/iana" ) +var freebsd32o64 bool + func setsockoptGroupReq(fd, name int, ifi *net.Interface, grp net.IP) error { var gr sysGroupReq if ifi != nil { gr.Interface = uint32(ifi.Index) } gr.setGroup(grp) - return os.NewSyscallError("setsockopt", setsockopt(fd, iana.ProtocolIP, name, unsafe.Pointer(&gr), sysSizeofGroupReq)) + var p unsafe.Pointer + var l sysSockoptLen + if freebsd32o64 { + var d [sysSizeofGroupReq + 4]byte + s := (*[sysSizeofGroupReq]byte)(unsafe.Pointer(&gr)) + copy(d[:4], s[:4]) + copy(d[8:], s[4:]) + p = unsafe.Pointer(&d[0]) + l = sysSizeofGroupReq + 4 + } else { + p = unsafe.Pointer(&gr) + l = sysSizeofGroupReq + } + return os.NewSyscallError("setsockopt", setsockopt(fd, iana.ProtocolIP, name, p, l)) } func setsockoptGroupSourceReq(fd, name int, ifi *net.Interface, grp, src net.IP) error { @@ -29,5 +44,18 @@ func setsockoptGroupSourceReq(fd, name int, ifi *net.Interface, grp, src net.IP) gsr.Interface = uint32(ifi.Index) } gsr.setSourceGroup(grp, src) - return os.NewSyscallError("setsockopt", setsockopt(fd, iana.ProtocolIP, name, unsafe.Pointer(&gsr), sysSizeofGroupSourceReq)) + var p unsafe.Pointer + var l sysSockoptLen + if freebsd32o64 { + var d [sysSizeofGroupSourceReq + 4]byte + s := (*[sysSizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr)) + copy(d[:4], s[:4]) + copy(d[8:], s[4:]) + p = unsafe.Pointer(&d[0]) + l = sysSizeofGroupSourceReq + 4 + } else { + p = unsafe.Pointer(&gsr) + l = sysSizeofGroupSourceReq + } + return os.NewSyscallError("setsockopt", setsockopt(fd, iana.ProtocolIP, name, p, l)) } diff --git a/vendor/golang.org/x/net/ipv4/sockopt_unix.go b/vendor/golang.org/x/net/ipv4/sockopt_unix.go index eb22822..50cdbd8 100644 --- a/vendor/golang.org/x/net/ipv4/sockopt_unix.go +++ b/vendor/golang.org/x/net/ipv4/sockopt_unix.go @@ -11,7 +11,7 @@ import ( "os" "unsafe" - "github.com/vtolstov/svirtnet/internal/iana" + "golang.org/x/net/internal/iana" ) func getInt(fd int, opt *sockOpt) (int, error) { diff --git a/vendor/golang.org/x/net/ipv4/sockopt_windows.go b/vendor/golang.org/x/net/ipv4/sockopt_windows.go index d56b8c1..c4c2441 100644 --- a/vendor/golang.org/x/net/ipv4/sockopt_windows.go +++ b/vendor/golang.org/x/net/ipv4/sockopt_windows.go @@ -10,7 +10,7 @@ import ( "syscall" "unsafe" - "github.com/vtolstov/svirtnet/internal/iana" + "golang.org/x/net/internal/iana" ) func getInt(fd syscall.Handle, opt *sockOpt) (int, error) { diff --git a/vendor/golang.org/x/net/ipv4/sys_freebsd.go b/vendor/golang.org/x/net/ipv4/sys_freebsd.go index 7df658c..09ef491 100644 --- a/vendor/golang.org/x/net/ipv4/sys_freebsd.go +++ b/vendor/golang.org/x/net/ipv4/sys_freebsd.go @@ -6,6 +6,8 @@ package ipv4 import ( "net" + "runtime" + "strings" "syscall" "unsafe" ) @@ -43,6 +45,15 @@ func init() { if freebsdVersion >= 1000000 { sockOpts[ssoMulticastInterface].typ = ssoTypeIPMreqn } + if runtime.GOOS == "freebsd" && runtime.GOARCH == "386" { + archs, _ := syscall.Sysctl("kern.supported_archs") + for _, s := range strings.Fields(archs) { + if s == "amd64" { + freebsd32o64 = true + break + } + } + } } func (gr *sysGroupReq) setGroup(grp net.IP) { diff --git a/vendor/golang.org/x/net/ipv4/syscall_unix.go b/vendor/golang.org/x/net/ipv4/syscall_unix.go index 29e8f16..5fe8e83 100644 --- a/vendor/golang.org/x/net/ipv4/syscall_unix.go +++ b/vendor/golang.org/x/net/ipv4/syscall_unix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build darwin dragonfly freebsd linux,amd64 linux,arm netbsd openbsd +// +build darwin dragonfly freebsd linux,!386 netbsd openbsd package ipv4 diff --git a/vendor/golang.org/x/net/ipv4/unicast_test.go b/vendor/golang.org/x/net/ipv4/unicast_test.go index ed7e901..255096a 100644 --- a/vendor/golang.org/x/net/ipv4/unicast_test.go +++ b/vendor/golang.org/x/net/ipv4/unicast_test.go @@ -12,20 +12,20 @@ import ( "testing" "time" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/icmp" - "github.com/vtolstov/svirtnet/internal/iana" - "github.com/vtolstov/svirtnet/internal/nettest" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv4" + "golang.org/x/net/icmp" + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/nettest" + "golang.org/x/net/ipv4" ) func TestPacketConnReadWriteUnicastUDP(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback) if ifi == nil { - t.Skipf("not available on %q", runtime.GOOS) + t.Skipf("not available on %s", runtime.GOOS) } c, err := net.ListenPacket("udp4", "127.0.0.1:0") @@ -46,7 +46,7 @@ func TestPacketConnReadWriteUnicastUDP(t *testing.T) { for i, toggle := range []bool{true, false, true} { if err := p.SetControlMessage(cf, toggle); err != nil { if nettest.ProtocolNotSupported(err) { - t.Logf("not supported on %q", runtime.GOOS) + t.Logf("not supported on %s", runtime.GOOS) continue } t.Fatal(err) @@ -77,14 +77,14 @@ func TestPacketConnReadWriteUnicastUDP(t *testing.T) { func TestPacketConnReadWriteUnicastICMP(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } - if os.Getuid() != 0 { - t.Skip("must be root") + if m, ok := nettest.SupportsRawIPSocket(); !ok { + t.Skip(m) } ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback) if ifi == nil { - t.Skipf("not available on %q", runtime.GOOS) + t.Skipf("not available on %s", runtime.GOOS) } c, err := net.ListenPacket("ip4:icmp", "0.0.0.0") @@ -114,7 +114,7 @@ func TestPacketConnReadWriteUnicastICMP(t *testing.T) { } if err := p.SetControlMessage(cf, toggle); err != nil { if nettest.ProtocolNotSupported(err) { - t.Logf("not supported on %q", runtime.GOOS) + t.Logf("not supported on %s", runtime.GOOS) continue } t.Fatal(err) @@ -136,7 +136,7 @@ func TestPacketConnReadWriteUnicastICMP(t *testing.T) { if n, cm, _, err := p.ReadFrom(rb); err != nil { switch runtime.GOOS { case "darwin": // older darwin kernels have some limitation on receiving icmp packet through raw socket - t.Logf("not supported on %q", runtime.GOOS) + t.Logf("not supported on %s", runtime.GOOS) continue } t.Fatal(err) @@ -160,14 +160,14 @@ func TestPacketConnReadWriteUnicastICMP(t *testing.T) { func TestRawConnReadWriteUnicastICMP(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } - if os.Getuid() != 0 { - t.Skip("must be root") + if m, ok := nettest.SupportsRawIPSocket(); !ok { + t.Skip(m) } ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback) if ifi == nil { - t.Skipf("not available on %q", runtime.GOOS) + t.Skipf("not available on %s", runtime.GOOS) } c, err := net.ListenPacket("ip4:icmp", "0.0.0.0") @@ -209,7 +209,7 @@ func TestRawConnReadWriteUnicastICMP(t *testing.T) { } if err := r.SetControlMessage(cf, toggle); err != nil { if nettest.ProtocolNotSupported(err) { - t.Logf("not supported on %q", runtime.GOOS) + t.Logf("not supported on %s", runtime.GOOS) continue } t.Fatal(err) @@ -228,7 +228,7 @@ func TestRawConnReadWriteUnicastICMP(t *testing.T) { if _, b, cm, err := r.ReadFrom(rb); err != nil { switch runtime.GOOS { case "darwin": // older darwin kernels have some limitation on receiving icmp packet through raw socket - t.Logf("not supported on %q", runtime.GOOS) + t.Logf("not supported on %s", runtime.GOOS) continue } t.Fatal(err) diff --git a/vendor/golang.org/x/net/ipv4/unicastsockopt_test.go b/vendor/golang.org/x/net/ipv4/unicastsockopt_test.go index d9f1727..25606f2 100644 --- a/vendor/golang.org/x/net/ipv4/unicastsockopt_test.go +++ b/vendor/golang.org/x/net/ipv4/unicastsockopt_test.go @@ -6,23 +6,22 @@ package ipv4_test import ( "net" - "os" "runtime" "testing" - "github.com/vtolstov/svirtnet/internal/iana" - "github.com/vtolstov/svirtnet/internal/nettest" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv4" + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/nettest" + "golang.org/x/net/ipv4" ) func TestConnUnicastSocketOptions(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback) if ifi == nil { - t.Skipf("not available on %q", runtime.GOOS) + t.Skipf("not available on %s", runtime.GOOS) } ln, err := net.Listen("tcp4", "127.0.0.1:0") @@ -55,16 +54,17 @@ var packetConnUnicastSocketOptionTests = []struct { func TestPacketConnUnicastSocketOptions(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback) if ifi == nil { - t.Skipf("not available on %q", runtime.GOOS) + t.Skipf("not available on %s", runtime.GOOS) } + m, ok := nettest.SupportsRawIPSocket() for _, tt := range packetConnUnicastSocketOptionTests { - if tt.net == "ip4" && os.Getuid() != 0 { - t.Log("must be root") + if tt.net == "ip4" && !ok { + t.Log(m) continue } c, err := net.ListenPacket(tt.net+tt.proto, tt.addr) @@ -80,14 +80,14 @@ func TestPacketConnUnicastSocketOptions(t *testing.T) { func TestRawConnUnicastSocketOptions(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } - if os.Getuid() != 0 { - t.Skip("must be root") + if m, ok := nettest.SupportsRawIPSocket(); !ok { + t.Skip(m) } ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback) if ifi == nil { - t.Skipf("not available on %q", runtime.GOOS) + t.Skipf("not available on %s", runtime.GOOS) } c, err := net.ListenPacket("ip4:icmp", "127.0.0.1") @@ -116,7 +116,7 @@ func testUnicastSocketOptions(t *testing.T, c testIPv4UnicastConn) { switch runtime.GOOS { case "windows": // IP_TOS option is supported on Windows 8 and beyond. - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } if err := c.SetTOS(tos); err != nil { diff --git a/vendor/golang.org/x/net/ipv4/zsys_freebsd_arm.go b/vendor/golang.org/x/net/ipv4/zsys_freebsd_arm.go index 6fd67e1..ebac6d7 100644 --- a/vendor/golang.org/x/net/ipv4/zsys_freebsd_arm.go +++ b/vendor/golang.org/x/net/ipv4/zsys_freebsd_arm.go @@ -44,8 +44,8 @@ const ( sysSizeofIPMreq = 0x8 sysSizeofIPMreqn = 0xc sysSizeofIPMreqSource = 0xc - sysSizeofGroupReq = 0x84 - sysSizeofGroupSourceReq = 0x104 + sysSizeofGroupReq = 0x88 + sysSizeofGroupSourceReq = 0x108 ) type sysSockaddrStorage struct { @@ -83,11 +83,13 @@ type sysIPMreqSource struct { type sysGroupReq struct { Interface uint32 + Pad_cgo_0 [4]byte Group sysSockaddrStorage } type sysGroupSourceReq struct { Interface uint32 + Pad_cgo_0 [4]byte Group sysSockaddrStorage Source sysSockaddrStorage } diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_arm64.go b/vendor/golang.org/x/net/ipv4/zsys_linux_arm64.go new file mode 100644 index 0000000..ce4194a --- /dev/null +++ b/vendor/golang.org/x/net/ipv4/zsys_linux_arm64.go @@ -0,0 +1,134 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +// +build linux,arm64 + +package ipv4 + +const ( + sysIP_TOS = 0x1 + sysIP_TTL = 0x2 + sysIP_HDRINCL = 0x3 + sysIP_OPTIONS = 0x4 + sysIP_ROUTER_ALERT = 0x5 + sysIP_RECVOPTS = 0x6 + sysIP_RETOPTS = 0x7 + sysIP_PKTINFO = 0x8 + sysIP_PKTOPTIONS = 0x9 + sysIP_MTU_DISCOVER = 0xa + sysIP_RECVERR = 0xb + sysIP_RECVTTL = 0xc + sysIP_RECVTOS = 0xd + sysIP_MTU = 0xe + sysIP_FREEBIND = 0xf + sysIP_TRANSPARENT = 0x13 + sysIP_RECVRETOPTS = 0x7 + sysIP_ORIGDSTADDR = 0x14 + sysIP_RECVORIGDSTADDR = 0x14 + sysIP_MINTTL = 0x15 + sysIP_NODEFRAG = 0x16 + sysIP_UNICAST_IF = 0x32 + + sysIP_MULTICAST_IF = 0x20 + sysIP_MULTICAST_TTL = 0x21 + sysIP_MULTICAST_LOOP = 0x22 + sysIP_ADD_MEMBERSHIP = 0x23 + sysIP_DROP_MEMBERSHIP = 0x24 + sysIP_UNBLOCK_SOURCE = 0x25 + sysIP_BLOCK_SOURCE = 0x26 + sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 + sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 + sysIP_MSFILTER = 0x29 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIP_MULTICAST_ALL = 0x31 + + sysICMP_FILTER = 0x1 + + sysSO_EE_ORIGIN_NONE = 0x0 + sysSO_EE_ORIGIN_LOCAL = 0x1 + sysSO_EE_ORIGIN_ICMP = 0x2 + sysSO_EE_ORIGIN_ICMP6 = 0x3 + sysSO_EE_ORIGIN_TXSTATUS = 0x4 + sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 + + sysSizeofKernelSockaddrStorage = 0x80 + sysSizeofSockaddrInet = 0x10 + sysSizeofInetPktinfo = 0xc + sysSizeofSockExtendedErr = 0x10 + + sysSizeofIPMreq = 0x8 + sysSizeofIPMreqn = 0xc + sysSizeofIPMreqSource = 0xc + sysSizeofGroupReq = 0x88 + sysSizeofGroupSourceReq = 0x108 + + sysSizeofICMPFilter = 0x4 +) + +type sysKernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sysSockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type sysInetPktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type sysSockExtendedErr struct { + Errno uint32 + Origin uint8 + Type uint8 + Code uint8 + Pad uint8 + Info uint32 + Data uint32 +} + +type sysIPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type sysIPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type sysIPMreqSource struct { + Multiaddr uint32 + Interface uint32 + Sourceaddr uint32 +} + +type sysGroupReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group sysKernelSockaddrStorage +} + +type sysGroupSourceReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group sysKernelSockaddrStorage + Source sysKernelSockaddrStorage +} + +type sysICMPFilter struct { + Data uint32 +} diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64.go b/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64.go new file mode 100644 index 0000000..9fe5ee2 --- /dev/null +++ b/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64.go @@ -0,0 +1,134 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +// +build linux,ppc64 + +package ipv4 + +const ( + sysIP_TOS = 0x1 + sysIP_TTL = 0x2 + sysIP_HDRINCL = 0x3 + sysIP_OPTIONS = 0x4 + sysIP_ROUTER_ALERT = 0x5 + sysIP_RECVOPTS = 0x6 + sysIP_RETOPTS = 0x7 + sysIP_PKTINFO = 0x8 + sysIP_PKTOPTIONS = 0x9 + sysIP_MTU_DISCOVER = 0xa + sysIP_RECVERR = 0xb + sysIP_RECVTTL = 0xc + sysIP_RECVTOS = 0xd + sysIP_MTU = 0xe + sysIP_FREEBIND = 0xf + sysIP_TRANSPARENT = 0x13 + sysIP_RECVRETOPTS = 0x7 + sysIP_ORIGDSTADDR = 0x14 + sysIP_RECVORIGDSTADDR = 0x14 + sysIP_MINTTL = 0x15 + sysIP_NODEFRAG = 0x16 + sysIP_UNICAST_IF = 0x32 + + sysIP_MULTICAST_IF = 0x20 + sysIP_MULTICAST_TTL = 0x21 + sysIP_MULTICAST_LOOP = 0x22 + sysIP_ADD_MEMBERSHIP = 0x23 + sysIP_DROP_MEMBERSHIP = 0x24 + sysIP_UNBLOCK_SOURCE = 0x25 + sysIP_BLOCK_SOURCE = 0x26 + sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 + sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 + sysIP_MSFILTER = 0x29 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIP_MULTICAST_ALL = 0x31 + + sysICMP_FILTER = 0x1 + + sysSO_EE_ORIGIN_NONE = 0x0 + sysSO_EE_ORIGIN_LOCAL = 0x1 + sysSO_EE_ORIGIN_ICMP = 0x2 + sysSO_EE_ORIGIN_ICMP6 = 0x3 + sysSO_EE_ORIGIN_TXSTATUS = 0x4 + sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 + + sysSizeofKernelSockaddrStorage = 0x80 + sysSizeofSockaddrInet = 0x10 + sysSizeofInetPktinfo = 0xc + sysSizeofSockExtendedErr = 0x10 + + sysSizeofIPMreq = 0x8 + sysSizeofIPMreqn = 0xc + sysSizeofIPMreqSource = 0xc + sysSizeofGroupReq = 0x88 + sysSizeofGroupSourceReq = 0x108 + + sysSizeofICMPFilter = 0x4 +) + +type sysKernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sysSockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type sysInetPktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type sysSockExtendedErr struct { + Errno uint32 + Origin uint8 + Type uint8 + Code uint8 + Pad uint8 + Info uint32 + Data uint32 +} + +type sysIPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type sysIPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type sysIPMreqSource struct { + Multiaddr uint32 + Interface uint32 + Sourceaddr uint32 +} + +type sysGroupReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group sysKernelSockaddrStorage +} + +type sysGroupSourceReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group sysKernelSockaddrStorage + Source sysKernelSockaddrStorage +} + +type sysICMPFilter struct { + Data uint32 +} diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64le.go b/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64le.go new file mode 100644 index 0000000..3891f54 --- /dev/null +++ b/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64le.go @@ -0,0 +1,134 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +// +build linux,ppc64le + +package ipv4 + +const ( + sysIP_TOS = 0x1 + sysIP_TTL = 0x2 + sysIP_HDRINCL = 0x3 + sysIP_OPTIONS = 0x4 + sysIP_ROUTER_ALERT = 0x5 + sysIP_RECVOPTS = 0x6 + sysIP_RETOPTS = 0x7 + sysIP_PKTINFO = 0x8 + sysIP_PKTOPTIONS = 0x9 + sysIP_MTU_DISCOVER = 0xa + sysIP_RECVERR = 0xb + sysIP_RECVTTL = 0xc + sysIP_RECVTOS = 0xd + sysIP_MTU = 0xe + sysIP_FREEBIND = 0xf + sysIP_TRANSPARENT = 0x13 + sysIP_RECVRETOPTS = 0x7 + sysIP_ORIGDSTADDR = 0x14 + sysIP_RECVORIGDSTADDR = 0x14 + sysIP_MINTTL = 0x15 + sysIP_NODEFRAG = 0x16 + sysIP_UNICAST_IF = 0x32 + + sysIP_MULTICAST_IF = 0x20 + sysIP_MULTICAST_TTL = 0x21 + sysIP_MULTICAST_LOOP = 0x22 + sysIP_ADD_MEMBERSHIP = 0x23 + sysIP_DROP_MEMBERSHIP = 0x24 + sysIP_UNBLOCK_SOURCE = 0x25 + sysIP_BLOCK_SOURCE = 0x26 + sysIP_ADD_SOURCE_MEMBERSHIP = 0x27 + sysIP_DROP_SOURCE_MEMBERSHIP = 0x28 + sysIP_MSFILTER = 0x29 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIP_MULTICAST_ALL = 0x31 + + sysICMP_FILTER = 0x1 + + sysSO_EE_ORIGIN_NONE = 0x0 + sysSO_EE_ORIGIN_LOCAL = 0x1 + sysSO_EE_ORIGIN_ICMP = 0x2 + sysSO_EE_ORIGIN_ICMP6 = 0x3 + sysSO_EE_ORIGIN_TXSTATUS = 0x4 + sysSO_EE_ORIGIN_TIMESTAMPING = 0x4 + + sysSizeofKernelSockaddrStorage = 0x80 + sysSizeofSockaddrInet = 0x10 + sysSizeofInetPktinfo = 0xc + sysSizeofSockExtendedErr = 0x10 + + sysSizeofIPMreq = 0x8 + sysSizeofIPMreqn = 0xc + sysSizeofIPMreqSource = 0xc + sysSizeofGroupReq = 0x88 + sysSizeofGroupSourceReq = 0x108 + + sysSizeofICMPFilter = 0x4 +) + +type sysKernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sysSockaddrInet struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + X__pad [8]uint8 +} + +type sysInetPktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type sysSockExtendedErr struct { + Errno uint32 + Origin uint8 + Type uint8 + Code uint8 + Pad uint8 + Info uint32 + Data uint32 +} + +type sysIPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type sysIPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type sysIPMreqSource struct { + Multiaddr uint32 + Interface uint32 + Sourceaddr uint32 +} + +type sysGroupReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group sysKernelSockaddrStorage +} + +type sysGroupSourceReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group sysKernelSockaddrStorage + Source sysKernelSockaddrStorage +} + +type sysICMPFilter struct { + Data uint32 +} diff --git a/vendor/golang.org/x/net/ipv6/control_rfc2292_unix.go b/vendor/golang.org/x/net/ipv6/control_rfc2292_unix.go index 86cef53..ce201ce 100644 --- a/vendor/golang.org/x/net/ipv6/control_rfc2292_unix.go +++ b/vendor/golang.org/x/net/ipv6/control_rfc2292_unix.go @@ -10,7 +10,7 @@ import ( "syscall" "unsafe" - "github.com/vtolstov/svirtnet/internal/iana" + "golang.org/x/net/internal/iana" ) func marshal2292HopLimit(b []byte, cm *ControlMessage) []byte { diff --git a/vendor/golang.org/x/net/ipv6/control_rfc3542_unix.go b/vendor/golang.org/x/net/ipv6/control_rfc3542_unix.go index 934f621..e55c4aa 100644 --- a/vendor/golang.org/x/net/ipv6/control_rfc3542_unix.go +++ b/vendor/golang.org/x/net/ipv6/control_rfc3542_unix.go @@ -10,7 +10,7 @@ import ( "syscall" "unsafe" - "github.com/vtolstov/svirtnet/internal/iana" + "golang.org/x/net/internal/iana" ) func marshalTrafficClass(b []byte, cm *ControlMessage) []byte { diff --git a/vendor/golang.org/x/net/ipv6/control_unix.go b/vendor/golang.org/x/net/ipv6/control_unix.go index 45c3538..2af5beb 100644 --- a/vendor/golang.org/x/net/ipv6/control_unix.go +++ b/vendor/golang.org/x/net/ipv6/control_unix.go @@ -10,7 +10,7 @@ import ( "os" "syscall" - "github.com/vtolstov/svirtnet/internal/iana" + "golang.org/x/net/internal/iana" ) func setControlMessage(fd int, opt *rawOpt, cf ControlFlags, on bool) error { diff --git a/vendor/golang.org/x/net/ipv6/doc.go b/vendor/golang.org/x/net/ipv6/doc.go index b96d0f6..3c15c21 100644 --- a/vendor/golang.org/x/net/ipv6/doc.go +++ b/vendor/golang.org/x/net/ipv6/doc.go @@ -42,7 +42,7 @@ // The outgoing packets will be labeled DiffServ assured forwarding // class 1 low drop precedence, known as AF11 packets. // -// if err := ipv6.NewConn(c).SetTrafficClass(DiffServAF11); err != nil { +// if err := ipv6.NewConn(c).SetTrafficClass(0x28); err != nil { // // error handling // } // if _, err := c.Write(data); err != nil { @@ -114,7 +114,7 @@ // // error handling // } // if rcm.Dst.IsMulticast() { -// if rcm.Dst.Equal(group) +// if rcm.Dst.Equal(group) { // // joined group, do something // } else { // // unknown group, discard @@ -124,7 +124,7 @@ // // The application can also send both unicast and multicast packets. // -// p.SetTrafficClass(DiffServCS0) +// p.SetTrafficClass(0x0) // p.SetHopLimit(16) // if _, err := p.WriteTo(data[:n], nil, src); err != nil { // // error handling @@ -237,4 +237,4 @@ // MLDv1 and starts to listen to multicast traffic. // In the fallback case, ExcludeSourceSpecificGroup and // IncludeSourceSpecificGroup may return an error. -package ipv6 +package ipv6 // import "golang.org/x/net/ipv6" diff --git a/vendor/golang.org/x/net/ipv6/example_test.go b/vendor/golang.org/x/net/ipv6/example_test.go index 254c07c..a2a3030 100644 --- a/vendor/golang.org/x/net/ipv6/example_test.go +++ b/vendor/golang.org/x/net/ipv6/example_test.go @@ -11,9 +11,8 @@ import ( "os" "time" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/icmp" - "github.com/vtolstov/svirtnet/internal/iana" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv6" + "golang.org/x/net/icmp" + "golang.org/x/net/ipv6" ) func ExampleConn_markingTCP() { @@ -31,7 +30,7 @@ func ExampleConn_markingTCP() { go func(c net.Conn) { defer c.Close() p := ipv6.NewConn(c) - if err := p.SetTrafficClass(iana.DiffServAF11); err != nil { + if err := p.SetTrafficClass(0x28); err != nil { // DSCP AF11 log.Fatal(err) } if err := p.SetHopLimit(128); err != nil { @@ -103,7 +102,7 @@ func ExamplePacketConn_tracingIPPacketRoute() { log.Fatal("no AAAA record found") } - c, err := net.ListenPacket(fmt.Sprintf("ip6:%d", iana.ProtocolIPv6ICMP), "::") // ICMP for IPv6 + c, err := net.ListenPacket("ip6:58", "::") // ICMP for IPv6 if err != nil { log.Fatal(err) } @@ -156,7 +155,7 @@ func ExamplePacketConn_tracingIPPacketRoute() { } log.Fatal(err) } - rm, err := icmp.ParseMessage(iana.ProtocolIPv6ICMP, rb[:n]) + rm, err := icmp.ParseMessage(58, rb[:n]) if err != nil { log.Fatal(err) } @@ -178,7 +177,7 @@ func ExamplePacketConn_tracingIPPacketRoute() { } func ExamplePacketConn_advertisingOSPFHello() { - c, err := net.ListenPacket(fmt.Sprintf("ip6:%d", iana.ProtocolOSPFIGP), "::") // OSPF for IPv6 + c, err := net.ListenPacket("ip6:89", "::") // OSPF for IPv6 if err != nil { log.Fatal(err) } @@ -205,7 +204,7 @@ func ExamplePacketConn_advertisingOSPFHello() { } cm := ipv6.ControlMessage{ - TrafficClass: iana.DiffServCS6, + TrafficClass: 0xc0, // DSCP CS6 HopLimit: 1, IfIndex: en0.Index, } diff --git a/vendor/golang.org/x/net/ipv6/gen.go b/vendor/golang.org/x/net/ipv6/gen.go index 329cf1d..d9186c5 100644 --- a/vendor/golang.org/x/net/ipv6/gen.go +++ b/vendor/golang.org/x/net/ipv6/gen.go @@ -52,12 +52,14 @@ func genzsys() error { if err != nil { return err } - switch runtime.GOOS { - case "dragonfly", "solaris": - // The ipv6 pacakge still supports go1.2, and so we - // need to take care of additional platforms in go1.3 - // and above for working with go1.2. + // The ipv6 pacakge still supports go1.2, and so we need to + // take care of additional platforms in go1.3 and above for + // working with go1.2. + switch { + case runtime.GOOS == "dragonfly" || runtime.GOOS == "solaris": b = bytes.Replace(b, []byte("package ipv6\n"), []byte("// +build "+runtime.GOOS+"\n\npackage ipv6\n"), 1) + case runtime.GOOS == "linux" && (runtime.GOARCH == "arm64" || runtime.GOARCH == "ppc64" || runtime.GOARCH == "ppc64le"): + b = bytes.Replace(b, []byte("package ipv6\n"), []byte("// +build "+runtime.GOOS+","+runtime.GOARCH+"\n\npackage ipv6\n"), 1) } b, err = format.Source(b) if err != nil { diff --git a/vendor/golang.org/x/net/ipv6/header_test.go b/vendor/golang.org/x/net/ipv6/header_test.go index 1be8409..18e0023 100644 --- a/vendor/golang.org/x/net/ipv6/header_test.go +++ b/vendor/golang.org/x/net/ipv6/header_test.go @@ -9,8 +9,8 @@ import ( "reflect" "testing" - "github.com/vtolstov/svirtnet/internal/iana" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv6" + "golang.org/x/net/internal/iana" + "golang.org/x/net/ipv6" ) var ( diff --git a/vendor/golang.org/x/net/ipv6/iana.go b/vendor/golang.org/x/net/ipv6/iana.go index a3e10bc..3c6214f 100644 --- a/vendor/golang.org/x/net/ipv6/iana.go +++ b/vendor/golang.org/x/net/ipv6/iana.go @@ -3,7 +3,7 @@ package ipv6 -// Internet Control Message Protocol version 6 (ICMPv6) Parameters, Updated: 2014-09-22 +// Internet Control Message Protocol version 6 (ICMPv6) Parameters, Updated: 2015-07-07 const ( ICMPTypeDestinationUnreachable ICMPType = 1 // Destination Unreachable ICMPTypePacketTooBig ICMPType = 2 // Packet Too Big @@ -39,9 +39,10 @@ const ( ICMPTypeILNPv6LocatorUpdate ICMPType = 156 // ILNPv6 Locator Update Message ICMPTypeDuplicateAddressRequest ICMPType = 157 // Duplicate Address Request ICMPTypeDuplicateAddressConfirmation ICMPType = 158 // Duplicate Address Confirmation + ICMPTypeMPLControl ICMPType = 159 // MPL Control Message ) -// Internet Control Message Protocol version 6 (ICMPv6) Parameters, Updated: 2014-09-22 +// Internet Control Message Protocol version 6 (ICMPv6) Parameters, Updated: 2015-07-07 var icmpTypes = map[ICMPType]string{ 1: "destination unreachable", 2: "packet too big", @@ -77,4 +78,5 @@ var icmpTypes = map[ICMPType]string{ 156: "ilnpv6 locator update message", 157: "duplicate address request", 158: "duplicate address confirmation", + 159: "mpl control message", } diff --git a/vendor/golang.org/x/net/ipv6/icmp.go b/vendor/golang.org/x/net/ipv6/icmp.go index 1d327cf..a2de65a 100644 --- a/vendor/golang.org/x/net/ipv6/icmp.go +++ b/vendor/golang.org/x/net/ipv6/icmp.go @@ -4,7 +4,7 @@ package ipv6 -import "github.com/vtolstov/svirtnet/internal/iana" +import "golang.org/x/net/internal/iana" // An ICMPType represents a type of ICMP message. type ICMPType int diff --git a/vendor/golang.org/x/net/ipv6/icmp_test.go b/vendor/golang.org/x/net/ipv6/icmp_test.go index d0fdb49..e192d6d 100644 --- a/vendor/golang.org/x/net/ipv6/icmp_test.go +++ b/vendor/golang.org/x/net/ipv6/icmp_test.go @@ -6,12 +6,12 @@ package ipv6_test import ( "net" - "os" "reflect" "runtime" "testing" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv6" + "golang.org/x/net/internal/nettest" + "golang.org/x/net/ipv6" ) var icmpStringTests = []struct { @@ -35,7 +35,7 @@ func TestICMPString(t *testing.T) { func TestICMPFilter(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } var f ipv6.ICMPFilter @@ -62,13 +62,13 @@ func TestICMPFilter(t *testing.T) { func TestSetICMPFilter(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } if !supportsIPv6 { t.Skip("ipv6 is not supported") } - if os.Getuid() != 0 { - t.Skip("must be root") + if m, ok := nettest.SupportsRawIPSocket(); !ok { + t.Skip(m) } c, err := net.ListenPacket("ip6:ipv6-icmp", "::1") diff --git a/vendor/golang.org/x/net/ipv6/multicast_test.go b/vendor/golang.org/x/net/ipv6/multicast_test.go index 4ddc80f..fc10ce1 100644 --- a/vendor/golang.org/x/net/ipv6/multicast_test.go +++ b/vendor/golang.org/x/net/ipv6/multicast_test.go @@ -12,10 +12,10 @@ import ( "testing" "time" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/icmp" - "github.com/vtolstov/svirtnet/internal/iana" - "github.com/vtolstov/svirtnet/internal/nettest" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv6" + "golang.org/x/net/icmp" + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/nettest" + "golang.org/x/net/ipv6" ) var packetConnReadWriteMulticastUDPTests = []struct { @@ -31,16 +31,16 @@ func TestPacketConnReadWriteMulticastUDP(t *testing.T) { switch runtime.GOOS { case "freebsd": // due to a bug on loopback marking // See http://www.freebsd.org/cgi/query-pr.cgi?pr=180065. - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } if !supportsIPv6 { t.Skip("ipv6 is not supported") } ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagMulticast|net.FlagLoopback) if ifi == nil { - t.Skipf("not available on %q", runtime.GOOS) + t.Skipf("not available on %s", runtime.GOOS) } for _, tt := range packetConnReadWriteMulticastUDPTests { @@ -64,7 +64,7 @@ func TestPacketConnReadWriteMulticastUDP(t *testing.T) { switch runtime.GOOS { case "freebsd", "linux": default: // platforms that don't support MLDv2 fail here - t.Logf("not supported on %q", runtime.GOOS) + t.Logf("not supported on %s", runtime.GOOS) continue } t.Fatal(err) @@ -95,7 +95,7 @@ func TestPacketConnReadWriteMulticastUDP(t *testing.T) { for i, toggle := range []bool{true, false, true} { if err := p.SetControlMessage(cf, toggle); err != nil { if nettest.ProtocolNotSupported(err) { - t.Logf("not supported on %q", runtime.GOOS) + t.Logf("not supported on %s", runtime.GOOS) continue } t.Fatal(err) @@ -133,19 +133,19 @@ func TestPacketConnReadWriteMulticastICMP(t *testing.T) { switch runtime.GOOS { case "freebsd": // due to a bug on loopback marking // See http://www.freebsd.org/cgi/query-pr.cgi?pr=180065. - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } if !supportsIPv6 { t.Skip("ipv6 is not supported") } - if os.Getuid() != 0 { - t.Skip("must be root") + if m, ok := nettest.SupportsRawIPSocket(); !ok { + t.Skip(m) } ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagMulticast|net.FlagLoopback) if ifi == nil { - t.Skipf("not available on %q", runtime.GOOS) + t.Skipf("not available on %s", runtime.GOOS) } for _, tt := range packetConnReadWriteMulticastICMPTests { @@ -168,7 +168,7 @@ func TestPacketConnReadWriteMulticastICMP(t *testing.T) { switch runtime.GOOS { case "freebsd", "linux": default: // platforms that don't support MLDv2 fail here - t.Logf("not supported on %q", runtime.GOOS) + t.Logf("not supported on %s", runtime.GOOS) continue } t.Fatal(err) @@ -228,7 +228,7 @@ func TestPacketConnReadWriteMulticastICMP(t *testing.T) { } if err := p.SetControlMessage(cf, toggle); err != nil { if nettest.ProtocolNotSupported(err) { - t.Logf("not supported on %q", runtime.GOOS) + t.Logf("not supported on %s", runtime.GOOS) continue } t.Fatal(err) @@ -246,7 +246,7 @@ func TestPacketConnReadWriteMulticastICMP(t *testing.T) { if n, cm, _, err := p.ReadFrom(rb); err != nil { switch runtime.GOOS { case "darwin": // older darwin kernels have some limitation on receiving icmp packet through raw socket - t.Logf("not supported on %q", runtime.GOOS) + t.Logf("not supported on %s", runtime.GOOS) continue } t.Fatal(err) diff --git a/vendor/golang.org/x/net/ipv6/multicastlistener_test.go b/vendor/golang.org/x/net/ipv6/multicastlistener_test.go index fe172e2..9711f75 100644 --- a/vendor/golang.org/x/net/ipv6/multicastlistener_test.go +++ b/vendor/golang.org/x/net/ipv6/multicastlistener_test.go @@ -7,12 +7,11 @@ package ipv6_test import ( "fmt" "net" - "os" "runtime" "testing" - "github.com/vtolstov/svirtnet/internal/nettest" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv6" + "golang.org/x/net/internal/nettest" + "golang.org/x/net/ipv6" ) var udpMultipleGroupListenerTests = []net.Addr{ @@ -24,7 +23,7 @@ var udpMultipleGroupListenerTests = []net.Addr{ func TestUDPSinglePacketConnWithMultipleGroupListeners(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } if !supportsIPv6 { t.Skip("ipv6 is not supported") @@ -64,7 +63,7 @@ func TestUDPSinglePacketConnWithMultipleGroupListeners(t *testing.T) { func TestUDPMultiplePacketConnWithMultipleGroupListeners(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } if !supportsIPv6 { t.Skip("ipv6 is not supported") @@ -116,7 +115,7 @@ func TestUDPMultiplePacketConnWithMultipleGroupListeners(t *testing.T) { func TestUDPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } if !supportsIPv6 { t.Skip("ipv6 is not supported") @@ -159,13 +158,13 @@ func TestUDPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) { func TestIPSinglePacketConnWithSingleGroupListener(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } if !supportsIPv6 { t.Skip("ipv6 is not supported") } - if os.Getuid() != 0 { - t.Skip("must be root") + if m, ok := nettest.SupportsRawIPSocket(); !ok { + t.Skip(m) } c, err := net.ListenPacket("ip6:ipv6-icmp", "::") // wildcard address @@ -201,15 +200,15 @@ func TestIPSinglePacketConnWithSingleGroupListener(t *testing.T) { func TestIPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) { switch runtime.GOOS { case "darwin", "dragonfly", "openbsd": // platforms that return fe80::1%lo0: bind: can't assign requested address - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } if !supportsIPv6 { t.Skip("ipv6 is not supported") } - if os.Getuid() != 0 { - t.Skip("must be root") + if m, ok := nettest.SupportsRawIPSocket(); !ok { + t.Skip(m) } gaddr := net.IPAddr{IP: net.ParseIP("ff02::114")} // see RFC 4727 diff --git a/vendor/golang.org/x/net/ipv6/multicastsockopt_test.go b/vendor/golang.org/x/net/ipv6/multicastsockopt_test.go index 3204033..fe0e6e1 100644 --- a/vendor/golang.org/x/net/ipv6/multicastsockopt_test.go +++ b/vendor/golang.org/x/net/ipv6/multicastsockopt_test.go @@ -6,12 +6,11 @@ package ipv6_test import ( "net" - "os" "runtime" "testing" - "github.com/vtolstov/svirtnet/internal/nettest" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv6" + "golang.org/x/net/internal/nettest" + "golang.org/x/net/ipv6" ) var packetConnMulticastSocketOptionTests = []struct { @@ -28,19 +27,20 @@ var packetConnMulticastSocketOptionTests = []struct { func TestPacketConnMulticastSocketOptions(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } if !supportsIPv6 { t.Skip("ipv6 is not supported") } ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagMulticast|net.FlagLoopback) if ifi == nil { - t.Skipf("not available on %q", runtime.GOOS) + t.Skipf("not available on %s", runtime.GOOS) } + m, ok := nettest.SupportsRawIPSocket() for _, tt := range packetConnMulticastSocketOptionTests { - if tt.net == "ip6" && os.Getuid() != 0 { - t.Log("must be root") + if tt.net == "ip6" && !ok { + t.Log(m) continue } c, err := net.ListenPacket(tt.net+tt.proto, tt.addr) @@ -120,7 +120,7 @@ func testSourceSpecificMulticastSocketOptions(t *testing.T, c testIPv6MulticastC switch runtime.GOOS { case "freebsd", "linux": default: // platforms that don't support MLDv2 fail here - t.Logf("not supported on %q", runtime.GOOS) + t.Logf("not supported on %s", runtime.GOOS) return } t.Error(err) diff --git a/vendor/golang.org/x/net/ipv6/readwrite_test.go b/vendor/golang.org/x/net/ipv6/readwrite_test.go index 33ff840..ff4ea2b 100644 --- a/vendor/golang.org/x/net/ipv6/readwrite_test.go +++ b/vendor/golang.org/x/net/ipv6/readwrite_test.go @@ -11,9 +11,9 @@ import ( "sync" "testing" - "github.com/vtolstov/svirtnet/internal/iana" - "github.com/vtolstov/svirtnet/internal/nettest" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv6" + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/nettest" + "golang.org/x/net/ipv6" ) func benchmarkUDPListener() (net.PacketConn, net.Addr, error) { @@ -102,7 +102,7 @@ func benchmarkReadWriteIPv6UDP(b *testing.B, p *ipv6.PacketConn, wb, rb []byte, func TestPacketConnConcurrentReadWriteUnicastUDP(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } if !supportsIPv6 { t.Skip("ipv6 is not supported") @@ -127,7 +127,7 @@ func TestPacketConnConcurrentReadWriteUnicastUDP(t *testing.T) { if err := p.SetControlMessage(cf, true); err != nil { // probe before test if nettest.ProtocolNotSupported(err) { - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } t.Fatal(err) } diff --git a/vendor/golang.org/x/net/ipv6/sockopt_ssmreq_unix.go b/vendor/golang.org/x/net/ipv6/sockopt_ssmreq_unix.go index 8e1dcef..c64d6d5 100644 --- a/vendor/golang.org/x/net/ipv6/sockopt_ssmreq_unix.go +++ b/vendor/golang.org/x/net/ipv6/sockopt_ssmreq_unix.go @@ -12,13 +12,28 @@ import ( "unsafe" ) +var freebsd32o64 bool + func setsockoptGroupReq(fd int, opt *sockOpt, ifi *net.Interface, grp net.IP) error { var gr sysGroupReq if ifi != nil { gr.Interface = uint32(ifi.Index) } gr.setGroup(grp) - return os.NewSyscallError("setsockopt", setsockopt(fd, opt.level, opt.name, unsafe.Pointer(&gr), sysSizeofGroupReq)) + var p unsafe.Pointer + var l sysSockoptLen + if freebsd32o64 { + var d [sysSizeofGroupReq + 4]byte + s := (*[sysSizeofGroupReq]byte)(unsafe.Pointer(&gr)) + copy(d[:4], s[:4]) + copy(d[8:], s[4:]) + p = unsafe.Pointer(&d[0]) + l = sysSizeofGroupReq + 4 + } else { + p = unsafe.Pointer(&gr) + l = sysSizeofGroupReq + } + return os.NewSyscallError("setsockopt", setsockopt(fd, opt.level, opt.name, p, l)) } func setsockoptGroupSourceReq(fd int, opt *sockOpt, ifi *net.Interface, grp, src net.IP) error { @@ -27,5 +42,18 @@ func setsockoptGroupSourceReq(fd int, opt *sockOpt, ifi *net.Interface, grp, src gsr.Interface = uint32(ifi.Index) } gsr.setSourceGroup(grp, src) - return os.NewSyscallError("setsockopt", setsockopt(fd, opt.level, opt.name, unsafe.Pointer(&gsr), sysSizeofGroupSourceReq)) + var p unsafe.Pointer + var l sysSockoptLen + if freebsd32o64 { + var d [sysSizeofGroupSourceReq + 4]byte + s := (*[sysSizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr)) + copy(d[:4], s[:4]) + copy(d[8:], s[4:]) + p = unsafe.Pointer(&d[0]) + l = sysSizeofGroupSourceReq + 4 + } else { + p = unsafe.Pointer(&gsr) + l = sysSizeofGroupSourceReq + } + return os.NewSyscallError("setsockopt", setsockopt(fd, opt.level, opt.name, p, l)) } diff --git a/vendor/golang.org/x/net/ipv6/sockopt_test.go b/vendor/golang.org/x/net/ipv6/sockopt_test.go index 638dd10..9c21903 100644 --- a/vendor/golang.org/x/net/ipv6/sockopt_test.go +++ b/vendor/golang.org/x/net/ipv6/sockopt_test.go @@ -7,13 +7,12 @@ package ipv6_test import ( "fmt" "net" - "os" "runtime" "testing" - "github.com/vtolstov/svirtnet/internal/iana" - "github.com/vtolstov/svirtnet/internal/nettest" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv6" + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/nettest" + "golang.org/x/net/ipv6" ) var supportsIPv6 bool = nettest.SupportsIPv6() @@ -21,7 +20,7 @@ var supportsIPv6 bool = nettest.SupportsIPv6() func TestConnInitiatorPathMTU(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } if !supportsIPv6 { t.Skip("ipv6 is not supported") @@ -45,7 +44,7 @@ func TestConnInitiatorPathMTU(t *testing.T) { if pmtu, err := ipv6.NewConn(c).PathMTU(); err != nil { switch runtime.GOOS { case "darwin": // older darwin kernels don't support IPV6_PATHMTU option - t.Logf("not supported on %q", runtime.GOOS) + t.Logf("not supported on %s", runtime.GOOS) default: t.Fatal(err) } @@ -59,7 +58,7 @@ func TestConnInitiatorPathMTU(t *testing.T) { func TestConnResponderPathMTU(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } if !supportsIPv6 { t.Skip("ipv6 is not supported") @@ -83,7 +82,7 @@ func TestConnResponderPathMTU(t *testing.T) { if pmtu, err := ipv6.NewConn(c).PathMTU(); err != nil { switch runtime.GOOS { case "darwin": // older darwin kernels don't support IPV6_PATHMTU option - t.Logf("not supported on %q", runtime.GOOS) + t.Logf("not supported on %s", runtime.GOOS) default: t.Fatal(err) } @@ -97,13 +96,13 @@ func TestConnResponderPathMTU(t *testing.T) { func TestPacketConnChecksum(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } if !supportsIPv6 { t.Skip("ipv6 is not supported") } - if os.Getuid() != 0 { - t.Skip("must be root") + if m, ok := nettest.SupportsRawIPSocket(); !ok { + t.Skip(m) } c, err := net.ListenPacket(fmt.Sprintf("ip6:%d", iana.ProtocolOSPFIGP), "::") // OSPF for IPv6 diff --git a/vendor/golang.org/x/net/ipv6/sys_bsd.go b/vendor/golang.org/x/net/ipv6/sys_bsd.go index c3ae6e1..75a8863 100644 --- a/vendor/golang.org/x/net/ipv6/sys_bsd.go +++ b/vendor/golang.org/x/net/ipv6/sys_bsd.go @@ -10,7 +10,7 @@ import ( "net" "syscall" - "github.com/vtolstov/svirtnet/internal/iana" + "golang.org/x/net/internal/iana" ) type sysSockoptLen int32 diff --git a/vendor/golang.org/x/net/ipv6/sys_darwin.go b/vendor/golang.org/x/net/ipv6/sys_darwin.go index 3c53ecd..411fb49 100644 --- a/vendor/golang.org/x/net/ipv6/sys_darwin.go +++ b/vendor/golang.org/x/net/ipv6/sys_darwin.go @@ -9,7 +9,7 @@ import ( "syscall" "unsafe" - "github.com/vtolstov/svirtnet/internal/iana" + "golang.org/x/net/internal/iana" ) type sysSockoptLen int32 diff --git a/vendor/golang.org/x/net/ipv6/sys_freebsd.go b/vendor/golang.org/x/net/ipv6/sys_freebsd.go index 4905f0f..b68725c 100644 --- a/vendor/golang.org/x/net/ipv6/sys_freebsd.go +++ b/vendor/golang.org/x/net/ipv6/sys_freebsd.go @@ -6,10 +6,12 @@ package ipv6 import ( "net" + "runtime" + "strings" "syscall" "unsafe" - "github.com/vtolstov/svirtnet/internal/iana" + "golang.org/x/net/internal/iana" ) type sysSockoptLen int32 @@ -45,6 +47,18 @@ var ( } ) +func init() { + if runtime.GOOS == "freebsd" && runtime.GOARCH == "386" { + archs, _ := syscall.Sysctl("kern.supported_archs") + for _, s := range strings.Fields(archs) { + if s == "amd64" { + freebsd32o64 = true + break + } + } + } +} + func (sa *sysSockaddrInet6) setSockaddr(ip net.IP, i int) { sa.Len = sysSizeofSockaddrInet6 sa.Family = syscall.AF_INET6 diff --git a/vendor/golang.org/x/net/ipv6/sys_linux.go b/vendor/golang.org/x/net/ipv6/sys_linux.go index 1978812..2fa6088 100644 --- a/vendor/golang.org/x/net/ipv6/sys_linux.go +++ b/vendor/golang.org/x/net/ipv6/sys_linux.go @@ -9,7 +9,7 @@ import ( "syscall" "unsafe" - "github.com/vtolstov/svirtnet/internal/iana" + "golang.org/x/net/internal/iana" ) type sysSockoptLen int32 diff --git a/vendor/golang.org/x/net/ipv6/sys_windows.go b/vendor/golang.org/x/net/ipv6/sys_windows.go index 446bd8b..fda8757 100644 --- a/vendor/golang.org/x/net/ipv6/sys_windows.go +++ b/vendor/golang.org/x/net/ipv6/sys_windows.go @@ -8,7 +8,7 @@ import ( "net" "syscall" - "github.com/vtolstov/svirtnet/internal/iana" + "golang.org/x/net/internal/iana" ) const ( diff --git a/vendor/golang.org/x/net/ipv6/syscall_unix.go b/vendor/golang.org/x/net/ipv6/syscall_unix.go index 73b949f..a2bd836 100644 --- a/vendor/golang.org/x/net/ipv6/syscall_unix.go +++ b/vendor/golang.org/x/net/ipv6/syscall_unix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build darwin dragonfly freebsd linux,amd64 linux,arm netbsd openbsd +// +build darwin dragonfly freebsd linux,!386 netbsd openbsd package ipv6 diff --git a/vendor/golang.org/x/net/ipv6/unicast_test.go b/vendor/golang.org/x/net/ipv6/unicast_test.go index 8c37593..6165698 100644 --- a/vendor/golang.org/x/net/ipv6/unicast_test.go +++ b/vendor/golang.org/x/net/ipv6/unicast_test.go @@ -12,16 +12,16 @@ import ( "testing" "time" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/icmp" - "github.com/vtolstov/svirtnet/internal/iana" - "github.com/vtolstov/svirtnet/internal/nettest" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv6" + "golang.org/x/net/icmp" + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/nettest" + "golang.org/x/net/ipv6" ) func TestPacketConnReadWriteUnicastUDP(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } if !supportsIPv6 { t.Skip("ipv6 is not supported") @@ -54,7 +54,7 @@ func TestPacketConnReadWriteUnicastUDP(t *testing.T) { for i, toggle := range []bool{true, false, true} { if err := p.SetControlMessage(cf, toggle); err != nil { if nettest.ProtocolNotSupported(err) { - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } t.Fatal(err) } @@ -84,13 +84,13 @@ func TestPacketConnReadWriteUnicastUDP(t *testing.T) { func TestPacketConnReadWriteUnicastICMP(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } if !supportsIPv6 { t.Skip("ipv6 is not supported") } - if os.Getuid() != 0 { - t.Skip("must be root") + if m, ok := nettest.SupportsRawIPSocket(); !ok { + t.Skip(m) } c, err := net.ListenPacket("ip6:ipv6-icmp", "::1") @@ -149,7 +149,7 @@ func TestPacketConnReadWriteUnicastICMP(t *testing.T) { } if err := p.SetControlMessage(cf, toggle); err != nil { if nettest.ProtocolNotSupported(err) { - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } t.Fatal(err) } @@ -169,7 +169,7 @@ func TestPacketConnReadWriteUnicastICMP(t *testing.T) { if n, cm, _, err := p.ReadFrom(rb); err != nil { switch runtime.GOOS { case "darwin": // older darwin kernels have some limitation on receiving icmp packet through raw socket - t.Logf("not supported on %q", runtime.GOOS) + t.Logf("not supported on %s", runtime.GOOS) continue } t.Fatal(err) diff --git a/vendor/golang.org/x/net/ipv6/unicastsockopt_test.go b/vendor/golang.org/x/net/ipv6/unicastsockopt_test.go index 4102912..7bb2e44 100644 --- a/vendor/golang.org/x/net/ipv6/unicastsockopt_test.go +++ b/vendor/golang.org/x/net/ipv6/unicastsockopt_test.go @@ -6,18 +6,18 @@ package ipv6_test import ( "net" - "os" "runtime" "testing" - "github.com/vtolstov/svirtnet/internal/iana" - "github.com/vtolstov/svirtnet/internal/golang.org/x/net/ipv6" + "golang.org/x/net/internal/iana" + "golang.org/x/net/internal/nettest" + "golang.org/x/net/ipv6" ) func TestConnUnicastSocketOptions(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } if !supportsIPv6 { t.Skip("ipv6 is not supported") @@ -53,15 +53,17 @@ var packetConnUnicastSocketOptionTests = []struct { func TestPacketConnUnicastSocketOptions(t *testing.T) { switch runtime.GOOS { case "nacl", "plan9", "solaris", "windows": - t.Skipf("not supported on %q", runtime.GOOS) + t.Skipf("not supported on %s", runtime.GOOS) } if !supportsIPv6 { t.Skip("ipv6 is not supported") } + m, ok := nettest.SupportsRawIPSocket() for _, tt := range packetConnUnicastSocketOptionTests { - if tt.net == "ip6" && os.Getuid() != 0 { - t.Skip("must be root") + if tt.net == "ip6" && !ok { + t.Log(m) + continue } c, err := net.ListenPacket(tt.net+tt.proto, tt.addr) if err != nil { @@ -85,7 +87,7 @@ func testUnicastSocketOptions(t *testing.T, c testIPv6UnicastConn) { if err := c.SetTrafficClass(tclass); err != nil { switch runtime.GOOS { case "darwin": // older darwin kernels don't support IPV6_TCLASS option - t.Logf("not supported on %q", runtime.GOOS) + t.Logf("not supported on %s", runtime.GOOS) goto next } t.Fatal(err) diff --git a/vendor/golang.org/x/net/ipv6/zsys_freebsd_arm.go b/vendor/golang.org/x/net/ipv6/zsys_freebsd_arm.go index 4ace96f..4a62c2d 100644 --- a/vendor/golang.org/x/net/ipv6/zsys_freebsd_arm.go +++ b/vendor/golang.org/x/net/ipv6/zsys_freebsd_arm.go @@ -68,8 +68,8 @@ const ( sysSizeofIPv6Mtuinfo = 0x20 sysSizeofIPv6Mreq = 0x14 - sysSizeofGroupReq = 0x84 - sysSizeofGroupSourceReq = 0x104 + sysSizeofGroupReq = 0x88 + sysSizeofGroupSourceReq = 0x108 sysSizeofICMPv6Filter = 0x20 ) @@ -108,11 +108,13 @@ type sysIPv6Mreq struct { type sysGroupReq struct { Interface uint32 + Pad_cgo_0 [4]byte Group sysSockaddrStorage } type sysGroupSourceReq struct { Interface uint32 + Pad_cgo_0 [4]byte Group sysSockaddrStorage Source sysSockaddrStorage } diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_arm64.go b/vendor/golang.org/x/net/ipv6/zsys_linux_arm64.go new file mode 100644 index 0000000..ab10464 --- /dev/null +++ b/vendor/golang.org/x/net/ipv6/zsys_linux_arm64.go @@ -0,0 +1,156 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +// +build linux,arm64 + +package ipv6 + +const ( + sysIPV6_ADDRFORM = 0x1 + sysIPV6_2292PKTINFO = 0x2 + sysIPV6_2292HOPOPTS = 0x3 + sysIPV6_2292DSTOPTS = 0x4 + sysIPV6_2292RTHDR = 0x5 + sysIPV6_2292PKTOPTIONS = 0x6 + sysIPV6_CHECKSUM = 0x7 + sysIPV6_2292HOPLIMIT = 0x8 + sysIPV6_NEXTHOP = 0x9 + sysIPV6_FLOWINFO = 0xb + + sysIPV6_UNICAST_HOPS = 0x10 + sysIPV6_MULTICAST_IF = 0x11 + sysIPV6_MULTICAST_HOPS = 0x12 + sysIPV6_MULTICAST_LOOP = 0x13 + sysIPV6_ADD_MEMBERSHIP = 0x14 + sysIPV6_DROP_MEMBERSHIP = 0x15 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIPV6_ROUTER_ALERT = 0x16 + sysIPV6_MTU_DISCOVER = 0x17 + sysIPV6_MTU = 0x18 + sysIPV6_RECVERR = 0x19 + sysIPV6_V6ONLY = 0x1a + sysIPV6_JOIN_ANYCAST = 0x1b + sysIPV6_LEAVE_ANYCAST = 0x1c + + sysIPV6_FLOWLABEL_MGR = 0x20 + sysIPV6_FLOWINFO_SEND = 0x21 + + sysIPV6_IPSEC_POLICY = 0x22 + sysIPV6_XFRM_POLICY = 0x23 + + sysIPV6_RECVPKTINFO = 0x31 + sysIPV6_PKTINFO = 0x32 + sysIPV6_RECVHOPLIMIT = 0x33 + sysIPV6_HOPLIMIT = 0x34 + sysIPV6_RECVHOPOPTS = 0x35 + sysIPV6_HOPOPTS = 0x36 + sysIPV6_RTHDRDSTOPTS = 0x37 + sysIPV6_RECVRTHDR = 0x38 + sysIPV6_RTHDR = 0x39 + sysIPV6_RECVDSTOPTS = 0x3a + sysIPV6_DSTOPTS = 0x3b + sysIPV6_RECVPATHMTU = 0x3c + sysIPV6_PATHMTU = 0x3d + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_RECVTCLASS = 0x42 + sysIPV6_TCLASS = 0x43 + + sysIPV6_ADDR_PREFERENCES = 0x48 + + sysIPV6_PREFER_SRC_TMP = 0x1 + sysIPV6_PREFER_SRC_PUBLIC = 0x2 + sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 + sysIPV6_PREFER_SRC_COA = 0x4 + sysIPV6_PREFER_SRC_HOME = 0x400 + sysIPV6_PREFER_SRC_CGA = 0x8 + sysIPV6_PREFER_SRC_NONCGA = 0x800 + + sysIPV6_MINHOPCOUNT = 0x49 + + sysIPV6_ORIGDSTADDR = 0x4a + sysIPV6_RECVORIGDSTADDR = 0x4a + sysIPV6_TRANSPARENT = 0x4b + sysIPV6_UNICAST_IF = 0x4c + + sysICMPV6_FILTER = 0x1 + + sysICMPV6_FILTER_BLOCK = 0x1 + sysICMPV6_FILTER_PASS = 0x2 + sysICMPV6_FILTER_BLOCKOTHERS = 0x3 + sysICMPV6_FILTER_PASSONLY = 0x4 + + sysSizeofKernelSockaddrStorage = 0x80 + sysSizeofSockaddrInet6 = 0x1c + sysSizeofInet6Pktinfo = 0x14 + sysSizeofIPv6Mtuinfo = 0x20 + sysSizeofIPv6FlowlabelReq = 0x20 + + sysSizeofIPv6Mreq = 0x14 + sysSizeofGroupReq = 0x88 + sysSizeofGroupSourceReq = 0x108 + + sysSizeofICMPv6Filter = 0x20 +) + +type sysKernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sysSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type sysInet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex int32 +} + +type sysIPv6Mtuinfo struct { + Addr sysSockaddrInet6 + Mtu uint32 +} + +type sysIPv6FlowlabelReq struct { + Dst [16]byte /* in6_addr */ + Label uint32 + Action uint8 + Share uint8 + Flags uint16 + Expires uint16 + Linger uint16 + X__flr_pad uint32 +} + +type sysIPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Ifindex int32 +} + +type sysGroupReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group sysKernelSockaddrStorage +} + +type sysGroupSourceReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group sysKernelSockaddrStorage + Source sysKernelSockaddrStorage +} + +type sysICMPv6Filter struct { + Data [8]uint32 +} diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64.go b/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64.go new file mode 100644 index 0000000..b99b8a5 --- /dev/null +++ b/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64.go @@ -0,0 +1,156 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +// +build linux,ppc64 + +package ipv6 + +const ( + sysIPV6_ADDRFORM = 0x1 + sysIPV6_2292PKTINFO = 0x2 + sysIPV6_2292HOPOPTS = 0x3 + sysIPV6_2292DSTOPTS = 0x4 + sysIPV6_2292RTHDR = 0x5 + sysIPV6_2292PKTOPTIONS = 0x6 + sysIPV6_CHECKSUM = 0x7 + sysIPV6_2292HOPLIMIT = 0x8 + sysIPV6_NEXTHOP = 0x9 + sysIPV6_FLOWINFO = 0xb + + sysIPV6_UNICAST_HOPS = 0x10 + sysIPV6_MULTICAST_IF = 0x11 + sysIPV6_MULTICAST_HOPS = 0x12 + sysIPV6_MULTICAST_LOOP = 0x13 + sysIPV6_ADD_MEMBERSHIP = 0x14 + sysIPV6_DROP_MEMBERSHIP = 0x15 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIPV6_ROUTER_ALERT = 0x16 + sysIPV6_MTU_DISCOVER = 0x17 + sysIPV6_MTU = 0x18 + sysIPV6_RECVERR = 0x19 + sysIPV6_V6ONLY = 0x1a + sysIPV6_JOIN_ANYCAST = 0x1b + sysIPV6_LEAVE_ANYCAST = 0x1c + + sysIPV6_FLOWLABEL_MGR = 0x20 + sysIPV6_FLOWINFO_SEND = 0x21 + + sysIPV6_IPSEC_POLICY = 0x22 + sysIPV6_XFRM_POLICY = 0x23 + + sysIPV6_RECVPKTINFO = 0x31 + sysIPV6_PKTINFO = 0x32 + sysIPV6_RECVHOPLIMIT = 0x33 + sysIPV6_HOPLIMIT = 0x34 + sysIPV6_RECVHOPOPTS = 0x35 + sysIPV6_HOPOPTS = 0x36 + sysIPV6_RTHDRDSTOPTS = 0x37 + sysIPV6_RECVRTHDR = 0x38 + sysIPV6_RTHDR = 0x39 + sysIPV6_RECVDSTOPTS = 0x3a + sysIPV6_DSTOPTS = 0x3b + sysIPV6_RECVPATHMTU = 0x3c + sysIPV6_PATHMTU = 0x3d + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_RECVTCLASS = 0x42 + sysIPV6_TCLASS = 0x43 + + sysIPV6_ADDR_PREFERENCES = 0x48 + + sysIPV6_PREFER_SRC_TMP = 0x1 + sysIPV6_PREFER_SRC_PUBLIC = 0x2 + sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 + sysIPV6_PREFER_SRC_COA = 0x4 + sysIPV6_PREFER_SRC_HOME = 0x400 + sysIPV6_PREFER_SRC_CGA = 0x8 + sysIPV6_PREFER_SRC_NONCGA = 0x800 + + sysIPV6_MINHOPCOUNT = 0x49 + + sysIPV6_ORIGDSTADDR = 0x4a + sysIPV6_RECVORIGDSTADDR = 0x4a + sysIPV6_TRANSPARENT = 0x4b + sysIPV6_UNICAST_IF = 0x4c + + sysICMPV6_FILTER = 0x1 + + sysICMPV6_FILTER_BLOCK = 0x1 + sysICMPV6_FILTER_PASS = 0x2 + sysICMPV6_FILTER_BLOCKOTHERS = 0x3 + sysICMPV6_FILTER_PASSONLY = 0x4 + + sysSizeofKernelSockaddrStorage = 0x80 + sysSizeofSockaddrInet6 = 0x1c + sysSizeofInet6Pktinfo = 0x14 + sysSizeofIPv6Mtuinfo = 0x20 + sysSizeofIPv6FlowlabelReq = 0x20 + + sysSizeofIPv6Mreq = 0x14 + sysSizeofGroupReq = 0x88 + sysSizeofGroupSourceReq = 0x108 + + sysSizeofICMPv6Filter = 0x20 +) + +type sysKernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sysSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type sysInet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex int32 +} + +type sysIPv6Mtuinfo struct { + Addr sysSockaddrInet6 + Mtu uint32 +} + +type sysIPv6FlowlabelReq struct { + Dst [16]byte /* in6_addr */ + Label uint32 + Action uint8 + Share uint8 + Flags uint16 + Expires uint16 + Linger uint16 + X__flr_pad uint32 +} + +type sysIPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Ifindex int32 +} + +type sysGroupReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group sysKernelSockaddrStorage +} + +type sysGroupSourceReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group sysKernelSockaddrStorage + Source sysKernelSockaddrStorage +} + +type sysICMPv6Filter struct { + Data [8]uint32 +} diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64le.go b/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64le.go new file mode 100644 index 0000000..992b56e --- /dev/null +++ b/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64le.go @@ -0,0 +1,156 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs defs_linux.go + +// +build linux,ppc64le + +package ipv6 + +const ( + sysIPV6_ADDRFORM = 0x1 + sysIPV6_2292PKTINFO = 0x2 + sysIPV6_2292HOPOPTS = 0x3 + sysIPV6_2292DSTOPTS = 0x4 + sysIPV6_2292RTHDR = 0x5 + sysIPV6_2292PKTOPTIONS = 0x6 + sysIPV6_CHECKSUM = 0x7 + sysIPV6_2292HOPLIMIT = 0x8 + sysIPV6_NEXTHOP = 0x9 + sysIPV6_FLOWINFO = 0xb + + sysIPV6_UNICAST_HOPS = 0x10 + sysIPV6_MULTICAST_IF = 0x11 + sysIPV6_MULTICAST_HOPS = 0x12 + sysIPV6_MULTICAST_LOOP = 0x13 + sysIPV6_ADD_MEMBERSHIP = 0x14 + sysIPV6_DROP_MEMBERSHIP = 0x15 + sysMCAST_JOIN_GROUP = 0x2a + sysMCAST_LEAVE_GROUP = 0x2d + sysMCAST_JOIN_SOURCE_GROUP = 0x2e + sysMCAST_LEAVE_SOURCE_GROUP = 0x2f + sysMCAST_BLOCK_SOURCE = 0x2b + sysMCAST_UNBLOCK_SOURCE = 0x2c + sysMCAST_MSFILTER = 0x30 + sysIPV6_ROUTER_ALERT = 0x16 + sysIPV6_MTU_DISCOVER = 0x17 + sysIPV6_MTU = 0x18 + sysIPV6_RECVERR = 0x19 + sysIPV6_V6ONLY = 0x1a + sysIPV6_JOIN_ANYCAST = 0x1b + sysIPV6_LEAVE_ANYCAST = 0x1c + + sysIPV6_FLOWLABEL_MGR = 0x20 + sysIPV6_FLOWINFO_SEND = 0x21 + + sysIPV6_IPSEC_POLICY = 0x22 + sysIPV6_XFRM_POLICY = 0x23 + + sysIPV6_RECVPKTINFO = 0x31 + sysIPV6_PKTINFO = 0x32 + sysIPV6_RECVHOPLIMIT = 0x33 + sysIPV6_HOPLIMIT = 0x34 + sysIPV6_RECVHOPOPTS = 0x35 + sysIPV6_HOPOPTS = 0x36 + sysIPV6_RTHDRDSTOPTS = 0x37 + sysIPV6_RECVRTHDR = 0x38 + sysIPV6_RTHDR = 0x39 + sysIPV6_RECVDSTOPTS = 0x3a + sysIPV6_DSTOPTS = 0x3b + sysIPV6_RECVPATHMTU = 0x3c + sysIPV6_PATHMTU = 0x3d + sysIPV6_DONTFRAG = 0x3e + + sysIPV6_RECVTCLASS = 0x42 + sysIPV6_TCLASS = 0x43 + + sysIPV6_ADDR_PREFERENCES = 0x48 + + sysIPV6_PREFER_SRC_TMP = 0x1 + sysIPV6_PREFER_SRC_PUBLIC = 0x2 + sysIPV6_PREFER_SRC_PUBTMP_DEFAULT = 0x100 + sysIPV6_PREFER_SRC_COA = 0x4 + sysIPV6_PREFER_SRC_HOME = 0x400 + sysIPV6_PREFER_SRC_CGA = 0x8 + sysIPV6_PREFER_SRC_NONCGA = 0x800 + + sysIPV6_MINHOPCOUNT = 0x49 + + sysIPV6_ORIGDSTADDR = 0x4a + sysIPV6_RECVORIGDSTADDR = 0x4a + sysIPV6_TRANSPARENT = 0x4b + sysIPV6_UNICAST_IF = 0x4c + + sysICMPV6_FILTER = 0x1 + + sysICMPV6_FILTER_BLOCK = 0x1 + sysICMPV6_FILTER_PASS = 0x2 + sysICMPV6_FILTER_BLOCKOTHERS = 0x3 + sysICMPV6_FILTER_PASSONLY = 0x4 + + sysSizeofKernelSockaddrStorage = 0x80 + sysSizeofSockaddrInet6 = 0x1c + sysSizeofInet6Pktinfo = 0x14 + sysSizeofIPv6Mtuinfo = 0x20 + sysSizeofIPv6FlowlabelReq = 0x20 + + sysSizeofIPv6Mreq = 0x14 + sysSizeofGroupReq = 0x88 + sysSizeofGroupSourceReq = 0x108 + + sysSizeofICMPv6Filter = 0x20 +) + +type sysKernelSockaddrStorage struct { + Family uint16 + X__data [126]int8 +} + +type sysSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type sysInet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex int32 +} + +type sysIPv6Mtuinfo struct { + Addr sysSockaddrInet6 + Mtu uint32 +} + +type sysIPv6FlowlabelReq struct { + Dst [16]byte /* in6_addr */ + Label uint32 + Action uint8 + Share uint8 + Flags uint16 + Expires uint16 + Linger uint16 + X__flr_pad uint32 +} + +type sysIPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Ifindex int32 +} + +type sysGroupReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group sysKernelSockaddrStorage +} + +type sysGroupSourceReq struct { + Interface uint32 + Pad_cgo_0 [4]byte + Group sysKernelSockaddrStorage + Source sysKernelSockaddrStorage +} + +type sysICMPv6Filter struct { + Data [8]uint32 +} diff --git a/vendor/golang.org/x/net/netutil/listen.go b/vendor/golang.org/x/net/netutil/listen.go new file mode 100644 index 0000000..b317ba2 --- /dev/null +++ b/vendor/golang.org/x/net/netutil/listen.go @@ -0,0 +1,48 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package netutil provides network utility functions, complementing the more +// common ones in the net package. +package netutil // import "golang.org/x/net/netutil" + +import ( + "net" + "sync" +) + +// LimitListener returns a Listener that accepts at most n simultaneous +// connections from the provided Listener. +func LimitListener(l net.Listener, n int) net.Listener { + return &limitListener{l, make(chan struct{}, n)} +} + +type limitListener struct { + net.Listener + sem chan struct{} +} + +func (l *limitListener) acquire() { l.sem <- struct{}{} } +func (l *limitListener) release() { <-l.sem } + +func (l *limitListener) Accept() (net.Conn, error) { + l.acquire() + c, err := l.Listener.Accept() + if err != nil { + l.release() + return nil, err + } + return &limitListenerConn{Conn: c, release: l.release}, nil +} + +type limitListenerConn struct { + net.Conn + releaseOnce sync.Once + release func() +} + +func (l *limitListenerConn) Close() error { + err := l.Conn.Close() + l.releaseOnce.Do(l.release) + return err +} diff --git a/vendor/golang.org/x/net/netutil/listen_test.go b/vendor/golang.org/x/net/netutil/listen_test.go new file mode 100644 index 0000000..c0d5bc2 --- /dev/null +++ b/vendor/golang.org/x/net/netutil/listen_test.go @@ -0,0 +1,106 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.3 + +// (We only run this test on Go 1.3 because the HTTP client timeout behavior +// was bad in previous releases, causing occasional deadlocks.) + +package netutil + +import ( + "errors" + "fmt" + "io" + "io/ioutil" + "net" + "net/http" + "sync" + "sync/atomic" + "testing" + "time" + + "golang.org/x/net/internal/nettest" +) + +func TestLimitListener(t *testing.T) { + const max = 5 + attempts := (nettest.MaxOpenFiles() - max) / 2 + if attempts > 256 { // maximum length of accept queue is 128 by default + attempts = 256 + } + + l, err := net.Listen("tcp", "127.0.0.1:0") + if err != nil { + t.Fatal(err) + } + defer l.Close() + l = LimitListener(l, max) + + var open int32 + go http.Serve(l, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if n := atomic.AddInt32(&open, 1); n > max { + t.Errorf("%d open connections, want <= %d", n, max) + } + defer atomic.AddInt32(&open, -1) + time.Sleep(10 * time.Millisecond) + fmt.Fprint(w, "some body") + })) + + var wg sync.WaitGroup + var failed int32 + for i := 0; i < attempts; i++ { + wg.Add(1) + go func() { + defer wg.Done() + c := http.Client{Timeout: 3 * time.Second} + r, err := c.Get("http://" + l.Addr().String()) + if err != nil { + t.Log(err) + atomic.AddInt32(&failed, 1) + return + } + defer r.Body.Close() + io.Copy(ioutil.Discard, r.Body) + }() + } + wg.Wait() + + // We expect some Gets to fail as the kernel's accept queue is filled, + // but most should succeed. + if int(failed) >= attempts/2 { + t.Errorf("%d requests failed within %d attempts", failed, attempts) + } +} + +type errorListener struct { + net.Listener +} + +func (errorListener) Accept() (net.Conn, error) { + return nil, errFake +} + +var errFake = errors.New("fake error from errorListener") + +// This used to hang. +func TestLimitListenerError(t *testing.T) { + donec := make(chan bool, 1) + go func() { + const n = 2 + ll := LimitListener(errorListener{}, n) + for i := 0; i < n+1; i++ { + _, err := ll.Accept() + if err != errFake { + t.Fatalf("Accept error = %v; want errFake", err) + } + } + donec <- true + }() + select { + case <-donec: + case <-time.After(5 * time.Second): + t.Fatal("timeout. deadlock?") + } +} diff --git a/vendor/golang.org/x/net/proxy/direct.go b/vendor/golang.org/x/net/proxy/direct.go new file mode 100644 index 0000000..4c5ad88 --- /dev/null +++ b/vendor/golang.org/x/net/proxy/direct.go @@ -0,0 +1,18 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package proxy + +import ( + "net" +) + +type direct struct{} + +// Direct is a direct proxy: one that makes network connections directly. +var Direct = direct{} + +func (direct) Dial(network, addr string) (net.Conn, error) { + return net.Dial(network, addr) +} diff --git a/vendor/golang.org/x/net/proxy/per_host.go b/vendor/golang.org/x/net/proxy/per_host.go new file mode 100644 index 0000000..f540b19 --- /dev/null +++ b/vendor/golang.org/x/net/proxy/per_host.go @@ -0,0 +1,140 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package proxy + +import ( + "net" + "strings" +) + +// A PerHost directs connections to a default Dialer unless the hostname +// requested matches one of a number of exceptions. +type PerHost struct { + def, bypass Dialer + + bypassNetworks []*net.IPNet + bypassIPs []net.IP + bypassZones []string + bypassHosts []string +} + +// NewPerHost returns a PerHost Dialer that directs connections to either +// defaultDialer or bypass, depending on whether the connection matches one of +// the configured rules. +func NewPerHost(defaultDialer, bypass Dialer) *PerHost { + return &PerHost{ + def: defaultDialer, + bypass: bypass, + } +} + +// Dial connects to the address addr on the given network through either +// defaultDialer or bypass. +func (p *PerHost) Dial(network, addr string) (c net.Conn, err error) { + host, _, err := net.SplitHostPort(addr) + if err != nil { + return nil, err + } + + return p.dialerForRequest(host).Dial(network, addr) +} + +func (p *PerHost) dialerForRequest(host string) Dialer { + if ip := net.ParseIP(host); ip != nil { + for _, net := range p.bypassNetworks { + if net.Contains(ip) { + return p.bypass + } + } + for _, bypassIP := range p.bypassIPs { + if bypassIP.Equal(ip) { + return p.bypass + } + } + return p.def + } + + for _, zone := range p.bypassZones { + if strings.HasSuffix(host, zone) { + return p.bypass + } + if host == zone[1:] { + // For a zone "example.com", we match "example.com" + // too. + return p.bypass + } + } + for _, bypassHost := range p.bypassHosts { + if bypassHost == host { + return p.bypass + } + } + return p.def +} + +// AddFromString parses a string that contains comma-separated values +// specifying hosts that should use the bypass proxy. Each value is either an +// IP address, a CIDR range, a zone (*.example.com) or a hostname +// (localhost). A best effort is made to parse the string and errors are +// ignored. +func (p *PerHost) AddFromString(s string) { + hosts := strings.Split(s, ",") + for _, host := range hosts { + host = strings.TrimSpace(host) + if len(host) == 0 { + continue + } + if strings.Contains(host, "/") { + // We assume that it's a CIDR address like 127.0.0.0/8 + if _, net, err := net.ParseCIDR(host); err == nil { + p.AddNetwork(net) + } + continue + } + if ip := net.ParseIP(host); ip != nil { + p.AddIP(ip) + continue + } + if strings.HasPrefix(host, "*.") { + p.AddZone(host[1:]) + continue + } + p.AddHost(host) + } +} + +// AddIP specifies an IP address that will use the bypass proxy. Note that +// this will only take effect if a literal IP address is dialed. A connection +// to a named host will never match an IP. +func (p *PerHost) AddIP(ip net.IP) { + p.bypassIPs = append(p.bypassIPs, ip) +} + +// AddNetwork specifies an IP range that will use the bypass proxy. Note that +// this will only take effect if a literal IP address is dialed. A connection +// to a named host will never match. +func (p *PerHost) AddNetwork(net *net.IPNet) { + p.bypassNetworks = append(p.bypassNetworks, net) +} + +// AddZone specifies a DNS suffix that will use the bypass proxy. A zone of +// "example.com" matches "example.com" and all of its subdomains. +func (p *PerHost) AddZone(zone string) { + if strings.HasSuffix(zone, ".") { + zone = zone[:len(zone)-1] + } + if !strings.HasPrefix(zone, ".") { + zone = "." + zone + } + p.bypassZones = append(p.bypassZones, zone) +} + +// AddHost specifies a hostname that will use the bypass proxy. +func (p *PerHost) AddHost(host string) { + if strings.HasSuffix(host, ".") { + host = host[:len(host)-1] + } + p.bypassHosts = append(p.bypassHosts, host) +} diff --git a/vendor/golang.org/x/net/proxy/per_host_test.go b/vendor/golang.org/x/net/proxy/per_host_test.go new file mode 100644 index 0000000..a7d8095 --- /dev/null +++ b/vendor/golang.org/x/net/proxy/per_host_test.go @@ -0,0 +1,55 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package proxy + +import ( + "errors" + "net" + "reflect" + "testing" +) + +type recordingProxy struct { + addrs []string +} + +func (r *recordingProxy) Dial(network, addr string) (net.Conn, error) { + r.addrs = append(r.addrs, addr) + return nil, errors.New("recordingProxy") +} + +func TestPerHost(t *testing.T) { + var def, bypass recordingProxy + perHost := NewPerHost(&def, &bypass) + perHost.AddFromString("localhost,*.zone,127.0.0.1,10.0.0.1/8,1000::/16") + + expectedDef := []string{ + "example.com:123", + "1.2.3.4:123", + "[1001::]:123", + } + expectedBypass := []string{ + "localhost:123", + "zone:123", + "foo.zone:123", + "127.0.0.1:123", + "10.1.2.3:123", + "[1000::]:123", + } + + for _, addr := range expectedDef { + perHost.Dial("tcp", addr) + } + for _, addr := range expectedBypass { + perHost.Dial("tcp", addr) + } + + if !reflect.DeepEqual(expectedDef, def.addrs) { + t.Errorf("Hosts which went to the default proxy didn't match. Got %v, want %v", def.addrs, expectedDef) + } + if !reflect.DeepEqual(expectedBypass, bypass.addrs) { + t.Errorf("Hosts which went to the bypass proxy didn't match. Got %v, want %v", bypass.addrs, expectedBypass) + } +} diff --git a/vendor/golang.org/x/net/proxy/proxy.go b/vendor/golang.org/x/net/proxy/proxy.go new file mode 100644 index 0000000..78a8b7b --- /dev/null +++ b/vendor/golang.org/x/net/proxy/proxy.go @@ -0,0 +1,94 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package proxy provides support for a variety of protocols to proxy network +// data. +package proxy // import "golang.org/x/net/proxy" + +import ( + "errors" + "net" + "net/url" + "os" +) + +// A Dialer is a means to establish a connection. +type Dialer interface { + // Dial connects to the given address via the proxy. + Dial(network, addr string) (c net.Conn, err error) +} + +// Auth contains authentication parameters that specific Dialers may require. +type Auth struct { + User, Password string +} + +// FromEnvironment returns the dialer specified by the proxy related variables in +// the environment. +func FromEnvironment() Dialer { + allProxy := os.Getenv("all_proxy") + if len(allProxy) == 0 { + return Direct + } + + proxyURL, err := url.Parse(allProxy) + if err != nil { + return Direct + } + proxy, err := FromURL(proxyURL, Direct) + if err != nil { + return Direct + } + + noProxy := os.Getenv("no_proxy") + if len(noProxy) == 0 { + return proxy + } + + perHost := NewPerHost(proxy, Direct) + perHost.AddFromString(noProxy) + return perHost +} + +// proxySchemes is a map from URL schemes to a function that creates a Dialer +// from a URL with such a scheme. +var proxySchemes map[string]func(*url.URL, Dialer) (Dialer, error) + +// RegisterDialerType takes a URL scheme and a function to generate Dialers from +// a URL with that scheme and a forwarding Dialer. Registered schemes are used +// by FromURL. +func RegisterDialerType(scheme string, f func(*url.URL, Dialer) (Dialer, error)) { + if proxySchemes == nil { + proxySchemes = make(map[string]func(*url.URL, Dialer) (Dialer, error)) + } + proxySchemes[scheme] = f +} + +// FromURL returns a Dialer given a URL specification and an underlying +// Dialer for it to make network requests. +func FromURL(u *url.URL, forward Dialer) (Dialer, error) { + var auth *Auth + if u.User != nil { + auth = new(Auth) + auth.User = u.User.Username() + if p, ok := u.User.Password(); ok { + auth.Password = p + } + } + + switch u.Scheme { + case "socks5": + return SOCKS5("tcp", u.Host, auth, forward) + } + + // If the scheme doesn't match any of the built-in schemes, see if it + // was registered by another package. + if proxySchemes != nil { + if f, ok := proxySchemes[u.Scheme]; ok { + return f(u, forward) + } + } + + return nil, errors.New("proxy: unknown scheme: " + u.Scheme) +} diff --git a/vendor/golang.org/x/net/proxy/proxy_test.go b/vendor/golang.org/x/net/proxy/proxy_test.go new file mode 100644 index 0000000..c19a5c0 --- /dev/null +++ b/vendor/golang.org/x/net/proxy/proxy_test.go @@ -0,0 +1,142 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package proxy + +import ( + "io" + "net" + "net/url" + "strconv" + "sync" + "testing" +) + +func TestFromURL(t *testing.T) { + endSystem, err := net.Listen("tcp", "127.0.0.1:0") + if err != nil { + t.Fatalf("net.Listen failed: %v", err) + } + defer endSystem.Close() + gateway, err := net.Listen("tcp", "127.0.0.1:0") + if err != nil { + t.Fatalf("net.Listen failed: %v", err) + } + defer gateway.Close() + + var wg sync.WaitGroup + wg.Add(1) + go socks5Gateway(t, gateway, endSystem, socks5Domain, &wg) + + url, err := url.Parse("socks5://user:password@" + gateway.Addr().String()) + if err != nil { + t.Fatalf("url.Parse failed: %v", err) + } + proxy, err := FromURL(url, Direct) + if err != nil { + t.Fatalf("FromURL failed: %v", err) + } + _, port, err := net.SplitHostPort(endSystem.Addr().String()) + if err != nil { + t.Fatalf("net.SplitHostPort failed: %v", err) + } + if c, err := proxy.Dial("tcp", "localhost:"+port); err != nil { + t.Fatalf("FromURL.Dial failed: %v", err) + } else { + c.Close() + } + + wg.Wait() +} + +func TestSOCKS5(t *testing.T) { + endSystem, err := net.Listen("tcp", "127.0.0.1:0") + if err != nil { + t.Fatalf("net.Listen failed: %v", err) + } + defer endSystem.Close() + gateway, err := net.Listen("tcp", "127.0.0.1:0") + if err != nil { + t.Fatalf("net.Listen failed: %v", err) + } + defer gateway.Close() + + var wg sync.WaitGroup + wg.Add(1) + go socks5Gateway(t, gateway, endSystem, socks5IP4, &wg) + + proxy, err := SOCKS5("tcp", gateway.Addr().String(), nil, Direct) + if err != nil { + t.Fatalf("SOCKS5 failed: %v", err) + } + if c, err := proxy.Dial("tcp", endSystem.Addr().String()); err != nil { + t.Fatalf("SOCKS5.Dial failed: %v", err) + } else { + c.Close() + } + + wg.Wait() +} + +func socks5Gateway(t *testing.T, gateway, endSystem net.Listener, typ byte, wg *sync.WaitGroup) { + defer wg.Done() + + c, err := gateway.Accept() + if err != nil { + t.Errorf("net.Listener.Accept failed: %v", err) + return + } + defer c.Close() + + b := make([]byte, 32) + var n int + if typ == socks5Domain { + n = 4 + } else { + n = 3 + } + if _, err := io.ReadFull(c, b[:n]); err != nil { + t.Errorf("io.ReadFull failed: %v", err) + return + } + if _, err := c.Write([]byte{socks5Version, socks5AuthNone}); err != nil { + t.Errorf("net.Conn.Write failed: %v", err) + return + } + if typ == socks5Domain { + n = 16 + } else { + n = 10 + } + if _, err := io.ReadFull(c, b[:n]); err != nil { + t.Errorf("io.ReadFull failed: %v", err) + return + } + if b[0] != socks5Version || b[1] != socks5Connect || b[2] != 0x00 || b[3] != typ { + t.Errorf("got an unexpected packet: %#02x %#02x %#02x %#02x", b[0], b[1], b[2], b[3]) + return + } + if typ == socks5Domain { + copy(b[:5], []byte{socks5Version, 0x00, 0x00, socks5Domain, 9}) + b = append(b, []byte("localhost")...) + } else { + copy(b[:4], []byte{socks5Version, 0x00, 0x00, socks5IP4}) + } + host, port, err := net.SplitHostPort(endSystem.Addr().String()) + if err != nil { + t.Errorf("net.SplitHostPort failed: %v", err) + return + } + b = append(b, []byte(net.ParseIP(host).To4())...) + p, err := strconv.Atoi(port) + if err != nil { + t.Errorf("strconv.Atoi failed: %v", err) + return + } + b = append(b, []byte{byte(p >> 8), byte(p)}...) + if _, err := c.Write(b); err != nil { + t.Errorf("net.Conn.Write failed: %v", err) + return + } +} diff --git a/vendor/golang.org/x/net/proxy/socks5.go b/vendor/golang.org/x/net/proxy/socks5.go new file mode 100644 index 0000000..9b96282 --- /dev/null +++ b/vendor/golang.org/x/net/proxy/socks5.go @@ -0,0 +1,210 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package proxy + +import ( + "errors" + "io" + "net" + "strconv" +) + +// SOCKS5 returns a Dialer that makes SOCKSv5 connections to the given address +// with an optional username and password. See RFC 1928. +func SOCKS5(network, addr string, auth *Auth, forward Dialer) (Dialer, error) { + s := &socks5{ + network: network, + addr: addr, + forward: forward, + } + if auth != nil { + s.user = auth.User + s.password = auth.Password + } + + return s, nil +} + +type socks5 struct { + user, password string + network, addr string + forward Dialer +} + +const socks5Version = 5 + +const ( + socks5AuthNone = 0 + socks5AuthPassword = 2 +) + +const socks5Connect = 1 + +const ( + socks5IP4 = 1 + socks5Domain = 3 + socks5IP6 = 4 +) + +var socks5Errors = []string{ + "", + "general failure", + "connection forbidden", + "network unreachable", + "host unreachable", + "connection refused", + "TTL expired", + "command not supported", + "address type not supported", +} + +// Dial connects to the address addr on the network net via the SOCKS5 proxy. +func (s *socks5) Dial(network, addr string) (net.Conn, error) { + switch network { + case "tcp", "tcp6", "tcp4": + default: + return nil, errors.New("proxy: no support for SOCKS5 proxy connections of type " + network) + } + + conn, err := s.forward.Dial(s.network, s.addr) + if err != nil { + return nil, err + } + closeConn := &conn + defer func() { + if closeConn != nil { + (*closeConn).Close() + } + }() + + host, portStr, err := net.SplitHostPort(addr) + if err != nil { + return nil, err + } + + port, err := strconv.Atoi(portStr) + if err != nil { + return nil, errors.New("proxy: failed to parse port number: " + portStr) + } + if port < 1 || port > 0xffff { + return nil, errors.New("proxy: port number out of range: " + portStr) + } + + // the size here is just an estimate + buf := make([]byte, 0, 6+len(host)) + + buf = append(buf, socks5Version) + if len(s.user) > 0 && len(s.user) < 256 && len(s.password) < 256 { + buf = append(buf, 2 /* num auth methods */, socks5AuthNone, socks5AuthPassword) + } else { + buf = append(buf, 1 /* num auth methods */, socks5AuthNone) + } + + if _, err := conn.Write(buf); err != nil { + return nil, errors.New("proxy: failed to write greeting to SOCKS5 proxy at " + s.addr + ": " + err.Error()) + } + + if _, err := io.ReadFull(conn, buf[:2]); err != nil { + return nil, errors.New("proxy: failed to read greeting from SOCKS5 proxy at " + s.addr + ": " + err.Error()) + } + if buf[0] != 5 { + return nil, errors.New("proxy: SOCKS5 proxy at " + s.addr + " has unexpected version " + strconv.Itoa(int(buf[0]))) + } + if buf[1] == 0xff { + return nil, errors.New("proxy: SOCKS5 proxy at " + s.addr + " requires authentication") + } + + if buf[1] == socks5AuthPassword { + buf = buf[:0] + buf = append(buf, 1 /* password protocol version */) + buf = append(buf, uint8(len(s.user))) + buf = append(buf, s.user...) + buf = append(buf, uint8(len(s.password))) + buf = append(buf, s.password...) + + if _, err := conn.Write(buf); err != nil { + return nil, errors.New("proxy: failed to write authentication request to SOCKS5 proxy at " + s.addr + ": " + err.Error()) + } + + if _, err := io.ReadFull(conn, buf[:2]); err != nil { + return nil, errors.New("proxy: failed to read authentication reply from SOCKS5 proxy at " + s.addr + ": " + err.Error()) + } + + if buf[1] != 0 { + return nil, errors.New("proxy: SOCKS5 proxy at " + s.addr + " rejected username/password") + } + } + + buf = buf[:0] + buf = append(buf, socks5Version, socks5Connect, 0 /* reserved */) + + if ip := net.ParseIP(host); ip != nil { + if ip4 := ip.To4(); ip4 != nil { + buf = append(buf, socks5IP4) + ip = ip4 + } else { + buf = append(buf, socks5IP6) + } + buf = append(buf, ip...) + } else { + if len(host) > 255 { + return nil, errors.New("proxy: destination hostname too long: " + host) + } + buf = append(buf, socks5Domain) + buf = append(buf, byte(len(host))) + buf = append(buf, host...) + } + buf = append(buf, byte(port>>8), byte(port)) + + if _, err := conn.Write(buf); err != nil { + return nil, errors.New("proxy: failed to write connect request to SOCKS5 proxy at " + s.addr + ": " + err.Error()) + } + + if _, err := io.ReadFull(conn, buf[:4]); err != nil { + return nil, errors.New("proxy: failed to read connect reply from SOCKS5 proxy at " + s.addr + ": " + err.Error()) + } + + failure := "unknown error" + if int(buf[1]) < len(socks5Errors) { + failure = socks5Errors[buf[1]] + } + + if len(failure) > 0 { + return nil, errors.New("proxy: SOCKS5 proxy at " + s.addr + " failed to connect: " + failure) + } + + bytesToDiscard := 0 + switch buf[3] { + case socks5IP4: + bytesToDiscard = net.IPv4len + case socks5IP6: + bytesToDiscard = net.IPv6len + case socks5Domain: + _, err := io.ReadFull(conn, buf[:1]) + if err != nil { + return nil, errors.New("proxy: failed to read domain length from SOCKS5 proxy at " + s.addr + ": " + err.Error()) + } + bytesToDiscard = int(buf[0]) + default: + return nil, errors.New("proxy: got unknown address type " + strconv.Itoa(int(buf[3])) + " from SOCKS5 proxy at " + s.addr) + } + + if cap(buf) < bytesToDiscard { + buf = make([]byte, bytesToDiscard) + } else { + buf = buf[:bytesToDiscard] + } + if _, err := io.ReadFull(conn, buf); err != nil { + return nil, errors.New("proxy: failed to read address from SOCKS5 proxy at " + s.addr + ": " + err.Error()) + } + + // Also need to discard the port number + if _, err := io.ReadFull(conn, buf[:2]); err != nil { + return nil, errors.New("proxy: failed to read port from SOCKS5 proxy at " + s.addr + ": " + err.Error()) + } + + closeConn = nil + return conn, nil +} diff --git a/vendor/golang.org/x/net/publicsuffix/gen.go b/vendor/golang.org/x/net/publicsuffix/gen.go new file mode 100644 index 0000000..ee2598c --- /dev/null +++ b/vendor/golang.org/x/net/publicsuffix/gen.go @@ -0,0 +1,608 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +package main + +// This program generates table.go and table_test.go. +// Invoke as: +// +// go run gen.go -version "xxx" >table.go +// go run gen.go -version "xxx" -test >table_test.go +// +// The version is derived from information found at +// https://github.com/publicsuffix/list/commits/master/public_suffix_list.dat +// +// To fetch a particular git revision, such as 5c70ccd250, pass +// -url "https://raw.githubusercontent.com/publicsuffix/list/5c70ccd250/public_suffix_list.dat" + +import ( + "bufio" + "bytes" + "flag" + "fmt" + "go/format" + "io" + "net/http" + "os" + "regexp" + "sort" + "strings" + + "golang.org/x/net/idna" +) + +const ( + nodesBitsChildren = 9 + nodesBitsICANN = 1 + nodesBitsTextOffset = 15 + nodesBitsTextLength = 6 + + childrenBitsWildcard = 1 + childrenBitsNodeType = 2 + childrenBitsHi = 14 + childrenBitsLo = 14 +) + +var ( + maxChildren int + maxTextOffset int + maxTextLength int + maxHi uint32 + maxLo uint32 +) + +func max(a, b int) int { + if a < b { + return b + } + return a +} + +func u32max(a, b uint32) uint32 { + if a < b { + return b + } + return a +} + +const ( + nodeTypeNormal = 0 + nodeTypeException = 1 + nodeTypeParentOnly = 2 + numNodeType = 3 +) + +func nodeTypeStr(n int) string { + switch n { + case nodeTypeNormal: + return "+" + case nodeTypeException: + return "!" + case nodeTypeParentOnly: + return "o" + } + panic("unreachable") +} + +var ( + labelEncoding = map[string]uint32{} + labelsList = []string{} + labelsMap = map[string]bool{} + rules = []string{} + + // validSuffix is used to check that the entries in the public suffix list + // are in canonical form (after Punycode encoding). Specifically, capital + // letters are not allowed. + validSuffix = regexp.MustCompile(`^[a-z0-9_\!\*\-\.]+$`) + + crush = flag.Bool("crush", true, "make the generated node text as small as possible") + subset = flag.Bool("subset", false, "generate only a subset of the full table, for debugging") + url = flag.String("url", + "https://publicsuffix.org/list/effective_tld_names.dat", + "URL of the publicsuffix.org list. If empty, stdin is read instead") + v = flag.Bool("v", false, "verbose output (to stderr)") + version = flag.String("version", "", "the effective_tld_names.dat version") + test = flag.Bool("test", false, "generate table_test.go") +) + +func main() { + if err := main1(); err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } +} + +func main1() error { + flag.Parse() + if nodesBitsTextLength+nodesBitsTextOffset+nodesBitsICANN+nodesBitsChildren > 32 { + return fmt.Errorf("not enough bits to encode the nodes table") + } + if childrenBitsLo+childrenBitsHi+childrenBitsNodeType+childrenBitsWildcard > 32 { + return fmt.Errorf("not enough bits to encode the children table") + } + if *version == "" { + return fmt.Errorf("-version was not specified") + } + var r io.Reader = os.Stdin + if *url != "" { + res, err := http.Get(*url) + if err != nil { + return err + } + if res.StatusCode != http.StatusOK { + return fmt.Errorf("bad GET status for %s: %d", *url, res.Status) + } + r = res.Body + defer res.Body.Close() + } + + var root node + icann := false + buf := new(bytes.Buffer) + br := bufio.NewReader(r) + for { + s, err := br.ReadString('\n') + if err != nil { + if err == io.EOF { + break + } + return err + } + s = strings.TrimSpace(s) + if strings.Contains(s, "BEGIN ICANN DOMAINS") { + icann = true + continue + } + if strings.Contains(s, "END ICANN DOMAINS") { + icann = false + continue + } + if s == "" || strings.HasPrefix(s, "//") { + continue + } + s, err = idna.ToASCII(s) + if err != nil { + return err + } + if !validSuffix.MatchString(s) { + return fmt.Errorf("bad publicsuffix.org list data: %q", s) + } + + if *subset { + switch { + case s == "ac.jp" || strings.HasSuffix(s, ".ac.jp"): + case s == "ak.us" || strings.HasSuffix(s, ".ak.us"): + case s == "ao" || strings.HasSuffix(s, ".ao"): + case s == "ar" || strings.HasSuffix(s, ".ar"): + case s == "arpa" || strings.HasSuffix(s, ".arpa"): + case s == "cy" || strings.HasSuffix(s, ".cy"): + case s == "dyndns.org" || strings.HasSuffix(s, ".dyndns.org"): + case s == "jp": + case s == "kobe.jp" || strings.HasSuffix(s, ".kobe.jp"): + case s == "kyoto.jp" || strings.HasSuffix(s, ".kyoto.jp"): + case s == "om" || strings.HasSuffix(s, ".om"): + case s == "uk" || strings.HasSuffix(s, ".uk"): + case s == "uk.com" || strings.HasSuffix(s, ".uk.com"): + case s == "tw" || strings.HasSuffix(s, ".tw"): + case s == "zw" || strings.HasSuffix(s, ".zw"): + case s == "xn--p1ai" || strings.HasSuffix(s, ".xn--p1ai"): + // xn--p1ai is Russian-Cyrillic "рф". + default: + continue + } + } + + rules = append(rules, s) + + nt, wildcard := nodeTypeNormal, false + switch { + case strings.HasPrefix(s, "*."): + s, nt = s[2:], nodeTypeParentOnly + wildcard = true + case strings.HasPrefix(s, "!"): + s, nt = s[1:], nodeTypeException + } + labels := strings.Split(s, ".") + for n, i := &root, len(labels)-1; i >= 0; i-- { + label := labels[i] + n = n.child(label) + if i == 0 { + if nt != nodeTypeParentOnly && n.nodeType == nodeTypeParentOnly { + n.nodeType = nt + } + n.icann = n.icann && icann + n.wildcard = n.wildcard || wildcard + } + labelsMap[label] = true + } + } + labelsList = make([]string, 0, len(labelsMap)) + for label := range labelsMap { + labelsList = append(labelsList, label) + } + sort.Strings(labelsList) + + p := printReal + if *test { + p = printTest + } + if err := p(buf, &root); err != nil { + return err + } + + b, err := format.Source(buf.Bytes()) + if err != nil { + return err + } + _, err = os.Stdout.Write(b) + return err +} + +func printTest(w io.Writer, n *node) error { + fmt.Fprintf(w, "// generated by go run gen.go; DO NOT EDIT\n\n") + fmt.Fprintf(w, "package publicsuffix\n\nvar rules = [...]string{\n") + for _, rule := range rules { + fmt.Fprintf(w, "%q,\n", rule) + } + fmt.Fprintf(w, "}\n\nvar nodeLabels = [...]string{\n") + if err := n.walk(w, printNodeLabel); err != nil { + return err + } + fmt.Fprintf(w, "}\n") + return nil +} + +func printReal(w io.Writer, n *node) error { + const header = `// generated by go run gen.go; DO NOT EDIT + +package publicsuffix + +const version = %q + +const ( + nodesBitsChildren = %d + nodesBitsICANN = %d + nodesBitsTextOffset = %d + nodesBitsTextLength = %d + + childrenBitsWildcard = %d + childrenBitsNodeType = %d + childrenBitsHi = %d + childrenBitsLo = %d +) + +const ( + nodeTypeNormal = %d + nodeTypeException = %d + nodeTypeParentOnly = %d +) + +// numTLD is the number of top level domains. +const numTLD = %d + +` + fmt.Fprintf(w, header, *version, + nodesBitsChildren, nodesBitsICANN, nodesBitsTextOffset, nodesBitsTextLength, + childrenBitsWildcard, childrenBitsNodeType, childrenBitsHi, childrenBitsLo, + nodeTypeNormal, nodeTypeException, nodeTypeParentOnly, len(n.children)) + + text := makeText() + if text == "" { + return fmt.Errorf("internal error: makeText returned no text") + } + for _, label := range labelsList { + offset, length := strings.Index(text, label), len(label) + if offset < 0 { + return fmt.Errorf("internal error: could not find %q in text %q", label, text) + } + maxTextOffset, maxTextLength = max(maxTextOffset, offset), max(maxTextLength, length) + if offset >= 1<= 1< 64 { + n, plus = 64, " +" + } + fmt.Fprintf(w, "%q%s\n", text[:n], plus) + text = text[n:] + } + + n.walk(w, assignIndexes) + + fmt.Fprintf(w, ` + +// nodes is the list of nodes. Each node is represented as a uint32, which +// encodes the node's children, wildcard bit and node type (as an index into +// the children array), ICANN bit and text. +// +// In the //-comment after each node's data, the nodes indexes of the children +// are formatted as (n0x1234-n0x1256), with * denoting the wildcard bit. The +// nodeType is printed as + for normal, ! for exception, and o for parent-only +// nodes that have children but don't match a domain label in their own right. +// An I denotes an ICANN domain. +// +// The layout within the uint32, from MSB to LSB, is: +// [%2d bits] unused +// [%2d bits] children index +// [%2d bits] ICANN bit +// [%2d bits] text index +// [%2d bits] text length +var nodes = [...]uint32{ +`, + 32-nodesBitsChildren-nodesBitsICANN-nodesBitsTextOffset-nodesBitsTextLength, + nodesBitsChildren, nodesBitsICANN, nodesBitsTextOffset, nodesBitsTextLength) + if err := n.walk(w, printNode); err != nil { + return err + } + fmt.Fprintf(w, `} + +// children is the list of nodes' children, the parent's wildcard bit and the +// parent's node type. If a node has no children then their children index +// will be in the range [0, 6), depending on the wildcard bit and node type. +// +// The layout within the uint32, from MSB to LSB, is: +// [%2d bits] unused +// [%2d bits] wildcard bit +// [%2d bits] node type +// [%2d bits] high nodes index (exclusive) of children +// [%2d bits] low nodes index (inclusive) of children +var children=[...]uint32{ +`, + 32-childrenBitsWildcard-childrenBitsNodeType-childrenBitsHi-childrenBitsLo, + childrenBitsWildcard, childrenBitsNodeType, childrenBitsHi, childrenBitsLo) + for i, c := range childrenEncoding { + s := "---------------" + lo := c & (1<> childrenBitsLo) & (1<>(childrenBitsLo+childrenBitsHi)) & (1<>(childrenBitsLo+childrenBitsHi+childrenBitsNodeType) != 0 + fmt.Fprintf(w, "0x%08x, // c0x%04x (%s)%s %s\n", + c, i, s, wildcardStr(wildcard), nodeTypeStr(nodeType)) + } + fmt.Fprintf(w, "}\n\n") + fmt.Fprintf(w, "// max children %d (capacity %d)\n", maxChildren, 1<= 1<= 1<= 1< 0 && ss[0] == "" { + ss = ss[1:] + } + + // Join strings where one suffix matches another prefix. + for { + // Find best i, j, k such that ss[i][len-k:] == ss[j][:k], + // maximizing overlap length k. + besti := -1 + bestj := -1 + bestk := 0 + for i, s := range ss { + if s == "" { + continue + } + for j, t := range ss { + if i == j { + continue + } + for k := bestk + 1; k <= len(s) && k <= len(t); k++ { + if s[len(s)-k:] == t[:k] { + besti = i + bestj = j + bestk = k + } + } + } + } + if bestk > 0 { + if *v { + fmt.Fprintf(os.Stderr, "%d-length overlap at (%4d,%4d) out of (%4d,%4d): %q and %q\n", + bestk, besti, bestj, len(ss), len(ss), ss[besti], ss[bestj]) + } + ss[besti] += ss[bestj][bestk:] + ss[bestj] = "" + continue + } + break + } + + text := strings.Join(ss, "") + if *v { + fmt.Fprintf(os.Stderr, "crushed %d bytes to become %d bytes\n", beforeLength, len(text)) + } + return text +} diff --git a/vendor/golang.org/x/net/publicsuffix/list.go b/vendor/golang.org/x/net/publicsuffix/list.go new file mode 100644 index 0000000..9419ca9 --- /dev/null +++ b/vendor/golang.org/x/net/publicsuffix/list.go @@ -0,0 +1,133 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package publicsuffix provides a public suffix list based on data from +// http://publicsuffix.org/. A public suffix is one under which Internet users +// can directly register names. +package publicsuffix // import "golang.org/x/net/publicsuffix" + +// TODO: specify case sensitivity and leading/trailing dot behavior for +// func PublicSuffix and func EffectiveTLDPlusOne. + +import ( + "fmt" + "net/http/cookiejar" + "strings" +) + +// List implements the cookiejar.PublicSuffixList interface by calling the +// PublicSuffix function. +var List cookiejar.PublicSuffixList = list{} + +type list struct{} + +func (list) PublicSuffix(domain string) string { + ps, _ := PublicSuffix(domain) + return ps +} + +func (list) String() string { + return version +} + +// PublicSuffix returns the public suffix of the domain using a copy of the +// publicsuffix.org database compiled into the library. +// +// icann is whether the public suffix is managed by the Internet Corporation +// for Assigned Names and Numbers. If not, the public suffix is privately +// managed. For example, foo.org and foo.co.uk are ICANN domains, +// foo.dyndns.org and foo.blogspot.co.uk are private domains. +// +// Use cases for distinguishing ICANN domains like foo.com from private +// domains like foo.appspot.com can be found at +// https://wiki.mozilla.org/Public_Suffix_List/Use_Cases +func PublicSuffix(domain string) (publicSuffix string, icann bool) { + lo, hi := uint32(0), uint32(numTLD) + s, suffix, wildcard := domain, len(domain), false +loop: + for { + dot := strings.LastIndex(s, ".") + if wildcard { + suffix = 1 + dot + } + if lo == hi { + break + } + f := find(s[1+dot:], lo, hi) + if f == notFound { + break + } + + u := nodes[f] >> (nodesBitsTextOffset + nodesBitsTextLength) + icann = u&(1<>= nodesBitsICANN + u = children[u&(1<>= childrenBitsLo + hi = u & (1<>= childrenBitsHi + switch u & (1<>= childrenBitsNodeType + wildcard = u&(1<>= nodesBitsTextLength + offset := x & (1< len(b[j]) +} + +// eTLDPlusOneTestCases come from +// https://github.com/publicsuffix/list/blob/master/tests/test_psl.txt +var eTLDPlusOneTestCases = []struct { + domain, want string +}{ + // Empty input. + {"", ""}, + // Unlisted TLD. + {"example", ""}, + {"example.example", "example.example"}, + {"b.example.example", "example.example"}, + {"a.b.example.example", "example.example"}, + // TLD with only 1 rule. + {"biz", ""}, + {"domain.biz", "domain.biz"}, + {"b.domain.biz", "domain.biz"}, + {"a.b.domain.biz", "domain.biz"}, + // TLD with some 2-level rules. + {"com", ""}, + {"example.com", "example.com"}, + {"b.example.com", "example.com"}, + {"a.b.example.com", "example.com"}, + {"uk.com", ""}, + {"example.uk.com", "example.uk.com"}, + {"b.example.uk.com", "example.uk.com"}, + {"a.b.example.uk.com", "example.uk.com"}, + {"test.ac", "test.ac"}, + // TLD with only 1 (wildcard) rule. + {"mm", ""}, + {"c.mm", ""}, + {"b.c.mm", "b.c.mm"}, + {"a.b.c.mm", "b.c.mm"}, + // More complex TLD. + {"jp", ""}, + {"test.jp", "test.jp"}, + {"www.test.jp", "test.jp"}, + {"ac.jp", ""}, + {"test.ac.jp", "test.ac.jp"}, + {"www.test.ac.jp", "test.ac.jp"}, + {"kyoto.jp", ""}, + {"test.kyoto.jp", "test.kyoto.jp"}, + {"ide.kyoto.jp", ""}, + {"b.ide.kyoto.jp", "b.ide.kyoto.jp"}, + {"a.b.ide.kyoto.jp", "b.ide.kyoto.jp"}, + {"c.kobe.jp", ""}, + {"b.c.kobe.jp", "b.c.kobe.jp"}, + {"a.b.c.kobe.jp", "b.c.kobe.jp"}, + {"city.kobe.jp", "city.kobe.jp"}, + {"www.city.kobe.jp", "city.kobe.jp"}, + // TLD with a wildcard rule and exceptions. + {"ck", ""}, + {"test.ck", ""}, + {"b.test.ck", "b.test.ck"}, + {"a.b.test.ck", "b.test.ck"}, + {"www.ck", "www.ck"}, + {"www.www.ck", "www.ck"}, + // US K12. + {"us", ""}, + {"test.us", "test.us"}, + {"www.test.us", "test.us"}, + {"ak.us", ""}, + {"test.ak.us", "test.ak.us"}, + {"www.test.ak.us", "test.ak.us"}, + {"k12.ak.us", ""}, + {"test.k12.ak.us", "test.k12.ak.us"}, + {"www.test.k12.ak.us", "test.k12.ak.us"}, + // Punycoded IDN labels + {"xn--85x722f.com.cn", "xn--85x722f.com.cn"}, + {"xn--85x722f.xn--55qx5d.cn", "xn--85x722f.xn--55qx5d.cn"}, + {"www.xn--85x722f.xn--55qx5d.cn", "xn--85x722f.xn--55qx5d.cn"}, + {"shishi.xn--55qx5d.cn", "shishi.xn--55qx5d.cn"}, + {"xn--55qx5d.cn", ""}, + {"xn--85x722f.xn--fiqs8s", "xn--85x722f.xn--fiqs8s"}, + {"www.xn--85x722f.xn--fiqs8s", "xn--85x722f.xn--fiqs8s"}, + {"shishi.xn--fiqs8s", "shishi.xn--fiqs8s"}, + {"xn--fiqs8s", ""}, +} + +func TestEffectiveTLDPlusOne(t *testing.T) { + for _, tc := range eTLDPlusOneTestCases { + got, _ := EffectiveTLDPlusOne(tc.domain) + if got != tc.want { + t.Errorf("%q: got %q, want %q", tc.domain, got, tc.want) + } + } +} diff --git a/vendor/golang.org/x/net/publicsuffix/table.go b/vendor/golang.org/x/net/publicsuffix/table.go new file mode 100644 index 0000000..8acecbc --- /dev/null +++ b/vendor/golang.org/x/net/publicsuffix/table.go @@ -0,0 +1,8708 @@ +// generated by go run gen.go; DO NOT EDIT + +package publicsuffix + +const version = "publicsuffix.org's public_suffix_list.dat, git revision 8952c0c (2015-10-12)" + +const ( + nodesBitsChildren = 9 + nodesBitsICANN = 1 + nodesBitsTextOffset = 15 + nodesBitsTextLength = 6 + + childrenBitsWildcard = 1 + childrenBitsNodeType = 2 + childrenBitsHi = 14 + childrenBitsLo = 14 +) + +const ( + nodeTypeNormal = 0 + nodeTypeException = 1 + nodeTypeParentOnly = 2 +) + +// numTLD is the number of top level domains. +const numTLD = 1526 + +// Text is the combined text of all labels. +const text = "bievatmallorcafederationavigationavuotnakhodkananporovnoddabifuk" + + "agawalmartateyamabihorologyurihonjournalistjordalshalsenayoromut" + + "ashinainvestmentsamsclubindalinkaszubyusuharabikedatingliwicebil" + + "baogakievenesurancebillustrationflatangerbiostrowiecasadelamoned" + + "abirdartcenterprisesakikonairbusantiquest-a-la-maisondre-landebu" + + "dejjudygarlandurhamburglobalashovhachinoheguris-a-candidatebirke" + + "nesoddtangenovarabirthplacebjarkoyusuisservicesamsunglobodoes-it" + + "veronaharimalvikatowicebjerkreimmobilienfshostrodawarabjugnhsanf" + + "ranciscotlandvrdnsangostrowwlkpmglogowegroweiboltatsunoblockbust" + + "ernopilawalterbloombergbauernurembergloppenzaogashimadachicagobo" + + "atsanjotattoolsztynsettlersannanikkoebenhavnikolaeverbankatsushi" + + "kabeerbluedatsunanjoetsuwanouchikujogaszkoladbrokesennumalselven" + + "drellinzais-a-catererbmoattachmentsannohelsinkitahiroshimarriott" + + "axihuanikonantanangerbmsanokatsuyamaseratis-a-celticsfaninohelpl" + + "financialipetskaufeninomiyakonojoshkar-olayangroupalermomasvuotn" + + "akatsugawabmweirbnpparibaselburgminakamichigangwonirasakis-a-che" + + "farsundwgmodenakatombetsumidatlanticaseihichisobetsuitairabolzan" + + "ore-og-uvdalivornobomloansantabarbarabondyndns-homednsantacruzsa" + + "ntafedexhibitionishiazais-a-conservativefsncfailomzansimagicaser" + + "taishinomakikuchikuseikarugapartmentsanukis-a-cpadoval-daostaval" + + "leyuudmurtiabonnishigotpantheonishiharabookingmxboxfinityuzawabo" + + "otsaotomeldalorenskogretakanabeatsapodhalewismillerboschaefflerd" + + "alotenkawabostikautokeinobostonakijinsekikogentingrimstadyndns-i" + + "p6botanicalgardenishiizunazukis-a-cubicle-slavellinowtvalleaosta" + + "vernishikatakazakis-a-democratgoryuzhno-sakhalinskazimierz-dolny" + + "botanicgardenishikatsuragivestbytomaritimekeepingripebotanybouti" + + "quebecngriwataraidyndns-mailottebozentsujiiebradescorporationish" + + "ikawazukaneyamaxunjargabrandywinevalleybrasiljan-mayenishimerabr" + + "esciabrindisibenikebristolgalsacebritishcolumbialowiezachpomorsk" + + "ienishinomiyashironobroadcastlebtimnetzgorzeleccolognewmexicolle" + + "ctionishinoomotegotsukisosakitagatakamoriokamikitayamatotakadabr" + + "oadwaybroke-itjeldsundyndns-office-on-the-webcambridgestonewspap" + + "erbrokerrypropertiesapporobronnoysundyndns-picsaratovalled-aosta" + + "vropolicebrothermesaverdefensejnybrumunddalottokigawabrunelblagd" + + "enesnaaseralingenkainanaejrietisalatinabenogatagajobojis-a-desig" + + "nerbrusselsardegnamsskoganeis-a-doctoraybruxellesardiniabryanskl" + + "eppalmspringsakerbryneustarhubalatinordre-landishakotankaruizawa" + + "smatartanddesignieznorddalavangenasushiobarabruzzoologicalvinkle" + + "in-addrammenuernbergdyniabogadocscbg12000buskerudinewhampshireci" + + "pesaro-urbino-pesarourbinopesaromamurogawarszawashingtondclkazob" + + "uzenishinoshimatsuzakis-a-financialadvisor-aurdalouvrepbodyndns-" + + "blogdnsarlovegaskimitsubatamicadaquesarpsborgroks-thisamitsukebu" + + "zzgradyndns-remotegildeskalmykiabwfashionishiokoppegardyndns-ser" + + "verbaniabzhitomirkutskodjeepilepsydneycloudcontrolledekakegawawi" + + "iheyaizuwakamatsubushikusakadogawacloudfrontdoorcntkmaxxn--1ck2e" + + "1balestrandabergamoarekembroideryonagoyasnesoddenmarketplace12co" + + "lonialwilliamsburgujolstercoloradoplateaudiocolumbusheycommbankh" + + "ersoncommunitysfjordcomobaracomparemarkerryhotelsayokoshibahikar" + + "iwanumatakinouecompute-1computerhistoryofscience-fictioncomsecur" + + "itysnesbschokoladencondoshichinohedmarketscholarshipschooluxuryc" + + "onferenceconstructionconsuladoharuhrconsultanthropologyconsultin" + + "gvolluzerncontactmpanasonicateringebugattipschmidtre-gauldalowic" + + "zest-le-patrondheimperiacontemporaryarteducationalchikugojomedic" + + "altanissettaiwanaircraftraeumtgeradealstahaugesundcontractorsken" + + "conventureshinodesashibetsuikimobetsuliguriacookingchannelverumi" + + "namidaitomangotembaixadacoolkuszippodlasiellakasamatsudoosandieg" + + "okaseljordcoopocznorthwesternmutualvivano-frankivskhmelnitskiyam" + + "asfjordencopenhagencyclopedicdn77-sslattumetlifeinsurancecorsica" + + "hcesuolocalhistoryazannakadomari-elasticbeanstalkhmelnytskyivall" + + "eeaosteigencorvettelevisioncosenzakopanerairforceocostumedio-cam" + + "pidano-mediocampidanomediocouncilcouponschulezajskhvanylveniceco" + + "urseschwarzgwangjuifminamiechizencq-acranbrookuwanalyticschweizj" + + "cbnlcreditcardcreditunioncremonashorokanaiecrewildlifestylecrick" + + "etrzyncrimeacrotonewportlligatewaycrowncrsciencecentersciencehis" + + "torycruisescientistor-elvdalcuisinellajollamericanexpressexyzlgu" + + "lenculturalcentertainmentoyokawacuneocupcakecxn--1ctwolominamata" + + "mayukis-a-hard-workercymruovatoyonakagyokutoshimacyouthdfcbankla" + + "budhabikinokawabarthachiojiyahikobeauxartsandcraftscjohnsonfilmi" + + "namifuranofinalfinancefineartscrappinguovdageaidnulsandvikcoroma" + + "ntovalle-daostavangerfinlandfinnoyfirebaseappspotenzamamicroligh" + + "tingushikamifuranotairesettsurfauskedsmokorsetagayasells-for-les" + + "scrapper-sitefirenzefirestonextdirectoryfirmdalegolfedjejuegoshi" + + "kiminokamoenairguardfishingonohejis-a-hunterfitjarqhachirogataka" + + "nezawafitnessettlementoyonofjalerflickragerotikamakurazakiraflig" + + "htsevastopoleflirumannoshiroomurafloguchikuzenfloraflorenceflori" + + "dafloristanohatakaharussiafloromskogxn--1lqs03nflowersevenassisi" + + "cilyflsmidthruhereggiocalabriaflynnhubalsanagochihayaakasakawaha" + + "rastronomyokohamamatsudaegubs3-eu-west-1fndfolldalfoodnetworkang" + + "erfor-better-thandafor-ourfor-somedizinhistorischesewilliamhillf" + + "or-theatreeforexrothadanotogawaforgotdnsfranziskanerimamateramoc" + + "hizukirkeneshangrilangevagrarboretumbriaforli-cesena-forlicesena" + + "forlikes-piedmontblancomeeresharis-a-knightoyookarasjoksnesharpa" + + "raglidingzparisor-fronforsaleikangerforsandasuolodingenfortmisso" + + "ulan-udell-ogliastrakhanawafortworthadselfipirangaforuminamiisel" + + "ectoyosatotalfosneshawaiijimarumorimachidafotoyotaris-a-landscap" + + "erugiafoxn--1lqs71dfreiburgfreightcmwinbalsfjordivtasvuodnakaiwa" + + "mizawaugustowadaejeonbukarlsoyokosukariyakumolde164freseniusdeco" + + "rativeartshellaspeziafribourgfriuli-v-giuliafriuli-ve-giuliafriu" + + "li-vegiuliafriuli-venezia-giuliafriuli-veneziagiuliafriuli-vgiul" + + "iafriuliv-giuliafriulive-giuliafriulivegiuliafriulivenezia-giuli" + + "afriuliveneziagiuliafriulivgiuliafrlfroganshimokawafrognfrolandf" + + "rom-akrehamnfrom-alfrom-arfrom-azwindmillfrom-capebretonamiasaku" + + "chinotsuchiurakawassamukawataricohdavvesiidazaifudaigodaddynatho" + + "mebuiltoyotomiyazakis-a-lawyerfrom-collegersundfrom-ctoyotsukaid" + + "ovre-eikerfrom-dcheltenham-radio-operaunitelekommunikationishiwa" + + "kis-a-geekazunofrom-dellogliastraderfrom-flandershimokitayamafro" + + "m-gaulardalfrom-higashiagatsumagoirminamiizukamitsuefrom-iafrom-" + + "idfrom-ilfrom-incheonfrom-kshimonitayanagivingfrom-kyknetoyouraf" + + "rom-lanbibaidarfrom-mansionshimonosekikawafrom-mdfrom-meetoystre" + + "-slidrettozawafrom-microsoftbankmpspbaltimore-og-romsdalillyonag" + + "unikibmdivttasvuotnakamagayachts3-us-west-1from-mnfrom-modalenfr" + + "om-mshimosuwalkis-a-liberalfrom-mtnfrom-nchelyabinskypescaravant" + + "aafrom-ndfrom-nexusgardenfrom-nhktozsdefrom-njcparliamentranbyfr" + + "om-nminamimakis-a-libertarianfrom-nvaolbia-tempio-olbiatempioolb" + + "ialystokkembuchikumagayagawalbrzycharterfrom-nyfrom-ohkurafrom-o" + + "ketogurafrom-orfrom-paderbornfrom-pratohmanxn--1qqw23afrom-ris-a" + + "-linux-useranishiaritabashikaoizumizakitaurayasudafrom-schoenbru" + + "nnfrom-sdnipropetrovskmshimotsukefrom-tnfrom-txn--2m4a15efrom-ut" + + "azuerichardlikescandyndns-at-homedepotaruis-a-llamarylandfrom-va" + + "dsochildrensgardenfrom-vtrani-andria-barletta-trani-andriafrom-w" + + "afrom-wielunnerfrom-wvareserveftparmafrom-wyfrosinonefrostalowa-" + + "wolawafroyahabadajozoraumaintenancefstcgrouparocherkasyzrankoshi" + + "gayaltaikis-a-musicianfujiiderafujikawaguchikonefujiminohtawaram" + + "otoineppugliafujinomiyadafujiokayamaoris-a-nascarfanfujisatoshon" + + "airlinebraskaunbieidsvollfujisawafujishiroishidakabiratoridelmen" + + "horstalbanshimotsumafujitsurugashimarinefujixeroxn--30rr7yfujiyo" + + "shidafukayabeardubaiduckdnsdojoburgfukuchiyamadafukudominicherni" + + "governmentjmaxxxjaworznofukuis-a-nurseoullensvanguardfukumitsubi" + + "shigakirovogradoyfukuokazakiryuohaebaruminamiminowafukuroishikar" + + "ikaturindalfukusakisarazure-mobileirfjordfukuyamagatakahashimama" + + "kishiwadafunabashiriuchinadafunagatakahatakaishimoichinosekigaha" + + "rafunahashikamiamakusatsumasendaisennangoodyearthagakhanamigawaf" + + "undaciofuoiskujukuriyamarburgfuosskoczowindowshinichinanfurnitur" + + "eggioemiliaromagnakasatsunairportland-4-salernogiessengerdalaska" + + "nittedallasalleaseeklogesquarezzoologyeongnamegawakeisenbahnfuru" + + "biraquarelleasingleshinjournalismailillehammerfest-mon-blogueuro" + + "visionfurudonostiafurukawairtelecityeatshinjukumanofusodegaurafu" + + "ssaikisofukushimarcheaparshinkamigotoyohashimotomobeneventochiok" + + "inoshimalopolskanlandfutabayamaguchinomigawafutboldlygoingnowher" + + "e-for-moregontrailroadfuttsurugiminamioguniversityfvgfyis-a-pain" + + "teractivegarsheis-a-patsfanfylkesbiblackfridayfyresdalhanyuzenha" + + "pmirhappoulvikolobrzegyptianpachigasakidstvedestrandhareidsberge" + + "nharstadharvestcelebrationhasamarahasaminami-alpssells-for-unzen" + + "hasudahasvikomaganehatogayahoooshikamaishimofusartshintokushimah" + + "atoyamazakitahatakaokamikoaniikappulawyhatsukaichiharahattfjelld" + + "alhayashimamotobungotakadavvenjargamvikomakiyosatokamachippubets" + + "ubetsugaruhazuminobusells-itranoyhboehringerikehembygdsforbundhe" + + "mneshintomikasaharahemsedalherokussldheroyhgtvaroyhigashichichib" + + "unkyonanaoshimageandsoundandvisionhigashihiroshimanehigashiizumo" + + "zakitakamiizumisanofiatransportrapaniimimatakatoris-a-playerhiga" + + "shikagawahigashikagurasoedahigashikawakitaaikitakatakarazukamimi" + + "nershinyoshitomiokanmakiwakunigamihamadahigashikurumeguroroskole" + + "itungsenhigashimatsushimarshallstatebankomatsushimashikehigashim" + + "atsuyamakitaakitadaitoigawahigashimurayamalatvuopmidoris-a-repub" + + "licancerresearchaeologicaliforniahigashinarusellsyourhomegoodshi" + + "ojirishirifujiedahigashinehigashiomihachimanchesterhigashiosakas" + + "ayamamotorcycleshioyameloyalistockholmestrandhigashishirakawamat" + + "akasagooglecodespotravelchannelhigashisumiyoshikawaminamiaikitak" + + "yushuaiahigashitsunowruzhgorodoyhigashiurausukitamidsundhigashiy" + + "amatokoriyamanakakogawahigashiyodogawahigashiyoshinogaris-a-rock" + + "starachowicehiraizumisatohnoshoohirakatashinagawahiranairtraffic" + + "hernivtsiciliahirarahiratsukagawahirayaitakasakitamotosumitakagi" + + "nankokubunjis-a-socialistmeindianapolis-a-bloggerhisayamanashiib" + + "aghdadultravelersinsurancehistorichouseshirahamatonbetsurgeryhit" + + "achiomiyaginowaniihamatamakawajimaritimodellinghitachiotagoparts" + + "hirakoenighitoyoshimifunehitradinghjartdalhjelmelandholeckobierz" + + "yceholidayhomeipartyhomelinuxn--32vp30hagebostadhomesensembokuki" + + "tanakagusukumoduminamisanrikubetsupplyhomeunixn--3bst00minamitan" + + "ehondahonefosshiranukannamiharuhoneywellhongorgehonjyoitakashima" + + "rugame-hostinghornindalhorseminehortendofinternetrdhoteleshiraoi" + + "s-a-soxfanhotmailhoyangerhoylandetroitskomforbambleborkarumaifar" + + "msteadnpalanaklodzkodairaukraanghkebinagisoccertificationativeam" + + "ericanantiques3-external-1humanitieshiraokanoyakagehurdalhurumaj" + + "is-a-studentalhyllestadhyogoris-a-teacherkassymantechnologyhyuga" + + "warahyundaiwafunejfkommunalforbundjgorajlchiryukyuragifuefukihab" + + "orokunohealthcareersarufutsunomiyawakasaikaitakoelnissedalucania" + + "jlljmpasadenamsosnowiechitachinakagawatchandclockchristiansburgr" + + "ondarjnjelenia-gorajoyokaichibahcavuotnagaravennagareyamaizurubt" + + "sovskjervoyageometre-experts-comptableshitaramajpmorganichitoset" + + "ogitsuldaluccapetownisshinguernseyjpnchloejprshizukuishimogosenj" + + "uniperjurkristiansandcatshoujis-bykristiansundkrodsheradkrokstad" + + "elvaldaostarostwodzislawinnershowakryminamiuonumasudakumatorinok" + + "umejimassa-carrara-massacarraramassabusinessebykleclerchocolatel" + + "emarkddielddanuorrightathomeftpaccessasayamakumenanyokkaichirurg" + + "iens-dentisteshowtimemerckomorotsukamisunagawakunisakis-certifie" + + "ducatorahimeshimakanegasakinkobayashikshacknetnedalkunitachiarai" + + "lwaykunitomigusukumamotoyamasoykunneppupassagenshriramsterdambul" + + "ancekunstsammlungkunstunddesignkuokgroupassenger-associationkure" + + "pair-traffic-controlleykurgankurobelgorodeokurogimilitarykuroiso" + + "ftwarendalenugkuromatsunais-foundationkurotakikawasakis-gonekurs" + + "komvuxn--3ds443gkushirogawakustanais-into-animeiwamarylhurstjohn" + + "kusupersportrentino-sud-tirolkutchanelkutnokuzbassnillfjordkuzum" + + "akis-into-carshisognekvafjordkvalsundkvamlidlugolekagaminord-aur" + + "dalvdalipayufuchukotkafjordkvanangenkvinesdalkvinnheradkviteseid" + + "skogkvitsoykwpspjelkavikongsbergkyotobetsuppliesienarashinokyowa" + + "riasahikawamissilelmisugitokonamegatakayamatsumotofukemitakehara" + + "mitourismolanciamitoyoakemiuramiyazurewebsiteshikagamiishibukawa" + + "miyotamanomjondalenmlbarcelonagasukemergencyberlevagangaviikanon" + + "jiinetarumizusawaurskog-holandroverhalla-speziaeroportalabamagas" + + "akishimabaragusaarlandds3-ap-southeast-1kappleangaviikadenaamesj" + + "evuemielnoboribetsucks3-ap-northeast-1monmouthaibarakitagawamons" + + "termonticellolmontrealestatefarmequipmentrentino-sudtirolmonza-b" + + "rianzaporizhzhekinannestadmonza-e-della-brianzaporizhzhiamonzabr" + + "ianzapposlombardiamondsimbirskongsvingermonzaebrianzaramonzaedel" + + "labrianzamoparachutingmordoviajessheiminamiyamashirokawanabellev" + + "uelosangelesjaguarchitecturebungoonomichinomiyakemerovodkagoshim" + + "agnitkakamigaharaholtalenglandmoriyamatsunomoriyoshiokamogawamor" + + "moneymoroyamatsusakahoginozawaonsenmortgagemoscowiostrolekaniepc" + + "emoseushistorymosjoenmoskenesimple-urlmossirdalmosvikoninjamison" + + "moviemovistargardmtpccwitdkonskowolancashireisenmtranakayamatsus" + + "higemuenstermugithubusercontentrentino-sued-tirolmuikanagawamuko" + + "chikushinonsenergymulhouservebbslingmultichoicemunakatanemuncies" + + "zynmuosattemupaviancapitalonewhollandmurmanskonsulatrobelaudible" + + "besbyglandmurotorcraftrentino-suedtirolmusashimurayamatsuuramusa" + + "shinoharamuseetrentinoa-adigemuseumverenigingmutsuzawamutuelleva" + + "ngermyphotoshibahccavuotnagasakijobservercellierneueslupskonyvel" + + "oftrentino-s-tirollagriculturennebudapest-a-la-masionmytis-a-boo" + + "kkeeperminanophiladelphiaareadmyblogsitephilatelyphilipsyphoenix" + + "n--3e0b707ephotographysiopiagetmyipfizerpictetrentinoaadigepictu" + + "resnzpiemontepilotsokanumazurypinkopervikommunepioneerpippupiszp" + + "ittsburghofermobilypiwatepizzapkoryolasiteplanetariumincomcastre" + + "sistanceplantationplantsokndalplatforminnesotaketakatsukis-into-" + + "cartoonshisuifuettertdasnetzplaystationplazaplchofunatorientexpr" + + "essasebofageplombardyndns-at-workinggroupharmaciensmolenskooris-" + + "an-anarchistoricalsocietyplumbingotvbarclaycards3-us-west-2plust" + + "erpmnpodzonepohlpokerpokrovskosaigawapolitiendapolkowicepoltaval" + + "le-aostathellexuslivinghistorypomorzeszowithgoogleapisa-hockeynu" + + "trentinoalto-adigepordenonepornporsangerporsangugeporsgrunnanpoz" + + "nanpraxis-a-bruinsfansolarssonprdpreservationpresidioprimelbourn" + + "eprincipeprivneprochowiceproductionsologneproferraraprogressiven" + + "neslaskerrylogisticsolundbeckosakaerodromegallupinbananarepublic" + + "arrierprojectrentinoaltoadigepromombetsupportrentinos-tirolprope" + + "rtyprotectionprudentialpruszkowithyoutubentleyprzeworskogptzpvtr" + + "entinostirolpzqldqponqslgbtrentinosud-tirolqvchonanbuildersvpamp" + + "eredchefastlystorfjordstpetersburgstudiostudyndns-freemasonryoka" + + "mikawanehonbetsurutaharastuff-4-salestuttgartrentinosuedtirolsur" + + "nadalsurreysusakis-slickomitamamurasusonosuzakanzakiwiensuzukara" + + "sjohkamiokaminokawanishiaizubangesuzukis-uberleetrentino-aadiges" + + "valbardudinkakudamatsuesveiosvelvikosherbrookegawasvizzerasweden" + + "swidnicarbonia-iglesias-carboniaiglesiascarboniaswiebodzindianma" + + "rketingswiftcoverisignswinoujscienceandhistoryswisshikis-very-ba" + + "daddjamalborkdalsxn--3oq18vl8pn36atunesooturystykarasuyamazoetus" + + "canytushuissier-justicetuvalle-d-aostatoilvestnesor-odalvestre-s" + + "lidreamhostersor-varangervestre-totennishiawakuravestvagoyvevels" + + "tadvibo-valentiavibovalentiavideovillaskoyabearalvahkihokumakoge" + + "niwaizumiotsukumiyamazonawsabaerobaticketsaritsynvinnicargodoesn" + + "texistanbullensakervinnytsiavipsinaappharmacysnoasaitamatsukuris" + + "-lostre-toteneis-an-actresshishikuis-an-accountantshiratakahagis" + + "-a-techietis-a-therapistoiavirginiavirtualvirtuelvisakataketomis" + + "atokyotangovtrevisohughesolutionsomavistaprintuitroandinosaurepo" + + "rtrentottoris-very-evillageviterboknowsitallvivoldavladikavkazan" + + "vladimirvladivostokaizukaratevlogvolgogradvolkenkunderseaportrog" + + "stadvolkswagentsorfoldvologdanskoshunantokashikiyosumypetshizuok" + + "anravolyngdalvoronezhytomyrvossevangenvotevotingvotoursorreisaha" + + "yakawakamiichikaiseis-savedvrnworse-thangglidingwowiwatsukiyonow" + + "ritesthisblogspotromsakakinokiawroclawloclawekostromahachijorpel" + + "andwtchoseiroumuencheniyodogawawtferrarittogoldpointelligencewuo" + + "zuwwworldwzmiuwajimaxn--45q11choyodobashichikashukujitawaraxn--4" + + "gbriminingxn--4gq48lf9jeonnamerikawauexn--4it168dxn--4it797kotoh" + + "iradomainsureitrentino-stirolxn--4pvxsortlandxn--54b7fta0cchrist" + + "masakikugawatchesaskatchewanggouvicenzaxn--55qw42gxn--55qx5dxn--" + + "5js045dxn--5rtp49chromediaxn--5rtq34kotouraxn--5su34j936bgsgxn--" + + "5tzm5gxn--6btw5axn--6frz82gxn--6orx2rxn--6qq986b3xlxn--7t0a264ch" + + "ryslerxn--80adxhksoruminternationalfirearmsigdalxn--80ao21axn--8" + + "0asehdbarclaysakuraiitatebayashijonawatextileksvikasaokamisatoho" + + "bby-sitexasdaburyatiaarpaleoceanographicsakyotanabellunordreisa-" + + "geekashibatakasugaiiyamanobedzin-the-bandaioirasebastopologyeong" + + "giehtavuoatnagaivuotnagaokakyotambabydgoszczecinemailimanowaruda" + + "ustevollaziobiraetnagahamaroyekaterinburggfarmerseinewyorkshireg" + + "gio-emilia-romagnakanotoddenaspers3-ap-southeast-2xn--80aswgxn--" + + "80audnedalnxn--8ltr62kouhokutamakizunokunimilanoxn--8pvr4uxn--8y" + + "0a063axn--90a3academykolaivanovosibirskiervaapsteiermarkhangelsk" + + "inderoyericssonjukudoyamaceratabuseat-band-campaniamallamadridva" + + "gsoygardendoftheinternetcimdbarefootballangenoamishirasatobishim" + + "akeupowiathletajimabariakepnordkappgjovikashiharaustinnaturalhis" + + "torymuseumcenterhcloudcontrolappalacebinortonsbergjerdrumckinsey" + + "okotebizenakaniikawatanaguragrinetbankz-1xn--90aishobaraomoriguc" + + "hiharahkkeravjuedischesapeakebayerndxn--90azhakatanotteroyxn--9d" + + "bhblg6diethnologyxn--9dbq2axn--9et52uxn--9krt00axn--andy-iraxn--" + + "aroport-byanagawaxn--asky-iraxn--aurskog-hland-jnbargainstitutel" + + "efonicagliaridagawalesundrangedalimitedrivelandrobaknoluoktainai" + + "kawachinaganoharamcoalaheadjudaicabbottatamotorsalangenaturbruks" + + "gymnaturhistorischesalondonetskashiwaraustraliaisondriodejaneiro" + + "chesterxn--avery-yuasakegawaxn--b-5gaxn--b4w605ferdxn--bck1b9a5d" + + "re4chtrainingrongausdalucernexn--bdddj-mrabdxn--bearalvhki-y4axn" + + "--berlevg-jxaxn--bhcavuotna-s4axn--bhccavuotna-k7axn--bidr-5nach" + + "ikatsuuraxn--bievt-0qa2xn--bjarky-fyanaizuxn--bjddar-ptamboversa" + + "illesopotrentinosudtirolxn--blt-elaborxn--bmlo-graingerxn--bod-2" + + "naroyxn--brnny-wuaccident-investigationlineat-urlxn--brnnysund-m" + + "8accident-preventionxn--brum-voagatromsojavald-aostarnbergxn--bt" + + "sfjord-9zaxn--c1avgxn--c2br7gxn--c3s14misakis-into-gamessinashik" + + "itchenxn--cck2b3barreauctionatuurwetenschappenaumburgladeloittem" + + "asekashiwazakiyokawaraustrheimatunduhrennesoyokozehimejibigawagr" + + "oks-theaternidgcamerakershus-east-1xn--cg4bkis-very-goodhandsonx" + + "n--ciqpnxn--clchc0ea0b2g2a9gcdn77-securecreationxn--comunicaes-v" + + "6a2oxn--correios-e-telecomunicaes-ghc29axn--czr694barrel-of-know" + + "ledgeorgeorgiauthordalandroidiscountysvardolls3-external-2xn--cz" + + "rs0trusteexn--czru2dxn--czrw28barrell-of-knowledgemersongdalenvi" + + "knakanojohanamakinoharautomotivecodyn-o-saurlandes3-fips-us-gov-" + + "west-1xn--d1acj3bashkiriautoscanadagestangeologyomitanobninskarm" + + "oyonabaruconnectarnobrzegjerstadotsuruokamchatkameokameyamashina" + + "tsukigatakamatsukawakunedre-eikereviewskrakowebhopagespeedmobili" + + "zerobihirosakikamijimatta-varjjatarantomsk-uralsk12xn--d1alfarom" + + "eoxn--d1atrverranzanxn--d5qv7z876chungbukfhskhabarovskhakassiaxn" + + "--davvenjrga-y4axn--djrs72d6uyxn--djty4kounosunndalxn--dnna-graj" + + "ewolterskluwerxn--drbak-wuaxn--dyry-iraxn--eckvdtc9dxn--efvn9sou" + + "thcarolinazawaxn--efvy88hakodatevaksdalxn--ehqz56nxn--elqq16hako" + + "nexn--estv75gxn--eveni-0qa01gaxn--f6qx53axn--fct429kouyamashikis" + + "-an-engineeringxn--fhbeiarnxn--finny-yuaxn--fiq228c5hsouthwestfa" + + "lenxn--fiq64basilicataniaveroykenvironmentalconservationaturalsc" + + "iencesnaturelles3-sa-east-1xn--fiqs8sowaxn--fiqz9spreadbettingxn" + + "--fjord-lraxn--fjq720axn--fl-ziaxn--flor-jraxn--flw351exn--fpcrj" + + "9c3dxn--frde-grandrapidspydebergxn--frna-woaraisaijosoyrovigorli" + + "cexn--frya-hraxn--fzc2c9e2chungnamdalseidfjordyndns-wikindlegnic" + + "ampobassociatesassaris-a-gurulminamibosogndalukowhalingrossetouc" + + "hijiwadeltajimibuildingroundhandlingroznyxn--fzys8d69uvgmailxn--" + + "g2xx48churchaseljeffersonrwhoswhokksundyndns-workshoppdaluroyxn-" + + "-gckr3f0ferreroticanonoichikawamisatodayxn--gecrj9chuvashiaxn--g" + + "gaviika-8ya47hakubankokonoexn--gildeskl-g0axn--givuotna-8yandext" + + "raspace-to-rentalstomakomaibaraxn--gjvik-wuaxn--gk3at1exn--gls-e" + + "lacaixaxn--gmq050is-very-nicexn--gmqw5axn--h-2fairwindsrlxn--h1a" + + "eghakuis-a-personaltrainerxn--h2brj9circlegallocuscountryestateo" + + "fdelawaredumbrellahppiacenzagannefrankfurtjomemorialutskharkival" + + "ledaostakkofueluxembourgrpanamatteledatabaseballooningruexn--hbm" + + "er-xqaxn--hcesuolo-7ya35basketballfinanzgoravocatanzaroweddingje" + + "sdalillesandefjordiscoveryggeelvinckarpaczeladz-2xn--hery-iraxn-" + + "-hgebostad-g3axn--hmmrfeasta-s4acoachampionshiphopenair-surveill" + + "ancebetsukubabia-goracleaningatlantachikawakayamagadancechirealt" + + "orlandxn--hnefoss-q1axn--hobl-iraxn--holtlen-hxaxn--hpmir-xqaxn-" + + "-hxt814exn--hyanger-q1axn--hylandet-54axn--i1b6b1a6a2exn--imr513" + + "nxn--indery-fyaotsurgutsiracusaitokuyamaxn--io0a7is-very-sweetre" + + "ntino-alto-adigexn--j1aefetsundxn--j1amhakusandnessjoenxn--j6w19" + + "3gxn--jlq61u9w7batochigiftsaltdalimoliserniavoues3-us-gov-west-1" + + "xn--jlster-byaroslavlaanderenxn--jrpeland-54axn--jvr189misasagur" + + "is-leetrentino-a-adigexn--k7yn95exn--karmy-yuaxn--kbrq7oxn--kcrx" + + "77d1x4axn--kfjord-iuaxn--klbu-woaxn--klt787dxn--kltp7dxn--kltx9a" + + "xn--klty5xn--3pxu8kosugexn--koluokta-7ya57haldenxn--kprw13dxn--k" + + "pry57dxn--kpu716fgunmarnardalxn--kput3is-with-thebandoomdnsalias" + + "colipicenord-odalxn--krager-gyasakaiminatoyakokamishihoronobeoka" + + "minoyamatsurisleofmandalxn--kranghke-b0axn--krdsherad-m8axn--kre" + + "hamn-dxaxn--krjohka-hwab49jetztrentino-altoadigexn--ksnes-uuaxn-" + + "-kvfjord-nxaxn--kvitsy-fyasugissmarterthanyouxn--kvnangen-k0axn-" + + "-l-1faitheguardianquanconagawakuyabukicks-assedicircuscultureggi" + + "o-calabriaxn--l1accentureklamborghiniizaxn--laheadju-7yasuokarat" + + "suginamikatagamihoboleslawiecitadeliverybnikahokutogliattiresatx" + + "n--0trq7p7nnxn--langevg-jxaxn--lcvr32dxn--ldingen-q1axn--leagavi" + + "ika-52batsfjordunloppacificartierxn--lesund-huaxn--lgbbat1ad8jev" + + "nakerxn--lgrd-poaciticasinorfolkebiblefrakkestadyndns-weberlinco" + + "lnishitosashimizunaminamiashigaraxn--lhppi-xqaxn--linds-prameric" + + "anartrysilkoshimizumakiyosemitexn--lns-qlanxessrtrentinosued-tir" + + "olxn--loabt-0qaxn--lrdal-sraxn--lrenskog-54axn--lt-liacivilaviat" + + "ionxn--lten-granexn--lury-iraxn--mely-iraxn--merker-kuaxn--mgb2d" + + "desrvdonskoseis-an-artisteinkjerusalembetsukuis-an-actorxn--mgb9" + + "awbfidelityumenxn--mgba3a3ejtulansomnaritakurashikis-not-certifi" + + "edunetflixilxn--mgba3a4f16axn--mgba3a4franamizuholdingsmileirvik" + + "ouzushimashikokuchuoxn--mgba7c0bbn0axn--mgbaakc7dvfidonnakamurat" + + "ajirikuzentakatakahamaniwakuratenrissagaeroclubmedecincinnationw" + + "idealerimo-i-ranadexchangeiseiyoichiropracticbcn-north-1xn--mgba" + + "am7a8halsaintlouis-a-anarchistoirehabmerxn--mgbab2bdxn--mgbai9a5" + + "eva00bauhausposts-and-telecommunicationsnasadodgemrxn--mgbai9azg" + + "qp6jewelryxn--mgbayh7gpaduaxn--mgbb9fbpobanazawaxn--mgbbh1a71exn" + + "--mgbc0a9azcgxn--mgbca7dzdownloadxn--mgberp4a5d4a87gxn--mgberp4a" + + "5d4arxn--mgbpl2fhvalerxn--mgbqly7c0a67fbcivilisationxn--mgbqly7c" + + "vafredrikstadtvstoragexn--mgbt3dhdxn--mgbtf8flekkefjordxn--mgbtx" + + "2bbcartoonartdecoffeedbackasukabeeldengeluidunsagamiharaxamuseme" + + "ntargets-itargibestadigitalavagiske-burgjemnes3-eu-central-1xn--" + + "mgbx4cd0abbvieeexn--mix082fieldxn--mix891figuerestaurantoyonezaw" + + "axn--mjndalen-64axn--mk0axindustriesteamfamberkeleyxn--mk1bu44ci" + + "vilizationxn--mkru45iwchernovtsykkylvenetogakushimotoganewjersey" + + "xn--mlatvuopmi-s4axn--mli-tlapyatigorskozagawaxn--mlselv-iuaxn--" + + "moreke-juaxn--mori-qsakuhokkaidontexisteingeekozakis-an-entertai" + + "nerxn--mosjen-eyatominamiawajikixn--mot-tlaquilancasterxn--mre-o" + + "g-romsdal-qqbbtatarstanaustdalindasiaxn--msy-ula0hammarfeastafri" + + "camagichernihivgucciprianiigataitoeiheijis-a-greenissandoyxn--mt" + + "ta-vrjjat-k7afamilycompanycivilwarmanagementjxn--11b4c3dyroyrvik" + + "inguideventsaudaxn--muost-0qaxn--mxtq1misawaxn--ngbc5azdxn--ngbe" + + "9e0axn--nit225kpnxn--nmesjevuemie-tcbajddarchaeologyxn--nnx388ax" + + "n--nodessakuragawaxn--nqv7fs00emaxn--nry-yla5gxn--ntso0iqx3axn--" + + "ntsq17gxn--nttery-byaeservegame-serverdalxn--nvuotna-hwaxn--nyqy" + + "26axn--o1achattanooganorilskydivingxn--o3cw4hamurakamigoriginshi" + + "nshinotsurgeonshalloffamelhustkamitondabayashiogamagoriziaxn--od" + + "0algxn--od0aq3bbvacationswatch-and-clockerxn--ogbpf8flesbergxn--" + + "oppegrd-ixaxn--ostery-fyatsukareliancexn--osyro-wuaxn--p1acfdxn-" + + "-p1aixn--pbt977claimsauheradxn--pgbs0dhlxn--porsgu-sta26filateli" + + "axn--pssu33lxn--pssy2uxn--q9jyb4clickharkovallee-aosteroyxn--qck" + + "a1pmcdonaldstordalxn--qqqt11misconfusedxn--qxamurskjakdnepropetr" + + "ovskiptveterinairealtychyattorneyagawakkanaibetsubamericanfamily" + + "ngenebakkeshibechambagricaaarborteaches-yogasawaracingxn--rady-i" + + "raxn--rdal-poaxn--rde-ularvikppspiegelxn--rdy-0nabarixn--rennesy" + + "-v1axn--rhkkervju-01aflakstadaokagakibichuoxn--rholt-mragowoodsi" + + "dexn--rhqv96gxn--rht27zxn--rht3dxn--rht61exn--risa-5narusawaxn--" + + "risr-iraxn--rland-uuaxn--rlingen-mxaxn--rmskog-byatsushiroxn--rn" + + "y31hangoutsystemscloudappartis-a-photographerokuappartnershinshi" + + "roxn--rovu88beppubolognagatorockartuzyoriikasumigaurawa-mazowsze" + + "xposedogawarabikomaezakirunosegawaxn--rros-granvindafjordxn--rsk" + + "og-uuaxn--rst-0narutokorozawaxn--rsta-francaiseharaxn--ryken-vua" + + "xn--ryrvik-byawaraxn--s-1fareastcoastaldefencexn--s9brj9clinicol" + + "dwarmiamiastaplesavannahgaxn--sandnessjen-ogbizhevskrasnodarxn--" + + "sandy-yuaxn--seral-lraxn--ses554gxn--sgne-gratangenxn--skierv-ut" + + "azaskvolloabathsbcliniquenoharaxn--skjervy-v1axn--skjk-soaxn--sk" + + "nit-yqaxn--sknland-fxaxn--slat-5narviikanazawaxn--slt-elabourxn-" + + "-smla-hraxn--smna-gratis-a-bulls-fanxn--snase-nraxn--sndre-land-" + + "0cbremangerxn--snes-poaxn--snsa-roaxn--sr-aurdal-l8axn--sr-fron-" + + "q1axn--sr-odal-q1axn--sr-varanger-ggbernrtateshinanomachintaijin" + + "finitinfoggiaxn--srfold-byawatahamaxn--srreisa-q1axn--srum-grazx" + + "n--stfold-9xaxn--stjrdal-s1axn--stjrdalshalsen-sqbeskidynaliasco" + + "li-picenord-frontierxn--stre-toten-zcbstorenburgxn--t60b56axn--t" + + "ckweatherchannelxn--tjme-hraxn--tn0agrigentomologyeongbukrasnoya" + + "rskomonoxn--tnsberg-q1axn--tor131oxn--trany-yuaxn--trgstad-r1axn" + + "--trna-woaxn--troms-zuaxn--tysvr-vraxn--uc0atversicherungxn--uc0" + + "ay4axn--uist22hannanmokuizumodernxn--uisz3gxn--unjrga-rtaobaokin" + + "awashirosatobamagazinemurorangemologicallyxn--unup4yxn--uuwu58ax" + + "n--vads-jraxn--vard-jraxn--vegrshei-c0axn--vermgensberater-ctbes" + + "tbuyshousesalvadordalibabaikaliszczytnordlandupontarioceanograph" + + "iquepostfoldnavyatkaluganskasuyakutiaxn--vermgensberatung-pwbeta" + + "inaboxfordeatnuorogerschlesischesalzburglassassinationalheritage" + + "matsubarakawagoepsonyoursidegreevje-og-hornnesamegawaxn--vestvgy" + + "-ixa6oxn--vg-yiabcgxn--vgan-qoaxn--vgsy-qoa0jewishartgalleryxn--" + + "vgu402clintonoshoesaves-the-whalessandria-trani-barletta-andriat" + + "ranibarlettaandriaxn--vhquvestfoldxn--vler-qoaxn--vre-eiker-k8ax" + + "n--vrggt-xqadxn--vry-yla5gxn--vuq861bhartiffanynysafetydalindesn" + + "esamnangerxn--w4r85el8fhu5dnraxn--w4rs40lxn--wcvs22dxn--wgbh1clo" + + "thinguitarsavonaplesaxoxn--wgbl6axn--xhq521bielawallonieruchomos" + + "cienceandindustrynaval-d-aosta-valleyukuhashimojinuyamanouchikuh" + + "okuryugasakitashiobaraxn--xkc2al3hye2axn--xkc2dl3a5ee0hannovargg" + + "atraniandriabarlettatraniandriaxn--y9a3aquariumishimatsumaebashi" + + "modatexn--yer-znarvikredstonexn--yfro4i67oxn--ygarden-p1axn--ygb" + + "i2ammxn--42c2d9axn--ystre-slidre-ujbiellaakesvuemieleccexn--zbx0" + + "25dxn--zf0ao64axn--zf0avxn--45brj9choshibuyachiyodaxn--zfr164bie" + + "szczadygeyachimataipeigersundurbanamexeterxperiaxz" + +// nodes is the list of nodes. Each node is represented as a uint32, which +// encodes the node's children, wildcard bit and node type (as an index into +// the children array), ICANN bit and text. +// +// In the //-comment after each node's data, the nodes indexes of the children +// are formatted as (n0x1234-n0x1256), with * denoting the wildcard bit. The +// nodeType is printed as + for normal, ! for exception, and o for parent-only +// nodes that have children but don't match a domain label in their own right. +// An I denotes an ICANN domain. +// +// The layout within the uint32, from MSB to LSB, is: +// [ 1 bits] unused +// [ 9 bits] children index +// [ 1 bits] ICANN bit +// [15 bits] text index +// [ 6 bits] text length +var nodes = [...]uint32{ + 0x00379643, // n0x0000 c0x0000 (---------------) + I aaa + 0x002ff504, // n0x0001 c0x0000 (---------------) + I aarp + 0x00243386, // n0x0002 c0x0000 (---------------) + I abarth + 0x0030f843, // n0x0003 c0x0000 (---------------) + I abb + 0x0030f846, // n0x0004 c0x0000 (---------------) + I abbott + 0x00364206, // n0x0005 c0x0000 (---------------) + I abbvie + 0x003973c3, // n0x0006 c0x0000 (---------------) + I abc + 0x002a8884, // n0x0007 c0x0000 (---------------) + I able + 0x00226607, // n0x0008 c0x0000 (---------------) + I abogado + 0x00242fc8, // n0x0009 c0x0000 (---------------) + I abudhabi + 0x01a05882, // n0x000a c0x0006 (n0x05f6-n0x05fc) + I ac + 0x00305387, // n0x000b c0x0000 (---------------) + I academy + 0x0034d409, // n0x000c c0x0000 (---------------) + I accenture + 0x002eda0a, // n0x000d c0x0000 (---------------) + I accountant + 0x002eda0b, // n0x000e c0x0000 (---------------) + I accountants + 0x0022f6c3, // n0x000f c0x0000 (---------------) + I aco + 0x002820c6, // n0x0010 c0x0000 (---------------) + I active + 0x00235dc5, // n0x0011 c0x0000 (---------------) + I actor + 0x01e03d82, // n0x0012 c0x0007 (n0x05fc-n0x05fd) + I ad + 0x00209d04, // n0x0013 c0x0000 (---------------) + I adac + 0x00253903, // n0x0014 c0x0000 (---------------) + I ads + 0x00299105, // n0x0015 c0x0000 (---------------) + I adult + 0x0220ac02, // n0x0016 c0x0008 (n0x05fd-n0x0605) + I ae + 0x0024d5c3, // n0x0017 c0x0000 (---------------) + I aeg + 0x026bcb84, // n0x0018 c0x0009 (n0x0605-n0x065e) + I aero + 0x003023c5, // n0x0019 c0x0000 (---------------) + I aetna + 0x02a00342, // n0x001a c0x000a (n0x065e-n0x0663) + I af + 0x0036c30e, // n0x001b c0x0000 (---------------) + I afamilycompany + 0x00249ec3, // n0x001c c0x0000 (---------------) + I afl + 0x0036af06, // n0x001d c0x0000 (---------------) + I africa + 0x0036af0b, // n0x001e c0x0000 (---------------) + I africamagic + 0x02e01002, // n0x001f c0x000b (n0x0663-n0x0668) + I ag + 0x00279c47, // n0x0020 c0x0000 (---------------) + I agakhan + 0x002393c6, // n0x0021 c0x0000 (---------------) + I agency + 0x03202142, // n0x0022 c0x000c (n0x0668-n0x066c) + I ai + 0x0025cc83, // n0x0023 c0x0000 (---------------) + I aig + 0x0025cc84, // n0x0024 c0x0000 (---------------) + I aigo + 0x00204686, // n0x0025 c0x0000 (---------------) + I airbus + 0x0023ba48, // n0x0026 c0x0000 (---------------) + I airforce + 0x0027e646, // n0x0027 c0x0000 (---------------) + I airtel + 0x00377d04, // n0x0028 c0x0000 (---------------) + I akdn + 0x036001c2, // n0x0029 c0x000d (n0x066c-n0x0673) + I al + 0x00324e49, // n0x002a c0x0000 (---------------) + I alfaromeo + 0x003934c7, // n0x002b c0x0000 (---------------) + I alibaba + 0x002b7146, // n0x002c c0x0000 (---------------) + I alipay + 0x0033a7c9, // n0x002d c0x0000 (---------------) + I allfinanz + 0x0028e708, // n0x002e c0x0000 (---------------) + I allstate + 0x00391984, // n0x002f c0x0000 (---------------) + I ally + 0x0021c6c6, // n0x0030 c0x0000 (---------------) + I alsace + 0x003353c6, // n0x0031 c0x0000 (---------------) + I alstom + 0x03a01382, // n0x0032 c0x000e (n0x0673-n0x0674) + I am + 0x00240a8f, // n0x0033 c0x0000 (---------------) + I americanexpress + 0x00378c8e, // n0x0034 c0x0000 (---------------) + I americanfamily + 0x003a3884, // n0x0035 c0x0000 (---------------) + I amex + 0x00365985, // n0x0036 c0x0000 (---------------) + I amfam + 0x00229685, // n0x0037 c0x0000 (---------------) + I amica + 0x002b0d09, // n0x0038 c0x0000 (---------------) + I amsterdam + 0x03e00b42, // n0x0039 c0x000f (n0x0674-n0x0678) + I an + 0x0023dc09, // n0x003a c0x0000 (---------------) + I analytics + 0x0031e587, // n0x003b c0x0000 (---------------) + I android + 0x0034c406, // n0x003c c0x0000 (---------------) + I anquan + 0x0024fa83, // n0x003d c0x0000 (---------------) + I anz + 0x04203042, // n0x003e c0x0010 (n0x0678-n0x067e) + I ao + 0x00267903, // n0x003f c0x0000 (---------------) + I aol + 0x002136ca, // n0x0040 c0x0000 (---------------) + I apartments + 0x00220503, // n0x0041 c0x0000 (---------------) + I app + 0x002bda45, // n0x0042 c0x0000 (---------------) + I apple + 0x00229802, // n0x0043 c0x0000 (---------------) + I aq + 0x0027d0c9, // n0x0044 c0x0000 (---------------) + I aquarelle + 0x046011c2, // n0x0045 c0x0011 (n0x067e-n0x0687) + I ar + 0x0030f386, // n0x0046 c0x0000 (---------------) + I aramco + 0x002c3405, // n0x0047 c0x0000 (---------------) + I archi + 0x00344984, // n0x0048 c0x0000 (---------------) + I army + 0x04e51f04, // n0x0049 c0x0013 (n0x0688-n0x068e) + I arpa + 0x00234904, // n0x004a c0x0000 (---------------) + I arte + 0x05202002, // n0x004b c0x0014 (n0x068e-n0x068f) + I as + 0x002ff244, // n0x004c c0x0000 (---------------) + I asda + 0x0036a844, // n0x004d c0x0000 (---------------) + I asia + 0x0033014a, // n0x004e c0x0000 (---------------) + I associates + 0x05600102, // n0x004f c0x0015 (n0x068f-n0x0696) + I at + 0x00308207, // n0x0050 c0x0000 (---------------) + I athleta + 0x00378648, // n0x0051 c0x0000 (---------------) + I attorney + 0x05e09602, // n0x0052 c0x0017 (n0x0697-n0x06a9) + I au + 0x00319547, // n0x0053 c0x0000 (---------------) + I auction + 0x0022e9c4, // n0x0054 c0x0000 (---------------) + I audi + 0x002cae47, // n0x0055 c0x0000 (---------------) + I audible + 0x0022e9c5, // n0x0056 c0x0000 (---------------) + I audio + 0x0035d247, // n0x0057 c0x0000 (---------------) + I auspost + 0x0031e346, // n0x0058 c0x0000 (---------------) + I author + 0x00216404, // n0x0059 c0x0000 (---------------) + I auto + 0x00321605, // n0x005a c0x0000 (---------------) + I autos + 0x002ca387, // n0x005b c0x0000 (---------------) + I avianca + 0x06e01082, // n0x005c c0x001b (n0x06b7-n0x06b8) + I aw + 0x002eb603, // n0x005d c0x0000 (---------------) + I aws + 0x0020d002, // n0x005e c0x0000 (---------------) + I ax + 0x00362dc3, // n0x005f c0x0000 (---------------) + I axa + 0x07212502, // n0x0060 c0x001c (n0x06b8-n0x06c4) + I az + 0x00277585, // n0x0061 c0x0000 (---------------) + I azure + 0x07603002, // n0x0062 c0x001d (n0x06c4-n0x06cf) + I ba + 0x00301844, // n0x0063 c0x0000 (---------------) + I baby + 0x00274445, // n0x0064 c0x0000 (---------------) + I baidu + 0x003a37c7, // n0x0065 c0x0000 (---------------) + I banamex + 0x002dcc8e, // n0x0066 c0x0000 (---------------) + I bananarepublic + 0x00300944, // n0x0067 c0x0000 (---------------) + I band + 0x0020ad44, // n0x0068 c0x0000 (---------------) + I bank + 0x00211783, // n0x0069 c0x0000 (---------------) + I bar + 0x002bb549, // n0x006a c0x0000 (---------------) + I barcelona + 0x002d690b, // n0x006b c0x0000 (---------------) + I barclaycard + 0x002fe188, // n0x006c c0x0000 (---------------) + I barclays + 0x00307708, // n0x006d c0x0000 (---------------) + I barefoot + 0x0030dc48, // n0x006e c0x0000 (---------------) + I bargains + 0x0033a60a, // n0x006f c0x0000 (---------------) + I basketball + 0x0035d147, // n0x0070 c0x0000 (---------------) + I bauhaus + 0x0030b746, // n0x0071 c0x0000 (---------------) + I bayern + 0x07ac9742, // n0x0072 c0x001e (n0x06cf-n0x06d9) + I bb + 0x00362043, // n0x0073 c0x0000 (---------------) + I bbc + 0x0036a303, // n0x0074 c0x0000 (---------------) + I bbt + 0x00373384, // n0x0075 c0x0000 (---------------) + I bbva + 0x00397403, // n0x0076 c0x0000 (---------------) + I bcg + 0x0035bb43, // n0x0077 c0x0000 (---------------) + I bcn + 0x01712842, // n0x0078 c0x0005 (---------------)* o I bd + 0x07e094c2, // n0x0079 c0x001f (n0x06d9-n0x06db) + I be + 0x00215745, // n0x007a c0x0000 (---------------) + I beats + 0x0020b084, // n0x007b c0x0000 (---------------) + I beer + 0x002de9c7, // n0x007c c0x0000 (---------------) + I bentley + 0x00351e06, // n0x007d c0x0000 (---------------) + I berlin + 0x003633c4, // n0x007e c0x0000 (---------------) + I best + 0x00392f47, // n0x007f c0x0000 (---------------) + I bestbuy + 0x00210503, // n0x0080 c0x0000 (---------------) + I bet + 0x08357082, // n0x0081 c0x0020 (n0x06db-n0x06dc) + I bf + 0x08626882, // n0x0082 c0x0021 (n0x06dc-n0x0701) + I bg + 0x08b0c002, // n0x0083 c0x0022 (n0x0701-n0x0706) + I bh + 0x0039a906, // n0x0084 c0x0000 (---------------) + I bharti + 0x08e00002, // n0x0085 c0x0023 (n0x0706-n0x070b) + I bi + 0x00351845, // n0x0086 c0x0000 (---------------) + I bible + 0x00313d83, // n0x0087 c0x0000 (---------------) + I bid + 0x00202b44, // n0x0088 c0x0000 (---------------) + I bike + 0x002d6744, // n0x0089 c0x0000 (---------------) + I bing + 0x002d6745, // n0x008a c0x0000 (---------------) + I bingo + 0x00203a43, // n0x008b c0x0000 (---------------) + I bio + 0x0930a143, // n0x008c c0x0024 (n0x070b-n0x0712) + I biz + 0x096066c2, // n0x008d c0x0025 (n0x0712-n0x0716) + I bj + 0x002828c5, // n0x008e c0x0000 (---------------) + I black + 0x002828cb, // n0x008f c0x0000 (---------------) + I blackfriday + 0x00251446, // n0x0090 c0x0000 (---------------) + I blanco + 0x00208dcb, // n0x0091 c0x0000 (---------------) + I blockbuster + 0x00229004, // n0x0092 c0x0000 (---------------) + I blog + 0x00209389, // n0x0093 c0x0000 (---------------) + I bloomberg + 0x0020b184, // n0x0094 c0x0000 (---------------) + I blue + 0x09a0c542, // n0x0095 c0x0026 (n0x0716-n0x071b) + I bm + 0x0020d543, // n0x0096 c0x0000 (---------------) + I bms + 0x0020f283, // n0x0097 c0x0000 (---------------) + I bmw + 0x0160f402, // n0x0098 c0x0005 (---------------)* o I bn + 0x0023e043, // n0x0099 c0x0000 (---------------) + I bnl + 0x0020f40a, // n0x009a c0x0000 (---------------) + I bnpparibas + 0x09e06dc2, // n0x009b c0x0027 (n0x071b-n0x0724) + I bo + 0x00209f85, // n0x009c c0x0000 (---------------) + I boats + 0x0028888a, // n0x009d c0x0000 (---------------) + I boehringer + 0x002d5184, // n0x009e c0x0000 (---------------) + I bofa + 0x00211483, // n0x009f c0x0000 (---------------) + I bom + 0x00211944, // n0x00a0 c0x0000 (---------------) + I bond + 0x002149c3, // n0x00a1 c0x0000 (---------------) + I boo + 0x002149c4, // n0x00a2 c0x0000 (---------------) + I book + 0x002149c7, // n0x00a3 c0x0000 (---------------) + I booking + 0x00214f85, // n0x00a4 c0x0000 (---------------) + I boots + 0x00215cc5, // n0x00a5 c0x0000 (---------------) + I bosch + 0x00216286, // n0x00a6 c0x0000 (---------------) + I bostik + 0x00217083, // n0x00a7 c0x0000 (---------------) + I bot + 0x00219ec8, // n0x00a8 c0x0000 (---------------) + I boutique + 0x0a20bb42, // n0x00a9 c0x0028 (n0x0724-n0x076a) + I br + 0x0021ab08, // n0x00aa c0x0000 (---------------) + I bradesco + 0x0021fc0b, // n0x00ab c0x0000 (---------------) + I bridgestone + 0x0021ef88, // n0x00ac c0x0000 (---------------) + I broadway + 0x00220086, // n0x00ad c0x0000 (---------------) + I broker + 0x00221247, // n0x00ae c0x0000 (---------------) + I brother + 0x002230c8, // n0x00af c0x0000 (---------------) + I brussels + 0x0aa311c2, // n0x00b0 c0x002a (n0x076b-n0x0770) + I bs + 0x0ae1d7c2, // n0x00b1 c0x002b (n0x0770-n0x0775) + I bt + 0x002ce848, // n0x00b2 c0x0000 (---------------) + I budapest + 0x002338c7, // n0x00b3 c0x0000 (---------------) + I bugatti + 0x002dfcc5, // n0x00b4 c0x0000 (---------------) + I build + 0x002dfcc8, // n0x00b5 c0x0000 (---------------) + I builders + 0x002ac908, // n0x00b6 c0x0000 (---------------) + I business + 0x00393043, // n0x00b7 c0x0000 (---------------) + I buy + 0x00229f84, // n0x00b8 c0x0000 (---------------) + I buzz + 0x00364282, // n0x00b9 c0x0000 (---------------) + I bv + 0x0b22a802, // n0x00ba c0x002c (n0x0775-n0x0777) + I bw + 0x0b602902, // n0x00bb c0x002d (n0x0777-n0x077b) + I by + 0x0be2b202, // n0x00bc c0x002f (n0x077c-n0x0782) + I bz + 0x0022b203, // n0x00bd c0x0000 (---------------) + I bzh + 0x0c200302, // n0x00be c0x0030 (n0x0782-n0x0793) + I ca + 0x0030f803, // n0x00bf c0x0000 (---------------) + I cab + 0x00200304, // n0x00c0 c0x0000 (---------------) + I cafe + 0x00217203, // n0x00c1 c0x0000 (---------------) + I cal + 0x00391944, // n0x00c2 c0x0000 (---------------) + I call + 0x00225dcb, // n0x00c3 c0x0000 (---------------) + I calvinklein + 0x0031b3c6, // n0x00c4 c0x0000 (---------------) + I camera + 0x0023bf44, // n0x00c5 c0x0000 (---------------) + I camp + 0x0029008e, // n0x00c6 c0x0000 (---------------) + I cancerresearch + 0x00333445, // n0x00c7 c0x0000 (---------------) + I canon + 0x002a9308, // n0x00c8 c0x0000 (---------------) + I capetown + 0x002ca4c7, // n0x00c9 c0x0000 (---------------) + I capital + 0x002ca4ca, // n0x00ca c0x0000 (---------------) + I capitalone + 0x0023e283, // n0x00cb c0x0000 (---------------) + I car + 0x00265e07, // n0x00cc c0x0000 (---------------) + I caravan + 0x002d6ac5, // n0x00cd c0x0000 (---------------) + I cards + 0x002a5344, // n0x00ce c0x0000 (---------------) + I care + 0x002a5346, // n0x00cf c0x0000 (---------------) + I career + 0x002a5347, // n0x00d0 c0x0000 (---------------) + I careers + 0x002b6284, // n0x00d1 c0x0000 (---------------) + I cars + 0x00350687, // n0x00d2 c0x0000 (---------------) + I cartier + 0x00203cc4, // n0x00d3 c0x0000 (---------------) + I casa + 0x002108c4, // n0x00d4 c0x0000 (---------------) + I case + 0x002108c6, // n0x00d5 c0x0000 (---------------) + I caseih + 0x002c7944, // n0x00d6 c0x0000 (---------------) + I cash + 0x00351546, // n0x00d7 c0x0000 (---------------) + I casino + 0x0020c383, // n0x00d8 c0x0000 (---------------) + I cat + 0x00233688, // n0x00d9 c0x0000 (---------------) + I catering + 0x00242e43, // n0x00da c0x0000 (---------------) + I cba + 0x0023e003, // n0x00db c0x0000 (---------------) + I cbn + 0x00388044, // n0x00dc c0x0000 (---------------) + I cbre + 0x0038c903, // n0x00dd c0x0000 (---------------) + I cbs + 0x0c61db82, // n0x00de c0x0031 (n0x0793-n0x0797) + I cc + 0x0ca39702, // n0x00df c0x0032 (n0x0797-n0x0798) + I cd + 0x00202ec3, // n0x00e0 c0x0000 (---------------) + I ceb + 0x00204206, // n0x00e1 c0x0000 (---------------) + I center + 0x0023bbc3, // n0x00e2 c0x0000 (---------------) + I ceo + 0x00312604, // n0x00e3 c0x0000 (---------------) + I cern + 0x0ce12ac2, // n0x00e4 c0x0033 (n0x0798-n0x0799) + I cf + 0x00212ac3, // n0x00e5 c0x0000 (---------------) + I cfa + 0x00374e83, // n0x00e6 c0x0000 (---------------) + I cfd + 0x00219182, // n0x00e7 c0x0000 (---------------) + I cg + 0x0d2058c2, // n0x00e8 c0x0034 (n0x0799-n0x079a) + I ch + 0x002b5806, // n0x00e9 c0x0000 (---------------) + I chanel + 0x00236cc7, // n0x00ea c0x0000 (---------------) + I channel + 0x00332285, // n0x00eb c0x0000 (---------------) + I chase + 0x00322a84, // n0x00ec c0x0000 (---------------) + I chat + 0x0027f485, // n0x00ed c0x0000 (---------------) + I cheap + 0x00389d87, // n0x00ee c0x0000 (---------------) + I chintai + 0x002a9945, // n0x00ef c0x0000 (---------------) + I chloe + 0x002f9e89, // n0x00f0 c0x0000 (---------------) + I christmas + 0x002fb446, // n0x00f1 c0x0000 (---------------) + I chrome + 0x002fcf88, // n0x00f2 c0x0000 (---------------) + I chrysler + 0x00332186, // n0x00f3 c0x0000 (---------------) + I church + 0x0d6080c2, // n0x00f4 c0x0035 (n0x079a-n0x07a9) + I ci + 0x0036b488, // n0x00f5 c0x0000 (---------------) + I cipriani + 0x00337906, // n0x00f6 c0x0000 (---------------) + I circle + 0x002080c5, // n0x00f7 c0x0000 (---------------) + I cisco + 0x0034e707, // n0x00f8 c0x0000 (---------------) + I citadel + 0x00351444, // n0x00f9 c0x0000 (---------------) + I citi + 0x00351445, // n0x00fa c0x0000 (---------------) + I citic + 0x0027e804, // n0x00fb c0x0000 (---------------) + I city + 0x0027e808, // n0x00fc c0x0000 (---------------) + I cityeats + 0x0da08e82, // n0x00fd c0x0036 (n0x07a9-n0x07aa)* o I ck + 0x0de02502, // n0x00fe c0x0037 (n0x07aa-n0x07af) + I cl + 0x003753c6, // n0x00ff c0x0000 (---------------) + I claims + 0x0033d548, // n0x0100 c0x0000 (---------------) + I cleaning + 0x00376805, // n0x0101 c0x0000 (---------------) + I click + 0x00382e06, // n0x0102 c0x0000 (---------------) + I clinic + 0x00385448, // n0x0103 c0x0000 (---------------) + I clinique + 0x0039bf48, // n0x0104 c0x0000 (---------------) + I clothing + 0x0022b985, // n0x0105 c0x0000 (---------------) + I cloud + 0x00202504, // n0x0106 c0x0000 (---------------) + I club + 0x0035aac7, // n0x0107 c0x0000 (---------------) + I clubmed + 0x0e255882, // n0x0108 c0x0038 (n0x07af-n0x07b3) + I cm + 0x0e61a142, // n0x0109 c0x0039 (n0x07b3-n0x07e0) + I cn + 0x0fe08182, // n0x010a c0x003f (n0x07e5-n0x07f2) + I co + 0x0033c805, // n0x010b c0x0000 (---------------) + I coach + 0x002932c5, // n0x010c c0x0000 (---------------) + I codes + 0x003623c6, // n0x010d c0x0000 (---------------) + I coffee + 0x0025d8c7, // n0x010e c0x0000 (---------------) + I college + 0x0021dbc7, // n0x010f c0x0000 (---------------) + I cologne + 0x1062edc3, // n0x0110 c0x0041 (n0x07f3-n0x08bf) + I com + 0x002d2dc7, // n0x0111 c0x0000 (---------------) + I comcast + 0x0022edc8, // n0x0112 c0x0000 (---------------) + I commbank + 0x0022f149, // n0x0113 c0x0000 (---------------) + I community + 0x0036c4c7, // n0x0114 c0x0000 (---------------) + I company + 0x0022f707, // n0x0115 c0x0000 (---------------) + I compare + 0x00230608, // n0x0116 c0x0000 (---------------) + I computer + 0x00230e06, // n0x0117 c0x0000 (---------------) + I comsec + 0x002314c6, // n0x0118 c0x0000 (---------------) + I condos + 0x0023224c, // n0x0119 c0x0000 (---------------) + I construction + 0x00232dca, // n0x011a c0x0000 (---------------) + I consulting + 0x00233287, // n0x011b c0x0000 (---------------) + I contact + 0x00235c8b, // n0x011c c0x0000 (---------------) + I contractors + 0x00236b07, // n0x011d c0x0000 (---------------) + I cooking + 0x00236b0e, // n0x011e c0x0000 (---------------) + I cookingchannel + 0x00237604, // n0x011f c0x0000 (---------------) + I cool + 0x00238284, // n0x0120 c0x0000 (---------------) + I coop + 0x00239e47, // n0x0121 c0x0000 (---------------) + I corsica + 0x00337c87, // n0x0122 c0x0000 (---------------) + I country + 0x0023c846, // n0x0123 c0x0000 (---------------) + I coupon + 0x0023c847, // n0x0124 c0x0000 (---------------) + I coupons + 0x0023cf87, // n0x0125 c0x0000 (---------------) + I courses + 0x11a11e82, // n0x0126 c0x0046 (n0x08dd-n0x08e4) + I cr + 0x0023e106, // n0x0127 c0x0000 (---------------) + I credit + 0x0023e10a, // n0x0128 c0x0000 (---------------) + I creditcard + 0x0023e38b, // n0x0129 c0x0000 (---------------) + I creditunion + 0x0023eec7, // n0x012a c0x0000 (---------------) + I cricket + 0x0023f885, // n0x012b c0x0000 (---------------) + I crown + 0x0023f9c3, // n0x012c c0x0000 (---------------) + I crs + 0x00240107, // n0x012d c0x0000 (---------------) + I cruises + 0x002267c3, // n0x012e c0x0000 (---------------) + I csc + 0x11e17882, // n0x012f c0x0047 (n0x08e4-n0x08ea) + I cu + 0x0024070a, // n0x0130 c0x0000 (---------------) + I cuisinella + 0x1234f802, // n0x0131 c0x0048 (n0x08ea-n0x08eb) + I cv + 0x126c7542, // n0x0132 c0x0049 (n0x08eb-n0x08ef) + I cw + 0x12a41b02, // n0x0133 c0x004a (n0x08ef-n0x08f1) + I cx + 0x12e394c2, // n0x0134 c0x004b (n0x08f1-n0x08fe) o I cy + 0x00242545, // n0x0135 c0x0000 (---------------) + I cymru + 0x00242c44, // n0x0136 c0x0000 (---------------) + I cyou + 0x13633fc2, // n0x0137 c0x004d (n0x08ff-n0x0900) + I cz + 0x002ff2c5, // n0x0138 c0x0000 (---------------) + I dabur + 0x0025cd83, // n0x0139 c0x0000 (---------------) + I dad + 0x0033dcc5, // n0x013a c0x0000 (---------------) + I dance + 0x00205dc4, // n0x013b c0x0000 (---------------) + I date + 0x00202c46, // n0x013c c0x0000 (---------------) + I dating + 0x0020b286, // n0x013d c0x0000 (---------------) + I datsun + 0x00282ac3, // n0x013e c0x0000 (---------------) + I day + 0x00227e04, // n0x013f c0x0000 (---------------) + I dclk + 0x002bd543, // n0x0140 c0x0000 (---------------) + I dds + 0x13a00402, // n0x0141 c0x004e (n0x0900-n0x0908) + I de + 0x00235884, // n0x0142 c0x0000 (---------------) + I deal + 0x0035b046, // n0x0143 c0x0000 (---------------) + I dealer + 0x00235885, // n0x0144 c0x0000 (---------------) + I deals + 0x00396686, // n0x0145 c0x0000 (---------------) + I degree + 0x0034e808, // n0x0146 c0x0000 (---------------) + I delivery + 0x00253184, // n0x0147 c0x0000 (---------------) + I dell + 0x00319dc8, // n0x0148 c0x0000 (---------------) + I deloitte + 0x00331185, // n0x0149 c0x0000 (---------------) + I delta + 0x00218588, // n0x014a c0x0000 (---------------) + I democrat + 0x002a3206, // n0x014b c0x0000 (---------------) + I dental + 0x002ae147, // n0x014c c0x0000 (---------------) + I dentist + 0x00222ec4, // n0x014d c0x0000 (---------------) + I desi + 0x00222ec6, // n0x014e c0x0000 (---------------) + I design + 0x0036d143, // n0x014f c0x0000 (---------------) + I dev + 0x00375943, // n0x0150 c0x0000 (---------------) + I dhl + 0x002c13c8, // n0x0151 c0x0000 (---------------) + I diamonds + 0x0030c184, // n0x0152 c0x0000 (---------------) + I diet + 0x00363507, // n0x0153 c0x0000 (---------------) + I digital + 0x002477c6, // n0x0154 c0x0000 (---------------) + I direct + 0x002477c9, // n0x0155 c0x0000 (---------------) + I directory + 0x0031e708, // n0x0156 c0x0000 (---------------) + I discount + 0x0033b448, // n0x0157 c0x0000 (---------------) + I discover + 0x00224b44, // n0x0158 c0x0000 (---------------) + I dish + 0x0022b5c2, // n0x0159 c0x0000 (---------------) + I dj + 0x13e00ac2, // n0x015a c0x004f (n0x0908-n0x0909) + I dk + 0x14214142, // n0x015b c0x0050 (n0x0909-n0x090e) + I dm + 0x002a1143, // n0x015c c0x0000 (---------------) + I dnp + 0x14606e42, // n0x015d c0x0051 (n0x090e-n0x0918) + I do + 0x00226744, // n0x015e c0x0000 (---------------) + I docs + 0x0035db05, // n0x015f c0x0000 (---------------) + I dodge + 0x0022c703, // n0x0160 c0x0000 (---------------) + I dog + 0x00232704, // n0x0161 c0x0000 (---------------) + I doha + 0x002f90c7, // n0x0162 c0x0000 (---------------) + I domains + 0x00237d86, // n0x0163 c0x0000 (---------------) + I doosan + 0x003227c3, // n0x0164 c0x0000 (---------------) + I dot + 0x0035f648, // n0x0165 c0x0000 (---------------) + I download + 0x0030e985, // n0x0166 c0x0000 (---------------) + I drive + 0x002839c4, // n0x0167 c0x0000 (---------------) + I dstv + 0x00361303, // n0x0168 c0x0000 (---------------) + I dtv + 0x002743c5, // n0x0169 c0x0000 (---------------) + I dubai + 0x00274504, // n0x016a c0x0000 (---------------) + I duck + 0x00350386, // n0x016b c0x0000 (---------------) + I dunlop + 0x00362ac4, // n0x016c c0x0000 (---------------) + I duns + 0x00393b06, // n0x016d c0x0000 (---------------) + I dupont + 0x003a3706, // n0x016e c0x0000 (---------------) + I durban + 0x00306f44, // n0x016f c0x0000 (---------------) + I dvag + 0x00210183, // n0x0170 c0x0000 (---------------) + I dwg + 0x14aa1402, // n0x0171 c0x0052 (n0x0918-n0x0920) + I dz + 0x00279b05, // n0x0172 c0x0000 (---------------) + I earth + 0x00215783, // n0x0173 c0x0000 (---------------) + I eat + 0x14e03c82, // n0x0174 c0x0053 (n0x0920-n0x092c) + I ec + 0x0022bcc5, // n0x0175 c0x0000 (---------------) + I edeka + 0x002349c3, // n0x0176 c0x0000 (---------------) + I edu + 0x002349c9, // n0x0177 c0x0000 (---------------) + I education + 0x1520b0c2, // n0x0178 c0x0054 (n0x092c-n0x0936) + I ee + 0x15a05a42, // n0x0179 c0x0056 (n0x0937-n0x0940) + I eg + 0x00301c05, // n0x017a c0x0000 (---------------) + I email + 0x002ae506, // n0x017b c0x0000 (---------------) + I emerck + 0x0031fc47, // n0x017c c0x0000 (---------------) + I emerson + 0x002c9306, // n0x017d c0x0000 (---------------) + I energy + 0x0032a108, // n0x017e c0x0000 (---------------) + I engineer + 0x0032a10b, // n0x017f c0x0000 (---------------) + I engineering + 0x0020424b, // n0x0180 c0x0000 (---------------) + I enterprises + 0x003940c5, // n0x0181 c0x0000 (---------------) + I epost + 0x003963c5, // n0x0182 c0x0000 (---------------) + I epson + 0x002bf809, // n0x0183 c0x0000 (---------------) + I equipment + 0x01600442, // n0x0184 c0x0005 (---------------)* o I er + 0x003061c8, // n0x0185 c0x0000 (---------------) + I ericsson + 0x00218044, // n0x0186 c0x0000 (---------------) + I erni + 0x16202242, // n0x0187 c0x0058 (n0x0941-n0x0946) + I es + 0x0027c5c3, // n0x0188 c0x0000 (---------------) + I esq + 0x002bf586, // n0x0189 c0x0000 (---------------) + I estate + 0x002032c8, // n0x018a c0x0000 (---------------) + I esurance + 0x16a0a502, // n0x018b c0x005a (n0x0947-n0x094f) + I et + 0x00222708, // n0x018c c0x0000 (---------------) + I etisalat + 0x00224542, // n0x018d c0x0000 (---------------) + I eu + 0x0027df0a, // n0x018e c0x0000 (---------------) + I eurovision + 0x00224543, // n0x018f c0x0000 (---------------) + I eus + 0x0036d186, // n0x0190 c0x0000 (---------------) + I events + 0x0020ac48, // n0x0191 c0x0000 (---------------) + I everbank + 0x0035b488, // n0x0192 c0x0000 (---------------) + I exchange + 0x002a8546, // n0x0193 c0x0000 (---------------) + I expert + 0x0037ffc7, // n0x0194 c0x0000 (---------------) + I exposed + 0x00240c87, // n0x0195 c0x0000 (---------------) + I express + 0x00334f4a, // n0x0196 c0x0000 (---------------) + I extraspace + 0x002d5204, // n0x0197 c0x0000 (---------------) + I fage + 0x00212b04, // n0x0198 c0x0000 (---------------) + I fail + 0x00336b89, // n0x0199 c0x0000 (---------------) + I fairwinds + 0x0034c105, // n0x019a c0x0000 (---------------) + I faith + 0x0036c346, // n0x019b c0x0000 (---------------) + I family + 0x0020dd43, // n0x019c c0x0000 (---------------) + I fan + 0x002da484, // n0x019d c0x0000 (---------------) + I fans + 0x002a0f44, // n0x019e c0x0000 (---------------) + I farm + 0x00302a87, // n0x019f c0x0000 (---------------) + I farmers + 0x0022a887, // n0x01a0 c0x0000 (---------------) + I fashion + 0x002e01c4, // n0x01a1 c0x0000 (---------------) + I fast + 0x002120c5, // n0x01a2 c0x0000 (---------------) + I fedex + 0x00362488, // n0x01a3 c0x0000 (---------------) + I feedback + 0x002f6847, // n0x01a4 c0x0000 (---------------) + I ferrari + 0x00333207, // n0x01a5 c0x0000 (---------------) + I ferrero + 0x16e0e002, // n0x01a6 c0x005b (n0x094f-n0x0952) + I fi + 0x0028b4c4, // n0x01a7 c0x0000 (---------------) + I fiat + 0x003570c8, // n0x01a8 c0x0000 (---------------) + I fidelity + 0x00359c84, // n0x01a9 c0x0000 (---------------) + I fido + 0x00243ec4, // n0x01aa c0x0000 (---------------) + I film + 0x00244285, // n0x01ab c0x0000 (---------------) + I final + 0x002443c7, // n0x01ac c0x0000 (---------------) + I finance + 0x0020e009, // n0x01ad c0x0000 (---------------) + I financial + 0x00245884, // n0x01ae c0x0000 (---------------) + I fire + 0x00247509, // n0x01af c0x0000 (---------------) + I firestone + 0x00247a08, // n0x01b0 c0x0000 (---------------) + I firmdale + 0x00248504, // n0x01b1 c0x0000 (---------------) + I fish + 0x00248507, // n0x01b2 c0x0000 (---------------) + I fishing + 0x00248b03, // n0x01b3 c0x0000 (---------------) + I fit + 0x00249187, // n0x01b4 c0x0000 (---------------) + I fitness + 0x0162f3c2, // n0x01b5 c0x0005 (---------------)* o I fj + 0x016a4482, // n0x01b6 c0x0005 (---------------)* o I fk + 0x00249846, // n0x01b7 c0x0000 (---------------) + I flickr + 0x00249f07, // n0x01b8 c0x0000 (---------------) + I flights + 0x0024a344, // n0x01b9 c0x0000 (---------------) + I flir + 0x0024b087, // n0x01ba c0x0000 (---------------) + I florist + 0x0024bbc7, // n0x01bb c0x0000 (---------------) + I flowers + 0x0024c108, // n0x01bc c0x0000 (---------------) + I flsmidth + 0x0024c783, // n0x01bd c0x0000 (---------------) + I fly + 0x0023d4c2, // n0x01be c0x0000 (---------------) + I fm + 0x0023bb02, // n0x01bf c0x0000 (---------------) + I fo + 0x0024dc83, // n0x01c0 c0x0000 (---------------) + I foo + 0x0024dc8b, // n0x01c1 c0x0000 (---------------) + I foodnetwork + 0x00307808, // n0x01c2 c0x0000 (---------------) + I football + 0x00395184, // n0x01c3 c0x0000 (---------------) + I ford + 0x0024f2c5, // n0x01c4 c0x0000 (---------------) + I forex + 0x00252587, // n0x01c5 c0x0000 (---------------) + I forsale + 0x00253c85, // n0x01c6 c0x0000 (---------------) + I forum + 0x002b370a, // n0x01c7 c0x0000 (---------------) + I foundation + 0x00255183, // n0x01c8 c0x0000 (---------------) + I fox + 0x17207fc2, // n0x01c9 c0x005c (n0x0952-n0x096a) + I fr + 0x00256cc9, // n0x01ca c0x0000 (---------------) + I fresenius + 0x0025a843, // n0x01cb c0x0000 (---------------) + I frl + 0x0025a907, // n0x01cc c0x0000 (---------------) + I frogans + 0x0022c9c9, // n0x01cd c0x0000 (---------------) + I frontdoor + 0x0038c308, // n0x01ce c0x0000 (---------------) + I frontier + 0x00235583, // n0x01cf c0x0000 (---------------) + I ftr + 0x00273507, // n0x01d0 c0x0000 (---------------) + I fujitsu + 0x00273a09, // n0x01d1 c0x0000 (---------------) + I fujixerox + 0x00279fc4, // n0x01d2 c0x0000 (---------------) + I fund + 0x0027ae09, // n0x01d3 c0x0000 (---------------) + I furniture + 0x00280b06, // n0x01d4 c0x0000 (---------------) + I futbol + 0x00281d43, // n0x01d5 c0x0000 (---------------) + I fyi + 0x002006c2, // n0x01d6 c0x0000 (---------------) + I ga + 0x0021c683, // n0x01d7 c0x0000 (---------------) + I gal + 0x00397d47, // n0x01d8 c0x0000 (---------------) + I gallery + 0x00337a85, // n0x01d9 c0x0000 (---------------) + I gallo + 0x002dca86, // n0x01da c0x0000 (---------------) + I gallup + 0x0029f084, // n0x01db c0x0000 (---------------) + I game + 0x00318cc5, // n0x01dc c0x0000 (---------------) + I games + 0x00213683, // n0x01dd c0x0000 (---------------) + I gap + 0x002172c6, // n0x01de c0x0000 (---------------) + I garden + 0x00209582, // n0x01df c0x0000 (---------------) + I gb + 0x00383ac4, // n0x01e0 c0x0000 (---------------) + I gbiz + 0x00221f82, // n0x01e1 c0x0000 (---------------) + I gd + 0x002290c3, // n0x01e2 c0x0000 (---------------) + I gdn + 0x17603982, // n0x01e3 c0x005d (n0x096a-n0x0971) + I ge + 0x00244ac3, // n0x01e4 c0x0000 (---------------) + I gea + 0x00216ac4, // n0x01e5 c0x0000 (---------------) + I gent + 0x00216ac7, // n0x01e6 c0x0000 (---------------) + I genting + 0x0031e0c6, // n0x01e7 c0x0000 (---------------) + I george + 0x00255682, // n0x01e8 c0x0000 (---------------) + I gf + 0x17a4c482, // n0x01e9 c0x005e (n0x0971-n0x0974) + I gg + 0x0033b684, // n0x01ea c0x0000 (---------------) + I ggee + 0x17e45f82, // n0x01eb c0x005f (n0x0974-n0x0979) + I gh + 0x18212e42, // n0x01ec c0x0060 (n0x0979-n0x097f) + I gi + 0x00342584, // n0x01ed c0x0000 (---------------) + I gift + 0x00342585, // n0x01ee c0x0000 (---------------) + I gifts + 0x00219605, // n0x01ef c0x0000 (---------------) + I gives + 0x00261a06, // n0x01f0 c0x0000 (---------------) + I giving + 0x18602d82, // n0x01f1 c0x0061 (n0x097f-n0x0984) + I gl + 0x00319d05, // n0x01f2 c0x0000 (---------------) + I glade + 0x003959c5, // n0x01f3 c0x0000 (---------------) + I glass + 0x0027d403, // n0x01f4 c0x0000 (---------------) + I gle + 0x00205586, // n0x01f5 c0x0000 (---------------) + I global + 0x00206d05, // n0x01f6 c0x0000 (---------------) + I globo + 0x0020f7c2, // n0x01f7 c0x0000 (---------------) + I gm + 0x00331dc5, // n0x01f8 c0x0000 (---------------) + I gmail + 0x00210203, // n0x01f9 c0x0000 (---------------) + I gmo + 0x00214b43, // n0x01fa c0x0000 (---------------) + I gmx + 0x18a07e42, // n0x01fb c0x0062 (n0x0984-n0x098a) + I gn + 0x0025cd07, // n0x01fc c0x0000 (---------------) + I godaddy + 0x002f6ac4, // n0x01fd c0x0000 (---------------) + I gold + 0x002f6ac9, // n0x01fe c0x0000 (---------------) + I goldpoint + 0x00247c04, // n0x01ff c0x0000 (---------------) + I golf + 0x002799c3, // n0x0200 c0x0000 (---------------) + I goo + 0x0031bd09, // n0x0201 c0x0000 (---------------) + I goodhands + 0x002799c8, // n0x0202 c0x0000 (---------------) + I goodyear + 0x00293144, // n0x0203 c0x0000 (---------------) + I goog + 0x00293146, // n0x0204 c0x0000 (---------------) + I google + 0x0029ae43, // n0x0205 c0x0000 (---------------) + I gop + 0x00214503, // n0x0206 c0x0000 (---------------) + I got + 0x002d6804, // n0x0207 c0x0000 (---------------) + I gotv + 0x00275003, // n0x0208 c0x0000 (---------------) + I gov + 0x18edee02, // n0x0209 c0x0063 (n0x098a-n0x0990) + I gp + 0x002f83c2, // n0x020a c0x0000 (---------------) + I gq + 0x192089c2, // n0x020b c0x0064 (n0x0990-n0x0996) + I gr + 0x00315bc8, // n0x020c c0x0000 (---------------) + I grainger + 0x002ff848, // n0x020d c0x0000 (---------------) + I graphics + 0x00387486, // n0x020e c0x0000 (---------------) + I gratis + 0x0036bb45, // n0x020f c0x0000 (---------------) + I green + 0x00219c05, // n0x0210 c0x0000 (---------------) + I gripe + 0x0020eb45, // n0x0211 c0x0000 (---------------) + I group + 0x002242c2, // n0x0212 c0x0000 (---------------) + I gs + 0x19627d02, // n0x0213 c0x0065 (n0x0996-n0x099d) + I gt + 0x01605a82, // n0x0214 c0x0005 (---------------)* o I gu + 0x0034c288, // n0x0215 c0x0000 (---------------) + I guardian + 0x0036b3c5, // n0x0216 c0x0000 (---------------) + I gucci + 0x002d9b84, // n0x0217 c0x0000 (---------------) + I guge + 0x0036d085, // n0x0218 c0x0000 (---------------) + I guide + 0x0039c107, // n0x0219 c0x0000 (---------------) + I guitars + 0x00330644, // n0x021a c0x0000 (---------------) + I guru + 0x0020fb82, // n0x021b c0x0000 (---------------) + I gw + 0x19a01642, // n0x021c c0x0066 (n0x099d-n0x09a0) + I gy + 0x00205407, // n0x021d c0x0000 (---------------) + I hamburg + 0x0037e0c7, // n0x021e c0x0000 (---------------) + I hangout + 0x0035d204, // n0x021f c0x0000 (---------------) + I haus + 0x00288843, // n0x0220 c0x0000 (---------------) + I hbo + 0x00242d84, // n0x0221 c0x0000 (---------------) + I hdfc + 0x00242d88, // n0x0222 c0x0000 (---------------) + I hdfcbank + 0x002a51c6, // n0x0223 c0x0000 (---------------) + I health + 0x002a51ca, // n0x0224 c0x0000 (---------------) + I healthcare + 0x0020dec4, // n0x0225 c0x0000 (---------------) + I help + 0x0020c9c8, // n0x0226 c0x0000 (---------------) + I helsinki + 0x0024c384, // n0x0227 c0x0000 (---------------) + I here + 0x00221346, // n0x0228 c0x0000 (---------------) + I hermes + 0x00289a84, // n0x0229 c0x0000 (---------------) + I hgtv + 0x0033cb06, // n0x022a c0x0000 (---------------) + I hiphop + 0x00229cc9, // n0x022b c0x0000 (---------------) + I hisamitsu + 0x00299f47, // n0x022c c0x0000 (---------------) + I hitachi + 0x0036b303, // n0x022d c0x0000 (---------------) + I hiv + 0x19e0e882, // n0x022e c0x0067 (n0x09a0-n0x09b8) + I hk + 0x002667c3, // n0x022f c0x0000 (---------------) + I hkt + 0x0020c742, // n0x0230 c0x0000 (---------------) + I hm + 0x1a218902, // n0x0231 c0x0068 (n0x09b8-n0x09be) + I hn + 0x002d8e06, // n0x0232 c0x0000 (---------------) + I hockey + 0x00358bc8, // n0x0233 c0x0000 (---------------) + I holdings + 0x0029c0c7, // n0x0234 c0x0000 (---------------) + I holiday + 0x0026c749, // n0x0235 c0x0000 (---------------) + I homedepot + 0x00290d49, // n0x0236 c0x0000 (---------------) + I homegoods + 0x0029cc05, // n0x0237 c0x0000 (---------------) + I homes + 0x0029cc09, // n0x0238 c0x0000 (---------------) + I homesense + 0x0029e045, // n0x0239 c0x0000 (---------------) + I honda + 0x0029e7c9, // n0x023a c0x0000 (---------------) + I honeywell + 0x0029f5c5, // n0x023b c0x0000 (---------------) + I horse + 0x00207a84, // n0x023c c0x0000 (---------------) + I host + 0x0029f1c7, // n0x023d c0x0000 (---------------) + I hosting + 0x0022fac3, // n0x023e c0x0000 (---------------) + I hot + 0x0029fcc7, // n0x023f c0x0000 (---------------) + I hoteles + 0x002a0287, // n0x0240 c0x0000 (---------------) + I hotmail + 0x00299885, // n0x0241 c0x0000 (---------------) + I house + 0x00296183, // n0x0242 c0x0000 (---------------) + I how + 0x1a632882, // n0x0243 c0x0069 (n0x09be-n0x09c3) + I hr + 0x00385384, // n0x0244 c0x0000 (---------------) + I hsbc + 0x1aa45fc2, // n0x0245 c0x006a (n0x09c3-n0x09d4) + I ht + 0x00255803, // n0x0246 c0x0000 (---------------) + I htc + 0x1ae0d0c2, // n0x0247 c0x006b (n0x09d4-n0x09f4) + I hu + 0x002ef4c6, // n0x0248 c0x0000 (---------------) + I hughes + 0x003785c5, // n0x0249 c0x0000 (---------------) + I hyatt + 0x002a4107, // n0x024a c0x0000 (---------------) + I hyundai + 0x00264103, // n0x024b c0x0000 (---------------) + I ibm + 0x0035bac4, // n0x024c c0x0000 (---------------) + I icbc + 0x00202e83, // n0x024d c0x0000 (---------------) + I ice + 0x002ce583, // n0x024e c0x0000 (---------------) + I icu + 0x1b205d82, // n0x024f c0x006c (n0x09f4-n0x09ff) + I id + 0x1ba00042, // n0x0250 c0x006e (n0x0a00-n0x0a02) + I ie + 0x00364304, // n0x0251 c0x0000 (---------------) + I ieee + 0x0023d483, // n0x0252 c0x0000 (---------------) + I ifm + 0x002bc045, // n0x0253 c0x0000 (---------------) + I iinet + 0x002bbe85, // n0x0254 c0x0000 (---------------) + I ikano + 0x1be02f82, // n0x0255 c0x006f (n0x0a02-n0x0a0a) + I il + 0x1c607242, // n0x0256 c0x0071 (n0x0a0b-n0x0a12) + I im + 0x0024fd06, // n0x0257 c0x0000 (---------------) + I imamat + 0x00307644, // n0x0258 c0x0000 (---------------) + I imdb + 0x00207784, // n0x0259 c0x0000 (---------------) + I immo + 0x0020778a, // n0x025a c0x0000 (---------------) + I immobilien + 0x1ce020c2, // n0x025b c0x0073 (n0x0a14-n0x0a21) + I in + 0x0036568a, // n0x025c c0x0000 (---------------) + I industries + 0x00389f88, // n0x025d c0x0000 (---------------) + I infiniti + 0x1d38a144, // n0x025e c0x0074 (n0x0a21-n0x0a2b) + I info + 0x00202d03, // n0x025f c0x0000 (---------------) + I ing + 0x00202743, // n0x0260 c0x0000 (---------------) + I ink + 0x0030dd89, // n0x0261 c0x0000 (---------------) + I institute + 0x00239c09, // n0x0262 c0x0000 (---------------) + I insurance + 0x002f91c6, // n0x0263 c0x0000 (---------------) + I insure + 0x1d66f683, // n0x0264 c0x0075 (n0x0a2b-n0x0a2c) + I int + 0x002f6c45, // n0x0265 c0x0000 (---------------) + I intel + 0x002fd58d, // n0x0266 c0x0000 (---------------) + I international + 0x002efac6, // n0x0267 c0x0000 (---------------) + I intuit + 0x0020218b, // n0x0268 c0x0000 (---------------) + I investments + 0x1da00542, // n0x0269 c0x0076 (n0x0a2c-n0x0a31) + I io + 0x00253a88, // n0x026a c0x0000 (---------------) + I ipiranga + 0x1de048c2, // n0x026b c0x0077 (n0x0a31-n0x0a37) + I iq + 0x1e204082, // n0x026c c0x0078 (n0x0a37-n0x0a40) + I ir + 0x00291085, // n0x026d c0x0000 (---------------) + I irish + 0x1e601a02, // n0x026e c0x0079 (n0x0a40-n0x0a48) + I is + 0x00253f07, // n0x026f c0x0000 (---------------) + I iselect + 0x0027d787, // n0x0270 c0x0000 (---------------) + I ismaili + 0x00201a03, // n0x0271 c0x0000 (---------------) + I ist + 0x002ec0c8, // n0x0272 c0x0000 (---------------) + I istanbul + 0x1ea06f82, // n0x0273 c0x007a (n0x0a48-n0x0bb9) + I it + 0x0026a984, // n0x0274 c0x0000 (---------------) + I itau + 0x00206f83, // n0x0275 c0x0000 (---------------) + I itv + 0x00320745, // n0x0276 c0x0000 (---------------) + I iveco + 0x00366503, // n0x0277 c0x0000 (---------------) + I iwc + 0x002c3306, // n0x0278 c0x0000 (---------------) + I jaguar + 0x00317a04, // n0x0279 c0x0000 (---------------) + I java + 0x0023dfc3, // n0x027a c0x0000 (---------------) + I jcb + 0x00266b43, // n0x027b c0x0000 (---------------) + I jcp + 0x1ee07602, // n0x027c c0x007b (n0x0bb9-n0x0bbc) + I je + 0x0022b604, // n0x027d c0x0000 (---------------) + I jeep + 0x0034a685, // n0x027e c0x0000 (---------------) + I jetzt + 0x0035e0c7, // n0x027f c0x0000 (---------------) + I jewelry + 0x002716c3, // n0x0280 c0x0000 (---------------) + I jio + 0x002a49c3, // n0x0281 c0x0000 (---------------) + I jlc + 0x002a6003, // n0x0282 c0x0000 (---------------) + I jll + 0x01675282, // n0x0283 c0x0005 (---------------)* o I jm + 0x002a60c3, // n0x0284 c0x0000 (---------------) + I jmp + 0x002a7143, // n0x0285 c0x0000 (---------------) + I jnj + 0x1f201842, // n0x0286 c0x007c (n0x0bbc-n0x0bc4) + I jo + 0x002cd804, // n0x0287 c0x0000 (---------------) + I jobs + 0x00274746, // n0x0288 c0x0000 (---------------) + I joburg + 0x0020a143, // n0x0289 c0x0000 (---------------) + I jot + 0x002a74c3, // n0x028a c0x0000 (---------------) + I joy + 0x1f6a8bc2, // n0x028b c0x007d (n0x0bc4-n0x0c33) + I jp + 0x002a8bc8, // n0x028c c0x0000 (---------------) + I jpmorgan + 0x002a9a84, // n0x028d c0x0000 (---------------) + I jprs + 0x00247e06, // n0x028e c0x0000 (---------------) + I juegos + 0x002a9fc7, // n0x028f c0x0000 (---------------) + I juniper + 0x0020e386, // n0x0290 c0x0000 (---------------) + I kaufen + 0x002ad104, // n0x0291 c0x0000 (---------------) + I kddi + 0x2d202bc2, // n0x0292 c0x00b4 (n0x12c7-n0x12c8)* o I ke + 0x0022f98b, // n0x0293 c0x0000 (---------------) + I kerryhotels + 0x002dc18e, // n0x0294 c0x0000 (---------------) + I kerrylogistics + 0x0022014f, // n0x0295 c0x0000 (---------------) + I kerryproperties + 0x00325a03, // n0x0296 c0x0000 (---------------) + I kfh + 0x2dab1882, // n0x0297 c0x00b6 (n0x12c9-n0x12cf) + I kg + 0x01600a02, // n0x0298 c0x0005 (---------------)* o I kh + 0x2de03142, // n0x0299 c0x00b7 (n0x12cf-n0x12d6) + I ki + 0x0022a743, // n0x029a c0x0000 (---------------) + I kia + 0x00229403, // n0x029b c0x0000 (---------------) + I kim + 0x00305fc6, // n0x029c c0x0000 (---------------) + I kinder + 0x0032fd86, // n0x029d c0x0000 (---------------) + I kindle + 0x00318fc7, // n0x029e c0x0000 (---------------) + I kitchen + 0x002e2c84, // n0x029f c0x0000 (---------------) + I kiwi + 0x2e22ccc2, // n0x02a0 c0x00b8 (n0x12d6-n0x12e7) + I km + 0x2e651942, // n0x02a1 c0x00b9 (n0x12e7-n0x12eb) + I kn + 0x002a5b85, // n0x02a2 c0x0000 (---------------) + I koeln + 0x0028e9c7, // n0x02a3 c0x0000 (---------------) + I komatsu + 0x002e4886, // n0x02a4 c0x0000 (---------------) + I kosher + 0x2ea08742, // n0x02a5 c0x00ba (n0x12eb-n0x12f1) + I kp + 0x00208744, // n0x02a6 c0x0000 (---------------) + I kpmg + 0x0036e383, // n0x02a7 c0x0000 (---------------) + I kpn + 0x2ee076c2, // n0x02a8 c0x00bb (n0x12f1-n0x130f) + I kr + 0x00349b03, // n0x02a9 c0x0000 (---------------) + I krd + 0x003a0504, // n0x02aa c0x0000 (---------------) + I kred + 0x002b17c9, // n0x02ab c0x0000 (---------------) + I kuokgroup + 0x016b82c2, // n0x02ac c0x0005 (---------------)* o I kw + 0x2f23ae42, // n0x02ad c0x00bc (n0x130f-n0x1314) + I ky + 0x00261cc6, // n0x02ae c0x0000 (---------------) + I kyknet + 0x002b8805, // n0x02af c0x0000 (---------------) + I kyoto + 0x2f70a942, // n0x02b0 c0x00bd (n0x1314-n0x131a) + I kz + 0x2fa03842, // n0x02b1 c0x00be (n0x131a-n0x1323) + I la + 0x00336007, // n0x02b2 c0x0000 (---------------) + I lacaixa + 0x0020ba89, // n0x02b3 c0x0000 (---------------) + I ladbrokes + 0x0034d68b, // n0x02b4 c0x0000 (---------------) + I lamborghini + 0x00240a45, // n0x02b5 c0x0000 (---------------) + I lamer + 0x00369b89, // n0x02b6 c0x0000 (---------------) + I lancaster + 0x002ba286, // n0x02b7 c0x0000 (---------------) + I lancia + 0x00251487, // n0x02b8 c0x0000 (---------------) + I lancome + 0x00204e44, // n0x02b9 c0x0000 (---------------) + I land + 0x002bc689, // n0x02ba c0x0000 (---------------) + I landrover + 0x00353a07, // n0x02bb c0x0000 (---------------) + I lanxess + 0x0027c207, // n0x02bc c0x0000 (---------------) + I lasalle + 0x00203843, // n0x02bd c0x0000 (---------------) + I lat + 0x002247c6, // n0x02be c0x0000 (---------------) + I latino + 0x002cac47, // n0x02bf c0x0000 (---------------) + I latrobe + 0x00209183, // n0x02c0 c0x0000 (---------------) + I law + 0x0025d606, // n0x02c1 c0x0000 (---------------) + I lawyer + 0x2fe02fc2, // n0x02c2 c0x00bf (n0x1323-n0x1328) + I lb + 0x30234c42, // n0x02c3 c0x00c0 (n0x1328-n0x132e) + I lc + 0x0021f403, // n0x02c4 c0x0000 (---------------) + I lds + 0x0027c345, // n0x02c5 c0x0000 (---------------) + I lease + 0x002acc07, // n0x02c6 c0x0000 (---------------) + I leclerc + 0x00351906, // n0x02c7 c0x0000 (---------------) + I lefrak + 0x00337a05, // n0x02c8 c0x0000 (---------------) + I legal + 0x00247b84, // n0x02c9 c0x0000 (---------------) + I lego + 0x002d8305, // n0x02ca c0x0000 (---------------) + I lexus + 0x002df5c4, // n0x02cb c0x0000 (---------------) + I lgbt + 0x306019c2, // n0x02cc c0x00c1 (n0x132e-n0x132f) + I li + 0x00310b07, // n0x02cd c0x0000 (---------------) + I liaison + 0x002b6a44, // n0x02ce c0x0000 (---------------) + I lidl + 0x00239b04, // n0x02cf c0x0000 (---------------) + I life + 0x00239b0d, // n0x02d0 c0x0000 (---------------) + I lifeinsurance + 0x0023ec89, // n0x02d1 c0x0000 (---------------) + I lifestyle + 0x00245f08, // n0x02d2 c0x0000 (---------------) + I lighting + 0x002510c4, // n0x02d3 c0x0000 (---------------) + I like + 0x00263dc5, // n0x02d4 c0x0000 (---------------) + I lilly + 0x0030e807, // n0x02d5 c0x0000 (---------------) + I limited + 0x00342804, // n0x02d6 c0x0000 (---------------) + I limo + 0x00351ec7, // n0x02d7 c0x0000 (---------------) + I lincoln + 0x0039ae45, // n0x02d8 c0x0000 (---------------) + I linde + 0x00202704, // n0x02d9 c0x0000 (---------------) + I link + 0x002cfd05, // n0x02da c0x0000 (---------------) + I lipsy + 0x00259504, // n0x02db c0x0000 (---------------) + I live + 0x002d8446, // n0x02dc c0x0000 (---------------) + I living + 0x003581c5, // n0x02dd c0x0000 (---------------) + I lixil + 0x30a08702, // n0x02de c0x00c2 (n0x132f-n0x133e) + I lk + 0x00211544, // n0x02df c0x0000 (---------------) + I loan + 0x00211545, // n0x02e0 c0x0000 (---------------) + I loans + 0x00373906, // n0x02e1 c0x0000 (---------------) + I locker + 0x00337b45, // n0x02e2 c0x0000 (---------------) + I locus + 0x002cdfc4, // n0x02e3 c0x0000 (---------------) + I loft + 0x002bf2c3, // n0x02e4 c0x0000 (---------------) + I lol + 0x00310546, // n0x02e5 c0x0000 (---------------) + I london + 0x0021a6c5, // n0x02e6 c0x0000 (---------------) + I lotte + 0x00221a85, // n0x02e7 c0x0000 (---------------) + I lotto + 0x00229244, // n0x02e8 c0x0000 (---------------) + I love + 0x0020df43, // n0x02e9 c0x0000 (---------------) + I lpl + 0x0020df4c, // n0x02ea c0x0000 (---------------) + I lplfinancial + 0x30e81442, // n0x02eb c0x00c3 (n0x133e-n0x1343) + I lr + 0x31201c02, // n0x02ec c0x00c4 (n0x1343-n0x1345) + I ls + 0x31608bc2, // n0x02ed c0x00c5 (n0x1345-n0x1347) + I lt + 0x00342703, // n0x02ee c0x0000 (---------------) + I ltd + 0x00342704, // n0x02ef c0x0000 (---------------) + I ltda + 0x31a02542, // n0x02f0 c0x00c6 (n0x1347-n0x1348) + I lu + 0x002dc548, // n0x02f1 c0x0000 (---------------) + I lundbeck + 0x002dcb45, // n0x02f2 c0x0000 (---------------) + I lupin + 0x00339384, // n0x02f3 c0x0000 (---------------) + I luxe + 0x00231e46, // n0x02f4 c0x0000 (---------------) + I luxury + 0x31e07302, // n0x02f5 c0x00c7 (n0x1348-n0x1351) + I lv + 0x3223dcc2, // n0x02f6 c0x00c8 (n0x1351-n0x135a) + I ly + 0x32600182, // n0x02f7 c0x00c9 (n0x135a-n0x1360) + I ma + 0x002eca45, // n0x02f8 c0x0000 (---------------) + I macys + 0x00306e06, // n0x02f9 c0x0000 (---------------) + I madrid + 0x002a0e84, // n0x02fa c0x0000 (---------------) + I maif + 0x00204bc6, // n0x02fb c0x0000 (---------------) + I maison + 0x00307fc6, // n0x02fc c0x0000 (---------------) + I makeup + 0x00237243, // n0x02fd c0x0000 (---------------) + I man + 0x0036c88a, // n0x02fe c0x0000 (---------------) + I management + 0x00237245, // n0x02ff c0x0000 (---------------) + I mango + 0x0022dc46, // n0x0300 c0x0000 (---------------) + I market + 0x002e5f89, // n0x0301 c0x0000 (---------------) + I marketing + 0x002318c7, // n0x0302 c0x0000 (---------------) + I markets + 0x0020ce08, // n0x0303 c0x0000 (---------------) + I marriott + 0x0028e5c9, // n0x0304 c0x0000 (---------------) + I marshalls + 0x0020d888, // n0x0305 c0x0000 (---------------) + I maserati + 0x00339746, // n0x0306 c0x0000 (---------------) + I mattel + 0x0022ee83, // n0x0307 c0x0000 (---------------) + I mba + 0x32ad2e42, // n0x0308 c0x00ca (n0x1360-n0x1362) + I mc + 0x003770c3, // n0x0309 c0x0000 (---------------) + I mcd + 0x003770c9, // n0x030a c0x0000 (---------------) + I mcdonalds + 0x00309e08, // n0x030b c0x0000 (---------------) + I mckinsey + 0x32e47ac2, // n0x030c c0x00cb (n0x1362-n0x1363) + I md + 0x33202302, // n0x030d c0x00cc (n0x1363-n0x136b) + I me + 0x00211c43, // n0x030e c0x0000 (---------------) + I med + 0x002fb545, // n0x030f c0x0000 (---------------) + I media + 0x00262d84, // n0x0310 c0x0000 (---------------) + I meet + 0x002dae09, // n0x0311 c0x0000 (---------------) + I melbourne + 0x002ae4c4, // n0x0312 c0x0000 (---------------) + I meme + 0x00338b08, // n0x0313 c0x0000 (---------------) + I memorial + 0x00202303, // n0x0314 c0x0000 (---------------) + I men + 0x00226244, // n0x0315 c0x0000 (---------------) + I menu + 0x00322c03, // n0x0316 c0x0000 (---------------) + I meo + 0x00239a47, // n0x0317 c0x0000 (---------------) + I metlife + 0x336087c2, // n0x0318 c0x00cd (n0x136b-n0x1374) + I mg + 0x0024ee82, // n0x0319 c0x0000 (---------------) + I mh + 0x00383105, // n0x031a c0x0000 (---------------) + I miami + 0x002634c9, // n0x031b c0x0000 (---------------) + I microsoft + 0x00215b43, // n0x031c c0x0000 (---------------) + I mil + 0x00274d84, // n0x031d c0x0000 (---------------) + I mini + 0x002fd544, // n0x031e c0x0000 (---------------) + I mint + 0x00229483, // n0x031f c0x0000 (---------------) + I mit + 0x00275e4a, // n0x0320 c0x0000 (---------------) + I mitsubishi + 0x33b65542, // n0x0321 c0x00ce (n0x1374-n0x137c) + I mk + 0x33e11502, // n0x0322 c0x00cf (n0x137c-n0x1383) + I ml + 0x002bb4c3, // n0x0323 c0x0000 (---------------) + I mlb + 0x00367c83, // n0x0324 c0x0000 (---------------) + I mls + 0x016077c2, // n0x0325 c0x0005 (---------------)* o I mm + 0x0036acc3, // n0x0326 c0x0000 (---------------) + I mma + 0x3421d882, // n0x0327 c0x00d0 (n0x1383-n0x1387) + I mn + 0x0021d884, // n0x0328 c0x0000 (---------------) + I mnet + 0x34603ec2, // n0x0329 c0x00d1 (n0x1387-n0x138c) + I mo + 0x00207804, // n0x032a c0x0000 (---------------) + I mobi + 0x002d2346, // n0x032b c0x0000 (---------------) + I mobily + 0x00264dc4, // n0x032c c0x0000 (---------------) + I moda + 0x00248203, // n0x032d c0x0000 (---------------) + I moe + 0x00278c03, // n0x032e c0x0000 (---------------) + I moi + 0x0020ed83, // n0x032f c0x0000 (---------------) + I mom + 0x0023e706, // n0x0330 c0x0000 (---------------) + I monash + 0x002c5005, // n0x0331 c0x0000 (---------------) + I money + 0x002bef07, // n0x0332 c0x0000 (---------------) + I monster + 0x00251349, // n0x0333 c0x0000 (---------------) + I montblanc + 0x002c2245, // n0x0334 c0x0000 (---------------) + I mopar + 0x002c4f46, // n0x0335 c0x0000 (---------------) + I mormon + 0x002c58c8, // n0x0336 c0x0000 (---------------) + I mortgage + 0x002c5ac6, // n0x0337 c0x0000 (---------------) + I moscow + 0x00270fc4, // n0x0338 c0x0000 (---------------) + I moto + 0x0029214b, // n0x0339 c0x0000 (---------------) + I motorcycles + 0x002c7003, // n0x033a c0x0000 (---------------) + I mov + 0x002c7005, // n0x033b c0x0000 (---------------) + I movie + 0x002c7148, // n0x033c c0x0000 (---------------) + I movistar + 0x00226dc2, // n0x033d c0x0000 (---------------) + I mp + 0x00336302, // n0x033e c0x0000 (---------------) + I mq + 0x34a425c2, // n0x033f c0x00d2 (n0x138c-n0x138e) + I mr + 0x34e02482, // n0x0340 c0x00d3 (n0x138e-n0x1393) + I ms + 0x00263cc3, // n0x0341 c0x0000 (---------------) + I msd + 0x35235702, // n0x0342 c0x00d4 (n0x1393-n0x1397) + I mt + 0x00265803, // n0x0343 c0x0000 (---------------) + I mtn + 0x002c7444, // n0x0344 c0x0000 (---------------) + I mtpc + 0x002c7c03, // n0x0345 c0x0000 (---------------) + I mtr + 0x35a01f42, // n0x0346 c0x00d6 (n0x1398-n0x139f) + I mu + 0x002c990b, // n0x0347 c0x0000 (---------------) + I multichoice + 0x35ecc746, // n0x0348 c0x00d7 (n0x139f-n0x15c3) + I museum + 0x00238746, // n0x0349 c0x0000 (---------------) + I mutual + 0x002ccd88, // n0x034a c0x0000 (---------------) + I mutuelle + 0x362878c2, // n0x034b c0x00d8 (n0x15c3-n0x15d1) + I mv + 0x3660f2c2, // n0x034c c0x00d9 (n0x15d1-n0x15dc) + I mw + 0x36a14b82, // n0x034d c0x00da (n0x15dc-n0x15e2) + I mx + 0x36e2a6c2, // n0x034e c0x00db (n0x15e2-n0x15ea) + I my + 0x37212c42, // n0x034f c0x00dc (n0x15ea-n0x15eb)* o I mz + 0x00212c4b, // n0x0350 c0x0000 (---------------) + I mzansimagic + 0x376005c2, // n0x0351 c0x00dd (n0x15eb-n0x15fc) + I na + 0x002156c3, // n0x0352 c0x0000 (---------------) + I nab + 0x0035b3c5, // n0x0353 c0x0000 (---------------) + I nadex + 0x0022d886, // n0x0354 c0x0000 (---------------) + I nagoya + 0x37a7ca84, // n0x0355 c0x00de (n0x15fc-n0x15fe) + I name + 0x003036c7, // n0x0356 c0x0000 (---------------) + I naspers + 0x0035ae4a, // n0x0357 c0x0000 (---------------) + I nationwide + 0x00308d86, // n0x0358 c0x0000 (---------------) + I natura + 0x00394304, // n0x0359 c0x0000 (---------------) + I navy + 0x00255983, // n0x035a c0x0000 (---------------) + I nba + 0x38603402, // n0x035b c0x00e1 (n0x1600-n0x1601) + I nc + 0x00203282, // n0x035c c0x0000 (---------------) + I ne + 0x00322303, // n0x035d c0x0000 (---------------) + I nec + 0x38a1d8c3, // n0x035e c0x00e2 (n0x1601-n0x1632) + I net + 0x0030a7c7, // n0x035f c0x0000 (---------------) + I netbank + 0x003580c7, // n0x0360 c0x0000 (---------------) + I netflix + 0x0024dd87, // n0x0361 c0x0000 (---------------) + I network + 0x00224507, // n0x0362 c0x0000 (---------------) + I neustar + 0x0021dd03, // n0x0363 c0x0000 (---------------) + I new + 0x002ca6ca, // n0x0364 c0x0000 (---------------) + I newholland + 0x0021fe44, // n0x0365 c0x0000 (---------------) + I news + 0x002476c4, // n0x0366 c0x0000 (---------------) + I next + 0x002476ca, // n0x0367 c0x0000 (---------------) + I nextdirect + 0x00266385, // n0x0368 c0x0000 (---------------) + I nexus + 0x39e037c2, // n0x0369 c0x00e7 (n0x163a-n0x1644) + I nf + 0x002037c3, // n0x036a c0x0000 (---------------) + I nfl + 0x3a202d42, // n0x036b c0x00e8 (n0x1644-n0x164d) + I ng + 0x002084c3, // n0x036c c0x0000 (---------------) + I ngo + 0x00266783, // n0x036d c0x0000 (---------------) + I nhk + 0x0160a7c2, // n0x036e c0x0005 (---------------)* o I ni + 0x00382ec4, // n0x036f c0x0000 (---------------) + I nico + 0x0021c3c4, // n0x0370 c0x0000 (---------------) + I nike + 0x0020d185, // n0x0371 c0x0000 (---------------) + I nikon + 0x002c6d85, // n0x0372 c0x0000 (---------------) + I ninja + 0x0036bc46, // n0x0373 c0x0000 (---------------) + I nissan + 0x3aa3e082, // n0x0374 c0x00ea (n0x164e-n0x1651) + I nl + 0x3ae00d82, // n0x0375 c0x00eb (n0x1651-n0x1927) + I no + 0x002f5685, // n0x0376 c0x0000 (---------------) + I nokia + 0x00238452, // n0x0377 c0x0000 (---------------) + I northwesternmutual + 0x003099c6, // n0x0378 c0x0000 (---------------) + I norton + 0x00217c83, // n0x0379 c0x0000 (---------------) + I now + 0x00294486, // n0x037a c0x0000 (---------------) + I nowruz + 0x00217c85, // n0x037b c0x0000 (---------------) + I nowtv + 0x01600c02, // n0x037c c0x0005 (---------------)* o I np + 0x4329d602, // n0x037d c0x010c (n0x194f-n0x1956) + I nr + 0x002f3043, // n0x037e c0x0000 (---------------) + I nra + 0x00332603, // n0x037f c0x0000 (---------------) + I nrw + 0x003702c3, // n0x0380 c0x0000 (---------------) + I ntt + 0x43609702, // n0x0381 c0x010d (n0x1956-n0x1959) + I nu + 0x0036c603, // n0x0382 c0x0000 (---------------) + I nyc + 0x43a09a82, // n0x0383 c0x010e (n0x1959-n0x1969) + I nz + 0x00207843, // n0x0384 c0x0000 (---------------) + I obi + 0x002cd848, // n0x0385 c0x0000 (---------------) + I observer + 0x0021f703, // n0x0386 c0x0000 (---------------) + I off + 0x0021f706, // n0x0387 c0x0000 (---------------) + I office + 0x00390f07, // n0x0388 c0x0000 (---------------) + I okinawa + 0x0020e9c6, // n0x0389 c0x0000 (---------------) + I olayan + 0x0020e9cb, // n0x038a c0x0000 (---------------) + I olayangroup + 0x00394247, // n0x038b c0x0000 (---------------) + I oldnavy + 0x00385184, // n0x038c c0x0000 (---------------) + I ollo + 0x44201f02, // n0x038d c0x0110 (n0x196a-n0x1973) + I om + 0x002dc9c5, // n0x038e c0x0000 (---------------) + I omega + 0x00203f03, // n0x038f c0x0000 (---------------) + I one + 0x0027c9c3, // n0x0390 c0x0000 (---------------) + I ong + 0x00316943, // n0x0391 c0x0000 (---------------) + I onl + 0x00316946, // n0x0392 c0x0000 (---------------) + I online + 0x0039648a, // n0x0393 c0x0000 (---------------) + I onyourside + 0x00285703, // n0x0394 c0x0000 (---------------) + I ooo + 0x00239284, // n0x0395 c0x0000 (---------------) + I open + 0x0033d486, // n0x0396 c0x0000 (---------------) + I oracle + 0x00391646, // n0x0397 c0x0000 (---------------) + I orange + 0x44629a83, // n0x0398 c0x0111 (n0x1973-n0x19ae) + I org + 0x002a8c87, // n0x0399 c0x0000 (---------------) + I organic + 0x002d4d8d, // n0x039a c0x0000 (---------------) + I orientexpress + 0x00371dc7, // n0x039b c0x0000 (---------------) + I origins + 0x00291e85, // n0x039c c0x0000 (---------------) + I osaka + 0x0025de06, // n0x039d c0x0000 (---------------) + I otsuka + 0x0020cf43, // n0x039e c0x0000 (---------------) + I ott + 0x002057c3, // n0x039f c0x0000 (---------------) + I ovh + 0x45e0ec42, // n0x03a0 c0x0117 (n0x19eb-n0x19f6) + I pa + 0x00323c44, // n0x03a1 c0x0000 (---------------) + I page + 0x002dff0c, // n0x03a2 c0x0000 (---------------) + I pamperedchef + 0x00233489, // n0x03a3 c0x0000 (---------------) + I panasonic + 0x0023b907, // n0x03a4 c0x0000 (---------------) + I panerai + 0x00252285, // n0x03a5 c0x0000 (---------------) + I paris + 0x0027f584, // n0x03a6 c0x0000 (---------------) + I pars + 0x0037ec88, // n0x03a7 c0x0000 (---------------) + I partners + 0x0029aec5, // n0x03a8 c0x0000 (---------------) + I parts + 0x0029c3c5, // n0x03a9 c0x0000 (---------------) + I party + 0x002b09c9, // n0x03aa c0x0000 (---------------) + I passagens + 0x002b7203, // n0x03ab c0x0000 (---------------) + I pay + 0x002b7204, // n0x03ac c0x0000 (---------------) + I payu + 0x002c74c4, // n0x03ad c0x0000 (---------------) + I pccw + 0x46209a02, // n0x03ae c0x0118 (n0x19f6-n0x19fe) + I pe + 0x0020e283, // n0x03af c0x0000 (---------------) + I pet + 0x466d0882, // n0x03b0 c0x0119 (n0x19fe-n0x1a01) + I pf + 0x002d0886, // n0x03b1 c0x0000 (---------------) + I pfizer + 0x01708882, // n0x03b2 c0x0005 (---------------)* o I pg + 0x46acd182, // n0x03b3 c0x011a (n0x1a01-n0x1a09) + I ph + 0x002ec948, // n0x03b4 c0x0000 (---------------) + I pharmacy + 0x002cfc47, // n0x03b5 c0x0000 (---------------) + I philips + 0x002cd185, // n0x03b6 c0x0000 (---------------) + I photo + 0x002d02cb, // n0x03b7 c0x0000 (---------------) + I photography + 0x002cd186, // n0x03b8 c0x0000 (---------------) + I photos + 0x002d04c6, // n0x03b9 c0x0000 (---------------) + I physio + 0x002d0646, // n0x03ba c0x0000 (---------------) + I piaget + 0x00220ac4, // n0x03bb c0x0000 (---------------) + I pics + 0x002d0a06, // n0x03bc c0x0000 (---------------) + I pictet + 0x002d0ec8, // n0x03bd c0x0000 (---------------) + I pictures + 0x0023c003, // n0x03be c0x0000 (---------------) + I pid + 0x00219b43, // n0x03bf c0x0000 (---------------) + I pin + 0x00219b44, // n0x03c0 c0x0000 (---------------) + I ping + 0x002d1784, // n0x03c1 c0x0000 (---------------) + I pink + 0x002d1bc7, // n0x03c2 c0x0000 (---------------) + I pioneer + 0x002d2645, // n0x03c3 c0x0000 (---------------) + I pizza + 0x46ed2782, // n0x03c4 c0x011b (n0x1a09-n0x1a17) + I pk + 0x47206582, // n0x03c5 c0x011c (n0x1a17-n0x1abc) + I pl + 0x00206585, // n0x03c6 c0x0000 (---------------) + I place + 0x0028bd84, // n0x03c7 c0x0000 (---------------) + I play + 0x002d470b, // n0x03c8 c0x0000 (---------------) + I playstation + 0x002d6648, // n0x03c9 c0x0000 (---------------) + I plumbing + 0x002d6ec4, // n0x03ca c0x0000 (---------------) + I plus + 0x00208782, // n0x03cb c0x0000 (---------------) + I pm + 0x47aa98c2, // n0x03cc c0x011e (n0x1aeb-n0x1af0) + I pn + 0x002a98c3, // n0x03cd c0x0000 (---------------) + I pnc + 0x002d7304, // n0x03ce c0x0000 (---------------) + I pohl + 0x002d7405, // n0x03cf c0x0000 (---------------) + I poker + 0x002d7947, // n0x03d0 c0x0000 (---------------) + I politie + 0x002d96c4, // n0x03d1 c0x0000 (---------------) + I porn + 0x0035d304, // n0x03d2 c0x0000 (---------------) + I post + 0x47e04382, // n0x03d3 c0x011f (n0x1af0-n0x1afd) + I pr + 0x00352e09, // n0x03d4 c0x0000 (---------------) + I pramerica + 0x002da0c5, // n0x03d5 c0x0000 (---------------) + I praxi + 0x00240d05, // n0x03d6 c0x0000 (---------------) + I press + 0x002dad45, // n0x03d7 c0x0000 (---------------) + I prime + 0x48220283, // n0x03d8 c0x0120 (n0x1afd-n0x1b04) + I pro + 0x002db644, // n0x03d9 c0x0000 (---------------) + I prod + 0x002db64b, // n0x03da c0x0000 (---------------) + I productions + 0x002dba84, // n0x03db c0x0000 (---------------) + I prof + 0x002dbd0b, // n0x03dc c0x0000 (---------------) + I progressive + 0x002dd745, // n0x03dd c0x0000 (---------------) + I promo + 0x0022028a, // n0x03de c0x0000 (---------------) + I properties + 0x002ddec8, // n0x03df c0x0000 (---------------) + I property + 0x002de0ca, // n0x03e0 c0x0000 (---------------) + I protection + 0x002de343, // n0x03e1 c0x0000 (---------------) + I pru + 0x002de34a, // n0x03e2 c0x0000 (---------------) + I prudential + 0x48626e02, // n0x03e3 c0x0121 (n0x1b04-n0x1b0b) + I ps + 0x48a835c2, // n0x03e4 c0x0122 (n0x1b0b-n0x1b14) + I pt + 0x00287e83, // n0x03e5 c0x0000 (---------------) + I pub + 0x48f94e82, // n0x03e6 c0x0123 (n0x1b14-n0x1b1a) + I pw + 0x4932e602, // n0x03e7 c0x0124 (n0x1b1a-n0x1b21) + I py + 0x49714502, // n0x03e8 c0x0125 (n0x1b21-n0x1b2a) + I qa + 0x002df444, // n0x03e9 c0x0000 (---------------) + I qpon + 0x0021a006, // n0x03ea c0x0000 (---------------) + I quebec + 0x00204905, // n0x03eb c0x0000 (---------------) + I quest + 0x002dfac3, // n0x03ec c0x0000 (---------------) + I qvc + 0x00379c06, // n0x03ed c0x0000 (---------------) + I racing + 0x0021a384, // n0x03ee c0x0000 (---------------) + I raid + 0x49a04d82, // n0x03ef c0x0126 (n0x1b2a-n0x1b2e) + I re + 0x002cf684, // n0x03f0 c0x0000 (---------------) + I read + 0x002bf48a, // n0x03f1 c0x0000 (---------------) + I realestate + 0x0033dec7, // n0x03f2 c0x0000 (---------------) + I realtor + 0x00378406, // n0x03f3 c0x0000 (---------------) + I realty + 0x00226f07, // n0x03f4 c0x0000 (---------------) + I recipes + 0x0023e143, // n0x03f5 c0x0000 (---------------) + I red + 0x003a0548, // n0x03f6 c0x0000 (---------------) + I redstone + 0x003381cb, // n0x03f7 c0x0000 (---------------) + I redumbrella + 0x0035c805, // n0x03f8 c0x0000 (---------------) + I rehab + 0x002c7a85, // n0x03f9 c0x0000 (---------------) + I reise + 0x002c7a86, // n0x03fa c0x0000 (---------------) + I reisen + 0x002f92c4, // n0x03fb c0x0000 (---------------) + I reit + 0x00374788, // n0x03fc c0x0000 (---------------) + I reliance + 0x00215383, // n0x03fd c0x0000 (---------------) + I ren + 0x002b5304, // n0x03fe c0x0000 (---------------) + I rent + 0x003352c7, // n0x03ff c0x0000 (---------------) + I rentals + 0x002b1f86, // n0x0400 c0x0000 (---------------) + I repair + 0x002eff06, // n0x0401 c0x0000 (---------------) + I report + 0x0028feca, // n0x0402 c0x0000 (---------------) + I republican + 0x00247584, // n0x0403 c0x0000 (---------------) + I rest + 0x00364b8a, // n0x0404 c0x0000 (---------------) + I restaurant + 0x00323806, // n0x0405 c0x0000 (---------------) + I review + 0x00323807, // n0x0406 c0x0000 (---------------) + I reviews + 0x0024f347, // n0x0407 c0x0000 (---------------) + I rexroth + 0x0026c104, // n0x0408 c0x0000 (---------------) + I rich + 0x0026c109, // n0x0409 c0x0000 (---------------) + I richardli + 0x0025c745, // n0x040a c0x0000 (---------------) + I ricoh + 0x002ad44b, // n0x040b c0x0000 (---------------) + I rightathome + 0x00250403, // n0x040c c0x0000 (---------------) + I ril + 0x0020cec3, // n0x040d c0x0000 (---------------) + I rio + 0x00219c43, // n0x040e c0x0000 (---------------) + I rip + 0x49e00cc2, // n0x040f c0x0127 (n0x1b2e-n0x1b3a) + I ro + 0x0026fb46, // n0x0410 c0x0000 (---------------) + I rocher + 0x00295f05, // n0x0411 c0x0000 (---------------) + I rocks + 0x002b2985, // n0x0412 c0x0000 (---------------) + I rodeo + 0x00395406, // n0x0413 c0x0000 (---------------) + I rogers + 0x0024a684, // n0x0414 c0x0000 (---------------) + I room + 0x4a20a642, // n0x0415 c0x0128 (n0x1b3a-n0x1b41) + I rs + 0x002dfe44, // n0x0416 c0x0000 (---------------) + I rsvp + 0x4a611ec2, // n0x0417 c0x0129 (n0x1b41-n0x1bc5) + I ru + 0x00232804, // n0x0418 c0x0000 (---------------) + I ruhr + 0x00221d83, // n0x0419 c0x0000 (---------------) + I run + 0x4ab19802, // n0x041a c0x012a (n0x1bc5-n0x1bce) + I rw + 0x00319803, // n0x041b c0x0000 (---------------) + I rwe + 0x002a4b06, // n0x041c c0x0000 (---------------) + I ryukyu + 0x4ae02402, // n0x041d c0x012b (n0x1bce-n0x1bd6) + I sa + 0x002bd388, // n0x041e c0x0000 (---------------) + I saarland + 0x0039ac44, // n0x041f c0x0000 (---------------) + I safe + 0x0039ac46, // n0x0420 c0x0000 (---------------) + I safety + 0x002fe346, // n0x0421 c0x0000 (---------------) + I sakura + 0x00252644, // n0x0422 c0x0000 (---------------) + I sale + 0x003104c5, // n0x0423 c0x0000 (---------------) + I salon + 0x00202408, // n0x0424 c0x0000 (---------------) + I samsclub + 0x00206b87, // n0x0425 c0x0000 (---------------) + I samsung + 0x00244cc7, // n0x0426 c0x0000 (---------------) + I sandvik + 0x00244ccf, // n0x0427 c0x0000 (---------------) + I sandvikcoromant + 0x0028b3c6, // n0x0428 c0x0000 (---------------) + I sanofi + 0x00215843, // n0x0429 c0x0000 (---------------) + I sap + 0x00215844, // n0x042a c0x0000 (---------------) + I sapo + 0x00229184, // n0x042b c0x0000 (---------------) + I sarl + 0x00236443, // n0x042c c0x0000 (---------------) + I sas + 0x00221484, // n0x042d c0x0000 (---------------) + I save + 0x0039c4c4, // n0x042e c0x0000 (---------------) + I saxo + 0x4b229a02, // n0x042f c0x012c (n0x1bd6-n0x1bdb) + I sb + 0x00282803, // n0x0430 c0x0000 (---------------) + I sbi + 0x00231183, // n0x0431 c0x0000 (---------------) + I sbs + 0x4b6024c2, // n0x0432 c0x012d (n0x1bdb-n0x1be0) + I sc + 0x00254f03, // n0x0433 c0x0000 (---------------) + I sca + 0x00226803, // n0x0434 c0x0000 (---------------) + I scb + 0x00215d4a, // n0x0435 c0x0000 (---------------) + I schaeffler + 0x00233ac7, // n0x0436 c0x0000 (---------------) + I schmidt + 0x00231a4c, // n0x0437 c0x0000 (---------------) + I scholarships + 0x00231d06, // n0x0438 c0x0000 (---------------) + I school + 0x0023c9c6, // n0x0439 c0x0000 (---------------) + I schule + 0x0023d107, // n0x043a c0x0000 (---------------) + I schwarz + 0x00230a47, // n0x043b c0x0000 (---------------) + I science + 0x00243c89, // n0x043c c0x0000 (---------------) + I scjohnson + 0x0021ac44, // n0x043d c0x0000 (---------------) + I scor + 0x00208144, // n0x043e c0x0000 (---------------) + I scot + 0x4ba56ec2, // n0x043f c0x012e (n0x1be0-n0x1be8) + I sd + 0x4be01d42, // n0x0440 c0x012f (n0x1be8-n0x1c11) + I se + 0x00306844, // n0x0441 c0x0000 (---------------) + I seat + 0x0031c886, // n0x0442 c0x0000 (---------------) + I secure + 0x00230ec8, // n0x0443 c0x0000 (---------------) + I security + 0x0027c404, // n0x0444 c0x0000 (---------------) + I seek + 0x00253f46, // n0x0445 c0x0000 (---------------) + I select + 0x002c92c5, // n0x0446 c0x0000 (---------------) + I sener + 0x002069c8, // n0x0447 c0x0000 (---------------) + I services + 0x00204443, // n0x0448 c0x0000 (---------------) + I ses + 0x0024bd45, // n0x0449 c0x0000 (---------------) + I seven + 0x0024ec83, // n0x044a c0x0000 (---------------) + I sew + 0x00240e03, // n0x044b c0x0000 (---------------) + I sex + 0x00240e04, // n0x044c c0x0000 (---------------) + I sexy + 0x0024f9c3, // n0x044d c0x0000 (---------------) + I sfr + 0x4c266482, // n0x044e c0x0130 (n0x1c11-n0x1c18) + I sg + 0x4c601c42, // n0x044f c0x0131 (n0x1c18-n0x1c1e) + I sh + 0x002502c9, // n0x0450 c0x0000 (---------------) + I shangrila + 0x00251e85, // n0x0451 c0x0000 (---------------) + I sharp + 0x00254484, // n0x0452 c0x0000 (---------------) + I shaw + 0x00257245, // n0x0453 c0x0000 (---------------) + I shell + 0x00212444, // n0x0454 c0x0000 (---------------) + I shia + 0x002af887, // n0x0455 c0x0000 (---------------) + I shiksha + 0x00398385, // n0x0456 c0x0000 (---------------) + I shoes + 0x002aa606, // n0x0457 c0x0000 (---------------) + I shouji + 0x002ab744, // n0x0458 c0x0000 (---------------) + I show + 0x002ae348, // n0x0459 c0x0000 (---------------) + I showtime + 0x002b0bc7, // n0x045a c0x0000 (---------------) + I shriram + 0x4ca0ca82, // n0x045b c0x0132 (n0x1c1e-n0x1c1f) + I si + 0x003531c4, // n0x045c c0x0000 (---------------) + I silk + 0x002ec7c4, // n0x045d c0x0000 (---------------) + I sina + 0x0027d347, // n0x045e c0x0000 (---------------) + I singles + 0x00247244, // n0x045f c0x0000 (---------------) + I site + 0x00251cc2, // n0x0460 c0x0000 (---------------) + I sj + 0x4ce0e342, // n0x0461 c0x0133 (n0x1c1f-n0x1c20) + I sk + 0x0021cf83, // n0x0462 c0x0000 (---------------) + I ski + 0x00305f84, // n0x0463 c0x0000 (---------------) + I skin + 0x0023ae03, // n0x0464 c0x0000 (---------------) + I sky + 0x00265c85, // n0x0465 c0x0000 (---------------) + I skype + 0x4d217a82, // n0x0466 c0x0134 (n0x1c20-n0x1c25) + I sl + 0x002c97c5, // n0x0467 c0x0000 (---------------) + I sling + 0x00215b02, // n0x0468 c0x0000 (---------------) + I sm + 0x0034b7c5, // n0x0469 c0x0000 (---------------) + I smart + 0x00358d85, // n0x046a c0x0000 (---------------) + I smile + 0x4d612a42, // n0x046b c0x0135 (n0x1c25-n0x1c2d) + I sn + 0x00212a44, // n0x046c c0x0000 (---------------) + I sncf + 0x4da04c82, // n0x046d c0x0136 (n0x1c2d-n0x1c30) + I so + 0x002a1a46, // n0x046e c0x0000 (---------------) + I soccer + 0x00298406, // n0x046f c0x0000 (---------------) + I social + 0x00263608, // n0x0470 c0x0000 (---------------) + I softbank + 0x002b2f88, // n0x0471 c0x0000 (---------------) + I software + 0x002ef444, // n0x0472 c0x0000 (---------------) + I sohu + 0x002da545, // n0x0473 c0x0000 (---------------) + I solar + 0x002ef609, // n0x0474 c0x0000 (---------------) + I solutions + 0x0031fd44, // n0x0475 c0x0000 (---------------) + I song + 0x00396444, // n0x0476 c0x0000 (---------------) + I sony + 0x002566c3, // n0x0477 c0x0000 (---------------) + I soy + 0x00335085, // n0x0478 c0x0000 (---------------) + I space + 0x0037a7c7, // n0x0479 c0x0000 (---------------) + I spiegel + 0x00245b44, // n0x047a c0x0000 (---------------) + I spot + 0x0032cc4d, // n0x047b c0x0000 (---------------) + I spreadbetting + 0x00336d82, // n0x047c c0x0000 (---------------) + I sr + 0x00336d83, // n0x047d c0x0000 (---------------) + I srl + 0x00353b83, // n0x047e c0x0000 (---------------) + I srt + 0x4de01a42, // n0x047f c0x0137 (n0x1c30-n0x1c3c) + I st + 0x0037b645, // n0x0480 c0x0000 (---------------) + I stada + 0x00383287, // n0x0481 c0x0000 (---------------) + I staples + 0x002245c4, // n0x0482 c0x0000 (---------------) + I star + 0x002245c7, // n0x0483 c0x0000 (---------------) + I starhub + 0x0028e7c9, // n0x0484 c0x0000 (---------------) + I statebank + 0x002bf5c9, // n0x0485 c0x0000 (---------------) + I statefarm + 0x002e88c7, // n0x0486 c0x0000 (---------------) + I statoil + 0x0026f903, // n0x0487 c0x0000 (---------------) + I stc + 0x0026f908, // n0x0488 c0x0000 (---------------) + I stcgroup + 0x00292749, // n0x0489 c0x0000 (---------------) + I stockholm + 0x003613c7, // n0x048a c0x0000 (---------------) + I storage + 0x0038c985, // n0x048b c0x0000 (---------------) + I store + 0x002e0886, // n0x048c c0x0000 (---------------) + I studio + 0x002e0a05, // n0x048d c0x0000 (---------------) + I study + 0x0023ed85, // n0x048e c0x0000 (---------------) + I style + 0x4e2029c2, // n0x048f c0x0138 (n0x1c3c-n0x1c5c) + I su + 0x002be445, // n0x0490 c0x0000 (---------------) + I sucks + 0x002b508a, // n0x0491 c0x0000 (---------------) + I supersport + 0x002b8a08, // n0x0492 c0x0000 (---------------) + I supplies + 0x0029d806, // n0x0493 c0x0000 (---------------) + I supply + 0x002dd987, // n0x0494 c0x0000 (---------------) + I support + 0x002466c4, // n0x0495 c0x0000 (---------------) + I surf + 0x00299d87, // n0x0496 c0x0000 (---------------) + I surgery + 0x002e3846, // n0x0497 c0x0000 (---------------) + I suzuki + 0x4e60ee82, // n0x0498 c0x0139 (n0x1c5c-n0x1c61) + I sv + 0x00373606, // n0x0499 c0x0000 (---------------) + I swatch + 0x002e61ca, // n0x049a c0x0000 (---------------) + I swiftcover + 0x002e6b85, // n0x049b c0x0000 (---------------) + I swiss + 0x4eae7402, // n0x049c c0x013a (n0x1c61-n0x1c62) + I sx + 0x4ee2b802, // n0x049d c0x013b (n0x1c62-n0x1c68) + I sy + 0x0022b806, // n0x049e c0x0000 (---------------) + I sydney + 0x002a3b08, // n0x049f c0x0000 (---------------) + I symantec + 0x0037e287, // n0x04a0 c0x0000 (---------------) + I systems + 0x4f202842, // n0x04a1 c0x013c (n0x1c68-n0x1c6b) + I sz + 0x00211703, // n0x04a2 c0x0000 (---------------) + I tab + 0x003a3406, // n0x04a3 c0x0000 (---------------) + I taipei + 0x0023ab44, // n0x04a4 c0x0000 (---------------) + I talk + 0x00390dc6, // n0x04a5 c0x0000 (---------------) + I taobao + 0x00363046, // n0x04a6 c0x0000 (---------------) + I target + 0x0030f98a, // n0x04a7 c0x0000 (---------------) + I tatamotors + 0x0036a385, // n0x04a8 c0x0000 (---------------) + I tatar + 0x0020a1c6, // n0x04a9 c0x0000 (---------------) + I tattoo + 0x0020cfc3, // n0x04aa c0x0000 (---------------) + I tax + 0x0020cfc4, // n0x04ab c0x0000 (---------------) + I taxi + 0x002041c2, // n0x04ac c0x0000 (---------------) + I tc + 0x003075c3, // n0x04ad c0x0000 (---------------) + I tci + 0x4f62cac2, // n0x04ae c0x013d (n0x1c6b-n0x1c6c) + I td + 0x002c7603, // n0x04af c0x0000 (---------------) + I tdk + 0x00365904, // n0x04b0 c0x0000 (---------------) + I team + 0x002a3c44, // n0x04b1 c0x0000 (---------------) + I tech + 0x002a3c4a, // n0x04b2 c0x0000 (---------------) + I technology + 0x0022fb43, // n0x04b3 c0x0000 (---------------) + I tel + 0x0027e708, // n0x04b4 c0x0000 (---------------) + I telecity + 0x0030df4a, // n0x04b5 c0x0000 (---------------) + I telefonica + 0x00319f47, // n0x04b6 c0x0000 (---------------) + I temasek + 0x002e9886, // n0x04b7 c0x0000 (---------------) + I tennis + 0x00328784, // n0x04b8 c0x0000 (---------------) + I teva + 0x00286e42, // n0x04b9 c0x0000 (---------------) + I tf + 0x00218742, // n0x04ba c0x0000 (---------------) + I tg + 0x4fa06502, // n0x04bb c0x013e (n0x1c6c-n0x1c73) + I th + 0x00242d43, // n0x04bc c0x0000 (---------------) + I thd + 0x0031b107, // n0x04bd c0x0000 (---------------) + I theater + 0x0024f0c7, // n0x04be c0x0000 (---------------) + I theatre + 0x0034c1cb, // n0x04bf c0x0000 (---------------) + I theguardian + 0x002ff484, // n0x04c0 c0x0000 (---------------) + I tiaa + 0x002eb8c7, // n0x04c1 c0x0000 (---------------) + I tickets + 0x002d7a46, // n0x04c2 c0x0000 (---------------) + I tienda + 0x0039aa07, // n0x04c3 c0x0000 (---------------) + I tiffany + 0x00233a04, // n0x04c4 c0x0000 (---------------) + I tips + 0x0034ee05, // n0x04c5 c0x0000 (---------------) + I tires + 0x002b5605, // n0x04c6 c0x0000 (---------------) + I tirol + 0x4fe01a82, // n0x04c7 c0x013f (n0x1c73-n0x1c82) + I tj + 0x00275246, // n0x04c8 c0x0000 (---------------) + I tjmaxx + 0x0036cac3, // n0x04c9 c0x0000 (---------------) + I tjx + 0x0022cc82, // n0x04ca c0x0000 (---------------) + I tk + 0x0022cc86, // n0x04cb c0x0000 (---------------) + I tkmaxx + 0x50208202, // n0x04cc c0x0140 (n0x1c82-n0x1c83) + I tl + 0x50600142, // n0x04cd c0x0141 (n0x1c83-n0x1c8b) + I tm + 0x00200145, // n0x04ce c0x0000 (---------------) + I tmall + 0x50a00942, // n0x04cf c0x0142 (n0x1c8b-n0x1c9f) + I tn + 0x50e07442, // n0x04d0 c0x0143 (n0x1c9f-n0x1ca5) + I to + 0x003338c5, // n0x04d1 c0x0000 (---------------) + I today + 0x002ef045, // n0x04d2 c0x0000 (---------------) + I tokyo + 0x0020a285, // n0x04d3 c0x0000 (---------------) + I tools + 0x0024a1c3, // n0x04d4 c0x0000 (---------------) + I top + 0x002238c5, // n0x04d5 c0x0000 (---------------) + I toray + 0x002cd247, // n0x04d6 c0x0000 (---------------) + I toshiba + 0x00254205, // n0x04d7 c0x0000 (---------------) + I total + 0x002f3c85, // n0x04d8 c0x0000 (---------------) + I tours + 0x002a9404, // n0x04d9 c0x0000 (---------------) + I town + 0x00254b06, // n0x04da c0x0000 (---------------) + I toyota + 0x00262e44, // n0x04db c0x0000 (---------------) + I toys + 0x00214582, // n0x04dc c0x0000 (---------------) + I tp + 0x51203642, // n0x04dd c0x0144 (n0x1ca5-n0x1cba) + I tr + 0x0025f785, // n0x04de c0x0000 (---------------) + I trade + 0x0029b6c7, // n0x04df c0x0000 (---------------) + I trading + 0x00312148, // n0x04e0 c0x0000 (---------------) + I training + 0x00293486, // n0x04e1 c0x0000 (---------------) + I travel + 0x0029348d, // n0x04e2 c0x0000 (---------------) + I travelchannel + 0x00299209, // n0x04e3 c0x0000 (---------------) + I travelers + 0x00299212, // n0x04e4 c0x0000 (---------------) + I travelersinsurance + 0x0031f0c5, // n0x04e5 c0x0000 (---------------) + I trust + 0x00325243, // n0x04e6 c0x0000 (---------------) + I trv + 0x51e0a242, // n0x04e7 c0x0147 (n0x1cbc-n0x1ccd) + I tt + 0x002de944, // n0x04e8 c0x0000 (---------------) + I tube + 0x002efb43, // n0x04e9 c0x0000 (---------------) + I tui + 0x002e7885, // n0x04ea c0x0000 (---------------) + I tunes + 0x002e8105, // n0x04eb c0x0000 (---------------) + I tushu + 0x52206fc2, // n0x04ec c0x0148 (n0x1ccd-n0x1cd1) + I tv + 0x00361343, // n0x04ed c0x0000 (---------------) + I tvs + 0x52641cc2, // n0x04ee c0x0149 (n0x1cd1-n0x1cdf) + I tw + 0x52a1d942, // n0x04ef c0x014a (n0x1cdf-n0x1ceb) + I tz + 0x52e0d102, // n0x04f0 c0x014b (n0x1ceb-n0x1d3a) + I ua + 0x00334405, // n0x04f1 c0x0000 (---------------) + I ubank + 0x0024d683, // n0x04f2 c0x0000 (---------------) + I ubs + 0x00322208, // n0x04f3 c0x0000 (---------------) + I uconnect + 0x53207e02, // n0x04f4 c0x014c (n0x1d3a-n0x1d43) + I ug + 0x53600f82, // n0x04f5 c0x014d (n0x1d43-n0x1d4e) + I uk + 0x00281a0a, // n0x04f6 c0x0000 (---------------) + I university + 0x00208d03, // n0x04f7 c0x0000 (---------------) + I uno + 0x0023a103, // n0x04f8 c0x0000 (---------------) + I uol + 0x002cdd83, // n0x04f9 c0x0000 (---------------) + I ups + 0x54202982, // n0x04fa c0x0150 (n0x1d50-n0x1d8f) + I us + 0x6260d7c2, // n0x04fb c0x0189 (n0x1e32-n0x1e38) + I uy + 0x62e11f02, // n0x04fc c0x018b (n0x1e39-n0x1e3d) + I uz + 0x002000c2, // n0x04fd c0x0000 (---------------) + I va + 0x00373409, // n0x04fe c0x0000 (---------------) + I vacations + 0x002b7704, // n0x04ff c0x0000 (---------------) + I vana + 0x00275b48, // n0x0500 c0x0000 (---------------) + I vanguard + 0x632dfb02, // n0x0501 c0x018c (n0x1e3d-n0x1e43) + I vc + 0x63602202, // n0x0502 c0x018d (n0x1e43-n0x1e54) + I ve + 0x002292c5, // n0x0503 c0x0000 (---------------) + I vegas + 0x002360c8, // n0x0504 c0x0000 (---------------) + I ventures + 0x002e6388, // n0x0505 c0x0000 (---------------) + I verisign + 0x0038fb4c, // n0x0506 c0x0000 (---------------) + I versicherung + 0x0023b383, // n0x0507 c0x0000 (---------------) + I vet + 0x00258ec2, // n0x0508 c0x0000 (---------------) + I vg + 0x63a00642, // n0x0509 c0x018e (n0x1e54-n0x1e59) + I vi + 0x002c26c6, // n0x050a c0x0000 (---------------) + I viajes + 0x002ea705, // n0x050b c0x0000 (---------------) + I video + 0x00200643, // n0x050c c0x0000 (---------------) + I vig + 0x0036cf46, // n0x050d c0x0000 (---------------) + I viking + 0x002ea846, // n0x050e c0x0000 (---------------) + I villas + 0x00225e83, // n0x050f c0x0000 (---------------) + I vin + 0x002ec703, // n0x0510 c0x0000 (---------------) + I vip + 0x002ee6c6, // n0x0511 c0x0000 (---------------) + I virgin + 0x002eec44, // n0x0512 c0x0000 (---------------) + I visa + 0x0023b546, // n0x0513 c0x0000 (---------------) + I vision + 0x002c71c5, // n0x0514 c0x0000 (---------------) + I vista + 0x002ef90a, // n0x0515 c0x0000 (---------------) + I vistaprint + 0x002388c4, // n0x0516 c0x0000 (---------------) + I viva + 0x002f0b04, // n0x0517 c0x0000 (---------------) + I vivo + 0x003434ca, // n0x0518 c0x0000 (---------------) + I vlaanderen + 0x63e00d42, // n0x0519 c0x018f (n0x1e59-n0x1e66) + I vn + 0x002c3d45, // n0x051a c0x0000 (---------------) + I vodka + 0x002f210a, // n0x051b c0x0000 (---------------) + I volkswagen + 0x002f3984, // n0x051c c0x0000 (---------------) + I vote + 0x002f3a86, // n0x051d c0x0000 (---------------) + I voting + 0x002f3c04, // n0x051e c0x0000 (---------------) + I voto + 0x002a8206, // n0x051f c0x0000 (---------------) + I voyage + 0x64200882, // n0x0520 c0x0190 (n0x1e66-n0x1e6a) + I vu + 0x002c2fc6, // n0x0521 c0x0000 (---------------) + I vuelos + 0x0030e445, // n0x0522 c0x0000 (---------------) + I wales + 0x002010c7, // n0x0523 c0x0000 (---------------) + I walmart + 0x00209206, // n0x0524 c0x0000 (---------------) + I walter + 0x0023d304, // n0x0525 c0x0000 (---------------) + I wang + 0x002fa647, // n0x0526 c0x0000 (---------------) + I wanggou + 0x0036c7c6, // n0x0527 c0x0000 (---------------) + I warman + 0x002a6905, // n0x0528 c0x0000 (---------------) + I watch + 0x002fa287, // n0x0529 c0x0000 (---------------) + I watches + 0x0038d087, // n0x052a c0x0000 (---------------) + I weather + 0x0038d08e, // n0x052b c0x0000 (---------------) + I weatherchannel + 0x0021fa86, // n0x052c c0x0000 (---------------) + I webcam + 0x00351d85, // n0x052d c0x0000 (---------------) + I weber + 0x002ba987, // n0x052e c0x0000 (---------------) + I website + 0x002e4ec3, // n0x052f c0x0000 (---------------) + I wed + 0x0033adc7, // n0x0530 c0x0000 (---------------) + I wedding + 0x00208a85, // n0x0531 c0x0000 (---------------) + I weibo + 0x0020f304, // n0x0532 c0x0000 (---------------) + I weir + 0x0022a842, // n0x0533 c0x0000 (---------------) + I wf + 0x00332687, // n0x0534 c0x0000 (---------------) + I whoswho + 0x002e2d04, // n0x0535 c0x0000 (---------------) + I wien + 0x0032fd04, // n0x0536 c0x0000 (---------------) + I wiki + 0x0024ed0b, // n0x0537 c0x0000 (---------------) + I williamhill + 0x0021b743, // n0x0538 c0x0000 (---------------) + I win + 0x0027a9c7, // n0x0539 c0x0000 (---------------) + I windows + 0x0021b744, // n0x053a c0x0000 (---------------) + I wine + 0x002ab5c7, // n0x053b c0x0000 (---------------) + I winners + 0x0021dd83, // n0x053c c0x0000 (---------------) + I wme + 0x0032704d, // n0x053d c0x0000 (---------------) + I wolterskluwer + 0x0037be88, // n0x053e c0x0000 (---------------) + I woodside + 0x002423c4, // n0x053f c0x0000 (---------------) + I work + 0x00332b45, // n0x0540 c0x0000 (---------------) + I works + 0x002f7105, // n0x0541 c0x0000 (---------------) + I world + 0x002f4c03, // n0x0542 c0x0000 (---------------) + I wow + 0x6461fec2, // n0x0543 c0x0191 (n0x1e6a-n0x1e71) + I ws + 0x002f60c3, // n0x0544 c0x0000 (---------------) + I wtc + 0x002f67c3, // n0x0545 c0x0000 (---------------) + I wtf + 0x00214bc4, // n0x0546 c0x0000 (---------------) + I xbox + 0x00273b05, // n0x0547 c0x0000 (---------------) + I xerox + 0x00214c87, // n0x0548 c0x0000 (---------------) + I xfinity + 0x0020d046, // n0x0549 c0x0000 (---------------) + I xihuan + 0x00365643, // n0x054a c0x0000 (---------------) + I xin + 0x0036cb4b, // n0x054b c0x0000 (---------------) + I xn--11b4c3d + 0x0022cdcb, // n0x054c c0x0000 (---------------) + I xn--1ck2e1b + 0x00269acb, // n0x054d c0x0000 (---------------) + I xn--1qqw23a + 0x00273c0a, // n0x054e c0x0000 (---------------) + I xn--30rr7y + 0x0029db4b, // n0x054f c0x0000 (---------------) + I xn--3bst00m + 0x002b414b, // n0x0550 c0x0000 (---------------) + I xn--3ds443g + 0x002cffcc, // n0x0551 c0x0000 (---------------) + I xn--3e0b707e + 0x002e7451, // n0x0552 c0x0000 (---------------) + I xn--3oq18vl8pn36a + 0x0034624a, // n0x0553 c0x0000 (---------------) + I xn--3pxu8k + 0x003a114b, // n0x0554 c0x0000 (---------------) + I xn--42c2d9a + 0x003a260b, // n0x0555 c0x0000 (---------------) + I xn--45brj9c + 0x002f750a, // n0x0556 c0x0000 (---------------) + I xn--45q11c + 0x002f7eca, // n0x0557 c0x0000 (---------------) + I xn--4gbrim + 0x002f828d, // n0x0558 c0x0000 (---------------) + I xn--4gq48lf9j + 0x002f9b4e, // n0x0559 c0x0000 (---------------) + I xn--54b7fta0cc + 0x002fa9cb, // n0x055a c0x0000 (---------------) + I xn--55qw42g + 0x002fac8a, // n0x055b c0x0000 (---------------) + I xn--55qx5d + 0x002fbad1, // n0x055c c0x0000 (---------------) + I xn--5su34j936bgsg + 0x002fbf0a, // n0x055d c0x0000 (---------------) + I xn--5tzm5g + 0x002fc40b, // n0x055e c0x0000 (---------------) + I xn--6frz82g + 0x002fc94e, // n0x055f c0x0000 (---------------) + I xn--6qq986b3xl + 0x002fd18c, // n0x0560 c0x0000 (---------------) + I xn--80adxhks + 0x002fdc0b, // n0x0561 c0x0000 (---------------) + I xn--80ao21a + 0x002fdecc, // n0x0562 c0x0000 (---------------) + I xn--80asehdb + 0x00303c8a, // n0x0563 c0x0000 (---------------) + I xn--80aswg + 0x00304e8c, // n0x0564 c0x0000 (---------------) + I xn--8y0a063a + 0x64b0518a, // n0x0565 c0x0192 (n0x1e71-n0x1e77) + I xn--90a3ac + 0x0030aa49, // n0x0566 c0x0000 (---------------) + I xn--90ais + 0x0030c44a, // n0x0567 c0x0000 (---------------) + I xn--9dbq2a + 0x0030c6ca, // n0x0568 c0x0000 (---------------) + I xn--9et52u + 0x0030c94b, // n0x0569 c0x0000 (---------------) + I xn--9krt00a + 0x0031194e, // n0x056a c0x0000 (---------------) + I xn--b4w605ferd + 0x00311cd1, // n0x056b c0x0000 (---------------) + I xn--bck1b9a5dre4c + 0x00318289, // n0x056c c0x0000 (---------------) + I xn--c1avg + 0x003184ca, // n0x056d c0x0000 (---------------) + I xn--c2br7g + 0x0031918b, // n0x056e c0x0000 (---------------) + I xn--cck2b3b + 0x0031b8ca, // n0x056f c0x0000 (---------------) + I xn--cg4bki + 0x0031c216, // n0x0570 c0x0000 (---------------) + I xn--clchc0ea0b2g2a9gcd + 0x0031da0b, // n0x0571 c0x0000 (---------------) + I xn--czr694b + 0x0031ee8a, // n0x0572 c0x0000 (---------------) + I xn--czrs0t + 0x0031f28a, // n0x0573 c0x0000 (---------------) + I xn--czru2d + 0x0032118b, // n0x0574 c0x0000 (---------------) + I xn--d1acj3b + 0x00324cc9, // n0x0575 c0x0000 (---------------) + I xn--d1alf + 0x003279cd, // n0x0576 c0x0000 (---------------) + I xn--eckvdtc9d + 0x0032838b, // n0x0577 c0x0000 (---------------) + I xn--efvy88h + 0x0032908b, // n0x0578 c0x0000 (---------------) + I xn--estv75g + 0x00329a4b, // n0x0579 c0x0000 (---------------) + I xn--fct429k + 0x0032a3c9, // n0x057a c0x0000 (---------------) + I xn--fhbei + 0x0032aa0e, // n0x057b c0x0000 (---------------) + I xn--fiq228c5hs + 0x0032b0ca, // n0x057c c0x0000 (---------------) + I xn--fiq64b + 0x0032c6ca, // n0x057d c0x0000 (---------------) + I xn--fiqs8s + 0x0032ca0a, // n0x057e c0x0000 (---------------) + I xn--fiqz9s + 0x0032d2cb, // n0x057f c0x0000 (---------------) + I xn--fjq720a + 0x0032db0b, // n0x0580 c0x0000 (---------------) + I xn--flw351e + 0x0032ddcd, // n0x0581 c0x0000 (---------------) + I xn--fpcrj9c3d + 0x0032f38d, // n0x0582 c0x0000 (---------------) + I xn--fzc2c9e2c + 0x00331a50, // n0x0583 c0x0000 (---------------) + I xn--fzys8d69uvgm + 0x00331f0b, // n0x0584 c0x0000 (---------------) + I xn--g2xx48c + 0x00332f4c, // n0x0585 c0x0000 (---------------) + I xn--gckr3f0f + 0x00333a0b, // n0x0586 c0x0000 (---------------) + I xn--gecrj9c + 0x00335b0b, // n0x0587 c0x0000 (---------------) + I xn--gk3at1e + 0x0033768b, // n0x0588 c0x0000 (---------------) + I xn--h2brj9c + 0x0033ef4b, // n0x0589 c0x0000 (---------------) + I xn--hxt814e + 0x0033f9cf, // n0x058a c0x0000 (---------------) + I xn--i1b6b1a6a2e + 0x0033fd8b, // n0x058b c0x0000 (---------------) + I xn--imr513n + 0x00340a0a, // n0x058c c0x0000 (---------------) + I xn--io0a7i + 0x00341409, // n0x058d c0x0000 (---------------) + I xn--j1aef + 0x003417c9, // n0x058e c0x0000 (---------------) + I xn--j1amh + 0x00341dcb, // n0x058f c0x0000 (---------------) + I xn--j6w193g + 0x0034208e, // n0x0590 c0x0000 (---------------) + I xn--jlq61u9w7b + 0x00343b4b, // n0x0591 c0x0000 (---------------) + I xn--jvr189m + 0x00344e0f, // n0x0592 c0x0000 (---------------) + I xn--kcrx77d1x4a + 0x00346c0b, // n0x0593 c0x0000 (---------------) + I xn--kprw13d + 0x00346ecb, // n0x0594 c0x0000 (---------------) + I xn--kpry57d + 0x0034718b, // n0x0595 c0x0000 (---------------) + I xn--kpu716f + 0x0034774a, // n0x0596 c0x0000 (---------------) + I xn--kput3i + 0x0034d289, // n0x0597 c0x0000 (---------------) + I xn--l1acc + 0x00350bcf, // n0x0598 c0x0000 (---------------) + I xn--lgbbat1ad8j + 0x00355dcc, // n0x0599 c0x0000 (---------------) + I xn--mgb2ddes + 0x00356e0c, // n0x059a c0x0000 (---------------) + I xn--mgb9awbf + 0x003573ce, // n0x059b c0x0000 (---------------) + I xn--mgba3a3ejt + 0x0035830f, // n0x059c c0x0000 (---------------) + I xn--mgba3a4f16a + 0x003586ce, // n0x059d c0x0000 (---------------) + I xn--mgba3a4fra + 0x00359510, // n0x059e c0x0000 (---------------) + I xn--mgba7c0bbn0a + 0x0035990f, // n0x059f c0x0000 (---------------) + I xn--mgbaakc7dvf + 0x0035be0e, // n0x05a0 c0x0000 (---------------) + I xn--mgbaam7a8h + 0x0035ca0c, // n0x05a1 c0x0000 (---------------) + I xn--mgbab2bd + 0x0035cd12, // n0x05a2 c0x0000 (---------------) + I xn--mgbai9a5eva00b + 0x0035dcd1, // n0x05a3 c0x0000 (---------------) + I xn--mgbai9azgqp6j + 0x0035e28e, // n0x05a4 c0x0000 (---------------) + I xn--mgbayh7gpa + 0x0035e6ce, // n0x05a5 c0x0000 (---------------) + I xn--mgbb9fbpob + 0x0035ec0e, // n0x05a6 c0x0000 (---------------) + I xn--mgbbh1a71e + 0x0035ef8f, // n0x05a7 c0x0000 (---------------) + I xn--mgbc0a9azcg + 0x0035f34e, // n0x05a8 c0x0000 (---------------) + I xn--mgbca7dzdo + 0x0035f853, // n0x05a9 c0x0000 (---------------) + I xn--mgberp4a5d4a87g + 0x0035fd11, // n0x05aa c0x0000 (---------------) + I xn--mgberp4a5d4ar + 0x0036014c, // n0x05ab c0x0000 (---------------) + I xn--mgbpl2fh + 0x00360593, // n0x05ac c0x0000 (---------------) + I xn--mgbqly7c0a67fbc + 0x00360d10, // n0x05ad c0x0000 (---------------) + I xn--mgbqly7cvafr + 0x0036158c, // n0x05ae c0x0000 (---------------) + I xn--mgbt3dhd + 0x0036188c, // n0x05af c0x0000 (---------------) + I xn--mgbtf8fl + 0x00361dcb, // n0x05b0 c0x0000 (---------------) + I xn--mgbtx2b + 0x00363f0e, // n0x05b1 c0x0000 (---------------) + I xn--mgbx4cd0ab + 0x0036440b, // n0x05b2 c0x0000 (---------------) + I xn--mix082f + 0x003647cb, // n0x05b3 c0x0000 (---------------) + I xn--mix891f + 0x00365ccc, // n0x05b4 c0x0000 (---------------) + I xn--mk1bu44c + 0x0036d74a, // n0x05b5 c0x0000 (---------------) + I xn--mxtq1m + 0x0036db0c, // n0x05b6 c0x0000 (---------------) + I xn--ngbc5azd + 0x0036de0c, // n0x05b7 c0x0000 (---------------) + I xn--ngbe9e0a + 0x0036ed0b, // n0x05b8 c0x0000 (---------------) + I xn--nnx388a + 0x0036efc8, // n0x05b9 c0x0000 (---------------) + I xn--node + 0x0036f489, // n0x05ba c0x0000 (---------------) + I xn--nqv7f + 0x0036f48f, // n0x05bb c0x0000 (---------------) + I xn--nqv7fs00ema + 0x00370e0b, // n0x05bc c0x0000 (---------------) + I xn--nyqy26a + 0x003718ca, // n0x05bd c0x0000 (---------------) + I xn--o3cw4h + 0x00373a8c, // n0x05be c0x0000 (---------------) + I xn--ogbpf8fl + 0x00374cc9, // n0x05bf c0x0000 (---------------) + I xn--p1acf + 0x00374f48, // n0x05c0 c0x0000 (---------------) + I xn--p1ai + 0x0037514b, // n0x05c1 c0x0000 (---------------) + I xn--pbt977c + 0x0037570b, // n0x05c2 c0x0000 (---------------) + I xn--pgbs0dh + 0x0037630a, // n0x05c3 c0x0000 (---------------) + I xn--pssy2u + 0x0037658b, // n0x05c4 c0x0000 (---------------) + I xn--q9jyb4c + 0x00376e4c, // n0x05c5 c0x0000 (---------------) + I xn--qcka1pmc + 0x003779c8, // n0x05c6 c0x0000 (---------------) + I xn--qxam + 0x0037c08b, // n0x05c7 c0x0000 (---------------) + I xn--rhqv96g + 0x0037f08b, // n0x05c8 c0x0000 (---------------) + I xn--rovu88b + 0x00382b8b, // n0x05c9 c0x0000 (---------------) + I xn--s9brj9c + 0x0038458b, // n0x05ca c0x0000 (---------------) + I xn--ses554g + 0x0038cc0b, // n0x05cb c0x0000 (---------------) + I xn--t60b56a + 0x0038cec9, // n0x05cc c0x0000 (---------------) + I xn--tckwe + 0x00391a8a, // n0x05cd c0x0000 (---------------) + I xn--unup4y + 0x003929d7, // n0x05ce c0x0000 (---------------) + I xn--vermgensberater-ctb + 0x00394958, // n0x05cf c0x0000 (---------------) + I xn--vermgensberatung-pwb + 0x00399489, // n0x05d0 c0x0000 (---------------) + I xn--vhquv + 0x0039a68b, // n0x05d1 c0x0000 (---------------) + I xn--vuq861b + 0x0039b294, // n0x05d2 c0x0000 (---------------) + I xn--w4r85el8fhu5dnra + 0x0039b78b, // n0x05d3 c0x0000 (---------------) + I xn--w4rs40l + 0x0039bd0a, // n0x05d4 c0x0000 (---------------) + I xn--wgbh1c + 0x0039c5ca, // n0x05d5 c0x0000 (---------------) + I xn--wgbl6a + 0x0039c84b, // n0x05d6 c0x0000 (---------------) + I xn--xhq521b + 0x0039e590, // n0x05d7 c0x0000 (---------------) + I xn--xkc2al3hye2a + 0x0039e991, // n0x05d8 c0x0000 (---------------) + I xn--xkc2dl3a5ee0h + 0x0039f7ca, // n0x05d9 c0x0000 (---------------) + I xn--y9a3aq + 0x003a074d, // n0x05da c0x0000 (---------------) + I xn--yfro4i67o + 0x003a0e4d, // n0x05db c0x0000 (---------------) + I xn--ygbi2ammx + 0x003a2ccb, // n0x05dc c0x0000 (---------------) + I xn--zfr164b + 0x003a3a86, // n0x05dd c0x0000 (---------------) + I xperia + 0x00275343, // n0x05de c0x0000 (---------------) + I xxx + 0x00240e83, // n0x05df c0x0000 (---------------) + I xyz + 0x00264686, // n0x05e0 c0x0000 (---------------) + I yachts + 0x00285645, // n0x05e1 c0x0000 (---------------) + I yahoo + 0x0021b2c7, // n0x05e2 c0x0000 (---------------) + I yamaxun + 0x00334e46, // n0x05e3 c0x0000 (---------------) + I yandex + 0x0161bcc2, // n0x05e4 c0x0005 (---------------)* o I ye + 0x002f7809, // n0x05e5 c0x0000 (---------------) + I yodobashi + 0x00379a04, // n0x05e6 c0x0000 (---------------) + I yoga + 0x0024d248, // n0x05e7 c0x0000 (---------------) + I yokohama + 0x00242c83, // n0x05e8 c0x0000 (---------------) + I you + 0x002de887, // n0x05e9 c0x0000 (---------------) + I youtube + 0x002197c2, // n0x05ea c0x0000 (---------------) + I yt + 0x002a4143, // n0x05eb c0x0000 (---------------) + I yun + 0x64e09ac2, // n0x05ec c0x0193 (n0x1e77-n0x1e88) o I za + 0x002c10c6, // n0x05ed c0x0000 (---------------) + I zappos + 0x002c1cc4, // n0x05ee c0x0000 (---------------) + I zara + 0x00324004, // n0x05ef c0x0000 (---------------) + I zero + 0x002377c3, // n0x05f0 c0x0000 (---------------) + I zip + 0x002377c5, // n0x05f1 c0x0000 (---------------) + I zippo + 0x016f7282, // n0x05f2 c0x0005 (---------------)* o I zm + 0x002d7204, // n0x05f3 c0x0000 (---------------) + I zone + 0x0026c047, // n0x05f4 c0x0000 (---------------) + I zuerich + 0x0165b802, // n0x05f5 c0x0005 (---------------)* o I zw + 0x0022edc3, // n0x05f6 c0x0000 (---------------) + I com + 0x002349c3, // n0x05f7 c0x0000 (---------------) + I edu + 0x00275003, // n0x05f8 c0x0000 (---------------) + I gov + 0x00215b43, // n0x05f9 c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x05fa c0x0000 (---------------) + I net + 0x00229a83, // n0x05fb c0x0000 (---------------) + I org + 0x0020e543, // n0x05fc c0x0000 (---------------) + I nom + 0x00205882, // n0x05fd c0x0000 (---------------) + I ac + 0x000f5248, // n0x05fe c0x0000 (---------------) + blogspot + 0x00208182, // n0x05ff c0x0000 (---------------) + I co + 0x00275003, // n0x0600 c0x0000 (---------------) + I gov + 0x00215b43, // n0x0601 c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x0602 c0x0000 (---------------) + I net + 0x00229a83, // n0x0603 c0x0000 (---------------) + I org + 0x00215d43, // n0x0604 c0x0000 (---------------) + I sch + 0x00316456, // n0x0605 c0x0000 (---------------) + I accident-investigation + 0x00317053, // n0x0606 c0x0000 (---------------) + I accident-prevention + 0x002eb749, // n0x0607 c0x0000 (---------------) + I aerobatic + 0x0035a9c8, // n0x0608 c0x0000 (---------------) + I aeroclub + 0x002dc849, // n0x0609 c0x0000 (---------------) + I aerodrome + 0x002f2286, // n0x060a c0x0000 (---------------) + I agents + 0x0033cd10, // n0x060b c0x0000 (---------------) + I air-surveillance + 0x002b2053, // n0x060c c0x0000 (---------------) + I air-traffic-control + 0x00235408, // n0x060d c0x0000 (---------------) + I aircraft + 0x00272007, // n0x060e c0x0000 (---------------) + I airline + 0x0027b687, // n0x060f c0x0000 (---------------) + I airport + 0x00296d8a, // n0x0610 c0x0000 (---------------) + I airtraffic + 0x002b0ec9, // n0x0611 c0x0000 (---------------) + I ambulance + 0x00362e49, // n0x0612 c0x0000 (---------------) + I amusement + 0x002b1c4b, // n0x0613 c0x0000 (---------------) + I association + 0x0031e346, // n0x0614 c0x0000 (---------------) + I author + 0x00339b0a, // n0x0615 c0x0000 (---------------) + I ballooning + 0x00220086, // n0x0616 c0x0000 (---------------) + I broker + 0x00379603, // n0x0617 c0x0000 (---------------) + I caa + 0x002ebd85, // n0x0618 c0x0000 (---------------) + I cargo + 0x00233688, // n0x0619 c0x0000 (---------------) + I catering + 0x002a1b0d, // n0x061a c0x0000 (---------------) + I certification + 0x0033c8cc, // n0x061b c0x0000 (---------------) + I championship + 0x00268847, // n0x061c c0x0000 (---------------) + I charter + 0x00354d8d, // n0x061d c0x0000 (---------------) + I civilaviation + 0x00202504, // n0x061e c0x0000 (---------------) + I club + 0x00231fca, // n0x061f c0x0000 (---------------) + I conference + 0x0023290a, // n0x0620 c0x0000 (---------------) + I consultant + 0x00232dca, // n0x0621 c0x0000 (---------------) + I consulting + 0x0022bac7, // n0x0622 c0x0000 (---------------) + I control + 0x0023c687, // n0x0623 c0x0000 (---------------) + I council + 0x0023eac4, // n0x0624 c0x0000 (---------------) + I crew + 0x00222ec6, // n0x0625 c0x0000 (---------------) + I design + 0x0031b344, // n0x0626 c0x0000 (---------------) + I dgca + 0x002aefc8, // n0x0627 c0x0000 (---------------) + I educator + 0x002bb8c9, // n0x0628 c0x0000 (---------------) + I emergency + 0x0032a106, // n0x0629 c0x0000 (---------------) + I engine + 0x0032a108, // n0x062a c0x0000 (---------------) + I engineer + 0x0024130d, // n0x062b c0x0000 (---------------) + I entertainment + 0x002bf809, // n0x062c c0x0000 (---------------) + I equipment + 0x0035b488, // n0x062d c0x0000 (---------------) + I exchange + 0x00240c87, // n0x062e c0x0000 (---------------) + I express + 0x0020038a, // n0x062f c0x0000 (---------------) + I federation + 0x00249f06, // n0x0630 c0x0000 (---------------) + I flight + 0x002556c7, // n0x0631 c0x0000 (---------------) + I freight + 0x003392c4, // n0x0632 c0x0000 (---------------) + I fuel + 0x00252087, // n0x0633 c0x0000 (---------------) + I gliding + 0x0027500a, // n0x0634 c0x0000 (---------------) + I government + 0x0033158e, // n0x0635 c0x0000 (---------------) + I groundhandling + 0x0020eb45, // n0x0636 c0x0000 (---------------) + I group + 0x002f494b, // n0x0637 c0x0000 (---------------) + I hanggliding + 0x0025cf89, // n0x0638 c0x0000 (---------------) + I homebuilt + 0x00239c09, // n0x0639 c0x0000 (---------------) + I insurance + 0x00201847, // n0x063a c0x0000 (---------------) + I journal + 0x0020184a, // n0x063b c0x0000 (---------------) + I journalist + 0x0027d287, // n0x063c c0x0000 (---------------) + I leasing + 0x002dc2c9, // n0x063d c0x0000 (---------------) + I logistics + 0x00391388, // n0x063e c0x0000 (---------------) + I magazine + 0x0026f60b, // n0x063f c0x0000 (---------------) + I maintenance + 0x0022dc4b, // n0x0640 c0x0000 (---------------) + I marketplace + 0x002fb545, // n0x0641 c0x0000 (---------------) + I media + 0x00245dca, // n0x0642 c0x0000 (---------------) + I microlight + 0x0029a989, // n0x0643 c0x0000 (---------------) + I modelling + 0x002005ca, // n0x0644 c0x0000 (---------------) + I navigation + 0x002c22cb, // n0x0645 c0x0000 (---------------) + I parachuting + 0x00251f8b, // n0x0646 c0x0000 (---------------) + I paragliding + 0x002b19d5, // n0x0647 c0x0000 (---------------) + I passenger-association + 0x002d1345, // n0x0648 c0x0000 (---------------) + I pilot + 0x00240d05, // n0x0649 c0x0000 (---------------) + I press + 0x002db64a, // n0x064a c0x0000 (---------------) + I production + 0x0031c98a, // n0x064b c0x0000 (---------------) + I recreation + 0x00228d07, // n0x064c c0x0000 (---------------) + I repbody + 0x0021bfc3, // n0x064d c0x0000 (---------------) + I res + 0x00290208, // n0x064e c0x0000 (---------------) + I research + 0x002cb30a, // n0x064f c0x0000 (---------------) + I rotorcraft + 0x0039ac46, // n0x0650 c0x0000 (---------------) + I safety + 0x00240289, // n0x0651 c0x0000 (---------------) + I scientist + 0x002069c8, // n0x0652 c0x0000 (---------------) + I services + 0x002ab744, // n0x0653 c0x0000 (---------------) + I show + 0x00371689, // n0x0654 c0x0000 (---------------) + I skydiving + 0x002b2f88, // n0x0655 c0x0000 (---------------) + I software + 0x002a3147, // n0x0656 c0x0000 (---------------) + I student + 0x0020cfc4, // n0x0657 c0x0000 (---------------) + I taxi + 0x0025f786, // n0x0658 c0x0000 (---------------) + I trader + 0x0029b6c7, // n0x0659 c0x0000 (---------------) + I trading + 0x003374c7, // n0x065a c0x0000 (---------------) + I trainer + 0x0023e505, // n0x065b c0x0000 (---------------) + I union + 0x002d574c, // n0x065c c0x0000 (---------------) + I workinggroup + 0x00332b45, // n0x065d c0x0000 (---------------) + I works + 0x0022edc3, // n0x065e c0x0000 (---------------) + I com + 0x002349c3, // n0x065f c0x0000 (---------------) + I edu + 0x00275003, // n0x0660 c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x0661 c0x0000 (---------------) + I net + 0x00229a83, // n0x0662 c0x0000 (---------------) + I org + 0x00208182, // n0x0663 c0x0000 (---------------) + I co + 0x0022edc3, // n0x0664 c0x0000 (---------------) + I com + 0x0021d8c3, // n0x0665 c0x0000 (---------------) + I net + 0x0020e543, // n0x0666 c0x0000 (---------------) + I nom + 0x00229a83, // n0x0667 c0x0000 (---------------) + I org + 0x0022edc3, // n0x0668 c0x0000 (---------------) + I com + 0x0021d8c3, // n0x0669 c0x0000 (---------------) + I net + 0x0021f703, // n0x066a c0x0000 (---------------) + I off + 0x00229a83, // n0x066b c0x0000 (---------------) + I org + 0x000f5248, // n0x066c c0x0000 (---------------) + blogspot + 0x0022edc3, // n0x066d c0x0000 (---------------) + I com + 0x002349c3, // n0x066e c0x0000 (---------------) + I edu + 0x00275003, // n0x066f c0x0000 (---------------) + I gov + 0x00215b43, // n0x0670 c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x0671 c0x0000 (---------------) + I net + 0x00229a83, // n0x0672 c0x0000 (---------------) + I org + 0x000f5248, // n0x0673 c0x0000 (---------------) + blogspot + 0x0022edc3, // n0x0674 c0x0000 (---------------) + I com + 0x002349c3, // n0x0675 c0x0000 (---------------) + I edu + 0x0021d8c3, // n0x0676 c0x0000 (---------------) + I net + 0x00229a83, // n0x0677 c0x0000 (---------------) + I org + 0x00208182, // n0x0678 c0x0000 (---------------) + I co + 0x002003c2, // n0x0679 c0x0000 (---------------) + I ed + 0x00233002, // n0x067a c0x0000 (---------------) + I gv + 0x00206f82, // n0x067b c0x0000 (---------------) + I it + 0x00201602, // n0x067c c0x0000 (---------------) + I og + 0x00228d82, // n0x067d c0x0000 (---------------) + I pb + 0x04a2edc3, // n0x067e c0x0012 (n0x0687-n0x0688) + I com + 0x002349c3, // n0x067f c0x0000 (---------------) + I edu + 0x00209f03, // n0x0680 c0x0000 (---------------) + I gob + 0x00275003, // n0x0681 c0x0000 (---------------) + I gov + 0x0026f683, // n0x0682 c0x0000 (---------------) + I int + 0x00215b43, // n0x0683 c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x0684 c0x0000 (---------------) + I net + 0x00229a83, // n0x0685 c0x0000 (---------------) + I org + 0x00236183, // n0x0686 c0x0000 (---------------) + I tur + 0x000f5248, // n0x0687 c0x0000 (---------------) + blogspot + 0x00256bc4, // n0x0688 c0x0000 (---------------) + I e164 + 0x00226007, // n0x0689 c0x0000 (---------------) + I in-addr + 0x00216fc3, // n0x068a c0x0000 (---------------) + I ip6 + 0x00291084, // n0x068b c0x0000 (---------------) + I iris + 0x002016c3, // n0x068c c0x0000 (---------------) + I uri + 0x002018c3, // n0x068d c0x0000 (---------------) + I urn + 0x00275003, // n0x068e c0x0000 (---------------) + I gov + 0x00205882, // n0x068f c0x0000 (---------------) + I ac + 0x0010a143, // n0x0690 c0x0000 (---------------) + biz + 0x05a08182, // n0x0691 c0x0016 (n0x0696-n0x0697) + I co + 0x00233002, // n0x0692 c0x0000 (---------------) + I gv + 0x0018a144, // n0x0693 c0x0000 (---------------) + info + 0x00200282, // n0x0694 c0x0000 (---------------) + I or + 0x000db244, // n0x0695 c0x0000 (---------------) + priv + 0x000f5248, // n0x0696 c0x0000 (---------------) + blogspot + 0x00233383, // n0x0697 c0x0000 (---------------) + I act + 0x0022d9c3, // n0x0698 c0x0000 (---------------) + I asn + 0x0622edc3, // n0x0699 c0x0018 (n0x06a9-n0x06aa) + I com + 0x00231fc4, // n0x069a c0x0000 (---------------) + I conf + 0x066349c3, // n0x069b c0x0019 (n0x06aa-n0x06b2) + I edu + 0x06a75003, // n0x069c c0x001a (n0x06b2-n0x06b7) + I gov + 0x00205d82, // n0x069d c0x0000 (---------------) + I id + 0x0038a144, // n0x069e c0x0000 (---------------) + I info + 0x0021d8c3, // n0x069f c0x0000 (---------------) + I net + 0x002e4fc3, // n0x06a0 c0x0000 (---------------) + I nsw + 0x00202382, // n0x06a1 c0x0000 (---------------) + I nt + 0x00229a83, // n0x06a2 c0x0000 (---------------) + I org + 0x0021a842, // n0x06a3 c0x0000 (---------------) + I oz + 0x002df383, // n0x06a4 c0x0000 (---------------) + I qld + 0x00202402, // n0x06a5 c0x0000 (---------------) + I sa + 0x00201fc3, // n0x06a6 c0x0000 (---------------) + I tas + 0x00206a83, // n0x06a7 c0x0000 (---------------) + I vic + 0x002010c2, // n0x06a8 c0x0000 (---------------) + I wa + 0x000f5248, // n0x06a9 c0x0000 (---------------) + blogspot + 0x00233383, // n0x06aa c0x0000 (---------------) + I act + 0x002e4fc3, // n0x06ab c0x0000 (---------------) + I nsw + 0x00202382, // n0x06ac c0x0000 (---------------) + I nt + 0x002df383, // n0x06ad c0x0000 (---------------) + I qld + 0x00202402, // n0x06ae c0x0000 (---------------) + I sa + 0x00201fc3, // n0x06af c0x0000 (---------------) + I tas + 0x00206a83, // n0x06b0 c0x0000 (---------------) + I vic + 0x002010c2, // n0x06b1 c0x0000 (---------------) + I wa + 0x002df383, // n0x06b2 c0x0000 (---------------) + I qld + 0x00202402, // n0x06b3 c0x0000 (---------------) + I sa + 0x00201fc3, // n0x06b4 c0x0000 (---------------) + I tas + 0x00206a83, // n0x06b5 c0x0000 (---------------) + I vic + 0x002010c2, // n0x06b6 c0x0000 (---------------) + I wa + 0x0022edc3, // n0x06b7 c0x0000 (---------------) + I com + 0x0030a143, // n0x06b8 c0x0000 (---------------) + I biz + 0x0022edc3, // n0x06b9 c0x0000 (---------------) + I com + 0x002349c3, // n0x06ba c0x0000 (---------------) + I edu + 0x00275003, // n0x06bb c0x0000 (---------------) + I gov + 0x0038a144, // n0x06bc c0x0000 (---------------) + I info + 0x0026f683, // n0x06bd c0x0000 (---------------) + I int + 0x00215b43, // n0x06be c0x0000 (---------------) + I mil + 0x0027ca84, // n0x06bf c0x0000 (---------------) + I name + 0x0021d8c3, // n0x06c0 c0x0000 (---------------) + I net + 0x00229a83, // n0x06c1 c0x0000 (---------------) + I org + 0x002099c2, // n0x06c2 c0x0000 (---------------) + I pp + 0x00220283, // n0x06c3 c0x0000 (---------------) + I pro + 0x000f5248, // n0x06c4 c0x0000 (---------------) + blogspot + 0x00208182, // n0x06c5 c0x0000 (---------------) + I co + 0x0022edc3, // n0x06c6 c0x0000 (---------------) + I com + 0x002349c3, // n0x06c7 c0x0000 (---------------) + I edu + 0x00275003, // n0x06c8 c0x0000 (---------------) + I gov + 0x00215b43, // n0x06c9 c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x06ca c0x0000 (---------------) + I net + 0x00229a83, // n0x06cb c0x0000 (---------------) + I org + 0x0020a642, // n0x06cc c0x0000 (---------------) + I rs + 0x00272344, // n0x06cd c0x0000 (---------------) + I unbi + 0x00362b04, // n0x06ce c0x0000 (---------------) + I unsa + 0x0030a143, // n0x06cf c0x0000 (---------------) + I biz + 0x00208182, // n0x06d0 c0x0000 (---------------) + I co + 0x0022edc3, // n0x06d1 c0x0000 (---------------) + I com + 0x002349c3, // n0x06d2 c0x0000 (---------------) + I edu + 0x00275003, // n0x06d3 c0x0000 (---------------) + I gov + 0x0038a144, // n0x06d4 c0x0000 (---------------) + I info + 0x0021d8c3, // n0x06d5 c0x0000 (---------------) + I net + 0x00229a83, // n0x06d6 c0x0000 (---------------) + I org + 0x0038c985, // n0x06d7 c0x0000 (---------------) + I store + 0x00206fc2, // n0x06d8 c0x0000 (---------------) + I tv + 0x00205882, // n0x06d9 c0x0000 (---------------) + I ac + 0x000f5248, // n0x06da c0x0000 (---------------) + blogspot + 0x00275003, // n0x06db c0x0000 (---------------) + I gov + 0x00226981, // n0x06dc c0x0000 (---------------) + I 0 + 0x00226901, // n0x06dd c0x0000 (---------------) + I 1 + 0x00226941, // n0x06de c0x0000 (---------------) + I 2 + 0x0024bb41, // n0x06df c0x0000 (---------------) + I 3 + 0x00256c81, // n0x06e0 c0x0000 (---------------) + I 4 + 0x0026bdc1, // n0x06e1 c0x0000 (---------------) + I 5 + 0x00217041, // n0x06e2 c0x0000 (---------------) + I 6 + 0x002397c1, // n0x06e3 c0x0000 (---------------) + I 7 + 0x002e7641, // n0x06e4 c0x0000 (---------------) + I 8 + 0x002f8541, // n0x06e5 c0x0000 (---------------) + I 9 + 0x00200101, // n0x06e6 c0x0000 (---------------) + I a + 0x00200001, // n0x06e7 c0x0000 (---------------) + I b + 0x000f5248, // n0x06e8 c0x0000 (---------------) + blogspot + 0x00200301, // n0x06e9 c0x0000 (---------------) + I c + 0x00200401, // n0x06ea c0x0000 (---------------) + I d + 0x00200081, // n0x06eb c0x0000 (---------------) + I e + 0x00200381, // n0x06ec c0x0000 (---------------) + I f + 0x002006c1, // n0x06ed c0x0000 (---------------) + I g + 0x00200a41, // n0x06ee c0x0000 (---------------) + I h + 0x00200041, // n0x06ef c0x0000 (---------------) + I i + 0x00201841, // n0x06f0 c0x0000 (---------------) + I j + 0x00200a01, // n0x06f1 c0x0000 (---------------) + I k + 0x00200201, // n0x06f2 c0x0000 (---------------) + I l + 0x00200181, // n0x06f3 c0x0000 (---------------) + I m + 0x002005c1, // n0x06f4 c0x0000 (---------------) + I n + 0x00200281, // n0x06f5 c0x0000 (---------------) + I o + 0x00200c41, // n0x06f6 c0x0000 (---------------) + I p + 0x00204901, // n0x06f7 c0x0000 (---------------) + I q + 0x002002c1, // n0x06f8 c0x0000 (---------------) + I r + 0x00201a41, // n0x06f9 c0x0000 (---------------) + I s + 0x00200141, // n0x06fa c0x0000 (---------------) + I t + 0x002008c1, // n0x06fb c0x0000 (---------------) + I u + 0x002000c1, // n0x06fc c0x0000 (---------------) + I v + 0x002010c1, // n0x06fd c0x0000 (---------------) + I w + 0x0020d041, // n0x06fe c0x0000 (---------------) + I x + 0x00201341, // n0x06ff c0x0000 (---------------) + I y + 0x00202881, // n0x0700 c0x0000 (---------------) + I z + 0x0022edc3, // n0x0701 c0x0000 (---------------) + I com + 0x002349c3, // n0x0702 c0x0000 (---------------) + I edu + 0x00275003, // n0x0703 c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x0704 c0x0000 (---------------) + I net + 0x00229a83, // n0x0705 c0x0000 (---------------) + I org + 0x00208182, // n0x0706 c0x0000 (---------------) + I co + 0x0022edc3, // n0x0707 c0x0000 (---------------) + I com + 0x002349c3, // n0x0708 c0x0000 (---------------) + I edu + 0x00200282, // n0x0709 c0x0000 (---------------) + I or + 0x00229a83, // n0x070a c0x0000 (---------------) + I org + 0x00011a06, // n0x070b c0x0000 (---------------) + dyndns + 0x0004e08a, // n0x070c c0x0000 (---------------) + for-better + 0x00081088, // n0x070d c0x0000 (---------------) + for-more + 0x0004e688, // n0x070e c0x0000 (---------------) + for-some + 0x0004efc7, // n0x070f c0x0000 (---------------) + for-the + 0x00053986, // n0x0710 c0x0000 (---------------) + selfip + 0x00123b06, // n0x0711 c0x0000 (---------------) + webhop + 0x002b1c44, // n0x0712 c0x0000 (---------------) + I asso + 0x00319407, // n0x0713 c0x0000 (---------------) + I barreau + 0x000f5248, // n0x0714 c0x0000 (---------------) + blogspot + 0x002fa744, // n0x0715 c0x0000 (---------------) + I gouv + 0x0022edc3, // n0x0716 c0x0000 (---------------) + I com + 0x002349c3, // n0x0717 c0x0000 (---------------) + I edu + 0x00275003, // n0x0718 c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x0719 c0x0000 (---------------) + I net + 0x00229a83, // n0x071a c0x0000 (---------------) + I org + 0x0022edc3, // n0x071b c0x0000 (---------------) + I com + 0x002349c3, // n0x071c c0x0000 (---------------) + I edu + 0x00209f03, // n0x071d c0x0000 (---------------) + I gob + 0x00275003, // n0x071e c0x0000 (---------------) + I gov + 0x0026f683, // n0x071f c0x0000 (---------------) + I int + 0x00215b43, // n0x0720 c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x0721 c0x0000 (---------------) + I net + 0x00229a83, // n0x0722 c0x0000 (---------------) + I org + 0x00206fc2, // n0x0723 c0x0000 (---------------) + I tv + 0x002c0603, // n0x0724 c0x0000 (---------------) + I adm + 0x002288c3, // n0x0725 c0x0000 (---------------) + I adv + 0x00250603, // n0x0726 c0x0000 (---------------) + I agr + 0x00201382, // n0x0727 c0x0000 (---------------) + I am + 0x00248c03, // n0x0728 c0x0000 (---------------) + I arq + 0x002011c3, // n0x0729 c0x0000 (---------------) + I art + 0x00207403, // n0x072a c0x0000 (---------------) + I ato + 0x00200001, // n0x072b c0x0000 (---------------) + I b + 0x00203a43, // n0x072c c0x0000 (---------------) + I bio + 0x00229004, // n0x072d c0x0000 (---------------) + I blog + 0x00264143, // n0x072e c0x0000 (---------------) + I bmd + 0x00307603, // n0x072f c0x0000 (---------------) + I cim + 0x0021a143, // n0x0730 c0x0000 (---------------) + I cng + 0x0022cc03, // n0x0731 c0x0000 (---------------) + I cnt + 0x0a62edc3, // n0x0732 c0x0029 (n0x076a-n0x076b) + I com + 0x00238284, // n0x0733 c0x0000 (---------------) + I coop + 0x0021a103, // n0x0734 c0x0000 (---------------) + I ecn + 0x00230383, // n0x0735 c0x0000 (---------------) + I eco + 0x002349c3, // n0x0736 c0x0000 (---------------) + I edu + 0x00234703, // n0x0737 c0x0000 (---------------) + I emp + 0x0027bd03, // n0x0738 c0x0000 (---------------) + I eng + 0x00293383, // n0x0739 c0x0000 (---------------) + I esp + 0x00307583, // n0x073a c0x0000 (---------------) + I etc + 0x00222703, // n0x073b c0x0000 (---------------) + I eti + 0x00210003, // n0x073c c0x0000 (---------------) + I far + 0x0024a844, // n0x073d c0x0000 (---------------) + I flog + 0x0023d4c2, // n0x073e c0x0000 (---------------) + I fm + 0x0024da03, // n0x073f c0x0000 (---------------) + I fnd + 0x00254a83, // n0x0740 c0x0000 (---------------) + I fot + 0x0026f8c3, // n0x0741 c0x0000 (---------------) + I fst + 0x002268c3, // n0x0742 c0x0000 (---------------) + I g12 + 0x00302a03, // n0x0743 c0x0000 (---------------) + I ggf + 0x00275003, // n0x0744 c0x0000 (---------------) + I gov + 0x002c15c3, // n0x0745 c0x0000 (---------------) + I imb + 0x00202603, // n0x0746 c0x0000 (---------------) + I ind + 0x00389f83, // n0x0747 c0x0000 (---------------) + I inf + 0x00201ac3, // n0x0748 c0x0000 (---------------) + I jor + 0x002e8403, // n0x0749 c0x0000 (---------------) + I jus + 0x00247b83, // n0x074a c0x0000 (---------------) + I leg + 0x002b9403, // n0x074b c0x0000 (---------------) + I lel + 0x0021ed03, // n0x074c c0x0000 (---------------) + I mat + 0x00211c43, // n0x074d c0x0000 (---------------) + I med + 0x00215b43, // n0x074e c0x0000 (---------------) + I mil + 0x00226dc2, // n0x074f c0x0000 (---------------) + I mp + 0x00270383, // n0x0750 c0x0000 (---------------) + I mus + 0x0021d8c3, // n0x0751 c0x0000 (---------------) + I net + 0x0160e543, // n0x0752 c0x0005 (---------------)* o I nom + 0x00246403, // n0x0753 c0x0000 (---------------) + I not + 0x0022bb43, // n0x0754 c0x0000 (---------------) + I ntr + 0x00206e03, // n0x0755 c0x0000 (---------------) + I odo + 0x00229a83, // n0x0756 c0x0000 (---------------) + I org + 0x00308843, // n0x0757 c0x0000 (---------------) + I ppg + 0x00220283, // n0x0758 c0x0000 (---------------) + I pro + 0x00231cc3, // n0x0759 c0x0000 (---------------) + I psc + 0x002ec783, // n0x075a c0x0000 (---------------) + I psi + 0x002df543, // n0x075b c0x0000 (---------------) + I qsl + 0x0025e6c5, // n0x075c c0x0000 (---------------) + I radio + 0x00226f03, // n0x075d c0x0000 (---------------) + I rec + 0x002df583, // n0x075e c0x0000 (---------------) + I slg + 0x00356083, // n0x075f c0x0000 (---------------) + I srv + 0x0020cfc4, // n0x0760 c0x0000 (---------------) + I taxi + 0x00337f43, // n0x0761 c0x0000 (---------------) + I teo + 0x00233403, // n0x0762 c0x0000 (---------------) + I tmp + 0x0029fc03, // n0x0763 c0x0000 (---------------) + I trd + 0x00236183, // n0x0764 c0x0000 (---------------) + I tur + 0x00206fc2, // n0x0765 c0x0000 (---------------) + I tv + 0x0023b383, // n0x0766 c0x0000 (---------------) + I vet + 0x002f1744, // n0x0767 c0x0000 (---------------) + I vlog + 0x0032fd04, // n0x0768 c0x0000 (---------------) + I wiki + 0x00240f03, // n0x0769 c0x0000 (---------------) + I zlg + 0x000f5248, // n0x076a c0x0000 (---------------) + blogspot + 0x0022edc3, // n0x076b c0x0000 (---------------) + I com + 0x002349c3, // n0x076c c0x0000 (---------------) + I edu + 0x00275003, // n0x076d c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x076e c0x0000 (---------------) + I net + 0x00229a83, // n0x076f c0x0000 (---------------) + I org + 0x0022edc3, // n0x0770 c0x0000 (---------------) + I com + 0x002349c3, // n0x0771 c0x0000 (---------------) + I edu + 0x00275003, // n0x0772 c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x0773 c0x0000 (---------------) + I net + 0x00229a83, // n0x0774 c0x0000 (---------------) + I org + 0x00208182, // n0x0775 c0x0000 (---------------) + I co + 0x00229a83, // n0x0776 c0x0000 (---------------) + I org + 0x0ba2edc3, // n0x0777 c0x002e (n0x077b-n0x077c) + I com + 0x00275003, // n0x0778 c0x0000 (---------------) + I gov + 0x00215b43, // n0x0779 c0x0000 (---------------) + I mil + 0x0021f702, // n0x077a c0x0000 (---------------) + I of + 0x000f5248, // n0x077b c0x0000 (---------------) + blogspot + 0x0022edc3, // n0x077c c0x0000 (---------------) + I com + 0x002349c3, // n0x077d c0x0000 (---------------) + I edu + 0x00275003, // n0x077e c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x077f c0x0000 (---------------) + I net + 0x00229a83, // n0x0780 c0x0000 (---------------) + I org + 0x00009ac2, // n0x0781 c0x0000 (---------------) + za + 0x00200e82, // n0x0782 c0x0000 (---------------) + I ab + 0x0021fb02, // n0x0783 c0x0000 (---------------) + I bc + 0x000f5248, // n0x0784 c0x0000 (---------------) + blogspot + 0x00008182, // n0x0785 c0x0000 (---------------) + co + 0x00236c82, // n0x0786 c0x0000 (---------------) + I gc + 0x00205482, // n0x0787 c0x0000 (---------------) + I mb + 0x002263c2, // n0x0788 c0x0000 (---------------) + I nb + 0x002037c2, // n0x0789 c0x0000 (---------------) + I nf + 0x0023e082, // n0x078a c0x0000 (---------------) + I nl + 0x00208402, // n0x078b c0x0000 (---------------) + I ns + 0x00202382, // n0x078c c0x0000 (---------------) + I nt + 0x00209702, // n0x078d c0x0000 (---------------) + I nu + 0x00200582, // n0x078e c0x0000 (---------------) + I on + 0x00209a02, // n0x078f c0x0000 (---------------) + I pe + 0x00376f42, // n0x0790 c0x0000 (---------------) + I qc + 0x0020e342, // n0x0791 c0x0000 (---------------) + I sk + 0x0022a702, // n0x0792 c0x0000 (---------------) + I yk + 0x000ad709, // n0x0793 c0x0000 (---------------) + ftpaccess + 0x001706cb, // n0x0794 c0x0000 (---------------) + game-server + 0x000cd108, // n0x0795 c0x0000 (---------------) + myphotos + 0x00044749, // n0x0796 c0x0000 (---------------) + scrapping + 0x00275003, // n0x0797 c0x0000 (---------------) + I gov + 0x000f5248, // n0x0798 c0x0000 (---------------) + blogspot + 0x000f5248, // n0x0799 c0x0000 (---------------) + blogspot + 0x00205882, // n0x079a c0x0000 (---------------) + I ac + 0x002b1c44, // n0x079b c0x0000 (---------------) + I asso + 0x00208182, // n0x079c c0x0000 (---------------) + I co + 0x0022edc3, // n0x079d c0x0000 (---------------) + I com + 0x002003c2, // n0x079e c0x0000 (---------------) + I ed + 0x002349c3, // n0x079f c0x0000 (---------------) + I edu + 0x00208502, // n0x07a0 c0x0000 (---------------) + I go + 0x002fa744, // n0x07a1 c0x0000 (---------------) + I gouv + 0x0026f683, // n0x07a2 c0x0000 (---------------) + I int + 0x00247ac2, // n0x07a3 c0x0000 (---------------) + I md + 0x0021d8c3, // n0x07a4 c0x0000 (---------------) + I net + 0x00200282, // n0x07a5 c0x0000 (---------------) + I or + 0x00229a83, // n0x07a6 c0x0000 (---------------) + I org + 0x00240d06, // n0x07a7 c0x0000 (---------------) + I presse + 0x0030cf0f, // n0x07a8 c0x0000 (---------------) + I xn--aroport-bya + 0x006f7083, // n0x07a9 c0x0001 (---------------) ! I www + 0x000f5248, // n0x07aa c0x0000 (---------------) + blogspot + 0x00208182, // n0x07ab c0x0000 (---------------) + I co + 0x00209f03, // n0x07ac c0x0000 (---------------) + I gob + 0x00275003, // n0x07ad c0x0000 (---------------) + I gov + 0x00215b43, // n0x07ae c0x0000 (---------------) + I mil + 0x00208182, // n0x07af c0x0000 (---------------) + I co + 0x0022edc3, // n0x07b0 c0x0000 (---------------) + I com + 0x00275003, // n0x07b1 c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x07b2 c0x0000 (---------------) + I net + 0x00205882, // n0x07b3 c0x0000 (---------------) + I ac + 0x00207142, // n0x07b4 c0x0000 (---------------) + I ah + 0x0eaeb489, // n0x07b5 c0x003a (n0x07e0-n0x07e1) o I amazonaws + 0x002066c2, // n0x07b6 c0x0000 (---------------) + I bj + 0x0f22edc3, // n0x07b7 c0x003c (n0x07e2-n0x07e3) + I com + 0x0023d842, // n0x07b8 c0x0000 (---------------) + I cq + 0x002349c3, // n0x07b9 c0x0000 (---------------) + I edu + 0x0022f3c2, // n0x07ba c0x0000 (---------------) + I fj + 0x00221f82, // n0x07bb c0x0000 (---------------) + I gd + 0x00275003, // n0x07bc c0x0000 (---------------) + I gov + 0x002242c2, // n0x07bd c0x0000 (---------------) + I gs + 0x0024b8c2, // n0x07be c0x0000 (---------------) + I gx + 0x00252202, // n0x07bf c0x0000 (---------------) + I gz + 0x00201c82, // n0x07c0 c0x0000 (---------------) + I ha + 0x00288842, // n0x07c1 c0x0000 (---------------) + I hb + 0x00205a02, // n0x07c2 c0x0000 (---------------) + I he + 0x00202082, // n0x07c3 c0x0000 (---------------) + I hi + 0x0020e882, // n0x07c4 c0x0000 (---------------) + I hk + 0x002a9982, // n0x07c5 c0x0000 (---------------) + I hl + 0x00218902, // n0x07c6 c0x0000 (---------------) + I hn + 0x002a49c2, // n0x07c7 c0x0000 (---------------) + I jl + 0x0023cbc2, // n0x07c8 c0x0000 (---------------) + I js + 0x00313282, // n0x07c9 c0x0000 (---------------) + I jx + 0x00218f42, // n0x07ca c0x0000 (---------------) + I ln + 0x00215b43, // n0x07cb c0x0000 (---------------) + I mil + 0x00203ec2, // n0x07cc c0x0000 (---------------) + I mo + 0x0021d8c3, // n0x07cd c0x0000 (---------------) + I net + 0x0022dc02, // n0x07ce c0x0000 (---------------) + I nm + 0x00269a82, // n0x07cf c0x0000 (---------------) + I nx + 0x00229a83, // n0x07d0 c0x0000 (---------------) + I org + 0x00248c82, // n0x07d1 c0x0000 (---------------) + I qh + 0x002024c2, // n0x07d2 c0x0000 (---------------) + I sc + 0x00256ec2, // n0x07d3 c0x0000 (---------------) + I sd + 0x00201c42, // n0x07d4 c0x0000 (---------------) + I sh + 0x00212a42, // n0x07d5 c0x0000 (---------------) + I sn + 0x002e7402, // n0x07d6 c0x0000 (---------------) + I sx + 0x00201a82, // n0x07d7 c0x0000 (---------------) + I tj + 0x00241cc2, // n0x07d8 c0x0000 (---------------) + I tw + 0x002753c2, // n0x07d9 c0x0000 (---------------) + I xj + 0x002fac8a, // n0x07da c0x0000 (---------------) + I xn--55qx5d + 0x00340a0a, // n0x07db c0x0000 (---------------) + I xn--io0a7i + 0x00372e8a, // n0x07dc c0x0000 (---------------) + I xn--od0alg + 0x003a3c02, // n0x07dd c0x0000 (---------------) + I xz + 0x0020a442, // n0x07de c0x0000 (---------------) + I yn + 0x0023df82, // n0x07df c0x0000 (---------------) + I zj + 0x0ec303c7, // n0x07e0 c0x003b (n0x07e1-n0x07e2) + compute + 0x0015bb8a, // n0x07e1 c0x0000 (---------------) + cn-north-1 + 0x0f6eb489, // n0x07e2 c0x003d (n0x07e3-n0x07e4) o I amazonaws + 0x0fb5bb8a, // n0x07e3 c0x003e (n0x07e4-n0x07e5) o I cn-north-1 + 0x0004d702, // n0x07e4 c0x0000 (---------------) + s3 + 0x00243984, // n0x07e5 c0x0000 (---------------) + I arts + 0x1022edc3, // n0x07e6 c0x0040 (n0x07f2-n0x07f3) + I com + 0x002349c3, // n0x07e7 c0x0000 (---------------) + I edu + 0x00247a04, // n0x07e8 c0x0000 (---------------) + I firm + 0x00275003, // n0x07e9 c0x0000 (---------------) + I gov + 0x0038a144, // n0x07ea c0x0000 (---------------) + I info + 0x0026f683, // n0x07eb c0x0000 (---------------) + I int + 0x00215b43, // n0x07ec c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x07ed c0x0000 (---------------) + I net + 0x0020e543, // n0x07ee c0x0000 (---------------) + I nom + 0x00229a83, // n0x07ef c0x0000 (---------------) + I org + 0x00226f03, // n0x07f0 c0x0000 (---------------) + I rec + 0x0021fa83, // n0x07f1 c0x0000 (---------------) + I web + 0x000f5248, // n0x07f2 c0x0000 (---------------) + blogspot + 0x000bd9c5, // n0x07f3 c0x0000 (---------------) + 1kapp + 0x00104e02, // n0x07f4 c0x0000 (---------------) + 4u + 0x0016af06, // n0x07f5 c0x0000 (---------------) + africa + 0x10aeb489, // n0x07f6 c0x0042 (n0x08bf-n0x08d1) o I amazonaws + 0x00045a87, // n0x07f7 c0x0000 (---------------) + appspot + 0x000011c2, // n0x07f8 c0x0000 (---------------) + ar + 0x00194f0a, // n0x07f9 c0x0000 (---------------) + betainabox + 0x00029007, // n0x07fa c0x0000 (---------------) + blogdns + 0x000f5248, // n0x07fb c0x0000 (---------------) + blogspot + 0x0000bb42, // n0x07fc c0x0000 (---------------) + br + 0x0013dd87, // n0x07fd c0x0000 (---------------) + cechire + 0x0010944f, // n0x07fe c0x0000 (---------------) + cloudcontrolapp + 0x0002b98f, // n0x07ff c0x0000 (---------------) + cloudcontrolled + 0x0001a142, // n0x0800 c0x0000 (---------------) + cn + 0x00008182, // n0x0801 c0x0000 (---------------) + co + 0x000932c8, // n0x0802 c0x0000 (---------------) + codespot + 0x00000402, // n0x0803 c0x0000 (---------------) + de + 0x00147e08, // n0x0804 c0x0000 (---------------) + dnsalias + 0x00074607, // n0x0805 c0x0000 (---------------) + dnsdojo + 0x000ebecb, // n0x0806 c0x0000 (---------------) + doesntexist + 0x00168789, // n0x0807 c0x0000 (---------------) + dontexist + 0x00147d07, // n0x0808 c0x0000 (---------------) + doomdns + 0x000e908c, // n0x0809 c0x0000 (---------------) + dreamhosters + 0x0012088a, // n0x080a c0x0000 (---------------) + dyn-o-saur + 0x0018bd88, // n0x080b c0x0000 (---------------) + dynalias + 0x0006c4ce, // n0x080c c0x0000 (---------------) + dyndns-at-home + 0x000d54ce, // n0x080d c0x0000 (---------------) + dyndns-at-work + 0x00028e4b, // n0x080e c0x0000 (---------------) + dyndns-blog + 0x000e0acb, // n0x080f c0x0000 (---------------) + dyndns-free + 0x00011a0b, // n0x0810 c0x0000 (---------------) + dyndns-home + 0x00016e09, // n0x0811 c0x0000 (---------------) + dyndns-ip + 0x0001a44b, // n0x0812 c0x0000 (---------------) + dyndns-mail + 0x0001f54d, // n0x0813 c0x0000 (---------------) + dyndns-office + 0x0002090b, // n0x0814 c0x0000 (---------------) + dyndns-pics + 0x0002a14d, // n0x0815 c0x0000 (---------------) + dyndns-remote + 0x0002ad8d, // n0x0816 c0x0000 (---------------) + dyndns-server + 0x00151bca, // n0x0817 c0x0000 (---------------) + dyndns-web + 0x0012fb4b, // n0x0818 c0x0000 (---------------) + dyndns-wiki + 0x0013298b, // n0x0819 c0x0000 (---------------) + dyndns-work + 0x0003a850, // n0x081a c0x0000 (---------------) + elasticbeanstalk + 0x0000498f, // n0x081b c0x0000 (---------------) + est-a-la-maison + 0x000ce98f, // n0x081c c0x0000 (---------------) + est-a-la-masion + 0x0003404d, // n0x081d c0x0000 (---------------) + est-le-patron + 0x0007dbd0, // n0x081e c0x0000 (---------------) + est-mon-blogueur + 0x00024542, // n0x081f c0x0000 (---------------) + eu + 0x0004588b, // n0x0820 c0x0000 (---------------) + firebaseapp + 0x0004c788, // n0x0821 c0x0000 (---------------) + flynnhub + 0x0005afc7, // n0x0822 c0x0000 (---------------) + from-ak + 0x0005b307, // n0x0823 c0x0000 (---------------) + from-al + 0x0005b4c7, // n0x0824 c0x0000 (---------------) + from-ar + 0x0005ba47, // n0x0825 c0x0000 (---------------) + from-ca + 0x0005dbc7, // n0x0826 c0x0000 (---------------) + from-ct + 0x0005e287, // n0x0827 c0x0000 (---------------) + from-dc + 0x0005f3c7, // n0x0828 c0x0000 (---------------) + from-de + 0x0005f907, // n0x0829 c0x0000 (---------------) + from-fl + 0x0005ff47, // n0x082a c0x0000 (---------------) + from-ga + 0x000602c7, // n0x082b c0x0000 (---------------) + from-hi + 0x00060d07, // n0x082c c0x0000 (---------------) + from-ia + 0x00060ec7, // n0x082d c0x0000 (---------------) + from-id + 0x00061087, // n0x082e c0x0000 (---------------) + from-il + 0x00061247, // n0x082f c0x0000 (---------------) + from-in + 0x00061547, // n0x0830 c0x0000 (---------------) + from-ks + 0x00061b87, // n0x0831 c0x0000 (---------------) + from-ky + 0x000623c7, // n0x0832 c0x0000 (---------------) + from-ma + 0x00062a87, // n0x0833 c0x0000 (---------------) + from-md + 0x00063387, // n0x0834 c0x0000 (---------------) + from-mi + 0x00064ac7, // n0x0835 c0x0000 (---------------) + from-mn + 0x00064c87, // n0x0836 c0x0000 (---------------) + from-mo + 0x00064f87, // n0x0837 c0x0000 (---------------) + from-ms + 0x000656c7, // n0x0838 c0x0000 (---------------) + from-mt + 0x000658c7, // n0x0839 c0x0000 (---------------) + from-nc + 0x00066087, // n0x083a c0x0000 (---------------) + from-nd + 0x00066247, // n0x083b c0x0000 (---------------) + from-ne + 0x00066647, // n0x083c c0x0000 (---------------) + from-nh + 0x000669c7, // n0x083d c0x0000 (---------------) + from-nj + 0x00066f87, // n0x083e c0x0000 (---------------) + from-nm + 0x00067747, // n0x083f c0x0000 (---------------) + from-nv + 0x00068bc7, // n0x0840 c0x0000 (---------------) + from-oh + 0x00068e87, // n0x0841 c0x0000 (---------------) + from-ok + 0x00069207, // n0x0842 c0x0000 (---------------) + from-or + 0x000693c7, // n0x0843 c0x0000 (---------------) + from-pa + 0x00069747, // n0x0844 c0x0000 (---------------) + from-pr + 0x00069d87, // n0x0845 c0x0000 (---------------) + from-ri + 0x0006ac87, // n0x0846 c0x0000 (---------------) + from-sc + 0x0006b087, // n0x0847 c0x0000 (---------------) + from-sd + 0x0006b847, // n0x0848 c0x0000 (---------------) + from-tn + 0x0006ba07, // n0x0849 c0x0000 (---------------) + from-tx + 0x0006be47, // n0x084a c0x0000 (---------------) + from-ut + 0x0006ce47, // n0x084b c0x0000 (---------------) + from-va + 0x0006d487, // n0x084c c0x0000 (---------------) + from-vt + 0x0006de87, // n0x084d c0x0000 (---------------) + from-wa + 0x0006e047, // n0x084e c0x0000 (---------------) + from-wi + 0x0006e3c7, // n0x084f c0x0000 (---------------) + from-wv + 0x0006e947, // n0x0850 c0x0000 (---------------) + from-wy + 0x00009582, // n0x0851 c0x0000 (---------------) + gb + 0x000d0707, // n0x0852 c0x0000 (---------------) + getmyip + 0x000c8391, // n0x0853 c0x0000 (---------------) + githubusercontent + 0x000d8b0a, // n0x0854 c0x0000 (---------------) + googleapis + 0x0009314a, // n0x0855 c0x0000 (---------------) + googlecode + 0x0004f886, // n0x0856 c0x0000 (---------------) + gotdns + 0x0001450b, // n0x0857 c0x0000 (---------------) + gotpantheon + 0x000089c2, // n0x0858 c0x0000 (---------------) + gr + 0x0017ea89, // n0x0859 c0x0000 (---------------) + herokuapp + 0x000896c9, // n0x085a c0x0000 (---------------) + herokussl + 0x0000e882, // n0x085b c0x0000 (---------------) + hk + 0x000fef8a, // n0x085c c0x0000 (---------------) + hobby-site + 0x0009c509, // n0x085d c0x0000 (---------------) + homelinux + 0x0009d988, // n0x085e c0x0000 (---------------) + homeunix + 0x0000d0c2, // n0x085f c0x0000 (---------------) + hu + 0x00106c49, // n0x0860 c0x0000 (---------------) + iamallama + 0x0015c40e, // n0x0861 c0x0000 (---------------) + is-a-anarchist + 0x0009894c, // n0x0862 c0x0000 (---------------) + is-a-blogger + 0x000cee0f, // n0x0863 c0x0000 (---------------) + is-a-bookkeeper + 0x0018758e, // n0x0864 c0x0000 (---------------) + is-a-bulls-fan + 0x0000c24c, // n0x0865 c0x0000 (---------------) + is-a-caterer + 0x0000fe09, // n0x0866 c0x0000 (---------------) + is-a-chef + 0x000125d1, // n0x0867 c0x0000 (---------------) + is-a-conservative + 0x00013a48, // n0x0868 c0x0000 (---------------) + is-a-cpa + 0x00017752, // n0x0869 c0x0000 (---------------) + is-a-cubicle-slave + 0x0001844d, // n0x086a c0x0000 (---------------) + is-a-democrat + 0x00022d8d, // n0x086b c0x0000 (---------------) + is-a-designer + 0x000236cb, // n0x086c c0x0000 (---------------) + is-a-doctor + 0x00028555, // n0x086d c0x0000 (---------------) + is-a-financialadvisor + 0x0005f049, // n0x086e c0x0000 (---------------) + is-a-geek + 0x0016ba0a, // n0x086f c0x0000 (---------------) + is-a-green + 0x00130509, // n0x0870 c0x0000 (---------------) + is-a-guru + 0x00042150, // n0x0871 c0x0000 (---------------) + is-a-hard-worker + 0x0004884b, // n0x0872 c0x0000 (---------------) + is-a-hunter + 0x00054ccf, // n0x0873 c0x0000 (---------------) + is-a-landscaper + 0x0005d4cb, // n0x0874 c0x0000 (---------------) + is-a-lawyer + 0x000653cc, // n0x0875 c0x0000 (---------------) + is-a-liberal + 0x00067350, // n0x0876 c0x0000 (---------------) + is-a-libertarian + 0x0006ca4a, // n0x0877 c0x0000 (---------------) + is-a-llama + 0x0007024d, // n0x0878 c0x0000 (---------------) + is-a-musician + 0x0007198e, // n0x0879 c0x0000 (---------------) + is-a-nascarfan + 0x0007570a, // n0x087a c0x0000 (---------------) + is-a-nurse + 0x00081dcc, // n0x087b c0x0000 (---------------) + is-a-painter + 0x00137194, // n0x087c c0x0000 (---------------) + is-a-personaltrainer + 0x0017e711, // n0x087d c0x0000 (---------------) + is-a-photographer + 0x0008bc4b, // n0x087e c0x0000 (---------------) + is-a-player + 0x0008fd8f, // n0x087f c0x0000 (---------------) + is-a-republican + 0x00095dcd, // n0x0880 c0x0000 (---------------) + is-a-rockstar + 0x000982ce, // n0x0881 c0x0000 (---------------) + is-a-socialist + 0x000a300c, // n0x0882 c0x0000 (---------------) + is-a-student + 0x000a374c, // n0x0883 c0x0000 (---------------) + is-a-teacher + 0x000edf8b, // n0x0884 c0x0000 (---------------) + is-a-techie + 0x000ee28e, // n0x0885 c0x0000 (---------------) + is-a-therapist + 0x000ed890, // n0x0886 c0x0000 (---------------) + is-an-accountant + 0x00156b4b, // n0x0887 c0x0000 (---------------) + is-an-actor + 0x000ed38d, // n0x0888 c0x0000 (---------------) + is-an-actress + 0x000d5f4f, // n0x0889 c0x0000 (---------------) + is-an-anarchist + 0x0015634c, // n0x088a c0x0000 (---------------) + is-an-artist + 0x00129f8e, // n0x088b c0x0000 (---------------) + is-an-engineer + 0x00168c91, // n0x088c c0x0000 (---------------) + is-an-entertainer + 0x000aed4c, // n0x088d c0x0000 (---------------) + is-certified + 0x000b3d47, // n0x088e c0x0000 (---------------) + is-gone + 0x000b488d, // n0x088f c0x0000 (---------------) + is-into-anime + 0x000b608c, // n0x0890 c0x0000 (---------------) + is-into-cars + 0x000d3e10, // n0x0891 c0x0000 (---------------) + is-into-cartoons + 0x00118acd, // n0x0892 c0x0000 (---------------) + is-into-games + 0x00144007, // n0x0893 c0x0000 (---------------) + is-leet + 0x00157c90, // n0x0894 c0x0000 (---------------) + is-not-certified + 0x000e2408, // n0x0895 c0x0000 (---------------) + is-slick + 0x000e398b, // n0x0896 c0x0000 (---------------) + is-uberleet + 0x0014798f, // n0x0897 c0x0000 (---------------) + is-with-theband + 0x000fff08, // n0x0898 c0x0000 (---------------) + isa-geek + 0x000d8d0d, // n0x0899 c0x0000 (---------------) + isa-hockeynut + 0x0014b750, // n0x089a c0x0000 (---------------) + issmarterthanyou + 0x000a9883, // n0x089b c0x0000 (---------------) + jpn + 0x000076c2, // n0x089c c0x0000 (---------------) + kr + 0x000510c9, // n0x089d c0x0000 (---------------) + likes-pie + 0x0006c2ca, // n0x089e c0x0000 (---------------) + likescandy + 0x0001ddc3, // n0x089f c0x0000 (---------------) + mex + 0x00116a48, // n0x08a0 c0x0000 (---------------) + neat-url + 0x000079c7, // n0x08a1 c0x0000 (---------------) + nfshost + 0x00000d82, // n0x08a2 c0x0000 (---------------) + no + 0x0005e84a, // n0x08a3 c0x0000 (---------------) + operaunite + 0x0017e1cf, // n0x08a4 c0x0000 (---------------) + outsystemscloud + 0x00123c52, // n0x08a5 c0x0000 (---------------) + pagespeedmobilizer + 0x00114503, // n0x08a6 c0x0000 (---------------) + qa2 + 0x00176f42, // n0x08a7 c0x0000 (---------------) + qc + 0x001093c7, // n0x08a8 c0x0000 (---------------) + rhcloud + 0x00000cc2, // n0x08a9 c0x0000 (---------------) + ro + 0x00011ec2, // n0x08aa c0x0000 (---------------) + ru + 0x00002402, // n0x08ab c0x0000 (---------------) + sa + 0x00198490, // n0x08ac c0x0000 (---------------) + saves-the-whales + 0x00001d42, // n0x08ad c0x0000 (---------------) + se + 0x00053986, // n0x08ae c0x0000 (---------------) + selfip + 0x00046cce, // n0x08af c0x0000 (---------------) + sells-for-less + 0x00084c4b, // n0x08b0 c0x0000 (---------------) + sells-for-u + 0x000c9608, // n0x08b1 c0x0000 (---------------) + servebbs + 0x000c670a, // n0x08b2 c0x0000 (---------------) + simple-url + 0x000ec7c7, // n0x08b3 c0x0000 (---------------) + sinaapp + 0x0013508d, // n0x08b4 c0x0000 (---------------) + space-to-rent + 0x0017980c, // n0x08b5 c0x0000 (---------------) + teaches-yoga + 0x00000f82, // n0x08b6 c0x0000 (---------------) + uk + 0x00002982, // n0x08b7 c0x0000 (---------------) + us + 0x0000d7c2, // n0x08b8 c0x0000 (---------------) + uy + 0x000ec70a, // n0x08b9 c0x0000 (---------------) + vipsinaapp + 0x000d8a0a, // n0x08ba c0x0000 (---------------) + withgoogle + 0x000de78b, // n0x08bb c0x0000 (---------------) + withyoutube + 0x000f4fce, // n0x08bc c0x0000 (---------------) + writesthisblog + 0x000d2888, // n0x08bd c0x0000 (---------------) + yolasite + 0x00009ac2, // n0x08be c0x0000 (---------------) + za + 0x10c303c7, // n0x08bf c0x0043 (n0x08d1-n0x08da) + compute + 0x110303c9, // n0x08c0 c0x0044 (n0x08da-n0x08dc) + compute-1 + 0x0000f683, // n0x08c1 c0x0000 (---------------) + elb + 0x11763c0c, // n0x08c2 c0x0045 (n0x08dc-n0x08dd) o I eu-central-1 + 0x0004d702, // n0x08c3 c0x0000 (---------------) + s3 + 0x000be551, // n0x08c4 c0x0000 (---------------) + s3-ap-northeast-1 + 0x000bd5d1, // n0x08c5 c0x0000 (---------------) + s3-ap-southeast-1 + 0x00103851, // n0x08c6 c0x0000 (---------------) + s3-ap-southeast-2 + 0x00163b4f, // n0x08c7 c0x0000 (---------------) + s3-eu-central-1 + 0x0004d70c, // n0x08c8 c0x0000 (---------------) + s3-eu-west-1 + 0x000a234d, // n0x08c9 c0x0000 (---------------) + s3-external-1 + 0x0011eb4d, // n0x08ca c0x0000 (---------------) + s3-external-2 + 0x00120c55, // n0x08cb c0x0000 (---------------) + s3-fips-us-gov-west-1 + 0x0012c3cc, // n0x08cc c0x0000 (---------------) + s3-sa-east-1 + 0x00142c10, // n0x08cd c0x0000 (---------------) + s3-us-gov-west-1 + 0x000647cc, // n0x08ce c0x0000 (---------------) + s3-us-west-1 + 0x000d6bcc, // n0x08cf c0x0000 (---------------) + s3-us-west-2 + 0x0011b689, // n0x08d0 c0x0000 (---------------) + us-east-1 + 0x000be60e, // n0x08d1 c0x0000 (---------------) + ap-northeast-1 + 0x000bd68e, // n0x08d2 c0x0000 (---------------) + ap-southeast-1 + 0x0010390e, // n0x08d3 c0x0000 (---------------) + ap-southeast-2 + 0x00163c0c, // n0x08d4 c0x0000 (---------------) + eu-central-1 + 0x0004d7c9, // n0x08d5 c0x0000 (---------------) + eu-west-1 + 0x0012c489, // n0x08d6 c0x0000 (---------------) + sa-east-1 + 0x00120e4d, // n0x08d7 c0x0000 (---------------) + us-gov-west-1 + 0x00064889, // n0x08d8 c0x0000 (---------------) + us-west-1 + 0x000d6c89, // n0x08d9 c0x0000 (---------------) + us-west-2 + 0x0010a983, // n0x08da c0x0000 (---------------) + z-1 + 0x0013bb83, // n0x08db c0x0000 (---------------) + z-2 + 0x0004d702, // n0x08dc c0x0000 (---------------) + s3 + 0x00205882, // n0x08dd c0x0000 (---------------) + I ac + 0x00208182, // n0x08de c0x0000 (---------------) + I co + 0x002003c2, // n0x08df c0x0000 (---------------) + I ed + 0x0020e002, // n0x08e0 c0x0000 (---------------) + I fi + 0x00208502, // n0x08e1 c0x0000 (---------------) + I go + 0x00200282, // n0x08e2 c0x0000 (---------------) + I or + 0x00202402, // n0x08e3 c0x0000 (---------------) + I sa + 0x0022edc3, // n0x08e4 c0x0000 (---------------) + I com + 0x002349c3, // n0x08e5 c0x0000 (---------------) + I edu + 0x00275003, // n0x08e6 c0x0000 (---------------) + I gov + 0x00389f83, // n0x08e7 c0x0000 (---------------) + I inf + 0x0021d8c3, // n0x08e8 c0x0000 (---------------) + I net + 0x00229a83, // n0x08e9 c0x0000 (---------------) + I org + 0x000f5248, // n0x08ea c0x0000 (---------------) + blogspot + 0x0022edc3, // n0x08eb c0x0000 (---------------) + I com + 0x002349c3, // n0x08ec c0x0000 (---------------) + I edu + 0x0021d8c3, // n0x08ed c0x0000 (---------------) + I net + 0x00229a83, // n0x08ee c0x0000 (---------------) + I org + 0x0005cf03, // n0x08ef c0x0000 (---------------) + ath + 0x00275003, // n0x08f0 c0x0000 (---------------) + I gov + 0x00205882, // n0x08f1 c0x0000 (---------------) + I ac + 0x0030a143, // n0x08f2 c0x0000 (---------------) + I biz + 0x1322edc3, // n0x08f3 c0x004c (n0x08fe-n0x08ff) + I com + 0x0027c487, // n0x08f4 c0x0000 (---------------) + I ekloges + 0x00275003, // n0x08f5 c0x0000 (---------------) + I gov + 0x00342703, // n0x08f6 c0x0000 (---------------) + I ltd + 0x0027ca84, // n0x08f7 c0x0000 (---------------) + I name + 0x0021d8c3, // n0x08f8 c0x0000 (---------------) + I net + 0x00229a83, // n0x08f9 c0x0000 (---------------) + I org + 0x00266bca, // n0x08fa c0x0000 (---------------) + I parliament + 0x00240d05, // n0x08fb c0x0000 (---------------) + I press + 0x00220283, // n0x08fc c0x0000 (---------------) + I pro + 0x00200142, // n0x08fd c0x0000 (---------------) + I tm + 0x000f5248, // n0x08fe c0x0000 (---------------) + blogspot + 0x000f5248, // n0x08ff c0x0000 (---------------) + blogspot + 0x000f5248, // n0x0900 c0x0000 (---------------) + blogspot + 0x0002edc3, // n0x0901 c0x0000 (---------------) + com + 0x000d434f, // n0x0902 c0x0000 (---------------) + fuettertdasnetz + 0x0016890a, // n0x0903 c0x0000 (---------------) + isteingeek + 0x00098587, // n0x0904 c0x0000 (---------------) + istmein + 0x0001d74a, // n0x0905 c0x0000 (---------------) + lebtimnetz + 0x0008df8a, // n0x0906 c0x0000 (---------------) + leitungsen + 0x000355cd, // n0x0907 c0x0000 (---------------) + traeumtgerade + 0x000f5248, // n0x0908 c0x0000 (---------------) + blogspot + 0x0022edc3, // n0x0909 c0x0000 (---------------) + I com + 0x002349c3, // n0x090a c0x0000 (---------------) + I edu + 0x00275003, // n0x090b c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x090c c0x0000 (---------------) + I net + 0x00229a83, // n0x090d c0x0000 (---------------) + I org + 0x002011c3, // n0x090e c0x0000 (---------------) + I art + 0x0022edc3, // n0x090f c0x0000 (---------------) + I com + 0x002349c3, // n0x0910 c0x0000 (---------------) + I edu + 0x00209f03, // n0x0911 c0x0000 (---------------) + I gob + 0x00275003, // n0x0912 c0x0000 (---------------) + I gov + 0x00215b43, // n0x0913 c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x0914 c0x0000 (---------------) + I net + 0x00229a83, // n0x0915 c0x0000 (---------------) + I org + 0x00289883, // n0x0916 c0x0000 (---------------) + I sld + 0x0021fa83, // n0x0917 c0x0000 (---------------) + I web + 0x002011c3, // n0x0918 c0x0000 (---------------) + I art + 0x002b1c44, // n0x0919 c0x0000 (---------------) + I asso + 0x0022edc3, // n0x091a c0x0000 (---------------) + I com + 0x002349c3, // n0x091b c0x0000 (---------------) + I edu + 0x00275003, // n0x091c c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x091d c0x0000 (---------------) + I net + 0x00229a83, // n0x091e c0x0000 (---------------) + I org + 0x002210c3, // n0x091f c0x0000 (---------------) + I pol + 0x0022edc3, // n0x0920 c0x0000 (---------------) + I com + 0x002349c3, // n0x0921 c0x0000 (---------------) + I edu + 0x0020e003, // n0x0922 c0x0000 (---------------) + I fin + 0x00209f03, // n0x0923 c0x0000 (---------------) + I gob + 0x00275003, // n0x0924 c0x0000 (---------------) + I gov + 0x0038a144, // n0x0925 c0x0000 (---------------) + I info + 0x00324c03, // n0x0926 c0x0000 (---------------) + I k12 + 0x00211c43, // n0x0927 c0x0000 (---------------) + I med + 0x00215b43, // n0x0928 c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x0929 c0x0000 (---------------) + I net + 0x00229a83, // n0x092a c0x0000 (---------------) + I org + 0x00220283, // n0x092b c0x0000 (---------------) + I pro + 0x003a3443, // n0x092c c0x0000 (---------------) + I aip + 0x1562edc3, // n0x092d c0x0055 (n0x0936-n0x0937) + I com + 0x002349c3, // n0x092e c0x0000 (---------------) + I edu + 0x002aef43, // n0x092f c0x0000 (---------------) + I fie + 0x00275003, // n0x0930 c0x0000 (---------------) + I gov + 0x00265503, // n0x0931 c0x0000 (---------------) + I lib + 0x00211c43, // n0x0932 c0x0000 (---------------) + I med + 0x00229a83, // n0x0933 c0x0000 (---------------) + I org + 0x00204383, // n0x0934 c0x0000 (---------------) + I pri + 0x0037f9c4, // n0x0935 c0x0000 (---------------) + I riik + 0x000f5248, // n0x0936 c0x0000 (---------------) + blogspot + 0x15e2edc3, // n0x0937 c0x0057 (n0x0940-n0x0941) + I com + 0x002349c3, // n0x0938 c0x0000 (---------------) + I edu + 0x0029da43, // n0x0939 c0x0000 (---------------) + I eun + 0x00275003, // n0x093a c0x0000 (---------------) + I gov + 0x00215b43, // n0x093b c0x0000 (---------------) + I mil + 0x0027ca84, // n0x093c c0x0000 (---------------) + I name + 0x0021d8c3, // n0x093d c0x0000 (---------------) + I net + 0x00229a83, // n0x093e c0x0000 (---------------) + I org + 0x0021c043, // n0x093f c0x0000 (---------------) + I sci + 0x000f5248, // n0x0940 c0x0000 (---------------) + blogspot + 0x1662edc3, // n0x0941 c0x0059 (n0x0946-n0x0947) + I com + 0x002349c3, // n0x0942 c0x0000 (---------------) + I edu + 0x00209f03, // n0x0943 c0x0000 (---------------) + I gob + 0x0020e543, // n0x0944 c0x0000 (---------------) + I nom + 0x00229a83, // n0x0945 c0x0000 (---------------) + I org + 0x000f5248, // n0x0946 c0x0000 (---------------) + blogspot + 0x0030a143, // n0x0947 c0x0000 (---------------) + I biz + 0x0022edc3, // n0x0948 c0x0000 (---------------) + I com + 0x002349c3, // n0x0949 c0x0000 (---------------) + I edu + 0x00275003, // n0x094a c0x0000 (---------------) + I gov + 0x0038a144, // n0x094b c0x0000 (---------------) + I info + 0x0027ca84, // n0x094c c0x0000 (---------------) + I name + 0x0021d8c3, // n0x094d c0x0000 (---------------) + I net + 0x00229a83, // n0x094e c0x0000 (---------------) + I org + 0x0031e505, // n0x094f c0x0000 (---------------) + I aland + 0x000f5248, // n0x0950 c0x0000 (---------------) + blogspot + 0x0001eb43, // n0x0951 c0x0000 (---------------) + iki + 0x002bcb88, // n0x0952 c0x0000 (---------------) + I aeroport + 0x0034ca87, // n0x0953 c0x0000 (---------------) + I assedic + 0x002b1c44, // n0x0954 c0x0000 (---------------) + I asso + 0x0033aac6, // n0x0955 c0x0000 (---------------) + I avocat + 0x00342ac6, // n0x0956 c0x0000 (---------------) + I avoues + 0x000f5248, // n0x0957 c0x0000 (---------------) + blogspot + 0x00316483, // n0x0958 c0x0000 (---------------) + I cci + 0x003793c9, // n0x0959 c0x0000 (---------------) + I chambagri + 0x002ade55, // n0x095a c0x0000 (---------------) + I chirurgiens-dentistes + 0x0022edc3, // n0x095b c0x0000 (---------------) + I com + 0x002a8552, // n0x095c c0x0000 (---------------) + I experts-comptables + 0x002a830f, // n0x095d c0x0000 (---------------) + I geometre-expert + 0x002fa744, // n0x095e c0x0000 (---------------) + I gouv + 0x00215505, // n0x095f c0x0000 (---------------) + I greta + 0x002e81d0, // n0x0960 c0x0000 (---------------) + I huissier-justice + 0x0035abc7, // n0x0961 c0x0000 (---------------) + I medecin + 0x0020e543, // n0x0962 c0x0000 (---------------) + I nom + 0x00246408, // n0x0963 c0x0000 (---------------) + I notaires + 0x002d5a0a, // n0x0964 c0x0000 (---------------) + I pharmacien + 0x0023f504, // n0x0965 c0x0000 (---------------) + I port + 0x002da783, // n0x0966 c0x0000 (---------------) + I prd + 0x00240d06, // n0x0967 c0x0000 (---------------) + I presse + 0x00200142, // n0x0968 c0x0000 (---------------) + I tm + 0x003781cb, // n0x0969 c0x0000 (---------------) + I veterinaire + 0x0022edc3, // n0x096a c0x0000 (---------------) + I com + 0x002349c3, // n0x096b c0x0000 (---------------) + I edu + 0x00275003, // n0x096c c0x0000 (---------------) + I gov + 0x00215b43, // n0x096d c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x096e c0x0000 (---------------) + I net + 0x00229a83, // n0x096f c0x0000 (---------------) + I org + 0x002def03, // n0x0970 c0x0000 (---------------) + I pvt + 0x00208182, // n0x0971 c0x0000 (---------------) + I co + 0x0021d8c3, // n0x0972 c0x0000 (---------------) + I net + 0x00229a83, // n0x0973 c0x0000 (---------------) + I org + 0x0022edc3, // n0x0974 c0x0000 (---------------) + I com + 0x002349c3, // n0x0975 c0x0000 (---------------) + I edu + 0x00275003, // n0x0976 c0x0000 (---------------) + I gov + 0x00215b43, // n0x0977 c0x0000 (---------------) + I mil + 0x00229a83, // n0x0978 c0x0000 (---------------) + I org + 0x0022edc3, // n0x0979 c0x0000 (---------------) + I com + 0x002349c3, // n0x097a c0x0000 (---------------) + I edu + 0x00275003, // n0x097b c0x0000 (---------------) + I gov + 0x00342703, // n0x097c c0x0000 (---------------) + I ltd + 0x00210243, // n0x097d c0x0000 (---------------) + I mod + 0x00229a83, // n0x097e c0x0000 (---------------) + I org + 0x00208182, // n0x097f c0x0000 (---------------) + I co + 0x0022edc3, // n0x0980 c0x0000 (---------------) + I com + 0x002349c3, // n0x0981 c0x0000 (---------------) + I edu + 0x0021d8c3, // n0x0982 c0x0000 (---------------) + I net + 0x00229a83, // n0x0983 c0x0000 (---------------) + I org + 0x00205882, // n0x0984 c0x0000 (---------------) + I ac + 0x0022edc3, // n0x0985 c0x0000 (---------------) + I com + 0x002349c3, // n0x0986 c0x0000 (---------------) + I edu + 0x00275003, // n0x0987 c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x0988 c0x0000 (---------------) + I net + 0x00229a83, // n0x0989 c0x0000 (---------------) + I org + 0x002b1c44, // n0x098a c0x0000 (---------------) + I asso + 0x0022edc3, // n0x098b c0x0000 (---------------) + I com + 0x002349c3, // n0x098c c0x0000 (---------------) + I edu + 0x00207804, // n0x098d c0x0000 (---------------) + I mobi + 0x0021d8c3, // n0x098e c0x0000 (---------------) + I net + 0x00229a83, // n0x098f c0x0000 (---------------) + I org + 0x000f5248, // n0x0990 c0x0000 (---------------) + blogspot + 0x0022edc3, // n0x0991 c0x0000 (---------------) + I com + 0x002349c3, // n0x0992 c0x0000 (---------------) + I edu + 0x00275003, // n0x0993 c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x0994 c0x0000 (---------------) + I net + 0x00229a83, // n0x0995 c0x0000 (---------------) + I org + 0x0022edc3, // n0x0996 c0x0000 (---------------) + I com + 0x002349c3, // n0x0997 c0x0000 (---------------) + I edu + 0x00209f03, // n0x0998 c0x0000 (---------------) + I gob + 0x00202603, // n0x0999 c0x0000 (---------------) + I ind + 0x00215b43, // n0x099a c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x099b c0x0000 (---------------) + I net + 0x00229a83, // n0x099c c0x0000 (---------------) + I org + 0x00208182, // n0x099d c0x0000 (---------------) + I co + 0x0022edc3, // n0x099e c0x0000 (---------------) + I com + 0x0021d8c3, // n0x099f c0x0000 (---------------) + I net + 0x000f5248, // n0x09a0 c0x0000 (---------------) + blogspot + 0x0022edc3, // n0x09a1 c0x0000 (---------------) + I com + 0x002349c3, // n0x09a2 c0x0000 (---------------) + I edu + 0x00275003, // n0x09a3 c0x0000 (---------------) + I gov + 0x00306f03, // n0x09a4 c0x0000 (---------------) + I idv + 0x00061383, // n0x09a5 c0x0000 (---------------) + inc + 0x00142703, // n0x09a6 c0x0000 (---------------) + ltd + 0x0021d8c3, // n0x09a7 c0x0000 (---------------) + I net + 0x00229a83, // n0x09a8 c0x0000 (---------------) + I org + 0x002fac8a, // n0x09a9 c0x0000 (---------------) + I xn--55qx5d + 0x0031bfc9, // n0x09aa c0x0000 (---------------) + I xn--ciqpn + 0x003361cb, // n0x09ab c0x0000 (---------------) + I xn--gmq050i + 0x0033674a, // n0x09ac c0x0000 (---------------) + I xn--gmqw5a + 0x00340a0a, // n0x09ad c0x0000 (---------------) + I xn--io0a7i + 0x0034f6cb, // n0x09ae c0x0000 (---------------) + I xn--lcvr32d + 0x0036544a, // n0x09af c0x0000 (---------------) + I xn--mk0axi + 0x0036d74a, // n0x09b0 c0x0000 (---------------) + I xn--mxtq1m + 0x00372e8a, // n0x09b1 c0x0000 (---------------) + I xn--od0alg + 0x0037310b, // n0x09b2 c0x0000 (---------------) + I xn--od0aq3b + 0x0038d709, // n0x09b3 c0x0000 (---------------) + I xn--tn0ag + 0x0038f90a, // n0x09b4 c0x0000 (---------------) + I xn--uc0atv + 0x0038fe4b, // n0x09b5 c0x0000 (---------------) + I xn--uc0ay4a + 0x0039ba4b, // n0x09b6 c0x0000 (---------------) + I xn--wcvs22d + 0x003a23ca, // n0x09b7 c0x0000 (---------------) + I xn--zf0avx + 0x0022edc3, // n0x09b8 c0x0000 (---------------) + I com + 0x002349c3, // n0x09b9 c0x0000 (---------------) + I edu + 0x00209f03, // n0x09ba c0x0000 (---------------) + I gob + 0x00215b43, // n0x09bb c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x09bc c0x0000 (---------------) + I net + 0x00229a83, // n0x09bd c0x0000 (---------------) + I org + 0x000f5248, // n0x09be c0x0000 (---------------) + blogspot + 0x0022edc3, // n0x09bf c0x0000 (---------------) + I com + 0x0025afc4, // n0x09c0 c0x0000 (---------------) + I from + 0x00217542, // n0x09c1 c0x0000 (---------------) + I iz + 0x0027ca84, // n0x09c2 c0x0000 (---------------) + I name + 0x00299105, // n0x09c3 c0x0000 (---------------) + I adult + 0x002011c3, // n0x09c4 c0x0000 (---------------) + I art + 0x002b1c44, // n0x09c5 c0x0000 (---------------) + I asso + 0x0022edc3, // n0x09c6 c0x0000 (---------------) + I com + 0x00238284, // n0x09c7 c0x0000 (---------------) + I coop + 0x002349c3, // n0x09c8 c0x0000 (---------------) + I edu + 0x00247a04, // n0x09c9 c0x0000 (---------------) + I firm + 0x002fa744, // n0x09ca c0x0000 (---------------) + I gouv + 0x0038a144, // n0x09cb c0x0000 (---------------) + I info + 0x00211c43, // n0x09cc c0x0000 (---------------) + I med + 0x0021d8c3, // n0x09cd c0x0000 (---------------) + I net + 0x00229a83, // n0x09ce c0x0000 (---------------) + I org + 0x003372c5, // n0x09cf c0x0000 (---------------) + I perso + 0x002210c3, // n0x09d0 c0x0000 (---------------) + I pol + 0x00220283, // n0x09d1 c0x0000 (---------------) + I pro + 0x0020c043, // n0x09d2 c0x0000 (---------------) + I rel + 0x00332c44, // n0x09d3 c0x0000 (---------------) + I shop + 0x00226944, // n0x09d4 c0x0000 (---------------) + I 2000 + 0x00250605, // n0x09d5 c0x0000 (---------------) + I agrar + 0x000f5248, // n0x09d6 c0x0000 (---------------) + blogspot + 0x00208b44, // n0x09d7 c0x0000 (---------------) + I bolt + 0x00351546, // n0x09d8 c0x0000 (---------------) + I casino + 0x0027e804, // n0x09d9 c0x0000 (---------------) + I city + 0x00208182, // n0x09da c0x0000 (---------------) + I co + 0x00333307, // n0x09db c0x0000 (---------------) + I erotica + 0x00249a47, // n0x09dc c0x0000 (---------------) + I erotika + 0x00243ec4, // n0x09dd c0x0000 (---------------) + I film + 0x00253c85, // n0x09de c0x0000 (---------------) + I forum + 0x00318cc5, // n0x09df c0x0000 (---------------) + I games + 0x0022fac5, // n0x09e0 c0x0000 (---------------) + I hotel + 0x0038a144, // n0x09e1 c0x0000 (---------------) + I info + 0x0033d688, // n0x09e2 c0x0000 (---------------) + I ingatlan + 0x0020b886, // n0x09e3 c0x0000 (---------------) + I jogasz + 0x002cde48, // n0x09e4 c0x0000 (---------------) + I konyvelo + 0x00237ac5, // n0x09e5 c0x0000 (---------------) + I lakas + 0x002fb545, // n0x09e6 c0x0000 (---------------) + I media + 0x0021fe44, // n0x09e7 c0x0000 (---------------) + I news + 0x00229a83, // n0x09e8 c0x0000 (---------------) + I org + 0x002db244, // n0x09e9 c0x0000 (---------------) + I priv + 0x0034d5c6, // n0x09ea c0x0000 (---------------) + I reklam + 0x00240e03, // n0x09eb c0x0000 (---------------) + I sex + 0x00332c44, // n0x09ec c0x0000 (---------------) + I shop + 0x0028b685, // n0x09ed c0x0000 (---------------) + I sport + 0x002368c4, // n0x09ee c0x0000 (---------------) + I suli + 0x0037ff44, // n0x09ef c0x0000 (---------------) + I szex + 0x00200142, // n0x09f0 c0x0000 (---------------) + I tm + 0x00266846, // n0x09f1 c0x0000 (---------------) + I tozsde + 0x00384f86, // n0x09f2 c0x0000 (---------------) + I utazas + 0x002ea705, // n0x09f3 c0x0000 (---------------) + I video + 0x00205882, // n0x09f4 c0x0000 (---------------) + I ac + 0x0030a143, // n0x09f5 c0x0000 (---------------) + I biz + 0x1b608182, // n0x09f6 c0x006d (n0x09ff-n0x0a00) + I co + 0x002363c4, // n0x09f7 c0x0000 (---------------) + I desa + 0x00208502, // n0x09f8 c0x0000 (---------------) + I go + 0x00215b43, // n0x09f9 c0x0000 (---------------) + I mil + 0x0022a6c2, // n0x09fa c0x0000 (---------------) + I my + 0x0021d8c3, // n0x09fb c0x0000 (---------------) + I net + 0x00200282, // n0x09fc c0x0000 (---------------) + I or + 0x00215d43, // n0x09fd c0x0000 (---------------) + I sch + 0x0021fa83, // n0x09fe c0x0000 (---------------) + I web + 0x000f5248, // n0x09ff c0x0000 (---------------) + blogspot + 0x000f5248, // n0x0a00 c0x0000 (---------------) + blogspot + 0x00275003, // n0x0a01 c0x0000 (---------------) + I gov + 0x00205882, // n0x0a02 c0x0000 (---------------) + I ac + 0x1c208182, // n0x0a03 c0x0070 (n0x0a0a-n0x0a0b) + I co + 0x00275003, // n0x0a04 c0x0000 (---------------) + I gov + 0x00261003, // n0x0a05 c0x0000 (---------------) + I idf + 0x00324c03, // n0x0a06 c0x0000 (---------------) + I k12 + 0x0022f204, // n0x0a07 c0x0000 (---------------) + I muni + 0x0021d8c3, // n0x0a08 c0x0000 (---------------) + I net + 0x00229a83, // n0x0a09 c0x0000 (---------------) + I org + 0x000f5248, // n0x0a0a c0x0000 (---------------) + blogspot + 0x00205882, // n0x0a0b c0x0000 (---------------) + I ac + 0x1ca08182, // n0x0a0c c0x0072 (n0x0a12-n0x0a14) + I co + 0x0022edc3, // n0x0a0d c0x0000 (---------------) + I com + 0x0021d8c3, // n0x0a0e c0x0000 (---------------) + I net + 0x00229a83, // n0x0a0f c0x0000 (---------------) + I org + 0x0020a242, // n0x0a10 c0x0000 (---------------) + I tt + 0x00206fc2, // n0x0a11 c0x0000 (---------------) + I tv + 0x00342703, // n0x0a12 c0x0000 (---------------) + I ltd + 0x002d4b03, // n0x0a13 c0x0000 (---------------) + I plc + 0x00205882, // n0x0a14 c0x0000 (---------------) + I ac + 0x000f5248, // n0x0a15 c0x0000 (---------------) + blogspot + 0x00208182, // n0x0a16 c0x0000 (---------------) + I co + 0x002349c3, // n0x0a17 c0x0000 (---------------) + I edu + 0x00247a04, // n0x0a18 c0x0000 (---------------) + I firm + 0x00206243, // n0x0a19 c0x0000 (---------------) + I gen + 0x00275003, // n0x0a1a c0x0000 (---------------) + I gov + 0x00202603, // n0x0a1b c0x0000 (---------------) + I ind + 0x00215b43, // n0x0a1c c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x0a1d c0x0000 (---------------) + I net + 0x00217183, // n0x0a1e c0x0000 (---------------) + I nic + 0x00229a83, // n0x0a1f c0x0000 (---------------) + I org + 0x0021bfc3, // n0x0a20 c0x0000 (---------------) + I res + 0x0011dc93, // n0x0a21 c0x0000 (---------------) + barrel-of-knowledge + 0x0011f794, // n0x0a22 c0x0000 (---------------) + barrell-of-knowledge + 0x00011a06, // n0x0a23 c0x0000 (---------------) + dyndns + 0x0004e4c7, // n0x0a24 c0x0000 (---------------) + for-our + 0x0011af89, // n0x0a25 c0x0000 (---------------) + groks-the + 0x00029b0a, // n0x0a26 c0x0000 (---------------) + groks-this + 0x00080f4d, // n0x0a27 c0x0000 (---------------) + here-for-more + 0x000f088a, // n0x0a28 c0x0000 (---------------) + knowsitall + 0x00053986, // n0x0a29 c0x0000 (---------------) + selfip + 0x00123b06, // n0x0a2a c0x0000 (---------------) + webhop + 0x00224542, // n0x0a2b c0x0000 (---------------) + I eu + 0x0022edc3, // n0x0a2c c0x0000 (---------------) + I com + 0x000c8386, // n0x0a2d c0x0000 (---------------) + github + 0x0011b2c3, // n0x0a2e c0x0000 (---------------) + nid + 0x000145c8, // n0x0a2f c0x0000 (---------------) + pantheon + 0x000aa448, // n0x0a30 c0x0000 (---------------) + sandcats + 0x0022edc3, // n0x0a31 c0x0000 (---------------) + I com + 0x002349c3, // n0x0a32 c0x0000 (---------------) + I edu + 0x00275003, // n0x0a33 c0x0000 (---------------) + I gov + 0x00215b43, // n0x0a34 c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x0a35 c0x0000 (---------------) + I net + 0x00229a83, // n0x0a36 c0x0000 (---------------) + I org + 0x00205882, // n0x0a37 c0x0000 (---------------) + I ac + 0x00208182, // n0x0a38 c0x0000 (---------------) + I co + 0x00275003, // n0x0a39 c0x0000 (---------------) + I gov + 0x00205d82, // n0x0a3a c0x0000 (---------------) + I id + 0x0021d8c3, // n0x0a3b c0x0000 (---------------) + I net + 0x00229a83, // n0x0a3c c0x0000 (---------------) + I org + 0x00215d43, // n0x0a3d c0x0000 (---------------) + I sch + 0x0035830f, // n0x0a3e c0x0000 (---------------) + I xn--mgba3a4f16a + 0x003586ce, // n0x0a3f c0x0000 (---------------) + I xn--mgba3a4fra + 0x000f5248, // n0x0a40 c0x0000 (---------------) + blogspot + 0x0022edc3, // n0x0a41 c0x0000 (---------------) + I com + 0x00041947, // n0x0a42 c0x0000 (---------------) + cupcake + 0x002349c3, // n0x0a43 c0x0000 (---------------) + I edu + 0x00275003, // n0x0a44 c0x0000 (---------------) + I gov + 0x0026f683, // n0x0a45 c0x0000 (---------------) + I int + 0x0021d8c3, // n0x0a46 c0x0000 (---------------) + I net + 0x00229a83, // n0x0a47 c0x0000 (---------------) + I org + 0x0021b583, // n0x0a48 c0x0000 (---------------) + I abr + 0x00225ac7, // n0x0a49 c0x0000 (---------------) + I abruzzo + 0x00201002, // n0x0a4a c0x0000 (---------------) + I ag + 0x0038d8c9, // n0x0a4b c0x0000 (---------------) + I agrigento + 0x002001c2, // n0x0a4c c0x0000 (---------------) + I al + 0x0039878b, // n0x0a4d c0x0000 (---------------) + I alessandria + 0x002d920a, // n0x0a4e c0x0000 (---------------) + I alto-adige + 0x002dd509, // n0x0a4f c0x0000 (---------------) + I altoadige + 0x00200b42, // n0x0a50 c0x0000 (---------------) + I an + 0x0034c506, // n0x0a51 c0x0000 (---------------) + I ancona + 0x0026d795, // n0x0a52 c0x0000 (---------------) + I andria-barletta-trani + 0x003988d5, // n0x0a53 c0x0000 (---------------) + I andria-trani-barletta + 0x0039f193, // n0x0a54 c0x0000 (---------------) + I andriabarlettatrani + 0x00398e53, // n0x0a55 c0x0000 (---------------) + I andriatranibarletta + 0x00203042, // n0x0a56 c0x0000 (---------------) + I ao + 0x00213e05, // n0x0a57 c0x0000 (---------------) + I aosta + 0x0039d64c, // n0x0a58 c0x0000 (---------------) + I aosta-valley + 0x00213e0b, // n0x0a59 c0x0000 (---------------) + I aostavalley + 0x0023b085, // n0x0a5a c0x0000 (---------------) + I aoste + 0x002136c2, // n0x0a5b c0x0000 (---------------) + I ap + 0x00229802, // n0x0a5c c0x0000 (---------------) + I aq + 0x00369a86, // n0x0a5d c0x0000 (---------------) + I aquila + 0x002011c2, // n0x0a5e c0x0000 (---------------) + I ar + 0x0027c6c6, // n0x0a5f c0x0000 (---------------) + I arezzo + 0x0038bf0d, // n0x0a60 c0x0000 (---------------) + I ascoli-piceno + 0x00347f8c, // n0x0a61 c0x0000 (---------------) + I ascolipiceno + 0x0023a8c4, // n0x0a62 c0x0000 (---------------) + I asti + 0x00200102, // n0x0a63 c0x0000 (---------------) + I at + 0x00200602, // n0x0a64 c0x0000 (---------------) + I av + 0x00217b08, // n0x0a65 c0x0000 (---------------) + I avellino + 0x00203002, // n0x0a66 c0x0000 (---------------) + I ba + 0x0024c946, // n0x0a67 c0x0000 (---------------) + I balsan + 0x003084c4, // n0x0a68 c0x0000 (---------------) + I bari + 0x0026d955, // n0x0a69 c0x0000 (---------------) + I barletta-trani-andria + 0x0039f313, // n0x0a6a c0x0000 (---------------) + I barlettatraniandria + 0x0020f5c3, // n0x0a6b c0x0000 (---------------) + I bas + 0x0032b30a, // n0x0a6c c0x0000 (---------------) + I basilicata + 0x002ffc47, // n0x0a6d c0x0000 (---------------) + I belluno + 0x0027fc89, // n0x0a6e c0x0000 (---------------) + I benevento + 0x0022d307, // n0x0a6f c0x0000 (---------------) + I bergamo + 0x00226882, // n0x0a70 c0x0000 (---------------) + I bg + 0x00200002, // n0x0a71 c0x0000 (---------------) + I bi + 0x003a18c6, // n0x0a72 c0x0000 (---------------) + I biella + 0x00208dc2, // n0x0a73 c0x0000 (---------------) + I bl + 0x000f5248, // n0x0a74 c0x0000 (---------------) + blogspot + 0x0020f402, // n0x0a75 c0x0000 (---------------) + I bn + 0x00206dc2, // n0x0a76 c0x0000 (---------------) + I bo + 0x0037f447, // n0x0a77 c0x0000 (---------------) + I bologna + 0x00210e87, // n0x0a78 c0x0000 (---------------) + I bolzano + 0x0021a805, // n0x0a79 c0x0000 (---------------) + I bozen + 0x0020bb42, // n0x0a7a c0x0000 (---------------) + I br + 0x0021bf87, // n0x0a7b c0x0000 (---------------) + I brescia + 0x0021c148, // n0x0a7c c0x0000 (---------------) + I brindisi + 0x002311c2, // n0x0a7d c0x0000 (---------------) + I bs + 0x0021d7c2, // n0x0a7e c0x0000 (---------------) + I bt + 0x0022b202, // n0x0a7f c0x0000 (---------------) + I bz + 0x00200302, // n0x0a80 c0x0000 (---------------) + I ca + 0x0030e148, // n0x0a81 c0x0000 (---------------) + I cagliari + 0x00217203, // n0x0a82 c0x0000 (---------------) + I cal + 0x0024c588, // n0x0a83 c0x0000 (---------------) + I calabria + 0x00234fcd, // n0x0a84 c0x0000 (---------------) + I caltanissetta + 0x0021fb43, // n0x0a85 c0x0000 (---------------) + I cam + 0x00306ac8, // n0x0a86 c0x0000 (---------------) + I campania + 0x0023bf4f, // n0x0a87 c0x0000 (---------------) + I campidano-medio + 0x0023c30e, // n0x0a88 c0x0000 (---------------) + I campidanomedio + 0x0032ffca, // n0x0a89 c0x0000 (---------------) + I campobasso + 0x002e5191, // n0x0a8a c0x0000 (---------------) + I carbonia-iglesias + 0x002e5610, // n0x0a8b c0x0000 (---------------) + I carboniaiglesias + 0x002ac2cd, // n0x0a8c c0x0000 (---------------) + I carrara-massa + 0x002ac60c, // n0x0a8d c0x0000 (---------------) + I carraramassa + 0x00212ec7, // n0x0a8e c0x0000 (---------------) + I caserta + 0x0032b487, // n0x0a8f c0x0000 (---------------) + I catania + 0x0033ab89, // n0x0a90 c0x0000 (---------------) + I catanzaro + 0x00226842, // n0x0a91 c0x0000 (---------------) + I cb + 0x00202ec2, // n0x0a92 c0x0000 (---------------) + I ce + 0x00250b8c, // n0x0a93 c0x0000 (---------------) + I cesena-forli + 0x00250e8b, // n0x0a94 c0x0000 (---------------) + I cesenaforli + 0x002058c2, // n0x0a95 c0x0000 (---------------) + I ch + 0x002ee146, // n0x0a96 c0x0000 (---------------) + I chieti + 0x002080c2, // n0x0a97 c0x0000 (---------------) + I ci + 0x00202502, // n0x0a98 c0x0000 (---------------) + I cl + 0x0021a142, // n0x0a99 c0x0000 (---------------) + I cn + 0x00208182, // n0x0a9a c0x0000 (---------------) + I co + 0x0022f504, // n0x0a9b c0x0000 (---------------) + I como + 0x0023b6c7, // n0x0a9c c0x0000 (---------------) + I cosenza + 0x00211e82, // n0x0a9d c0x0000 (---------------) + I cr + 0x0023e647, // n0x0a9e c0x0000 (---------------) + I cremona + 0x0023f307, // n0x0a9f c0x0000 (---------------) + I crotone + 0x0020dcc2, // n0x0aa0 c0x0000 (---------------) + I cs + 0x0021e002, // n0x0aa1 c0x0000 (---------------) + I ct + 0x00241805, // n0x0aa2 c0x0000 (---------------) + I cuneo + 0x00233fc2, // n0x0aa3 c0x0000 (---------------) + I cz + 0x0025318e, // n0x0aa4 c0x0000 (---------------) + I dell-ogliastra + 0x0025f50d, // n0x0aa5 c0x0000 (---------------) + I dellogliastra + 0x002349c3, // n0x0aa6 c0x0000 (---------------) + I edu + 0x0030310e, // n0x0aa7 c0x0000 (---------------) + I emilia-romagna + 0x0027b14d, // n0x0aa8 c0x0000 (---------------) + I emiliaromagna + 0x0035dc03, // n0x0aa9 c0x0000 (---------------) + I emr + 0x00201d82, // n0x0aaa c0x0000 (---------------) + I en + 0x00279884, // n0x0aab c0x0000 (---------------) + I enna + 0x00242e02, // n0x0aac c0x0000 (---------------) + I fc + 0x00200382, // n0x0aad c0x0000 (---------------) + I fe + 0x002d2285, // n0x0aae c0x0000 (---------------) + I fermo + 0x002dbb47, // n0x0aaf c0x0000 (---------------) + I ferrara + 0x00347402, // n0x0ab0 c0x0000 (---------------) + I fg + 0x0020e002, // n0x0ab1 c0x0000 (---------------) + I fi + 0x00247347, // n0x0ab2 c0x0000 (---------------) + I firenze + 0x0024acc8, // n0x0ab3 c0x0000 (---------------) + I florence + 0x0023d4c2, // n0x0ab4 c0x0000 (---------------) + I fm + 0x0038a1c6, // n0x0ab5 c0x0000 (---------------) + I foggia + 0x00250a0c, // n0x0ab6 c0x0000 (---------------) + I forli-cesena + 0x00250d4b, // n0x0ab7 c0x0000 (---------------) + I forlicesena + 0x00207fc2, // n0x0ab8 c0x0000 (---------------) + I fr + 0x0025774f, // n0x0ab9 c0x0000 (---------------) + I friuli-v-giulia + 0x00257b10, // n0x0aba c0x0000 (---------------) + I friuli-ve-giulia + 0x00257f0f, // n0x0abb c0x0000 (---------------) + I friuli-vegiulia + 0x002582d5, // n0x0abc c0x0000 (---------------) + I friuli-venezia-giulia + 0x00258814, // n0x0abd c0x0000 (---------------) + I friuli-veneziagiulia + 0x00258d0e, // n0x0abe c0x0000 (---------------) + I friuli-vgiulia + 0x0025908e, // n0x0abf c0x0000 (---------------) + I friuliv-giulia + 0x0025940f, // n0x0ac0 c0x0000 (---------------) + I friulive-giulia + 0x002597ce, // n0x0ac1 c0x0000 (---------------) + I friulivegiulia + 0x00259b54, // n0x0ac2 c0x0000 (---------------) + I friulivenezia-giulia + 0x0025a053, // n0x0ac3 c0x0000 (---------------) + I friuliveneziagiulia + 0x0025a50d, // n0x0ac4 c0x0000 (---------------) + I friulivgiulia + 0x0026eb09, // n0x0ac5 c0x0000 (---------------) + I frosinone + 0x00281c83, // n0x0ac6 c0x0000 (---------------) + I fvg + 0x00203982, // n0x0ac7 c0x0000 (---------------) + I ge + 0x00307a85, // n0x0ac8 c0x0000 (---------------) + I genoa + 0x00206246, // n0x0ac9 c0x0000 (---------------) + I genova + 0x00208502, // n0x0aca c0x0000 (---------------) + I go + 0x00372cc7, // n0x0acb c0x0000 (---------------) + I gorizia + 0x00275003, // n0x0acc c0x0000 (---------------) + I gov + 0x002089c2, // n0x0acd c0x0000 (---------------) + I gr + 0x00330d88, // n0x0ace c0x0000 (---------------) + I grosseto + 0x002e53d1, // n0x0acf c0x0000 (---------------) + I iglesias-carbonia + 0x002e5810, // n0x0ad0 c0x0000 (---------------) + I iglesiascarbonia + 0x00207242, // n0x0ad1 c0x0000 (---------------) + I im + 0x00234447, // n0x0ad2 c0x0000 (---------------) + I imperia + 0x00201a02, // n0x0ad3 c0x0000 (---------------) + I is + 0x00342947, // n0x0ad4 c0x0000 (---------------) + I isernia + 0x002076c2, // n0x0ad5 c0x0000 (---------------) + I kr + 0x002bc989, // n0x0ad6 c0x0000 (---------------) + I la-spezia + 0x00369a47, // n0x0ad7 c0x0000 (---------------) + I laquila + 0x00257348, // n0x0ad8 c0x0000 (---------------) + I laspezia + 0x00222846, // n0x0ad9 c0x0000 (---------------) + I latina + 0x002d4a03, // n0x0ada c0x0000 (---------------) + I laz + 0x003021c5, // n0x0adb c0x0000 (---------------) + I lazio + 0x00234c42, // n0x0adc c0x0000 (---------------) + I lc + 0x0020a5c2, // n0x0add c0x0000 (---------------) + I le + 0x003a1cc5, // n0x0ade c0x0000 (---------------) + I lecce + 0x0021db05, // n0x0adf c0x0000 (---------------) + I lecco + 0x002019c2, // n0x0ae0 c0x0000 (---------------) + I li + 0x00236943, // n0x0ae1 c0x0000 (---------------) + I lig + 0x00236947, // n0x0ae2 c0x0000 (---------------) + I liguria + 0x002112c7, // n0x0ae3 c0x0000 (---------------) + I livorno + 0x00200242, // n0x0ae4 c0x0000 (---------------) + I lo + 0x00252bc4, // n0x0ae5 c0x0000 (---------------) + I lodi + 0x00212bc3, // n0x0ae6 c0x0000 (---------------) + I lom + 0x002c1249, // n0x0ae7 c0x0000 (---------------) + I lombardia + 0x002d5348, // n0x0ae8 c0x0000 (---------------) + I lombardy + 0x00208bc2, // n0x0ae9 c0x0000 (---------------) + I lt + 0x00202542, // n0x0aea c0x0000 (---------------) + I lu + 0x002a5e47, // n0x0aeb c0x0000 (---------------) + I lucania + 0x002a9245, // n0x0aec c0x0000 (---------------) + I lucca + 0x003065c8, // n0x0aed c0x0000 (---------------) + I macerata + 0x00244f87, // n0x0aee c0x0000 (---------------) + I mantova + 0x00201183, // n0x0aef c0x0000 (---------------) + I mar + 0x0027f3c6, // n0x0af0 c0x0000 (---------------) + I marche + 0x002ac14d, // n0x0af1 c0x0000 (---------------) + I massa-carrara + 0x002ac4cc, // n0x0af2 c0x0000 (---------------) + I massacarrara + 0x0024fdc6, // n0x0af3 c0x0000 (---------------) + I matera + 0x00205482, // n0x0af4 c0x0000 (---------------) + I mb + 0x002d2e42, // n0x0af5 c0x0000 (---------------) + I mc + 0x00202302, // n0x0af6 c0x0000 (---------------) + I me + 0x0023bdcf, // n0x0af7 c0x0000 (---------------) + I medio-campidano + 0x0023c1ce, // n0x0af8 c0x0000 (---------------) + I mediocampidano + 0x00318d47, // n0x0af9 c0x0000 (---------------) + I messina + 0x0020e5c2, // n0x0afa c0x0000 (---------------) + I mi + 0x00304a85, // n0x0afb c0x0000 (---------------) + I milan + 0x00304a86, // n0x0afc c0x0000 (---------------) + I milano + 0x0021d882, // n0x0afd c0x0000 (---------------) + I mn + 0x00203ec2, // n0x0afe c0x0000 (---------------) + I mo + 0x00210246, // n0x0aff c0x0000 (---------------) + I modena + 0x00256ac3, // n0x0b00 c0x0000 (---------------) + I mol + 0x00342886, // n0x0b01 c0x0000 (---------------) + I molise + 0x002bfe45, // n0x0b02 c0x0000 (---------------) + I monza + 0x002bfe4d, // n0x0b03 c0x0000 (---------------) + I monza-brianza + 0x002c0695, // n0x0b04 c0x0000 (---------------) + I monza-e-della-brianza + 0x002c0e4c, // n0x0b05 c0x0000 (---------------) + I monzabrianza + 0x002c1a0d, // n0x0b06 c0x0000 (---------------) + I monzaebrianza + 0x002c1dd2, // n0x0b07 c0x0000 (---------------) + I monzaedellabrianza + 0x00202482, // n0x0b08 c0x0000 (---------------) + I ms + 0x00235702, // n0x0b09 c0x0000 (---------------) + I mt + 0x002005c2, // n0x0b0a c0x0000 (---------------) + I na + 0x0039c386, // n0x0b0b c0x0000 (---------------) + I naples + 0x00298806, // n0x0b0c c0x0000 (---------------) + I napoli + 0x00200d82, // n0x0b0d c0x0000 (---------------) + I no + 0x002062c6, // n0x0b0e c0x0000 (---------------) + I novara + 0x00209702, // n0x0b0f c0x0000 (---------------) + I nu + 0x00395345, // n0x0b10 c0x0000 (---------------) + I nuoro + 0x00201602, // n0x0b11 c0x0000 (---------------) + I og + 0x002532c9, // n0x0b12 c0x0000 (---------------) + I ogliastra + 0x0026794c, // n0x0b13 c0x0000 (---------------) + I olbia-tempio + 0x00267c8b, // n0x0b14 c0x0000 (---------------) + I olbiatempio + 0x00200282, // n0x0b15 c0x0000 (---------------) + I or + 0x0024b108, // n0x0b16 c0x0000 (---------------) + I oristano + 0x00200902, // n0x0b17 c0x0000 (---------------) + I ot + 0x0020ec42, // n0x0b18 c0x0000 (---------------) + I pa + 0x00213bc6, // n0x0b19 c0x0000 (---------------) + I padova + 0x0035e585, // n0x0b1a c0x0000 (---------------) + I padua + 0x0020ec47, // n0x0b1b c0x0000 (---------------) + I palermo + 0x0026e805, // n0x0b1c c0x0000 (---------------) + I parma + 0x002ca345, // n0x0b1d c0x0000 (---------------) + I pavia + 0x002419c2, // n0x0b1e c0x0000 (---------------) + I pc + 0x00332d42, // n0x0b1f c0x0000 (---------------) + I pd + 0x00209a02, // n0x0b20 c0x0000 (---------------) + I pe + 0x00254fc7, // n0x0b21 c0x0000 (---------------) + I perugia + 0x0022700d, // n0x0b22 c0x0000 (---------------) + I pesaro-urbino + 0x0022738c, // n0x0b23 c0x0000 (---------------) + I pesarourbino + 0x00265d47, // n0x0b24 c0x0000 (---------------) + I pescara + 0x00308882, // n0x0b25 c0x0000 (---------------) + I pg + 0x00209102, // n0x0b26 c0x0000 (---------------) + I pi + 0x00338508, // n0x0b27 c0x0000 (---------------) + I piacenza + 0x00251248, // n0x0b28 c0x0000 (---------------) + I piedmont + 0x002d1148, // n0x0b29 c0x0000 (---------------) + I piemonte + 0x002d8cc4, // n0x0b2a c0x0000 (---------------) + I pisa + 0x002ee507, // n0x0b2b c0x0000 (---------------) + I pistoia + 0x002d7083, // n0x0b2c c0x0000 (---------------) + I pmn + 0x002a98c2, // n0x0b2d c0x0000 (---------------) + I pn + 0x00200c42, // n0x0b2e c0x0000 (---------------) + I po + 0x002d9489, // n0x0b2f c0x0000 (---------------) + I pordenone + 0x00245b87, // n0x0b30 c0x0000 (---------------) + I potenza + 0x00204382, // n0x0b31 c0x0000 (---------------) + I pr + 0x00269885, // n0x0b32 c0x0000 (---------------) + I prato + 0x002835c2, // n0x0b33 c0x0000 (---------------) + I pt + 0x00230482, // n0x0b34 c0x0000 (---------------) + I pu + 0x002711c3, // n0x0b35 c0x0000 (---------------) + I pug + 0x002711c6, // n0x0b36 c0x0000 (---------------) + I puglia + 0x002def02, // n0x0b37 c0x0000 (---------------) + I pv + 0x002df302, // n0x0b38 c0x0000 (---------------) + I pz + 0x00200482, // n0x0b39 c0x0000 (---------------) + I ra + 0x002bd286, // n0x0b3a c0x0000 (---------------) + I ragusa + 0x002a7a87, // n0x0b3b c0x0000 (---------------) + I ravenna + 0x002002c2, // n0x0b3c c0x0000 (---------------) + I rc + 0x00204d82, // n0x0b3d c0x0000 (---------------) + I re + 0x0034cecf, // n0x0b3e c0x0000 (---------------) + I reggio-calabria + 0x00302f4d, // n0x0b3f c0x0000 (---------------) + I reggio-emilia + 0x0024c40e, // n0x0b40 c0x0000 (---------------) + I reggiocalabria + 0x0027afcc, // n0x0b41 c0x0000 (---------------) + I reggioemilia + 0x00205542, // n0x0b42 c0x0000 (---------------) + I rg + 0x00201702, // n0x0b43 c0x0000 (---------------) + I ri + 0x00222685, // n0x0b44 c0x0000 (---------------) + I rieti + 0x002f8086, // n0x0b45 c0x0000 (---------------) + I rimini + 0x0020ed42, // n0x0b46 c0x0000 (---------------) + I rm + 0x00201902, // n0x0b47 c0x0000 (---------------) + I rn + 0x00200cc2, // n0x0b48 c0x0000 (---------------) + I ro + 0x00227784, // n0x0b49 c0x0000 (---------------) + I roma + 0x002dc984, // n0x0b4a c0x0000 (---------------) + I rome + 0x0032edc6, // n0x0b4b c0x0000 (---------------) + I rovigo + 0x00202402, // n0x0b4c c0x0000 (---------------) + I sa + 0x0027ba07, // n0x0b4d c0x0000 (---------------) + I salerno + 0x00220b83, // n0x0b4e c0x0000 (---------------) + I sar + 0x00223288, // n0x0b4f c0x0000 (---------------) + I sardegna + 0x00223c08, // n0x0b50 c0x0000 (---------------) + I sardinia + 0x00330387, // n0x0b51 c0x0000 (---------------) + I sassari + 0x0039c286, // n0x0b52 c0x0000 (---------------) + I savona + 0x0020ca82, // n0x0b53 c0x0000 (---------------) + I si + 0x00239f03, // n0x0b54 c0x0000 (---------------) + I sic + 0x002971c7, // n0x0b55 c0x0000 (---------------) + I sicilia + 0x0024bf86, // n0x0b56 c0x0000 (---------------) + I sicily + 0x002b8bc5, // n0x0b57 c0x0000 (---------------) + I siena + 0x003405c8, // n0x0b58 c0x0000 (---------------) + I siracusa + 0x00204c82, // n0x0b59 c0x0000 (---------------) + I so + 0x00310c07, // n0x0b5a c0x0000 (---------------) + I sondrio + 0x0021ff02, // n0x0b5b c0x0000 (---------------) + I sp + 0x00336d82, // n0x0b5c c0x0000 (---------------) + I sr + 0x00206982, // n0x0b5d c0x0000 (---------------) + I ss + 0x002cb789, // n0x0b5e c0x0000 (---------------) + I suedtirol + 0x0020ee82, // n0x0b5f c0x0000 (---------------) + I sv + 0x00201242, // n0x0b60 c0x0000 (---------------) + I ta + 0x00265fc3, // n0x0b61 c0x0000 (---------------) + I taa + 0x00324807, // n0x0b62 c0x0000 (---------------) + I taranto + 0x002012c2, // n0x0b63 c0x0000 (---------------) + I te + 0x00267acc, // n0x0b64 c0x0000 (---------------) + I tempio-olbia + 0x00267dcb, // n0x0b65 c0x0000 (---------------) + I tempioolbia + 0x0024fe46, // n0x0b66 c0x0000 (---------------) + I teramo + 0x0031b205, // n0x0b67 c0x0000 (---------------) + I terni + 0x00200942, // n0x0b68 c0x0000 (---------------) + I tn + 0x00207442, // n0x0b69 c0x0000 (---------------) + I to + 0x002abe46, // n0x0b6a c0x0000 (---------------) + I torino + 0x00242a83, // n0x0b6b c0x0000 (---------------) + I tos + 0x00321687, // n0x0b6c c0x0000 (---------------) + I toscana + 0x00214582, // n0x0b6d c0x0000 (---------------) + I tp + 0x00203642, // n0x0b6e c0x0000 (---------------) + I tr + 0x0026d615, // n0x0b6f c0x0000 (---------------) + I trani-andria-barletta + 0x00398a95, // n0x0b70 c0x0000 (---------------) + I trani-barletta-andria + 0x0039f053, // n0x0b71 c0x0000 (---------------) + I traniandriabarletta + 0x00398fd3, // n0x0b72 c0x0000 (---------------) + I tranibarlettaandria + 0x0028b787, // n0x0b73 c0x0000 (---------------) + I trapani + 0x002b52c8, // n0x0b74 c0x0000 (---------------) + I trentino + 0x00344190, // n0x0b75 c0x0000 (---------------) + I trentino-a-adige + 0x002e3c0f, // n0x0b76 c0x0000 (---------------) + I trentino-aadige + 0x00340f53, // n0x0b77 c0x0000 (---------------) + I trentino-alto-adige + 0x0034a792, // n0x0b78 c0x0000 (---------------) + I trentino-altoadige + 0x002ce090, // n0x0b79 c0x0000 (---------------) + I trentino-s-tirol + 0x002f938f, // n0x0b7a c0x0000 (---------------) + I trentino-stirol + 0x002b52d2, // n0x0b7b c0x0000 (---------------) + I trentino-sud-tirol + 0x002bfa11, // n0x0b7c c0x0000 (---------------) + I trentino-sudtirol + 0x002c8793, // n0x0b7d c0x0000 (---------------) + I trentino-sued-tirol + 0x002cb552, // n0x0b7e c0x0000 (---------------) + I trentino-suedtirol + 0x002cc38f, // n0x0b7f c0x0000 (---------------) + I trentinoa-adige + 0x002d0b4e, // n0x0b80 c0x0000 (---------------) + I trentinoaadige + 0x002d9012, // n0x0b81 c0x0000 (---------------) + I trentinoalto-adige + 0x002dd311, // n0x0b82 c0x0000 (---------------) + I trentinoaltoadige + 0x002ddb0f, // n0x0b83 c0x0000 (---------------) + I trentinos-tirol + 0x002def8e, // n0x0b84 c0x0000 (---------------) + I trentinostirol + 0x002df691, // n0x0b85 c0x0000 (---------------) + I trentinosud-tirol + 0x00315210, // n0x0b86 c0x0000 (---------------) + I trentinosudtirol + 0x00353c12, // n0x0b87 c0x0000 (---------------) + I trentinosued-tirol + 0x002e1b11, // n0x0b88 c0x0000 (---------------) + I trentinosuedtirol + 0x002f0046, // n0x0b89 c0x0000 (---------------) + I trento + 0x002ef307, // n0x0b8a c0x0000 (---------------) + I treviso + 0x003657c7, // n0x0b8b c0x0000 (---------------) + I trieste + 0x002023c2, // n0x0b8c c0x0000 (---------------) + I ts + 0x002770c5, // n0x0b8d c0x0000 (---------------) + I turin + 0x002e7f47, // n0x0b8e c0x0000 (---------------) + I tuscany + 0x00206fc2, // n0x0b8f c0x0000 (---------------) + I tv + 0x00204fc2, // n0x0b90 c0x0000 (---------------) + I ud + 0x00226bc5, // n0x0b91 c0x0000 (---------------) + I udine + 0x0021cac3, // n0x0b92 c0x0000 (---------------) + I umb + 0x00250886, // n0x0b93 c0x0000 (---------------) + I umbria + 0x002271cd, // n0x0b94 c0x0000 (---------------) + I urbino-pesaro + 0x0022750c, // n0x0b95 c0x0000 (---------------) + I urbinopesaro + 0x002000c2, // n0x0b96 c0x0000 (---------------) + I va + 0x0039d4cb, // n0x0b97 c0x0000 (---------------) + I val-d-aosta + 0x00213cca, // n0x0b98 c0x0000 (---------------) + I val-daosta + 0x00317a8a, // n0x0b99 c0x0000 (---------------) + I vald-aosta + 0x002ab089, // n0x0b9a c0x0000 (---------------) + I valdaosta + 0x002d7f4b, // n0x0b9b c0x0000 (---------------) + I valle-aosta + 0x002e864d, // n0x0b9c c0x0000 (---------------) + I valle-d-aosta + 0x002450cc, // n0x0b9d c0x0000 (---------------) + I valle-daosta + 0x00217d8a, // n0x0b9e c0x0000 (---------------) + I valleaosta + 0x00220d0c, // n0x0b9f c0x0000 (---------------) + I valled-aosta + 0x00338f4b, // n0x0ba0 c0x0000 (---------------) + I valledaosta + 0x00376a8c, // n0x0ba1 c0x0000 (---------------) + I vallee-aoste + 0x0023af0b, // n0x0ba2 c0x0000 (---------------) + I valleeaoste + 0x002678c3, // n0x0ba3 c0x0000 (---------------) + I vao + 0x0026e546, // n0x0ba4 c0x0000 (---------------) + I varese + 0x002d68c2, // n0x0ba5 c0x0000 (---------------) + I vb + 0x002dfb02, // n0x0ba6 c0x0000 (---------------) + I vc + 0x00211203, // n0x0ba7 c0x0000 (---------------) + I vda + 0x00202202, // n0x0ba8 c0x0000 (---------------) + I ve + 0x00203203, // n0x0ba9 c0x0000 (---------------) + I ven + 0x00366906, // n0x0baa c0x0000 (---------------) + I veneto + 0x00258487, // n0x0bab c0x0000 (---------------) + I venezia + 0x0023ce06, // n0x0bac c0x0000 (---------------) + I venice + 0x0022b008, // n0x0bad c0x0000 (---------------) + I verbania + 0x002cd988, // n0x0bae c0x0000 (---------------) + I vercelli + 0x00207006, // n0x0baf c0x0000 (---------------) + I verona + 0x00200642, // n0x0bb0 c0x0000 (---------------) + I vi + 0x002ea0cd, // n0x0bb1 c0x0000 (---------------) + I vibo-valentia + 0x002ea40c, // n0x0bb2 c0x0000 (---------------) + I vibovalentia + 0x002fa807, // n0x0bb3 c0x0000 (---------------) + I vicenza + 0x002f06c7, // n0x0bb4 c0x0000 (---------------) + I viterbo + 0x00208342, // n0x0bb5 c0x0000 (---------------) + I vr + 0x00238c02, // n0x0bb6 c0x0000 (---------------) + I vs + 0x00255c42, // n0x0bb7 c0x0000 (---------------) + I vt + 0x0025c902, // n0x0bb8 c0x0000 (---------------) + I vv + 0x00208182, // n0x0bb9 c0x0000 (---------------) + I co + 0x0021d8c3, // n0x0bba c0x0000 (---------------) + I net + 0x00229a83, // n0x0bbb c0x0000 (---------------) + I org + 0x0022edc3, // n0x0bbc c0x0000 (---------------) + I com + 0x002349c3, // n0x0bbd c0x0000 (---------------) + I edu + 0x00275003, // n0x0bbe c0x0000 (---------------) + I gov + 0x00215b43, // n0x0bbf c0x0000 (---------------) + I mil + 0x0027ca84, // n0x0bc0 c0x0000 (---------------) + I name + 0x0021d8c3, // n0x0bc1 c0x0000 (---------------) + I net + 0x00229a83, // n0x0bc2 c0x0000 (---------------) + I org + 0x00215d43, // n0x0bc3 c0x0000 (---------------) + I sch + 0x00205882, // n0x0bc4 c0x0000 (---------------) + I ac + 0x00203d82, // n0x0bc5 c0x0000 (---------------) + I ad + 0x1fa86b45, // n0x0bc6 c0x007e (n0x0c33-n0x0c67) + I aichi + 0x1fe1e685, // n0x0bc7 c0x007f (n0x0c67-n0x0c83) + I akita + 0x2030adc6, // n0x0bc8 c0x0080 (n0x0c83-n0x0c99) + I aomori + 0x000f5248, // n0x0bc9 c0x0000 (---------------) + blogspot + 0x206a7685, // n0x0bca c0x0081 (n0x0c99-n0x0cd3) + I chiba + 0x00208182, // n0x0bcb c0x0000 (---------------) + I co + 0x002003c2, // n0x0bcc c0x0000 (---------------) + I ed + 0x20b1ac45, // n0x0bcd c0x0082 (n0x0cd3-n0x0ce9) + I ehime + 0x20e75605, // n0x0bce c0x0083 (n0x0ce9-n0x0cf8) + I fukui + 0x21276447, // n0x0bcf c0x0084 (n0x0cf8-n0x0d37) + I fukuoka + 0x2167f209, // n0x0bd0 c0x0085 (n0x0d37-n0x0d6a) + I fukushima + 0x21aa4d04, // n0x0bd1 c0x0086 (n0x0d6a-n0x0d90) + I gifu + 0x00208502, // n0x0bd2 c0x0000 (---------------) + I go + 0x002089c2, // n0x0bd3 c0x0000 (---------------) + I gr + 0x21f47445, // n0x0bd4 c0x0087 (n0x0d90-n0x0db4) + I gunma + 0x2220cc49, // n0x0bd5 c0x0088 (n0x0db4-n0x0dcd) + I hiroshima + 0x22768608, // n0x0bd6 c0x0089 (n0x0dcd-n0x0e5b) + I hokkaido + 0x22aa35c5, // n0x0bd7 c0x008a (n0x0e5b-n0x0e89) + I hyogo + 0x22ebebc7, // n0x0bd8 c0x008b (n0x0e89-n0x0ebc) + I ibaraki + 0x2321af48, // n0x0bd9 c0x008c (n0x0ebc-n0x0ecf) + I ishikawa + 0x236d2505, // n0x0bda c0x008d (n0x0ecf-n0x0ef1) + I iwate + 0x23a00fc6, // n0x0bdb c0x008e (n0x0ef1-n0x0f00) + I kagawa + 0x23ec3e09, // n0x0bdc c0x008f (n0x0f00-n0x0f14) + I kagoshima + 0x242c8d08, // n0x0bdd c0x0090 (n0x0f14-n0x0f32) + I kanagawa + 0x246b3b88, // n0x0bde c0x0091 (n0x0f32-n0x0f33)* o I kawasaki + 0x24a93eca, // n0x0bdf c0x0092 (n0x0f33-n0x0f34)* o I kitakyushu + 0x24e437c4, // n0x0be0 c0x0093 (n0x0f34-n0x0f35)* o I kobe + 0x252c8f85, // n0x0be1 c0x0094 (n0x0f35-n0x0f54) + I kochi + 0x256b0408, // n0x0be2 c0x0095 (n0x0f54-n0x0f6e) + I kumamoto + 0x25ab8805, // n0x0be3 c0x0096 (n0x0f6e-n0x0f8d) + I kyoto + 0x00217282, // n0x0be4 c0x0000 (---------------) + I lg + 0x25e18d43, // n0x0be5 c0x0097 (n0x0f8d-n0x0fab) + I mie + 0x2629a146, // n0x0be6 c0x0098 (n0x0fab-n0x0fcc) + I miyagi + 0x2665d308, // n0x0be7 c0x0099 (n0x0fcc-n0x0fe7) + I miyazaki + 0x26b0f1c6, // n0x0be8 c0x009a (n0x0fe7-n0x1032) + I nagano + 0x26ecd608, // n0x0be9 c0x009b (n0x1032-n0x1048) + I nagasaki + 0x2722d886, // n0x0bea c0x009c (n0x1048-n0x1049)* o I nagoya + 0x276b8c84, // n0x0beb c0x009d (n0x1049-n0x106f) + I nara + 0x00203282, // n0x0bec c0x0000 (---------------) + I ne + 0x27b6b607, // n0x0bed c0x009e (n0x106f-n0x1091) + I niigata + 0x27e9ed44, // n0x0bee c0x009f (n0x1091-n0x10a4) + I oita + 0x28271747, // n0x0bef c0x00a0 (n0x10a4-n0x10be) + I okayama + 0x28790f07, // n0x0bf0 c0x00a1 (n0x10be-n0x10e8) + I okinawa + 0x00200282, // n0x0bf1 c0x0000 (---------------) + I or + 0x28a91e85, // n0x0bf2 c0x00a2 (n0x10e8-n0x111a) + I osaka + 0x28f5a904, // n0x0bf3 c0x00a3 (n0x111a-n0x1134) + I saga + 0x292ecc47, // n0x0bf4 c0x00a4 (n0x1134-n0x1179) + I saitama + 0x296204c7, // n0x0bf5 c0x00a5 (n0x1179-n0x117a)* o I sapporo + 0x29a796c6, // n0x0bf6 c0x00a6 (n0x117a-n0x117b)* o I sendai + 0x29e6ff45, // n0x0bf7 c0x00a7 (n0x117b-n0x1192) + I shiga + 0x2a28ab47, // n0x0bf8 c0x00a8 (n0x1192-n0x11a9) + I shimane + 0x2a6f2e48, // n0x0bf9 c0x00a9 (n0x11a9-n0x11cd) + I shizuoka + 0x2ab42447, // n0x0bfa c0x00aa (n0x11cd-n0x11ec) + I tochigi + 0x2ae85d89, // n0x0bfb c0x00ab (n0x11ec-n0x11fd) + I tokushima + 0x2b2ef045, // n0x0bfc c0x00ac (n0x11fd-n0x1236) + I tokyo + 0x2b6f0147, // n0x0bfd c0x00ad (n0x1236-n0x1243) + I tottori + 0x2ba86046, // n0x0bfe c0x00ae (n0x1243-n0x125b) + I toyama + 0x2bf3da48, // n0x0bff c0x00af (n0x125b-n0x1278) + I wakayama + 0x0034efcd, // n0x0c00 c0x0000 (---------------) + I xn--0trq7p7nn + 0x00241b49, // n0x0c01 c0x0000 (---------------) + I xn--1ctwo + 0x0024b90b, // n0x0c02 c0x0000 (---------------) + I xn--1lqs03n + 0x0025520b, // n0x0c03 c0x0000 (---------------) + I xn--1lqs71d + 0x0026bb8b, // n0x0c04 c0x0000 (---------------) + I xn--2m4a15e + 0x0029c70b, // n0x0c05 c0x0000 (---------------) + I xn--32vp30h + 0x002f898b, // n0x0c06 c0x0000 (---------------) + I xn--4it168d + 0x002f8c4b, // n0x0c07 c0x0000 (---------------) + I xn--4it797k + 0x002f9749, // n0x0c08 c0x0000 (---------------) + I xn--4pvxs + 0x002faf0b, // n0x0c09 c0x0000 (---------------) + I xn--5js045d + 0x002fb1cb, // n0x0c0a c0x0000 (---------------) + I xn--5rtp49c + 0x002fb68b, // n0x0c0b c0x0000 (---------------) + I xn--5rtq34k + 0x002fc18a, // n0x0c0c c0x0000 (---------------) + I xn--6btw5a + 0x002fc6ca, // n0x0c0d c0x0000 (---------------) + I xn--6orx2r + 0x002fcccc, // n0x0c0e c0x0000 (---------------) + I xn--7t0a264c + 0x003042cb, // n0x0c0f c0x0000 (---------------) + I xn--8ltr62k + 0x00304c0a, // n0x0c10 c0x0000 (---------------) + I xn--8pvr4u + 0x0031874a, // n0x0c11 c0x0000 (---------------) + I xn--c3s14m + 0x0032550e, // n0x0c12 c0x0000 (---------------) + I xn--d5qv7z876c + 0x0032640e, // n0x0c13 c0x0000 (---------------) + I xn--djrs72d6uy + 0x0032678a, // n0x0c14 c0x0000 (---------------) + I xn--djty4k + 0x00327d0a, // n0x0c15 c0x0000 (---------------) + I xn--efvn9s + 0x003289cb, // n0x0c16 c0x0000 (---------------) + I xn--ehqz56n + 0x00328c8b, // n0x0c17 c0x0000 (---------------) + I xn--elqq16h + 0x0032978b, // n0x0c18 c0x0000 (---------------) + I xn--f6qx53a + 0x0034458b, // n0x0c19 c0x0000 (---------------) + I xn--k7yn95e + 0x00344b8a, // n0x0c1a c0x0000 (---------------) + I xn--kbrq7o + 0x0034584b, // n0x0c1b c0x0000 (---------------) + I xn--klt787d + 0x00345b0a, // n0x0c1c c0x0000 (---------------) + I xn--kltp7d + 0x00345d8a, // n0x0c1d c0x0000 (---------------) + I xn--kltx9a + 0x0034600a, // n0x0c1e c0x0000 (---------------) + I xn--klty5x + 0x0036628b, // n0x0c1f c0x0000 (---------------) + I xn--mkru45i + 0x0036e10b, // n0x0c20 c0x0000 (---------------) + I xn--nit225k + 0x0036fb8e, // n0x0c21 c0x0000 (---------------) + I xn--ntso0iqx3a + 0x0036ff0b, // n0x0c22 c0x0000 (---------------) + I xn--ntsq17g + 0x0037604b, // n0x0c23 c0x0000 (---------------) + I xn--pssu33l + 0x0037748b, // n0x0c24 c0x0000 (---------------) + I xn--qqqt11m + 0x0037c34a, // n0x0c25 c0x0000 (---------------) + I xn--rht27z + 0x0037c5c9, // n0x0c26 c0x0000 (---------------) + I xn--rht3d + 0x0037c80a, // n0x0c27 c0x0000 (---------------) + I xn--rht61e + 0x0037de8a, // n0x0c28 c0x0000 (---------------) + I xn--rny31h + 0x0038e5cb, // n0x0c29 c0x0000 (---------------) + I xn--tor131o + 0x0039010b, // n0x0c2a c0x0000 (---------------) + I xn--uist22h + 0x0039084a, // n0x0c2b c0x0000 (---------------) + I xn--uisz3g + 0x00391d0b, // n0x0c2c c0x0000 (---------------) + I xn--uuwu58a + 0x00397f0b, // n0x0c2d c0x0000 (---------------) + I xn--vgu402c + 0x003a1e0b, // n0x0c2e c0x0000 (---------------) + I xn--zbx025d + 0x2c277b48, // n0x0c2f c0x00b0 (n0x1278-n0x129a) + I yamagata + 0x2c6806c9, // n0x0c30 c0x00b1 (n0x129a-n0x12aa) + I yamaguchi + 0x2ca98d49, // n0x0c31 c0x00b2 (n0x12aa-n0x12c6) + I yamanashi + 0x2ce4d248, // n0x0c32 c0x00b3 (n0x12c6-n0x12c7)* o I yokohama + 0x0032eb45, // n0x0c33 c0x0000 (---------------) + I aisai + 0x00201383, // n0x0c34 c0x0000 (---------------) + I ama + 0x0020a0c4, // n0x0c35 c0x0000 (---------------) + I anjo + 0x002bb7c5, // n0x0c36 c0x0000 (---------------) + I asuke + 0x002a4a46, // n0x0c37 c0x0000 (---------------) + I chiryu + 0x002a6585, // n0x0c38 c0x0000 (---------------) + I chita + 0x0027ecc4, // n0x0c39 c0x0000 (---------------) + I fuso + 0x00372bc8, // n0x0c3a c0x0000 (---------------) + I gamagori + 0x0024e385, // n0x0c3b c0x0000 (---------------) + I handa + 0x00288284, // n0x0c3c c0x0000 (---------------) + I hazu + 0x002c0347, // n0x0c3d c0x0000 (---------------) + I hekinan + 0x0029480a, // n0x0c3e c0x0000 (---------------) + I higashiura + 0x002c394a, // n0x0c3f c0x0000 (---------------) + I ichinomiya + 0x003281c7, // n0x0c40 c0x0000 (---------------) + I inazawa + 0x0039dc07, // n0x0c41 c0x0000 (---------------) + I inuyama + 0x002e6c07, // n0x0c42 c0x0000 (---------------) + I isshiki + 0x0035a5c7, // n0x0c43 c0x0000 (---------------) + I iwakura + 0x002c5e45, // n0x0c44 c0x0000 (---------------) + I kanie + 0x002568c6, // n0x0c45 c0x0000 (---------------) + I kariya + 0x00300307, // n0x0c46 c0x0000 (---------------) + I kasugai + 0x00249e04, // n0x0c47 c0x0000 (---------------) + I kira + 0x002f2b86, // n0x0c48 c0x0000 (---------------) + I kiyosu + 0x00287986, // n0x0c49 c0x0000 (---------------) + I komaki + 0x0020d205, // n0x0c4a c0x0000 (---------------) + I konan + 0x00224c84, // n0x0c4b c0x0000 (---------------) + I kota + 0x0028d806, // n0x0c4c c0x0000 (---------------) + I mihama + 0x00293a07, // n0x0c4d c0x0000 (---------------) + I miyoshi + 0x0022aa06, // n0x0c4e c0x0000 (---------------) + I nishio + 0x002a94c7, // n0x0c4f c0x0000 (---------------) + I nisshin + 0x00227f83, // n0x0c50 c0x0000 (---------------) + I obu + 0x0024a8c6, // n0x0c51 c0x0000 (---------------) + I oguchi + 0x00232745, // n0x0c52 c0x0000 (---------------) + I oharu + 0x00276547, // n0x0c53 c0x0000 (---------------) + I okazaki + 0x002b8f4a, // n0x0c54 c0x0000 (---------------) + I owariasahi + 0x002a8f44, // n0x0c55 c0x0000 (---------------) + I seto + 0x00219388, // n0x0c56 c0x0000 (---------------) + I shikatsu + 0x0037ee49, // n0x0c57 c0x0000 (---------------) + I shinshiro + 0x002a8987, // n0x0c58 c0x0000 (---------------) + I shitara + 0x002e1486, // n0x0c59 c0x0000 (---------------) + I tahara + 0x0035a388, // n0x0c5a c0x0000 (---------------) + I takahama + 0x00307e09, // n0x0c5b c0x0000 (---------------) + I tobishima + 0x0036b804, // n0x0c5c c0x0000 (---------------) + I toei + 0x002f6a44, // n0x0c5d c0x0000 (---------------) + I togo + 0x002f1405, // n0x0c5e c0x0000 (---------------) + I tokai + 0x002b9648, // n0x0c5f c0x0000 (---------------) + I tokoname + 0x002ba487, // n0x0c60 c0x0000 (---------------) + I toyoake + 0x0027f8c9, // n0x0c61 c0x0000 (---------------) + I toyohashi + 0x00241608, // n0x0c62 c0x0000 (---------------) + I toyokawa + 0x00364dc6, // n0x0c63 c0x0000 (---------------) + I toyone + 0x00254b06, // n0x0c64 c0x0000 (---------------) + I toyota + 0x0028e448, // n0x0c65 c0x0000 (---------------) + I tsushima + 0x003693c6, // n0x0c66 c0x0000 (---------------) + I yatomi + 0x0021e685, // n0x0c67 c0x0000 (---------------) + I akita + 0x00279786, // n0x0c68 c0x0000 (---------------) + I daisen + 0x00271d08, // n0x0c69 c0x0000 (---------------) + I fujisato + 0x00234dc6, // n0x0c6a c0x0000 (---------------) + I gojome + 0x00248ccb, // n0x0c6b c0x0000 (---------------) + I hachirogata + 0x00283106, // n0x0c6c c0x0000 (---------------) + I happou + 0x0029084d, // n0x0c6d c0x0000 (---------------) + I higashinaruse + 0x00201785, // n0x0c6e c0x0000 (---------------) + I honjo + 0x0029ec06, // n0x0c6f c0x0000 (---------------) + I honjyo + 0x0021b005, // n0x0c70 c0x0000 (---------------) + I ikawa + 0x00286509, // n0x0c71 c0x0000 (---------------) + I kamikoani + 0x002e3107, // n0x0c72 c0x0000 (---------------) + I kamioka + 0x0034e208, // n0x0c73 c0x0000 (---------------) + I katagami + 0x0025f246, // n0x0c74 c0x0000 (---------------) + I kazuno + 0x0028f209, // n0x0c75 c0x0000 (---------------) + I kitaakita + 0x002dc706, // n0x0c76 c0x0000 (---------------) + I kosaka + 0x002b8ec5, // n0x0c77 c0x0000 (---------------) + I kyowa + 0x002964c6, // n0x0c78 c0x0000 (---------------) + I misato + 0x0029dec6, // n0x0c79 c0x0000 (---------------) + I mitane + 0x002c4ac9, // n0x0c7a c0x0000 (---------------) + I moriyoshi + 0x0034ea46, // n0x0c7b c0x0000 (---------------) + I nikaho + 0x0024a547, // n0x0c7c c0x0000 (---------------) + I noshiro + 0x003286c5, // n0x0c7d c0x0000 (---------------) + I odate + 0x00203083, // n0x0c7e c0x0000 (---------------) + I oga + 0x00222a85, // n0x0c7f c0x0000 (---------------) + I ogata + 0x0029cdc7, // n0x0c80 c0x0000 (---------------) + I semboku + 0x00309fc6, // n0x0c81 c0x0000 (---------------) + I yokote + 0x00201689, // n0x0c82 c0x0000 (---------------) + I yurihonjo + 0x0030adc6, // n0x0c83 c0x0000 (---------------) + I aomori + 0x00248686, // n0x0c84 c0x0000 (---------------) + I gonohe + 0x00205849, // n0x0c85 c0x0000 (---------------) + I hachinohe + 0x00279189, // n0x0c86 c0x0000 (---------------) + I hashikami + 0x00296c47, // n0x0c87 c0x0000 (---------------) + I hiranai + 0x00324188, // n0x0c88 c0x0000 (---------------) + I hirosaki + 0x00261849, // n0x0c89 c0x0000 (---------------) + I itayanagi + 0x00276d48, // n0x0c8a c0x0000 (---------------) + I kuroishi + 0x0036d986, // n0x0c8b c0x0000 (---------------) + I misawa + 0x002ccb45, // n0x0c8c c0x0000 (---------------) + I mutsu + 0x0023a58a, // n0x0c8d c0x0000 (---------------) + I nakadomari + 0x00248706, // n0x0c8e c0x0000 (---------------) + I noheji + 0x00300ac6, // n0x0c8f c0x0000 (---------------) + I oirase + 0x0029a305, // n0x0c90 c0x0000 (---------------) + I owani + 0x002a5048, // n0x0c91 c0x0000 (---------------) + I rokunohe + 0x0020c887, // n0x0c92 c0x0000 (---------------) + I sannohe + 0x0023160a, // n0x0c93 c0x0000 (---------------) + I shichinohe + 0x00248586, // n0x0c94 c0x0000 (---------------) + I shingo + 0x00339185, // n0x0c95 c0x0000 (---------------) + I takko + 0x00256286, // n0x0c96 c0x0000 (---------------) + I towada + 0x002880c7, // n0x0c97 c0x0000 (---------------) + I tsugaru + 0x002e1347, // n0x0c98 c0x0000 (---------------) + I tsuruta + 0x00380305, // n0x0c99 c0x0000 (---------------) + I abiko + 0x002b9085, // n0x0c9a c0x0000 (---------------) + I asahi + 0x002dfb46, // n0x0c9b c0x0000 (---------------) + I chonan + 0x002f6146, // n0x0c9c c0x0000 (---------------) + I chosei + 0x003a2886, // n0x0c9d c0x0000 (---------------) + I choshi + 0x00359404, // n0x0c9e c0x0000 (---------------) + I chuo + 0x00278249, // n0x0c9f c0x0000 (---------------) + I funabashi + 0x00281586, // n0x0ca0 c0x0000 (---------------) + I futtsu + 0x00279d4a, // n0x0ca1 c0x0000 (---------------) + I hanamigawa + 0x00286b88, // n0x0ca2 c0x0000 (---------------) + I ichihara + 0x003335c8, // n0x0ca3 c0x0000 (---------------) + I ichikawa + 0x002c394a, // n0x0ca4 c0x0000 (---------------) + I ichinomiya + 0x0020c145, // n0x0ca5 c0x0000 (---------------) + I inzai + 0x00293945, // n0x0ca6 c0x0000 (---------------) + I isumi + 0x00264508, // n0x0ca7 c0x0000 (---------------) + I kamagaya + 0x002c4d48, // n0x0ca8 c0x0000 (---------------) + I kamogawa + 0x00310787, // n0x0ca9 c0x0000 (---------------) + I kashiwa + 0x0028bb06, // n0x0caa c0x0000 (---------------) + I katori + 0x00314048, // n0x0cab c0x0000 (---------------) + I katsuura + 0x00229407, // n0x0cac c0x0000 (---------------) + I kimitsu + 0x00277448, // n0x0cad c0x0000 (---------------) + I kisarazu + 0x00368b46, // n0x0cae c0x0000 (---------------) + I kozaki + 0x0027a308, // n0x0caf c0x0000 (---------------) + I kujukuri + 0x0028a086, // n0x0cb0 c0x0000 (---------------) + I kyonan + 0x00237c47, // n0x0cb1 c0x0000 (---------------) + I matsudo + 0x0028fc46, // n0x0cb2 c0x0000 (---------------) + I midori + 0x0028d806, // n0x0cb3 c0x0000 (---------------) + I mihama + 0x0033078a, // n0x0cb4 c0x0000 (---------------) + I minamiboso + 0x0022f586, // n0x0cb5 c0x0000 (---------------) + I mobara + 0x002ccb49, // n0x0cb6 c0x0000 (---------------) + I mutsuzawa + 0x002a7986, // n0x0cb7 c0x0000 (---------------) + I nagara + 0x002a7bca, // n0x0cb8 c0x0000 (---------------) + I nagareyama + 0x002b8c89, // n0x0cb9 c0x0000 (---------------) + I narashino + 0x00357906, // n0x0cba c0x0000 (---------------) + I narita + 0x00383dc4, // n0x0cbb c0x0000 (---------------) + I noda + 0x00307b4d, // n0x0cbc c0x0000 (---------------) + I oamishirasato + 0x00280947, // n0x0cbd c0x0000 (---------------) + I omigawa + 0x00306346, // n0x0cbe c0x0000 (---------------) + I onjuku + 0x002b3a45, // n0x0cbf c0x0000 (---------------) + I otaki + 0x002dc785, // n0x0cc0 c0x0000 (---------------) + I sakae + 0x002fe346, // n0x0cc1 c0x0000 (---------------) + I sakura + 0x002859c9, // n0x0cc2 c0x0000 (---------------) + I shimofusa + 0x0029afc7, // n0x0cc3 c0x0000 (---------------) + I shirako + 0x00272946, // n0x0cc4 c0x0000 (---------------) + I shiroi + 0x002d41c6, // n0x0cc5 c0x0000 (---------------) + I shisui + 0x0027ed49, // n0x0cc6 c0x0000 (---------------) + I sodegaura + 0x0021e5c4, // n0x0cc7 c0x0000 (---------------) + I sosa + 0x002a5b04, // n0x0cc8 c0x0000 (---------------) + I tako + 0x00201248, // n0x0cc9 c0x0000 (---------------) + I tateyama + 0x00366cc6, // n0x0cca c0x0000 (---------------) + I togane + 0x002965c8, // n0x0ccb c0x0000 (---------------) + I tohnosho + 0x002eeec8, // n0x0ccc c0x0000 (---------------) + I tomisato + 0x0026aa47, // n0x0ccd c0x0000 (---------------) + I urayasu + 0x003a3249, // n0x0cce c0x0000 (---------------) + I yachimata + 0x003a2a87, // n0x0ccf c0x0000 (---------------) + I yachiyo + 0x002a754a, // n0x0cd0 c0x0000 (---------------) + I yokaichiba + 0x0022fc8f, // n0x0cd1 c0x0000 (---------------) + I yokoshibahikari + 0x0025ddca, // n0x0cd2 c0x0000 (---------------) + I yotsukaido + 0x00222485, // n0x0cd3 c0x0000 (---------------) + I ainan + 0x00271f45, // n0x0cd4 c0x0000 (---------------) + I honai + 0x002181c5, // n0x0cd5 c0x0000 (---------------) + I ikata + 0x00308407, // n0x0cd6 c0x0000 (---------------) + I imabari + 0x00273f43, // n0x0cd7 c0x0000 (---------------) + I iyo + 0x00324388, // n0x0cd8 c0x0000 (---------------) + I kamijima + 0x002ead06, // n0x0cd9 c0x0000 (---------------) + I kihoku + 0x002eae09, // n0x0cda c0x0000 (---------------) + I kumakogen + 0x002fa006, // n0x0cdb c0x0000 (---------------) + I masaki + 0x002c4907, // n0x0cdc c0x0000 (---------------) + I matsuno + 0x0028efc9, // n0x0cdd c0x0000 (---------------) + I matsuyama + 0x0034e108, // n0x0cde c0x0000 (---------------) + I namikata + 0x0029a3c7, // n0x0cdf c0x0000 (---------------) + I niihama + 0x002f6fc3, // n0x0ce0 c0x0000 (---------------) + I ozu + 0x0032ebc5, // n0x0ce1 c0x0000 (---------------) + I saijo + 0x0035b6c5, // n0x0ce2 c0x0000 (---------------) + I seiyo + 0x0035924b, // n0x0ce3 c0x0000 (---------------) + I shikokuchuo + 0x002b88c4, // n0x0ce4 c0x0000 (---------------) + I tobe + 0x002d40c4, // n0x0ce5 c0x0000 (---------------) + I toon + 0x00270a06, // n0x0ce6 c0x0000 (---------------) + I uchiko + 0x002f7347, // n0x0ce7 c0x0000 (---------------) + I uwajima + 0x0038a64a, // n0x0ce8 c0x0000 (---------------) + I yawatahama + 0x0023d687, // n0x0ce9 c0x0000 (---------------) + I echizen + 0x0036b887, // n0x0cea c0x0000 (---------------) + I eiheiji + 0x00275605, // n0x0ceb c0x0000 (---------------) + I fukui + 0x00202b85, // n0x0cec c0x0000 (---------------) + I ikeda + 0x0020d6c9, // n0x0ced c0x0000 (---------------) + I katsuyama + 0x0028d806, // n0x0cee c0x0000 (---------------) + I mihama + 0x0023d50d, // n0x0cef c0x0000 (---------------) + I minamiechizen + 0x003912c5, // n0x0cf0 c0x0000 (---------------) + I obama + 0x002967c3, // n0x0cf1 c0x0000 (---------------) + I ohi + 0x0020e703, // n0x0cf2 c0x0000 (---------------) + I ono + 0x002eb685, // n0x0cf3 c0x0000 (---------------) + I sabae + 0x003487c5, // n0x0cf4 c0x0000 (---------------) + I sakai + 0x0035a388, // n0x0cf5 c0x0000 (---------------) + I takahama + 0x00273607, // n0x0cf6 c0x0000 (---------------) + I tsuruga + 0x002a5886, // n0x0cf7 c0x0000 (---------------) + I wakasa + 0x00294ec6, // n0x0cf8 c0x0000 (---------------) + I ashiya + 0x00227fc5, // n0x0cf9 c0x0000 (---------------) + I buzen + 0x00234c87, // n0x0cfa c0x0000 (---------------) + I chikugo + 0x0039de87, // n0x0cfb c0x0000 (---------------) + I chikuho + 0x0020b747, // n0x0cfc c0x0000 (---------------) + I chikujo + 0x002c900a, // n0x0cfd c0x0000 (---------------) + I chikushino + 0x0024a988, // n0x0cfe c0x0000 (---------------) + I chikuzen + 0x00359404, // n0x0cff c0x0000 (---------------) + I chuo + 0x0025ca87, // n0x0d00 c0x0000 (---------------) + I dazaifu + 0x002748c7, // n0x0d01 c0x0000 (---------------) + I fukuchi + 0x0030bb06, // n0x0d02 c0x0000 (---------------) + I hakata + 0x00260407, // n0x0d03 c0x0000 (---------------) + I higashi + 0x002c2c08, // n0x0d04 c0x0000 (---------------) + I hirokawa + 0x00298c48, // n0x0d05 c0x0000 (---------------) + I hisayama + 0x00260a06, // n0x0d06 c0x0000 (---------------) + I iizuka + 0x00322f48, // n0x0d07 c0x0000 (---------------) + I inatsuki + 0x002c5484, // n0x0d08 c0x0000 (---------------) + I kaho + 0x00300306, // n0x0d09 c0x0000 (---------------) + I kasuga + 0x00394686, // n0x0d0a c0x0000 (---------------) + I kasuya + 0x0031a406, // n0x0d0b c0x0000 (---------------) + I kawara + 0x0027cc86, // n0x0d0c c0x0000 (---------------) + I keisen + 0x00223544, // n0x0d0d c0x0000 (---------------) + I koga + 0x0035a686, // n0x0d0e c0x0000 (---------------) + I kurate + 0x002b2ac6, // n0x0d0f c0x0000 (---------------) + I kurogi + 0x0028dbc6, // n0x0d10 c0x0000 (---------------) + I kurume + 0x00236f86, // n0x0d11 c0x0000 (---------------) + I minami + 0x0020e5c6, // n0x0d12 c0x0000 (---------------) + I miyako + 0x002c2a46, // n0x0d13 c0x0000 (---------------) + I miyama + 0x002a5788, // n0x0d14 c0x0000 (---------------) + I miyawaka + 0x003533c8, // n0x0d15 c0x0000 (---------------) + I mizumaki + 0x002c9bc8, // n0x0d16 c0x0000 (---------------) + I munakata + 0x002a6788, // n0x0d17 c0x0000 (---------------) + I nakagawa + 0x00264486, // n0x0d18 c0x0000 (---------------) + I nakama + 0x002123c5, // n0x0d19 c0x0000 (---------------) + I nishi + 0x00222a46, // n0x0d1a c0x0000 (---------------) + I nogata + 0x002a3645, // n0x0d1b c0x0000 (---------------) + I ogori + 0x0037b787, // n0x0d1c c0x0000 (---------------) + I okagaki + 0x002416c5, // n0x0d1d c0x0000 (---------------) + I okawa + 0x00214a43, // n0x0d1e c0x0000 (---------------) + I oki + 0x00201f05, // n0x0d1f c0x0000 (---------------) + I omuta + 0x00312384, // n0x0d20 c0x0000 (---------------) + I onga + 0x0020e705, // n0x0d21 c0x0000 (---------------) + I onojo + 0x00215103, // n0x0d22 c0x0000 (---------------) + I oto + 0x002d7787, // n0x0d23 c0x0000 (---------------) + I saigawa + 0x00343e48, // n0x0d24 c0x0000 (---------------) + I sasaguri + 0x002a9586, // n0x0d25 c0x0000 (---------------) + I shingu + 0x0028d0cd, // n0x0d26 c0x0000 (---------------) + I shinyoshitomi + 0x00271f06, // n0x0d27 c0x0000 (---------------) + I shonai + 0x0028c585, // n0x0d28 c0x0000 (---------------) + I soeda + 0x00260c43, // n0x0d29 c0x0000 (---------------) + I sue + 0x002afdc9, // n0x0d2a c0x0000 (---------------) + I tachiarai + 0x002bed86, // n0x0d2b c0x0000 (---------------) + I tagawa + 0x0028cb86, // n0x0d2c c0x0000 (---------------) + I takata + 0x002fef04, // n0x0d2d c0x0000 (---------------) + I toho + 0x0025dd47, // n0x0d2e c0x0000 (---------------) + I toyotsu + 0x00236606, // n0x0d2f c0x0000 (---------------) + I tsuiki + 0x002a4e85, // n0x0d30 c0x0000 (---------------) + I ukiha + 0x00210603, // n0x0d31 c0x0000 (---------------) + I umi + 0x00206884, // n0x0d32 c0x0000 (---------------) + I usui + 0x00274a86, // n0x0d33 c0x0000 (---------------) + I yamada + 0x002924c4, // n0x0d34 c0x0000 (---------------) + I yame + 0x0030d248, // n0x0d35 c0x0000 (---------------) + I yanagawa + 0x0039d909, // n0x0d36 c0x0000 (---------------) + I yukuhashi + 0x002e3609, // n0x0d37 c0x0000 (---------------) + I aizubange + 0x002963ca, // n0x0d38 c0x0000 (---------------) + I aizumisato + 0x0022c10d, // n0x0d39 c0x0000 (---------------) + I aizuwakamatsu + 0x0024cdc7, // n0x0d3a c0x0000 (---------------) + I asakawa + 0x00300946, // n0x0d3b c0x0000 (---------------) + I bandai + 0x00205dc4, // n0x0d3c c0x0000 (---------------) + I date + 0x0027f209, // n0x0d3d c0x0000 (---------------) + I fukushima + 0x0027e188, // n0x0d3e c0x0000 (---------------) + I furudono + 0x00280546, // n0x0d3f c0x0000 (---------------) + I futaba + 0x00253546, // n0x0d40 c0x0000 (---------------) + I hanawa + 0x00260407, // n0x0d41 c0x0000 (---------------) + I higashi + 0x002edcc6, // n0x0d42 c0x0000 (---------------) + I hirata + 0x0021d386, // n0x0d43 c0x0000 (---------------) + I hirono + 0x002fe4c6, // n0x0d44 c0x0000 (---------------) + I iitate + 0x00390f8a, // n0x0d45 c0x0000 (---------------) + I inawashiro + 0x0021af48, // n0x0d46 c0x0000 (---------------) + I ishikawa + 0x0025ef45, // n0x0d47 c0x0000 (---------------) + I iwaki + 0x0026a789, // n0x0d48 c0x0000 (---------------) + I izumizaki + 0x002bac0a, // n0x0d49 c0x0000 (---------------) + I kagamiishi + 0x0021b1c8, // n0x0d4a c0x0000 (---------------) + I kaneyama + 0x00292e48, // n0x0d4b c0x0000 (---------------) + I kawamata + 0x0028cb08, // n0x0d4c c0x0000 (---------------) + I kitakata + 0x0039e28c, // n0x0d4d c0x0000 (---------------) + I kitashiobara + 0x002d5e45, // n0x0d4e c0x0000 (---------------) + I koori + 0x00295148, // n0x0d4f c0x0000 (---------------) + I koriyama + 0x00304986, // n0x0d50 c0x0000 (---------------) + I kunimi + 0x0029e646, // n0x0d51 c0x0000 (---------------) + I miharu + 0x0039fb87, // n0x0d52 c0x0000 (---------------) + I mishima + 0x0023d585, // n0x0d53 c0x0000 (---------------) + I namie + 0x00279905, // n0x0d54 c0x0000 (---------------) + I nango + 0x002e34c9, // n0x0d55 c0x0000 (---------------) + I nishiaizu + 0x002143c7, // n0x0d56 c0x0000 (---------------) + I nishigo + 0x002eadc5, // n0x0d57 c0x0000 (---------------) + I okuma + 0x0021e2c7, // n0x0d58 c0x0000 (---------------) + I omotego + 0x0020e703, // n0x0d59 c0x0000 (---------------) + I ono + 0x002bb0c5, // n0x0d5a c0x0000 (---------------) + I otama + 0x00396b48, // n0x0d5b c0x0000 (---------------) + I samegawa + 0x002a9d47, // n0x0d5c c0x0000 (---------------) + I shimogo + 0x00292d09, // n0x0d5d c0x0000 (---------------) + I shirakawa + 0x002ab745, // n0x0d5e c0x0000 (---------------) + I showa + 0x002ef804, // n0x0d5f c0x0000 (---------------) + I soma + 0x00297648, // n0x0d60 c0x0000 (---------------) + I sukagawa + 0x00213007, // n0x0d61 c0x0000 (---------------) + I taishin + 0x0029a588, // n0x0d62 c0x0000 (---------------) + I tamakawa + 0x0030a508, // n0x0d63 c0x0000 (---------------) + I tanagura + 0x002ed285, // n0x0d64 c0x0000 (---------------) + I tenei + 0x0034c806, // n0x0d65 c0x0000 (---------------) + I yabuki + 0x0021ec86, // n0x0d66 c0x0000 (---------------) + I yamato + 0x00349109, // n0x0d67 c0x0000 (---------------) + I yamatsuri + 0x003148c7, // n0x0d68 c0x0000 (---------------) + I yanaizu + 0x002a3f06, // n0x0d69 c0x0000 (---------------) + I yugawa + 0x00283687, // n0x0d6a c0x0000 (---------------) + I anpachi + 0x00201d83, // n0x0d6b c0x0000 (---------------) + I ena + 0x002a4d04, // n0x0d6c c0x0000 (---------------) + I gifu + 0x00297f85, // n0x0d6d c0x0000 (---------------) + I ginan + 0x002ebe44, // n0x0d6e c0x0000 (---------------) + I godo + 0x0022e444, // n0x0d6f c0x0000 (---------------) + I gujo + 0x00277dc7, // n0x0d70 c0x0000 (---------------) + I hashima + 0x00210a07, // n0x0d71 c0x0000 (---------------) + I hichiso + 0x00254984, // n0x0d72 c0x0000 (---------------) + I hida + 0x00292b50, // n0x0d73 c0x0000 (---------------) + I higashishirakawa + 0x0031adc7, // n0x0d74 c0x0000 (---------------) + I ibigawa + 0x00202b85, // n0x0d75 c0x0000 (---------------) + I ikeda + 0x002c414c, // n0x0d76 c0x0000 (---------------) + I kakamigahara + 0x0027bf84, // n0x0d77 c0x0000 (---------------) + I kani + 0x002892c8, // n0x0d78 c0x0000 (---------------) + I kasahara + 0x00237b49, // n0x0d79 c0x0000 (---------------) + I kasamatsu + 0x002f8806, // n0x0d7a c0x0000 (---------------) + I kawaue + 0x0021e6c8, // n0x0d7b c0x0000 (---------------) + I kitagata + 0x00248084, // n0x0d7c c0x0000 (---------------) + I mino + 0x00248088, // n0x0d7d c0x0000 (---------------) + I minokamo + 0x002b9d86, // n0x0d7e c0x0000 (---------------) + I mitake + 0x00352348, // n0x0d7f c0x0000 (---------------) + I mizunami + 0x00297c86, // n0x0d80 c0x0000 (---------------) + I motosu + 0x0020efcb, // n0x0d81 c0x0000 (---------------) + I nakatsugawa + 0x00203085, // n0x0d82 c0x0000 (---------------) + I ogaki + 0x002c5408, // n0x0d83 c0x0000 (---------------) + I sakahogi + 0x00216944, // n0x0d84 c0x0000 (---------------) + I seki + 0x00278e0a, // n0x0d85 c0x0000 (---------------) + I sekigahara + 0x00292d09, // n0x0d86 c0x0000 (---------------) + I shirakawa + 0x00331246, // n0x0d87 c0x0000 (---------------) + I tajimi + 0x002b98c8, // n0x0d88 c0x0000 (---------------) + I takayama + 0x0026c945, // n0x0d89 c0x0000 (---------------) + I tarui + 0x00221b44, // n0x0d8a c0x0000 (---------------) + I toki + 0x002891c6, // n0x0d8b c0x0000 (---------------) + I tomika + 0x0020b608, // n0x0d8c c0x0000 (---------------) + I wanouchi + 0x00277b48, // n0x0d8d c0x0000 (---------------) + I yamagata + 0x00340346, // n0x0d8e c0x0000 (---------------) + I yaotsu + 0x00201e44, // n0x0d8f c0x0000 (---------------) + I yoro + 0x0023a506, // n0x0d90 c0x0000 (---------------) + I annaka + 0x003a2b07, // n0x0d91 c0x0000 (---------------) + I chiyoda + 0x00271647, // n0x0d92 c0x0000 (---------------) + I fujioka + 0x0026040f, // n0x0d93 c0x0000 (---------------) + I higashiagatsuma + 0x00204407, // n0x0d94 c0x0000 (---------------) + I isesaki + 0x003579c7, // n0x0d95 c0x0000 (---------------) + I itakura + 0x0029e505, // n0x0d96 c0x0000 (---------------) + I kanna + 0x002f2fc5, // n0x0d97 c0x0000 (---------------) + I kanra + 0x00296909, // n0x0d98 c0x0000 (---------------) + I katashina + 0x002432c6, // n0x0d99 c0x0000 (---------------) + I kawaba + 0x00276685, // n0x0d9a c0x0000 (---------------) + I kiryu + 0x00279487, // n0x0d9b c0x0000 (---------------) + I kusatsu + 0x0039fe08, // n0x0d9c c0x0000 (---------------) + I maebashi + 0x002b4b45, // n0x0d9d c0x0000 (---------------) + I meiwa + 0x0028fc46, // n0x0d9e c0x0000 (---------------) + I midori + 0x0020f808, // n0x0d9f c0x0000 (---------------) + I minakami + 0x0030f1ca, // n0x0da0 c0x0000 (---------------) + I naganohara + 0x00320048, // n0x0da1 c0x0000 (---------------) + I nakanojo + 0x00390447, // n0x0da2 c0x0000 (---------------) + I nanmoku + 0x002300c6, // n0x0da3 c0x0000 (---------------) + I numata + 0x0026a746, // n0x0da4 c0x0000 (---------------) + I oizumi + 0x0021ad83, // n0x0da5 c0x0000 (---------------) + I ora + 0x0020a183, // n0x0da6 c0x0000 (---------------) + I ota + 0x002badc9, // n0x0da7 c0x0000 (---------------) + I shibukawa + 0x002616c9, // n0x0da8 c0x0000 (---------------) + I shimonita + 0x00285c86, // n0x0da9 c0x0000 (---------------) + I shinto + 0x002ab745, // n0x0daa c0x0000 (---------------) + I showa + 0x00297a08, // n0x0dab c0x0000 (---------------) + I takasaki + 0x002b98c8, // n0x0dac c0x0000 (---------------) + I takayama + 0x002e26c8, // n0x0dad c0x0000 (---------------) + I tamamura + 0x002fe54b, // n0x0dae c0x0000 (---------------) + I tatebayashi + 0x0028d307, // n0x0daf c0x0000 (---------------) + I tomioka + 0x002f4d89, // n0x0db0 c0x0000 (---------------) + I tsukiyono + 0x00260688, // n0x0db1 c0x0000 (---------------) + I tsumagoi + 0x003855c4, // n0x0db2 c0x0000 (---------------) + I ueno + 0x002c4bc8, // n0x0db3 c0x0000 (---------------) + I yoshioka + 0x002848c9, // n0x0db4 c0x0000 (---------------) + I asaminami + 0x002a4205, // n0x0db5 c0x0000 (---------------) + I daiwa + 0x00308307, // n0x0db6 c0x0000 (---------------) + I etajima + 0x002b7305, // n0x0db7 c0x0000 (---------------) + I fuchu + 0x00277a48, // n0x0db8 c0x0000 (---------------) + I fukuyama + 0x002869cb, // n0x0db9 c0x0000 (---------------) + I hatsukaichi + 0x0028a890, // n0x0dba c0x0000 (---------------) + I higashihiroshima + 0x0029ea05, // n0x0dbb c0x0000 (---------------) + I hongo + 0x0021688c, // n0x0dbc c0x0000 (---------------) + I jinsekikogen + 0x002a5a45, // n0x0dbd c0x0000 (---------------) + I kaita + 0x00275683, // n0x0dbe c0x0000 (---------------) + I kui + 0x0027eb46, // n0x0dbf c0x0000 (---------------) + I kumano + 0x002b1f04, // n0x0dc0 c0x0000 (---------------) + I kure + 0x00362c86, // n0x0dc1 c0x0000 (---------------) + I mihara + 0x00293a07, // n0x0dc2 c0x0000 (---------------) + I miyoshi + 0x0020efc4, // n0x0dc3 c0x0000 (---------------) + I naka + 0x002c3848, // n0x0dc4 c0x0000 (---------------) + I onomichi + 0x0032424d, // n0x0dc5 c0x0000 (---------------) + I osakikamijima + 0x002d3ac5, // n0x0dc6 c0x0000 (---------------) + I otake + 0x0022c604, // n0x0dc7 c0x0000 (---------------) + I saka + 0x0020d904, // n0x0dc8 c0x0000 (---------------) + I sera + 0x0026a209, // n0x0dc9 c0x0000 (---------------) + I seranishi + 0x0027ab48, // n0x0dca c0x0000 (---------------) + I shinichi + 0x0030ac47, // n0x0dcb c0x0000 (---------------) + I shobara + 0x002b9e08, // n0x0dcc c0x0000 (---------------) + I takehara + 0x00278308, // n0x0dcd c0x0000 (---------------) + I abashiri + 0x00272c45, // n0x0dce c0x0000 (---------------) + I abira + 0x00378a87, // n0x0dcf c0x0000 (---------------) + I aibetsu + 0x00272bc7, // n0x0dd0 c0x0000 (---------------) + I akabira + 0x00379187, // n0x0dd1 c0x0000 (---------------) + I akkeshi + 0x002b9089, // n0x0dd2 c0x0000 (---------------) + I asahikawa + 0x00236489, // n0x0dd3 c0x0000 (---------------) + I ashibetsu + 0x0023e7c6, // n0x0dd4 c0x0000 (---------------) + I ashoro + 0x002ac806, // n0x0dd5 c0x0000 (---------------) + I assabu + 0x00260646, // n0x0dd6 c0x0000 (---------------) + I atsuma + 0x002621c5, // n0x0dd7 c0x0000 (---------------) + I bibai + 0x002723c4, // n0x0dd8 c0x0000 (---------------) + I biei + 0x00200ec6, // n0x0dd9 c0x0000 (---------------) + I bifuka + 0x00201446, // n0x0dda c0x0000 (---------------) + I bihoro + 0x00272c88, // n0x0ddb c0x0000 (---------------) + I biratori + 0x00287d8b, // n0x0ddc c0x0000 (---------------) + I chippubetsu + 0x002a8e07, // n0x0ddd c0x0000 (---------------) + I chitose + 0x00205dc4, // n0x0dde c0x0000 (---------------) + I date + 0x0033d0c6, // n0x0ddf c0x0000 (---------------) + I ebetsu + 0x00356907, // n0x0de0 c0x0000 (---------------) + I embetsu + 0x002eafc5, // n0x0de1 c0x0000 (---------------) + I eniwa + 0x0035b145, // n0x0de2 c0x0000 (---------------) + I erimo + 0x0033b1c4, // n0x0de3 c0x0000 (---------------) + I esan + 0x00236406, // n0x0de4 c0x0000 (---------------) + I esashi + 0x00200f48, // n0x0de5 c0x0000 (---------------) + I fukagawa + 0x0027f209, // n0x0de6 c0x0000 (---------------) + I fukushima + 0x00244106, // n0x0de7 c0x0000 (---------------) + I furano + 0x0027cf08, // n0x0de8 c0x0000 (---------------) + I furubira + 0x002a4f46, // n0x0de9 c0x0000 (---------------) + I haboro + 0x00328608, // n0x0dea c0x0000 (---------------) + I hakodate + 0x00299b0c, // n0x0deb c0x0000 (---------------) + I hamatonbetsu + 0x00272b06, // n0x0dec c0x0000 (---------------) + I hidaka + 0x0028c24d, // n0x0ded c0x0000 (---------------) + I higashikagura + 0x0028c6cb, // n0x0dee c0x0000 (---------------) + I higashikawa + 0x0024a605, // n0x0def c0x0000 (---------------) + I hiroo + 0x0039dfc7, // n0x0df0 c0x0000 (---------------) + I hokuryu + 0x0034eb46, // n0x0df1 c0x0000 (---------------) + I hokuto + 0x002e1208, // n0x0df2 c0x0000 (---------------) + I honbetsu + 0x0023e849, // n0x0df3 c0x0000 (---------------) + I horokanai + 0x00348d48, // n0x0df4 c0x0000 (---------------) + I horonobe + 0x00202b85, // n0x0df5 c0x0000 (---------------) + I ikeda + 0x002af387, // n0x0df6 c0x0000 (---------------) + I imakane + 0x00276e48, // n0x0df7 c0x0000 (---------------) + I ishikari + 0x00255f49, // n0x0df8 c0x0000 (---------------) + I iwamizawa + 0x00235306, // n0x0df9 c0x0000 (---------------) + I iwanai + 0x0024620a, // n0x0dfa c0x0000 (---------------) + I kamifurano + 0x002e0f88, // n0x0dfb c0x0000 (---------------) + I kamikawa + 0x00348b8b, // n0x0dfc c0x0000 (---------------) + I kamishihoro + 0x002ae88c, // n0x0dfd c0x0000 (---------------) + I kamisunagawa + 0x00248188, // n0x0dfe c0x0000 (---------------) + I kamoenai + 0x002741c6, // n0x0dff c0x0000 (---------------) + I kayabe + 0x00268208, // n0x0e00 c0x0000 (---------------) + I kembuchi + 0x00204547, // n0x0e01 c0x0000 (---------------) + I kikonai + 0x00236709, // n0x0e02 c0x0000 (---------------) + I kimobetsu + 0x0020cb4d, // n0x0e03 c0x0000 (---------------) + I kitahiroshima + 0x00294b46, // n0x0e04 c0x0000 (---------------) + I kitami + 0x00287a88, // n0x0e05 c0x0000 (---------------) + I kiyosato + 0x00353289, // n0x0e06 c0x0000 (---------------) + I koshimizu + 0x002b07c8, // n0x0e07 c0x0000 (---------------) + I kunneppu + 0x0027a408, // n0x0e08 c0x0000 (---------------) + I kuriyama + 0x002b338c, // n0x0e09 c0x0000 (---------------) + I kuromatsunai + 0x002b4407, // n0x0e0a c0x0000 (---------------) + I kushiro + 0x002b5747, // n0x0e0b c0x0000 (---------------) + I kutchan + 0x002b8ec5, // n0x0e0c c0x0000 (---------------) + I kyowa + 0x0028ec47, // n0x0e0d c0x0000 (---------------) + I mashike + 0x0039fcc8, // n0x0e0e c0x0000 (---------------) + I matsumae + 0x00289246, // n0x0e0f c0x0000 (---------------) + I mikasa + 0x00243f8c, // n0x0e10 c0x0000 (---------------) + I minamifurano + 0x002dd808, // n0x0e11 c0x0000 (---------------) + I mombetsu + 0x002c6048, // n0x0e12 c0x0000 (---------------) + I moseushi + 0x0025c546, // n0x0e13 c0x0000 (---------------) + I mukawa + 0x00391587, // n0x0e14 c0x0000 (---------------) + I muroran + 0x0023e9c4, // n0x0e15 c0x0000 (---------------) + I naie + 0x002a6788, // n0x0e16 c0x0000 (---------------) + I nakagawa + 0x0027b40c, // n0x0e17 c0x0000 (---------------) + I nakasatsunai + 0x0021034c, // n0x0e18 c0x0000 (---------------) + I nakatombetsu + 0x00222505, // n0x0e19 c0x0000 (---------------) + I nanae + 0x00200b87, // n0x0e1a c0x0000 (---------------) + I nanporo + 0x00201dc6, // n0x0e1b c0x0000 (---------------) + I nayoro + 0x00391506, // n0x0e1c c0x0000 (---------------) + I nemuro + 0x002866c8, // n0x0e1d c0x0000 (---------------) + I niikappu + 0x00264044, // n0x0e1e c0x0000 (---------------) + I niki + 0x0022aa0b, // n0x0e1f c0x0000 (---------------) + I nishiokoppe + 0x002be20b, // n0x0e20 c0x0000 (---------------) + I noboribetsu + 0x002300c6, // n0x0e21 c0x0000 (---------------) + I numata + 0x003240c7, // n0x0e22 c0x0000 (---------------) + I obihiro + 0x003022c5, // n0x0e23 c0x0000 (---------------) + I obira + 0x00268fc5, // n0x0e24 c0x0000 (---------------) + I oketo + 0x0022ab46, // n0x0e25 c0x0000 (---------------) + I okoppe + 0x0026c905, // n0x0e26 c0x0000 (---------------) + I otaru + 0x002b8885, // n0x0e27 c0x0000 (---------------) + I otobe + 0x002b9bc7, // n0x0e28 c0x0000 (---------------) + I otofuke + 0x00271009, // n0x0e29 c0x0000 (---------------) + I otoineppu + 0x002f6304, // n0x0e2a c0x0000 (---------------) + I oumu + 0x0026f485, // n0x0e2b c0x0000 (---------------) + I ozora + 0x002d1d85, // n0x0e2c c0x0000 (---------------) + I pippu + 0x0026fe08, // n0x0e2d c0x0000 (---------------) + I rankoshi + 0x002c3685, // n0x0e2e c0x0000 (---------------) + I rebun + 0x0029d649, // n0x0e2f c0x0000 (---------------) + I rikubetsu + 0x002910c7, // n0x0e30 c0x0000 (---------------) + I rishiri + 0x002910cb, // n0x0e31 c0x0000 (---------------) + I rishirifuji + 0x00227706, // n0x0e32 c0x0000 (---------------) + I saroma + 0x002a54c9, // n0x0e33 c0x0000 (---------------) + I sarufutsu + 0x00224bc8, // n0x0e34 c0x0000 (---------------) + I shakotan + 0x00251705, // n0x0e35 c0x0000 (---------------) + I shari + 0x00379288, // n0x0e36 c0x0000 (---------------) + I shibecha + 0x002364c8, // n0x0e37 c0x0000 (---------------) + I shibetsu + 0x0020af47, // n0x0e38 c0x0000 (---------------) + I shikabe + 0x0026a607, // n0x0e39 c0x0000 (---------------) + I shikaoi + 0x00277e49, // n0x0e3a c0x0000 (---------------) + I shimamaki + 0x00352287, // n0x0e3b c0x0000 (---------------) + I shimizu + 0x0025aa89, // n0x0e3c c0x0000 (---------------) + I shimokawa + 0x00371f4c, // n0x0e3d c0x0000 (---------------) + I shinshinotsu + 0x00285c88, // n0x0e3e c0x0000 (---------------) + I shintoku + 0x0029e349, // n0x0e3f c0x0000 (---------------) + I shiranuka + 0x0029fe47, // n0x0e40 c0x0000 (---------------) + I shiraoi + 0x002783c9, // n0x0e41 c0x0000 (---------------) + I shiriuchi + 0x00210b47, // n0x0e42 c0x0000 (---------------) + I sobetsu + 0x002ae988, // n0x0e43 c0x0000 (---------------) + I sunagawa + 0x00270145, // n0x0e44 c0x0000 (---------------) + I taiki + 0x00300286, // n0x0e45 c0x0000 (---------------) + I takasu + 0x002b3a88, // n0x0e46 c0x0000 (---------------) + I takikawa + 0x002301c8, // n0x0e47 c0x0000 (---------------) + I takinoue + 0x002baac9, // n0x0e48 c0x0000 (---------------) + I teshikaga + 0x002b88c7, // n0x0e49 c0x0000 (---------------) + I tobetsu + 0x00269945, // n0x0e4a c0x0000 (---------------) + I tohma + 0x00335489, // n0x0e4b c0x0000 (---------------) + I tomakomai + 0x00219806, // n0x0e4c c0x0000 (---------------) + I tomari + 0x00286044, // n0x0e4d c0x0000 (---------------) + I toya + 0x00348a06, // n0x0e4e c0x0000 (---------------) + I toyako + 0x0025d188, // n0x0e4f c0x0000 (---------------) + I toyotomi + 0x00261e07, // n0x0e50 c0x0000 (---------------) + I toyoura + 0x00287f88, // n0x0e51 c0x0000 (---------------) + I tsubetsu + 0x00323009, // n0x0e52 c0x0000 (---------------) + I tsukigata + 0x0025c2c7, // n0x0e53 c0x0000 (---------------) + I urakawa + 0x002949c6, // n0x0e54 c0x0000 (---------------) + I urausu + 0x0039e084, // n0x0e55 c0x0000 (---------------) + I uryu + 0x00201f89, // n0x0e56 c0x0000 (---------------) + I utashinai + 0x00378908, // n0x0e57 c0x0000 (---------------) + I wakkanai + 0x0025c407, // n0x0e58 c0x0000 (---------------) + I wassamu + 0x002569c6, // n0x0e59 c0x0000 (---------------) + I yakumo + 0x0035b786, // n0x0e5a c0x0000 (---------------) + I yoichi + 0x00300a44, // n0x0e5b c0x0000 (---------------) + I aioi + 0x0029ee06, // n0x0e5c c0x0000 (---------------) + I akashi + 0x0020e683, // n0x0e5d c0x0000 (---------------) + I ako + 0x002bce89, // n0x0e5e c0x0000 (---------------) + I amagasaki + 0x00203046, // n0x0e5f c0x0000 (---------------) + I aogaki + 0x00293085, // n0x0e60 c0x0000 (---------------) + I asago + 0x00294ec6, // n0x0e61 c0x0000 (---------------) + I ashiya + 0x0029a6c5, // n0x0e62 c0x0000 (---------------) + I awaji + 0x002772c8, // n0x0e63 c0x0000 (---------------) + I fukusaki + 0x00247ec7, // n0x0e64 c0x0000 (---------------) + I goshiki + 0x00207186, // n0x0e65 c0x0000 (---------------) + I harima + 0x0031ac86, // n0x0e66 c0x0000 (---------------) + I himeji + 0x003335c8, // n0x0e67 c0x0000 (---------------) + I ichikawa + 0x00296a87, // n0x0e68 c0x0000 (---------------) + I inagawa + 0x00294b85, // n0x0e69 c0x0000 (---------------) + I itami + 0x002953c8, // n0x0e6a c0x0000 (---------------) + I kakogawa + 0x00371c88, // n0x0e6b c0x0000 (---------------) + I kamigori + 0x002e0f88, // n0x0e6c c0x0000 (---------------) + I kamikawa + 0x002a5905, // n0x0e6d c0x0000 (---------------) + I kasai + 0x00300306, // n0x0e6e c0x0000 (---------------) + I kasuga + 0x002e33c9, // n0x0e6f c0x0000 (---------------) + I kawanishi + 0x0021eb04, // n0x0e70 c0x0000 (---------------) + I miki + 0x003694cb, // n0x0e71 c0x0000 (---------------) + I minamiawaji + 0x0021d08b, // n0x0e72 c0x0000 (---------------) + I nishinomiya + 0x0025ee49, // n0x0e73 c0x0000 (---------------) + I nishiwaki + 0x0020e703, // n0x0e74 c0x0000 (---------------) + I ono + 0x002529c5, // n0x0e75 c0x0000 (---------------) + I sanda + 0x0020a686, // n0x0e76 c0x0000 (---------------) + I sannan + 0x002ad908, // n0x0e77 c0x0000 (---------------) + I sasayama + 0x0022fc04, // n0x0e78 c0x0000 (---------------) + I sayo + 0x002a9586, // n0x0e79 c0x0000 (---------------) + I shingu + 0x002c9149, // n0x0e7a c0x0000 (---------------) + I shinonsen + 0x002b6345, // n0x0e7b c0x0000 (---------------) + I shiso + 0x002b9b06, // n0x0e7c c0x0000 (---------------) + I sumoto + 0x00213006, // n0x0e7d c0x0000 (---------------) + I taishi + 0x002155c4, // n0x0e7e c0x0000 (---------------) + I taka + 0x0028cc8a, // n0x0e7f c0x0000 (---------------) + I takarazuka + 0x00292fc8, // n0x0e80 c0x0000 (---------------) + I takasago + 0x002301c6, // n0x0e81 c0x0000 (---------------) + I takino + 0x00301785, // n0x0e82 c0x0000 (---------------) + I tamba + 0x00208c07, // n0x0e83 c0x0000 (---------------) + I tatsuno + 0x00251a87, // n0x0e84 c0x0000 (---------------) + I toyooka + 0x0034c804, // n0x0e85 c0x0000 (---------------) + I yabu + 0x0021d2c7, // n0x0e86 c0x0000 (---------------) + I yashiro + 0x00241684, // n0x0e87 c0x0000 (---------------) + I yoka + 0x00241686, // n0x0e88 c0x0000 (---------------) + I yokawa + 0x0020f943, // n0x0e89 c0x0000 (---------------) + I ami + 0x002b9085, // n0x0e8a c0x0000 (---------------) + I asahi + 0x00347c45, // n0x0e8b c0x0000 (---------------) + I bando + 0x00213388, // n0x0e8c c0x0000 (---------------) + I chikusei + 0x0025cc45, // n0x0e8d c0x0000 (---------------) + I daigo + 0x00272849, // n0x0e8e c0x0000 (---------------) + I fujishiro + 0x00299f47, // n0x0e8f c0x0000 (---------------) + I hitachi + 0x002a65cb, // n0x0e90 c0x0000 (---------------) + I hitachinaka + 0x00299f4c, // n0x0e91 c0x0000 (---------------) + I hitachiomiya + 0x0029abca, // n0x0e92 c0x0000 (---------------) + I hitachiota + 0x002bebc7, // n0x0e93 c0x0000 (---------------) + I ibaraki + 0x002020c3, // n0x0e94 c0x0000 (---------------) + I ina + 0x00318e48, // n0x0e95 c0x0000 (---------------) + I inashiki + 0x002a5ac5, // n0x0e96 c0x0000 (---------------) + I itako + 0x002b4bc5, // n0x0e97 c0x0000 (---------------) + I iwama + 0x0032ec84, // n0x0e98 c0x0000 (---------------) + I joso + 0x002ae886, // n0x0e99 c0x0000 (---------------) + I kamisu + 0x00237b46, // n0x0e9a c0x0000 (---------------) + I kasama + 0x0029ee47, // n0x0e9b c0x0000 (---------------) + I kashima + 0x0037fa8b, // n0x0e9c c0x0000 (---------------) + I kasumigaura + 0x00223544, // n0x0e9d c0x0000 (---------------) + I koga + 0x0034e384, // n0x0e9e c0x0000 (---------------) + I miho + 0x002ba004, // n0x0e9f c0x0000 (---------------) + I mito + 0x002c4786, // n0x0ea0 c0x0000 (---------------) + I moriya + 0x0020efc4, // n0x0ea1 c0x0000 (---------------) + I naka + 0x002b9748, // n0x0ea2 c0x0000 (---------------) + I namegata + 0x0032ea85, // n0x0ea3 c0x0000 (---------------) + I oarai + 0x00227945, // n0x0ea4 c0x0000 (---------------) + I ogawa + 0x002e2607, // n0x0ea5 c0x0000 (---------------) + I omitama + 0x0039e0c9, // n0x0ea6 c0x0000 (---------------) + I ryugasaki + 0x003487c5, // n0x0ea7 c0x0000 (---------------) + I sakai + 0x0036f20a, // n0x0ea8 c0x0000 (---------------) + I sakuragawa + 0x0039ff49, // n0x0ea9 c0x0000 (---------------) + I shimodate + 0x0027328a, // n0x0eaa c0x0000 (---------------) + I shimotsuma + 0x003910c9, // n0x0eab c0x0000 (---------------) + I shirosato + 0x0032c904, // n0x0eac c0x0000 (---------------) + I sowa + 0x002d4285, // n0x0ead c0x0000 (---------------) + I suifu + 0x002eddc8, // n0x0eae c0x0000 (---------------) + I takahagi + 0x002ecd0b, // n0x0eaf c0x0000 (---------------) + I tamatsukuri + 0x002f1405, // n0x0eb0 c0x0000 (---------------) + I tokai + 0x0027fb86, // n0x0eb1 c0x0000 (---------------) + I tomobe + 0x0021fdc4, // n0x0eb2 c0x0000 (---------------) + I tone + 0x00272d86, // n0x0eb3 c0x0000 (---------------) + I toride + 0x0025c149, // n0x0eb4 c0x0000 (---------------) + I tsuchiura + 0x0033d187, // n0x0eb5 c0x0000 (---------------) + I tsukuba + 0x0030af88, // n0x0eb6 c0x0000 (---------------) + I uchihara + 0x0022c486, // n0x0eb7 c0x0000 (---------------) + I ushiku + 0x003a2a87, // n0x0eb8 c0x0000 (---------------) + I yachiyo + 0x00277b48, // n0x0eb9 c0x0000 (---------------) + I yamagata + 0x00382306, // n0x0eba c0x0000 (---------------) + I yawara + 0x00242084, // n0x0ebb c0x0000 (---------------) + I yuki + 0x00358a07, // n0x0ebc c0x0000 (---------------) + I anamizu + 0x00337085, // n0x0ebd c0x0000 (---------------) + I hakui + 0x003419c7, // n0x0ebe c0x0000 (---------------) + I hakusan + 0x00200fc4, // n0x0ebf c0x0000 (---------------) + I kaga + 0x0034eac6, // n0x0ec0 c0x0000 (---------------) + I kahoku + 0x00386988, // n0x0ec1 c0x0000 (---------------) + I kanazawa + 0x0028c888, // n0x0ec2 c0x0000 (---------------) + I kawakita + 0x0028e9c7, // n0x0ec3 c0x0000 (---------------) + I komatsu + 0x00303408, // n0x0ec4 c0x0000 (---------------) + I nakanoto + 0x0028a145, // n0x0ec5 c0x0000 (---------------) + I nanao + 0x0020e544, // n0x0ec6 c0x0000 (---------------) + I nomi + 0x003334c8, // n0x0ec7 c0x0000 (---------------) + I nonoichi + 0x0024f5c4, // n0x0ec8 c0x0000 (---------------) + I noto + 0x0020af45, // n0x0ec9 c0x0000 (---------------) + I shika + 0x002e2e04, // n0x0eca c0x0000 (---------------) + I suzu + 0x00229507, // n0x0ecb c0x0000 (---------------) + I tsubata + 0x00281647, // n0x0ecc c0x0000 (---------------) + I tsurugi + 0x00278508, // n0x0ecd c0x0000 (---------------) + I uchinada + 0x0029a706, // n0x0ece c0x0000 (---------------) + I wajima + 0x0025cbc5, // n0x0ecf c0x0000 (---------------) + I fudai + 0x00272648, // n0x0ed0 c0x0000 (---------------) + I fujisawa + 0x00320248, // n0x0ed1 c0x0000 (---------------) + I hanamaki + 0x00296309, // n0x0ed2 c0x0000 (---------------) + I hiraizumi + 0x0021d386, // n0x0ed3 c0x0000 (---------------) + I hirono + 0x00231688, // n0x0ed4 c0x0000 (---------------) + I ichinohe + 0x00278c8a, // n0x0ed5 c0x0000 (---------------) + I ichinoseki + 0x002eb048, // n0x0ed6 c0x0000 (---------------) + I iwaizumi + 0x002d2505, // n0x0ed7 c0x0000 (---------------) + I iwate + 0x00222c46, // n0x0ed8 c0x0000 (---------------) + I joboji + 0x00285888, // n0x0ed9 c0x0000 (---------------) + I kamaishi + 0x002af44a, // n0x0eda c0x0000 (---------------) + I kanegasaki + 0x002a0d87, // n0x0edb c0x0000 (---------------) + I karumai + 0x0027e585, // n0x0edc c0x0000 (---------------) + I kawai + 0x0028b088, // n0x0edd c0x0000 (---------------) + I kitakami + 0x002f7c44, // n0x0ede c0x0000 (---------------) + I kuji + 0x002a50c6, // n0x0edf c0x0000 (---------------) + I kunohe + 0x002b5ec8, // n0x0ee0 c0x0000 (---------------) + I kuzumaki + 0x0020e5c6, // n0x0ee1 c0x0000 (---------------) + I miyako + 0x002bc248, // n0x0ee2 c0x0000 (---------------) + I mizusawa + 0x0021e947, // n0x0ee3 c0x0000 (---------------) + I morioka + 0x0020ddc6, // n0x0ee4 c0x0000 (---------------) + I ninohe + 0x00383dc4, // n0x0ee5 c0x0000 (---------------) + I noda + 0x002d4c07, // n0x0ee6 c0x0000 (---------------) + I ofunato + 0x002f2804, // n0x0ee7 c0x0000 (---------------) + I oshu + 0x0025c107, // n0x0ee8 c0x0000 (---------------) + I otsuchi + 0x0035a0cd, // n0x0ee9 c0x0000 (---------------) + I rikuzentakata + 0x0025eec5, // n0x0eea c0x0000 (---------------) + I shiwa + 0x002a9b4b, // n0x0eeb c0x0000 (---------------) + I shizukuishi + 0x00297d86, // n0x0eec c0x0000 (---------------) + I sumita + 0x0024b208, // n0x0eed c0x0000 (---------------) + I tanohata + 0x00398284, // n0x0eee c0x0000 (---------------) + I tono + 0x0026f246, // n0x0eef c0x0000 (---------------) + I yahaba + 0x00274a86, // n0x0ef0 c0x0000 (---------------) + I yamada + 0x00268547, // n0x0ef1 c0x0000 (---------------) + I ayagawa + 0x0028bf0d, // n0x0ef2 c0x0000 (---------------) + I higashikagawa + 0x002bbec7, // n0x0ef3 c0x0000 (---------------) + I kanonji + 0x002f8ec8, // n0x0ef4 c0x0000 (---------------) + I kotohira + 0x0024a485, // n0x0ef5 c0x0000 (---------------) + I manno + 0x0029ef88, // n0x0ef6 c0x0000 (---------------) + I marugame + 0x002ba406, // n0x0ef7 c0x0000 (---------------) + I mitoyo + 0x0028a1c8, // n0x0ef8 c0x0000 (---------------) + I naoshima + 0x00213906, // n0x0ef9 c0x0000 (---------------) + I sanuki + 0x00322747, // n0x0efa c0x0000 (---------------) + I tadotsu + 0x003231c9, // n0x0efb c0x0000 (---------------) + I takamatsu + 0x00398287, // n0x0efc c0x0000 (---------------) + I tonosho + 0x00280808, // n0x0efd c0x0000 (---------------) + I uchinomi + 0x0026bf85, // n0x0efe c0x0000 (---------------) + I utazu + 0x0021a888, // n0x0eff c0x0000 (---------------) + I zentsuji + 0x003234c5, // n0x0f00 c0x0000 (---------------) + I akune + 0x00245d05, // n0x0f01 c0x0000 (---------------) + I amami + 0x0027ff05, // n0x0f02 c0x0000 (---------------) + I hioki + 0x00222783, // n0x0f03 c0x0000 (---------------) + I isa + 0x00279804, // n0x0f04 c0x0000 (---------------) + I isen + 0x0026a785, // n0x0f05 c0x0000 (---------------) + I izumi + 0x002c3e09, // n0x0f06 c0x0000 (---------------) + I kagoshima + 0x002a2a46, // n0x0f07 c0x0000 (---------------) + I kanoya + 0x002c2d08, // n0x0f08 c0x0000 (---------------) + I kawanabe + 0x002af645, // n0x0f09 c0x0000 (---------------) + I kinko + 0x00329cc7, // n0x0f0a c0x0000 (---------------) + I kouyama + 0x00249c0a, // n0x0f0b c0x0000 (---------------) + I makurazaki + 0x002b9a49, // n0x0f0c c0x0000 (---------------) + I matsumoto + 0x0029ddca, // n0x0f0d c0x0000 (---------------) + I minamitane + 0x002c9c48, // n0x0f0e c0x0000 (---------------) + I nakatane + 0x0021e10c, // n0x0f0f c0x0000 (---------------) + I nishinoomote + 0x0027950d, // n0x0f10 c0x0000 (---------------) + I satsumasendai + 0x002e7983, // n0x0f11 c0x0000 (---------------) + I soo + 0x002bc148, // n0x0f12 c0x0000 (---------------) + I tarumizu + 0x00206845, // n0x0f13 c0x0000 (---------------) + I yusui + 0x0030ef86, // n0x0f14 c0x0000 (---------------) + I aikawa + 0x0034df86, // n0x0f15 c0x0000 (---------------) + I atsugi + 0x00246c05, // n0x0f16 c0x0000 (---------------) + I ayase + 0x00283789, // n0x0f17 c0x0000 (---------------) + I chigasaki + 0x002a1885, // n0x0f18 c0x0000 (---------------) + I ebina + 0x00272648, // n0x0f19 c0x0000 (---------------) + I fujisawa + 0x0024f4c6, // n0x0f1a c0x0000 (---------------) + I hadano + 0x00328f06, // n0x0f1b c0x0000 (---------------) + I hakone + 0x00297509, // n0x0f1c c0x0000 (---------------) + I hiratsuka + 0x00381b07, // n0x0f1d c0x0000 (---------------) + I isehara + 0x002f4386, // n0x0f1e c0x0000 (---------------) + I kaisei + 0x00249b88, // n0x0f1f c0x0000 (---------------) + I kamakura + 0x0031a308, // n0x0f20 c0x0000 (---------------) + I kiyokawa + 0x0024d447, // n0x0f21 c0x0000 (---------------) + I matsuda + 0x003524ce, // n0x0f22 c0x0000 (---------------) + I minamiashigara + 0x002ba645, // n0x0f23 c0x0000 (---------------) + I miura + 0x00255e45, // n0x0f24 c0x0000 (---------------) + I nakai + 0x0020e4c8, // n0x0f25 c0x0000 (---------------) + I ninomiya + 0x00207bc7, // n0x0f26 c0x0000 (---------------) + I odawara + 0x0022d6c2, // n0x0f27 c0x0000 (---------------) + I oi + 0x002b2f04, // n0x0f28 c0x0000 (---------------) + I oiso + 0x00362b8a, // n0x0f29 c0x0000 (---------------) + I sagamihara + 0x0025c4c8, // n0x0f2a c0x0000 (---------------) + I samukawa + 0x00356a06, // n0x0f2b c0x0000 (---------------) + I tsukui + 0x0028f108, // n0x0f2c c0x0000 (---------------) + I yamakita + 0x0021ec86, // n0x0f2d c0x0000 (---------------) + I yamato + 0x00256748, // n0x0f2e c0x0000 (---------------) + I yokosuka + 0x002a3f08, // n0x0f2f c0x0000 (---------------) + I yugawara + 0x00245cc4, // n0x0f30 c0x0000 (---------------) + I zama + 0x00359085, // n0x0f31 c0x0000 (---------------) + I zushi + 0x0067e804, // n0x0f32 c0x0001 (---------------) ! I city + 0x0067e804, // n0x0f33 c0x0001 (---------------) ! I city + 0x0067e804, // n0x0f34 c0x0001 (---------------) ! I city + 0x00203103, // n0x0f35 c0x0000 (---------------) + I aki + 0x0035b606, // n0x0f36 c0x0000 (---------------) + I geisei + 0x00272b06, // n0x0f37 c0x0000 (---------------) + I hidaka + 0x0029420c, // n0x0f38 c0x0000 (---------------) + I higashitsuno + 0x00205943, // n0x0f39 c0x0000 (---------------) + I ino + 0x002b6c86, // n0x0f3a c0x0000 (---------------) + I kagami + 0x0020f904, // n0x0f3b c0x0000 (---------------) + I kami + 0x002bed08, // n0x0f3c c0x0000 (---------------) + I kitagawa + 0x002c8f85, // n0x0f3d c0x0000 (---------------) + I kochi + 0x00362c86, // n0x0f3e c0x0000 (---------------) + I mihara + 0x002b0508, // n0x0f3f c0x0000 (---------------) + I motoyama + 0x002cb286, // n0x0f40 c0x0000 (---------------) + I muroto + 0x00207106, // n0x0f41 c0x0000 (---------------) + I nahari + 0x00359dc8, // n0x0f42 c0x0000 (---------------) + I nakamura + 0x00298007, // n0x0f43 c0x0000 (---------------) + I nankoku + 0x00352049, // n0x0f44 c0x0000 (---------------) + I nishitosa + 0x002f654a, // n0x0f45 c0x0000 (---------------) + I niyodogawa + 0x0024cb44, // n0x0f46 c0x0000 (---------------) + I ochi + 0x002416c5, // n0x0f47 c0x0000 (---------------) + I okawa + 0x00254ac5, // n0x0f48 c0x0000 (---------------) + I otoyo + 0x0021e446, // n0x0f49 c0x0000 (---------------) + I otsuki + 0x0024ce06, // n0x0f4a c0x0000 (---------------) + I sakawa + 0x0029d206, // n0x0f4b c0x0000 (---------------) + I sukumo + 0x002e22c6, // n0x0f4c c0x0000 (---------------) + I susaki + 0x00352184, // n0x0f4d c0x0000 (---------------) + I tosa + 0x0035218b, // n0x0f4e c0x0000 (---------------) + I tosashimizu + 0x00241604, // n0x0f4f c0x0000 (---------------) + I toyo + 0x00208c85, // n0x0f50 c0x0000 (---------------) + I tsuno + 0x002a2f05, // n0x0f51 c0x0000 (---------------) + I umaji + 0x0026ab06, // n0x0f52 c0x0000 (---------------) + I yasuda + 0x00202948, // n0x0f53 c0x0000 (---------------) + I yusuhara + 0x002793c7, // n0x0f54 c0x0000 (---------------) + I amakusa + 0x0030ad44, // n0x0f55 c0x0000 (---------------) + I arao + 0x00233543, // n0x0f56 c0x0000 (---------------) + I aso + 0x002f7745, // n0x0f57 c0x0000 (---------------) + I choyo + 0x00242947, // n0x0f58 c0x0000 (---------------) + I gyokuto + 0x0029b289, // n0x0f59 c0x0000 (---------------) + I hitoyoshi + 0x002792cb, // n0x0f5a c0x0000 (---------------) + I kamiamakusa + 0x0029ee47, // n0x0f5b c0x0000 (---------------) + I kashima + 0x00213287, // n0x0f5c c0x0000 (---------------) + I kikuchi + 0x002d7704, // n0x0f5d c0x0000 (---------------) + I kosa + 0x002b0408, // n0x0f5e c0x0000 (---------------) + I kumamoto + 0x00329e07, // n0x0f5f c0x0000 (---------------) + I mashiki + 0x0029b4c6, // n0x0f60 c0x0000 (---------------) + I mifune + 0x00241e08, // n0x0f61 c0x0000 (---------------) + I minamata + 0x0028180b, // n0x0f62 c0x0000 (---------------) + I minamioguni + 0x002bb706, // n0x0f63 c0x0000 (---------------) + I nagasu + 0x00214789, // n0x0f64 c0x0000 (---------------) + I nishihara + 0x00281985, // n0x0f65 c0x0000 (---------------) + I oguni + 0x002f6fc3, // n0x0f66 c0x0000 (---------------) + I ozu + 0x002b9b06, // n0x0f67 c0x0000 (---------------) + I sumoto + 0x0021e848, // n0x0f68 c0x0000 (---------------) + I takamori + 0x002139c3, // n0x0f69 c0x0000 (---------------) + I uki + 0x00216443, // n0x0f6a c0x0000 (---------------) + I uto + 0x00277b46, // n0x0f6b c0x0000 (---------------) + I yamaga + 0x0021ec86, // n0x0f6c c0x0000 (---------------) + I yamato + 0x0037dc0a, // n0x0f6d c0x0000 (---------------) + I yatsushiro + 0x00274205, // n0x0f6e c0x0000 (---------------) + I ayabe + 0x002748cb, // n0x0f6f c0x0000 (---------------) + I fukuchiyama + 0x00294e0b, // n0x0f70 c0x0000 (---------------) + I higashiyama + 0x0022d703, // n0x0f71 c0x0000 (---------------) + I ide + 0x0021b783, // n0x0f72 c0x0000 (---------------) + I ine + 0x002a74c4, // n0x0f73 c0x0000 (---------------) + I joyo + 0x00322b87, // n0x0f74 c0x0000 (---------------) + I kameoka + 0x0021e8c4, // n0x0f75 c0x0000 (---------------) + I kamo + 0x0020cb44, // n0x0f76 c0x0000 (---------------) + I kita + 0x00304804, // n0x0f77 c0x0000 (---------------) + I kizu + 0x002eb348, // n0x0f78 c0x0000 (---------------) + I kumiyama + 0x003016c8, // n0x0f79 c0x0000 (---------------) + I kyotamba + 0x002ffa89, // n0x0f7a c0x0000 (---------------) + I kyotanabe + 0x002ef0c8, // n0x0f7b c0x0000 (---------------) + I kyotango + 0x002a7dc7, // n0x0f7c c0x0000 (---------------) + I maizuru + 0x00236f86, // n0x0f7d c0x0000 (---------------) + I minami + 0x002c294f, // n0x0f7e c0x0000 (---------------) + I minamiyamashiro + 0x002ba786, // n0x0f7f c0x0000 (---------------) + I miyazu + 0x002c8f04, // n0x0f80 c0x0000 (---------------) + I muko + 0x0030150a, // n0x0f81 c0x0000 (---------------) + I nagaokakyo + 0x00242847, // n0x0f82 c0x0000 (---------------) + I nakagyo + 0x0020d286, // n0x0f83 c0x0000 (---------------) + I nantan + 0x00286089, // n0x0f84 c0x0000 (---------------) + I oyamazaki + 0x002ffa05, // n0x0f85 c0x0000 (---------------) + I sakyo + 0x002134c5, // n0x0f86 c0x0000 (---------------) + I seika + 0x002ffb46, // n0x0f87 c0x0000 (---------------) + I tanabe + 0x0021a9c3, // n0x0f88 c0x0000 (---------------) + I uji + 0x002f7c89, // n0x0f89 c0x0000 (---------------) + I ujitawara + 0x0021b0c6, // n0x0f8a c0x0000 (---------------) + I wazuka + 0x00322dc9, // n0x0f8b c0x0000 (---------------) + I yamashina + 0x0038a646, // n0x0f8c c0x0000 (---------------) + I yawata + 0x002b9085, // n0x0f8d c0x0000 (---------------) + I asahi + 0x00222905, // n0x0f8e c0x0000 (---------------) + I inabe + 0x00204403, // n0x0f8f c0x0000 (---------------) + I ise + 0x00322cc8, // n0x0f90 c0x0000 (---------------) + I kameyama + 0x00396247, // n0x0f91 c0x0000 (---------------) + I kawagoe + 0x002ead04, // n0x0f92 c0x0000 (---------------) + I kiho + 0x0021e548, // n0x0f93 c0x0000 (---------------) + I kisosaki + 0x0028d584, // n0x0f94 c0x0000 (---------------) + I kiwa + 0x0038e086, // n0x0f95 c0x0000 (---------------) + I komono + 0x0027eb46, // n0x0f96 c0x0000 (---------------) + I kumano + 0x0023db46, // n0x0f97 c0x0000 (---------------) + I kuwana + 0x002c52c9, // n0x0f98 c0x0000 (---------------) + I matsusaka + 0x002b4b45, // n0x0f99 c0x0000 (---------------) + I meiwa + 0x0028d806, // n0x0f9a c0x0000 (---------------) + I mihama + 0x00253d89, // n0x0f9b c0x0000 (---------------) + I minamiise + 0x002b94c6, // n0x0f9c c0x0000 (---------------) + I misugi + 0x002c2a46, // n0x0f9d c0x0000 (---------------) + I miyama + 0x0037abc6, // n0x0f9e c0x0000 (---------------) + I nabari + 0x00209c05, // n0x0f9f c0x0000 (---------------) + I shima + 0x002e2e06, // n0x0fa0 c0x0000 (---------------) + I suzuka + 0x00322744, // n0x0fa1 c0x0000 (---------------) + I tado + 0x00270145, // n0x0fa2 c0x0000 (---------------) + I taiki + 0x002301c4, // n0x0fa3 c0x0000 (---------------) + I taki + 0x00304706, // n0x0fa4 c0x0000 (---------------) + I tamaki + 0x00391284, // n0x0fa5 c0x0000 (---------------) + I toba + 0x00208c83, // n0x0fa6 c0x0000 (---------------) + I tsu + 0x0027e245, // n0x0fa7 c0x0000 (---------------) + I udono + 0x002361c8, // n0x0fa8 c0x0000 (---------------) + I ureshino + 0x0021a287, // n0x0fa9 c0x0000 (---------------) + I watarai + 0x002adcc9, // n0x0faa c0x0000 (---------------) + I yokkaichi + 0x0027e488, // n0x0fab c0x0000 (---------------) + I furukawa + 0x0028e211, // n0x0fac c0x0000 (---------------) + I higashimatsushima + 0x0021308a, // n0x0fad c0x0000 (---------------) + I ishinomaki + 0x00230007, // n0x0fae c0x0000 (---------------) + I iwanuma + 0x002e42c6, // n0x0faf c0x0000 (---------------) + I kakuda + 0x0020f904, // n0x0fb0 c0x0000 (---------------) + I kami + 0x002b3b88, // n0x0fb1 c0x0000 (---------------) + I kawasaki + 0x0020bc09, // n0x0fb2 c0x0000 (---------------) + I kesennuma + 0x002546c8, // n0x0fb3 c0x0000 (---------------) + I marumori + 0x0028e3ca, // n0x0fb4 c0x0000 (---------------) + I matsushima + 0x0029d40d, // n0x0fb5 c0x0000 (---------------) + I minamisanriku + 0x002964c6, // n0x0fb6 c0x0000 (---------------) + I misato + 0x00359ec6, // n0x0fb7 c0x0000 (---------------) + I murata + 0x002d4cc6, // n0x0fb8 c0x0000 (---------------) + I natori + 0x00380187, // n0x0fb9 c0x0000 (---------------) + I ogawara + 0x002967c5, // n0x0fba c0x0000 (---------------) + I ohira + 0x0034c5c7, // n0x0fbb c0x0000 (---------------) + I onagawa + 0x0021e605, // n0x0fbc c0x0000 (---------------) + I osaki + 0x00291204, // n0x0fbd c0x0000 (---------------) + I rifu + 0x0029f686, // n0x0fbe c0x0000 (---------------) + I semine + 0x00300147, // n0x0fbf c0x0000 (---------------) + I shibata + 0x002f798d, // n0x0fc0 c0x0000 (---------------) + I shichikashuku + 0x002857c7, // n0x0fc1 c0x0000 (---------------) + I shikama + 0x00372ac8, // n0x0fc2 c0x0000 (---------------) + I shiogama + 0x00272949, // n0x0fc3 c0x0000 (---------------) + I shiroishi + 0x00222b46, // n0x0fc4 c0x0000 (---------------) + I tagajo + 0x00235285, // n0x0fc5 c0x0000 (---------------) + I taiwa + 0x00215144, // n0x0fc6 c0x0000 (---------------) + I tome + 0x0025d286, // n0x0fc7 c0x0000 (---------------) + I tomiya + 0x0034c706, // n0x0fc8 c0x0000 (---------------) + I wakuya + 0x0025c646, // n0x0fc9 c0x0000 (---------------) + I watari + 0x00292048, // n0x0fca c0x0000 (---------------) + I yamamoto + 0x00209ac3, // n0x0fcb c0x0000 (---------------) + I zao + 0x0020ea43, // n0x0fcc c0x0000 (---------------) + I aya + 0x00309905, // n0x0fcd c0x0000 (---------------) + I ebino + 0x00237fc6, // n0x0fce c0x0000 (---------------) + I gokase + 0x002a3ec5, // n0x0fcf c0x0000 (---------------) + I hyuga + 0x0022c688, // n0x0fd0 c0x0000 (---------------) + I kadogawa + 0x00293bca, // n0x0fd1 c0x0000 (---------------) + I kawaminami + 0x002cd784, // n0x0fd2 c0x0000 (---------------) + I kijo + 0x002bed08, // n0x0fd3 c0x0000 (---------------) + I kitagawa + 0x0028cb08, // n0x0fd4 c0x0000 (---------------) + I kitakata + 0x0026a947, // n0x0fd5 c0x0000 (---------------) + I kitaura + 0x002af709, // n0x0fd6 c0x0000 (---------------) + I kobayashi + 0x002b0108, // n0x0fd7 c0x0000 (---------------) + I kunitomi + 0x0027f287, // n0x0fd8 c0x0000 (---------------) + I kushima + 0x0028b986, // n0x0fd9 c0x0000 (---------------) + I mimata + 0x0020e5ca, // n0x0fda c0x0000 (---------------) + I miyakonojo + 0x0025d308, // n0x0fdb c0x0000 (---------------) + I miyazaki + 0x002ae6c9, // n0x0fdc c0x0000 (---------------) + I morotsuka + 0x0027ac08, // n0x0fdd c0x0000 (---------------) + I nichinan + 0x0021bd49, // n0x0fde c0x0000 (---------------) + I nishimera + 0x00348e47, // n0x0fdf c0x0000 (---------------) + I nobeoka + 0x00340745, // n0x0fe0 c0x0000 (---------------) + I saito + 0x00298ec6, // n0x0fe1 c0x0000 (---------------) + I shiiba + 0x002890c8, // n0x0fe2 c0x0000 (---------------) + I shintomi + 0x0024b388, // n0x0fe3 c0x0000 (---------------) + I takaharu + 0x002155c8, // n0x0fe4 c0x0000 (---------------) + I takanabe + 0x00218288, // n0x0fe5 c0x0000 (---------------) + I takazaki + 0x00208c85, // n0x0fe6 c0x0000 (---------------) + I tsuno + 0x00205884, // n0x0fe7 c0x0000 (---------------) + I achi + 0x00395f48, // n0x0fe8 c0x0000 (---------------) + I agematsu + 0x00200b44, // n0x0fe9 c0x0000 (---------------) + I anan + 0x00390ec4, // n0x0fea c0x0000 (---------------) + I aoki + 0x002b9085, // n0x0feb c0x0000 (---------------) + I asahi + 0x002882c7, // n0x0fec c0x0000 (---------------) + I azumino + 0x0039de89, // n0x0fed c0x0000 (---------------) + I chikuhoku + 0x00268347, // n0x0fee c0x0000 (---------------) + I chikuma + 0x002058c5, // n0x0fef c0x0000 (---------------) + I chino + 0x00270c06, // n0x0ff0 c0x0000 (---------------) + I fujimi + 0x00334346, // n0x0ff1 c0x0000 (---------------) + I hakuba + 0x00202a44, // n0x0ff2 c0x0000 (---------------) + I hara + 0x00297846, // n0x0ff3 c0x0000 (---------------) + I hiraya + 0x0025ca04, // n0x0ff4 c0x0000 (---------------) + I iida + 0x002545c6, // n0x0ff5 c0x0000 (---------------) + I iijima + 0x00300486, // n0x0ff6 c0x0000 (---------------) + I iiyama + 0x00217506, // n0x0ff7 c0x0000 (---------------) + I iizuna + 0x00202b85, // n0x0ff8 c0x0000 (---------------) + I ikeda + 0x0022c547, // n0x0ff9 c0x0000 (---------------) + I ikusaka + 0x002020c3, // n0x0ffa c0x0000 (---------------) + I ina + 0x00224dc9, // n0x0ffb c0x0000 (---------------) + I karuizawa + 0x002f4088, // n0x0ffc c0x0000 (---------------) + I kawakami + 0x0021e544, // n0x0ffd c0x0000 (---------------) + I kiso + 0x0027f10d, // n0x0ffe c0x0000 (---------------) + I kisofukushima + 0x0028c988, // n0x0fff c0x0000 (---------------) + I kitaaiki + 0x002852c8, // n0x1000 c0x0000 (---------------) + I komagane + 0x002ae646, // n0x1001 c0x0000 (---------------) + I komoro + 0x003232c9, // n0x1002 c0x0000 (---------------) + I matsukawa + 0x002b9a49, // n0x1003 c0x0000 (---------------) + I matsumoto + 0x0025be45, // n0x1004 c0x0000 (---------------) + I miasa + 0x00293cca, // n0x1005 c0x0000 (---------------) + I minamiaiki + 0x0026710a, // n0x1006 c0x0000 (---------------) + I minamimaki + 0x002769cc, // n0x1007 c0x0000 (---------------) + I minamiminowa + 0x00276b46, // n0x1008 c0x0000 (---------------) + I minowa + 0x002714c6, // n0x1009 c0x0000 (---------------) + I miyada + 0x002bb006, // n0x100a c0x0000 (---------------) + I miyota + 0x0024ff49, // n0x100b c0x0000 (---------------) + I mochizuki + 0x0030f1c6, // n0x100c c0x0000 (---------------) + I nagano + 0x00296ac6, // n0x100d c0x0000 (---------------) + I nagawa + 0x002a1946, // n0x100e c0x0000 (---------------) + I nagiso + 0x002a6788, // n0x100f c0x0000 (---------------) + I nakagawa + 0x00303406, // n0x1010 c0x0000 (---------------) + I nakano + 0x002c560b, // n0x1011 c0x0000 (---------------) + I nozawaonsen + 0x00288445, // n0x1012 c0x0000 (---------------) + I obuse + 0x00227945, // n0x1013 c0x0000 (---------------) + I ogawa + 0x00271745, // n0x1014 c0x0000 (---------------) + I okaya + 0x00389cc6, // n0x1015 c0x0000 (---------------) + I omachi + 0x0020e583, // n0x1016 c0x0000 (---------------) + I omi + 0x0023dac6, // n0x1017 c0x0000 (---------------) + I ookuwa + 0x00285747, // n0x1018 c0x0000 (---------------) + I ooshika + 0x002b3a45, // n0x1019 c0x0000 (---------------) + I otaki + 0x00254bc5, // n0x101a c0x0000 (---------------) + I otari + 0x002dc785, // n0x101b c0x0000 (---------------) + I sakae + 0x002f5506, // n0x101c c0x0000 (---------------) + I sakaki + 0x0025bf04, // n0x101d c0x0000 (---------------) + I saku + 0x00368506, // n0x101e c0x0000 (---------------) + I sakuho + 0x00265109, // n0x101f c0x0000 (---------------) + I shimosuwa + 0x00389b4c, // n0x1020 c0x0000 (---------------) + I shinanomachi + 0x00290f48, // n0x1021 c0x0000 (---------------) + I shiojiri + 0x0020b584, // n0x1022 c0x0000 (---------------) + I suwa + 0x002e2a46, // n0x1023 c0x0000 (---------------) + I suzaka + 0x00297e86, // n0x1024 c0x0000 (---------------) + I takagi + 0x0021e848, // n0x1025 c0x0000 (---------------) + I takamori + 0x002b98c8, // n0x1026 c0x0000 (---------------) + I takayama + 0x00389a49, // n0x1027 c0x0000 (---------------) + I tateshina + 0x00208c07, // n0x1028 c0x0000 (---------------) + I tatsuno + 0x00366a09, // n0x1029 c0x0000 (---------------) + I togakushi + 0x00269086, // n0x102a c0x0000 (---------------) + I togura + 0x0022b304, // n0x102b c0x0000 (---------------) + I tomi + 0x0020b204, // n0x102c c0x0000 (---------------) + I ueda + 0x00256304, // n0x102d c0x0000 (---------------) + I wada + 0x00277b48, // n0x102e c0x0000 (---------------) + I yamagata + 0x0039dcca, // n0x102f c0x0000 (---------------) + I yamanouchi + 0x00348746, // n0x1030 c0x0000 (---------------) + I yasaka + 0x0034dd87, // n0x1031 c0x0000 (---------------) + I yasuoka + 0x00330fc7, // n0x1032 c0x0000 (---------------) + I chijiwa + 0x002a55c5, // n0x1033 c0x0000 (---------------) + I futsu + 0x0027f844, // n0x1034 c0x0000 (---------------) + I goto + 0x00284886, // n0x1035 c0x0000 (---------------) + I hasami + 0x002f8fc6, // n0x1036 c0x0000 (---------------) + I hirado + 0x0021eb43, // n0x1037 c0x0000 (---------------) + I iki + 0x002f3ec7, // n0x1038 c0x0000 (---------------) + I isahaya + 0x0030a408, // n0x1039 c0x0000 (---------------) + I kawatana + 0x0025bf8a, // n0x103a c0x0000 (---------------) + I kuchinotsu + 0x002cbd08, // n0x103b c0x0000 (---------------) + I matsuura + 0x002cd608, // n0x103c c0x0000 (---------------) + I nagasaki + 0x003912c5, // n0x103d c0x0000 (---------------) + I obama + 0x0024a705, // n0x103e c0x0000 (---------------) + I omura + 0x002a8f05, // n0x103f c0x0000 (---------------) + I oseto + 0x002a5986, // n0x1040 c0x0000 (---------------) + I saikai + 0x002d5086, // n0x1041 c0x0000 (---------------) + I sasebo + 0x00210945, // n0x1042 c0x0000 (---------------) + I seihi + 0x002bd0c9, // n0x1043 c0x0000 (---------------) + I shimabara + 0x0027f64c, // n0x1044 c0x0000 (---------------) + I shinkamigoto + 0x002a8fc7, // n0x1045 c0x0000 (---------------) + I togitsu + 0x0028e448, // n0x1046 c0x0000 (---------------) + I tsushima + 0x00284ec5, // n0x1047 c0x0000 (---------------) + I unzen + 0x0067e804, // n0x1048 c0x0001 (---------------) ! I city + 0x00347c84, // n0x1049 c0x0000 (---------------) + I ando + 0x002a9e84, // n0x104a c0x0000 (---------------) + I gose + 0x00205a06, // n0x104b c0x0000 (---------------) + I heguri + 0x0029598e, // n0x104c c0x0000 (---------------) + I higashiyoshino + 0x00213547, // n0x104d c0x0000 (---------------) + I ikaruga + 0x00285285, // n0x104e c0x0000 (---------------) + I ikoma + 0x0021ea8c, // n0x104f c0x0000 (---------------) + I kamikitayama + 0x0028d447, // n0x1050 c0x0000 (---------------) + I kanmaki + 0x003000c7, // n0x1051 c0x0000 (---------------) + I kashiba + 0x00308a09, // n0x1052 c0x0000 (---------------) + I kashihara + 0x00219449, // n0x1053 c0x0000 (---------------) + I katsuragi + 0x0027e585, // n0x1054 c0x0000 (---------------) + I kawai + 0x002f4088, // n0x1055 c0x0000 (---------------) + I kawakami + 0x002e33c9, // n0x1056 c0x0000 (---------------) + I kawanishi + 0x002d27c5, // n0x1057 c0x0000 (---------------) + I koryo + 0x002b3988, // n0x1058 c0x0000 (---------------) + I kurotaki + 0x00260b86, // n0x1059 c0x0000 (---------------) + I mitsue + 0x002c3ac6, // n0x105a c0x0000 (---------------) + I miyake + 0x002b8c84, // n0x105b c0x0000 (---------------) + I nara + 0x00380688, // n0x105c c0x0000 (---------------) + I nosegawa + 0x00222d03, // n0x105d c0x0000 (---------------) + I oji + 0x0037e4c4, // n0x105e c0x0000 (---------------) + I ouda + 0x002f77c5, // n0x105f c0x0000 (---------------) + I oyodo + 0x002fe347, // n0x1060 c0x0000 (---------------) + I sakurai + 0x00208445, // n0x1061 c0x0000 (---------------) + I sango + 0x00278b49, // n0x1062 c0x0000 (---------------) + I shimoichi + 0x0025fc0d, // n0x1063 c0x0000 (---------------) + I shimokitayama + 0x0027d4c6, // n0x1064 c0x0000 (---------------) + I shinjo + 0x00233584, // n0x1065 c0x0000 (---------------) + I soni + 0x0028ba88, // n0x1066 c0x0000 (---------------) + I takatori + 0x00270e4a, // n0x1067 c0x0000 (---------------) + I tawaramoto + 0x002160c7, // n0x1068 c0x0000 (---------------) + I tenkawa + 0x0035a785, // n0x1069 c0x0000 (---------------) + I tenri + 0x0024d543, // n0x106a c0x0000 (---------------) + I uda + 0x00294fce, // n0x106b c0x0000 (---------------) + I yamatokoriyama + 0x0021ec8c, // n0x106c c0x0000 (---------------) + I yamatotakada + 0x002e7d87, // n0x106d c0x0000 (---------------) + I yamazoe + 0x00295b47, // n0x106e c0x0000 (---------------) + I yoshino + 0x00201003, // n0x106f c0x0000 (---------------) + I aga + 0x0030f205, // n0x1070 c0x0000 (---------------) + I agano + 0x002a9e85, // n0x1071 c0x0000 (---------------) + I gosen + 0x0028f4c8, // n0x1072 c0x0000 (---------------) + I itoigawa + 0x0028aec9, // n0x1073 c0x0000 (---------------) + I izumozaki + 0x0020b486, // n0x1074 c0x0000 (---------------) + I joetsu + 0x0021e8c4, // n0x1075 c0x0000 (---------------) + I kamo + 0x0022ff46, // n0x1076 c0x0000 (---------------) + I kariwa + 0x0031a0cb, // n0x1077 c0x0000 (---------------) + I kashiwazaki + 0x002ab94c, // n0x1078 c0x0000 (---------------) + I minamiuonuma + 0x00229dc7, // n0x1079 c0x0000 (---------------) + I mitsuke + 0x002c8c45, // n0x107a c0x0000 (---------------) + I muika + 0x00371b88, // n0x107b c0x0000 (---------------) + I murakami + 0x0024d205, // n0x107c c0x0000 (---------------) + I myoko + 0x00301507, // n0x107d c0x0000 (---------------) + I nagaoka + 0x0036b607, // n0x107e c0x0000 (---------------) + I niigata + 0x00243605, // n0x107f c0x0000 (---------------) + I ojiya + 0x0020e583, // n0x1080 c0x0000 (---------------) + I omi + 0x0035da84, // n0x1081 c0x0000 (---------------) + I sado + 0x0020a085, // n0x1082 c0x0000 (---------------) + I sanjo + 0x002f6205, // n0x1083 c0x0000 (---------------) + I seiro + 0x002f6206, // n0x1084 c0x0000 (---------------) + I seirou + 0x00262888, // n0x1085 c0x0000 (---------------) + I sekikawa + 0x00300147, // n0x1086 c0x0000 (---------------) + I shibata + 0x0034e286, // n0x1087 c0x0000 (---------------) + I tagami + 0x0030ee86, // n0x1088 c0x0000 (---------------) + I tainai + 0x0027fe46, // n0x1089 c0x0000 (---------------) + I tochio + 0x00287c09, // n0x108a c0x0000 (---------------) + I tokamachi + 0x00378b87, // n0x108b c0x0000 (---------------) + I tsubame + 0x0020b306, // n0x108c c0x0000 (---------------) + I tsunan + 0x002abac6, // n0x108d c0x0000 (---------------) + I uonuma + 0x002436c6, // n0x108e c0x0000 (---------------) + I yahiko + 0x0029ed05, // n0x108f c0x0000 (---------------) + I yoita + 0x00214e06, // n0x1090 c0x0000 (---------------) + I yuzawa + 0x0037f305, // n0x1091 c0x0000 (---------------) + I beppu + 0x002c3708, // n0x1092 c0x0000 (---------------) + I bungoono + 0x002873cb, // n0x1093 c0x0000 (---------------) + I bungotakada + 0x00284686, // n0x1094 c0x0000 (---------------) + I hasama + 0x00331004, // n0x1095 c0x0000 (---------------) + I hiji + 0x002af209, // n0x1096 c0x0000 (---------------) + I himeshima + 0x00299f44, // n0x1097 c0x0000 (---------------) + I hita + 0x00260b08, // n0x1098 c0x0000 (---------------) + I kamitsue + 0x00334507, // n0x1099 c0x0000 (---------------) + I kokonoe + 0x0027a304, // n0x109a c0x0000 (---------------) + I kuju + 0x002aeb88, // n0x109b c0x0000 (---------------) + I kunisaki + 0x002b5004, // n0x109c c0x0000 (---------------) + I kusu + 0x0029ed44, // n0x109d c0x0000 (---------------) + I oita + 0x0027f045, // n0x109e c0x0000 (---------------) + I saiki + 0x002d3b06, // n0x109f c0x0000 (---------------) + I taketa + 0x002eb287, // n0x10a0 c0x0000 (---------------) + I tsukumi + 0x00204783, // n0x10a1 c0x0000 (---------------) + I usa + 0x00294a85, // n0x10a2 c0x0000 (---------------) + I usuki + 0x002b7284, // n0x10a3 c0x0000 (---------------) + I yufu + 0x00255e86, // n0x10a4 c0x0000 (---------------) + I akaiwa + 0x0025bec8, // n0x10a5 c0x0000 (---------------) + I asakuchi + 0x0030a145, // n0x10a6 c0x0000 (---------------) + I bizen + 0x00287089, // n0x10a7 c0x0000 (---------------) + I hayashima + 0x002bebc5, // n0x10a8 c0x0000 (---------------) + I ibara + 0x002b6c88, // n0x10a9 c0x0000 (---------------) + I kagamino + 0x002fec47, // n0x10aa c0x0000 (---------------) + I kasaoka + 0x0037b8c8, // n0x10ab c0x0000 (---------------) + I kibichuo + 0x002adb07, // n0x10ac c0x0000 (---------------) + I kumenan + 0x00357a89, // n0x10ad c0x0000 (---------------) + I kurashiki + 0x0035a506, // n0x10ae c0x0000 (---------------) + I maniwa + 0x00318986, // n0x10af c0x0000 (---------------) + I misaki + 0x00261984, // n0x10b0 c0x0000 (---------------) + I nagi + 0x0028b8c5, // n0x10b1 c0x0000 (---------------) + I niimi + 0x002e994c, // n0x10b2 c0x0000 (---------------) + I nishiawakura + 0x00271747, // n0x10b3 c0x0000 (---------------) + I okayama + 0x00271e07, // n0x10b4 c0x0000 (---------------) + I satosho + 0x00330e88, // n0x10b5 c0x0000 (---------------) + I setouchi + 0x0027d4c6, // n0x10b6 c0x0000 (---------------) + I shinjo + 0x00296704, // n0x10b7 c0x0000 (---------------) + I shoo + 0x00317984, // n0x10b8 c0x0000 (---------------) + I soja + 0x00277cc9, // n0x10b9 c0x0000 (---------------) + I takahashi + 0x002bb106, // n0x10ba c0x0000 (---------------) + I tamano + 0x0020d747, // n0x10bb c0x0000 (---------------) + I tsuyama + 0x0027cc04, // n0x10bc c0x0000 (---------------) + I wake + 0x002a2b46, // n0x10bd c0x0000 (---------------) + I yakage + 0x00263f85, // n0x10be c0x0000 (---------------) + I aguni + 0x0029a247, // n0x10bf c0x0000 (---------------) + I ginowan + 0x002c5586, // n0x10c0 c0x0000 (---------------) + I ginoza + 0x002460c9, // n0x10c1 c0x0000 (---------------) + I gushikami + 0x00276807, // n0x10c2 c0x0000 (---------------) + I haebaru + 0x00260407, // n0x10c3 c0x0000 (---------------) + I higashi + 0x00297386, // n0x10c4 c0x0000 (---------------) + I hirara + 0x0022c005, // n0x10c5 c0x0000 (---------------) + I iheya + 0x00275fc8, // n0x10c6 c0x0000 (---------------) + I ishigaki + 0x0021af48, // n0x10c7 c0x0000 (---------------) + I ishikawa + 0x00237186, // n0x10c8 c0x0000 (---------------) + I itoman + 0x0030a185, // n0x10c9 c0x0000 (---------------) + I izena + 0x002bdd46, // n0x10ca c0x0000 (---------------) + I kadena + 0x00214a83, // n0x10cb c0x0000 (---------------) + I kin + 0x0028f349, // n0x10cc c0x0000 (---------------) + I kitadaito + 0x0029cf8e, // n0x10cd c0x0000 (---------------) + I kitanakagusuku + 0x002abfc8, // n0x10ce c0x0000 (---------------) + I kumejima + 0x0028d688, // n0x10cf c0x0000 (---------------) + I kunigami + 0x00236f8b, // n0x10d0 c0x0000 (---------------) + I minamidaito + 0x002872c6, // n0x10d1 c0x0000 (---------------) + I motobu + 0x0022d884, // n0x10d2 c0x0000 (---------------) + I nago + 0x00207104, // n0x10d3 c0x0000 (---------------) + I naha + 0x0029d08a, // n0x10d4 c0x0000 (---------------) + I nakagusuku + 0x00216787, // n0x10d5 c0x0000 (---------------) + I nakijin + 0x0020b3c5, // n0x10d6 c0x0000 (---------------) + I nanjo + 0x00214789, // n0x10d7 c0x0000 (---------------) + I nishihara + 0x002b2b85, // n0x10d8 c0x0000 (---------------) + I ogimi + 0x00390f07, // n0x10d9 c0x0000 (---------------) + I okinawa + 0x002f8604, // n0x10da c0x0000 (---------------) + I onna + 0x0039da87, // n0x10db c0x0000 (---------------) + I shimoji + 0x002eedc8, // n0x10dc c0x0000 (---------------) + I taketomi + 0x002a8a46, // n0x10dd c0x0000 (---------------) + I tarama + 0x002f29c9, // n0x10de c0x0000 (---------------) + I tokashiki + 0x002b020a, // n0x10df c0x0000 (---------------) + I tomigusuku + 0x00216706, // n0x10e0 c0x0000 (---------------) + I tonaki + 0x0028c4c6, // n0x10e1 c0x0000 (---------------) + I urasoe + 0x002a2e85, // n0x10e2 c0x0000 (---------------) + I uruma + 0x003704c5, // n0x10e3 c0x0000 (---------------) + I yaese + 0x00321bc7, // n0x10e4 c0x0000 (---------------) + I yomitan + 0x00322048, // n0x10e5 c0x0000 (---------------) + I yonabaru + 0x00263ec8, // n0x10e6 c0x0000 (---------------) + I yonaguni + 0x00245cc6, // n0x10e7 c0x0000 (---------------) + I zamami + 0x00222985, // n0x10e8 c0x0000 (---------------) + I abeno + 0x0024cb8e, // n0x10e9 c0x0000 (---------------) + I chihayaakasaka + 0x00359404, // n0x10ea c0x0000 (---------------) + I chuo + 0x00237105, // n0x10eb c0x0000 (---------------) + I daito + 0x00270589, // n0x10ec c0x0000 (---------------) + I fujiidera + 0x002430c8, // n0x10ed c0x0000 (---------------) + I habikino + 0x00390386, // n0x10ee c0x0000 (---------------) + I hannan + 0x00291ccc, // n0x10ef c0x0000 (---------------) + I higashiosaka + 0x002937d0, // n0x10f0 c0x0000 (---------------) + I higashisumiyoshi + 0x002955cf, // n0x10f1 c0x0000 (---------------) + I higashiyodogawa + 0x00296808, // n0x10f2 c0x0000 (---------------) + I hirakata + 0x002bebc7, // n0x10f3 c0x0000 (---------------) + I ibaraki + 0x00202b85, // n0x10f4 c0x0000 (---------------) + I ikeda + 0x0026a785, // n0x10f5 c0x0000 (---------------) + I izumi + 0x002eb109, // n0x10f6 c0x0000 (---------------) + I izumiotsu + 0x0028b289, // n0x10f7 c0x0000 (---------------) + I izumisano + 0x0023a606, // n0x10f8 c0x0000 (---------------) + I kadoma + 0x002f1487, // n0x10f9 c0x0000 (---------------) + I kaizuka + 0x00200b05, // n0x10fa c0x0000 (---------------) + I kanan + 0x00310789, // n0x10fb c0x0000 (---------------) + I kashiwara + 0x0030bb86, // n0x10fc c0x0000 (---------------) + I katano + 0x0030f00d, // n0x10fd c0x0000 (---------------) + I kawachinagano + 0x00278009, // n0x10fe c0x0000 (---------------) + I kishiwada + 0x0020cb44, // n0x10ff c0x0000 (---------------) + I kita + 0x002abd48, // n0x1100 c0x0000 (---------------) + I kumatori + 0x00396009, // n0x1101 c0x0000 (---------------) + I matsubara + 0x00348906, // n0x1102 c0x0000 (---------------) + I minato + 0x00270d05, // n0x1103 c0x0000 (---------------) + I minoh + 0x00318986, // n0x1104 c0x0000 (---------------) + I misaki + 0x0030ae49, // n0x1105 c0x0000 (---------------) + I moriguchi + 0x00378788, // n0x1106 c0x0000 (---------------) + I neyagawa + 0x002123c5, // n0x1107 c0x0000 (---------------) + I nishi + 0x00262804, // n0x1108 c0x0000 (---------------) + I nose + 0x00291e8b, // n0x1109 c0x0000 (---------------) + I osakasayama + 0x003487c5, // n0x110a c0x0000 (---------------) + I sakai + 0x00291fc6, // n0x110b c0x0000 (---------------) + I sayama + 0x00279846, // n0x110c c0x0000 (---------------) + I sennan + 0x002465c6, // n0x110d c0x0000 (---------------) + I settsu + 0x002fe74b, // n0x110e c0x0000 (---------------) + I shijonawate + 0x00287189, // n0x110f c0x0000 (---------------) + I shimamoto + 0x00210c85, // n0x1110 c0x0000 (---------------) + I suita + 0x0037b687, // n0x1111 c0x0000 (---------------) + I tadaoka + 0x00213006, // n0x1112 c0x0000 (---------------) + I taishi + 0x00359fc6, // n0x1113 c0x0000 (---------------) + I tajiri + 0x00278a08, // n0x1114 c0x0000 (---------------) + I takaishi + 0x002d3c09, // n0x1115 c0x0000 (---------------) + I takatsuki + 0x0037288c, // n0x1116 c0x0000 (---------------) + I tondabayashi + 0x00242748, // n0x1117 c0x0000 (---------------) + I toyonaka + 0x00249546, // n0x1118 c0x0000 (---------------) + I toyono + 0x00340343, // n0x1119 c0x0000 (---------------) + I yao + 0x00308506, // n0x111a c0x0000 (---------------) + I ariake + 0x0026a445, // n0x111b c0x0000 (---------------) + I arita + 0x00274c08, // n0x111c c0x0000 (---------------) + I fukudomi + 0x00222386, // n0x111d c0x0000 (---------------) + I genkai + 0x0029a488, // n0x111e c0x0000 (---------------) + I hamatama + 0x0023d705, // n0x111f c0x0000 (---------------) + I hizen + 0x00273845, // n0x1120 c0x0000 (---------------) + I imari + 0x0028ce88, // n0x1121 c0x0000 (---------------) + I kamimine + 0x002e2b47, // n0x1122 c0x0000 (---------------) + I kanzaki + 0x0034dec7, // n0x1123 c0x0000 (---------------) + I karatsu + 0x0029ee47, // n0x1124 c0x0000 (---------------) + I kashima + 0x0021e6c8, // n0x1125 c0x0000 (---------------) + I kitagata + 0x00286248, // n0x1126 c0x0000 (---------------) + I kitahata + 0x00238ec6, // n0x1127 c0x0000 (---------------) + I kiyama + 0x00304547, // n0x1128 c0x0000 (---------------) + I kouhoku + 0x002a4bc7, // n0x1129 c0x0000 (---------------) + I kyuragi + 0x0026a30a, // n0x112a c0x0000 (---------------) + I nishiarita + 0x00225d03, // n0x112b c0x0000 (---------------) + I ogi + 0x00389cc6, // n0x112c c0x0000 (---------------) + I omachi + 0x0020b6c5, // n0x112d c0x0000 (---------------) + I ouchi + 0x0035a904, // n0x112e c0x0000 (---------------) + I saga + 0x00272949, // n0x112f c0x0000 (---------------) + I shiroishi + 0x00357a04, // n0x1130 c0x0000 (---------------) + I taku + 0x0021a304, // n0x1131 c0x0000 (---------------) + I tara + 0x00297d04, // n0x1132 c0x0000 (---------------) + I tosu + 0x00295b4b, // n0x1133 c0x0000 (---------------) + I yoshinogari + 0x00396187, // n0x1134 c0x0000 (---------------) + I arakawa + 0x0024cdc5, // n0x1135 c0x0000 (---------------) + I asaka + 0x00289e48, // n0x1136 c0x0000 (---------------) + I chichibu + 0x00270c06, // n0x1137 c0x0000 (---------------) + I fujimi + 0x00270c08, // n0x1138 c0x0000 (---------------) + I fujimino + 0x00274146, // n0x1139 c0x0000 (---------------) + I fukaya + 0x0039ed85, // n0x113a c0x0000 (---------------) + I hanno + 0x00282d85, // n0x113b c0x0000 (---------------) + I hanyu + 0x00285006, // n0x113c c0x0000 (---------------) + I hasuda + 0x002854c8, // n0x113d c0x0000 (---------------) + I hatogaya + 0x00285fc8, // n0x113e c0x0000 (---------------) + I hatoyama + 0x00272b06, // n0x113f c0x0000 (---------------) + I hidaka + 0x00289c8f, // n0x1140 c0x0000 (---------------) + I higashichichibu + 0x0028ee10, // n0x1141 c0x0000 (---------------) + I higashimatsuyama + 0x00201785, // n0x1142 c0x0000 (---------------) + I honjo + 0x002020c3, // n0x1143 c0x0000 (---------------) + I ina + 0x0024a3c5, // n0x1144 c0x0000 (---------------) + I iruma + 0x002f4cc8, // n0x1145 c0x0000 (---------------) + I iwatsuki + 0x0028b189, // n0x1146 c0x0000 (---------------) + I kamiizumi + 0x002e0f88, // n0x1147 c0x0000 (---------------) + I kamikawa + 0x002fed88, // n0x1148 c0x0000 (---------------) + I kamisato + 0x00362648, // n0x1149 c0x0000 (---------------) + I kasukabe + 0x00396247, // n0x114a c0x0000 (---------------) + I kawagoe + 0x002708c9, // n0x114b c0x0000 (---------------) + I kawaguchi + 0x0029a688, // n0x114c c0x0000 (---------------) + I kawajima + 0x00227ec4, // n0x114d c0x0000 (---------------) + I kazo + 0x00297b88, // n0x114e c0x0000 (---------------) + I kitamoto + 0x0026fec9, // n0x114f c0x0000 (---------------) + I koshigaya + 0x003269c7, // n0x1150 c0x0000 (---------------) + I kounosu + 0x0029cf04, // n0x1151 c0x0000 (---------------) + I kuki + 0x00268408, // n0x1152 c0x0000 (---------------) + I kumagaya + 0x0022c30a, // n0x1153 c0x0000 (---------------) + I matsubushi + 0x002cf1c6, // n0x1154 c0x0000 (---------------) + I minano + 0x002964c6, // n0x1155 c0x0000 (---------------) + I misato + 0x0021d249, // n0x1156 c0x0000 (---------------) + I miyashiro + 0x00293a07, // n0x1157 c0x0000 (---------------) + I miyoshi + 0x002c5148, // n0x1158 c0x0000 (---------------) + I moroyama + 0x0037f588, // n0x1159 c0x0000 (---------------) + I nagatoro + 0x0027ca88, // n0x115a c0x0000 (---------------) + I namegawa + 0x0034d8c5, // n0x115b c0x0000 (---------------) + I niiza + 0x00371485, // n0x115c c0x0000 (---------------) + I ogano + 0x00227945, // n0x115d c0x0000 (---------------) + I ogawa + 0x002a9e45, // n0x115e c0x0000 (---------------) + I ogose + 0x002e4ac7, // n0x115f c0x0000 (---------------) + I okegawa + 0x0020e585, // n0x1160 c0x0000 (---------------) + I omiya + 0x002b3a45, // n0x1161 c0x0000 (---------------) + I otaki + 0x00325386, // n0x1162 c0x0000 (---------------) + I ranzan + 0x002e0ec7, // n0x1163 c0x0000 (---------------) + I ryokami + 0x002ecc47, // n0x1164 c0x0000 (---------------) + I saitama + 0x0022c606, // n0x1165 c0x0000 (---------------) + I sakado + 0x002ca185, // n0x1166 c0x0000 (---------------) + I satte + 0x00291fc6, // n0x1167 c0x0000 (---------------) + I sayama + 0x00247f45, // n0x1168 c0x0000 (---------------) + I shiki + 0x002a28c8, // n0x1169 c0x0000 (---------------) + I shiraoka + 0x002d1484, // n0x116a c0x0000 (---------------) + I soka + 0x002b9546, // n0x116b c0x0000 (---------------) + I sugito + 0x003338c4, // n0x116c c0x0000 (---------------) + I toda + 0x00221b48, // n0x116d c0x0000 (---------------) + I tokigawa + 0x003814ca, // n0x116e c0x0000 (---------------) + I tokorozawa + 0x0027360c, // n0x116f c0x0000 (---------------) + I tsurugashima + 0x0037fc85, // n0x1170 c0x0000 (---------------) + I urawa + 0x00380246, // n0x1171 c0x0000 (---------------) + I warabi + 0x00372a46, // n0x1172 c0x0000 (---------------) + I yashio + 0x0031ab06, // n0x1173 c0x0000 (---------------) + I yokoze + 0x002495c4, // n0x1174 c0x0000 (---------------) + I yono + 0x0037f945, // n0x1175 c0x0000 (---------------) + I yorii + 0x00273f87, // n0x1176 c0x0000 (---------------) + I yoshida + 0x00293a89, // n0x1177 c0x0000 (---------------) + I yoshikawa + 0x0029b387, // n0x1178 c0x0000 (---------------) + I yoshimi + 0x0067e804, // n0x1179 c0x0001 (---------------) ! I city + 0x0067e804, // n0x117a c0x0001 (---------------) ! I city + 0x0030abc5, // n0x117b c0x0000 (---------------) + I aisho + 0x0022d3c4, // n0x117c c0x0000 (---------------) + I gamo + 0x0029168a, // n0x117d c0x0000 (---------------) + I higashiomi + 0x00270a86, // n0x117e c0x0000 (---------------) + I hikone + 0x00348b04, // n0x117f c0x0000 (---------------) + I koka + 0x0020d205, // n0x1180 c0x0000 (---------------) + I konan + 0x00356245, // n0x1181 c0x0000 (---------------) + I kosei + 0x002f8ec4, // n0x1182 c0x0000 (---------------) + I koto + 0x00279487, // n0x1183 c0x0000 (---------------) + I kusatsu + 0x00335607, // n0x1184 c0x0000 (---------------) + I maibara + 0x002c4788, // n0x1185 c0x0000 (---------------) + I moriyama + 0x00302488, // n0x1186 c0x0000 (---------------) + I nagahama + 0x002123c9, // n0x1187 c0x0000 (---------------) + I nishiazai + 0x0024f5c8, // n0x1188 c0x0000 (---------------) + I notogawa + 0x0029184b, // n0x1189 c0x0000 (---------------) + I omihachiman + 0x0021e444, // n0x118a c0x0000 (---------------) + I otsu + 0x002f6985, // n0x118b c0x0000 (---------------) + I ritto + 0x00276705, // n0x118c c0x0000 (---------------) + I ryuoh + 0x0029edc9, // n0x118d c0x0000 (---------------) + I takashima + 0x002d3c09, // n0x118e c0x0000 (---------------) + I takatsuki + 0x002af108, // n0x118f c0x0000 (---------------) + I torahime + 0x00254088, // n0x1190 c0x0000 (---------------) + I toyosato + 0x0026ab04, // n0x1191 c0x0000 (---------------) + I yasu + 0x00297ec5, // n0x1192 c0x0000 (---------------) + I akagi + 0x00201383, // n0x1193 c0x0000 (---------------) + I ama + 0x0021e405, // n0x1194 c0x0000 (---------------) + I gotsu + 0x0028d886, // n0x1195 c0x0000 (---------------) + I hamada + 0x0028ad0c, // n0x1196 c0x0000 (---------------) + I higashiizumo + 0x0021afc6, // n0x1197 c0x0000 (---------------) + I hikawa + 0x00247f86, // n0x1198 c0x0000 (---------------) + I hikimi + 0x0028aec5, // n0x1199 c0x0000 (---------------) + I izumo + 0x002f5588, // n0x119a c0x0000 (---------------) + I kakinoki + 0x002abbc6, // n0x119b c0x0000 (---------------) + I masuda + 0x002e4446, // n0x119c c0x0000 (---------------) + I matsue + 0x002964c6, // n0x119d c0x0000 (---------------) + I misato + 0x002280cc, // n0x119e c0x0000 (---------------) + I nishinoshima + 0x0025c804, // n0x119f c0x0000 (---------------) + I ohda + 0x0027ff8a, // n0x11a0 c0x0000 (---------------) + I okinoshima + 0x00390548, // n0x11a1 c0x0000 (---------------) + I okuizumo + 0x0028ab47, // n0x11a2 c0x0000 (---------------) + I shimane + 0x00241f86, // n0x11a3 c0x0000 (---------------) + I tamayu + 0x0020b547, // n0x11a4 c0x0000 (---------------) + I tsuwano + 0x002d9e05, // n0x11a5 c0x0000 (---------------) + I unnan + 0x002569c6, // n0x11a6 c0x0000 (---------------) + I yakumo + 0x0034b606, // n0x11a7 c0x0000 (---------------) + I yasugi + 0x003745c7, // n0x11a8 c0x0000 (---------------) + I yatsuka + 0x0021a344, // n0x11a9 c0x0000 (---------------) + I arai + 0x00229605, // n0x11aa c0x0000 (---------------) + I atami + 0x00270584, // n0x11ab c0x0000 (---------------) + I fuji + 0x00291287, // n0x11ac c0x0000 (---------------) + I fujieda + 0x002707c8, // n0x11ad c0x0000 (---------------) + I fujikawa + 0x0027134a, // n0x11ae c0x0000 (---------------) + I fujinomiya + 0x00276cc7, // n0x11af c0x0000 (---------------) + I fukuroi + 0x00237307, // n0x11b0 c0x0000 (---------------) + I gotemba + 0x002beb47, // n0x11b1 c0x0000 (---------------) + I haibara + 0x0024d349, // n0x11b2 c0x0000 (---------------) + I hamamatsu + 0x0028ad0a, // n0x11b3 c0x0000 (---------------) + I higashiizu + 0x0022b2c3, // n0x11b4 c0x0000 (---------------) + I ito + 0x0021a245, // n0x11b5 c0x0000 (---------------) + I iwata + 0x00217543, // n0x11b6 c0x0000 (---------------) + I izu + 0x00304849, // n0x11b7 c0x0000 (---------------) + I izunokuni + 0x0022bd88, // n0x11b8 c0x0000 (---------------) + I kakegawa + 0x0029e507, // n0x11b9 c0x0000 (---------------) + I kannami + 0x002e1089, // n0x11ba c0x0000 (---------------) + I kawanehon + 0x0021b046, // n0x11bb c0x0000 (---------------) + I kawazu + 0x002fa108, // n0x11bc c0x0000 (---------------) + I kikugawa + 0x002d7705, // n0x11bd c0x0000 (---------------) + I kosai + 0x0032034a, // n0x11be c0x0000 (---------------) + I makinohara + 0x00228349, // n0x11bf c0x0000 (---------------) + I matsuzaki + 0x002608c9, // n0x11c0 c0x0000 (---------------) + I minamiizu + 0x0039fb87, // n0x11c1 c0x0000 (---------------) + I mishima + 0x002547c9, // n0x11c2 c0x0000 (---------------) + I morimachi + 0x00217408, // n0x11c3 c0x0000 (---------------) + I nishiizu + 0x002d1586, // n0x11c4 c0x0000 (---------------) + I numazu + 0x00380408, // n0x11c5 c0x0000 (---------------) + I omaezaki + 0x00209c07, // n0x11c6 c0x0000 (---------------) + I shimada + 0x00352287, // n0x11c7 c0x0000 (---------------) + I shimizu + 0x0039ff47, // n0x11c8 c0x0000 (---------------) + I shimoda + 0x002f2e48, // n0x11c9 c0x0000 (---------------) + I shizuoka + 0x002e28c6, // n0x11ca c0x0000 (---------------) + I susono + 0x0022c0c5, // n0x11cb c0x0000 (---------------) + I yaizu + 0x00273f87, // n0x11cc c0x0000 (---------------) + I yoshida + 0x0028bfc8, // n0x11cd c0x0000 (---------------) + I ashikaga + 0x003423c4, // n0x11ce c0x0000 (---------------) + I bato + 0x00279c04, // n0x11cf c0x0000 (---------------) + I haga + 0x002f4287, // n0x11d0 c0x0000 (---------------) + I ichikai + 0x002a4287, // n0x11d1 c0x0000 (---------------) + I iwafune + 0x002e324a, // n0x11d2 c0x0000 (---------------) + I kaminokawa + 0x002d1506, // n0x11d3 c0x0000 (---------------) + I kanuma + 0x002e7c0a, // n0x11d4 c0x0000 (---------------) + I karasuyama + 0x002b2e47, // n0x11d5 c0x0000 (---------------) + I kuroiso + 0x003591c7, // n0x11d6 c0x0000 (---------------) + I mashiko + 0x00331344, // n0x11d7 c0x0000 (---------------) + I mibu + 0x0025ab44, // n0x11d8 c0x0000 (---------------) + I moka + 0x0022a386, // n0x11d9 c0x0000 (---------------) + I motegi + 0x00225804, // n0x11da c0x0000 (---------------) + I nasu + 0x0022580c, // n0x11db c0x0000 (---------------) + I nasushiobara + 0x0020a7c5, // n0x11dc c0x0000 (---------------) + I nikko + 0x002180c9, // n0x11dd c0x0000 (---------------) + I nishikata + 0x0027bb44, // n0x11de c0x0000 (---------------) + I nogi + 0x002967c5, // n0x11df c0x0000 (---------------) + I ohira + 0x00270dc8, // n0x11e0 c0x0000 (---------------) + I ohtawara + 0x00286085, // n0x11e1 c0x0000 (---------------) + I oyama + 0x002fe346, // n0x11e2 c0x0000 (---------------) + I sakura + 0x0020d5c4, // n0x11e3 c0x0000 (---------------) + I sano + 0x0026b5ca, // n0x11e4 c0x0000 (---------------) + I shimotsuke + 0x002923c6, // n0x11e5 c0x0000 (---------------) + I shioya + 0x00248f0a, // n0x11e6 c0x0000 (---------------) + I takanezawa + 0x00342447, // n0x11e7 c0x0000 (---------------) + I tochigi + 0x0020f0c5, // n0x11e8 c0x0000 (---------------) + I tsuga + 0x0021a9c5, // n0x11e9 c0x0000 (---------------) + I ujiie + 0x002a560a, // n0x11ea c0x0000 (---------------) + I utsunomiya + 0x00297945, // n0x11eb c0x0000 (---------------) + I yaita + 0x002963c6, // n0x11ec c0x0000 (---------------) + I aizumi + 0x00200b44, // n0x11ed c0x0000 (---------------) + I anan + 0x002a7646, // n0x11ee c0x0000 (---------------) + I ichiba + 0x00321c85, // n0x11ef c0x0000 (---------------) + I itano + 0x00222446, // n0x11f0 c0x0000 (---------------) + I kainan + 0x0028e9cc, // n0x11f1 c0x0000 (---------------) + I komatsushima + 0x002c7e8a, // n0x11f2 c0x0000 (---------------) + I matsushige + 0x00267204, // n0x11f3 c0x0000 (---------------) + I mima + 0x00236f86, // n0x11f4 c0x0000 (---------------) + I minami + 0x00293a07, // n0x11f5 c0x0000 (---------------) + I miyoshi + 0x002c8304, // n0x11f6 c0x0000 (---------------) + I mugi + 0x002a6788, // n0x11f7 c0x0000 (---------------) + I nakagawa + 0x003813c6, // n0x11f8 c0x0000 (---------------) + I naruto + 0x0024ca09, // n0x11f9 c0x0000 (---------------) + I sanagochi + 0x002ed689, // n0x11fa c0x0000 (---------------) + I shishikui + 0x00285d89, // n0x11fb c0x0000 (---------------) + I tokushima + 0x00369686, // n0x11fc c0x0000 (---------------) + I wajiki + 0x00209d06, // n0x11fd c0x0000 (---------------) + I adachi + 0x00380547, // n0x11fe c0x0000 (---------------) + I akiruno + 0x002bd008, // n0x11ff c0x0000 (---------------) + I akishima + 0x00209b09, // n0x1200 c0x0000 (---------------) + I aogashima + 0x00396187, // n0x1201 c0x0000 (---------------) + I arakawa + 0x00289fc6, // n0x1202 c0x0000 (---------------) + I bunkyo + 0x003a2b07, // n0x1203 c0x0000 (---------------) + I chiyoda + 0x002d4b85, // n0x1204 c0x0000 (---------------) + I chofu + 0x00359404, // n0x1205 c0x0000 (---------------) + I chuo + 0x00380107, // n0x1206 c0x0000 (---------------) + I edogawa + 0x002b7305, // n0x1207 c0x0000 (---------------) + I fuchu + 0x0027ef85, // n0x1208 c0x0000 (---------------) + I fussa + 0x002f5d47, // n0x1209 c0x0000 (---------------) + I hachijo + 0x002434c8, // n0x120a c0x0000 (---------------) + I hachioji + 0x00371b06, // n0x120b c0x0000 (---------------) + I hamura + 0x0028da0d, // n0x120c c0x0000 (---------------) + I higashikurume + 0x0028f6cf, // n0x120d c0x0000 (---------------) + I higashimurayama + 0x00294e0d, // n0x120e c0x0000 (---------------) + I higashiyamato + 0x00205904, // n0x120f c0x0000 (---------------) + I hino + 0x002362c6, // n0x1210 c0x0000 (---------------) + I hinode + 0x002cc048, // n0x1211 c0x0000 (---------------) + I hinohara + 0x002a1905, // n0x1212 c0x0000 (---------------) + I inagi + 0x0026a4c8, // n0x1213 c0x0000 (---------------) + I itabashi + 0x0020ae0a, // n0x1214 c0x0000 (---------------) + I katsushika + 0x0020cb44, // n0x1215 c0x0000 (---------------) + I kita + 0x00353546, // n0x1216 c0x0000 (---------------) + I kiyose + 0x002a1487, // n0x1217 c0x0000 (---------------) + I kodaira + 0x00223547, // n0x1218 c0x0000 (---------------) + I koganei + 0x002980c9, // n0x1219 c0x0000 (---------------) + I kokubunji + 0x003803c5, // n0x121a c0x0000 (---------------) + I komae + 0x002f8ec4, // n0x121b c0x0000 (---------------) + I koto + 0x00358fca, // n0x121c c0x0000 (---------------) + I kouzushima + 0x002afcc9, // n0x121d c0x0000 (---------------) + I kunitachi + 0x002548c7, // n0x121e c0x0000 (---------------) + I machida + 0x0028dcc6, // n0x121f c0x0000 (---------------) + I meguro + 0x00348906, // n0x1220 c0x0000 (---------------) + I minato + 0x00297e06, // n0x1221 c0x0000 (---------------) + I mitaka + 0x00358ac6, // n0x1222 c0x0000 (---------------) + I mizuho + 0x002cb9cf, // n0x1223 c0x0000 (---------------) + I musashimurayama + 0x002cbf09, // n0x1224 c0x0000 (---------------) + I musashino + 0x00303406, // n0x1225 c0x0000 (---------------) + I nakano + 0x0024fc46, // n0x1226 c0x0000 (---------------) + I nerima + 0x00379a49, // n0x1227 c0x0000 (---------------) + I ogasawara + 0x00304647, // n0x1228 c0x0000 (---------------) + I okutama + 0x00211c03, // n0x1229 c0x0000 (---------------) + I ome + 0x0020cd06, // n0x122a c0x0000 (---------------) + I oshima + 0x0020a183, // n0x122b c0x0000 (---------------) + I ota + 0x00246ac8, // n0x122c c0x0000 (---------------) + I setagaya + 0x003a2947, // n0x122d c0x0000 (---------------) + I shibuya + 0x00296a09, // n0x122e c0x0000 (---------------) + I shinagawa + 0x0027e9c8, // n0x122f c0x0000 (---------------) + I shinjuku + 0x0034e008, // n0x1230 c0x0000 (---------------) + I suginami + 0x002105c6, // n0x1231 c0x0000 (---------------) + I sumida + 0x0033d889, // n0x1232 c0x0000 (---------------) + I tachikawa + 0x0036b745, // n0x1233 c0x0000 (---------------) + I taito + 0x00241f84, // n0x1234 c0x0000 (---------------) + I tama + 0x00242a87, // n0x1235 c0x0000 (---------------) + I toshima + 0x0024ffc5, // n0x1236 c0x0000 (---------------) + I chizu + 0x00205904, // n0x1237 c0x0000 (---------------) + I hino + 0x0024ce88, // n0x1238 c0x0000 (---------------) + I kawahara + 0x00216a44, // n0x1239 c0x0000 (---------------) + I koge + 0x002fb907, // n0x123a c0x0000 (---------------) + I kotoura + 0x00343dc6, // n0x123b c0x0000 (---------------) + I misasa + 0x002dfc05, // n0x123c c0x0000 (---------------) + I nanbu + 0x0027ac08, // n0x123d c0x0000 (---------------) + I nichinan + 0x003487cb, // n0x123e c0x0000 (---------------) + I sakaiminato + 0x002f0147, // n0x123f c0x0000 (---------------) + I tottori + 0x002a5886, // n0x1240 c0x0000 (---------------) + I wakasa + 0x002ba804, // n0x1241 c0x0000 (---------------) + I yazu + 0x0022d806, // n0x1242 c0x0000 (---------------) + I yonago + 0x002b9085, // n0x1243 c0x0000 (---------------) + I asahi + 0x002b7305, // n0x1244 c0x0000 (---------------) + I fuchu + 0x00275d49, // n0x1245 c0x0000 (---------------) + I fukumitsu + 0x00279089, // n0x1246 c0x0000 (---------------) + I funahashi + 0x0029b444, // n0x1247 c0x0000 (---------------) + I himi + 0x00352305, // n0x1248 c0x0000 (---------------) + I imizu + 0x00236fc5, // n0x1249 c0x0000 (---------------) + I inami + 0x003201c6, // n0x124a c0x0000 (---------------) + I johana + 0x002f4188, // n0x124b c0x0000 (---------------) + I kamiichi + 0x002b2746, // n0x124c c0x0000 (---------------) + I kurobe + 0x0030a24b, // n0x124d c0x0000 (---------------) + I nakaniikawa + 0x002f868a, // n0x124e c0x0000 (---------------) + I namerikawa + 0x002f2905, // n0x124f c0x0000 (---------------) + I nanto + 0x00282e06, // n0x1250 c0x0000 (---------------) + I nyuzen + 0x002eaa05, // n0x1251 c0x0000 (---------------) + I oyabe + 0x00210d45, // n0x1252 c0x0000 (---------------) + I taira + 0x002863c7, // n0x1253 c0x0000 (---------------) + I takaoka + 0x00201248, // n0x1254 c0x0000 (---------------) + I tateyama + 0x0024f644, // n0x1255 c0x0000 (---------------) + I toga + 0x0025bd46, // n0x1256 c0x0000 (---------------) + I tonami + 0x00286046, // n0x1257 c0x0000 (---------------) + I toyama + 0x002175c7, // n0x1258 c0x0000 (---------------) + I unazuki + 0x002f6f84, // n0x1259 c0x0000 (---------------) + I uozu + 0x00274a86, // n0x125a c0x0000 (---------------) + I yamada + 0x0030e285, // n0x125b c0x0000 (---------------) + I arida + 0x0030e289, // n0x125c c0x0000 (---------------) + I aridagawa + 0x00209f04, // n0x125d c0x0000 (---------------) + I gobo + 0x0027f9c9, // n0x125e c0x0000 (---------------) + I hashimoto + 0x00272b06, // n0x125f c0x0000 (---------------) + I hidaka + 0x002b44c8, // n0x1260 c0x0000 (---------------) + I hirogawa + 0x00236fc5, // n0x1261 c0x0000 (---------------) + I inami + 0x003310c5, // n0x1262 c0x0000 (---------------) + I iwade + 0x00222446, // n0x1263 c0x0000 (---------------) + I kainan + 0x00372789, // n0x1264 c0x0000 (---------------) + I kamitonda + 0x00219449, // n0x1265 c0x0000 (---------------) + I katsuragi + 0x00248006, // n0x1266 c0x0000 (---------------) + I kimino + 0x002431c8, // n0x1267 c0x0000 (---------------) + I kinokawa + 0x0021eb88, // n0x1268 c0x0000 (---------------) + I kitayama + 0x002ea9c4, // n0x1269 c0x0000 (---------------) + I koya + 0x00367984, // n0x126a c0x0000 (---------------) + I koza + 0x00367988, // n0x126b c0x0000 (---------------) + I kozagawa + 0x00306448, // n0x126c c0x0000 (---------------) + I kudoyama + 0x00366b09, // n0x126d c0x0000 (---------------) + I kushimoto + 0x0028d806, // n0x126e c0x0000 (---------------) + I mihama + 0x002964c6, // n0x126f c0x0000 (---------------) + I misato + 0x00313f0d, // n0x1270 c0x0000 (---------------) + I nachikatsuura + 0x002a9586, // n0x1271 c0x0000 (---------------) + I shingu + 0x002999c9, // n0x1272 c0x0000 (---------------) + I shirahama + 0x00389e85, // n0x1273 c0x0000 (---------------) + I taiji + 0x002ffb46, // n0x1274 c0x0000 (---------------) + I tanabe + 0x0033da48, // n0x1275 c0x0000 (---------------) + I wakayama + 0x00311445, // n0x1276 c0x0000 (---------------) + I yuasa + 0x002a4c04, // n0x1277 c0x0000 (---------------) + I yura + 0x002b9085, // n0x1278 c0x0000 (---------------) + I asahi + 0x00278708, // n0x1279 c0x0000 (---------------) + I funagata + 0x00291449, // n0x127a c0x0000 (---------------) + I higashine + 0x00270644, // n0x127b c0x0000 (---------------) + I iide + 0x0034eac6, // n0x127c c0x0000 (---------------) + I kahoku + 0x00348f8a, // n0x127d c0x0000 (---------------) + I kaminoyama + 0x0021b1c8, // n0x127e c0x0000 (---------------) + I kaneyama + 0x002e33c9, // n0x127f c0x0000 (---------------) + I kawanishi + 0x0022780a, // n0x1280 c0x0000 (---------------) + I mamurogawa + 0x002e1006, // n0x1281 c0x0000 (---------------) + I mikawa + 0x0028f888, // n0x1282 c0x0000 (---------------) + I murayama + 0x003012c5, // n0x1283 c0x0000 (---------------) + I nagai + 0x002c7d08, // n0x1284 c0x0000 (---------------) + I nakayama + 0x002adc05, // n0x1285 c0x0000 (---------------) + I nanyo + 0x0021af09, // n0x1286 c0x0000 (---------------) + I nishikawa + 0x0035e9c9, // n0x1287 c0x0000 (---------------) + I obanazawa + 0x00206e82, // n0x1288 c0x0000 (---------------) + I oe + 0x00281985, // n0x1289 c0x0000 (---------------) + I oguni + 0x00268d06, // n0x128a c0x0000 (---------------) + I ohkura + 0x00272a47, // n0x128b c0x0000 (---------------) + I oishida + 0x0035a905, // n0x128c c0x0000 (---------------) + I sagae + 0x002eecc6, // n0x128d c0x0000 (---------------) + I sakata + 0x00311508, // n0x128e c0x0000 (---------------) + I sakegawa + 0x0027d4c6, // n0x128f c0x0000 (---------------) + I shinjo + 0x002edc89, // n0x1290 c0x0000 (---------------) + I shirataka + 0x00271f06, // n0x1291 c0x0000 (---------------) + I shonai + 0x00278888, // n0x1292 c0x0000 (---------------) + I takahata + 0x0029f8c5, // n0x1293 c0x0000 (---------------) + I tendo + 0x00263206, // n0x1294 c0x0000 (---------------) + I tozawa + 0x00322848, // n0x1295 c0x0000 (---------------) + I tsuruoka + 0x00277b48, // n0x1296 c0x0000 (---------------) + I yamagata + 0x00300508, // n0x1297 c0x0000 (---------------) + I yamanobe + 0x00364e48, // n0x1298 c0x0000 (---------------) + I yonezawa + 0x00214e04, // n0x1299 c0x0000 (---------------) + I yuza + 0x00242fc3, // n0x129a c0x0000 (---------------) + I abu + 0x002edec4, // n0x129b c0x0000 (---------------) + I hagi + 0x0022fec6, // n0x129c c0x0000 (---------------) + I hikari + 0x002d4bc4, // n0x129d c0x0000 (---------------) + I hofu + 0x0028d5c7, // n0x129e c0x0000 (---------------) + I iwakuni + 0x002e4349, // n0x129f c0x0000 (---------------) + I kudamatsu + 0x002ba005, // n0x12a0 c0x0000 (---------------) + I mitou + 0x0037f586, // n0x12a1 c0x0000 (---------------) + I nagato + 0x0020cd06, // n0x12a2 c0x0000 (---------------) + I oshima + 0x002626cb, // n0x12a3 c0x0000 (---------------) + I shimonoseki + 0x002f2846, // n0x12a4 c0x0000 (---------------) + I shunan + 0x00306746, // n0x12a5 c0x0000 (---------------) + I tabuse + 0x00340808, // n0x12a6 c0x0000 (---------------) + I tokuyama + 0x00254b06, // n0x12a7 c0x0000 (---------------) + I toyota + 0x00287ec3, // n0x12a8 c0x0000 (---------------) + I ube + 0x00214083, // n0x12a9 c0x0000 (---------------) + I yuu + 0x00359404, // n0x12aa c0x0000 (---------------) + I chuo + 0x00231585, // n0x12ab c0x0000 (---------------) + I doshi + 0x002a4d87, // n0x12ac c0x0000 (---------------) + I fuefuki + 0x002707c8, // n0x12ad c0x0000 (---------------) + I fujikawa + 0x002707cf, // n0x12ae c0x0000 (---------------) + I fujikawaguchiko + 0x00273e8b, // n0x12af c0x0000 (---------------) + I fujiyoshida + 0x002f3f88, // n0x12b0 c0x0000 (---------------) + I hayakawa + 0x0034eb46, // n0x12b1 c0x0000 (---------------) + I hokuto + 0x003335ce, // n0x12b2 c0x0000 (---------------) + I ichikawamisato + 0x00222443, // n0x12b3 c0x0000 (---------------) + I kai + 0x00339244, // n0x12b4 c0x0000 (---------------) + I kofu + 0x002f27c5, // n0x12b5 c0x0000 (---------------) + I koshu + 0x00346486, // n0x12b6 c0x0000 (---------------) + I kosuge + 0x0028498b, // n0x12b7 c0x0000 (---------------) + I minami-alps + 0x00288386, // n0x12b8 c0x0000 (---------------) + I minobu + 0x0020f889, // n0x12b9 c0x0000 (---------------) + I nakamichi + 0x002dfc05, // n0x12ba c0x0000 (---------------) + I nanbu + 0x0037cd08, // n0x12bb c0x0000 (---------------) + I narusawa + 0x0020fc48, // n0x12bc c0x0000 (---------------) + I nirasaki + 0x0021930c, // n0x12bd c0x0000 (---------------) + I nishikatsura + 0x00295b86, // n0x12be c0x0000 (---------------) + I oshino + 0x0021e446, // n0x12bf c0x0000 (---------------) + I otsuki + 0x002ab745, // n0x12c0 c0x0000 (---------------) + I showa + 0x002805c8, // n0x12c1 c0x0000 (---------------) + I tabayama + 0x00273605, // n0x12c2 c0x0000 (---------------) + I tsuru + 0x003855c8, // n0x12c3 c0x0000 (---------------) + I uenohara + 0x0029524a, // n0x12c4 c0x0000 (---------------) + I yamanakako + 0x00298d49, // n0x12c5 c0x0000 (---------------) + I yamanashi + 0x0067e804, // n0x12c6 c0x0001 (---------------) ! I city + 0x2d608182, // n0x12c7 c0x00b5 (n0x12c8-n0x12c9) o I co + 0x000f5248, // n0x12c8 c0x0000 (---------------) + blogspot + 0x0022edc3, // n0x12c9 c0x0000 (---------------) + I com + 0x002349c3, // n0x12ca c0x0000 (---------------) + I edu + 0x00275003, // n0x12cb c0x0000 (---------------) + I gov + 0x00215b43, // n0x12cc c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x12cd c0x0000 (---------------) + I net + 0x00229a83, // n0x12ce c0x0000 (---------------) + I org + 0x0030a143, // n0x12cf c0x0000 (---------------) + I biz + 0x0022edc3, // n0x12d0 c0x0000 (---------------) + I com + 0x002349c3, // n0x12d1 c0x0000 (---------------) + I edu + 0x00275003, // n0x12d2 c0x0000 (---------------) + I gov + 0x0038a144, // n0x12d3 c0x0000 (---------------) + I info + 0x0021d8c3, // n0x12d4 c0x0000 (---------------) + I net + 0x00229a83, // n0x12d5 c0x0000 (---------------) + I org + 0x0024be83, // n0x12d6 c0x0000 (---------------) + I ass + 0x002b1c44, // n0x12d7 c0x0000 (---------------) + I asso + 0x0022edc3, // n0x12d8 c0x0000 (---------------) + I com + 0x00238284, // n0x12d9 c0x0000 (---------------) + I coop + 0x002349c3, // n0x12da c0x0000 (---------------) + I edu + 0x002fa744, // n0x12db c0x0000 (---------------) + I gouv + 0x00275003, // n0x12dc c0x0000 (---------------) + I gov + 0x0035abc7, // n0x12dd c0x0000 (---------------) + I medecin + 0x00215b43, // n0x12de c0x0000 (---------------) + I mil + 0x0020e543, // n0x12df c0x0000 (---------------) + I nom + 0x00246408, // n0x12e0 c0x0000 (---------------) + I notaires + 0x00229a83, // n0x12e1 c0x0000 (---------------) + I org + 0x002d5a0b, // n0x12e2 c0x0000 (---------------) + I pharmaciens + 0x002da783, // n0x12e3 c0x0000 (---------------) + I prd + 0x00240d06, // n0x12e4 c0x0000 (---------------) + I presse + 0x00200142, // n0x12e5 c0x0000 (---------------) + I tm + 0x003781cb, // n0x12e6 c0x0000 (---------------) + I veterinaire + 0x002349c3, // n0x12e7 c0x0000 (---------------) + I edu + 0x00275003, // n0x12e8 c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x12e9 c0x0000 (---------------) + I net + 0x00229a83, // n0x12ea c0x0000 (---------------) + I org + 0x0022edc3, // n0x12eb c0x0000 (---------------) + I com + 0x002349c3, // n0x12ec c0x0000 (---------------) + I edu + 0x00275003, // n0x12ed c0x0000 (---------------) + I gov + 0x00229a83, // n0x12ee c0x0000 (---------------) + I org + 0x00228d03, // n0x12ef c0x0000 (---------------) + I rep + 0x00203643, // n0x12f0 c0x0000 (---------------) + I tra + 0x00205882, // n0x12f1 c0x0000 (---------------) + I ac + 0x000f5248, // n0x12f2 c0x0000 (---------------) + blogspot + 0x00204745, // n0x12f3 c0x0000 (---------------) + I busan + 0x00325848, // n0x12f4 c0x0000 (---------------) + I chungbuk + 0x0032f688, // n0x12f5 c0x0000 (---------------) + I chungnam + 0x00208182, // n0x12f6 c0x0000 (---------------) + I co + 0x0024d585, // n0x12f7 c0x0000 (---------------) + I daegu + 0x00256387, // n0x12f8 c0x0000 (---------------) + I daejeon + 0x00202242, // n0x12f9 c0x0000 (---------------) + I es + 0x0020fac7, // n0x12fa c0x0000 (---------------) + I gangwon + 0x00208502, // n0x12fb c0x0000 (---------------) + I go + 0x0023d2c7, // n0x12fc c0x0000 (---------------) + I gwangju + 0x0038dc09, // n0x12fd c0x0000 (---------------) + I gyeongbuk + 0x00300e88, // n0x12fe c0x0000 (---------------) + I gyeonggi + 0x0027c909, // n0x12ff c0x0000 (---------------) + I gyeongnam + 0x00207ec2, // n0x1300 c0x0000 (---------------) + I hs + 0x00261387, // n0x1301 c0x0000 (---------------) + I incheon + 0x00247d84, // n0x1302 c0x0000 (---------------) + I jeju + 0x00256447, // n0x1303 c0x0000 (---------------) + I jeonbuk + 0x002f8587, // n0x1304 c0x0000 (---------------) + I jeonnam + 0x002b1882, // n0x1305 c0x0000 (---------------) + I kg + 0x00215b43, // n0x1306 c0x0000 (---------------) + I mil + 0x00202482, // n0x1307 c0x0000 (---------------) + I ms + 0x00203282, // n0x1308 c0x0000 (---------------) + I ne + 0x00200282, // n0x1309 c0x0000 (---------------) + I or + 0x00209a02, // n0x130a c0x0000 (---------------) + I pe + 0x00204d82, // n0x130b c0x0000 (---------------) + I re + 0x002024c2, // n0x130c c0x0000 (---------------) + I sc + 0x00275905, // n0x130d c0x0000 (---------------) + I seoul + 0x00244c45, // n0x130e c0x0000 (---------------) + I ulsan + 0x0022edc3, // n0x130f c0x0000 (---------------) + I com + 0x002349c3, // n0x1310 c0x0000 (---------------) + I edu + 0x00275003, // n0x1311 c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x1312 c0x0000 (---------------) + I net + 0x00229a83, // n0x1313 c0x0000 (---------------) + I org + 0x0022edc3, // n0x1314 c0x0000 (---------------) + I com + 0x002349c3, // n0x1315 c0x0000 (---------------) + I edu + 0x00275003, // n0x1316 c0x0000 (---------------) + I gov + 0x00215b43, // n0x1317 c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x1318 c0x0000 (---------------) + I net + 0x00229a83, // n0x1319 c0x0000 (---------------) + I org + 0x00000301, // n0x131a c0x0000 (---------------) + c + 0x0022edc3, // n0x131b c0x0000 (---------------) + I com + 0x002349c3, // n0x131c c0x0000 (---------------) + I edu + 0x00275003, // n0x131d c0x0000 (---------------) + I gov + 0x0038a144, // n0x131e c0x0000 (---------------) + I info + 0x0026f683, // n0x131f c0x0000 (---------------) + I int + 0x0021d8c3, // n0x1320 c0x0000 (---------------) + I net + 0x00229a83, // n0x1321 c0x0000 (---------------) + I org + 0x0021ffc3, // n0x1322 c0x0000 (---------------) + I per + 0x0022edc3, // n0x1323 c0x0000 (---------------) + I com + 0x002349c3, // n0x1324 c0x0000 (---------------) + I edu + 0x00275003, // n0x1325 c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x1326 c0x0000 (---------------) + I net + 0x00229a83, // n0x1327 c0x0000 (---------------) + I org + 0x00208182, // n0x1328 c0x0000 (---------------) + I co + 0x0022edc3, // n0x1329 c0x0000 (---------------) + I com + 0x002349c3, // n0x132a c0x0000 (---------------) + I edu + 0x00275003, // n0x132b c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x132c c0x0000 (---------------) + I net + 0x00229a83, // n0x132d c0x0000 (---------------) + I org + 0x000f5248, // n0x132e c0x0000 (---------------) + blogspot + 0x00205882, // n0x132f c0x0000 (---------------) + I ac + 0x002b5bc4, // n0x1330 c0x0000 (---------------) + I assn + 0x0022edc3, // n0x1331 c0x0000 (---------------) + I com + 0x002349c3, // n0x1332 c0x0000 (---------------) + I edu + 0x00275003, // n0x1333 c0x0000 (---------------) + I gov + 0x003395c3, // n0x1334 c0x0000 (---------------) + I grp + 0x0022fac5, // n0x1335 c0x0000 (---------------) + I hotel + 0x0026f683, // n0x1336 c0x0000 (---------------) + I int + 0x00342703, // n0x1337 c0x0000 (---------------) + I ltd + 0x0021d8c3, // n0x1338 c0x0000 (---------------) + I net + 0x002084c3, // n0x1339 c0x0000 (---------------) + I ngo + 0x00229a83, // n0x133a c0x0000 (---------------) + I org + 0x00215d43, // n0x133b c0x0000 (---------------) + I sch + 0x0026d043, // n0x133c c0x0000 (---------------) + I soc + 0x0021fa83, // n0x133d c0x0000 (---------------) + I web + 0x0022edc3, // n0x133e c0x0000 (---------------) + I com + 0x002349c3, // n0x133f c0x0000 (---------------) + I edu + 0x00275003, // n0x1340 c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x1341 c0x0000 (---------------) + I net + 0x00229a83, // n0x1342 c0x0000 (---------------) + I org + 0x00208182, // n0x1343 c0x0000 (---------------) + I co + 0x00229a83, // n0x1344 c0x0000 (---------------) + I org + 0x000f5248, // n0x1345 c0x0000 (---------------) + blogspot + 0x00275003, // n0x1346 c0x0000 (---------------) + I gov + 0x000f5248, // n0x1347 c0x0000 (---------------) + blogspot + 0x0022d9c3, // n0x1348 c0x0000 (---------------) + I asn + 0x0022edc3, // n0x1349 c0x0000 (---------------) + I com + 0x00231fc4, // n0x134a c0x0000 (---------------) + I conf + 0x002349c3, // n0x134b c0x0000 (---------------) + I edu + 0x00275003, // n0x134c c0x0000 (---------------) + I gov + 0x00205d82, // n0x134d c0x0000 (---------------) + I id + 0x00215b43, // n0x134e c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x134f c0x0000 (---------------) + I net + 0x00229a83, // n0x1350 c0x0000 (---------------) + I org + 0x0022edc3, // n0x1351 c0x0000 (---------------) + I com + 0x002349c3, // n0x1352 c0x0000 (---------------) + I edu + 0x00275003, // n0x1353 c0x0000 (---------------) + I gov + 0x00205d82, // n0x1354 c0x0000 (---------------) + I id + 0x00211c43, // n0x1355 c0x0000 (---------------) + I med + 0x0021d8c3, // n0x1356 c0x0000 (---------------) + I net + 0x00229a83, // n0x1357 c0x0000 (---------------) + I org + 0x002d4b03, // n0x1358 c0x0000 (---------------) + I plc + 0x00215d43, // n0x1359 c0x0000 (---------------) + I sch + 0x00205882, // n0x135a c0x0000 (---------------) + I ac + 0x00208182, // n0x135b c0x0000 (---------------) + I co + 0x00275003, // n0x135c c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x135d c0x0000 (---------------) + I net + 0x00229a83, // n0x135e c0x0000 (---------------) + I org + 0x00240d05, // n0x135f c0x0000 (---------------) + I press + 0x002b1c44, // n0x1360 c0x0000 (---------------) + I asso + 0x00200142, // n0x1361 c0x0000 (---------------) + I tm + 0x000f5248, // n0x1362 c0x0000 (---------------) + blogspot + 0x00205882, // n0x1363 c0x0000 (---------------) + I ac + 0x00208182, // n0x1364 c0x0000 (---------------) + I co + 0x002349c3, // n0x1365 c0x0000 (---------------) + I edu + 0x00275003, // n0x1366 c0x0000 (---------------) + I gov + 0x002294c3, // n0x1367 c0x0000 (---------------) + I its + 0x0021d8c3, // n0x1368 c0x0000 (---------------) + I net + 0x00229a83, // n0x1369 c0x0000 (---------------) + I org + 0x002db244, // n0x136a c0x0000 (---------------) + I priv + 0x00208182, // n0x136b c0x0000 (---------------) + I co + 0x0022edc3, // n0x136c c0x0000 (---------------) + I com + 0x002349c3, // n0x136d c0x0000 (---------------) + I edu + 0x00275003, // n0x136e c0x0000 (---------------) + I gov + 0x00215b43, // n0x136f c0x0000 (---------------) + I mil + 0x0020e543, // n0x1370 c0x0000 (---------------) + I nom + 0x00229a83, // n0x1371 c0x0000 (---------------) + I org + 0x002da783, // n0x1372 c0x0000 (---------------) + I prd + 0x00200142, // n0x1373 c0x0000 (---------------) + I tm + 0x000f5248, // n0x1374 c0x0000 (---------------) + blogspot + 0x0022edc3, // n0x1375 c0x0000 (---------------) + I com + 0x002349c3, // n0x1376 c0x0000 (---------------) + I edu + 0x00275003, // n0x1377 c0x0000 (---------------) + I gov + 0x00389f83, // n0x1378 c0x0000 (---------------) + I inf + 0x0027ca84, // n0x1379 c0x0000 (---------------) + I name + 0x0021d8c3, // n0x137a c0x0000 (---------------) + I net + 0x00229a83, // n0x137b c0x0000 (---------------) + I org + 0x0022edc3, // n0x137c c0x0000 (---------------) + I com + 0x002349c3, // n0x137d c0x0000 (---------------) + I edu + 0x002fa744, // n0x137e c0x0000 (---------------) + I gouv + 0x00275003, // n0x137f c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x1380 c0x0000 (---------------) + I net + 0x00229a83, // n0x1381 c0x0000 (---------------) + I org + 0x00240d06, // n0x1382 c0x0000 (---------------) + I presse + 0x002349c3, // n0x1383 c0x0000 (---------------) + I edu + 0x00275003, // n0x1384 c0x0000 (---------------) + I gov + 0x0016c603, // n0x1385 c0x0000 (---------------) + nyc + 0x00229a83, // n0x1386 c0x0000 (---------------) + I org + 0x0022edc3, // n0x1387 c0x0000 (---------------) + I com + 0x002349c3, // n0x1388 c0x0000 (---------------) + I edu + 0x00275003, // n0x1389 c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x138a c0x0000 (---------------) + I net + 0x00229a83, // n0x138b c0x0000 (---------------) + I org + 0x000f5248, // n0x138c c0x0000 (---------------) + blogspot + 0x00275003, // n0x138d c0x0000 (---------------) + I gov + 0x0022edc3, // n0x138e c0x0000 (---------------) + I com + 0x002349c3, // n0x138f c0x0000 (---------------) + I edu + 0x00275003, // n0x1390 c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x1391 c0x0000 (---------------) + I net + 0x00229a83, // n0x1392 c0x0000 (---------------) + I org + 0x3562edc3, // n0x1393 c0x00d5 (n0x1397-n0x1398) + I com + 0x002349c3, // n0x1394 c0x0000 (---------------) + I edu + 0x0021d8c3, // n0x1395 c0x0000 (---------------) + I net + 0x00229a83, // n0x1396 c0x0000 (---------------) + I org + 0x000f5248, // n0x1397 c0x0000 (---------------) + blogspot + 0x00205882, // n0x1398 c0x0000 (---------------) + I ac + 0x00208182, // n0x1399 c0x0000 (---------------) + I co + 0x0022edc3, // n0x139a c0x0000 (---------------) + I com + 0x00275003, // n0x139b c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x139c c0x0000 (---------------) + I net + 0x00200282, // n0x139d c0x0000 (---------------) + I or + 0x00229a83, // n0x139e c0x0000 (---------------) + I org + 0x00305387, // n0x139f c0x0000 (---------------) + I academy + 0x002ce4cb, // n0x13a0 c0x0000 (---------------) + I agriculture + 0x00204683, // n0x13a1 c0x0000 (---------------) + I air + 0x00248308, // n0x13a2 c0x0000 (---------------) + I airguard + 0x002bcd87, // n0x13a3 c0x0000 (---------------) + I alabama + 0x0027be86, // n0x13a4 c0x0000 (---------------) + I alaska + 0x00365a45, // n0x13a5 c0x0000 (---------------) + I amber + 0x002b0ec9, // n0x13a6 c0x0000 (---------------) + I ambulance + 0x00240a88, // n0x13a7 c0x0000 (---------------) + I american + 0x002a1f89, // n0x13a8 c0x0000 (---------------) + I americana + 0x002a1f90, // n0x13a9 c0x0000 (---------------) + I americanantiques + 0x00352e8b, // n0x13aa c0x0000 (---------------) + I americanart + 0x002b0d09, // n0x13ab c0x0000 (---------------) + I amsterdam + 0x00204e83, // n0x13ac c0x0000 (---------------) + I and + 0x00338749, // n0x13ad c0x0000 (---------------) + I annefrank + 0x00232ac6, // n0x13ae c0x0000 (---------------) + I anthro + 0x00232acc, // n0x13af c0x0000 (---------------) + I anthropology + 0x00204808, // n0x13b0 c0x0000 (---------------) + I antiques + 0x0039f9c8, // n0x13b1 c0x0000 (---------------) + I aquarium + 0x002506c9, // n0x13b2 c0x0000 (---------------) + I arboretum + 0x0029030e, // n0x13b3 c0x0000 (---------------) + I archaeological + 0x0036ea4b, // n0x13b4 c0x0000 (---------------) + I archaeology + 0x002c340c, // n0x13b5 c0x0000 (---------------) + I architecture + 0x002011c3, // n0x13b6 c0x0000 (---------------) + I art + 0x0022510c, // n0x13b7 c0x0000 (---------------) + I artanddesign + 0x00204149, // n0x13b8 c0x0000 (---------------) + I artcenter + 0x00362287, // n0x13b9 c0x0000 (---------------) + I artdeco + 0x0023490c, // n0x13ba c0x0000 (---------------) + I arteducation + 0x00397c8a, // n0x13bb c0x0000 (---------------) + I artgallery + 0x00243984, // n0x13bc c0x0000 (---------------) + I arts + 0x0024398d, // n0x13bd c0x0000 (---------------) + I artsandcrafts + 0x00224fc8, // n0x13be c0x0000 (---------------) + I asmatart + 0x00395a4d, // n0x13bf c0x0000 (---------------) + I assassination + 0x0024be86, // n0x13c0 c0x0000 (---------------) + I assisi + 0x002b1c4b, // n0x13c1 c0x0000 (---------------) + I association + 0x0024d049, // n0x13c2 c0x0000 (---------------) + I astronomy + 0x0033d747, // n0x13c3 c0x0000 (---------------) + I atlanta + 0x00308c06, // n0x13c4 c0x0000 (---------------) + I austin + 0x00310989, // n0x13c5 c0x0000 (---------------) + I australia + 0x0032058a, // n0x13c6 c0x0000 (---------------) + I automotive + 0x00354ec8, // n0x13c7 c0x0000 (---------------) + I aviation + 0x002da144, // n0x13c8 c0x0000 (---------------) + I axis + 0x0026f347, // n0x13c9 c0x0000 (---------------) + I badajoz + 0x00298fc7, // n0x13ca c0x0000 (---------------) + I baghdad + 0x0027ce04, // n0x13cb c0x0000 (---------------) + I bahn + 0x0022d044, // n0x13cc c0x0000 (---------------) + I bale + 0x00263909, // n0x13cd c0x0000 (---------------) + I baltimore + 0x002bb549, // n0x13ce c0x0000 (---------------) + I barcelona + 0x00339a08, // n0x13cf c0x0000 (---------------) + I baseball + 0x0020f5c5, // n0x13d0 c0x0000 (---------------) + I basel + 0x003852c5, // n0x13d1 c0x0000 (---------------) + I baths + 0x002095c6, // n0x13d2 c0x0000 (---------------) + I bauern + 0x00243849, // n0x13d3 c0x0000 (---------------) + I beauxarts + 0x003627cd, // n0x13d4 c0x0000 (---------------) + I beeldengeluid + 0x002c2e88, // n0x13d5 c0x0000 (---------------) + I bellevue + 0x002094c7, // n0x13d6 c0x0000 (---------------) + I bergbau + 0x00365ac8, // n0x13d7 c0x0000 (---------------) + I berkeley + 0x00351e06, // n0x13d8 c0x0000 (---------------) + I berlin + 0x00389904, // n0x13d9 c0x0000 (---------------) + I bern + 0x00351845, // n0x13da c0x0000 (---------------) + I bible + 0x00202f46, // n0x13db c0x0000 (---------------) + I bilbao + 0x002034c4, // n0x13dc c0x0000 (---------------) + I bill + 0x00204047, // n0x13dd c0x0000 (---------------) + I birdart + 0x0020644a, // n0x13de c0x0000 (---------------) + I birthplace + 0x00214304, // n0x13df c0x0000 (---------------) + I bonn + 0x00216646, // n0x13e0 c0x0000 (---------------) + I boston + 0x00217089, // n0x13e1 c0x0000 (---------------) + I botanical + 0x0021708f, // n0x13e2 c0x0000 (---------------) + I botanicalgarden + 0x0021900d, // n0x13e3 c0x0000 (---------------) + I botanicgarden + 0x00219d46, // n0x13e4 c0x0000 (---------------) + I botany + 0x0021b5d0, // n0x13e5 c0x0000 (---------------) + I brandywinevalley + 0x0021b9c6, // n0x13e6 c0x0000 (---------------) + I brasil + 0x0021c4c7, // n0x13e7 c0x0000 (---------------) + I bristol + 0x0021c847, // n0x13e8 c0x0000 (---------------) + I british + 0x0021c84f, // n0x13e9 c0x0000 (---------------) + I britishcolumbia + 0x0021d509, // n0x13ea c0x0000 (---------------) + I broadcast + 0x00221d46, // n0x13eb c0x0000 (---------------) + I brunel + 0x002230c7, // n0x13ec c0x0000 (---------------) + I brussel + 0x002230c8, // n0x13ed c0x0000 (---------------) + I brussels + 0x00223a09, // n0x13ee c0x0000 (---------------) + I bruxelles + 0x003313c8, // n0x13ef c0x0000 (---------------) + I building + 0x002d2107, // n0x13f0 c0x0000 (---------------) + I burghof + 0x00204743, // n0x13f1 c0x0000 (---------------) + I bus + 0x0022ec46, // n0x13f2 c0x0000 (---------------) + I bushey + 0x00229748, // n0x13f3 c0x0000 (---------------) + I cadaques + 0x002905ca, // n0x13f4 c0x0000 (---------------) + I california + 0x0021fb49, // n0x13f5 c0x0000 (---------------) + I cambridge + 0x00205c83, // n0x13f6 c0x0000 (---------------) + I can + 0x00321746, // n0x13f7 c0x0000 (---------------) + I canada + 0x0025bb8a, // n0x13f8 c0x0000 (---------------) + I capebreton + 0x002dcfc7, // n0x13f9 c0x0000 (---------------) + I carrier + 0x003620ca, // n0x13fa c0x0000 (---------------) + I cartoonart + 0x00203cce, // n0x13fb c0x0000 (---------------) + I casadelamoneda + 0x0021d646, // n0x13fc c0x0000 (---------------) + I castle + 0x002d2e87, // n0x13fd c0x0000 (---------------) + I castres + 0x0020db86, // n0x13fe c0x0000 (---------------) + I celtic + 0x00204206, // n0x13ff c0x0000 (---------------) + I center + 0x0037128b, // n0x1400 c0x0000 (---------------) + I chattanooga + 0x0025e40a, // n0x1401 c0x0000 (---------------) + I cheltenham + 0x0030b4cd, // n0x1402 c0x0000 (---------------) + I chesapeakebay + 0x00209dc7, // n0x1403 c0x0000 (---------------) + I chicago + 0x0026d0c8, // n0x1404 c0x0000 (---------------) + I children + 0x0026d0c9, // n0x1405 c0x0000 (---------------) + I childrens + 0x0026d0cf, // n0x1406 c0x0000 (---------------) + I childrensgarden + 0x0035b84c, // n0x1407 c0x0000 (---------------) + I chiropractic + 0x002acd89, // n0x1408 c0x0000 (---------------) + I chocolate + 0x002a6c4e, // n0x1409 c0x0000 (---------------) + I christiansburg + 0x0035acca, // n0x140a c0x0000 (---------------) + I cincinnati + 0x00301b46, // n0x140b c0x0000 (---------------) + I cinema + 0x0034cc06, // n0x140c c0x0000 (---------------) + I circus + 0x00360a0c, // n0x140d c0x0000 (---------------) + I civilisation + 0x00365f8c, // n0x140e c0x0000 (---------------) + I civilization + 0x0036c688, // n0x140f c0x0000 (---------------) + I civilwar + 0x00398187, // n0x1410 c0x0000 (---------------) + I clinton + 0x002a6b05, // n0x1411 c0x0000 (---------------) + I clock + 0x0030f484, // n0x1412 c0x0000 (---------------) + I coal + 0x0038280e, // n0x1413 c0x0000 (---------------) + I coastaldefence + 0x00320804, // n0x1414 c0x0000 (---------------) + I cody + 0x00382f47, // n0x1415 c0x0000 (---------------) + I coldwar + 0x0021deca, // n0x1416 c0x0000 (---------------) + I collection + 0x0022df94, // n0x1417 c0x0000 (---------------) + I colonialwilliamsburg + 0x0022e68f, // n0x1418 c0x0000 (---------------) + I coloradoplateau + 0x0021ca08, // n0x1419 c0x0000 (---------------) + I columbia + 0x0022eb08, // n0x141a c0x0000 (---------------) + I columbus + 0x0035d68d, // n0x141b c0x0000 (---------------) + I communication + 0x0035d68e, // n0x141c c0x0000 (---------------) + I communications + 0x0022f149, // n0x141d c0x0000 (---------------) + I community + 0x00230608, // n0x141e c0x0000 (---------------) + I computer + 0x0023060f, // n0x141f c0x0000 (---------------) + I computerhistory + 0x0023460c, // n0x1420 c0x0000 (---------------) + I contemporary + 0x0023460f, // n0x1421 c0x0000 (---------------) + I contemporaryart + 0x00236007, // n0x1422 c0x0000 (---------------) + I convent + 0x0023924a, // n0x1423 c0x0000 (---------------) + I copenhagen + 0x0021ac8b, // n0x1424 c0x0000 (---------------) + I corporation + 0x0023b2c8, // n0x1425 c0x0000 (---------------) + I corvette + 0x0023bc87, // n0x1426 c0x0000 (---------------) + I costume + 0x00337c8d, // n0x1427 c0x0000 (---------------) + I countryestate + 0x0031e7c6, // n0x1428 c0x0000 (---------------) + I county + 0x00243b46, // n0x1429 c0x0000 (---------------) + I crafts + 0x0023d949, // n0x142a c0x0000 (---------------) + I cranbrook + 0x0031ca08, // n0x142b c0x0000 (---------------) + I creation + 0x002410c8, // n0x142c c0x0000 (---------------) + I cultural + 0x002410ce, // n0x142d c0x0000 (---------------) + I culturalcenter + 0x002ce5c7, // n0x142e c0x0000 (---------------) + I culture + 0x002bba85, // n0x142f c0x0000 (---------------) + I cyber + 0x00242545, // n0x1430 c0x0000 (---------------) + I cymru + 0x00202684, // n0x1431 c0x0000 (---------------) + I dali + 0x0027c146, // n0x1432 c0x0000 (---------------) + I dallas + 0x00339908, // n0x1433 c0x0000 (---------------) + I database + 0x00226103, // n0x1434 c0x0000 (---------------) + I ddr + 0x00256f0e, // n0x1435 c0x0000 (---------------) + I decorativearts + 0x00338048, // n0x1436 c0x0000 (---------------) + I delaware + 0x00272e8b, // n0x1437 c0x0000 (---------------) + I delmenhorst + 0x0022db87, // n0x1438 c0x0000 (---------------) + I denmark + 0x0026c845, // n0x1439 c0x0000 (---------------) + I depot + 0x00222ec6, // n0x143a c0x0000 (---------------) + I design + 0x002a07c7, // n0x143b c0x0000 (---------------) + I detroit + 0x002efd48, // n0x143c c0x0000 (---------------) + I dinosaur + 0x0033b449, // n0x143d c0x0000 (---------------) + I discovery + 0x0031ea45, // n0x143e c0x0000 (---------------) + I dolls + 0x0027e288, // n0x143f c0x0000 (---------------) + I donostia + 0x00205346, // n0x1440 c0x0000 (---------------) + I durham + 0x0036ae0a, // n0x1441 c0x0000 (---------------) + I eastafrica + 0x00382709, // n0x1442 c0x0000 (---------------) + I eastcoast + 0x002349c9, // n0x1443 c0x0000 (---------------) + I education + 0x002349cb, // n0x1444 c0x0000 (---------------) + I educational + 0x00283508, // n0x1445 c0x0000 (---------------) + I egyptian + 0x0027ccc9, // n0x1446 c0x0000 (---------------) + I eisenbahn + 0x0020f686, // n0x1447 c0x0000 (---------------) + I elburg + 0x0020beca, // n0x1448 c0x0000 (---------------) + I elvendrell + 0x0022d5ca, // n0x1449 c0x0000 (---------------) + I embroidery + 0x0023944c, // n0x144a c0x0000 (---------------) + I encyclopedic + 0x002c45c7, // n0x144b c0x0000 (---------------) + I england + 0x0038da0a, // n0x144c c0x0000 (---------------) + I entomology + 0x0032b7cb, // n0x144d c0x0000 (---------------) + I environment + 0x0032b7d9, // n0x144e c0x0000 (---------------) + I environmentalconservation + 0x0022b688, // n0x144f c0x0000 (---------------) + I epilepsy + 0x00240d85, // n0x1450 c0x0000 (---------------) + I essex + 0x002bf586, // n0x1451 c0x0000 (---------------) + I estate + 0x0030c209, // n0x1452 c0x0000 (---------------) + I ethnology + 0x003a3906, // n0x1453 c0x0000 (---------------) + I exeter + 0x0021218a, // n0x1454 c0x0000 (---------------) + I exhibition + 0x0036c346, // n0x1455 c0x0000 (---------------) + I family + 0x002a0f44, // n0x1456 c0x0000 (---------------) + I farm + 0x002bf70d, // n0x1457 c0x0000 (---------------) + I farmequipment + 0x00302a87, // n0x1458 c0x0000 (---------------) + I farmers + 0x002a0f49, // n0x1459 c0x0000 (---------------) + I farmstead + 0x00364685, // n0x145a c0x0000 (---------------) + I field + 0x00364a48, // n0x145b c0x0000 (---------------) + I figueres + 0x00375e09, // n0x145c c0x0000 (---------------) + I filatelia + 0x00243ec4, // n0x145d c0x0000 (---------------) + I film + 0x00244587, // n0x145e c0x0000 (---------------) + I fineart + 0x00244588, // n0x145f c0x0000 (---------------) + I finearts + 0x00245547, // n0x1460 c0x0000 (---------------) + I finland + 0x0025fa48, // n0x1461 c0x0000 (---------------) + I flanders + 0x0024aec7, // n0x1462 c0x0000 (---------------) + I florida + 0x0023bb05, // n0x1463 c0x0000 (---------------) + I force + 0x00252dcc, // n0x1464 c0x0000 (---------------) + I fortmissoula + 0x002536c9, // n0x1465 c0x0000 (---------------) + I fortworth + 0x002b370a, // n0x1466 c0x0000 (---------------) + I foundation + 0x00381989, // n0x1467 c0x0000 (---------------) + I francaise + 0x00338849, // n0x1468 c0x0000 (---------------) + I frankfurt + 0x0024fa0c, // n0x1469 c0x0000 (---------------) + I franziskaner + 0x002e0c8b, // n0x146a c0x0000 (---------------) + I freemasonry + 0x002554c8, // n0x146b c0x0000 (---------------) + I freiburg + 0x00257548, // n0x146c c0x0000 (---------------) + I fribourg + 0x0025a904, // n0x146d c0x0000 (---------------) + I frog + 0x00279fc8, // n0x146e c0x0000 (---------------) + I fundacio + 0x0027ae09, // n0x146f c0x0000 (---------------) + I furniture + 0x00397d47, // n0x1470 c0x0000 (---------------) + I gallery + 0x002172c6, // n0x1471 c0x0000 (---------------) + I garden + 0x0023f6c7, // n0x1472 c0x0000 (---------------) + I gateway + 0x0033b6c9, // n0x1473 c0x0000 (---------------) + I geelvinck + 0x0039174b, // n0x1474 c0x0000 (---------------) + I gemological + 0x00321a47, // n0x1475 c0x0000 (---------------) + I geology + 0x0031e1c7, // n0x1476 c0x0000 (---------------) + I georgia + 0x0027bbc7, // n0x1477 c0x0000 (---------------) + I giessen + 0x003959c4, // n0x1478 c0x0000 (---------------) + I glas + 0x003959c5, // n0x1479 c0x0000 (---------------) + I glass + 0x0029eac5, // n0x147a c0x0000 (---------------) + I gorge + 0x0032e34b, // n0x147b c0x0000 (---------------) + I grandrapids + 0x0038aec4, // n0x147c c0x0000 (---------------) + I graz + 0x002a9688, // n0x147d c0x0000 (---------------) + I guernsey + 0x003723ca, // n0x147e c0x0000 (---------------) + I halloffame + 0x00205407, // n0x147f c0x0000 (---------------) + I hamburg + 0x0031be07, // n0x1480 c0x0000 (---------------) + I handson + 0x00284212, // n0x1481 c0x0000 (---------------) + I harvestcelebration + 0x002544c6, // n0x1482 c0x0000 (---------------) + I hawaii + 0x002a51c6, // n0x1483 c0x0000 (---------------) + I health + 0x0031a68e, // n0x1484 c0x0000 (---------------) + I heimatunduhren + 0x00257286, // n0x1485 c0x0000 (---------------) + I hellas + 0x0020c9c8, // n0x1486 c0x0000 (---------------) + I helsinki + 0x00288bcf, // n0x1487 c0x0000 (---------------) + I hembygdsforbund + 0x00395e08, // n0x1488 c0x0000 (---------------) + I heritage + 0x0035c688, // n0x1489 c0x0000 (---------------) + I histoire + 0x002d620a, // n0x148a c0x0000 (---------------) + I historical + 0x002d6211, // n0x148b c0x0000 (---------------) + I historicalsociety + 0x0029968e, // n0x148c c0x0000 (---------------) + I historichouses + 0x0024e9ca, // n0x148d c0x0000 (---------------) + I historisch + 0x0024e9cc, // n0x148e c0x0000 (---------------) + I historisches + 0x00230807, // n0x148f c0x0000 (---------------) + I history + 0x00230810, // n0x1490 c0x0000 (---------------) + I historyofscience + 0x002014c8, // n0x1491 c0x0000 (---------------) + I horology + 0x00299885, // n0x1492 c0x0000 (---------------) + I house + 0x002a268a, // n0x1493 c0x0000 (---------------) + I humanities + 0x0020350c, // n0x1494 c0x0000 (---------------) + I illustration + 0x0028a30d, // n0x1495 c0x0000 (---------------) + I imageandsound + 0x002986c6, // n0x1496 c0x0000 (---------------) + I indian + 0x002986c7, // n0x1497 c0x0000 (---------------) + I indiana + 0x002986cc, // n0x1498 c0x0000 (---------------) + I indianapolis + 0x002e5e0c, // n0x1499 c0x0000 (---------------) + I indianmarket + 0x002f6c4c, // n0x149a c0x0000 (---------------) + I intelligence + 0x00281f8b, // n0x149b c0x0000 (---------------) + I interactive + 0x0027d044, // n0x149c c0x0000 (---------------) + I iraq + 0x0021d3c4, // n0x149d c0x0000 (---------------) + I iron + 0x00349309, // n0x149e c0x0000 (---------------) + I isleofman + 0x002c6e47, // n0x149f c0x0000 (---------------) + I jamison + 0x00332409, // n0x14a0 c0x0000 (---------------) + I jefferson + 0x00356749, // n0x14a1 c0x0000 (---------------) + I jerusalem + 0x0035e0c7, // n0x14a2 c0x0000 (---------------) + I jewelry + 0x00397b06, // n0x14a3 c0x0000 (---------------) + I jewish + 0x00397b09, // n0x14a4 c0x0000 (---------------) + I jewishart + 0x002a4443, // n0x14a5 c0x0000 (---------------) + I jfk + 0x0027d5ca, // n0x14a6 c0x0000 (---------------) + I journalism + 0x0030f6c7, // n0x14a7 c0x0000 (---------------) + I judaica + 0x002050cb, // n0x14a8 c0x0000 (---------------) + I judygarland + 0x0030b34a, // n0x14a9 c0x0000 (---------------) + I juedisches + 0x0023d404, // n0x14aa c0x0000 (---------------) + I juif + 0x002f15c6, // n0x14ab c0x0000 (---------------) + I karate + 0x00276f49, // n0x14ac c0x0000 (---------------) + I karikatur + 0x00283944, // n0x14ad c0x0000 (---------------) + I kids + 0x0020a88a, // n0x14ae c0x0000 (---------------) + I koebenhavn + 0x002a5b85, // n0x14af c0x0000 (---------------) + I koeln + 0x002b1105, // n0x14b0 c0x0000 (---------------) + I kunst + 0x002b110d, // n0x14b1 c0x0000 (---------------) + I kunstsammlung + 0x002b144e, // n0x14b2 c0x0000 (---------------) + I kunstunddesign + 0x00315845, // n0x14b3 c0x0000 (---------------) + I labor + 0x00386dc6, // n0x14b4 c0x0000 (---------------) + I labour + 0x00240907, // n0x14b5 c0x0000 (---------------) + I lajolla + 0x002c788a, // n0x14b6 c0x0000 (---------------) + I lancashire + 0x00320b06, // n0x14b7 c0x0000 (---------------) + I landes + 0x00357784, // n0x14b8 c0x0000 (---------------) + I lans + 0x002da5c7, // n0x14b9 c0x0000 (---------------) + I larsson + 0x00215a0b, // n0x14ba c0x0000 (---------------) + I lewismiller + 0x00351ec7, // n0x14bb c0x0000 (---------------) + I lincoln + 0x0020c104, // n0x14bc c0x0000 (---------------) + I linz + 0x002d8446, // n0x14bd c0x0000 (---------------) + I living + 0x002d844d, // n0x14be c0x0000 (---------------) + I livinghistory + 0x0023a18c, // n0x14bf c0x0000 (---------------) + I localhistory + 0x00310546, // n0x14c0 c0x0000 (---------------) + I london + 0x002c308a, // n0x14c1 c0x0000 (---------------) + I losangeles + 0x00228c06, // n0x14c2 c0x0000 (---------------) + I louvre + 0x002925c8, // n0x14c3 c0x0000 (---------------) + I loyalist + 0x00312587, // n0x14c4 c0x0000 (---------------) + I lucerne + 0x0033938a, // n0x14c5 c0x0000 (---------------) + I luxembourg + 0x00233106, // n0x14c6 c0x0000 (---------------) + I luzern + 0x00209cc3, // n0x14c7 c0x0000 (---------------) + I mad + 0x00306e06, // n0x14c8 c0x0000 (---------------) + I madrid + 0x00200188, // n0x14c9 c0x0000 (---------------) + I mallorca + 0x00291a4a, // n0x14ca c0x0000 (---------------) + I manchester + 0x00262507, // n0x14cb c0x0000 (---------------) + I mansion + 0x00262508, // n0x14cc c0x0000 (---------------) + I mansions + 0x00269a04, // n0x14cd c0x0000 (---------------) + I manx + 0x0027a587, // n0x14ce c0x0000 (---------------) + I marburg + 0x00219888, // n0x14cf c0x0000 (---------------) + I maritime + 0x0029a808, // n0x14d0 c0x0000 (---------------) + I maritimo + 0x0026cc48, // n0x14d1 c0x0000 (---------------) + I maryland + 0x002b4c8a, // n0x14d2 c0x0000 (---------------) + I marylhurst + 0x002fb545, // n0x14d3 c0x0000 (---------------) + I media + 0x00234ec7, // n0x14d4 c0x0000 (---------------) + I medical + 0x0024e813, // n0x14d5 c0x0000 (---------------) + I medizinhistorisches + 0x002515c6, // n0x14d6 c0x0000 (---------------) + I meeres + 0x00338b08, // n0x14d7 c0x0000 (---------------) + I memorial + 0x00221409, // n0x14d8 c0x0000 (---------------) + I mesaverde + 0x0020f988, // n0x14d9 c0x0000 (---------------) + I michigan + 0x0021064b, // n0x14da c0x0000 (---------------) + I midatlantic + 0x002b2c48, // n0x14db c0x0000 (---------------) + I military + 0x00215b44, // n0x14dc c0x0000 (---------------) + I mill + 0x0028cf86, // n0x14dd c0x0000 (---------------) + I miners + 0x002f8106, // n0x14de c0x0000 (---------------) + I mining + 0x002d3949, // n0x14df c0x0000 (---------------) + I minnesota + 0x002b92c7, // n0x14e0 c0x0000 (---------------) + I missile + 0x00252ec8, // n0x14e1 c0x0000 (---------------) + I missoula + 0x003906c6, // n0x14e2 c0x0000 (---------------) + I modern + 0x0020ed84, // n0x14e3 c0x0000 (---------------) + I moma + 0x002c5005, // n0x14e4 c0x0000 (---------------) + I money + 0x002be988, // n0x14e5 c0x0000 (---------------) + I monmouth + 0x002bf0ca, // n0x14e6 c0x0000 (---------------) + I monticello + 0x002bf388, // n0x14e7 c0x0000 (---------------) + I montreal + 0x002c5ac6, // n0x14e8 c0x0000 (---------------) + I moscow + 0x0029214a, // n0x14e9 c0x0000 (---------------) + I motorcycle + 0x002f6388, // n0x14ea c0x0000 (---------------) + I muenchen + 0x002c8108, // n0x14eb c0x0000 (---------------) + I muenster + 0x002c9488, // n0x14ec c0x0000 (---------------) + I mulhouse + 0x002c9e46, // n0x14ed c0x0000 (---------------) + I muncie + 0x002cc246, // n0x14ee c0x0000 (---------------) + I museet + 0x0030910c, // n0x14ef c0x0000 (---------------) + I museumcenter + 0x002cc750, // n0x14f0 c0x0000 (---------------) + I museumvereniging + 0x00270385, // n0x14f1 c0x0000 (---------------) + I music + 0x002fd6c8, // n0x14f2 c0x0000 (---------------) + I national + 0x002fd6d0, // n0x14f3 c0x0000 (---------------) + I nationalfirearms + 0x00395c10, // n0x14f4 c0x0000 (---------------) + I nationalheritage + 0x002a1e0e, // n0x14f5 c0x0000 (---------------) + I nativeamerican + 0x00308d8e, // n0x14f6 c0x0000 (---------------) + I naturalhistory + 0x00308d94, // n0x14f7 c0x0000 (---------------) + I naturalhistorymuseum + 0x0032bdcf, // n0x14f8 c0x0000 (---------------) + I naturalsciences + 0x0032c186, // n0x14f9 c0x0000 (---------------) + I nature + 0x003100d1, // n0x14fa c0x0000 (---------------) + I naturhistorisches + 0x003196d3, // n0x14fb c0x0000 (---------------) + I natuurwetenschappen + 0x00319b48, // n0x14fc c0x0000 (---------------) + I naumburg + 0x0039d445, // n0x14fd c0x0000 (---------------) + I naval + 0x00272148, // n0x14fe c0x0000 (---------------) + I nebraska + 0x002cdc05, // n0x14ff c0x0000 (---------------) + I neues + 0x00226c8c, // n0x1500 c0x0000 (---------------) + I newhampshire + 0x00366dc9, // n0x1501 c0x0000 (---------------) + I newjersey + 0x0021dd09, // n0x1502 c0x0000 (---------------) + I newmexico + 0x0023f447, // n0x1503 c0x0000 (---------------) + I newport + 0x0021fe49, // n0x1504 c0x0000 (---------------) + I newspaper + 0x00302cc7, // n0x1505 c0x0000 (---------------) + I newyork + 0x002c5ec6, // n0x1506 c0x0000 (---------------) + I niepce + 0x00351647, // n0x1507 c0x0000 (---------------) + I norfolk + 0x00238445, // n0x1508 c0x0000 (---------------) + I north + 0x00332603, // n0x1509 c0x0000 (---------------) + I nrw + 0x002262c9, // n0x150a c0x0000 (---------------) + I nuernberg + 0x00209709, // n0x150b c0x0000 (---------------) + I nuremberg + 0x0036c603, // n0x150c c0x0000 (---------------) + I nyc + 0x0039ab44, // n0x150d c0x0000 (---------------) + I nyny + 0x002ff6cd, // n0x150e c0x0000 (---------------) + I oceanographic + 0x00393d4f, // n0x150f c0x0000 (---------------) + I oceanographique + 0x002f5c85, // n0x1510 c0x0000 (---------------) + I omaha + 0x00316946, // n0x1511 c0x0000 (---------------) + I online + 0x00393bc7, // n0x1512 c0x0000 (---------------) + I ontario + 0x0033cc07, // n0x1513 c0x0000 (---------------) + I openair + 0x002811c6, // n0x1514 c0x0000 (---------------) + I oregon + 0x002811cb, // n0x1515 c0x0000 (---------------) + I oregontrail + 0x0029ad85, // n0x1516 c0x0000 (---------------) + I otago + 0x00395106, // n0x1517 c0x0000 (---------------) + I oxford + 0x00350507, // n0x1518 c0x0000 (---------------) + I pacific + 0x00269509, // n0x1519 c0x0000 (---------------) + I paderborn + 0x003097c6, // n0x151a c0x0000 (---------------) + I palace + 0x002ff5c5, // n0x151b c0x0000 (---------------) + I paleo + 0x0022408b, // n0x151c c0x0000 (---------------) + I palmsprings + 0x00339646, // n0x151d c0x0000 (---------------) + I panama + 0x00252285, // n0x151e c0x0000 (---------------) + I paris + 0x002a6148, // n0x151f c0x0000 (---------------) + I pasadena + 0x002ec948, // n0x1520 c0x0000 (---------------) + I pharmacy + 0x002cf34c, // n0x1521 c0x0000 (---------------) + I philadelphia + 0x002cf350, // n0x1522 c0x0000 (---------------) + I philadelphiaarea + 0x002cfa09, // n0x1523 c0x0000 (---------------) + I philately + 0x002cfe47, // n0x1524 c0x0000 (---------------) + I phoenix + 0x002d02cb, // n0x1525 c0x0000 (---------------) + I photography + 0x002d1346, // n0x1526 c0x0000 (---------------) + I pilots + 0x002d1fca, // n0x1527 c0x0000 (---------------) + I pittsburgh + 0x002d2a8b, // n0x1528 c0x0000 (---------------) + I planetarium + 0x002d320a, // n0x1529 c0x0000 (---------------) + I plantation + 0x002d3486, // n0x152a c0x0000 (---------------) + I plants + 0x002d49c5, // n0x152b c0x0000 (---------------) + I plaza + 0x002bcc86, // n0x152c c0x0000 (---------------) + I portal + 0x0027b748, // n0x152d c0x0000 (---------------) + I portland + 0x0023f50a, // n0x152e c0x0000 (---------------) + I portlligat + 0x0035d31c, // n0x152f c0x0000 (---------------) + I posts-and-telecommunications + 0x002da84c, // n0x1530 c0x0000 (---------------) + I preservation + 0x002dab48, // n0x1531 c0x0000 (---------------) + I presidio + 0x00240d05, // n0x1532 c0x0000 (---------------) + I press + 0x002dd187, // n0x1533 c0x0000 (---------------) + I project + 0x0028ff46, // n0x1534 c0x0000 (---------------) + I public + 0x0037f3c5, // n0x1535 c0x0000 (---------------) + I pubol + 0x0021a006, // n0x1536 c0x0000 (---------------) + I quebec + 0x00281388, // n0x1537 c0x0000 (---------------) + I railroad + 0x002aff47, // n0x1538 c0x0000 (---------------) + I railway + 0x00290208, // n0x1539 c0x0000 (---------------) + I research + 0x002d2f8a, // n0x153a c0x0000 (---------------) + I resistance + 0x00310d0c, // n0x153b c0x0000 (---------------) + I riodejaneiro + 0x00310f89, // n0x153c c0x0000 (---------------) + I rochester + 0x0037f707, // n0x153d c0x0000 (---------------) + I rockart + 0x00227784, // n0x153e c0x0000 (---------------) + I roma + 0x0024b506, // n0x153f c0x0000 (---------------) + I russia + 0x0035c20a, // n0x1540 c0x0000 (---------------) + I saintlouis + 0x00356845, // n0x1541 c0x0000 (---------------) + I salem + 0x0039328c, // n0x1542 c0x0000 (---------------) + I salvadordali + 0x00395808, // n0x1543 c0x0000 (---------------) + I salzburg + 0x00237e48, // n0x1544 c0x0000 (---------------) + I sandiego + 0x00207f0c, // n0x1545 c0x0000 (---------------) + I sanfrancisco + 0x0021164c, // n0x1546 c0x0000 (---------------) + I santabarbara + 0x00211d49, // n0x1547 c0x0000 (---------------) + I santacruz + 0x00211f87, // n0x1548 c0x0000 (---------------) + I santafe + 0x002fa40c, // n0x1549 c0x0000 (---------------) + I saskatchewan + 0x0034ef04, // n0x154a c0x0000 (---------------) + I satx + 0x0038340a, // n0x154b c0x0000 (---------------) + I savannahga + 0x0039554c, // n0x154c c0x0000 (---------------) + I schlesisches + 0x0026adcb, // n0x154d c0x0000 (---------------) + I schoenbrunn + 0x0023120b, // n0x154e c0x0000 (---------------) + I schokoladen + 0x00231d06, // n0x154f c0x0000 (---------------) + I school + 0x0023de07, // n0x1550 c0x0000 (---------------) + I schweiz + 0x00230a47, // n0x1551 c0x0000 (---------------) + I science + 0x00230a4f, // n0x1552 c0x0000 (---------------) + I science-fiction + 0x002e6751, // n0x1553 c0x0000 (---------------) + I scienceandhistory + 0x0039cfd2, // n0x1554 c0x0000 (---------------) + I scienceandindustry + 0x0023fa4d, // n0x1555 c0x0000 (---------------) + I sciencecenter + 0x0023fa4e, // n0x1556 c0x0000 (---------------) + I sciencecenters + 0x0023fd8e, // n0x1557 c0x0000 (---------------) + I sciencehistory + 0x0032bf88, // n0x1558 c0x0000 (---------------) + I sciences + 0x0032bf92, // n0x1559 c0x0000 (---------------) + I sciencesnaturelles + 0x00208148, // n0x155a c0x0000 (---------------) + I scotland + 0x002f1d87, // n0x155b c0x0000 (---------------) + I seaport + 0x0024930a, // n0x155c c0x0000 (---------------) + I settlement + 0x0020a4c8, // n0x155d c0x0000 (---------------) + I settlers + 0x00257245, // n0x155e c0x0000 (---------------) + I shell + 0x002e490a, // n0x155f c0x0000 (---------------) + I sherbrooke + 0x0021c2c7, // n0x1560 c0x0000 (---------------) + I sibenik + 0x003531c4, // n0x1561 c0x0000 (---------------) + I silk + 0x0021cf83, // n0x1562 c0x0000 (---------------) + I ski + 0x0028dec5, // n0x1563 c0x0000 (---------------) + I skole + 0x002d6487, // n0x1564 c0x0000 (---------------) + I society + 0x002db8c7, // n0x1565 c0x0000 (---------------) + I sologne + 0x0028a50e, // n0x1566 c0x0000 (---------------) + I soundandvision + 0x00327f4d, // n0x1567 c0x0000 (---------------) + I southcarolina + 0x0032ad49, // n0x1568 c0x0000 (---------------) + I southwest + 0x00335085, // n0x1569 c0x0000 (---------------) + I space + 0x0032e5c3, // n0x156a c0x0000 (---------------) + I spy + 0x0027c606, // n0x156b c0x0000 (---------------) + I square + 0x00361245, // n0x156c c0x0000 (---------------) + I stadt + 0x002730c8, // n0x156d c0x0000 (---------------) + I stalbans + 0x00317c49, // n0x156e c0x0000 (---------------) + I starnberg + 0x0028e7c5, // n0x156f c0x0000 (---------------) + I state + 0x00337e8f, // n0x1570 c0x0000 (---------------) + I stateofdelaware + 0x002d4807, // n0x1571 c0x0000 (---------------) + I station + 0x003658c5, // n0x1572 c0x0000 (---------------) + I steam + 0x00305b8a, // n0x1573 c0x0000 (---------------) + I steiermark + 0x002b4e86, // n0x1574 c0x0000 (---------------) + I stjohn + 0x00292749, // n0x1575 c0x0000 (---------------) + I stockholm + 0x002e058c, // n0x1576 c0x0000 (---------------) + I stpetersburg + 0x002e1909, // n0x1577 c0x0000 (---------------) + I stuttgart + 0x002068c6, // n0x1578 c0x0000 (---------------) + I suisse + 0x003721cc, // n0x1579 c0x0000 (---------------) + I surgeonshall + 0x002e2146, // n0x157a c0x0000 (---------------) + I surrey + 0x002e4c88, // n0x157b c0x0000 (---------------) + I svizzera + 0x002e4e86, // n0x157c c0x0000 (---------------) + I sweden + 0x0022b806, // n0x157d c0x0000 (---------------) + I sydney + 0x00224d04, // n0x157e c0x0000 (---------------) + I tank + 0x00255843, // n0x157f c0x0000 (---------------) + I tcm + 0x002a3c4a, // n0x1580 c0x0000 (---------------) + I technology + 0x0025ea51, // n0x1581 c0x0000 (---------------) + I telekommunikation + 0x0023b44a, // n0x1582 c0x0000 (---------------) + I television + 0x002ff185, // n0x1583 c0x0000 (---------------) + I texas + 0x002fe987, // n0x1584 c0x0000 (---------------) + I textile + 0x0031b107, // n0x1585 c0x0000 (---------------) + I theater + 0x00219984, // n0x1586 c0x0000 (---------------) + I time + 0x0021998b, // n0x1587 c0x0000 (---------------) + I timekeeping + 0x00300d08, // n0x1588 c0x0000 (---------------) + I topology + 0x002abe46, // n0x1589 c0x0000 (---------------) + I torino + 0x00330f05, // n0x158a c0x0000 (---------------) + I touch + 0x002a9404, // n0x158b c0x0000 (---------------) + I town + 0x0028b589, // n0x158c c0x0000 (---------------) + I transport + 0x0024f1c4, // n0x158d c0x0000 (---------------) + I tree + 0x002b2407, // n0x158e c0x0000 (---------------) + I trolley + 0x0031f0c5, // n0x158f c0x0000 (---------------) + I trust + 0x0031f0c7, // n0x1590 c0x0000 (---------------) + I trustee + 0x0031a8c5, // n0x1591 c0x0000 (---------------) + I uhren + 0x00330703, // n0x1592 c0x0000 (---------------) + I ulm + 0x002f1c48, // n0x1593 c0x0000 (---------------) + I undersea + 0x00281a0a, // n0x1594 c0x0000 (---------------) + I university + 0x00204783, // n0x1595 c0x0000 (---------------) + I usa + 0x0020478a, // n0x1596 c0x0000 (---------------) + I usantiques + 0x00285b46, // n0x1597 c0x0000 (---------------) + I usarts + 0x00337c0f, // n0x1598 c0x0000 (---------------) + I uscountryestate + 0x0034cd09, // n0x1599 c0x0000 (---------------) + I usculture + 0x00256e90, // n0x159a c0x0000 (---------------) + I usdecorativearts + 0x00266448, // n0x159b c0x0000 (---------------) + I usgarden + 0x002c6149, // n0x159c c0x0000 (---------------) + I ushistory + 0x00294047, // n0x159d c0x0000 (---------------) + I ushuaia + 0x002d83cf, // n0x159e c0x0000 (---------------) + I uslivinghistory + 0x002e1444, // n0x159f c0x0000 (---------------) + I utah + 0x002fa7c4, // n0x15a0 c0x0000 (---------------) + I uvic + 0x00213f46, // n0x15a1 c0x0000 (---------------) + I valley + 0x00265f06, // n0x15a2 c0x0000 (---------------) + I vantaa + 0x00314eca, // n0x15a3 c0x0000 (---------------) + I versailles + 0x0036cf46, // n0x15a4 c0x0000 (---------------) + I viking + 0x002f0507, // n0x15a5 c0x0000 (---------------) + I village + 0x002ee6c8, // n0x15a6 c0x0000 (---------------) + I virginia + 0x002ee8c7, // n0x15a7 c0x0000 (---------------) + I virtual + 0x002eea87, // n0x15a8 c0x0000 (---------------) + I virtuel + 0x003434ca, // n0x15a9 c0x0000 (---------------) + I vlaanderen + 0x002f1a8b, // n0x15aa c0x0000 (---------------) + I volkenkunde + 0x0030e445, // n0x15ab c0x0000 (---------------) + I wales + 0x0039cc08, // n0x15ac c0x0000 (---------------) + I wallonie + 0x00207c83, // n0x15ad c0x0000 (---------------) + I war + 0x00227b8c, // n0x15ae c0x0000 (---------------) + I washingtondc + 0x0037364f, // n0x15af c0x0000 (---------------) + I watch-and-clock + 0x002a690d, // n0x15b0 c0x0000 (---------------) + I watchandclock + 0x00238587, // n0x15b1 c0x0000 (---------------) + I western + 0x0032ae89, // n0x15b2 c0x0000 (---------------) + I westfalen + 0x00330c07, // n0x15b3 c0x0000 (---------------) + I whaling + 0x0023eb88, // n0x15b4 c0x0000 (---------------) + I wildlife + 0x0022e18c, // n0x15b5 c0x0000 (---------------) + I williamsburg + 0x0025b848, // n0x15b6 c0x0000 (---------------) + I windmill + 0x00332b48, // n0x15b7 c0x0000 (---------------) + I workshop + 0x0030be8e, // n0x15b8 c0x0000 (---------------) + I xn--9dbhblg6di + 0x0031cc14, // n0x15b9 c0x0000 (---------------) + I xn--comunicaes-v6a2o + 0x0031d124, // n0x15ba c0x0000 (---------------) + I xn--correios-e-telecomunicaes-ghc29a + 0x00336e4a, // n0x15bb c0x0000 (---------------) + I xn--h1aegh + 0x003537cb, // n0x15bc c0x0000 (---------------) + I xn--lns-qla + 0x00302d84, // n0x15bd c0x0000 (---------------) + I york + 0x00302d89, // n0x15be c0x0000 (---------------) + I yorkshire + 0x003535c8, // n0x15bf c0x0000 (---------------) + I yosemite + 0x00242c85, // n0x15c0 c0x0000 (---------------) + I youth + 0x00225c0a, // n0x15c1 c0x0000 (---------------) + I zoological + 0x0027c7c7, // n0x15c2 c0x0000 (---------------) + I zoology + 0x002bcb84, // n0x15c3 c0x0000 (---------------) + I aero + 0x0030a143, // n0x15c4 c0x0000 (---------------) + I biz + 0x0022edc3, // n0x15c5 c0x0000 (---------------) + I com + 0x00238284, // n0x15c6 c0x0000 (---------------) + I coop + 0x002349c3, // n0x15c7 c0x0000 (---------------) + I edu + 0x00275003, // n0x15c8 c0x0000 (---------------) + I gov + 0x0038a144, // n0x15c9 c0x0000 (---------------) + I info + 0x0026f683, // n0x15ca c0x0000 (---------------) + I int + 0x00215b43, // n0x15cb c0x0000 (---------------) + I mil + 0x002cc746, // n0x15cc c0x0000 (---------------) + I museum + 0x0027ca84, // n0x15cd c0x0000 (---------------) + I name + 0x0021d8c3, // n0x15ce c0x0000 (---------------) + I net + 0x00229a83, // n0x15cf c0x0000 (---------------) + I org + 0x00220283, // n0x15d0 c0x0000 (---------------) + I pro + 0x00205882, // n0x15d1 c0x0000 (---------------) + I ac + 0x0030a143, // n0x15d2 c0x0000 (---------------) + I biz + 0x00208182, // n0x15d3 c0x0000 (---------------) + I co + 0x0022edc3, // n0x15d4 c0x0000 (---------------) + I com + 0x00238284, // n0x15d5 c0x0000 (---------------) + I coop + 0x002349c3, // n0x15d6 c0x0000 (---------------) + I edu + 0x00275003, // n0x15d7 c0x0000 (---------------) + I gov + 0x0026f683, // n0x15d8 c0x0000 (---------------) + I int + 0x002cc746, // n0x15d9 c0x0000 (---------------) + I museum + 0x0021d8c3, // n0x15da c0x0000 (---------------) + I net + 0x00229a83, // n0x15db c0x0000 (---------------) + I org + 0x000f5248, // n0x15dc c0x0000 (---------------) + blogspot + 0x0022edc3, // n0x15dd c0x0000 (---------------) + I com + 0x002349c3, // n0x15de c0x0000 (---------------) + I edu + 0x00209f03, // n0x15df c0x0000 (---------------) + I gob + 0x0021d8c3, // n0x15e0 c0x0000 (---------------) + I net + 0x00229a83, // n0x15e1 c0x0000 (---------------) + I org + 0x000f5248, // n0x15e2 c0x0000 (---------------) + blogspot + 0x0022edc3, // n0x15e3 c0x0000 (---------------) + I com + 0x002349c3, // n0x15e4 c0x0000 (---------------) + I edu + 0x00275003, // n0x15e5 c0x0000 (---------------) + I gov + 0x00215b43, // n0x15e6 c0x0000 (---------------) + I mil + 0x0027ca84, // n0x15e7 c0x0000 (---------------) + I name + 0x0021d8c3, // n0x15e8 c0x0000 (---------------) + I net + 0x00229a83, // n0x15e9 c0x0000 (---------------) + I org + 0x00739808, // n0x15ea c0x0001 (---------------) ! I teledata + 0x00200302, // n0x15eb c0x0000 (---------------) + I ca + 0x0021db82, // n0x15ec c0x0000 (---------------) + I cc + 0x00208182, // n0x15ed c0x0000 (---------------) + I co + 0x0022edc3, // n0x15ee c0x0000 (---------------) + I com + 0x00204d42, // n0x15ef c0x0000 (---------------) + I dr + 0x002020c2, // n0x15f0 c0x0000 (---------------) + I in + 0x0038a144, // n0x15f1 c0x0000 (---------------) + I info + 0x00207804, // n0x15f2 c0x0000 (---------------) + I mobi + 0x00214b82, // n0x15f3 c0x0000 (---------------) + I mx + 0x0027ca84, // n0x15f4 c0x0000 (---------------) + I name + 0x00200282, // n0x15f5 c0x0000 (---------------) + I or + 0x00229a83, // n0x15f6 c0x0000 (---------------) + I org + 0x00220283, // n0x15f7 c0x0000 (---------------) + I pro + 0x00231d06, // n0x15f8 c0x0000 (---------------) + I school + 0x00206fc2, // n0x15f9 c0x0000 (---------------) + I tv + 0x00202982, // n0x15fa c0x0000 (---------------) + I us + 0x0021fec2, // n0x15fb c0x0000 (---------------) + I ws + 0x37e21343, // n0x15fc c0x00df (n0x15fe-n0x15ff) o I her + 0x38210ac3, // n0x15fd c0x00e0 (n0x15ff-n0x1600) o I his + 0x0004f7c6, // n0x15fe c0x0000 (---------------) + forgot + 0x0004f7c6, // n0x15ff c0x0000 (---------------) + forgot + 0x002b1c44, // n0x1600 c0x0000 (---------------) + I asso + 0x001068cc, // n0x1601 c0x0000 (---------------) + at-band-camp + 0x0007758c, // n0x1602 c0x0000 (---------------) + azure-mobile + 0x000ba84d, // n0x1603 c0x0000 (---------------) + azurewebsites + 0x00029007, // n0x1604 c0x0000 (---------------) + blogdns + 0x0001f188, // n0x1605 c0x0000 (---------------) + broke-it + 0x0019304a, // n0x1606 c0x0000 (---------------) + buyshouses + 0x38e39705, // n0x1607 c0x00e3 (n0x1632-n0x1633) o I cdn77 + 0x00039709, // n0x1608 c0x0000 (---------------) + cdn77-ssl + 0x0017e448, // n0x1609 c0x0000 (---------------) + cloudapp + 0x0002c88a, // n0x160a c0x0000 (---------------) + cloudfront + 0x00147e08, // n0x160b c0x0000 (---------------) + dnsalias + 0x00074607, // n0x160c c0x0000 (---------------) + dnsdojo + 0x00006e47, // n0x160d c0x0000 (---------------) + does-it + 0x00168789, // n0x160e c0x0000 (---------------) + dontexist + 0x0018bd88, // n0x160f c0x0000 (---------------) + dynalias + 0x0005ce49, // n0x1610 c0x0000 (---------------) + dynathome + 0x0009f90d, // n0x1611 c0x0000 (---------------) + endofinternet + 0x392e01c6, // n0x1612 c0x00e4 (n0x1633-n0x1635) o I fastly + 0x0005b687, // n0x1613 c0x0000 (---------------) + from-az + 0x0005d787, // n0x1614 c0x0000 (---------------) + from-co + 0x00061fc7, // n0x1615 c0x0000 (---------------) + from-la + 0x00068a07, // n0x1616 c0x0000 (---------------) + from-ny + 0x00009582, // n0x1617 c0x0000 (---------------) + gb + 0x00163107, // n0x1618 c0x0000 (---------------) + gets-it + 0x0005e5cc, // n0x1619 c0x0000 (---------------) + ham-radio-op + 0x000ad607, // n0x161a c0x0000 (---------------) + homeftp + 0x0009c286, // n0x161b c0x0000 (---------------) + homeip + 0x0009c509, // n0x161c c0x0000 (---------------) + homelinux + 0x0009d988, // n0x161d c0x0000 (---------------) + homeunix + 0x0000d0c2, // n0x161e c0x0000 (---------------) + hu + 0x000020c2, // n0x161f c0x0000 (---------------) + in + 0x0010078b, // n0x1620 c0x0000 (---------------) + in-the-band + 0x0000fe09, // n0x1621 c0x0000 (---------------) + is-a-chef + 0x0005f049, // n0x1622 c0x0000 (---------------) + is-a-geek + 0x000fff08, // n0x1623 c0x0000 (---------------) + isa-geek + 0x000a8bc2, // n0x1624 c0x0000 (---------------) + jp + 0x0014c909, // n0x1625 c0x0000 (---------------) + kicks-ass + 0x0001f70d, // n0x1626 c0x0000 (---------------) + office-on-the + 0x000d7147, // n0x1627 c0x0000 (---------------) + podzone + 0x0004700d, // n0x1628 c0x0000 (---------------) + scrapper-site + 0x00001d42, // n0x1629 c0x0000 (---------------) + se + 0x00053986, // n0x162a c0x0000 (---------------) + selfip + 0x00088508, // n0x162b c0x0000 (---------------) + sells-it + 0x000c9608, // n0x162c c0x0000 (---------------) + servebbs + 0x0006e648, // n0x162d c0x0000 (---------------) + serveftp + 0x0004c288, // n0x162e c0x0000 (---------------) + thruhere + 0x00000f82, // n0x162f c0x0000 (---------------) + uk + 0x00123b06, // n0x1630 c0x0000 (---------------) + webhop + 0x00009ac2, // n0x1631 c0x0000 (---------------) + za + 0x000002c1, // n0x1632 c0x0000 (---------------) + r + 0x396db644, // n0x1633 c0x00e5 (n0x1635-n0x1637) o I prod + 0x39a39883, // n0x1634 c0x00e6 (n0x1637-n0x163a) o I ssl + 0x00000101, // n0x1635 c0x0000 (---------------) + a + 0x00005586, // n0x1636 c0x0000 (---------------) + global + 0x00000101, // n0x1637 c0x0000 (---------------) + a + 0x00000001, // n0x1638 c0x0000 (---------------) + b + 0x00005586, // n0x1639 c0x0000 (---------------) + global + 0x00243984, // n0x163a c0x0000 (---------------) + I arts + 0x0022edc3, // n0x163b c0x0000 (---------------) + I com + 0x00247a04, // n0x163c c0x0000 (---------------) + I firm + 0x0038a144, // n0x163d c0x0000 (---------------) + I info + 0x0021d8c3, // n0x163e c0x0000 (---------------) + I net + 0x002212c5, // n0x163f c0x0000 (---------------) + I other + 0x0021ffc3, // n0x1640 c0x0000 (---------------) + I per + 0x00226f03, // n0x1641 c0x0000 (---------------) + I rec + 0x0038c985, // n0x1642 c0x0000 (---------------) + I store + 0x0021fa83, // n0x1643 c0x0000 (---------------) + I web + 0x3a62edc3, // n0x1644 c0x00e9 (n0x164d-n0x164e) + I com + 0x002349c3, // n0x1645 c0x0000 (---------------) + I edu + 0x00275003, // n0x1646 c0x0000 (---------------) + I gov + 0x00215b43, // n0x1647 c0x0000 (---------------) + I mil + 0x00207804, // n0x1648 c0x0000 (---------------) + I mobi + 0x0027ca84, // n0x1649 c0x0000 (---------------) + I name + 0x0021d8c3, // n0x164a c0x0000 (---------------) + I net + 0x00229a83, // n0x164b c0x0000 (---------------) + I org + 0x00215d43, // n0x164c c0x0000 (---------------) + I sch + 0x000f5248, // n0x164d c0x0000 (---------------) + blogspot + 0x000f5248, // n0x164e c0x0000 (---------------) + blogspot + 0x00364282, // n0x164f c0x0000 (---------------) + I bv + 0x00008182, // n0x1650 c0x0000 (---------------) + co + 0x3b222142, // n0x1651 c0x00ec (n0x1927-n0x1928) + I aa + 0x00379688, // n0x1652 c0x0000 (---------------) + I aarborte + 0x002225c6, // n0x1653 c0x0000 (---------------) + I aejrie + 0x002b65c6, // n0x1654 c0x0000 (---------------) + I afjord + 0x00221f47, // n0x1655 c0x0000 (---------------) + I agdenes + 0x3b607142, // n0x1656 c0x00ed (n0x1928-n0x1929) + I ah + 0x3bb1b508, // n0x1657 c0x00ee (n0x1929-n0x192a) o I akershus + 0x0030ec8a, // n0x1658 c0x0000 (---------------) + I aknoluokta + 0x0025b108, // n0x1659 c0x0000 (---------------) + I akrehamn + 0x002001c2, // n0x165a c0x0000 (---------------) + I al + 0x0030f509, // n0x165b c0x0000 (---------------) + I alaheadju + 0x0030e487, // n0x165c c0x0000 (---------------) + I alesund + 0x00217246, // n0x165d c0x0000 (---------------) + I algard + 0x00235909, // n0x165e c0x0000 (---------------) + I alstahaug + 0x00235004, // n0x165f c0x0000 (---------------) + I alta + 0x002b7046, // n0x1660 c0x0000 (---------------) + I alvdal + 0x002b69c4, // n0x1661 c0x0000 (---------------) + I amli + 0x00270f84, // n0x1662 c0x0000 (---------------) + I amot + 0x00252a09, // n0x1663 c0x0000 (---------------) + I andasuolo + 0x00204e86, // n0x1664 c0x0000 (---------------) + I andebu + 0x0036bd45, // n0x1665 c0x0000 (---------------) + I andoy + 0x00260185, // n0x1666 c0x0000 (---------------) + I ardal + 0x0022f807, // n0x1667 c0x0000 (---------------) + I aremark + 0x002b30c7, // n0x1668 c0x0000 (---------------) + I arendal + 0x00347544, // n0x1669 c0x0000 (---------------) + I arna + 0x00222186, // n0x166a c0x0000 (---------------) + I aseral + 0x002dc105, // n0x166b c0x0000 (---------------) + I asker + 0x00229385, // n0x166c c0x0000 (---------------) + I askim + 0x002ea945, // n0x166d c0x0000 (---------------) + I askoy + 0x00385087, // n0x166e c0x0000 (---------------) + I askvoll + 0x0022d9c5, // n0x166f c0x0000 (---------------) + I asnes + 0x00304089, // n0x1670 c0x0000 (---------------) + I audnedaln + 0x002a1605, // n0x1671 c0x0000 (---------------) + I aukra + 0x002efe84, // n0x1672 c0x0000 (---------------) + I aure + 0x00320a47, // n0x1673 c0x0000 (---------------) + I aurland + 0x002bc40e, // n0x1674 c0x0000 (---------------) + I aurskog-holand + 0x00301fc9, // n0x1675 c0x0000 (---------------) + I austevoll + 0x0031a549, // n0x1676 c0x0000 (---------------) + I austrheim + 0x0032b606, // n0x1677 c0x0000 (---------------) + I averoy + 0x002e6f88, // n0x1678 c0x0000 (---------------) + I badaddja + 0x002a774b, // n0x1679 c0x0000 (---------------) + I bahcavuotna + 0x002cd38c, // n0x167a c0x0000 (---------------) + I bahccavuotna + 0x00262246, // n0x167b c0x0000 (---------------) + I baidar + 0x0036e907, // n0x167c c0x0000 (---------------) + I bajddar + 0x00224745, // n0x167d c0x0000 (---------------) + I balat + 0x0022d04a, // n0x167e c0x0000 (---------------) + I balestrand + 0x00307909, // n0x167f c0x0000 (---------------) + I ballangen + 0x002559c9, // n0x1680 c0x0000 (---------------) + I balsfjord + 0x002a0b46, // n0x1681 c0x0000 (---------------) + I bamble + 0x002e40c5, // n0x1682 c0x0000 (---------------) + I bardu + 0x002768c5, // n0x1683 c0x0000 (---------------) + I barum + 0x00350189, // n0x1684 c0x0000 (---------------) + I batsfjord + 0x002eaacb, // n0x1685 c0x0000 (---------------) + I bearalvahki + 0x002742c6, // n0x1686 c0x0000 (---------------) + I beardu + 0x0032a546, // n0x1687 c0x0000 (---------------) + I beiarn + 0x002094c4, // n0x1688 c0x0000 (---------------) + I berg + 0x00283ec6, // n0x1689 c0x0000 (---------------) + I bergen + 0x002bbb08, // n0x168a c0x0000 (---------------) + I berlevag + 0x00200006, // n0x168b c0x0000 (---------------) + I bievat + 0x002025c6, // n0x168c c0x0000 (---------------) + I bindal + 0x00205ec8, // n0x168d c0x0000 (---------------) + I birkenes + 0x002066c7, // n0x168e c0x0000 (---------------) + I bjarkoy + 0x002075c9, // n0x168f c0x0000 (---------------) + I bjerkreim + 0x00207d85, // n0x1690 c0x0000 (---------------) + I bjugn + 0x000f5248, // n0x1691 c0x0000 (---------------) + blogspot + 0x00206dc4, // n0x1692 c0x0000 (---------------) + I bodo + 0x002f0804, // n0x1693 c0x0000 (---------------) + I bokn + 0x00211485, // n0x1694 c0x0000 (---------------) + I bomlo + 0x00388089, // n0x1695 c0x0000 (---------------) + I bremanger + 0x00220687, // n0x1696 c0x0000 (---------------) + I bronnoy + 0x0022068b, // n0x1697 c0x0000 (---------------) + I bronnoysund + 0x0022184a, // n0x1698 c0x0000 (---------------) + I brumunddal + 0x00224445, // n0x1699 c0x0000 (---------------) + I bryne + 0x3be04742, // n0x169a c0x00ef (n0x192a-n0x192b) + I bu + 0x00204f87, // n0x169b c0x0000 (---------------) + I budejju + 0x3c226a48, // n0x169c c0x00f0 (n0x192b-n0x192c) o I buskerud + 0x002cb0c7, // n0x169d c0x0000 (---------------) + I bygland + 0x002acb45, // n0x169e c0x0000 (---------------) + I bykle + 0x00239f8a, // n0x169f c0x0000 (---------------) + I cahcesuolo + 0x00008182, // n0x16a0 c0x0000 (---------------) + co + 0x0028760b, // n0x16a1 c0x0000 (---------------) + I davvenjarga + 0x0025c88a, // n0x16a2 c0x0000 (---------------) + I davvesiida + 0x00395246, // n0x16a3 c0x0000 (---------------) + I deatnu + 0x0026c843, // n0x16a4 c0x0000 (---------------) + I dep + 0x002ad18d, // n0x16a5 c0x0000 (---------------) + I dielddanuorri + 0x00255bcc, // n0x16a6 c0x0000 (---------------) + I divtasvuodna + 0x002641cd, // n0x16a7 c0x0000 (---------------) + I divttasvuotna + 0x00359d05, // n0x16a8 c0x0000 (---------------) + I donna + 0x0025dfc5, // n0x16a9 c0x0000 (---------------) + I dovre + 0x00226147, // n0x16aa c0x0000 (---------------) + I drammen + 0x0030e609, // n0x16ab c0x0000 (---------------) + I drangedal + 0x0030eb86, // n0x16ac c0x0000 (---------------) + I drobak + 0x0036cdc5, // n0x16ad c0x0000 (---------------) + I dyroy + 0x0025d9c8, // n0x16ae c0x0000 (---------------) + I egersund + 0x00272443, // n0x16af c0x0000 (---------------) + I eid + 0x0032f988, // n0x16b0 c0x0000 (---------------) + I eidfjord + 0x00283dc8, // n0x16b1 c0x0000 (---------------) + I eidsberg + 0x002b7f47, // n0x16b2 c0x0000 (---------------) + I eidskog + 0x00272448, // n0x16b3 c0x0000 (---------------) + I eidsvoll + 0x003a3509, // n0x16b4 c0x0000 (---------------) + I eigersund + 0x00236e07, // n0x16b5 c0x0000 (---------------) + I elverum + 0x00379087, // n0x16b6 c0x0000 (---------------) + I enebakk + 0x0027bd08, // n0x16b7 c0x0000 (---------------) + I engerdal + 0x002afb04, // n0x16b8 c0x0000 (---------------) + I etne + 0x002afb07, // n0x16b9 c0x0000 (---------------) + I etnedal + 0x0024bd88, // n0x16ba c0x0000 (---------------) + I evenassi + 0x002031c6, // n0x16bb c0x0000 (---------------) + I evenes + 0x003967cf, // n0x16bc c0x0000 (---------------) + I evje-og-hornnes + 0x00210007, // n0x16bd c0x0000 (---------------) + I farsund + 0x00246786, // n0x16be c0x0000 (---------------) + I fauske + 0x00247cc5, // n0x16bf c0x0000 (---------------) + I fedje + 0x00341603, // n0x16c0 c0x0000 (---------------) + I fet + 0x00341607, // n0x16c1 c0x0000 (---------------) + I fetsund + 0x00325a43, // n0x16c2 c0x0000 (---------------) + I fhs + 0x00245706, // n0x16c3 c0x0000 (---------------) + I finnoy + 0x00248b06, // n0x16c4 c0x0000 (---------------) + I fitjar + 0x002496c6, // n0x16c5 c0x0000 (---------------) + I fjaler + 0x00286e85, // n0x16c6 c0x0000 (---------------) + I fjell + 0x00203803, // n0x16c7 c0x0000 (---------------) + I fla + 0x0037b548, // n0x16c8 c0x0000 (---------------) + I flakstad + 0x00203809, // n0x16c9 c0x0000 (---------------) + I flatanger + 0x00361b0b, // n0x16ca c0x0000 (---------------) + I flekkefjord + 0x00373d08, // n0x16cb c0x0000 (---------------) + I flesberg + 0x0024ab85, // n0x16cc c0x0000 (---------------) + I flora + 0x0024b685, // n0x16cd c0x0000 (---------------) + I floro + 0x3c63d4c2, // n0x16ce c0x00f1 (n0x192c-n0x192d) + I fm + 0x00351709, // n0x16cf c0x0000 (---------------) + I folkebibl + 0x0024dac7, // n0x16d0 c0x0000 (---------------) + I folldal + 0x00395185, // n0x16d1 c0x0000 (---------------) + I forde + 0x00252907, // n0x16d2 c0x0000 (---------------) + I forsand + 0x00254346, // n0x16d3 c0x0000 (---------------) + I fosnes + 0x00358985, // n0x16d4 c0x0000 (---------------) + I frana + 0x0036108b, // n0x16d5 c0x0000 (---------------) + I fredrikstad + 0x002554c4, // n0x16d6 c0x0000 (---------------) + I frei + 0x0025acc5, // n0x16d7 c0x0000 (---------------) + I frogn + 0x0025ae07, // n0x16d8 c0x0000 (---------------) + I froland + 0x0026ed46, // n0x16d9 c0x0000 (---------------) + I frosta + 0x0026f185, // n0x16da c0x0000 (---------------) + I froya + 0x0027a1c7, // n0x16db c0x0000 (---------------) + I fuoisku + 0x0027a747, // n0x16dc c0x0000 (---------------) + I fuossko + 0x00285b04, // n0x16dd c0x0000 (---------------) + I fusa + 0x002826ca, // n0x16de c0x0000 (---------------) + I fylkesbibl + 0x00282b88, // n0x16df c0x0000 (---------------) + I fyresdal + 0x00301349, // n0x16e0 c0x0000 (---------------) + I gaivuotna + 0x0021c685, // n0x16e1 c0x0000 (---------------) + I galsa + 0x00287846, // n0x16e2 c0x0000 (---------------) + I gamvik + 0x002bbcca, // n0x16e3 c0x0000 (---------------) + I gangaviika + 0x00260086, // n0x16e4 c0x0000 (---------------) + I gaular + 0x00312407, // n0x16e5 c0x0000 (---------------) + I gausdal + 0x0030100d, // n0x16e6 c0x0000 (---------------) + I giehtavuoatna + 0x0022a489, // n0x16e7 c0x0000 (---------------) + I gildeskal + 0x00363785, // n0x16e8 c0x0000 (---------------) + I giske + 0x003639c7, // n0x16e9 c0x0000 (---------------) + I gjemnes + 0x00309c48, // n0x16ea c0x0000 (---------------) + I gjerdrum + 0x00322608, // n0x16eb c0x0000 (---------------) + I gjerstad + 0x0033af47, // n0x16ec c0x0000 (---------------) + I gjesdal + 0x003088c6, // n0x16ed c0x0000 (---------------) + I gjovik + 0x00209907, // n0x16ee c0x0000 (---------------) + I gloppen + 0x00247c03, // n0x16ef c0x0000 (---------------) + I gol + 0x0032e344, // n0x16f0 c0x0000 (---------------) + I gran + 0x00355305, // n0x16f1 c0x0000 (---------------) + I grane + 0x00380ac7, // n0x16f2 c0x0000 (---------------) + I granvin + 0x00384a89, // n0x16f3 c0x0000 (---------------) + I gratangen + 0x00216c48, // n0x16f4 c0x0000 (---------------) + I grimstad + 0x00312305, // n0x16f5 c0x0000 (---------------) + I grong + 0x00339d44, // n0x16f6 c0x0000 (---------------) + I grue + 0x00240f85, // n0x16f7 c0x0000 (---------------) + I gulen + 0x0024494d, // n0x16f8 c0x0000 (---------------) + I guovdageaidnu + 0x00201c82, // n0x16f9 c0x0000 (---------------) + I ha + 0x0035c886, // n0x16fa c0x0000 (---------------) + I habmer + 0x002538c6, // n0x16fb c0x0000 (---------------) + I hadsel + 0x0029c98a, // n0x16fc c0x0000 (---------------) + I hagebostad + 0x00346a86, // n0x16fd c0x0000 (---------------) + I halden + 0x0035c145, // n0x16fe c0x0000 (---------------) + I halsa + 0x00302585, // n0x16ff c0x0000 (---------------) + I hamar + 0x00302587, // n0x1700 c0x0000 (---------------) + I hamaroy + 0x0036ac4c, // n0x1701 c0x0000 (---------------) + I hammarfeasta + 0x0027da0a, // n0x1702 c0x0000 (---------------) + I hammerfest + 0x00282f86, // n0x1703 c0x0000 (---------------) + I hapmir + 0x002b9f05, // n0x1704 c0x0000 (---------------) + I haram + 0x00283d06, // n0x1705 c0x0000 (---------------) + I hareid + 0x00284047, // n0x1706 c0x0000 (---------------) + I harstad + 0x00285186, // n0x1707 c0x0000 (---------------) + I hasvik + 0x00286d8c, // n0x1708 c0x0000 (---------------) + I hattfjelldal + 0x00235a49, // n0x1709 c0x0000 (---------------) + I haugesund + 0x3ca31807, // n0x170a c0x00f2 (n0x192d-n0x1930) o I hedmark + 0x00288f85, // n0x170b c0x0000 (---------------) + I hemne + 0x00288f86, // n0x170c c0x0000 (---------------) + I hemnes + 0x002894c8, // n0x170d c0x0000 (---------------) + I hemsedal + 0x002aacc5, // n0x170e c0x0000 (---------------) + I herad + 0x0029b645, // n0x170f c0x0000 (---------------) + I hitra + 0x0029b888, // n0x1710 c0x0000 (---------------) + I hjartdal + 0x0029ba8a, // n0x1711 c0x0000 (---------------) + I hjelmeland + 0x3cea9982, // n0x1712 c0x00f3 (n0x1930-n0x1931) + I hl + 0x3d20c742, // n0x1713 c0x00f4 (n0x1931-n0x1932) + I hm + 0x0034e405, // n0x1714 c0x0000 (---------------) + I hobol + 0x002d2203, // n0x1715 c0x0000 (---------------) + I hof + 0x003327c8, // n0x1716 c0x0000 (---------------) + I hokksund + 0x00231ac3, // n0x1717 c0x0000 (---------------) + I hol + 0x0029bd04, // n0x1718 c0x0000 (---------------) + I hole + 0x0029288b, // n0x1719 c0x0000 (---------------) + I holmestrand + 0x002c4448, // n0x171a c0x0000 (---------------) + I holtalen + 0x0029e188, // n0x171b c0x0000 (---------------) + I honefoss + 0x3d71e409, // n0x171c c0x00f5 (n0x1932-n0x1933) o I hordaland + 0x0029f389, // n0x171d c0x0000 (---------------) + I hornindal + 0x0029f806, // n0x171e c0x0000 (---------------) + I horten + 0x002a0448, // n0x171f c0x0000 (---------------) + I hoyanger + 0x002a0649, // n0x1720 c0x0000 (---------------) + I hoylandet + 0x002a2cc6, // n0x1721 c0x0000 (---------------) + I hurdal + 0x002a2e45, // n0x1722 c0x0000 (---------------) + I hurum + 0x00360406, // n0x1723 c0x0000 (---------------) + I hvaler + 0x002a3389, // n0x1724 c0x0000 (---------------) + I hyllestad + 0x00363387, // n0x1725 c0x0000 (---------------) + I ibestad + 0x002630c6, // n0x1726 c0x0000 (---------------) + I idrett + 0x00306007, // n0x1727 c0x0000 (---------------) + I inderoy + 0x0030ea07, // n0x1728 c0x0000 (---------------) + I iveland + 0x0036b344, // n0x1729 c0x0000 (---------------) + I ivgu + 0x3da1bb49, // n0x172a c0x00f6 (n0x1933-n0x1934) + I jan-mayen + 0x002c2788, // n0x172b c0x0000 (---------------) + I jessheim + 0x00350f48, // n0x172c c0x0000 (---------------) + I jevnaker + 0x0022e4c7, // n0x172d c0x0000 (---------------) + I jolster + 0x002bb2c6, // n0x172e c0x0000 (---------------) + I jondal + 0x002f5e89, // n0x172f c0x0000 (---------------) + I jorpeland + 0x002b7507, // n0x1730 c0x0000 (---------------) + I kafjord + 0x002e2f0a, // n0x1731 c0x0000 (---------------) + I karasjohka + 0x00251bc8, // n0x1732 c0x0000 (---------------) + I karasjok + 0x002565c7, // n0x1733 c0x0000 (---------------) + I karlsoy + 0x00321f06, // n0x1734 c0x0000 (---------------) + I karmoy + 0x002163ca, // n0x1735 c0x0000 (---------------) + I kautokeino + 0x00250108, // n0x1736 c0x0000 (---------------) + I kirkenes + 0x00242f45, // n0x1737 c0x0000 (---------------) + I klabu + 0x00223f85, // n0x1738 c0x0000 (---------------) + I klepp + 0x002d1a07, // n0x1739 c0x0000 (---------------) + I kommune + 0x002b85c9, // n0x173a c0x0000 (---------------) + I kongsberg + 0x002c174b, // n0x173b c0x0000 (---------------) + I kongsvinger + 0x002d1848, // n0x173c c0x0000 (---------------) + I kopervik + 0x002a1689, // n0x173d c0x0000 (---------------) + I kraanghke + 0x00249947, // n0x173e c0x0000 (---------------) + I kragero + 0x002aa24c, // n0x173f c0x0000 (---------------) + I kristiansand + 0x002aa88c, // n0x1740 c0x0000 (---------------) + I kristiansund + 0x002aab8a, // n0x1741 c0x0000 (---------------) + I krodsherad + 0x002aae0c, // n0x1742 c0x0000 (---------------) + I krokstadelva + 0x002b6548, // n0x1743 c0x0000 (---------------) + I kvafjord + 0x002b6748, // n0x1744 c0x0000 (---------------) + I kvalsund + 0x002b6944, // n0x1745 c0x0000 (---------------) + I kvam + 0x002b76c9, // n0x1746 c0x0000 (---------------) + I kvanangen + 0x002b7909, // n0x1747 c0x0000 (---------------) + I kvinesdal + 0x002b7b4a, // n0x1748 c0x0000 (---------------) + I kvinnherad + 0x002b7dc9, // n0x1749 c0x0000 (---------------) + I kviteseid + 0x002b8107, // n0x174a c0x0000 (---------------) + I kvitsoy + 0x003a19cc, // n0x174b c0x0000 (---------------) + I laakesvuemie + 0x00338406, // n0x174c c0x0000 (---------------) + I lahppi + 0x00250488, // n0x174d c0x0000 (---------------) + I langevag + 0x00260146, // n0x174e c0x0000 (---------------) + I lardal + 0x0037a5c6, // n0x174f c0x0000 (---------------) + I larvik + 0x00363687, // n0x1750 c0x0000 (---------------) + I lavagis + 0x00225648, // n0x1751 c0x0000 (---------------) + I lavangen + 0x002bdb0b, // n0x1752 c0x0000 (---------------) + I leangaviika + 0x002caf87, // n0x1753 c0x0000 (---------------) + I lebesby + 0x002526c9, // n0x1754 c0x0000 (---------------) + I leikanger + 0x00277809, // n0x1755 c0x0000 (---------------) + I leirfjord + 0x00358e47, // n0x1756 c0x0000 (---------------) + I leirvik + 0x002b6c04, // n0x1757 c0x0000 (---------------) + I leka + 0x002feac7, // n0x1758 c0x0000 (---------------) + I leksvik + 0x0031fec6, // n0x1759 c0x0000 (---------------) + I lenvik + 0x00215f06, // n0x175a c0x0000 (---------------) + I lerdal + 0x002c3245, // n0x175b c0x0000 (---------------) + I lesja + 0x002ccf08, // n0x175c c0x0000 (---------------) + I levanger + 0x002cdb04, // n0x175d c0x0000 (---------------) + I lier + 0x002cdb06, // n0x175e c0x0000 (---------------) + I lierne + 0x0027d8cb, // n0x175f c0x0000 (---------------) + I lillehammer + 0x0033b0c9, // n0x1760 c0x0000 (---------------) + I lillesand + 0x0036a746, // n0x1761 c0x0000 (---------------) + I lindas + 0x0039ae49, // n0x1762 c0x0000 (---------------) + I lindesnes + 0x00385206, // n0x1763 c0x0000 (---------------) + I loabat + 0x00252bc8, // n0x1764 c0x0000 (---------------) + I lodingen + 0x00212bc3, // n0x1765 c0x0000 (---------------) + I lom + 0x00350445, // n0x1766 c0x0000 (---------------) + I loppa + 0x00215309, // n0x1767 c0x0000 (---------------) + I lorenskog + 0x00216045, // n0x1768 c0x0000 (---------------) + I loten + 0x002dc544, // n0x1769 c0x0000 (---------------) + I lund + 0x0026e246, // n0x176a c0x0000 (---------------) + I lunner + 0x00332e05, // n0x176b c0x0000 (---------------) + I luroy + 0x002d6f06, // n0x176c c0x0000 (---------------) + I luster + 0x002f3187, // n0x176d c0x0000 (---------------) + I lyngdal + 0x00378f86, // n0x176e c0x0000 (---------------) + I lyngen + 0x0028fa0b, // n0x176f c0x0000 (---------------) + I malatvuopmi + 0x0020bdc7, // n0x1770 c0x0000 (---------------) + I malselv + 0x00207286, // n0x1771 c0x0000 (---------------) + I malvik + 0x00349486, // n0x1772 c0x0000 (---------------) + I mandal + 0x0022f8c6, // n0x1773 c0x0000 (---------------) + I marker + 0x00347509, // n0x1774 c0x0000 (---------------) + I marnardal + 0x00238fca, // n0x1775 c0x0000 (---------------) + I masfjorden + 0x002b0685, // n0x1776 c0x0000 (---------------) + I masoy + 0x0032450d, // n0x1777 c0x0000 (---------------) + I matta-varjjat + 0x0029bb86, // n0x1778 c0x0000 (---------------) + I meland + 0x002151c6, // n0x1779 c0x0000 (---------------) + I meldal + 0x003725c6, // n0x177a c0x0000 (---------------) + I melhus + 0x00292545, // n0x177b c0x0000 (---------------) + I meloy + 0x0031b447, // n0x177c c0x0000 (---------------) + I meraker + 0x00294c47, // n0x177d c0x0000 (---------------) + I midsund + 0x00233b8e, // n0x177e c0x0000 (---------------) + I midtre-gauldal + 0x00215b43, // n0x177f c0x0000 (---------------) + I mil + 0x002bb289, // n0x1780 c0x0000 (---------------) + I mjondalen + 0x0035b209, // n0x1781 c0x0000 (---------------) + I mo-i-rana + 0x0022d447, // n0x1782 c0x0000 (---------------) + I moareke + 0x00264dc7, // n0x1783 c0x0000 (---------------) + I modalen + 0x0029d305, // n0x1784 c0x0000 (---------------) + I modum + 0x00256ac5, // n0x1785 c0x0000 (---------------) + I molde + 0x3de63a4f, // n0x1786 c0x00f7 (n0x1934-n0x1936) o I more-og-romsdal + 0x002c6387, // n0x1787 c0x0000 (---------------) + I mosjoen + 0x002c6548, // n0x1788 c0x0000 (---------------) + I moskenes + 0x002c6984, // n0x1789 c0x0000 (---------------) + I moss + 0x002c6bc6, // n0x178a c0x0000 (---------------) + I mosvik + 0x3e2425c2, // n0x178b c0x00f8 (n0x1936-n0x1937) + I mr + 0x002ca0c6, // n0x178c c0x0000 (---------------) + I muosat + 0x002cc746, // n0x178d c0x0000 (---------------) + I museum + 0x002bde4e, // n0x178e c0x0000 (---------------) + I naamesjevuemie + 0x0032f7ca, // n0x178f c0x0000 (---------------) + I namdalseid + 0x002a62c6, // n0x1790 c0x0000 (---------------) + I namsos + 0x0022340a, // n0x1791 c0x0000 (---------------) + I namsskogan + 0x002c0449, // n0x1792 c0x0000 (---------------) + I nannestad + 0x00316005, // n0x1793 c0x0000 (---------------) + I naroy + 0x00386808, // n0x1794 c0x0000 (---------------) + I narviika + 0x003a03c6, // n0x1795 c0x0000 (---------------) + I narvik + 0x0036a588, // n0x1796 c0x0000 (---------------) + I naustdal + 0x00200808, // n0x1797 c0x0000 (---------------) + I navuotna + 0x0032358b, // n0x1798 c0x0000 (---------------) + I nedre-eiker + 0x00222045, // n0x1799 c0x0000 (---------------) + I nesna + 0x0022da48, // n0x179a c0x0000 (---------------) + I nesodden + 0x0020600c, // n0x179b c0x0000 (---------------) + I nesoddtangen + 0x002aca07, // n0x179c c0x0000 (---------------) + I nesseby + 0x00249246, // n0x179d c0x0000 (---------------) + I nesset + 0x002a5c88, // n0x179e c0x0000 (---------------) + I nissedal + 0x0027c008, // n0x179f c0x0000 (---------------) + I nittedal + 0x3e63e082, // n0x17a0 c0x00f9 (n0x1937-n0x1938) + I nl + 0x002b6e0b, // n0x17a1 c0x0000 (---------------) + I nord-aurdal + 0x0038c1c9, // n0x17a2 c0x0000 (---------------) + I nord-fron + 0x00348209, // n0x17a3 c0x0000 (---------------) + I nord-odal + 0x002254c7, // n0x17a4 c0x0000 (---------------) + I norddal + 0x003086c8, // n0x17a5 c0x0000 (---------------) + I nordkapp + 0x3eb93948, // n0x17a6 c0x00fa (n0x1938-n0x193c) o I nordland + 0x002248cb, // n0x17a7 c0x0000 (---------------) + I nordre-land + 0x002ffd89, // n0x17a8 c0x0000 (---------------) + I nordreisa + 0x00210fcd, // n0x17a9 c0x0000 (---------------) + I nore-og-uvdal + 0x00303508, // n0x17aa c0x0000 (---------------) + I notodden + 0x0030bc88, // n0x17ab c0x0000 (---------------) + I notteroy + 0x3ee02382, // n0x17ac c0x00fb (n0x193c-n0x193d) + I nt + 0x00200dc4, // n0x17ad c0x0000 (---------------) + I odda + 0x3f21f702, // n0x17ae c0x00fc (n0x193d-n0x193e) + I of + 0x00251d46, // n0x17af c0x0000 (---------------) + I oksnes + 0x3f601582, // n0x17b0 c0x00fd (n0x193e-n0x193f) + I ol + 0x0020edca, // n0x17b1 c0x0000 (---------------) + I omasvuotna + 0x00332cc6, // n0x17b2 c0x0000 (---------------) + I oppdal + 0x0022abc8, // n0x17b3 c0x0000 (---------------) + I oppegard + 0x0024de88, // n0x17b4 c0x0000 (---------------) + I orkanger + 0x002e7286, // n0x17b5 c0x0000 (---------------) + I orkdal + 0x0033e006, // n0x17b6 c0x0000 (---------------) + I orland + 0x002decc6, // n0x17b7 c0x0000 (---------------) + I orskog + 0x00273045, // n0x17b8 c0x0000 (---------------) + I orsta + 0x0023b704, // n0x17b9 c0x0000 (---------------) + I osen + 0x3fac11c4, // n0x17ba c0x00fe (n0x193f-n0x1940) + I oslo + 0x0032ecc6, // n0x17bb c0x0000 (---------------) + I osoyro + 0x00376c87, // n0x17bc c0x0000 (---------------) + I osteroy + 0x3ff94147, // n0x17bd c0x00ff (n0x1940-n0x1941) o I ostfold + 0x002ed08b, // n0x17be c0x0000 (---------------) + I ostre-toten + 0x002bc7c9, // n0x17bf c0x0000 (---------------) + I overhalla + 0x0025e00a, // n0x17c0 c0x0000 (---------------) + I ovre-eiker + 0x00306144, // n0x17c1 c0x0000 (---------------) + I oyer + 0x00307088, // n0x17c2 c0x0000 (---------------) + I oygarden + 0x00262e8d, // n0x17c3 c0x0000 (---------------) + I oystre-slidre + 0x002d97c9, // n0x17c4 c0x0000 (---------------) + I porsanger + 0x002d9a08, // n0x17c5 c0x0000 (---------------) + I porsangu + 0x002d9c89, // n0x17c6 c0x0000 (---------------) + I porsgrunn + 0x002db244, // n0x17c7 c0x0000 (---------------) + I priv + 0x0021ab44, // n0x17c8 c0x0000 (---------------) + I rade + 0x00276305, // n0x17c9 c0x0000 (---------------) + I radoy + 0x0030b10b, // n0x17ca c0x0000 (---------------) + I rahkkeravju + 0x002c43c6, // n0x17cb c0x0000 (---------------) + I raholt + 0x0032eb05, // n0x17cc c0x0000 (---------------) + I raisa + 0x003519c9, // n0x17cd c0x0000 (---------------) + I rakkestad + 0x00222248, // n0x17ce c0x0000 (---------------) + I ralingen + 0x00296cc4, // n0x17cf c0x0000 (---------------) + I rana + 0x0022d1c9, // n0x17d0 c0x0000 (---------------) + I randaberg + 0x0026f545, // n0x17d1 c0x0000 (---------------) + I rauma + 0x002b3108, // n0x17d2 c0x0000 (---------------) + I rendalen + 0x002ce707, // n0x17d3 c0x0000 (---------------) + I rennebu + 0x0031a948, // n0x17d4 c0x0000 (---------------) + I rennesoy + 0x00277146, // n0x17d5 c0x0000 (---------------) + I rindal + 0x00233787, // n0x17d6 c0x0000 (---------------) + I ringebu + 0x00288989, // n0x17d7 c0x0000 (---------------) + I ringerike + 0x00224209, // n0x17d8 c0x0000 (---------------) + I ringsaker + 0x00252305, // n0x17d9 c0x0000 (---------------) + I risor + 0x0035a845, // n0x17da c0x0000 (---------------) + I rissa + 0x40205242, // n0x17db c0x0100 (n0x1941-n0x1942) + I rl + 0x002efc44, // n0x17dc c0x0000 (---------------) + I roan + 0x002946c5, // n0x17dd c0x0000 (---------------) + I rodoy + 0x002ce3c6, // n0x17de c0x0000 (---------------) + I rollag + 0x002f5445, // n0x17df c0x0000 (---------------) + I romsa + 0x0024b747, // n0x17e0 c0x0000 (---------------) + I romskog + 0x0028ddc5, // n0x17e1 c0x0000 (---------------) + I roros + 0x0026ed84, // n0x17e2 c0x0000 (---------------) + I rost + 0x0032b6c6, // n0x17e3 c0x0000 (---------------) + I royken + 0x0036ce47, // n0x17e4 c0x0000 (---------------) + I royrvik + 0x00242606, // n0x17e5 c0x0000 (---------------) + I ruovat + 0x0033b605, // n0x17e6 c0x0000 (---------------) + I rygge + 0x0030fbc8, // n0x17e7 c0x0000 (---------------) + I salangen + 0x002227c5, // n0x17e8 c0x0000 (---------------) + I salat + 0x00342687, // n0x17e9 c0x0000 (---------------) + I saltdal + 0x0039b049, // n0x17ea c0x0000 (---------------) + I samnanger + 0x0033b20a, // n0x17eb c0x0000 (---------------) + I sandefjord + 0x00341ac7, // n0x17ec c0x0000 (---------------) + I sandnes + 0x00341acc, // n0x17ed c0x0000 (---------------) + I sandnessjoen + 0x0036bd06, // n0x17ee c0x0000 (---------------) + I sandoy + 0x00229909, // n0x17ef c0x0000 (---------------) + I sarpsborg + 0x0036d2c5, // n0x17f0 c0x0000 (---------------) + I sauda + 0x00375508, // n0x17f1 c0x0000 (---------------) + I sauherad + 0x0020be83, // n0x17f2 c0x0000 (---------------) + I sel + 0x0020f645, // n0x17f3 c0x0000 (---------------) + I selbu + 0x00332345, // n0x17f4 c0x0000 (---------------) + I selje + 0x002380c7, // n0x17f5 c0x0000 (---------------) + I seljord + 0x4060dd02, // n0x17f6 c0x0101 (n0x1942-n0x1943) + I sf + 0x002379c7, // n0x17f7 c0x0000 (---------------) + I siellak + 0x002fda86, // n0x17f8 c0x0000 (---------------) + I sigdal + 0x0021ba86, // n0x17f9 c0x0000 (---------------) + I siljan + 0x002c6a46, // n0x17fa c0x0000 (---------------) + I sirdal + 0x0027bf46, // n0x17fb c0x0000 (---------------) + I skanit + 0x00280348, // n0x17fc c0x0000 (---------------) + I skanland + 0x00272285, // n0x17fd c0x0000 (---------------) + I skaun + 0x00246847, // n0x17fe c0x0000 (---------------) + I skedsmo + 0x0024684d, // n0x17ff c0x0000 (---------------) + I skedsmokorset + 0x0021cf83, // n0x1800 c0x0000 (---------------) + I ski + 0x0021cf85, // n0x1801 c0x0000 (---------------) + I skien + 0x00305947, // n0x1802 c0x0000 (---------------) + I skierva + 0x00378088, // n0x1803 c0x0000 (---------------) + I skiptvet + 0x00377c45, // n0x1804 c0x0000 (---------------) + I skjak + 0x002a80c8, // n0x1805 c0x0000 (---------------) + I skjervoy + 0x0022b506, // n0x1806 c0x0000 (---------------) + I skodje + 0x002398c7, // n0x1807 c0x0000 (---------------) + I slattum + 0x002ba1c5, // n0x1808 c0x0000 (---------------) + I smola + 0x002220c6, // n0x1809 c0x0000 (---------------) + I snaase + 0x0035d9c5, // n0x180a c0x0000 (---------------) + I snasa + 0x002b5c4a, // n0x180b c0x0000 (---------------) + I snillfjord + 0x002ecb46, // n0x180c c0x0000 (---------------) + I snoasa + 0x00330987, // n0x180d c0x0000 (---------------) + I sogndal + 0x002b6405, // n0x180e c0x0000 (---------------) + I sogne + 0x002d35c7, // n0x180f c0x0000 (---------------) + I sokndal + 0x002da544, // n0x1810 c0x0000 (---------------) + I sola + 0x002dc4c6, // n0x1811 c0x0000 (---------------) + I solund + 0x00357845, // n0x1812 c0x0000 (---------------) + I somna + 0x00204c8b, // n0x1813 c0x0000 (---------------) + I sondre-land + 0x0031fd49, // n0x1814 c0x0000 (---------------) + I songdalen + 0x002289ca, // n0x1815 c0x0000 (---------------) + I sor-aurdal + 0x00252388, // n0x1816 c0x0000 (---------------) + I sor-fron + 0x002e8c08, // n0x1817 c0x0000 (---------------) + I sor-odal + 0x002e934c, // n0x1818 c0x0000 (---------------) + I sor-varanger + 0x002f23c7, // n0x1819 c0x0000 (---------------) + I sorfold + 0x002f3d88, // n0x181a c0x0000 (---------------) + I sorreisa + 0x002f9948, // n0x181b c0x0000 (---------------) + I sortland + 0x002fd445, // n0x181c c0x0000 (---------------) + I sorum + 0x002b838a, // n0x181d c0x0000 (---------------) + I spjelkavik + 0x0032e5c9, // n0x181e c0x0000 (---------------) + I spydeberg + 0x40a01a42, // n0x181f c0x0102 (n0x1943-n0x1944) + I st + 0x00321946, // n0x1820 c0x0000 (---------------) + I stange + 0x0028e7c4, // n0x1821 c0x0000 (---------------) + I stat + 0x002d8149, // n0x1822 c0x0000 (---------------) + I stathelle + 0x00245309, // n0x1823 c0x0000 (---------------) + I stavanger + 0x00217f47, // n0x1824 c0x0000 (---------------) + I stavern + 0x0023b107, // n0x1825 c0x0000 (---------------) + I steigen + 0x003565c9, // n0x1826 c0x0000 (---------------) + I steinkjer + 0x00201a48, // n0x1827 c0x0000 (---------------) + I stjordal + 0x00201a4f, // n0x1828 c0x0000 (---------------) + I stjordalshalsen + 0x00268106, // n0x1829 c0x0000 (---------------) + I stokke + 0x0024044b, // n0x182a c0x0000 (---------------) + I stor-elvdal + 0x003772c5, // n0x182b c0x0000 (---------------) + I stord + 0x003772c7, // n0x182c c0x0000 (---------------) + I stordal + 0x002e0349, // n0x182d c0x0000 (---------------) + I storfjord + 0x0022d146, // n0x182e c0x0000 (---------------) + I strand + 0x0022d147, // n0x182f c0x0000 (---------------) + I stranda + 0x0039d345, // n0x1830 c0x0000 (---------------) + I stryn + 0x00232604, // n0x1831 c0x0000 (---------------) + I sula + 0x002a9106, // n0x1832 c0x0000 (---------------) + I suldal + 0x002100c4, // n0x1833 c0x0000 (---------------) + I sund + 0x00326b07, // n0x1834 c0x0000 (---------------) + I sunndal + 0x002e1f48, // n0x1835 c0x0000 (---------------) + I surnadal + 0x40ee3fc8, // n0x1836 c0x0103 (n0x1944-n0x1945) + I svalbard + 0x002e45c5, // n0x1837 c0x0000 (---------------) + I sveio + 0x002e4707, // n0x1838 c0x0000 (---------------) + I svelvik + 0x00366789, // n0x1839 c0x0000 (---------------) + I sykkylven + 0x0020d344, // n0x183a c0x0000 (---------------) + I tana + 0x0020d348, // n0x183b c0x0000 (---------------) + I tananger + 0x412acf48, // n0x183c c0x0104 (n0x1945-n0x1947) o I telemark + 0x00219984, // n0x183d c0x0000 (---------------) + I time + 0x00232f48, // n0x183e c0x0000 (---------------) + I tingvoll + 0x00308cc4, // n0x183f c0x0000 (---------------) + I tinn + 0x0021f349, // n0x1840 c0x0000 (---------------) + I tjeldsund + 0x00338a45, // n0x1841 c0x0000 (---------------) + I tjome + 0x41600142, // n0x1842 c0x0105 (n0x1947-n0x1948) + I tm + 0x00268145, // n0x1843 c0x0000 (---------------) + I tokke + 0x0021c5c5, // n0x1844 c0x0000 (---------------) + I tolga + 0x00309a88, // n0x1845 c0x0000 (---------------) + I tonsberg + 0x00235e47, // n0x1846 c0x0000 (---------------) + I torsken + 0x41a03642, // n0x1847 c0x0106 (n0x1948-n0x1949) + I tr + 0x002c7c45, // n0x1848 c0x0000 (---------------) + I trana + 0x00266e06, // n0x1849 c0x0000 (---------------) + I tranby + 0x002886c6, // n0x184a c0x0000 (---------------) + I tranoy + 0x002efc08, // n0x184b c0x0000 (---------------) + I troandin + 0x002f1f08, // n0x184c c0x0000 (---------------) + I trogstad + 0x002f5406, // n0x184d c0x0000 (---------------) + I tromsa + 0x00317886, // n0x184e c0x0000 (---------------) + I tromso + 0x00234289, // n0x184f c0x0000 (---------------) + I trondheim + 0x00353106, // n0x1850 c0x0000 (---------------) + I trysil + 0x00283a4b, // n0x1851 c0x0000 (---------------) + I tvedestrand + 0x0039ad45, // n0x1852 c0x0000 (---------------) + I tydal + 0x0020a406, // n0x1853 c0x0000 (---------------) + I tynset + 0x0022f308, // n0x1854 c0x0000 (---------------) + I tysfjord + 0x00231046, // n0x1855 c0x0000 (---------------) + I tysnes + 0x0031e8c6, // n0x1856 c0x0000 (---------------) + I tysvar + 0x002ec24a, // n0x1857 c0x0000 (---------------) + I ullensaker + 0x002759ca, // n0x1858 c0x0000 (---------------) + I ullensvang + 0x00283245, // n0x1859 c0x0000 (---------------) + I ulvik + 0x0021b407, // n0x185a c0x0000 (---------------) + I unjarga + 0x00340546, // n0x185b c0x0000 (---------------) + I utsira + 0x41e000c2, // n0x185c c0x0107 (n0x1949-n0x194a) + I va + 0x00305a87, // n0x185d c0x0000 (---------------) + I vaapste + 0x0026cf85, // n0x185e c0x0000 (---------------) + I vadso + 0x002bbc44, // n0x185f c0x0000 (---------------) + I vaga + 0x002bbc45, // n0x1860 c0x0000 (---------------) + I vagan + 0x00306f86, // n0x1861 c0x0000 (---------------) + I vagsoy + 0x00328807, // n0x1862 c0x0000 (---------------) + I vaksdal + 0x00213f45, // n0x1863 c0x0000 (---------------) + I valle + 0x002256c4, // n0x1864 c0x0000 (---------------) + I vang + 0x0023ccc8, // n0x1865 c0x0000 (---------------) + I vanylven + 0x0031e985, // n0x1866 c0x0000 (---------------) + I vardo + 0x0039eec7, // n0x1867 c0x0000 (---------------) + I varggat + 0x00289b45, // n0x1868 c0x0000 (---------------) + I varoy + 0x00212985, // n0x1869 c0x0000 (---------------) + I vefsn + 0x002292c4, // n0x186a c0x0000 (---------------) + I vega + 0x002821c9, // n0x186b c0x0000 (---------------) + I vegarshei + 0x002dbf48, // n0x186c c0x0000 (---------------) + I vennesla + 0x003708c6, // n0x186d c0x0000 (---------------) + I verdal + 0x003252c6, // n0x186e c0x0000 (---------------) + I verran + 0x00219686, // n0x186f c0x0000 (---------------) + I vestby + 0x42399688, // n0x1870 c0x0108 (n0x194a-n0x194b) o I vestfold + 0x002e8a87, // n0x1871 c0x0000 (---------------) + I vestnes + 0x002e8e0d, // n0x1872 c0x0000 (---------------) + I vestre-slidre + 0x002e964c, // n0x1873 c0x0000 (---------------) + I vestre-toten + 0x002e9c49, // n0x1874 c0x0000 (---------------) + I vestvagoy + 0x002e9e89, // n0x1875 c0x0000 (---------------) + I vevelstad + 0x4274b082, // n0x1876 c0x0109 (n0x194b-n0x194c) + I vf + 0x003978c3, // n0x1877 c0x0000 (---------------) + I vgs + 0x00207343, // n0x1878 c0x0000 (---------------) + I vik + 0x0031ff85, // n0x1879 c0x0000 (---------------) + I vikna + 0x00380bca, // n0x187a c0x0000 (---------------) + I vindafjord + 0x00317746, // n0x187b c0x0000 (---------------) + I voagat + 0x002f0b85, // n0x187c c0x0000 (---------------) + I volda + 0x002f36c4, // n0x187d c0x0000 (---------------) + I voss + 0x002f36cb, // n0x187e c0x0000 (---------------) + I vossevangen + 0x0030cc0c, // n0x187f c0x0000 (---------------) + I xn--andy-ira + 0x0030d44c, // n0x1880 c0x0000 (---------------) + I xn--asky-ira + 0x0030d755, // n0x1881 c0x0000 (---------------) + I xn--aurskog-hland-jnb + 0x003111cd, // n0x1882 c0x0000 (---------------) + I xn--avery-yua + 0x0031274f, // n0x1883 c0x0000 (---------------) + I xn--bdddj-mrabd + 0x00312b12, // n0x1884 c0x0000 (---------------) + I xn--bearalvhki-y4a + 0x00312f8f, // n0x1885 c0x0000 (---------------) + I xn--berlevg-jxa + 0x00313352, // n0x1886 c0x0000 (---------------) + I xn--bhcavuotna-s4a + 0x003137d3, // n0x1887 c0x0000 (---------------) + I xn--bhccavuotna-k7a + 0x00313c8d, // n0x1888 c0x0000 (---------------) + I xn--bidr-5nac + 0x0031424d, // n0x1889 c0x0000 (---------------) + I xn--bievt-0qa + 0x003145ce, // n0x188a c0x0000 (---------------) + I xn--bjarky-fya + 0x00314a8e, // n0x188b c0x0000 (---------------) + I xn--bjddar-pta + 0x0031560c, // n0x188c c0x0000 (---------------) + I xn--blt-elab + 0x0031598c, // n0x188d c0x0000 (---------------) + I xn--bmlo-gra + 0x00315dcb, // n0x188e c0x0000 (---------------) + I xn--bod-2na + 0x0031614e, // n0x188f c0x0000 (---------------) + I xn--brnny-wuac + 0x00316c52, // n0x1890 c0x0000 (---------------) + I xn--brnnysund-m8ac + 0x0031750c, // n0x1891 c0x0000 (---------------) + I xn--brum-voa + 0x00317e90, // n0x1892 c0x0000 (---------------) + I xn--btsfjord-9za + 0x00325f92, // n0x1893 c0x0000 (---------------) + I xn--davvenjrga-y4a + 0x00326ccc, // n0x1894 c0x0000 (---------------) + I xn--dnna-gra + 0x0032738d, // n0x1895 c0x0000 (---------------) + I xn--drbak-wua + 0x003276cc, // n0x1896 c0x0000 (---------------) + I xn--dyry-ira + 0x00329351, // n0x1897 c0x0000 (---------------) + I xn--eveni-0qa01ga + 0x0032a6cd, // n0x1898 c0x0000 (---------------) + I xn--finny-yua + 0x0032cf8d, // n0x1899 c0x0000 (---------------) + I xn--fjord-lra + 0x0032d58a, // n0x189a c0x0000 (---------------) + I xn--fl-zia + 0x0032d80c, // n0x189b c0x0000 (---------------) + I xn--flor-jra + 0x0032e10c, // n0x189c c0x0000 (---------------) + I xn--frde-gra + 0x0032e80c, // n0x189d c0x0000 (---------------) + I xn--frna-woa + 0x0032f08c, // n0x189e c0x0000 (---------------) + I xn--frya-hra + 0x00333ed3, // n0x189f c0x0000 (---------------) + I xn--ggaviika-8ya47h + 0x003346d0, // n0x18a0 c0x0000 (---------------) + I xn--gildeskl-g0a + 0x00334ad0, // n0x18a1 c0x0000 (---------------) + I xn--givuotna-8ya + 0x003357cd, // n0x18a2 c0x0000 (---------------) + I xn--gjvik-wua + 0x00335dcc, // n0x18a3 c0x0000 (---------------) + I xn--gls-elac + 0x003369c9, // n0x18a4 c0x0000 (---------------) + I xn--h-2fa + 0x00339e4d, // n0x18a5 c0x0000 (---------------) + I xn--hbmer-xqa + 0x0033a193, // n0x18a6 c0x0000 (---------------) + I xn--hcesuolo-7ya35b + 0x0033bf51, // n0x18a7 c0x0000 (---------------) + I xn--hgebostad-g3a + 0x0033c393, // n0x18a8 c0x0000 (---------------) + I xn--hmmrfeasta-s4ac + 0x0033e18f, // n0x18a9 c0x0000 (---------------) + I xn--hnefoss-q1a + 0x0033e54c, // n0x18aa c0x0000 (---------------) + I xn--hobl-ira + 0x0033e84f, // n0x18ab c0x0000 (---------------) + I xn--holtlen-hxa + 0x0033ec0d, // n0x18ac c0x0000 (---------------) + I xn--hpmir-xqa + 0x0033f20f, // n0x18ad c0x0000 (---------------) + I xn--hyanger-q1a + 0x0033f5d0, // n0x18ae c0x0000 (---------------) + I xn--hylandet-54a + 0x0034004e, // n0x18af c0x0000 (---------------) + I xn--indery-fya + 0x0034300e, // n0x18b0 c0x0000 (---------------) + I xn--jlster-bya + 0x00343750, // n0x18b1 c0x0000 (---------------) + I xn--jrpeland-54a + 0x0034484d, // n0x18b2 c0x0000 (---------------) + I xn--karmy-yua + 0x003451ce, // n0x18b3 c0x0000 (---------------) + I xn--kfjord-iua + 0x0034554c, // n0x18b4 c0x0000 (---------------) + I xn--klbu-woa + 0x00346613, // n0x18b5 c0x0000 (---------------) + I xn--koluokta-7ya57h + 0x0034844e, // n0x18b6 c0x0000 (---------------) + I xn--krager-gya + 0x00349610, // n0x18b7 c0x0000 (---------------) + I xn--kranghke-b0a + 0x00349a11, // n0x18b8 c0x0000 (---------------) + I xn--krdsherad-m8a + 0x00349e4f, // n0x18b9 c0x0000 (---------------) + I xn--krehamn-dxa + 0x0034a213, // n0x18ba c0x0000 (---------------) + I xn--krjohka-hwab49j + 0x0034ac0d, // n0x18bb c0x0000 (---------------) + I xn--ksnes-uua + 0x0034af4f, // n0x18bc c0x0000 (---------------) + I xn--kvfjord-nxa + 0x0034b30e, // n0x18bd c0x0000 (---------------) + I xn--kvitsy-fya + 0x0034bb50, // n0x18be c0x0000 (---------------) + I xn--kvnangen-k0a + 0x0034bf49, // n0x18bf c0x0000 (---------------) + I xn--l-1fa + 0x0034da10, // n0x18c0 c0x0000 (---------------) + I xn--laheadju-7ya + 0x0034f30f, // n0x18c1 c0x0000 (---------------) + I xn--langevg-jxa + 0x0034f98f, // n0x18c2 c0x0000 (---------------) + I xn--ldingen-q1a + 0x0034fd52, // n0x18c3 c0x0000 (---------------) + I xn--leagaviika-52b + 0x0035084e, // n0x18c4 c0x0000 (---------------) + I xn--lesund-hua + 0x0035114d, // n0x18c5 c0x0000 (---------------) + I xn--lgrd-poac + 0x0035284d, // n0x18c6 c0x0000 (---------------) + I xn--lhppi-xqa + 0x00352b8d, // n0x18c7 c0x0000 (---------------) + I xn--linds-pra + 0x0035408d, // n0x18c8 c0x0000 (---------------) + I xn--loabt-0qa + 0x003543cd, // n0x18c9 c0x0000 (---------------) + I xn--lrdal-sra + 0x00354710, // n0x18ca c0x0000 (---------------) + I xn--lrenskog-54a + 0x00354b0b, // n0x18cb c0x0000 (---------------) + I xn--lt-liac + 0x003550cc, // n0x18cc c0x0000 (---------------) + I xn--lten-gra + 0x0035544c, // n0x18cd c0x0000 (---------------) + I xn--lury-ira + 0x0035574c, // n0x18ce c0x0000 (---------------) + I xn--mely-ira + 0x00355a4e, // n0x18cf c0x0000 (---------------) + I xn--merker-kua + 0x00365050, // n0x18d0 c0x0000 (---------------) + I xn--mjndalen-64a + 0x00367012, // n0x18d1 c0x0000 (---------------) + I xn--mlatvuopmi-s4a + 0x0036748b, // n0x18d2 c0x0000 (---------------) + I xn--mli-tla + 0x00367b8e, // n0x18d3 c0x0000 (---------------) + I xn--mlselv-iua + 0x00367f0e, // n0x18d4 c0x0000 (---------------) + I xn--moreke-jua + 0x003690ce, // n0x18d5 c0x0000 (---------------) + I xn--mosjen-eya + 0x0036980b, // n0x18d6 c0x0000 (---------------) + I xn--mot-tla + 0x42b69dd6, // n0x18d7 c0x010a (n0x194c-n0x194e) o I xn--mre-og-romsdal-qqb + 0x0036a94d, // n0x18d8 c0x0000 (---------------) + I xn--msy-ula0h + 0x0036be94, // n0x18d9 c0x0000 (---------------) + I xn--mtta-vrjjat-k7af + 0x0036d40d, // n0x18da c0x0000 (---------------) + I xn--muost-0qa + 0x0036e455, // n0x18db c0x0000 (---------------) + I xn--nmesjevuemie-tcba + 0x0036f84d, // n0x18dc c0x0000 (---------------) + I xn--nry-yla5g + 0x003701cf, // n0x18dd c0x0000 (---------------) + I xn--nttery-byae + 0x00370a4f, // n0x18de c0x0000 (---------------) + I xn--nvuotna-hwa + 0x00373f0f, // n0x18df c0x0000 (---------------) + I xn--oppegrd-ixa + 0x003742ce, // n0x18e0 c0x0000 (---------------) + I xn--ostery-fya + 0x0037498d, // n0x18e1 c0x0000 (---------------) + I xn--osyro-wua + 0x00375a11, // n0x18e2 c0x0000 (---------------) + I xn--porsgu-sta26f + 0x00379d8c, // n0x18e3 c0x0000 (---------------) + I xn--rady-ira + 0x0037a08c, // n0x18e4 c0x0000 (---------------) + I xn--rdal-poa + 0x0037a38b, // n0x18e5 c0x0000 (---------------) + I xn--rde-ula + 0x0037a98c, // n0x18e6 c0x0000 (---------------) + I xn--rdy-0nab + 0x0037ad4f, // n0x18e7 c0x0000 (---------------) + I xn--rennesy-v1a + 0x0037b112, // n0x18e8 c0x0000 (---------------) + I xn--rhkkervju-01af + 0x0037bacd, // n0x18e9 c0x0000 (---------------) + I xn--rholt-mra + 0x0037ca8c, // n0x18ea c0x0000 (---------------) + I xn--risa-5na + 0x0037cf0c, // n0x18eb c0x0000 (---------------) + I xn--risr-ira + 0x0037d20d, // n0x18ec c0x0000 (---------------) + I xn--rland-uua + 0x0037d54f, // n0x18ed c0x0000 (---------------) + I xn--rlingen-mxa + 0x0037d90e, // n0x18ee c0x0000 (---------------) + I xn--rmskog-bya + 0x0038088c, // n0x18ef c0x0000 (---------------) + I xn--rros-gra + 0x00380e4d, // n0x18f0 c0x0000 (---------------) + I xn--rskog-uua + 0x0038118b, // n0x18f1 c0x0000 (---------------) + I xn--rst-0na + 0x0038174c, // n0x18f2 c0x0000 (---------------) + I xn--rsta-fra + 0x00381ccd, // n0x18f3 c0x0000 (---------------) + I xn--ryken-vua + 0x0038200e, // n0x18f4 c0x0000 (---------------) + I xn--ryrvik-bya + 0x00382489, // n0x18f5 c0x0000 (---------------) + I xn--s-1fa + 0x00383693, // n0x18f6 c0x0000 (---------------) + I xn--sandnessjen-ogb + 0x00383f0d, // n0x18f7 c0x0000 (---------------) + I xn--sandy-yua + 0x0038424d, // n0x18f8 c0x0000 (---------------) + I xn--seral-lra + 0x0038484c, // n0x18f9 c0x0000 (---------------) + I xn--sgne-gra + 0x00384cce, // n0x18fa c0x0000 (---------------) + I xn--skierv-uta + 0x003857cf, // n0x18fb c0x0000 (---------------) + I xn--skjervy-v1a + 0x00385b8c, // n0x18fc c0x0000 (---------------) + I xn--skjk-soa + 0x00385e8d, // n0x18fd c0x0000 (---------------) + I xn--sknit-yqa + 0x003861cf, // n0x18fe c0x0000 (---------------) + I xn--sknland-fxa + 0x0038658c, // n0x18ff c0x0000 (---------------) + I xn--slat-5na + 0x00386b8c, // n0x1900 c0x0000 (---------------) + I xn--slt-elab + 0x00386f4c, // n0x1901 c0x0000 (---------------) + I xn--smla-hra + 0x0038724c, // n0x1902 c0x0000 (---------------) + I xn--smna-gra + 0x0038790d, // n0x1903 c0x0000 (---------------) + I xn--snase-nra + 0x00387c52, // n0x1904 c0x0000 (---------------) + I xn--sndre-land-0cb + 0x003882cc, // n0x1905 c0x0000 (---------------) + I xn--snes-poa + 0x003885cc, // n0x1906 c0x0000 (---------------) + I xn--snsa-roa + 0x003888d1, // n0x1907 c0x0000 (---------------) + I xn--sr-aurdal-l8a + 0x00388d0f, // n0x1908 c0x0000 (---------------) + I xn--sr-fron-q1a + 0x003890cf, // n0x1909 c0x0000 (---------------) + I xn--sr-odal-q1a + 0x00389493, // n0x190a c0x0000 (---------------) + I xn--sr-varanger-ggb + 0x0038a34e, // n0x190b c0x0000 (---------------) + I xn--srfold-bya + 0x0038a8cf, // n0x190c c0x0000 (---------------) + I xn--srreisa-q1a + 0x0038ac8c, // n0x190d c0x0000 (---------------) + I xn--srum-gra + 0x42f8afce, // n0x190e c0x010b (n0x194e-n0x194f) o I xn--stfold-9xa + 0x0038b34f, // n0x190f c0x0000 (---------------) + I xn--stjrdal-s1a + 0x0038b716, // n0x1910 c0x0000 (---------------) + I xn--stjrdalshalsen-sqb + 0x0038c512, // n0x1911 c0x0000 (---------------) + I xn--stre-toten-zcb + 0x0038d40c, // n0x1912 c0x0000 (---------------) + I xn--tjme-hra + 0x0038e20f, // n0x1913 c0x0000 (---------------) + I xn--tnsberg-q1a + 0x0038e88d, // n0x1914 c0x0000 (---------------) + I xn--trany-yua + 0x0038ebcf, // n0x1915 c0x0000 (---------------) + I xn--trgstad-r1a + 0x0038ef8c, // n0x1916 c0x0000 (---------------) + I xn--trna-woa + 0x0038f28d, // n0x1917 c0x0000 (---------------) + I xn--troms-zua + 0x0038f5cd, // n0x1918 c0x0000 (---------------) + I xn--tysvr-vra + 0x00390ace, // n0x1919 c0x0000 (---------------) + I xn--unjrga-rta + 0x00391fcc, // n0x191a c0x0000 (---------------) + I xn--vads-jra + 0x003922cc, // n0x191b c0x0000 (---------------) + I xn--vard-jra + 0x003925d0, // n0x191c c0x0000 (---------------) + I xn--vegrshei-c0a + 0x00396d51, // n0x191d c0x0000 (---------------) + I xn--vestvgy-ixa6o + 0x0039718b, // n0x191e c0x0000 (---------------) + I xn--vg-yiab + 0x003974cc, // n0x191f c0x0000 (---------------) + I xn--vgan-qoa + 0x003977ce, // n0x1920 c0x0000 (---------------) + I xn--vgsy-qoa0j + 0x00399b91, // n0x1921 c0x0000 (---------------) + I xn--vre-eiker-k8a + 0x00399fce, // n0x1922 c0x0000 (---------------) + I xn--vrggt-xqad + 0x0039a34d, // n0x1923 c0x0000 (---------------) + I xn--vry-yla5g + 0x003a018b, // n0x1924 c0x0000 (---------------) + I xn--yer-zna + 0x003a0a8f, // n0x1925 c0x0000 (---------------) + I xn--ygarden-p1a + 0x003a1414, // n0x1926 c0x0000 (---------------) + I xn--ystre-slidre-ujb + 0x002242c2, // n0x1927 c0x0000 (---------------) + I gs + 0x002242c2, // n0x1928 c0x0000 (---------------) + I gs + 0x00203283, // n0x1929 c0x0000 (---------------) + I nes + 0x002242c2, // n0x192a c0x0000 (---------------) + I gs + 0x00203283, // n0x192b c0x0000 (---------------) + I nes + 0x002242c2, // n0x192c c0x0000 (---------------) + I gs + 0x00203ac2, // n0x192d c0x0000 (---------------) + I os + 0x00360445, // n0x192e c0x0000 (---------------) + I valer + 0x0039988c, // n0x192f c0x0000 (---------------) + I xn--vler-qoa + 0x002242c2, // n0x1930 c0x0000 (---------------) + I gs + 0x002242c2, // n0x1931 c0x0000 (---------------) + I gs + 0x00203ac2, // n0x1932 c0x0000 (---------------) + I os + 0x002242c2, // n0x1933 c0x0000 (---------------) + I gs + 0x00289945, // n0x1934 c0x0000 (---------------) + I heroy + 0x0033b205, // n0x1935 c0x0000 (---------------) + I sande + 0x002242c2, // n0x1936 c0x0000 (---------------) + I gs + 0x002242c2, // n0x1937 c0x0000 (---------------) + I gs + 0x00206dc2, // n0x1938 c0x0000 (---------------) + I bo + 0x00289945, // n0x1939 c0x0000 (---------------) + I heroy + 0x00311709, // n0x193a c0x0000 (---------------) + I xn--b-5ga + 0x0033bc4c, // n0x193b c0x0000 (---------------) + I xn--hery-ira + 0x002242c2, // n0x193c c0x0000 (---------------) + I gs + 0x002242c2, // n0x193d c0x0000 (---------------) + I gs + 0x002242c2, // n0x193e c0x0000 (---------------) + I gs + 0x002242c2, // n0x193f c0x0000 (---------------) + I gs + 0x00360445, // n0x1940 c0x0000 (---------------) + I valer + 0x002242c2, // n0x1941 c0x0000 (---------------) + I gs + 0x002242c2, // n0x1942 c0x0000 (---------------) + I gs + 0x002242c2, // n0x1943 c0x0000 (---------------) + I gs + 0x002242c2, // n0x1944 c0x0000 (---------------) + I gs + 0x00206dc2, // n0x1945 c0x0000 (---------------) + I bo + 0x00311709, // n0x1946 c0x0000 (---------------) + I xn--b-5ga + 0x002242c2, // n0x1947 c0x0000 (---------------) + I gs + 0x002242c2, // n0x1948 c0x0000 (---------------) + I gs + 0x002242c2, // n0x1949 c0x0000 (---------------) + I gs + 0x0033b205, // n0x194a c0x0000 (---------------) + I sande + 0x002242c2, // n0x194b c0x0000 (---------------) + I gs + 0x0033b205, // n0x194c c0x0000 (---------------) + I sande + 0x0033bc4c, // n0x194d c0x0000 (---------------) + I xn--hery-ira + 0x0039988c, // n0x194e c0x0000 (---------------) + I xn--vler-qoa + 0x0030a143, // n0x194f c0x0000 (---------------) + I biz + 0x0022edc3, // n0x1950 c0x0000 (---------------) + I com + 0x002349c3, // n0x1951 c0x0000 (---------------) + I edu + 0x00275003, // n0x1952 c0x0000 (---------------) + I gov + 0x0038a144, // n0x1953 c0x0000 (---------------) + I info + 0x0021d8c3, // n0x1954 c0x0000 (---------------) + I net + 0x00229a83, // n0x1955 c0x0000 (---------------) + I org + 0x00102b48, // n0x1956 c0x0000 (---------------) + merseine + 0x0008cf84, // n0x1957 c0x0000 (---------------) + mine + 0x000af988, // n0x1958 c0x0000 (---------------) + shacknet + 0x00205882, // n0x1959 c0x0000 (---------------) + I ac + 0x43e08182, // n0x195a c0x010f (n0x1969-n0x196a) + I co + 0x0023eec3, // n0x195b c0x0000 (---------------) + I cri + 0x0025f184, // n0x195c c0x0000 (---------------) + I geek + 0x00206243, // n0x195d c0x0000 (---------------) + I gen + 0x002ef244, // n0x195e c0x0000 (---------------) + I govt + 0x002a51c6, // n0x195f c0x0000 (---------------) + I health + 0x00202e03, // n0x1960 c0x0000 (---------------) + I iwi + 0x002e2c84, // n0x1961 c0x0000 (---------------) + I kiwi + 0x00271885, // n0x1962 c0x0000 (---------------) + I maori + 0x00215b43, // n0x1963 c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x1964 c0x0000 (---------------) + I net + 0x00229a83, // n0x1965 c0x0000 (---------------) + I org + 0x00266bca, // n0x1966 c0x0000 (---------------) + I parliament + 0x00231d06, // n0x1967 c0x0000 (---------------) + I school + 0x0036828c, // n0x1968 c0x0000 (---------------) + I xn--mori-qsa + 0x000f5248, // n0x1969 c0x0000 (---------------) + blogspot + 0x00208182, // n0x196a c0x0000 (---------------) + I co + 0x0022edc3, // n0x196b c0x0000 (---------------) + I com + 0x002349c3, // n0x196c c0x0000 (---------------) + I edu + 0x00275003, // n0x196d c0x0000 (---------------) + I gov + 0x00211c43, // n0x196e c0x0000 (---------------) + I med + 0x002cc746, // n0x196f c0x0000 (---------------) + I museum + 0x0021d8c3, // n0x1970 c0x0000 (---------------) + I net + 0x00229a83, // n0x1971 c0x0000 (---------------) + I org + 0x00220283, // n0x1972 c0x0000 (---------------) + I pro + 0x0000ac02, // n0x1973 c0x0000 (---------------) + ae + 0x00029007, // n0x1974 c0x0000 (---------------) + blogdns + 0x000cf808, // n0x1975 c0x0000 (---------------) + blogsite + 0x0000c54e, // n0x1976 c0x0000 (---------------) + bmoattachments + 0x00080bd2, // n0x1977 c0x0000 (---------------) + boldlygoingnowhere + 0x44a39705, // n0x1978 c0x0112 (n0x19ae-n0x19b0) o I cdn77 + 0x44f1c70c, // n0x1979 c0x0113 (n0x19b0-n0x19b1) o I cdn77-secure + 0x00147e08, // n0x197a c0x0000 (---------------) + dnsalias + 0x00074607, // n0x197b c0x0000 (---------------) + dnsdojo + 0x000ebecb, // n0x197c c0x0000 (---------------) + doesntexist + 0x00168789, // n0x197d c0x0000 (---------------) + dontexist + 0x00147d07, // n0x197e c0x0000 (---------------) + doomdns + 0x00074507, // n0x197f c0x0000 (---------------) + duckdns + 0x00008306, // n0x1980 c0x0000 (---------------) + dvrdns + 0x0018bd88, // n0x1981 c0x0000 (---------------) + dynalias + 0x45411a06, // n0x1982 c0x0115 (n0x19b2-n0x19b4) + dyndns + 0x0009f90d, // n0x1983 c0x0000 (---------------) + endofinternet + 0x00107210, // n0x1984 c0x0000 (---------------) + endoftheinternet + 0x45824542, // n0x1985 c0x0116 (n0x19b4-n0x19eb) + eu + 0x00062c47, // n0x1986 c0x0000 (---------------) + from-me + 0x0009f089, // n0x1987 c0x0000 (---------------) + game-host + 0x0004f886, // n0x1988 c0x0000 (---------------) + gotdns + 0x0000e882, // n0x1989 c0x0000 (---------------) + hk + 0x000fef8a, // n0x198a c0x0000 (---------------) + hobby-site + 0x00011bc7, // n0x198b c0x0000 (---------------) + homedns + 0x000ad607, // n0x198c c0x0000 (---------------) + homeftp + 0x0009c509, // n0x198d c0x0000 (---------------) + homelinux + 0x0009d988, // n0x198e c0x0000 (---------------) + homeunix + 0x000da1ce, // n0x198f c0x0000 (---------------) + is-a-bruinsfan + 0x00005b4e, // n0x1990 c0x0000 (---------------) + is-a-candidate + 0x0000da4f, // n0x1991 c0x0000 (---------------) + is-a-celticsfan + 0x0000fe09, // n0x1992 c0x0000 (---------------) + is-a-chef + 0x0005f049, // n0x1993 c0x0000 (---------------) + is-a-geek + 0x0005180b, // n0x1994 c0x0000 (---------------) + is-a-knight + 0x00069f0f, // n0x1995 c0x0000 (---------------) + is-a-linux-user + 0x000823cc, // n0x1996 c0x0000 (---------------) + is-a-patsfan + 0x0009ffcb, // n0x1997 c0x0000 (---------------) + is-a-soxfan + 0x000b3648, // n0x1998 c0x0000 (---------------) + is-found + 0x000ecf87, // n0x1999 c0x0000 (---------------) + is-lost + 0x000f44c8, // n0x199a c0x0000 (---------------) + is-saved + 0x000e6d8b, // n0x199b c0x0000 (---------------) + is-very-bad + 0x000f02cc, // n0x199c c0x0000 (---------------) + is-very-evil + 0x0011bb0c, // n0x199d c0x0000 (---------------) + is-very-good + 0x0013644c, // n0x199e c0x0000 (---------------) + is-very-nice + 0x00140c4d, // n0x199f c0x0000 (---------------) + is-very-sweet + 0x000fff08, // n0x19a0 c0x0000 (---------------) + isa-geek + 0x0014c909, // n0x19a1 c0x0000 (---------------) + kicks-ass + 0x0017770b, // n0x19a2 c0x0000 (---------------) + misconfused + 0x000d7147, // n0x19a3 c0x0000 (---------------) + podzone + 0x000cf68a, // n0x19a4 c0x0000 (---------------) + readmyblog + 0x00053986, // n0x19a5 c0x0000 (---------------) + selfip + 0x00090b0d, // n0x19a6 c0x0000 (---------------) + sellsyourhome + 0x000c9608, // n0x19a7 c0x0000 (---------------) + servebbs + 0x0006e648, // n0x19a8 c0x0000 (---------------) + serveftp + 0x00170589, // n0x19a9 c0x0000 (---------------) + servegame + 0x000e160c, // n0x19aa c0x0000 (---------------) + stuff-4-sale + 0x00002982, // n0x19ab c0x0000 (---------------) + us + 0x00123b06, // n0x19ac c0x0000 (---------------) + webhop + 0x00009ac2, // n0x19ad c0x0000 (---------------) + za + 0x00000301, // n0x19ae c0x0000 (---------------) + c + 0x0003fa03, // n0x19af c0x0000 (---------------) + rsc + 0x45371dc6, // n0x19b0 c0x0114 (n0x19b1-n0x19b2) o I origin + 0x00039883, // n0x19b1 c0x0000 (---------------) + ssl + 0x00008502, // n0x19b2 c0x0000 (---------------) + go + 0x00011bc4, // n0x19b3 c0x0000 (---------------) + home + 0x000001c2, // n0x19b4 c0x0000 (---------------) + al + 0x000b1c44, // n0x19b5 c0x0000 (---------------) + asso + 0x00000102, // n0x19b6 c0x0000 (---------------) + at + 0x00009602, // n0x19b7 c0x0000 (---------------) + au + 0x000094c2, // n0x19b8 c0x0000 (---------------) + be + 0x00026882, // n0x19b9 c0x0000 (---------------) + bg + 0x00000302, // n0x19ba c0x0000 (---------------) + ca + 0x00039702, // n0x19bb c0x0000 (---------------) + cd + 0x000058c2, // n0x19bc c0x0000 (---------------) + ch + 0x0001a142, // n0x19bd c0x0000 (---------------) + cn + 0x000394c2, // n0x19be c0x0000 (---------------) + cy + 0x00033fc2, // n0x19bf c0x0000 (---------------) + cz + 0x00000402, // n0x19c0 c0x0000 (---------------) + de + 0x00000ac2, // n0x19c1 c0x0000 (---------------) + dk + 0x000349c3, // n0x19c2 c0x0000 (---------------) + edu + 0x0000b0c2, // n0x19c3 c0x0000 (---------------) + ee + 0x00002242, // n0x19c4 c0x0000 (---------------) + es + 0x0000e002, // n0x19c5 c0x0000 (---------------) + fi + 0x00007fc2, // n0x19c6 c0x0000 (---------------) + fr + 0x000089c2, // n0x19c7 c0x0000 (---------------) + gr + 0x00032882, // n0x19c8 c0x0000 (---------------) + hr + 0x0000d0c2, // n0x19c9 c0x0000 (---------------) + hu + 0x00000042, // n0x19ca c0x0000 (---------------) + ie + 0x00002f82, // n0x19cb c0x0000 (---------------) + il + 0x000020c2, // n0x19cc c0x0000 (---------------) + in + 0x0006f683, // n0x19cd c0x0000 (---------------) + int + 0x00001a02, // n0x19ce c0x0000 (---------------) + is + 0x00006f82, // n0x19cf c0x0000 (---------------) + it + 0x000a8bc2, // n0x19d0 c0x0000 (---------------) + jp + 0x000076c2, // n0x19d1 c0x0000 (---------------) + kr + 0x00008bc2, // n0x19d2 c0x0000 (---------------) + lt + 0x00002542, // n0x19d3 c0x0000 (---------------) + lu + 0x00007302, // n0x19d4 c0x0000 (---------------) + lv + 0x000d2e42, // n0x19d5 c0x0000 (---------------) + mc + 0x00002302, // n0x19d6 c0x0000 (---------------) + me + 0x00165542, // n0x19d7 c0x0000 (---------------) + mk + 0x00035702, // n0x19d8 c0x0000 (---------------) + mt + 0x0002a6c2, // n0x19d9 c0x0000 (---------------) + my + 0x0001d8c3, // n0x19da c0x0000 (---------------) + net + 0x00002d42, // n0x19db c0x0000 (---------------) + ng + 0x0003e082, // n0x19dc c0x0000 (---------------) + nl + 0x00000d82, // n0x19dd c0x0000 (---------------) + no + 0x00009a82, // n0x19de c0x0000 (---------------) + nz + 0x00052285, // n0x19df c0x0000 (---------------) + paris + 0x00006582, // n0x19e0 c0x0000 (---------------) + pl + 0x000835c2, // n0x19e1 c0x0000 (---------------) + pt + 0x0003d883, // n0x19e2 c0x0000 (---------------) + q-a + 0x00000cc2, // n0x19e3 c0x0000 (---------------) + ro + 0x00011ec2, // n0x19e4 c0x0000 (---------------) + ru + 0x00001d42, // n0x19e5 c0x0000 (---------------) + se + 0x0000ca82, // n0x19e6 c0x0000 (---------------) + si + 0x0000e342, // n0x19e7 c0x0000 (---------------) + sk + 0x00003642, // n0x19e8 c0x0000 (---------------) + tr + 0x00000f82, // n0x19e9 c0x0000 (---------------) + uk + 0x00002982, // n0x19ea c0x0000 (---------------) + us + 0x00210e43, // n0x19eb c0x0000 (---------------) + I abo + 0x00205882, // n0x19ec c0x0000 (---------------) + I ac + 0x0022edc3, // n0x19ed c0x0000 (---------------) + I com + 0x002349c3, // n0x19ee c0x0000 (---------------) + I edu + 0x00209f03, // n0x19ef c0x0000 (---------------) + I gob + 0x00202d03, // n0x19f0 c0x0000 (---------------) + I ing + 0x00211c43, // n0x19f1 c0x0000 (---------------) + I med + 0x0021d8c3, // n0x19f2 c0x0000 (---------------) + I net + 0x0020e543, // n0x19f3 c0x0000 (---------------) + I nom + 0x00229a83, // n0x19f4 c0x0000 (---------------) + I org + 0x00289883, // n0x19f5 c0x0000 (---------------) + I sld + 0x000f5248, // n0x19f6 c0x0000 (---------------) + blogspot + 0x0022edc3, // n0x19f7 c0x0000 (---------------) + I com + 0x002349c3, // n0x19f8 c0x0000 (---------------) + I edu + 0x00209f03, // n0x19f9 c0x0000 (---------------) + I gob + 0x00215b43, // n0x19fa c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x19fb c0x0000 (---------------) + I net + 0x0020e543, // n0x19fc c0x0000 (---------------) + I nom + 0x00229a83, // n0x19fd c0x0000 (---------------) + I org + 0x0022edc3, // n0x19fe c0x0000 (---------------) + I com + 0x002349c3, // n0x19ff c0x0000 (---------------) + I edu + 0x00229a83, // n0x1a00 c0x0000 (---------------) + I org + 0x0022edc3, // n0x1a01 c0x0000 (---------------) + I com + 0x002349c3, // n0x1a02 c0x0000 (---------------) + I edu + 0x00275003, // n0x1a03 c0x0000 (---------------) + I gov + 0x00200041, // n0x1a04 c0x0000 (---------------) + I i + 0x00215b43, // n0x1a05 c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x1a06 c0x0000 (---------------) + I net + 0x002084c3, // n0x1a07 c0x0000 (---------------) + I ngo + 0x00229a83, // n0x1a08 c0x0000 (---------------) + I org + 0x0030a143, // n0x1a09 c0x0000 (---------------) + I biz + 0x0022edc3, // n0x1a0a c0x0000 (---------------) + I com + 0x002349c3, // n0x1a0b c0x0000 (---------------) + I edu + 0x00365a03, // n0x1a0c c0x0000 (---------------) + I fam + 0x00209f03, // n0x1a0d c0x0000 (---------------) + I gob + 0x00237fc3, // n0x1a0e c0x0000 (---------------) + I gok + 0x00248683, // n0x1a0f c0x0000 (---------------) + I gon + 0x0029ae43, // n0x1a10 c0x0000 (---------------) + I gop + 0x00208503, // n0x1a11 c0x0000 (---------------) + I gos + 0x00275003, // n0x1a12 c0x0000 (---------------) + I gov + 0x0038a144, // n0x1a13 c0x0000 (---------------) + I info + 0x0021d8c3, // n0x1a14 c0x0000 (---------------) + I net + 0x00229a83, // n0x1a15 c0x0000 (---------------) + I org + 0x0021fa83, // n0x1a16 c0x0000 (---------------) + I web + 0x0031af44, // n0x1a17 c0x0000 (---------------) + I agro + 0x0021a3c3, // n0x1a18 c0x0000 (---------------) + I aid + 0x000011c3, // n0x1a19 c0x0000 (---------------) + art + 0x00200103, // n0x1a1a c0x0000 (---------------) + I atm + 0x00256148, // n0x1a1b c0x0000 (---------------) + I augustow + 0x00216404, // n0x1a1c c0x0000 (---------------) + I auto + 0x0033d2ca, // n0x1a1d c0x0000 (---------------) + I babia-gora + 0x00300686, // n0x1a1e c0x0000 (---------------) + I bedzin + 0x0038bc47, // n0x1a1f c0x0000 (---------------) + I beskidy + 0x0021cb4a, // n0x1a20 c0x0000 (---------------) + I bialowieza + 0x00267fc9, // n0x1a21 c0x0000 (---------------) + I bialystok + 0x0039cac7, // n0x1a22 c0x0000 (---------------) + I bielawa + 0x003a2f4a, // n0x1a23 c0x0000 (---------------) + I bieszczady + 0x0030a143, // n0x1a24 c0x0000 (---------------) + I biz + 0x0034e48b, // n0x1a25 c0x0000 (---------------) + I boleslawiec + 0x003018c9, // n0x1a26 c0x0000 (---------------) + I bydgoszcz + 0x00219785, // n0x1a27 c0x0000 (---------------) + I bytom + 0x002c9f07, // n0x1a28 c0x0000 (---------------) + I cieszyn + 0x00008182, // n0x1a29 c0x0000 (---------------) + co + 0x0022edc3, // n0x1a2a c0x0000 (---------------) + I com + 0x0033ba07, // n0x1a2b c0x0000 (---------------) + I czeladz + 0x00233fc5, // n0x1a2c c0x0000 (---------------) + I czest + 0x002b6ac9, // n0x1a2d c0x0000 (---------------) + I dlugoleka + 0x002349c3, // n0x1a2e c0x0000 (---------------) + I edu + 0x00221e46, // n0x1a2f c0x0000 (---------------) + I elblag + 0x002b5903, // n0x1a30 c0x0000 (---------------) + I elk + 0x000f2683, // n0x1a31 c0x0000 (---------------) + gda + 0x000f2686, // n0x1a32 c0x0000 (---------------) + gdansk + 0x000264c6, // n0x1a33 c0x0000 (---------------) + gdynia + 0x00002d87, // n0x1a34 c0x0000 (---------------) + gliwice + 0x00208806, // n0x1a35 c0x0000 (---------------) + I glogow + 0x0020f7c5, // n0x1a36 c0x0000 (---------------) + I gmina + 0x00225387, // n0x1a37 c0x0000 (---------------) + I gniezno + 0x0032eec7, // n0x1a38 c0x0000 (---------------) + I gorlice + 0x47675003, // n0x1a39 c0x011d (n0x1abc-n0x1aeb) + I gov + 0x00326f07, // n0x1a3a c0x0000 (---------------) + I grajewo + 0x00358d43, // n0x1a3b c0x0000 (---------------) + I gsm + 0x00209145, // n0x1a3c c0x0000 (---------------) + I ilawa + 0x0038a144, // n0x1a3d c0x0000 (---------------) + I info + 0x00275408, // n0x1a3e c0x0000 (---------------) + I jaworzno + 0x002a71cc, // n0x1a3f c0x0000 (---------------) + I jelenia-gora + 0x002a4885, // n0x1a40 c0x0000 (---------------) + I jgora + 0x003936c6, // n0x1a41 c0x0000 (---------------) + I kalisz + 0x0033b8c7, // n0x1a42 c0x0000 (---------------) + I karpacz + 0x0037f7c7, // n0x1a43 c0x0000 (---------------) + I kartuzy + 0x002027c7, // n0x1a44 c0x0000 (---------------) + I kaszuby + 0x002073c8, // n0x1a45 c0x0000 (---------------) + I katowice + 0x00218c4f, // n0x1a46 c0x0000 (---------------) + I kazimierz-dolny + 0x00308605, // n0x1a47 c0x0000 (---------------) + I kepno + 0x0023efc7, // n0x1a48 c0x0000 (---------------) + I ketrzyn + 0x002a1347, // n0x1a49 c0x0000 (---------------) + I klodzko + 0x0029be4a, // n0x1a4a c0x0000 (---------------) + I kobierzyce + 0x00283349, // n0x1a4b c0x0000 (---------------) + I kolobrzeg + 0x002c6d05, // n0x1a4c c0x0000 (---------------) + I konin + 0x002c768a, // n0x1a4d c0x0000 (---------------) + I konskowola + 0x001239c6, // n0x1a4e c0x0000 (---------------) + krakow + 0x002b5985, // n0x1a4f c0x0000 (---------------) + I kutno + 0x003676c4, // n0x1a50 c0x0000 (---------------) + I lapy + 0x002a0c46, // n0x1a51 c0x0000 (---------------) + I lebork + 0x0032fe87, // n0x1a52 c0x0000 (---------------) + I legnica + 0x0023cac7, // n0x1a53 c0x0000 (---------------) + I lezajsk + 0x00301d08, // n0x1a54 c0x0000 (---------------) + I limanowa + 0x00212bc5, // n0x1a55 c0x0000 (---------------) + I lomza + 0x00233ec6, // n0x1a56 c0x0000 (---------------) + I lowicz + 0x00202545, // n0x1a57 c0x0000 (---------------) + I lubin + 0x00330b05, // n0x1a58 c0x0000 (---------------) + I lukow + 0x0021a604, // n0x1a59 c0x0000 (---------------) + I mail + 0x002e7187, // n0x1a5a c0x0000 (---------------) + I malbork + 0x0028018a, // n0x1a5b c0x0000 (---------------) + I malopolska + 0x0037fe08, // n0x1a5c c0x0000 (---------------) + I mazowsze + 0x002d1606, // n0x1a5d c0x0000 (---------------) + I mazury + 0x00011c43, // n0x1a5e c0x0000 (---------------) + med + 0x002fb545, // n0x1a5f c0x0000 (---------------) + I media + 0x003831c6, // n0x1a60 c0x0000 (---------------) + I miasta + 0x003a1c06, // n0x1a61 c0x0000 (---------------) + I mielec + 0x002be106, // n0x1a62 c0x0000 (---------------) + I mielno + 0x00215b43, // n0x1a63 c0x0000 (---------------) + I mil + 0x0037bd47, // n0x1a64 c0x0000 (---------------) + I mragowo + 0x002a12c5, // n0x1a65 c0x0000 (---------------) + I naklo + 0x0021d8c3, // n0x1a66 c0x0000 (---------------) + I net + 0x0039cd4d, // n0x1a67 c0x0000 (---------------) + I nieruchomosci + 0x0020e543, // n0x1a68 c0x0000 (---------------) + I nom + 0x00301e08, // n0x1a69 c0x0000 (---------------) + I nowaruda + 0x0039abc4, // n0x1a6a c0x0000 (---------------) + I nysa + 0x0026f045, // n0x1a6b c0x0000 (---------------) + I olawa + 0x0029bd46, // n0x1a6c c0x0000 (---------------) + I olecko + 0x00237686, // n0x1a6d c0x0000 (---------------) + I olkusz + 0x0020a307, // n0x1a6e c0x0000 (---------------) + I olsztyn + 0x00238307, // n0x1a6f c0x0000 (---------------) + I opoczno + 0x0024a205, // n0x1a70 c0x0000 (---------------) + I opole + 0x00229a83, // n0x1a71 c0x0000 (---------------) + I org + 0x00207ac7, // n0x1a72 c0x0000 (---------------) + I ostroda + 0x002c5c89, // n0x1a73 c0x0000 (---------------) + I ostroleka + 0x00203ac9, // n0x1a74 c0x0000 (---------------) + I ostrowiec + 0x0020854a, // n0x1a75 c0x0000 (---------------) + I ostrowwlkp + 0x002419c2, // n0x1a76 c0x0000 (---------------) + I pc + 0x00209104, // n0x1a77 c0x0000 (---------------) + I pila + 0x002d1ec4, // n0x1a78 c0x0000 (---------------) + I pisz + 0x002158c7, // n0x1a79 c0x0000 (---------------) + I podhale + 0x00237888, // n0x1a7a c0x0000 (---------------) + I podlasie + 0x002d7bc9, // n0x1a7b c0x0000 (---------------) + I polkowice + 0x0021ce49, // n0x1a7c c0x0000 (---------------) + I pomorskie + 0x002d8787, // n0x1a7d c0x0000 (---------------) + I pomorze + 0x00308106, // n0x1a7e c0x0000 (---------------) + I powiat + 0x000d9f46, // n0x1a7f c0x0000 (---------------) + poznan + 0x002db244, // n0x1a80 c0x0000 (---------------) + I priv + 0x002db3ca, // n0x1a81 c0x0000 (---------------) + I prochowice + 0x002de5c8, // n0x1a82 c0x0000 (---------------) + I pruszkow + 0x002deb89, // n0x1a83 c0x0000 (---------------) + I przeworsk + 0x00286846, // n0x1a84 c0x0000 (---------------) + I pulawy + 0x002f9045, // n0x1a85 c0x0000 (---------------) + I radom + 0x0037fcc8, // n0x1a86 c0x0000 (---------------) + I rawa-maz + 0x002bf48a, // n0x1a87 c0x0000 (---------------) + I realestate + 0x0020c043, // n0x1a88 c0x0000 (---------------) + I rel + 0x0034e986, // n0x1a89 c0x0000 (---------------) + I rybnik + 0x002d8887, // n0x1a8a c0x0000 (---------------) + I rzeszow + 0x0020d5c5, // n0x1a8b c0x0000 (---------------) + I sanok + 0x00221705, // n0x1a8c c0x0000 (---------------) + I sejny + 0x00240e03, // n0x1a8d c0x0000 (---------------) + I sex + 0x00332c44, // n0x1a8e c0x0000 (---------------) + I shop + 0x00223f45, // n0x1a8f c0x0000 (---------------) + I sklep + 0x0027a847, // n0x1a90 c0x0000 (---------------) + I skoczow + 0x002dc085, // n0x1a91 c0x0000 (---------------) + I slask + 0x002cdd06, // n0x1a92 c0x0000 (---------------) + I slupsk + 0x00115105, // n0x1a93 c0x0000 (---------------) + sopot + 0x0021e5c3, // n0x1a94 c0x0000 (---------------) + I sos + 0x002a6389, // n0x1a95 c0x0000 (---------------) + I sosnowiec + 0x0026ee0c, // n0x1a96 c0x0000 (---------------) + I stalowa-wola + 0x0029600c, // n0x1a97 c0x0000 (---------------) + I starachowice + 0x002c7248, // n0x1a98 c0x0000 (---------------) + I stargard + 0x00265247, // n0x1a99 c0x0000 (---------------) + I suwalki + 0x002e5008, // n0x1a9a c0x0000 (---------------) + I swidnica + 0x002e5c0a, // n0x1a9b c0x0000 (---------------) + I swiebodzin + 0x002e658b, // n0x1a9c c0x0000 (---------------) + I swinoujscie + 0x00301a08, // n0x1a9d c0x0000 (---------------) + I szczecin + 0x003937c8, // n0x1a9e c0x0000 (---------------) + I szczytno + 0x0020b986, // n0x1a9f c0x0000 (---------------) + I szkola + 0x00363285, // n0x1aa0 c0x0000 (---------------) + I targi + 0x003223ca, // n0x1aa1 c0x0000 (---------------) + I tarnobrzeg + 0x00218745, // n0x1aa2 c0x0000 (---------------) + I tgory + 0x00200142, // n0x1aa3 c0x0000 (---------------) + I tm + 0x002ba087, // n0x1aa4 c0x0000 (---------------) + I tourism + 0x00293486, // n0x1aa5 c0x0000 (---------------) + I travel + 0x0034d545, // n0x1aa6 c0x0000 (---------------) + I turek + 0x002e7a49, // n0x1aa7 c0x0000 (---------------) + I turystyka + 0x00378505, // n0x1aa8 c0x0000 (---------------) + I tychy + 0x003726c5, // n0x1aa9 c0x0000 (---------------) + I ustka + 0x00268689, // n0x1aaa c0x0000 (---------------) + I walbrzych + 0x00383046, // n0x1aab c0x0000 (---------------) + I warmia + 0x00227a08, // n0x1aac c0x0000 (---------------) + I warszawa + 0x0022bf03, // n0x1aad c0x0000 (---------------) + I waw + 0x00208946, // n0x1aae c0x0000 (---------------) + I wegrow + 0x0026e186, // n0x1aaf c0x0000 (---------------) + I wielun + 0x002f5945, // n0x1ab0 c0x0000 (---------------) + I wlocl + 0x002f5949, // n0x1ab1 c0x0000 (---------------) + I wloclawek + 0x002ab3c9, // n0x1ab2 c0x0000 (---------------) + I wodzislaw + 0x00241d07, // n0x1ab3 c0x0000 (---------------) + I wolomin + 0x000f57c4, // n0x1ab4 c0x0000 (---------------) + wroc + 0x002f57c7, // n0x1ab5 c0x0000 (---------------) + I wroclaw + 0x0021cd49, // n0x1ab6 c0x0000 (---------------) + I zachpomor + 0x00338685, // n0x1ab7 c0x0000 (---------------) + I zagan + 0x0003b808, // n0x1ab8 c0x0000 (---------------) + zakopane + 0x0033acc5, // n0x1ab9 c0x0000 (---------------) + I zarow + 0x0033a9c5, // n0x1aba c0x0000 (---------------) + I zgora + 0x0021d989, // n0x1abb c0x0000 (---------------) + I zgorzelec + 0x002136c2, // n0x1abc c0x0000 (---------------) + I ap + 0x0021a1c4, // n0x1abd c0x0000 (---------------) + I griw + 0x00202e82, // n0x1abe c0x0000 (---------------) + I ic + 0x00201a02, // n0x1abf c0x0000 (---------------) + I is + 0x002637c5, // n0x1ac0 c0x0000 (---------------) + I kmpsp + 0x002cab08, // n0x1ac1 c0x0000 (---------------) + I konsulat + 0x0037a705, // n0x1ac2 c0x0000 (---------------) + I kppsp + 0x002b82c3, // n0x1ac3 c0x0000 (---------------) + I kwp + 0x002b82c5, // n0x1ac4 c0x0000 (---------------) + I kwpsp + 0x002ca2c3, // n0x1ac5 c0x0000 (---------------) + I mup + 0x0020f2c2, // n0x1ac6 c0x0000 (---------------) + I mw + 0x00260804, // n0x1ac7 c0x0000 (---------------) + I oirm + 0x002f6303, // n0x1ac8 c0x0000 (---------------) + I oum + 0x0020ec42, // n0x1ac9 c0x0000 (---------------) + I pa + 0x002dcbc4, // n0x1aca c0x0000 (---------------) + I pinb + 0x002d24c3, // n0x1acb c0x0000 (---------------) + I piw + 0x00200c42, // n0x1acc c0x0000 (---------------) + I po + 0x00245b03, // n0x1acd c0x0000 (---------------) + I psp + 0x00284bc4, // n0x1ace c0x0000 (---------------) + I psse + 0x002b0943, // n0x1acf c0x0000 (---------------) + I pup + 0x0023d244, // n0x1ad0 c0x0000 (---------------) + I rzgw + 0x00202402, // n0x1ad1 c0x0000 (---------------) + I sa + 0x0026b1c3, // n0x1ad2 c0x0000 (---------------) + I sdn + 0x00215443, // n0x1ad3 c0x0000 (---------------) + I sko + 0x00204c82, // n0x1ad4 c0x0000 (---------------) + I so + 0x00336d82, // n0x1ad5 c0x0000 (---------------) + I sr + 0x002ab209, // n0x1ad6 c0x0000 (---------------) + I starostwo + 0x00207e02, // n0x1ad7 c0x0000 (---------------) + I ug + 0x00281744, // n0x1ad8 c0x0000 (---------------) + I ugim + 0x0020bd82, // n0x1ad9 c0x0000 (---------------) + I um + 0x0037fb44, // n0x1ada c0x0000 (---------------) + I umig + 0x003080c4, // n0x1adb c0x0000 (---------------) + I upow + 0x002dd9c4, // n0x1adc c0x0000 (---------------) + I uppo + 0x00202982, // n0x1add c0x0000 (---------------) + I us + 0x0020b5c2, // n0x1ade c0x0000 (---------------) + I uw + 0x00211f03, // n0x1adf c0x0000 (---------------) + I uzs + 0x002e6203, // n0x1ae0 c0x0000 (---------------) + I wif + 0x0022bf84, // n0x1ae1 c0x0000 (---------------) + I wiih + 0x00255904, // n0x1ae2 c0x0000 (---------------) + I winb + 0x002c5c04, // n0x1ae3 c0x0000 (---------------) + I wios + 0x002c7584, // n0x1ae4 c0x0000 (---------------) + I witd + 0x002f4c83, // n0x1ae5 c0x0000 (---------------) + I wiw + 0x002eb643, // n0x1ae6 c0x0000 (---------------) + I wsa + 0x00323944, // n0x1ae7 c0x0000 (---------------) + I wskr + 0x002f6f44, // n0x1ae8 c0x0000 (---------------) + I wuoz + 0x002f7246, // n0x1ae9 c0x0000 (---------------) + I wzmiuw + 0x00252242, // n0x1aea c0x0000 (---------------) + I zp + 0x00208182, // n0x1aeb c0x0000 (---------------) + I co + 0x002349c3, // n0x1aec c0x0000 (---------------) + I edu + 0x00275003, // n0x1aed c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x1aee c0x0000 (---------------) + I net + 0x00229a83, // n0x1aef c0x0000 (---------------) + I org + 0x00205882, // n0x1af0 c0x0000 (---------------) + I ac + 0x0030a143, // n0x1af1 c0x0000 (---------------) + I biz + 0x0022edc3, // n0x1af2 c0x0000 (---------------) + I com + 0x002349c3, // n0x1af3 c0x0000 (---------------) + I edu + 0x00202243, // n0x1af4 c0x0000 (---------------) + I est + 0x00275003, // n0x1af5 c0x0000 (---------------) + I gov + 0x0038a144, // n0x1af6 c0x0000 (---------------) + I info + 0x002ab4c4, // n0x1af7 c0x0000 (---------------) + I isla + 0x0027ca84, // n0x1af8 c0x0000 (---------------) + I name + 0x0021d8c3, // n0x1af9 c0x0000 (---------------) + I net + 0x00229a83, // n0x1afa c0x0000 (---------------) + I org + 0x00220283, // n0x1afb c0x0000 (---------------) + I pro + 0x002dba84, // n0x1afc c0x0000 (---------------) + I prof + 0x002ac5c3, // n0x1afd c0x0000 (---------------) + I aca + 0x00211783, // n0x1afe c0x0000 (---------------) + I bar + 0x00213b83, // n0x1aff c0x0000 (---------------) + I cpa + 0x0027bd03, // n0x1b00 c0x0000 (---------------) + I eng + 0x002aa183, // n0x1b01 c0x0000 (---------------) + I jur + 0x00209183, // n0x1b02 c0x0000 (---------------) + I law + 0x00211c43, // n0x1b03 c0x0000 (---------------) + I med + 0x0022edc3, // n0x1b04 c0x0000 (---------------) + I com + 0x002349c3, // n0x1b05 c0x0000 (---------------) + I edu + 0x00275003, // n0x1b06 c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x1b07 c0x0000 (---------------) + I net + 0x00229a83, // n0x1b08 c0x0000 (---------------) + I org + 0x002d5303, // n0x1b09 c0x0000 (---------------) + I plo + 0x00230ec3, // n0x1b0a c0x0000 (---------------) + I sec + 0x000f5248, // n0x1b0b c0x0000 (---------------) + blogspot + 0x0022edc3, // n0x1b0c c0x0000 (---------------) + I com + 0x002349c3, // n0x1b0d c0x0000 (---------------) + I edu + 0x00275003, // n0x1b0e c0x0000 (---------------) + I gov + 0x0026f683, // n0x1b0f c0x0000 (---------------) + I int + 0x0021d8c3, // n0x1b10 c0x0000 (---------------) + I net + 0x0023c4c4, // n0x1b11 c0x0000 (---------------) + I nome + 0x00229a83, // n0x1b12 c0x0000 (---------------) + I org + 0x0028ff44, // n0x1b13 c0x0000 (---------------) + I publ + 0x002cad85, // n0x1b14 c0x0000 (---------------) + I belau + 0x00208182, // n0x1b15 c0x0000 (---------------) + I co + 0x002003c2, // n0x1b16 c0x0000 (---------------) + I ed + 0x00208502, // n0x1b17 c0x0000 (---------------) + I go + 0x00203282, // n0x1b18 c0x0000 (---------------) + I ne + 0x00200282, // n0x1b19 c0x0000 (---------------) + I or + 0x0022edc3, // n0x1b1a c0x0000 (---------------) + I com + 0x00238284, // n0x1b1b c0x0000 (---------------) + I coop + 0x002349c3, // n0x1b1c c0x0000 (---------------) + I edu + 0x00275003, // n0x1b1d c0x0000 (---------------) + I gov + 0x00215b43, // n0x1b1e c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x1b1f c0x0000 (---------------) + I net + 0x00229a83, // n0x1b20 c0x0000 (---------------) + I org + 0x000f5248, // n0x1b21 c0x0000 (---------------) + blogspot + 0x0022edc3, // n0x1b22 c0x0000 (---------------) + I com + 0x002349c3, // n0x1b23 c0x0000 (---------------) + I edu + 0x00275003, // n0x1b24 c0x0000 (---------------) + I gov + 0x00215b43, // n0x1b25 c0x0000 (---------------) + I mil + 0x0027ca84, // n0x1b26 c0x0000 (---------------) + I name + 0x0021d8c3, // n0x1b27 c0x0000 (---------------) + I net + 0x00229a83, // n0x1b28 c0x0000 (---------------) + I org + 0x00215d43, // n0x1b29 c0x0000 (---------------) + I sch + 0x002b1c44, // n0x1b2a c0x0000 (---------------) + I asso + 0x000f5248, // n0x1b2b c0x0000 (---------------) + blogspot + 0x0022edc3, // n0x1b2c c0x0000 (---------------) + I com + 0x0020e543, // n0x1b2d c0x0000 (---------------) + I nom + 0x00243984, // n0x1b2e c0x0000 (---------------) + I arts + 0x000f5248, // n0x1b2f c0x0000 (---------------) + blogspot + 0x0022edc3, // n0x1b30 c0x0000 (---------------) + I com + 0x00247a04, // n0x1b31 c0x0000 (---------------) + I firm + 0x0038a144, // n0x1b32 c0x0000 (---------------) + I info + 0x0020e543, // n0x1b33 c0x0000 (---------------) + I nom + 0x00202382, // n0x1b34 c0x0000 (---------------) + I nt + 0x00229a83, // n0x1b35 c0x0000 (---------------) + I org + 0x00226f03, // n0x1b36 c0x0000 (---------------) + I rec + 0x0038c985, // n0x1b37 c0x0000 (---------------) + I store + 0x00200142, // n0x1b38 c0x0000 (---------------) + I tm + 0x002f7083, // n0x1b39 c0x0000 (---------------) + I www + 0x00205882, // n0x1b3a c0x0000 (---------------) + I ac + 0x000f5248, // n0x1b3b c0x0000 (---------------) + blogspot + 0x00208182, // n0x1b3c c0x0000 (---------------) + I co + 0x002349c3, // n0x1b3d c0x0000 (---------------) + I edu + 0x00275003, // n0x1b3e c0x0000 (---------------) + I gov + 0x002020c2, // n0x1b3f c0x0000 (---------------) + I in + 0x00229a83, // n0x1b40 c0x0000 (---------------) + I org + 0x00205882, // n0x1b41 c0x0000 (---------------) + I ac + 0x003a3107, // n0x1b42 c0x0000 (---------------) + I adygeya + 0x002700c5, // n0x1b43 c0x0000 (---------------) + I altai + 0x00227844, // n0x1b44 c0x0000 (---------------) + I amur + 0x00377b46, // n0x1b45 c0x0000 (---------------) + I amursk + 0x00305d4b, // n0x1b46 c0x0000 (---------------) + I arkhangelsk + 0x002533c9, // n0x1b47 c0x0000 (---------------) + I astrakhan + 0x00393606, // n0x1b48 c0x0000 (---------------) + I baikal + 0x00321409, // n0x1b49 c0x0000 (---------------) + I bashkiria + 0x002b2848, // n0x1b4a c0x0000 (---------------) + I belgorod + 0x00204043, // n0x1b4b c0x0000 (---------------) + I bir + 0x000f5248, // n0x1b4c c0x0000 (---------------) + blogspot + 0x00223e07, // n0x1b4d c0x0000 (---------------) + I bryansk + 0x002ff348, // n0x1b4e c0x0000 (---------------) + I buryatia + 0x00226843, // n0x1b4f c0x0000 (---------------) + I cbg + 0x0025e404, // n0x1b50 c0x0000 (---------------) + I chel + 0x00265a4b, // n0x1b51 c0x0000 (---------------) + I chelyabinsk + 0x002a6585, // n0x1b52 c0x0000 (---------------) + I chita + 0x002b7388, // n0x1b53 c0x0000 (---------------) + I chukotka + 0x00333c89, // n0x1b54 c0x0000 (---------------) + I chuvashia + 0x00255883, // n0x1b55 c0x0000 (---------------) + I cmw + 0x0022edc3, // n0x1b56 c0x0000 (---------------) + I com + 0x00321848, // n0x1b57 c0x0000 (---------------) + I dagestan + 0x002e4187, // n0x1b58 c0x0000 (---------------) + I dudinka + 0x00363886, // n0x1b59 c0x0000 (---------------) + I e-burg + 0x002349c3, // n0x1b5a c0x0000 (---------------) + I edu + 0x00382647, // n0x1b5b c0x0000 (---------------) + I fareast + 0x00275003, // n0x1b5c c0x0000 (---------------) + I gov + 0x003318c6, // n0x1b5d c0x0000 (---------------) + I grozny + 0x0026f683, // n0x1b5e c0x0000 (---------------) + I int + 0x0022b3c7, // n0x1b5f c0x0000 (---------------) + I irkutsk + 0x00305647, // n0x1b60 c0x0000 (---------------) + I ivanovo + 0x00383b47, // n0x1b61 c0x0000 (---------------) + I izhevsk + 0x002e7105, // n0x1b62 c0x0000 (---------------) + I jamal + 0x00206703, // n0x1b63 c0x0000 (---------------) + I jar + 0x0020e7cb, // n0x1b64 c0x0000 (---------------) + I joshkar-ola + 0x00324a48, // n0x1b65 c0x0000 (---------------) + I k-uralsk + 0x0022a608, // n0x1b66 c0x0000 (---------------) + I kalmykia + 0x00394486, // n0x1b67 c0x0000 (---------------) + I kaluga + 0x003229c9, // n0x1b68 c0x0000 (---------------) + I kamchatka + 0x00374707, // n0x1b69 c0x0000 (---------------) + I karelia + 0x002f0ec5, // n0x1b6a c0x0000 (---------------) + I kazan + 0x002a6c04, // n0x1b6b c0x0000 (---------------) + I kchr + 0x002c3bc8, // n0x1b6c c0x0000 (---------------) + I kemerovo + 0x00325b0a, // n0x1b6d c0x0000 (---------------) + I khabarovsk + 0x00325d49, // n0x1b6e c0x0000 (---------------) + I khakassia + 0x0023cc43, // n0x1b6f c0x0000 (---------------) + I khv + 0x00276145, // n0x1b70 c0x0000 (---------------) + I kirov + 0x0026b543, // n0x1b71 c0x0000 (---------------) + I kms + 0x0029b106, // n0x1b72 c0x0000 (---------------) + I koenig + 0x002e25c4, // n0x1b73 c0x0000 (---------------) + I komi + 0x002f5b48, // n0x1b74 c0x0000 (---------------) + I kostroma + 0x0038de0b, // n0x1b75 c0x0000 (---------------) + I krasnoyarsk + 0x003343c5, // n0x1b76 c0x0000 (---------------) + I kuban + 0x002b25c6, // n0x1b77 c0x0000 (---------------) + I kurgan + 0x002b3f05, // n0x1b78 c0x0000 (---------------) + I kursk + 0x002b46c8, // n0x1b79 c0x0000 (---------------) + I kustanai + 0x002b5ac7, // n0x1b7a c0x0000 (---------------) + I kuzbass + 0x0020e207, // n0x1b7b c0x0000 (---------------) + I lipetsk + 0x0033dbc7, // n0x1b7c c0x0000 (---------------) + I magadan + 0x002c3fc8, // n0x1b7d c0x0000 (---------------) + I magnitka + 0x00219884, // n0x1b7e c0x0000 (---------------) + I mari + 0x0023a707, // n0x1b7f c0x0000 (---------------) + I mari-el + 0x00273886, // n0x1b80 c0x0000 (---------------) + I marine + 0x00215b43, // n0x1b81 c0x0000 (---------------) + I mil + 0x002c2588, // n0x1b82 c0x0000 (---------------) + I mordovia + 0x0024b7c3, // n0x1b83 c0x0000 (---------------) + I msk + 0x002ca948, // n0x1b84 c0x0000 (---------------) + I murmansk + 0x002ced45, // n0x1b85 c0x0000 (---------------) + I mytis + 0x00200988, // n0x1b86 c0x0000 (---------------) + I nakhodka + 0x00234bc7, // n0x1b87 c0x0000 (---------------) + I nalchik + 0x0021d8c3, // n0x1b88 c0x0000 (---------------) + I net + 0x0030a903, // n0x1b89 c0x0000 (---------------) + I nkz + 0x0039ee04, // n0x1b8a c0x0000 (---------------) + I nnov + 0x00371547, // n0x1b8b c0x0000 (---------------) + I norilsk + 0x002062c3, // n0x1b8c c0x0000 (---------------) + I nov + 0x0030570b, // n0x1b8d c0x0000 (---------------) + I novosibirsk + 0x00215403, // n0x1b8e c0x0000 (---------------) + I nsk + 0x0024b784, // n0x1b8f c0x0000 (---------------) + I omsk + 0x0038ca08, // n0x1b90 c0x0000 (---------------) + I orenburg + 0x00229a83, // n0x1b91 c0x0000 (---------------) + I org + 0x002d2805, // n0x1b92 c0x0000 (---------------) + I oryol + 0x0028de85, // n0x1b93 c0x0000 (---------------) + I oskol + 0x002a11c6, // n0x1b94 c0x0000 (---------------) + I palana + 0x00209a05, // n0x1b95 c0x0000 (---------------) + I penza + 0x002cf104, // n0x1b96 c0x0000 (---------------) + I perm + 0x002099c2, // n0x1b97 c0x0000 (---------------) + I pp + 0x002dee43, // n0x1b98 c0x0000 (---------------) + I ptz + 0x0036774a, // n0x1b99 c0x0000 (---------------) + I pyatigorsk + 0x0030b843, // n0x1b9a c0x0000 (---------------) + I rnd + 0x002a7f09, // n0x1b9b c0x0000 (---------------) + I rubtsovsk + 0x0023a406, // n0x1b9c c0x0000 (---------------) + I ryazan + 0x00218a08, // n0x1b9d c0x0000 (---------------) + I sakhalin + 0x00284706, // n0x1b9e c0x0000 (---------------) + I samara + 0x00220b87, // n0x1b9f c0x0000 (---------------) + I saratov + 0x002c1588, // n0x1ba0 c0x0000 (---------------) + I simbirsk + 0x002d5c88, // n0x1ba1 c0x0000 (---------------) + I smolensk + 0x002d1083, // n0x1ba2 c0x0000 (---------------) + I snz + 0x00263883, // n0x1ba3 c0x0000 (---------------) + I spb + 0x00220f49, // n0x1ba4 c0x0000 (---------------) + I stavropol + 0x00283a03, // n0x1ba5 c0x0000 (---------------) + I stv + 0x00340446, // n0x1ba6 c0x0000 (---------------) + I surgut + 0x0026fd46, // n0x1ba7 c0x0000 (---------------) + I syzran + 0x00314d86, // n0x1ba8 c0x0000 (---------------) + I tambov + 0x0036a389, // n0x1ba9 c0x0000 (---------------) + I tatarstan + 0x002f5084, // n0x1baa c0x0000 (---------------) + I test + 0x00210443, // n0x1bab c0x0000 (---------------) + I tom + 0x00324945, // n0x1bac c0x0000 (---------------) + I tomsk + 0x002eba09, // n0x1bad c0x0000 (---------------) + I tsaritsyn + 0x0020e303, // n0x1bae c0x0000 (---------------) + I tsk + 0x00357704, // n0x1baf c0x0000 (---------------) + I tula + 0x002e85c4, // n0x1bb0 c0x0000 (---------------) + I tuva + 0x00206fc4, // n0x1bb1 c0x0000 (---------------) + I tver + 0x00357246, // n0x1bb2 c0x0000 (---------------) + I tyumen + 0x00214103, // n0x1bb3 c0x0000 (---------------) + I udm + 0x00214108, // n0x1bb4 c0x0000 (---------------) + I udmurtia + 0x00253008, // n0x1bb5 c0x0000 (---------------) + I ulan-ude + 0x00356106, // n0x1bb6 c0x0000 (---------------) + I vdonsk + 0x002f0ccb, // n0x1bb7 c0x0000 (---------------) + I vladikavkaz + 0x002f1008, // n0x1bb8 c0x0000 (---------------) + I vladimir + 0x002f120b, // n0x1bb9 c0x0000 (---------------) + I vladivostok + 0x002f1849, // n0x1bba c0x0000 (---------------) + I volgograd + 0x002f2587, // n0x1bbb c0x0000 (---------------) + I vologda + 0x002f3348, // n0x1bbc c0x0000 (---------------) + I voronezh + 0x002f46c3, // n0x1bbd c0x0000 (---------------) + I vrn + 0x00394386, // n0x1bbe c0x0000 (---------------) + I vyatka + 0x00394787, // n0x1bbf c0x0000 (---------------) + I yakutia + 0x0028f985, // n0x1bc0 c0x0000 (---------------) + I yamal + 0x00343309, // n0x1bc1 c0x0000 (---------------) + I yaroslavl + 0x0030270d, // n0x1bc2 c0x0000 (---------------) + I yekaterinburg + 0x00218851, // n0x1bc3 c0x0000 (---------------) + I yuzhno-sakhalinsk + 0x0022a045, // n0x1bc4 c0x0000 (---------------) + I zgrad + 0x00205882, // n0x1bc5 c0x0000 (---------------) + I ac + 0x00208182, // n0x1bc6 c0x0000 (---------------) + I co + 0x0022edc3, // n0x1bc7 c0x0000 (---------------) + I com + 0x002349c3, // n0x1bc8 c0x0000 (---------------) + I edu + 0x002fa744, // n0x1bc9 c0x0000 (---------------) + I gouv + 0x00275003, // n0x1bca c0x0000 (---------------) + I gov + 0x0026f683, // n0x1bcb c0x0000 (---------------) + I int + 0x00215b43, // n0x1bcc c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x1bcd c0x0000 (---------------) + I net + 0x0022edc3, // n0x1bce c0x0000 (---------------) + I com + 0x002349c3, // n0x1bcf c0x0000 (---------------) + I edu + 0x00275003, // n0x1bd0 c0x0000 (---------------) + I gov + 0x00211c43, // n0x1bd1 c0x0000 (---------------) + I med + 0x0021d8c3, // n0x1bd2 c0x0000 (---------------) + I net + 0x00229a83, // n0x1bd3 c0x0000 (---------------) + I org + 0x00287e83, // n0x1bd4 c0x0000 (---------------) + I pub + 0x00215d43, // n0x1bd5 c0x0000 (---------------) + I sch + 0x0022edc3, // n0x1bd6 c0x0000 (---------------) + I com + 0x002349c3, // n0x1bd7 c0x0000 (---------------) + I edu + 0x00275003, // n0x1bd8 c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x1bd9 c0x0000 (---------------) + I net + 0x00229a83, // n0x1bda c0x0000 (---------------) + I org + 0x0022edc3, // n0x1bdb c0x0000 (---------------) + I com + 0x002349c3, // n0x1bdc c0x0000 (---------------) + I edu + 0x00275003, // n0x1bdd c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x1bde c0x0000 (---------------) + I net + 0x00229a83, // n0x1bdf c0x0000 (---------------) + I org + 0x0022edc3, // n0x1be0 c0x0000 (---------------) + I com + 0x002349c3, // n0x1be1 c0x0000 (---------------) + I edu + 0x00275003, // n0x1be2 c0x0000 (---------------) + I gov + 0x0038a144, // n0x1be3 c0x0000 (---------------) + I info + 0x00211c43, // n0x1be4 c0x0000 (---------------) + I med + 0x0021d8c3, // n0x1be5 c0x0000 (---------------) + I net + 0x00229a83, // n0x1be6 c0x0000 (---------------) + I org + 0x00206fc2, // n0x1be7 c0x0000 (---------------) + I tv + 0x00200101, // n0x1be8 c0x0000 (---------------) + I a + 0x00205882, // n0x1be9 c0x0000 (---------------) + I ac + 0x00200001, // n0x1bea c0x0000 (---------------) + I b + 0x00312842, // n0x1beb c0x0000 (---------------) + I bd + 0x000f5248, // n0x1bec c0x0000 (---------------) + blogspot + 0x0021b5c5, // n0x1bed c0x0000 (---------------) + I brand + 0x00200301, // n0x1bee c0x0000 (---------------) + I c + 0x0002edc3, // n0x1bef c0x0000 (---------------) + com + 0x00200401, // n0x1bf0 c0x0000 (---------------) + I d + 0x00200081, // n0x1bf1 c0x0000 (---------------) + I e + 0x00200381, // n0x1bf2 c0x0000 (---------------) + I f + 0x00325a42, // n0x1bf3 c0x0000 (---------------) + I fh + 0x00325a44, // n0x1bf4 c0x0000 (---------------) + I fhsk + 0x003603c3, // n0x1bf5 c0x0000 (---------------) + I fhv + 0x002006c1, // n0x1bf6 c0x0000 (---------------) + I g + 0x00200a41, // n0x1bf7 c0x0000 (---------------) + I h + 0x00200041, // n0x1bf8 c0x0000 (---------------) + I i + 0x00200a01, // n0x1bf9 c0x0000 (---------------) + I k + 0x002a09c7, // n0x1bfa c0x0000 (---------------) + I komforb + 0x002a44cf, // n0x1bfb c0x0000 (---------------) + I kommunalforbund + 0x002b4006, // n0x1bfc c0x0000 (---------------) + I komvux + 0x00200201, // n0x1bfd c0x0000 (---------------) + I l + 0x00262106, // n0x1bfe c0x0000 (---------------) + I lanbib + 0x00200181, // n0x1bff c0x0000 (---------------) + I m + 0x002005c1, // n0x1c00 c0x0000 (---------------) + I n + 0x0030fd8e, // n0x1c01 c0x0000 (---------------) + I naturbruksgymn + 0x00200281, // n0x1c02 c0x0000 (---------------) + I o + 0x00229a83, // n0x1c03 c0x0000 (---------------) + I org + 0x00200c41, // n0x1c04 c0x0000 (---------------) + I p + 0x0037e605, // n0x1c05 c0x0000 (---------------) + I parti + 0x002099c2, // n0x1c06 c0x0000 (---------------) + I pp + 0x00240d05, // n0x1c07 c0x0000 (---------------) + I press + 0x002002c1, // n0x1c08 c0x0000 (---------------) + I r + 0x00201a41, // n0x1c09 c0x0000 (---------------) + I s + 0x00200141, // n0x1c0a c0x0000 (---------------) + I t + 0x00200142, // n0x1c0b c0x0000 (---------------) + I tm + 0x002008c1, // n0x1c0c c0x0000 (---------------) + I u + 0x002010c1, // n0x1c0d c0x0000 (---------------) + I w + 0x0020d041, // n0x1c0e c0x0000 (---------------) + I x + 0x00201341, // n0x1c0f c0x0000 (---------------) + I y + 0x00202881, // n0x1c10 c0x0000 (---------------) + I z + 0x000f5248, // n0x1c11 c0x0000 (---------------) + blogspot + 0x0022edc3, // n0x1c12 c0x0000 (---------------) + I com + 0x002349c3, // n0x1c13 c0x0000 (---------------) + I edu + 0x00275003, // n0x1c14 c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x1c15 c0x0000 (---------------) + I net + 0x00229a83, // n0x1c16 c0x0000 (---------------) + I org + 0x0021ffc3, // n0x1c17 c0x0000 (---------------) + I per + 0x0022edc3, // n0x1c18 c0x0000 (---------------) + I com + 0x00275003, // n0x1c19 c0x0000 (---------------) + I gov + 0x00215b43, // n0x1c1a c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x1c1b c0x0000 (---------------) + I net + 0x00229a83, // n0x1c1c c0x0000 (---------------) + I org + 0x014d3788, // n0x1c1d c0x0005 (---------------)* o platform + 0x000f5248, // n0x1c1e c0x0000 (---------------) + blogspot + 0x000f5248, // n0x1c1f c0x0000 (---------------) + blogspot + 0x0022edc3, // n0x1c20 c0x0000 (---------------) + I com + 0x002349c3, // n0x1c21 c0x0000 (---------------) + I edu + 0x00275003, // n0x1c22 c0x0000 (---------------) + I gov + 0x0021d8c3, // n0x1c23 c0x0000 (---------------) + I net + 0x00229a83, // n0x1c24 c0x0000 (---------------) + I org + 0x002011c3, // n0x1c25 c0x0000 (---------------) + I art + 0x000f5248, // n0x1c26 c0x0000 (---------------) + blogspot + 0x0022edc3, // n0x1c27 c0x0000 (---------------) + I com + 0x002349c3, // n0x1c28 c0x0000 (---------------) + I edu + 0x002fa744, // n0x1c29 c0x0000 (---------------) + I gouv + 0x00229a83, // n0x1c2a c0x0000 (---------------) + I org + 0x003372c5, // n0x1c2b c0x0000 (---------------) + I perso + 0x00281a04, // n0x1c2c c0x0000 (---------------) + I univ + 0x0022edc3, // n0x1c2d c0x0000 (---------------) + I com + 0x0021d8c3, // n0x1c2e c0x0000 (---------------) + I net + 0x00229a83, // n0x1c2f c0x0000 (---------------) + I org + 0x00208182, // n0x1c30 c0x0000 (---------------) + I co + 0x0022edc3, // n0x1c31 c0x0000 (---------------) + I com + 0x00232549, // n0x1c32 c0x0000 (---------------) + I consulado + 0x002349c3, // n0x1c33 c0x0000 (---------------) + I edu + 0x002373c9, // n0x1c34 c0x0000 (---------------) + I embaixada + 0x00275003, // n0x1c35 c0x0000 (---------------) + I gov + 0x00215b43, // n0x1c36 c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x1c37 c0x0000 (---------------) + I net + 0x00229a83, // n0x1c38 c0x0000 (---------------) + I org + 0x002db048, // n0x1c39 c0x0000 (---------------) + I principe + 0x00215087, // n0x1c3a c0x0000 (---------------) + I saotome + 0x0038c985, // n0x1c3b c0x0000 (---------------) + I store + 0x003a3107, // n0x1c3c c0x0000 (---------------) + I adygeya + 0x00305d4b, // n0x1c3d c0x0000 (---------------) + I arkhangelsk + 0x00205648, // n0x1c3e c0x0000 (---------------) + I balashov + 0x00321409, // n0x1c3f c0x0000 (---------------) + I bashkiria + 0x00223e07, // n0x1c40 c0x0000 (---------------) + I bryansk + 0x00321848, // n0x1c41 c0x0000 (---------------) + I dagestan + 0x003318c6, // n0x1c42 c0x0000 (---------------) + I grozny + 0x00305647, // n0x1c43 c0x0000 (---------------) + I ivanovo + 0x0022a608, // n0x1c44 c0x0000 (---------------) + I kalmykia + 0x00394486, // n0x1c45 c0x0000 (---------------) + I kaluga + 0x00374707, // n0x1c46 c0x0000 (---------------) + I karelia + 0x00325d49, // n0x1c47 c0x0000 (---------------) + I khakassia + 0x00383cc9, // n0x1c48 c0x0000 (---------------) + I krasnodar + 0x002b25c6, // n0x1c49 c0x0000 (---------------) + I kurgan + 0x002b3245, // n0x1c4a c0x0000 (---------------) + I lenug + 0x002c2588, // n0x1c4b c0x0000 (---------------) + I mordovia + 0x0024b7c3, // n0x1c4c c0x0000 (---------------) + I msk + 0x002ca948, // n0x1c4d c0x0000 (---------------) + I murmansk + 0x00234bc7, // n0x1c4e c0x0000 (---------------) + I nalchik + 0x002062c3, // n0x1c4f c0x0000 (---------------) + I nov + 0x00321d87, // n0x1c50 c0x0000 (---------------) + I obninsk + 0x00209a05, // n0x1c51 c0x0000 (---------------) + I penza + 0x002d7548, // n0x1c52 c0x0000 (---------------) + I pokrovsk + 0x0026d045, // n0x1c53 c0x0000 (---------------) + I sochi + 0x00263883, // n0x1c54 c0x0000 (---------------) + I spb + 0x0034ec49, // n0x1c55 c0x0000 (---------------) + I togliatti + 0x002a0847, // n0x1c56 c0x0000 (---------------) + I troitsk + 0x00357704, // n0x1c57 c0x0000 (---------------) + I tula + 0x002e85c4, // n0x1c58 c0x0000 (---------------) + I tuva + 0x002f0ccb, // n0x1c59 c0x0000 (---------------) + I vladikavkaz + 0x002f1008, // n0x1c5a c0x0000 (---------------) + I vladimir + 0x002f2587, // n0x1c5b c0x0000 (---------------) + I vologda + 0x0022edc3, // n0x1c5c c0x0000 (---------------) + I com + 0x002349c3, // n0x1c5d c0x0000 (---------------) + I edu + 0x00209f03, // n0x1c5e c0x0000 (---------------) + I gob + 0x00229a83, // n0x1c5f c0x0000 (---------------) + I org + 0x0023e143, // n0x1c60 c0x0000 (---------------) + I red + 0x00275003, // n0x1c61 c0x0000 (---------------) + I gov + 0x0022edc3, // n0x1c62 c0x0000 (---------------) + I com + 0x002349c3, // n0x1c63 c0x0000 (---------------) + I edu + 0x00275003, // n0x1c64 c0x0000 (---------------) + I gov + 0x00215b43, // n0x1c65 c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x1c66 c0x0000 (---------------) + I net + 0x00229a83, // n0x1c67 c0x0000 (---------------) + I org + 0x00205882, // n0x1c68 c0x0000 (---------------) + I ac + 0x00208182, // n0x1c69 c0x0000 (---------------) + I co + 0x00229a83, // n0x1c6a c0x0000 (---------------) + I org + 0x000f5248, // n0x1c6b c0x0000 (---------------) + blogspot + 0x00205882, // n0x1c6c c0x0000 (---------------) + I ac + 0x00208182, // n0x1c6d c0x0000 (---------------) + I co + 0x00208502, // n0x1c6e c0x0000 (---------------) + I go + 0x002020c2, // n0x1c6f c0x0000 (---------------) + I in + 0x0020e5c2, // n0x1c70 c0x0000 (---------------) + I mi + 0x0021d8c3, // n0x1c71 c0x0000 (---------------) + I net + 0x00200282, // n0x1c72 c0x0000 (---------------) + I or + 0x00205882, // n0x1c73 c0x0000 (---------------) + I ac + 0x0030a143, // n0x1c74 c0x0000 (---------------) + I biz + 0x00208182, // n0x1c75 c0x0000 (---------------) + I co + 0x0022edc3, // n0x1c76 c0x0000 (---------------) + I com + 0x002349c3, // n0x1c77 c0x0000 (---------------) + I edu + 0x00208502, // n0x1c78 c0x0000 (---------------) + I go + 0x00275003, // n0x1c79 c0x0000 (---------------) + I gov + 0x0026f683, // n0x1c7a c0x0000 (---------------) + I int + 0x00215b43, // n0x1c7b c0x0000 (---------------) + I mil + 0x0027ca84, // n0x1c7c c0x0000 (---------------) + I name + 0x0021d8c3, // n0x1c7d c0x0000 (---------------) + I net + 0x00217183, // n0x1c7e c0x0000 (---------------) + I nic + 0x00229a83, // n0x1c7f c0x0000 (---------------) + I org + 0x002f5084, // n0x1c80 c0x0000 (---------------) + I test + 0x0021fa83, // n0x1c81 c0x0000 (---------------) + I web + 0x00275003, // n0x1c82 c0x0000 (---------------) + I gov + 0x00208182, // n0x1c83 c0x0000 (---------------) + I co + 0x0022edc3, // n0x1c84 c0x0000 (---------------) + I com + 0x002349c3, // n0x1c85 c0x0000 (---------------) + I edu + 0x00275003, // n0x1c86 c0x0000 (---------------) + I gov + 0x00215b43, // n0x1c87 c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x1c88 c0x0000 (---------------) + I net + 0x0020e543, // n0x1c89 c0x0000 (---------------) + I nom + 0x00229a83, // n0x1c8a c0x0000 (---------------) + I org + 0x0030a6c7, // n0x1c8b c0x0000 (---------------) + I agrinet + 0x0022edc3, // n0x1c8c c0x0000 (---------------) + I com + 0x002215c7, // n0x1c8d c0x0000 (---------------) + I defense + 0x00358006, // n0x1c8e c0x0000 (---------------) + I edunet + 0x002153c3, // n0x1c8f c0x0000 (---------------) + I ens + 0x0020e003, // n0x1c90 c0x0000 (---------------) + I fin + 0x00275003, // n0x1c91 c0x0000 (---------------) + I gov + 0x00202603, // n0x1c92 c0x0000 (---------------) + I ind + 0x0038a144, // n0x1c93 c0x0000 (---------------) + I info + 0x0035c284, // n0x1c94 c0x0000 (---------------) + I intl + 0x002d2d06, // n0x1c95 c0x0000 (---------------) + I mincom + 0x0025cec3, // n0x1c96 c0x0000 (---------------) + I nat + 0x0021d8c3, // n0x1c97 c0x0000 (---------------) + I net + 0x00229a83, // n0x1c98 c0x0000 (---------------) + I org + 0x003372c5, // n0x1c99 c0x0000 (---------------) + I perso + 0x00389984, // n0x1c9a c0x0000 (---------------) + I rnrt + 0x002a9743, // n0x1c9b c0x0000 (---------------) + I rns + 0x002096c3, // n0x1c9c c0x0000 (---------------) + I rnu + 0x002ba087, // n0x1c9d c0x0000 (---------------) + I tourism + 0x002ce685, // n0x1c9e c0x0000 (---------------) + I turen + 0x0022edc3, // n0x1c9f c0x0000 (---------------) + I com + 0x002349c3, // n0x1ca0 c0x0000 (---------------) + I edu + 0x00275003, // n0x1ca1 c0x0000 (---------------) + I gov + 0x00215b43, // n0x1ca2 c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x1ca3 c0x0000 (---------------) + I net + 0x00229a83, // n0x1ca4 c0x0000 (---------------) + I org + 0x00200602, // n0x1ca5 c0x0000 (---------------) + I av + 0x002c9743, // n0x1ca6 c0x0000 (---------------) + I bbs + 0x002b2843, // n0x1ca7 c0x0000 (---------------) + I bel + 0x0030a143, // n0x1ca8 c0x0000 (---------------) + I biz + 0x5162edc3, // n0x1ca9 c0x0145 (n0x1cba-n0x1cbb) + I com + 0x00204d42, // n0x1caa c0x0000 (---------------) + I dr + 0x002349c3, // n0x1cab c0x0000 (---------------) + I edu + 0x00206243, // n0x1cac c0x0000 (---------------) + I gen + 0x00275003, // n0x1cad c0x0000 (---------------) + I gov + 0x0038a144, // n0x1cae c0x0000 (---------------) + I info + 0x00324c03, // n0x1caf c0x0000 (---------------) + I k12 + 0x00308603, // n0x1cb0 c0x0000 (---------------) + I kep + 0x00215b43, // n0x1cb1 c0x0000 (---------------) + I mil + 0x0027ca84, // n0x1cb2 c0x0000 (---------------) + I name + 0x51a03402, // n0x1cb3 c0x0146 (n0x1cbb-n0x1cbc) + I nc + 0x0021d8c3, // n0x1cb4 c0x0000 (---------------) + I net + 0x00229a83, // n0x1cb5 c0x0000 (---------------) + I org + 0x002210c3, // n0x1cb6 c0x0000 (---------------) + I pol + 0x0022fb43, // n0x1cb7 c0x0000 (---------------) + I tel + 0x00206fc2, // n0x1cb8 c0x0000 (---------------) + I tv + 0x0021fa83, // n0x1cb9 c0x0000 (---------------) + I web + 0x000f5248, // n0x1cba c0x0000 (---------------) + blogspot + 0x00275003, // n0x1cbb c0x0000 (---------------) + I gov + 0x002bcb84, // n0x1cbc c0x0000 (---------------) + I aero + 0x0030a143, // n0x1cbd c0x0000 (---------------) + I biz + 0x00208182, // n0x1cbe c0x0000 (---------------) + I co + 0x0022edc3, // n0x1cbf c0x0000 (---------------) + I com + 0x00238284, // n0x1cc0 c0x0000 (---------------) + I coop + 0x002349c3, // n0x1cc1 c0x0000 (---------------) + I edu + 0x00275003, // n0x1cc2 c0x0000 (---------------) + I gov + 0x0038a144, // n0x1cc3 c0x0000 (---------------) + I info + 0x0026f683, // n0x1cc4 c0x0000 (---------------) + I int + 0x002cd804, // n0x1cc5 c0x0000 (---------------) + I jobs + 0x00207804, // n0x1cc6 c0x0000 (---------------) + I mobi + 0x002cc746, // n0x1cc7 c0x0000 (---------------) + I museum + 0x0027ca84, // n0x1cc8 c0x0000 (---------------) + I name + 0x0021d8c3, // n0x1cc9 c0x0000 (---------------) + I net + 0x00229a83, // n0x1cca c0x0000 (---------------) + I org + 0x00220283, // n0x1ccb c0x0000 (---------------) + I pro + 0x00293486, // n0x1ccc c0x0000 (---------------) + I travel + 0x0004e18b, // n0x1ccd c0x0000 (---------------) + better-than + 0x00011a06, // n0x1cce c0x0000 (---------------) + dyndns + 0x0001f8ca, // n0x1ccf c0x0000 (---------------) + on-the-web + 0x000f478a, // n0x1cd0 c0x0000 (---------------) + worse-than + 0x000f5248, // n0x1cd1 c0x0000 (---------------) + blogspot + 0x00202504, // n0x1cd2 c0x0000 (---------------) + I club + 0x0022edc3, // n0x1cd3 c0x0000 (---------------) + I com + 0x0030a104, // n0x1cd4 c0x0000 (---------------) + I ebiz + 0x002349c3, // n0x1cd5 c0x0000 (---------------) + I edu + 0x0029f084, // n0x1cd6 c0x0000 (---------------) + I game + 0x00275003, // n0x1cd7 c0x0000 (---------------) + I gov + 0x00306f03, // n0x1cd8 c0x0000 (---------------) + I idv + 0x00215b43, // n0x1cd9 c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x1cda c0x0000 (---------------) + I net + 0x00229a83, // n0x1cdb c0x0000 (---------------) + I org + 0x0031f50b, // n0x1cdc c0x0000 (---------------) + I xn--czrw28b + 0x0038f90a, // n0x1cdd c0x0000 (---------------) + I xn--uc0atv + 0x003a20cc, // n0x1cde c0x0000 (---------------) + I xn--zf0ao64a + 0x00205882, // n0x1cdf c0x0000 (---------------) + I ac + 0x00208182, // n0x1ce0 c0x0000 (---------------) + I co + 0x00208502, // n0x1ce1 c0x0000 (---------------) + I go + 0x0022fac5, // n0x1ce2 c0x0000 (---------------) + I hotel + 0x0038a144, // n0x1ce3 c0x0000 (---------------) + I info + 0x00202302, // n0x1ce4 c0x0000 (---------------) + I me + 0x00215b43, // n0x1ce5 c0x0000 (---------------) + I mil + 0x00207804, // n0x1ce6 c0x0000 (---------------) + I mobi + 0x00203282, // n0x1ce7 c0x0000 (---------------) + I ne + 0x00200282, // n0x1ce8 c0x0000 (---------------) + I or + 0x002024c2, // n0x1ce9 c0x0000 (---------------) + I sc + 0x00206fc2, // n0x1cea c0x0000 (---------------) + I tv + 0x0010a143, // n0x1ceb c0x0000 (---------------) + biz + 0x002a3949, // n0x1cec c0x0000 (---------------) + I cherkassy + 0x0026fbc8, // n0x1ced c0x0000 (---------------) + I cherkasy + 0x00274e89, // n0x1cee c0x0000 (---------------) + I chernigov + 0x0036b189, // n0x1cef c0x0000 (---------------) + I chernihiv + 0x00296fca, // n0x1cf0 c0x0000 (---------------) + I chernivtsi + 0x0036658a, // n0x1cf1 c0x0000 (---------------) + I chernovtsy + 0x00208e82, // n0x1cf2 c0x0000 (---------------) + I ck + 0x0021a142, // n0x1cf3 c0x0000 (---------------) + I cn + 0x00008182, // n0x1cf4 c0x0000 (---------------) + co + 0x0022edc3, // n0x1cf5 c0x0000 (---------------) + I com + 0x00211e82, // n0x1cf6 c0x0000 (---------------) + I cr + 0x0023f186, // n0x1cf7 c0x0000 (---------------) + I crimea + 0x0034f802, // n0x1cf8 c0x0000 (---------------) + I cv + 0x002083c2, // n0x1cf9 c0x0000 (---------------) + I dn + 0x00377d8e, // n0x1cfa c0x0000 (---------------) + I dnepropetrovsk + 0x0026b20e, // n0x1cfb c0x0000 (---------------) + I dnipropetrovsk + 0x00274d07, // n0x1cfc c0x0000 (---------------) + I dominic + 0x00310607, // n0x1cfd c0x0000 (---------------) + I donetsk + 0x002da802, // n0x1cfe c0x0000 (---------------) + I dp + 0x002349c3, // n0x1cff c0x0000 (---------------) + I edu + 0x00275003, // n0x1d00 c0x0000 (---------------) + I gov + 0x00200f02, // n0x1d01 c0x0000 (---------------) + I if + 0x002020c2, // n0x1d02 c0x0000 (---------------) + I in + 0x0023890f, // n0x1d03 c0x0000 (---------------) + I ivano-frankivsk + 0x00200a02, // n0x1d04 c0x0000 (---------------) + I kh + 0x00338dc7, // n0x1d05 c0x0000 (---------------) + I kharkiv + 0x00376907, // n0x1d06 c0x0000 (---------------) + I kharkov + 0x0022ef87, // n0x1d07 c0x0000 (---------------) + I kherson + 0x00238c8c, // n0x1d08 c0x0000 (---------------) + I khmelnitskiy + 0x0023ac0c, // n0x1d09 c0x0000 (---------------) + I khmelnytskyi + 0x00203144, // n0x1d0a c0x0000 (---------------) + I kiev + 0x0027614a, // n0x1d0b c0x0000 (---------------) + I kirovograd + 0x0022ccc2, // n0x1d0c c0x0000 (---------------) + I km + 0x002076c2, // n0x1d0d c0x0000 (---------------) + I kr + 0x002ab884, // n0x1d0e c0x0000 (---------------) + I krym + 0x00229bc2, // n0x1d0f c0x0000 (---------------) + I ks + 0x002b6542, // n0x1d10 c0x0000 (---------------) + I kv + 0x0023ae44, // n0x1d11 c0x0000 (---------------) + I kyiv + 0x00217282, // n0x1d12 c0x0000 (---------------) + I lg + 0x00208bc2, // n0x1d13 c0x0000 (---------------) + I lt + 0x00394507, // n0x1d14 c0x0000 (---------------) + I lugansk + 0x00338cc5, // n0x1d15 c0x0000 (---------------) + I lutsk + 0x00207302, // n0x1d16 c0x0000 (---------------) + I lv + 0x00238884, // n0x1d17 c0x0000 (---------------) + I lviv + 0x00365542, // n0x1d18 c0x0000 (---------------) + I mk + 0x003054c8, // n0x1d19 c0x0000 (---------------) + I mykolaiv + 0x0021d8c3, // n0x1d1a c0x0000 (---------------) + I net + 0x0020aac8, // n0x1d1b c0x0000 (---------------) + I nikolaev + 0x00200a82, // n0x1d1c c0x0000 (---------------) + I od + 0x00236385, // n0x1d1d c0x0000 (---------------) + I odesa + 0x0036f106, // n0x1d1e c0x0000 (---------------) + I odessa + 0x00229a83, // n0x1d1f c0x0000 (---------------) + I org + 0x00206582, // n0x1d20 c0x0000 (---------------) + I pl + 0x002d7e07, // n0x1d21 c0x0000 (---------------) + I poltava + 0x000099c2, // n0x1d22 c0x0000 (---------------) + pp + 0x002db285, // n0x1d23 c0x0000 (---------------) + I rivne + 0x00200cc5, // n0x1d24 c0x0000 (---------------) + I rovno + 0x00206a42, // n0x1d25 c0x0000 (---------------) + I rv + 0x00229a02, // n0x1d26 c0x0000 (---------------) + I sb + 0x00300bca, // n0x1d27 c0x0000 (---------------) + I sebastopol + 0x0024a08a, // n0x1d28 c0x0000 (---------------) + I sevastopol + 0x00215b02, // n0x1d29 c0x0000 (---------------) + I sm + 0x002f2c84, // n0x1d2a c0x0000 (---------------) + I sumy + 0x002012c2, // n0x1d2b c0x0000 (---------------) + I te + 0x00208fc8, // n0x1d2c c0x0000 (---------------) + I ternopil + 0x00211f02, // n0x1d2d c0x0000 (---------------) + I uz + 0x00294588, // n0x1d2e c0x0000 (---------------) + I uzhgorod + 0x002ebc47, // n0x1d2f c0x0000 (---------------) + I vinnica + 0x002ec4c9, // n0x1d30 c0x0000 (---------------) + I vinnytsia + 0x00200d42, // n0x1d31 c0x0000 (---------------) + I vn + 0x002f3105, // n0x1d32 c0x0000 (---------------) + I volyn + 0x00270085, // n0x1d33 c0x0000 (---------------) + I yalta + 0x002c010b, // n0x1d34 c0x0000 (---------------) + I zaporizhzhe + 0x002c0b4c, // n0x1d35 c0x0000 (---------------) + I zaporizhzhia + 0x0022b248, // n0x1d36 c0x0000 (---------------) + I zhitomir + 0x002f34c8, // n0x1d37 c0x0000 (---------------) + I zhytomyr + 0x00252242, // n0x1d38 c0x0000 (---------------) + I zp + 0x0020a3c2, // n0x1d39 c0x0000 (---------------) + I zt + 0x00205882, // n0x1d3a c0x0000 (---------------) + I ac + 0x000f5248, // n0x1d3b c0x0000 (---------------) + blogspot + 0x00208182, // n0x1d3c c0x0000 (---------------) + I co + 0x0022edc3, // n0x1d3d c0x0000 (---------------) + I com + 0x00208502, // n0x1d3e c0x0000 (---------------) + I go + 0x00203282, // n0x1d3f c0x0000 (---------------) + I ne + 0x00200282, // n0x1d40 c0x0000 (---------------) + I or + 0x00229a83, // n0x1d41 c0x0000 (---------------) + I org + 0x002024c2, // n0x1d42 c0x0000 (---------------) + I sc + 0x00205882, // n0x1d43 c0x0000 (---------------) + I ac + 0x53a08182, // n0x1d44 c0x014e (n0x1d4e-n0x1d4f) + I co + 0x53e75003, // n0x1d45 c0x014f (n0x1d4f-n0x1d50) + I gov + 0x00342703, // n0x1d46 c0x0000 (---------------) + I ltd + 0x00202302, // n0x1d47 c0x0000 (---------------) + I me + 0x0021d8c3, // n0x1d48 c0x0000 (---------------) + I net + 0x00207e83, // n0x1d49 c0x0000 (---------------) + I nhs + 0x00229a83, // n0x1d4a c0x0000 (---------------) + I org + 0x002d4b03, // n0x1d4b c0x0000 (---------------) + I plc + 0x002210c6, // n0x1d4c c0x0000 (---------------) + I police + 0x01615d43, // n0x1d4d c0x0005 (---------------)* o I sch + 0x000f5248, // n0x1d4e c0x0000 (---------------) + blogspot + 0x000069c7, // n0x1d4f c0x0000 (---------------) + service + 0x546009c2, // n0x1d50 c0x0151 (n0x1d8f-n0x1d92) + I ak + 0x54a001c2, // n0x1d51 c0x0152 (n0x1d92-n0x1d95) + I al + 0x54e011c2, // n0x1d52 c0x0153 (n0x1d95-n0x1d98) + I ar + 0x55202002, // n0x1d53 c0x0154 (n0x1d98-n0x1d9b) + I as + 0x55612502, // n0x1d54 c0x0155 (n0x1d9b-n0x1d9e) + I az + 0x55a00302, // n0x1d55 c0x0156 (n0x1d9e-n0x1da1) + I ca + 0x55e08182, // n0x1d56 c0x0157 (n0x1da1-n0x1da4) + I co + 0x5621e002, // n0x1d57 c0x0158 (n0x1da4-n0x1da7) + I ct + 0x5661d602, // n0x1d58 c0x0159 (n0x1da7-n0x1daa) + I dc + 0x56a00402, // n0x1d59 c0x015a (n0x1daa-n0x1dad) + I de + 0x0026b203, // n0x1d5a c0x0000 (---------------) + I dni + 0x00200383, // n0x1d5b c0x0000 (---------------) + I fed + 0x56e03802, // n0x1d5c c0x015b (n0x1dad-n0x1db0) + I fl + 0x572006c2, // n0x1d5d c0x015c (n0x1db0-n0x1db3) + I ga + 0x57605a82, // n0x1d5e c0x015d (n0x1db3-n0x1db6) + I gu + 0x57a02082, // n0x1d5f c0x015e (n0x1db6-n0x1db8) + I hi + 0x57e0e182, // n0x1d60 c0x015f (n0x1db8-n0x1dbb) + I ia + 0x58205d82, // n0x1d61 c0x0160 (n0x1dbb-n0x1dbe) + I id + 0x58602f82, // n0x1d62 c0x0161 (n0x1dbe-n0x1dc1) + I il + 0x58a020c2, // n0x1d63 c0x0162 (n0x1dc1-n0x1dc4) + I in + 0x000aa745, // n0x1d64 c0x0000 (---------------) + is-by + 0x00222783, // n0x1d65 c0x0000 (---------------) + I isa + 0x00283944, // n0x1d66 c0x0000 (---------------) + I kids + 0x58e29bc2, // n0x1d67 c0x0163 (n0x1dc4-n0x1dc7) + I ks + 0x5923ae42, // n0x1d68 c0x0164 (n0x1dc7-n0x1dca) + I ky + 0x59603842, // n0x1d69 c0x0165 (n0x1dca-n0x1dcd) + I la + 0x0007b84b, // n0x1d6a c0x0000 (---------------) + land-4-sale + 0x59a00182, // n0x1d6b c0x0166 (n0x1dcd-n0x1dd0) + I ma + 0x5a247ac2, // n0x1d6c c0x0168 (n0x1dd3-n0x1dd6) + I md + 0x5a602302, // n0x1d6d c0x0169 (n0x1dd6-n0x1dd9) + I me + 0x5aa0e5c2, // n0x1d6e c0x016a (n0x1dd9-n0x1ddc) + I mi + 0x5ae1d882, // n0x1d6f c0x016b (n0x1ddc-n0x1ddf) + I mn + 0x5b203ec2, // n0x1d70 c0x016c (n0x1ddf-n0x1de2) + I mo + 0x5b602482, // n0x1d71 c0x016d (n0x1de2-n0x1de5) + I ms + 0x5ba35702, // n0x1d72 c0x016e (n0x1de5-n0x1de8) + I mt + 0x5be03402, // n0x1d73 c0x016f (n0x1de8-n0x1deb) + I nc + 0x5c202642, // n0x1d74 c0x0170 (n0x1deb-n0x1ded) + I nd + 0x5c603282, // n0x1d75 c0x0171 (n0x1ded-n0x1df0) + I ne + 0x5ca07e82, // n0x1d76 c0x0172 (n0x1df0-n0x1df3) + I nh + 0x5ce01802, // n0x1d77 c0x0173 (n0x1df3-n0x1df6) + I nj + 0x5d22dc02, // n0x1d78 c0x0174 (n0x1df6-n0x1df9) + I nm + 0x0035d983, // n0x1d79 c0x0000 (---------------) + I nsn + 0x5d6021c2, // n0x1d7a c0x0175 (n0x1df9-n0x1dfc) + I nv + 0x5da18f82, // n0x1d7b c0x0176 (n0x1dfc-n0x1dff) + I ny + 0x5de059c2, // n0x1d7c c0x0177 (n0x1dff-n0x1e02) + I oh + 0x5e20bbc2, // n0x1d7d c0x0178 (n0x1e02-n0x1e05) + I ok + 0x5e600282, // n0x1d7e c0x0179 (n0x1e05-n0x1e08) + I or + 0x5ea0ec42, // n0x1d7f c0x017a (n0x1e08-n0x1e0b) + I pa + 0x5ee04382, // n0x1d80 c0x017b (n0x1e0b-n0x1e0e) + I pr + 0x5f201702, // n0x1d81 c0x017c (n0x1e0e-n0x1e11) + I ri + 0x5f6024c2, // n0x1d82 c0x017d (n0x1e11-n0x1e14) + I sc + 0x5fa56ec2, // n0x1d83 c0x017e (n0x1e14-n0x1e16) + I sd + 0x000e160c, // n0x1d84 c0x0000 (---------------) + stuff-4-sale + 0x5fe00942, // n0x1d85 c0x017f (n0x1e16-n0x1e19) + I tn + 0x6026bb42, // n0x1d86 c0x0180 (n0x1e19-n0x1e1c) + I tx + 0x60601f82, // n0x1d87 c0x0181 (n0x1e1c-n0x1e1f) + I ut + 0x60a000c2, // n0x1d88 c0x0182 (n0x1e1f-n0x1e22) + I va + 0x60e00642, // n0x1d89 c0x0183 (n0x1e22-n0x1e25) + I vi + 0x61255c42, // n0x1d8a c0x0184 (n0x1e25-n0x1e28) + I vt + 0x616010c2, // n0x1d8b c0x0185 (n0x1e28-n0x1e2b) + I wa + 0x61a02e42, // n0x1d8c c0x0186 (n0x1e2b-n0x1e2e) + I wi + 0x61e6e502, // n0x1d8d c0x0187 (n0x1e2e-n0x1e2f) + I wv + 0x6225d682, // n0x1d8e c0x0188 (n0x1e2f-n0x1e32) + I wy + 0x0021db82, // n0x1d8f c0x0000 (---------------) + I cc + 0x00324c03, // n0x1d90 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1d91 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1d92 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1d93 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1d94 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1d95 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1d96 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1d97 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1d98 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1d99 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1d9a c0x0000 (---------------) + I lib + 0x0021db82, // n0x1d9b c0x0000 (---------------) + I cc + 0x00324c03, // n0x1d9c c0x0000 (---------------) + I k12 + 0x00265503, // n0x1d9d c0x0000 (---------------) + I lib + 0x0021db82, // n0x1d9e c0x0000 (---------------) + I cc + 0x00324c03, // n0x1d9f c0x0000 (---------------) + I k12 + 0x00265503, // n0x1da0 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1da1 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1da2 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1da3 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1da4 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1da5 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1da6 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1da7 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1da8 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1da9 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1daa c0x0000 (---------------) + I cc + 0x00324c03, // n0x1dab c0x0000 (---------------) + I k12 + 0x00265503, // n0x1dac c0x0000 (---------------) + I lib + 0x0021db82, // n0x1dad c0x0000 (---------------) + I cc + 0x00324c03, // n0x1dae c0x0000 (---------------) + I k12 + 0x00265503, // n0x1daf c0x0000 (---------------) + I lib + 0x0021db82, // n0x1db0 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1db1 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1db2 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1db3 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1db4 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1db5 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1db6 c0x0000 (---------------) + I cc + 0x00265503, // n0x1db7 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1db8 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1db9 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1dba c0x0000 (---------------) + I lib + 0x0021db82, // n0x1dbb c0x0000 (---------------) + I cc + 0x00324c03, // n0x1dbc c0x0000 (---------------) + I k12 + 0x00265503, // n0x1dbd c0x0000 (---------------) + I lib + 0x0021db82, // n0x1dbe c0x0000 (---------------) + I cc + 0x00324c03, // n0x1dbf c0x0000 (---------------) + I k12 + 0x00265503, // n0x1dc0 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1dc1 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1dc2 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1dc3 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1dc4 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1dc5 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1dc6 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1dc7 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1dc8 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1dc9 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1dca c0x0000 (---------------) + I cc + 0x00324c03, // n0x1dcb c0x0000 (---------------) + I k12 + 0x00265503, // n0x1dcc c0x0000 (---------------) + I lib + 0x0021db82, // n0x1dcd c0x0000 (---------------) + I cc + 0x59f24c03, // n0x1dce c0x0167 (n0x1dd0-n0x1dd3) + I k12 + 0x00265503, // n0x1dcf c0x0000 (---------------) + I lib + 0x003120c4, // n0x1dd0 c0x0000 (---------------) + I chtr + 0x0026fac6, // n0x1dd1 c0x0000 (---------------) + I paroch + 0x002def03, // n0x1dd2 c0x0000 (---------------) + I pvt + 0x0021db82, // n0x1dd3 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1dd4 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1dd5 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1dd6 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1dd7 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1dd8 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1dd9 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1dda c0x0000 (---------------) + I k12 + 0x00265503, // n0x1ddb c0x0000 (---------------) + I lib + 0x0021db82, // n0x1ddc c0x0000 (---------------) + I cc + 0x00324c03, // n0x1ddd c0x0000 (---------------) + I k12 + 0x00265503, // n0x1dde c0x0000 (---------------) + I lib + 0x0021db82, // n0x1ddf c0x0000 (---------------) + I cc + 0x00324c03, // n0x1de0 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1de1 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1de2 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1de3 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1de4 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1de5 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1de6 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1de7 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1de8 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1de9 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1dea c0x0000 (---------------) + I lib + 0x0021db82, // n0x1deb c0x0000 (---------------) + I cc + 0x00265503, // n0x1dec c0x0000 (---------------) + I lib + 0x0021db82, // n0x1ded c0x0000 (---------------) + I cc + 0x00324c03, // n0x1dee c0x0000 (---------------) + I k12 + 0x00265503, // n0x1def c0x0000 (---------------) + I lib + 0x0021db82, // n0x1df0 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1df1 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1df2 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1df3 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1df4 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1df5 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1df6 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1df7 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1df8 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1df9 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1dfa c0x0000 (---------------) + I k12 + 0x00265503, // n0x1dfb c0x0000 (---------------) + I lib + 0x0021db82, // n0x1dfc c0x0000 (---------------) + I cc + 0x00324c03, // n0x1dfd c0x0000 (---------------) + I k12 + 0x00265503, // n0x1dfe c0x0000 (---------------) + I lib + 0x0021db82, // n0x1dff c0x0000 (---------------) + I cc + 0x00324c03, // n0x1e00 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1e01 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1e02 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1e03 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1e04 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1e05 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1e06 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1e07 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1e08 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1e09 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1e0a c0x0000 (---------------) + I lib + 0x0021db82, // n0x1e0b c0x0000 (---------------) + I cc + 0x00324c03, // n0x1e0c c0x0000 (---------------) + I k12 + 0x00265503, // n0x1e0d c0x0000 (---------------) + I lib + 0x0021db82, // n0x1e0e c0x0000 (---------------) + I cc + 0x00324c03, // n0x1e0f c0x0000 (---------------) + I k12 + 0x00265503, // n0x1e10 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1e11 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1e12 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1e13 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1e14 c0x0000 (---------------) + I cc + 0x00265503, // n0x1e15 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1e16 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1e17 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1e18 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1e19 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1e1a c0x0000 (---------------) + I k12 + 0x00265503, // n0x1e1b c0x0000 (---------------) + I lib + 0x0021db82, // n0x1e1c c0x0000 (---------------) + I cc + 0x00324c03, // n0x1e1d c0x0000 (---------------) + I k12 + 0x00265503, // n0x1e1e c0x0000 (---------------) + I lib + 0x0021db82, // n0x1e1f c0x0000 (---------------) + I cc + 0x00324c03, // n0x1e20 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1e21 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1e22 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1e23 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1e24 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1e25 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1e26 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1e27 c0x0000 (---------------) + I lib + 0x0021db82, // n0x1e28 c0x0000 (---------------) + I cc + 0x00324c03, // n0x1e29 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1e2a c0x0000 (---------------) + I lib + 0x0021db82, // n0x1e2b c0x0000 (---------------) + I cc + 0x00324c03, // n0x1e2c c0x0000 (---------------) + I k12 + 0x00265503, // n0x1e2d c0x0000 (---------------) + I lib + 0x0021db82, // n0x1e2e c0x0000 (---------------) + I cc + 0x0021db82, // n0x1e2f c0x0000 (---------------) + I cc + 0x00324c03, // n0x1e30 c0x0000 (---------------) + I k12 + 0x00265503, // n0x1e31 c0x0000 (---------------) + I lib + 0x62a2edc3, // n0x1e32 c0x018a (n0x1e38-n0x1e39) + I com + 0x002349c3, // n0x1e33 c0x0000 (---------------) + I edu + 0x0024d643, // n0x1e34 c0x0000 (---------------) + I gub + 0x00215b43, // n0x1e35 c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x1e36 c0x0000 (---------------) + I net + 0x00229a83, // n0x1e37 c0x0000 (---------------) + I org + 0x000f5248, // n0x1e38 c0x0000 (---------------) + blogspot + 0x00208182, // n0x1e39 c0x0000 (---------------) + I co + 0x0022edc3, // n0x1e3a c0x0000 (---------------) + I com + 0x0021d8c3, // n0x1e3b c0x0000 (---------------) + I net + 0x00229a83, // n0x1e3c c0x0000 (---------------) + I org + 0x0022edc3, // n0x1e3d c0x0000 (---------------) + I com + 0x002349c3, // n0x1e3e c0x0000 (---------------) + I edu + 0x00275003, // n0x1e3f c0x0000 (---------------) + I gov + 0x00215b43, // n0x1e40 c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x1e41 c0x0000 (---------------) + I net + 0x00229a83, // n0x1e42 c0x0000 (---------------) + I org + 0x00243984, // n0x1e43 c0x0000 (---------------) + I arts + 0x00208182, // n0x1e44 c0x0000 (---------------) + I co + 0x0022edc3, // n0x1e45 c0x0000 (---------------) + I com + 0x0022dec3, // n0x1e46 c0x0000 (---------------) + I e12 + 0x002349c3, // n0x1e47 c0x0000 (---------------) + I edu + 0x00247a04, // n0x1e48 c0x0000 (---------------) + I firm + 0x00209f03, // n0x1e49 c0x0000 (---------------) + I gob + 0x00275003, // n0x1e4a c0x0000 (---------------) + I gov + 0x0038a144, // n0x1e4b c0x0000 (---------------) + I info + 0x0026f683, // n0x1e4c c0x0000 (---------------) + I int + 0x00215b43, // n0x1e4d c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x1e4e c0x0000 (---------------) + I net + 0x00229a83, // n0x1e4f c0x0000 (---------------) + I org + 0x00226f03, // n0x1e50 c0x0000 (---------------) + I rec + 0x0038c985, // n0x1e51 c0x0000 (---------------) + I store + 0x002a3c43, // n0x1e52 c0x0000 (---------------) + I tec + 0x0021fa83, // n0x1e53 c0x0000 (---------------) + I web + 0x00208182, // n0x1e54 c0x0000 (---------------) + I co + 0x0022edc3, // n0x1e55 c0x0000 (---------------) + I com + 0x00324c03, // n0x1e56 c0x0000 (---------------) + I k12 + 0x0021d8c3, // n0x1e57 c0x0000 (---------------) + I net + 0x00229a83, // n0x1e58 c0x0000 (---------------) + I org + 0x00205882, // n0x1e59 c0x0000 (---------------) + I ac + 0x0030a143, // n0x1e5a c0x0000 (---------------) + I biz + 0x000f5248, // n0x1e5b c0x0000 (---------------) + blogspot + 0x0022edc3, // n0x1e5c c0x0000 (---------------) + I com + 0x002349c3, // n0x1e5d c0x0000 (---------------) + I edu + 0x00275003, // n0x1e5e c0x0000 (---------------) + I gov + 0x002a51c6, // n0x1e5f c0x0000 (---------------) + I health + 0x0038a144, // n0x1e60 c0x0000 (---------------) + I info + 0x0026f683, // n0x1e61 c0x0000 (---------------) + I int + 0x0027ca84, // n0x1e62 c0x0000 (---------------) + I name + 0x0021d8c3, // n0x1e63 c0x0000 (---------------) + I net + 0x00229a83, // n0x1e64 c0x0000 (---------------) + I org + 0x00220283, // n0x1e65 c0x0000 (---------------) + I pro + 0x0022edc3, // n0x1e66 c0x0000 (---------------) + I com + 0x002349c3, // n0x1e67 c0x0000 (---------------) + I edu + 0x0021d8c3, // n0x1e68 c0x0000 (---------------) + I net + 0x00229a83, // n0x1e69 c0x0000 (---------------) + I org + 0x0022edc3, // n0x1e6a c0x0000 (---------------) + I com + 0x00011a06, // n0x1e6b c0x0000 (---------------) + dyndns + 0x002349c3, // n0x1e6c c0x0000 (---------------) + I edu + 0x00275003, // n0x1e6d c0x0000 (---------------) + I gov + 0x000f2d06, // n0x1e6e c0x0000 (---------------) + mypets + 0x0021d8c3, // n0x1e6f c0x0000 (---------------) + I net + 0x00229a83, // n0x1e70 c0x0000 (---------------) + I org + 0x00303f08, // n0x1e71 c0x0000 (---------------) + I xn--80au + 0x0030b909, // n0x1e72 c0x0000 (---------------) + I xn--90azh + 0x00318289, // n0x1e73 c0x0000 (---------------) + I xn--c1avg + 0x00325088, // n0x1e74 c0x0000 (---------------) + I xn--d1at + 0x003710c8, // n0x1e75 c0x0000 (---------------) + I xn--o1ac + 0x003710c9, // n0x1e76 c0x0000 (---------------) + I xn--o1ach + 0x00205882, // n0x1e77 c0x0000 (---------------) + I ac + 0x00379506, // n0x1e78 c0x0000 (---------------) + I agrica + 0x00209243, // n0x1e79 c0x0000 (---------------) + I alt + 0x65208182, // n0x1e7a c0x0194 (n0x1e88-n0x1e89) + I co + 0x002349c3, // n0x1e7b c0x0000 (---------------) + I edu + 0x00275003, // n0x1e7c c0x0000 (---------------) + I gov + 0x002a6f87, // n0x1e7d c0x0000 (---------------) + I grondar + 0x00209183, // n0x1e7e c0x0000 (---------------) + I law + 0x00215b43, // n0x1e7f c0x0000 (---------------) + I mil + 0x0021d8c3, // n0x1e80 c0x0000 (---------------) + I net + 0x002084c3, // n0x1e81 c0x0000 (---------------) + I ngo + 0x002123c3, // n0x1e82 c0x0000 (---------------) + I nis + 0x0020e543, // n0x1e83 c0x0000 (---------------) + I nom + 0x00229a83, // n0x1e84 c0x0000 (---------------) + I org + 0x00231d06, // n0x1e85 c0x0000 (---------------) + I school + 0x00200142, // n0x1e86 c0x0000 (---------------) + I tm + 0x0021fa83, // n0x1e87 c0x0000 (---------------) + I web + 0x000f5248, // n0x1e88 c0x0000 (---------------) + blogspot +} + +// children is the list of nodes' children, the parent's wildcard bit and the +// parent's node type. If a node has no children then their children index +// will be in the range [0, 6), depending on the wildcard bit and node type. +// +// The layout within the uint32, from MSB to LSB, is: +// [ 1 bits] unused +// [ 1 bits] wildcard bit +// [ 2 bits] node type +// [14 bits] high nodes index (exclusive) of children +// [14 bits] low nodes index (inclusive) of children +var children = [...]uint32{ + 0x00000000, // c0x0000 (---------------) + + 0x10000000, // c0x0001 (---------------) ! + 0x20000000, // c0x0002 (---------------) o + 0x40000000, // c0x0003 (---------------)* + + 0x50000000, // c0x0004 (---------------)* ! + 0x60000000, // c0x0005 (---------------)* o + 0x017f05f6, // c0x0006 (n0x05f6-n0x05fc) + + 0x017f45fc, // c0x0007 (n0x05fc-n0x05fd) + + 0x018145fd, // c0x0008 (n0x05fd-n0x0605) + + 0x01978605, // c0x0009 (n0x0605-n0x065e) + + 0x0198c65e, // c0x000a (n0x065e-n0x0663) + + 0x019a0663, // c0x000b (n0x0663-n0x0668) + + 0x019b0668, // c0x000c (n0x0668-n0x066c) + + 0x019cc66c, // c0x000d (n0x066c-n0x0673) + + 0x019d0673, // c0x000e (n0x0673-n0x0674) + + 0x019e0674, // c0x000f (n0x0674-n0x0678) + + 0x019f8678, // c0x0010 (n0x0678-n0x067e) + + 0x01a1c67e, // c0x0011 (n0x067e-n0x0687) + + 0x01a20687, // c0x0012 (n0x0687-n0x0688) + + 0x01a38688, // c0x0013 (n0x0688-n0x068e) + + 0x01a3c68e, // c0x0014 (n0x068e-n0x068f) + + 0x01a5868f, // c0x0015 (n0x068f-n0x0696) + + 0x01a5c696, // c0x0016 (n0x0696-n0x0697) + + 0x01aa4697, // c0x0017 (n0x0697-n0x06a9) + + 0x01aa86a9, // c0x0018 (n0x06a9-n0x06aa) + + 0x01ac86aa, // c0x0019 (n0x06aa-n0x06b2) + + 0x01adc6b2, // c0x001a (n0x06b2-n0x06b7) + + 0x01ae06b7, // c0x001b (n0x06b7-n0x06b8) + + 0x01b106b8, // c0x001c (n0x06b8-n0x06c4) + + 0x01b3c6c4, // c0x001d (n0x06c4-n0x06cf) + + 0x01b646cf, // c0x001e (n0x06cf-n0x06d9) + + 0x01b6c6d9, // c0x001f (n0x06d9-n0x06db) + + 0x01b706db, // c0x0020 (n0x06db-n0x06dc) + + 0x01c046dc, // c0x0021 (n0x06dc-n0x0701) + + 0x01c18701, // c0x0022 (n0x0701-n0x0706) + + 0x01c2c706, // c0x0023 (n0x0706-n0x070b) + + 0x01c4870b, // c0x0024 (n0x070b-n0x0712) + + 0x01c58712, // c0x0025 (n0x0712-n0x0716) + + 0x01c6c716, // c0x0026 (n0x0716-n0x071b) + + 0x01c9071b, // c0x0027 (n0x071b-n0x0724) + + 0x01da8724, // c0x0028 (n0x0724-n0x076a) + + 0x01dac76a, // c0x0029 (n0x076a-n0x076b) + + 0x01dc076b, // c0x002a (n0x076b-n0x0770) + + 0x01dd4770, // c0x002b (n0x0770-n0x0775) + + 0x01ddc775, // c0x002c (n0x0775-n0x0777) + + 0x01dec777, // c0x002d (n0x0777-n0x077b) + + 0x01df077b, // c0x002e (n0x077b-n0x077c) + + 0x01e0877c, // c0x002f (n0x077c-n0x0782) + + 0x01e4c782, // c0x0030 (n0x0782-n0x0793) + + 0x01e5c793, // c0x0031 (n0x0793-n0x0797) + + 0x01e60797, // c0x0032 (n0x0797-n0x0798) + + 0x01e64798, // c0x0033 (n0x0798-n0x0799) + + 0x01e68799, // c0x0034 (n0x0799-n0x079a) + + 0x01ea479a, // c0x0035 (n0x079a-n0x07a9) + + 0x61ea87a9, // c0x0036 (n0x07a9-n0x07aa)* o + 0x01ebc7aa, // c0x0037 (n0x07aa-n0x07af) + + 0x01ecc7af, // c0x0038 (n0x07af-n0x07b3) + + 0x01f807b3, // c0x0039 (n0x07b3-n0x07e0) + + 0x21f847e0, // c0x003a (n0x07e0-n0x07e1) o + 0x01f887e1, // c0x003b (n0x07e1-n0x07e2) + + 0x01f8c7e2, // c0x003c (n0x07e2-n0x07e3) + + 0x21f907e3, // c0x003d (n0x07e3-n0x07e4) o + 0x21f947e4, // c0x003e (n0x07e4-n0x07e5) o + 0x01fc87e5, // c0x003f (n0x07e5-n0x07f2) + + 0x01fcc7f2, // c0x0040 (n0x07f2-n0x07f3) + + 0x022fc7f3, // c0x0041 (n0x07f3-n0x08bf) + + 0x223448bf, // c0x0042 (n0x08bf-n0x08d1) o + 0x023688d1, // c0x0043 (n0x08d1-n0x08da) + + 0x023708da, // c0x0044 (n0x08da-n0x08dc) + + 0x223748dc, // c0x0045 (n0x08dc-n0x08dd) o + 0x023908dd, // c0x0046 (n0x08dd-n0x08e4) + + 0x023a88e4, // c0x0047 (n0x08e4-n0x08ea) + + 0x023ac8ea, // c0x0048 (n0x08ea-n0x08eb) + + 0x023bc8eb, // c0x0049 (n0x08eb-n0x08ef) + + 0x023c48ef, // c0x004a (n0x08ef-n0x08f1) + + 0x223f88f1, // c0x004b (n0x08f1-n0x08fe) o + 0x023fc8fe, // c0x004c (n0x08fe-n0x08ff) + + 0x024008ff, // c0x004d (n0x08ff-n0x0900) + + 0x02420900, // c0x004e (n0x0900-n0x0908) + + 0x02424908, // c0x004f (n0x0908-n0x0909) + + 0x02438909, // c0x0050 (n0x0909-n0x090e) + + 0x0246090e, // c0x0051 (n0x090e-n0x0918) + + 0x02480918, // c0x0052 (n0x0918-n0x0920) + + 0x024b0920, // c0x0053 (n0x0920-n0x092c) + + 0x024d892c, // c0x0054 (n0x092c-n0x0936) + + 0x024dc936, // c0x0055 (n0x0936-n0x0937) + + 0x02500937, // c0x0056 (n0x0937-n0x0940) + + 0x02504940, // c0x0057 (n0x0940-n0x0941) + + 0x02518941, // c0x0058 (n0x0941-n0x0946) + + 0x0251c946, // c0x0059 (n0x0946-n0x0947) + + 0x0253c947, // c0x005a (n0x0947-n0x094f) + + 0x0254894f, // c0x005b (n0x094f-n0x0952) + + 0x025a8952, // c0x005c (n0x0952-n0x096a) + + 0x025c496a, // c0x005d (n0x096a-n0x0971) + + 0x025d0971, // c0x005e (n0x0971-n0x0974) + + 0x025e4974, // c0x005f (n0x0974-n0x0979) + + 0x025fc979, // c0x0060 (n0x0979-n0x097f) + + 0x0261097f, // c0x0061 (n0x097f-n0x0984) + + 0x02628984, // c0x0062 (n0x0984-n0x098a) + + 0x0264098a, // c0x0063 (n0x098a-n0x0990) + + 0x02658990, // c0x0064 (n0x0990-n0x0996) + + 0x02674996, // c0x0065 (n0x0996-n0x099d) + + 0x0268099d, // c0x0066 (n0x099d-n0x09a0) + + 0x026e09a0, // c0x0067 (n0x09a0-n0x09b8) + + 0x026f89b8, // c0x0068 (n0x09b8-n0x09be) + + 0x0270c9be, // c0x0069 (n0x09be-n0x09c3) + + 0x027509c3, // c0x006a (n0x09c3-n0x09d4) + + 0x027d09d4, // c0x006b (n0x09d4-n0x09f4) + + 0x027fc9f4, // c0x006c (n0x09f4-n0x09ff) + + 0x028009ff, // c0x006d (n0x09ff-n0x0a00) + + 0x02808a00, // c0x006e (n0x0a00-n0x0a02) + + 0x02828a02, // c0x006f (n0x0a02-n0x0a0a) + + 0x0282ca0a, // c0x0070 (n0x0a0a-n0x0a0b) + + 0x02848a0b, // c0x0071 (n0x0a0b-n0x0a12) + + 0x02850a12, // c0x0072 (n0x0a12-n0x0a14) + + 0x02884a14, // c0x0073 (n0x0a14-n0x0a21) + + 0x028aca21, // c0x0074 (n0x0a21-n0x0a2b) + + 0x028b0a2b, // c0x0075 (n0x0a2b-n0x0a2c) + + 0x028c4a2c, // c0x0076 (n0x0a2c-n0x0a31) + + 0x028dca31, // c0x0077 (n0x0a31-n0x0a37) + + 0x02900a37, // c0x0078 (n0x0a37-n0x0a40) + + 0x02920a40, // c0x0079 (n0x0a40-n0x0a48) + + 0x02ee4a48, // c0x007a (n0x0a48-n0x0bb9) + + 0x02ef0bb9, // c0x007b (n0x0bb9-n0x0bbc) + + 0x02f10bbc, // c0x007c (n0x0bbc-n0x0bc4) + + 0x030ccbc4, // c0x007d (n0x0bc4-n0x0c33) + + 0x0319cc33, // c0x007e (n0x0c33-n0x0c67) + + 0x0320cc67, // c0x007f (n0x0c67-n0x0c83) + + 0x03264c83, // c0x0080 (n0x0c83-n0x0c99) + + 0x0334cc99, // c0x0081 (n0x0c99-n0x0cd3) + + 0x033a4cd3, // c0x0082 (n0x0cd3-n0x0ce9) + + 0x033e0ce9, // c0x0083 (n0x0ce9-n0x0cf8) + + 0x034dccf8, // c0x0084 (n0x0cf8-n0x0d37) + + 0x035a8d37, // c0x0085 (n0x0d37-n0x0d6a) + + 0x03640d6a, // c0x0086 (n0x0d6a-n0x0d90) + + 0x036d0d90, // c0x0087 (n0x0d90-n0x0db4) + + 0x03734db4, // c0x0088 (n0x0db4-n0x0dcd) + + 0x0396cdcd, // c0x0089 (n0x0dcd-n0x0e5b) + + 0x03a24e5b, // c0x008a (n0x0e5b-n0x0e89) + + 0x03af0e89, // c0x008b (n0x0e89-n0x0ebc) + + 0x03b3cebc, // c0x008c (n0x0ebc-n0x0ecf) + + 0x03bc4ecf, // c0x008d (n0x0ecf-n0x0ef1) + + 0x03c00ef1, // c0x008e (n0x0ef1-n0x0f00) + + 0x03c50f00, // c0x008f (n0x0f00-n0x0f14) + + 0x03cc8f14, // c0x0090 (n0x0f14-n0x0f32) + + 0x63cccf32, // c0x0091 (n0x0f32-n0x0f33)* o + 0x63cd0f33, // c0x0092 (n0x0f33-n0x0f34)* o + 0x63cd4f34, // c0x0093 (n0x0f34-n0x0f35)* o + 0x03d50f35, // c0x0094 (n0x0f35-n0x0f54) + + 0x03db8f54, // c0x0095 (n0x0f54-n0x0f6e) + + 0x03e34f6e, // c0x0096 (n0x0f6e-n0x0f8d) + + 0x03eacf8d, // c0x0097 (n0x0f8d-n0x0fab) + + 0x03f30fab, // c0x0098 (n0x0fab-n0x0fcc) + + 0x03f9cfcc, // c0x0099 (n0x0fcc-n0x0fe7) + + 0x040c8fe7, // c0x009a (n0x0fe7-n0x1032) + + 0x04121032, // c0x009b (n0x1032-n0x1048) + + 0x64125048, // c0x009c (n0x1048-n0x1049)* o + 0x041bd049, // c0x009d (n0x1049-n0x106f) + + 0x0424506f, // c0x009e (n0x106f-n0x1091) + + 0x04291091, // c0x009f (n0x1091-n0x10a4) + + 0x042f90a4, // c0x00a0 (n0x10a4-n0x10be) + + 0x043a10be, // c0x00a1 (n0x10be-n0x10e8) + + 0x044690e8, // c0x00a2 (n0x10e8-n0x111a) + + 0x044d111a, // c0x00a3 (n0x111a-n0x1134) + + 0x045e5134, // c0x00a4 (n0x1134-n0x1179) + + 0x645e9179, // c0x00a5 (n0x1179-n0x117a)* o + 0x645ed17a, // c0x00a6 (n0x117a-n0x117b)* o + 0x0464917b, // c0x00a7 (n0x117b-n0x1192) + + 0x046a5192, // c0x00a8 (n0x1192-n0x11a9) + + 0x047351a9, // c0x00a9 (n0x11a9-n0x11cd) + + 0x047b11cd, // c0x00aa (n0x11cd-n0x11ec) + + 0x047f51ec, // c0x00ab (n0x11ec-n0x11fd) + + 0x048d91fd, // c0x00ac (n0x11fd-n0x1236) + + 0x0490d236, // c0x00ad (n0x1236-n0x1243) + + 0x0496d243, // c0x00ae (n0x1243-n0x125b) + + 0x049e125b, // c0x00af (n0x125b-n0x1278) + + 0x04a69278, // c0x00b0 (n0x1278-n0x129a) + + 0x04aa929a, // c0x00b1 (n0x129a-n0x12aa) + + 0x04b192aa, // c0x00b2 (n0x12aa-n0x12c6) + + 0x64b1d2c6, // c0x00b3 (n0x12c6-n0x12c7)* o + 0x64b212c7, // c0x00b4 (n0x12c7-n0x12c8)* o + 0x24b252c8, // c0x00b5 (n0x12c8-n0x12c9) o + 0x04b3d2c9, // c0x00b6 (n0x12c9-n0x12cf) + + 0x04b592cf, // c0x00b7 (n0x12cf-n0x12d6) + + 0x04b9d2d6, // c0x00b8 (n0x12d6-n0x12e7) + + 0x04bad2e7, // c0x00b9 (n0x12e7-n0x12eb) + + 0x04bc52eb, // c0x00ba (n0x12eb-n0x12f1) + + 0x04c3d2f1, // c0x00bb (n0x12f1-n0x130f) + + 0x04c5130f, // c0x00bc (n0x130f-n0x1314) + + 0x04c69314, // c0x00bd (n0x1314-n0x131a) + + 0x04c8d31a, // c0x00be (n0x131a-n0x1323) + + 0x04ca1323, // c0x00bf (n0x1323-n0x1328) + + 0x04cb9328, // c0x00c0 (n0x1328-n0x132e) + + 0x04cbd32e, // c0x00c1 (n0x132e-n0x132f) + + 0x04cf932f, // c0x00c2 (n0x132f-n0x133e) + + 0x04d0d33e, // c0x00c3 (n0x133e-n0x1343) + + 0x04d15343, // c0x00c4 (n0x1343-n0x1345) + + 0x04d1d345, // c0x00c5 (n0x1345-n0x1347) + + 0x04d21347, // c0x00c6 (n0x1347-n0x1348) + + 0x04d45348, // c0x00c7 (n0x1348-n0x1351) + + 0x04d69351, // c0x00c8 (n0x1351-n0x135a) + + 0x04d8135a, // c0x00c9 (n0x135a-n0x1360) + + 0x04d89360, // c0x00ca (n0x1360-n0x1362) + + 0x04d8d362, // c0x00cb (n0x1362-n0x1363) + + 0x04dad363, // c0x00cc (n0x1363-n0x136b) + + 0x04dd136b, // c0x00cd (n0x136b-n0x1374) + + 0x04df1374, // c0x00ce (n0x1374-n0x137c) + + 0x04e0d37c, // c0x00cf (n0x137c-n0x1383) + + 0x04e1d383, // c0x00d0 (n0x1383-n0x1387) + + 0x04e31387, // c0x00d1 (n0x1387-n0x138c) + + 0x04e3938c, // c0x00d2 (n0x138c-n0x138e) + + 0x04e4d38e, // c0x00d3 (n0x138e-n0x1393) + + 0x04e5d393, // c0x00d4 (n0x1393-n0x1397) + + 0x04e61397, // c0x00d5 (n0x1397-n0x1398) + + 0x04e7d398, // c0x00d6 (n0x1398-n0x139f) + + 0x0570d39f, // c0x00d7 (n0x139f-n0x15c3) + + 0x057455c3, // c0x00d8 (n0x15c3-n0x15d1) + + 0x057715d1, // c0x00d9 (n0x15d1-n0x15dc) + + 0x057895dc, // c0x00da (n0x15dc-n0x15e2) + + 0x057a95e2, // c0x00db (n0x15e2-n0x15ea) + + 0x657ad5ea, // c0x00dc (n0x15ea-n0x15eb)* o + 0x057f15eb, // c0x00dd (n0x15eb-n0x15fc) + + 0x057f95fc, // c0x00de (n0x15fc-n0x15fe) + + 0x257fd5fe, // c0x00df (n0x15fe-n0x15ff) o + 0x258015ff, // c0x00e0 (n0x15ff-n0x1600) o + 0x05805600, // c0x00e1 (n0x1600-n0x1601) + + 0x058c9601, // c0x00e2 (n0x1601-n0x1632) + + 0x258cd632, // c0x00e3 (n0x1632-n0x1633) o + 0x258d5633, // c0x00e4 (n0x1633-n0x1635) o + 0x258dd635, // c0x00e5 (n0x1635-n0x1637) o + 0x258e9637, // c0x00e6 (n0x1637-n0x163a) o + 0x0591163a, // c0x00e7 (n0x163a-n0x1644) + + 0x05935644, // c0x00e8 (n0x1644-n0x164d) + + 0x0593964d, // c0x00e9 (n0x164d-n0x164e) + + 0x0594564e, // c0x00ea (n0x164e-n0x1651) + + 0x0649d651, // c0x00eb (n0x1651-n0x1927) + + 0x064a1927, // c0x00ec (n0x1927-n0x1928) + + 0x064a5928, // c0x00ed (n0x1928-n0x1929) + + 0x264a9929, // c0x00ee (n0x1929-n0x192a) o + 0x064ad92a, // c0x00ef (n0x192a-n0x192b) + + 0x264b192b, // c0x00f0 (n0x192b-n0x192c) o + 0x064b592c, // c0x00f1 (n0x192c-n0x192d) + + 0x264c192d, // c0x00f2 (n0x192d-n0x1930) o + 0x064c5930, // c0x00f3 (n0x1930-n0x1931) + + 0x064c9931, // c0x00f4 (n0x1931-n0x1932) + + 0x264cd932, // c0x00f5 (n0x1932-n0x1933) o + 0x064d1933, // c0x00f6 (n0x1933-n0x1934) + + 0x264d9934, // c0x00f7 (n0x1934-n0x1936) o + 0x064dd936, // c0x00f8 (n0x1936-n0x1937) + + 0x064e1937, // c0x00f9 (n0x1937-n0x1938) + + 0x264f1938, // c0x00fa (n0x1938-n0x193c) o + 0x064f593c, // c0x00fb (n0x193c-n0x193d) + + 0x064f993d, // c0x00fc (n0x193d-n0x193e) + + 0x064fd93e, // c0x00fd (n0x193e-n0x193f) + + 0x0650193f, // c0x00fe (n0x193f-n0x1940) + + 0x26505940, // c0x00ff (n0x1940-n0x1941) o + 0x06509941, // c0x0100 (n0x1941-n0x1942) + + 0x0650d942, // c0x0101 (n0x1942-n0x1943) + + 0x06511943, // c0x0102 (n0x1943-n0x1944) + + 0x06515944, // c0x0103 (n0x1944-n0x1945) + + 0x2651d945, // c0x0104 (n0x1945-n0x1947) o + 0x06521947, // c0x0105 (n0x1947-n0x1948) + + 0x06525948, // c0x0106 (n0x1948-n0x1949) + + 0x06529949, // c0x0107 (n0x1949-n0x194a) + + 0x2652d94a, // c0x0108 (n0x194a-n0x194b) o + 0x0653194b, // c0x0109 (n0x194b-n0x194c) + + 0x2653994c, // c0x010a (n0x194c-n0x194e) o + 0x2653d94e, // c0x010b (n0x194e-n0x194f) o + 0x0655994f, // c0x010c (n0x194f-n0x1956) + + 0x06565956, // c0x010d (n0x1956-n0x1959) + + 0x065a5959, // c0x010e (n0x1959-n0x1969) + + 0x065a9969, // c0x010f (n0x1969-n0x196a) + + 0x065cd96a, // c0x0110 (n0x196a-n0x1973) + + 0x066b9973, // c0x0111 (n0x1973-n0x19ae) + + 0x266c19ae, // c0x0112 (n0x19ae-n0x19b0) o + 0x266c59b0, // c0x0113 (n0x19b0-n0x19b1) o + 0x266c99b1, // c0x0114 (n0x19b1-n0x19b2) o + 0x066d19b2, // c0x0115 (n0x19b2-n0x19b4) + + 0x067ad9b4, // c0x0116 (n0x19b4-n0x19eb) + + 0x067d99eb, // c0x0117 (n0x19eb-n0x19f6) + + 0x067f99f6, // c0x0118 (n0x19f6-n0x19fe) + + 0x068059fe, // c0x0119 (n0x19fe-n0x1a01) + + 0x06825a01, // c0x011a (n0x1a01-n0x1a09) + + 0x0685da09, // c0x011b (n0x1a09-n0x1a17) + + 0x06af1a17, // c0x011c (n0x1a17-n0x1abc) + + 0x06badabc, // c0x011d (n0x1abc-n0x1aeb) + + 0x06bc1aeb, // c0x011e (n0x1aeb-n0x1af0) + + 0x06bf5af0, // c0x011f (n0x1af0-n0x1afd) + + 0x06c11afd, // c0x0120 (n0x1afd-n0x1b04) + + 0x06c2db04, // c0x0121 (n0x1b04-n0x1b0b) + + 0x06c51b0b, // c0x0122 (n0x1b0b-n0x1b14) + + 0x06c69b14, // c0x0123 (n0x1b14-n0x1b1a) + + 0x06c85b1a, // c0x0124 (n0x1b1a-n0x1b21) + + 0x06ca9b21, // c0x0125 (n0x1b21-n0x1b2a) + + 0x06cb9b2a, // c0x0126 (n0x1b2a-n0x1b2e) + + 0x06ce9b2e, // c0x0127 (n0x1b2e-n0x1b3a) + + 0x06d05b3a, // c0x0128 (n0x1b3a-n0x1b41) + + 0x06f15b41, // c0x0129 (n0x1b41-n0x1bc5) + + 0x06f39bc5, // c0x012a (n0x1bc5-n0x1bce) + + 0x06f59bce, // c0x012b (n0x1bce-n0x1bd6) + + 0x06f6dbd6, // c0x012c (n0x1bd6-n0x1bdb) + + 0x06f81bdb, // c0x012d (n0x1bdb-n0x1be0) + + 0x06fa1be0, // c0x012e (n0x1be0-n0x1be8) + + 0x07045be8, // c0x012f (n0x1be8-n0x1c11) + + 0x07061c11, // c0x0130 (n0x1c11-n0x1c18) + + 0x07079c18, // c0x0131 (n0x1c18-n0x1c1e) + + 0x0707dc1e, // c0x0132 (n0x1c1e-n0x1c1f) + + 0x07081c1f, // c0x0133 (n0x1c1f-n0x1c20) + + 0x07095c20, // c0x0134 (n0x1c20-n0x1c25) + + 0x070b5c25, // c0x0135 (n0x1c25-n0x1c2d) + + 0x070c1c2d, // c0x0136 (n0x1c2d-n0x1c30) + + 0x070f1c30, // c0x0137 (n0x1c30-n0x1c3c) + + 0x07171c3c, // c0x0138 (n0x1c3c-n0x1c5c) + + 0x07185c5c, // c0x0139 (n0x1c5c-n0x1c61) + + 0x07189c61, // c0x013a (n0x1c61-n0x1c62) + + 0x071a1c62, // c0x013b (n0x1c62-n0x1c68) + + 0x071adc68, // c0x013c (n0x1c68-n0x1c6b) + + 0x071b1c6b, // c0x013d (n0x1c6b-n0x1c6c) + + 0x071cdc6c, // c0x013e (n0x1c6c-n0x1c73) + + 0x07209c73, // c0x013f (n0x1c73-n0x1c82) + + 0x0720dc82, // c0x0140 (n0x1c82-n0x1c83) + + 0x0722dc83, // c0x0141 (n0x1c83-n0x1c8b) + + 0x0727dc8b, // c0x0142 (n0x1c8b-n0x1c9f) + + 0x07295c9f, // c0x0143 (n0x1c9f-n0x1ca5) + + 0x072e9ca5, // c0x0144 (n0x1ca5-n0x1cba) + + 0x072edcba, // c0x0145 (n0x1cba-n0x1cbb) + + 0x072f1cbb, // c0x0146 (n0x1cbb-n0x1cbc) + + 0x07335cbc, // c0x0147 (n0x1cbc-n0x1ccd) + + 0x07345ccd, // c0x0148 (n0x1ccd-n0x1cd1) + + 0x0737dcd1, // c0x0149 (n0x1cd1-n0x1cdf) + + 0x073adcdf, // c0x014a (n0x1cdf-n0x1ceb) + + 0x074e9ceb, // c0x014b (n0x1ceb-n0x1d3a) + + 0x0750dd3a, // c0x014c (n0x1d3a-n0x1d43) + + 0x07539d43, // c0x014d (n0x1d43-n0x1d4e) + + 0x0753dd4e, // c0x014e (n0x1d4e-n0x1d4f) + + 0x07541d4f, // c0x014f (n0x1d4f-n0x1d50) + + 0x0763dd50, // c0x0150 (n0x1d50-n0x1d8f) + + 0x07649d8f, // c0x0151 (n0x1d8f-n0x1d92) + + 0x07655d92, // c0x0152 (n0x1d92-n0x1d95) + + 0x07661d95, // c0x0153 (n0x1d95-n0x1d98) + + 0x0766dd98, // c0x0154 (n0x1d98-n0x1d9b) + + 0x07679d9b, // c0x0155 (n0x1d9b-n0x1d9e) + + 0x07685d9e, // c0x0156 (n0x1d9e-n0x1da1) + + 0x07691da1, // c0x0157 (n0x1da1-n0x1da4) + + 0x0769dda4, // c0x0158 (n0x1da4-n0x1da7) + + 0x076a9da7, // c0x0159 (n0x1da7-n0x1daa) + + 0x076b5daa, // c0x015a (n0x1daa-n0x1dad) + + 0x076c1dad, // c0x015b (n0x1dad-n0x1db0) + + 0x076cddb0, // c0x015c (n0x1db0-n0x1db3) + + 0x076d9db3, // c0x015d (n0x1db3-n0x1db6) + + 0x076e1db6, // c0x015e (n0x1db6-n0x1db8) + + 0x076eddb8, // c0x015f (n0x1db8-n0x1dbb) + + 0x076f9dbb, // c0x0160 (n0x1dbb-n0x1dbe) + + 0x07705dbe, // c0x0161 (n0x1dbe-n0x1dc1) + + 0x07711dc1, // c0x0162 (n0x1dc1-n0x1dc4) + + 0x0771ddc4, // c0x0163 (n0x1dc4-n0x1dc7) + + 0x07729dc7, // c0x0164 (n0x1dc7-n0x1dca) + + 0x07735dca, // c0x0165 (n0x1dca-n0x1dcd) + + 0x07741dcd, // c0x0166 (n0x1dcd-n0x1dd0) + + 0x0774ddd0, // c0x0167 (n0x1dd0-n0x1dd3) + + 0x07759dd3, // c0x0168 (n0x1dd3-n0x1dd6) + + 0x07765dd6, // c0x0169 (n0x1dd6-n0x1dd9) + + 0x07771dd9, // c0x016a (n0x1dd9-n0x1ddc) + + 0x0777dddc, // c0x016b (n0x1ddc-n0x1ddf) + + 0x07789ddf, // c0x016c (n0x1ddf-n0x1de2) + + 0x07795de2, // c0x016d (n0x1de2-n0x1de5) + + 0x077a1de5, // c0x016e (n0x1de5-n0x1de8) + + 0x077adde8, // c0x016f (n0x1de8-n0x1deb) + + 0x077b5deb, // c0x0170 (n0x1deb-n0x1ded) + + 0x077c1ded, // c0x0171 (n0x1ded-n0x1df0) + + 0x077cddf0, // c0x0172 (n0x1df0-n0x1df3) + + 0x077d9df3, // c0x0173 (n0x1df3-n0x1df6) + + 0x077e5df6, // c0x0174 (n0x1df6-n0x1df9) + + 0x077f1df9, // c0x0175 (n0x1df9-n0x1dfc) + + 0x077fddfc, // c0x0176 (n0x1dfc-n0x1dff) + + 0x07809dff, // c0x0177 (n0x1dff-n0x1e02) + + 0x07815e02, // c0x0178 (n0x1e02-n0x1e05) + + 0x07821e05, // c0x0179 (n0x1e05-n0x1e08) + + 0x0782de08, // c0x017a (n0x1e08-n0x1e0b) + + 0x07839e0b, // c0x017b (n0x1e0b-n0x1e0e) + + 0x07845e0e, // c0x017c (n0x1e0e-n0x1e11) + + 0x07851e11, // c0x017d (n0x1e11-n0x1e14) + + 0x07859e14, // c0x017e (n0x1e14-n0x1e16) + + 0x07865e16, // c0x017f (n0x1e16-n0x1e19) + + 0x07871e19, // c0x0180 (n0x1e19-n0x1e1c) + + 0x0787de1c, // c0x0181 (n0x1e1c-n0x1e1f) + + 0x07889e1f, // c0x0182 (n0x1e1f-n0x1e22) + + 0x07895e22, // c0x0183 (n0x1e22-n0x1e25) + + 0x078a1e25, // c0x0184 (n0x1e25-n0x1e28) + + 0x078ade28, // c0x0185 (n0x1e28-n0x1e2b) + + 0x078b9e2b, // c0x0186 (n0x1e2b-n0x1e2e) + + 0x078bde2e, // c0x0187 (n0x1e2e-n0x1e2f) + + 0x078c9e2f, // c0x0188 (n0x1e2f-n0x1e32) + + 0x078e1e32, // c0x0189 (n0x1e32-n0x1e38) + + 0x078e5e38, // c0x018a (n0x1e38-n0x1e39) + + 0x078f5e39, // c0x018b (n0x1e39-n0x1e3d) + + 0x0790de3d, // c0x018c (n0x1e3d-n0x1e43) + + 0x07951e43, // c0x018d (n0x1e43-n0x1e54) + + 0x07965e54, // c0x018e (n0x1e54-n0x1e59) + + 0x07999e59, // c0x018f (n0x1e59-n0x1e66) + + 0x079a9e66, // c0x0190 (n0x1e66-n0x1e6a) + + 0x079c5e6a, // c0x0191 (n0x1e6a-n0x1e71) + + 0x079dde71, // c0x0192 (n0x1e71-n0x1e77) + + 0x27a21e77, // c0x0193 (n0x1e77-n0x1e88) o + 0x07a25e88, // c0x0194 (n0x1e88-n0x1e89) + +} + +// max children 404 (capacity 511) +// max text offset 26864 (capacity 32767) +// max text length 36 (capacity 63) +// max hi 7817 (capacity 16383) +// max lo 7816 (capacity 16383) diff --git a/vendor/golang.org/x/net/publicsuffix/table_test.go b/vendor/golang.org/x/net/publicsuffix/table_test.go new file mode 100644 index 0000000..4d2eb2e --- /dev/null +++ b/vendor/golang.org/x/net/publicsuffix/table_test.go @@ -0,0 +1,15615 @@ +// generated by go run gen.go; DO NOT EDIT + +package publicsuffix + +var rules = [...]string{ + "ac", + "com.ac", + "edu.ac", + "gov.ac", + "net.ac", + "mil.ac", + "org.ac", + "ad", + "nom.ad", + "ae", + "co.ae", + "net.ae", + "org.ae", + "sch.ae", + "ac.ae", + "gov.ae", + "mil.ae", + "aero", + "accident-investigation.aero", + "accident-prevention.aero", + "aerobatic.aero", + "aeroclub.aero", + "aerodrome.aero", + "agents.aero", + "aircraft.aero", + "airline.aero", + "airport.aero", + "air-surveillance.aero", + "airtraffic.aero", + "air-traffic-control.aero", + "ambulance.aero", + "amusement.aero", + "association.aero", + "author.aero", + "ballooning.aero", + "broker.aero", + "caa.aero", + "cargo.aero", + "catering.aero", + "certification.aero", + "championship.aero", + "charter.aero", + "civilaviation.aero", + "club.aero", + "conference.aero", + "consultant.aero", + "consulting.aero", + "control.aero", + "council.aero", + "crew.aero", + "design.aero", + "dgca.aero", + "educator.aero", + "emergency.aero", + "engine.aero", + "engineer.aero", + "entertainment.aero", + "equipment.aero", + "exchange.aero", + "express.aero", + "federation.aero", + "flight.aero", + "freight.aero", + "fuel.aero", + "gliding.aero", + "government.aero", + "groundhandling.aero", + "group.aero", + "hanggliding.aero", + "homebuilt.aero", + "insurance.aero", + "journal.aero", + "journalist.aero", + "leasing.aero", + "logistics.aero", + "magazine.aero", + "maintenance.aero", + "marketplace.aero", + "media.aero", + "microlight.aero", + "modelling.aero", + "navigation.aero", + "parachuting.aero", + "paragliding.aero", + "passenger-association.aero", + "pilot.aero", + "press.aero", + "production.aero", + "recreation.aero", + "repbody.aero", + "res.aero", + "research.aero", + "rotorcraft.aero", + "safety.aero", + "scientist.aero", + "services.aero", + "show.aero", + "skydiving.aero", + "software.aero", + "student.aero", + "taxi.aero", + "trader.aero", + "trading.aero", + "trainer.aero", + "union.aero", + "workinggroup.aero", + "works.aero", + "af", + "gov.af", + "com.af", + "org.af", + "net.af", + "edu.af", + "ag", + "com.ag", + "org.ag", + "net.ag", + "co.ag", + "nom.ag", + "ai", + "off.ai", + "com.ai", + "net.ai", + "org.ai", + "al", + "com.al", + "edu.al", + "gov.al", + "mil.al", + "net.al", + "org.al", + "am", + "an", + "com.an", + "net.an", + "org.an", + "edu.an", + "ao", + "ed.ao", + "gv.ao", + "og.ao", + "co.ao", + "pb.ao", + "it.ao", + "aq", + "ar", + "com.ar", + "edu.ar", + "gob.ar", + "gov.ar", + "int.ar", + "mil.ar", + "net.ar", + "org.ar", + "tur.ar", + "arpa", + "e164.arpa", + "in-addr.arpa", + "ip6.arpa", + "iris.arpa", + "uri.arpa", + "urn.arpa", + "as", + "gov.as", + "asia", + "at", + "ac.at", + "co.at", + "gv.at", + "or.at", + "au", + "com.au", + "net.au", + "org.au", + "edu.au", + "gov.au", + "asn.au", + "id.au", + "info.au", + "conf.au", + "oz.au", + "act.au", + "nsw.au", + "nt.au", + "qld.au", + "sa.au", + "tas.au", + "vic.au", + "wa.au", + "act.edu.au", + "nsw.edu.au", + "nt.edu.au", + "qld.edu.au", + "sa.edu.au", + "tas.edu.au", + "vic.edu.au", + "wa.edu.au", + "qld.gov.au", + "sa.gov.au", + "tas.gov.au", + "vic.gov.au", + "wa.gov.au", + "aw", + "com.aw", + "ax", + "az", + "com.az", + "net.az", + "int.az", + "gov.az", + "org.az", + "edu.az", + "info.az", + "pp.az", + "mil.az", + "name.az", + "pro.az", + "biz.az", + "ba", + "org.ba", + "net.ba", + "edu.ba", + "gov.ba", + "mil.ba", + "unsa.ba", + "unbi.ba", + "co.ba", + "com.ba", + "rs.ba", + "bb", + "biz.bb", + "co.bb", + "com.bb", + "edu.bb", + "gov.bb", + "info.bb", + "net.bb", + "org.bb", + "store.bb", + "tv.bb", + "*.bd", + "be", + "ac.be", + "bf", + "gov.bf", + "bg", + "a.bg", + "b.bg", + "c.bg", + "d.bg", + "e.bg", + "f.bg", + "g.bg", + "h.bg", + "i.bg", + "j.bg", + "k.bg", + "l.bg", + "m.bg", + "n.bg", + "o.bg", + "p.bg", + "q.bg", + "r.bg", + "s.bg", + "t.bg", + "u.bg", + "v.bg", + "w.bg", + "x.bg", + "y.bg", + "z.bg", + "0.bg", + "1.bg", + "2.bg", + "3.bg", + "4.bg", + "5.bg", + "6.bg", + "7.bg", + "8.bg", + "9.bg", + "bh", + "com.bh", + "edu.bh", + "net.bh", + "org.bh", + "gov.bh", + "bi", + "co.bi", + "com.bi", + "edu.bi", + "or.bi", + "org.bi", + "biz", + "bj", + "asso.bj", + "barreau.bj", + "gouv.bj", + "bm", + "com.bm", + "edu.bm", + "gov.bm", + "net.bm", + "org.bm", + "*.bn", + "bo", + "com.bo", + "edu.bo", + "gov.bo", + "gob.bo", + "int.bo", + "org.bo", + "net.bo", + "mil.bo", + "tv.bo", + "br", + "adm.br", + "adv.br", + "agr.br", + "am.br", + "arq.br", + "art.br", + "ato.br", + "b.br", + "bio.br", + "blog.br", + "bmd.br", + "cim.br", + "cng.br", + "cnt.br", + "com.br", + "coop.br", + "ecn.br", + "eco.br", + "edu.br", + "emp.br", + "eng.br", + "esp.br", + "etc.br", + "eti.br", + "far.br", + "flog.br", + "fm.br", + "fnd.br", + "fot.br", + "fst.br", + "g12.br", + "ggf.br", + "gov.br", + "imb.br", + "ind.br", + "inf.br", + "jor.br", + "jus.br", + "leg.br", + "lel.br", + "mat.br", + "med.br", + "mil.br", + "mp.br", + "mus.br", + "net.br", + "*.nom.br", + "not.br", + "ntr.br", + "odo.br", + "org.br", + "ppg.br", + "pro.br", + "psc.br", + "psi.br", + "qsl.br", + "radio.br", + "rec.br", + "slg.br", + "srv.br", + "taxi.br", + "teo.br", + "tmp.br", + "trd.br", + "tur.br", + "tv.br", + "vet.br", + "vlog.br", + "wiki.br", + "zlg.br", + "bs", + "com.bs", + "net.bs", + "org.bs", + "edu.bs", + "gov.bs", + "bt", + "com.bt", + "edu.bt", + "gov.bt", + "net.bt", + "org.bt", + "bv", + "bw", + "co.bw", + "org.bw", + "by", + "gov.by", + "mil.by", + "com.by", + "of.by", + "bz", + "com.bz", + "net.bz", + "org.bz", + "edu.bz", + "gov.bz", + "ca", + "ab.ca", + "bc.ca", + "mb.ca", + "nb.ca", + "nf.ca", + "nl.ca", + "ns.ca", + "nt.ca", + "nu.ca", + "on.ca", + "pe.ca", + "qc.ca", + "sk.ca", + "yk.ca", + "gc.ca", + "cat", + "cc", + "cd", + "gov.cd", + "cf", + "cg", + "ch", + "ci", + "org.ci", + "or.ci", + "com.ci", + "co.ci", + "edu.ci", + "ed.ci", + "ac.ci", + "net.ci", + "go.ci", + "asso.ci", + "xn--aroport-bya.ci", + "int.ci", + "presse.ci", + "md.ci", + "gouv.ci", + "*.ck", + "!www.ck", + "cl", + "gov.cl", + "gob.cl", + "co.cl", + "mil.cl", + "cm", + "co.cm", + "com.cm", + "gov.cm", + "net.cm", + "cn", + "ac.cn", + "com.cn", + "edu.cn", + "gov.cn", + "net.cn", + "org.cn", + "mil.cn", + "xn--55qx5d.cn", + "xn--io0a7i.cn", + "xn--od0alg.cn", + "ah.cn", + "bj.cn", + "cq.cn", + "fj.cn", + "gd.cn", + "gs.cn", + "gz.cn", + "gx.cn", + "ha.cn", + "hb.cn", + "he.cn", + "hi.cn", + "hl.cn", + "hn.cn", + "jl.cn", + "js.cn", + "jx.cn", + "ln.cn", + "nm.cn", + "nx.cn", + "qh.cn", + "sc.cn", + "sd.cn", + "sh.cn", + "sn.cn", + "sx.cn", + "tj.cn", + "xj.cn", + "xz.cn", + "yn.cn", + "zj.cn", + "hk.cn", + "mo.cn", + "tw.cn", + "co", + "arts.co", + "com.co", + "edu.co", + "firm.co", + "gov.co", + "info.co", + "int.co", + "mil.co", + "net.co", + "nom.co", + "org.co", + "rec.co", + "web.co", + "com", + "coop", + "cr", + "ac.cr", + "co.cr", + "ed.cr", + "fi.cr", + "go.cr", + "or.cr", + "sa.cr", + "cu", + "com.cu", + "edu.cu", + "org.cu", + "net.cu", + "gov.cu", + "inf.cu", + "cv", + "cw", + "com.cw", + "edu.cw", + "net.cw", + "org.cw", + "cx", + "gov.cx", + "ac.cy", + "biz.cy", + "com.cy", + "ekloges.cy", + "gov.cy", + "ltd.cy", + "name.cy", + "net.cy", + "org.cy", + "parliament.cy", + "press.cy", + "pro.cy", + "tm.cy", + "cz", + "de", + "dj", + "dk", + "dm", + "com.dm", + "net.dm", + "org.dm", + "edu.dm", + "gov.dm", + "do", + "art.do", + "com.do", + "edu.do", + "gob.do", + "gov.do", + "mil.do", + "net.do", + "org.do", + "sld.do", + "web.do", + "dz", + "com.dz", + "org.dz", + "net.dz", + "gov.dz", + "edu.dz", + "asso.dz", + "pol.dz", + "art.dz", + "ec", + "com.ec", + "info.ec", + "net.ec", + "fin.ec", + "k12.ec", + "med.ec", + "pro.ec", + "org.ec", + "edu.ec", + "gov.ec", + "gob.ec", + "mil.ec", + "edu", + "ee", + "edu.ee", + "gov.ee", + "riik.ee", + "lib.ee", + "med.ee", + "com.ee", + "pri.ee", + "aip.ee", + "org.ee", + "fie.ee", + "eg", + "com.eg", + "edu.eg", + "eun.eg", + "gov.eg", + "mil.eg", + "name.eg", + "net.eg", + "org.eg", + "sci.eg", + "*.er", + "es", + "com.es", + "nom.es", + "org.es", + "gob.es", + "edu.es", + "et", + "com.et", + "gov.et", + "org.et", + "edu.et", + "biz.et", + "name.et", + "info.et", + "net.et", + "eu", + "fi", + "aland.fi", + "*.fj", + "*.fk", + "fm", + "fo", + "fr", + "com.fr", + "asso.fr", + "nom.fr", + "prd.fr", + "presse.fr", + "tm.fr", + "aeroport.fr", + "assedic.fr", + "avocat.fr", + "avoues.fr", + "cci.fr", + "chambagri.fr", + "chirurgiens-dentistes.fr", + "experts-comptables.fr", + "geometre-expert.fr", + "gouv.fr", + "greta.fr", + "huissier-justice.fr", + "medecin.fr", + "notaires.fr", + "pharmacien.fr", + "port.fr", + "veterinaire.fr", + "ga", + "gb", + "gd", + "ge", + "com.ge", + "edu.ge", + "gov.ge", + "org.ge", + "mil.ge", + "net.ge", + "pvt.ge", + "gf", + "gg", + "co.gg", + "net.gg", + "org.gg", + "gh", + "com.gh", + "edu.gh", + "gov.gh", + "org.gh", + "mil.gh", + "gi", + "com.gi", + "ltd.gi", + "gov.gi", + "mod.gi", + "edu.gi", + "org.gi", + "gl", + "co.gl", + "com.gl", + "edu.gl", + "net.gl", + "org.gl", + "gm", + "gn", + "ac.gn", + "com.gn", + "edu.gn", + "gov.gn", + "org.gn", + "net.gn", + "gov", + "gp", + "com.gp", + "net.gp", + "mobi.gp", + "edu.gp", + "org.gp", + "asso.gp", + "gq", + "gr", + "com.gr", + "edu.gr", + "net.gr", + "org.gr", + "gov.gr", + "gs", + "gt", + "com.gt", + "edu.gt", + "gob.gt", + "ind.gt", + "mil.gt", + "net.gt", + "org.gt", + "*.gu", + "gw", + "gy", + "co.gy", + "com.gy", + "net.gy", + "hk", + "com.hk", + "edu.hk", + "gov.hk", + "idv.hk", + "net.hk", + "org.hk", + "xn--55qx5d.hk", + "xn--wcvs22d.hk", + "xn--lcvr32d.hk", + "xn--mxtq1m.hk", + "xn--gmqw5a.hk", + "xn--ciqpn.hk", + "xn--gmq050i.hk", + "xn--zf0avx.hk", + "xn--io0a7i.hk", + "xn--mk0axi.hk", + "xn--od0alg.hk", + "xn--od0aq3b.hk", + "xn--tn0ag.hk", + "xn--uc0atv.hk", + "xn--uc0ay4a.hk", + "hm", + "hn", + "com.hn", + "edu.hn", + "org.hn", + "net.hn", + "mil.hn", + "gob.hn", + "hr", + "iz.hr", + "from.hr", + "name.hr", + "com.hr", + "ht", + "com.ht", + "shop.ht", + "firm.ht", + "info.ht", + "adult.ht", + "net.ht", + "pro.ht", + "org.ht", + "med.ht", + "art.ht", + "coop.ht", + "pol.ht", + "asso.ht", + "edu.ht", + "rel.ht", + "gouv.ht", + "perso.ht", + "hu", + "co.hu", + "info.hu", + "org.hu", + "priv.hu", + "sport.hu", + "tm.hu", + "2000.hu", + "agrar.hu", + "bolt.hu", + "casino.hu", + "city.hu", + "erotica.hu", + "erotika.hu", + "film.hu", + "forum.hu", + "games.hu", + "hotel.hu", + "ingatlan.hu", + "jogasz.hu", + "konyvelo.hu", + "lakas.hu", + "media.hu", + "news.hu", + "reklam.hu", + "sex.hu", + "shop.hu", + "suli.hu", + "szex.hu", + "tozsde.hu", + "utazas.hu", + "video.hu", + "id", + "ac.id", + "biz.id", + "co.id", + "desa.id", + "go.id", + "mil.id", + "my.id", + "net.id", + "or.id", + "sch.id", + "web.id", + "ie", + "gov.ie", + "il", + "ac.il", + "co.il", + "gov.il", + "idf.il", + "k12.il", + "muni.il", + "net.il", + "org.il", + "im", + "ac.im", + "co.im", + "com.im", + "ltd.co.im", + "net.im", + "org.im", + "plc.co.im", + "tt.im", + "tv.im", + "in", + "co.in", + "firm.in", + "net.in", + "org.in", + "gen.in", + "ind.in", + "nic.in", + "ac.in", + "edu.in", + "res.in", + "gov.in", + "mil.in", + "info", + "int", + "eu.int", + "io", + "com.io", + "iq", + "gov.iq", + "edu.iq", + "mil.iq", + "com.iq", + "org.iq", + "net.iq", + "ir", + "ac.ir", + "co.ir", + "gov.ir", + "id.ir", + "net.ir", + "org.ir", + "sch.ir", + "xn--mgba3a4f16a.ir", + "xn--mgba3a4fra.ir", + "is", + "net.is", + "com.is", + "edu.is", + "gov.is", + "org.is", + "int.is", + "it", + "gov.it", + "edu.it", + "abr.it", + "abruzzo.it", + "aosta-valley.it", + "aostavalley.it", + "bas.it", + "basilicata.it", + "cal.it", + "calabria.it", + "cam.it", + "campania.it", + "emilia-romagna.it", + "emiliaromagna.it", + "emr.it", + "friuli-v-giulia.it", + "friuli-ve-giulia.it", + "friuli-vegiulia.it", + "friuli-venezia-giulia.it", + "friuli-veneziagiulia.it", + "friuli-vgiulia.it", + "friuliv-giulia.it", + "friulive-giulia.it", + "friulivegiulia.it", + "friulivenezia-giulia.it", + "friuliveneziagiulia.it", + "friulivgiulia.it", + "fvg.it", + "laz.it", + "lazio.it", + "lig.it", + "liguria.it", + "lom.it", + "lombardia.it", + "lombardy.it", + "lucania.it", + "mar.it", + "marche.it", + "mol.it", + "molise.it", + "piedmont.it", + "piemonte.it", + "pmn.it", + "pug.it", + "puglia.it", + "sar.it", + "sardegna.it", + "sardinia.it", + "sic.it", + "sicilia.it", + "sicily.it", + "taa.it", + "tos.it", + "toscana.it", + "trentino-a-adige.it", + "trentino-aadige.it", + "trentino-alto-adige.it", + "trentino-altoadige.it", + "trentino-s-tirol.it", + "trentino-stirol.it", + "trentino-sud-tirol.it", + "trentino-sudtirol.it", + "trentino-sued-tirol.it", + "trentino-suedtirol.it", + "trentinoa-adige.it", + "trentinoaadige.it", + "trentinoalto-adige.it", + "trentinoaltoadige.it", + "trentinos-tirol.it", + "trentinostirol.it", + "trentinosud-tirol.it", + "trentinosudtirol.it", + "trentinosued-tirol.it", + "trentinosuedtirol.it", + "tuscany.it", + "umb.it", + "umbria.it", + "val-d-aosta.it", + "val-daosta.it", + "vald-aosta.it", + "valdaosta.it", + "valle-aosta.it", + "valle-d-aosta.it", + "valle-daosta.it", + "valleaosta.it", + "valled-aosta.it", + "valledaosta.it", + "vallee-aoste.it", + "valleeaoste.it", + "vao.it", + "vda.it", + "ven.it", + "veneto.it", + "ag.it", + "agrigento.it", + "al.it", + "alessandria.it", + "alto-adige.it", + "altoadige.it", + "an.it", + "ancona.it", + "andria-barletta-trani.it", + "andria-trani-barletta.it", + "andriabarlettatrani.it", + "andriatranibarletta.it", + "ao.it", + "aosta.it", + "aoste.it", + "ap.it", + "aq.it", + "aquila.it", + "ar.it", + "arezzo.it", + "ascoli-piceno.it", + "ascolipiceno.it", + "asti.it", + "at.it", + "av.it", + "avellino.it", + "ba.it", + "balsan.it", + "bari.it", + "barletta-trani-andria.it", + "barlettatraniandria.it", + "belluno.it", + "benevento.it", + "bergamo.it", + "bg.it", + "bi.it", + "biella.it", + "bl.it", + "bn.it", + "bo.it", + "bologna.it", + "bolzano.it", + "bozen.it", + "br.it", + "brescia.it", + "brindisi.it", + "bs.it", + "bt.it", + "bz.it", + "ca.it", + "cagliari.it", + "caltanissetta.it", + "campidano-medio.it", + "campidanomedio.it", + "campobasso.it", + "carbonia-iglesias.it", + "carboniaiglesias.it", + "carrara-massa.it", + "carraramassa.it", + "caserta.it", + "catania.it", + "catanzaro.it", + "cb.it", + "ce.it", + "cesena-forli.it", + "cesenaforli.it", + "ch.it", + "chieti.it", + "ci.it", + "cl.it", + "cn.it", + "co.it", + "como.it", + "cosenza.it", + "cr.it", + "cremona.it", + "crotone.it", + "cs.it", + "ct.it", + "cuneo.it", + "cz.it", + "dell-ogliastra.it", + "dellogliastra.it", + "en.it", + "enna.it", + "fc.it", + "fe.it", + "fermo.it", + "ferrara.it", + "fg.it", + "fi.it", + "firenze.it", + "florence.it", + "fm.it", + "foggia.it", + "forli-cesena.it", + "forlicesena.it", + "fr.it", + "frosinone.it", + "ge.it", + "genoa.it", + "genova.it", + "go.it", + "gorizia.it", + "gr.it", + "grosseto.it", + "iglesias-carbonia.it", + "iglesiascarbonia.it", + "im.it", + "imperia.it", + "is.it", + "isernia.it", + "kr.it", + "la-spezia.it", + "laquila.it", + "laspezia.it", + "latina.it", + "lc.it", + "le.it", + "lecce.it", + "lecco.it", + "li.it", + "livorno.it", + "lo.it", + "lodi.it", + "lt.it", + "lu.it", + "lucca.it", + "macerata.it", + "mantova.it", + "massa-carrara.it", + "massacarrara.it", + "matera.it", + "mb.it", + "mc.it", + "me.it", + "medio-campidano.it", + "mediocampidano.it", + "messina.it", + "mi.it", + "milan.it", + "milano.it", + "mn.it", + "mo.it", + "modena.it", + "monza-brianza.it", + "monza-e-della-brianza.it", + "monza.it", + "monzabrianza.it", + "monzaebrianza.it", + "monzaedellabrianza.it", + "ms.it", + "mt.it", + "na.it", + "naples.it", + "napoli.it", + "no.it", + "novara.it", + "nu.it", + "nuoro.it", + "og.it", + "ogliastra.it", + "olbia-tempio.it", + "olbiatempio.it", + "or.it", + "oristano.it", + "ot.it", + "pa.it", + "padova.it", + "padua.it", + "palermo.it", + "parma.it", + "pavia.it", + "pc.it", + "pd.it", + "pe.it", + "perugia.it", + "pesaro-urbino.it", + "pesarourbino.it", + "pescara.it", + "pg.it", + "pi.it", + "piacenza.it", + "pisa.it", + "pistoia.it", + "pn.it", + "po.it", + "pordenone.it", + "potenza.it", + "pr.it", + "prato.it", + "pt.it", + "pu.it", + "pv.it", + "pz.it", + "ra.it", + "ragusa.it", + "ravenna.it", + "rc.it", + "re.it", + "reggio-calabria.it", + "reggio-emilia.it", + "reggiocalabria.it", + "reggioemilia.it", + "rg.it", + "ri.it", + "rieti.it", + "rimini.it", + "rm.it", + "rn.it", + "ro.it", + "roma.it", + "rome.it", + "rovigo.it", + "sa.it", + "salerno.it", + "sassari.it", + "savona.it", + "si.it", + "siena.it", + "siracusa.it", + "so.it", + "sondrio.it", + "sp.it", + "sr.it", + "ss.it", + "suedtirol.it", + "sv.it", + "ta.it", + "taranto.it", + "te.it", + "tempio-olbia.it", + "tempioolbia.it", + "teramo.it", + "terni.it", + "tn.it", + "to.it", + "torino.it", + "tp.it", + "tr.it", + "trani-andria-barletta.it", + "trani-barletta-andria.it", + "traniandriabarletta.it", + "tranibarlettaandria.it", + "trapani.it", + "trentino.it", + "trento.it", + "treviso.it", + "trieste.it", + "ts.it", + "turin.it", + "tv.it", + "ud.it", + "udine.it", + "urbino-pesaro.it", + "urbinopesaro.it", + "va.it", + "varese.it", + "vb.it", + "vc.it", + "ve.it", + "venezia.it", + "venice.it", + "verbania.it", + "vercelli.it", + "verona.it", + "vi.it", + "vibo-valentia.it", + "vibovalentia.it", + "vicenza.it", + "viterbo.it", + "vr.it", + "vs.it", + "vt.it", + "vv.it", + "je", + "co.je", + "net.je", + "org.je", + "*.jm", + "jo", + "com.jo", + "org.jo", + "net.jo", + "edu.jo", + "sch.jo", + "gov.jo", + "mil.jo", + "name.jo", + "jobs", + "jp", + "ac.jp", + "ad.jp", + "co.jp", + "ed.jp", + "go.jp", + "gr.jp", + "lg.jp", + "ne.jp", + "or.jp", + "aichi.jp", + "akita.jp", + "aomori.jp", + "chiba.jp", + "ehime.jp", + "fukui.jp", + "fukuoka.jp", + "fukushima.jp", + "gifu.jp", + "gunma.jp", + "hiroshima.jp", + "hokkaido.jp", + "hyogo.jp", + "ibaraki.jp", + "ishikawa.jp", + "iwate.jp", + "kagawa.jp", + "kagoshima.jp", + "kanagawa.jp", + "kochi.jp", + "kumamoto.jp", + "kyoto.jp", + "mie.jp", + "miyagi.jp", + "miyazaki.jp", + "nagano.jp", + "nagasaki.jp", + "nara.jp", + "niigata.jp", + "oita.jp", + "okayama.jp", + "okinawa.jp", + "osaka.jp", + "saga.jp", + "saitama.jp", + "shiga.jp", + "shimane.jp", + "shizuoka.jp", + "tochigi.jp", + "tokushima.jp", + "tokyo.jp", + "tottori.jp", + "toyama.jp", + "wakayama.jp", + "yamagata.jp", + "yamaguchi.jp", + "yamanashi.jp", + "xn--4pvxs.jp", + "xn--vgu402c.jp", + "xn--c3s14m.jp", + "xn--f6qx53a.jp", + "xn--8pvr4u.jp", + "xn--uist22h.jp", + "xn--djrs72d6uy.jp", + "xn--mkru45i.jp", + "xn--0trq7p7nn.jp", + "xn--8ltr62k.jp", + "xn--2m4a15e.jp", + "xn--efvn9s.jp", + "xn--32vp30h.jp", + "xn--4it797k.jp", + "xn--1lqs71d.jp", + "xn--5rtp49c.jp", + "xn--5js045d.jp", + "xn--ehqz56n.jp", + "xn--1lqs03n.jp", + "xn--qqqt11m.jp", + "xn--kbrq7o.jp", + "xn--pssu33l.jp", + "xn--ntsq17g.jp", + "xn--uisz3g.jp", + "xn--6btw5a.jp", + "xn--1ctwo.jp", + "xn--6orx2r.jp", + "xn--rht61e.jp", + "xn--rht27z.jp", + "xn--djty4k.jp", + "xn--nit225k.jp", + "xn--rht3d.jp", + "xn--klty5x.jp", + "xn--kltx9a.jp", + "xn--kltp7d.jp", + "xn--uuwu58a.jp", + "xn--zbx025d.jp", + "xn--ntso0iqx3a.jp", + "xn--elqq16h.jp", + "xn--4it168d.jp", + "xn--klt787d.jp", + "xn--rny31h.jp", + "xn--7t0a264c.jp", + "xn--5rtq34k.jp", + "xn--k7yn95e.jp", + "xn--tor131o.jp", + "xn--d5qv7z876c.jp", + "*.kawasaki.jp", + "*.kitakyushu.jp", + "*.kobe.jp", + "*.nagoya.jp", + "*.sapporo.jp", + "*.sendai.jp", + "*.yokohama.jp", + "!city.kawasaki.jp", + "!city.kitakyushu.jp", + "!city.kobe.jp", + "!city.nagoya.jp", + "!city.sapporo.jp", + "!city.sendai.jp", + "!city.yokohama.jp", + "aisai.aichi.jp", + "ama.aichi.jp", + "anjo.aichi.jp", + "asuke.aichi.jp", + "chiryu.aichi.jp", + "chita.aichi.jp", + "fuso.aichi.jp", + "gamagori.aichi.jp", + "handa.aichi.jp", + "hazu.aichi.jp", + "hekinan.aichi.jp", + "higashiura.aichi.jp", + "ichinomiya.aichi.jp", + "inazawa.aichi.jp", + "inuyama.aichi.jp", + "isshiki.aichi.jp", + "iwakura.aichi.jp", + "kanie.aichi.jp", + "kariya.aichi.jp", + "kasugai.aichi.jp", + "kira.aichi.jp", + "kiyosu.aichi.jp", + "komaki.aichi.jp", + "konan.aichi.jp", + "kota.aichi.jp", + "mihama.aichi.jp", + "miyoshi.aichi.jp", + "nishio.aichi.jp", + "nisshin.aichi.jp", + "obu.aichi.jp", + "oguchi.aichi.jp", + "oharu.aichi.jp", + "okazaki.aichi.jp", + "owariasahi.aichi.jp", + "seto.aichi.jp", + "shikatsu.aichi.jp", + "shinshiro.aichi.jp", + "shitara.aichi.jp", + "tahara.aichi.jp", + "takahama.aichi.jp", + "tobishima.aichi.jp", + "toei.aichi.jp", + "togo.aichi.jp", + "tokai.aichi.jp", + "tokoname.aichi.jp", + "toyoake.aichi.jp", + "toyohashi.aichi.jp", + "toyokawa.aichi.jp", + "toyone.aichi.jp", + "toyota.aichi.jp", + "tsushima.aichi.jp", + "yatomi.aichi.jp", + "akita.akita.jp", + "daisen.akita.jp", + "fujisato.akita.jp", + "gojome.akita.jp", + "hachirogata.akita.jp", + "happou.akita.jp", + "higashinaruse.akita.jp", + "honjo.akita.jp", + "honjyo.akita.jp", + "ikawa.akita.jp", + "kamikoani.akita.jp", + "kamioka.akita.jp", + "katagami.akita.jp", + "kazuno.akita.jp", + "kitaakita.akita.jp", + "kosaka.akita.jp", + "kyowa.akita.jp", + "misato.akita.jp", + "mitane.akita.jp", + "moriyoshi.akita.jp", + "nikaho.akita.jp", + "noshiro.akita.jp", + "odate.akita.jp", + "oga.akita.jp", + "ogata.akita.jp", + "semboku.akita.jp", + "yokote.akita.jp", + "yurihonjo.akita.jp", + "aomori.aomori.jp", + "gonohe.aomori.jp", + "hachinohe.aomori.jp", + "hashikami.aomori.jp", + "hiranai.aomori.jp", + "hirosaki.aomori.jp", + "itayanagi.aomori.jp", + "kuroishi.aomori.jp", + "misawa.aomori.jp", + "mutsu.aomori.jp", + "nakadomari.aomori.jp", + "noheji.aomori.jp", + "oirase.aomori.jp", + "owani.aomori.jp", + "rokunohe.aomori.jp", + "sannohe.aomori.jp", + "shichinohe.aomori.jp", + "shingo.aomori.jp", + "takko.aomori.jp", + "towada.aomori.jp", + "tsugaru.aomori.jp", + "tsuruta.aomori.jp", + "abiko.chiba.jp", + "asahi.chiba.jp", + "chonan.chiba.jp", + "chosei.chiba.jp", + "choshi.chiba.jp", + "chuo.chiba.jp", + "funabashi.chiba.jp", + "futtsu.chiba.jp", + "hanamigawa.chiba.jp", + "ichihara.chiba.jp", + "ichikawa.chiba.jp", + "ichinomiya.chiba.jp", + "inzai.chiba.jp", + "isumi.chiba.jp", + "kamagaya.chiba.jp", + "kamogawa.chiba.jp", + "kashiwa.chiba.jp", + "katori.chiba.jp", + "katsuura.chiba.jp", + "kimitsu.chiba.jp", + "kisarazu.chiba.jp", + "kozaki.chiba.jp", + "kujukuri.chiba.jp", + "kyonan.chiba.jp", + "matsudo.chiba.jp", + "midori.chiba.jp", + "mihama.chiba.jp", + "minamiboso.chiba.jp", + "mobara.chiba.jp", + "mutsuzawa.chiba.jp", + "nagara.chiba.jp", + "nagareyama.chiba.jp", + "narashino.chiba.jp", + "narita.chiba.jp", + "noda.chiba.jp", + "oamishirasato.chiba.jp", + "omigawa.chiba.jp", + "onjuku.chiba.jp", + "otaki.chiba.jp", + "sakae.chiba.jp", + "sakura.chiba.jp", + "shimofusa.chiba.jp", + "shirako.chiba.jp", + "shiroi.chiba.jp", + "shisui.chiba.jp", + "sodegaura.chiba.jp", + "sosa.chiba.jp", + "tako.chiba.jp", + "tateyama.chiba.jp", + "togane.chiba.jp", + "tohnosho.chiba.jp", + "tomisato.chiba.jp", + "urayasu.chiba.jp", + "yachimata.chiba.jp", + "yachiyo.chiba.jp", + "yokaichiba.chiba.jp", + "yokoshibahikari.chiba.jp", + "yotsukaido.chiba.jp", + "ainan.ehime.jp", + "honai.ehime.jp", + "ikata.ehime.jp", + "imabari.ehime.jp", + "iyo.ehime.jp", + "kamijima.ehime.jp", + "kihoku.ehime.jp", + "kumakogen.ehime.jp", + "masaki.ehime.jp", + "matsuno.ehime.jp", + "matsuyama.ehime.jp", + "namikata.ehime.jp", + "niihama.ehime.jp", + "ozu.ehime.jp", + "saijo.ehime.jp", + "seiyo.ehime.jp", + "shikokuchuo.ehime.jp", + "tobe.ehime.jp", + "toon.ehime.jp", + "uchiko.ehime.jp", + "uwajima.ehime.jp", + "yawatahama.ehime.jp", + "echizen.fukui.jp", + "eiheiji.fukui.jp", + "fukui.fukui.jp", + "ikeda.fukui.jp", + "katsuyama.fukui.jp", + "mihama.fukui.jp", + "minamiechizen.fukui.jp", + "obama.fukui.jp", + "ohi.fukui.jp", + "ono.fukui.jp", + "sabae.fukui.jp", + "sakai.fukui.jp", + "takahama.fukui.jp", + "tsuruga.fukui.jp", + "wakasa.fukui.jp", + "ashiya.fukuoka.jp", + "buzen.fukuoka.jp", + "chikugo.fukuoka.jp", + "chikuho.fukuoka.jp", + "chikujo.fukuoka.jp", + "chikushino.fukuoka.jp", + "chikuzen.fukuoka.jp", + "chuo.fukuoka.jp", + "dazaifu.fukuoka.jp", + "fukuchi.fukuoka.jp", + "hakata.fukuoka.jp", + "higashi.fukuoka.jp", + "hirokawa.fukuoka.jp", + "hisayama.fukuoka.jp", + "iizuka.fukuoka.jp", + "inatsuki.fukuoka.jp", + "kaho.fukuoka.jp", + "kasuga.fukuoka.jp", + "kasuya.fukuoka.jp", + "kawara.fukuoka.jp", + "keisen.fukuoka.jp", + "koga.fukuoka.jp", + "kurate.fukuoka.jp", + "kurogi.fukuoka.jp", + "kurume.fukuoka.jp", + "minami.fukuoka.jp", + "miyako.fukuoka.jp", + "miyama.fukuoka.jp", + "miyawaka.fukuoka.jp", + "mizumaki.fukuoka.jp", + "munakata.fukuoka.jp", + "nakagawa.fukuoka.jp", + "nakama.fukuoka.jp", + "nishi.fukuoka.jp", + "nogata.fukuoka.jp", + "ogori.fukuoka.jp", + "okagaki.fukuoka.jp", + "okawa.fukuoka.jp", + "oki.fukuoka.jp", + "omuta.fukuoka.jp", + "onga.fukuoka.jp", + "onojo.fukuoka.jp", + "oto.fukuoka.jp", + "saigawa.fukuoka.jp", + "sasaguri.fukuoka.jp", + "shingu.fukuoka.jp", + "shinyoshitomi.fukuoka.jp", + "shonai.fukuoka.jp", + "soeda.fukuoka.jp", + "sue.fukuoka.jp", + "tachiarai.fukuoka.jp", + "tagawa.fukuoka.jp", + "takata.fukuoka.jp", + "toho.fukuoka.jp", + "toyotsu.fukuoka.jp", + "tsuiki.fukuoka.jp", + "ukiha.fukuoka.jp", + "umi.fukuoka.jp", + "usui.fukuoka.jp", + "yamada.fukuoka.jp", + "yame.fukuoka.jp", + "yanagawa.fukuoka.jp", + "yukuhashi.fukuoka.jp", + "aizubange.fukushima.jp", + "aizumisato.fukushima.jp", + "aizuwakamatsu.fukushima.jp", + "asakawa.fukushima.jp", + "bandai.fukushima.jp", + "date.fukushima.jp", + "fukushima.fukushima.jp", + "furudono.fukushima.jp", + "futaba.fukushima.jp", + "hanawa.fukushima.jp", + "higashi.fukushima.jp", + "hirata.fukushima.jp", + "hirono.fukushima.jp", + "iitate.fukushima.jp", + "inawashiro.fukushima.jp", + "ishikawa.fukushima.jp", + "iwaki.fukushima.jp", + "izumizaki.fukushima.jp", + "kagamiishi.fukushima.jp", + "kaneyama.fukushima.jp", + "kawamata.fukushima.jp", + "kitakata.fukushima.jp", + "kitashiobara.fukushima.jp", + "koori.fukushima.jp", + "koriyama.fukushima.jp", + "kunimi.fukushima.jp", + "miharu.fukushima.jp", + "mishima.fukushima.jp", + "namie.fukushima.jp", + "nango.fukushima.jp", + "nishiaizu.fukushima.jp", + "nishigo.fukushima.jp", + "okuma.fukushima.jp", + "omotego.fukushima.jp", + "ono.fukushima.jp", + "otama.fukushima.jp", + "samegawa.fukushima.jp", + "shimogo.fukushima.jp", + "shirakawa.fukushima.jp", + "showa.fukushima.jp", + "soma.fukushima.jp", + "sukagawa.fukushima.jp", + "taishin.fukushima.jp", + "tamakawa.fukushima.jp", + "tanagura.fukushima.jp", + "tenei.fukushima.jp", + "yabuki.fukushima.jp", + "yamato.fukushima.jp", + "yamatsuri.fukushima.jp", + "yanaizu.fukushima.jp", + "yugawa.fukushima.jp", + "anpachi.gifu.jp", + "ena.gifu.jp", + "gifu.gifu.jp", + "ginan.gifu.jp", + "godo.gifu.jp", + "gujo.gifu.jp", + "hashima.gifu.jp", + "hichiso.gifu.jp", + "hida.gifu.jp", + "higashishirakawa.gifu.jp", + "ibigawa.gifu.jp", + "ikeda.gifu.jp", + "kakamigahara.gifu.jp", + "kani.gifu.jp", + "kasahara.gifu.jp", + "kasamatsu.gifu.jp", + "kawaue.gifu.jp", + "kitagata.gifu.jp", + "mino.gifu.jp", + "minokamo.gifu.jp", + "mitake.gifu.jp", + "mizunami.gifu.jp", + "motosu.gifu.jp", + "nakatsugawa.gifu.jp", + "ogaki.gifu.jp", + "sakahogi.gifu.jp", + "seki.gifu.jp", + "sekigahara.gifu.jp", + "shirakawa.gifu.jp", + "tajimi.gifu.jp", + "takayama.gifu.jp", + "tarui.gifu.jp", + "toki.gifu.jp", + "tomika.gifu.jp", + "wanouchi.gifu.jp", + "yamagata.gifu.jp", + "yaotsu.gifu.jp", + "yoro.gifu.jp", + "annaka.gunma.jp", + "chiyoda.gunma.jp", + "fujioka.gunma.jp", + "higashiagatsuma.gunma.jp", + "isesaki.gunma.jp", + "itakura.gunma.jp", + "kanna.gunma.jp", + "kanra.gunma.jp", + "katashina.gunma.jp", + "kawaba.gunma.jp", + "kiryu.gunma.jp", + "kusatsu.gunma.jp", + "maebashi.gunma.jp", + "meiwa.gunma.jp", + "midori.gunma.jp", + "minakami.gunma.jp", + "naganohara.gunma.jp", + "nakanojo.gunma.jp", + "nanmoku.gunma.jp", + "numata.gunma.jp", + "oizumi.gunma.jp", + "ora.gunma.jp", + "ota.gunma.jp", + "shibukawa.gunma.jp", + "shimonita.gunma.jp", + "shinto.gunma.jp", + "showa.gunma.jp", + "takasaki.gunma.jp", + "takayama.gunma.jp", + "tamamura.gunma.jp", + "tatebayashi.gunma.jp", + "tomioka.gunma.jp", + "tsukiyono.gunma.jp", + "tsumagoi.gunma.jp", + "ueno.gunma.jp", + "yoshioka.gunma.jp", + "asaminami.hiroshima.jp", + "daiwa.hiroshima.jp", + "etajima.hiroshima.jp", + "fuchu.hiroshima.jp", + "fukuyama.hiroshima.jp", + "hatsukaichi.hiroshima.jp", + "higashihiroshima.hiroshima.jp", + "hongo.hiroshima.jp", + "jinsekikogen.hiroshima.jp", + "kaita.hiroshima.jp", + "kui.hiroshima.jp", + "kumano.hiroshima.jp", + "kure.hiroshima.jp", + "mihara.hiroshima.jp", + "miyoshi.hiroshima.jp", + "naka.hiroshima.jp", + "onomichi.hiroshima.jp", + "osakikamijima.hiroshima.jp", + "otake.hiroshima.jp", + "saka.hiroshima.jp", + "sera.hiroshima.jp", + "seranishi.hiroshima.jp", + "shinichi.hiroshima.jp", + "shobara.hiroshima.jp", + "takehara.hiroshima.jp", + "abashiri.hokkaido.jp", + "abira.hokkaido.jp", + "aibetsu.hokkaido.jp", + "akabira.hokkaido.jp", + "akkeshi.hokkaido.jp", + "asahikawa.hokkaido.jp", + "ashibetsu.hokkaido.jp", + "ashoro.hokkaido.jp", + "assabu.hokkaido.jp", + "atsuma.hokkaido.jp", + "bibai.hokkaido.jp", + "biei.hokkaido.jp", + "bifuka.hokkaido.jp", + "bihoro.hokkaido.jp", + "biratori.hokkaido.jp", + "chippubetsu.hokkaido.jp", + "chitose.hokkaido.jp", + "date.hokkaido.jp", + "ebetsu.hokkaido.jp", + "embetsu.hokkaido.jp", + "eniwa.hokkaido.jp", + "erimo.hokkaido.jp", + "esan.hokkaido.jp", + "esashi.hokkaido.jp", + "fukagawa.hokkaido.jp", + "fukushima.hokkaido.jp", + "furano.hokkaido.jp", + "furubira.hokkaido.jp", + "haboro.hokkaido.jp", + "hakodate.hokkaido.jp", + "hamatonbetsu.hokkaido.jp", + "hidaka.hokkaido.jp", + "higashikagura.hokkaido.jp", + "higashikawa.hokkaido.jp", + "hiroo.hokkaido.jp", + "hokuryu.hokkaido.jp", + "hokuto.hokkaido.jp", + "honbetsu.hokkaido.jp", + "horokanai.hokkaido.jp", + "horonobe.hokkaido.jp", + "ikeda.hokkaido.jp", + "imakane.hokkaido.jp", + "ishikari.hokkaido.jp", + "iwamizawa.hokkaido.jp", + "iwanai.hokkaido.jp", + "kamifurano.hokkaido.jp", + "kamikawa.hokkaido.jp", + "kamishihoro.hokkaido.jp", + "kamisunagawa.hokkaido.jp", + "kamoenai.hokkaido.jp", + "kayabe.hokkaido.jp", + "kembuchi.hokkaido.jp", + "kikonai.hokkaido.jp", + "kimobetsu.hokkaido.jp", + "kitahiroshima.hokkaido.jp", + "kitami.hokkaido.jp", + "kiyosato.hokkaido.jp", + "koshimizu.hokkaido.jp", + "kunneppu.hokkaido.jp", + "kuriyama.hokkaido.jp", + "kuromatsunai.hokkaido.jp", + "kushiro.hokkaido.jp", + "kutchan.hokkaido.jp", + "kyowa.hokkaido.jp", + "mashike.hokkaido.jp", + "matsumae.hokkaido.jp", + "mikasa.hokkaido.jp", + "minamifurano.hokkaido.jp", + "mombetsu.hokkaido.jp", + "moseushi.hokkaido.jp", + "mukawa.hokkaido.jp", + "muroran.hokkaido.jp", + "naie.hokkaido.jp", + "nakagawa.hokkaido.jp", + "nakasatsunai.hokkaido.jp", + "nakatombetsu.hokkaido.jp", + "nanae.hokkaido.jp", + "nanporo.hokkaido.jp", + "nayoro.hokkaido.jp", + "nemuro.hokkaido.jp", + "niikappu.hokkaido.jp", + "niki.hokkaido.jp", + "nishiokoppe.hokkaido.jp", + "noboribetsu.hokkaido.jp", + "numata.hokkaido.jp", + "obihiro.hokkaido.jp", + "obira.hokkaido.jp", + "oketo.hokkaido.jp", + "okoppe.hokkaido.jp", + "otaru.hokkaido.jp", + "otobe.hokkaido.jp", + "otofuke.hokkaido.jp", + "otoineppu.hokkaido.jp", + "oumu.hokkaido.jp", + "ozora.hokkaido.jp", + "pippu.hokkaido.jp", + "rankoshi.hokkaido.jp", + "rebun.hokkaido.jp", + "rikubetsu.hokkaido.jp", + "rishiri.hokkaido.jp", + "rishirifuji.hokkaido.jp", + "saroma.hokkaido.jp", + "sarufutsu.hokkaido.jp", + "shakotan.hokkaido.jp", + "shari.hokkaido.jp", + "shibecha.hokkaido.jp", + "shibetsu.hokkaido.jp", + "shikabe.hokkaido.jp", + "shikaoi.hokkaido.jp", + "shimamaki.hokkaido.jp", + "shimizu.hokkaido.jp", + "shimokawa.hokkaido.jp", + "shinshinotsu.hokkaido.jp", + "shintoku.hokkaido.jp", + "shiranuka.hokkaido.jp", + "shiraoi.hokkaido.jp", + "shiriuchi.hokkaido.jp", + "sobetsu.hokkaido.jp", + "sunagawa.hokkaido.jp", + "taiki.hokkaido.jp", + "takasu.hokkaido.jp", + "takikawa.hokkaido.jp", + "takinoue.hokkaido.jp", + "teshikaga.hokkaido.jp", + "tobetsu.hokkaido.jp", + "tohma.hokkaido.jp", + "tomakomai.hokkaido.jp", + "tomari.hokkaido.jp", + "toya.hokkaido.jp", + "toyako.hokkaido.jp", + "toyotomi.hokkaido.jp", + "toyoura.hokkaido.jp", + "tsubetsu.hokkaido.jp", + "tsukigata.hokkaido.jp", + "urakawa.hokkaido.jp", + "urausu.hokkaido.jp", + "uryu.hokkaido.jp", + "utashinai.hokkaido.jp", + "wakkanai.hokkaido.jp", + "wassamu.hokkaido.jp", + "yakumo.hokkaido.jp", + "yoichi.hokkaido.jp", + "aioi.hyogo.jp", + "akashi.hyogo.jp", + "ako.hyogo.jp", + "amagasaki.hyogo.jp", + "aogaki.hyogo.jp", + "asago.hyogo.jp", + "ashiya.hyogo.jp", + "awaji.hyogo.jp", + "fukusaki.hyogo.jp", + "goshiki.hyogo.jp", + "harima.hyogo.jp", + "himeji.hyogo.jp", + "ichikawa.hyogo.jp", + "inagawa.hyogo.jp", + "itami.hyogo.jp", + "kakogawa.hyogo.jp", + "kamigori.hyogo.jp", + "kamikawa.hyogo.jp", + "kasai.hyogo.jp", + "kasuga.hyogo.jp", + "kawanishi.hyogo.jp", + "miki.hyogo.jp", + "minamiawaji.hyogo.jp", + "nishinomiya.hyogo.jp", + "nishiwaki.hyogo.jp", + "ono.hyogo.jp", + "sanda.hyogo.jp", + "sannan.hyogo.jp", + "sasayama.hyogo.jp", + "sayo.hyogo.jp", + "shingu.hyogo.jp", + "shinonsen.hyogo.jp", + "shiso.hyogo.jp", + "sumoto.hyogo.jp", + "taishi.hyogo.jp", + "taka.hyogo.jp", + "takarazuka.hyogo.jp", + "takasago.hyogo.jp", + "takino.hyogo.jp", + "tamba.hyogo.jp", + "tatsuno.hyogo.jp", + "toyooka.hyogo.jp", + "yabu.hyogo.jp", + "yashiro.hyogo.jp", + "yoka.hyogo.jp", + "yokawa.hyogo.jp", + "ami.ibaraki.jp", + "asahi.ibaraki.jp", + "bando.ibaraki.jp", + "chikusei.ibaraki.jp", + "daigo.ibaraki.jp", + "fujishiro.ibaraki.jp", + "hitachi.ibaraki.jp", + "hitachinaka.ibaraki.jp", + "hitachiomiya.ibaraki.jp", + "hitachiota.ibaraki.jp", + "ibaraki.ibaraki.jp", + "ina.ibaraki.jp", + "inashiki.ibaraki.jp", + "itako.ibaraki.jp", + "iwama.ibaraki.jp", + "joso.ibaraki.jp", + "kamisu.ibaraki.jp", + "kasama.ibaraki.jp", + "kashima.ibaraki.jp", + "kasumigaura.ibaraki.jp", + "koga.ibaraki.jp", + "miho.ibaraki.jp", + "mito.ibaraki.jp", + "moriya.ibaraki.jp", + "naka.ibaraki.jp", + "namegata.ibaraki.jp", + "oarai.ibaraki.jp", + "ogawa.ibaraki.jp", + "omitama.ibaraki.jp", + "ryugasaki.ibaraki.jp", + "sakai.ibaraki.jp", + "sakuragawa.ibaraki.jp", + "shimodate.ibaraki.jp", + "shimotsuma.ibaraki.jp", + "shirosato.ibaraki.jp", + "sowa.ibaraki.jp", + "suifu.ibaraki.jp", + "takahagi.ibaraki.jp", + "tamatsukuri.ibaraki.jp", + "tokai.ibaraki.jp", + "tomobe.ibaraki.jp", + "tone.ibaraki.jp", + "toride.ibaraki.jp", + "tsuchiura.ibaraki.jp", + "tsukuba.ibaraki.jp", + "uchihara.ibaraki.jp", + "ushiku.ibaraki.jp", + "yachiyo.ibaraki.jp", + "yamagata.ibaraki.jp", + "yawara.ibaraki.jp", + "yuki.ibaraki.jp", + "anamizu.ishikawa.jp", + "hakui.ishikawa.jp", + "hakusan.ishikawa.jp", + "kaga.ishikawa.jp", + "kahoku.ishikawa.jp", + "kanazawa.ishikawa.jp", + "kawakita.ishikawa.jp", + "komatsu.ishikawa.jp", + "nakanoto.ishikawa.jp", + "nanao.ishikawa.jp", + "nomi.ishikawa.jp", + "nonoichi.ishikawa.jp", + "noto.ishikawa.jp", + "shika.ishikawa.jp", + "suzu.ishikawa.jp", + "tsubata.ishikawa.jp", + "tsurugi.ishikawa.jp", + "uchinada.ishikawa.jp", + "wajima.ishikawa.jp", + "fudai.iwate.jp", + "fujisawa.iwate.jp", + "hanamaki.iwate.jp", + "hiraizumi.iwate.jp", + "hirono.iwate.jp", + "ichinohe.iwate.jp", + "ichinoseki.iwate.jp", + "iwaizumi.iwate.jp", + "iwate.iwate.jp", + "joboji.iwate.jp", + "kamaishi.iwate.jp", + "kanegasaki.iwate.jp", + "karumai.iwate.jp", + "kawai.iwate.jp", + "kitakami.iwate.jp", + "kuji.iwate.jp", + "kunohe.iwate.jp", + "kuzumaki.iwate.jp", + "miyako.iwate.jp", + "mizusawa.iwate.jp", + "morioka.iwate.jp", + "ninohe.iwate.jp", + "noda.iwate.jp", + "ofunato.iwate.jp", + "oshu.iwate.jp", + "otsuchi.iwate.jp", + "rikuzentakata.iwate.jp", + "shiwa.iwate.jp", + "shizukuishi.iwate.jp", + "sumita.iwate.jp", + "tanohata.iwate.jp", + "tono.iwate.jp", + "yahaba.iwate.jp", + "yamada.iwate.jp", + "ayagawa.kagawa.jp", + "higashikagawa.kagawa.jp", + "kanonji.kagawa.jp", + "kotohira.kagawa.jp", + "manno.kagawa.jp", + "marugame.kagawa.jp", + "mitoyo.kagawa.jp", + "naoshima.kagawa.jp", + "sanuki.kagawa.jp", + "tadotsu.kagawa.jp", + "takamatsu.kagawa.jp", + "tonosho.kagawa.jp", + "uchinomi.kagawa.jp", + "utazu.kagawa.jp", + "zentsuji.kagawa.jp", + "akune.kagoshima.jp", + "amami.kagoshima.jp", + "hioki.kagoshima.jp", + "isa.kagoshima.jp", + "isen.kagoshima.jp", + "izumi.kagoshima.jp", + "kagoshima.kagoshima.jp", + "kanoya.kagoshima.jp", + "kawanabe.kagoshima.jp", + "kinko.kagoshima.jp", + "kouyama.kagoshima.jp", + "makurazaki.kagoshima.jp", + "matsumoto.kagoshima.jp", + "minamitane.kagoshima.jp", + "nakatane.kagoshima.jp", + "nishinoomote.kagoshima.jp", + "satsumasendai.kagoshima.jp", + "soo.kagoshima.jp", + "tarumizu.kagoshima.jp", + "yusui.kagoshima.jp", + "aikawa.kanagawa.jp", + "atsugi.kanagawa.jp", + "ayase.kanagawa.jp", + "chigasaki.kanagawa.jp", + "ebina.kanagawa.jp", + "fujisawa.kanagawa.jp", + "hadano.kanagawa.jp", + "hakone.kanagawa.jp", + "hiratsuka.kanagawa.jp", + "isehara.kanagawa.jp", + "kaisei.kanagawa.jp", + "kamakura.kanagawa.jp", + "kiyokawa.kanagawa.jp", + "matsuda.kanagawa.jp", + "minamiashigara.kanagawa.jp", + "miura.kanagawa.jp", + "nakai.kanagawa.jp", + "ninomiya.kanagawa.jp", + "odawara.kanagawa.jp", + "oi.kanagawa.jp", + "oiso.kanagawa.jp", + "sagamihara.kanagawa.jp", + "samukawa.kanagawa.jp", + "tsukui.kanagawa.jp", + "yamakita.kanagawa.jp", + "yamato.kanagawa.jp", + "yokosuka.kanagawa.jp", + "yugawara.kanagawa.jp", + "zama.kanagawa.jp", + "zushi.kanagawa.jp", + "aki.kochi.jp", + "geisei.kochi.jp", + "hidaka.kochi.jp", + "higashitsuno.kochi.jp", + "ino.kochi.jp", + "kagami.kochi.jp", + "kami.kochi.jp", + "kitagawa.kochi.jp", + "kochi.kochi.jp", + "mihara.kochi.jp", + "motoyama.kochi.jp", + "muroto.kochi.jp", + "nahari.kochi.jp", + "nakamura.kochi.jp", + "nankoku.kochi.jp", + "nishitosa.kochi.jp", + "niyodogawa.kochi.jp", + "ochi.kochi.jp", + "okawa.kochi.jp", + "otoyo.kochi.jp", + "otsuki.kochi.jp", + "sakawa.kochi.jp", + "sukumo.kochi.jp", + "susaki.kochi.jp", + "tosa.kochi.jp", + "tosashimizu.kochi.jp", + "toyo.kochi.jp", + "tsuno.kochi.jp", + "umaji.kochi.jp", + "yasuda.kochi.jp", + "yusuhara.kochi.jp", + "amakusa.kumamoto.jp", + "arao.kumamoto.jp", + "aso.kumamoto.jp", + "choyo.kumamoto.jp", + "gyokuto.kumamoto.jp", + "hitoyoshi.kumamoto.jp", + "kamiamakusa.kumamoto.jp", + "kashima.kumamoto.jp", + "kikuchi.kumamoto.jp", + "kosa.kumamoto.jp", + "kumamoto.kumamoto.jp", + "mashiki.kumamoto.jp", + "mifune.kumamoto.jp", + "minamata.kumamoto.jp", + "minamioguni.kumamoto.jp", + "nagasu.kumamoto.jp", + "nishihara.kumamoto.jp", + "oguni.kumamoto.jp", + "ozu.kumamoto.jp", + "sumoto.kumamoto.jp", + "takamori.kumamoto.jp", + "uki.kumamoto.jp", + "uto.kumamoto.jp", + "yamaga.kumamoto.jp", + "yamato.kumamoto.jp", + "yatsushiro.kumamoto.jp", + "ayabe.kyoto.jp", + "fukuchiyama.kyoto.jp", + "higashiyama.kyoto.jp", + "ide.kyoto.jp", + "ine.kyoto.jp", + "joyo.kyoto.jp", + "kameoka.kyoto.jp", + "kamo.kyoto.jp", + "kita.kyoto.jp", + "kizu.kyoto.jp", + "kumiyama.kyoto.jp", + "kyotamba.kyoto.jp", + "kyotanabe.kyoto.jp", + "kyotango.kyoto.jp", + "maizuru.kyoto.jp", + "minami.kyoto.jp", + "minamiyamashiro.kyoto.jp", + "miyazu.kyoto.jp", + "muko.kyoto.jp", + "nagaokakyo.kyoto.jp", + "nakagyo.kyoto.jp", + "nantan.kyoto.jp", + "oyamazaki.kyoto.jp", + "sakyo.kyoto.jp", + "seika.kyoto.jp", + "tanabe.kyoto.jp", + "uji.kyoto.jp", + "ujitawara.kyoto.jp", + "wazuka.kyoto.jp", + "yamashina.kyoto.jp", + "yawata.kyoto.jp", + "asahi.mie.jp", + "inabe.mie.jp", + "ise.mie.jp", + "kameyama.mie.jp", + "kawagoe.mie.jp", + "kiho.mie.jp", + "kisosaki.mie.jp", + "kiwa.mie.jp", + "komono.mie.jp", + "kumano.mie.jp", + "kuwana.mie.jp", + "matsusaka.mie.jp", + "meiwa.mie.jp", + "mihama.mie.jp", + "minamiise.mie.jp", + "misugi.mie.jp", + "miyama.mie.jp", + "nabari.mie.jp", + "shima.mie.jp", + "suzuka.mie.jp", + "tado.mie.jp", + "taiki.mie.jp", + "taki.mie.jp", + "tamaki.mie.jp", + "toba.mie.jp", + "tsu.mie.jp", + "udono.mie.jp", + "ureshino.mie.jp", + "watarai.mie.jp", + "yokkaichi.mie.jp", + "furukawa.miyagi.jp", + "higashimatsushima.miyagi.jp", + "ishinomaki.miyagi.jp", + "iwanuma.miyagi.jp", + "kakuda.miyagi.jp", + "kami.miyagi.jp", + "kawasaki.miyagi.jp", + "kesennuma.miyagi.jp", + "marumori.miyagi.jp", + "matsushima.miyagi.jp", + "minamisanriku.miyagi.jp", + "misato.miyagi.jp", + "murata.miyagi.jp", + "natori.miyagi.jp", + "ogawara.miyagi.jp", + "ohira.miyagi.jp", + "onagawa.miyagi.jp", + "osaki.miyagi.jp", + "rifu.miyagi.jp", + "semine.miyagi.jp", + "shibata.miyagi.jp", + "shichikashuku.miyagi.jp", + "shikama.miyagi.jp", + "shiogama.miyagi.jp", + "shiroishi.miyagi.jp", + "tagajo.miyagi.jp", + "taiwa.miyagi.jp", + "tome.miyagi.jp", + "tomiya.miyagi.jp", + "wakuya.miyagi.jp", + "watari.miyagi.jp", + "yamamoto.miyagi.jp", + "zao.miyagi.jp", + "aya.miyazaki.jp", + "ebino.miyazaki.jp", + "gokase.miyazaki.jp", + "hyuga.miyazaki.jp", + "kadogawa.miyazaki.jp", + "kawaminami.miyazaki.jp", + "kijo.miyazaki.jp", + "kitagawa.miyazaki.jp", + "kitakata.miyazaki.jp", + "kitaura.miyazaki.jp", + "kobayashi.miyazaki.jp", + "kunitomi.miyazaki.jp", + "kushima.miyazaki.jp", + "mimata.miyazaki.jp", + "miyakonojo.miyazaki.jp", + "miyazaki.miyazaki.jp", + "morotsuka.miyazaki.jp", + "nichinan.miyazaki.jp", + "nishimera.miyazaki.jp", + "nobeoka.miyazaki.jp", + "saito.miyazaki.jp", + "shiiba.miyazaki.jp", + "shintomi.miyazaki.jp", + "takaharu.miyazaki.jp", + "takanabe.miyazaki.jp", + "takazaki.miyazaki.jp", + "tsuno.miyazaki.jp", + "achi.nagano.jp", + "agematsu.nagano.jp", + "anan.nagano.jp", + "aoki.nagano.jp", + "asahi.nagano.jp", + "azumino.nagano.jp", + "chikuhoku.nagano.jp", + "chikuma.nagano.jp", + "chino.nagano.jp", + "fujimi.nagano.jp", + "hakuba.nagano.jp", + "hara.nagano.jp", + "hiraya.nagano.jp", + "iida.nagano.jp", + "iijima.nagano.jp", + "iiyama.nagano.jp", + "iizuna.nagano.jp", + "ikeda.nagano.jp", + "ikusaka.nagano.jp", + "ina.nagano.jp", + "karuizawa.nagano.jp", + "kawakami.nagano.jp", + "kiso.nagano.jp", + "kisofukushima.nagano.jp", + "kitaaiki.nagano.jp", + "komagane.nagano.jp", + "komoro.nagano.jp", + "matsukawa.nagano.jp", + "matsumoto.nagano.jp", + "miasa.nagano.jp", + "minamiaiki.nagano.jp", + "minamimaki.nagano.jp", + "minamiminowa.nagano.jp", + "minowa.nagano.jp", + "miyada.nagano.jp", + "miyota.nagano.jp", + "mochizuki.nagano.jp", + "nagano.nagano.jp", + "nagawa.nagano.jp", + "nagiso.nagano.jp", + "nakagawa.nagano.jp", + "nakano.nagano.jp", + "nozawaonsen.nagano.jp", + "obuse.nagano.jp", + "ogawa.nagano.jp", + "okaya.nagano.jp", + "omachi.nagano.jp", + "omi.nagano.jp", + "ookuwa.nagano.jp", + "ooshika.nagano.jp", + "otaki.nagano.jp", + "otari.nagano.jp", + "sakae.nagano.jp", + "sakaki.nagano.jp", + "saku.nagano.jp", + "sakuho.nagano.jp", + "shimosuwa.nagano.jp", + "shinanomachi.nagano.jp", + "shiojiri.nagano.jp", + "suwa.nagano.jp", + "suzaka.nagano.jp", + "takagi.nagano.jp", + "takamori.nagano.jp", + "takayama.nagano.jp", + "tateshina.nagano.jp", + "tatsuno.nagano.jp", + "togakushi.nagano.jp", + "togura.nagano.jp", + "tomi.nagano.jp", + "ueda.nagano.jp", + "wada.nagano.jp", + "yamagata.nagano.jp", + "yamanouchi.nagano.jp", + "yasaka.nagano.jp", + "yasuoka.nagano.jp", + "chijiwa.nagasaki.jp", + "futsu.nagasaki.jp", + "goto.nagasaki.jp", + "hasami.nagasaki.jp", + "hirado.nagasaki.jp", + "iki.nagasaki.jp", + "isahaya.nagasaki.jp", + "kawatana.nagasaki.jp", + "kuchinotsu.nagasaki.jp", + "matsuura.nagasaki.jp", + "nagasaki.nagasaki.jp", + "obama.nagasaki.jp", + "omura.nagasaki.jp", + "oseto.nagasaki.jp", + "saikai.nagasaki.jp", + "sasebo.nagasaki.jp", + "seihi.nagasaki.jp", + "shimabara.nagasaki.jp", + "shinkamigoto.nagasaki.jp", + "togitsu.nagasaki.jp", + "tsushima.nagasaki.jp", + "unzen.nagasaki.jp", + "ando.nara.jp", + "gose.nara.jp", + "heguri.nara.jp", + "higashiyoshino.nara.jp", + "ikaruga.nara.jp", + "ikoma.nara.jp", + "kamikitayama.nara.jp", + "kanmaki.nara.jp", + "kashiba.nara.jp", + "kashihara.nara.jp", + "katsuragi.nara.jp", + "kawai.nara.jp", + "kawakami.nara.jp", + "kawanishi.nara.jp", + "koryo.nara.jp", + "kurotaki.nara.jp", + "mitsue.nara.jp", + "miyake.nara.jp", + "nara.nara.jp", + "nosegawa.nara.jp", + "oji.nara.jp", + "ouda.nara.jp", + "oyodo.nara.jp", + "sakurai.nara.jp", + "sango.nara.jp", + "shimoichi.nara.jp", + "shimokitayama.nara.jp", + "shinjo.nara.jp", + "soni.nara.jp", + "takatori.nara.jp", + "tawaramoto.nara.jp", + "tenkawa.nara.jp", + "tenri.nara.jp", + "uda.nara.jp", + "yamatokoriyama.nara.jp", + "yamatotakada.nara.jp", + "yamazoe.nara.jp", + "yoshino.nara.jp", + "aga.niigata.jp", + "agano.niigata.jp", + "gosen.niigata.jp", + "itoigawa.niigata.jp", + "izumozaki.niigata.jp", + "joetsu.niigata.jp", + "kamo.niigata.jp", + "kariwa.niigata.jp", + "kashiwazaki.niigata.jp", + "minamiuonuma.niigata.jp", + "mitsuke.niigata.jp", + "muika.niigata.jp", + "murakami.niigata.jp", + "myoko.niigata.jp", + "nagaoka.niigata.jp", + "niigata.niigata.jp", + "ojiya.niigata.jp", + "omi.niigata.jp", + "sado.niigata.jp", + "sanjo.niigata.jp", + "seiro.niigata.jp", + "seirou.niigata.jp", + "sekikawa.niigata.jp", + "shibata.niigata.jp", + "tagami.niigata.jp", + "tainai.niigata.jp", + "tochio.niigata.jp", + "tokamachi.niigata.jp", + "tsubame.niigata.jp", + "tsunan.niigata.jp", + "uonuma.niigata.jp", + "yahiko.niigata.jp", + "yoita.niigata.jp", + "yuzawa.niigata.jp", + "beppu.oita.jp", + "bungoono.oita.jp", + "bungotakada.oita.jp", + "hasama.oita.jp", + "hiji.oita.jp", + "himeshima.oita.jp", + "hita.oita.jp", + "kamitsue.oita.jp", + "kokonoe.oita.jp", + "kuju.oita.jp", + "kunisaki.oita.jp", + "kusu.oita.jp", + "oita.oita.jp", + "saiki.oita.jp", + "taketa.oita.jp", + "tsukumi.oita.jp", + "usa.oita.jp", + "usuki.oita.jp", + "yufu.oita.jp", + "akaiwa.okayama.jp", + "asakuchi.okayama.jp", + "bizen.okayama.jp", + "hayashima.okayama.jp", + "ibara.okayama.jp", + "kagamino.okayama.jp", + "kasaoka.okayama.jp", + "kibichuo.okayama.jp", + "kumenan.okayama.jp", + "kurashiki.okayama.jp", + "maniwa.okayama.jp", + "misaki.okayama.jp", + "nagi.okayama.jp", + "niimi.okayama.jp", + "nishiawakura.okayama.jp", + "okayama.okayama.jp", + "satosho.okayama.jp", + "setouchi.okayama.jp", + "shinjo.okayama.jp", + "shoo.okayama.jp", + "soja.okayama.jp", + "takahashi.okayama.jp", + "tamano.okayama.jp", + "tsuyama.okayama.jp", + "wake.okayama.jp", + "yakage.okayama.jp", + "aguni.okinawa.jp", + "ginowan.okinawa.jp", + "ginoza.okinawa.jp", + "gushikami.okinawa.jp", + "haebaru.okinawa.jp", + "higashi.okinawa.jp", + "hirara.okinawa.jp", + "iheya.okinawa.jp", + "ishigaki.okinawa.jp", + "ishikawa.okinawa.jp", + "itoman.okinawa.jp", + "izena.okinawa.jp", + "kadena.okinawa.jp", + "kin.okinawa.jp", + "kitadaito.okinawa.jp", + "kitanakagusuku.okinawa.jp", + "kumejima.okinawa.jp", + "kunigami.okinawa.jp", + "minamidaito.okinawa.jp", + "motobu.okinawa.jp", + "nago.okinawa.jp", + "naha.okinawa.jp", + "nakagusuku.okinawa.jp", + "nakijin.okinawa.jp", + "nanjo.okinawa.jp", + "nishihara.okinawa.jp", + "ogimi.okinawa.jp", + "okinawa.okinawa.jp", + "onna.okinawa.jp", + "shimoji.okinawa.jp", + "taketomi.okinawa.jp", + "tarama.okinawa.jp", + "tokashiki.okinawa.jp", + "tomigusuku.okinawa.jp", + "tonaki.okinawa.jp", + "urasoe.okinawa.jp", + "uruma.okinawa.jp", + "yaese.okinawa.jp", + "yomitan.okinawa.jp", + "yonabaru.okinawa.jp", + "yonaguni.okinawa.jp", + "zamami.okinawa.jp", + "abeno.osaka.jp", + "chihayaakasaka.osaka.jp", + "chuo.osaka.jp", + "daito.osaka.jp", + "fujiidera.osaka.jp", + "habikino.osaka.jp", + "hannan.osaka.jp", + "higashiosaka.osaka.jp", + "higashisumiyoshi.osaka.jp", + "higashiyodogawa.osaka.jp", + "hirakata.osaka.jp", + "ibaraki.osaka.jp", + "ikeda.osaka.jp", + "izumi.osaka.jp", + "izumiotsu.osaka.jp", + "izumisano.osaka.jp", + "kadoma.osaka.jp", + "kaizuka.osaka.jp", + "kanan.osaka.jp", + "kashiwara.osaka.jp", + "katano.osaka.jp", + "kawachinagano.osaka.jp", + "kishiwada.osaka.jp", + "kita.osaka.jp", + "kumatori.osaka.jp", + "matsubara.osaka.jp", + "minato.osaka.jp", + "minoh.osaka.jp", + "misaki.osaka.jp", + "moriguchi.osaka.jp", + "neyagawa.osaka.jp", + "nishi.osaka.jp", + "nose.osaka.jp", + "osakasayama.osaka.jp", + "sakai.osaka.jp", + "sayama.osaka.jp", + "sennan.osaka.jp", + "settsu.osaka.jp", + "shijonawate.osaka.jp", + "shimamoto.osaka.jp", + "suita.osaka.jp", + "tadaoka.osaka.jp", + "taishi.osaka.jp", + "tajiri.osaka.jp", + "takaishi.osaka.jp", + "takatsuki.osaka.jp", + "tondabayashi.osaka.jp", + "toyonaka.osaka.jp", + "toyono.osaka.jp", + "yao.osaka.jp", + "ariake.saga.jp", + "arita.saga.jp", + "fukudomi.saga.jp", + "genkai.saga.jp", + "hamatama.saga.jp", + "hizen.saga.jp", + "imari.saga.jp", + "kamimine.saga.jp", + "kanzaki.saga.jp", + "karatsu.saga.jp", + "kashima.saga.jp", + "kitagata.saga.jp", + "kitahata.saga.jp", + "kiyama.saga.jp", + "kouhoku.saga.jp", + "kyuragi.saga.jp", + "nishiarita.saga.jp", + "ogi.saga.jp", + "omachi.saga.jp", + "ouchi.saga.jp", + "saga.saga.jp", + "shiroishi.saga.jp", + "taku.saga.jp", + "tara.saga.jp", + "tosu.saga.jp", + "yoshinogari.saga.jp", + "arakawa.saitama.jp", + "asaka.saitama.jp", + "chichibu.saitama.jp", + "fujimi.saitama.jp", + "fujimino.saitama.jp", + "fukaya.saitama.jp", + "hanno.saitama.jp", + "hanyu.saitama.jp", + "hasuda.saitama.jp", + "hatogaya.saitama.jp", + "hatoyama.saitama.jp", + "hidaka.saitama.jp", + "higashichichibu.saitama.jp", + "higashimatsuyama.saitama.jp", + "honjo.saitama.jp", + "ina.saitama.jp", + "iruma.saitama.jp", + "iwatsuki.saitama.jp", + "kamiizumi.saitama.jp", + "kamikawa.saitama.jp", + "kamisato.saitama.jp", + "kasukabe.saitama.jp", + "kawagoe.saitama.jp", + "kawaguchi.saitama.jp", + "kawajima.saitama.jp", + "kazo.saitama.jp", + "kitamoto.saitama.jp", + "koshigaya.saitama.jp", + "kounosu.saitama.jp", + "kuki.saitama.jp", + "kumagaya.saitama.jp", + "matsubushi.saitama.jp", + "minano.saitama.jp", + "misato.saitama.jp", + "miyashiro.saitama.jp", + "miyoshi.saitama.jp", + "moroyama.saitama.jp", + "nagatoro.saitama.jp", + "namegawa.saitama.jp", + "niiza.saitama.jp", + "ogano.saitama.jp", + "ogawa.saitama.jp", + "ogose.saitama.jp", + "okegawa.saitama.jp", + "omiya.saitama.jp", + "otaki.saitama.jp", + "ranzan.saitama.jp", + "ryokami.saitama.jp", + "saitama.saitama.jp", + "sakado.saitama.jp", + "satte.saitama.jp", + "sayama.saitama.jp", + "shiki.saitama.jp", + "shiraoka.saitama.jp", + "soka.saitama.jp", + "sugito.saitama.jp", + "toda.saitama.jp", + "tokigawa.saitama.jp", + "tokorozawa.saitama.jp", + "tsurugashima.saitama.jp", + "urawa.saitama.jp", + "warabi.saitama.jp", + "yashio.saitama.jp", + "yokoze.saitama.jp", + "yono.saitama.jp", + "yorii.saitama.jp", + "yoshida.saitama.jp", + "yoshikawa.saitama.jp", + "yoshimi.saitama.jp", + "aisho.shiga.jp", + "gamo.shiga.jp", + "higashiomi.shiga.jp", + "hikone.shiga.jp", + "koka.shiga.jp", + "konan.shiga.jp", + "kosei.shiga.jp", + "koto.shiga.jp", + "kusatsu.shiga.jp", + "maibara.shiga.jp", + "moriyama.shiga.jp", + "nagahama.shiga.jp", + "nishiazai.shiga.jp", + "notogawa.shiga.jp", + "omihachiman.shiga.jp", + "otsu.shiga.jp", + "ritto.shiga.jp", + "ryuoh.shiga.jp", + "takashima.shiga.jp", + "takatsuki.shiga.jp", + "torahime.shiga.jp", + "toyosato.shiga.jp", + "yasu.shiga.jp", + "akagi.shimane.jp", + "ama.shimane.jp", + "gotsu.shimane.jp", + "hamada.shimane.jp", + "higashiizumo.shimane.jp", + "hikawa.shimane.jp", + "hikimi.shimane.jp", + "izumo.shimane.jp", + "kakinoki.shimane.jp", + "masuda.shimane.jp", + "matsue.shimane.jp", + "misato.shimane.jp", + "nishinoshima.shimane.jp", + "ohda.shimane.jp", + "okinoshima.shimane.jp", + "okuizumo.shimane.jp", + "shimane.shimane.jp", + "tamayu.shimane.jp", + "tsuwano.shimane.jp", + "unnan.shimane.jp", + "yakumo.shimane.jp", + "yasugi.shimane.jp", + "yatsuka.shimane.jp", + "arai.shizuoka.jp", + "atami.shizuoka.jp", + "fuji.shizuoka.jp", + "fujieda.shizuoka.jp", + "fujikawa.shizuoka.jp", + "fujinomiya.shizuoka.jp", + "fukuroi.shizuoka.jp", + "gotemba.shizuoka.jp", + "haibara.shizuoka.jp", + "hamamatsu.shizuoka.jp", + "higashiizu.shizuoka.jp", + "ito.shizuoka.jp", + "iwata.shizuoka.jp", + "izu.shizuoka.jp", + "izunokuni.shizuoka.jp", + "kakegawa.shizuoka.jp", + "kannami.shizuoka.jp", + "kawanehon.shizuoka.jp", + "kawazu.shizuoka.jp", + "kikugawa.shizuoka.jp", + "kosai.shizuoka.jp", + "makinohara.shizuoka.jp", + "matsuzaki.shizuoka.jp", + "minamiizu.shizuoka.jp", + "mishima.shizuoka.jp", + "morimachi.shizuoka.jp", + "nishiizu.shizuoka.jp", + "numazu.shizuoka.jp", + "omaezaki.shizuoka.jp", + "shimada.shizuoka.jp", + "shimizu.shizuoka.jp", + "shimoda.shizuoka.jp", + "shizuoka.shizuoka.jp", + "susono.shizuoka.jp", + "yaizu.shizuoka.jp", + "yoshida.shizuoka.jp", + "ashikaga.tochigi.jp", + "bato.tochigi.jp", + "haga.tochigi.jp", + "ichikai.tochigi.jp", + "iwafune.tochigi.jp", + "kaminokawa.tochigi.jp", + "kanuma.tochigi.jp", + "karasuyama.tochigi.jp", + "kuroiso.tochigi.jp", + "mashiko.tochigi.jp", + "mibu.tochigi.jp", + "moka.tochigi.jp", + "motegi.tochigi.jp", + "nasu.tochigi.jp", + "nasushiobara.tochigi.jp", + "nikko.tochigi.jp", + "nishikata.tochigi.jp", + "nogi.tochigi.jp", + "ohira.tochigi.jp", + "ohtawara.tochigi.jp", + "oyama.tochigi.jp", + "sakura.tochigi.jp", + "sano.tochigi.jp", + "shimotsuke.tochigi.jp", + "shioya.tochigi.jp", + "takanezawa.tochigi.jp", + "tochigi.tochigi.jp", + "tsuga.tochigi.jp", + "ujiie.tochigi.jp", + "utsunomiya.tochigi.jp", + "yaita.tochigi.jp", + "aizumi.tokushima.jp", + "anan.tokushima.jp", + "ichiba.tokushima.jp", + "itano.tokushima.jp", + "kainan.tokushima.jp", + "komatsushima.tokushima.jp", + "matsushige.tokushima.jp", + "mima.tokushima.jp", + "minami.tokushima.jp", + "miyoshi.tokushima.jp", + "mugi.tokushima.jp", + "nakagawa.tokushima.jp", + "naruto.tokushima.jp", + "sanagochi.tokushima.jp", + "shishikui.tokushima.jp", + "tokushima.tokushima.jp", + "wajiki.tokushima.jp", + "adachi.tokyo.jp", + "akiruno.tokyo.jp", + "akishima.tokyo.jp", + "aogashima.tokyo.jp", + "arakawa.tokyo.jp", + "bunkyo.tokyo.jp", + "chiyoda.tokyo.jp", + "chofu.tokyo.jp", + "chuo.tokyo.jp", + "edogawa.tokyo.jp", + "fuchu.tokyo.jp", + "fussa.tokyo.jp", + "hachijo.tokyo.jp", + "hachioji.tokyo.jp", + "hamura.tokyo.jp", + "higashikurume.tokyo.jp", + "higashimurayama.tokyo.jp", + "higashiyamato.tokyo.jp", + "hino.tokyo.jp", + "hinode.tokyo.jp", + "hinohara.tokyo.jp", + "inagi.tokyo.jp", + "itabashi.tokyo.jp", + "katsushika.tokyo.jp", + "kita.tokyo.jp", + "kiyose.tokyo.jp", + "kodaira.tokyo.jp", + "koganei.tokyo.jp", + "kokubunji.tokyo.jp", + "komae.tokyo.jp", + "koto.tokyo.jp", + "kouzushima.tokyo.jp", + "kunitachi.tokyo.jp", + "machida.tokyo.jp", + "meguro.tokyo.jp", + "minato.tokyo.jp", + "mitaka.tokyo.jp", + "mizuho.tokyo.jp", + "musashimurayama.tokyo.jp", + "musashino.tokyo.jp", + "nakano.tokyo.jp", + "nerima.tokyo.jp", + "ogasawara.tokyo.jp", + "okutama.tokyo.jp", + "ome.tokyo.jp", + "oshima.tokyo.jp", + "ota.tokyo.jp", + "setagaya.tokyo.jp", + "shibuya.tokyo.jp", + "shinagawa.tokyo.jp", + "shinjuku.tokyo.jp", + "suginami.tokyo.jp", + "sumida.tokyo.jp", + "tachikawa.tokyo.jp", + "taito.tokyo.jp", + "tama.tokyo.jp", + "toshima.tokyo.jp", + "chizu.tottori.jp", + "hino.tottori.jp", + "kawahara.tottori.jp", + "koge.tottori.jp", + "kotoura.tottori.jp", + "misasa.tottori.jp", + "nanbu.tottori.jp", + "nichinan.tottori.jp", + "sakaiminato.tottori.jp", + "tottori.tottori.jp", + "wakasa.tottori.jp", + "yazu.tottori.jp", + "yonago.tottori.jp", + "asahi.toyama.jp", + "fuchu.toyama.jp", + "fukumitsu.toyama.jp", + "funahashi.toyama.jp", + "himi.toyama.jp", + "imizu.toyama.jp", + "inami.toyama.jp", + "johana.toyama.jp", + "kamiichi.toyama.jp", + "kurobe.toyama.jp", + "nakaniikawa.toyama.jp", + "namerikawa.toyama.jp", + "nanto.toyama.jp", + "nyuzen.toyama.jp", + "oyabe.toyama.jp", + "taira.toyama.jp", + "takaoka.toyama.jp", + "tateyama.toyama.jp", + "toga.toyama.jp", + "tonami.toyama.jp", + "toyama.toyama.jp", + "unazuki.toyama.jp", + "uozu.toyama.jp", + "yamada.toyama.jp", + "arida.wakayama.jp", + "aridagawa.wakayama.jp", + "gobo.wakayama.jp", + "hashimoto.wakayama.jp", + "hidaka.wakayama.jp", + "hirogawa.wakayama.jp", + "inami.wakayama.jp", + "iwade.wakayama.jp", + "kainan.wakayama.jp", + "kamitonda.wakayama.jp", + "katsuragi.wakayama.jp", + "kimino.wakayama.jp", + "kinokawa.wakayama.jp", + "kitayama.wakayama.jp", + "koya.wakayama.jp", + "koza.wakayama.jp", + "kozagawa.wakayama.jp", + "kudoyama.wakayama.jp", + "kushimoto.wakayama.jp", + "mihama.wakayama.jp", + "misato.wakayama.jp", + "nachikatsuura.wakayama.jp", + "shingu.wakayama.jp", + "shirahama.wakayama.jp", + "taiji.wakayama.jp", + "tanabe.wakayama.jp", + "wakayama.wakayama.jp", + "yuasa.wakayama.jp", + "yura.wakayama.jp", + "asahi.yamagata.jp", + "funagata.yamagata.jp", + "higashine.yamagata.jp", + "iide.yamagata.jp", + "kahoku.yamagata.jp", + "kaminoyama.yamagata.jp", + "kaneyama.yamagata.jp", + "kawanishi.yamagata.jp", + "mamurogawa.yamagata.jp", + "mikawa.yamagata.jp", + "murayama.yamagata.jp", + "nagai.yamagata.jp", + "nakayama.yamagata.jp", + "nanyo.yamagata.jp", + "nishikawa.yamagata.jp", + "obanazawa.yamagata.jp", + "oe.yamagata.jp", + "oguni.yamagata.jp", + "ohkura.yamagata.jp", + "oishida.yamagata.jp", + "sagae.yamagata.jp", + "sakata.yamagata.jp", + "sakegawa.yamagata.jp", + "shinjo.yamagata.jp", + "shirataka.yamagata.jp", + "shonai.yamagata.jp", + "takahata.yamagata.jp", + "tendo.yamagata.jp", + "tozawa.yamagata.jp", + "tsuruoka.yamagata.jp", + "yamagata.yamagata.jp", + "yamanobe.yamagata.jp", + "yonezawa.yamagata.jp", + "yuza.yamagata.jp", + "abu.yamaguchi.jp", + "hagi.yamaguchi.jp", + "hikari.yamaguchi.jp", + "hofu.yamaguchi.jp", + "iwakuni.yamaguchi.jp", + "kudamatsu.yamaguchi.jp", + "mitou.yamaguchi.jp", + "nagato.yamaguchi.jp", + "oshima.yamaguchi.jp", + "shimonoseki.yamaguchi.jp", + "shunan.yamaguchi.jp", + "tabuse.yamaguchi.jp", + "tokuyama.yamaguchi.jp", + "toyota.yamaguchi.jp", + "ube.yamaguchi.jp", + "yuu.yamaguchi.jp", + "chuo.yamanashi.jp", + "doshi.yamanashi.jp", + "fuefuki.yamanashi.jp", + "fujikawa.yamanashi.jp", + "fujikawaguchiko.yamanashi.jp", + "fujiyoshida.yamanashi.jp", + "hayakawa.yamanashi.jp", + "hokuto.yamanashi.jp", + "ichikawamisato.yamanashi.jp", + "kai.yamanashi.jp", + "kofu.yamanashi.jp", + "koshu.yamanashi.jp", + "kosuge.yamanashi.jp", + "minami-alps.yamanashi.jp", + "minobu.yamanashi.jp", + "nakamichi.yamanashi.jp", + "nanbu.yamanashi.jp", + "narusawa.yamanashi.jp", + "nirasaki.yamanashi.jp", + "nishikatsura.yamanashi.jp", + "oshino.yamanashi.jp", + "otsuki.yamanashi.jp", + "showa.yamanashi.jp", + "tabayama.yamanashi.jp", + "tsuru.yamanashi.jp", + "uenohara.yamanashi.jp", + "yamanakako.yamanashi.jp", + "yamanashi.yamanashi.jp", + "*.ke", + "kg", + "org.kg", + "net.kg", + "com.kg", + "edu.kg", + "gov.kg", + "mil.kg", + "*.kh", + "ki", + "edu.ki", + "biz.ki", + "net.ki", + "org.ki", + "gov.ki", + "info.ki", + "com.ki", + "km", + "org.km", + "nom.km", + "gov.km", + "prd.km", + "tm.km", + "edu.km", + "mil.km", + "ass.km", + "com.km", + "coop.km", + "asso.km", + "presse.km", + "medecin.km", + "notaires.km", + "pharmaciens.km", + "veterinaire.km", + "gouv.km", + "kn", + "net.kn", + "org.kn", + "edu.kn", + "gov.kn", + "kp", + "com.kp", + "edu.kp", + "gov.kp", + "org.kp", + "rep.kp", + "tra.kp", + "kr", + "ac.kr", + "co.kr", + "es.kr", + "go.kr", + "hs.kr", + "kg.kr", + "mil.kr", + "ms.kr", + "ne.kr", + "or.kr", + "pe.kr", + "re.kr", + "sc.kr", + "busan.kr", + "chungbuk.kr", + "chungnam.kr", + "daegu.kr", + "daejeon.kr", + "gangwon.kr", + "gwangju.kr", + "gyeongbuk.kr", + "gyeonggi.kr", + "gyeongnam.kr", + "incheon.kr", + "jeju.kr", + "jeonbuk.kr", + "jeonnam.kr", + "seoul.kr", + "ulsan.kr", + "*.kw", + "ky", + "edu.ky", + "gov.ky", + "com.ky", + "org.ky", + "net.ky", + "kz", + "org.kz", + "edu.kz", + "net.kz", + "gov.kz", + "mil.kz", + "com.kz", + "la", + "int.la", + "net.la", + "info.la", + "edu.la", + "gov.la", + "per.la", + "com.la", + "org.la", + "lb", + "com.lb", + "edu.lb", + "gov.lb", + "net.lb", + "org.lb", + "lc", + "com.lc", + "net.lc", + "co.lc", + "org.lc", + "edu.lc", + "gov.lc", + "li", + "lk", + "gov.lk", + "sch.lk", + "net.lk", + "int.lk", + "com.lk", + "org.lk", + "edu.lk", + "ngo.lk", + "soc.lk", + "web.lk", + "ltd.lk", + "assn.lk", + "grp.lk", + "hotel.lk", + "ac.lk", + "lr", + "com.lr", + "edu.lr", + "gov.lr", + "org.lr", + "net.lr", + "ls", + "co.ls", + "org.ls", + "lt", + "gov.lt", + "lu", + "lv", + "com.lv", + "edu.lv", + "gov.lv", + "org.lv", + "mil.lv", + "id.lv", + "net.lv", + "asn.lv", + "conf.lv", + "ly", + "com.ly", + "net.ly", + "gov.ly", + "plc.ly", + "edu.ly", + "sch.ly", + "med.ly", + "org.ly", + "id.ly", + "ma", + "co.ma", + "net.ma", + "gov.ma", + "org.ma", + "ac.ma", + "press.ma", + "mc", + "tm.mc", + "asso.mc", + "md", + "me", + "co.me", + "net.me", + "org.me", + "edu.me", + "ac.me", + "gov.me", + "its.me", + "priv.me", + "mg", + "org.mg", + "nom.mg", + "gov.mg", + "prd.mg", + "tm.mg", + "edu.mg", + "mil.mg", + "com.mg", + "co.mg", + "mh", + "mil", + "mk", + "com.mk", + "org.mk", + "net.mk", + "edu.mk", + "gov.mk", + "inf.mk", + "name.mk", + "ml", + "com.ml", + "edu.ml", + "gouv.ml", + "gov.ml", + "net.ml", + "org.ml", + "presse.ml", + "*.mm", + "mn", + "gov.mn", + "edu.mn", + "org.mn", + "mo", + "com.mo", + "net.mo", + "org.mo", + "edu.mo", + "gov.mo", + "mobi", + "mp", + "mq", + "mr", + "gov.mr", + "ms", + "com.ms", + "edu.ms", + "gov.ms", + "net.ms", + "org.ms", + "mt", + "com.mt", + "edu.mt", + "net.mt", + "org.mt", + "mu", + "com.mu", + "net.mu", + "org.mu", + "gov.mu", + "ac.mu", + "co.mu", + "or.mu", + "museum", + "academy.museum", + "agriculture.museum", + "air.museum", + "airguard.museum", + "alabama.museum", + "alaska.museum", + "amber.museum", + "ambulance.museum", + "american.museum", + "americana.museum", + "americanantiques.museum", + "americanart.museum", + "amsterdam.museum", + "and.museum", + "annefrank.museum", + "anthro.museum", + "anthropology.museum", + "antiques.museum", + "aquarium.museum", + "arboretum.museum", + "archaeological.museum", + "archaeology.museum", + "architecture.museum", + "art.museum", + "artanddesign.museum", + "artcenter.museum", + "artdeco.museum", + "arteducation.museum", + "artgallery.museum", + "arts.museum", + "artsandcrafts.museum", + "asmatart.museum", + "assassination.museum", + "assisi.museum", + "association.museum", + "astronomy.museum", + "atlanta.museum", + "austin.museum", + "australia.museum", + "automotive.museum", + "aviation.museum", + "axis.museum", + "badajoz.museum", + "baghdad.museum", + "bahn.museum", + "bale.museum", + "baltimore.museum", + "barcelona.museum", + "baseball.museum", + "basel.museum", + "baths.museum", + "bauern.museum", + "beauxarts.museum", + "beeldengeluid.museum", + "bellevue.museum", + "bergbau.museum", + "berkeley.museum", + "berlin.museum", + "bern.museum", + "bible.museum", + "bilbao.museum", + "bill.museum", + "birdart.museum", + "birthplace.museum", + "bonn.museum", + "boston.museum", + "botanical.museum", + "botanicalgarden.museum", + "botanicgarden.museum", + "botany.museum", + "brandywinevalley.museum", + "brasil.museum", + "bristol.museum", + "british.museum", + "britishcolumbia.museum", + "broadcast.museum", + "brunel.museum", + "brussel.museum", + "brussels.museum", + "bruxelles.museum", + "building.museum", + "burghof.museum", + "bus.museum", + "bushey.museum", + "cadaques.museum", + "california.museum", + "cambridge.museum", + "can.museum", + "canada.museum", + "capebreton.museum", + "carrier.museum", + "cartoonart.museum", + "casadelamoneda.museum", + "castle.museum", + "castres.museum", + "celtic.museum", + "center.museum", + "chattanooga.museum", + "cheltenham.museum", + "chesapeakebay.museum", + "chicago.museum", + "children.museum", + "childrens.museum", + "childrensgarden.museum", + "chiropractic.museum", + "chocolate.museum", + "christiansburg.museum", + "cincinnati.museum", + "cinema.museum", + "circus.museum", + "civilisation.museum", + "civilization.museum", + "civilwar.museum", + "clinton.museum", + "clock.museum", + "coal.museum", + "coastaldefence.museum", + "cody.museum", + "coldwar.museum", + "collection.museum", + "colonialwilliamsburg.museum", + "coloradoplateau.museum", + "columbia.museum", + "columbus.museum", + "communication.museum", + "communications.museum", + "community.museum", + "computer.museum", + "computerhistory.museum", + "xn--comunicaes-v6a2o.museum", + "contemporary.museum", + "contemporaryart.museum", + "convent.museum", + "copenhagen.museum", + "corporation.museum", + "xn--correios-e-telecomunicaes-ghc29a.museum", + "corvette.museum", + "costume.museum", + "countryestate.museum", + "county.museum", + "crafts.museum", + "cranbrook.museum", + "creation.museum", + "cultural.museum", + "culturalcenter.museum", + "culture.museum", + "cyber.museum", + "cymru.museum", + "dali.museum", + "dallas.museum", + "database.museum", + "ddr.museum", + "decorativearts.museum", + "delaware.museum", + "delmenhorst.museum", + "denmark.museum", + "depot.museum", + "design.museum", + "detroit.museum", + "dinosaur.museum", + "discovery.museum", + "dolls.museum", + "donostia.museum", + "durham.museum", + "eastafrica.museum", + "eastcoast.museum", + "education.museum", + "educational.museum", + "egyptian.museum", + "eisenbahn.museum", + "elburg.museum", + "elvendrell.museum", + "embroidery.museum", + "encyclopedic.museum", + "england.museum", + "entomology.museum", + "environment.museum", + "environmentalconservation.museum", + "epilepsy.museum", + "essex.museum", + "estate.museum", + "ethnology.museum", + "exeter.museum", + "exhibition.museum", + "family.museum", + "farm.museum", + "farmequipment.museum", + "farmers.museum", + "farmstead.museum", + "field.museum", + "figueres.museum", + "filatelia.museum", + "film.museum", + "fineart.museum", + "finearts.museum", + "finland.museum", + "flanders.museum", + "florida.museum", + "force.museum", + "fortmissoula.museum", + "fortworth.museum", + "foundation.museum", + "francaise.museum", + "frankfurt.museum", + "franziskaner.museum", + "freemasonry.museum", + "freiburg.museum", + "fribourg.museum", + "frog.museum", + "fundacio.museum", + "furniture.museum", + "gallery.museum", + "garden.museum", + "gateway.museum", + "geelvinck.museum", + "gemological.museum", + "geology.museum", + "georgia.museum", + "giessen.museum", + "glas.museum", + "glass.museum", + "gorge.museum", + "grandrapids.museum", + "graz.museum", + "guernsey.museum", + "halloffame.museum", + "hamburg.museum", + "handson.museum", + "harvestcelebration.museum", + "hawaii.museum", + "health.museum", + "heimatunduhren.museum", + "hellas.museum", + "helsinki.museum", + "hembygdsforbund.museum", + "heritage.museum", + "histoire.museum", + "historical.museum", + "historicalsociety.museum", + "historichouses.museum", + "historisch.museum", + "historisches.museum", + "history.museum", + "historyofscience.museum", + "horology.museum", + "house.museum", + "humanities.museum", + "illustration.museum", + "imageandsound.museum", + "indian.museum", + "indiana.museum", + "indianapolis.museum", + "indianmarket.museum", + "intelligence.museum", + "interactive.museum", + "iraq.museum", + "iron.museum", + "isleofman.museum", + "jamison.museum", + "jefferson.museum", + "jerusalem.museum", + "jewelry.museum", + "jewish.museum", + "jewishart.museum", + "jfk.museum", + "journalism.museum", + "judaica.museum", + "judygarland.museum", + "juedisches.museum", + "juif.museum", + "karate.museum", + "karikatur.museum", + "kids.museum", + "koebenhavn.museum", + "koeln.museum", + "kunst.museum", + "kunstsammlung.museum", + "kunstunddesign.museum", + "labor.museum", + "labour.museum", + "lajolla.museum", + "lancashire.museum", + "landes.museum", + "lans.museum", + "xn--lns-qla.museum", + "larsson.museum", + "lewismiller.museum", + "lincoln.museum", + "linz.museum", + "living.museum", + "livinghistory.museum", + "localhistory.museum", + "london.museum", + "losangeles.museum", + "louvre.museum", + "loyalist.museum", + "lucerne.museum", + "luxembourg.museum", + "luzern.museum", + "mad.museum", + "madrid.museum", + "mallorca.museum", + "manchester.museum", + "mansion.museum", + "mansions.museum", + "manx.museum", + "marburg.museum", + "maritime.museum", + "maritimo.museum", + "maryland.museum", + "marylhurst.museum", + "media.museum", + "medical.museum", + "medizinhistorisches.museum", + "meeres.museum", + "memorial.museum", + "mesaverde.museum", + "michigan.museum", + "midatlantic.museum", + "military.museum", + "mill.museum", + "miners.museum", + "mining.museum", + "minnesota.museum", + "missile.museum", + "missoula.museum", + "modern.museum", + "moma.museum", + "money.museum", + "monmouth.museum", + "monticello.museum", + "montreal.museum", + "moscow.museum", + "motorcycle.museum", + "muenchen.museum", + "muenster.museum", + "mulhouse.museum", + "muncie.museum", + "museet.museum", + "museumcenter.museum", + "museumvereniging.museum", + "music.museum", + "national.museum", + "nationalfirearms.museum", + "nationalheritage.museum", + "nativeamerican.museum", + "naturalhistory.museum", + "naturalhistorymuseum.museum", + "naturalsciences.museum", + "nature.museum", + "naturhistorisches.museum", + "natuurwetenschappen.museum", + "naumburg.museum", + "naval.museum", + "nebraska.museum", + "neues.museum", + "newhampshire.museum", + "newjersey.museum", + "newmexico.museum", + "newport.museum", + "newspaper.museum", + "newyork.museum", + "niepce.museum", + "norfolk.museum", + "north.museum", + "nrw.museum", + "nuernberg.museum", + "nuremberg.museum", + "nyc.museum", + "nyny.museum", + "oceanographic.museum", + "oceanographique.museum", + "omaha.museum", + "online.museum", + "ontario.museum", + "openair.museum", + "oregon.museum", + "oregontrail.museum", + "otago.museum", + "oxford.museum", + "pacific.museum", + "paderborn.museum", + "palace.museum", + "paleo.museum", + "palmsprings.museum", + "panama.museum", + "paris.museum", + "pasadena.museum", + "pharmacy.museum", + "philadelphia.museum", + "philadelphiaarea.museum", + "philately.museum", + "phoenix.museum", + "photography.museum", + "pilots.museum", + "pittsburgh.museum", + "planetarium.museum", + "plantation.museum", + "plants.museum", + "plaza.museum", + "portal.museum", + "portland.museum", + "portlligat.museum", + "posts-and-telecommunications.museum", + "preservation.museum", + "presidio.museum", + "press.museum", + "project.museum", + "public.museum", + "pubol.museum", + "quebec.museum", + "railroad.museum", + "railway.museum", + "research.museum", + "resistance.museum", + "riodejaneiro.museum", + "rochester.museum", + "rockart.museum", + "roma.museum", + "russia.museum", + "saintlouis.museum", + "salem.museum", + "salvadordali.museum", + "salzburg.museum", + "sandiego.museum", + "sanfrancisco.museum", + "santabarbara.museum", + "santacruz.museum", + "santafe.museum", + "saskatchewan.museum", + "satx.museum", + "savannahga.museum", + "schlesisches.museum", + "schoenbrunn.museum", + "schokoladen.museum", + "school.museum", + "schweiz.museum", + "science.museum", + "scienceandhistory.museum", + "scienceandindustry.museum", + "sciencecenter.museum", + "sciencecenters.museum", + "science-fiction.museum", + "sciencehistory.museum", + "sciences.museum", + "sciencesnaturelles.museum", + "scotland.museum", + "seaport.museum", + "settlement.museum", + "settlers.museum", + "shell.museum", + "sherbrooke.museum", + "sibenik.museum", + "silk.museum", + "ski.museum", + "skole.museum", + "society.museum", + "sologne.museum", + "soundandvision.museum", + "southcarolina.museum", + "southwest.museum", + "space.museum", + "spy.museum", + "square.museum", + "stadt.museum", + "stalbans.museum", + "starnberg.museum", + "state.museum", + "stateofdelaware.museum", + "station.museum", + "steam.museum", + "steiermark.museum", + "stjohn.museum", + "stockholm.museum", + "stpetersburg.museum", + "stuttgart.museum", + "suisse.museum", + "surgeonshall.museum", + "surrey.museum", + "svizzera.museum", + "sweden.museum", + "sydney.museum", + "tank.museum", + "tcm.museum", + "technology.museum", + "telekommunikation.museum", + "television.museum", + "texas.museum", + "textile.museum", + "theater.museum", + "time.museum", + "timekeeping.museum", + "topology.museum", + "torino.museum", + "touch.museum", + "town.museum", + "transport.museum", + "tree.museum", + "trolley.museum", + "trust.museum", + "trustee.museum", + "uhren.museum", + "ulm.museum", + "undersea.museum", + "university.museum", + "usa.museum", + "usantiques.museum", + "usarts.museum", + "uscountryestate.museum", + "usculture.museum", + "usdecorativearts.museum", + "usgarden.museum", + "ushistory.museum", + "ushuaia.museum", + "uslivinghistory.museum", + "utah.museum", + "uvic.museum", + "valley.museum", + "vantaa.museum", + "versailles.museum", + "viking.museum", + "village.museum", + "virginia.museum", + "virtual.museum", + "virtuel.museum", + "vlaanderen.museum", + "volkenkunde.museum", + "wales.museum", + "wallonie.museum", + "war.museum", + "washingtondc.museum", + "watchandclock.museum", + "watch-and-clock.museum", + "western.museum", + "westfalen.museum", + "whaling.museum", + "wildlife.museum", + "williamsburg.museum", + "windmill.museum", + "workshop.museum", + "york.museum", + "yorkshire.museum", + "yosemite.museum", + "youth.museum", + "zoological.museum", + "zoology.museum", + "xn--9dbhblg6di.museum", + "xn--h1aegh.museum", + "mv", + "aero.mv", + "biz.mv", + "com.mv", + "coop.mv", + "edu.mv", + "gov.mv", + "info.mv", + "int.mv", + "mil.mv", + "museum.mv", + "name.mv", + "net.mv", + "org.mv", + "pro.mv", + "mw", + "ac.mw", + "biz.mw", + "co.mw", + "com.mw", + "coop.mw", + "edu.mw", + "gov.mw", + "int.mw", + "museum.mw", + "net.mw", + "org.mw", + "mx", + "com.mx", + "org.mx", + "gob.mx", + "edu.mx", + "net.mx", + "my", + "com.my", + "net.my", + "org.my", + "gov.my", + "edu.my", + "mil.my", + "name.my", + "*.mz", + "!teledata.mz", + "na", + "info.na", + "pro.na", + "name.na", + "school.na", + "or.na", + "dr.na", + "us.na", + "mx.na", + "ca.na", + "in.na", + "cc.na", + "tv.na", + "ws.na", + "mobi.na", + "co.na", + "com.na", + "org.na", + "name", + "nc", + "asso.nc", + "ne", + "net", + "nf", + "com.nf", + "net.nf", + "per.nf", + "rec.nf", + "web.nf", + "arts.nf", + "firm.nf", + "info.nf", + "other.nf", + "store.nf", + "ng", + "com.ng", + "edu.ng", + "name.ng", + "net.ng", + "org.ng", + "sch.ng", + "gov.ng", + "mil.ng", + "mobi.ng", + "*.ni", + "nl", + "bv.nl", + "no", + "fhs.no", + "vgs.no", + "fylkesbibl.no", + "folkebibl.no", + "museum.no", + "idrett.no", + "priv.no", + "mil.no", + "stat.no", + "dep.no", + "kommune.no", + "herad.no", + "aa.no", + "ah.no", + "bu.no", + "fm.no", + "hl.no", + "hm.no", + "jan-mayen.no", + "mr.no", + "nl.no", + "nt.no", + "of.no", + "ol.no", + "oslo.no", + "rl.no", + "sf.no", + "st.no", + "svalbard.no", + "tm.no", + "tr.no", + "va.no", + "vf.no", + "gs.aa.no", + "gs.ah.no", + "gs.bu.no", + "gs.fm.no", + "gs.hl.no", + "gs.hm.no", + "gs.jan-mayen.no", + "gs.mr.no", + "gs.nl.no", + "gs.nt.no", + "gs.of.no", + "gs.ol.no", + "gs.oslo.no", + "gs.rl.no", + "gs.sf.no", + "gs.st.no", + "gs.svalbard.no", + "gs.tm.no", + "gs.tr.no", + "gs.va.no", + "gs.vf.no", + "akrehamn.no", + "xn--krehamn-dxa.no", + "algard.no", + "xn--lgrd-poac.no", + "arna.no", + "brumunddal.no", + "bryne.no", + "bronnoysund.no", + "xn--brnnysund-m8ac.no", + "drobak.no", + "xn--drbak-wua.no", + "egersund.no", + "fetsund.no", + "floro.no", + "xn--flor-jra.no", + "fredrikstad.no", + "hokksund.no", + "honefoss.no", + "xn--hnefoss-q1a.no", + "jessheim.no", + "jorpeland.no", + "xn--jrpeland-54a.no", + "kirkenes.no", + "kopervik.no", + "krokstadelva.no", + "langevag.no", + "xn--langevg-jxa.no", + "leirvik.no", + "mjondalen.no", + "xn--mjndalen-64a.no", + "mo-i-rana.no", + "mosjoen.no", + "xn--mosjen-eya.no", + "nesoddtangen.no", + "orkanger.no", + "osoyro.no", + "xn--osyro-wua.no", + "raholt.no", + "xn--rholt-mra.no", + "sandnessjoen.no", + "xn--sandnessjen-ogb.no", + "skedsmokorset.no", + "slattum.no", + "spjelkavik.no", + "stathelle.no", + "stavern.no", + "stjordalshalsen.no", + "xn--stjrdalshalsen-sqb.no", + "tananger.no", + "tranby.no", + "vossevangen.no", + "afjord.no", + "xn--fjord-lra.no", + "agdenes.no", + "al.no", + "xn--l-1fa.no", + "alesund.no", + "xn--lesund-hua.no", + "alstahaug.no", + "alta.no", + "xn--lt-liac.no", + "alaheadju.no", + "xn--laheadju-7ya.no", + "alvdal.no", + "amli.no", + "xn--mli-tla.no", + "amot.no", + "xn--mot-tla.no", + "andebu.no", + "andoy.no", + "xn--andy-ira.no", + "andasuolo.no", + "ardal.no", + "xn--rdal-poa.no", + "aremark.no", + "arendal.no", + "xn--s-1fa.no", + "aseral.no", + "xn--seral-lra.no", + "asker.no", + "askim.no", + "askvoll.no", + "askoy.no", + "xn--asky-ira.no", + "asnes.no", + "xn--snes-poa.no", + "audnedaln.no", + "aukra.no", + "aure.no", + "aurland.no", + "aurskog-holand.no", + "xn--aurskog-hland-jnb.no", + "austevoll.no", + "austrheim.no", + "averoy.no", + "xn--avery-yua.no", + "balestrand.no", + "ballangen.no", + "balat.no", + "xn--blt-elab.no", + "balsfjord.no", + "bahccavuotna.no", + "xn--bhccavuotna-k7a.no", + "bamble.no", + "bardu.no", + "beardu.no", + "beiarn.no", + "bajddar.no", + "xn--bjddar-pta.no", + "baidar.no", + "xn--bidr-5nac.no", + "berg.no", + "bergen.no", + "berlevag.no", + "xn--berlevg-jxa.no", + "bearalvahki.no", + "xn--bearalvhki-y4a.no", + "bindal.no", + "birkenes.no", + "bjarkoy.no", + "xn--bjarky-fya.no", + "bjerkreim.no", + "bjugn.no", + "bodo.no", + "xn--bod-2na.no", + "badaddja.no", + "xn--bdddj-mrabd.no", + "budejju.no", + "bokn.no", + "bremanger.no", + "bronnoy.no", + "xn--brnny-wuac.no", + "bygland.no", + "bykle.no", + "barum.no", + "xn--brum-voa.no", + "bo.telemark.no", + "xn--b-5ga.telemark.no", + "bo.nordland.no", + "xn--b-5ga.nordland.no", + "bievat.no", + "xn--bievt-0qa.no", + "bomlo.no", + "xn--bmlo-gra.no", + "batsfjord.no", + "xn--btsfjord-9za.no", + "bahcavuotna.no", + "xn--bhcavuotna-s4a.no", + "dovre.no", + "drammen.no", + "drangedal.no", + "dyroy.no", + "xn--dyry-ira.no", + "donna.no", + "xn--dnna-gra.no", + "eid.no", + "eidfjord.no", + "eidsberg.no", + "eidskog.no", + "eidsvoll.no", + "eigersund.no", + "elverum.no", + "enebakk.no", + "engerdal.no", + "etne.no", + "etnedal.no", + "evenes.no", + "evenassi.no", + "xn--eveni-0qa01ga.no", + "evje-og-hornnes.no", + "farsund.no", + "fauske.no", + "fuossko.no", + "fuoisku.no", + "fedje.no", + "fet.no", + "finnoy.no", + "xn--finny-yua.no", + "fitjar.no", + "fjaler.no", + "fjell.no", + "flakstad.no", + "flatanger.no", + "flekkefjord.no", + "flesberg.no", + "flora.no", + "fla.no", + "xn--fl-zia.no", + "folldal.no", + "forsand.no", + "fosnes.no", + "frei.no", + "frogn.no", + "froland.no", + "frosta.no", + "frana.no", + "xn--frna-woa.no", + "froya.no", + "xn--frya-hra.no", + "fusa.no", + "fyresdal.no", + "forde.no", + "xn--frde-gra.no", + "gamvik.no", + "gangaviika.no", + "xn--ggaviika-8ya47h.no", + "gaular.no", + "gausdal.no", + "gildeskal.no", + "xn--gildeskl-g0a.no", + "giske.no", + "gjemnes.no", + "gjerdrum.no", + "gjerstad.no", + "gjesdal.no", + "gjovik.no", + "xn--gjvik-wua.no", + "gloppen.no", + "gol.no", + "gran.no", + "grane.no", + "granvin.no", + "gratangen.no", + "grimstad.no", + "grong.no", + "kraanghke.no", + "xn--kranghke-b0a.no", + "grue.no", + "gulen.no", + "hadsel.no", + "halden.no", + "halsa.no", + "hamar.no", + "hamaroy.no", + "habmer.no", + "xn--hbmer-xqa.no", + "hapmir.no", + "xn--hpmir-xqa.no", + "hammerfest.no", + "hammarfeasta.no", + "xn--hmmrfeasta-s4ac.no", + "haram.no", + "hareid.no", + "harstad.no", + "hasvik.no", + "aknoluokta.no", + "xn--koluokta-7ya57h.no", + "hattfjelldal.no", + "aarborte.no", + "haugesund.no", + "hemne.no", + "hemnes.no", + "hemsedal.no", + "heroy.more-og-romsdal.no", + "xn--hery-ira.xn--mre-og-romsdal-qqb.no", + "heroy.nordland.no", + "xn--hery-ira.nordland.no", + "hitra.no", + "hjartdal.no", + "hjelmeland.no", + "hobol.no", + "xn--hobl-ira.no", + "hof.no", + "hol.no", + "hole.no", + "holmestrand.no", + "holtalen.no", + "xn--holtlen-hxa.no", + "hornindal.no", + "horten.no", + "hurdal.no", + "hurum.no", + "hvaler.no", + "hyllestad.no", + "hagebostad.no", + "xn--hgebostad-g3a.no", + "hoyanger.no", + "xn--hyanger-q1a.no", + "hoylandet.no", + "xn--hylandet-54a.no", + "ha.no", + "xn--h-2fa.no", + "ibestad.no", + "inderoy.no", + "xn--indery-fya.no", + "iveland.no", + "jevnaker.no", + "jondal.no", + "jolster.no", + "xn--jlster-bya.no", + "karasjok.no", + "karasjohka.no", + "xn--krjohka-hwab49j.no", + "karlsoy.no", + "galsa.no", + "xn--gls-elac.no", + "karmoy.no", + "xn--karmy-yua.no", + "kautokeino.no", + "guovdageaidnu.no", + "klepp.no", + "klabu.no", + "xn--klbu-woa.no", + "kongsberg.no", + "kongsvinger.no", + "kragero.no", + "xn--krager-gya.no", + "kristiansand.no", + "kristiansund.no", + "krodsherad.no", + "xn--krdsherad-m8a.no", + "kvalsund.no", + "rahkkeravju.no", + "xn--rhkkervju-01af.no", + "kvam.no", + "kvinesdal.no", + "kvinnherad.no", + "kviteseid.no", + "kvitsoy.no", + "xn--kvitsy-fya.no", + "kvafjord.no", + "xn--kvfjord-nxa.no", + "giehtavuoatna.no", + "kvanangen.no", + "xn--kvnangen-k0a.no", + "navuotna.no", + "xn--nvuotna-hwa.no", + "kafjord.no", + "xn--kfjord-iua.no", + "gaivuotna.no", + "xn--givuotna-8ya.no", + "larvik.no", + "lavangen.no", + "lavagis.no", + "loabat.no", + "xn--loabt-0qa.no", + "lebesby.no", + "davvesiida.no", + "leikanger.no", + "leirfjord.no", + "leka.no", + "leksvik.no", + "lenvik.no", + "leangaviika.no", + "xn--leagaviika-52b.no", + "lesja.no", + "levanger.no", + "lier.no", + "lierne.no", + "lillehammer.no", + "lillesand.no", + "lindesnes.no", + "lindas.no", + "xn--linds-pra.no", + "lom.no", + "loppa.no", + "lahppi.no", + "xn--lhppi-xqa.no", + "lund.no", + "lunner.no", + "luroy.no", + "xn--lury-ira.no", + "luster.no", + "lyngdal.no", + "lyngen.no", + "ivgu.no", + "lardal.no", + "lerdal.no", + "xn--lrdal-sra.no", + "lodingen.no", + "xn--ldingen-q1a.no", + "lorenskog.no", + "xn--lrenskog-54a.no", + "loten.no", + "xn--lten-gra.no", + "malvik.no", + "masoy.no", + "xn--msy-ula0h.no", + "muosat.no", + "xn--muost-0qa.no", + "mandal.no", + "marker.no", + "marnardal.no", + "masfjorden.no", + "meland.no", + "meldal.no", + "melhus.no", + "meloy.no", + "xn--mely-ira.no", + "meraker.no", + "xn--merker-kua.no", + "moareke.no", + "xn--moreke-jua.no", + "midsund.no", + "midtre-gauldal.no", + "modalen.no", + "modum.no", + "molde.no", + "moskenes.no", + "moss.no", + "mosvik.no", + "malselv.no", + "xn--mlselv-iua.no", + "malatvuopmi.no", + "xn--mlatvuopmi-s4a.no", + "namdalseid.no", + "aejrie.no", + "namsos.no", + "namsskogan.no", + "naamesjevuemie.no", + "xn--nmesjevuemie-tcba.no", + "laakesvuemie.no", + "nannestad.no", + "narvik.no", + "narviika.no", + "naustdal.no", + "nedre-eiker.no", + "nes.akershus.no", + "nes.buskerud.no", + "nesna.no", + "nesodden.no", + "nesseby.no", + "unjarga.no", + "xn--unjrga-rta.no", + "nesset.no", + "nissedal.no", + "nittedal.no", + "nord-aurdal.no", + "nord-fron.no", + "nord-odal.no", + "norddal.no", + "nordkapp.no", + "davvenjarga.no", + "xn--davvenjrga-y4a.no", + "nordre-land.no", + "nordreisa.no", + "raisa.no", + "xn--risa-5na.no", + "nore-og-uvdal.no", + "notodden.no", + "naroy.no", + "xn--nry-yla5g.no", + "notteroy.no", + "xn--nttery-byae.no", + "odda.no", + "oksnes.no", + "xn--ksnes-uua.no", + "oppdal.no", + "oppegard.no", + "xn--oppegrd-ixa.no", + "orkdal.no", + "orland.no", + "xn--rland-uua.no", + "orskog.no", + "xn--rskog-uua.no", + "orsta.no", + "xn--rsta-fra.no", + "os.hedmark.no", + "os.hordaland.no", + "osen.no", + "osteroy.no", + "xn--ostery-fya.no", + "ostre-toten.no", + "xn--stre-toten-zcb.no", + "overhalla.no", + "ovre-eiker.no", + "xn--vre-eiker-k8a.no", + "oyer.no", + "xn--yer-zna.no", + "oygarden.no", + "xn--ygarden-p1a.no", + "oystre-slidre.no", + "xn--ystre-slidre-ujb.no", + "porsanger.no", + "porsangu.no", + "xn--porsgu-sta26f.no", + "porsgrunn.no", + "radoy.no", + "xn--rady-ira.no", + "rakkestad.no", + "rana.no", + "ruovat.no", + "randaberg.no", + "rauma.no", + "rendalen.no", + "rennebu.no", + "rennesoy.no", + "xn--rennesy-v1a.no", + "rindal.no", + "ringebu.no", + "ringerike.no", + "ringsaker.no", + "rissa.no", + "risor.no", + "xn--risr-ira.no", + "roan.no", + "rollag.no", + "rygge.no", + "ralingen.no", + "xn--rlingen-mxa.no", + "rodoy.no", + "xn--rdy-0nab.no", + "romskog.no", + "xn--rmskog-bya.no", + "roros.no", + "xn--rros-gra.no", + "rost.no", + "xn--rst-0na.no", + "royken.no", + "xn--ryken-vua.no", + "royrvik.no", + "xn--ryrvik-bya.no", + "rade.no", + "xn--rde-ula.no", + "salangen.no", + "siellak.no", + "saltdal.no", + "salat.no", + "xn--slt-elab.no", + "xn--slat-5na.no", + "samnanger.no", + "sande.more-og-romsdal.no", + "sande.xn--mre-og-romsdal-qqb.no", + "sande.vestfold.no", + "sandefjord.no", + "sandnes.no", + "sandoy.no", + "xn--sandy-yua.no", + "sarpsborg.no", + "sauda.no", + "sauherad.no", + "sel.no", + "selbu.no", + "selje.no", + "seljord.no", + "sigdal.no", + "siljan.no", + "sirdal.no", + "skaun.no", + "skedsmo.no", + "ski.no", + "skien.no", + "skiptvet.no", + "skjervoy.no", + "xn--skjervy-v1a.no", + "skierva.no", + "xn--skierv-uta.no", + "skjak.no", + "xn--skjk-soa.no", + "skodje.no", + "skanland.no", + "xn--sknland-fxa.no", + "skanit.no", + "xn--sknit-yqa.no", + "smola.no", + "xn--smla-hra.no", + "snillfjord.no", + "snasa.no", + "xn--snsa-roa.no", + "snoasa.no", + "snaase.no", + "xn--snase-nra.no", + "sogndal.no", + "sokndal.no", + "sola.no", + "solund.no", + "songdalen.no", + "sortland.no", + "spydeberg.no", + "stange.no", + "stavanger.no", + "steigen.no", + "steinkjer.no", + "stjordal.no", + "xn--stjrdal-s1a.no", + "stokke.no", + "stor-elvdal.no", + "stord.no", + "stordal.no", + "storfjord.no", + "omasvuotna.no", + "strand.no", + "stranda.no", + "stryn.no", + "sula.no", + "suldal.no", + "sund.no", + "sunndal.no", + "surnadal.no", + "sveio.no", + "svelvik.no", + "sykkylven.no", + "sogne.no", + "xn--sgne-gra.no", + "somna.no", + "xn--smna-gra.no", + "sondre-land.no", + "xn--sndre-land-0cb.no", + "sor-aurdal.no", + "xn--sr-aurdal-l8a.no", + "sor-fron.no", + "xn--sr-fron-q1a.no", + "sor-odal.no", + "xn--sr-odal-q1a.no", + "sor-varanger.no", + "xn--sr-varanger-ggb.no", + "matta-varjjat.no", + "xn--mtta-vrjjat-k7af.no", + "sorfold.no", + "xn--srfold-bya.no", + "sorreisa.no", + "xn--srreisa-q1a.no", + "sorum.no", + "xn--srum-gra.no", + "tana.no", + "deatnu.no", + "time.no", + "tingvoll.no", + "tinn.no", + "tjeldsund.no", + "dielddanuorri.no", + "tjome.no", + "xn--tjme-hra.no", + "tokke.no", + "tolga.no", + "torsken.no", + "tranoy.no", + "xn--trany-yua.no", + "tromso.no", + "xn--troms-zua.no", + "tromsa.no", + "romsa.no", + "trondheim.no", + "troandin.no", + "trysil.no", + "trana.no", + "xn--trna-woa.no", + "trogstad.no", + "xn--trgstad-r1a.no", + "tvedestrand.no", + "tydal.no", + "tynset.no", + "tysfjord.no", + "divtasvuodna.no", + "divttasvuotna.no", + "tysnes.no", + "tysvar.no", + "xn--tysvr-vra.no", + "tonsberg.no", + "xn--tnsberg-q1a.no", + "ullensaker.no", + "ullensvang.no", + "ulvik.no", + "utsira.no", + "vadso.no", + "xn--vads-jra.no", + "cahcesuolo.no", + "xn--hcesuolo-7ya35b.no", + "vaksdal.no", + "valle.no", + "vang.no", + "vanylven.no", + "vardo.no", + "xn--vard-jra.no", + "varggat.no", + "xn--vrggt-xqad.no", + "vefsn.no", + "vaapste.no", + "vega.no", + "vegarshei.no", + "xn--vegrshei-c0a.no", + "vennesla.no", + "verdal.no", + "verran.no", + "vestby.no", + "vestnes.no", + "vestre-slidre.no", + "vestre-toten.no", + "vestvagoy.no", + "xn--vestvgy-ixa6o.no", + "vevelstad.no", + "vik.no", + "vikna.no", + "vindafjord.no", + "volda.no", + "voss.no", + "varoy.no", + "xn--vry-yla5g.no", + "vagan.no", + "xn--vgan-qoa.no", + "voagat.no", + "vagsoy.no", + "xn--vgsy-qoa0j.no", + "vaga.no", + "xn--vg-yiab.no", + "valer.ostfold.no", + "xn--vler-qoa.xn--stfold-9xa.no", + "valer.hedmark.no", + "xn--vler-qoa.hedmark.no", + "*.np", + "nr", + "biz.nr", + "info.nr", + "gov.nr", + "edu.nr", + "org.nr", + "net.nr", + "com.nr", + "nu", + "nz", + "ac.nz", + "co.nz", + "cri.nz", + "geek.nz", + "gen.nz", + "govt.nz", + "health.nz", + "iwi.nz", + "kiwi.nz", + "maori.nz", + "mil.nz", + "xn--mori-qsa.nz", + "net.nz", + "org.nz", + "parliament.nz", + "school.nz", + "om", + "co.om", + "com.om", + "edu.om", + "gov.om", + "med.om", + "museum.om", + "net.om", + "org.om", + "pro.om", + "org", + "pa", + "ac.pa", + "gob.pa", + "com.pa", + "org.pa", + "sld.pa", + "edu.pa", + "net.pa", + "ing.pa", + "abo.pa", + "med.pa", + "nom.pa", + "pe", + "edu.pe", + "gob.pe", + "nom.pe", + "mil.pe", + "org.pe", + "com.pe", + "net.pe", + "pf", + "com.pf", + "org.pf", + "edu.pf", + "*.pg", + "ph", + "com.ph", + "net.ph", + "org.ph", + "gov.ph", + "edu.ph", + "ngo.ph", + "mil.ph", + "i.ph", + "pk", + "com.pk", + "net.pk", + "edu.pk", + "org.pk", + "fam.pk", + "biz.pk", + "web.pk", + "gov.pk", + "gob.pk", + "gok.pk", + "gon.pk", + "gop.pk", + "gos.pk", + "info.pk", + "pl", + "com.pl", + "net.pl", + "org.pl", + "aid.pl", + "agro.pl", + "atm.pl", + "auto.pl", + "biz.pl", + "edu.pl", + "gmina.pl", + "gsm.pl", + "info.pl", + "mail.pl", + "miasta.pl", + "media.pl", + "mil.pl", + "nieruchomosci.pl", + "nom.pl", + "pc.pl", + "powiat.pl", + "priv.pl", + "realestate.pl", + "rel.pl", + "sex.pl", + "shop.pl", + "sklep.pl", + "sos.pl", + "szkola.pl", + "targi.pl", + "tm.pl", + "tourism.pl", + "travel.pl", + "turystyka.pl", + "gov.pl", + "ap.gov.pl", + "ic.gov.pl", + "is.gov.pl", + "us.gov.pl", + "kmpsp.gov.pl", + "kppsp.gov.pl", + "kwpsp.gov.pl", + "psp.gov.pl", + "wskr.gov.pl", + "kwp.gov.pl", + "mw.gov.pl", + "ug.gov.pl", + "um.gov.pl", + "umig.gov.pl", + "ugim.gov.pl", + "upow.gov.pl", + "uw.gov.pl", + "starostwo.gov.pl", + "pa.gov.pl", + "po.gov.pl", + "psse.gov.pl", + "pup.gov.pl", + "rzgw.gov.pl", + "sa.gov.pl", + "so.gov.pl", + "sr.gov.pl", + "wsa.gov.pl", + "sko.gov.pl", + "uzs.gov.pl", + "wiih.gov.pl", + "winb.gov.pl", + "pinb.gov.pl", + "wios.gov.pl", + "witd.gov.pl", + "wzmiuw.gov.pl", + "piw.gov.pl", + "wiw.gov.pl", + "griw.gov.pl", + "wif.gov.pl", + "oum.gov.pl", + "sdn.gov.pl", + "zp.gov.pl", + "uppo.gov.pl", + "mup.gov.pl", + "wuoz.gov.pl", + "konsulat.gov.pl", + "oirm.gov.pl", + "augustow.pl", + "babia-gora.pl", + "bedzin.pl", + "beskidy.pl", + "bialowieza.pl", + "bialystok.pl", + "bielawa.pl", + "bieszczady.pl", + "boleslawiec.pl", + "bydgoszcz.pl", + "bytom.pl", + "cieszyn.pl", + "czeladz.pl", + "czest.pl", + "dlugoleka.pl", + "elblag.pl", + "elk.pl", + "glogow.pl", + "gniezno.pl", + "gorlice.pl", + "grajewo.pl", + "ilawa.pl", + "jaworzno.pl", + "jelenia-gora.pl", + "jgora.pl", + "kalisz.pl", + "kazimierz-dolny.pl", + "karpacz.pl", + "kartuzy.pl", + "kaszuby.pl", + "katowice.pl", + "kepno.pl", + "ketrzyn.pl", + "klodzko.pl", + "kobierzyce.pl", + "kolobrzeg.pl", + "konin.pl", + "konskowola.pl", + "kutno.pl", + "lapy.pl", + "lebork.pl", + "legnica.pl", + "lezajsk.pl", + "limanowa.pl", + "lomza.pl", + "lowicz.pl", + "lubin.pl", + "lukow.pl", + "malbork.pl", + "malopolska.pl", + "mazowsze.pl", + "mazury.pl", + "mielec.pl", + "mielno.pl", + "mragowo.pl", + "naklo.pl", + "nowaruda.pl", + "nysa.pl", + "olawa.pl", + "olecko.pl", + "olkusz.pl", + "olsztyn.pl", + "opoczno.pl", + "opole.pl", + "ostroda.pl", + "ostroleka.pl", + "ostrowiec.pl", + "ostrowwlkp.pl", + "pila.pl", + "pisz.pl", + "podhale.pl", + "podlasie.pl", + "polkowice.pl", + "pomorze.pl", + "pomorskie.pl", + "prochowice.pl", + "pruszkow.pl", + "przeworsk.pl", + "pulawy.pl", + "radom.pl", + "rawa-maz.pl", + "rybnik.pl", + "rzeszow.pl", + "sanok.pl", + "sejny.pl", + "slask.pl", + "slupsk.pl", + "sosnowiec.pl", + "stalowa-wola.pl", + "skoczow.pl", + "starachowice.pl", + "stargard.pl", + "suwalki.pl", + "swidnica.pl", + "swiebodzin.pl", + "swinoujscie.pl", + "szczecin.pl", + "szczytno.pl", + "tarnobrzeg.pl", + "tgory.pl", + "turek.pl", + "tychy.pl", + "ustka.pl", + "walbrzych.pl", + "warmia.pl", + "warszawa.pl", + "waw.pl", + "wegrow.pl", + "wielun.pl", + "wlocl.pl", + "wloclawek.pl", + "wodzislaw.pl", + "wolomin.pl", + "wroclaw.pl", + "zachpomor.pl", + "zagan.pl", + "zarow.pl", + "zgora.pl", + "zgorzelec.pl", + "pm", + "pn", + "gov.pn", + "co.pn", + "org.pn", + "edu.pn", + "net.pn", + "post", + "pr", + "com.pr", + "net.pr", + "org.pr", + "gov.pr", + "edu.pr", + "isla.pr", + "pro.pr", + "biz.pr", + "info.pr", + "name.pr", + "est.pr", + "prof.pr", + "ac.pr", + "pro", + "aca.pro", + "bar.pro", + "cpa.pro", + "jur.pro", + "law.pro", + "med.pro", + "eng.pro", + "ps", + "edu.ps", + "gov.ps", + "sec.ps", + "plo.ps", + "com.ps", + "org.ps", + "net.ps", + "pt", + "net.pt", + "gov.pt", + "org.pt", + "edu.pt", + "int.pt", + "publ.pt", + "com.pt", + "nome.pt", + "pw", + "co.pw", + "ne.pw", + "or.pw", + "ed.pw", + "go.pw", + "belau.pw", + "py", + "com.py", + "coop.py", + "edu.py", + "gov.py", + "mil.py", + "net.py", + "org.py", + "qa", + "com.qa", + "edu.qa", + "gov.qa", + "mil.qa", + "name.qa", + "net.qa", + "org.qa", + "sch.qa", + "re", + "com.re", + "asso.re", + "nom.re", + "ro", + "com.ro", + "org.ro", + "tm.ro", + "nt.ro", + "nom.ro", + "info.ro", + "rec.ro", + "arts.ro", + "firm.ro", + "store.ro", + "www.ro", + "rs", + "co.rs", + "org.rs", + "edu.rs", + "ac.rs", + "gov.rs", + "in.rs", + "ru", + "ac.ru", + "com.ru", + "edu.ru", + "int.ru", + "net.ru", + "org.ru", + "pp.ru", + "adygeya.ru", + "altai.ru", + "amur.ru", + "arkhangelsk.ru", + "astrakhan.ru", + "bashkiria.ru", + "belgorod.ru", + "bir.ru", + "bryansk.ru", + "buryatia.ru", + "cbg.ru", + "chel.ru", + "chelyabinsk.ru", + "chita.ru", + "chukotka.ru", + "chuvashia.ru", + "dagestan.ru", + "dudinka.ru", + "e-burg.ru", + "grozny.ru", + "irkutsk.ru", + "ivanovo.ru", + "izhevsk.ru", + "jar.ru", + "joshkar-ola.ru", + "kalmykia.ru", + "kaluga.ru", + "kamchatka.ru", + "karelia.ru", + "kazan.ru", + "kchr.ru", + "kemerovo.ru", + "khabarovsk.ru", + "khakassia.ru", + "khv.ru", + "kirov.ru", + "koenig.ru", + "komi.ru", + "kostroma.ru", + "krasnoyarsk.ru", + "kuban.ru", + "kurgan.ru", + "kursk.ru", + "lipetsk.ru", + "magadan.ru", + "mari.ru", + "mari-el.ru", + "marine.ru", + "mordovia.ru", + "msk.ru", + "murmansk.ru", + "nalchik.ru", + "nnov.ru", + "nov.ru", + "novosibirsk.ru", + "nsk.ru", + "omsk.ru", + "orenburg.ru", + "oryol.ru", + "palana.ru", + "penza.ru", + "perm.ru", + "ptz.ru", + "rnd.ru", + "ryazan.ru", + "sakhalin.ru", + "samara.ru", + "saratov.ru", + "simbirsk.ru", + "smolensk.ru", + "spb.ru", + "stavropol.ru", + "stv.ru", + "surgut.ru", + "tambov.ru", + "tatarstan.ru", + "tom.ru", + "tomsk.ru", + "tsaritsyn.ru", + "tsk.ru", + "tula.ru", + "tuva.ru", + "tver.ru", + "tyumen.ru", + "udm.ru", + "udmurtia.ru", + "ulan-ude.ru", + "vladikavkaz.ru", + "vladimir.ru", + "vladivostok.ru", + "volgograd.ru", + "vologda.ru", + "voronezh.ru", + "vrn.ru", + "vyatka.ru", + "yakutia.ru", + "yamal.ru", + "yaroslavl.ru", + "yekaterinburg.ru", + "yuzhno-sakhalinsk.ru", + "amursk.ru", + "baikal.ru", + "cmw.ru", + "fareast.ru", + "jamal.ru", + "kms.ru", + "k-uralsk.ru", + "kustanai.ru", + "kuzbass.ru", + "magnitka.ru", + "mytis.ru", + "nakhodka.ru", + "nkz.ru", + "norilsk.ru", + "oskol.ru", + "pyatigorsk.ru", + "rubtsovsk.ru", + "snz.ru", + "syzran.ru", + "vdonsk.ru", + "zgrad.ru", + "gov.ru", + "mil.ru", + "test.ru", + "rw", + "gov.rw", + "net.rw", + "edu.rw", + "ac.rw", + "com.rw", + "co.rw", + "int.rw", + "mil.rw", + "gouv.rw", + "sa", + "com.sa", + "net.sa", + "org.sa", + "gov.sa", + "med.sa", + "pub.sa", + "edu.sa", + "sch.sa", + "sb", + "com.sb", + "edu.sb", + "gov.sb", + "net.sb", + "org.sb", + "sc", + "com.sc", + "gov.sc", + "net.sc", + "org.sc", + "edu.sc", + "sd", + "com.sd", + "net.sd", + "org.sd", + "edu.sd", + "med.sd", + "tv.sd", + "gov.sd", + "info.sd", + "se", + "a.se", + "ac.se", + "b.se", + "bd.se", + "brand.se", + "c.se", + "d.se", + "e.se", + "f.se", + "fh.se", + "fhsk.se", + "fhv.se", + "g.se", + "h.se", + "i.se", + "k.se", + "komforb.se", + "kommunalforbund.se", + "komvux.se", + "l.se", + "lanbib.se", + "m.se", + "n.se", + "naturbruksgymn.se", + "o.se", + "org.se", + "p.se", + "parti.se", + "pp.se", + "press.se", + "r.se", + "s.se", + "t.se", + "tm.se", + "u.se", + "w.se", + "x.se", + "y.se", + "z.se", + "sg", + "com.sg", + "net.sg", + "org.sg", + "gov.sg", + "edu.sg", + "per.sg", + "sh", + "com.sh", + "net.sh", + "gov.sh", + "org.sh", + "mil.sh", + "si", + "sj", + "sk", + "sl", + "com.sl", + "net.sl", + "edu.sl", + "gov.sl", + "org.sl", + "sm", + "sn", + "art.sn", + "com.sn", + "edu.sn", + "gouv.sn", + "org.sn", + "perso.sn", + "univ.sn", + "so", + "com.so", + "net.so", + "org.so", + "sr", + "st", + "co.st", + "com.st", + "consulado.st", + "edu.st", + "embaixada.st", + "gov.st", + "mil.st", + "net.st", + "org.st", + "principe.st", + "saotome.st", + "store.st", + "su", + "adygeya.su", + "arkhangelsk.su", + "balashov.su", + "bashkiria.su", + "bryansk.su", + "dagestan.su", + "grozny.su", + "ivanovo.su", + "kalmykia.su", + "kaluga.su", + "karelia.su", + "khakassia.su", + "krasnodar.su", + "kurgan.su", + "lenug.su", + "mordovia.su", + "msk.su", + "murmansk.su", + "nalchik.su", + "nov.su", + "obninsk.su", + "penza.su", + "pokrovsk.su", + "sochi.su", + "spb.su", + "togliatti.su", + "troitsk.su", + "tula.su", + "tuva.su", + "vladikavkaz.su", + "vladimir.su", + "vologda.su", + "sv", + "com.sv", + "edu.sv", + "gob.sv", + "org.sv", + "red.sv", + "sx", + "gov.sx", + "sy", + "edu.sy", + "gov.sy", + "net.sy", + "mil.sy", + "com.sy", + "org.sy", + "sz", + "co.sz", + "ac.sz", + "org.sz", + "tc", + "td", + "tel", + "tf", + "tg", + "th", + "ac.th", + "co.th", + "go.th", + "in.th", + "mi.th", + "net.th", + "or.th", + "tj", + "ac.tj", + "biz.tj", + "co.tj", + "com.tj", + "edu.tj", + "go.tj", + "gov.tj", + "int.tj", + "mil.tj", + "name.tj", + "net.tj", + "nic.tj", + "org.tj", + "test.tj", + "web.tj", + "tk", + "tl", + "gov.tl", + "tm", + "com.tm", + "co.tm", + "org.tm", + "net.tm", + "nom.tm", + "gov.tm", + "mil.tm", + "edu.tm", + "tn", + "com.tn", + "ens.tn", + "fin.tn", + "gov.tn", + "ind.tn", + "intl.tn", + "nat.tn", + "net.tn", + "org.tn", + "info.tn", + "perso.tn", + "tourism.tn", + "edunet.tn", + "rnrt.tn", + "rns.tn", + "rnu.tn", + "mincom.tn", + "agrinet.tn", + "defense.tn", + "turen.tn", + "to", + "com.to", + "gov.to", + "net.to", + "org.to", + "edu.to", + "mil.to", + "tp", + "tr", + "com.tr", + "info.tr", + "biz.tr", + "net.tr", + "org.tr", + "web.tr", + "gen.tr", + "tv.tr", + "av.tr", + "dr.tr", + "bbs.tr", + "name.tr", + "tel.tr", + "gov.tr", + "bel.tr", + "pol.tr", + "mil.tr", + "k12.tr", + "edu.tr", + "kep.tr", + "nc.tr", + "gov.nc.tr", + "travel", + "tt", + "co.tt", + "com.tt", + "org.tt", + "net.tt", + "biz.tt", + "info.tt", + "pro.tt", + "int.tt", + "coop.tt", + "jobs.tt", + "mobi.tt", + "travel.tt", + "museum.tt", + "aero.tt", + "name.tt", + "gov.tt", + "edu.tt", + "tv", + "tw", + "edu.tw", + "gov.tw", + "mil.tw", + "com.tw", + "net.tw", + "org.tw", + "idv.tw", + "game.tw", + "ebiz.tw", + "club.tw", + "xn--zf0ao64a.tw", + "xn--uc0atv.tw", + "xn--czrw28b.tw", + "tz", + "ac.tz", + "co.tz", + "go.tz", + "hotel.tz", + "info.tz", + "me.tz", + "mil.tz", + "mobi.tz", + "ne.tz", + "or.tz", + "sc.tz", + "tv.tz", + "ua", + "com.ua", + "edu.ua", + "gov.ua", + "in.ua", + "net.ua", + "org.ua", + "cherkassy.ua", + "cherkasy.ua", + "chernigov.ua", + "chernihiv.ua", + "chernivtsi.ua", + "chernovtsy.ua", + "ck.ua", + "cn.ua", + "cr.ua", + "crimea.ua", + "cv.ua", + "dn.ua", + "dnepropetrovsk.ua", + "dnipropetrovsk.ua", + "dominic.ua", + "donetsk.ua", + "dp.ua", + "if.ua", + "ivano-frankivsk.ua", + "kh.ua", + "kharkiv.ua", + "kharkov.ua", + "kherson.ua", + "khmelnitskiy.ua", + "khmelnytskyi.ua", + "kiev.ua", + "kirovograd.ua", + "km.ua", + "kr.ua", + "krym.ua", + "ks.ua", + "kv.ua", + "kyiv.ua", + "lg.ua", + "lt.ua", + "lugansk.ua", + "lutsk.ua", + "lv.ua", + "lviv.ua", + "mk.ua", + "mykolaiv.ua", + "nikolaev.ua", + "od.ua", + "odesa.ua", + "odessa.ua", + "pl.ua", + "poltava.ua", + "rivne.ua", + "rovno.ua", + "rv.ua", + "sb.ua", + "sebastopol.ua", + "sevastopol.ua", + "sm.ua", + "sumy.ua", + "te.ua", + "ternopil.ua", + "uz.ua", + "uzhgorod.ua", + "vinnica.ua", + "vinnytsia.ua", + "vn.ua", + "volyn.ua", + "yalta.ua", + "zaporizhzhe.ua", + "zaporizhzhia.ua", + "zhitomir.ua", + "zhytomyr.ua", + "zp.ua", + "zt.ua", + "ug", + "co.ug", + "or.ug", + "ac.ug", + "sc.ug", + "go.ug", + "ne.ug", + "com.ug", + "org.ug", + "uk", + "ac.uk", + "co.uk", + "gov.uk", + "ltd.uk", + "me.uk", + "net.uk", + "nhs.uk", + "org.uk", + "plc.uk", + "police.uk", + "*.sch.uk", + "us", + "dni.us", + "fed.us", + "isa.us", + "kids.us", + "nsn.us", + "ak.us", + "al.us", + "ar.us", + "as.us", + "az.us", + "ca.us", + "co.us", + "ct.us", + "dc.us", + "de.us", + "fl.us", + "ga.us", + "gu.us", + "hi.us", + "ia.us", + "id.us", + "il.us", + "in.us", + "ks.us", + "ky.us", + "la.us", + "ma.us", + "md.us", + "me.us", + "mi.us", + "mn.us", + "mo.us", + "ms.us", + "mt.us", + "nc.us", + "nd.us", + "ne.us", + "nh.us", + "nj.us", + "nm.us", + "nv.us", + "ny.us", + "oh.us", + "ok.us", + "or.us", + "pa.us", + "pr.us", + "ri.us", + "sc.us", + "sd.us", + "tn.us", + "tx.us", + "ut.us", + "vi.us", + "vt.us", + "va.us", + "wa.us", + "wi.us", + "wv.us", + "wy.us", + "k12.ak.us", + "k12.al.us", + "k12.ar.us", + "k12.as.us", + "k12.az.us", + "k12.ca.us", + "k12.co.us", + "k12.ct.us", + "k12.dc.us", + "k12.de.us", + "k12.fl.us", + "k12.ga.us", + "k12.gu.us", + "k12.ia.us", + "k12.id.us", + "k12.il.us", + "k12.in.us", + "k12.ks.us", + "k12.ky.us", + "k12.la.us", + "k12.ma.us", + "k12.md.us", + "k12.me.us", + "k12.mi.us", + "k12.mn.us", + "k12.mo.us", + "k12.ms.us", + "k12.mt.us", + "k12.nc.us", + "k12.ne.us", + "k12.nh.us", + "k12.nj.us", + "k12.nm.us", + "k12.nv.us", + "k12.ny.us", + "k12.oh.us", + "k12.ok.us", + "k12.or.us", + "k12.pa.us", + "k12.pr.us", + "k12.ri.us", + "k12.sc.us", + "k12.tn.us", + "k12.tx.us", + "k12.ut.us", + "k12.vi.us", + "k12.vt.us", + "k12.va.us", + "k12.wa.us", + "k12.wi.us", + "k12.wy.us", + "cc.ak.us", + "cc.al.us", + "cc.ar.us", + "cc.as.us", + "cc.az.us", + "cc.ca.us", + "cc.co.us", + "cc.ct.us", + "cc.dc.us", + "cc.de.us", + "cc.fl.us", + "cc.ga.us", + "cc.gu.us", + "cc.hi.us", + "cc.ia.us", + "cc.id.us", + "cc.il.us", + "cc.in.us", + "cc.ks.us", + "cc.ky.us", + "cc.la.us", + "cc.ma.us", + "cc.md.us", + "cc.me.us", + "cc.mi.us", + "cc.mn.us", + "cc.mo.us", + "cc.ms.us", + "cc.mt.us", + "cc.nc.us", + "cc.nd.us", + "cc.ne.us", + "cc.nh.us", + "cc.nj.us", + "cc.nm.us", + "cc.nv.us", + "cc.ny.us", + "cc.oh.us", + "cc.ok.us", + "cc.or.us", + "cc.pa.us", + "cc.pr.us", + "cc.ri.us", + "cc.sc.us", + "cc.sd.us", + "cc.tn.us", + "cc.tx.us", + "cc.ut.us", + "cc.vi.us", + "cc.vt.us", + "cc.va.us", + "cc.wa.us", + "cc.wi.us", + "cc.wv.us", + "cc.wy.us", + "lib.ak.us", + "lib.al.us", + "lib.ar.us", + "lib.as.us", + "lib.az.us", + "lib.ca.us", + "lib.co.us", + "lib.ct.us", + "lib.dc.us", + "lib.de.us", + "lib.fl.us", + "lib.ga.us", + "lib.gu.us", + "lib.hi.us", + "lib.ia.us", + "lib.id.us", + "lib.il.us", + "lib.in.us", + "lib.ks.us", + "lib.ky.us", + "lib.la.us", + "lib.ma.us", + "lib.md.us", + "lib.me.us", + "lib.mi.us", + "lib.mn.us", + "lib.mo.us", + "lib.ms.us", + "lib.mt.us", + "lib.nc.us", + "lib.nd.us", + "lib.ne.us", + "lib.nh.us", + "lib.nj.us", + "lib.nm.us", + "lib.nv.us", + "lib.ny.us", + "lib.oh.us", + "lib.ok.us", + "lib.or.us", + "lib.pa.us", + "lib.pr.us", + "lib.ri.us", + "lib.sc.us", + "lib.sd.us", + "lib.tn.us", + "lib.tx.us", + "lib.ut.us", + "lib.vi.us", + "lib.vt.us", + "lib.va.us", + "lib.wa.us", + "lib.wi.us", + "lib.wy.us", + "pvt.k12.ma.us", + "chtr.k12.ma.us", + "paroch.k12.ma.us", + "uy", + "com.uy", + "edu.uy", + "gub.uy", + "mil.uy", + "net.uy", + "org.uy", + "uz", + "co.uz", + "com.uz", + "net.uz", + "org.uz", + "va", + "vc", + "com.vc", + "net.vc", + "org.vc", + "gov.vc", + "mil.vc", + "edu.vc", + "ve", + "arts.ve", + "co.ve", + "com.ve", + "e12.ve", + "edu.ve", + "firm.ve", + "gob.ve", + "gov.ve", + "info.ve", + "int.ve", + "mil.ve", + "net.ve", + "org.ve", + "rec.ve", + "store.ve", + "tec.ve", + "web.ve", + "vg", + "vi", + "co.vi", + "com.vi", + "k12.vi", + "net.vi", + "org.vi", + "vn", + "com.vn", + "net.vn", + "org.vn", + "edu.vn", + "gov.vn", + "int.vn", + "ac.vn", + "biz.vn", + "info.vn", + "name.vn", + "pro.vn", + "health.vn", + "vu", + "com.vu", + "edu.vu", + "net.vu", + "org.vu", + "wf", + "ws", + "com.ws", + "net.ws", + "org.ws", + "gov.ws", + "edu.ws", + "yt", + "xn--mgbaam7a8h", + "xn--y9a3aq", + "xn--54b7fta0cc", + "xn--90ais", + "xn--fiqs8s", + "xn--fiqz9s", + "xn--lgbbat1ad8j", + "xn--wgbh1c", + "xn--node", + "xn--qxam", + "xn--j6w193g", + "xn--h2brj9c", + "xn--mgbbh1a71e", + "xn--fpcrj9c3d", + "xn--gecrj9c", + "xn--s9brj9c", + "xn--45brj9c", + "xn--xkc2dl3a5ee0h", + "xn--mgba3a4f16a", + "xn--mgba3a4fra", + "xn--mgbtx2b", + "xn--mgbayh7gpa", + "xn--3e0b707e", + "xn--80ao21a", + "xn--fzc2c9e2c", + "xn--xkc2al3hye2a", + "xn--mgbc0a9azcg", + "xn--d1alf", + "xn--l1acc", + "xn--mix891f", + "xn--mix082f", + "xn--mgbx4cd0ab", + "xn--mgb9awbf", + "xn--mgbai9azgqp6j", + "xn--mgbai9a5eva00b", + "xn--ygbi2ammx", + "xn--90a3ac", + "xn--o1ac.xn--90a3ac", + "xn--c1avg.xn--90a3ac", + "xn--90azh.xn--90a3ac", + "xn--d1at.xn--90a3ac", + "xn--o1ach.xn--90a3ac", + "xn--80au.xn--90a3ac", + "xn--p1ai", + "xn--wgbl6a", + "xn--mgberp4a5d4ar", + "xn--mgberp4a5d4a87g", + "xn--mgbqly7c0a67fbc", + "xn--mgbqly7cvafr", + "xn--mgbpl2fh", + "xn--yfro4i67o", + "xn--clchc0ea0b2g2a9gcd", + "xn--ogbpf8fl", + "xn--mgbtf8fl", + "xn--o3cw4h", + "xn--pgbs0dh", + "xn--kpry57d", + "xn--kprw13d", + "xn--nnx388a", + "xn--j1amh", + "xn--mgb2ddes", + "xxx", + "*.ye", + "ac.za", + "agrica.za", + "alt.za", + "co.za", + "edu.za", + "gov.za", + "grondar.za", + "law.za", + "mil.za", + "net.za", + "ngo.za", + "nis.za", + "nom.za", + "org.za", + "school.za", + "tm.za", + "web.za", + "*.zm", + "*.zw", + "aaa", + "aarp", + "abarth", + "abb", + "abbott", + "abbvie", + "abc", + "able", + "abogado", + "abudhabi", + "academy", + "accenture", + "accountant", + "accountants", + "aco", + "active", + "actor", + "adac", + "ads", + "adult", + "aeg", + "aetna", + "afamilycompany", + "afl", + "africa", + "africamagic", + "agakhan", + "agency", + "aig", + "aigo", + "airbus", + "airforce", + "airtel", + "akdn", + "alfaromeo", + "alibaba", + "alipay", + "allfinanz", + "allstate", + "ally", + "alsace", + "alstom", + "americanexpress", + "americanfamily", + "amex", + "amfam", + "amica", + "amsterdam", + "analytics", + "android", + "anquan", + "anz", + "aol", + "apartments", + "app", + "apple", + "aquarelle", + "aramco", + "archi", + "army", + "arte", + "asda", + "associates", + "athleta", + "attorney", + "auction", + "audi", + "audible", + "audio", + "auspost", + "author", + "auto", + "autos", + "avianca", + "aws", + "axa", + "azure", + "baby", + "baidu", + "banamex", + "bananarepublic", + "band", + "bank", + "bar", + "barcelona", + "barclaycard", + "barclays", + "barefoot", + "bargains", + "basketball", + "bauhaus", + "bayern", + "bbc", + "bbt", + "bbva", + "bcg", + "bcn", + "beats", + "beer", + "bentley", + "berlin", + "best", + "bestbuy", + "bet", + "bharti", + "bible", + "bid", + "bike", + "bing", + "bingo", + "bio", + "black", + "blackfriday", + "blanco", + "blockbuster", + "blog", + "bloomberg", + "blue", + "bms", + "bmw", + "bnl", + "bnpparibas", + "boats", + "boehringer", + "bofa", + "bom", + "bond", + "boo", + "book", + "booking", + "boots", + "bosch", + "bostik", + "bot", + "boutique", + "bradesco", + "bridgestone", + "broadway", + "broker", + "brother", + "brussels", + "budapest", + "bugatti", + "build", + "builders", + "business", + "buy", + "buzz", + "bzh", + "cab", + "cafe", + "cal", + "call", + "calvinklein", + "camera", + "camp", + "cancerresearch", + "canon", + "capetown", + "capital", + "capitalone", + "car", + "caravan", + "cards", + "care", + "career", + "careers", + "cars", + "cartier", + "casa", + "case", + "caseih", + "cash", + "casino", + "catering", + "cba", + "cbn", + "cbre", + "cbs", + "ceb", + "center", + "ceo", + "cern", + "cfa", + "cfd", + "chanel", + "channel", + "chase", + "chat", + "cheap", + "chintai", + "chloe", + "christmas", + "chrome", + "chrysler", + "church", + "cipriani", + "circle", + "cisco", + "citadel", + "citi", + "citic", + "city", + "cityeats", + "claims", + "cleaning", + "click", + "clinic", + "clinique", + "clothing", + "cloud", + "club", + "clubmed", + "coach", + "codes", + "coffee", + "college", + "cologne", + "comcast", + "commbank", + "community", + "company", + "compare", + "computer", + "comsec", + "condos", + "construction", + "consulting", + "contact", + "contractors", + "cooking", + "cookingchannel", + "cool", + "corsica", + "country", + "coupon", + "coupons", + "courses", + "credit", + "creditcard", + "creditunion", + "cricket", + "crown", + "crs", + "cruises", + "csc", + "cuisinella", + "cymru", + "cyou", + "dabur", + "dad", + "dance", + "date", + "dating", + "datsun", + "day", + "dclk", + "dds", + "deal", + "dealer", + "deals", + "degree", + "delivery", + "dell", + "deloitte", + "delta", + "democrat", + "dental", + "dentist", + "desi", + "design", + "dev", + "dhl", + "diamonds", + "diet", + "digital", + "direct", + "directory", + "discount", + "discover", + "dish", + "dnp", + "docs", + "dodge", + "dog", + "doha", + "domains", + "doosan", + "dot", + "download", + "drive", + "dstv", + "dtv", + "dubai", + "duck", + "dunlop", + "duns", + "dupont", + "durban", + "dvag", + "dwg", + "earth", + "eat", + "edeka", + "education", + "email", + "emerck", + "emerson", + "energy", + "engineer", + "engineering", + "enterprises", + "epost", + "epson", + "equipment", + "ericsson", + "erni", + "esq", + "estate", + "esurance", + "etisalat", + "eurovision", + "eus", + "events", + "everbank", + "exchange", + "expert", + "exposed", + "express", + "extraspace", + "fage", + "fail", + "fairwinds", + "faith", + "family", + "fan", + "fans", + "farm", + "farmers", + "fashion", + "fast", + "fedex", + "feedback", + "ferrari", + "ferrero", + "fiat", + "fidelity", + "fido", + "film", + "final", + "finance", + "financial", + "fire", + "firestone", + "firmdale", + "fish", + "fishing", + "fit", + "fitness", + "flickr", + "flights", + "flir", + "florist", + "flowers", + "flsmidth", + "fly", + "foo", + "foodnetwork", + "football", + "ford", + "forex", + "forsale", + "forum", + "foundation", + "fox", + "fresenius", + "frl", + "frogans", + "frontdoor", + "frontier", + "ftr", + "fujitsu", + "fujixerox", + "fund", + "furniture", + "futbol", + "fyi", + "gal", + "gallery", + "gallo", + "gallup", + "game", + "games", + "gap", + "garden", + "gbiz", + "gdn", + "gea", + "gent", + "genting", + "george", + "ggee", + "gift", + "gifts", + "gives", + "giving", + "glade", + "glass", + "gle", + "global", + "globo", + "gmail", + "gmo", + "gmx", + "godaddy", + "gold", + "goldpoint", + "golf", + "goo", + "goodhands", + "goodyear", + "goog", + "google", + "gop", + "got", + "gotv", + "grainger", + "graphics", + "gratis", + "green", + "gripe", + "group", + "guardian", + "gucci", + "guge", + "guide", + "guitars", + "guru", + "hamburg", + "hangout", + "haus", + "hbo", + "hdfc", + "hdfcbank", + "health", + "healthcare", + "help", + "helsinki", + "here", + "hermes", + "hgtv", + "hiphop", + "hisamitsu", + "hitachi", + "hiv", + "hkt", + "hockey", + "holdings", + "holiday", + "homedepot", + "homegoods", + "homes", + "homesense", + "honda", + "honeywell", + "horse", + "host", + "hosting", + "hot", + "hoteles", + "hotmail", + "house", + "how", + "hsbc", + "htc", + "hughes", + "hyatt", + "hyundai", + "ibm", + "icbc", + "ice", + "icu", + "ieee", + "ifm", + "iinet", + "ikano", + "imamat", + "imdb", + "immo", + "immobilien", + "industries", + "infiniti", + "ing", + "ink", + "institute", + "insurance", + "insure", + "intel", + "international", + "intuit", + "investments", + "ipiranga", + "irish", + "iselect", + "ismaili", + "ist", + "istanbul", + "itau", + "itv", + "iveco", + "iwc", + "jaguar", + "java", + "jcb", + "jcp", + "jeep", + "jetzt", + "jewelry", + "jio", + "jlc", + "jll", + "jmp", + "jnj", + "joburg", + "jot", + "joy", + "jpmorgan", + "jprs", + "juegos", + "juniper", + "kaufen", + "kddi", + "kerryhotels", + "kerrylogistics", + "kerryproperties", + "kfh", + "kia", + "kim", + "kinder", + "kindle", + "kitchen", + "kiwi", + "koeln", + "komatsu", + "kosher", + "kpmg", + "kpn", + "krd", + "kred", + "kuokgroup", + "kyknet", + "kyoto", + "lacaixa", + "ladbrokes", + "lamborghini", + "lamer", + "lancaster", + "lancia", + "lancome", + "land", + "landrover", + "lanxess", + "lasalle", + "lat", + "latino", + "latrobe", + "law", + "lawyer", + "lds", + "lease", + "leclerc", + "lefrak", + "legal", + "lego", + "lexus", + "lgbt", + "liaison", + "lidl", + "life", + "lifeinsurance", + "lifestyle", + "lighting", + "like", + "lilly", + "limited", + "limo", + "lincoln", + "linde", + "link", + "lipsy", + "live", + "living", + "lixil", + "loan", + "loans", + "locker", + "locus", + "loft", + "lol", + "london", + "lotte", + "lotto", + "love", + "lpl", + "lplfinancial", + "ltd", + "ltda", + "lundbeck", + "lupin", + "luxe", + "luxury", + "macys", + "madrid", + "maif", + "maison", + "makeup", + "man", + "management", + "mango", + "market", + "marketing", + "markets", + "marriott", + "marshalls", + "maserati", + "mattel", + "mba", + "mcd", + "mcdonalds", + "mckinsey", + "med", + "media", + "meet", + "melbourne", + "meme", + "memorial", + "men", + "menu", + "meo", + "metlife", + "miami", + "microsoft", + "mini", + "mint", + "mit", + "mitsubishi", + "mlb", + "mls", + "mma", + "mnet", + "mobily", + "moda", + "moe", + "moi", + "mom", + "monash", + "money", + "monster", + "montblanc", + "mopar", + "mormon", + "mortgage", + "moscow", + "moto", + "motorcycles", + "mov", + "movie", + "movistar", + "msd", + "mtn", + "mtpc", + "mtr", + "multichoice", + "mutual", + "mutuelle", + "mzansimagic", + "nab", + "nadex", + "nagoya", + "naspers", + "nationwide", + "natura", + "navy", + "nba", + "nec", + "netbank", + "netflix", + "network", + "neustar", + "new", + "newholland", + "news", + "next", + "nextdirect", + "nexus", + "nfl", + "ngo", + "nhk", + "nico", + "nike", + "nikon", + "ninja", + "nissan", + "nokia", + "northwesternmutual", + "norton", + "now", + "nowruz", + "nowtv", + "nra", + "nrw", + "ntt", + "nyc", + "obi", + "observer", + "off", + "office", + "okinawa", + "olayan", + "olayangroup", + "oldnavy", + "ollo", + "omega", + "one", + "ong", + "onl", + "online", + "onyourside", + "ooo", + "open", + "oracle", + "orange", + "organic", + "orientexpress", + "origins", + "osaka", + "otsuka", + "ott", + "ovh", + "page", + "pamperedchef", + "panasonic", + "panerai", + "paris", + "pars", + "partners", + "parts", + "party", + "passagens", + "pay", + "payu", + "pccw", + "pet", + "pfizer", + "pharmacy", + "philips", + "photo", + "photography", + "photos", + "physio", + "piaget", + "pics", + "pictet", + "pictures", + "pid", + "pin", + "ping", + "pink", + "pioneer", + "pizza", + "place", + "play", + "playstation", + "plumbing", + "plus", + "pnc", + "pohl", + "poker", + "politie", + "porn", + "pramerica", + "praxi", + "press", + "prime", + "prod", + "productions", + "prof", + "progressive", + "promo", + "properties", + "property", + "protection", + "pru", + "prudential", + "pub", + "qpon", + "quebec", + "quest", + "qvc", + "racing", + "raid", + "read", + "realestate", + "realtor", + "realty", + "recipes", + "red", + "redstone", + "redumbrella", + "rehab", + "reise", + "reisen", + "reit", + "reliance", + "ren", + "rent", + "rentals", + "repair", + "report", + "republican", + "rest", + "restaurant", + "review", + "reviews", + "rexroth", + "rich", + "richardli", + "ricoh", + "rightathome", + "ril", + "rio", + "rip", + "rocher", + "rocks", + "rodeo", + "rogers", + "room", + "rsvp", + "ruhr", + "run", + "rwe", + "ryukyu", + "saarland", + "safe", + "safety", + "sakura", + "sale", + "salon", + "samsclub", + "samsung", + "sandvik", + "sandvikcoromant", + "sanofi", + "sap", + "sapo", + "sarl", + "sas", + "save", + "saxo", + "sbi", + "sbs", + "sca", + "scb", + "schaeffler", + "schmidt", + "scholarships", + "school", + "schule", + "schwarz", + "science", + "scjohnson", + "scor", + "scot", + "seat", + "secure", + "security", + "seek", + "select", + "sener", + "services", + "ses", + "seven", + "sew", + "sex", + "sexy", + "sfr", + "shangrila", + "sharp", + "shaw", + "shell", + "shia", + "shiksha", + "shoes", + "shouji", + "show", + "showtime", + "shriram", + "silk", + "sina", + "singles", + "site", + "ski", + "skin", + "sky", + "skype", + "sling", + "smart", + "smile", + "sncf", + "soccer", + "social", + "softbank", + "software", + "sohu", + "solar", + "solutions", + "song", + "sony", + "soy", + "space", + "spiegel", + "spot", + "spreadbetting", + "srl", + "srt", + "stada", + "staples", + "star", + "starhub", + "statebank", + "statefarm", + "statoil", + "stc", + "stcgroup", + "stockholm", + "storage", + "store", + "studio", + "study", + "style", + "sucks", + "supersport", + "supplies", + "supply", + "support", + "surf", + "surgery", + "suzuki", + "swatch", + "swiftcover", + "swiss", + "sydney", + "symantec", + "systems", + "tab", + "taipei", + "talk", + "taobao", + "target", + "tatamotors", + "tatar", + "tattoo", + "tax", + "taxi", + "tci", + "tdk", + "team", + "tech", + "technology", + "telecity", + "telefonica", + "temasek", + "tennis", + "teva", + "thd", + "theater", + "theatre", + "theguardian", + "tiaa", + "tickets", + "tienda", + "tiffany", + "tips", + "tires", + "tirol", + "tjmaxx", + "tjx", + "tkmaxx", + "tmall", + "today", + "tokyo", + "tools", + "top", + "toray", + "toshiba", + "total", + "tours", + "town", + "toyota", + "toys", + "trade", + "trading", + "training", + "travelchannel", + "travelers", + "travelersinsurance", + "trust", + "trv", + "tube", + "tui", + "tunes", + "tushu", + "tvs", + "ubank", + "ubs", + "uconnect", + "university", + "uno", + "uol", + "ups", + "vacations", + "vana", + "vanguard", + "vegas", + "ventures", + "verisign", + "versicherung", + "vet", + "viajes", + "video", + "vig", + "viking", + "villas", + "vin", + "vip", + "virgin", + "visa", + "vision", + "vista", + "vistaprint", + "viva", + "vivo", + "vlaanderen", + "vodka", + "volkswagen", + "vote", + "voting", + "voto", + "voyage", + "vuelos", + "wales", + "walmart", + "walter", + "wang", + "wanggou", + "warman", + "watch", + "watches", + "weather", + "weatherchannel", + "webcam", + "weber", + "website", + "wed", + "wedding", + "weibo", + "weir", + "whoswho", + "wien", + "wiki", + "williamhill", + "win", + "windows", + "wine", + "winners", + "wme", + "wolterskluwer", + "woodside", + "work", + "works", + "world", + "wow", + "wtc", + "wtf", + "xbox", + "xerox", + "xfinity", + "xihuan", + "xin", + "xn--11b4c3d", + "xn--1ck2e1b", + "xn--1qqw23a", + "xn--30rr7y", + "xn--3bst00m", + "xn--3ds443g", + "xn--3oq18vl8pn36a", + "xn--3pxu8k", + "xn--42c2d9a", + "xn--45q11c", + "xn--4gbrim", + "xn--4gq48lf9j", + "xn--55qw42g", + "xn--55qx5d", + "xn--5su34j936bgsg", + "xn--5tzm5g", + "xn--6frz82g", + "xn--6qq986b3xl", + "xn--80adxhks", + "xn--80asehdb", + "xn--80aswg", + "xn--8y0a063a", + "xn--9dbq2a", + "xn--9et52u", + "xn--9krt00a", + "xn--b4w605ferd", + "xn--bck1b9a5dre4c", + "xn--c1avg", + "xn--c2br7g", + "xn--cck2b3b", + "xn--cg4bki", + "xn--czr694b", + "xn--czrs0t", + "xn--czru2d", + "xn--d1acj3b", + "xn--eckvdtc9d", + "xn--efvy88h", + "xn--estv75g", + "xn--fct429k", + "xn--fhbei", + "xn--fiq228c5hs", + "xn--fiq64b", + "xn--fjq720a", + "xn--flw351e", + "xn--fzys8d69uvgm", + "xn--g2xx48c", + "xn--gckr3f0f", + "xn--gk3at1e", + "xn--hxt814e", + "xn--i1b6b1a6a2e", + "xn--imr513n", + "xn--io0a7i", + "xn--j1aef", + "xn--jlq61u9w7b", + "xn--jvr189m", + "xn--kcrx77d1x4a", + "xn--kpu716f", + "xn--kput3i", + "xn--mgba3a3ejt", + "xn--mgba7c0bbn0a", + "xn--mgbaakc7dvf", + "xn--mgbab2bd", + "xn--mgbb9fbpob", + "xn--mgbca7dzdo", + "xn--mgbt3dhd", + "xn--mk1bu44c", + "xn--mxtq1m", + "xn--ngbc5azd", + "xn--ngbe9e0a", + "xn--nqv7f", + "xn--nqv7fs00ema", + "xn--nyqy26a", + "xn--p1acf", + "xn--pbt977c", + "xn--pssy2u", + "xn--q9jyb4c", + "xn--qcka1pmc", + "xn--rhqv96g", + "xn--rovu88b", + "xn--ses554g", + "xn--t60b56a", + "xn--tckwe", + "xn--unup4y", + "xn--vermgensberater-ctb", + "xn--vermgensberatung-pwb", + "xn--vhquv", + "xn--vuq861b", + "xn--w4r85el8fhu5dnra", + "xn--w4rs40l", + "xn--xhq521b", + "xn--zfr164b", + "xperia", + "xyz", + "yachts", + "yahoo", + "yamaxun", + "yandex", + "yodobashi", + "yoga", + "yokohama", + "you", + "youtube", + "yun", + "zappos", + "zara", + "zero", + "zip", + "zippo", + "zone", + "zuerich", + "cloudfront.net", + "ap-northeast-1.compute.amazonaws.com", + "ap-southeast-1.compute.amazonaws.com", + "ap-southeast-2.compute.amazonaws.com", + "cn-north-1.compute.amazonaws.cn", + "compute.amazonaws.cn", + "compute.amazonaws.com", + "compute-1.amazonaws.com", + "eu-west-1.compute.amazonaws.com", + "eu-central-1.compute.amazonaws.com", + "sa-east-1.compute.amazonaws.com", + "us-east-1.amazonaws.com", + "us-gov-west-1.compute.amazonaws.com", + "us-west-1.compute.amazonaws.com", + "us-west-2.compute.amazonaws.com", + "z-1.compute-1.amazonaws.com", + "z-2.compute-1.amazonaws.com", + "elasticbeanstalk.com", + "elb.amazonaws.com", + "s3.amazonaws.com", + "s3-ap-northeast-1.amazonaws.com", + "s3-ap-southeast-1.amazonaws.com", + "s3-ap-southeast-2.amazonaws.com", + "s3-external-1.amazonaws.com", + "s3-external-2.amazonaws.com", + "s3-fips-us-gov-west-1.amazonaws.com", + "s3-eu-central-1.amazonaws.com", + "s3-eu-west-1.amazonaws.com", + "s3-sa-east-1.amazonaws.com", + "s3-us-gov-west-1.amazonaws.com", + "s3-us-west-1.amazonaws.com", + "s3-us-west-2.amazonaws.com", + "s3.cn-north-1.amazonaws.com.cn", + "s3.eu-central-1.amazonaws.com", + "betainabox.com", + "ae.org", + "ar.com", + "br.com", + "cn.com", + "com.de", + "com.se", + "de.com", + "eu.com", + "gb.com", + "gb.net", + "hu.com", + "hu.net", + "jp.net", + "jpn.com", + "kr.com", + "mex.com", + "no.com", + "qc.com", + "ru.com", + "sa.com", + "se.com", + "se.net", + "uk.com", + "uk.net", + "us.com", + "uy.com", + "za.bz", + "za.com", + "africa.com", + "gr.com", + "in.net", + "us.org", + "co.com", + "c.la", + "cloudcontrolled.com", + "cloudcontrolapp.com", + "co.ca", + "c.cdn77.org", + "cdn77-ssl.net", + "r.cdn77.net", + "rsc.cdn77.org", + "ssl.origin.cdn77-secure.org", + "co.nl", + "co.no", + "*.platform.sh", + "cupcake.is", + "dreamhosters.com", + "duckdns.org", + "dyndns-at-home.com", + "dyndns-at-work.com", + "dyndns-blog.com", + "dyndns-free.com", + "dyndns-home.com", + "dyndns-ip.com", + "dyndns-mail.com", + "dyndns-office.com", + "dyndns-pics.com", + "dyndns-remote.com", + "dyndns-server.com", + "dyndns-web.com", + "dyndns-wiki.com", + "dyndns-work.com", + "dyndns.biz", + "dyndns.info", + "dyndns.org", + "dyndns.tv", + "at-band-camp.net", + "ath.cx", + "barrel-of-knowledge.info", + "barrell-of-knowledge.info", + "better-than.tv", + "blogdns.com", + "blogdns.net", + "blogdns.org", + "blogsite.org", + "boldlygoingnowhere.org", + "broke-it.net", + "buyshouses.net", + "cechire.com", + "dnsalias.com", + "dnsalias.net", + "dnsalias.org", + "dnsdojo.com", + "dnsdojo.net", + "dnsdojo.org", + "does-it.net", + "doesntexist.com", + "doesntexist.org", + "dontexist.com", + "dontexist.net", + "dontexist.org", + "doomdns.com", + "doomdns.org", + "dvrdns.org", + "dyn-o-saur.com", + "dynalias.com", + "dynalias.net", + "dynalias.org", + "dynathome.net", + "dyndns.ws", + "endofinternet.net", + "endofinternet.org", + "endoftheinternet.org", + "est-a-la-maison.com", + "est-a-la-masion.com", + "est-le-patron.com", + "est-mon-blogueur.com", + "for-better.biz", + "for-more.biz", + "for-our.info", + "for-some.biz", + "for-the.biz", + "forgot.her.name", + "forgot.his.name", + "from-ak.com", + "from-al.com", + "from-ar.com", + "from-az.net", + "from-ca.com", + "from-co.net", + "from-ct.com", + "from-dc.com", + "from-de.com", + "from-fl.com", + "from-ga.com", + "from-hi.com", + "from-ia.com", + "from-id.com", + "from-il.com", + "from-in.com", + "from-ks.com", + "from-ky.com", + "from-la.net", + "from-ma.com", + "from-md.com", + "from-me.org", + "from-mi.com", + "from-mn.com", + "from-mo.com", + "from-ms.com", + "from-mt.com", + "from-nc.com", + "from-nd.com", + "from-ne.com", + "from-nh.com", + "from-nj.com", + "from-nm.com", + "from-nv.com", + "from-ny.net", + "from-oh.com", + "from-ok.com", + "from-or.com", + "from-pa.com", + "from-pr.com", + "from-ri.com", + "from-sc.com", + "from-sd.com", + "from-tn.com", + "from-tx.com", + "from-ut.com", + "from-va.com", + "from-vt.com", + "from-wa.com", + "from-wi.com", + "from-wv.com", + "from-wy.com", + "ftpaccess.cc", + "fuettertdasnetz.de", + "game-host.org", + "game-server.cc", + "getmyip.com", + "gets-it.net", + "go.dyndns.org", + "gotdns.com", + "gotdns.org", + "groks-the.info", + "groks-this.info", + "ham-radio-op.net", + "here-for-more.info", + "hobby-site.com", + "hobby-site.org", + "home.dyndns.org", + "homedns.org", + "homeftp.net", + "homeftp.org", + "homeip.net", + "homelinux.com", + "homelinux.net", + "homelinux.org", + "homeunix.com", + "homeunix.net", + "homeunix.org", + "iamallama.com", + "in-the-band.net", + "is-a-anarchist.com", + "is-a-blogger.com", + "is-a-bookkeeper.com", + "is-a-bruinsfan.org", + "is-a-bulls-fan.com", + "is-a-candidate.org", + "is-a-caterer.com", + "is-a-celticsfan.org", + "is-a-chef.com", + "is-a-chef.net", + "is-a-chef.org", + "is-a-conservative.com", + "is-a-cpa.com", + "is-a-cubicle-slave.com", + "is-a-democrat.com", + "is-a-designer.com", + "is-a-doctor.com", + "is-a-financialadvisor.com", + "is-a-geek.com", + "is-a-geek.net", + "is-a-geek.org", + "is-a-green.com", + "is-a-guru.com", + "is-a-hard-worker.com", + "is-a-hunter.com", + "is-a-knight.org", + "is-a-landscaper.com", + "is-a-lawyer.com", + "is-a-liberal.com", + "is-a-libertarian.com", + "is-a-linux-user.org", + "is-a-llama.com", + "is-a-musician.com", + "is-a-nascarfan.com", + "is-a-nurse.com", + "is-a-painter.com", + "is-a-patsfan.org", + "is-a-personaltrainer.com", + "is-a-photographer.com", + "is-a-player.com", + "is-a-republican.com", + "is-a-rockstar.com", + "is-a-socialist.com", + "is-a-soxfan.org", + "is-a-student.com", + "is-a-teacher.com", + "is-a-techie.com", + "is-a-therapist.com", + "is-an-accountant.com", + "is-an-actor.com", + "is-an-actress.com", + "is-an-anarchist.com", + "is-an-artist.com", + "is-an-engineer.com", + "is-an-entertainer.com", + "is-by.us", + "is-certified.com", + "is-found.org", + "is-gone.com", + "is-into-anime.com", + "is-into-cars.com", + "is-into-cartoons.com", + "is-into-games.com", + "is-leet.com", + "is-lost.org", + "is-not-certified.com", + "is-saved.org", + "is-slick.com", + "is-uberleet.com", + "is-very-bad.org", + "is-very-evil.org", + "is-very-good.org", + "is-very-nice.org", + "is-very-sweet.org", + "is-with-theband.com", + "isa-geek.com", + "isa-geek.net", + "isa-geek.org", + "isa-hockeynut.com", + "issmarterthanyou.com", + "isteingeek.de", + "istmein.de", + "kicks-ass.net", + "kicks-ass.org", + "knowsitall.info", + "land-4-sale.us", + "lebtimnetz.de", + "leitungsen.de", + "likes-pie.com", + "likescandy.com", + "merseine.nu", + "mine.nu", + "misconfused.org", + "mypets.ws", + "myphotos.cc", + "neat-url.com", + "office-on-the.net", + "on-the-web.tv", + "podzone.net", + "podzone.org", + "readmyblog.org", + "saves-the-whales.com", + "scrapper-site.net", + "scrapping.cc", + "selfip.biz", + "selfip.com", + "selfip.info", + "selfip.net", + "selfip.org", + "sells-for-less.com", + "sells-for-u.com", + "sells-it.net", + "sellsyourhome.org", + "servebbs.com", + "servebbs.net", + "servebbs.org", + "serveftp.net", + "serveftp.org", + "servegame.org", + "shacknet.nu", + "simple-url.com", + "space-to-rent.com", + "stuff-4-sale.org", + "stuff-4-sale.us", + "teaches-yoga.com", + "thruhere.net", + "traeumtgerade.de", + "webhop.biz", + "webhop.info", + "webhop.net", + "webhop.org", + "worse-than.tv", + "writesthisblog.com", + "eu.org", + "al.eu.org", + "asso.eu.org", + "at.eu.org", + "au.eu.org", + "be.eu.org", + "bg.eu.org", + "ca.eu.org", + "cd.eu.org", + "ch.eu.org", + "cn.eu.org", + "cy.eu.org", + "cz.eu.org", + "de.eu.org", + "dk.eu.org", + "edu.eu.org", + "ee.eu.org", + "es.eu.org", + "fi.eu.org", + "fr.eu.org", + "gr.eu.org", + "hr.eu.org", + "hu.eu.org", + "ie.eu.org", + "il.eu.org", + "in.eu.org", + "int.eu.org", + "is.eu.org", + "it.eu.org", + "jp.eu.org", + "kr.eu.org", + "lt.eu.org", + "lu.eu.org", + "lv.eu.org", + "mc.eu.org", + "me.eu.org", + "mk.eu.org", + "mt.eu.org", + "my.eu.org", + "net.eu.org", + "ng.eu.org", + "nl.eu.org", + "no.eu.org", + "nz.eu.org", + "paris.eu.org", + "pl.eu.org", + "pt.eu.org", + "q-a.eu.org", + "ro.eu.org", + "ru.eu.org", + "se.eu.org", + "si.eu.org", + "sk.eu.org", + "tr.eu.org", + "uk.eu.org", + "us.eu.org", + "a.ssl.fastly.net", + "b.ssl.fastly.net", + "global.ssl.fastly.net", + "a.prod.fastly.net", + "global.prod.fastly.net", + "firebaseapp.com", + "flynnhub.com", + "service.gov.uk", + "github.io", + "githubusercontent.com", + "ro.com", + "appspot.com", + "blogspot.ae", + "blogspot.al", + "blogspot.am", + "blogspot.ba", + "blogspot.be", + "blogspot.bg", + "blogspot.bj", + "blogspot.ca", + "blogspot.cf", + "blogspot.ch", + "blogspot.cl", + "blogspot.co.at", + "blogspot.co.id", + "blogspot.co.il", + "blogspot.co.ke", + "blogspot.co.nz", + "blogspot.co.uk", + "blogspot.co.za", + "blogspot.com", + "blogspot.com.ar", + "blogspot.com.au", + "blogspot.com.br", + "blogspot.com.by", + "blogspot.com.co", + "blogspot.com.cy", + "blogspot.com.ee", + "blogspot.com.eg", + "blogspot.com.es", + "blogspot.com.mt", + "blogspot.com.ng", + "blogspot.com.tr", + "blogspot.com.uy", + "blogspot.cv", + "blogspot.cz", + "blogspot.de", + "blogspot.dk", + "blogspot.fi", + "blogspot.fr", + "blogspot.gr", + "blogspot.hk", + "blogspot.hr", + "blogspot.hu", + "blogspot.ie", + "blogspot.in", + "blogspot.is", + "blogspot.it", + "blogspot.jp", + "blogspot.kr", + "blogspot.li", + "blogspot.lt", + "blogspot.lu", + "blogspot.md", + "blogspot.mk", + "blogspot.mr", + "blogspot.mx", + "blogspot.my", + "blogspot.nl", + "blogspot.no", + "blogspot.pe", + "blogspot.pt", + "blogspot.qa", + "blogspot.re", + "blogspot.ro", + "blogspot.rs", + "blogspot.ru", + "blogspot.se", + "blogspot.sg", + "blogspot.si", + "blogspot.sk", + "blogspot.sn", + "blogspot.td", + "blogspot.tw", + "blogspot.ug", + "blogspot.vn", + "codespot.com", + "googleapis.com", + "googlecode.com", + "pagespeedmobilizer.com", + "withgoogle.com", + "withyoutube.com", + "herokuapp.com", + "herokussl.com", + "iki.fi", + "biz.at", + "info.at", + "co.pl", + "azurewebsites.net", + "azure-mobile.net", + "cloudapp.net", + "bmoattachments.org", + "4u.com", + "nfshost.com", + "nyc.mn", + "nid.io", + "operaunite.com", + "outsystemscloud.com", + "art.pl", + "gliwice.pl", + "krakow.pl", + "poznan.pl", + "wroc.pl", + "zakopane.pl", + "pantheon.io", + "gotpantheon.com", + "priv.at", + "qa2.com", + "rhcloud.com", + "sandcats.io", + "biz.ua", + "co.ua", + "pp.ua", + "sinaapp.com", + "vipsinaapp.com", + "1kapp.com", + "gda.pl", + "gdansk.pl", + "gdynia.pl", + "med.pl", + "sopot.pl", + "hk.com", + "hk.org", + "ltd.hk", + "inc.hk", + "yolasite.com", + "za.net", + "za.org", +} + +var nodeLabels = [...]string{ + "aaa", + "aarp", + "abarth", + "abb", + "abbott", + "abbvie", + "abc", + "able", + "abogado", + "abudhabi", + "ac", + "academy", + "accenture", + "accountant", + "accountants", + "aco", + "active", + "actor", + "ad", + "adac", + "ads", + "adult", + "ae", + "aeg", + "aero", + "aetna", + "af", + "afamilycompany", + "afl", + "africa", + "africamagic", + "ag", + "agakhan", + "agency", + "ai", + "aig", + "aigo", + "airbus", + "airforce", + "airtel", + "akdn", + "al", + "alfaromeo", + "alibaba", + "alipay", + "allfinanz", + "allstate", + "ally", + "alsace", + "alstom", + "am", + "americanexpress", + "americanfamily", + "amex", + "amfam", + "amica", + "amsterdam", + "an", + "analytics", + "android", + "anquan", + "anz", + "ao", + "aol", + "apartments", + "app", + "apple", + "aq", + "aquarelle", + "ar", + "aramco", + "archi", + "army", + "arpa", + "arte", + "as", + "asda", + "asia", + "associates", + "at", + "athleta", + "attorney", + "au", + "auction", + "audi", + "audible", + "audio", + "auspost", + "author", + "auto", + "autos", + "avianca", + "aw", + "aws", + "ax", + "axa", + "az", + "azure", + "ba", + "baby", + "baidu", + "banamex", + "bananarepublic", + "band", + "bank", + "bar", + "barcelona", + "barclaycard", + "barclays", + "barefoot", + "bargains", + "basketball", + "bauhaus", + "bayern", + "bb", + "bbc", + "bbt", + "bbva", + "bcg", + "bcn", + "bd", + "be", + "beats", + "beer", + "bentley", + "berlin", + "best", + "bestbuy", + "bet", + "bf", + "bg", + "bh", + "bharti", + "bi", + "bible", + "bid", + "bike", + "bing", + "bingo", + "bio", + "biz", + "bj", + "black", + "blackfriday", + "blanco", + "blockbuster", + "blog", + "bloomberg", + "blue", + "bm", + "bms", + "bmw", + "bn", + "bnl", + "bnpparibas", + "bo", + "boats", + "boehringer", + "bofa", + "bom", + "bond", + "boo", + "book", + "booking", + "boots", + "bosch", + "bostik", + "bot", + "boutique", + "br", + "bradesco", + "bridgestone", + "broadway", + "broker", + "brother", + "brussels", + "bs", + "bt", + "budapest", + "bugatti", + "build", + "builders", + "business", + "buy", + "buzz", + "bv", + "bw", + "by", + "bz", + "bzh", + "ca", + "cab", + "cafe", + "cal", + "call", + "calvinklein", + "camera", + "camp", + "cancerresearch", + "canon", + "capetown", + "capital", + "capitalone", + "car", + "caravan", + "cards", + "care", + "career", + "careers", + "cars", + "cartier", + "casa", + "case", + "caseih", + "cash", + "casino", + "cat", + "catering", + "cba", + "cbn", + "cbre", + "cbs", + "cc", + "cd", + "ceb", + "center", + "ceo", + "cern", + "cf", + "cfa", + "cfd", + "cg", + "ch", + "chanel", + "channel", + "chase", + "chat", + "cheap", + "chintai", + "chloe", + "christmas", + "chrome", + "chrysler", + "church", + "ci", + "cipriani", + "circle", + "cisco", + "citadel", + "citi", + "citic", + "city", + "cityeats", + "ck", + "cl", + "claims", + "cleaning", + "click", + "clinic", + "clinique", + "clothing", + "cloud", + "club", + "clubmed", + "cm", + "cn", + "co", + "coach", + "codes", + "coffee", + "college", + "cologne", + "com", + "comcast", + "commbank", + "community", + "company", + "compare", + "computer", + "comsec", + "condos", + "construction", + "consulting", + "contact", + "contractors", + "cooking", + "cookingchannel", + "cool", + "coop", + "corsica", + "country", + "coupon", + "coupons", + "courses", + "cr", + "credit", + "creditcard", + "creditunion", + "cricket", + "crown", + "crs", + "cruises", + "csc", + "cu", + "cuisinella", + "cv", + "cw", + "cx", + "cy", + "cymru", + "cyou", + "cz", + "dabur", + "dad", + "dance", + "date", + "dating", + "datsun", + "day", + "dclk", + "dds", + "de", + "deal", + "dealer", + "deals", + "degree", + "delivery", + "dell", + "deloitte", + "delta", + "democrat", + "dental", + "dentist", + "desi", + "design", + "dev", + "dhl", + "diamonds", + "diet", + "digital", + "direct", + "directory", + "discount", + "discover", + "dish", + "dj", + "dk", + "dm", + "dnp", + "do", + "docs", + "dodge", + "dog", + "doha", + "domains", + "doosan", + "dot", + "download", + "drive", + "dstv", + "dtv", + "dubai", + "duck", + "dunlop", + "duns", + "dupont", + "durban", + "dvag", + "dwg", + "dz", + "earth", + "eat", + "ec", + "edeka", + "edu", + "education", + "ee", + "eg", + "email", + "emerck", + "emerson", + "energy", + "engineer", + "engineering", + "enterprises", + "epost", + "epson", + "equipment", + "er", + "ericsson", + "erni", + "es", + "esq", + "estate", + "esurance", + "et", + "etisalat", + "eu", + "eurovision", + "eus", + "events", + "everbank", + "exchange", + "expert", + "exposed", + "express", + "extraspace", + "fage", + "fail", + "fairwinds", + "faith", + "family", + "fan", + "fans", + "farm", + "farmers", + "fashion", + "fast", + "fedex", + "feedback", + "ferrari", + "ferrero", + "fi", + "fiat", + "fidelity", + "fido", + "film", + "final", + "finance", + "financial", + "fire", + "firestone", + "firmdale", + "fish", + "fishing", + "fit", + "fitness", + "fj", + "fk", + "flickr", + "flights", + "flir", + "florist", + "flowers", + "flsmidth", + "fly", + "fm", + "fo", + "foo", + "foodnetwork", + "football", + "ford", + "forex", + "forsale", + "forum", + "foundation", + "fox", + "fr", + "fresenius", + "frl", + "frogans", + "frontdoor", + "frontier", + "ftr", + "fujitsu", + "fujixerox", + "fund", + "furniture", + "futbol", + "fyi", + "ga", + "gal", + "gallery", + "gallo", + "gallup", + "game", + "games", + "gap", + "garden", + "gb", + "gbiz", + "gd", + "gdn", + "ge", + "gea", + "gent", + "genting", + "george", + "gf", + "gg", + "ggee", + "gh", + "gi", + "gift", + "gifts", + "gives", + "giving", + "gl", + "glade", + "glass", + "gle", + "global", + "globo", + "gm", + "gmail", + "gmo", + "gmx", + "gn", + "godaddy", + "gold", + "goldpoint", + "golf", + "goo", + "goodhands", + "goodyear", + "goog", + "google", + "gop", + "got", + "gotv", + "gov", + "gp", + "gq", + "gr", + "grainger", + "graphics", + "gratis", + "green", + "gripe", + "group", + "gs", + "gt", + "gu", + "guardian", + "gucci", + "guge", + "guide", + "guitars", + "guru", + "gw", + "gy", + "hamburg", + "hangout", + "haus", + "hbo", + "hdfc", + "hdfcbank", + "health", + "healthcare", + "help", + "helsinki", + "here", + "hermes", + "hgtv", + "hiphop", + "hisamitsu", + "hitachi", + "hiv", + "hk", + "hkt", + "hm", + "hn", + "hockey", + "holdings", + "holiday", + "homedepot", + "homegoods", + "homes", + "homesense", + "honda", + "honeywell", + "horse", + "host", + "hosting", + "hot", + "hoteles", + "hotmail", + "house", + "how", + "hr", + "hsbc", + "ht", + "htc", + "hu", + "hughes", + "hyatt", + "hyundai", + "ibm", + "icbc", + "ice", + "icu", + "id", + "ie", + "ieee", + "ifm", + "iinet", + "ikano", + "il", + "im", + "imamat", + "imdb", + "immo", + "immobilien", + "in", + "industries", + "infiniti", + "info", + "ing", + "ink", + "institute", + "insurance", + "insure", + "int", + "intel", + "international", + "intuit", + "investments", + "io", + "ipiranga", + "iq", + "ir", + "irish", + "is", + "iselect", + "ismaili", + "ist", + "istanbul", + "it", + "itau", + "itv", + "iveco", + "iwc", + "jaguar", + "java", + "jcb", + "jcp", + "je", + "jeep", + "jetzt", + "jewelry", + "jio", + "jlc", + "jll", + "jm", + "jmp", + "jnj", + "jo", + "jobs", + "joburg", + "jot", + "joy", + "jp", + "jpmorgan", + "jprs", + "juegos", + "juniper", + "kaufen", + "kddi", + "ke", + "kerryhotels", + "kerrylogistics", + "kerryproperties", + "kfh", + "kg", + "kh", + "ki", + "kia", + "kim", + "kinder", + "kindle", + "kitchen", + "kiwi", + "km", + "kn", + "koeln", + "komatsu", + "kosher", + "kp", + "kpmg", + "kpn", + "kr", + "krd", + "kred", + "kuokgroup", + "kw", + "ky", + "kyknet", + "kyoto", + "kz", + "la", + "lacaixa", + "ladbrokes", + "lamborghini", + "lamer", + "lancaster", + "lancia", + "lancome", + "land", + "landrover", + "lanxess", + "lasalle", + "lat", + "latino", + "latrobe", + "law", + "lawyer", + "lb", + "lc", + "lds", + "lease", + "leclerc", + "lefrak", + "legal", + "lego", + "lexus", + "lgbt", + "li", + "liaison", + "lidl", + "life", + "lifeinsurance", + "lifestyle", + "lighting", + "like", + "lilly", + "limited", + "limo", + "lincoln", + "linde", + "link", + "lipsy", + "live", + "living", + "lixil", + "lk", + "loan", + "loans", + "locker", + "locus", + "loft", + "lol", + "london", + "lotte", + "lotto", + "love", + "lpl", + "lplfinancial", + "lr", + "ls", + "lt", + "ltd", + "ltda", + "lu", + "lundbeck", + "lupin", + "luxe", + "luxury", + "lv", + "ly", + "ma", + "macys", + "madrid", + "maif", + "maison", + "makeup", + "man", + "management", + "mango", + "market", + "marketing", + "markets", + "marriott", + "marshalls", + "maserati", + "mattel", + "mba", + "mc", + "mcd", + "mcdonalds", + "mckinsey", + "md", + "me", + "med", + "media", + "meet", + "melbourne", + "meme", + "memorial", + "men", + "menu", + "meo", + "metlife", + "mg", + "mh", + "miami", + "microsoft", + "mil", + "mini", + "mint", + "mit", + "mitsubishi", + "mk", + "ml", + "mlb", + "mls", + "mm", + "mma", + "mn", + "mnet", + "mo", + "mobi", + "mobily", + "moda", + "moe", + "moi", + "mom", + "monash", + "money", + "monster", + "montblanc", + "mopar", + "mormon", + "mortgage", + "moscow", + "moto", + "motorcycles", + "mov", + "movie", + "movistar", + "mp", + "mq", + "mr", + "ms", + "msd", + "mt", + "mtn", + "mtpc", + "mtr", + "mu", + "multichoice", + "museum", + "mutual", + "mutuelle", + "mv", + "mw", + "mx", + "my", + "mz", + "mzansimagic", + "na", + "nab", + "nadex", + "nagoya", + "name", + "naspers", + "nationwide", + "natura", + "navy", + "nba", + "nc", + "ne", + "nec", + "net", + "netbank", + "netflix", + "network", + "neustar", + "new", + "newholland", + "news", + "next", + "nextdirect", + "nexus", + "nf", + "nfl", + "ng", + "ngo", + "nhk", + "ni", + "nico", + "nike", + "nikon", + "ninja", + "nissan", + "nl", + "no", + "nokia", + "northwesternmutual", + "norton", + "now", + "nowruz", + "nowtv", + "np", + "nr", + "nra", + "nrw", + "ntt", + "nu", + "nyc", + "nz", + "obi", + "observer", + "off", + "office", + "okinawa", + "olayan", + "olayangroup", + "oldnavy", + "ollo", + "om", + "omega", + "one", + "ong", + "onl", + "online", + "onyourside", + "ooo", + "open", + "oracle", + "orange", + "org", + "organic", + "orientexpress", + "origins", + "osaka", + "otsuka", + "ott", + "ovh", + "pa", + "page", + "pamperedchef", + "panasonic", + "panerai", + "paris", + "pars", + "partners", + "parts", + "party", + "passagens", + "pay", + "payu", + "pccw", + "pe", + "pet", + "pf", + "pfizer", + "pg", + "ph", + "pharmacy", + "philips", + "photo", + "photography", + "photos", + "physio", + "piaget", + "pics", + "pictet", + "pictures", + "pid", + "pin", + "ping", + "pink", + "pioneer", + "pizza", + "pk", + "pl", + "place", + "play", + "playstation", + "plumbing", + "plus", + "pm", + "pn", + "pnc", + "pohl", + "poker", + "politie", + "porn", + "post", + "pr", + "pramerica", + "praxi", + "press", + "prime", + "pro", + "prod", + "productions", + "prof", + "progressive", + "promo", + "properties", + "property", + "protection", + "pru", + "prudential", + "ps", + "pt", + "pub", + "pw", + "py", + "qa", + "qpon", + "quebec", + "quest", + "qvc", + "racing", + "raid", + "re", + "read", + "realestate", + "realtor", + "realty", + "recipes", + "red", + "redstone", + "redumbrella", + "rehab", + "reise", + "reisen", + "reit", + "reliance", + "ren", + "rent", + "rentals", + "repair", + "report", + "republican", + "rest", + "restaurant", + "review", + "reviews", + "rexroth", + "rich", + "richardli", + "ricoh", + "rightathome", + "ril", + "rio", + "rip", + "ro", + "rocher", + "rocks", + "rodeo", + "rogers", + "room", + "rs", + "rsvp", + "ru", + "ruhr", + "run", + "rw", + "rwe", + "ryukyu", + "sa", + "saarland", + "safe", + "safety", + "sakura", + "sale", + "salon", + "samsclub", + "samsung", + "sandvik", + "sandvikcoromant", + "sanofi", + "sap", + "sapo", + "sarl", + "sas", + "save", + "saxo", + "sb", + "sbi", + "sbs", + "sc", + "sca", + "scb", + "schaeffler", + "schmidt", + "scholarships", + "school", + "schule", + "schwarz", + "science", + "scjohnson", + "scor", + "scot", + "sd", + "se", + "seat", + "secure", + "security", + "seek", + "select", + "sener", + "services", + "ses", + "seven", + "sew", + "sex", + "sexy", + "sfr", + "sg", + "sh", + "shangrila", + "sharp", + "shaw", + "shell", + "shia", + "shiksha", + "shoes", + "shouji", + "show", + "showtime", + "shriram", + "si", + "silk", + "sina", + "singles", + "site", + "sj", + "sk", + "ski", + "skin", + "sky", + "skype", + "sl", + "sling", + "sm", + "smart", + "smile", + "sn", + "sncf", + "so", + "soccer", + "social", + "softbank", + "software", + "sohu", + "solar", + "solutions", + "song", + "sony", + "soy", + "space", + "spiegel", + "spot", + "spreadbetting", + "sr", + "srl", + "srt", + "st", + "stada", + "staples", + "star", + "starhub", + "statebank", + "statefarm", + "statoil", + "stc", + "stcgroup", + "stockholm", + "storage", + "store", + "studio", + "study", + "style", + "su", + "sucks", + "supersport", + "supplies", + "supply", + "support", + "surf", + "surgery", + "suzuki", + "sv", + "swatch", + "swiftcover", + "swiss", + "sx", + "sy", + "sydney", + "symantec", + "systems", + "sz", + "tab", + "taipei", + "talk", + "taobao", + "target", + "tatamotors", + "tatar", + "tattoo", + "tax", + "taxi", + "tc", + "tci", + "td", + "tdk", + "team", + "tech", + "technology", + "tel", + "telecity", + "telefonica", + "temasek", + "tennis", + "teva", + "tf", + "tg", + "th", + "thd", + "theater", + "theatre", + "theguardian", + "tiaa", + "tickets", + "tienda", + "tiffany", + "tips", + "tires", + "tirol", + "tj", + "tjmaxx", + "tjx", + "tk", + "tkmaxx", + "tl", + "tm", + "tmall", + "tn", + "to", + "today", + "tokyo", + "tools", + "top", + "toray", + "toshiba", + "total", + "tours", + "town", + "toyota", + "toys", + "tp", + "tr", + "trade", + "trading", + "training", + "travel", + "travelchannel", + "travelers", + "travelersinsurance", + "trust", + "trv", + "tt", + "tube", + "tui", + "tunes", + "tushu", + "tv", + "tvs", + "tw", + "tz", + "ua", + "ubank", + "ubs", + "uconnect", + "ug", + "uk", + "university", + "uno", + "uol", + "ups", + "us", + "uy", + "uz", + "va", + "vacations", + "vana", + "vanguard", + "vc", + "ve", + "vegas", + "ventures", + "verisign", + "versicherung", + "vet", + "vg", + "vi", + "viajes", + "video", + "vig", + "viking", + "villas", + "vin", + "vip", + "virgin", + "visa", + "vision", + "vista", + "vistaprint", + "viva", + "vivo", + "vlaanderen", + "vn", + "vodka", + "volkswagen", + "vote", + "voting", + "voto", + "voyage", + "vu", + "vuelos", + "wales", + "walmart", + "walter", + "wang", + "wanggou", + "warman", + "watch", + "watches", + "weather", + "weatherchannel", + "webcam", + "weber", + "website", + "wed", + "wedding", + "weibo", + "weir", + "wf", + "whoswho", + "wien", + "wiki", + "williamhill", + "win", + "windows", + "wine", + "winners", + "wme", + "wolterskluwer", + "woodside", + "work", + "works", + "world", + "wow", + "ws", + "wtc", + "wtf", + "xbox", + "xerox", + "xfinity", + "xihuan", + "xin", + "xn--11b4c3d", + "xn--1ck2e1b", + "xn--1qqw23a", + "xn--30rr7y", + "xn--3bst00m", + "xn--3ds443g", + "xn--3e0b707e", + "xn--3oq18vl8pn36a", + "xn--3pxu8k", + "xn--42c2d9a", + "xn--45brj9c", + "xn--45q11c", + "xn--4gbrim", + "xn--4gq48lf9j", + "xn--54b7fta0cc", + "xn--55qw42g", + "xn--55qx5d", + "xn--5su34j936bgsg", + "xn--5tzm5g", + "xn--6frz82g", + "xn--6qq986b3xl", + "xn--80adxhks", + "xn--80ao21a", + "xn--80asehdb", + "xn--80aswg", + "xn--8y0a063a", + "xn--90a3ac", + "xn--90ais", + "xn--9dbq2a", + "xn--9et52u", + "xn--9krt00a", + "xn--b4w605ferd", + "xn--bck1b9a5dre4c", + "xn--c1avg", + "xn--c2br7g", + "xn--cck2b3b", + "xn--cg4bki", + "xn--clchc0ea0b2g2a9gcd", + "xn--czr694b", + "xn--czrs0t", + "xn--czru2d", + "xn--d1acj3b", + "xn--d1alf", + "xn--eckvdtc9d", + "xn--efvy88h", + "xn--estv75g", + "xn--fct429k", + "xn--fhbei", + "xn--fiq228c5hs", + "xn--fiq64b", + "xn--fiqs8s", + "xn--fiqz9s", + "xn--fjq720a", + "xn--flw351e", + "xn--fpcrj9c3d", + "xn--fzc2c9e2c", + "xn--fzys8d69uvgm", + "xn--g2xx48c", + "xn--gckr3f0f", + "xn--gecrj9c", + "xn--gk3at1e", + "xn--h2brj9c", + "xn--hxt814e", + "xn--i1b6b1a6a2e", + "xn--imr513n", + "xn--io0a7i", + "xn--j1aef", + "xn--j1amh", + "xn--j6w193g", + "xn--jlq61u9w7b", + "xn--jvr189m", + "xn--kcrx77d1x4a", + "xn--kprw13d", + "xn--kpry57d", + "xn--kpu716f", + "xn--kput3i", + "xn--l1acc", + "xn--lgbbat1ad8j", + "xn--mgb2ddes", + "xn--mgb9awbf", + "xn--mgba3a3ejt", + "xn--mgba3a4f16a", + "xn--mgba3a4fra", + "xn--mgba7c0bbn0a", + "xn--mgbaakc7dvf", + "xn--mgbaam7a8h", + "xn--mgbab2bd", + "xn--mgbai9a5eva00b", + "xn--mgbai9azgqp6j", + "xn--mgbayh7gpa", + "xn--mgbb9fbpob", + "xn--mgbbh1a71e", + "xn--mgbc0a9azcg", + "xn--mgbca7dzdo", + "xn--mgberp4a5d4a87g", + "xn--mgberp4a5d4ar", + "xn--mgbpl2fh", + "xn--mgbqly7c0a67fbc", + "xn--mgbqly7cvafr", + "xn--mgbt3dhd", + "xn--mgbtf8fl", + "xn--mgbtx2b", + "xn--mgbx4cd0ab", + "xn--mix082f", + "xn--mix891f", + "xn--mk1bu44c", + "xn--mxtq1m", + "xn--ngbc5azd", + "xn--ngbe9e0a", + "xn--nnx388a", + "xn--node", + "xn--nqv7f", + "xn--nqv7fs00ema", + "xn--nyqy26a", + "xn--o3cw4h", + "xn--ogbpf8fl", + "xn--p1acf", + "xn--p1ai", + "xn--pbt977c", + "xn--pgbs0dh", + "xn--pssy2u", + "xn--q9jyb4c", + "xn--qcka1pmc", + "xn--qxam", + "xn--rhqv96g", + "xn--rovu88b", + "xn--s9brj9c", + "xn--ses554g", + "xn--t60b56a", + "xn--tckwe", + "xn--unup4y", + "xn--vermgensberater-ctb", + "xn--vermgensberatung-pwb", + "xn--vhquv", + "xn--vuq861b", + "xn--w4r85el8fhu5dnra", + "xn--w4rs40l", + "xn--wgbh1c", + "xn--wgbl6a", + "xn--xhq521b", + "xn--xkc2al3hye2a", + "xn--xkc2dl3a5ee0h", + "xn--y9a3aq", + "xn--yfro4i67o", + "xn--ygbi2ammx", + "xn--zfr164b", + "xperia", + "xxx", + "xyz", + "yachts", + "yahoo", + "yamaxun", + "yandex", + "ye", + "yodobashi", + "yoga", + "yokohama", + "you", + "youtube", + "yt", + "yun", + "za", + "zappos", + "zara", + "zero", + "zip", + "zippo", + "zm", + "zone", + "zuerich", + "zw", + "com", + "edu", + "gov", + "mil", + "net", + "org", + "nom", + "ac", + "blogspot", + "co", + "gov", + "mil", + "net", + "org", + "sch", + "accident-investigation", + "accident-prevention", + "aerobatic", + "aeroclub", + "aerodrome", + "agents", + "air-surveillance", + "air-traffic-control", + "aircraft", + "airline", + "airport", + "airtraffic", + "ambulance", + "amusement", + "association", + "author", + "ballooning", + "broker", + "caa", + "cargo", + "catering", + "certification", + "championship", + "charter", + "civilaviation", + "club", + "conference", + "consultant", + "consulting", + "control", + "council", + "crew", + "design", + "dgca", + "educator", + "emergency", + "engine", + "engineer", + "entertainment", + "equipment", + "exchange", + "express", + "federation", + "flight", + "freight", + "fuel", + "gliding", + "government", + "groundhandling", + "group", + "hanggliding", + "homebuilt", + "insurance", + "journal", + "journalist", + "leasing", + "logistics", + "magazine", + "maintenance", + "marketplace", + "media", + "microlight", + "modelling", + "navigation", + "parachuting", + "paragliding", + "passenger-association", + "pilot", + "press", + "production", + "recreation", + "repbody", + "res", + "research", + "rotorcraft", + "safety", + "scientist", + "services", + "show", + "skydiving", + "software", + "student", + "taxi", + "trader", + "trading", + "trainer", + "union", + "workinggroup", + "works", + "com", + "edu", + "gov", + "net", + "org", + "co", + "com", + "net", + "nom", + "org", + "com", + "net", + "off", + "org", + "blogspot", + "com", + "edu", + "gov", + "mil", + "net", + "org", + "blogspot", + "com", + "edu", + "net", + "org", + "co", + "ed", + "gv", + "it", + "og", + "pb", + "com", + "edu", + "gob", + "gov", + "int", + "mil", + "net", + "org", + "tur", + "blogspot", + "e164", + "in-addr", + "ip6", + "iris", + "uri", + "urn", + "gov", + "ac", + "biz", + "co", + "gv", + "info", + "or", + "priv", + "blogspot", + "act", + "asn", + "com", + "conf", + "edu", + "gov", + "id", + "info", + "net", + "nsw", + "nt", + "org", + "oz", + "qld", + "sa", + "tas", + "vic", + "wa", + "blogspot", + "act", + "nsw", + "nt", + "qld", + "sa", + "tas", + "vic", + "wa", + "qld", + "sa", + "tas", + "vic", + "wa", + "com", + "biz", + "com", + "edu", + "gov", + "info", + "int", + "mil", + "name", + "net", + "org", + "pp", + "pro", + "blogspot", + "co", + "com", + "edu", + "gov", + "mil", + "net", + "org", + "rs", + "unbi", + "unsa", + "biz", + "co", + "com", + "edu", + "gov", + "info", + "net", + "org", + "store", + "tv", + "ac", + "blogspot", + "gov", + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "a", + "b", + "blogspot", + "c", + "d", + "e", + "f", + "g", + "h", + "i", + "j", + "k", + "l", + "m", + "n", + "o", + "p", + "q", + "r", + "s", + "t", + "u", + "v", + "w", + "x", + "y", + "z", + "com", + "edu", + "gov", + "net", + "org", + "co", + "com", + "edu", + "or", + "org", + "dyndns", + "for-better", + "for-more", + "for-some", + "for-the", + "selfip", + "webhop", + "asso", + "barreau", + "blogspot", + "gouv", + "com", + "edu", + "gov", + "net", + "org", + "com", + "edu", + "gob", + "gov", + "int", + "mil", + "net", + "org", + "tv", + "adm", + "adv", + "agr", + "am", + "arq", + "art", + "ato", + "b", + "bio", + "blog", + "bmd", + "cim", + "cng", + "cnt", + "com", + "coop", + "ecn", + "eco", + "edu", + "emp", + "eng", + "esp", + "etc", + "eti", + "far", + "flog", + "fm", + "fnd", + "fot", + "fst", + "g12", + "ggf", + "gov", + "imb", + "ind", + "inf", + "jor", + "jus", + "leg", + "lel", + "mat", + "med", + "mil", + "mp", + "mus", + "net", + "nom", + "not", + "ntr", + "odo", + "org", + "ppg", + "pro", + "psc", + "psi", + "qsl", + "radio", + "rec", + "slg", + "srv", + "taxi", + "teo", + "tmp", + "trd", + "tur", + "tv", + "vet", + "vlog", + "wiki", + "zlg", + "blogspot", + "com", + "edu", + "gov", + "net", + "org", + "com", + "edu", + "gov", + "net", + "org", + "co", + "org", + "com", + "gov", + "mil", + "of", + "blogspot", + "com", + "edu", + "gov", + "net", + "org", + "za", + "ab", + "bc", + "blogspot", + "co", + "gc", + "mb", + "nb", + "nf", + "nl", + "ns", + "nt", + "nu", + "on", + "pe", + "qc", + "sk", + "yk", + "ftpaccess", + "game-server", + "myphotos", + "scrapping", + "gov", + "blogspot", + "blogspot", + "ac", + "asso", + "co", + "com", + "ed", + "edu", + "go", + "gouv", + "int", + "md", + "net", + "or", + "org", + "presse", + "xn--aroport-bya", + "www", + "blogspot", + "co", + "gob", + "gov", + "mil", + "co", + "com", + "gov", + "net", + "ac", + "ah", + "amazonaws", + "bj", + "com", + "cq", + "edu", + "fj", + "gd", + "gov", + "gs", + "gx", + "gz", + "ha", + "hb", + "he", + "hi", + "hk", + "hl", + "hn", + "jl", + "js", + "jx", + "ln", + "mil", + "mo", + "net", + "nm", + "nx", + "org", + "qh", + "sc", + "sd", + "sh", + "sn", + "sx", + "tj", + "tw", + "xj", + "xn--55qx5d", + "xn--io0a7i", + "xn--od0alg", + "xz", + "yn", + "zj", + "compute", + "cn-north-1", + "amazonaws", + "cn-north-1", + "s3", + "arts", + "com", + "edu", + "firm", + "gov", + "info", + "int", + "mil", + "net", + "nom", + "org", + "rec", + "web", + "blogspot", + "1kapp", + "4u", + "africa", + "amazonaws", + "appspot", + "ar", + "betainabox", + "blogdns", + "blogspot", + "br", + "cechire", + "cloudcontrolapp", + "cloudcontrolled", + "cn", + "co", + "codespot", + "de", + "dnsalias", + "dnsdojo", + "doesntexist", + "dontexist", + "doomdns", + "dreamhosters", + "dyn-o-saur", + "dynalias", + "dyndns-at-home", + "dyndns-at-work", + "dyndns-blog", + "dyndns-free", + "dyndns-home", + "dyndns-ip", + "dyndns-mail", + "dyndns-office", + "dyndns-pics", + "dyndns-remote", + "dyndns-server", + "dyndns-web", + "dyndns-wiki", + "dyndns-work", + "elasticbeanstalk", + "est-a-la-maison", + "est-a-la-masion", + "est-le-patron", + "est-mon-blogueur", + "eu", + "firebaseapp", + "flynnhub", + "from-ak", + "from-al", + "from-ar", + "from-ca", + "from-ct", + "from-dc", + "from-de", + "from-fl", + "from-ga", + "from-hi", + "from-ia", + "from-id", + "from-il", + "from-in", + "from-ks", + "from-ky", + "from-ma", + "from-md", + "from-mi", + "from-mn", + "from-mo", + "from-ms", + "from-mt", + "from-nc", + "from-nd", + "from-ne", + "from-nh", + "from-nj", + "from-nm", + "from-nv", + "from-oh", + "from-ok", + "from-or", + "from-pa", + "from-pr", + "from-ri", + "from-sc", + "from-sd", + "from-tn", + "from-tx", + "from-ut", + "from-va", + "from-vt", + "from-wa", + "from-wi", + "from-wv", + "from-wy", + "gb", + "getmyip", + "githubusercontent", + "googleapis", + "googlecode", + "gotdns", + "gotpantheon", + "gr", + "herokuapp", + "herokussl", + "hk", + "hobby-site", + "homelinux", + "homeunix", + "hu", + "iamallama", + "is-a-anarchist", + "is-a-blogger", + "is-a-bookkeeper", + "is-a-bulls-fan", + "is-a-caterer", + "is-a-chef", + "is-a-conservative", + "is-a-cpa", + "is-a-cubicle-slave", + "is-a-democrat", + "is-a-designer", + "is-a-doctor", + "is-a-financialadvisor", + "is-a-geek", + "is-a-green", + "is-a-guru", + "is-a-hard-worker", + "is-a-hunter", + "is-a-landscaper", + "is-a-lawyer", + "is-a-liberal", + "is-a-libertarian", + "is-a-llama", + "is-a-musician", + "is-a-nascarfan", + "is-a-nurse", + "is-a-painter", + "is-a-personaltrainer", + "is-a-photographer", + "is-a-player", + "is-a-republican", + "is-a-rockstar", + "is-a-socialist", + "is-a-student", + "is-a-teacher", + "is-a-techie", + "is-a-therapist", + "is-an-accountant", + "is-an-actor", + "is-an-actress", + "is-an-anarchist", + "is-an-artist", + "is-an-engineer", + "is-an-entertainer", + "is-certified", + "is-gone", + "is-into-anime", + "is-into-cars", + "is-into-cartoons", + "is-into-games", + "is-leet", + "is-not-certified", + "is-slick", + "is-uberleet", + "is-with-theband", + "isa-geek", + "isa-hockeynut", + "issmarterthanyou", + "jpn", + "kr", + "likes-pie", + "likescandy", + "mex", + "neat-url", + "nfshost", + "no", + "operaunite", + "outsystemscloud", + "pagespeedmobilizer", + "qa2", + "qc", + "rhcloud", + "ro", + "ru", + "sa", + "saves-the-whales", + "se", + "selfip", + "sells-for-less", + "sells-for-u", + "servebbs", + "simple-url", + "sinaapp", + "space-to-rent", + "teaches-yoga", + "uk", + "us", + "uy", + "vipsinaapp", + "withgoogle", + "withyoutube", + "writesthisblog", + "yolasite", + "za", + "compute", + "compute-1", + "elb", + "eu-central-1", + "s3", + "s3-ap-northeast-1", + "s3-ap-southeast-1", + "s3-ap-southeast-2", + "s3-eu-central-1", + "s3-eu-west-1", + "s3-external-1", + "s3-external-2", + "s3-fips-us-gov-west-1", + "s3-sa-east-1", + "s3-us-gov-west-1", + "s3-us-west-1", + "s3-us-west-2", + "us-east-1", + "ap-northeast-1", + "ap-southeast-1", + "ap-southeast-2", + "eu-central-1", + "eu-west-1", + "sa-east-1", + "us-gov-west-1", + "us-west-1", + "us-west-2", + "z-1", + "z-2", + "s3", + "ac", + "co", + "ed", + "fi", + "go", + "or", + "sa", + "com", + "edu", + "gov", + "inf", + "net", + "org", + "blogspot", + "com", + "edu", + "net", + "org", + "ath", + "gov", + "ac", + "biz", + "com", + "ekloges", + "gov", + "ltd", + "name", + "net", + "org", + "parliament", + "press", + "pro", + "tm", + "blogspot", + "blogspot", + "blogspot", + "com", + "fuettertdasnetz", + "isteingeek", + "istmein", + "lebtimnetz", + "leitungsen", + "traeumtgerade", + "blogspot", + "com", + "edu", + "gov", + "net", + "org", + "art", + "com", + "edu", + "gob", + "gov", + "mil", + "net", + "org", + "sld", + "web", + "art", + "asso", + "com", + "edu", + "gov", + "net", + "org", + "pol", + "com", + "edu", + "fin", + "gob", + "gov", + "info", + "k12", + "med", + "mil", + "net", + "org", + "pro", + "aip", + "com", + "edu", + "fie", + "gov", + "lib", + "med", + "org", + "pri", + "riik", + "blogspot", + "com", + "edu", + "eun", + "gov", + "mil", + "name", + "net", + "org", + "sci", + "blogspot", + "com", + "edu", + "gob", + "nom", + "org", + "blogspot", + "biz", + "com", + "edu", + "gov", + "info", + "name", + "net", + "org", + "aland", + "blogspot", + "iki", + "aeroport", + "assedic", + "asso", + "avocat", + "avoues", + "blogspot", + "cci", + "chambagri", + "chirurgiens-dentistes", + "com", + "experts-comptables", + "geometre-expert", + "gouv", + "greta", + "huissier-justice", + "medecin", + "nom", + "notaires", + "pharmacien", + "port", + "prd", + "presse", + "tm", + "veterinaire", + "com", + "edu", + "gov", + "mil", + "net", + "org", + "pvt", + "co", + "net", + "org", + "com", + "edu", + "gov", + "mil", + "org", + "com", + "edu", + "gov", + "ltd", + "mod", + "org", + "co", + "com", + "edu", + "net", + "org", + "ac", + "com", + "edu", + "gov", + "net", + "org", + "asso", + "com", + "edu", + "mobi", + "net", + "org", + "blogspot", + "com", + "edu", + "gov", + "net", + "org", + "com", + "edu", + "gob", + "ind", + "mil", + "net", + "org", + "co", + "com", + "net", + "blogspot", + "com", + "edu", + "gov", + "idv", + "inc", + "ltd", + "net", + "org", + "xn--55qx5d", + "xn--ciqpn", + "xn--gmq050i", + "xn--gmqw5a", + "xn--io0a7i", + "xn--lcvr32d", + "xn--mk0axi", + "xn--mxtq1m", + "xn--od0alg", + "xn--od0aq3b", + "xn--tn0ag", + "xn--uc0atv", + "xn--uc0ay4a", + "xn--wcvs22d", + "xn--zf0avx", + "com", + "edu", + "gob", + "mil", + "net", + "org", + "blogspot", + "com", + "from", + "iz", + "name", + "adult", + "art", + "asso", + "com", + "coop", + "edu", + "firm", + "gouv", + "info", + "med", + "net", + "org", + "perso", + "pol", + "pro", + "rel", + "shop", + "2000", + "agrar", + "blogspot", + "bolt", + "casino", + "city", + "co", + "erotica", + "erotika", + "film", + "forum", + "games", + "hotel", + "info", + "ingatlan", + "jogasz", + "konyvelo", + "lakas", + "media", + "news", + "org", + "priv", + "reklam", + "sex", + "shop", + "sport", + "suli", + "szex", + "tm", + "tozsde", + "utazas", + "video", + "ac", + "biz", + "co", + "desa", + "go", + "mil", + "my", + "net", + "or", + "sch", + "web", + "blogspot", + "blogspot", + "gov", + "ac", + "co", + "gov", + "idf", + "k12", + "muni", + "net", + "org", + "blogspot", + "ac", + "co", + "com", + "net", + "org", + "tt", + "tv", + "ltd", + "plc", + "ac", + "blogspot", + "co", + "edu", + "firm", + "gen", + "gov", + "ind", + "mil", + "net", + "nic", + "org", + "res", + "barrel-of-knowledge", + "barrell-of-knowledge", + "dyndns", + "for-our", + "groks-the", + "groks-this", + "here-for-more", + "knowsitall", + "selfip", + "webhop", + "eu", + "com", + "github", + "nid", + "pantheon", + "sandcats", + "com", + "edu", + "gov", + "mil", + "net", + "org", + "ac", + "co", + "gov", + "id", + "net", + "org", + "sch", + "xn--mgba3a4f16a", + "xn--mgba3a4fra", + "blogspot", + "com", + "cupcake", + "edu", + "gov", + "int", + "net", + "org", + "abr", + "abruzzo", + "ag", + "agrigento", + "al", + "alessandria", + "alto-adige", + "altoadige", + "an", + "ancona", + "andria-barletta-trani", + "andria-trani-barletta", + "andriabarlettatrani", + "andriatranibarletta", + "ao", + "aosta", + "aosta-valley", + "aostavalley", + "aoste", + "ap", + "aq", + "aquila", + "ar", + "arezzo", + "ascoli-piceno", + "ascolipiceno", + "asti", + "at", + "av", + "avellino", + "ba", + "balsan", + "bari", + "barletta-trani-andria", + "barlettatraniandria", + "bas", + "basilicata", + "belluno", + "benevento", + "bergamo", + "bg", + "bi", + "biella", + "bl", + "blogspot", + "bn", + "bo", + "bologna", + "bolzano", + "bozen", + "br", + "brescia", + "brindisi", + "bs", + "bt", + "bz", + "ca", + "cagliari", + "cal", + "calabria", + "caltanissetta", + "cam", + "campania", + "campidano-medio", + "campidanomedio", + "campobasso", + "carbonia-iglesias", + "carboniaiglesias", + "carrara-massa", + "carraramassa", + "caserta", + "catania", + "catanzaro", + "cb", + "ce", + "cesena-forli", + "cesenaforli", + "ch", + "chieti", + "ci", + "cl", + "cn", + "co", + "como", + "cosenza", + "cr", + "cremona", + "crotone", + "cs", + "ct", + "cuneo", + "cz", + "dell-ogliastra", + "dellogliastra", + "edu", + "emilia-romagna", + "emiliaromagna", + "emr", + "en", + "enna", + "fc", + "fe", + "fermo", + "ferrara", + "fg", + "fi", + "firenze", + "florence", + "fm", + "foggia", + "forli-cesena", + "forlicesena", + "fr", + "friuli-v-giulia", + "friuli-ve-giulia", + "friuli-vegiulia", + "friuli-venezia-giulia", + "friuli-veneziagiulia", + "friuli-vgiulia", + "friuliv-giulia", + "friulive-giulia", + "friulivegiulia", + "friulivenezia-giulia", + "friuliveneziagiulia", + "friulivgiulia", + "frosinone", + "fvg", + "ge", + "genoa", + "genova", + "go", + "gorizia", + "gov", + "gr", + "grosseto", + "iglesias-carbonia", + "iglesiascarbonia", + "im", + "imperia", + "is", + "isernia", + "kr", + "la-spezia", + "laquila", + "laspezia", + "latina", + "laz", + "lazio", + "lc", + "le", + "lecce", + "lecco", + "li", + "lig", + "liguria", + "livorno", + "lo", + "lodi", + "lom", + "lombardia", + "lombardy", + "lt", + "lu", + "lucania", + "lucca", + "macerata", + "mantova", + "mar", + "marche", + "massa-carrara", + "massacarrara", + "matera", + "mb", + "mc", + "me", + "medio-campidano", + "mediocampidano", + "messina", + "mi", + "milan", + "milano", + "mn", + "mo", + "modena", + "mol", + "molise", + "monza", + "monza-brianza", + "monza-e-della-brianza", + "monzabrianza", + "monzaebrianza", + "monzaedellabrianza", + "ms", + "mt", + "na", + "naples", + "napoli", + "no", + "novara", + "nu", + "nuoro", + "og", + "ogliastra", + "olbia-tempio", + "olbiatempio", + "or", + "oristano", + "ot", + "pa", + "padova", + "padua", + "palermo", + "parma", + "pavia", + "pc", + "pd", + "pe", + "perugia", + "pesaro-urbino", + "pesarourbino", + "pescara", + "pg", + "pi", + "piacenza", + "piedmont", + "piemonte", + "pisa", + "pistoia", + "pmn", + "pn", + "po", + "pordenone", + "potenza", + "pr", + "prato", + "pt", + "pu", + "pug", + "puglia", + "pv", + "pz", + "ra", + "ragusa", + "ravenna", + "rc", + "re", + "reggio-calabria", + "reggio-emilia", + "reggiocalabria", + "reggioemilia", + "rg", + "ri", + "rieti", + "rimini", + "rm", + "rn", + "ro", + "roma", + "rome", + "rovigo", + "sa", + "salerno", + "sar", + "sardegna", + "sardinia", + "sassari", + "savona", + "si", + "sic", + "sicilia", + "sicily", + "siena", + "siracusa", + "so", + "sondrio", + "sp", + "sr", + "ss", + "suedtirol", + "sv", + "ta", + "taa", + "taranto", + "te", + "tempio-olbia", + "tempioolbia", + "teramo", + "terni", + "tn", + "to", + "torino", + "tos", + "toscana", + "tp", + "tr", + "trani-andria-barletta", + "trani-barletta-andria", + "traniandriabarletta", + "tranibarlettaandria", + "trapani", + "trentino", + "trentino-a-adige", + "trentino-aadige", + "trentino-alto-adige", + "trentino-altoadige", + "trentino-s-tirol", + "trentino-stirol", + "trentino-sud-tirol", + "trentino-sudtirol", + "trentino-sued-tirol", + "trentino-suedtirol", + "trentinoa-adige", + "trentinoaadige", + "trentinoalto-adige", + "trentinoaltoadige", + "trentinos-tirol", + "trentinostirol", + "trentinosud-tirol", + "trentinosudtirol", + "trentinosued-tirol", + "trentinosuedtirol", + "trento", + "treviso", + "trieste", + "ts", + "turin", + "tuscany", + "tv", + "ud", + "udine", + "umb", + "umbria", + "urbino-pesaro", + "urbinopesaro", + "va", + "val-d-aosta", + "val-daosta", + "vald-aosta", + "valdaosta", + "valle-aosta", + "valle-d-aosta", + "valle-daosta", + "valleaosta", + "valled-aosta", + "valledaosta", + "vallee-aoste", + "valleeaoste", + "vao", + "varese", + "vb", + "vc", + "vda", + "ve", + "ven", + "veneto", + "venezia", + "venice", + "verbania", + "vercelli", + "verona", + "vi", + "vibo-valentia", + "vibovalentia", + "vicenza", + "viterbo", + "vr", + "vs", + "vt", + "vv", + "co", + "net", + "org", + "com", + "edu", + "gov", + "mil", + "name", + "net", + "org", + "sch", + "ac", + "ad", + "aichi", + "akita", + "aomori", + "blogspot", + "chiba", + "co", + "ed", + "ehime", + "fukui", + "fukuoka", + "fukushima", + "gifu", + "go", + "gr", + "gunma", + "hiroshima", + "hokkaido", + "hyogo", + "ibaraki", + "ishikawa", + "iwate", + "kagawa", + "kagoshima", + "kanagawa", + "kawasaki", + "kitakyushu", + "kobe", + "kochi", + "kumamoto", + "kyoto", + "lg", + "mie", + "miyagi", + "miyazaki", + "nagano", + "nagasaki", + "nagoya", + "nara", + "ne", + "niigata", + "oita", + "okayama", + "okinawa", + "or", + "osaka", + "saga", + "saitama", + "sapporo", + "sendai", + "shiga", + "shimane", + "shizuoka", + "tochigi", + "tokushima", + "tokyo", + "tottori", + "toyama", + "wakayama", + "xn--0trq7p7nn", + "xn--1ctwo", + "xn--1lqs03n", + "xn--1lqs71d", + "xn--2m4a15e", + "xn--32vp30h", + "xn--4it168d", + "xn--4it797k", + "xn--4pvxs", + "xn--5js045d", + "xn--5rtp49c", + "xn--5rtq34k", + "xn--6btw5a", + "xn--6orx2r", + "xn--7t0a264c", + "xn--8ltr62k", + "xn--8pvr4u", + "xn--c3s14m", + "xn--d5qv7z876c", + "xn--djrs72d6uy", + "xn--djty4k", + "xn--efvn9s", + "xn--ehqz56n", + "xn--elqq16h", + "xn--f6qx53a", + "xn--k7yn95e", + "xn--kbrq7o", + "xn--klt787d", + "xn--kltp7d", + "xn--kltx9a", + "xn--klty5x", + "xn--mkru45i", + "xn--nit225k", + "xn--ntso0iqx3a", + "xn--ntsq17g", + "xn--pssu33l", + "xn--qqqt11m", + "xn--rht27z", + "xn--rht3d", + "xn--rht61e", + "xn--rny31h", + "xn--tor131o", + "xn--uist22h", + "xn--uisz3g", + "xn--uuwu58a", + "xn--vgu402c", + "xn--zbx025d", + "yamagata", + "yamaguchi", + "yamanashi", + "yokohama", + "aisai", + "ama", + "anjo", + "asuke", + "chiryu", + "chita", + "fuso", + "gamagori", + "handa", + "hazu", + "hekinan", + "higashiura", + "ichinomiya", + "inazawa", + "inuyama", + "isshiki", + "iwakura", + "kanie", + "kariya", + "kasugai", + "kira", + "kiyosu", + "komaki", + "konan", + "kota", + "mihama", + "miyoshi", + "nishio", + "nisshin", + "obu", + "oguchi", + "oharu", + "okazaki", + "owariasahi", + "seto", + "shikatsu", + "shinshiro", + "shitara", + "tahara", + "takahama", + "tobishima", + "toei", + "togo", + "tokai", + "tokoname", + "toyoake", + "toyohashi", + "toyokawa", + "toyone", + "toyota", + "tsushima", + "yatomi", + "akita", + "daisen", + "fujisato", + "gojome", + "hachirogata", + "happou", + "higashinaruse", + "honjo", + "honjyo", + "ikawa", + "kamikoani", + "kamioka", + "katagami", + "kazuno", + "kitaakita", + "kosaka", + "kyowa", + "misato", + "mitane", + "moriyoshi", + "nikaho", + "noshiro", + "odate", + "oga", + "ogata", + "semboku", + "yokote", + "yurihonjo", + "aomori", + "gonohe", + "hachinohe", + "hashikami", + "hiranai", + "hirosaki", + "itayanagi", + "kuroishi", + "misawa", + "mutsu", + "nakadomari", + "noheji", + "oirase", + "owani", + "rokunohe", + "sannohe", + "shichinohe", + "shingo", + "takko", + "towada", + "tsugaru", + "tsuruta", + "abiko", + "asahi", + "chonan", + "chosei", + "choshi", + "chuo", + "funabashi", + "futtsu", + "hanamigawa", + "ichihara", + "ichikawa", + "ichinomiya", + "inzai", + "isumi", + "kamagaya", + "kamogawa", + "kashiwa", + "katori", + "katsuura", + "kimitsu", + "kisarazu", + "kozaki", + "kujukuri", + "kyonan", + "matsudo", + "midori", + "mihama", + "minamiboso", + "mobara", + "mutsuzawa", + "nagara", + "nagareyama", + "narashino", + "narita", + "noda", + "oamishirasato", + "omigawa", + "onjuku", + "otaki", + "sakae", + "sakura", + "shimofusa", + "shirako", + "shiroi", + "shisui", + "sodegaura", + "sosa", + "tako", + "tateyama", + "togane", + "tohnosho", + "tomisato", + "urayasu", + "yachimata", + "yachiyo", + "yokaichiba", + "yokoshibahikari", + "yotsukaido", + "ainan", + "honai", + "ikata", + "imabari", + "iyo", + "kamijima", + "kihoku", + "kumakogen", + "masaki", + "matsuno", + "matsuyama", + "namikata", + "niihama", + "ozu", + "saijo", + "seiyo", + "shikokuchuo", + "tobe", + "toon", + "uchiko", + "uwajima", + "yawatahama", + "echizen", + "eiheiji", + "fukui", + "ikeda", + "katsuyama", + "mihama", + "minamiechizen", + "obama", + "ohi", + "ono", + "sabae", + "sakai", + "takahama", + "tsuruga", + "wakasa", + "ashiya", + "buzen", + "chikugo", + "chikuho", + "chikujo", + "chikushino", + "chikuzen", + "chuo", + "dazaifu", + "fukuchi", + "hakata", + "higashi", + "hirokawa", + "hisayama", + "iizuka", + "inatsuki", + "kaho", + "kasuga", + "kasuya", + "kawara", + "keisen", + "koga", + "kurate", + "kurogi", + "kurume", + "minami", + "miyako", + "miyama", + "miyawaka", + "mizumaki", + "munakata", + "nakagawa", + "nakama", + "nishi", + "nogata", + "ogori", + "okagaki", + "okawa", + "oki", + "omuta", + "onga", + "onojo", + "oto", + "saigawa", + "sasaguri", + "shingu", + "shinyoshitomi", + "shonai", + "soeda", + "sue", + "tachiarai", + "tagawa", + "takata", + "toho", + "toyotsu", + "tsuiki", + "ukiha", + "umi", + "usui", + "yamada", + "yame", + "yanagawa", + "yukuhashi", + "aizubange", + "aizumisato", + "aizuwakamatsu", + "asakawa", + "bandai", + "date", + "fukushima", + "furudono", + "futaba", + "hanawa", + "higashi", + "hirata", + "hirono", + "iitate", + "inawashiro", + "ishikawa", + "iwaki", + "izumizaki", + "kagamiishi", + "kaneyama", + "kawamata", + "kitakata", + "kitashiobara", + "koori", + "koriyama", + "kunimi", + "miharu", + "mishima", + "namie", + "nango", + "nishiaizu", + "nishigo", + "okuma", + "omotego", + "ono", + "otama", + "samegawa", + "shimogo", + "shirakawa", + "showa", + "soma", + "sukagawa", + "taishin", + "tamakawa", + "tanagura", + "tenei", + "yabuki", + "yamato", + "yamatsuri", + "yanaizu", + "yugawa", + "anpachi", + "ena", + "gifu", + "ginan", + "godo", + "gujo", + "hashima", + "hichiso", + "hida", + "higashishirakawa", + "ibigawa", + "ikeda", + "kakamigahara", + "kani", + "kasahara", + "kasamatsu", + "kawaue", + "kitagata", + "mino", + "minokamo", + "mitake", + "mizunami", + "motosu", + "nakatsugawa", + "ogaki", + "sakahogi", + "seki", + "sekigahara", + "shirakawa", + "tajimi", + "takayama", + "tarui", + "toki", + "tomika", + "wanouchi", + "yamagata", + "yaotsu", + "yoro", + "annaka", + "chiyoda", + "fujioka", + "higashiagatsuma", + "isesaki", + "itakura", + "kanna", + "kanra", + "katashina", + "kawaba", + "kiryu", + "kusatsu", + "maebashi", + "meiwa", + "midori", + "minakami", + "naganohara", + "nakanojo", + "nanmoku", + "numata", + "oizumi", + "ora", + "ota", + "shibukawa", + "shimonita", + "shinto", + "showa", + "takasaki", + "takayama", + "tamamura", + "tatebayashi", + "tomioka", + "tsukiyono", + "tsumagoi", + "ueno", + "yoshioka", + "asaminami", + "daiwa", + "etajima", + "fuchu", + "fukuyama", + "hatsukaichi", + "higashihiroshima", + "hongo", + "jinsekikogen", + "kaita", + "kui", + "kumano", + "kure", + "mihara", + "miyoshi", + "naka", + "onomichi", + "osakikamijima", + "otake", + "saka", + "sera", + "seranishi", + "shinichi", + "shobara", + "takehara", + "abashiri", + "abira", + "aibetsu", + "akabira", + "akkeshi", + "asahikawa", + "ashibetsu", + "ashoro", + "assabu", + "atsuma", + "bibai", + "biei", + "bifuka", + "bihoro", + "biratori", + "chippubetsu", + "chitose", + "date", + "ebetsu", + "embetsu", + "eniwa", + "erimo", + "esan", + "esashi", + "fukagawa", + "fukushima", + "furano", + "furubira", + "haboro", + "hakodate", + "hamatonbetsu", + "hidaka", + "higashikagura", + "higashikawa", + "hiroo", + "hokuryu", + "hokuto", + "honbetsu", + "horokanai", + "horonobe", + "ikeda", + "imakane", + "ishikari", + "iwamizawa", + "iwanai", + "kamifurano", + "kamikawa", + "kamishihoro", + "kamisunagawa", + "kamoenai", + "kayabe", + "kembuchi", + "kikonai", + "kimobetsu", + "kitahiroshima", + "kitami", + "kiyosato", + "koshimizu", + "kunneppu", + "kuriyama", + "kuromatsunai", + "kushiro", + "kutchan", + "kyowa", + "mashike", + "matsumae", + "mikasa", + "minamifurano", + "mombetsu", + "moseushi", + "mukawa", + "muroran", + "naie", + "nakagawa", + "nakasatsunai", + "nakatombetsu", + "nanae", + "nanporo", + "nayoro", + "nemuro", + "niikappu", + "niki", + "nishiokoppe", + "noboribetsu", + "numata", + "obihiro", + "obira", + "oketo", + "okoppe", + "otaru", + "otobe", + "otofuke", + "otoineppu", + "oumu", + "ozora", + "pippu", + "rankoshi", + "rebun", + "rikubetsu", + "rishiri", + "rishirifuji", + "saroma", + "sarufutsu", + "shakotan", + "shari", + "shibecha", + "shibetsu", + "shikabe", + "shikaoi", + "shimamaki", + "shimizu", + "shimokawa", + "shinshinotsu", + "shintoku", + "shiranuka", + "shiraoi", + "shiriuchi", + "sobetsu", + "sunagawa", + "taiki", + "takasu", + "takikawa", + "takinoue", + "teshikaga", + "tobetsu", + "tohma", + "tomakomai", + "tomari", + "toya", + "toyako", + "toyotomi", + "toyoura", + "tsubetsu", + "tsukigata", + "urakawa", + "urausu", + "uryu", + "utashinai", + "wakkanai", + "wassamu", + "yakumo", + "yoichi", + "aioi", + "akashi", + "ako", + "amagasaki", + "aogaki", + "asago", + "ashiya", + "awaji", + "fukusaki", + "goshiki", + "harima", + "himeji", + "ichikawa", + "inagawa", + "itami", + "kakogawa", + "kamigori", + "kamikawa", + "kasai", + "kasuga", + "kawanishi", + "miki", + "minamiawaji", + "nishinomiya", + "nishiwaki", + "ono", + "sanda", + "sannan", + "sasayama", + "sayo", + "shingu", + "shinonsen", + "shiso", + "sumoto", + "taishi", + "taka", + "takarazuka", + "takasago", + "takino", + "tamba", + "tatsuno", + "toyooka", + "yabu", + "yashiro", + "yoka", + "yokawa", + "ami", + "asahi", + "bando", + "chikusei", + "daigo", + "fujishiro", + "hitachi", + "hitachinaka", + "hitachiomiya", + "hitachiota", + "ibaraki", + "ina", + "inashiki", + "itako", + "iwama", + "joso", + "kamisu", + "kasama", + "kashima", + "kasumigaura", + "koga", + "miho", + "mito", + "moriya", + "naka", + "namegata", + "oarai", + "ogawa", + "omitama", + "ryugasaki", + "sakai", + "sakuragawa", + "shimodate", + "shimotsuma", + "shirosato", + "sowa", + "suifu", + "takahagi", + "tamatsukuri", + "tokai", + "tomobe", + "tone", + "toride", + "tsuchiura", + "tsukuba", + "uchihara", + "ushiku", + "yachiyo", + "yamagata", + "yawara", + "yuki", + "anamizu", + "hakui", + "hakusan", + "kaga", + "kahoku", + "kanazawa", + "kawakita", + "komatsu", + "nakanoto", + "nanao", + "nomi", + "nonoichi", + "noto", + "shika", + "suzu", + "tsubata", + "tsurugi", + "uchinada", + "wajima", + "fudai", + "fujisawa", + "hanamaki", + "hiraizumi", + "hirono", + "ichinohe", + "ichinoseki", + "iwaizumi", + "iwate", + "joboji", + "kamaishi", + "kanegasaki", + "karumai", + "kawai", + "kitakami", + "kuji", + "kunohe", + "kuzumaki", + "miyako", + "mizusawa", + "morioka", + "ninohe", + "noda", + "ofunato", + "oshu", + "otsuchi", + "rikuzentakata", + "shiwa", + "shizukuishi", + "sumita", + "tanohata", + "tono", + "yahaba", + "yamada", + "ayagawa", + "higashikagawa", + "kanonji", + "kotohira", + "manno", + "marugame", + "mitoyo", + "naoshima", + "sanuki", + "tadotsu", + "takamatsu", + "tonosho", + "uchinomi", + "utazu", + "zentsuji", + "akune", + "amami", + "hioki", + "isa", + "isen", + "izumi", + "kagoshima", + "kanoya", + "kawanabe", + "kinko", + "kouyama", + "makurazaki", + "matsumoto", + "minamitane", + "nakatane", + "nishinoomote", + "satsumasendai", + "soo", + "tarumizu", + "yusui", + "aikawa", + "atsugi", + "ayase", + "chigasaki", + "ebina", + "fujisawa", + "hadano", + "hakone", + "hiratsuka", + "isehara", + "kaisei", + "kamakura", + "kiyokawa", + "matsuda", + "minamiashigara", + "miura", + "nakai", + "ninomiya", + "odawara", + "oi", + "oiso", + "sagamihara", + "samukawa", + "tsukui", + "yamakita", + "yamato", + "yokosuka", + "yugawara", + "zama", + "zushi", + "city", + "city", + "city", + "aki", + "geisei", + "hidaka", + "higashitsuno", + "ino", + "kagami", + "kami", + "kitagawa", + "kochi", + "mihara", + "motoyama", + "muroto", + "nahari", + "nakamura", + "nankoku", + "nishitosa", + "niyodogawa", + "ochi", + "okawa", + "otoyo", + "otsuki", + "sakawa", + "sukumo", + "susaki", + "tosa", + "tosashimizu", + "toyo", + "tsuno", + "umaji", + "yasuda", + "yusuhara", + "amakusa", + "arao", + "aso", + "choyo", + "gyokuto", + "hitoyoshi", + "kamiamakusa", + "kashima", + "kikuchi", + "kosa", + "kumamoto", + "mashiki", + "mifune", + "minamata", + "minamioguni", + "nagasu", + "nishihara", + "oguni", + "ozu", + "sumoto", + "takamori", + "uki", + "uto", + "yamaga", + "yamato", + "yatsushiro", + "ayabe", + "fukuchiyama", + "higashiyama", + "ide", + "ine", + "joyo", + "kameoka", + "kamo", + "kita", + "kizu", + "kumiyama", + "kyotamba", + "kyotanabe", + "kyotango", + "maizuru", + "minami", + "minamiyamashiro", + "miyazu", + "muko", + "nagaokakyo", + "nakagyo", + "nantan", + "oyamazaki", + "sakyo", + "seika", + "tanabe", + "uji", + "ujitawara", + "wazuka", + "yamashina", + "yawata", + "asahi", + "inabe", + "ise", + "kameyama", + "kawagoe", + "kiho", + "kisosaki", + "kiwa", + "komono", + "kumano", + "kuwana", + "matsusaka", + "meiwa", + "mihama", + "minamiise", + "misugi", + "miyama", + "nabari", + "shima", + "suzuka", + "tado", + "taiki", + "taki", + "tamaki", + "toba", + "tsu", + "udono", + "ureshino", + "watarai", + "yokkaichi", + "furukawa", + "higashimatsushima", + "ishinomaki", + "iwanuma", + "kakuda", + "kami", + "kawasaki", + "kesennuma", + "marumori", + "matsushima", + "minamisanriku", + "misato", + "murata", + "natori", + "ogawara", + "ohira", + "onagawa", + "osaki", + "rifu", + "semine", + "shibata", + "shichikashuku", + "shikama", + "shiogama", + "shiroishi", + "tagajo", + "taiwa", + "tome", + "tomiya", + "wakuya", + "watari", + "yamamoto", + "zao", + "aya", + "ebino", + "gokase", + "hyuga", + "kadogawa", + "kawaminami", + "kijo", + "kitagawa", + "kitakata", + "kitaura", + "kobayashi", + "kunitomi", + "kushima", + "mimata", + "miyakonojo", + "miyazaki", + "morotsuka", + "nichinan", + "nishimera", + "nobeoka", + "saito", + "shiiba", + "shintomi", + "takaharu", + "takanabe", + "takazaki", + "tsuno", + "achi", + "agematsu", + "anan", + "aoki", + "asahi", + "azumino", + "chikuhoku", + "chikuma", + "chino", + "fujimi", + "hakuba", + "hara", + "hiraya", + "iida", + "iijima", + "iiyama", + "iizuna", + "ikeda", + "ikusaka", + "ina", + "karuizawa", + "kawakami", + "kiso", + "kisofukushima", + "kitaaiki", + "komagane", + "komoro", + "matsukawa", + "matsumoto", + "miasa", + "minamiaiki", + "minamimaki", + "minamiminowa", + "minowa", + "miyada", + "miyota", + "mochizuki", + "nagano", + "nagawa", + "nagiso", + "nakagawa", + "nakano", + "nozawaonsen", + "obuse", + "ogawa", + "okaya", + "omachi", + "omi", + "ookuwa", + "ooshika", + "otaki", + "otari", + "sakae", + "sakaki", + "saku", + "sakuho", + "shimosuwa", + "shinanomachi", + "shiojiri", + "suwa", + "suzaka", + "takagi", + "takamori", + "takayama", + "tateshina", + "tatsuno", + "togakushi", + "togura", + "tomi", + "ueda", + "wada", + "yamagata", + "yamanouchi", + "yasaka", + "yasuoka", + "chijiwa", + "futsu", + "goto", + "hasami", + "hirado", + "iki", + "isahaya", + "kawatana", + "kuchinotsu", + "matsuura", + "nagasaki", + "obama", + "omura", + "oseto", + "saikai", + "sasebo", + "seihi", + "shimabara", + "shinkamigoto", + "togitsu", + "tsushima", + "unzen", + "city", + "ando", + "gose", + "heguri", + "higashiyoshino", + "ikaruga", + "ikoma", + "kamikitayama", + "kanmaki", + "kashiba", + "kashihara", + "katsuragi", + "kawai", + "kawakami", + "kawanishi", + "koryo", + "kurotaki", + "mitsue", + "miyake", + "nara", + "nosegawa", + "oji", + "ouda", + "oyodo", + "sakurai", + "sango", + "shimoichi", + "shimokitayama", + "shinjo", + "soni", + "takatori", + "tawaramoto", + "tenkawa", + "tenri", + "uda", + "yamatokoriyama", + "yamatotakada", + "yamazoe", + "yoshino", + "aga", + "agano", + "gosen", + "itoigawa", + "izumozaki", + "joetsu", + "kamo", + "kariwa", + "kashiwazaki", + "minamiuonuma", + "mitsuke", + "muika", + "murakami", + "myoko", + "nagaoka", + "niigata", + "ojiya", + "omi", + "sado", + "sanjo", + "seiro", + "seirou", + "sekikawa", + "shibata", + "tagami", + "tainai", + "tochio", + "tokamachi", + "tsubame", + "tsunan", + "uonuma", + "yahiko", + "yoita", + "yuzawa", + "beppu", + "bungoono", + "bungotakada", + "hasama", + "hiji", + "himeshima", + "hita", + "kamitsue", + "kokonoe", + "kuju", + "kunisaki", + "kusu", + "oita", + "saiki", + "taketa", + "tsukumi", + "usa", + "usuki", + "yufu", + "akaiwa", + "asakuchi", + "bizen", + "hayashima", + "ibara", + "kagamino", + "kasaoka", + "kibichuo", + "kumenan", + "kurashiki", + "maniwa", + "misaki", + "nagi", + "niimi", + "nishiawakura", + "okayama", + "satosho", + "setouchi", + "shinjo", + "shoo", + "soja", + "takahashi", + "tamano", + "tsuyama", + "wake", + "yakage", + "aguni", + "ginowan", + "ginoza", + "gushikami", + "haebaru", + "higashi", + "hirara", + "iheya", + "ishigaki", + "ishikawa", + "itoman", + "izena", + "kadena", + "kin", + "kitadaito", + "kitanakagusuku", + "kumejima", + "kunigami", + "minamidaito", + "motobu", + "nago", + "naha", + "nakagusuku", + "nakijin", + "nanjo", + "nishihara", + "ogimi", + "okinawa", + "onna", + "shimoji", + "taketomi", + "tarama", + "tokashiki", + "tomigusuku", + "tonaki", + "urasoe", + "uruma", + "yaese", + "yomitan", + "yonabaru", + "yonaguni", + "zamami", + "abeno", + "chihayaakasaka", + "chuo", + "daito", + "fujiidera", + "habikino", + "hannan", + "higashiosaka", + "higashisumiyoshi", + "higashiyodogawa", + "hirakata", + "ibaraki", + "ikeda", + "izumi", + "izumiotsu", + "izumisano", + "kadoma", + "kaizuka", + "kanan", + "kashiwara", + "katano", + "kawachinagano", + "kishiwada", + "kita", + "kumatori", + "matsubara", + "minato", + "minoh", + "misaki", + "moriguchi", + "neyagawa", + "nishi", + "nose", + "osakasayama", + "sakai", + "sayama", + "sennan", + "settsu", + "shijonawate", + "shimamoto", + "suita", + "tadaoka", + "taishi", + "tajiri", + "takaishi", + "takatsuki", + "tondabayashi", + "toyonaka", + "toyono", + "yao", + "ariake", + "arita", + "fukudomi", + "genkai", + "hamatama", + "hizen", + "imari", + "kamimine", + "kanzaki", + "karatsu", + "kashima", + "kitagata", + "kitahata", + "kiyama", + "kouhoku", + "kyuragi", + "nishiarita", + "ogi", + "omachi", + "ouchi", + "saga", + "shiroishi", + "taku", + "tara", + "tosu", + "yoshinogari", + "arakawa", + "asaka", + "chichibu", + "fujimi", + "fujimino", + "fukaya", + "hanno", + "hanyu", + "hasuda", + "hatogaya", + "hatoyama", + "hidaka", + "higashichichibu", + "higashimatsuyama", + "honjo", + "ina", + "iruma", + "iwatsuki", + "kamiizumi", + "kamikawa", + "kamisato", + "kasukabe", + "kawagoe", + "kawaguchi", + "kawajima", + "kazo", + "kitamoto", + "koshigaya", + "kounosu", + "kuki", + "kumagaya", + "matsubushi", + "minano", + "misato", + "miyashiro", + "miyoshi", + "moroyama", + "nagatoro", + "namegawa", + "niiza", + "ogano", + "ogawa", + "ogose", + "okegawa", + "omiya", + "otaki", + "ranzan", + "ryokami", + "saitama", + "sakado", + "satte", + "sayama", + "shiki", + "shiraoka", + "soka", + "sugito", + "toda", + "tokigawa", + "tokorozawa", + "tsurugashima", + "urawa", + "warabi", + "yashio", + "yokoze", + "yono", + "yorii", + "yoshida", + "yoshikawa", + "yoshimi", + "city", + "city", + "aisho", + "gamo", + "higashiomi", + "hikone", + "koka", + "konan", + "kosei", + "koto", + "kusatsu", + "maibara", + "moriyama", + "nagahama", + "nishiazai", + "notogawa", + "omihachiman", + "otsu", + "ritto", + "ryuoh", + "takashima", + "takatsuki", + "torahime", + "toyosato", + "yasu", + "akagi", + "ama", + "gotsu", + "hamada", + "higashiizumo", + "hikawa", + "hikimi", + "izumo", + "kakinoki", + "masuda", + "matsue", + "misato", + "nishinoshima", + "ohda", + "okinoshima", + "okuizumo", + "shimane", + "tamayu", + "tsuwano", + "unnan", + "yakumo", + "yasugi", + "yatsuka", + "arai", + "atami", + "fuji", + "fujieda", + "fujikawa", + "fujinomiya", + "fukuroi", + "gotemba", + "haibara", + "hamamatsu", + "higashiizu", + "ito", + "iwata", + "izu", + "izunokuni", + "kakegawa", + "kannami", + "kawanehon", + "kawazu", + "kikugawa", + "kosai", + "makinohara", + "matsuzaki", + "minamiizu", + "mishima", + "morimachi", + "nishiizu", + "numazu", + "omaezaki", + "shimada", + "shimizu", + "shimoda", + "shizuoka", + "susono", + "yaizu", + "yoshida", + "ashikaga", + "bato", + "haga", + "ichikai", + "iwafune", + "kaminokawa", + "kanuma", + "karasuyama", + "kuroiso", + "mashiko", + "mibu", + "moka", + "motegi", + "nasu", + "nasushiobara", + "nikko", + "nishikata", + "nogi", + "ohira", + "ohtawara", + "oyama", + "sakura", + "sano", + "shimotsuke", + "shioya", + "takanezawa", + "tochigi", + "tsuga", + "ujiie", + "utsunomiya", + "yaita", + "aizumi", + "anan", + "ichiba", + "itano", + "kainan", + "komatsushima", + "matsushige", + "mima", + "minami", + "miyoshi", + "mugi", + "nakagawa", + "naruto", + "sanagochi", + "shishikui", + "tokushima", + "wajiki", + "adachi", + "akiruno", + "akishima", + "aogashima", + "arakawa", + "bunkyo", + "chiyoda", + "chofu", + "chuo", + "edogawa", + "fuchu", + "fussa", + "hachijo", + "hachioji", + "hamura", + "higashikurume", + "higashimurayama", + "higashiyamato", + "hino", + "hinode", + "hinohara", + "inagi", + "itabashi", + "katsushika", + "kita", + "kiyose", + "kodaira", + "koganei", + "kokubunji", + "komae", + "koto", + "kouzushima", + "kunitachi", + "machida", + "meguro", + "minato", + "mitaka", + "mizuho", + "musashimurayama", + "musashino", + "nakano", + "nerima", + "ogasawara", + "okutama", + "ome", + "oshima", + "ota", + "setagaya", + "shibuya", + "shinagawa", + "shinjuku", + "suginami", + "sumida", + "tachikawa", + "taito", + "tama", + "toshima", + "chizu", + "hino", + "kawahara", + "koge", + "kotoura", + "misasa", + "nanbu", + "nichinan", + "sakaiminato", + "tottori", + "wakasa", + "yazu", + "yonago", + "asahi", + "fuchu", + "fukumitsu", + "funahashi", + "himi", + "imizu", + "inami", + "johana", + "kamiichi", + "kurobe", + "nakaniikawa", + "namerikawa", + "nanto", + "nyuzen", + "oyabe", + "taira", + "takaoka", + "tateyama", + "toga", + "tonami", + "toyama", + "unazuki", + "uozu", + "yamada", + "arida", + "aridagawa", + "gobo", + "hashimoto", + "hidaka", + "hirogawa", + "inami", + "iwade", + "kainan", + "kamitonda", + "katsuragi", + "kimino", + "kinokawa", + "kitayama", + "koya", + "koza", + "kozagawa", + "kudoyama", + "kushimoto", + "mihama", + "misato", + "nachikatsuura", + "shingu", + "shirahama", + "taiji", + "tanabe", + "wakayama", + "yuasa", + "yura", + "asahi", + "funagata", + "higashine", + "iide", + "kahoku", + "kaminoyama", + "kaneyama", + "kawanishi", + "mamurogawa", + "mikawa", + "murayama", + "nagai", + "nakayama", + "nanyo", + "nishikawa", + "obanazawa", + "oe", + "oguni", + "ohkura", + "oishida", + "sagae", + "sakata", + "sakegawa", + "shinjo", + "shirataka", + "shonai", + "takahata", + "tendo", + "tozawa", + "tsuruoka", + "yamagata", + "yamanobe", + "yonezawa", + "yuza", + "abu", + "hagi", + "hikari", + "hofu", + "iwakuni", + "kudamatsu", + "mitou", + "nagato", + "oshima", + "shimonoseki", + "shunan", + "tabuse", + "tokuyama", + "toyota", + "ube", + "yuu", + "chuo", + "doshi", + "fuefuki", + "fujikawa", + "fujikawaguchiko", + "fujiyoshida", + "hayakawa", + "hokuto", + "ichikawamisato", + "kai", + "kofu", + "koshu", + "kosuge", + "minami-alps", + "minobu", + "nakamichi", + "nanbu", + "narusawa", + "nirasaki", + "nishikatsura", + "oshino", + "otsuki", + "showa", + "tabayama", + "tsuru", + "uenohara", + "yamanakako", + "yamanashi", + "city", + "co", + "blogspot", + "com", + "edu", + "gov", + "mil", + "net", + "org", + "biz", + "com", + "edu", + "gov", + "info", + "net", + "org", + "ass", + "asso", + "com", + "coop", + "edu", + "gouv", + "gov", + "medecin", + "mil", + "nom", + "notaires", + "org", + "pharmaciens", + "prd", + "presse", + "tm", + "veterinaire", + "edu", + "gov", + "net", + "org", + "com", + "edu", + "gov", + "org", + "rep", + "tra", + "ac", + "blogspot", + "busan", + "chungbuk", + "chungnam", + "co", + "daegu", + "daejeon", + "es", + "gangwon", + "go", + "gwangju", + "gyeongbuk", + "gyeonggi", + "gyeongnam", + "hs", + "incheon", + "jeju", + "jeonbuk", + "jeonnam", + "kg", + "mil", + "ms", + "ne", + "or", + "pe", + "re", + "sc", + "seoul", + "ulsan", + "com", + "edu", + "gov", + "net", + "org", + "com", + "edu", + "gov", + "mil", + "net", + "org", + "c", + "com", + "edu", + "gov", + "info", + "int", + "net", + "org", + "per", + "com", + "edu", + "gov", + "net", + "org", + "co", + "com", + "edu", + "gov", + "net", + "org", + "blogspot", + "ac", + "assn", + "com", + "edu", + "gov", + "grp", + "hotel", + "int", + "ltd", + "net", + "ngo", + "org", + "sch", + "soc", + "web", + "com", + "edu", + "gov", + "net", + "org", + "co", + "org", + "blogspot", + "gov", + "blogspot", + "asn", + "com", + "conf", + "edu", + "gov", + "id", + "mil", + "net", + "org", + "com", + "edu", + "gov", + "id", + "med", + "net", + "org", + "plc", + "sch", + "ac", + "co", + "gov", + "net", + "org", + "press", + "asso", + "tm", + "blogspot", + "ac", + "co", + "edu", + "gov", + "its", + "net", + "org", + "priv", + "co", + "com", + "edu", + "gov", + "mil", + "nom", + "org", + "prd", + "tm", + "blogspot", + "com", + "edu", + "gov", + "inf", + "name", + "net", + "org", + "com", + "edu", + "gouv", + "gov", + "net", + "org", + "presse", + "edu", + "gov", + "nyc", + "org", + "com", + "edu", + "gov", + "net", + "org", + "blogspot", + "gov", + "com", + "edu", + "gov", + "net", + "org", + "com", + "edu", + "net", + "org", + "blogspot", + "ac", + "co", + "com", + "gov", + "net", + "or", + "org", + "academy", + "agriculture", + "air", + "airguard", + "alabama", + "alaska", + "amber", + "ambulance", + "american", + "americana", + "americanantiques", + "americanart", + "amsterdam", + "and", + "annefrank", + "anthro", + "anthropology", + "antiques", + "aquarium", + "arboretum", + "archaeological", + "archaeology", + "architecture", + "art", + "artanddesign", + "artcenter", + "artdeco", + "arteducation", + "artgallery", + "arts", + "artsandcrafts", + "asmatart", + "assassination", + "assisi", + "association", + "astronomy", + "atlanta", + "austin", + "australia", + "automotive", + "aviation", + "axis", + "badajoz", + "baghdad", + "bahn", + "bale", + "baltimore", + "barcelona", + "baseball", + "basel", + "baths", + "bauern", + "beauxarts", + "beeldengeluid", + "bellevue", + "bergbau", + "berkeley", + "berlin", + "bern", + "bible", + "bilbao", + "bill", + "birdart", + "birthplace", + "bonn", + "boston", + "botanical", + "botanicalgarden", + "botanicgarden", + "botany", + "brandywinevalley", + "brasil", + "bristol", + "british", + "britishcolumbia", + "broadcast", + "brunel", + "brussel", + "brussels", + "bruxelles", + "building", + "burghof", + "bus", + "bushey", + "cadaques", + "california", + "cambridge", + "can", + "canada", + "capebreton", + "carrier", + "cartoonart", + "casadelamoneda", + "castle", + "castres", + "celtic", + "center", + "chattanooga", + "cheltenham", + "chesapeakebay", + "chicago", + "children", + "childrens", + "childrensgarden", + "chiropractic", + "chocolate", + "christiansburg", + "cincinnati", + "cinema", + "circus", + "civilisation", + "civilization", + "civilwar", + "clinton", + "clock", + "coal", + "coastaldefence", + "cody", + "coldwar", + "collection", + "colonialwilliamsburg", + "coloradoplateau", + "columbia", + "columbus", + "communication", + "communications", + "community", + "computer", + "computerhistory", + "contemporary", + "contemporaryart", + "convent", + "copenhagen", + "corporation", + "corvette", + "costume", + "countryestate", + "county", + "crafts", + "cranbrook", + "creation", + "cultural", + "culturalcenter", + "culture", + "cyber", + "cymru", + "dali", + "dallas", + "database", + "ddr", + "decorativearts", + "delaware", + "delmenhorst", + "denmark", + "depot", + "design", + "detroit", + "dinosaur", + "discovery", + "dolls", + "donostia", + "durham", + "eastafrica", + "eastcoast", + "education", + "educational", + "egyptian", + "eisenbahn", + "elburg", + "elvendrell", + "embroidery", + "encyclopedic", + "england", + "entomology", + "environment", + "environmentalconservation", + "epilepsy", + "essex", + "estate", + "ethnology", + "exeter", + "exhibition", + "family", + "farm", + "farmequipment", + "farmers", + "farmstead", + "field", + "figueres", + "filatelia", + "film", + "fineart", + "finearts", + "finland", + "flanders", + "florida", + "force", + "fortmissoula", + "fortworth", + "foundation", + "francaise", + "frankfurt", + "franziskaner", + "freemasonry", + "freiburg", + "fribourg", + "frog", + "fundacio", + "furniture", + "gallery", + "garden", + "gateway", + "geelvinck", + "gemological", + "geology", + "georgia", + "giessen", + "glas", + "glass", + "gorge", + "grandrapids", + "graz", + "guernsey", + "halloffame", + "hamburg", + "handson", + "harvestcelebration", + "hawaii", + "health", + "heimatunduhren", + "hellas", + "helsinki", + "hembygdsforbund", + "heritage", + "histoire", + "historical", + "historicalsociety", + "historichouses", + "historisch", + "historisches", + "history", + "historyofscience", + "horology", + "house", + "humanities", + "illustration", + "imageandsound", + "indian", + "indiana", + "indianapolis", + "indianmarket", + "intelligence", + "interactive", + "iraq", + "iron", + "isleofman", + "jamison", + "jefferson", + "jerusalem", + "jewelry", + "jewish", + "jewishart", + "jfk", + "journalism", + "judaica", + "judygarland", + "juedisches", + "juif", + "karate", + "karikatur", + "kids", + "koebenhavn", + "koeln", + "kunst", + "kunstsammlung", + "kunstunddesign", + "labor", + "labour", + "lajolla", + "lancashire", + "landes", + "lans", + "larsson", + "lewismiller", + "lincoln", + "linz", + "living", + "livinghistory", + "localhistory", + "london", + "losangeles", + "louvre", + "loyalist", + "lucerne", + "luxembourg", + "luzern", + "mad", + "madrid", + "mallorca", + "manchester", + "mansion", + "mansions", + "manx", + "marburg", + "maritime", + "maritimo", + "maryland", + "marylhurst", + "media", + "medical", + "medizinhistorisches", + "meeres", + "memorial", + "mesaverde", + "michigan", + "midatlantic", + "military", + "mill", + "miners", + "mining", + "minnesota", + "missile", + "missoula", + "modern", + "moma", + "money", + "monmouth", + "monticello", + "montreal", + "moscow", + "motorcycle", + "muenchen", + "muenster", + "mulhouse", + "muncie", + "museet", + "museumcenter", + "museumvereniging", + "music", + "national", + "nationalfirearms", + "nationalheritage", + "nativeamerican", + "naturalhistory", + "naturalhistorymuseum", + "naturalsciences", + "nature", + "naturhistorisches", + "natuurwetenschappen", + "naumburg", + "naval", + "nebraska", + "neues", + "newhampshire", + "newjersey", + "newmexico", + "newport", + "newspaper", + "newyork", + "niepce", + "norfolk", + "north", + "nrw", + "nuernberg", + "nuremberg", + "nyc", + "nyny", + "oceanographic", + "oceanographique", + "omaha", + "online", + "ontario", + "openair", + "oregon", + "oregontrail", + "otago", + "oxford", + "pacific", + "paderborn", + "palace", + "paleo", + "palmsprings", + "panama", + "paris", + "pasadena", + "pharmacy", + "philadelphia", + "philadelphiaarea", + "philately", + "phoenix", + "photography", + "pilots", + "pittsburgh", + "planetarium", + "plantation", + "plants", + "plaza", + "portal", + "portland", + "portlligat", + "posts-and-telecommunications", + "preservation", + "presidio", + "press", + "project", + "public", + "pubol", + "quebec", + "railroad", + "railway", + "research", + "resistance", + "riodejaneiro", + "rochester", + "rockart", + "roma", + "russia", + "saintlouis", + "salem", + "salvadordali", + "salzburg", + "sandiego", + "sanfrancisco", + "santabarbara", + "santacruz", + "santafe", + "saskatchewan", + "satx", + "savannahga", + "schlesisches", + "schoenbrunn", + "schokoladen", + "school", + "schweiz", + "science", + "science-fiction", + "scienceandhistory", + "scienceandindustry", + "sciencecenter", + "sciencecenters", + "sciencehistory", + "sciences", + "sciencesnaturelles", + "scotland", + "seaport", + "settlement", + "settlers", + "shell", + "sherbrooke", + "sibenik", + "silk", + "ski", + "skole", + "society", + "sologne", + "soundandvision", + "southcarolina", + "southwest", + "space", + "spy", + "square", + "stadt", + "stalbans", + "starnberg", + "state", + "stateofdelaware", + "station", + "steam", + "steiermark", + "stjohn", + "stockholm", + "stpetersburg", + "stuttgart", + "suisse", + "surgeonshall", + "surrey", + "svizzera", + "sweden", + "sydney", + "tank", + "tcm", + "technology", + "telekommunikation", + "television", + "texas", + "textile", + "theater", + "time", + "timekeeping", + "topology", + "torino", + "touch", + "town", + "transport", + "tree", + "trolley", + "trust", + "trustee", + "uhren", + "ulm", + "undersea", + "university", + "usa", + "usantiques", + "usarts", + "uscountryestate", + "usculture", + "usdecorativearts", + "usgarden", + "ushistory", + "ushuaia", + "uslivinghistory", + "utah", + "uvic", + "valley", + "vantaa", + "versailles", + "viking", + "village", + "virginia", + "virtual", + "virtuel", + "vlaanderen", + "volkenkunde", + "wales", + "wallonie", + "war", + "washingtondc", + "watch-and-clock", + "watchandclock", + "western", + "westfalen", + "whaling", + "wildlife", + "williamsburg", + "windmill", + "workshop", + "xn--9dbhblg6di", + "xn--comunicaes-v6a2o", + "xn--correios-e-telecomunicaes-ghc29a", + "xn--h1aegh", + "xn--lns-qla", + "york", + "yorkshire", + "yosemite", + "youth", + "zoological", + "zoology", + "aero", + "biz", + "com", + "coop", + "edu", + "gov", + "info", + "int", + "mil", + "museum", + "name", + "net", + "org", + "pro", + "ac", + "biz", + "co", + "com", + "coop", + "edu", + "gov", + "int", + "museum", + "net", + "org", + "blogspot", + "com", + "edu", + "gob", + "net", + "org", + "blogspot", + "com", + "edu", + "gov", + "mil", + "name", + "net", + "org", + "teledata", + "ca", + "cc", + "co", + "com", + "dr", + "in", + "info", + "mobi", + "mx", + "name", + "or", + "org", + "pro", + "school", + "tv", + "us", + "ws", + "her", + "his", + "forgot", + "forgot", + "asso", + "at-band-camp", + "azure-mobile", + "azurewebsites", + "blogdns", + "broke-it", + "buyshouses", + "cdn77", + "cdn77-ssl", + "cloudapp", + "cloudfront", + "dnsalias", + "dnsdojo", + "does-it", + "dontexist", + "dynalias", + "dynathome", + "endofinternet", + "fastly", + "from-az", + "from-co", + "from-la", + "from-ny", + "gb", + "gets-it", + "ham-radio-op", + "homeftp", + "homeip", + "homelinux", + "homeunix", + "hu", + "in", + "in-the-band", + "is-a-chef", + "is-a-geek", + "isa-geek", + "jp", + "kicks-ass", + "office-on-the", + "podzone", + "scrapper-site", + "se", + "selfip", + "sells-it", + "servebbs", + "serveftp", + "thruhere", + "uk", + "webhop", + "za", + "r", + "prod", + "ssl", + "a", + "global", + "a", + "b", + "global", + "arts", + "com", + "firm", + "info", + "net", + "other", + "per", + "rec", + "store", + "web", + "com", + "edu", + "gov", + "mil", + "mobi", + "name", + "net", + "org", + "sch", + "blogspot", + "blogspot", + "bv", + "co", + "aa", + "aarborte", + "aejrie", + "afjord", + "agdenes", + "ah", + "akershus", + "aknoluokta", + "akrehamn", + "al", + "alaheadju", + "alesund", + "algard", + "alstahaug", + "alta", + "alvdal", + "amli", + "amot", + "andasuolo", + "andebu", + "andoy", + "ardal", + "aremark", + "arendal", + "arna", + "aseral", + "asker", + "askim", + "askoy", + "askvoll", + "asnes", + "audnedaln", + "aukra", + "aure", + "aurland", + "aurskog-holand", + "austevoll", + "austrheim", + "averoy", + "badaddja", + "bahcavuotna", + "bahccavuotna", + "baidar", + "bajddar", + "balat", + "balestrand", + "ballangen", + "balsfjord", + "bamble", + "bardu", + "barum", + "batsfjord", + "bearalvahki", + "beardu", + "beiarn", + "berg", + "bergen", + "berlevag", + "bievat", + "bindal", + "birkenes", + "bjarkoy", + "bjerkreim", + "bjugn", + "blogspot", + "bodo", + "bokn", + "bomlo", + "bremanger", + "bronnoy", + "bronnoysund", + "brumunddal", + "bryne", + "bu", + "budejju", + "buskerud", + "bygland", + "bykle", + "cahcesuolo", + "co", + "davvenjarga", + "davvesiida", + "deatnu", + "dep", + "dielddanuorri", + "divtasvuodna", + "divttasvuotna", + "donna", + "dovre", + "drammen", + "drangedal", + "drobak", + "dyroy", + "egersund", + "eid", + "eidfjord", + "eidsberg", + "eidskog", + "eidsvoll", + "eigersund", + "elverum", + "enebakk", + "engerdal", + "etne", + "etnedal", + "evenassi", + "evenes", + "evje-og-hornnes", + "farsund", + "fauske", + "fedje", + "fet", + "fetsund", + "fhs", + "finnoy", + "fitjar", + "fjaler", + "fjell", + "fla", + "flakstad", + "flatanger", + "flekkefjord", + "flesberg", + "flora", + "floro", + "fm", + "folkebibl", + "folldal", + "forde", + "forsand", + "fosnes", + "frana", + "fredrikstad", + "frei", + "frogn", + "froland", + "frosta", + "froya", + "fuoisku", + "fuossko", + "fusa", + "fylkesbibl", + "fyresdal", + "gaivuotna", + "galsa", + "gamvik", + "gangaviika", + "gaular", + "gausdal", + "giehtavuoatna", + "gildeskal", + "giske", + "gjemnes", + "gjerdrum", + "gjerstad", + "gjesdal", + "gjovik", + "gloppen", + "gol", + "gran", + "grane", + "granvin", + "gratangen", + "grimstad", + "grong", + "grue", + "gulen", + "guovdageaidnu", + "ha", + "habmer", + "hadsel", + "hagebostad", + "halden", + "halsa", + "hamar", + "hamaroy", + "hammarfeasta", + "hammerfest", + "hapmir", + "haram", + "hareid", + "harstad", + "hasvik", + "hattfjelldal", + "haugesund", + "hedmark", + "hemne", + "hemnes", + "hemsedal", + "herad", + "hitra", + "hjartdal", + "hjelmeland", + "hl", + "hm", + "hobol", + "hof", + "hokksund", + "hol", + "hole", + "holmestrand", + "holtalen", + "honefoss", + "hordaland", + "hornindal", + "horten", + "hoyanger", + "hoylandet", + "hurdal", + "hurum", + "hvaler", + "hyllestad", + "ibestad", + "idrett", + "inderoy", + "iveland", + "ivgu", + "jan-mayen", + "jessheim", + "jevnaker", + "jolster", + "jondal", + "jorpeland", + "kafjord", + "karasjohka", + "karasjok", + "karlsoy", + "karmoy", + "kautokeino", + "kirkenes", + "klabu", + "klepp", + "kommune", + "kongsberg", + "kongsvinger", + "kopervik", + "kraanghke", + "kragero", + "kristiansand", + "kristiansund", + "krodsherad", + "krokstadelva", + "kvafjord", + "kvalsund", + "kvam", + "kvanangen", + "kvinesdal", + "kvinnherad", + "kviteseid", + "kvitsoy", + "laakesvuemie", + "lahppi", + "langevag", + "lardal", + "larvik", + "lavagis", + "lavangen", + "leangaviika", + "lebesby", + "leikanger", + "leirfjord", + "leirvik", + "leka", + "leksvik", + "lenvik", + "lerdal", + "lesja", + "levanger", + "lier", + "lierne", + "lillehammer", + "lillesand", + "lindas", + "lindesnes", + "loabat", + "lodingen", + "lom", + "loppa", + "lorenskog", + "loten", + "lund", + "lunner", + "luroy", + "luster", + "lyngdal", + "lyngen", + "malatvuopmi", + "malselv", + "malvik", + "mandal", + "marker", + "marnardal", + "masfjorden", + "masoy", + "matta-varjjat", + "meland", + "meldal", + "melhus", + "meloy", + "meraker", + "midsund", + "midtre-gauldal", + "mil", + "mjondalen", + "mo-i-rana", + "moareke", + "modalen", + "modum", + "molde", + "more-og-romsdal", + "mosjoen", + "moskenes", + "moss", + "mosvik", + "mr", + "muosat", + "museum", + "naamesjevuemie", + "namdalseid", + "namsos", + "namsskogan", + "nannestad", + "naroy", + "narviika", + "narvik", + "naustdal", + "navuotna", + "nedre-eiker", + "nesna", + "nesodden", + "nesoddtangen", + "nesseby", + "nesset", + "nissedal", + "nittedal", + "nl", + "nord-aurdal", + "nord-fron", + "nord-odal", + "norddal", + "nordkapp", + "nordland", + "nordre-land", + "nordreisa", + "nore-og-uvdal", + "notodden", + "notteroy", + "nt", + "odda", + "of", + "oksnes", + "ol", + "omasvuotna", + "oppdal", + "oppegard", + "orkanger", + "orkdal", + "orland", + "orskog", + "orsta", + "osen", + "oslo", + "osoyro", + "osteroy", + "ostfold", + "ostre-toten", + "overhalla", + "ovre-eiker", + "oyer", + "oygarden", + "oystre-slidre", + "porsanger", + "porsangu", + "porsgrunn", + "priv", + "rade", + "radoy", + "rahkkeravju", + "raholt", + "raisa", + "rakkestad", + "ralingen", + "rana", + "randaberg", + "rauma", + "rendalen", + "rennebu", + "rennesoy", + "rindal", + "ringebu", + "ringerike", + "ringsaker", + "risor", + "rissa", + "rl", + "roan", + "rodoy", + "rollag", + "romsa", + "romskog", + "roros", + "rost", + "royken", + "royrvik", + "ruovat", + "rygge", + "salangen", + "salat", + "saltdal", + "samnanger", + "sandefjord", + "sandnes", + "sandnessjoen", + "sandoy", + "sarpsborg", + "sauda", + "sauherad", + "sel", + "selbu", + "selje", + "seljord", + "sf", + "siellak", + "sigdal", + "siljan", + "sirdal", + "skanit", + "skanland", + "skaun", + "skedsmo", + "skedsmokorset", + "ski", + "skien", + "skierva", + "skiptvet", + "skjak", + "skjervoy", + "skodje", + "slattum", + "smola", + "snaase", + "snasa", + "snillfjord", + "snoasa", + "sogndal", + "sogne", + "sokndal", + "sola", + "solund", + "somna", + "sondre-land", + "songdalen", + "sor-aurdal", + "sor-fron", + "sor-odal", + "sor-varanger", + "sorfold", + "sorreisa", + "sortland", + "sorum", + "spjelkavik", + "spydeberg", + "st", + "stange", + "stat", + "stathelle", + "stavanger", + "stavern", + "steigen", + "steinkjer", + "stjordal", + "stjordalshalsen", + "stokke", + "stor-elvdal", + "stord", + "stordal", + "storfjord", + "strand", + "stranda", + "stryn", + "sula", + "suldal", + "sund", + "sunndal", + "surnadal", + "svalbard", + "sveio", + "svelvik", + "sykkylven", + "tana", + "tananger", + "telemark", + "time", + "tingvoll", + "tinn", + "tjeldsund", + "tjome", + "tm", + "tokke", + "tolga", + "tonsberg", + "torsken", + "tr", + "trana", + "tranby", + "tranoy", + "troandin", + "trogstad", + "tromsa", + "tromso", + "trondheim", + "trysil", + "tvedestrand", + "tydal", + "tynset", + "tysfjord", + "tysnes", + "tysvar", + "ullensaker", + "ullensvang", + "ulvik", + "unjarga", + "utsira", + "va", + "vaapste", + "vadso", + "vaga", + "vagan", + "vagsoy", + "vaksdal", + "valle", + "vang", + "vanylven", + "vardo", + "varggat", + "varoy", + "vefsn", + "vega", + "vegarshei", + "vennesla", + "verdal", + "verran", + "vestby", + "vestfold", + "vestnes", + "vestre-slidre", + "vestre-toten", + "vestvagoy", + "vevelstad", + "vf", + "vgs", + "vik", + "vikna", + "vindafjord", + "voagat", + "volda", + "voss", + "vossevangen", + "xn--andy-ira", + "xn--asky-ira", + "xn--aurskog-hland-jnb", + "xn--avery-yua", + "xn--bdddj-mrabd", + "xn--bearalvhki-y4a", + "xn--berlevg-jxa", + "xn--bhcavuotna-s4a", + "xn--bhccavuotna-k7a", + "xn--bidr-5nac", + "xn--bievt-0qa", + "xn--bjarky-fya", + "xn--bjddar-pta", + "xn--blt-elab", + "xn--bmlo-gra", + "xn--bod-2na", + "xn--brnny-wuac", + "xn--brnnysund-m8ac", + "xn--brum-voa", + "xn--btsfjord-9za", + "xn--davvenjrga-y4a", + "xn--dnna-gra", + "xn--drbak-wua", + "xn--dyry-ira", + "xn--eveni-0qa01ga", + "xn--finny-yua", + "xn--fjord-lra", + "xn--fl-zia", + "xn--flor-jra", + "xn--frde-gra", + "xn--frna-woa", + "xn--frya-hra", + "xn--ggaviika-8ya47h", + "xn--gildeskl-g0a", + "xn--givuotna-8ya", + "xn--gjvik-wua", + "xn--gls-elac", + "xn--h-2fa", + "xn--hbmer-xqa", + "xn--hcesuolo-7ya35b", + "xn--hgebostad-g3a", + "xn--hmmrfeasta-s4ac", + "xn--hnefoss-q1a", + "xn--hobl-ira", + "xn--holtlen-hxa", + "xn--hpmir-xqa", + "xn--hyanger-q1a", + "xn--hylandet-54a", + "xn--indery-fya", + "xn--jlster-bya", + "xn--jrpeland-54a", + "xn--karmy-yua", + "xn--kfjord-iua", + "xn--klbu-woa", + "xn--koluokta-7ya57h", + "xn--krager-gya", + "xn--kranghke-b0a", + "xn--krdsherad-m8a", + "xn--krehamn-dxa", + "xn--krjohka-hwab49j", + "xn--ksnes-uua", + "xn--kvfjord-nxa", + "xn--kvitsy-fya", + "xn--kvnangen-k0a", + "xn--l-1fa", + "xn--laheadju-7ya", + "xn--langevg-jxa", + "xn--ldingen-q1a", + "xn--leagaviika-52b", + "xn--lesund-hua", + "xn--lgrd-poac", + "xn--lhppi-xqa", + "xn--linds-pra", + "xn--loabt-0qa", + "xn--lrdal-sra", + "xn--lrenskog-54a", + "xn--lt-liac", + "xn--lten-gra", + "xn--lury-ira", + "xn--mely-ira", + "xn--merker-kua", + "xn--mjndalen-64a", + "xn--mlatvuopmi-s4a", + "xn--mli-tla", + "xn--mlselv-iua", + "xn--moreke-jua", + "xn--mosjen-eya", + "xn--mot-tla", + "xn--mre-og-romsdal-qqb", + "xn--msy-ula0h", + "xn--mtta-vrjjat-k7af", + "xn--muost-0qa", + "xn--nmesjevuemie-tcba", + "xn--nry-yla5g", + "xn--nttery-byae", + "xn--nvuotna-hwa", + "xn--oppegrd-ixa", + "xn--ostery-fya", + "xn--osyro-wua", + "xn--porsgu-sta26f", + "xn--rady-ira", + "xn--rdal-poa", + "xn--rde-ula", + "xn--rdy-0nab", + "xn--rennesy-v1a", + "xn--rhkkervju-01af", + "xn--rholt-mra", + "xn--risa-5na", + "xn--risr-ira", + "xn--rland-uua", + "xn--rlingen-mxa", + "xn--rmskog-bya", + "xn--rros-gra", + "xn--rskog-uua", + "xn--rst-0na", + "xn--rsta-fra", + "xn--ryken-vua", + "xn--ryrvik-bya", + "xn--s-1fa", + "xn--sandnessjen-ogb", + "xn--sandy-yua", + "xn--seral-lra", + "xn--sgne-gra", + "xn--skierv-uta", + "xn--skjervy-v1a", + "xn--skjk-soa", + "xn--sknit-yqa", + "xn--sknland-fxa", + "xn--slat-5na", + "xn--slt-elab", + "xn--smla-hra", + "xn--smna-gra", + "xn--snase-nra", + "xn--sndre-land-0cb", + "xn--snes-poa", + "xn--snsa-roa", + "xn--sr-aurdal-l8a", + "xn--sr-fron-q1a", + "xn--sr-odal-q1a", + "xn--sr-varanger-ggb", + "xn--srfold-bya", + "xn--srreisa-q1a", + "xn--srum-gra", + "xn--stfold-9xa", + "xn--stjrdal-s1a", + "xn--stjrdalshalsen-sqb", + "xn--stre-toten-zcb", + "xn--tjme-hra", + "xn--tnsberg-q1a", + "xn--trany-yua", + "xn--trgstad-r1a", + "xn--trna-woa", + "xn--troms-zua", + "xn--tysvr-vra", + "xn--unjrga-rta", + "xn--vads-jra", + "xn--vard-jra", + "xn--vegrshei-c0a", + "xn--vestvgy-ixa6o", + "xn--vg-yiab", + "xn--vgan-qoa", + "xn--vgsy-qoa0j", + "xn--vre-eiker-k8a", + "xn--vrggt-xqad", + "xn--vry-yla5g", + "xn--yer-zna", + "xn--ygarden-p1a", + "xn--ystre-slidre-ujb", + "gs", + "gs", + "nes", + "gs", + "nes", + "gs", + "os", + "valer", + "xn--vler-qoa", + "gs", + "gs", + "os", + "gs", + "heroy", + "sande", + "gs", + "gs", + "bo", + "heroy", + "xn--b-5ga", + "xn--hery-ira", + "gs", + "gs", + "gs", + "gs", + "valer", + "gs", + "gs", + "gs", + "gs", + "bo", + "xn--b-5ga", + "gs", + "gs", + "gs", + "sande", + "gs", + "sande", + "xn--hery-ira", + "xn--vler-qoa", + "biz", + "com", + "edu", + "gov", + "info", + "net", + "org", + "merseine", + "mine", + "shacknet", + "ac", + "co", + "cri", + "geek", + "gen", + "govt", + "health", + "iwi", + "kiwi", + "maori", + "mil", + "net", + "org", + "parliament", + "school", + "xn--mori-qsa", + "blogspot", + "co", + "com", + "edu", + "gov", + "med", + "museum", + "net", + "org", + "pro", + "ae", + "blogdns", + "blogsite", + "bmoattachments", + "boldlygoingnowhere", + "cdn77", + "cdn77-secure", + "dnsalias", + "dnsdojo", + "doesntexist", + "dontexist", + "doomdns", + "duckdns", + "dvrdns", + "dynalias", + "dyndns", + "endofinternet", + "endoftheinternet", + "eu", + "from-me", + "game-host", + "gotdns", + "hk", + "hobby-site", + "homedns", + "homeftp", + "homelinux", + "homeunix", + "is-a-bruinsfan", + "is-a-candidate", + "is-a-celticsfan", + "is-a-chef", + "is-a-geek", + "is-a-knight", + "is-a-linux-user", + "is-a-patsfan", + "is-a-soxfan", + "is-found", + "is-lost", + "is-saved", + "is-very-bad", + "is-very-evil", + "is-very-good", + "is-very-nice", + "is-very-sweet", + "isa-geek", + "kicks-ass", + "misconfused", + "podzone", + "readmyblog", + "selfip", + "sellsyourhome", + "servebbs", + "serveftp", + "servegame", + "stuff-4-sale", + "us", + "webhop", + "za", + "c", + "rsc", + "origin", + "ssl", + "go", + "home", + "al", + "asso", + "at", + "au", + "be", + "bg", + "ca", + "cd", + "ch", + "cn", + "cy", + "cz", + "de", + "dk", + "edu", + "ee", + "es", + "fi", + "fr", + "gr", + "hr", + "hu", + "ie", + "il", + "in", + "int", + "is", + "it", + "jp", + "kr", + "lt", + "lu", + "lv", + "mc", + "me", + "mk", + "mt", + "my", + "net", + "ng", + "nl", + "no", + "nz", + "paris", + "pl", + "pt", + "q-a", + "ro", + "ru", + "se", + "si", + "sk", + "tr", + "uk", + "us", + "abo", + "ac", + "com", + "edu", + "gob", + "ing", + "med", + "net", + "nom", + "org", + "sld", + "blogspot", + "com", + "edu", + "gob", + "mil", + "net", + "nom", + "org", + "com", + "edu", + "org", + "com", + "edu", + "gov", + "i", + "mil", + "net", + "ngo", + "org", + "biz", + "com", + "edu", + "fam", + "gob", + "gok", + "gon", + "gop", + "gos", + "gov", + "info", + "net", + "org", + "web", + "agro", + "aid", + "art", + "atm", + "augustow", + "auto", + "babia-gora", + "bedzin", + "beskidy", + "bialowieza", + "bialystok", + "bielawa", + "bieszczady", + "biz", + "boleslawiec", + "bydgoszcz", + "bytom", + "cieszyn", + "co", + "com", + "czeladz", + "czest", + "dlugoleka", + "edu", + "elblag", + "elk", + "gda", + "gdansk", + "gdynia", + "gliwice", + "glogow", + "gmina", + "gniezno", + "gorlice", + "gov", + "grajewo", + "gsm", + "ilawa", + "info", + "jaworzno", + "jelenia-gora", + "jgora", + "kalisz", + "karpacz", + "kartuzy", + "kaszuby", + "katowice", + "kazimierz-dolny", + "kepno", + "ketrzyn", + "klodzko", + "kobierzyce", + "kolobrzeg", + "konin", + "konskowola", + "krakow", + "kutno", + "lapy", + "lebork", + "legnica", + "lezajsk", + "limanowa", + "lomza", + "lowicz", + "lubin", + "lukow", + "mail", + "malbork", + "malopolska", + "mazowsze", + "mazury", + "med", + "media", + "miasta", + "mielec", + "mielno", + "mil", + "mragowo", + "naklo", + "net", + "nieruchomosci", + "nom", + "nowaruda", + "nysa", + "olawa", + "olecko", + "olkusz", + "olsztyn", + "opoczno", + "opole", + "org", + "ostroda", + "ostroleka", + "ostrowiec", + "ostrowwlkp", + "pc", + "pila", + "pisz", + "podhale", + "podlasie", + "polkowice", + "pomorskie", + "pomorze", + "powiat", + "poznan", + "priv", + "prochowice", + "pruszkow", + "przeworsk", + "pulawy", + "radom", + "rawa-maz", + "realestate", + "rel", + "rybnik", + "rzeszow", + "sanok", + "sejny", + "sex", + "shop", + "sklep", + "skoczow", + "slask", + "slupsk", + "sopot", + "sos", + "sosnowiec", + "stalowa-wola", + "starachowice", + "stargard", + "suwalki", + "swidnica", + "swiebodzin", + "swinoujscie", + "szczecin", + "szczytno", + "szkola", + "targi", + "tarnobrzeg", + "tgory", + "tm", + "tourism", + "travel", + "turek", + "turystyka", + "tychy", + "ustka", + "walbrzych", + "warmia", + "warszawa", + "waw", + "wegrow", + "wielun", + "wlocl", + "wloclawek", + "wodzislaw", + "wolomin", + "wroc", + "wroclaw", + "zachpomor", + "zagan", + "zakopane", + "zarow", + "zgora", + "zgorzelec", + "ap", + "griw", + "ic", + "is", + "kmpsp", + "konsulat", + "kppsp", + "kwp", + "kwpsp", + "mup", + "mw", + "oirm", + "oum", + "pa", + "pinb", + "piw", + "po", + "psp", + "psse", + "pup", + "rzgw", + "sa", + "sdn", + "sko", + "so", + "sr", + "starostwo", + "ug", + "ugim", + "um", + "umig", + "upow", + "uppo", + "us", + "uw", + "uzs", + "wif", + "wiih", + "winb", + "wios", + "witd", + "wiw", + "wsa", + "wskr", + "wuoz", + "wzmiuw", + "zp", + "co", + "edu", + "gov", + "net", + "org", + "ac", + "biz", + "com", + "edu", + "est", + "gov", + "info", + "isla", + "name", + "net", + "org", + "pro", + "prof", + "aca", + "bar", + "cpa", + "eng", + "jur", + "law", + "med", + "com", + "edu", + "gov", + "net", + "org", + "plo", + "sec", + "blogspot", + "com", + "edu", + "gov", + "int", + "net", + "nome", + "org", + "publ", + "belau", + "co", + "ed", + "go", + "ne", + "or", + "com", + "coop", + "edu", + "gov", + "mil", + "net", + "org", + "blogspot", + "com", + "edu", + "gov", + "mil", + "name", + "net", + "org", + "sch", + "asso", + "blogspot", + "com", + "nom", + "arts", + "blogspot", + "com", + "firm", + "info", + "nom", + "nt", + "org", + "rec", + "store", + "tm", + "www", + "ac", + "blogspot", + "co", + "edu", + "gov", + "in", + "org", + "ac", + "adygeya", + "altai", + "amur", + "amursk", + "arkhangelsk", + "astrakhan", + "baikal", + "bashkiria", + "belgorod", + "bir", + "blogspot", + "bryansk", + "buryatia", + "cbg", + "chel", + "chelyabinsk", + "chita", + "chukotka", + "chuvashia", + "cmw", + "com", + "dagestan", + "dudinka", + "e-burg", + "edu", + "fareast", + "gov", + "grozny", + "int", + "irkutsk", + "ivanovo", + "izhevsk", + "jamal", + "jar", + "joshkar-ola", + "k-uralsk", + "kalmykia", + "kaluga", + "kamchatka", + "karelia", + "kazan", + "kchr", + "kemerovo", + "khabarovsk", + "khakassia", + "khv", + "kirov", + "kms", + "koenig", + "komi", + "kostroma", + "krasnoyarsk", + "kuban", + "kurgan", + "kursk", + "kustanai", + "kuzbass", + "lipetsk", + "magadan", + "magnitka", + "mari", + "mari-el", + "marine", + "mil", + "mordovia", + "msk", + "murmansk", + "mytis", + "nakhodka", + "nalchik", + "net", + "nkz", + "nnov", + "norilsk", + "nov", + "novosibirsk", + "nsk", + "omsk", + "orenburg", + "org", + "oryol", + "oskol", + "palana", + "penza", + "perm", + "pp", + "ptz", + "pyatigorsk", + "rnd", + "rubtsovsk", + "ryazan", + "sakhalin", + "samara", + "saratov", + "simbirsk", + "smolensk", + "snz", + "spb", + "stavropol", + "stv", + "surgut", + "syzran", + "tambov", + "tatarstan", + "test", + "tom", + "tomsk", + "tsaritsyn", + "tsk", + "tula", + "tuva", + "tver", + "tyumen", + "udm", + "udmurtia", + "ulan-ude", + "vdonsk", + "vladikavkaz", + "vladimir", + "vladivostok", + "volgograd", + "vologda", + "voronezh", + "vrn", + "vyatka", + "yakutia", + "yamal", + "yaroslavl", + "yekaterinburg", + "yuzhno-sakhalinsk", + "zgrad", + "ac", + "co", + "com", + "edu", + "gouv", + "gov", + "int", + "mil", + "net", + "com", + "edu", + "gov", + "med", + "net", + "org", + "pub", + "sch", + "com", + "edu", + "gov", + "net", + "org", + "com", + "edu", + "gov", + "net", + "org", + "com", + "edu", + "gov", + "info", + "med", + "net", + "org", + "tv", + "a", + "ac", + "b", + "bd", + "blogspot", + "brand", + "c", + "com", + "d", + "e", + "f", + "fh", + "fhsk", + "fhv", + "g", + "h", + "i", + "k", + "komforb", + "kommunalforbund", + "komvux", + "l", + "lanbib", + "m", + "n", + "naturbruksgymn", + "o", + "org", + "p", + "parti", + "pp", + "press", + "r", + "s", + "t", + "tm", + "u", + "w", + "x", + "y", + "z", + "blogspot", + "com", + "edu", + "gov", + "net", + "org", + "per", + "com", + "gov", + "mil", + "net", + "org", + "platform", + "blogspot", + "blogspot", + "com", + "edu", + "gov", + "net", + "org", + "art", + "blogspot", + "com", + "edu", + "gouv", + "org", + "perso", + "univ", + "com", + "net", + "org", + "co", + "com", + "consulado", + "edu", + "embaixada", + "gov", + "mil", + "net", + "org", + "principe", + "saotome", + "store", + "adygeya", + "arkhangelsk", + "balashov", + "bashkiria", + "bryansk", + "dagestan", + "grozny", + "ivanovo", + "kalmykia", + "kaluga", + "karelia", + "khakassia", + "krasnodar", + "kurgan", + "lenug", + "mordovia", + "msk", + "murmansk", + "nalchik", + "nov", + "obninsk", + "penza", + "pokrovsk", + "sochi", + "spb", + "togliatti", + "troitsk", + "tula", + "tuva", + "vladikavkaz", + "vladimir", + "vologda", + "com", + "edu", + "gob", + "org", + "red", + "gov", + "com", + "edu", + "gov", + "mil", + "net", + "org", + "ac", + "co", + "org", + "blogspot", + "ac", + "co", + "go", + "in", + "mi", + "net", + "or", + "ac", + "biz", + "co", + "com", + "edu", + "go", + "gov", + "int", + "mil", + "name", + "net", + "nic", + "org", + "test", + "web", + "gov", + "co", + "com", + "edu", + "gov", + "mil", + "net", + "nom", + "org", + "agrinet", + "com", + "defense", + "edunet", + "ens", + "fin", + "gov", + "ind", + "info", + "intl", + "mincom", + "nat", + "net", + "org", + "perso", + "rnrt", + "rns", + "rnu", + "tourism", + "turen", + "com", + "edu", + "gov", + "mil", + "net", + "org", + "av", + "bbs", + "bel", + "biz", + "com", + "dr", + "edu", + "gen", + "gov", + "info", + "k12", + "kep", + "mil", + "name", + "nc", + "net", + "org", + "pol", + "tel", + "tv", + "web", + "blogspot", + "gov", + "aero", + "biz", + "co", + "com", + "coop", + "edu", + "gov", + "info", + "int", + "jobs", + "mobi", + "museum", + "name", + "net", + "org", + "pro", + "travel", + "better-than", + "dyndns", + "on-the-web", + "worse-than", + "blogspot", + "club", + "com", + "ebiz", + "edu", + "game", + "gov", + "idv", + "mil", + "net", + "org", + "xn--czrw28b", + "xn--uc0atv", + "xn--zf0ao64a", + "ac", + "co", + "go", + "hotel", + "info", + "me", + "mil", + "mobi", + "ne", + "or", + "sc", + "tv", + "biz", + "cherkassy", + "cherkasy", + "chernigov", + "chernihiv", + "chernivtsi", + "chernovtsy", + "ck", + "cn", + "co", + "com", + "cr", + "crimea", + "cv", + "dn", + "dnepropetrovsk", + "dnipropetrovsk", + "dominic", + "donetsk", + "dp", + "edu", + "gov", + "if", + "in", + "ivano-frankivsk", + "kh", + "kharkiv", + "kharkov", + "kherson", + "khmelnitskiy", + "khmelnytskyi", + "kiev", + "kirovograd", + "km", + "kr", + "krym", + "ks", + "kv", + "kyiv", + "lg", + "lt", + "lugansk", + "lutsk", + "lv", + "lviv", + "mk", + "mykolaiv", + "net", + "nikolaev", + "od", + "odesa", + "odessa", + "org", + "pl", + "poltava", + "pp", + "rivne", + "rovno", + "rv", + "sb", + "sebastopol", + "sevastopol", + "sm", + "sumy", + "te", + "ternopil", + "uz", + "uzhgorod", + "vinnica", + "vinnytsia", + "vn", + "volyn", + "yalta", + "zaporizhzhe", + "zaporizhzhia", + "zhitomir", + "zhytomyr", + "zp", + "zt", + "ac", + "blogspot", + "co", + "com", + "go", + "ne", + "or", + "org", + "sc", + "ac", + "co", + "gov", + "ltd", + "me", + "net", + "nhs", + "org", + "plc", + "police", + "sch", + "blogspot", + "service", + "ak", + "al", + "ar", + "as", + "az", + "ca", + "co", + "ct", + "dc", + "de", + "dni", + "fed", + "fl", + "ga", + "gu", + "hi", + "ia", + "id", + "il", + "in", + "is-by", + "isa", + "kids", + "ks", + "ky", + "la", + "land-4-sale", + "ma", + "md", + "me", + "mi", + "mn", + "mo", + "ms", + "mt", + "nc", + "nd", + "ne", + "nh", + "nj", + "nm", + "nsn", + "nv", + "ny", + "oh", + "ok", + "or", + "pa", + "pr", + "ri", + "sc", + "sd", + "stuff-4-sale", + "tn", + "tx", + "ut", + "va", + "vi", + "vt", + "wa", + "wi", + "wv", + "wy", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "chtr", + "paroch", + "pvt", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "k12", + "lib", + "cc", + "cc", + "k12", + "lib", + "com", + "edu", + "gub", + "mil", + "net", + "org", + "blogspot", + "co", + "com", + "net", + "org", + "com", + "edu", + "gov", + "mil", + "net", + "org", + "arts", + "co", + "com", + "e12", + "edu", + "firm", + "gob", + "gov", + "info", + "int", + "mil", + "net", + "org", + "rec", + "store", + "tec", + "web", + "co", + "com", + "k12", + "net", + "org", + "ac", + "biz", + "blogspot", + "com", + "edu", + "gov", + "health", + "info", + "int", + "name", + "net", + "org", + "pro", + "com", + "edu", + "net", + "org", + "com", + "dyndns", + "edu", + "gov", + "mypets", + "net", + "org", + "xn--80au", + "xn--90azh", + "xn--c1avg", + "xn--d1at", + "xn--o1ac", + "xn--o1ach", + "ac", + "agrica", + "alt", + "co", + "edu", + "gov", + "grondar", + "law", + "mil", + "net", + "ngo", + "nis", + "nom", + "org", + "school", + "tm", + "web", + "blogspot", +} diff --git a/vendor/golang.org/x/net/trace/events.go b/vendor/golang.org/x/net/trace/events.go new file mode 100644 index 0000000..e66c7e3 --- /dev/null +++ b/vendor/golang.org/x/net/trace/events.go @@ -0,0 +1,524 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package trace + +import ( + "bytes" + "fmt" + "html/template" + "io" + "log" + "net/http" + "runtime" + "sort" + "strconv" + "strings" + "sync" + "sync/atomic" + "text/tabwriter" + "time" +) + +var eventsTmpl = template.Must(template.New("events").Funcs(template.FuncMap{ + "elapsed": elapsed, + "trimSpace": strings.TrimSpace, +}).Parse(eventsHTML)) + +const maxEventsPerLog = 100 + +type bucket struct { + MaxErrAge time.Duration + String string +} + +var buckets = []bucket{ + {0, "total"}, + {10 * time.Second, "errs<10s"}, + {1 * time.Minute, "errs<1m"}, + {10 * time.Minute, "errs<10m"}, + {1 * time.Hour, "errs<1h"}, + {10 * time.Hour, "errs<10h"}, + {24000 * time.Hour, "errors"}, +} + +// RenderEvents renders the HTML page typically served at /debug/events. +// It does not do any auth checking; see AuthRequest for the default auth check +// used by the handler registered on http.DefaultServeMux. +// req may be nil. +func RenderEvents(w http.ResponseWriter, req *http.Request, sensitive bool) { + now := time.Now() + data := &struct { + Families []string // family names + Buckets []bucket + Counts [][]int // eventLog count per family/bucket + + // Set when a bucket has been selected. + Family string + Bucket int + EventLogs eventLogs + Expanded bool + }{ + Buckets: buckets, + } + + data.Families = make([]string, 0, len(families)) + famMu.RLock() + for name := range families { + data.Families = append(data.Families, name) + } + famMu.RUnlock() + sort.Strings(data.Families) + + // Count the number of eventLogs in each family for each error age. + data.Counts = make([][]int, len(data.Families)) + for i, name := range data.Families { + // TODO(sameer): move this loop under the family lock. + f := getEventFamily(name) + data.Counts[i] = make([]int, len(data.Buckets)) + for j, b := range data.Buckets { + data.Counts[i][j] = f.Count(now, b.MaxErrAge) + } + } + + if req != nil { + var ok bool + data.Family, data.Bucket, ok = parseEventsArgs(req) + if !ok { + // No-op + } else { + data.EventLogs = getEventFamily(data.Family).Copy(now, buckets[data.Bucket].MaxErrAge) + } + if data.EventLogs != nil { + defer data.EventLogs.Free() + sort.Sort(data.EventLogs) + } + if exp, err := strconv.ParseBool(req.FormValue("exp")); err == nil { + data.Expanded = exp + } + } + + famMu.RLock() + defer famMu.RUnlock() + if err := eventsTmpl.Execute(w, data); err != nil { + log.Printf("net/trace: Failed executing template: %v", err) + } +} + +func parseEventsArgs(req *http.Request) (fam string, b int, ok bool) { + fam, bStr := req.FormValue("fam"), req.FormValue("b") + if fam == "" || bStr == "" { + return "", 0, false + } + b, err := strconv.Atoi(bStr) + if err != nil || b < 0 || b >= len(buckets) { + return "", 0, false + } + return fam, b, true +} + +// An EventLog provides a log of events associated with a specific object. +type EventLog interface { + // Printf formats its arguments with fmt.Sprintf and adds the + // result to the event log. + Printf(format string, a ...interface{}) + + // Errorf is like Printf, but it marks this event as an error. + Errorf(format string, a ...interface{}) + + // Finish declares that this event log is complete. + // The event log should not be used after calling this method. + Finish() +} + +// NewEventLog returns a new EventLog with the specified family name +// and title. +func NewEventLog(family, title string) EventLog { + el := newEventLog() + el.ref() + el.Family, el.Title = family, title + el.Start = time.Now() + el.events = make([]logEntry, 0, maxEventsPerLog) + el.stack = make([]uintptr, 32) + n := runtime.Callers(2, el.stack) + el.stack = el.stack[:n] + + getEventFamily(family).add(el) + return el +} + +func (el *eventLog) Finish() { + getEventFamily(el.Family).remove(el) + el.unref() // matches ref in New +} + +var ( + famMu sync.RWMutex + families = make(map[string]*eventFamily) // family name => family +) + +func getEventFamily(fam string) *eventFamily { + famMu.Lock() + defer famMu.Unlock() + f := families[fam] + if f == nil { + f = &eventFamily{} + families[fam] = f + } + return f +} + +type eventFamily struct { + mu sync.RWMutex + eventLogs eventLogs +} + +func (f *eventFamily) add(el *eventLog) { + f.mu.Lock() + f.eventLogs = append(f.eventLogs, el) + f.mu.Unlock() +} + +func (f *eventFamily) remove(el *eventLog) { + f.mu.Lock() + defer f.mu.Unlock() + for i, el0 := range f.eventLogs { + if el == el0 { + copy(f.eventLogs[i:], f.eventLogs[i+1:]) + f.eventLogs = f.eventLogs[:len(f.eventLogs)-1] + return + } + } +} + +func (f *eventFamily) Count(now time.Time, maxErrAge time.Duration) (n int) { + f.mu.RLock() + defer f.mu.RUnlock() + for _, el := range f.eventLogs { + if el.hasRecentError(now, maxErrAge) { + n++ + } + } + return +} + +func (f *eventFamily) Copy(now time.Time, maxErrAge time.Duration) (els eventLogs) { + f.mu.RLock() + defer f.mu.RUnlock() + els = make(eventLogs, 0, len(f.eventLogs)) + for _, el := range f.eventLogs { + if el.hasRecentError(now, maxErrAge) { + el.ref() + els = append(els, el) + } + } + return +} + +type eventLogs []*eventLog + +// Free calls unref on each element of the list. +func (els eventLogs) Free() { + for _, el := range els { + el.unref() + } +} + +// eventLogs may be sorted in reverse chronological order. +func (els eventLogs) Len() int { return len(els) } +func (els eventLogs) Less(i, j int) bool { return els[i].Start.After(els[j].Start) } +func (els eventLogs) Swap(i, j int) { els[i], els[j] = els[j], els[i] } + +// A logEntry is a timestamped log entry in an event log. +type logEntry struct { + When time.Time + Elapsed time.Duration // since previous event in log + NewDay bool // whether this event is on a different day to the previous event + What string + IsErr bool +} + +// WhenString returns a string representation of the elapsed time of the event. +// It will include the date if midnight was crossed. +func (e logEntry) WhenString() string { + if e.NewDay { + return e.When.Format("2006/01/02 15:04:05.000000") + } + return e.When.Format("15:04:05.000000") +} + +// An eventLog represents an active event log. +type eventLog struct { + // Family is the top-level grouping of event logs to which this belongs. + Family string + + // Title is the title of this event log. + Title string + + // Timing information. + Start time.Time + + // Call stack where this event log was created. + stack []uintptr + + // Append-only sequence of events. + // + // TODO(sameer): change this to a ring buffer to avoid the array copy + // when we hit maxEventsPerLog. + mu sync.RWMutex + events []logEntry + LastErrorTime time.Time + discarded int + + refs int32 // how many buckets this is in +} + +func (el *eventLog) reset() { + // Clear all but the mutex. Mutexes may not be copied, even when unlocked. + el.Family = "" + el.Title = "" + el.Start = time.Time{} + el.stack = nil + el.events = nil + el.LastErrorTime = time.Time{} + el.discarded = 0 + el.refs = 0 +} + +func (el *eventLog) hasRecentError(now time.Time, maxErrAge time.Duration) bool { + if maxErrAge == 0 { + return true + } + el.mu.RLock() + defer el.mu.RUnlock() + return now.Sub(el.LastErrorTime) < maxErrAge +} + +// delta returns the elapsed time since the last event or the log start, +// and whether it spans midnight. +// L >= el.mu +func (el *eventLog) delta(t time.Time) (time.Duration, bool) { + if len(el.events) == 0 { + return t.Sub(el.Start), false + } + prev := el.events[len(el.events)-1].When + return t.Sub(prev), prev.Day() != t.Day() + +} + +func (el *eventLog) Printf(format string, a ...interface{}) { + el.printf(false, format, a...) +} + +func (el *eventLog) Errorf(format string, a ...interface{}) { + el.printf(true, format, a...) +} + +func (el *eventLog) printf(isErr bool, format string, a ...interface{}) { + e := logEntry{When: time.Now(), IsErr: isErr, What: fmt.Sprintf(format, a...)} + el.mu.Lock() + e.Elapsed, e.NewDay = el.delta(e.When) + if len(el.events) < maxEventsPerLog { + el.events = append(el.events, e) + } else { + // Discard the oldest event. + if el.discarded == 0 { + // el.discarded starts at two to count for the event it + // is replacing, plus the next one that we are about to + // drop. + el.discarded = 2 + } else { + el.discarded++ + } + // TODO(sameer): if this causes allocations on a critical path, + // change eventLog.What to be a fmt.Stringer, as in trace.go. + el.events[0].What = fmt.Sprintf("(%d events discarded)", el.discarded) + // The timestamp of the discarded meta-event should be + // the time of the last event it is representing. + el.events[0].When = el.events[1].When + copy(el.events[1:], el.events[2:]) + el.events[maxEventsPerLog-1] = e + } + if e.IsErr { + el.LastErrorTime = e.When + } + el.mu.Unlock() +} + +func (el *eventLog) ref() { + atomic.AddInt32(&el.refs, 1) +} + +func (el *eventLog) unref() { + if atomic.AddInt32(&el.refs, -1) == 0 { + freeEventLog(el) + } +} + +func (el *eventLog) When() string { + return el.Start.Format("2006/01/02 15:04:05.000000") +} + +func (el *eventLog) ElapsedTime() string { + elapsed := time.Since(el.Start) + return fmt.Sprintf("%.6f", elapsed.Seconds()) +} + +func (el *eventLog) Stack() string { + buf := new(bytes.Buffer) + tw := tabwriter.NewWriter(buf, 1, 8, 1, '\t', 0) + printStackRecord(tw, el.stack) + tw.Flush() + return buf.String() +} + +// printStackRecord prints the function + source line information +// for a single stack trace. +// Adapted from runtime/pprof/pprof.go. +func printStackRecord(w io.Writer, stk []uintptr) { + for _, pc := range stk { + f := runtime.FuncForPC(pc) + if f == nil { + continue + } + file, line := f.FileLine(pc) + name := f.Name() + // Hide runtime.goexit and any runtime functions at the beginning. + if strings.HasPrefix(name, "runtime.") { + continue + } + fmt.Fprintf(w, "# %s\t%s:%d\n", name, file, line) + } +} + +func (el *eventLog) Events() []logEntry { + el.mu.RLock() + defer el.mu.RUnlock() + return el.events +} + +// freeEventLogs is a freelist of *eventLog +var freeEventLogs = make(chan *eventLog, 1000) + +// newEventLog returns a event log ready to use. +func newEventLog() *eventLog { + select { + case el := <-freeEventLogs: + return el + default: + return new(eventLog) + } +} + +// freeEventLog adds el to freeEventLogs if there's room. +// This is non-blocking. +func freeEventLog(el *eventLog) { + el.reset() + select { + case freeEventLogs <- el: + default: + } +} + +const eventsHTML = ` + + + events + + + + +

    /debug/events

    + +
  • + {{range $i, $fam := .Families}} + + + + {{range $j, $bucket := $.Buckets}} + {{$n := index $.Counts $i $j}} + + {{end}} + + {{end}} +
    {{$fam}} + {{if $n}}{{end}} + [{{$n}} {{$bucket.String}}] + {{if $n}}{{end}} +
    + +{{if $.EventLogs}} +


    +

    Family: {{$.Family}}

    + +{{if $.Expanded}}{{end}} +[Summary]{{if $.Expanded}}{{end}} + +{{if not $.Expanded}}{{end}} +[Expanded]{{if not $.Expanded}}{{end}} + + + + {{range $el := $.EventLogs}} + + + + + {{if $.Expanded}} + + + + + + {{range $el.Events}} + + + + + + {{end}} + {{end}} + {{end}} +
    WhenElapsed
    {{$el.When}}{{$el.ElapsedTime}}{{$el.Title}} +
    {{$el.Stack|trimSpace}}
    {{.WhenString}}{{elapsed .Elapsed}}.{{if .IsErr}}E{{else}}.{{end}}. {{.What}}
    +{{end}} + + +` diff --git a/vendor/golang.org/x/net/trace/histogram.go b/vendor/golang.org/x/net/trace/histogram.go new file mode 100644 index 0000000..bb42aa5 --- /dev/null +++ b/vendor/golang.org/x/net/trace/histogram.go @@ -0,0 +1,356 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package trace + +// This file implements histogramming for RPC statistics collection. + +import ( + "bytes" + "fmt" + "html/template" + "log" + "math" + + "golang.org/x/net/internal/timeseries" +) + +const ( + bucketCount = 38 +) + +// histogram keeps counts of values in buckets that are spaced +// out in powers of 2: 0-1, 2-3, 4-7... +// histogram implements timeseries.Observable +type histogram struct { + sum int64 // running total of measurements + sumOfSquares float64 // square of running total + buckets []int64 // bucketed values for histogram + value int // holds a single value as an optimization + valueCount int64 // number of values recorded for single value +} + +// AddMeasurement records a value measurement observation to the histogram. +func (h *histogram) addMeasurement(value int64) { + // TODO: assert invariant + h.sum += value + h.sumOfSquares += float64(value) * float64(value) + + bucketIndex := getBucket(value) + + if h.valueCount == 0 || (h.valueCount > 0 && h.value == bucketIndex) { + h.value = bucketIndex + h.valueCount++ + } else { + h.allocateBuckets() + h.buckets[bucketIndex]++ + } +} + +func (h *histogram) allocateBuckets() { + if h.buckets == nil { + h.buckets = make([]int64, bucketCount) + h.buckets[h.value] = h.valueCount + h.value = 0 + h.valueCount = -1 + } +} + +func log2(i int64) int { + n := 0 + for ; i >= 0x100; i >>= 8 { + n += 8 + } + for ; i > 0; i >>= 1 { + n += 1 + } + return n +} + +func getBucket(i int64) (index int) { + index = log2(i) - 1 + if index < 0 { + index = 0 + } + if index >= bucketCount { + index = bucketCount - 1 + } + return +} + +// Total returns the number of recorded observations. +func (h *histogram) total() (total int64) { + if h.valueCount >= 0 { + total = h.valueCount + } + for _, val := range h.buckets { + total += int64(val) + } + return +} + +// Average returns the average value of recorded observations. +func (h *histogram) average() float64 { + t := h.total() + if t == 0 { + return 0 + } + return float64(h.sum) / float64(t) +} + +// Variance returns the variance of recorded observations. +func (h *histogram) variance() float64 { + t := float64(h.total()) + if t == 0 { + return 0 + } + s := float64(h.sum) / t + return h.sumOfSquares/t - s*s +} + +// StandardDeviation returns the standard deviation of recorded observations. +func (h *histogram) standardDeviation() float64 { + return math.Sqrt(h.variance()) +} + +// PercentileBoundary estimates the value that the given fraction of recorded +// observations are less than. +func (h *histogram) percentileBoundary(percentile float64) int64 { + total := h.total() + + // Corner cases (make sure result is strictly less than Total()) + if total == 0 { + return 0 + } else if total == 1 { + return int64(h.average()) + } + + percentOfTotal := round(float64(total) * percentile) + var runningTotal int64 + + for i := range h.buckets { + value := h.buckets[i] + runningTotal += value + if runningTotal == percentOfTotal { + // We hit an exact bucket boundary. If the next bucket has data, it is a + // good estimate of the value. If the bucket is empty, we interpolate the + // midpoint between the next bucket's boundary and the next non-zero + // bucket. If the remaining buckets are all empty, then we use the + // boundary for the next bucket as the estimate. + j := uint8(i + 1) + min := bucketBoundary(j) + if runningTotal < total { + for h.buckets[j] == 0 { + j++ + } + } + max := bucketBoundary(j) + return min + round(float64(max-min)/2) + } else if runningTotal > percentOfTotal { + // The value is in this bucket. Interpolate the value. + delta := runningTotal - percentOfTotal + percentBucket := float64(value-delta) / float64(value) + bucketMin := bucketBoundary(uint8(i)) + nextBucketMin := bucketBoundary(uint8(i + 1)) + bucketSize := nextBucketMin - bucketMin + return bucketMin + round(percentBucket*float64(bucketSize)) + } + } + return bucketBoundary(bucketCount - 1) +} + +// Median returns the estimated median of the observed values. +func (h *histogram) median() int64 { + return h.percentileBoundary(0.5) +} + +// Add adds other to h. +func (h *histogram) Add(other timeseries.Observable) { + o := other.(*histogram) + if o.valueCount == 0 { + // Other histogram is empty + } else if h.valueCount >= 0 && o.valueCount > 0 && h.value == o.value { + // Both have a single bucketed value, aggregate them + h.valueCount += o.valueCount + } else { + // Two different values necessitate buckets in this histogram + h.allocateBuckets() + if o.valueCount >= 0 { + h.buckets[o.value] += o.valueCount + } else { + for i := range h.buckets { + h.buckets[i] += o.buckets[i] + } + } + } + h.sumOfSquares += o.sumOfSquares + h.sum += o.sum +} + +// Clear resets the histogram to an empty state, removing all observed values. +func (h *histogram) Clear() { + h.buckets = nil + h.value = 0 + h.valueCount = 0 + h.sum = 0 + h.sumOfSquares = 0 +} + +// CopyFrom copies from other, which must be a *histogram, into h. +func (h *histogram) CopyFrom(other timeseries.Observable) { + o := other.(*histogram) + if o.valueCount == -1 { + h.allocateBuckets() + copy(h.buckets, o.buckets) + } + h.sum = o.sum + h.sumOfSquares = o.sumOfSquares + h.value = o.value + h.valueCount = o.valueCount +} + +// Multiply scales the histogram by the specified ratio. +func (h *histogram) Multiply(ratio float64) { + if h.valueCount == -1 { + for i := range h.buckets { + h.buckets[i] = int64(float64(h.buckets[i]) * ratio) + } + } else { + h.valueCount = int64(float64(h.valueCount) * ratio) + } + h.sum = int64(float64(h.sum) * ratio) + h.sumOfSquares = h.sumOfSquares * ratio +} + +// New creates a new histogram. +func (h *histogram) New() timeseries.Observable { + r := new(histogram) + r.Clear() + return r +} + +func (h *histogram) String() string { + return fmt.Sprintf("%d, %f, %d, %d, %v", + h.sum, h.sumOfSquares, h.value, h.valueCount, h.buckets) +} + +// round returns the closest int64 to the argument +func round(in float64) int64 { + return int64(math.Floor(in + 0.5)) +} + +// bucketBoundary returns the first value in the bucket. +func bucketBoundary(bucket uint8) int64 { + if bucket == 0 { + return 0 + } + return 1 << bucket +} + +// bucketData holds data about a specific bucket for use in distTmpl. +type bucketData struct { + Lower, Upper int64 + N int64 + Pct, CumulativePct float64 + GraphWidth int +} + +// data holds data about a Distribution for use in distTmpl. +type data struct { + Buckets []*bucketData + Count, Median int64 + Mean, StandardDeviation float64 +} + +// maxHTMLBarWidth is the maximum width of the HTML bar for visualizing buckets. +const maxHTMLBarWidth = 350.0 + +// newData returns data representing h for use in distTmpl. +func (h *histogram) newData() *data { + // Force the allocation of buckets to simplify the rendering implementation + h.allocateBuckets() + // We scale the bars on the right so that the largest bar is + // maxHTMLBarWidth pixels in width. + maxBucket := int64(0) + for _, n := range h.buckets { + if n > maxBucket { + maxBucket = n + } + } + total := h.total() + barsizeMult := maxHTMLBarWidth / float64(maxBucket) + var pctMult float64 + if total == 0 { + pctMult = 1.0 + } else { + pctMult = 100.0 / float64(total) + } + + buckets := make([]*bucketData, len(h.buckets)) + runningTotal := int64(0) + for i, n := range h.buckets { + if n == 0 { + continue + } + runningTotal += n + var upperBound int64 + if i < bucketCount-1 { + upperBound = bucketBoundary(uint8(i + 1)) + } else { + upperBound = math.MaxInt64 + } + buckets[i] = &bucketData{ + Lower: bucketBoundary(uint8(i)), + Upper: upperBound, + N: n, + Pct: float64(n) * pctMult, + CumulativePct: float64(runningTotal) * pctMult, + GraphWidth: int(float64(n) * barsizeMult), + } + } + return &data{ + Buckets: buckets, + Count: total, + Median: h.median(), + Mean: h.average(), + StandardDeviation: h.standardDeviation(), + } +} + +func (h *histogram) html() template.HTML { + buf := new(bytes.Buffer) + if err := distTmpl.Execute(buf, h.newData()); err != nil { + buf.Reset() + log.Printf("net/trace: couldn't execute template: %v", err) + } + return template.HTML(buf.String()) +} + +// Input: data +var distTmpl = template.Must(template.New("distTmpl").Parse(` + + + + + + + +
    Count: {{.Count}}Mean: {{printf "%.0f" .Mean}}StdDev: {{printf "%.0f" .StandardDeviation}}Median: {{.Median}}
    +
    + +{{range $b := .Buckets}} +{{if $b}} + + + + + + + + + +{{end}} +{{end}} +
    [{{.Lower}},{{.Upper}}){{.N}}{{printf "%#.3f" .Pct}}%{{printf "%#.3f" .CumulativePct}}%
    +`)) diff --git a/vendor/golang.org/x/net/trace/histogram_test.go b/vendor/golang.org/x/net/trace/histogram_test.go new file mode 100644 index 0000000..d384b93 --- /dev/null +++ b/vendor/golang.org/x/net/trace/histogram_test.go @@ -0,0 +1,325 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package trace + +import ( + "math" + "testing" +) + +type sumTest struct { + value int64 + sum int64 + sumOfSquares float64 + total int64 +} + +var sumTests = []sumTest{ + {100, 100, 10000, 1}, + {50, 150, 12500, 2}, + {50, 200, 15000, 3}, + {50, 250, 17500, 4}, +} + +type bucketingTest struct { + in int64 + log int + bucket int +} + +var bucketingTests = []bucketingTest{ + {0, 0, 0}, + {1, 1, 0}, + {2, 2, 1}, + {3, 2, 1}, + {4, 3, 2}, + {1000, 10, 9}, + {1023, 10, 9}, + {1024, 11, 10}, + {1000000, 20, 19}, +} + +type multiplyTest struct { + in int64 + ratio float64 + expectedSum int64 + expectedTotal int64 + expectedSumOfSquares float64 +} + +var multiplyTests = []multiplyTest{ + {15, 2.5, 37, 2, 562.5}, + {128, 4.6, 758, 13, 77953.9}, +} + +type percentileTest struct { + fraction float64 + expected int64 +} + +var percentileTests = []percentileTest{ + {0.25, 48}, + {0.5, 96}, + {0.6, 109}, + {0.75, 128}, + {0.90, 205}, + {0.95, 230}, + {0.99, 256}, +} + +func TestSum(t *testing.T) { + var h histogram + + for _, test := range sumTests { + h.addMeasurement(test.value) + sum := h.sum + if sum != test.sum { + t.Errorf("h.Sum = %v WANT: %v", sum, test.sum) + } + + sumOfSquares := h.sumOfSquares + if sumOfSquares != test.sumOfSquares { + t.Errorf("h.SumOfSquares = %v WANT: %v", sumOfSquares, test.sumOfSquares) + } + + total := h.total() + if total != test.total { + t.Errorf("h.Total = %v WANT: %v", total, test.total) + } + } +} + +func TestMultiply(t *testing.T) { + var h histogram + for i, test := range multiplyTests { + h.addMeasurement(test.in) + h.Multiply(test.ratio) + if h.sum != test.expectedSum { + t.Errorf("#%v: h.sum = %v WANT: %v", i, h.sum, test.expectedSum) + } + if h.total() != test.expectedTotal { + t.Errorf("#%v: h.total = %v WANT: %v", i, h.total(), test.expectedTotal) + } + if h.sumOfSquares != test.expectedSumOfSquares { + t.Errorf("#%v: h.SumOfSquares = %v WANT: %v", i, test.expectedSumOfSquares, h.sumOfSquares) + } + } +} + +func TestBucketingFunctions(t *testing.T) { + for _, test := range bucketingTests { + log := log2(test.in) + if log != test.log { + t.Errorf("log2 = %v WANT: %v", log, test.log) + } + + bucket := getBucket(test.in) + if bucket != test.bucket { + t.Errorf("getBucket = %v WANT: %v", bucket, test.bucket) + } + } +} + +func TestAverage(t *testing.T) { + a := new(histogram) + average := a.average() + if average != 0 { + t.Errorf("Average of empty histogram was %v WANT: 0", average) + } + + a.addMeasurement(1) + a.addMeasurement(1) + a.addMeasurement(3) + const expected = float64(5) / float64(3) + average = a.average() + + if !isApproximate(average, expected) { + t.Errorf("Average = %g WANT: %v", average, expected) + } +} + +func TestStandardDeviation(t *testing.T) { + a := new(histogram) + add(a, 10, 1<<4) + add(a, 10, 1<<5) + add(a, 10, 1<<6) + stdDev := a.standardDeviation() + const expected = 19.95 + + if !isApproximate(stdDev, expected) { + t.Errorf("StandardDeviation = %v WANT: %v", stdDev, expected) + } + + // No values + a = new(histogram) + stdDev = a.standardDeviation() + + if !isApproximate(stdDev, 0) { + t.Errorf("StandardDeviation = %v WANT: 0", stdDev) + } + + add(a, 1, 1<<4) + if !isApproximate(stdDev, 0) { + t.Errorf("StandardDeviation = %v WANT: 0", stdDev) + } + + add(a, 10, 1<<4) + if !isApproximate(stdDev, 0) { + t.Errorf("StandardDeviation = %v WANT: 0", stdDev) + } +} + +func TestPercentileBoundary(t *testing.T) { + a := new(histogram) + add(a, 5, 1<<4) + add(a, 10, 1<<6) + add(a, 5, 1<<7) + + for _, test := range percentileTests { + percentile := a.percentileBoundary(test.fraction) + if percentile != test.expected { + t.Errorf("h.PercentileBoundary (fraction=%v) = %v WANT: %v", test.fraction, percentile, test.expected) + } + } +} + +func TestCopyFrom(t *testing.T) { + a := histogram{5, 25, []int64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38}, 4, -1} + b := histogram{6, 36, []int64{2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39}, 5, -1} + + a.CopyFrom(&b) + + if a.String() != b.String() { + t.Errorf("a.String = %s WANT: %s", a.String(), b.String()) + } +} + +func TestClear(t *testing.T) { + a := histogram{5, 25, []int64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38}, 4, -1} + + a.Clear() + + expected := "0, 0.000000, 0, 0, []" + if a.String() != expected { + t.Errorf("a.String = %s WANT %s", a.String(), expected) + } +} + +func TestNew(t *testing.T) { + a := histogram{5, 25, []int64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38}, 4, -1} + b := a.New() + + expected := "0, 0.000000, 0, 0, []" + if b.(*histogram).String() != expected { + t.Errorf("b.(*histogram).String = %s WANT: %s", b.(*histogram).String(), expected) + } +} + +func TestAdd(t *testing.T) { + // The tests here depend on the associativity of addMeasurement and Add. + // Add empty observation + a := histogram{5, 25, []int64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38}, 4, -1} + b := a.New() + + expected := a.String() + a.Add(b) + if a.String() != expected { + t.Errorf("a.String = %s WANT: %s", a.String(), expected) + } + + // Add same bucketed value, no new buckets + c := new(histogram) + d := new(histogram) + e := new(histogram) + c.addMeasurement(12) + d.addMeasurement(11) + e.addMeasurement(12) + e.addMeasurement(11) + c.Add(d) + if c.String() != e.String() { + t.Errorf("c.String = %s WANT: %s", c.String(), e.String()) + } + + // Add bucketed values + f := new(histogram) + g := new(histogram) + h := new(histogram) + f.addMeasurement(4) + f.addMeasurement(12) + f.addMeasurement(100) + g.addMeasurement(18) + g.addMeasurement(36) + g.addMeasurement(255) + h.addMeasurement(4) + h.addMeasurement(12) + h.addMeasurement(100) + h.addMeasurement(18) + h.addMeasurement(36) + h.addMeasurement(255) + f.Add(g) + if f.String() != h.String() { + t.Errorf("f.String = %q WANT: %q", f.String(), h.String()) + } + + // add buckets to no buckets + i := new(histogram) + j := new(histogram) + k := new(histogram) + j.addMeasurement(18) + j.addMeasurement(36) + j.addMeasurement(255) + k.addMeasurement(18) + k.addMeasurement(36) + k.addMeasurement(255) + i.Add(j) + if i.String() != k.String() { + t.Errorf("i.String = %q WANT: %q", i.String(), k.String()) + } + + // add buckets to single value (no overlap) + l := new(histogram) + m := new(histogram) + n := new(histogram) + l.addMeasurement(0) + m.addMeasurement(18) + m.addMeasurement(36) + m.addMeasurement(255) + n.addMeasurement(0) + n.addMeasurement(18) + n.addMeasurement(36) + n.addMeasurement(255) + l.Add(m) + if l.String() != n.String() { + t.Errorf("l.String = %q WANT: %q", l.String(), n.String()) + } + + // mixed order + o := new(histogram) + p := new(histogram) + o.addMeasurement(0) + o.addMeasurement(2) + o.addMeasurement(0) + p.addMeasurement(0) + p.addMeasurement(0) + p.addMeasurement(2) + if o.String() != p.String() { + t.Errorf("o.String = %q WANT: %q", o.String(), p.String()) + } +} + +func add(h *histogram, times int, val int64) { + for i := 0; i < times; i++ { + h.addMeasurement(val) + } +} + +func isApproximate(x, y float64) bool { + return math.Abs(x-y) < 1e-2 +} diff --git a/vendor/golang.org/x/net/trace/trace.go b/vendor/golang.org/x/net/trace/trace.go new file mode 100644 index 0000000..c44cb7e --- /dev/null +++ b/vendor/golang.org/x/net/trace/trace.go @@ -0,0 +1,1057 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/* +Package trace implements tracing of requests and long-lived objects. +It exports HTTP interfaces on /debug/requests and /debug/events. + +A trace.Trace provides tracing for short-lived objects, usually requests. +A request handler might be implemented like this: + + func fooHandler(w http.ResponseWriter, req *http.Request) { + tr := trace.New("mypkg.Foo", req.URL.Path) + defer tr.Finish() + ... + tr.LazyPrintf("some event %q happened", str) + ... + if err := somethingImportant(); err != nil { + tr.LazyPrintf("somethingImportant failed: %v", err) + tr.SetError() + } + } + +The /debug/requests HTTP endpoint organizes the traces by family, +errors, and duration. It also provides histogram of request duration +for each family. + +A trace.EventLog provides tracing for long-lived objects, such as RPC +connections. + + // A Fetcher fetches URL paths for a single domain. + type Fetcher struct { + domain string + events trace.EventLog + } + + func NewFetcher(domain string) *Fetcher { + return &Fetcher{ + domain, + trace.NewEventLog("mypkg.Fetcher", domain), + } + } + + func (f *Fetcher) Fetch(path string) (string, error) { + resp, err := http.Get("http://" + f.domain + "/" + path) + if err != nil { + f.events.Errorf("Get(%q) = %v", path, err) + return "", err + } + f.events.Printf("Get(%q) = %s", path, resp.Status) + ... + } + + func (f *Fetcher) Close() error { + f.events.Finish() + return nil + } + +The /debug/events HTTP endpoint organizes the event logs by family and +by time since the last error. The expanded view displays recent log +entries and the log's call stack. +*/ +package trace // import "golang.org/x/net/trace" + +import ( + "bytes" + "fmt" + "html/template" + "io" + "log" + "net" + "net/http" + "runtime" + "sort" + "strconv" + "sync" + "sync/atomic" + "time" + + "golang.org/x/net/context" + "golang.org/x/net/internal/timeseries" +) + +// DebugUseAfterFinish controls whether to debug uses of Trace values after finishing. +// FOR DEBUGGING ONLY. This will slow down the program. +var DebugUseAfterFinish = false + +// AuthRequest determines whether a specific request is permitted to load the +// /debug/requests or /debug/events pages. +// +// It returns two bools; the first indicates whether the page may be viewed at all, +// and the second indicates whether sensitive events will be shown. +// +// AuthRequest may be replaced by a program to customise its authorisation requirements. +// +// The default AuthRequest function returns (true, true) iff the request comes from localhost/127.0.0.1/[::1]. +var AuthRequest = func(req *http.Request) (any, sensitive bool) { + host, _, err := net.SplitHostPort(req.RemoteAddr) + switch { + case err != nil: // Badly formed address; fail closed. + return false, false + case host == "localhost" || host == "127.0.0.1" || host == "::1": + return true, true + default: + return false, false + } +} + +func init() { + http.HandleFunc("/debug/requests", func(w http.ResponseWriter, req *http.Request) { + any, sensitive := AuthRequest(req) + if !any { + http.Error(w, "not allowed", http.StatusUnauthorized) + return + } + Render(w, req, sensitive) + }) + http.HandleFunc("/debug/events", func(w http.ResponseWriter, req *http.Request) { + any, sensitive := AuthRequest(req) + if !any { + http.Error(w, "not allowed", http.StatusUnauthorized) + return + } + RenderEvents(w, req, sensitive) + }) +} + +// Render renders the HTML page typically served at /debug/requests. +// It does not do any auth checking; see AuthRequest for the default auth check +// used by the handler registered on http.DefaultServeMux. +// req may be nil. +func Render(w io.Writer, req *http.Request, sensitive bool) { + data := &struct { + Families []string + ActiveTraceCount map[string]int + CompletedTraces map[string]*family + + // Set when a bucket has been selected. + Traces traceList + Family string + Bucket int + Expanded bool + Traced bool + Active bool + ShowSensitive bool // whether to show sensitive events + + Histogram template.HTML + HistogramWindow string // e.g. "last minute", "last hour", "all time" + + // If non-zero, the set of traces is a partial set, + // and this is the total number. + Total int + }{ + CompletedTraces: completedTraces, + } + + data.ShowSensitive = sensitive + if req != nil { + // Allow show_sensitive=0 to force hiding of sensitive data for testing. + // This only goes one way; you can't use show_sensitive=1 to see things. + if req.FormValue("show_sensitive") == "0" { + data.ShowSensitive = false + } + + if exp, err := strconv.ParseBool(req.FormValue("exp")); err == nil { + data.Expanded = exp + } + if exp, err := strconv.ParseBool(req.FormValue("rtraced")); err == nil { + data.Traced = exp + } + } + + completedMu.RLock() + data.Families = make([]string, 0, len(completedTraces)) + for fam, _ := range completedTraces { + data.Families = append(data.Families, fam) + } + completedMu.RUnlock() + sort.Strings(data.Families) + + // We are careful here to minimize the time spent locking activeMu, + // since that lock is required every time an RPC starts and finishes. + data.ActiveTraceCount = make(map[string]int, len(data.Families)) + activeMu.RLock() + for fam, s := range activeTraces { + data.ActiveTraceCount[fam] = s.Len() + } + activeMu.RUnlock() + + var ok bool + data.Family, data.Bucket, ok = parseArgs(req) + switch { + case !ok: + // No-op + case data.Bucket == -1: + data.Active = true + n := data.ActiveTraceCount[data.Family] + data.Traces = getActiveTraces(data.Family) + if len(data.Traces) < n { + data.Total = n + } + case data.Bucket < bucketsPerFamily: + if b := lookupBucket(data.Family, data.Bucket); b != nil { + data.Traces = b.Copy(data.Traced) + } + default: + if f := getFamily(data.Family, false); f != nil { + var obs timeseries.Observable + f.LatencyMu.RLock() + switch o := data.Bucket - bucketsPerFamily; o { + case 0: + obs = f.Latency.Minute() + data.HistogramWindow = "last minute" + case 1: + obs = f.Latency.Hour() + data.HistogramWindow = "last hour" + case 2: + obs = f.Latency.Total() + data.HistogramWindow = "all time" + } + f.LatencyMu.RUnlock() + if obs != nil { + data.Histogram = obs.(*histogram).html() + } + } + } + + if data.Traces != nil { + defer data.Traces.Free() + sort.Sort(data.Traces) + } + + completedMu.RLock() + defer completedMu.RUnlock() + if err := pageTmpl.ExecuteTemplate(w, "Page", data); err != nil { + log.Printf("net/trace: Failed executing template: %v", err) + } +} + +func parseArgs(req *http.Request) (fam string, b int, ok bool) { + if req == nil { + return "", 0, false + } + fam, bStr := req.FormValue("fam"), req.FormValue("b") + if fam == "" || bStr == "" { + return "", 0, false + } + b, err := strconv.Atoi(bStr) + if err != nil || b < -1 { + return "", 0, false + } + + return fam, b, true +} + +func lookupBucket(fam string, b int) *traceBucket { + f := getFamily(fam, false) + if f == nil || b < 0 || b >= len(f.Buckets) { + return nil + } + return f.Buckets[b] +} + +type contextKeyT string + +var contextKey = contextKeyT("golang.org/x/net/trace.Trace") + +// NewContext returns a copy of the parent context +// and associates it with a Trace. +func NewContext(ctx context.Context, tr Trace) context.Context { + return context.WithValue(ctx, contextKey, tr) +} + +// FromContext returns the Trace bound to the context, if any. +func FromContext(ctx context.Context) (tr Trace, ok bool) { + tr, ok = ctx.Value(contextKey).(Trace) + return +} + +// Trace represents an active request. +type Trace interface { + // LazyLog adds x to the event log. It will be evaluated each time the + // /debug/requests page is rendered. Any memory referenced by x will be + // pinned until the trace is finished and later discarded. + LazyLog(x fmt.Stringer, sensitive bool) + + // LazyPrintf evaluates its arguments with fmt.Sprintf each time the + // /debug/requests page is rendered. Any memory referenced by a will be + // pinned until the trace is finished and later discarded. + LazyPrintf(format string, a ...interface{}) + + // SetError declares that this trace resulted in an error. + SetError() + + // SetRecycler sets a recycler for the trace. + // f will be called for each event passed to LazyLog at a time when + // it is no longer required, whether while the trace is still active + // and the event is discarded, or when a completed trace is discarded. + SetRecycler(f func(interface{})) + + // SetTraceInfo sets the trace info for the trace. + // This is currently unused. + SetTraceInfo(traceID, spanID uint64) + + // SetMaxEvents sets the maximum number of events that will be stored + // in the trace. This has no effect if any events have already been + // added to the trace. + SetMaxEvents(m int) + + // Finish declares that this trace is complete. + // The trace should not be used after calling this method. + Finish() +} + +type lazySprintf struct { + format string + a []interface{} +} + +func (l *lazySprintf) String() string { + return fmt.Sprintf(l.format, l.a...) +} + +// New returns a new Trace with the specified family and title. +func New(family, title string) Trace { + tr := newTrace() + tr.ref() + tr.Family, tr.Title = family, title + tr.Start = time.Now() + tr.events = make([]event, 0, maxEventsPerTrace) + + activeMu.RLock() + s := activeTraces[tr.Family] + activeMu.RUnlock() + if s == nil { + activeMu.Lock() + s = activeTraces[tr.Family] // check again + if s == nil { + s = new(traceSet) + activeTraces[tr.Family] = s + } + activeMu.Unlock() + } + s.Add(tr) + + // Trigger allocation of the completed trace structure for this family. + // This will cause the family to be present in the request page during + // the first trace of this family. We don't care about the return value, + // nor is there any need for this to run inline, so we execute it in its + // own goroutine, but only if the family isn't allocated yet. + completedMu.RLock() + if _, ok := completedTraces[tr.Family]; !ok { + go allocFamily(tr.Family) + } + completedMu.RUnlock() + + return tr +} + +func (tr *trace) Finish() { + tr.Elapsed = time.Now().Sub(tr.Start) + if DebugUseAfterFinish { + buf := make([]byte, 4<<10) // 4 KB should be enough + n := runtime.Stack(buf, false) + tr.finishStack = buf[:n] + } + + activeMu.RLock() + m := activeTraces[tr.Family] + activeMu.RUnlock() + m.Remove(tr) + + f := getFamily(tr.Family, true) + for _, b := range f.Buckets { + if b.Cond.match(tr) { + b.Add(tr) + } + } + // Add a sample of elapsed time as microseconds to the family's timeseries + h := new(histogram) + h.addMeasurement(tr.Elapsed.Nanoseconds() / 1e3) + f.LatencyMu.Lock() + f.Latency.Add(h) + f.LatencyMu.Unlock() + + tr.unref() // matches ref in New +} + +const ( + bucketsPerFamily = 9 + tracesPerBucket = 10 + maxActiveTraces = 20 // Maximum number of active traces to show. + maxEventsPerTrace = 10 + numHistogramBuckets = 38 +) + +var ( + // The active traces. + activeMu sync.RWMutex + activeTraces = make(map[string]*traceSet) // family -> traces + + // Families of completed traces. + completedMu sync.RWMutex + completedTraces = make(map[string]*family) // family -> traces +) + +type traceSet struct { + mu sync.RWMutex + m map[*trace]bool + + // We could avoid the entire map scan in FirstN by having a slice of all the traces + // ordered by start time, and an index into that from the trace struct, with a periodic + // repack of the slice after enough traces finish; we could also use a skip list or similar. + // However, that would shift some of the expense from /debug/requests time to RPC time, + // which is probably the wrong trade-off. +} + +func (ts *traceSet) Len() int { + ts.mu.RLock() + defer ts.mu.RUnlock() + return len(ts.m) +} + +func (ts *traceSet) Add(tr *trace) { + ts.mu.Lock() + if ts.m == nil { + ts.m = make(map[*trace]bool) + } + ts.m[tr] = true + ts.mu.Unlock() +} + +func (ts *traceSet) Remove(tr *trace) { + ts.mu.Lock() + delete(ts.m, tr) + ts.mu.Unlock() +} + +// FirstN returns the first n traces ordered by time. +func (ts *traceSet) FirstN(n int) traceList { + ts.mu.RLock() + defer ts.mu.RUnlock() + + if n > len(ts.m) { + n = len(ts.m) + } + trl := make(traceList, 0, n) + + // Fast path for when no selectivity is needed. + if n == len(ts.m) { + for tr := range ts.m { + tr.ref() + trl = append(trl, tr) + } + sort.Sort(trl) + return trl + } + + // Pick the oldest n traces. + // This is inefficient. See the comment in the traceSet struct. + for tr := range ts.m { + // Put the first n traces into trl in the order they occur. + // When we have n, sort trl, and thereafter maintain its order. + if len(trl) < n { + tr.ref() + trl = append(trl, tr) + if len(trl) == n { + // This is guaranteed to happen exactly once during this loop. + sort.Sort(trl) + } + continue + } + if tr.Start.After(trl[n-1].Start) { + continue + } + + // Find where to insert this one. + tr.ref() + i := sort.Search(n, func(i int) bool { return trl[i].Start.After(tr.Start) }) + trl[n-1].unref() + copy(trl[i+1:], trl[i:]) + trl[i] = tr + } + + return trl +} + +func getActiveTraces(fam string) traceList { + activeMu.RLock() + s := activeTraces[fam] + activeMu.RUnlock() + if s == nil { + return nil + } + return s.FirstN(maxActiveTraces) +} + +func getFamily(fam string, allocNew bool) *family { + completedMu.RLock() + f := completedTraces[fam] + completedMu.RUnlock() + if f == nil && allocNew { + f = allocFamily(fam) + } + return f +} + +func allocFamily(fam string) *family { + completedMu.Lock() + defer completedMu.Unlock() + f := completedTraces[fam] + if f == nil { + f = newFamily() + completedTraces[fam] = f + } + return f +} + +// family represents a set of trace buckets and associated latency information. +type family struct { + // traces may occur in multiple buckets. + Buckets [bucketsPerFamily]*traceBucket + + // latency time series + LatencyMu sync.RWMutex + Latency *timeseries.MinuteHourSeries +} + +func newFamily() *family { + return &family{ + Buckets: [bucketsPerFamily]*traceBucket{ + {Cond: minCond(0)}, + {Cond: minCond(50 * time.Millisecond)}, + {Cond: minCond(100 * time.Millisecond)}, + {Cond: minCond(200 * time.Millisecond)}, + {Cond: minCond(500 * time.Millisecond)}, + {Cond: minCond(1 * time.Second)}, + {Cond: minCond(10 * time.Second)}, + {Cond: minCond(100 * time.Second)}, + {Cond: errorCond{}}, + }, + Latency: timeseries.NewMinuteHourSeries(func() timeseries.Observable { return new(histogram) }), + } +} + +// traceBucket represents a size-capped bucket of historic traces, +// along with a condition for a trace to belong to the bucket. +type traceBucket struct { + Cond cond + + // Ring buffer implementation of a fixed-size FIFO queue. + mu sync.RWMutex + buf [tracesPerBucket]*trace + start int // < tracesPerBucket + length int // <= tracesPerBucket +} + +func (b *traceBucket) Add(tr *trace) { + b.mu.Lock() + defer b.mu.Unlock() + + i := b.start + b.length + if i >= tracesPerBucket { + i -= tracesPerBucket + } + if b.length == tracesPerBucket { + // "Remove" an element from the bucket. + b.buf[i].unref() + b.start++ + if b.start == tracesPerBucket { + b.start = 0 + } + } + b.buf[i] = tr + if b.length < tracesPerBucket { + b.length++ + } + tr.ref() +} + +// Copy returns a copy of the traces in the bucket. +// If tracedOnly is true, only the traces with trace information will be returned. +// The logs will be ref'd before returning; the caller should call +// the Free method when it is done with them. +// TODO(dsymonds): keep track of traced requests in separate buckets. +func (b *traceBucket) Copy(tracedOnly bool) traceList { + b.mu.RLock() + defer b.mu.RUnlock() + + trl := make(traceList, 0, b.length) + for i, x := 0, b.start; i < b.length; i++ { + tr := b.buf[x] + if !tracedOnly || tr.spanID != 0 { + tr.ref() + trl = append(trl, tr) + } + x++ + if x == b.length { + x = 0 + } + } + return trl +} + +func (b *traceBucket) Empty() bool { + b.mu.RLock() + defer b.mu.RUnlock() + return b.length == 0 +} + +// cond represents a condition on a trace. +type cond interface { + match(t *trace) bool + String() string +} + +type minCond time.Duration + +func (m minCond) match(t *trace) bool { return t.Elapsed >= time.Duration(m) } +func (m minCond) String() string { return fmt.Sprintf("≥%gs", time.Duration(m).Seconds()) } + +type errorCond struct{} + +func (e errorCond) match(t *trace) bool { return t.IsError } +func (e errorCond) String() string { return "errors" } + +type traceList []*trace + +// Free calls unref on each element of the list. +func (trl traceList) Free() { + for _, t := range trl { + t.unref() + } +} + +// traceList may be sorted in reverse chronological order. +func (trl traceList) Len() int { return len(trl) } +func (trl traceList) Less(i, j int) bool { return trl[i].Start.After(trl[j].Start) } +func (trl traceList) Swap(i, j int) { trl[i], trl[j] = trl[j], trl[i] } + +// An event is a timestamped log entry in a trace. +type event struct { + When time.Time + Elapsed time.Duration // since previous event in trace + NewDay bool // whether this event is on a different day to the previous event + Recyclable bool // whether this event was passed via LazyLog + What interface{} // string or fmt.Stringer + Sensitive bool // whether this event contains sensitive information +} + +// WhenString returns a string representation of the elapsed time of the event. +// It will include the date if midnight was crossed. +func (e event) WhenString() string { + if e.NewDay { + return e.When.Format("2006/01/02 15:04:05.000000") + } + return e.When.Format("15:04:05.000000") +} + +// discarded represents a number of discarded events. +// It is stored as *discarded to make it easier to update in-place. +type discarded int + +func (d *discarded) String() string { + return fmt.Sprintf("(%d events discarded)", int(*d)) +} + +// trace represents an active or complete request, +// either sent or received by this program. +type trace struct { + // Family is the top-level grouping of traces to which this belongs. + Family string + + // Title is the title of this trace. + Title string + + // Timing information. + Start time.Time + Elapsed time.Duration // zero while active + + // Trace information if non-zero. + traceID uint64 + spanID uint64 + + // Whether this trace resulted in an error. + IsError bool + + // Append-only sequence of events (modulo discards). + mu sync.RWMutex + events []event + + refs int32 // how many buckets this is in + recycler func(interface{}) + disc discarded // scratch space to avoid allocation + + finishStack []byte // where finish was called, if DebugUseAfterFinish is set +} + +func (tr *trace) reset() { + // Clear all but the mutex. Mutexes may not be copied, even when unlocked. + tr.Family = "" + tr.Title = "" + tr.Start = time.Time{} + tr.Elapsed = 0 + tr.traceID = 0 + tr.spanID = 0 + tr.IsError = false + tr.events = nil + tr.refs = 0 + tr.recycler = nil + tr.disc = 0 + tr.finishStack = nil +} + +// delta returns the elapsed time since the last event or the trace start, +// and whether it spans midnight. +// L >= tr.mu +func (tr *trace) delta(t time.Time) (time.Duration, bool) { + if len(tr.events) == 0 { + return t.Sub(tr.Start), false + } + prev := tr.events[len(tr.events)-1].When + return t.Sub(prev), prev.Day() != t.Day() +} + +func (tr *trace) addEvent(x interface{}, recyclable, sensitive bool) { + if DebugUseAfterFinish && tr.finishStack != nil { + buf := make([]byte, 4<<10) // 4 KB should be enough + n := runtime.Stack(buf, false) + log.Printf("net/trace: trace used after finish:\nFinished at:\n%s\nUsed at:\n%s", tr.finishStack, buf[:n]) + } + + /* + NOTE TO DEBUGGERS + + If you are here because your program panicked in this code, + it is almost definitely the fault of code using this package, + and very unlikely to be the fault of this code. + + The most likely scenario is that some code elsewhere is using + a requestz.Trace after its Finish method is called. + You can temporarily set the DebugUseAfterFinish var + to help discover where that is; do not leave that var set, + since it makes this package much less efficient. + */ + + e := event{When: time.Now(), What: x, Recyclable: recyclable, Sensitive: sensitive} + tr.mu.Lock() + e.Elapsed, e.NewDay = tr.delta(e.When) + if len(tr.events) < cap(tr.events) { + tr.events = append(tr.events, e) + } else { + // Discard the middle events. + di := int((cap(tr.events) - 1) / 2) + if d, ok := tr.events[di].What.(*discarded); ok { + (*d)++ + } else { + // disc starts at two to count for the event it is replacing, + // plus the next one that we are about to drop. + tr.disc = 2 + if tr.recycler != nil && tr.events[di].Recyclable { + go tr.recycler(tr.events[di].What) + } + tr.events[di].What = &tr.disc + } + // The timestamp of the discarded meta-event should be + // the time of the last event it is representing. + tr.events[di].When = tr.events[di+1].When + + if tr.recycler != nil && tr.events[di+1].Recyclable { + go tr.recycler(tr.events[di+1].What) + } + copy(tr.events[di+1:], tr.events[di+2:]) + tr.events[cap(tr.events)-1] = e + } + tr.mu.Unlock() +} + +func (tr *trace) LazyLog(x fmt.Stringer, sensitive bool) { + tr.addEvent(x, true, sensitive) +} + +func (tr *trace) LazyPrintf(format string, a ...interface{}) { + tr.addEvent(&lazySprintf{format, a}, false, false) +} + +func (tr *trace) SetError() { tr.IsError = true } + +func (tr *trace) SetRecycler(f func(interface{})) { + tr.recycler = f +} + +func (tr *trace) SetTraceInfo(traceID, spanID uint64) { + tr.traceID, tr.spanID = traceID, spanID +} + +func (tr *trace) SetMaxEvents(m int) { + // Always keep at least three events: first, discarded count, last. + if len(tr.events) == 0 && m > 3 { + tr.events = make([]event, 0, m) + } +} + +func (tr *trace) ref() { + atomic.AddInt32(&tr.refs, 1) +} + +func (tr *trace) unref() { + if atomic.AddInt32(&tr.refs, -1) == 0 { + if tr.recycler != nil { + // freeTrace clears tr, so we hold tr.recycler and tr.events here. + go func(f func(interface{}), es []event) { + for _, e := range es { + if e.Recyclable { + f(e.What) + } + } + }(tr.recycler, tr.events) + } + + freeTrace(tr) + } +} + +func (tr *trace) When() string { + return tr.Start.Format("2006/01/02 15:04:05.000000") +} + +func (tr *trace) ElapsedTime() string { + t := tr.Elapsed + if t == 0 { + // Active trace. + t = time.Since(tr.Start) + } + return fmt.Sprintf("%.6f", t.Seconds()) +} + +func (tr *trace) Events() []event { + tr.mu.RLock() + defer tr.mu.RUnlock() + return tr.events +} + +var traceFreeList = make(chan *trace, 1000) // TODO(dsymonds): Use sync.Pool? + +// newTrace returns a trace ready to use. +func newTrace() *trace { + select { + case tr := <-traceFreeList: + return tr + default: + return new(trace) + } +} + +// freeTrace adds tr to traceFreeList if there's room. +// This is non-blocking. +func freeTrace(tr *trace) { + if DebugUseAfterFinish { + return // never reuse + } + tr.reset() + select { + case traceFreeList <- tr: + default: + } +} + +func elapsed(d time.Duration) string { + b := []byte(fmt.Sprintf("%.6f", d.Seconds())) + + // For subsecond durations, blank all zeros before decimal point, + // and all zeros between the decimal point and the first non-zero digit. + if d < time.Second { + dot := bytes.IndexByte(b, '.') + for i := 0; i < dot; i++ { + b[i] = ' ' + } + for i := dot + 1; i < len(b); i++ { + if b[i] == '0' { + b[i] = ' ' + } else { + break + } + } + } + + return string(b) +} + +var pageTmpl = template.Must(template.New("Page").Funcs(template.FuncMap{ + "elapsed": elapsed, + "add": func(a, b int) int { return a + b }, +}).Parse(pageHTML)) + +const pageHTML = ` +{{template "Prolog" .}} +{{template "StatusTable" .}} +{{template "Epilog" .}} + +{{define "Prolog"}} + + + /debug/requests + + + + +

    /debug/requests

    +{{end}} {{/* end of Prolog */}} + +{{define "StatusTable"}} + + {{range $fam := .Families}} + + + + {{$n := index $.ActiveTraceCount $fam}} + + + {{$f := index $.CompletedTraces $fam}} + {{range $i, $b := $f.Buckets}} + {{$empty := $b.Empty}} + + {{end}} + + {{$nb := len $f.Buckets}} + + + + + + {{end}} +
    {{$fam}} + {{if $n}}{{end}} + [{{$n}} active] + {{if $n}}{{end}} + + {{if not $empty}}{{end}} + [{{.Cond}}] + {{if not $empty}}{{end}} + + [minute] + + [hour] + + [total] +
    +{{end}} {{/* end of StatusTable */}} + +{{define "Epilog"}} +{{if $.Traces}} +
    +

    Family: {{$.Family}}

    + +{{if or $.Expanded $.Traced}} + [Normal/Summary] +{{else}} + [Normal/Summary] +{{end}} + +{{if or (not $.Expanded) $.Traced}} + [Normal/Expanded] +{{else}} + [Normal/Expanded] +{{end}} + +{{if not $.Active}} + {{if or $.Expanded (not $.Traced)}} + [Traced/Summary] + {{else}} + [Traced/Summary] + {{end}} + {{if or (not $.Expanded) (not $.Traced)}} + [Traced/Expanded] + {{else}} + [Traced/Expanded] + {{end}} +{{end}} + +{{if $.Total}} +

    Showing {{len $.Traces}} of {{$.Total}} traces.

    +{{end}} + + + + + {{range $tr := $.Traces}} + + + + + {{/* TODO: include traceID/spanID */}} + + {{if $.Expanded}} + {{range $tr.Events}} + + + + + + {{end}} + {{end}} + {{end}} +
    + {{if $.Active}}Active{{else}}Completed{{end}} Requests +
    WhenElapsed (s)
    {{$tr.When}}{{$tr.ElapsedTime}}{{$tr.Title}}
    {{.WhenString}}{{elapsed .Elapsed}}{{if or $.ShowSensitive (not .Sensitive)}}... {{.What}}{{else}}[redacted]{{end}}
    +{{end}} {{/* if $.Traces */}} + +{{if $.Histogram}} +

    Latency (µs) of {{$.Family}} over {{$.HistogramWindow}}

    +{{$.Histogram}} +{{end}} {{/* if $.Histogram */}} + + + +{{end}} {{/* end of Epilog */}} +` diff --git a/vendor/golang.org/x/net/trace/trace_test.go b/vendor/golang.org/x/net/trace/trace_test.go new file mode 100644 index 0000000..c2f5fcb --- /dev/null +++ b/vendor/golang.org/x/net/trace/trace_test.go @@ -0,0 +1,46 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package trace + +import ( + "reflect" + "testing" +) + +type s struct{} + +func (s) String() string { return "lazy string" } + +// TestReset checks whether all the fields are zeroed after reset. +func TestReset(t *testing.T) { + tr := New("foo", "bar") + tr.LazyLog(s{}, false) + tr.LazyPrintf("%d", 1) + tr.SetRecycler(func(_ interface{}) {}) + tr.SetTraceInfo(3, 4) + tr.SetMaxEvents(100) + tr.SetError() + tr.Finish() + + tr.(*trace).reset() + + if !reflect.DeepEqual(tr, new(trace)) { + t.Errorf("reset didn't clear all fields: %+v", tr) + } +} + +// TestResetLog checks whether all the fields are zeroed after reset. +func TestResetLog(t *testing.T) { + el := NewEventLog("foo", "bar") + el.Printf("message") + el.Errorf("error") + el.Finish() + + el.(*eventLog).reset() + + if !reflect.DeepEqual(el, new(eventLog)) { + t.Errorf("reset didn't clear all fields: %+v", el) + } +} diff --git a/vendor/golang.org/x/net/webdav/file.go b/vendor/golang.org/x/net/webdav/file.go new file mode 100644 index 0000000..9ba1ca1 --- /dev/null +++ b/vendor/golang.org/x/net/webdav/file.go @@ -0,0 +1,795 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package webdav + +import ( + "io" + "net/http" + "os" + "path" + "path/filepath" + "strings" + "sync" + "time" + + "golang.org/x/net/webdav/internal/xml" +) + +// slashClean is equivalent to but slightly more efficient than +// path.Clean("/" + name). +func slashClean(name string) string { + if name == "" || name[0] != '/' { + name = "/" + name + } + return path.Clean(name) +} + +// A FileSystem implements access to a collection of named files. The elements +// in a file path are separated by slash ('/', U+002F) characters, regardless +// of host operating system convention. +// +// Each method has the same semantics as the os package's function of the same +// name. +// +// Note that the os.Rename documentation says that "OS-specific restrictions +// might apply". In particular, whether or not renaming a file or directory +// overwriting another existing file or directory is an error is OS-dependent. +type FileSystem interface { + Mkdir(name string, perm os.FileMode) error + OpenFile(name string, flag int, perm os.FileMode) (File, error) + RemoveAll(name string) error + Rename(oldName, newName string) error + Stat(name string) (os.FileInfo, error) +} + +// A File is returned by a FileSystem's OpenFile method and can be served by a +// Handler. +// +// A File may optionally implement the DeadPropsHolder interface, if it can +// load and save dead properties. +type File interface { + http.File + io.Writer +} + +// A Dir implements FileSystem using the native file system restricted to a +// specific directory tree. +// +// While the FileSystem.OpenFile method takes '/'-separated paths, a Dir's +// string value is a filename on the native file system, not a URL, so it is +// separated by filepath.Separator, which isn't necessarily '/'. +// +// An empty Dir is treated as ".". +type Dir string + +func (d Dir) resolve(name string) string { + // This implementation is based on Dir.Open's code in the standard net/http package. + if filepath.Separator != '/' && strings.IndexRune(name, filepath.Separator) >= 0 || + strings.Contains(name, "\x00") { + return "" + } + dir := string(d) + if dir == "" { + dir = "." + } + return filepath.Join(dir, filepath.FromSlash(slashClean(name))) +} + +func (d Dir) Mkdir(name string, perm os.FileMode) error { + if name = d.resolve(name); name == "" { + return os.ErrNotExist + } + return os.Mkdir(name, perm) +} + +func (d Dir) OpenFile(name string, flag int, perm os.FileMode) (File, error) { + if name = d.resolve(name); name == "" { + return nil, os.ErrNotExist + } + f, err := os.OpenFile(name, flag, perm) + if err != nil { + return nil, err + } + return f, nil +} + +func (d Dir) RemoveAll(name string) error { + if name = d.resolve(name); name == "" { + return os.ErrNotExist + } + if name == filepath.Clean(string(d)) { + // Prohibit removing the virtual root directory. + return os.ErrInvalid + } + return os.RemoveAll(name) +} + +func (d Dir) Rename(oldName, newName string) error { + if oldName = d.resolve(oldName); oldName == "" { + return os.ErrNotExist + } + if newName = d.resolve(newName); newName == "" { + return os.ErrNotExist + } + if root := filepath.Clean(string(d)); root == oldName || root == newName { + // Prohibit renaming from or to the virtual root directory. + return os.ErrInvalid + } + return os.Rename(oldName, newName) +} + +func (d Dir) Stat(name string) (os.FileInfo, error) { + if name = d.resolve(name); name == "" { + return nil, os.ErrNotExist + } + return os.Stat(name) +} + +// NewMemFS returns a new in-memory FileSystem implementation. +func NewMemFS() FileSystem { + return &memFS{ + root: memFSNode{ + children: make(map[string]*memFSNode), + mode: 0660 | os.ModeDir, + modTime: time.Now(), + }, + } +} + +// A memFS implements FileSystem, storing all metadata and actual file data +// in-memory. No limits on filesystem size are used, so it is not recommended +// this be used where the clients are untrusted. +// +// Concurrent access is permitted. The tree structure is protected by a mutex, +// and each node's contents and metadata are protected by a per-node mutex. +// +// TODO: Enforce file permissions. +type memFS struct { + mu sync.Mutex + root memFSNode +} + +// TODO: clean up and rationalize the walk/find code. + +// walk walks the directory tree for the fullname, calling f at each step. If f +// returns an error, the walk will be aborted and return that same error. +// +// dir is the directory at that step, frag is the name fragment, and final is +// whether it is the final step. For example, walking "/foo/bar/x" will result +// in 3 calls to f: +// - "/", "foo", false +// - "/foo/", "bar", false +// - "/foo/bar/", "x", true +// The frag argument will be empty only if dir is the root node and the walk +// ends at that root node. +func (fs *memFS) walk(op, fullname string, f func(dir *memFSNode, frag string, final bool) error) error { + original := fullname + fullname = slashClean(fullname) + + // Strip any leading "/"s to make fullname a relative path, as the walk + // starts at fs.root. + if fullname[0] == '/' { + fullname = fullname[1:] + } + dir := &fs.root + + for { + frag, remaining := fullname, "" + i := strings.IndexRune(fullname, '/') + final := i < 0 + if !final { + frag, remaining = fullname[:i], fullname[i+1:] + } + if frag == "" && dir != &fs.root { + panic("webdav: empty path fragment for a clean path") + } + if err := f(dir, frag, final); err != nil { + return &os.PathError{ + Op: op, + Path: original, + Err: err, + } + } + if final { + break + } + child := dir.children[frag] + if child == nil { + return &os.PathError{ + Op: op, + Path: original, + Err: os.ErrNotExist, + } + } + if !child.mode.IsDir() { + return &os.PathError{ + Op: op, + Path: original, + Err: os.ErrInvalid, + } + } + dir, fullname = child, remaining + } + return nil +} + +// find returns the parent of the named node and the relative name fragment +// from the parent to the child. For example, if finding "/foo/bar/baz" then +// parent will be the node for "/foo/bar" and frag will be "baz". +// +// If the fullname names the root node, then parent, frag and err will be zero. +// +// find returns an error if the parent does not already exist or the parent +// isn't a directory, but it will not return an error per se if the child does +// not already exist. The error returned is either nil or an *os.PathError +// whose Op is op. +func (fs *memFS) find(op, fullname string) (parent *memFSNode, frag string, err error) { + err = fs.walk(op, fullname, func(parent0 *memFSNode, frag0 string, final bool) error { + if !final { + return nil + } + if frag0 != "" { + parent, frag = parent0, frag0 + } + return nil + }) + return parent, frag, err +} + +func (fs *memFS) Mkdir(name string, perm os.FileMode) error { + fs.mu.Lock() + defer fs.mu.Unlock() + + dir, frag, err := fs.find("mkdir", name) + if err != nil { + return err + } + if dir == nil { + // We can't create the root. + return os.ErrInvalid + } + if _, ok := dir.children[frag]; ok { + return os.ErrExist + } + dir.children[frag] = &memFSNode{ + children: make(map[string]*memFSNode), + mode: perm.Perm() | os.ModeDir, + modTime: time.Now(), + } + return nil +} + +func (fs *memFS) OpenFile(name string, flag int, perm os.FileMode) (File, error) { + fs.mu.Lock() + defer fs.mu.Unlock() + + dir, frag, err := fs.find("open", name) + if err != nil { + return nil, err + } + var n *memFSNode + if dir == nil { + // We're opening the root. + if flag&(os.O_WRONLY|os.O_RDWR) != 0 { + return nil, os.ErrPermission + } + n, frag = &fs.root, "/" + + } else { + n = dir.children[frag] + if flag&(os.O_SYNC|os.O_APPEND) != 0 { + // memFile doesn't support these flags yet. + return nil, os.ErrInvalid + } + if flag&os.O_CREATE != 0 { + if flag&os.O_EXCL != 0 && n != nil { + return nil, os.ErrExist + } + if n == nil { + n = &memFSNode{ + mode: perm.Perm(), + } + dir.children[frag] = n + } + } + if n == nil { + return nil, os.ErrNotExist + } + if flag&(os.O_WRONLY|os.O_RDWR) != 0 && flag&os.O_TRUNC != 0 { + n.mu.Lock() + n.data = nil + n.mu.Unlock() + } + } + + children := make([]os.FileInfo, 0, len(n.children)) + for cName, c := range n.children { + children = append(children, c.stat(cName)) + } + return &memFile{ + n: n, + nameSnapshot: frag, + childrenSnapshot: children, + }, nil +} + +func (fs *memFS) RemoveAll(name string) error { + fs.mu.Lock() + defer fs.mu.Unlock() + + dir, frag, err := fs.find("remove", name) + if err != nil { + return err + } + if dir == nil { + // We can't remove the root. + return os.ErrInvalid + } + delete(dir.children, frag) + return nil +} + +func (fs *memFS) Rename(oldName, newName string) error { + fs.mu.Lock() + defer fs.mu.Unlock() + + oldName = slashClean(oldName) + newName = slashClean(newName) + if oldName == newName { + return nil + } + if strings.HasPrefix(newName, oldName+"/") { + // We can't rename oldName to be a sub-directory of itself. + return os.ErrInvalid + } + + oDir, oFrag, err := fs.find("rename", oldName) + if err != nil { + return err + } + if oDir == nil { + // We can't rename from the root. + return os.ErrInvalid + } + + nDir, nFrag, err := fs.find("rename", newName) + if err != nil { + return err + } + if nDir == nil { + // We can't rename to the root. + return os.ErrInvalid + } + + oNode, ok := oDir.children[oFrag] + if !ok { + return os.ErrNotExist + } + if oNode.children != nil { + if nNode, ok := nDir.children[nFrag]; ok { + if nNode.children == nil { + return errNotADirectory + } + if len(nNode.children) != 0 { + return errDirectoryNotEmpty + } + } + } + delete(oDir.children, oFrag) + nDir.children[nFrag] = oNode + return nil +} + +func (fs *memFS) Stat(name string) (os.FileInfo, error) { + fs.mu.Lock() + defer fs.mu.Unlock() + + dir, frag, err := fs.find("stat", name) + if err != nil { + return nil, err + } + if dir == nil { + // We're stat'ting the root. + return fs.root.stat("/"), nil + } + if n, ok := dir.children[frag]; ok { + return n.stat(path.Base(name)), nil + } + return nil, os.ErrNotExist +} + +// A memFSNode represents a single entry in the in-memory filesystem and also +// implements os.FileInfo. +type memFSNode struct { + // children is protected by memFS.mu. + children map[string]*memFSNode + + mu sync.Mutex + data []byte + mode os.FileMode + modTime time.Time + deadProps map[xml.Name]Property +} + +func (n *memFSNode) stat(name string) *memFileInfo { + n.mu.Lock() + defer n.mu.Unlock() + return &memFileInfo{ + name: name, + size: int64(len(n.data)), + mode: n.mode, + modTime: n.modTime, + } +} + +func (n *memFSNode) DeadProps() (map[xml.Name]Property, error) { + n.mu.Lock() + defer n.mu.Unlock() + if len(n.deadProps) == 0 { + return nil, nil + } + ret := make(map[xml.Name]Property, len(n.deadProps)) + for k, v := range n.deadProps { + ret[k] = v + } + return ret, nil +} + +func (n *memFSNode) Patch(patches []Proppatch) ([]Propstat, error) { + n.mu.Lock() + defer n.mu.Unlock() + pstat := Propstat{Status: http.StatusOK} + for _, patch := range patches { + for _, p := range patch.Props { + pstat.Props = append(pstat.Props, Property{XMLName: p.XMLName}) + if patch.Remove { + delete(n.deadProps, p.XMLName) + continue + } + if n.deadProps == nil { + n.deadProps = map[xml.Name]Property{} + } + n.deadProps[p.XMLName] = p + } + } + return []Propstat{pstat}, nil +} + +type memFileInfo struct { + name string + size int64 + mode os.FileMode + modTime time.Time +} + +func (f *memFileInfo) Name() string { return f.name } +func (f *memFileInfo) Size() int64 { return f.size } +func (f *memFileInfo) Mode() os.FileMode { return f.mode } +func (f *memFileInfo) ModTime() time.Time { return f.modTime } +func (f *memFileInfo) IsDir() bool { return f.mode.IsDir() } +func (f *memFileInfo) Sys() interface{} { return nil } + +// A memFile is a File implementation for a memFSNode. It is a per-file (not +// per-node) read/write position, and a snapshot of the memFS' tree structure +// (a node's name and children) for that node. +type memFile struct { + n *memFSNode + nameSnapshot string + childrenSnapshot []os.FileInfo + // pos is protected by n.mu. + pos int +} + +// A *memFile implements the optional DeadPropsHolder interface. +var _ DeadPropsHolder = (*memFile)(nil) + +func (f *memFile) DeadProps() (map[xml.Name]Property, error) { return f.n.DeadProps() } +func (f *memFile) Patch(patches []Proppatch) ([]Propstat, error) { return f.n.Patch(patches) } + +func (f *memFile) Close() error { + return nil +} + +func (f *memFile) Read(p []byte) (int, error) { + f.n.mu.Lock() + defer f.n.mu.Unlock() + if f.n.mode.IsDir() { + return 0, os.ErrInvalid + } + if f.pos >= len(f.n.data) { + return 0, io.EOF + } + n := copy(p, f.n.data[f.pos:]) + f.pos += n + return n, nil +} + +func (f *memFile) Readdir(count int) ([]os.FileInfo, error) { + f.n.mu.Lock() + defer f.n.mu.Unlock() + if !f.n.mode.IsDir() { + return nil, os.ErrInvalid + } + old := f.pos + if old >= len(f.childrenSnapshot) { + // The os.File Readdir docs say that at the end of a directory, + // the error is io.EOF if count > 0 and nil if count <= 0. + if count > 0 { + return nil, io.EOF + } + return nil, nil + } + if count > 0 { + f.pos += count + if f.pos > len(f.childrenSnapshot) { + f.pos = len(f.childrenSnapshot) + } + } else { + f.pos = len(f.childrenSnapshot) + old = 0 + } + return f.childrenSnapshot[old:f.pos], nil +} + +func (f *memFile) Seek(offset int64, whence int) (int64, error) { + f.n.mu.Lock() + defer f.n.mu.Unlock() + npos := f.pos + // TODO: How to handle offsets greater than the size of system int? + switch whence { + case os.SEEK_SET: + npos = int(offset) + case os.SEEK_CUR: + npos += int(offset) + case os.SEEK_END: + npos = len(f.n.data) + int(offset) + default: + npos = -1 + } + if npos < 0 { + return 0, os.ErrInvalid + } + f.pos = npos + return int64(f.pos), nil +} + +func (f *memFile) Stat() (os.FileInfo, error) { + return f.n.stat(f.nameSnapshot), nil +} + +func (f *memFile) Write(p []byte) (int, error) { + lenp := len(p) + f.n.mu.Lock() + defer f.n.mu.Unlock() + + if f.n.mode.IsDir() { + return 0, os.ErrInvalid + } + if f.pos < len(f.n.data) { + n := copy(f.n.data[f.pos:], p) + f.pos += n + p = p[n:] + } else if f.pos > len(f.n.data) { + // Write permits the creation of holes, if we've seek'ed past the + // existing end of file. + if f.pos <= cap(f.n.data) { + oldLen := len(f.n.data) + f.n.data = f.n.data[:f.pos] + hole := f.n.data[oldLen:] + for i := range hole { + hole[i] = 0 + } + } else { + d := make([]byte, f.pos, f.pos+len(p)) + copy(d, f.n.data) + f.n.data = d + } + } + + if len(p) > 0 { + // We should only get here if f.pos == len(f.n.data). + f.n.data = append(f.n.data, p...) + f.pos = len(f.n.data) + } + f.n.modTime = time.Now() + return lenp, nil +} + +// moveFiles moves files and/or directories from src to dst. +// +// See section 9.9.4 for when various HTTP status codes apply. +func moveFiles(fs FileSystem, src, dst string, overwrite bool) (status int, err error) { + created := false + if _, err := fs.Stat(dst); err != nil { + if !os.IsNotExist(err) { + return http.StatusForbidden, err + } + created = true + } else if overwrite { + // Section 9.9.3 says that "If a resource exists at the destination + // and the Overwrite header is "T", then prior to performing the move, + // the server must perform a DELETE with "Depth: infinity" on the + // destination resource. + if err := fs.RemoveAll(dst); err != nil { + return http.StatusForbidden, err + } + } else { + return http.StatusPreconditionFailed, os.ErrExist + } + if err := fs.Rename(src, dst); err != nil { + return http.StatusForbidden, err + } + if created { + return http.StatusCreated, nil + } + return http.StatusNoContent, nil +} + +func copyProps(dst, src File) error { + d, ok := dst.(DeadPropsHolder) + if !ok { + return nil + } + s, ok := src.(DeadPropsHolder) + if !ok { + return nil + } + m, err := s.DeadProps() + if err != nil { + return err + } + props := make([]Property, 0, len(m)) + for _, prop := range m { + props = append(props, prop) + } + _, err = d.Patch([]Proppatch{{Props: props}}) + return err +} + +// copyFiles copies files and/or directories from src to dst. +// +// See section 9.8.5 for when various HTTP status codes apply. +func copyFiles(fs FileSystem, src, dst string, overwrite bool, depth int, recursion int) (status int, err error) { + if recursion == 1000 { + return http.StatusInternalServerError, errRecursionTooDeep + } + recursion++ + + // TODO: section 9.8.3 says that "Note that an infinite-depth COPY of /A/ + // into /A/B/ could lead to infinite recursion if not handled correctly." + + srcFile, err := fs.OpenFile(src, os.O_RDONLY, 0) + if err != nil { + if os.IsNotExist(err) { + return http.StatusNotFound, err + } + return http.StatusInternalServerError, err + } + defer srcFile.Close() + srcStat, err := srcFile.Stat() + if err != nil { + if os.IsNotExist(err) { + return http.StatusNotFound, err + } + return http.StatusInternalServerError, err + } + srcPerm := srcStat.Mode() & os.ModePerm + + created := false + if _, err := fs.Stat(dst); err != nil { + if os.IsNotExist(err) { + created = true + } else { + return http.StatusForbidden, err + } + } else { + if !overwrite { + return http.StatusPreconditionFailed, os.ErrExist + } + if err := fs.RemoveAll(dst); err != nil && !os.IsNotExist(err) { + return http.StatusForbidden, err + } + } + + if srcStat.IsDir() { + if err := fs.Mkdir(dst, srcPerm); err != nil { + return http.StatusForbidden, err + } + if depth == infiniteDepth { + children, err := srcFile.Readdir(-1) + if err != nil { + return http.StatusForbidden, err + } + for _, c := range children { + name := c.Name() + s := path.Join(src, name) + d := path.Join(dst, name) + cStatus, cErr := copyFiles(fs, s, d, overwrite, depth, recursion) + if cErr != nil { + // TODO: MultiStatus. + return cStatus, cErr + } + } + } + + } else { + dstFile, err := fs.OpenFile(dst, os.O_RDWR|os.O_CREATE|os.O_TRUNC, srcPerm) + if err != nil { + if os.IsNotExist(err) { + return http.StatusConflict, err + } + return http.StatusForbidden, err + + } + _, copyErr := io.Copy(dstFile, srcFile) + propsErr := copyProps(dstFile, srcFile) + closeErr := dstFile.Close() + if copyErr != nil { + return http.StatusInternalServerError, copyErr + } + if propsErr != nil { + return http.StatusInternalServerError, propsErr + } + if closeErr != nil { + return http.StatusInternalServerError, closeErr + } + } + + if created { + return http.StatusCreated, nil + } + return http.StatusNoContent, nil +} + +// walkFS traverses filesystem fs starting at name up to depth levels. +// +// Allowed values for depth are 0, 1 or infiniteDepth. For each visited node, +// walkFS calls walkFn. If a visited file system node is a directory and +// walkFn returns filepath.SkipDir, walkFS will skip traversal of this node. +func walkFS(fs FileSystem, depth int, name string, info os.FileInfo, walkFn filepath.WalkFunc) error { + // This implementation is based on Walk's code in the standard path/filepath package. + err := walkFn(name, info, nil) + if err != nil { + if info.IsDir() && err == filepath.SkipDir { + return nil + } + return err + } + if !info.IsDir() || depth == 0 { + return nil + } + if depth == 1 { + depth = 0 + } + + // Read directory names. + f, err := fs.OpenFile(name, os.O_RDONLY, 0) + if err != nil { + return walkFn(name, info, err) + } + fileInfos, err := f.Readdir(0) + f.Close() + if err != nil { + return walkFn(name, info, err) + } + + for _, fileInfo := range fileInfos { + filename := path.Join(name, fileInfo.Name()) + fileInfo, err := fs.Stat(filename) + if err != nil { + if err := walkFn(filename, fileInfo, err); err != nil && err != filepath.SkipDir { + return err + } + } else { + err = walkFS(fs, depth, filename, fileInfo, walkFn) + if err != nil { + if !fileInfo.IsDir() || err != filepath.SkipDir { + return err + } + } + } + } + return nil +} diff --git a/vendor/golang.org/x/net/webdav/file_test.go b/vendor/golang.org/x/net/webdav/file_test.go new file mode 100644 index 0000000..99547e1 --- /dev/null +++ b/vendor/golang.org/x/net/webdav/file_test.go @@ -0,0 +1,1167 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package webdav + +import ( + "fmt" + "io" + "io/ioutil" + "os" + "path" + "path/filepath" + "reflect" + "runtime" + "sort" + "strconv" + "strings" + "testing" + + "golang.org/x/net/webdav/internal/xml" +) + +func TestSlashClean(t *testing.T) { + testCases := []string{ + "", + ".", + "/", + "/./", + "//", + "//.", + "//a", + "/a", + "/a/b/c", + "/a//b/./../c/d/", + "a", + "a/b/c", + } + for _, tc := range testCases { + got := slashClean(tc) + want := path.Clean("/" + tc) + if got != want { + t.Errorf("tc=%q: got %q, want %q", tc, got, want) + } + } +} + +func TestDirResolve(t *testing.T) { + testCases := []struct { + dir, name, want string + }{ + {"/", "", "/"}, + {"/", "/", "/"}, + {"/", ".", "/"}, + {"/", "./a", "/a"}, + {"/", "..", "/"}, + {"/", "..", "/"}, + {"/", "../", "/"}, + {"/", "../.", "/"}, + {"/", "../a", "/a"}, + {"/", "../..", "/"}, + {"/", "../bar/a", "/bar/a"}, + {"/", "../baz/a", "/baz/a"}, + {"/", "...", "/..."}, + {"/", ".../a", "/.../a"}, + {"/", ".../..", "/"}, + {"/", "a", "/a"}, + {"/", "a/./b", "/a/b"}, + {"/", "a/../../b", "/b"}, + {"/", "a/../b", "/b"}, + {"/", "a/b", "/a/b"}, + {"/", "a/b/c/../../d", "/a/d"}, + {"/", "a/b/c/../../../d", "/d"}, + {"/", "a/b/c/../../../../d", "/d"}, + {"/", "a/b/c/d", "/a/b/c/d"}, + + {"/foo/bar", "", "/foo/bar"}, + {"/foo/bar", "/", "/foo/bar"}, + {"/foo/bar", ".", "/foo/bar"}, + {"/foo/bar", "./a", "/foo/bar/a"}, + {"/foo/bar", "..", "/foo/bar"}, + {"/foo/bar", "../", "/foo/bar"}, + {"/foo/bar", "../.", "/foo/bar"}, + {"/foo/bar", "../a", "/foo/bar/a"}, + {"/foo/bar", "../..", "/foo/bar"}, + {"/foo/bar", "../bar/a", "/foo/bar/bar/a"}, + {"/foo/bar", "../baz/a", "/foo/bar/baz/a"}, + {"/foo/bar", "...", "/foo/bar/..."}, + {"/foo/bar", ".../a", "/foo/bar/.../a"}, + {"/foo/bar", ".../..", "/foo/bar"}, + {"/foo/bar", "a", "/foo/bar/a"}, + {"/foo/bar", "a/./b", "/foo/bar/a/b"}, + {"/foo/bar", "a/../../b", "/foo/bar/b"}, + {"/foo/bar", "a/../b", "/foo/bar/b"}, + {"/foo/bar", "a/b", "/foo/bar/a/b"}, + {"/foo/bar", "a/b/c/../../d", "/foo/bar/a/d"}, + {"/foo/bar", "a/b/c/../../../d", "/foo/bar/d"}, + {"/foo/bar", "a/b/c/../../../../d", "/foo/bar/d"}, + {"/foo/bar", "a/b/c/d", "/foo/bar/a/b/c/d"}, + + {"/foo/bar/", "", "/foo/bar"}, + {"/foo/bar/", "/", "/foo/bar"}, + {"/foo/bar/", ".", "/foo/bar"}, + {"/foo/bar/", "./a", "/foo/bar/a"}, + {"/foo/bar/", "..", "/foo/bar"}, + + {"/foo//bar///", "", "/foo/bar"}, + {"/foo//bar///", "/", "/foo/bar"}, + {"/foo//bar///", ".", "/foo/bar"}, + {"/foo//bar///", "./a", "/foo/bar/a"}, + {"/foo//bar///", "..", "/foo/bar"}, + + {"/x/y/z", "ab/c\x00d/ef", ""}, + + {".", "", "."}, + {".", "/", "."}, + {".", ".", "."}, + {".", "./a", "a"}, + {".", "..", "."}, + {".", "..", "."}, + {".", "../", "."}, + {".", "../.", "."}, + {".", "../a", "a"}, + {".", "../..", "."}, + {".", "../bar/a", "bar/a"}, + {".", "../baz/a", "baz/a"}, + {".", "...", "..."}, + {".", ".../a", ".../a"}, + {".", ".../..", "."}, + {".", "a", "a"}, + {".", "a/./b", "a/b"}, + {".", "a/../../b", "b"}, + {".", "a/../b", "b"}, + {".", "a/b", "a/b"}, + {".", "a/b/c/../../d", "a/d"}, + {".", "a/b/c/../../../d", "d"}, + {".", "a/b/c/../../../../d", "d"}, + {".", "a/b/c/d", "a/b/c/d"}, + + {"", "", "."}, + {"", "/", "."}, + {"", ".", "."}, + {"", "./a", "a"}, + {"", "..", "."}, + } + + for _, tc := range testCases { + d := Dir(filepath.FromSlash(tc.dir)) + if got := filepath.ToSlash(d.resolve(tc.name)); got != tc.want { + t.Errorf("dir=%q, name=%q: got %q, want %q", tc.dir, tc.name, got, tc.want) + } + } +} + +func TestWalk(t *testing.T) { + type walkStep struct { + name, frag string + final bool + } + + testCases := []struct { + dir string + want []walkStep + }{ + {"", []walkStep{ + {"", "", true}, + }}, + {"/", []walkStep{ + {"", "", true}, + }}, + {"/a", []walkStep{ + {"", "a", true}, + }}, + {"/a/", []walkStep{ + {"", "a", true}, + }}, + {"/a/b", []walkStep{ + {"", "a", false}, + {"a", "b", true}, + }}, + {"/a/b/", []walkStep{ + {"", "a", false}, + {"a", "b", true}, + }}, + {"/a/b/c", []walkStep{ + {"", "a", false}, + {"a", "b", false}, + {"b", "c", true}, + }}, + // The following test case is the one mentioned explicitly + // in the method description. + {"/foo/bar/x", []walkStep{ + {"", "foo", false}, + {"foo", "bar", false}, + {"bar", "x", true}, + }}, + } + + for _, tc := range testCases { + fs := NewMemFS().(*memFS) + + parts := strings.Split(tc.dir, "/") + for p := 2; p < len(parts); p++ { + d := strings.Join(parts[:p], "/") + if err := fs.Mkdir(d, 0666); err != nil { + t.Errorf("tc.dir=%q: mkdir: %q: %v", tc.dir, d, err) + } + } + + i, prevFrag := 0, "" + err := fs.walk("test", tc.dir, func(dir *memFSNode, frag string, final bool) error { + got := walkStep{ + name: prevFrag, + frag: frag, + final: final, + } + want := tc.want[i] + + if got != want { + return fmt.Errorf("got %+v, want %+v", got, want) + } + i, prevFrag = i+1, frag + return nil + }) + if err != nil { + t.Errorf("tc.dir=%q: %v", tc.dir, err) + } + } +} + +// find appends to ss the names of the named file and its children. It is +// analogous to the Unix find command. +// +// The returned strings are not guaranteed to be in any particular order. +func find(ss []string, fs FileSystem, name string) ([]string, error) { + stat, err := fs.Stat(name) + if err != nil { + return nil, err + } + ss = append(ss, name) + if stat.IsDir() { + f, err := fs.OpenFile(name, os.O_RDONLY, 0) + if err != nil { + return nil, err + } + defer f.Close() + children, err := f.Readdir(-1) + if err != nil { + return nil, err + } + for _, c := range children { + ss, err = find(ss, fs, path.Join(name, c.Name())) + if err != nil { + return nil, err + } + } + } + return ss, nil +} + +func testFS(t *testing.T, fs FileSystem) { + errStr := func(err error) string { + switch { + case os.IsExist(err): + return "errExist" + case os.IsNotExist(err): + return "errNotExist" + case err != nil: + return "err" + } + return "ok" + } + + // The non-"find" non-"stat" test cases should change the file system state. The + // indentation of the "find"s and "stat"s helps distinguish such test cases. + testCases := []string{ + " stat / want dir", + " stat /a want errNotExist", + " stat /d want errNotExist", + " stat /d/e want errNotExist", + "create /a A want ok", + " stat /a want 1", + "create /d/e EEE want errNotExist", + "mk-dir /a want errExist", + "mk-dir /d/m want errNotExist", + "mk-dir /d want ok", + " stat /d want dir", + "create /d/e EEE want ok", + " stat /d/e want 3", + " find / /a /d /d/e", + "create /d/f FFFF want ok", + "create /d/g GGGGGGG want ok", + "mk-dir /d/m want ok", + "mk-dir /d/m want errExist", + "create /d/m/p PPPPP want ok", + " stat /d/e want 3", + " stat /d/f want 4", + " stat /d/g want 7", + " stat /d/h want errNotExist", + " stat /d/m want dir", + " stat /d/m/p want 5", + " find / /a /d /d/e /d/f /d/g /d/m /d/m/p", + "rm-all /d want ok", + " stat /a want 1", + " stat /d want errNotExist", + " stat /d/e want errNotExist", + " stat /d/f want errNotExist", + " stat /d/g want errNotExist", + " stat /d/m want errNotExist", + " stat /d/m/p want errNotExist", + " find / /a", + "mk-dir /d/m want errNotExist", + "mk-dir /d want ok", + "create /d/f FFFF want ok", + "rm-all /d/f want ok", + "mk-dir /d/m want ok", + "rm-all /z want ok", + "rm-all / want err", + "create /b BB want ok", + " stat / want dir", + " stat /a want 1", + " stat /b want 2", + " stat /c want errNotExist", + " stat /d want dir", + " stat /d/m want dir", + " find / /a /b /d /d/m", + "move__ o=F /b /c want ok", + " stat /b want errNotExist", + " stat /c want 2", + " stat /d/m want dir", + " stat /d/n want errNotExist", + " find / /a /c /d /d/m", + "move__ o=F /d/m /d/n want ok", + "create /d/n/q QQQQ want ok", + " stat /d/m want errNotExist", + " stat /d/n want dir", + " stat /d/n/q want 4", + "move__ o=F /d /d/n/z want err", + "move__ o=T /c /d/n/q want ok", + " stat /c want errNotExist", + " stat /d/n/q want 2", + " find / /a /d /d/n /d/n/q", + "create /d/n/r RRRRR want ok", + "mk-dir /u want ok", + "mk-dir /u/v want ok", + "move__ o=F /d/n /u want errExist", + "create /t TTTTTT want ok", + "move__ o=F /d/n /t want errExist", + "rm-all /t want ok", + "move__ o=F /d/n /t want ok", + " stat /d want dir", + " stat /d/n want errNotExist", + " stat /d/n/r want errNotExist", + " stat /t want dir", + " stat /t/q want 2", + " stat /t/r want 5", + " find / /a /d /t /t/q /t/r /u /u/v", + "move__ o=F /t / want errExist", + "move__ o=T /t /u/v want ok", + " stat /u/v/r want 5", + "move__ o=F / /z want err", + " find / /a /d /u /u/v /u/v/q /u/v/r", + " stat /a want 1", + " stat /b want errNotExist", + " stat /c want errNotExist", + " stat /u/v/r want 5", + "copy__ o=F d=0 /a /b want ok", + "copy__ o=T d=0 /a /c want ok", + " stat /a want 1", + " stat /b want 1", + " stat /c want 1", + " stat /u/v/r want 5", + "copy__ o=F d=0 /u/v/r /b want errExist", + " stat /b want 1", + "copy__ o=T d=0 /u/v/r /b want ok", + " stat /a want 1", + " stat /b want 5", + " stat /u/v/r want 5", + "rm-all /a want ok", + "rm-all /b want ok", + "mk-dir /u/v/w want ok", + "create /u/v/w/s SSSSSSSS want ok", + " stat /d want dir", + " stat /d/x want errNotExist", + " stat /d/y want errNotExist", + " stat /u/v/r want 5", + " stat /u/v/w/s want 8", + " find / /c /d /u /u/v /u/v/q /u/v/r /u/v/w /u/v/w/s", + "copy__ o=T d=0 /u/v /d/x want ok", + "copy__ o=T d=∞ /u/v /d/y want ok", + "rm-all /u want ok", + " stat /d/x want dir", + " stat /d/x/q want errNotExist", + " stat /d/x/r want errNotExist", + " stat /d/x/w want errNotExist", + " stat /d/x/w/s want errNotExist", + " stat /d/y want dir", + " stat /d/y/q want 2", + " stat /d/y/r want 5", + " stat /d/y/w want dir", + " stat /d/y/w/s want 8", + " stat /u want errNotExist", + " find / /c /d /d/x /d/y /d/y/q /d/y/r /d/y/w /d/y/w/s", + "copy__ o=F d=∞ /d/y /d/x want errExist", + } + + for i, tc := range testCases { + tc = strings.TrimSpace(tc) + j := strings.IndexByte(tc, ' ') + if j < 0 { + t.Fatalf("test case #%d %q: invalid command", i, tc) + } + op, arg := tc[:j], tc[j+1:] + + switch op { + default: + t.Fatalf("test case #%d %q: invalid operation %q", i, tc, op) + + case "create": + parts := strings.Split(arg, " ") + if len(parts) != 4 || parts[2] != "want" { + t.Fatalf("test case #%d %q: invalid write", i, tc) + } + f, opErr := fs.OpenFile(parts[0], os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666) + if got := errStr(opErr); got != parts[3] { + t.Fatalf("test case #%d %q: OpenFile: got %q (%v), want %q", i, tc, got, opErr, parts[3]) + } + if f != nil { + if _, err := f.Write([]byte(parts[1])); err != nil { + t.Fatalf("test case #%d %q: Write: %v", i, tc, err) + } + if err := f.Close(); err != nil { + t.Fatalf("test case #%d %q: Close: %v", i, tc, err) + } + } + + case "find": + got, err := find(nil, fs, "/") + if err != nil { + t.Fatalf("test case #%d %q: find: %v", i, tc, err) + } + sort.Strings(got) + want := strings.Split(arg, " ") + if !reflect.DeepEqual(got, want) { + t.Fatalf("test case #%d %q:\ngot %s\nwant %s", i, tc, got, want) + } + + case "copy__", "mk-dir", "move__", "rm-all", "stat": + nParts := 3 + switch op { + case "copy__": + nParts = 6 + case "move__": + nParts = 5 + } + parts := strings.Split(arg, " ") + if len(parts) != nParts { + t.Fatalf("test case #%d %q: invalid %s", i, tc, op) + } + + got, opErr := "", error(nil) + switch op { + case "copy__": + depth := 0 + if parts[1] == "d=∞" { + depth = infiniteDepth + } + _, opErr = copyFiles(fs, parts[2], parts[3], parts[0] == "o=T", depth, 0) + case "mk-dir": + opErr = fs.Mkdir(parts[0], 0777) + case "move__": + _, opErr = moveFiles(fs, parts[1], parts[2], parts[0] == "o=T") + case "rm-all": + opErr = fs.RemoveAll(parts[0]) + case "stat": + var stat os.FileInfo + fileName := parts[0] + if stat, opErr = fs.Stat(fileName); opErr == nil { + if stat.IsDir() { + got = "dir" + } else { + got = strconv.Itoa(int(stat.Size())) + } + + if fileName == "/" { + // For a Dir FileSystem, the virtual file system root maps to a + // real file system name like "/tmp/webdav-test012345", which does + // not end with "/". We skip such cases. + } else if statName := stat.Name(); path.Base(fileName) != statName { + t.Fatalf("test case #%d %q: file name %q inconsistent with stat name %q", + i, tc, fileName, statName) + } + } + } + if got == "" { + got = errStr(opErr) + } + + if parts[len(parts)-2] != "want" { + t.Fatalf("test case #%d %q: invalid %s", i, tc, op) + } + if want := parts[len(parts)-1]; got != want { + t.Fatalf("test case #%d %q: got %q (%v), want %q", i, tc, got, opErr, want) + } + } + } +} + +func TestDir(t *testing.T) { + switch runtime.GOOS { + case "nacl": + t.Skip("see golang.org/issue/12004") + case "plan9": + t.Skip("see golang.org/issue/11453") + } + + td, err := ioutil.TempDir("", "webdav-test") + if err != nil { + t.Fatal(err) + } + defer os.RemoveAll(td) + testFS(t, Dir(td)) +} + +func TestMemFS(t *testing.T) { + testFS(t, NewMemFS()) +} + +func TestMemFSRoot(t *testing.T) { + fs := NewMemFS() + for i := 0; i < 5; i++ { + stat, err := fs.Stat("/") + if err != nil { + t.Fatalf("i=%d: Stat: %v", i, err) + } + if !stat.IsDir() { + t.Fatalf("i=%d: Stat.IsDir is false, want true", i) + } + + f, err := fs.OpenFile("/", os.O_RDONLY, 0) + if err != nil { + t.Fatalf("i=%d: OpenFile: %v", i, err) + } + defer f.Close() + children, err := f.Readdir(-1) + if err != nil { + t.Fatalf("i=%d: Readdir: %v", i, err) + } + if len(children) != i { + t.Fatalf("i=%d: got %d children, want %d", i, len(children), i) + } + + if _, err := f.Write(make([]byte, 1)); err == nil { + t.Fatalf("i=%d: Write: got nil error, want non-nil", i) + } + + if err := fs.Mkdir(fmt.Sprintf("/dir%d", i), 0777); err != nil { + t.Fatalf("i=%d: Mkdir: %v", i, err) + } + } +} + +func TestMemFileReaddir(t *testing.T) { + fs := NewMemFS() + if err := fs.Mkdir("/foo", 0777); err != nil { + t.Fatalf("Mkdir: %v", err) + } + readdir := func(count int) ([]os.FileInfo, error) { + f, err := fs.OpenFile("/foo", os.O_RDONLY, 0) + if err != nil { + t.Fatalf("OpenFile: %v", err) + } + defer f.Close() + return f.Readdir(count) + } + if got, err := readdir(-1); len(got) != 0 || err != nil { + t.Fatalf("readdir(-1): got %d fileInfos with err=%v, want 0, ", len(got), err) + } + if got, err := readdir(+1); len(got) != 0 || err != io.EOF { + t.Fatalf("readdir(+1): got %d fileInfos with err=%v, want 0, EOF", len(got), err) + } +} + +func TestMemFile(t *testing.T) { + testCases := []string{ + "wantData ", + "wantSize 0", + "write abc", + "wantData abc", + "write de", + "wantData abcde", + "wantSize 5", + "write 5*x", + "write 4*y+2*z", + "write 3*st", + "wantData abcdexxxxxyyyyzzststst", + "wantSize 22", + "seek set 4 want 4", + "write EFG", + "wantData abcdEFGxxxyyyyzzststst", + "wantSize 22", + "seek set 2 want 2", + "read cdEF", + "read Gx", + "seek cur 0 want 8", + "seek cur 2 want 10", + "seek cur -1 want 9", + "write J", + "wantData abcdEFGxxJyyyyzzststst", + "wantSize 22", + "seek cur -4 want 6", + "write ghijk", + "wantData abcdEFghijkyyyzzststst", + "wantSize 22", + "read yyyz", + "seek cur 0 want 15", + "write ", + "seek cur 0 want 15", + "read ", + "seek cur 0 want 15", + "seek end -3 want 19", + "write ZZ", + "wantData abcdEFghijkyyyzzstsZZt", + "wantSize 22", + "write 4*A", + "wantData abcdEFghijkyyyzzstsZZAAAA", + "wantSize 25", + "seek end 0 want 25", + "seek end -5 want 20", + "read Z+4*A", + "write 5*B", + "wantData abcdEFghijkyyyzzstsZZAAAABBBBB", + "wantSize 30", + "seek end 10 want 40", + "write C", + "wantData abcdEFghijkyyyzzstsZZAAAABBBBB..........C", + "wantSize 41", + "write D", + "wantData abcdEFghijkyyyzzstsZZAAAABBBBB..........CD", + "wantSize 42", + "seek set 43 want 43", + "write E", + "wantData abcdEFghijkyyyzzstsZZAAAABBBBB..........CD.E", + "wantSize 44", + "seek set 0 want 0", + "write 5*123456789_", + "wantData 123456789_123456789_123456789_123456789_123456789_", + "wantSize 50", + "seek cur 0 want 50", + "seek cur -99 want err", + } + + const filename = "/foo" + fs := NewMemFS() + f, err := fs.OpenFile(filename, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666) + if err != nil { + t.Fatalf("OpenFile: %v", err) + } + defer f.Close() + + for i, tc := range testCases { + j := strings.IndexByte(tc, ' ') + if j < 0 { + t.Fatalf("test case #%d %q: invalid command", i, tc) + } + op, arg := tc[:j], tc[j+1:] + + // Expand an arg like "3*a+2*b" to "aaabb". + parts := strings.Split(arg, "+") + for j, part := range parts { + if k := strings.IndexByte(part, '*'); k >= 0 { + repeatCount, repeatStr := part[:k], part[k+1:] + n, err := strconv.Atoi(repeatCount) + if err != nil { + t.Fatalf("test case #%d %q: invalid repeat count %q", i, tc, repeatCount) + } + parts[j] = strings.Repeat(repeatStr, n) + } + } + arg = strings.Join(parts, "") + + switch op { + default: + t.Fatalf("test case #%d %q: invalid operation %q", i, tc, op) + + case "read": + buf := make([]byte, len(arg)) + if _, err := io.ReadFull(f, buf); err != nil { + t.Fatalf("test case #%d %q: ReadFull: %v", i, tc, err) + } + if got := string(buf); got != arg { + t.Fatalf("test case #%d %q:\ngot %q\nwant %q", i, tc, got, arg) + } + + case "seek": + parts := strings.Split(arg, " ") + if len(parts) != 4 { + t.Fatalf("test case #%d %q: invalid seek", i, tc) + } + + whence := 0 + switch parts[0] { + default: + t.Fatalf("test case #%d %q: invalid seek whence", i, tc) + case "set": + whence = os.SEEK_SET + case "cur": + whence = os.SEEK_CUR + case "end": + whence = os.SEEK_END + } + offset, err := strconv.Atoi(parts[1]) + if err != nil { + t.Fatalf("test case #%d %q: invalid offset %q", i, tc, parts[1]) + } + + if parts[2] != "want" { + t.Fatalf("test case #%d %q: invalid seek", i, tc) + } + if parts[3] == "err" { + _, err := f.Seek(int64(offset), whence) + if err == nil { + t.Fatalf("test case #%d %q: Seek returned nil error, want non-nil", i, tc) + } + } else { + got, err := f.Seek(int64(offset), whence) + if err != nil { + t.Fatalf("test case #%d %q: Seek: %v", i, tc, err) + } + want, err := strconv.Atoi(parts[3]) + if err != nil { + t.Fatalf("test case #%d %q: invalid want %q", i, tc, parts[3]) + } + if got != int64(want) { + t.Fatalf("test case #%d %q: got %d, want %d", i, tc, got, want) + } + } + + case "write": + n, err := f.Write([]byte(arg)) + if err != nil { + t.Fatalf("test case #%d %q: write: %v", i, tc, err) + } + if n != len(arg) { + t.Fatalf("test case #%d %q: write returned %d bytes, want %d", i, tc, n, len(arg)) + } + + case "wantData": + g, err := fs.OpenFile(filename, os.O_RDONLY, 0666) + if err != nil { + t.Fatalf("test case #%d %q: OpenFile: %v", i, tc, err) + } + gotBytes, err := ioutil.ReadAll(g) + if err != nil { + t.Fatalf("test case #%d %q: ReadAll: %v", i, tc, err) + } + for i, c := range gotBytes { + if c == '\x00' { + gotBytes[i] = '.' + } + } + got := string(gotBytes) + if got != arg { + t.Fatalf("test case #%d %q:\ngot %q\nwant %q", i, tc, got, arg) + } + if err := g.Close(); err != nil { + t.Fatalf("test case #%d %q: Close: %v", i, tc, err) + } + + case "wantSize": + n, err := strconv.Atoi(arg) + if err != nil { + t.Fatalf("test case #%d %q: invalid size %q", i, tc, arg) + } + fi, err := fs.Stat(filename) + if err != nil { + t.Fatalf("test case #%d %q: Stat: %v", i, tc, err) + } + if got, want := fi.Size(), int64(n); got != want { + t.Fatalf("test case #%d %q: got %d, want %d", i, tc, got, want) + } + } + } +} + +// TestMemFileWriteAllocs tests that writing N consecutive 1KiB chunks to a +// memFile doesn't allocate a new buffer for each of those N times. Otherwise, +// calling io.Copy(aMemFile, src) is likely to have quadratic complexity. +func TestMemFileWriteAllocs(t *testing.T) { + fs := NewMemFS() + f, err := fs.OpenFile("/xxx", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666) + if err != nil { + t.Fatalf("OpenFile: %v", err) + } + defer f.Close() + + xxx := make([]byte, 1024) + for i := range xxx { + xxx[i] = 'x' + } + + a := testing.AllocsPerRun(100, func() { + f.Write(xxx) + }) + // AllocsPerRun returns an integral value, so we compare the rounded-down + // number to zero. + if a > 0 { + t.Fatalf("%v allocs per run, want 0", a) + } +} + +func BenchmarkMemFileWrite(b *testing.B) { + fs := NewMemFS() + xxx := make([]byte, 1024) + for i := range xxx { + xxx[i] = 'x' + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + f, err := fs.OpenFile("/xxx", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666) + if err != nil { + b.Fatalf("OpenFile: %v", err) + } + for j := 0; j < 100; j++ { + f.Write(xxx) + } + if err := f.Close(); err != nil { + b.Fatalf("Close: %v", err) + } + if err := fs.RemoveAll("/xxx"); err != nil { + b.Fatalf("RemoveAll: %v", err) + } + } +} + +func TestCopyMoveProps(t *testing.T) { + fs := NewMemFS() + create := func(name string) error { + f, err := fs.OpenFile(name, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666) + if err != nil { + return err + } + _, wErr := f.Write([]byte("contents")) + cErr := f.Close() + if wErr != nil { + return wErr + } + return cErr + } + patch := func(name string, patches ...Proppatch) error { + f, err := fs.OpenFile(name, os.O_RDWR, 0666) + if err != nil { + return err + } + _, pErr := f.(DeadPropsHolder).Patch(patches) + cErr := f.Close() + if pErr != nil { + return pErr + } + return cErr + } + props := func(name string) (map[xml.Name]Property, error) { + f, err := fs.OpenFile(name, os.O_RDWR, 0666) + if err != nil { + return nil, err + } + m, pErr := f.(DeadPropsHolder).DeadProps() + cErr := f.Close() + if pErr != nil { + return nil, pErr + } + if cErr != nil { + return nil, cErr + } + return m, nil + } + + p0 := Property{ + XMLName: xml.Name{Space: "x:", Local: "boat"}, + InnerXML: []byte("pea-green"), + } + p1 := Property{ + XMLName: xml.Name{Space: "x:", Local: "ring"}, + InnerXML: []byte("1 shilling"), + } + p2 := Property{ + XMLName: xml.Name{Space: "x:", Local: "spoon"}, + InnerXML: []byte("runcible"), + } + p3 := Property{ + XMLName: xml.Name{Space: "x:", Local: "moon"}, + InnerXML: []byte("light"), + } + + if err := create("/src"); err != nil { + t.Fatalf("create /src: %v", err) + } + if err := patch("/src", Proppatch{Props: []Property{p0, p1}}); err != nil { + t.Fatalf("patch /src +p0 +p1: %v", err) + } + if _, err := copyFiles(fs, "/src", "/tmp", true, infiniteDepth, 0); err != nil { + t.Fatalf("copyFiles /src /tmp: %v", err) + } + if _, err := moveFiles(fs, "/tmp", "/dst", true); err != nil { + t.Fatalf("moveFiles /tmp /dst: %v", err) + } + if err := patch("/src", Proppatch{Props: []Property{p0}, Remove: true}); err != nil { + t.Fatalf("patch /src -p0: %v", err) + } + if err := patch("/src", Proppatch{Props: []Property{p2}}); err != nil { + t.Fatalf("patch /src +p2: %v", err) + } + if err := patch("/dst", Proppatch{Props: []Property{p1}, Remove: true}); err != nil { + t.Fatalf("patch /dst -p1: %v", err) + } + if err := patch("/dst", Proppatch{Props: []Property{p3}}); err != nil { + t.Fatalf("patch /dst +p3: %v", err) + } + + gotSrc, err := props("/src") + if err != nil { + t.Fatalf("props /src: %v", err) + } + wantSrc := map[xml.Name]Property{ + p1.XMLName: p1, + p2.XMLName: p2, + } + if !reflect.DeepEqual(gotSrc, wantSrc) { + t.Fatalf("props /src:\ngot %v\nwant %v", gotSrc, wantSrc) + } + + gotDst, err := props("/dst") + if err != nil { + t.Fatalf("props /dst: %v", err) + } + wantDst := map[xml.Name]Property{ + p0.XMLName: p0, + p3.XMLName: p3, + } + if !reflect.DeepEqual(gotDst, wantDst) { + t.Fatalf("props /dst:\ngot %v\nwant %v", gotDst, wantDst) + } +} + +func TestWalkFS(t *testing.T) { + testCases := []struct { + desc string + buildfs []string + startAt string + depth int + walkFn filepath.WalkFunc + want []string + }{{ + "just root", + []string{}, + "/", + infiniteDepth, + nil, + []string{ + "/", + }, + }, { + "infinite walk from root", + []string{ + "mkdir /a", + "mkdir /a/b", + "touch /a/b/c", + "mkdir /a/d", + "mkdir /e", + "touch /f", + }, + "/", + infiniteDepth, + nil, + []string{ + "/", + "/a", + "/a/b", + "/a/b/c", + "/a/d", + "/e", + "/f", + }, + }, { + "infinite walk from subdir", + []string{ + "mkdir /a", + "mkdir /a/b", + "touch /a/b/c", + "mkdir /a/d", + "mkdir /e", + "touch /f", + }, + "/a", + infiniteDepth, + nil, + []string{ + "/a", + "/a/b", + "/a/b/c", + "/a/d", + }, + }, { + "depth 1 walk from root", + []string{ + "mkdir /a", + "mkdir /a/b", + "touch /a/b/c", + "mkdir /a/d", + "mkdir /e", + "touch /f", + }, + "/", + 1, + nil, + []string{ + "/", + "/a", + "/e", + "/f", + }, + }, { + "depth 1 walk from subdir", + []string{ + "mkdir /a", + "mkdir /a/b", + "touch /a/b/c", + "mkdir /a/b/g", + "mkdir /a/b/g/h", + "touch /a/b/g/i", + "touch /a/b/g/h/j", + }, + "/a/b", + 1, + nil, + []string{ + "/a/b", + "/a/b/c", + "/a/b/g", + }, + }, { + "depth 0 walk from subdir", + []string{ + "mkdir /a", + "mkdir /a/b", + "touch /a/b/c", + "mkdir /a/b/g", + "mkdir /a/b/g/h", + "touch /a/b/g/i", + "touch /a/b/g/h/j", + }, + "/a/b", + 0, + nil, + []string{ + "/a/b", + }, + }, { + "infinite walk from file", + []string{ + "mkdir /a", + "touch /a/b", + "touch /a/c", + }, + "/a/b", + 0, + nil, + []string{ + "/a/b", + }, + }, { + "infinite walk with skipped subdir", + []string{ + "mkdir /a", + "mkdir /a/b", + "touch /a/b/c", + "mkdir /a/b/g", + "mkdir /a/b/g/h", + "touch /a/b/g/i", + "touch /a/b/g/h/j", + "touch /a/b/z", + }, + "/", + infiniteDepth, + func(path string, info os.FileInfo, err error) error { + if path == "/a/b/g" { + return filepath.SkipDir + } + return nil + }, + []string{ + "/", + "/a", + "/a/b", + "/a/b/c", + "/a/b/z", + }, + }} + for _, tc := range testCases { + fs, err := buildTestFS(tc.buildfs) + if err != nil { + t.Fatalf("%s: cannot create test filesystem: %v", tc.desc, err) + } + var got []string + traceFn := func(path string, info os.FileInfo, err error) error { + if tc.walkFn != nil { + err = tc.walkFn(path, info, err) + if err != nil { + return err + } + } + got = append(got, path) + return nil + } + fi, err := fs.Stat(tc.startAt) + if err != nil { + t.Fatalf("%s: cannot stat: %v", tc.desc, err) + } + err = walkFS(fs, tc.depth, tc.startAt, fi, traceFn) + if err != nil { + t.Errorf("%s:\ngot error %v, want nil", tc.desc, err) + continue + } + sort.Strings(got) + sort.Strings(tc.want) + if !reflect.DeepEqual(got, tc.want) { + t.Errorf("%s:\ngot %q\nwant %q", tc.desc, got, tc.want) + continue + } + } +} + +func buildTestFS(buildfs []string) (FileSystem, error) { + // TODO: Could this be merged with the build logic in TestFS? + + fs := NewMemFS() + for _, b := range buildfs { + op := strings.Split(b, " ") + switch op[0] { + case "mkdir": + err := fs.Mkdir(op[1], os.ModeDir|0777) + if err != nil { + return nil, err + } + case "touch": + f, err := fs.OpenFile(op[1], os.O_RDWR|os.O_CREATE, 0666) + if err != nil { + return nil, err + } + f.Close() + case "write": + f, err := fs.OpenFile(op[1], os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666) + if err != nil { + return nil, err + } + _, err = f.Write([]byte(op[2])) + f.Close() + if err != nil { + return nil, err + } + default: + return nil, fmt.Errorf("unknown file operation %q", op[0]) + } + } + return fs, nil +} diff --git a/vendor/golang.org/x/net/webdav/if.go b/vendor/golang.org/x/net/webdav/if.go new file mode 100644 index 0000000..416e81c --- /dev/null +++ b/vendor/golang.org/x/net/webdav/if.go @@ -0,0 +1,173 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package webdav + +// The If header is covered by Section 10.4. +// http://www.webdav.org/specs/rfc4918.html#HEADER_If + +import ( + "strings" +) + +// ifHeader is a disjunction (OR) of ifLists. +type ifHeader struct { + lists []ifList +} + +// ifList is a conjunction (AND) of Conditions, and an optional resource tag. +type ifList struct { + resourceTag string + conditions []Condition +} + +// parseIfHeader parses the "If: foo bar" HTTP header. The httpHeader string +// should omit the "If:" prefix and have any "\r\n"s collapsed to a " ", as is +// returned by req.Header.Get("If") for a http.Request req. +func parseIfHeader(httpHeader string) (h ifHeader, ok bool) { + s := strings.TrimSpace(httpHeader) + switch tokenType, _, _ := lex(s); tokenType { + case '(': + return parseNoTagLists(s) + case angleTokenType: + return parseTaggedLists(s) + default: + return ifHeader{}, false + } +} + +func parseNoTagLists(s string) (h ifHeader, ok bool) { + for { + l, remaining, ok := parseList(s) + if !ok { + return ifHeader{}, false + } + h.lists = append(h.lists, l) + if remaining == "" { + return h, true + } + s = remaining + } +} + +func parseTaggedLists(s string) (h ifHeader, ok bool) { + resourceTag, n := "", 0 + for first := true; ; first = false { + tokenType, tokenStr, remaining := lex(s) + switch tokenType { + case angleTokenType: + if !first && n == 0 { + return ifHeader{}, false + } + resourceTag, n = tokenStr, 0 + s = remaining + case '(': + n++ + l, remaining, ok := parseList(s) + if !ok { + return ifHeader{}, false + } + l.resourceTag = resourceTag + h.lists = append(h.lists, l) + if remaining == "" { + return h, true + } + s = remaining + default: + return ifHeader{}, false + } + } +} + +func parseList(s string) (l ifList, remaining string, ok bool) { + tokenType, _, s := lex(s) + if tokenType != '(' { + return ifList{}, "", false + } + for { + tokenType, _, remaining = lex(s) + if tokenType == ')' { + if len(l.conditions) == 0 { + return ifList{}, "", false + } + return l, remaining, true + } + c, remaining, ok := parseCondition(s) + if !ok { + return ifList{}, "", false + } + l.conditions = append(l.conditions, c) + s = remaining + } +} + +func parseCondition(s string) (c Condition, remaining string, ok bool) { + tokenType, tokenStr, s := lex(s) + if tokenType == notTokenType { + c.Not = true + tokenType, tokenStr, s = lex(s) + } + switch tokenType { + case strTokenType, angleTokenType: + c.Token = tokenStr + case squareTokenType: + c.ETag = tokenStr + default: + return Condition{}, "", false + } + return c, s, true +} + +// Single-rune tokens like '(' or ')' have a token type equal to their rune. +// All other tokens have a negative token type. +const ( + errTokenType = rune(-1) + eofTokenType = rune(-2) + strTokenType = rune(-3) + notTokenType = rune(-4) + angleTokenType = rune(-5) + squareTokenType = rune(-6) +) + +func lex(s string) (tokenType rune, tokenStr string, remaining string) { + // The net/textproto Reader that parses the HTTP header will collapse + // Linear White Space that spans multiple "\r\n" lines to a single " ", + // so we don't need to look for '\r' or '\n'. + for len(s) > 0 && (s[0] == '\t' || s[0] == ' ') { + s = s[1:] + } + if len(s) == 0 { + return eofTokenType, "", "" + } + i := 0 +loop: + for ; i < len(s); i++ { + switch s[i] { + case '\t', ' ', '(', ')', '<', '>', '[', ']': + break loop + } + } + + if i != 0 { + tokenStr, remaining = s[:i], s[i:] + if tokenStr == "Not" { + return notTokenType, "", remaining + } + return strTokenType, tokenStr, remaining + } + + j := 0 + switch s[0] { + case '<': + j, tokenType = strings.IndexByte(s, '>'), angleTokenType + case '[': + j, tokenType = strings.IndexByte(s, ']'), squareTokenType + default: + return rune(s[0]), "", s[1:] + } + if j < 0 { + return errTokenType, "", "" + } + return tokenType, s[1:j], s[j+1:] +} diff --git a/vendor/golang.org/x/net/webdav/if_test.go b/vendor/golang.org/x/net/webdav/if_test.go new file mode 100644 index 0000000..aad61a4 --- /dev/null +++ b/vendor/golang.org/x/net/webdav/if_test.go @@ -0,0 +1,322 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package webdav + +import ( + "reflect" + "strings" + "testing" +) + +func TestParseIfHeader(t *testing.T) { + // The "section x.y.z" test cases come from section x.y.z of the spec at + // http://www.webdav.org/specs/rfc4918.html + testCases := []struct { + desc string + input string + want ifHeader + }{{ + "bad: empty", + ``, + ifHeader{}, + }, { + "bad: no parens", + `foobar`, + ifHeader{}, + }, { + "bad: empty list #1", + `()`, + ifHeader{}, + }, { + "bad: empty list #2", + `(a) (b c) () (d)`, + ifHeader{}, + }, { + "bad: no list after resource #1", + ``, + ifHeader{}, + }, { + "bad: no list after resource #2", + ` (a)`, + ifHeader{}, + }, { + "bad: no list after resource #3", + ` (a) (b) `, + ifHeader{}, + }, { + "bad: no-tag-list followed by tagged-list", + `(a) (b) (c)`, + ifHeader{}, + }, { + "bad: unfinished list", + `(a`, + ifHeader{}, + }, { + "bad: unfinished ETag", + `([b`, + ifHeader{}, + }, { + "bad: unfinished Notted list", + `(Not a`, + ifHeader{}, + }, { + "bad: double Not", + `(Not Not a)`, + ifHeader{}, + }, { + "good: one list with a Token", + `(a)`, + ifHeader{ + lists: []ifList{{ + conditions: []Condition{{ + Token: `a`, + }}, + }}, + }, + }, { + "good: one list with an ETag", + `([a])`, + ifHeader{ + lists: []ifList{{ + conditions: []Condition{{ + ETag: `a`, + }}, + }}, + }, + }, { + "good: one list with three Nots", + `(Not a Not b Not [d])`, + ifHeader{ + lists: []ifList{{ + conditions: []Condition{{ + Not: true, + Token: `a`, + }, { + Not: true, + Token: `b`, + }, { + Not: true, + ETag: `d`, + }}, + }}, + }, + }, { + "good: two lists", + `(a) (b)`, + ifHeader{ + lists: []ifList{{ + conditions: []Condition{{ + Token: `a`, + }}, + }, { + conditions: []Condition{{ + Token: `b`, + }}, + }}, + }, + }, { + "good: two Notted lists", + `(Not a) (Not b)`, + ifHeader{ + lists: []ifList{{ + conditions: []Condition{{ + Not: true, + Token: `a`, + }}, + }, { + conditions: []Condition{{ + Not: true, + Token: `b`, + }}, + }}, + }, + }, { + "section 7.5.1", + ` + ()`, + ifHeader{ + lists: []ifList{{ + resourceTag: `http://www.example.com/users/f/fielding/index.html`, + conditions: []Condition{{ + Token: `urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6`, + }}, + }}, + }, + }, { + "section 7.5.2 #1", + `()`, + ifHeader{ + lists: []ifList{{ + conditions: []Condition{{ + Token: `urn:uuid:150852e2-3847-42d5-8cbe-0f4f296f26cf`, + }}, + }}, + }, + }, { + "section 7.5.2 #2", + ` + ()`, + ifHeader{ + lists: []ifList{{ + resourceTag: `http://example.com/locked/`, + conditions: []Condition{{ + Token: `urn:uuid:150852e2-3847-42d5-8cbe-0f4f296f26cf`, + }}, + }}, + }, + }, { + "section 7.5.2 #3", + ` + ()`, + ifHeader{ + lists: []ifList{{ + resourceTag: `http://example.com/locked/member`, + conditions: []Condition{{ + Token: `urn:uuid:150852e2-3847-42d5-8cbe-0f4f296f26cf`, + }}, + }}, + }, + }, { + "section 9.9.6", + `() + ()`, + ifHeader{ + lists: []ifList{{ + conditions: []Condition{{ + Token: `urn:uuid:fe184f2e-6eec-41d0-c765-01adc56e6bb4`, + }}, + }, { + conditions: []Condition{{ + Token: `urn:uuid:e454f3f3-acdc-452a-56c7-00a5c91e4b77`, + }}, + }}, + }, + }, { + "section 9.10.8", + `()`, + ifHeader{ + lists: []ifList{{ + conditions: []Condition{{ + Token: `urn:uuid:e71d4fae-5dec-22d6-fea5-00a0c91e6be4`, + }}, + }}, + }, + }, { + "section 10.4.6", + `( + ["I am an ETag"]) + (["I am another ETag"])`, + ifHeader{ + lists: []ifList{{ + conditions: []Condition{{ + Token: `urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2`, + }, { + ETag: `"I am an ETag"`, + }}, + }, { + conditions: []Condition{{ + ETag: `"I am another ETag"`, + }}, + }}, + }, + }, { + "section 10.4.7", + `(Not + )`, + ifHeader{ + lists: []ifList{{ + conditions: []Condition{{ + Not: true, + Token: `urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2`, + }, { + Token: `urn:uuid:58f202ac-22cf-11d1-b12d-002035b29092`, + }}, + }}, + }, + }, { + "section 10.4.8", + `() + (Not )`, + ifHeader{ + lists: []ifList{{ + conditions: []Condition{{ + Token: `urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2`, + }}, + }, { + conditions: []Condition{{ + Not: true, + Token: `DAV:no-lock`, + }}, + }}, + }, + }, { + "section 10.4.9", + ` + ( + [W/"A weak ETag"]) (["strong ETag"])`, + ifHeader{ + lists: []ifList{{ + resourceTag: `/resource1`, + conditions: []Condition{{ + Token: `urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2`, + }, { + ETag: `W/"A weak ETag"`, + }}, + }, { + resourceTag: `/resource1`, + conditions: []Condition{{ + ETag: `"strong ETag"`, + }}, + }}, + }, + }, { + "section 10.4.10", + ` + ()`, + ifHeader{ + lists: []ifList{{ + resourceTag: `http://www.example.com/specs/`, + conditions: []Condition{{ + Token: `urn:uuid:181d4fae-7d8c-11d0-a765-00a0c91e6bf2`, + }}, + }}, + }, + }, { + "section 10.4.11 #1", + ` (["4217"])`, + ifHeader{ + lists: []ifList{{ + resourceTag: `/specs/rfc2518.doc`, + conditions: []Condition{{ + ETag: `"4217"`, + }}, + }}, + }, + }, { + "section 10.4.11 #2", + ` (Not ["4217"])`, + ifHeader{ + lists: []ifList{{ + resourceTag: `/specs/rfc2518.doc`, + conditions: []Condition{{ + Not: true, + ETag: `"4217"`, + }}, + }}, + }, + }} + + for _, tc := range testCases { + got, ok := parseIfHeader(strings.Replace(tc.input, "\n", "", -1)) + if gotEmpty := reflect.DeepEqual(got, ifHeader{}); gotEmpty == ok { + t.Errorf("%s: should be different: empty header == %t, ok == %t", tc.desc, gotEmpty, ok) + continue + } + if !reflect.DeepEqual(got, tc.want) { + t.Errorf("%s:\ngot %v\nwant %v", tc.desc, got, tc.want) + continue + } + } +} diff --git a/vendor/golang.org/x/net/webdav/internal/xml/README b/vendor/golang.org/x/net/webdav/internal/xml/README new file mode 100644 index 0000000..89656f4 --- /dev/null +++ b/vendor/golang.org/x/net/webdav/internal/xml/README @@ -0,0 +1,11 @@ +This is a fork of the encoding/xml package at ca1d6c4, the last commit before +https://go.googlesource.com/go/+/c0d6d33 "encoding/xml: restore Go 1.4 name +space behavior" made late in the lead-up to the Go 1.5 release. + +The list of encoding/xml changes is at +https://go.googlesource.com/go/+log/master/src/encoding/xml + +This fork is temporary, and I (nigeltao) expect to revert it after Go 1.6 is +released. + +See http://golang.org/issue/11841 diff --git a/vendor/golang.org/x/net/webdav/internal/xml/atom_test.go b/vendor/golang.org/x/net/webdav/internal/xml/atom_test.go new file mode 100644 index 0000000..a712843 --- /dev/null +++ b/vendor/golang.org/x/net/webdav/internal/xml/atom_test.go @@ -0,0 +1,56 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package xml + +import "time" + +var atomValue = &Feed{ + XMLName: Name{"http://www.w3.org/2005/Atom", "feed"}, + Title: "Example Feed", + Link: []Link{{Href: "http://example.org/"}}, + Updated: ParseTime("2003-12-13T18:30:02Z"), + Author: Person{Name: "John Doe"}, + Id: "urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6", + + Entry: []Entry{ + { + Title: "Atom-Powered Robots Run Amok", + Link: []Link{{Href: "http://example.org/2003/12/13/atom03"}}, + Id: "urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a", + Updated: ParseTime("2003-12-13T18:30:02Z"), + Summary: NewText("Some text."), + }, + }, +} + +var atomXml = `` + + `` + + `Example Feed` + + `urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6` + + `` + + `John Doe` + + `` + + `Atom-Powered Robots Run Amok` + + `urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a` + + `` + + `2003-12-13T18:30:02Z` + + `` + + `Some text.` + + `` + + `` + +func ParseTime(str string) time.Time { + t, err := time.Parse(time.RFC3339, str) + if err != nil { + panic(err) + } + return t +} + +func NewText(text string) Text { + return Text{ + Body: text, + } +} diff --git a/vendor/golang.org/x/net/webdav/internal/xml/example_test.go b/vendor/golang.org/x/net/webdav/internal/xml/example_test.go new file mode 100644 index 0000000..becedd5 --- /dev/null +++ b/vendor/golang.org/x/net/webdav/internal/xml/example_test.go @@ -0,0 +1,151 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package xml_test + +import ( + "encoding/xml" + "fmt" + "os" +) + +func ExampleMarshalIndent() { + type Address struct { + City, State string + } + type Person struct { + XMLName xml.Name `xml:"person"` + Id int `xml:"id,attr"` + FirstName string `xml:"name>first"` + LastName string `xml:"name>last"` + Age int `xml:"age"` + Height float32 `xml:"height,omitempty"` + Married bool + Address + Comment string `xml:",comment"` + } + + v := &Person{Id: 13, FirstName: "John", LastName: "Doe", Age: 42} + v.Comment = " Need more details. " + v.Address = Address{"Hanga Roa", "Easter Island"} + + output, err := xml.MarshalIndent(v, " ", " ") + if err != nil { + fmt.Printf("error: %v\n", err) + } + + os.Stdout.Write(output) + // Output: + // + // + // John + // Doe + // + // 42 + // false + // Hanga Roa + // Easter Island + // + // +} + +func ExampleEncoder() { + type Address struct { + City, State string + } + type Person struct { + XMLName xml.Name `xml:"person"` + Id int `xml:"id,attr"` + FirstName string `xml:"name>first"` + LastName string `xml:"name>last"` + Age int `xml:"age"` + Height float32 `xml:"height,omitempty"` + Married bool + Address + Comment string `xml:",comment"` + } + + v := &Person{Id: 13, FirstName: "John", LastName: "Doe", Age: 42} + v.Comment = " Need more details. " + v.Address = Address{"Hanga Roa", "Easter Island"} + + enc := xml.NewEncoder(os.Stdout) + enc.Indent(" ", " ") + if err := enc.Encode(v); err != nil { + fmt.Printf("error: %v\n", err) + } + + // Output: + // + // + // John + // Doe + // + // 42 + // false + // Hanga Roa + // Easter Island + // + // +} + +// This example demonstrates unmarshaling an XML excerpt into a value with +// some preset fields. Note that the Phone field isn't modified and that +// the XML element is ignored. Also, the Groups field is assigned +// considering the element path provided in its tag. +func ExampleUnmarshal() { + type Email struct { + Where string `xml:"where,attr"` + Addr string + } + type Address struct { + City, State string + } + type Result struct { + XMLName xml.Name `xml:"Person"` + Name string `xml:"FullName"` + Phone string + Email []Email + Groups []string `xml:"Group>Value"` + Address + } + v := Result{Name: "none", Phone: "none"} + + data := ` + + Grace R. Emlin + Example Inc. + + gre@example.com + + + gre@work.com + + + Friends + Squash + + Hanga Roa + Easter Island + + ` + err := xml.Unmarshal([]byte(data), &v) + if err != nil { + fmt.Printf("error: %v", err) + return + } + fmt.Printf("XMLName: %#v\n", v.XMLName) + fmt.Printf("Name: %q\n", v.Name) + fmt.Printf("Phone: %q\n", v.Phone) + fmt.Printf("Email: %v\n", v.Email) + fmt.Printf("Groups: %v\n", v.Groups) + fmt.Printf("Address: %v\n", v.Address) + // Output: + // XMLName: xml.Name{Space:"", Local:"Person"} + // Name: "Grace R. Emlin" + // Phone: "none" + // Email: [{home gre@example.com} {work gre@work.com}] + // Groups: [Friends Squash] + // Address: {Hanga Roa Easter Island} +} diff --git a/vendor/golang.org/x/net/webdav/internal/xml/marshal.go b/vendor/golang.org/x/net/webdav/internal/xml/marshal.go new file mode 100644 index 0000000..3c3b6ac --- /dev/null +++ b/vendor/golang.org/x/net/webdav/internal/xml/marshal.go @@ -0,0 +1,1223 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package xml + +import ( + "bufio" + "bytes" + "encoding" + "fmt" + "io" + "reflect" + "strconv" + "strings" +) + +const ( + // A generic XML header suitable for use with the output of Marshal. + // This is not automatically added to any output of this package, + // it is provided as a convenience. + Header = `` + "\n" +) + +// Marshal returns the XML encoding of v. +// +// Marshal handles an array or slice by marshalling each of the elements. +// Marshal handles a pointer by marshalling the value it points at or, if the +// pointer is nil, by writing nothing. Marshal handles an interface value by +// marshalling the value it contains or, if the interface value is nil, by +// writing nothing. Marshal handles all other data by writing one or more XML +// elements containing the data. +// +// The name for the XML elements is taken from, in order of preference: +// - the tag on the XMLName field, if the data is a struct +// - the value of the XMLName field of type xml.Name +// - the tag of the struct field used to obtain the data +// - the name of the struct field used to obtain the data +// - the name of the marshalled type +// +// The XML element for a struct contains marshalled elements for each of the +// exported fields of the struct, with these exceptions: +// - the XMLName field, described above, is omitted. +// - a field with tag "-" is omitted. +// - a field with tag "name,attr" becomes an attribute with +// the given name in the XML element. +// - a field with tag ",attr" becomes an attribute with the +// field name in the XML element. +// - a field with tag ",chardata" is written as character data, +// not as an XML element. +// - a field with tag ",innerxml" is written verbatim, not subject +// to the usual marshalling procedure. +// - a field with tag ",comment" is written as an XML comment, not +// subject to the usual marshalling procedure. It must not contain +// the "--" string within it. +// - a field with a tag including the "omitempty" option is omitted +// if the field value is empty. The empty values are false, 0, any +// nil pointer or interface value, and any array, slice, map, or +// string of length zero. +// - an anonymous struct field is handled as if the fields of its +// value were part of the outer struct. +// +// If a field uses a tag "a>b>c", then the element c will be nested inside +// parent elements a and b. Fields that appear next to each other that name +// the same parent will be enclosed in one XML element. +// +// See MarshalIndent for an example. +// +// Marshal will return an error if asked to marshal a channel, function, or map. +func Marshal(v interface{}) ([]byte, error) { + var b bytes.Buffer + if err := NewEncoder(&b).Encode(v); err != nil { + return nil, err + } + return b.Bytes(), nil +} + +// Marshaler is the interface implemented by objects that can marshal +// themselves into valid XML elements. +// +// MarshalXML encodes the receiver as zero or more XML elements. +// By convention, arrays or slices are typically encoded as a sequence +// of elements, one per entry. +// Using start as the element tag is not required, but doing so +// will enable Unmarshal to match the XML elements to the correct +// struct field. +// One common implementation strategy is to construct a separate +// value with a layout corresponding to the desired XML and then +// to encode it using e.EncodeElement. +// Another common strategy is to use repeated calls to e.EncodeToken +// to generate the XML output one token at a time. +// The sequence of encoded tokens must make up zero or more valid +// XML elements. +type Marshaler interface { + MarshalXML(e *Encoder, start StartElement) error +} + +// MarshalerAttr is the interface implemented by objects that can marshal +// themselves into valid XML attributes. +// +// MarshalXMLAttr returns an XML attribute with the encoded value of the receiver. +// Using name as the attribute name is not required, but doing so +// will enable Unmarshal to match the attribute to the correct +// struct field. +// If MarshalXMLAttr returns the zero attribute Attr{}, no attribute +// will be generated in the output. +// MarshalXMLAttr is used only for struct fields with the +// "attr" option in the field tag. +type MarshalerAttr interface { + MarshalXMLAttr(name Name) (Attr, error) +} + +// MarshalIndent works like Marshal, but each XML element begins on a new +// indented line that starts with prefix and is followed by one or more +// copies of indent according to the nesting depth. +func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) { + var b bytes.Buffer + enc := NewEncoder(&b) + enc.Indent(prefix, indent) + if err := enc.Encode(v); err != nil { + return nil, err + } + return b.Bytes(), nil +} + +// An Encoder writes XML data to an output stream. +type Encoder struct { + p printer +} + +// NewEncoder returns a new encoder that writes to w. +func NewEncoder(w io.Writer) *Encoder { + e := &Encoder{printer{Writer: bufio.NewWriter(w)}} + e.p.encoder = e + return e +} + +// Indent sets the encoder to generate XML in which each element +// begins on a new indented line that starts with prefix and is followed by +// one or more copies of indent according to the nesting depth. +func (enc *Encoder) Indent(prefix, indent string) { + enc.p.prefix = prefix + enc.p.indent = indent +} + +// Encode writes the XML encoding of v to the stream. +// +// See the documentation for Marshal for details about the conversion +// of Go values to XML. +// +// Encode calls Flush before returning. +func (enc *Encoder) Encode(v interface{}) error { + err := enc.p.marshalValue(reflect.ValueOf(v), nil, nil) + if err != nil { + return err + } + return enc.p.Flush() +} + +// EncodeElement writes the XML encoding of v to the stream, +// using start as the outermost tag in the encoding. +// +// See the documentation for Marshal for details about the conversion +// of Go values to XML. +// +// EncodeElement calls Flush before returning. +func (enc *Encoder) EncodeElement(v interface{}, start StartElement) error { + err := enc.p.marshalValue(reflect.ValueOf(v), nil, &start) + if err != nil { + return err + } + return enc.p.Flush() +} + +var ( + begComment = []byte("") + endProcInst = []byte("?>") + endDirective = []byte(">") +) + +// EncodeToken writes the given XML token to the stream. +// It returns an error if StartElement and EndElement tokens are not +// properly matched. +// +// EncodeToken does not call Flush, because usually it is part of a +// larger operation such as Encode or EncodeElement (or a custom +// Marshaler's MarshalXML invoked during those), and those will call +// Flush when finished. Callers that create an Encoder and then invoke +// EncodeToken directly, without using Encode or EncodeElement, need to +// call Flush when finished to ensure that the XML is written to the +// underlying writer. +// +// EncodeToken allows writing a ProcInst with Target set to "xml" only +// as the first token in the stream. +// +// When encoding a StartElement holding an XML namespace prefix +// declaration for a prefix that is not already declared, contained +// elements (including the StartElement itself) will use the declared +// prefix when encoding names with matching namespace URIs. +func (enc *Encoder) EncodeToken(t Token) error { + + p := &enc.p + switch t := t.(type) { + case StartElement: + if err := p.writeStart(&t); err != nil { + return err + } + case EndElement: + if err := p.writeEnd(t.Name); err != nil { + return err + } + case CharData: + escapeText(p, t, false) + case Comment: + if bytes.Contains(t, endComment) { + return fmt.Errorf("xml: EncodeToken of Comment containing --> marker") + } + p.WriteString("") + return p.cachedWriteError() + case ProcInst: + // First token to be encoded which is also a ProcInst with target of xml + // is the xml declaration. The only ProcInst where target of xml is allowed. + if t.Target == "xml" && p.Buffered() != 0 { + return fmt.Errorf("xml: EncodeToken of ProcInst xml target only valid for xml declaration, first token encoded") + } + if !isNameString(t.Target) { + return fmt.Errorf("xml: EncodeToken of ProcInst with invalid Target") + } + if bytes.Contains(t.Inst, endProcInst) { + return fmt.Errorf("xml: EncodeToken of ProcInst containing ?> marker") + } + p.WriteString(" 0 { + p.WriteByte(' ') + p.Write(t.Inst) + } + p.WriteString("?>") + case Directive: + if !isValidDirective(t) { + return fmt.Errorf("xml: EncodeToken of Directive containing wrong < or > markers") + } + p.WriteString("") + default: + return fmt.Errorf("xml: EncodeToken of invalid token type") + + } + return p.cachedWriteError() +} + +// isValidDirective reports whether dir is a valid directive text, +// meaning angle brackets are matched, ignoring comments and strings. +func isValidDirective(dir Directive) bool { + var ( + depth int + inquote uint8 + incomment bool + ) + for i, c := range dir { + switch { + case incomment: + if c == '>' { + if n := 1 + i - len(endComment); n >= 0 && bytes.Equal(dir[n:i+1], endComment) { + incomment = false + } + } + // Just ignore anything in comment + case inquote != 0: + if c == inquote { + inquote = 0 + } + // Just ignore anything within quotes + case c == '\'' || c == '"': + inquote = c + case c == '<': + if i+len(begComment) < len(dir) && bytes.Equal(dir[i:i+len(begComment)], begComment) { + incomment = true + } else { + depth++ + } + case c == '>': + if depth == 0 { + return false + } + depth-- + } + } + return depth == 0 && inquote == 0 && !incomment +} + +// Flush flushes any buffered XML to the underlying writer. +// See the EncodeToken documentation for details about when it is necessary. +func (enc *Encoder) Flush() error { + return enc.p.Flush() +} + +type printer struct { + *bufio.Writer + encoder *Encoder + seq int + indent string + prefix string + depth int + indentedIn bool + putNewline bool + defaultNS string + attrNS map[string]string // map prefix -> name space + attrPrefix map[string]string // map name space -> prefix + prefixes []printerPrefix + tags []Name +} + +// printerPrefix holds a namespace undo record. +// When an element is popped, the prefix record +// is set back to the recorded URL. The empty +// prefix records the URL for the default name space. +// +// The start of an element is recorded with an element +// that has mark=true. +type printerPrefix struct { + prefix string + url string + mark bool +} + +func (p *printer) prefixForNS(url string, isAttr bool) string { + // The "http://www.w3.org/XML/1998/namespace" name space is predefined as "xml" + // and must be referred to that way. + // (The "http://www.w3.org/2000/xmlns/" name space is also predefined as "xmlns", + // but users should not be trying to use that one directly - that's our job.) + if url == xmlURL { + return "xml" + } + if !isAttr && url == p.defaultNS { + // We can use the default name space. + return "" + } + return p.attrPrefix[url] +} + +// defineNS pushes any namespace definition found in the given attribute. +// If ignoreNonEmptyDefault is true, an xmlns="nonempty" +// attribute will be ignored. +func (p *printer) defineNS(attr Attr, ignoreNonEmptyDefault bool) error { + var prefix string + if attr.Name.Local == "xmlns" { + if attr.Name.Space != "" && attr.Name.Space != "xml" && attr.Name.Space != xmlURL { + return fmt.Errorf("xml: cannot redefine xmlns attribute prefix") + } + } else if attr.Name.Space == "xmlns" && attr.Name.Local != "" { + prefix = attr.Name.Local + if attr.Value == "" { + // Technically, an empty XML namespace is allowed for an attribute. + // From http://www.w3.org/TR/xml-names11/#scoping-defaulting: + // + // The attribute value in a namespace declaration for a prefix may be + // empty. This has the effect, within the scope of the declaration, of removing + // any association of the prefix with a namespace name. + // + // However our namespace prefixes here are used only as hints. There's + // no need to respect the removal of a namespace prefix, so we ignore it. + return nil + } + } else { + // Ignore: it's not a namespace definition + return nil + } + if prefix == "" { + if attr.Value == p.defaultNS { + // No need for redefinition. + return nil + } + if attr.Value != "" && ignoreNonEmptyDefault { + // We have an xmlns="..." value but + // it can't define a name space in this context, + // probably because the element has an empty + // name space. In this case, we just ignore + // the name space declaration. + return nil + } + } else if _, ok := p.attrPrefix[attr.Value]; ok { + // There's already a prefix for the given name space, + // so use that. This prevents us from + // having two prefixes for the same name space + // so attrNS and attrPrefix can remain bijective. + return nil + } + p.pushPrefix(prefix, attr.Value) + return nil +} + +// createNSPrefix creates a name space prefix attribute +// to use for the given name space, defining a new prefix +// if necessary. +// If isAttr is true, the prefix is to be created for an attribute +// prefix, which means that the default name space cannot +// be used. +func (p *printer) createNSPrefix(url string, isAttr bool) { + if _, ok := p.attrPrefix[url]; ok { + // We already have a prefix for the given URL. + return + } + switch { + case !isAttr && url == p.defaultNS: + // We can use the default name space. + return + case url == "": + // The only way we can encode names in the empty + // name space is by using the default name space, + // so we must use that. + if p.defaultNS != "" { + // The default namespace is non-empty, so we + // need to set it to empty. + p.pushPrefix("", "") + } + return + case url == xmlURL: + return + } + // TODO If the URL is an existing prefix, we could + // use it as is. That would enable the + // marshaling of elements that had been unmarshaled + // and with a name space prefix that was not found. + // although technically it would be incorrect. + + // Pick a name. We try to use the final element of the path + // but fall back to _. + prefix := strings.TrimRight(url, "/") + if i := strings.LastIndex(prefix, "/"); i >= 0 { + prefix = prefix[i+1:] + } + if prefix == "" || !isName([]byte(prefix)) || strings.Contains(prefix, ":") { + prefix = "_" + } + if strings.HasPrefix(prefix, "xml") { + // xmlanything is reserved. + prefix = "_" + prefix + } + if p.attrNS[prefix] != "" { + // Name is taken. Find a better one. + for p.seq++; ; p.seq++ { + if id := prefix + "_" + strconv.Itoa(p.seq); p.attrNS[id] == "" { + prefix = id + break + } + } + } + + p.pushPrefix(prefix, url) +} + +// writeNamespaces writes xmlns attributes for all the +// namespace prefixes that have been defined in +// the current element. +func (p *printer) writeNamespaces() { + for i := len(p.prefixes) - 1; i >= 0; i-- { + prefix := p.prefixes[i] + if prefix.mark { + return + } + p.WriteString(" ") + if prefix.prefix == "" { + // Default name space. + p.WriteString(`xmlns="`) + } else { + p.WriteString("xmlns:") + p.WriteString(prefix.prefix) + p.WriteString(`="`) + } + EscapeText(p, []byte(p.nsForPrefix(prefix.prefix))) + p.WriteString(`"`) + } +} + +// pushPrefix pushes a new prefix on the prefix stack +// without checking to see if it is already defined. +func (p *printer) pushPrefix(prefix, url string) { + p.prefixes = append(p.prefixes, printerPrefix{ + prefix: prefix, + url: p.nsForPrefix(prefix), + }) + p.setAttrPrefix(prefix, url) +} + +// nsForPrefix returns the name space for the given +// prefix. Note that this is not valid for the +// empty attribute prefix, which always has an empty +// name space. +func (p *printer) nsForPrefix(prefix string) string { + if prefix == "" { + return p.defaultNS + } + return p.attrNS[prefix] +} + +// markPrefix marks the start of an element on the prefix +// stack. +func (p *printer) markPrefix() { + p.prefixes = append(p.prefixes, printerPrefix{ + mark: true, + }) +} + +// popPrefix pops all defined prefixes for the current +// element. +func (p *printer) popPrefix() { + for len(p.prefixes) > 0 { + prefix := p.prefixes[len(p.prefixes)-1] + p.prefixes = p.prefixes[:len(p.prefixes)-1] + if prefix.mark { + break + } + p.setAttrPrefix(prefix.prefix, prefix.url) + } +} + +// setAttrPrefix sets an attribute name space prefix. +// If url is empty, the attribute is removed. +// If prefix is empty, the default name space is set. +func (p *printer) setAttrPrefix(prefix, url string) { + if prefix == "" { + p.defaultNS = url + return + } + if url == "" { + delete(p.attrPrefix, p.attrNS[prefix]) + delete(p.attrNS, prefix) + return + } + if p.attrPrefix == nil { + // Need to define a new name space. + p.attrPrefix = make(map[string]string) + p.attrNS = make(map[string]string) + } + // Remove any old prefix value. This is OK because we maintain a + // strict one-to-one mapping between prefix and URL (see + // defineNS) + delete(p.attrPrefix, p.attrNS[prefix]) + p.attrPrefix[url] = prefix + p.attrNS[prefix] = url +} + +var ( + marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem() + marshalerAttrType = reflect.TypeOf((*MarshalerAttr)(nil)).Elem() + textMarshalerType = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem() +) + +// marshalValue writes one or more XML elements representing val. +// If val was obtained from a struct field, finfo must have its details. +func (p *printer) marshalValue(val reflect.Value, finfo *fieldInfo, startTemplate *StartElement) error { + if startTemplate != nil && startTemplate.Name.Local == "" { + return fmt.Errorf("xml: EncodeElement of StartElement with missing name") + } + + if !val.IsValid() { + return nil + } + if finfo != nil && finfo.flags&fOmitEmpty != 0 && isEmptyValue(val) { + return nil + } + + // Drill into interfaces and pointers. + // This can turn into an infinite loop given a cyclic chain, + // but it matches the Go 1 behavior. + for val.Kind() == reflect.Interface || val.Kind() == reflect.Ptr { + if val.IsNil() { + return nil + } + val = val.Elem() + } + + kind := val.Kind() + typ := val.Type() + + // Check for marshaler. + if val.CanInterface() && typ.Implements(marshalerType) { + return p.marshalInterface(val.Interface().(Marshaler), p.defaultStart(typ, finfo, startTemplate)) + } + if val.CanAddr() { + pv := val.Addr() + if pv.CanInterface() && pv.Type().Implements(marshalerType) { + return p.marshalInterface(pv.Interface().(Marshaler), p.defaultStart(pv.Type(), finfo, startTemplate)) + } + } + + // Check for text marshaler. + if val.CanInterface() && typ.Implements(textMarshalerType) { + return p.marshalTextInterface(val.Interface().(encoding.TextMarshaler), p.defaultStart(typ, finfo, startTemplate)) + } + if val.CanAddr() { + pv := val.Addr() + if pv.CanInterface() && pv.Type().Implements(textMarshalerType) { + return p.marshalTextInterface(pv.Interface().(encoding.TextMarshaler), p.defaultStart(pv.Type(), finfo, startTemplate)) + } + } + + // Slices and arrays iterate over the elements. They do not have an enclosing tag. + if (kind == reflect.Slice || kind == reflect.Array) && typ.Elem().Kind() != reflect.Uint8 { + for i, n := 0, val.Len(); i < n; i++ { + if err := p.marshalValue(val.Index(i), finfo, startTemplate); err != nil { + return err + } + } + return nil + } + + tinfo, err := getTypeInfo(typ) + if err != nil { + return err + } + + // Create start element. + // Precedence for the XML element name is: + // 0. startTemplate + // 1. XMLName field in underlying struct; + // 2. field name/tag in the struct field; and + // 3. type name + var start StartElement + + // explicitNS records whether the element's name space has been + // explicitly set (for example an XMLName field). + explicitNS := false + + if startTemplate != nil { + start.Name = startTemplate.Name + explicitNS = true + start.Attr = append(start.Attr, startTemplate.Attr...) + } else if tinfo.xmlname != nil { + xmlname := tinfo.xmlname + if xmlname.name != "" { + start.Name.Space, start.Name.Local = xmlname.xmlns, xmlname.name + } else if v, ok := xmlname.value(val).Interface().(Name); ok && v.Local != "" { + start.Name = v + } + explicitNS = true + } + if start.Name.Local == "" && finfo != nil { + start.Name.Local = finfo.name + if finfo.xmlns != "" { + start.Name.Space = finfo.xmlns + explicitNS = true + } + } + if start.Name.Local == "" { + name := typ.Name() + if name == "" { + return &UnsupportedTypeError{typ} + } + start.Name.Local = name + } + + // defaultNS records the default name space as set by a xmlns="..." + // attribute. We don't set p.defaultNS because we want to let + // the attribute writing code (in p.defineNS) be solely responsible + // for maintaining that. + defaultNS := p.defaultNS + + // Attributes + for i := range tinfo.fields { + finfo := &tinfo.fields[i] + if finfo.flags&fAttr == 0 { + continue + } + attr, err := p.fieldAttr(finfo, val) + if err != nil { + return err + } + if attr.Name.Local == "" { + continue + } + start.Attr = append(start.Attr, attr) + if attr.Name.Space == "" && attr.Name.Local == "xmlns" { + defaultNS = attr.Value + } + } + if !explicitNS { + // Historic behavior: elements use the default name space + // they are contained in by default. + start.Name.Space = defaultNS + } + // Historic behaviour: an element that's in a namespace sets + // the default namespace for all elements contained within it. + start.setDefaultNamespace() + + if err := p.writeStart(&start); err != nil { + return err + } + + if val.Kind() == reflect.Struct { + err = p.marshalStruct(tinfo, val) + } else { + s, b, err1 := p.marshalSimple(typ, val) + if err1 != nil { + err = err1 + } else if b != nil { + EscapeText(p, b) + } else { + p.EscapeString(s) + } + } + if err != nil { + return err + } + + if err := p.writeEnd(start.Name); err != nil { + return err + } + + return p.cachedWriteError() +} + +// fieldAttr returns the attribute of the given field. +// If the returned attribute has an empty Name.Local, +// it should not be used. +// The given value holds the value containing the field. +func (p *printer) fieldAttr(finfo *fieldInfo, val reflect.Value) (Attr, error) { + fv := finfo.value(val) + name := Name{Space: finfo.xmlns, Local: finfo.name} + if finfo.flags&fOmitEmpty != 0 && isEmptyValue(fv) { + return Attr{}, nil + } + if fv.Kind() == reflect.Interface && fv.IsNil() { + return Attr{}, nil + } + if fv.CanInterface() && fv.Type().Implements(marshalerAttrType) { + attr, err := fv.Interface().(MarshalerAttr).MarshalXMLAttr(name) + return attr, err + } + if fv.CanAddr() { + pv := fv.Addr() + if pv.CanInterface() && pv.Type().Implements(marshalerAttrType) { + attr, err := pv.Interface().(MarshalerAttr).MarshalXMLAttr(name) + return attr, err + } + } + if fv.CanInterface() && fv.Type().Implements(textMarshalerType) { + text, err := fv.Interface().(encoding.TextMarshaler).MarshalText() + if err != nil { + return Attr{}, err + } + return Attr{name, string(text)}, nil + } + if fv.CanAddr() { + pv := fv.Addr() + if pv.CanInterface() && pv.Type().Implements(textMarshalerType) { + text, err := pv.Interface().(encoding.TextMarshaler).MarshalText() + if err != nil { + return Attr{}, err + } + return Attr{name, string(text)}, nil + } + } + // Dereference or skip nil pointer, interface values. + switch fv.Kind() { + case reflect.Ptr, reflect.Interface: + if fv.IsNil() { + return Attr{}, nil + } + fv = fv.Elem() + } + s, b, err := p.marshalSimple(fv.Type(), fv) + if err != nil { + return Attr{}, err + } + if b != nil { + s = string(b) + } + return Attr{name, s}, nil +} + +// defaultStart returns the default start element to use, +// given the reflect type, field info, and start template. +func (p *printer) defaultStart(typ reflect.Type, finfo *fieldInfo, startTemplate *StartElement) StartElement { + var start StartElement + // Precedence for the XML element name is as above, + // except that we do not look inside structs for the first field. + if startTemplate != nil { + start.Name = startTemplate.Name + start.Attr = append(start.Attr, startTemplate.Attr...) + } else if finfo != nil && finfo.name != "" { + start.Name.Local = finfo.name + start.Name.Space = finfo.xmlns + } else if typ.Name() != "" { + start.Name.Local = typ.Name() + } else { + // Must be a pointer to a named type, + // since it has the Marshaler methods. + start.Name.Local = typ.Elem().Name() + } + // Historic behaviour: elements use the name space of + // the element they are contained in by default. + if start.Name.Space == "" { + start.Name.Space = p.defaultNS + } + start.setDefaultNamespace() + return start +} + +// marshalInterface marshals a Marshaler interface value. +func (p *printer) marshalInterface(val Marshaler, start StartElement) error { + // Push a marker onto the tag stack so that MarshalXML + // cannot close the XML tags that it did not open. + p.tags = append(p.tags, Name{}) + n := len(p.tags) + + err := val.MarshalXML(p.encoder, start) + if err != nil { + return err + } + + // Make sure MarshalXML closed all its tags. p.tags[n-1] is the mark. + if len(p.tags) > n { + return fmt.Errorf("xml: %s.MarshalXML wrote invalid XML: <%s> not closed", receiverType(val), p.tags[len(p.tags)-1].Local) + } + p.tags = p.tags[:n-1] + return nil +} + +// marshalTextInterface marshals a TextMarshaler interface value. +func (p *printer) marshalTextInterface(val encoding.TextMarshaler, start StartElement) error { + if err := p.writeStart(&start); err != nil { + return err + } + text, err := val.MarshalText() + if err != nil { + return err + } + EscapeText(p, text) + return p.writeEnd(start.Name) +} + +// writeStart writes the given start element. +func (p *printer) writeStart(start *StartElement) error { + if start.Name.Local == "" { + return fmt.Errorf("xml: start tag with no name") + } + + p.tags = append(p.tags, start.Name) + p.markPrefix() + // Define any name spaces explicitly declared in the attributes. + // We do this as a separate pass so that explicitly declared prefixes + // will take precedence over implicitly declared prefixes + // regardless of the order of the attributes. + ignoreNonEmptyDefault := start.Name.Space == "" + for _, attr := range start.Attr { + if err := p.defineNS(attr, ignoreNonEmptyDefault); err != nil { + return err + } + } + // Define any new name spaces implied by the attributes. + for _, attr := range start.Attr { + name := attr.Name + // From http://www.w3.org/TR/xml-names11/#defaulting + // "Default namespace declarations do not apply directly + // to attribute names; the interpretation of unprefixed + // attributes is determined by the element on which they + // appear." + // This means we don't need to create a new namespace + // when an attribute name space is empty. + if name.Space != "" && !name.isNamespace() { + p.createNSPrefix(name.Space, true) + } + } + p.createNSPrefix(start.Name.Space, false) + + p.writeIndent(1) + p.WriteByte('<') + p.writeName(start.Name, false) + p.writeNamespaces() + for _, attr := range start.Attr { + name := attr.Name + if name.Local == "" || name.isNamespace() { + // Namespaces have already been written by writeNamespaces above. + continue + } + p.WriteByte(' ') + p.writeName(name, true) + p.WriteString(`="`) + p.EscapeString(attr.Value) + p.WriteByte('"') + } + p.WriteByte('>') + return nil +} + +// writeName writes the given name. It assumes +// that p.createNSPrefix(name) has already been called. +func (p *printer) writeName(name Name, isAttr bool) { + if prefix := p.prefixForNS(name.Space, isAttr); prefix != "" { + p.WriteString(prefix) + p.WriteByte(':') + } + p.WriteString(name.Local) +} + +func (p *printer) writeEnd(name Name) error { + if name.Local == "" { + return fmt.Errorf("xml: end tag with no name") + } + if len(p.tags) == 0 || p.tags[len(p.tags)-1].Local == "" { + return fmt.Errorf("xml: end tag without start tag", name.Local) + } + if top := p.tags[len(p.tags)-1]; top != name { + if top.Local != name.Local { + return fmt.Errorf("xml: end tag does not match start tag <%s>", name.Local, top.Local) + } + return fmt.Errorf("xml: end tag in namespace %s does not match start tag <%s> in namespace %s", name.Local, name.Space, top.Local, top.Space) + } + p.tags = p.tags[:len(p.tags)-1] + + p.writeIndent(-1) + p.WriteByte('<') + p.WriteByte('/') + p.writeName(name, false) + p.WriteByte('>') + p.popPrefix() + return nil +} + +func (p *printer) marshalSimple(typ reflect.Type, val reflect.Value) (string, []byte, error) { + switch val.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return strconv.FormatInt(val.Int(), 10), nil, nil + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return strconv.FormatUint(val.Uint(), 10), nil, nil + case reflect.Float32, reflect.Float64: + return strconv.FormatFloat(val.Float(), 'g', -1, val.Type().Bits()), nil, nil + case reflect.String: + return val.String(), nil, nil + case reflect.Bool: + return strconv.FormatBool(val.Bool()), nil, nil + case reflect.Array: + if typ.Elem().Kind() != reflect.Uint8 { + break + } + // [...]byte + var bytes []byte + if val.CanAddr() { + bytes = val.Slice(0, val.Len()).Bytes() + } else { + bytes = make([]byte, val.Len()) + reflect.Copy(reflect.ValueOf(bytes), val) + } + return "", bytes, nil + case reflect.Slice: + if typ.Elem().Kind() != reflect.Uint8 { + break + } + // []byte + return "", val.Bytes(), nil + } + return "", nil, &UnsupportedTypeError{typ} +} + +var ddBytes = []byte("--") + +func (p *printer) marshalStruct(tinfo *typeInfo, val reflect.Value) error { + s := parentStack{p: p} + for i := range tinfo.fields { + finfo := &tinfo.fields[i] + if finfo.flags&fAttr != 0 { + continue + } + vf := finfo.value(val) + + // Dereference or skip nil pointer, interface values. + switch vf.Kind() { + case reflect.Ptr, reflect.Interface: + if !vf.IsNil() { + vf = vf.Elem() + } + } + + switch finfo.flags & fMode { + case fCharData: + if err := s.setParents(&noField, reflect.Value{}); err != nil { + return err + } + if vf.CanInterface() && vf.Type().Implements(textMarshalerType) { + data, err := vf.Interface().(encoding.TextMarshaler).MarshalText() + if err != nil { + return err + } + Escape(p, data) + continue + } + if vf.CanAddr() { + pv := vf.Addr() + if pv.CanInterface() && pv.Type().Implements(textMarshalerType) { + data, err := pv.Interface().(encoding.TextMarshaler).MarshalText() + if err != nil { + return err + } + Escape(p, data) + continue + } + } + var scratch [64]byte + switch vf.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + Escape(p, strconv.AppendInt(scratch[:0], vf.Int(), 10)) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + Escape(p, strconv.AppendUint(scratch[:0], vf.Uint(), 10)) + case reflect.Float32, reflect.Float64: + Escape(p, strconv.AppendFloat(scratch[:0], vf.Float(), 'g', -1, vf.Type().Bits())) + case reflect.Bool: + Escape(p, strconv.AppendBool(scratch[:0], vf.Bool())) + case reflect.String: + if err := EscapeText(p, []byte(vf.String())); err != nil { + return err + } + case reflect.Slice: + if elem, ok := vf.Interface().([]byte); ok { + if err := EscapeText(p, elem); err != nil { + return err + } + } + } + continue + + case fComment: + if err := s.setParents(&noField, reflect.Value{}); err != nil { + return err + } + k := vf.Kind() + if !(k == reflect.String || k == reflect.Slice && vf.Type().Elem().Kind() == reflect.Uint8) { + return fmt.Errorf("xml: bad type for comment field of %s", val.Type()) + } + if vf.Len() == 0 { + continue + } + p.writeIndent(0) + p.WriteString("" is invalid grammar. Make it "- -->" + p.WriteByte(' ') + } + p.WriteString("-->") + continue + + case fInnerXml: + iface := vf.Interface() + switch raw := iface.(type) { + case []byte: + p.Write(raw) + continue + case string: + p.WriteString(raw) + continue + } + + case fElement, fElement | fAny: + if err := s.setParents(finfo, vf); err != nil { + return err + } + } + if err := p.marshalValue(vf, finfo, nil); err != nil { + return err + } + } + if err := s.setParents(&noField, reflect.Value{}); err != nil { + return err + } + return p.cachedWriteError() +} + +var noField fieldInfo + +// return the bufio Writer's cached write error +func (p *printer) cachedWriteError() error { + _, err := p.Write(nil) + return err +} + +func (p *printer) writeIndent(depthDelta int) { + if len(p.prefix) == 0 && len(p.indent) == 0 { + return + } + if depthDelta < 0 { + p.depth-- + if p.indentedIn { + p.indentedIn = false + return + } + p.indentedIn = false + } + if p.putNewline { + p.WriteByte('\n') + } else { + p.putNewline = true + } + if len(p.prefix) > 0 { + p.WriteString(p.prefix) + } + if len(p.indent) > 0 { + for i := 0; i < p.depth; i++ { + p.WriteString(p.indent) + } + } + if depthDelta > 0 { + p.depth++ + p.indentedIn = true + } +} + +type parentStack struct { + p *printer + xmlns string + parents []string +} + +// setParents sets the stack of current parents to those found in finfo. +// It only writes the start elements if vf holds a non-nil value. +// If finfo is &noField, it pops all elements. +func (s *parentStack) setParents(finfo *fieldInfo, vf reflect.Value) error { + xmlns := s.p.defaultNS + if finfo.xmlns != "" { + xmlns = finfo.xmlns + } + commonParents := 0 + if xmlns == s.xmlns { + for ; commonParents < len(finfo.parents) && commonParents < len(s.parents); commonParents++ { + if finfo.parents[commonParents] != s.parents[commonParents] { + break + } + } + } + // Pop off any parents that aren't in common with the previous field. + for i := len(s.parents) - 1; i >= commonParents; i-- { + if err := s.p.writeEnd(Name{ + Space: s.xmlns, + Local: s.parents[i], + }); err != nil { + return err + } + } + s.parents = finfo.parents + s.xmlns = xmlns + if commonParents >= len(s.parents) { + // No new elements to push. + return nil + } + if (vf.Kind() == reflect.Ptr || vf.Kind() == reflect.Interface) && vf.IsNil() { + // The element is nil, so no need for the start elements. + s.parents = s.parents[:commonParents] + return nil + } + // Push any new parents required. + for _, name := range s.parents[commonParents:] { + start := &StartElement{ + Name: Name{ + Space: s.xmlns, + Local: name, + }, + } + // Set the default name space for parent elements + // to match what we do with other elements. + if s.xmlns != s.p.defaultNS { + start.setDefaultNamespace() + } + if err := s.p.writeStart(start); err != nil { + return err + } + } + return nil +} + +// A MarshalXMLError is returned when Marshal encounters a type +// that cannot be converted into XML. +type UnsupportedTypeError struct { + Type reflect.Type +} + +func (e *UnsupportedTypeError) Error() string { + return "xml: unsupported type: " + e.Type.String() +} + +func isEmptyValue(v reflect.Value) bool { + switch v.Kind() { + case reflect.Array, reflect.Map, reflect.Slice, reflect.String: + return v.Len() == 0 + case reflect.Bool: + return !v.Bool() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.Interface, reflect.Ptr: + return v.IsNil() + } + return false +} diff --git a/vendor/golang.org/x/net/webdav/internal/xml/marshal_test.go b/vendor/golang.org/x/net/webdav/internal/xml/marshal_test.go new file mode 100644 index 0000000..5dc78e7 --- /dev/null +++ b/vendor/golang.org/x/net/webdav/internal/xml/marshal_test.go @@ -0,0 +1,1939 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package xml + +import ( + "bytes" + "errors" + "fmt" + "io" + "reflect" + "strconv" + "strings" + "sync" + "testing" + "time" +) + +type DriveType int + +const ( + HyperDrive DriveType = iota + ImprobabilityDrive +) + +type Passenger struct { + Name []string `xml:"name"` + Weight float32 `xml:"weight"` +} + +type Ship struct { + XMLName struct{} `xml:"spaceship"` + + Name string `xml:"name,attr"` + Pilot string `xml:"pilot,attr"` + Drive DriveType `xml:"drive"` + Age uint `xml:"age"` + Passenger []*Passenger `xml:"passenger"` + secret string +} + +type NamedType string + +type Port struct { + XMLName struct{} `xml:"port"` + Type string `xml:"type,attr,omitempty"` + Comment string `xml:",comment"` + Number string `xml:",chardata"` +} + +type Domain struct { + XMLName struct{} `xml:"domain"` + Country string `xml:",attr,omitempty"` + Name []byte `xml:",chardata"` + Comment []byte `xml:",comment"` +} + +type Book struct { + XMLName struct{} `xml:"book"` + Title string `xml:",chardata"` +} + +type Event struct { + XMLName struct{} `xml:"event"` + Year int `xml:",chardata"` +} + +type Movie struct { + XMLName struct{} `xml:"movie"` + Length uint `xml:",chardata"` +} + +type Pi struct { + XMLName struct{} `xml:"pi"` + Approximation float32 `xml:",chardata"` +} + +type Universe struct { + XMLName struct{} `xml:"universe"` + Visible float64 `xml:",chardata"` +} + +type Particle struct { + XMLName struct{} `xml:"particle"` + HasMass bool `xml:",chardata"` +} + +type Departure struct { + XMLName struct{} `xml:"departure"` + When time.Time `xml:",chardata"` +} + +type SecretAgent struct { + XMLName struct{} `xml:"agent"` + Handle string `xml:"handle,attr"` + Identity string + Obfuscate string `xml:",innerxml"` +} + +type NestedItems struct { + XMLName struct{} `xml:"result"` + Items []string `xml:">item"` + Item1 []string `xml:"Items>item1"` +} + +type NestedOrder struct { + XMLName struct{} `xml:"result"` + Field1 string `xml:"parent>c"` + Field2 string `xml:"parent>b"` + Field3 string `xml:"parent>a"` +} + +type MixedNested struct { + XMLName struct{} `xml:"result"` + A string `xml:"parent1>a"` + B string `xml:"b"` + C string `xml:"parent1>parent2>c"` + D string `xml:"parent1>d"` +} + +type NilTest struct { + A interface{} `xml:"parent1>parent2>a"` + B interface{} `xml:"parent1>b"` + C interface{} `xml:"parent1>parent2>c"` +} + +type Service struct { + XMLName struct{} `xml:"service"` + Domain *Domain `xml:"host>domain"` + Port *Port `xml:"host>port"` + Extra1 interface{} + Extra2 interface{} `xml:"host>extra2"` +} + +var nilStruct *Ship + +type EmbedA struct { + EmbedC + EmbedB EmbedB + FieldA string +} + +type EmbedB struct { + FieldB string + *EmbedC +} + +type EmbedC struct { + FieldA1 string `xml:"FieldA>A1"` + FieldA2 string `xml:"FieldA>A2"` + FieldB string + FieldC string +} + +type NameCasing struct { + XMLName struct{} `xml:"casing"` + Xy string + XY string + XyA string `xml:"Xy,attr"` + XYA string `xml:"XY,attr"` +} + +type NamePrecedence struct { + XMLName Name `xml:"Parent"` + FromTag XMLNameWithoutTag `xml:"InTag"` + FromNameVal XMLNameWithoutTag + FromNameTag XMLNameWithTag + InFieldName string +} + +type XMLNameWithTag struct { + XMLName Name `xml:"InXMLNameTag"` + Value string `xml:",chardata"` +} + +type XMLNameWithNSTag struct { + XMLName Name `xml:"ns InXMLNameWithNSTag"` + Value string `xml:",chardata"` +} + +type XMLNameWithoutTag struct { + XMLName Name + Value string `xml:",chardata"` +} + +type NameInField struct { + Foo Name `xml:"ns foo"` +} + +type AttrTest struct { + Int int `xml:",attr"` + Named int `xml:"int,attr"` + Float float64 `xml:",attr"` + Uint8 uint8 `xml:",attr"` + Bool bool `xml:",attr"` + Str string `xml:",attr"` + Bytes []byte `xml:",attr"` +} + +type OmitAttrTest struct { + Int int `xml:",attr,omitempty"` + Named int `xml:"int,attr,omitempty"` + Float float64 `xml:",attr,omitempty"` + Uint8 uint8 `xml:",attr,omitempty"` + Bool bool `xml:",attr,omitempty"` + Str string `xml:",attr,omitempty"` + Bytes []byte `xml:",attr,omitempty"` +} + +type OmitFieldTest struct { + Int int `xml:",omitempty"` + Named int `xml:"int,omitempty"` + Float float64 `xml:",omitempty"` + Uint8 uint8 `xml:",omitempty"` + Bool bool `xml:",omitempty"` + Str string `xml:",omitempty"` + Bytes []byte `xml:",omitempty"` + Ptr *PresenceTest `xml:",omitempty"` +} + +type AnyTest struct { + XMLName struct{} `xml:"a"` + Nested string `xml:"nested>value"` + AnyField AnyHolder `xml:",any"` +} + +type AnyOmitTest struct { + XMLName struct{} `xml:"a"` + Nested string `xml:"nested>value"` + AnyField *AnyHolder `xml:",any,omitempty"` +} + +type AnySliceTest struct { + XMLName struct{} `xml:"a"` + Nested string `xml:"nested>value"` + AnyField []AnyHolder `xml:",any"` +} + +type AnyHolder struct { + XMLName Name + XML string `xml:",innerxml"` +} + +type RecurseA struct { + A string + B *RecurseB +} + +type RecurseB struct { + A *RecurseA + B string +} + +type PresenceTest struct { + Exists *struct{} +} + +type IgnoreTest struct { + PublicSecret string `xml:"-"` +} + +type MyBytes []byte + +type Data struct { + Bytes []byte + Attr []byte `xml:",attr"` + Custom MyBytes +} + +type Plain struct { + V interface{} +} + +type MyInt int + +type EmbedInt struct { + MyInt +} + +type Strings struct { + X []string `xml:"A>B,omitempty"` +} + +type PointerFieldsTest struct { + XMLName Name `xml:"dummy"` + Name *string `xml:"name,attr"` + Age *uint `xml:"age,attr"` + Empty *string `xml:"empty,attr"` + Contents *string `xml:",chardata"` +} + +type ChardataEmptyTest struct { + XMLName Name `xml:"test"` + Contents *string `xml:",chardata"` +} + +type MyMarshalerTest struct { +} + +var _ Marshaler = (*MyMarshalerTest)(nil) + +func (m *MyMarshalerTest) MarshalXML(e *Encoder, start StartElement) error { + e.EncodeToken(start) + e.EncodeToken(CharData([]byte("hello world"))) + e.EncodeToken(EndElement{start.Name}) + return nil +} + +type MyMarshalerAttrTest struct{} + +var _ MarshalerAttr = (*MyMarshalerAttrTest)(nil) + +func (m *MyMarshalerAttrTest) MarshalXMLAttr(name Name) (Attr, error) { + return Attr{name, "hello world"}, nil +} + +type MyMarshalerValueAttrTest struct{} + +var _ MarshalerAttr = MyMarshalerValueAttrTest{} + +func (m MyMarshalerValueAttrTest) MarshalXMLAttr(name Name) (Attr, error) { + return Attr{name, "hello world"}, nil +} + +type MarshalerStruct struct { + Foo MyMarshalerAttrTest `xml:",attr"` +} + +type MarshalerValueStruct struct { + Foo MyMarshalerValueAttrTest `xml:",attr"` +} + +type InnerStruct struct { + XMLName Name `xml:"testns outer"` +} + +type OuterStruct struct { + InnerStruct + IntAttr int `xml:"int,attr"` +} + +type OuterNamedStruct struct { + InnerStruct + XMLName Name `xml:"outerns test"` + IntAttr int `xml:"int,attr"` +} + +type OuterNamedOrderedStruct struct { + XMLName Name `xml:"outerns test"` + InnerStruct + IntAttr int `xml:"int,attr"` +} + +type OuterOuterStruct struct { + OuterStruct +} + +type NestedAndChardata struct { + AB []string `xml:"A>B"` + Chardata string `xml:",chardata"` +} + +type NestedAndComment struct { + AB []string `xml:"A>B"` + Comment string `xml:",comment"` +} + +type XMLNSFieldStruct struct { + Ns string `xml:"xmlns,attr"` + Body string +} + +type NamedXMLNSFieldStruct struct { + XMLName struct{} `xml:"testns test"` + Ns string `xml:"xmlns,attr"` + Body string +} + +type XMLNSFieldStructWithOmitEmpty struct { + Ns string `xml:"xmlns,attr,omitempty"` + Body string +} + +type NamedXMLNSFieldStructWithEmptyNamespace struct { + XMLName struct{} `xml:"test"` + Ns string `xml:"xmlns,attr"` + Body string +} + +type RecursiveXMLNSFieldStruct struct { + Ns string `xml:"xmlns,attr"` + Body *RecursiveXMLNSFieldStruct `xml:",omitempty"` + Text string `xml:",omitempty"` +} + +func ifaceptr(x interface{}) interface{} { + return &x +} + +var ( + nameAttr = "Sarah" + ageAttr = uint(12) + contentsAttr = "lorem ipsum" +) + +// Unless explicitly stated as such (or *Plain), all of the +// tests below are two-way tests. When introducing new tests, +// please try to make them two-way as well to ensure that +// marshalling and unmarshalling are as symmetrical as feasible. +var marshalTests = []struct { + Value interface{} + ExpectXML string + MarshalOnly bool + UnmarshalOnly bool +}{ + // Test nil marshals to nothing + {Value: nil, ExpectXML: ``, MarshalOnly: true}, + {Value: nilStruct, ExpectXML: ``, MarshalOnly: true}, + + // Test value types + {Value: &Plain{true}, ExpectXML: `true`}, + {Value: &Plain{false}, ExpectXML: `false`}, + {Value: &Plain{int(42)}, ExpectXML: `42`}, + {Value: &Plain{int8(42)}, ExpectXML: `42`}, + {Value: &Plain{int16(42)}, ExpectXML: `42`}, + {Value: &Plain{int32(42)}, ExpectXML: `42`}, + {Value: &Plain{uint(42)}, ExpectXML: `42`}, + {Value: &Plain{uint8(42)}, ExpectXML: `42`}, + {Value: &Plain{uint16(42)}, ExpectXML: `42`}, + {Value: &Plain{uint32(42)}, ExpectXML: `42`}, + {Value: &Plain{float32(1.25)}, ExpectXML: `1.25`}, + {Value: &Plain{float64(1.25)}, ExpectXML: `1.25`}, + {Value: &Plain{uintptr(0xFFDD)}, ExpectXML: `65501`}, + {Value: &Plain{"gopher"}, ExpectXML: `gopher`}, + {Value: &Plain{[]byte("gopher")}, ExpectXML: `gopher`}, + {Value: &Plain{""}, ExpectXML: `</>`}, + {Value: &Plain{[]byte("")}, ExpectXML: `</>`}, + {Value: &Plain{[3]byte{'<', '/', '>'}}, ExpectXML: `</>`}, + {Value: &Plain{NamedType("potato")}, ExpectXML: `potato`}, + {Value: &Plain{[]int{1, 2, 3}}, ExpectXML: `123`}, + {Value: &Plain{[3]int{1, 2, 3}}, ExpectXML: `123`}, + {Value: ifaceptr(true), MarshalOnly: true, ExpectXML: `true`}, + + // Test time. + { + Value: &Plain{time.Unix(1e9, 123456789).UTC()}, + ExpectXML: `2001-09-09T01:46:40.123456789Z`, + }, + + // A pointer to struct{} may be used to test for an element's presence. + { + Value: &PresenceTest{new(struct{})}, + ExpectXML: ``, + }, + { + Value: &PresenceTest{}, + ExpectXML: ``, + }, + + // A pointer to struct{} may be used to test for an element's presence. + { + Value: &PresenceTest{new(struct{})}, + ExpectXML: ``, + }, + { + Value: &PresenceTest{}, + ExpectXML: ``, + }, + + // A []byte field is only nil if the element was not found. + { + Value: &Data{}, + ExpectXML: ``, + UnmarshalOnly: true, + }, + { + Value: &Data{Bytes: []byte{}, Custom: MyBytes{}, Attr: []byte{}}, + ExpectXML: ``, + UnmarshalOnly: true, + }, + + // Check that []byte works, including named []byte types. + { + Value: &Data{Bytes: []byte("ab"), Custom: MyBytes("cd"), Attr: []byte{'v'}}, + ExpectXML: `abcd`, + }, + + // Test innerxml + { + Value: &SecretAgent{ + Handle: "007", + Identity: "James Bond", + Obfuscate: "", + }, + ExpectXML: `James Bond`, + MarshalOnly: true, + }, + { + Value: &SecretAgent{ + Handle: "007", + Identity: "James Bond", + Obfuscate: "James Bond", + }, + ExpectXML: `James Bond`, + UnmarshalOnly: true, + }, + + // Test structs + {Value: &Port{Type: "ssl", Number: "443"}, ExpectXML: `443`}, + {Value: &Port{Number: "443"}, ExpectXML: `443`}, + {Value: &Port{Type: ""}, ExpectXML: ``}, + {Value: &Port{Number: "443", Comment: "https"}, ExpectXML: `443`}, + {Value: &Port{Number: "443", Comment: "add space-"}, ExpectXML: `443`, MarshalOnly: true}, + {Value: &Domain{Name: []byte("google.com&friends")}, ExpectXML: `google.com&friends`}, + {Value: &Domain{Name: []byte("google.com"), Comment: []byte(" &friends ")}, ExpectXML: `google.com`}, + {Value: &Book{Title: "Pride & Prejudice"}, ExpectXML: `Pride & Prejudice`}, + {Value: &Event{Year: -3114}, ExpectXML: `-3114`}, + {Value: &Movie{Length: 13440}, ExpectXML: `13440`}, + {Value: &Pi{Approximation: 3.14159265}, ExpectXML: `3.1415927`}, + {Value: &Universe{Visible: 9.3e13}, ExpectXML: `9.3e+13`}, + {Value: &Particle{HasMass: true}, ExpectXML: `true`}, + {Value: &Departure{When: ParseTime("2013-01-09T00:15:00-09:00")}, ExpectXML: `2013-01-09T00:15:00-09:00`}, + {Value: atomValue, ExpectXML: atomXml}, + { + Value: &Ship{ + Name: "Heart of Gold", + Pilot: "Computer", + Age: 1, + Drive: ImprobabilityDrive, + Passenger: []*Passenger{ + { + Name: []string{"Zaphod", "Beeblebrox"}, + Weight: 7.25, + }, + { + Name: []string{"Trisha", "McMillen"}, + Weight: 5.5, + }, + { + Name: []string{"Ford", "Prefect"}, + Weight: 7, + }, + { + Name: []string{"Arthur", "Dent"}, + Weight: 6.75, + }, + }, + }, + ExpectXML: `` + + `` + strconv.Itoa(int(ImprobabilityDrive)) + `` + + `1` + + `` + + `Zaphod` + + `Beeblebrox` + + `7.25` + + `` + + `` + + `Trisha` + + `McMillen` + + `5.5` + + `` + + `` + + `Ford` + + `Prefect` + + `7` + + `` + + `` + + `Arthur` + + `Dent` + + `6.75` + + `` + + ``, + }, + + // Test a>b + { + Value: &NestedItems{Items: nil, Item1: nil}, + ExpectXML: `` + + `` + + `` + + ``, + }, + { + Value: &NestedItems{Items: []string{}, Item1: []string{}}, + ExpectXML: `` + + `` + + `` + + ``, + MarshalOnly: true, + }, + { + Value: &NestedItems{Items: nil, Item1: []string{"A"}}, + ExpectXML: `` + + `` + + `A` + + `` + + ``, + }, + { + Value: &NestedItems{Items: []string{"A", "B"}, Item1: nil}, + ExpectXML: `` + + `` + + `A` + + `B` + + `` + + ``, + }, + { + Value: &NestedItems{Items: []string{"A", "B"}, Item1: []string{"C"}}, + ExpectXML: `` + + `` + + `A` + + `B` + + `C` + + `` + + ``, + }, + { + Value: &NestedOrder{Field1: "C", Field2: "B", Field3: "A"}, + ExpectXML: `` + + `` + + `C` + + `B` + + `A` + + `` + + ``, + }, + { + Value: &NilTest{A: "A", B: nil, C: "C"}, + ExpectXML: `` + + `` + + `A` + + `C` + + `` + + ``, + MarshalOnly: true, // Uses interface{} + }, + { + Value: &MixedNested{A: "A", B: "B", C: "C", D: "D"}, + ExpectXML: `` + + `A` + + `B` + + `` + + `C` + + `D` + + `` + + ``, + }, + { + Value: &Service{Port: &Port{Number: "80"}}, + ExpectXML: `80`, + }, + { + Value: &Service{}, + ExpectXML: ``, + }, + { + Value: &Service{Port: &Port{Number: "80"}, Extra1: "A", Extra2: "B"}, + ExpectXML: `` + + `80` + + `A` + + `B` + + ``, + MarshalOnly: true, + }, + { + Value: &Service{Port: &Port{Number: "80"}, Extra2: "example"}, + ExpectXML: `` + + `80` + + `example` + + ``, + MarshalOnly: true, + }, + { + Value: &struct { + XMLName struct{} `xml:"space top"` + A string `xml:"x>a"` + B string `xml:"x>b"` + C string `xml:"space x>c"` + C1 string `xml:"space1 x>c"` + D1 string `xml:"space1 x>d"` + E1 string `xml:"x>e"` + }{ + A: "a", + B: "b", + C: "c", + C1: "c1", + D1: "d1", + E1: "e1", + }, + ExpectXML: `` + + `abc` + + `` + + `c1` + + `d1` + + `` + + `` + + `e1` + + `` + + ``, + }, + { + Value: &struct { + XMLName Name + A string `xml:"x>a"` + B string `xml:"x>b"` + C string `xml:"space x>c"` + C1 string `xml:"space1 x>c"` + D1 string `xml:"space1 x>d"` + }{ + XMLName: Name{ + Space: "space0", + Local: "top", + }, + A: "a", + B: "b", + C: "c", + C1: "c1", + D1: "d1", + }, + ExpectXML: `` + + `ab` + + `c` + + `` + + `c1` + + `d1` + + `` + + ``, + }, + { + Value: &struct { + XMLName struct{} `xml:"top"` + B string `xml:"space x>b"` + B1 string `xml:"space1 x>b"` + }{ + B: "b", + B1: "b1", + }, + ExpectXML: `` + + `b` + + `b1` + + ``, + }, + + // Test struct embedding + { + Value: &EmbedA{ + EmbedC: EmbedC{ + FieldA1: "", // Shadowed by A.A + FieldA2: "", // Shadowed by A.A + FieldB: "A.C.B", + FieldC: "A.C.C", + }, + EmbedB: EmbedB{ + FieldB: "A.B.B", + EmbedC: &EmbedC{ + FieldA1: "A.B.C.A1", + FieldA2: "A.B.C.A2", + FieldB: "", // Shadowed by A.B.B + FieldC: "A.B.C.C", + }, + }, + FieldA: "A.A", + }, + ExpectXML: `` + + `A.C.B` + + `A.C.C` + + `` + + `A.B.B` + + `` + + `A.B.C.A1` + + `A.B.C.A2` + + `` + + `A.B.C.C` + + `` + + `A.A` + + ``, + }, + + // Test that name casing matters + { + Value: &NameCasing{Xy: "mixed", XY: "upper", XyA: "mixedA", XYA: "upperA"}, + ExpectXML: `mixedupper`, + }, + + // Test the order in which the XML element name is chosen + { + Value: &NamePrecedence{ + FromTag: XMLNameWithoutTag{Value: "A"}, + FromNameVal: XMLNameWithoutTag{XMLName: Name{Local: "InXMLName"}, Value: "B"}, + FromNameTag: XMLNameWithTag{Value: "C"}, + InFieldName: "D", + }, + ExpectXML: `` + + `A` + + `B` + + `C` + + `D` + + ``, + MarshalOnly: true, + }, + { + Value: &NamePrecedence{ + XMLName: Name{Local: "Parent"}, + FromTag: XMLNameWithoutTag{XMLName: Name{Local: "InTag"}, Value: "A"}, + FromNameVal: XMLNameWithoutTag{XMLName: Name{Local: "FromNameVal"}, Value: "B"}, + FromNameTag: XMLNameWithTag{XMLName: Name{Local: "InXMLNameTag"}, Value: "C"}, + InFieldName: "D", + }, + ExpectXML: `` + + `A` + + `B` + + `C` + + `D` + + ``, + UnmarshalOnly: true, + }, + + // xml.Name works in a plain field as well. + { + Value: &NameInField{Name{Space: "ns", Local: "foo"}}, + ExpectXML: ``, + }, + { + Value: &NameInField{Name{Space: "ns", Local: "foo"}}, + ExpectXML: ``, + UnmarshalOnly: true, + }, + + // Marshaling zero xml.Name uses the tag or field name. + { + Value: &NameInField{}, + ExpectXML: ``, + MarshalOnly: true, + }, + + // Test attributes + { + Value: &AttrTest{ + Int: 8, + Named: 9, + Float: 23.5, + Uint8: 255, + Bool: true, + Str: "str", + Bytes: []byte("byt"), + }, + ExpectXML: ``, + }, + { + Value: &AttrTest{Bytes: []byte{}}, + ExpectXML: ``, + }, + { + Value: &OmitAttrTest{ + Int: 8, + Named: 9, + Float: 23.5, + Uint8: 255, + Bool: true, + Str: "str", + Bytes: []byte("byt"), + }, + ExpectXML: ``, + }, + { + Value: &OmitAttrTest{}, + ExpectXML: ``, + }, + + // pointer fields + { + Value: &PointerFieldsTest{Name: &nameAttr, Age: &ageAttr, Contents: &contentsAttr}, + ExpectXML: `lorem ipsum`, + MarshalOnly: true, + }, + + // empty chardata pointer field + { + Value: &ChardataEmptyTest{}, + ExpectXML: ``, + MarshalOnly: true, + }, + + // omitempty on fields + { + Value: &OmitFieldTest{ + Int: 8, + Named: 9, + Float: 23.5, + Uint8: 255, + Bool: true, + Str: "str", + Bytes: []byte("byt"), + Ptr: &PresenceTest{}, + }, + ExpectXML: `` + + `8` + + `9` + + `23.5` + + `255` + + `true` + + `str` + + `byt` + + `` + + ``, + }, + { + Value: &OmitFieldTest{}, + ExpectXML: ``, + }, + + // Test ",any" + { + ExpectXML: `knownunknown`, + Value: &AnyTest{ + Nested: "known", + AnyField: AnyHolder{ + XMLName: Name{Local: "other"}, + XML: "unknown", + }, + }, + }, + { + Value: &AnyTest{Nested: "known", + AnyField: AnyHolder{ + XML: "", + XMLName: Name{Local: "AnyField"}, + }, + }, + ExpectXML: `known`, + }, + { + ExpectXML: `b`, + Value: &AnyOmitTest{ + Nested: "b", + }, + }, + { + ExpectXML: `bei`, + Value: &AnySliceTest{ + Nested: "b", + AnyField: []AnyHolder{ + { + XMLName: Name{Local: "c"}, + XML: "e", + }, + { + XMLName: Name{Space: "f", Local: "g"}, + XML: "i", + }, + }, + }, + }, + { + ExpectXML: `b`, + Value: &AnySliceTest{ + Nested: "b", + }, + }, + + // Test recursive types. + { + Value: &RecurseA{ + A: "a1", + B: &RecurseB{ + A: &RecurseA{"a2", nil}, + B: "b1", + }, + }, + ExpectXML: `a1a2b1`, + }, + + // Test ignoring fields via "-" tag + { + ExpectXML: ``, + Value: &IgnoreTest{}, + }, + { + ExpectXML: ``, + Value: &IgnoreTest{PublicSecret: "can't tell"}, + MarshalOnly: true, + }, + { + ExpectXML: `ignore me`, + Value: &IgnoreTest{}, + UnmarshalOnly: true, + }, + + // Test escaping. + { + ExpectXML: `dquote: "; squote: '; ampersand: &; less: <; greater: >;`, + Value: &AnyTest{ + Nested: `dquote: "; squote: '; ampersand: &; less: <; greater: >;`, + AnyField: AnyHolder{XMLName: Name{Local: "empty"}}, + }, + }, + { + ExpectXML: `newline: ; cr: ; tab: ;`, + Value: &AnyTest{ + Nested: "newline: \n; cr: \r; tab: \t;", + AnyField: AnyHolder{XMLName: Name{Local: "AnyField"}}, + }, + }, + { + ExpectXML: "1\r2\r\n3\n\r4\n5", + Value: &AnyTest{ + Nested: "1\n2\n3\n\n4\n5", + }, + UnmarshalOnly: true, + }, + { + ExpectXML: `42`, + Value: &EmbedInt{ + MyInt: 42, + }, + }, + // Test omitempty with parent chain; see golang.org/issue/4168. + { + ExpectXML: ``, + Value: &Strings{}, + }, + // Custom marshalers. + { + ExpectXML: `hello world`, + Value: &MyMarshalerTest{}, + }, + { + ExpectXML: ``, + Value: &MarshalerStruct{}, + }, + { + ExpectXML: ``, + Value: &MarshalerValueStruct{}, + }, + { + ExpectXML: ``, + Value: &OuterStruct{IntAttr: 10}, + }, + { + ExpectXML: ``, + Value: &OuterNamedStruct{XMLName: Name{Space: "outerns", Local: "test"}, IntAttr: 10}, + }, + { + ExpectXML: ``, + Value: &OuterNamedOrderedStruct{XMLName: Name{Space: "outerns", Local: "test"}, IntAttr: 10}, + }, + { + ExpectXML: ``, + Value: &OuterOuterStruct{OuterStruct{IntAttr: 10}}, + }, + { + ExpectXML: `test`, + Value: &NestedAndChardata{AB: make([]string, 2), Chardata: "test"}, + }, + { + ExpectXML: ``, + Value: &NestedAndComment{AB: make([]string, 2), Comment: "test"}, + }, + { + ExpectXML: `hello world`, + Value: &XMLNSFieldStruct{Ns: "http://example.com/ns", Body: "hello world"}, + }, + { + ExpectXML: `hello world`, + Value: &NamedXMLNSFieldStruct{Ns: "http://example.com/ns", Body: "hello world"}, + }, + { + ExpectXML: `hello world`, + Value: &NamedXMLNSFieldStruct{Ns: "", Body: "hello world"}, + }, + { + ExpectXML: `hello world`, + Value: &XMLNSFieldStructWithOmitEmpty{Body: "hello world"}, + }, + { + // The xmlns attribute must be ignored because the + // element is in the empty namespace, so it's not possible + // to set the default namespace to something non-empty. + ExpectXML: `hello world`, + Value: &NamedXMLNSFieldStructWithEmptyNamespace{Ns: "foo", Body: "hello world"}, + MarshalOnly: true, + }, + { + ExpectXML: `hello world`, + Value: &RecursiveXMLNSFieldStruct{ + Ns: "foo", + Body: &RecursiveXMLNSFieldStruct{ + Text: "hello world", + }, + }, + }, +} + +func TestMarshal(t *testing.T) { + for idx, test := range marshalTests { + if test.UnmarshalOnly { + continue + } + data, err := Marshal(test.Value) + if err != nil { + t.Errorf("#%d: marshal(%#v): %s", idx, test.Value, err) + continue + } + if got, want := string(data), test.ExpectXML; got != want { + if strings.Contains(want, "\n") { + t.Errorf("#%d: marshal(%#v):\nHAVE:\n%s\nWANT:\n%s", idx, test.Value, got, want) + } else { + t.Errorf("#%d: marshal(%#v):\nhave %#q\nwant %#q", idx, test.Value, got, want) + } + } + } +} + +type AttrParent struct { + X string `xml:"X>Y,attr"` +} + +type BadAttr struct { + Name []string `xml:"name,attr"` +} + +var marshalErrorTests = []struct { + Value interface{} + Err string + Kind reflect.Kind +}{ + { + Value: make(chan bool), + Err: "xml: unsupported type: chan bool", + Kind: reflect.Chan, + }, + { + Value: map[string]string{ + "question": "What do you get when you multiply six by nine?", + "answer": "42", + }, + Err: "xml: unsupported type: map[string]string", + Kind: reflect.Map, + }, + { + Value: map[*Ship]bool{nil: false}, + Err: "xml: unsupported type: map[*xml.Ship]bool", + Kind: reflect.Map, + }, + { + Value: &Domain{Comment: []byte("f--bar")}, + Err: `xml: comments must not contain "--"`, + }, + // Reject parent chain with attr, never worked; see golang.org/issue/5033. + { + Value: &AttrParent{}, + Err: `xml: X>Y chain not valid with attr flag`, + }, + { + Value: BadAttr{[]string{"X", "Y"}}, + Err: `xml: unsupported type: []string`, + }, +} + +var marshalIndentTests = []struct { + Value interface{} + Prefix string + Indent string + ExpectXML string +}{ + { + Value: &SecretAgent{ + Handle: "007", + Identity: "James Bond", + Obfuscate: "", + }, + Prefix: "", + Indent: "\t", + ExpectXML: fmt.Sprintf("\n\tJames Bond\n"), + }, +} + +func TestMarshalErrors(t *testing.T) { + for idx, test := range marshalErrorTests { + data, err := Marshal(test.Value) + if err == nil { + t.Errorf("#%d: marshal(%#v) = [success] %q, want error %v", idx, test.Value, data, test.Err) + continue + } + if err.Error() != test.Err { + t.Errorf("#%d: marshal(%#v) = [error] %v, want %v", idx, test.Value, err, test.Err) + } + if test.Kind != reflect.Invalid { + if kind := err.(*UnsupportedTypeError).Type.Kind(); kind != test.Kind { + t.Errorf("#%d: marshal(%#v) = [error kind] %s, want %s", idx, test.Value, kind, test.Kind) + } + } + } +} + +// Do invertibility testing on the various structures that we test +func TestUnmarshal(t *testing.T) { + for i, test := range marshalTests { + if test.MarshalOnly { + continue + } + if _, ok := test.Value.(*Plain); ok { + continue + } + vt := reflect.TypeOf(test.Value) + dest := reflect.New(vt.Elem()).Interface() + err := Unmarshal([]byte(test.ExpectXML), dest) + + switch fix := dest.(type) { + case *Feed: + fix.Author.InnerXML = "" + for i := range fix.Entry { + fix.Entry[i].Author.InnerXML = "" + } + } + + if err != nil { + t.Errorf("#%d: unexpected error: %#v", i, err) + } else if got, want := dest, test.Value; !reflect.DeepEqual(got, want) { + t.Errorf("#%d: unmarshal(%q):\nhave %#v\nwant %#v", i, test.ExpectXML, got, want) + } + } +} + +func TestMarshalIndent(t *testing.T) { + for i, test := range marshalIndentTests { + data, err := MarshalIndent(test.Value, test.Prefix, test.Indent) + if err != nil { + t.Errorf("#%d: Error: %s", i, err) + continue + } + if got, want := string(data), test.ExpectXML; got != want { + t.Errorf("#%d: MarshalIndent:\nGot:%s\nWant:\n%s", i, got, want) + } + } +} + +type limitedBytesWriter struct { + w io.Writer + remain int // until writes fail +} + +func (lw *limitedBytesWriter) Write(p []byte) (n int, err error) { + if lw.remain <= 0 { + println("error") + return 0, errors.New("write limit hit") + } + if len(p) > lw.remain { + p = p[:lw.remain] + n, _ = lw.w.Write(p) + lw.remain = 0 + return n, errors.New("write limit hit") + } + n, err = lw.w.Write(p) + lw.remain -= n + return n, err +} + +func TestMarshalWriteErrors(t *testing.T) { + var buf bytes.Buffer + const writeCap = 1024 + w := &limitedBytesWriter{&buf, writeCap} + enc := NewEncoder(w) + var err error + var i int + const n = 4000 + for i = 1; i <= n; i++ { + err = enc.Encode(&Passenger{ + Name: []string{"Alice", "Bob"}, + Weight: 5, + }) + if err != nil { + break + } + } + if err == nil { + t.Error("expected an error") + } + if i == n { + t.Errorf("expected to fail before the end") + } + if buf.Len() != writeCap { + t.Errorf("buf.Len() = %d; want %d", buf.Len(), writeCap) + } +} + +func TestMarshalWriteIOErrors(t *testing.T) { + enc := NewEncoder(errWriter{}) + + expectErr := "unwritable" + err := enc.Encode(&Passenger{}) + if err == nil || err.Error() != expectErr { + t.Errorf("EscapeTest = [error] %v, want %v", err, expectErr) + } +} + +func TestMarshalFlush(t *testing.T) { + var buf bytes.Buffer + enc := NewEncoder(&buf) + if err := enc.EncodeToken(CharData("hello world")); err != nil { + t.Fatalf("enc.EncodeToken: %v", err) + } + if buf.Len() > 0 { + t.Fatalf("enc.EncodeToken caused actual write: %q", buf.Bytes()) + } + if err := enc.Flush(); err != nil { + t.Fatalf("enc.Flush: %v", err) + } + if buf.String() != "hello world" { + t.Fatalf("after enc.Flush, buf.String() = %q, want %q", buf.String(), "hello world") + } +} + +var encodeElementTests = []struct { + desc string + value interface{} + start StartElement + expectXML string +}{{ + desc: "simple string", + value: "hello", + start: StartElement{ + Name: Name{Local: "a"}, + }, + expectXML: `hello`, +}, { + desc: "string with added attributes", + value: "hello", + start: StartElement{ + Name: Name{Local: "a"}, + Attr: []Attr{{ + Name: Name{Local: "x"}, + Value: "y", + }, { + Name: Name{Local: "foo"}, + Value: "bar", + }}, + }, + expectXML: `hello`, +}, { + desc: "start element with default name space", + value: struct { + Foo XMLNameWithNSTag + }{ + Foo: XMLNameWithNSTag{ + Value: "hello", + }, + }, + start: StartElement{ + Name: Name{Space: "ns", Local: "a"}, + Attr: []Attr{{ + Name: Name{Local: "xmlns"}, + // "ns" is the name space defined in XMLNameWithNSTag + Value: "ns", + }}, + }, + expectXML: `hello`, +}, { + desc: "start element in name space with different default name space", + value: struct { + Foo XMLNameWithNSTag + }{ + Foo: XMLNameWithNSTag{ + Value: "hello", + }, + }, + start: StartElement{ + Name: Name{Space: "ns2", Local: "a"}, + Attr: []Attr{{ + Name: Name{Local: "xmlns"}, + // "ns" is the name space defined in XMLNameWithNSTag + Value: "ns", + }}, + }, + expectXML: `hello`, +}, { + desc: "XMLMarshaler with start element with default name space", + value: &MyMarshalerTest{}, + start: StartElement{ + Name: Name{Space: "ns2", Local: "a"}, + Attr: []Attr{{ + Name: Name{Local: "xmlns"}, + // "ns" is the name space defined in XMLNameWithNSTag + Value: "ns", + }}, + }, + expectXML: `hello world`, +}} + +func TestEncodeElement(t *testing.T) { + for idx, test := range encodeElementTests { + var buf bytes.Buffer + enc := NewEncoder(&buf) + err := enc.EncodeElement(test.value, test.start) + if err != nil { + t.Fatalf("enc.EncodeElement: %v", err) + } + err = enc.Flush() + if err != nil { + t.Fatalf("enc.Flush: %v", err) + } + if got, want := buf.String(), test.expectXML; got != want { + t.Errorf("#%d(%s): EncodeElement(%#v, %#v):\nhave %#q\nwant %#q", idx, test.desc, test.value, test.start, got, want) + } + } +} + +func BenchmarkMarshal(b *testing.B) { + b.ReportAllocs() + for i := 0; i < b.N; i++ { + Marshal(atomValue) + } +} + +func BenchmarkUnmarshal(b *testing.B) { + b.ReportAllocs() + xml := []byte(atomXml) + for i := 0; i < b.N; i++ { + Unmarshal(xml, &Feed{}) + } +} + +// golang.org/issue/6556 +func TestStructPointerMarshal(t *testing.T) { + type A struct { + XMLName string `xml:"a"` + B []interface{} + } + type C struct { + XMLName Name + Value string `xml:"value"` + } + + a := new(A) + a.B = append(a.B, &C{ + XMLName: Name{Local: "c"}, + Value: "x", + }) + + b, err := Marshal(a) + if err != nil { + t.Fatal(err) + } + if x := string(b); x != "x" { + t.Fatal(x) + } + var v A + err = Unmarshal(b, &v) + if err != nil { + t.Fatal(err) + } +} + +var encodeTokenTests = []struct { + desc string + toks []Token + want string + err string +}{{ + desc: "start element with name space", + toks: []Token{ + StartElement{Name{"space", "local"}, nil}, + }, + want: ``, +}, { + desc: "start element with no name", + toks: []Token{ + StartElement{Name{"space", ""}, nil}, + }, + err: "xml: start tag with no name", +}, { + desc: "end element with no name", + toks: []Token{ + EndElement{Name{"space", ""}}, + }, + err: "xml: end tag with no name", +}, { + desc: "char data", + toks: []Token{ + CharData("foo"), + }, + want: `foo`, +}, { + desc: "char data with escaped chars", + toks: []Token{ + CharData(" \t\n"), + }, + want: " \n", +}, { + desc: "comment", + toks: []Token{ + Comment("foo"), + }, + want: ``, +}, { + desc: "comment with invalid content", + toks: []Token{ + Comment("foo-->"), + }, + err: "xml: EncodeToken of Comment containing --> marker", +}, { + desc: "proc instruction", + toks: []Token{ + ProcInst{"Target", []byte("Instruction")}, + }, + want: ``, +}, { + desc: "proc instruction with empty target", + toks: []Token{ + ProcInst{"", []byte("Instruction")}, + }, + err: "xml: EncodeToken of ProcInst with invalid Target", +}, { + desc: "proc instruction with bad content", + toks: []Token{ + ProcInst{"", []byte("Instruction?>")}, + }, + err: "xml: EncodeToken of ProcInst with invalid Target", +}, { + desc: "directive", + toks: []Token{ + Directive("foo"), + }, + want: ``, +}, { + desc: "more complex directive", + toks: []Token{ + Directive("DOCTYPE doc [ '> ]"), + }, + want: `'> ]>`, +}, { + desc: "directive instruction with bad name", + toks: []Token{ + Directive("foo>"), + }, + err: "xml: EncodeToken of Directive containing wrong < or > markers", +}, { + desc: "end tag without start tag", + toks: []Token{ + EndElement{Name{"foo", "bar"}}, + }, + err: "xml: end tag without start tag", +}, { + desc: "mismatching end tag local name", + toks: []Token{ + StartElement{Name{"", "foo"}, nil}, + EndElement{Name{"", "bar"}}, + }, + err: "xml: end tag does not match start tag ", + want: ``, +}, { + desc: "mismatching end tag namespace", + toks: []Token{ + StartElement{Name{"space", "foo"}, nil}, + EndElement{Name{"another", "foo"}}, + }, + err: "xml: end tag in namespace another does not match start tag in namespace space", + want: ``, +}, { + desc: "start element with explicit namespace", + toks: []Token{ + StartElement{Name{"space", "local"}, []Attr{ + {Name{"xmlns", "x"}, "space"}, + {Name{"space", "foo"}, "value"}, + }}, + }, + want: ``, +}, { + desc: "start element with explicit namespace and colliding prefix", + toks: []Token{ + StartElement{Name{"space", "local"}, []Attr{ + {Name{"xmlns", "x"}, "space"}, + {Name{"space", "foo"}, "value"}, + {Name{"x", "bar"}, "other"}, + }}, + }, + want: ``, +}, { + desc: "start element using previously defined namespace", + toks: []Token{ + StartElement{Name{"", "local"}, []Attr{ + {Name{"xmlns", "x"}, "space"}, + }}, + StartElement{Name{"space", "foo"}, []Attr{ + {Name{"space", "x"}, "y"}, + }}, + }, + want: ``, +}, { + desc: "nested name space with same prefix", + toks: []Token{ + StartElement{Name{"", "foo"}, []Attr{ + {Name{"xmlns", "x"}, "space1"}, + }}, + StartElement{Name{"", "foo"}, []Attr{ + {Name{"xmlns", "x"}, "space2"}, + }}, + StartElement{Name{"", "foo"}, []Attr{ + {Name{"space1", "a"}, "space1 value"}, + {Name{"space2", "b"}, "space2 value"}, + }}, + EndElement{Name{"", "foo"}}, + EndElement{Name{"", "foo"}}, + StartElement{Name{"", "foo"}, []Attr{ + {Name{"space1", "a"}, "space1 value"}, + {Name{"space2", "b"}, "space2 value"}, + }}, + }, + want: ``, +}, { + desc: "start element defining several prefixes for the same name space", + toks: []Token{ + StartElement{Name{"space", "foo"}, []Attr{ + {Name{"xmlns", "a"}, "space"}, + {Name{"xmlns", "b"}, "space"}, + {Name{"space", "x"}, "value"}, + }}, + }, + want: ``, +}, { + desc: "nested element redefines name space", + toks: []Token{ + StartElement{Name{"", "foo"}, []Attr{ + {Name{"xmlns", "x"}, "space"}, + }}, + StartElement{Name{"space", "foo"}, []Attr{ + {Name{"xmlns", "y"}, "space"}, + {Name{"space", "a"}, "value"}, + }}, + }, + want: ``, +}, { + desc: "nested element creates alias for default name space", + toks: []Token{ + StartElement{Name{"space", "foo"}, []Attr{ + {Name{"", "xmlns"}, "space"}, + }}, + StartElement{Name{"space", "foo"}, []Attr{ + {Name{"xmlns", "y"}, "space"}, + {Name{"space", "a"}, "value"}, + }}, + }, + want: ``, +}, { + desc: "nested element defines default name space with existing prefix", + toks: []Token{ + StartElement{Name{"", "foo"}, []Attr{ + {Name{"xmlns", "x"}, "space"}, + }}, + StartElement{Name{"space", "foo"}, []Attr{ + {Name{"", "xmlns"}, "space"}, + {Name{"space", "a"}, "value"}, + }}, + }, + want: ``, +}, { + desc: "nested element uses empty attribute name space when default ns defined", + toks: []Token{ + StartElement{Name{"space", "foo"}, []Attr{ + {Name{"", "xmlns"}, "space"}, + }}, + StartElement{Name{"space", "foo"}, []Attr{ + {Name{"", "attr"}, "value"}, + }}, + }, + want: ``, +}, { + desc: "redefine xmlns", + toks: []Token{ + StartElement{Name{"", "foo"}, []Attr{ + {Name{"foo", "xmlns"}, "space"}, + }}, + }, + err: `xml: cannot redefine xmlns attribute prefix`, +}, { + desc: "xmlns with explicit name space #1", + toks: []Token{ + StartElement{Name{"space", "foo"}, []Attr{ + {Name{"xml", "xmlns"}, "space"}, + }}, + }, + want: ``, +}, { + desc: "xmlns with explicit name space #2", + toks: []Token{ + StartElement{Name{"space", "foo"}, []Attr{ + {Name{xmlURL, "xmlns"}, "space"}, + }}, + }, + want: ``, +}, { + desc: "empty name space declaration is ignored", + toks: []Token{ + StartElement{Name{"", "foo"}, []Attr{ + {Name{"xmlns", "foo"}, ""}, + }}, + }, + want: ``, +}, { + desc: "attribute with no name is ignored", + toks: []Token{ + StartElement{Name{"", "foo"}, []Attr{ + {Name{"", ""}, "value"}, + }}, + }, + want: ``, +}, { + desc: "namespace URL with non-valid name", + toks: []Token{ + StartElement{Name{"/34", "foo"}, []Attr{ + {Name{"/34", "x"}, "value"}, + }}, + }, + want: `<_:foo xmlns:_="/34" _:x="value">`, +}, { + desc: "nested element resets default namespace to empty", + toks: []Token{ + StartElement{Name{"space", "foo"}, []Attr{ + {Name{"", "xmlns"}, "space"}, + }}, + StartElement{Name{"", "foo"}, []Attr{ + {Name{"", "xmlns"}, ""}, + {Name{"", "x"}, "value"}, + {Name{"space", "x"}, "value"}, + }}, + }, + want: ``, +}, { + desc: "nested element requires empty default name space", + toks: []Token{ + StartElement{Name{"space", "foo"}, []Attr{ + {Name{"", "xmlns"}, "space"}, + }}, + StartElement{Name{"", "foo"}, nil}, + }, + want: ``, +}, { + desc: "attribute uses name space from xmlns", + toks: []Token{ + StartElement{Name{"some/space", "foo"}, []Attr{ + {Name{"", "attr"}, "value"}, + {Name{"some/space", "other"}, "other value"}, + }}, + }, + want: ``, +}, { + desc: "default name space should not be used by attributes", + toks: []Token{ + StartElement{Name{"space", "foo"}, []Attr{ + {Name{"", "xmlns"}, "space"}, + {Name{"xmlns", "bar"}, "space"}, + {Name{"space", "baz"}, "foo"}, + }}, + StartElement{Name{"space", "baz"}, nil}, + EndElement{Name{"space", "baz"}}, + EndElement{Name{"space", "foo"}}, + }, + want: ``, +}, { + desc: "default name space not used by attributes, not explicitly defined", + toks: []Token{ + StartElement{Name{"space", "foo"}, []Attr{ + {Name{"", "xmlns"}, "space"}, + {Name{"space", "baz"}, "foo"}, + }}, + StartElement{Name{"space", "baz"}, nil}, + EndElement{Name{"space", "baz"}}, + EndElement{Name{"space", "foo"}}, + }, + want: ``, +}, { + desc: "impossible xmlns declaration", + toks: []Token{ + StartElement{Name{"", "foo"}, []Attr{ + {Name{"", "xmlns"}, "space"}, + }}, + StartElement{Name{"space", "bar"}, []Attr{ + {Name{"space", "attr"}, "value"}, + }}, + }, + want: ``, +}} + +func TestEncodeToken(t *testing.T) { +loop: + for i, tt := range encodeTokenTests { + var buf bytes.Buffer + enc := NewEncoder(&buf) + var err error + for j, tok := range tt.toks { + err = enc.EncodeToken(tok) + if err != nil && j < len(tt.toks)-1 { + t.Errorf("#%d %s token #%d: %v", i, tt.desc, j, err) + continue loop + } + } + errorf := func(f string, a ...interface{}) { + t.Errorf("#%d %s token #%d:%s", i, tt.desc, len(tt.toks)-1, fmt.Sprintf(f, a...)) + } + switch { + case tt.err != "" && err == nil: + errorf(" expected error; got none") + continue + case tt.err == "" && err != nil: + errorf(" got error: %v", err) + continue + case tt.err != "" && err != nil && tt.err != err.Error(): + errorf(" error mismatch; got %v, want %v", err, tt.err) + continue + } + if err := enc.Flush(); err != nil { + errorf(" %v", err) + continue + } + if got := buf.String(); got != tt.want { + errorf("\ngot %v\nwant %v", got, tt.want) + continue + } + } +} + +func TestProcInstEncodeToken(t *testing.T) { + var buf bytes.Buffer + enc := NewEncoder(&buf) + + if err := enc.EncodeToken(ProcInst{"xml", []byte("Instruction")}); err != nil { + t.Fatalf("enc.EncodeToken: expected to be able to encode xml target ProcInst as first token, %s", err) + } + + if err := enc.EncodeToken(ProcInst{"Target", []byte("Instruction")}); err != nil { + t.Fatalf("enc.EncodeToken: expected to be able to add non-xml target ProcInst") + } + + if err := enc.EncodeToken(ProcInst{"xml", []byte("Instruction")}); err == nil { + t.Fatalf("enc.EncodeToken: expected to not be allowed to encode xml target ProcInst when not first token") + } +} + +func TestDecodeEncode(t *testing.T) { + var in, out bytes.Buffer + in.WriteString(` + + + +`) + dec := NewDecoder(&in) + enc := NewEncoder(&out) + for tok, err := dec.Token(); err == nil; tok, err = dec.Token() { + err = enc.EncodeToken(tok) + if err != nil { + t.Fatalf("enc.EncodeToken: Unable to encode token (%#v), %v", tok, err) + } + } +} + +// Issue 9796. Used to fail with GORACE="halt_on_error=1" -race. +func TestRace9796(t *testing.T) { + type A struct{} + type B struct { + C []A `xml:"X>Y"` + } + var wg sync.WaitGroup + for i := 0; i < 2; i++ { + wg.Add(1) + go func() { + Marshal(B{[]A{A{}}}) + wg.Done() + }() + } + wg.Wait() +} + +func TestIsValidDirective(t *testing.T) { + testOK := []string{ + "<>", + "< < > >", + "' '>' >", + " ]>", + " '<' ' doc ANY> ]>", + ">>> a < comment --> [ ] >", + } + testKO := []string{ + "<", + ">", + "", + "< > > < < >", + " -->", + "", + "'", + "", + } + for _, s := range testOK { + if !isValidDirective(Directive(s)) { + t.Errorf("Directive %q is expected to be valid", s) + } + } + for _, s := range testKO { + if isValidDirective(Directive(s)) { + t.Errorf("Directive %q is expected to be invalid", s) + } + } +} + +// Issue 11719. EncodeToken used to silently eat tokens with an invalid type. +func TestSimpleUseOfEncodeToken(t *testing.T) { + var buf bytes.Buffer + enc := NewEncoder(&buf) + if err := enc.EncodeToken(&StartElement{Name: Name{"", "object1"}}); err == nil { + t.Errorf("enc.EncodeToken: pointer type should be rejected") + } + if err := enc.EncodeToken(&EndElement{Name: Name{"", "object1"}}); err == nil { + t.Errorf("enc.EncodeToken: pointer type should be rejected") + } + if err := enc.EncodeToken(StartElement{Name: Name{"", "object2"}}); err != nil { + t.Errorf("enc.EncodeToken: StartElement %s", err) + } + if err := enc.EncodeToken(EndElement{Name: Name{"", "object2"}}); err != nil { + t.Errorf("enc.EncodeToken: EndElement %s", err) + } + if err := enc.EncodeToken(Universe{}); err == nil { + t.Errorf("enc.EncodeToken: invalid type not caught") + } + if err := enc.Flush(); err != nil { + t.Errorf("enc.Flush: %s", err) + } + if buf.Len() == 0 { + t.Errorf("enc.EncodeToken: empty buffer") + } + want := "" + if buf.String() != want { + t.Errorf("enc.EncodeToken: expected %q; got %q", want, buf.String()) + } +} diff --git a/vendor/golang.org/x/net/webdav/internal/xml/read.go b/vendor/golang.org/x/net/webdav/internal/xml/read.go new file mode 100644 index 0000000..75b9f2b --- /dev/null +++ b/vendor/golang.org/x/net/webdav/internal/xml/read.go @@ -0,0 +1,692 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package xml + +import ( + "bytes" + "encoding" + "errors" + "fmt" + "reflect" + "strconv" + "strings" +) + +// BUG(rsc): Mapping between XML elements and data structures is inherently flawed: +// an XML element is an order-dependent collection of anonymous +// values, while a data structure is an order-independent collection +// of named values. +// See package json for a textual representation more suitable +// to data structures. + +// Unmarshal parses the XML-encoded data and stores the result in +// the value pointed to by v, which must be an arbitrary struct, +// slice, or string. Well-formed data that does not fit into v is +// discarded. +// +// Because Unmarshal uses the reflect package, it can only assign +// to exported (upper case) fields. Unmarshal uses a case-sensitive +// comparison to match XML element names to tag values and struct +// field names. +// +// Unmarshal maps an XML element to a struct using the following rules. +// In the rules, the tag of a field refers to the value associated with the +// key 'xml' in the struct field's tag (see the example above). +// +// * If the struct has a field of type []byte or string with tag +// ",innerxml", Unmarshal accumulates the raw XML nested inside the +// element in that field. The rest of the rules still apply. +// +// * If the struct has a field named XMLName of type xml.Name, +// Unmarshal records the element name in that field. +// +// * If the XMLName field has an associated tag of the form +// "name" or "namespace-URL name", the XML element must have +// the given name (and, optionally, name space) or else Unmarshal +// returns an error. +// +// * If the XML element has an attribute whose name matches a +// struct field name with an associated tag containing ",attr" or +// the explicit name in a struct field tag of the form "name,attr", +// Unmarshal records the attribute value in that field. +// +// * If the XML element contains character data, that data is +// accumulated in the first struct field that has tag ",chardata". +// The struct field may have type []byte or string. +// If there is no such field, the character data is discarded. +// +// * If the XML element contains comments, they are accumulated in +// the first struct field that has tag ",comment". The struct +// field may have type []byte or string. If there is no such +// field, the comments are discarded. +// +// * If the XML element contains a sub-element whose name matches +// the prefix of a tag formatted as "a" or "a>b>c", unmarshal +// will descend into the XML structure looking for elements with the +// given names, and will map the innermost elements to that struct +// field. A tag starting with ">" is equivalent to one starting +// with the field name followed by ">". +// +// * If the XML element contains a sub-element whose name matches +// a struct field's XMLName tag and the struct field has no +// explicit name tag as per the previous rule, unmarshal maps +// the sub-element to that struct field. +// +// * If the XML element contains a sub-element whose name matches a +// field without any mode flags (",attr", ",chardata", etc), Unmarshal +// maps the sub-element to that struct field. +// +// * If the XML element contains a sub-element that hasn't matched any +// of the above rules and the struct has a field with tag ",any", +// unmarshal maps the sub-element to that struct field. +// +// * An anonymous struct field is handled as if the fields of its +// value were part of the outer struct. +// +// * A struct field with tag "-" is never unmarshalled into. +// +// Unmarshal maps an XML element to a string or []byte by saving the +// concatenation of that element's character data in the string or +// []byte. The saved []byte is never nil. +// +// Unmarshal maps an attribute value to a string or []byte by saving +// the value in the string or slice. +// +// Unmarshal maps an XML element to a slice by extending the length of +// the slice and mapping the element to the newly created value. +// +// Unmarshal maps an XML element or attribute value to a bool by +// setting it to the boolean value represented by the string. +// +// Unmarshal maps an XML element or attribute value to an integer or +// floating-point field by setting the field to the result of +// interpreting the string value in decimal. There is no check for +// overflow. +// +// Unmarshal maps an XML element to an xml.Name by recording the +// element name. +// +// Unmarshal maps an XML element to a pointer by setting the pointer +// to a freshly allocated value and then mapping the element to that value. +// +func Unmarshal(data []byte, v interface{}) error { + return NewDecoder(bytes.NewReader(data)).Decode(v) +} + +// Decode works like xml.Unmarshal, except it reads the decoder +// stream to find the start element. +func (d *Decoder) Decode(v interface{}) error { + return d.DecodeElement(v, nil) +} + +// DecodeElement works like xml.Unmarshal except that it takes +// a pointer to the start XML element to decode into v. +// It is useful when a client reads some raw XML tokens itself +// but also wants to defer to Unmarshal for some elements. +func (d *Decoder) DecodeElement(v interface{}, start *StartElement) error { + val := reflect.ValueOf(v) + if val.Kind() != reflect.Ptr { + return errors.New("non-pointer passed to Unmarshal") + } + return d.unmarshal(val.Elem(), start) +} + +// An UnmarshalError represents an error in the unmarshalling process. +type UnmarshalError string + +func (e UnmarshalError) Error() string { return string(e) } + +// Unmarshaler is the interface implemented by objects that can unmarshal +// an XML element description of themselves. +// +// UnmarshalXML decodes a single XML element +// beginning with the given start element. +// If it returns an error, the outer call to Unmarshal stops and +// returns that error. +// UnmarshalXML must consume exactly one XML element. +// One common implementation strategy is to unmarshal into +// a separate value with a layout matching the expected XML +// using d.DecodeElement, and then to copy the data from +// that value into the receiver. +// Another common strategy is to use d.Token to process the +// XML object one token at a time. +// UnmarshalXML may not use d.RawToken. +type Unmarshaler interface { + UnmarshalXML(d *Decoder, start StartElement) error +} + +// UnmarshalerAttr is the interface implemented by objects that can unmarshal +// an XML attribute description of themselves. +// +// UnmarshalXMLAttr decodes a single XML attribute. +// If it returns an error, the outer call to Unmarshal stops and +// returns that error. +// UnmarshalXMLAttr is used only for struct fields with the +// "attr" option in the field tag. +type UnmarshalerAttr interface { + UnmarshalXMLAttr(attr Attr) error +} + +// receiverType returns the receiver type to use in an expression like "%s.MethodName". +func receiverType(val interface{}) string { + t := reflect.TypeOf(val) + if t.Name() != "" { + return t.String() + } + return "(" + t.String() + ")" +} + +// unmarshalInterface unmarshals a single XML element into val. +// start is the opening tag of the element. +func (p *Decoder) unmarshalInterface(val Unmarshaler, start *StartElement) error { + // Record that decoder must stop at end tag corresponding to start. + p.pushEOF() + + p.unmarshalDepth++ + err := val.UnmarshalXML(p, *start) + p.unmarshalDepth-- + if err != nil { + p.popEOF() + return err + } + + if !p.popEOF() { + return fmt.Errorf("xml: %s.UnmarshalXML did not consume entire <%s> element", receiverType(val), start.Name.Local) + } + + return nil +} + +// unmarshalTextInterface unmarshals a single XML element into val. +// The chardata contained in the element (but not its children) +// is passed to the text unmarshaler. +func (p *Decoder) unmarshalTextInterface(val encoding.TextUnmarshaler, start *StartElement) error { + var buf []byte + depth := 1 + for depth > 0 { + t, err := p.Token() + if err != nil { + return err + } + switch t := t.(type) { + case CharData: + if depth == 1 { + buf = append(buf, t...) + } + case StartElement: + depth++ + case EndElement: + depth-- + } + } + return val.UnmarshalText(buf) +} + +// unmarshalAttr unmarshals a single XML attribute into val. +func (p *Decoder) unmarshalAttr(val reflect.Value, attr Attr) error { + if val.Kind() == reflect.Ptr { + if val.IsNil() { + val.Set(reflect.New(val.Type().Elem())) + } + val = val.Elem() + } + + if val.CanInterface() && val.Type().Implements(unmarshalerAttrType) { + // This is an unmarshaler with a non-pointer receiver, + // so it's likely to be incorrect, but we do what we're told. + return val.Interface().(UnmarshalerAttr).UnmarshalXMLAttr(attr) + } + if val.CanAddr() { + pv := val.Addr() + if pv.CanInterface() && pv.Type().Implements(unmarshalerAttrType) { + return pv.Interface().(UnmarshalerAttr).UnmarshalXMLAttr(attr) + } + } + + // Not an UnmarshalerAttr; try encoding.TextUnmarshaler. + if val.CanInterface() && val.Type().Implements(textUnmarshalerType) { + // This is an unmarshaler with a non-pointer receiver, + // so it's likely to be incorrect, but we do what we're told. + return val.Interface().(encoding.TextUnmarshaler).UnmarshalText([]byte(attr.Value)) + } + if val.CanAddr() { + pv := val.Addr() + if pv.CanInterface() && pv.Type().Implements(textUnmarshalerType) { + return pv.Interface().(encoding.TextUnmarshaler).UnmarshalText([]byte(attr.Value)) + } + } + + copyValue(val, []byte(attr.Value)) + return nil +} + +var ( + unmarshalerType = reflect.TypeOf((*Unmarshaler)(nil)).Elem() + unmarshalerAttrType = reflect.TypeOf((*UnmarshalerAttr)(nil)).Elem() + textUnmarshalerType = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem() +) + +// Unmarshal a single XML element into val. +func (p *Decoder) unmarshal(val reflect.Value, start *StartElement) error { + // Find start element if we need it. + if start == nil { + for { + tok, err := p.Token() + if err != nil { + return err + } + if t, ok := tok.(StartElement); ok { + start = &t + break + } + } + } + + // Load value from interface, but only if the result will be + // usefully addressable. + if val.Kind() == reflect.Interface && !val.IsNil() { + e := val.Elem() + if e.Kind() == reflect.Ptr && !e.IsNil() { + val = e + } + } + + if val.Kind() == reflect.Ptr { + if val.IsNil() { + val.Set(reflect.New(val.Type().Elem())) + } + val = val.Elem() + } + + if val.CanInterface() && val.Type().Implements(unmarshalerType) { + // This is an unmarshaler with a non-pointer receiver, + // so it's likely to be incorrect, but we do what we're told. + return p.unmarshalInterface(val.Interface().(Unmarshaler), start) + } + + if val.CanAddr() { + pv := val.Addr() + if pv.CanInterface() && pv.Type().Implements(unmarshalerType) { + return p.unmarshalInterface(pv.Interface().(Unmarshaler), start) + } + } + + if val.CanInterface() && val.Type().Implements(textUnmarshalerType) { + return p.unmarshalTextInterface(val.Interface().(encoding.TextUnmarshaler), start) + } + + if val.CanAddr() { + pv := val.Addr() + if pv.CanInterface() && pv.Type().Implements(textUnmarshalerType) { + return p.unmarshalTextInterface(pv.Interface().(encoding.TextUnmarshaler), start) + } + } + + var ( + data []byte + saveData reflect.Value + comment []byte + saveComment reflect.Value + saveXML reflect.Value + saveXMLIndex int + saveXMLData []byte + saveAny reflect.Value + sv reflect.Value + tinfo *typeInfo + err error + ) + + switch v := val; v.Kind() { + default: + return errors.New("unknown type " + v.Type().String()) + + case reflect.Interface: + // TODO: For now, simply ignore the field. In the near + // future we may choose to unmarshal the start + // element on it, if not nil. + return p.Skip() + + case reflect.Slice: + typ := v.Type() + if typ.Elem().Kind() == reflect.Uint8 { + // []byte + saveData = v + break + } + + // Slice of element values. + // Grow slice. + n := v.Len() + if n >= v.Cap() { + ncap := 2 * n + if ncap < 4 { + ncap = 4 + } + new := reflect.MakeSlice(typ, n, ncap) + reflect.Copy(new, v) + v.Set(new) + } + v.SetLen(n + 1) + + // Recur to read element into slice. + if err := p.unmarshal(v.Index(n), start); err != nil { + v.SetLen(n) + return err + } + return nil + + case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, reflect.String: + saveData = v + + case reflect.Struct: + typ := v.Type() + if typ == nameType { + v.Set(reflect.ValueOf(start.Name)) + break + } + + sv = v + tinfo, err = getTypeInfo(typ) + if err != nil { + return err + } + + // Validate and assign element name. + if tinfo.xmlname != nil { + finfo := tinfo.xmlname + if finfo.name != "" && finfo.name != start.Name.Local { + return UnmarshalError("expected element type <" + finfo.name + "> but have <" + start.Name.Local + ">") + } + if finfo.xmlns != "" && finfo.xmlns != start.Name.Space { + e := "expected element <" + finfo.name + "> in name space " + finfo.xmlns + " but have " + if start.Name.Space == "" { + e += "no name space" + } else { + e += start.Name.Space + } + return UnmarshalError(e) + } + fv := finfo.value(sv) + if _, ok := fv.Interface().(Name); ok { + fv.Set(reflect.ValueOf(start.Name)) + } + } + + // Assign attributes. + // Also, determine whether we need to save character data or comments. + for i := range tinfo.fields { + finfo := &tinfo.fields[i] + switch finfo.flags & fMode { + case fAttr: + strv := finfo.value(sv) + // Look for attribute. + for _, a := range start.Attr { + if a.Name.Local == finfo.name && (finfo.xmlns == "" || finfo.xmlns == a.Name.Space) { + if err := p.unmarshalAttr(strv, a); err != nil { + return err + } + break + } + } + + case fCharData: + if !saveData.IsValid() { + saveData = finfo.value(sv) + } + + case fComment: + if !saveComment.IsValid() { + saveComment = finfo.value(sv) + } + + case fAny, fAny | fElement: + if !saveAny.IsValid() { + saveAny = finfo.value(sv) + } + + case fInnerXml: + if !saveXML.IsValid() { + saveXML = finfo.value(sv) + if p.saved == nil { + saveXMLIndex = 0 + p.saved = new(bytes.Buffer) + } else { + saveXMLIndex = p.savedOffset() + } + } + } + } + } + + // Find end element. + // Process sub-elements along the way. +Loop: + for { + var savedOffset int + if saveXML.IsValid() { + savedOffset = p.savedOffset() + } + tok, err := p.Token() + if err != nil { + return err + } + switch t := tok.(type) { + case StartElement: + consumed := false + if sv.IsValid() { + consumed, err = p.unmarshalPath(tinfo, sv, nil, &t) + if err != nil { + return err + } + if !consumed && saveAny.IsValid() { + consumed = true + if err := p.unmarshal(saveAny, &t); err != nil { + return err + } + } + } + if !consumed { + if err := p.Skip(); err != nil { + return err + } + } + + case EndElement: + if saveXML.IsValid() { + saveXMLData = p.saved.Bytes()[saveXMLIndex:savedOffset] + if saveXMLIndex == 0 { + p.saved = nil + } + } + break Loop + + case CharData: + if saveData.IsValid() { + data = append(data, t...) + } + + case Comment: + if saveComment.IsValid() { + comment = append(comment, t...) + } + } + } + + if saveData.IsValid() && saveData.CanInterface() && saveData.Type().Implements(textUnmarshalerType) { + if err := saveData.Interface().(encoding.TextUnmarshaler).UnmarshalText(data); err != nil { + return err + } + saveData = reflect.Value{} + } + + if saveData.IsValid() && saveData.CanAddr() { + pv := saveData.Addr() + if pv.CanInterface() && pv.Type().Implements(textUnmarshalerType) { + if err := pv.Interface().(encoding.TextUnmarshaler).UnmarshalText(data); err != nil { + return err + } + saveData = reflect.Value{} + } + } + + if err := copyValue(saveData, data); err != nil { + return err + } + + switch t := saveComment; t.Kind() { + case reflect.String: + t.SetString(string(comment)) + case reflect.Slice: + t.Set(reflect.ValueOf(comment)) + } + + switch t := saveXML; t.Kind() { + case reflect.String: + t.SetString(string(saveXMLData)) + case reflect.Slice: + t.Set(reflect.ValueOf(saveXMLData)) + } + + return nil +} + +func copyValue(dst reflect.Value, src []byte) (err error) { + dst0 := dst + + if dst.Kind() == reflect.Ptr { + if dst.IsNil() { + dst.Set(reflect.New(dst.Type().Elem())) + } + dst = dst.Elem() + } + + // Save accumulated data. + switch dst.Kind() { + case reflect.Invalid: + // Probably a comment. + default: + return errors.New("cannot unmarshal into " + dst0.Type().String()) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + itmp, err := strconv.ParseInt(string(src), 10, dst.Type().Bits()) + if err != nil { + return err + } + dst.SetInt(itmp) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + utmp, err := strconv.ParseUint(string(src), 10, dst.Type().Bits()) + if err != nil { + return err + } + dst.SetUint(utmp) + case reflect.Float32, reflect.Float64: + ftmp, err := strconv.ParseFloat(string(src), dst.Type().Bits()) + if err != nil { + return err + } + dst.SetFloat(ftmp) + case reflect.Bool: + value, err := strconv.ParseBool(strings.TrimSpace(string(src))) + if err != nil { + return err + } + dst.SetBool(value) + case reflect.String: + dst.SetString(string(src)) + case reflect.Slice: + if len(src) == 0 { + // non-nil to flag presence + src = []byte{} + } + dst.SetBytes(src) + } + return nil +} + +// unmarshalPath walks down an XML structure looking for wanted +// paths, and calls unmarshal on them. +// The consumed result tells whether XML elements have been consumed +// from the Decoder until start's matching end element, or if it's +// still untouched because start is uninteresting for sv's fields. +func (p *Decoder) unmarshalPath(tinfo *typeInfo, sv reflect.Value, parents []string, start *StartElement) (consumed bool, err error) { + recurse := false +Loop: + for i := range tinfo.fields { + finfo := &tinfo.fields[i] + if finfo.flags&fElement == 0 || len(finfo.parents) < len(parents) || finfo.xmlns != "" && finfo.xmlns != start.Name.Space { + continue + } + for j := range parents { + if parents[j] != finfo.parents[j] { + continue Loop + } + } + if len(finfo.parents) == len(parents) && finfo.name == start.Name.Local { + // It's a perfect match, unmarshal the field. + return true, p.unmarshal(finfo.value(sv), start) + } + if len(finfo.parents) > len(parents) && finfo.parents[len(parents)] == start.Name.Local { + // It's a prefix for the field. Break and recurse + // since it's not ok for one field path to be itself + // the prefix for another field path. + recurse = true + + // We can reuse the same slice as long as we + // don't try to append to it. + parents = finfo.parents[:len(parents)+1] + break + } + } + if !recurse { + // We have no business with this element. + return false, nil + } + // The element is not a perfect match for any field, but one + // or more fields have the path to this element as a parent + // prefix. Recurse and attempt to match these. + for { + var tok Token + tok, err = p.Token() + if err != nil { + return true, err + } + switch t := tok.(type) { + case StartElement: + consumed2, err := p.unmarshalPath(tinfo, sv, parents, &t) + if err != nil { + return true, err + } + if !consumed2 { + if err := p.Skip(); err != nil { + return true, err + } + } + case EndElement: + return true, nil + } + } +} + +// Skip reads tokens until it has consumed the end element +// matching the most recent start element already consumed. +// It recurs if it encounters a start element, so it can be used to +// skip nested structures. +// It returns nil if it finds an end element matching the start +// element; otherwise it returns an error describing the problem. +func (d *Decoder) Skip() error { + for { + tok, err := d.Token() + if err != nil { + return err + } + switch tok.(type) { + case StartElement: + if err := d.Skip(); err != nil { + return err + } + case EndElement: + return nil + } + } +} diff --git a/vendor/golang.org/x/net/webdav/internal/xml/read_test.go b/vendor/golang.org/x/net/webdav/internal/xml/read_test.go new file mode 100644 index 0000000..02f1e10 --- /dev/null +++ b/vendor/golang.org/x/net/webdav/internal/xml/read_test.go @@ -0,0 +1,744 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package xml + +import ( + "bytes" + "fmt" + "io" + "reflect" + "strings" + "testing" + "time" +) + +// Stripped down Atom feed data structures. + +func TestUnmarshalFeed(t *testing.T) { + var f Feed + if err := Unmarshal([]byte(atomFeedString), &f); err != nil { + t.Fatalf("Unmarshal: %s", err) + } + if !reflect.DeepEqual(f, atomFeed) { + t.Fatalf("have %#v\nwant %#v", f, atomFeed) + } +} + +// hget http://codereview.appspot.com/rss/mine/rsc +const atomFeedString = ` + +Code Review - My issueshttp://codereview.appspot.com/rietveld<>rietveld: an attempt at pubsubhubbub +2009-10-04T01:35:58+00:00email-address-removedurn:md5:134d9179c41f806be79b3a5f7877d19a + An attempt at adding pubsubhubbub support to Rietveld. +http://code.google.com/p/pubsubhubbub +http://code.google.com/p/rietveld/issues/detail?id=155 + +The server side of the protocol is trivial: + 1. add a &lt;link rel=&quot;hub&quot; href=&quot;hub-server&quot;&gt; tag to all + feeds that will be pubsubhubbubbed. + 2. every time one of those feeds changes, tell the hub + with a simple POST request. + +I have tested this by adding debug prints to a local hub +server and checking that the server got the right publish +requests. + +I can&#39;t quite get the server to work, but I think the bug +is not in my code. I think that the server expects to be +able to grab the feed and see the feed&#39;s actual URL in +the link rel=&quot;self&quot;, but the default value for that drops +the :port from the URL, and I cannot for the life of me +figure out how to get the Atom generator deep inside +django not to do that, or even where it is doing that, +or even what code is running to generate the Atom feed. +(I thought I knew but I added some assert False statements +and it kept running!) + +Ignoring that particular problem, I would appreciate +feedback on the right way to get the two values at +the top of feeds.py marked NOTE(rsc). + + +rietveld: correct tab handling +2009-10-03T23:02:17+00:00email-address-removedurn:md5:0a2a4f19bb815101f0ba2904aed7c35a + This fixes the buggy tab rendering that can be seen at +http://codereview.appspot.com/116075/diff/1/2 + +The fundamental problem was that the tab code was +not being told what column the text began in, so it +didn&#39;t know where to put the tab stops. Another problem +was that some of the code assumed that string byte +offsets were the same as column offsets, which is only +true if there are no tabs. + +In the process of fixing this, I cleaned up the arguments +to Fold and ExpandTabs and renamed them Break and +_ExpandTabs so that I could be sure that I found all the +call sites. I also wanted to verify that ExpandTabs was +not being used from outside intra_region_diff.py. + + + ` + +type Feed struct { + XMLName Name `xml:"http://www.w3.org/2005/Atom feed"` + Title string `xml:"title"` + Id string `xml:"id"` + Link []Link `xml:"link"` + Updated time.Time `xml:"updated,attr"` + Author Person `xml:"author"` + Entry []Entry `xml:"entry"` +} + +type Entry struct { + Title string `xml:"title"` + Id string `xml:"id"` + Link []Link `xml:"link"` + Updated time.Time `xml:"updated"` + Author Person `xml:"author"` + Summary Text `xml:"summary"` +} + +type Link struct { + Rel string `xml:"rel,attr,omitempty"` + Href string `xml:"href,attr"` +} + +type Person struct { + Name string `xml:"name"` + URI string `xml:"uri"` + Email string `xml:"email"` + InnerXML string `xml:",innerxml"` +} + +type Text struct { + Type string `xml:"type,attr,omitempty"` + Body string `xml:",chardata"` +} + +var atomFeed = Feed{ + XMLName: Name{"http://www.w3.org/2005/Atom", "feed"}, + Title: "Code Review - My issues", + Link: []Link{ + {Rel: "alternate", Href: "http://codereview.appspot.com/"}, + {Rel: "self", Href: "http://codereview.appspot.com/rss/mine/rsc"}, + }, + Id: "http://codereview.appspot.com/", + Updated: ParseTime("2009-10-04T01:35:58+00:00"), + Author: Person{ + Name: "rietveld<>", + InnerXML: "rietveld<>", + }, + Entry: []Entry{ + { + Title: "rietveld: an attempt at pubsubhubbub\n", + Link: []Link{ + {Rel: "alternate", Href: "http://codereview.appspot.com/126085"}, + }, + Updated: ParseTime("2009-10-04T01:35:58+00:00"), + Author: Person{ + Name: "email-address-removed", + InnerXML: "email-address-removed", + }, + Id: "urn:md5:134d9179c41f806be79b3a5f7877d19a", + Summary: Text{ + Type: "html", + Body: ` + An attempt at adding pubsubhubbub support to Rietveld. +http://code.google.com/p/pubsubhubbub +http://code.google.com/p/rietveld/issues/detail?id=155 + +The server side of the protocol is trivial: + 1. add a <link rel="hub" href="hub-server"> tag to all + feeds that will be pubsubhubbubbed. + 2. every time one of those feeds changes, tell the hub + with a simple POST request. + +I have tested this by adding debug prints to a local hub +server and checking that the server got the right publish +requests. + +I can't quite get the server to work, but I think the bug +is not in my code. I think that the server expects to be +able to grab the feed and see the feed's actual URL in +the link rel="self", but the default value for that drops +the :port from the URL, and I cannot for the life of me +figure out how to get the Atom generator deep inside +django not to do that, or even where it is doing that, +or even what code is running to generate the Atom feed. +(I thought I knew but I added some assert False statements +and it kept running!) + +Ignoring that particular problem, I would appreciate +feedback on the right way to get the two values at +the top of feeds.py marked NOTE(rsc). + + +`, + }, + }, + { + Title: "rietveld: correct tab handling\n", + Link: []Link{ + {Rel: "alternate", Href: "http://codereview.appspot.com/124106"}, + }, + Updated: ParseTime("2009-10-03T23:02:17+00:00"), + Author: Person{ + Name: "email-address-removed", + InnerXML: "email-address-removed", + }, + Id: "urn:md5:0a2a4f19bb815101f0ba2904aed7c35a", + Summary: Text{ + Type: "html", + Body: ` + This fixes the buggy tab rendering that can be seen at +http://codereview.appspot.com/116075/diff/1/2 + +The fundamental problem was that the tab code was +not being told what column the text began in, so it +didn't know where to put the tab stops. Another problem +was that some of the code assumed that string byte +offsets were the same as column offsets, which is only +true if there are no tabs. + +In the process of fixing this, I cleaned up the arguments +to Fold and ExpandTabs and renamed them Break and +_ExpandTabs so that I could be sure that I found all the +call sites. I also wanted to verify that ExpandTabs was +not being used from outside intra_region_diff.py. + + +`, + }, + }, + }, +} + +const pathTestString = ` + + 1 + + + A + + + B + + + C + D + + <_> + E + + + 2 + +` + +type PathTestItem struct { + Value string +} + +type PathTestA struct { + Items []PathTestItem `xml:">Item1"` + Before, After string +} + +type PathTestB struct { + Other []PathTestItem `xml:"Items>Item1"` + Before, After string +} + +type PathTestC struct { + Values1 []string `xml:"Items>Item1>Value"` + Values2 []string `xml:"Items>Item2>Value"` + Before, After string +} + +type PathTestSet struct { + Item1 []PathTestItem +} + +type PathTestD struct { + Other PathTestSet `xml:"Items"` + Before, After string +} + +type PathTestE struct { + Underline string `xml:"Items>_>Value"` + Before, After string +} + +var pathTests = []interface{}{ + &PathTestA{Items: []PathTestItem{{"A"}, {"D"}}, Before: "1", After: "2"}, + &PathTestB{Other: []PathTestItem{{"A"}, {"D"}}, Before: "1", After: "2"}, + &PathTestC{Values1: []string{"A", "C", "D"}, Values2: []string{"B"}, Before: "1", After: "2"}, + &PathTestD{Other: PathTestSet{Item1: []PathTestItem{{"A"}, {"D"}}}, Before: "1", After: "2"}, + &PathTestE{Underline: "E", Before: "1", After: "2"}, +} + +func TestUnmarshalPaths(t *testing.T) { + for _, pt := range pathTests { + v := reflect.New(reflect.TypeOf(pt).Elem()).Interface() + if err := Unmarshal([]byte(pathTestString), v); err != nil { + t.Fatalf("Unmarshal: %s", err) + } + if !reflect.DeepEqual(v, pt) { + t.Fatalf("have %#v\nwant %#v", v, pt) + } + } +} + +type BadPathTestA struct { + First string `xml:"items>item1"` + Other string `xml:"items>item2"` + Second string `xml:"items"` +} + +type BadPathTestB struct { + Other string `xml:"items>item2>value"` + First string `xml:"items>item1"` + Second string `xml:"items>item1>value"` +} + +type BadPathTestC struct { + First string + Second string `xml:"First"` +} + +type BadPathTestD struct { + BadPathEmbeddedA + BadPathEmbeddedB +} + +type BadPathEmbeddedA struct { + First string +} + +type BadPathEmbeddedB struct { + Second string `xml:"First"` +} + +var badPathTests = []struct { + v, e interface{} +}{ + {&BadPathTestA{}, &TagPathError{reflect.TypeOf(BadPathTestA{}), "First", "items>item1", "Second", "items"}}, + {&BadPathTestB{}, &TagPathError{reflect.TypeOf(BadPathTestB{}), "First", "items>item1", "Second", "items>item1>value"}}, + {&BadPathTestC{}, &TagPathError{reflect.TypeOf(BadPathTestC{}), "First", "", "Second", "First"}}, + {&BadPathTestD{}, &TagPathError{reflect.TypeOf(BadPathTestD{}), "First", "", "Second", "First"}}, +} + +func TestUnmarshalBadPaths(t *testing.T) { + for _, tt := range badPathTests { + err := Unmarshal([]byte(pathTestString), tt.v) + if !reflect.DeepEqual(err, tt.e) { + t.Fatalf("Unmarshal with %#v didn't fail properly:\nhave %#v,\nwant %#v", tt.v, err, tt.e) + } + } +} + +const OK = "OK" +const withoutNameTypeData = ` + +` + +type TestThree struct { + XMLName Name `xml:"Test3"` + Attr string `xml:",attr"` +} + +func TestUnmarshalWithoutNameType(t *testing.T) { + var x TestThree + if err := Unmarshal([]byte(withoutNameTypeData), &x); err != nil { + t.Fatalf("Unmarshal: %s", err) + } + if x.Attr != OK { + t.Fatalf("have %v\nwant %v", x.Attr, OK) + } +} + +func TestUnmarshalAttr(t *testing.T) { + type ParamVal struct { + Int int `xml:"int,attr"` + } + + type ParamPtr struct { + Int *int `xml:"int,attr"` + } + + type ParamStringPtr struct { + Int *string `xml:"int,attr"` + } + + x := []byte(``) + + p1 := &ParamPtr{} + if err := Unmarshal(x, p1); err != nil { + t.Fatalf("Unmarshal: %s", err) + } + if p1.Int == nil { + t.Fatalf("Unmarshal failed in to *int field") + } else if *p1.Int != 1 { + t.Fatalf("Unmarshal with %s failed:\nhave %#v,\n want %#v", x, p1.Int, 1) + } + + p2 := &ParamVal{} + if err := Unmarshal(x, p2); err != nil { + t.Fatalf("Unmarshal: %s", err) + } + if p2.Int != 1 { + t.Fatalf("Unmarshal with %s failed:\nhave %#v,\n want %#v", x, p2.Int, 1) + } + + p3 := &ParamStringPtr{} + if err := Unmarshal(x, p3); err != nil { + t.Fatalf("Unmarshal: %s", err) + } + if p3.Int == nil { + t.Fatalf("Unmarshal failed in to *string field") + } else if *p3.Int != "1" { + t.Fatalf("Unmarshal with %s failed:\nhave %#v,\n want %#v", x, p3.Int, 1) + } +} + +type Tables struct { + HTable string `xml:"http://www.w3.org/TR/html4/ table"` + FTable string `xml:"http://www.w3schools.com/furniture table"` +} + +var tables = []struct { + xml string + tab Tables + ns string +}{ + { + xml: `` + + `hello
    ` + + `world
    ` + + `
    `, + tab: Tables{"hello", "world"}, + }, + { + xml: `` + + `world
    ` + + `hello
    ` + + `
    `, + tab: Tables{"hello", "world"}, + }, + { + xml: `` + + `world` + + `hello` + + ``, + tab: Tables{"hello", "world"}, + }, + { + xml: `` + + `bogus
    ` + + `
    `, + tab: Tables{}, + }, + { + xml: `` + + `only
    ` + + `
    `, + tab: Tables{HTable: "only"}, + ns: "http://www.w3.org/TR/html4/", + }, + { + xml: `` + + `only
    ` + + `
    `, + tab: Tables{FTable: "only"}, + ns: "http://www.w3schools.com/furniture", + }, + { + xml: `` + + `only
    ` + + `
    `, + tab: Tables{}, + ns: "something else entirely", + }, +} + +func TestUnmarshalNS(t *testing.T) { + for i, tt := range tables { + var dst Tables + var err error + if tt.ns != "" { + d := NewDecoder(strings.NewReader(tt.xml)) + d.DefaultSpace = tt.ns + err = d.Decode(&dst) + } else { + err = Unmarshal([]byte(tt.xml), &dst) + } + if err != nil { + t.Errorf("#%d: Unmarshal: %v", i, err) + continue + } + want := tt.tab + if dst != want { + t.Errorf("#%d: dst=%+v, want %+v", i, dst, want) + } + } +} + +func TestRoundTrip(t *testing.T) { + // From issue 7535 + const s = `` + in := bytes.NewBufferString(s) + for i := 0; i < 10; i++ { + out := &bytes.Buffer{} + d := NewDecoder(in) + e := NewEncoder(out) + + for { + t, err := d.Token() + if err == io.EOF { + break + } + if err != nil { + fmt.Println("failed:", err) + return + } + e.EncodeToken(t) + } + e.Flush() + in = out + } + if got := in.String(); got != s { + t.Errorf("have: %q\nwant: %q\n", got, s) + } +} + +func TestMarshalNS(t *testing.T) { + dst := Tables{"hello", "world"} + data, err := Marshal(&dst) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + want := `hello
    world
    ` + str := string(data) + if str != want { + t.Errorf("have: %q\nwant: %q\n", str, want) + } +} + +type TableAttrs struct { + TAttr TAttr +} + +type TAttr struct { + HTable string `xml:"http://www.w3.org/TR/html4/ table,attr"` + FTable string `xml:"http://www.w3schools.com/furniture table,attr"` + Lang string `xml:"http://www.w3.org/XML/1998/namespace lang,attr,omitempty"` + Other1 string `xml:"http://golang.org/xml/ other,attr,omitempty"` + Other2 string `xml:"http://golang.org/xmlfoo/ other,attr,omitempty"` + Other3 string `xml:"http://golang.org/json/ other,attr,omitempty"` + Other4 string `xml:"http://golang.org/2/json/ other,attr,omitempty"` +} + +var tableAttrs = []struct { + xml string + tab TableAttrs + ns string +}{ + { + xml: ``, + tab: TableAttrs{TAttr{HTable: "hello", FTable: "world"}}, + }, + { + xml: ``, + tab: TableAttrs{TAttr{HTable: "hello", FTable: "world"}}, + }, + { + xml: ``, + tab: TableAttrs{TAttr{HTable: "hello", FTable: "world"}}, + }, + { + // Default space does not apply to attribute names. + xml: ``, + tab: TableAttrs{TAttr{HTable: "hello", FTable: ""}}, + }, + { + // Default space does not apply to attribute names. + xml: ``, + tab: TableAttrs{TAttr{HTable: "", FTable: "world"}}, + }, + { + xml: ``, + tab: TableAttrs{}, + }, + { + // Default space does not apply to attribute names. + xml: ``, + tab: TableAttrs{TAttr{HTable: "hello", FTable: ""}}, + ns: "http://www.w3schools.com/furniture", + }, + { + // Default space does not apply to attribute names. + xml: ``, + tab: TableAttrs{TAttr{HTable: "", FTable: "world"}}, + ns: "http://www.w3.org/TR/html4/", + }, + { + xml: ``, + tab: TableAttrs{}, + ns: "something else entirely", + }, +} + +func TestUnmarshalNSAttr(t *testing.T) { + for i, tt := range tableAttrs { + var dst TableAttrs + var err error + if tt.ns != "" { + d := NewDecoder(strings.NewReader(tt.xml)) + d.DefaultSpace = tt.ns + err = d.Decode(&dst) + } else { + err = Unmarshal([]byte(tt.xml), &dst) + } + if err != nil { + t.Errorf("#%d: Unmarshal: %v", i, err) + continue + } + want := tt.tab + if dst != want { + t.Errorf("#%d: dst=%+v, want %+v", i, dst, want) + } + } +} + +func TestMarshalNSAttr(t *testing.T) { + src := TableAttrs{TAttr{"hello", "world", "en_US", "other1", "other2", "other3", "other4"}} + data, err := Marshal(&src) + if err != nil { + t.Fatalf("Marshal: %v", err) + } + want := `` + str := string(data) + if str != want { + t.Errorf("Marshal:\nhave: %#q\nwant: %#q\n", str, want) + } + + var dst TableAttrs + if err := Unmarshal(data, &dst); err != nil { + t.Errorf("Unmarshal: %v", err) + } + + if dst != src { + t.Errorf("Unmarshal = %q, want %q", dst, src) + } +} + +type MyCharData struct { + body string +} + +func (m *MyCharData) UnmarshalXML(d *Decoder, start StartElement) error { + for { + t, err := d.Token() + if err == io.EOF { // found end of element + break + } + if err != nil { + return err + } + if char, ok := t.(CharData); ok { + m.body += string(char) + } + } + return nil +} + +var _ Unmarshaler = (*MyCharData)(nil) + +func (m *MyCharData) UnmarshalXMLAttr(attr Attr) error { + panic("must not call") +} + +type MyAttr struct { + attr string +} + +func (m *MyAttr) UnmarshalXMLAttr(attr Attr) error { + m.attr = attr.Value + return nil +} + +var _ UnmarshalerAttr = (*MyAttr)(nil) + +type MyStruct struct { + Data *MyCharData + Attr *MyAttr `xml:",attr"` + + Data2 MyCharData + Attr2 MyAttr `xml:",attr"` +} + +func TestUnmarshaler(t *testing.T) { + xml := ` + + hello world + howdy world + + ` + + var m MyStruct + if err := Unmarshal([]byte(xml), &m); err != nil { + t.Fatal(err) + } + + if m.Data == nil || m.Attr == nil || m.Data.body != "hello world" || m.Attr.attr != "attr1" || m.Data2.body != "howdy world" || m.Attr2.attr != "attr2" { + t.Errorf("m=%#+v\n", m) + } +} + +type Pea struct { + Cotelydon string +} + +type Pod struct { + Pea interface{} `xml:"Pea"` +} + +// https://golang.org/issue/6836 +func TestUnmarshalIntoInterface(t *testing.T) { + pod := new(Pod) + pod.Pea = new(Pea) + xml := `Green stuff` + err := Unmarshal([]byte(xml), pod) + if err != nil { + t.Fatalf("failed to unmarshal %q: %v", xml, err) + } + pea, ok := pod.Pea.(*Pea) + if !ok { + t.Fatalf("unmarshalled into wrong type: have %T want *Pea", pod.Pea) + } + have, want := pea.Cotelydon, "Green stuff" + if have != want { + t.Errorf("failed to unmarshal into interface, have %q want %q", have, want) + } +} diff --git a/vendor/golang.org/x/net/webdav/internal/xml/typeinfo.go b/vendor/golang.org/x/net/webdav/internal/xml/typeinfo.go new file mode 100644 index 0000000..c9a6421 --- /dev/null +++ b/vendor/golang.org/x/net/webdav/internal/xml/typeinfo.go @@ -0,0 +1,371 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package xml + +import ( + "fmt" + "reflect" + "strings" + "sync" +) + +// typeInfo holds details for the xml representation of a type. +type typeInfo struct { + xmlname *fieldInfo + fields []fieldInfo +} + +// fieldInfo holds details for the xml representation of a single field. +type fieldInfo struct { + idx []int + name string + xmlns string + flags fieldFlags + parents []string +} + +type fieldFlags int + +const ( + fElement fieldFlags = 1 << iota + fAttr + fCharData + fInnerXml + fComment + fAny + + fOmitEmpty + + fMode = fElement | fAttr | fCharData | fInnerXml | fComment | fAny +) + +var tinfoMap = make(map[reflect.Type]*typeInfo) +var tinfoLock sync.RWMutex + +var nameType = reflect.TypeOf(Name{}) + +// getTypeInfo returns the typeInfo structure with details necessary +// for marshalling and unmarshalling typ. +func getTypeInfo(typ reflect.Type) (*typeInfo, error) { + tinfoLock.RLock() + tinfo, ok := tinfoMap[typ] + tinfoLock.RUnlock() + if ok { + return tinfo, nil + } + tinfo = &typeInfo{} + if typ.Kind() == reflect.Struct && typ != nameType { + n := typ.NumField() + for i := 0; i < n; i++ { + f := typ.Field(i) + if f.PkgPath != "" || f.Tag.Get("xml") == "-" { + continue // Private field + } + + // For embedded structs, embed its fields. + if f.Anonymous { + t := f.Type + if t.Kind() == reflect.Ptr { + t = t.Elem() + } + if t.Kind() == reflect.Struct { + inner, err := getTypeInfo(t) + if err != nil { + return nil, err + } + if tinfo.xmlname == nil { + tinfo.xmlname = inner.xmlname + } + for _, finfo := range inner.fields { + finfo.idx = append([]int{i}, finfo.idx...) + if err := addFieldInfo(typ, tinfo, &finfo); err != nil { + return nil, err + } + } + continue + } + } + + finfo, err := structFieldInfo(typ, &f) + if err != nil { + return nil, err + } + + if f.Name == "XMLName" { + tinfo.xmlname = finfo + continue + } + + // Add the field if it doesn't conflict with other fields. + if err := addFieldInfo(typ, tinfo, finfo); err != nil { + return nil, err + } + } + } + tinfoLock.Lock() + tinfoMap[typ] = tinfo + tinfoLock.Unlock() + return tinfo, nil +} + +// structFieldInfo builds and returns a fieldInfo for f. +func structFieldInfo(typ reflect.Type, f *reflect.StructField) (*fieldInfo, error) { + finfo := &fieldInfo{idx: f.Index} + + // Split the tag from the xml namespace if necessary. + tag := f.Tag.Get("xml") + if i := strings.Index(tag, " "); i >= 0 { + finfo.xmlns, tag = tag[:i], tag[i+1:] + } + + // Parse flags. + tokens := strings.Split(tag, ",") + if len(tokens) == 1 { + finfo.flags = fElement + } else { + tag = tokens[0] + for _, flag := range tokens[1:] { + switch flag { + case "attr": + finfo.flags |= fAttr + case "chardata": + finfo.flags |= fCharData + case "innerxml": + finfo.flags |= fInnerXml + case "comment": + finfo.flags |= fComment + case "any": + finfo.flags |= fAny + case "omitempty": + finfo.flags |= fOmitEmpty + } + } + + // Validate the flags used. + valid := true + switch mode := finfo.flags & fMode; mode { + case 0: + finfo.flags |= fElement + case fAttr, fCharData, fInnerXml, fComment, fAny: + if f.Name == "XMLName" || tag != "" && mode != fAttr { + valid = false + } + default: + // This will also catch multiple modes in a single field. + valid = false + } + if finfo.flags&fMode == fAny { + finfo.flags |= fElement + } + if finfo.flags&fOmitEmpty != 0 && finfo.flags&(fElement|fAttr) == 0 { + valid = false + } + if !valid { + return nil, fmt.Errorf("xml: invalid tag in field %s of type %s: %q", + f.Name, typ, f.Tag.Get("xml")) + } + } + + // Use of xmlns without a name is not allowed. + if finfo.xmlns != "" && tag == "" { + return nil, fmt.Errorf("xml: namespace without name in field %s of type %s: %q", + f.Name, typ, f.Tag.Get("xml")) + } + + if f.Name == "XMLName" { + // The XMLName field records the XML element name. Don't + // process it as usual because its name should default to + // empty rather than to the field name. + finfo.name = tag + return finfo, nil + } + + if tag == "" { + // If the name part of the tag is completely empty, get + // default from XMLName of underlying struct if feasible, + // or field name otherwise. + if xmlname := lookupXMLName(f.Type); xmlname != nil { + finfo.xmlns, finfo.name = xmlname.xmlns, xmlname.name + } else { + finfo.name = f.Name + } + return finfo, nil + } + + if finfo.xmlns == "" && finfo.flags&fAttr == 0 { + // If it's an element no namespace specified, get the default + // from the XMLName of enclosing struct if possible. + if xmlname := lookupXMLName(typ); xmlname != nil { + finfo.xmlns = xmlname.xmlns + } + } + + // Prepare field name and parents. + parents := strings.Split(tag, ">") + if parents[0] == "" { + parents[0] = f.Name + } + if parents[len(parents)-1] == "" { + return nil, fmt.Errorf("xml: trailing '>' in field %s of type %s", f.Name, typ) + } + finfo.name = parents[len(parents)-1] + if len(parents) > 1 { + if (finfo.flags & fElement) == 0 { + return nil, fmt.Errorf("xml: %s chain not valid with %s flag", tag, strings.Join(tokens[1:], ",")) + } + finfo.parents = parents[:len(parents)-1] + } + + // If the field type has an XMLName field, the names must match + // so that the behavior of both marshalling and unmarshalling + // is straightforward and unambiguous. + if finfo.flags&fElement != 0 { + ftyp := f.Type + xmlname := lookupXMLName(ftyp) + if xmlname != nil && xmlname.name != finfo.name { + return nil, fmt.Errorf("xml: name %q in tag of %s.%s conflicts with name %q in %s.XMLName", + finfo.name, typ, f.Name, xmlname.name, ftyp) + } + } + return finfo, nil +} + +// lookupXMLName returns the fieldInfo for typ's XMLName field +// in case it exists and has a valid xml field tag, otherwise +// it returns nil. +func lookupXMLName(typ reflect.Type) (xmlname *fieldInfo) { + for typ.Kind() == reflect.Ptr { + typ = typ.Elem() + } + if typ.Kind() != reflect.Struct { + return nil + } + for i, n := 0, typ.NumField(); i < n; i++ { + f := typ.Field(i) + if f.Name != "XMLName" { + continue + } + finfo, err := structFieldInfo(typ, &f) + if finfo.name != "" && err == nil { + return finfo + } + // Also consider errors as a non-existent field tag + // and let getTypeInfo itself report the error. + break + } + return nil +} + +func min(a, b int) int { + if a <= b { + return a + } + return b +} + +// addFieldInfo adds finfo to tinfo.fields if there are no +// conflicts, or if conflicts arise from previous fields that were +// obtained from deeper embedded structures than finfo. In the latter +// case, the conflicting entries are dropped. +// A conflict occurs when the path (parent + name) to a field is +// itself a prefix of another path, or when two paths match exactly. +// It is okay for field paths to share a common, shorter prefix. +func addFieldInfo(typ reflect.Type, tinfo *typeInfo, newf *fieldInfo) error { + var conflicts []int +Loop: + // First, figure all conflicts. Most working code will have none. + for i := range tinfo.fields { + oldf := &tinfo.fields[i] + if oldf.flags&fMode != newf.flags&fMode { + continue + } + if oldf.xmlns != "" && newf.xmlns != "" && oldf.xmlns != newf.xmlns { + continue + } + minl := min(len(newf.parents), len(oldf.parents)) + for p := 0; p < minl; p++ { + if oldf.parents[p] != newf.parents[p] { + continue Loop + } + } + if len(oldf.parents) > len(newf.parents) { + if oldf.parents[len(newf.parents)] == newf.name { + conflicts = append(conflicts, i) + } + } else if len(oldf.parents) < len(newf.parents) { + if newf.parents[len(oldf.parents)] == oldf.name { + conflicts = append(conflicts, i) + } + } else { + if newf.name == oldf.name { + conflicts = append(conflicts, i) + } + } + } + // Without conflicts, add the new field and return. + if conflicts == nil { + tinfo.fields = append(tinfo.fields, *newf) + return nil + } + + // If any conflict is shallower, ignore the new field. + // This matches the Go field resolution on embedding. + for _, i := range conflicts { + if len(tinfo.fields[i].idx) < len(newf.idx) { + return nil + } + } + + // Otherwise, if any of them is at the same depth level, it's an error. + for _, i := range conflicts { + oldf := &tinfo.fields[i] + if len(oldf.idx) == len(newf.idx) { + f1 := typ.FieldByIndex(oldf.idx) + f2 := typ.FieldByIndex(newf.idx) + return &TagPathError{typ, f1.Name, f1.Tag.Get("xml"), f2.Name, f2.Tag.Get("xml")} + } + } + + // Otherwise, the new field is shallower, and thus takes precedence, + // so drop the conflicting fields from tinfo and append the new one. + for c := len(conflicts) - 1; c >= 0; c-- { + i := conflicts[c] + copy(tinfo.fields[i:], tinfo.fields[i+1:]) + tinfo.fields = tinfo.fields[:len(tinfo.fields)-1] + } + tinfo.fields = append(tinfo.fields, *newf) + return nil +} + +// A TagPathError represents an error in the unmarshalling process +// caused by the use of field tags with conflicting paths. +type TagPathError struct { + Struct reflect.Type + Field1, Tag1 string + Field2, Tag2 string +} + +func (e *TagPathError) Error() string { + return fmt.Sprintf("%s field %q with tag %q conflicts with field %q with tag %q", e.Struct, e.Field1, e.Tag1, e.Field2, e.Tag2) +} + +// value returns v's field value corresponding to finfo. +// It's equivalent to v.FieldByIndex(finfo.idx), but initializes +// and dereferences pointers as necessary. +func (finfo *fieldInfo) value(v reflect.Value) reflect.Value { + for i, x := range finfo.idx { + if i > 0 { + t := v.Type() + if t.Kind() == reflect.Ptr && t.Elem().Kind() == reflect.Struct { + if v.IsNil() { + v.Set(reflect.New(v.Type().Elem())) + } + v = v.Elem() + } + } + v = v.Field(x) + } + return v +} diff --git a/vendor/golang.org/x/net/webdav/internal/xml/xml.go b/vendor/golang.org/x/net/webdav/internal/xml/xml.go new file mode 100644 index 0000000..ffab4a7 --- /dev/null +++ b/vendor/golang.org/x/net/webdav/internal/xml/xml.go @@ -0,0 +1,1998 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package xml implements a simple XML 1.0 parser that +// understands XML name spaces. +package xml + +// References: +// Annotated XML spec: http://www.xml.com/axml/testaxml.htm +// XML name spaces: http://www.w3.org/TR/REC-xml-names/ + +// TODO(rsc): +// Test error handling. + +import ( + "bufio" + "bytes" + "errors" + "fmt" + "io" + "strconv" + "strings" + "unicode" + "unicode/utf8" +) + +// A SyntaxError represents a syntax error in the XML input stream. +type SyntaxError struct { + Msg string + Line int +} + +func (e *SyntaxError) Error() string { + return "XML syntax error on line " + strconv.Itoa(e.Line) + ": " + e.Msg +} + +// A Name represents an XML name (Local) annotated with a name space +// identifier (Space). In tokens returned by Decoder.Token, the Space +// identifier is given as a canonical URL, not the short prefix used in +// the document being parsed. +// +// As a special case, XML namespace declarations will use the literal +// string "xmlns" for the Space field instead of the fully resolved URL. +// See Encoder.EncodeToken for more information on namespace encoding +// behaviour. +type Name struct { + Space, Local string +} + +// isNamespace reports whether the name is a namespace-defining name. +func (name Name) isNamespace() bool { + return name.Local == "xmlns" || name.Space == "xmlns" +} + +// An Attr represents an attribute in an XML element (Name=Value). +type Attr struct { + Name Name + Value string +} + +// A Token is an interface holding one of the token types: +// StartElement, EndElement, CharData, Comment, ProcInst, or Directive. +type Token interface{} + +// A StartElement represents an XML start element. +type StartElement struct { + Name Name + Attr []Attr +} + +func (e StartElement) Copy() StartElement { + attrs := make([]Attr, len(e.Attr)) + copy(attrs, e.Attr) + e.Attr = attrs + return e +} + +// End returns the corresponding XML end element. +func (e StartElement) End() EndElement { + return EndElement{e.Name} +} + +// setDefaultNamespace sets the namespace of the element +// as the default for all elements contained within it. +func (e *StartElement) setDefaultNamespace() { + if e.Name.Space == "" { + // If there's no namespace on the element, don't + // set the default. Strictly speaking this might be wrong, as + // we can't tell if the element had no namespace set + // or was just using the default namespace. + return + } + // Don't add a default name space if there's already one set. + for _, attr := range e.Attr { + if attr.Name.Space == "" && attr.Name.Local == "xmlns" { + return + } + } + e.Attr = append(e.Attr, Attr{ + Name: Name{ + Local: "xmlns", + }, + Value: e.Name.Space, + }) +} + +// An EndElement represents an XML end element. +type EndElement struct { + Name Name +} + +// A CharData represents XML character data (raw text), +// in which XML escape sequences have been replaced by +// the characters they represent. +type CharData []byte + +func makeCopy(b []byte) []byte { + b1 := make([]byte, len(b)) + copy(b1, b) + return b1 +} + +func (c CharData) Copy() CharData { return CharData(makeCopy(c)) } + +// A Comment represents an XML comment of the form . +// The bytes do not include the comment markers. +type Comment []byte + +func (c Comment) Copy() Comment { return Comment(makeCopy(c)) } + +// A ProcInst represents an XML processing instruction of the form +type ProcInst struct { + Target string + Inst []byte +} + +func (p ProcInst) Copy() ProcInst { + p.Inst = makeCopy(p.Inst) + return p +} + +// A Directive represents an XML directive of the form . +// The bytes do not include the markers. +type Directive []byte + +func (d Directive) Copy() Directive { return Directive(makeCopy(d)) } + +// CopyToken returns a copy of a Token. +func CopyToken(t Token) Token { + switch v := t.(type) { + case CharData: + return v.Copy() + case Comment: + return v.Copy() + case Directive: + return v.Copy() + case ProcInst: + return v.Copy() + case StartElement: + return v.Copy() + } + return t +} + +// A Decoder represents an XML parser reading a particular input stream. +// The parser assumes that its input is encoded in UTF-8. +type Decoder struct { + // Strict defaults to true, enforcing the requirements + // of the XML specification. + // If set to false, the parser allows input containing common + // mistakes: + // * If an element is missing an end tag, the parser invents + // end tags as necessary to keep the return values from Token + // properly balanced. + // * In attribute values and character data, unknown or malformed + // character entities (sequences beginning with &) are left alone. + // + // Setting: + // + // d.Strict = false; + // d.AutoClose = HTMLAutoClose; + // d.Entity = HTMLEntity + // + // creates a parser that can handle typical HTML. + // + // Strict mode does not enforce the requirements of the XML name spaces TR. + // In particular it does not reject name space tags using undefined prefixes. + // Such tags are recorded with the unknown prefix as the name space URL. + Strict bool + + // When Strict == false, AutoClose indicates a set of elements to + // consider closed immediately after they are opened, regardless + // of whether an end element is present. + AutoClose []string + + // Entity can be used to map non-standard entity names to string replacements. + // The parser behaves as if these standard mappings are present in the map, + // regardless of the actual map content: + // + // "lt": "<", + // "gt": ">", + // "amp": "&", + // "apos": "'", + // "quot": `"`, + Entity map[string]string + + // CharsetReader, if non-nil, defines a function to generate + // charset-conversion readers, converting from the provided + // non-UTF-8 charset into UTF-8. If CharsetReader is nil or + // returns an error, parsing stops with an error. One of the + // the CharsetReader's result values must be non-nil. + CharsetReader func(charset string, input io.Reader) (io.Reader, error) + + // DefaultSpace sets the default name space used for unadorned tags, + // as if the entire XML stream were wrapped in an element containing + // the attribute xmlns="DefaultSpace". + DefaultSpace string + + r io.ByteReader + buf bytes.Buffer + saved *bytes.Buffer + stk *stack + free *stack + needClose bool + toClose Name + nextToken Token + nextByte int + ns map[string]string + err error + line int + offset int64 + unmarshalDepth int +} + +// NewDecoder creates a new XML parser reading from r. +// If r does not implement io.ByteReader, NewDecoder will +// do its own buffering. +func NewDecoder(r io.Reader) *Decoder { + d := &Decoder{ + ns: make(map[string]string), + nextByte: -1, + line: 1, + Strict: true, + } + d.switchToReader(r) + return d +} + +// Token returns the next XML token in the input stream. +// At the end of the input stream, Token returns nil, io.EOF. +// +// Slices of bytes in the returned token data refer to the +// parser's internal buffer and remain valid only until the next +// call to Token. To acquire a copy of the bytes, call CopyToken +// or the token's Copy method. +// +// Token expands self-closing elements such as
    +// into separate start and end elements returned by successive calls. +// +// Token guarantees that the StartElement and EndElement +// tokens it returns are properly nested and matched: +// if Token encounters an unexpected end element, +// it will return an error. +// +// Token implements XML name spaces as described by +// http://www.w3.org/TR/REC-xml-names/. Each of the +// Name structures contained in the Token has the Space +// set to the URL identifying its name space when known. +// If Token encounters an unrecognized name space prefix, +// it uses the prefix as the Space rather than report an error. +func (d *Decoder) Token() (t Token, err error) { + if d.stk != nil && d.stk.kind == stkEOF { + err = io.EOF + return + } + if d.nextToken != nil { + t = d.nextToken + d.nextToken = nil + } else if t, err = d.rawToken(); err != nil { + return + } + + if !d.Strict { + if t1, ok := d.autoClose(t); ok { + d.nextToken = t + t = t1 + } + } + switch t1 := t.(type) { + case StartElement: + // In XML name spaces, the translations listed in the + // attributes apply to the element name and + // to the other attribute names, so process + // the translations first. + for _, a := range t1.Attr { + if a.Name.Space == "xmlns" { + v, ok := d.ns[a.Name.Local] + d.pushNs(a.Name.Local, v, ok) + d.ns[a.Name.Local] = a.Value + } + if a.Name.Space == "" && a.Name.Local == "xmlns" { + // Default space for untagged names + v, ok := d.ns[""] + d.pushNs("", v, ok) + d.ns[""] = a.Value + } + } + + d.translate(&t1.Name, true) + for i := range t1.Attr { + d.translate(&t1.Attr[i].Name, false) + } + d.pushElement(t1.Name) + t = t1 + + case EndElement: + d.translate(&t1.Name, true) + if !d.popElement(&t1) { + return nil, d.err + } + t = t1 + } + return +} + +const xmlURL = "http://www.w3.org/XML/1998/namespace" + +// Apply name space translation to name n. +// The default name space (for Space=="") +// applies only to element names, not to attribute names. +func (d *Decoder) translate(n *Name, isElementName bool) { + switch { + case n.Space == "xmlns": + return + case n.Space == "" && !isElementName: + return + case n.Space == "xml": + n.Space = xmlURL + case n.Space == "" && n.Local == "xmlns": + return + } + if v, ok := d.ns[n.Space]; ok { + n.Space = v + } else if n.Space == "" { + n.Space = d.DefaultSpace + } +} + +func (d *Decoder) switchToReader(r io.Reader) { + // Get efficient byte at a time reader. + // Assume that if reader has its own + // ReadByte, it's efficient enough. + // Otherwise, use bufio. + if rb, ok := r.(io.ByteReader); ok { + d.r = rb + } else { + d.r = bufio.NewReader(r) + } +} + +// Parsing state - stack holds old name space translations +// and the current set of open elements. The translations to pop when +// ending a given tag are *below* it on the stack, which is +// more work but forced on us by XML. +type stack struct { + next *stack + kind int + name Name + ok bool +} + +const ( + stkStart = iota + stkNs + stkEOF +) + +func (d *Decoder) push(kind int) *stack { + s := d.free + if s != nil { + d.free = s.next + } else { + s = new(stack) + } + s.next = d.stk + s.kind = kind + d.stk = s + return s +} + +func (d *Decoder) pop() *stack { + s := d.stk + if s != nil { + d.stk = s.next + s.next = d.free + d.free = s + } + return s +} + +// Record that after the current element is finished +// (that element is already pushed on the stack) +// Token should return EOF until popEOF is called. +func (d *Decoder) pushEOF() { + // Walk down stack to find Start. + // It might not be the top, because there might be stkNs + // entries above it. + start := d.stk + for start.kind != stkStart { + start = start.next + } + // The stkNs entries below a start are associated with that + // element too; skip over them. + for start.next != nil && start.next.kind == stkNs { + start = start.next + } + s := d.free + if s != nil { + d.free = s.next + } else { + s = new(stack) + } + s.kind = stkEOF + s.next = start.next + start.next = s +} + +// Undo a pushEOF. +// The element must have been finished, so the EOF should be at the top of the stack. +func (d *Decoder) popEOF() bool { + if d.stk == nil || d.stk.kind != stkEOF { + return false + } + d.pop() + return true +} + +// Record that we are starting an element with the given name. +func (d *Decoder) pushElement(name Name) { + s := d.push(stkStart) + s.name = name +} + +// Record that we are changing the value of ns[local]. +// The old value is url, ok. +func (d *Decoder) pushNs(local string, url string, ok bool) { + s := d.push(stkNs) + s.name.Local = local + s.name.Space = url + s.ok = ok +} + +// Creates a SyntaxError with the current line number. +func (d *Decoder) syntaxError(msg string) error { + return &SyntaxError{Msg: msg, Line: d.line} +} + +// Record that we are ending an element with the given name. +// The name must match the record at the top of the stack, +// which must be a pushElement record. +// After popping the element, apply any undo records from +// the stack to restore the name translations that existed +// before we saw this element. +func (d *Decoder) popElement(t *EndElement) bool { + s := d.pop() + name := t.Name + switch { + case s == nil || s.kind != stkStart: + d.err = d.syntaxError("unexpected end element ") + return false + case s.name.Local != name.Local: + if !d.Strict { + d.needClose = true + d.toClose = t.Name + t.Name = s.name + return true + } + d.err = d.syntaxError("element <" + s.name.Local + "> closed by ") + return false + case s.name.Space != name.Space: + d.err = d.syntaxError("element <" + s.name.Local + "> in space " + s.name.Space + + "closed by in space " + name.Space) + return false + } + + // Pop stack until a Start or EOF is on the top, undoing the + // translations that were associated with the element we just closed. + for d.stk != nil && d.stk.kind != stkStart && d.stk.kind != stkEOF { + s := d.pop() + if s.ok { + d.ns[s.name.Local] = s.name.Space + } else { + delete(d.ns, s.name.Local) + } + } + + return true +} + +// If the top element on the stack is autoclosing and +// t is not the end tag, invent the end tag. +func (d *Decoder) autoClose(t Token) (Token, bool) { + if d.stk == nil || d.stk.kind != stkStart { + return nil, false + } + name := strings.ToLower(d.stk.name.Local) + for _, s := range d.AutoClose { + if strings.ToLower(s) == name { + // This one should be auto closed if t doesn't close it. + et, ok := t.(EndElement) + if !ok || et.Name.Local != name { + return EndElement{d.stk.name}, true + } + break + } + } + return nil, false +} + +var errRawToken = errors.New("xml: cannot use RawToken from UnmarshalXML method") + +// RawToken is like Token but does not verify that +// start and end elements match and does not translate +// name space prefixes to their corresponding URLs. +func (d *Decoder) RawToken() (Token, error) { + if d.unmarshalDepth > 0 { + return nil, errRawToken + } + return d.rawToken() +} + +func (d *Decoder) rawToken() (Token, error) { + if d.err != nil { + return nil, d.err + } + if d.needClose { + // The last element we read was self-closing and + // we returned just the StartElement half. + // Return the EndElement half now. + d.needClose = false + return EndElement{d.toClose}, nil + } + + b, ok := d.getc() + if !ok { + return nil, d.err + } + + if b != '<' { + // Text section. + d.ungetc(b) + data := d.text(-1, false) + if data == nil { + return nil, d.err + } + return CharData(data), nil + } + + if b, ok = d.mustgetc(); !ok { + return nil, d.err + } + switch b { + case '/': + // ' { + d.err = d.syntaxError("invalid characters between ") + return nil, d.err + } + return EndElement{name}, nil + + case '?': + // ' { + break + } + b0 = b + } + data := d.buf.Bytes() + data = data[0 : len(data)-2] // chop ?> + + if target == "xml" { + content := string(data) + ver := procInst("version", content) + if ver != "" && ver != "1.0" { + d.err = fmt.Errorf("xml: unsupported version %q; only version 1.0 is supported", ver) + return nil, d.err + } + enc := procInst("encoding", content) + if enc != "" && enc != "utf-8" && enc != "UTF-8" { + if d.CharsetReader == nil { + d.err = fmt.Errorf("xml: encoding %q declared but Decoder.CharsetReader is nil", enc) + return nil, d.err + } + newr, err := d.CharsetReader(enc, d.r.(io.Reader)) + if err != nil { + d.err = fmt.Errorf("xml: opening charset %q: %v", enc, err) + return nil, d.err + } + if newr == nil { + panic("CharsetReader returned a nil Reader for charset " + enc) + } + d.switchToReader(newr) + } + } + return ProcInst{target, data}, nil + + case '!': + // ' { + break + } + b0, b1 = b1, b + } + data := d.buf.Bytes() + data = data[0 : len(data)-3] // chop --> + return Comment(data), nil + + case '[': // . + data := d.text(-1, true) + if data == nil { + return nil, d.err + } + return CharData(data), nil + } + + // Probably a directive: , , etc. + // We don't care, but accumulate for caller. Quoted angle + // brackets do not count for nesting. + d.buf.Reset() + d.buf.WriteByte(b) + inquote := uint8(0) + depth := 0 + for { + if b, ok = d.mustgetc(); !ok { + return nil, d.err + } + if inquote == 0 && b == '>' && depth == 0 { + break + } + HandleB: + d.buf.WriteByte(b) + switch { + case b == inquote: + inquote = 0 + + case inquote != 0: + // in quotes, no special action + + case b == '\'' || b == '"': + inquote = b + + case b == '>' && inquote == 0: + depth-- + + case b == '<' && inquote == 0: + // Look for ` + +var testEntity = map[string]string{"何": "What", "is-it": "is it?"} + +var rawTokens = []Token{ + CharData("\n"), + ProcInst{"xml", []byte(`version="1.0" encoding="UTF-8"`)}, + CharData("\n"), + Directive(`DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"`), + CharData("\n"), + StartElement{Name{"", "body"}, []Attr{{Name{"xmlns", "foo"}, "ns1"}, {Name{"", "xmlns"}, "ns2"}, {Name{"xmlns", "tag"}, "ns3"}}}, + CharData("\n "), + StartElement{Name{"", "hello"}, []Attr{{Name{"", "lang"}, "en"}}}, + CharData("World <>'\" 白鵬翔"), + EndElement{Name{"", "hello"}}, + CharData("\n "), + StartElement{Name{"", "query"}, []Attr{}}, + CharData("What is it?"), + EndElement{Name{"", "query"}}, + CharData("\n "), + StartElement{Name{"", "goodbye"}, []Attr{}}, + EndElement{Name{"", "goodbye"}}, + CharData("\n "), + StartElement{Name{"", "outer"}, []Attr{{Name{"foo", "attr"}, "value"}, {Name{"xmlns", "tag"}, "ns4"}}}, + CharData("\n "), + StartElement{Name{"", "inner"}, []Attr{}}, + EndElement{Name{"", "inner"}}, + CharData("\n "), + EndElement{Name{"", "outer"}}, + CharData("\n "), + StartElement{Name{"tag", "name"}, []Attr{}}, + CharData("\n "), + CharData("Some text here."), + CharData("\n "), + EndElement{Name{"tag", "name"}}, + CharData("\n"), + EndElement{Name{"", "body"}}, + Comment(" missing final newline "), +} + +var cookedTokens = []Token{ + CharData("\n"), + ProcInst{"xml", []byte(`version="1.0" encoding="UTF-8"`)}, + CharData("\n"), + Directive(`DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"`), + CharData("\n"), + StartElement{Name{"ns2", "body"}, []Attr{{Name{"xmlns", "foo"}, "ns1"}, {Name{"", "xmlns"}, "ns2"}, {Name{"xmlns", "tag"}, "ns3"}}}, + CharData("\n "), + StartElement{Name{"ns2", "hello"}, []Attr{{Name{"", "lang"}, "en"}}}, + CharData("World <>'\" 白鵬翔"), + EndElement{Name{"ns2", "hello"}}, + CharData("\n "), + StartElement{Name{"ns2", "query"}, []Attr{}}, + CharData("What is it?"), + EndElement{Name{"ns2", "query"}}, + CharData("\n "), + StartElement{Name{"ns2", "goodbye"}, []Attr{}}, + EndElement{Name{"ns2", "goodbye"}}, + CharData("\n "), + StartElement{Name{"ns2", "outer"}, []Attr{{Name{"ns1", "attr"}, "value"}, {Name{"xmlns", "tag"}, "ns4"}}}, + CharData("\n "), + StartElement{Name{"ns2", "inner"}, []Attr{}}, + EndElement{Name{"ns2", "inner"}}, + CharData("\n "), + EndElement{Name{"ns2", "outer"}}, + CharData("\n "), + StartElement{Name{"ns3", "name"}, []Attr{}}, + CharData("\n "), + CharData("Some text here."), + CharData("\n "), + EndElement{Name{"ns3", "name"}}, + CharData("\n"), + EndElement{Name{"ns2", "body"}}, + Comment(" missing final newline "), +} + +const testInputAltEncoding = ` + +VALUE` + +var rawTokensAltEncoding = []Token{ + CharData("\n"), + ProcInst{"xml", []byte(`version="1.0" encoding="x-testing-uppercase"`)}, + CharData("\n"), + StartElement{Name{"", "tag"}, []Attr{}}, + CharData("value"), + EndElement{Name{"", "tag"}}, +} + +var xmlInput = []string{ + // unexpected EOF cases + "<", + "", + "", + "", + // "", // let the Token() caller handle + "", + "", + "", + "", + " c;", + "", + "", + "", + // "", // let the Token() caller handle + "", + "", + "cdata]]>", +} + +func TestRawToken(t *testing.T) { + d := NewDecoder(strings.NewReader(testInput)) + d.Entity = testEntity + testRawToken(t, d, testInput, rawTokens) +} + +const nonStrictInput = ` +non&entity +&unknown;entity +{ +&#zzz; +&なまえ3; +<-gt; +&; +&0a; +` + +var nonStringEntity = map[string]string{"": "oops!", "0a": "oops!"} + +var nonStrictTokens = []Token{ + CharData("\n"), + StartElement{Name{"", "tag"}, []Attr{}}, + CharData("non&entity"), + EndElement{Name{"", "tag"}}, + CharData("\n"), + StartElement{Name{"", "tag"}, []Attr{}}, + CharData("&unknown;entity"), + EndElement{Name{"", "tag"}}, + CharData("\n"), + StartElement{Name{"", "tag"}, []Attr{}}, + CharData("{"), + EndElement{Name{"", "tag"}}, + CharData("\n"), + StartElement{Name{"", "tag"}, []Attr{}}, + CharData("&#zzz;"), + EndElement{Name{"", "tag"}}, + CharData("\n"), + StartElement{Name{"", "tag"}, []Attr{}}, + CharData("&なまえ3;"), + EndElement{Name{"", "tag"}}, + CharData("\n"), + StartElement{Name{"", "tag"}, []Attr{}}, + CharData("<-gt;"), + EndElement{Name{"", "tag"}}, + CharData("\n"), + StartElement{Name{"", "tag"}, []Attr{}}, + CharData("&;"), + EndElement{Name{"", "tag"}}, + CharData("\n"), + StartElement{Name{"", "tag"}, []Attr{}}, + CharData("&0a;"), + EndElement{Name{"", "tag"}}, + CharData("\n"), +} + +func TestNonStrictRawToken(t *testing.T) { + d := NewDecoder(strings.NewReader(nonStrictInput)) + d.Strict = false + testRawToken(t, d, nonStrictInput, nonStrictTokens) +} + +type downCaser struct { + t *testing.T + r io.ByteReader +} + +func (d *downCaser) ReadByte() (c byte, err error) { + c, err = d.r.ReadByte() + if c >= 'A' && c <= 'Z' { + c += 'a' - 'A' + } + return +} + +func (d *downCaser) Read(p []byte) (int, error) { + d.t.Fatalf("unexpected Read call on downCaser reader") + panic("unreachable") +} + +func TestRawTokenAltEncoding(t *testing.T) { + d := NewDecoder(strings.NewReader(testInputAltEncoding)) + d.CharsetReader = func(charset string, input io.Reader) (io.Reader, error) { + if charset != "x-testing-uppercase" { + t.Fatalf("unexpected charset %q", charset) + } + return &downCaser{t, input.(io.ByteReader)}, nil + } + testRawToken(t, d, testInputAltEncoding, rawTokensAltEncoding) +} + +func TestRawTokenAltEncodingNoConverter(t *testing.T) { + d := NewDecoder(strings.NewReader(testInputAltEncoding)) + token, err := d.RawToken() + if token == nil { + t.Fatalf("expected a token on first RawToken call") + } + if err != nil { + t.Fatal(err) + } + token, err = d.RawToken() + if token != nil { + t.Errorf("expected a nil token; got %#v", token) + } + if err == nil { + t.Fatalf("expected an error on second RawToken call") + } + const encoding = "x-testing-uppercase" + if !strings.Contains(err.Error(), encoding) { + t.Errorf("expected error to contain %q; got error: %v", + encoding, err) + } +} + +func testRawToken(t *testing.T, d *Decoder, raw string, rawTokens []Token) { + lastEnd := int64(0) + for i, want := range rawTokens { + start := d.InputOffset() + have, err := d.RawToken() + end := d.InputOffset() + if err != nil { + t.Fatalf("token %d: unexpected error: %s", i, err) + } + if !reflect.DeepEqual(have, want) { + var shave, swant string + if _, ok := have.(CharData); ok { + shave = fmt.Sprintf("CharData(%q)", have) + } else { + shave = fmt.Sprintf("%#v", have) + } + if _, ok := want.(CharData); ok { + swant = fmt.Sprintf("CharData(%q)", want) + } else { + swant = fmt.Sprintf("%#v", want) + } + t.Errorf("token %d = %s, want %s", i, shave, swant) + } + + // Check that InputOffset returned actual token. + switch { + case start < lastEnd: + t.Errorf("token %d: position [%d,%d) for %T is before previous token", i, start, end, have) + case start >= end: + // Special case: EndElement can be synthesized. + if start == end && end == lastEnd { + break + } + t.Errorf("token %d: position [%d,%d) for %T is empty", i, start, end, have) + case end > int64(len(raw)): + t.Errorf("token %d: position [%d,%d) for %T extends beyond input", i, start, end, have) + default: + text := raw[start:end] + if strings.ContainsAny(text, "<>") && (!strings.HasPrefix(text, "<") || !strings.HasSuffix(text, ">")) { + t.Errorf("token %d: misaligned raw token %#q for %T", i, text, have) + } + } + lastEnd = end + } +} + +// Ensure that directives (specifically !DOCTYPE) include the complete +// text of any nested directives, noting that < and > do not change +// nesting depth if they are in single or double quotes. + +var nestedDirectivesInput = ` +]> +">]> +]> +'>]> +]> +'>]> +]> +` + +var nestedDirectivesTokens = []Token{ + CharData("\n"), + Directive(`DOCTYPE []`), + CharData("\n"), + Directive(`DOCTYPE [">]`), + CharData("\n"), + Directive(`DOCTYPE []`), + CharData("\n"), + Directive(`DOCTYPE ['>]`), + CharData("\n"), + Directive(`DOCTYPE []`), + CharData("\n"), + Directive(`DOCTYPE ['>]`), + CharData("\n"), + Directive(`DOCTYPE []`), + CharData("\n"), +} + +func TestNestedDirectives(t *testing.T) { + d := NewDecoder(strings.NewReader(nestedDirectivesInput)) + + for i, want := range nestedDirectivesTokens { + have, err := d.Token() + if err != nil { + t.Fatalf("token %d: unexpected error: %s", i, err) + } + if !reflect.DeepEqual(have, want) { + t.Errorf("token %d = %#v want %#v", i, have, want) + } + } +} + +func TestToken(t *testing.T) { + d := NewDecoder(strings.NewReader(testInput)) + d.Entity = testEntity + + for i, want := range cookedTokens { + have, err := d.Token() + if err != nil { + t.Fatalf("token %d: unexpected error: %s", i, err) + } + if !reflect.DeepEqual(have, want) { + t.Errorf("token %d = %#v want %#v", i, have, want) + } + } +} + +func TestSyntax(t *testing.T) { + for i := range xmlInput { + d := NewDecoder(strings.NewReader(xmlInput[i])) + var err error + for _, err = d.Token(); err == nil; _, err = d.Token() { + } + if _, ok := err.(*SyntaxError); !ok { + t.Fatalf(`xmlInput "%s": expected SyntaxError not received`, xmlInput[i]) + } + } +} + +type allScalars struct { + True1 bool + True2 bool + False1 bool + False2 bool + Int int + Int8 int8 + Int16 int16 + Int32 int32 + Int64 int64 + Uint int + Uint8 uint8 + Uint16 uint16 + Uint32 uint32 + Uint64 uint64 + Uintptr uintptr + Float32 float32 + Float64 float64 + String string + PtrString *string +} + +var all = allScalars{ + True1: true, + True2: true, + False1: false, + False2: false, + Int: 1, + Int8: -2, + Int16: 3, + Int32: -4, + Int64: 5, + Uint: 6, + Uint8: 7, + Uint16: 8, + Uint32: 9, + Uint64: 10, + Uintptr: 11, + Float32: 13.0, + Float64: 14.0, + String: "15", + PtrString: &sixteen, +} + +var sixteen = "16" + +const testScalarsInput = ` + true + 1 + false + 0 + 1 + -2 + 3 + -4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12.0 + 13.0 + 14.0 + 15 + 16 +` + +func TestAllScalars(t *testing.T) { + var a allScalars + err := Unmarshal([]byte(testScalarsInput), &a) + + if err != nil { + t.Fatal(err) + } + if !reflect.DeepEqual(a, all) { + t.Errorf("have %+v want %+v", a, all) + } +} + +type item struct { + Field_a string +} + +func TestIssue569(t *testing.T) { + data := `abcd` + var i item + err := Unmarshal([]byte(data), &i) + + if err != nil || i.Field_a != "abcd" { + t.Fatal("Expecting abcd") + } +} + +func TestUnquotedAttrs(t *testing.T) { + data := "" + d := NewDecoder(strings.NewReader(data)) + d.Strict = false + token, err := d.Token() + if _, ok := err.(*SyntaxError); ok { + t.Errorf("Unexpected error: %v", err) + } + if token.(StartElement).Name.Local != "tag" { + t.Errorf("Unexpected tag name: %v", token.(StartElement).Name.Local) + } + attr := token.(StartElement).Attr[0] + if attr.Value != "azAZ09:-_" { + t.Errorf("Unexpected attribute value: %v", attr.Value) + } + if attr.Name.Local != "attr" { + t.Errorf("Unexpected attribute name: %v", attr.Name.Local) + } +} + +func TestValuelessAttrs(t *testing.T) { + tests := [][3]string{ + {"

    ", "p", "nowrap"}, + {"

    ", "p", "nowrap"}, + {"", "input", "checked"}, + {"", "input", "checked"}, + } + for _, test := range tests { + d := NewDecoder(strings.NewReader(test[0])) + d.Strict = false + token, err := d.Token() + if _, ok := err.(*SyntaxError); ok { + t.Errorf("Unexpected error: %v", err) + } + if token.(StartElement).Name.Local != test[1] { + t.Errorf("Unexpected tag name: %v", token.(StartElement).Name.Local) + } + attr := token.(StartElement).Attr[0] + if attr.Value != test[2] { + t.Errorf("Unexpected attribute value: %v", attr.Value) + } + if attr.Name.Local != test[2] { + t.Errorf("Unexpected attribute name: %v", attr.Name.Local) + } + } +} + +func TestCopyTokenCharData(t *testing.T) { + data := []byte("same data") + var tok1 Token = CharData(data) + tok2 := CopyToken(tok1) + if !reflect.DeepEqual(tok1, tok2) { + t.Error("CopyToken(CharData) != CharData") + } + data[1] = 'o' + if reflect.DeepEqual(tok1, tok2) { + t.Error("CopyToken(CharData) uses same buffer.") + } +} + +func TestCopyTokenStartElement(t *testing.T) { + elt := StartElement{Name{"", "hello"}, []Attr{{Name{"", "lang"}, "en"}}} + var tok1 Token = elt + tok2 := CopyToken(tok1) + if tok1.(StartElement).Attr[0].Value != "en" { + t.Error("CopyToken overwrote Attr[0]") + } + if !reflect.DeepEqual(tok1, tok2) { + t.Error("CopyToken(StartElement) != StartElement") + } + tok1.(StartElement).Attr[0] = Attr{Name{"", "lang"}, "de"} + if reflect.DeepEqual(tok1, tok2) { + t.Error("CopyToken(CharData) uses same buffer.") + } +} + +func TestSyntaxErrorLineNum(t *testing.T) { + testInput := "

    Foo

    \n\n

    Bar\n" + d := NewDecoder(strings.NewReader(testInput)) + var err error + for _, err = d.Token(); err == nil; _, err = d.Token() { + } + synerr, ok := err.(*SyntaxError) + if !ok { + t.Error("Expected SyntaxError.") + } + if synerr.Line != 3 { + t.Error("SyntaxError didn't have correct line number.") + } +} + +func TestTrailingRawToken(t *testing.T) { + input := ` ` + d := NewDecoder(strings.NewReader(input)) + var err error + for _, err = d.RawToken(); err == nil; _, err = d.RawToken() { + } + if err != io.EOF { + t.Fatalf("d.RawToken() = _, %v, want _, io.EOF", err) + } +} + +func TestTrailingToken(t *testing.T) { + input := ` ` + d := NewDecoder(strings.NewReader(input)) + var err error + for _, err = d.Token(); err == nil; _, err = d.Token() { + } + if err != io.EOF { + t.Fatalf("d.Token() = _, %v, want _, io.EOF", err) + } +} + +func TestEntityInsideCDATA(t *testing.T) { + input := `` + d := NewDecoder(strings.NewReader(input)) + var err error + for _, err = d.Token(); err == nil; _, err = d.Token() { + } + if err != io.EOF { + t.Fatalf("d.Token() = _, %v, want _, io.EOF", err) + } +} + +var characterTests = []struct { + in string + err string +}{ + {"\x12", "illegal character code U+0012"}, + {"\x0b", "illegal character code U+000B"}, + {"\xef\xbf\xbe", "illegal character code U+FFFE"}, + {"\r\n\x07", "illegal character code U+0007"}, + {"what's up", "expected attribute name in element"}, + {"&abc\x01;", "invalid character entity &abc (no semicolon)"}, + {"&\x01;", "invalid character entity & (no semicolon)"}, + {"&\xef\xbf\xbe;", "invalid character entity &\uFFFE;"}, + {"&hello;", "invalid character entity &hello;"}, +} + +func TestDisallowedCharacters(t *testing.T) { + + for i, tt := range characterTests { + d := NewDecoder(strings.NewReader(tt.in)) + var err error + + for err == nil { + _, err = d.Token() + } + synerr, ok := err.(*SyntaxError) + if !ok { + t.Fatalf("input %d d.Token() = _, %v, want _, *SyntaxError", i, err) + } + if synerr.Msg != tt.err { + t.Fatalf("input %d synerr.Msg wrong: want %q, got %q", i, tt.err, synerr.Msg) + } + } +} + +type procInstEncodingTest struct { + expect, got string +} + +var procInstTests = []struct { + input string + expect [2]string +}{ + {`version="1.0" encoding="utf-8"`, [2]string{"1.0", "utf-8"}}, + {`version="1.0" encoding='utf-8'`, [2]string{"1.0", "utf-8"}}, + {`version="1.0" encoding='utf-8' `, [2]string{"1.0", "utf-8"}}, + {`version="1.0" encoding=utf-8`, [2]string{"1.0", ""}}, + {`encoding="FOO" `, [2]string{"", "FOO"}}, +} + +func TestProcInstEncoding(t *testing.T) { + for _, test := range procInstTests { + if got := procInst("version", test.input); got != test.expect[0] { + t.Errorf("procInst(version, %q) = %q; want %q", test.input, got, test.expect[0]) + } + if got := procInst("encoding", test.input); got != test.expect[1] { + t.Errorf("procInst(encoding, %q) = %q; want %q", test.input, got, test.expect[1]) + } + } +} + +// Ensure that directives with comments include the complete +// text of any nested directives. + +var directivesWithCommentsInput = ` +]> +]> + --> --> []> +` + +var directivesWithCommentsTokens = []Token{ + CharData("\n"), + Directive(`DOCTYPE []`), + CharData("\n"), + Directive(`DOCTYPE []`), + CharData("\n"), + Directive(`DOCTYPE []`), + CharData("\n"), +} + +func TestDirectivesWithComments(t *testing.T) { + d := NewDecoder(strings.NewReader(directivesWithCommentsInput)) + + for i, want := range directivesWithCommentsTokens { + have, err := d.Token() + if err != nil { + t.Fatalf("token %d: unexpected error: %s", i, err) + } + if !reflect.DeepEqual(have, want) { + t.Errorf("token %d = %#v want %#v", i, have, want) + } + } +} + +// Writer whose Write method always returns an error. +type errWriter struct{} + +func (errWriter) Write(p []byte) (n int, err error) { return 0, fmt.Errorf("unwritable") } + +func TestEscapeTextIOErrors(t *testing.T) { + expectErr := "unwritable" + err := EscapeText(errWriter{}, []byte{'A'}) + + if err == nil || err.Error() != expectErr { + t.Errorf("have %v, want %v", err, expectErr) + } +} + +func TestEscapeTextInvalidChar(t *testing.T) { + input := []byte("A \x00 terminated string.") + expected := "A \uFFFD terminated string." + + buff := new(bytes.Buffer) + if err := EscapeText(buff, input); err != nil { + t.Fatalf("have %v, want nil", err) + } + text := buff.String() + + if text != expected { + t.Errorf("have %v, want %v", text, expected) + } +} + +func TestIssue5880(t *testing.T) { + type T []byte + data, err := Marshal(T{192, 168, 0, 1}) + if err != nil { + t.Errorf("Marshal error: %v", err) + } + if !utf8.Valid(data) { + t.Errorf("Marshal generated invalid UTF-8: %x", data) + } +} diff --git a/vendor/golang.org/x/net/webdav/litmus_test_server.go b/vendor/golang.org/x/net/webdav/litmus_test_server.go new file mode 100644 index 0000000..514db5d --- /dev/null +++ b/vendor/golang.org/x/net/webdav/litmus_test_server.go @@ -0,0 +1,94 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +/* +This program is a server for the WebDAV 'litmus' compliance test at +http://www.webdav.org/neon/litmus/ +To run the test: + +go run litmus_test_server.go + +and separately, from the downloaded litmus-xxx directory: + +make URL=http://localhost:9999/ check +*/ +package main + +import ( + "flag" + "fmt" + "log" + "net/http" + "net/url" + + "golang.org/x/net/webdav" +) + +var port = flag.Int("port", 9999, "server port") + +func main() { + flag.Parse() + log.SetFlags(0) + h := &webdav.Handler{ + FileSystem: webdav.NewMemFS(), + LockSystem: webdav.NewMemLS(), + Logger: func(r *http.Request, err error) { + litmus := r.Header.Get("X-Litmus") + if len(litmus) > 19 { + litmus = litmus[:16] + "..." + } + + switch r.Method { + case "COPY", "MOVE": + dst := "" + if u, err := url.Parse(r.Header.Get("Destination")); err == nil { + dst = u.Path + } + o := r.Header.Get("Overwrite") + log.Printf("%-20s%-10s%-30s%-30so=%-2s%v", litmus, r.Method, r.URL.Path, dst, o, err) + default: + log.Printf("%-20s%-10s%-30s%v", litmus, r.Method, r.URL.Path, err) + } + }, + } + + // The next line would normally be: + // http.Handle("/", h) + // but we wrap that HTTP handler h to cater for a special case. + // + // The propfind_invalid2 litmus test case expects an empty namespace prefix + // declaration to be an error. The FAQ in the webdav litmus test says: + // + // "What does the "propfind_invalid2" test check for?... + // + // If a request was sent with an XML body which included an empty namespace + // prefix declaration (xmlns:ns1=""), then the server must reject that with + // a "400 Bad Request" response, as it is invalid according to the XML + // Namespace specification." + // + // On the other hand, the Go standard library's encoding/xml package + // accepts an empty xmlns namespace, as per the discussion at + // https://github.com/golang/go/issues/8068 + // + // Empty namespaces seem disallowed in the second (2006) edition of the XML + // standard, but allowed in a later edition. The grammar differs between + // http://www.w3.org/TR/2006/REC-xml-names-20060816/#ns-decl and + // http://www.w3.org/TR/REC-xml-names/#dt-prefix + // + // Thus, we assume that the propfind_invalid2 test is obsolete, and + // hard-code the 400 Bad Request response that the test expects. + http.Handle("/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if r.Header.Get("X-Litmus") == "props: 3 (propfind_invalid2)" { + http.Error(w, "400 Bad Request", http.StatusBadRequest) + return + } + h.ServeHTTP(w, r) + })) + + addr := fmt.Sprintf(":%d", *port) + log.Printf("Serving %v", addr) + log.Fatal(http.ListenAndServe(addr, nil)) +} diff --git a/vendor/golang.org/x/net/webdav/lock.go b/vendor/golang.org/x/net/webdav/lock.go new file mode 100644 index 0000000..344ac5c --- /dev/null +++ b/vendor/golang.org/x/net/webdav/lock.go @@ -0,0 +1,445 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package webdav + +import ( + "container/heap" + "errors" + "strconv" + "strings" + "sync" + "time" +) + +var ( + // ErrConfirmationFailed is returned by a LockSystem's Confirm method. + ErrConfirmationFailed = errors.New("webdav: confirmation failed") + // ErrForbidden is returned by a LockSystem's Unlock method. + ErrForbidden = errors.New("webdav: forbidden") + // ErrLocked is returned by a LockSystem's Create, Refresh and Unlock methods. + ErrLocked = errors.New("webdav: locked") + // ErrNoSuchLock is returned by a LockSystem's Refresh and Unlock methods. + ErrNoSuchLock = errors.New("webdav: no such lock") +) + +// Condition can match a WebDAV resource, based on a token or ETag. +// Exactly one of Token and ETag should be non-empty. +type Condition struct { + Not bool + Token string + ETag string +} + +// LockSystem manages access to a collection of named resources. The elements +// in a lock name are separated by slash ('/', U+002F) characters, regardless +// of host operating system convention. +type LockSystem interface { + // Confirm confirms that the caller can claim all of the locks specified by + // the given conditions, and that holding the union of all of those locks + // gives exclusive access to all of the named resources. Up to two resources + // can be named. Empty names are ignored. + // + // Exactly one of release and err will be non-nil. If release is non-nil, + // all of the requested locks are held until release is called. Calling + // release does not unlock the lock, in the WebDAV UNLOCK sense, but once + // Confirm has confirmed that a lock claim is valid, that lock cannot be + // Confirmed again until it has been released. + // + // If Confirm returns ErrConfirmationFailed then the Handler will continue + // to try any other set of locks presented (a WebDAV HTTP request can + // present more than one set of locks). If it returns any other non-nil + // error, the Handler will write a "500 Internal Server Error" HTTP status. + Confirm(now time.Time, name0, name1 string, conditions ...Condition) (release func(), err error) + + // Create creates a lock with the given depth, duration, owner and root + // (name). The depth will either be negative (meaning infinite) or zero. + // + // If Create returns ErrLocked then the Handler will write a "423 Locked" + // HTTP status. If it returns any other non-nil error, the Handler will + // write a "500 Internal Server Error" HTTP status. + // + // See http://www.webdav.org/specs/rfc4918.html#rfc.section.9.10.6 for + // when to use each error. + // + // The token returned identifies the created lock. It should be an absolute + // URI as defined by RFC 3986, Section 4.3. In particular, it should not + // contain whitespace. + Create(now time.Time, details LockDetails) (token string, err error) + + // Refresh refreshes the lock with the given token. + // + // If Refresh returns ErrLocked then the Handler will write a "423 Locked" + // HTTP Status. If Refresh returns ErrNoSuchLock then the Handler will write + // a "412 Precondition Failed" HTTP Status. If it returns any other non-nil + // error, the Handler will write a "500 Internal Server Error" HTTP status. + // + // See http://www.webdav.org/specs/rfc4918.html#rfc.section.9.10.6 for + // when to use each error. + Refresh(now time.Time, token string, duration time.Duration) (LockDetails, error) + + // Unlock unlocks the lock with the given token. + // + // If Unlock returns ErrForbidden then the Handler will write a "403 + // Forbidden" HTTP Status. If Unlock returns ErrLocked then the Handler + // will write a "423 Locked" HTTP status. If Unlock returns ErrNoSuchLock + // then the Handler will write a "409 Conflict" HTTP Status. If it returns + // any other non-nil error, the Handler will write a "500 Internal Server + // Error" HTTP status. + // + // See http://www.webdav.org/specs/rfc4918.html#rfc.section.9.11.1 for + // when to use each error. + Unlock(now time.Time, token string) error +} + +// LockDetails are a lock's metadata. +type LockDetails struct { + // Root is the root resource name being locked. For a zero-depth lock, the + // root is the only resource being locked. + Root string + // Duration is the lock timeout. A negative duration means infinite. + Duration time.Duration + // OwnerXML is the verbatim XML given in a LOCK HTTP request. + // + // TODO: does the "verbatim" nature play well with XML namespaces? + // Does the OwnerXML field need to have more structure? See + // https://codereview.appspot.com/175140043/#msg2 + OwnerXML string + // ZeroDepth is whether the lock has zero depth. If it does not have zero + // depth, it has infinite depth. + ZeroDepth bool +} + +// NewMemLS returns a new in-memory LockSystem. +func NewMemLS() LockSystem { + return &memLS{ + byName: make(map[string]*memLSNode), + byToken: make(map[string]*memLSNode), + gen: uint64(time.Now().Unix()), + } +} + +type memLS struct { + mu sync.Mutex + byName map[string]*memLSNode + byToken map[string]*memLSNode + gen uint64 + // byExpiry only contains those nodes whose LockDetails have a finite + // Duration and are yet to expire. + byExpiry byExpiry +} + +func (m *memLS) nextToken() string { + m.gen++ + return strconv.FormatUint(m.gen, 10) +} + +func (m *memLS) collectExpiredNodes(now time.Time) { + for len(m.byExpiry) > 0 { + if now.Before(m.byExpiry[0].expiry) { + break + } + m.remove(m.byExpiry[0]) + } +} + +func (m *memLS) Confirm(now time.Time, name0, name1 string, conditions ...Condition) (func(), error) { + m.mu.Lock() + defer m.mu.Unlock() + m.collectExpiredNodes(now) + + var n0, n1 *memLSNode + if name0 != "" { + if n0 = m.lookup(slashClean(name0), conditions...); n0 == nil { + return nil, ErrConfirmationFailed + } + } + if name1 != "" { + if n1 = m.lookup(slashClean(name1), conditions...); n1 == nil { + return nil, ErrConfirmationFailed + } + } + + // Don't hold the same node twice. + if n1 == n0 { + n1 = nil + } + + if n0 != nil { + m.hold(n0) + } + if n1 != nil { + m.hold(n1) + } + return func() { + m.mu.Lock() + defer m.mu.Unlock() + if n1 != nil { + m.unhold(n1) + } + if n0 != nil { + m.unhold(n0) + } + }, nil +} + +// lookup returns the node n that locks the named resource, provided that n +// matches at least one of the given conditions and that lock isn't held by +// another party. Otherwise, it returns nil. +// +// n may be a parent of the named resource, if n is an infinite depth lock. +func (m *memLS) lookup(name string, conditions ...Condition) (n *memLSNode) { + // TODO: support Condition.Not and Condition.ETag. + for _, c := range conditions { + n = m.byToken[c.Token] + if n == nil || n.held { + continue + } + if name == n.details.Root { + return n + } + if n.details.ZeroDepth { + continue + } + if n.details.Root == "/" || strings.HasPrefix(name, n.details.Root+"/") { + return n + } + } + return nil +} + +func (m *memLS) hold(n *memLSNode) { + if n.held { + panic("webdav: memLS inconsistent held state") + } + n.held = true + if n.details.Duration >= 0 && n.byExpiryIndex >= 0 { + heap.Remove(&m.byExpiry, n.byExpiryIndex) + } +} + +func (m *memLS) unhold(n *memLSNode) { + if !n.held { + panic("webdav: memLS inconsistent held state") + } + n.held = false + if n.details.Duration >= 0 { + heap.Push(&m.byExpiry, n) + } +} + +func (m *memLS) Create(now time.Time, details LockDetails) (string, error) { + m.mu.Lock() + defer m.mu.Unlock() + m.collectExpiredNodes(now) + details.Root = slashClean(details.Root) + + if !m.canCreate(details.Root, details.ZeroDepth) { + return "", ErrLocked + } + n := m.create(details.Root) + n.token = m.nextToken() + m.byToken[n.token] = n + n.details = details + if n.details.Duration >= 0 { + n.expiry = now.Add(n.details.Duration) + heap.Push(&m.byExpiry, n) + } + return n.token, nil +} + +func (m *memLS) Refresh(now time.Time, token string, duration time.Duration) (LockDetails, error) { + m.mu.Lock() + defer m.mu.Unlock() + m.collectExpiredNodes(now) + + n := m.byToken[token] + if n == nil { + return LockDetails{}, ErrNoSuchLock + } + if n.held { + return LockDetails{}, ErrLocked + } + if n.byExpiryIndex >= 0 { + heap.Remove(&m.byExpiry, n.byExpiryIndex) + } + n.details.Duration = duration + if n.details.Duration >= 0 { + n.expiry = now.Add(n.details.Duration) + heap.Push(&m.byExpiry, n) + } + return n.details, nil +} + +func (m *memLS) Unlock(now time.Time, token string) error { + m.mu.Lock() + defer m.mu.Unlock() + m.collectExpiredNodes(now) + + n := m.byToken[token] + if n == nil { + return ErrNoSuchLock + } + if n.held { + return ErrLocked + } + m.remove(n) + return nil +} + +func (m *memLS) canCreate(name string, zeroDepth bool) bool { + return walkToRoot(name, func(name0 string, first bool) bool { + n := m.byName[name0] + if n == nil { + return true + } + if first { + if n.token != "" { + // The target node is already locked. + return false + } + if !zeroDepth { + // The requested lock depth is infinite, and the fact that n exists + // (n != nil) means that a descendent of the target node is locked. + return false + } + } else if n.token != "" && !n.details.ZeroDepth { + // An ancestor of the target node is locked with infinite depth. + return false + } + return true + }) +} + +func (m *memLS) create(name string) (ret *memLSNode) { + walkToRoot(name, func(name0 string, first bool) bool { + n := m.byName[name0] + if n == nil { + n = &memLSNode{ + details: LockDetails{ + Root: name0, + }, + byExpiryIndex: -1, + } + m.byName[name0] = n + } + n.refCount++ + if first { + ret = n + } + return true + }) + return ret +} + +func (m *memLS) remove(n *memLSNode) { + delete(m.byToken, n.token) + n.token = "" + walkToRoot(n.details.Root, func(name0 string, first bool) bool { + x := m.byName[name0] + x.refCount-- + if x.refCount == 0 { + delete(m.byName, name0) + } + return true + }) + if n.byExpiryIndex >= 0 { + heap.Remove(&m.byExpiry, n.byExpiryIndex) + } +} + +func walkToRoot(name string, f func(name0 string, first bool) bool) bool { + for first := true; ; first = false { + if !f(name, first) { + return false + } + if name == "/" { + break + } + name = name[:strings.LastIndex(name, "/")] + if name == "" { + name = "/" + } + } + return true +} + +type memLSNode struct { + // details are the lock metadata. Even if this node's name is not explicitly locked, + // details.Root will still equal the node's name. + details LockDetails + // token is the unique identifier for this node's lock. An empty token means that + // this node is not explicitly locked. + token string + // refCount is the number of self-or-descendent nodes that are explicitly locked. + refCount int + // expiry is when this node's lock expires. + expiry time.Time + // byExpiryIndex is the index of this node in memLS.byExpiry. It is -1 + // if this node does not expire, or has expired. + byExpiryIndex int + // held is whether this node's lock is actively held by a Confirm call. + held bool +} + +type byExpiry []*memLSNode + +func (b *byExpiry) Len() int { + return len(*b) +} + +func (b *byExpiry) Less(i, j int) bool { + return (*b)[i].expiry.Before((*b)[j].expiry) +} + +func (b *byExpiry) Swap(i, j int) { + (*b)[i], (*b)[j] = (*b)[j], (*b)[i] + (*b)[i].byExpiryIndex = i + (*b)[j].byExpiryIndex = j +} + +func (b *byExpiry) Push(x interface{}) { + n := x.(*memLSNode) + n.byExpiryIndex = len(*b) + *b = append(*b, n) +} + +func (b *byExpiry) Pop() interface{} { + i := len(*b) - 1 + n := (*b)[i] + (*b)[i] = nil + n.byExpiryIndex = -1 + *b = (*b)[:i] + return n +} + +const infiniteTimeout = -1 + +// parseTimeout parses the Timeout HTTP header, as per section 10.7. If s is +// empty, an infiniteTimeout is returned. +func parseTimeout(s string) (time.Duration, error) { + if s == "" { + return infiniteTimeout, nil + } + if i := strings.IndexByte(s, ','); i >= 0 { + s = s[:i] + } + s = strings.TrimSpace(s) + if s == "Infinite" { + return infiniteTimeout, nil + } + const pre = "Second-" + if !strings.HasPrefix(s, pre) { + return 0, errInvalidTimeout + } + s = s[len(pre):] + if s == "" || s[0] < '0' || '9' < s[0] { + return 0, errInvalidTimeout + } + n, err := strconv.ParseInt(s, 10, 64) + if err != nil || 1<<32-1 < n { + return 0, errInvalidTimeout + } + return time.Duration(n) * time.Second, nil +} diff --git a/vendor/golang.org/x/net/webdav/lock_test.go b/vendor/golang.org/x/net/webdav/lock_test.go new file mode 100644 index 0000000..116d6c0 --- /dev/null +++ b/vendor/golang.org/x/net/webdav/lock_test.go @@ -0,0 +1,731 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package webdav + +import ( + "fmt" + "math/rand" + "path" + "reflect" + "sort" + "strconv" + "strings" + "testing" + "time" +) + +func TestWalkToRoot(t *testing.T) { + testCases := []struct { + name string + want []string + }{{ + "/a/b/c/d", + []string{ + "/a/b/c/d", + "/a/b/c", + "/a/b", + "/a", + "/", + }, + }, { + "/a", + []string{ + "/a", + "/", + }, + }, { + "/", + []string{ + "/", + }, + }} + + for _, tc := range testCases { + var got []string + if !walkToRoot(tc.name, func(name0 string, first bool) bool { + if first != (len(got) == 0) { + t.Errorf("name=%q: first=%t but len(got)==%d", tc.name, first, len(got)) + return false + } + got = append(got, name0) + return true + }) { + continue + } + if !reflect.DeepEqual(got, tc.want) { + t.Errorf("name=%q:\ngot %q\nwant %q", tc.name, got, tc.want) + } + } +} + +var lockTestDurations = []time.Duration{ + infiniteTimeout, // infiniteTimeout means to never expire. + 0, // A zero duration means to expire immediately. + 100 * time.Hour, // A very large duration will not expire in these tests. +} + +// lockTestNames are the names of a set of mutually compatible locks. For each +// name fragment: +// - _ means no explicit lock. +// - i means a infinite-depth lock, +// - z means a zero-depth lock, +var lockTestNames = []string{ + "/_/_/_/_/z", + "/_/_/i", + "/_/z", + "/_/z/i", + "/_/z/z", + "/_/z/_/i", + "/_/z/_/z", + "/i", + "/z", + "/z/_/i", + "/z/_/z", +} + +func lockTestZeroDepth(name string) bool { + switch name[len(name)-1] { + case 'i': + return false + case 'z': + return true + } + panic(fmt.Sprintf("lock name %q did not end with 'i' or 'z'", name)) +} + +func TestMemLSCanCreate(t *testing.T) { + now := time.Unix(0, 0) + m := NewMemLS().(*memLS) + + for _, name := range lockTestNames { + _, err := m.Create(now, LockDetails{ + Root: name, + Duration: infiniteTimeout, + ZeroDepth: lockTestZeroDepth(name), + }) + if err != nil { + t.Fatalf("creating lock for %q: %v", name, err) + } + } + + wantCanCreate := func(name string, zeroDepth bool) bool { + for _, n := range lockTestNames { + switch { + case n == name: + // An existing lock has the same name as the proposed lock. + return false + case strings.HasPrefix(n, name): + // An existing lock would be a child of the proposed lock, + // which conflicts if the proposed lock has infinite depth. + if !zeroDepth { + return false + } + case strings.HasPrefix(name, n): + // An existing lock would be an ancestor of the proposed lock, + // which conflicts if the ancestor has infinite depth. + if n[len(n)-1] == 'i' { + return false + } + } + } + return true + } + + var check func(int, string) + check = func(recursion int, name string) { + for _, zeroDepth := range []bool{false, true} { + got := m.canCreate(name, zeroDepth) + want := wantCanCreate(name, zeroDepth) + if got != want { + t.Errorf("canCreate name=%q zeroDepth=%t: got %t, want %t", name, zeroDepth, got, want) + } + } + if recursion == 6 { + return + } + if name != "/" { + name += "/" + } + for _, c := range "_iz" { + check(recursion+1, name+string(c)) + } + } + check(0, "/") +} + +func TestMemLSLookup(t *testing.T) { + now := time.Unix(0, 0) + m := NewMemLS().(*memLS) + + badToken := m.nextToken() + t.Logf("badToken=%q", badToken) + + for _, name := range lockTestNames { + token, err := m.Create(now, LockDetails{ + Root: name, + Duration: infiniteTimeout, + ZeroDepth: lockTestZeroDepth(name), + }) + if err != nil { + t.Fatalf("creating lock for %q: %v", name, err) + } + t.Logf("%-15q -> node=%p token=%q", name, m.byName[name], token) + } + + baseNames := append([]string{"/a", "/b/c"}, lockTestNames...) + for _, baseName := range baseNames { + for _, suffix := range []string{"", "/0", "/1/2/3"} { + name := baseName + suffix + + goodToken := "" + base := m.byName[baseName] + if base != nil && (suffix == "" || !lockTestZeroDepth(baseName)) { + goodToken = base.token + } + + for _, token := range []string{badToken, goodToken} { + if token == "" { + continue + } + + got := m.lookup(name, Condition{Token: token}) + want := base + if token == badToken { + want = nil + } + if got != want { + t.Errorf("name=%-20qtoken=%q (bad=%t): got %p, want %p", + name, token, token == badToken, got, want) + } + } + } + } +} + +func TestMemLSConfirm(t *testing.T) { + now := time.Unix(0, 0) + m := NewMemLS().(*memLS) + alice, err := m.Create(now, LockDetails{ + Root: "/alice", + Duration: infiniteTimeout, + ZeroDepth: false, + }) + tweedle, err := m.Create(now, LockDetails{ + Root: "/tweedle", + Duration: infiniteTimeout, + ZeroDepth: false, + }) + if err != nil { + t.Fatalf("Create: %v", err) + } + if err := m.consistent(); err != nil { + t.Fatalf("Create: inconsistent state: %v", err) + } + + // Test a mismatch between name and condition. + _, err = m.Confirm(now, "/tweedle/dee", "", Condition{Token: alice}) + if err != ErrConfirmationFailed { + t.Fatalf("Confirm (mismatch): got %v, want ErrConfirmationFailed", err) + } + if err := m.consistent(); err != nil { + t.Fatalf("Confirm (mismatch): inconsistent state: %v", err) + } + + // Test two names (that fall under the same lock) in the one Confirm call. + release, err := m.Confirm(now, "/tweedle/dee", "/tweedle/dum", Condition{Token: tweedle}) + if err != nil { + t.Fatalf("Confirm (twins): %v", err) + } + if err := m.consistent(); err != nil { + t.Fatalf("Confirm (twins): inconsistent state: %v", err) + } + release() + if err := m.consistent(); err != nil { + t.Fatalf("release (twins): inconsistent state: %v", err) + } + + // Test the same two names in overlapping Confirm / release calls. + releaseDee, err := m.Confirm(now, "/tweedle/dee", "", Condition{Token: tweedle}) + if err != nil { + t.Fatalf("Confirm (sequence #0): %v", err) + } + if err := m.consistent(); err != nil { + t.Fatalf("Confirm (sequence #0): inconsistent state: %v", err) + } + + _, err = m.Confirm(now, "/tweedle/dum", "", Condition{Token: tweedle}) + if err != ErrConfirmationFailed { + t.Fatalf("Confirm (sequence #1): got %v, want ErrConfirmationFailed", err) + } + if err := m.consistent(); err != nil { + t.Fatalf("Confirm (sequence #1): inconsistent state: %v", err) + } + + releaseDee() + if err := m.consistent(); err != nil { + t.Fatalf("release (sequence #2): inconsistent state: %v", err) + } + + releaseDum, err := m.Confirm(now, "/tweedle/dum", "", Condition{Token: tweedle}) + if err != nil { + t.Fatalf("Confirm (sequence #3): %v", err) + } + if err := m.consistent(); err != nil { + t.Fatalf("Confirm (sequence #3): inconsistent state: %v", err) + } + + // Test that you can't unlock a held lock. + err = m.Unlock(now, tweedle) + if err != ErrLocked { + t.Fatalf("Unlock (sequence #4): got %v, want ErrLocked", err) + } + + releaseDum() + if err := m.consistent(); err != nil { + t.Fatalf("release (sequence #5): inconsistent state: %v", err) + } + + err = m.Unlock(now, tweedle) + if err != nil { + t.Fatalf("Unlock (sequence #6): %v", err) + } + if err := m.consistent(); err != nil { + t.Fatalf("Unlock (sequence #6): inconsistent state: %v", err) + } +} + +func TestMemLSNonCanonicalRoot(t *testing.T) { + now := time.Unix(0, 0) + m := NewMemLS().(*memLS) + token, err := m.Create(now, LockDetails{ + Root: "/foo/./bar//", + Duration: 1 * time.Second, + }) + if err != nil { + t.Fatalf("Create: %v", err) + } + if err := m.consistent(); err != nil { + t.Fatalf("Create: inconsistent state: %v", err) + } + if err := m.Unlock(now, token); err != nil { + t.Fatalf("Unlock: %v", err) + } + if err := m.consistent(); err != nil { + t.Fatalf("Unlock: inconsistent state: %v", err) + } +} + +func TestMemLSExpiry(t *testing.T) { + m := NewMemLS().(*memLS) + testCases := []string{ + "setNow 0", + "create /a.5", + "want /a.5", + "create /c.6", + "want /a.5 /c.6", + "create /a/b.7", + "want /a.5 /a/b.7 /c.6", + "setNow 4", + "want /a.5 /a/b.7 /c.6", + "setNow 5", + "want /a/b.7 /c.6", + "setNow 6", + "want /a/b.7", + "setNow 7", + "want ", + "setNow 8", + "want ", + "create /a.12", + "create /b.13", + "create /c.15", + "create /a/d.16", + "want /a.12 /a/d.16 /b.13 /c.15", + "refresh /a.14", + "want /a.14 /a/d.16 /b.13 /c.15", + "setNow 12", + "want /a.14 /a/d.16 /b.13 /c.15", + "setNow 13", + "want /a.14 /a/d.16 /c.15", + "setNow 14", + "want /a/d.16 /c.15", + "refresh /a/d.20", + "refresh /c.20", + "want /a/d.20 /c.20", + "setNow 20", + "want ", + } + + tokens := map[string]string{} + zTime := time.Unix(0, 0) + now := zTime + for i, tc := range testCases { + j := strings.IndexByte(tc, ' ') + if j < 0 { + t.Fatalf("test case #%d %q: invalid command", i, tc) + } + op, arg := tc[:j], tc[j+1:] + switch op { + default: + t.Fatalf("test case #%d %q: invalid operation %q", i, tc, op) + + case "create", "refresh": + parts := strings.Split(arg, ".") + if len(parts) != 2 { + t.Fatalf("test case #%d %q: invalid create", i, tc) + } + root := parts[0] + d, err := strconv.Atoi(parts[1]) + if err != nil { + t.Fatalf("test case #%d %q: invalid duration", i, tc) + } + dur := time.Unix(0, 0).Add(time.Duration(d) * time.Second).Sub(now) + + switch op { + case "create": + token, err := m.Create(now, LockDetails{ + Root: root, + Duration: dur, + ZeroDepth: true, + }) + if err != nil { + t.Fatalf("test case #%d %q: Create: %v", i, tc, err) + } + tokens[root] = token + + case "refresh": + token := tokens[root] + if token == "" { + t.Fatalf("test case #%d %q: no token for %q", i, tc, root) + } + got, err := m.Refresh(now, token, dur) + if err != nil { + t.Fatalf("test case #%d %q: Refresh: %v", i, tc, err) + } + want := LockDetails{ + Root: root, + Duration: dur, + ZeroDepth: true, + } + if got != want { + t.Fatalf("test case #%d %q:\ngot %v\nwant %v", i, tc, got, want) + } + } + + case "setNow": + d, err := strconv.Atoi(arg) + if err != nil { + t.Fatalf("test case #%d %q: invalid duration", i, tc) + } + now = time.Unix(0, 0).Add(time.Duration(d) * time.Second) + + case "want": + m.mu.Lock() + m.collectExpiredNodes(now) + got := make([]string, 0, len(m.byToken)) + for _, n := range m.byToken { + got = append(got, fmt.Sprintf("%s.%d", + n.details.Root, n.expiry.Sub(zTime)/time.Second)) + } + m.mu.Unlock() + sort.Strings(got) + want := []string{} + if arg != "" { + want = strings.Split(arg, " ") + } + if !reflect.DeepEqual(got, want) { + t.Fatalf("test case #%d %q:\ngot %q\nwant %q", i, tc, got, want) + } + } + + if err := m.consistent(); err != nil { + t.Fatalf("test case #%d %q: inconsistent state: %v", i, tc, err) + } + } +} + +func TestMemLS(t *testing.T) { + now := time.Unix(0, 0) + m := NewMemLS().(*memLS) + rng := rand.New(rand.NewSource(0)) + tokens := map[string]string{} + nConfirm, nCreate, nRefresh, nUnlock := 0, 0, 0, 0 + const N = 2000 + + for i := 0; i < N; i++ { + name := lockTestNames[rng.Intn(len(lockTestNames))] + duration := lockTestDurations[rng.Intn(len(lockTestDurations))] + confirmed, unlocked := false, false + + // If the name was already locked, we randomly confirm/release, refresh + // or unlock it. Otherwise, we create a lock. + token := tokens[name] + if token != "" { + switch rng.Intn(3) { + case 0: + confirmed = true + nConfirm++ + release, err := m.Confirm(now, name, "", Condition{Token: token}) + if err != nil { + t.Fatalf("iteration #%d: Confirm %q: %v", i, name, err) + } + if err := m.consistent(); err != nil { + t.Fatalf("iteration #%d: inconsistent state: %v", i, err) + } + release() + + case 1: + nRefresh++ + if _, err := m.Refresh(now, token, duration); err != nil { + t.Fatalf("iteration #%d: Refresh %q: %v", i, name, err) + } + + case 2: + unlocked = true + nUnlock++ + if err := m.Unlock(now, token); err != nil { + t.Fatalf("iteration #%d: Unlock %q: %v", i, name, err) + } + } + + } else { + nCreate++ + var err error + token, err = m.Create(now, LockDetails{ + Root: name, + Duration: duration, + ZeroDepth: lockTestZeroDepth(name), + }) + if err != nil { + t.Fatalf("iteration #%d: Create %q: %v", i, name, err) + } + } + + if !confirmed { + if duration == 0 || unlocked { + // A zero-duration lock should expire immediately and is + // effectively equivalent to being unlocked. + tokens[name] = "" + } else { + tokens[name] = token + } + } + + if err := m.consistent(); err != nil { + t.Fatalf("iteration #%d: inconsistent state: %v", i, err) + } + } + + if nConfirm < N/10 { + t.Fatalf("too few Confirm calls: got %d, want >= %d", nConfirm, N/10) + } + if nCreate < N/10 { + t.Fatalf("too few Create calls: got %d, want >= %d", nCreate, N/10) + } + if nRefresh < N/10 { + t.Fatalf("too few Refresh calls: got %d, want >= %d", nRefresh, N/10) + } + if nUnlock < N/10 { + t.Fatalf("too few Unlock calls: got %d, want >= %d", nUnlock, N/10) + } +} + +func (m *memLS) consistent() error { + m.mu.Lock() + defer m.mu.Unlock() + + // If m.byName is non-empty, then it must contain an entry for the root "/", + // and its refCount should equal the number of locked nodes. + if len(m.byName) > 0 { + n := m.byName["/"] + if n == nil { + return fmt.Errorf(`non-empty m.byName does not contain the root "/"`) + } + if n.refCount != len(m.byToken) { + return fmt.Errorf("root node refCount=%d, differs from len(m.byToken)=%d", n.refCount, len(m.byToken)) + } + } + + for name, n := range m.byName { + // The map keys should be consistent with the node's copy of the key. + if n.details.Root != name { + return fmt.Errorf("node name %q != byName map key %q", n.details.Root, name) + } + + // A name must be clean, and start with a "/". + if len(name) == 0 || name[0] != '/' { + return fmt.Errorf(`node name %q does not start with "/"`, name) + } + if name != path.Clean(name) { + return fmt.Errorf(`node name %q is not clean`, name) + } + + // A node's refCount should be positive. + if n.refCount <= 0 { + return fmt.Errorf("non-positive refCount for node at name %q", name) + } + + // A node's refCount should be the number of self-or-descendents that + // are locked (i.e. have a non-empty token). + var list []string + for name0, n0 := range m.byName { + // All of lockTestNames' name fragments are one byte long: '_', 'i' or 'z', + // so strings.HasPrefix is equivalent to self-or-descendent name match. + // We don't have to worry about "/foo/bar" being a false positive match + // for "/foo/b". + if strings.HasPrefix(name0, name) && n0.token != "" { + list = append(list, name0) + } + } + if n.refCount != len(list) { + sort.Strings(list) + return fmt.Errorf("node at name %q has refCount %d but locked self-or-descendents are %q (len=%d)", + name, n.refCount, list, len(list)) + } + + // A node n is in m.byToken if it has a non-empty token. + if n.token != "" { + if _, ok := m.byToken[n.token]; !ok { + return fmt.Errorf("node at name %q has token %q but not in m.byToken", name, n.token) + } + } + + // A node n is in m.byExpiry if it has a non-negative byExpiryIndex. + if n.byExpiryIndex >= 0 { + if n.byExpiryIndex >= len(m.byExpiry) { + return fmt.Errorf("node at name %q has byExpiryIndex %d but m.byExpiry has length %d", name, n.byExpiryIndex, len(m.byExpiry)) + } + if n != m.byExpiry[n.byExpiryIndex] { + return fmt.Errorf("node at name %q has byExpiryIndex %d but that indexes a different node", name, n.byExpiryIndex) + } + } + } + + for token, n := range m.byToken { + // The map keys should be consistent with the node's copy of the key. + if n.token != token { + return fmt.Errorf("node token %q != byToken map key %q", n.token, token) + } + + // Every node in m.byToken is in m.byName. + if _, ok := m.byName[n.details.Root]; !ok { + return fmt.Errorf("node at name %q in m.byToken but not in m.byName", n.details.Root) + } + } + + for i, n := range m.byExpiry { + // The slice indices should be consistent with the node's copy of the index. + if n.byExpiryIndex != i { + return fmt.Errorf("node byExpiryIndex %d != byExpiry slice index %d", n.byExpiryIndex, i) + } + + // Every node in m.byExpiry is in m.byName. + if _, ok := m.byName[n.details.Root]; !ok { + return fmt.Errorf("node at name %q in m.byExpiry but not in m.byName", n.details.Root) + } + + // No node in m.byExpiry should be held. + if n.held { + return fmt.Errorf("node at name %q in m.byExpiry is held", n.details.Root) + } + } + return nil +} + +func TestParseTimeout(t *testing.T) { + testCases := []struct { + s string + want time.Duration + wantErr error + }{{ + "", + infiniteTimeout, + nil, + }, { + "Infinite", + infiniteTimeout, + nil, + }, { + "Infinitesimal", + 0, + errInvalidTimeout, + }, { + "infinite", + 0, + errInvalidTimeout, + }, { + "Second-0", + 0 * time.Second, + nil, + }, { + "Second-123", + 123 * time.Second, + nil, + }, { + " Second-456 ", + 456 * time.Second, + nil, + }, { + "Second-4100000000", + 4100000000 * time.Second, + nil, + }, { + "junk", + 0, + errInvalidTimeout, + }, { + "Second-", + 0, + errInvalidTimeout, + }, { + "Second--1", + 0, + errInvalidTimeout, + }, { + "Second--123", + 0, + errInvalidTimeout, + }, { + "Second-+123", + 0, + errInvalidTimeout, + }, { + "Second-0x123", + 0, + errInvalidTimeout, + }, { + "second-123", + 0, + errInvalidTimeout, + }, { + "Second-4294967295", + 4294967295 * time.Second, + nil, + }, { + // Section 10.7 says that "The timeout value for TimeType "Second" + // must not be greater than 2^32-1." + "Second-4294967296", + 0, + errInvalidTimeout, + }, { + // This test case comes from section 9.10.9 of the spec. It says, + // + // "In this request, the client has specified that it desires an + // infinite-length lock, if available, otherwise a timeout of 4.1 + // billion seconds, if available." + // + // The Go WebDAV package always supports infinite length locks, + // and ignores the fallback after the comma. + "Infinite, Second-4100000000", + infiniteTimeout, + nil, + }} + + for _, tc := range testCases { + got, gotErr := parseTimeout(tc.s) + if got != tc.want || gotErr != tc.wantErr { + t.Errorf("parsing %q:\ngot %v, %v\nwant %v, %v", tc.s, got, gotErr, tc.want, tc.wantErr) + } + } +} diff --git a/vendor/golang.org/x/net/webdav/prop.go b/vendor/golang.org/x/net/webdav/prop.go new file mode 100644 index 0000000..a0ba16c --- /dev/null +++ b/vendor/golang.org/x/net/webdav/prop.go @@ -0,0 +1,385 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package webdav + +import ( + "fmt" + "io" + "mime" + "net/http" + "os" + "path/filepath" + "strconv" + + "golang.org/x/net/webdav/internal/xml" +) + +// Proppatch describes a property update instruction as defined in RFC 4918. +// See http://www.webdav.org/specs/rfc4918.html#METHOD_PROPPATCH +type Proppatch struct { + // Remove specifies whether this patch removes properties. If it does not + // remove them, it sets them. + Remove bool + // Props contains the properties to be set or removed. + Props []Property +} + +// Propstat describes a XML propstat element as defined in RFC 4918. +// See http://www.webdav.org/specs/rfc4918.html#ELEMENT_propstat +type Propstat struct { + // Props contains the properties for which Status applies. + Props []Property + + // Status defines the HTTP status code of the properties in Prop. + // Allowed values include, but are not limited to the WebDAV status + // code extensions for HTTP/1.1. + // http://www.webdav.org/specs/rfc4918.html#status.code.extensions.to.http11 + Status int + + // XMLError contains the XML representation of the optional error element. + // XML content within this field must not rely on any predefined + // namespace declarations or prefixes. If empty, the XML error element + // is omitted. + XMLError string + + // ResponseDescription contains the contents of the optional + // responsedescription field. If empty, the XML element is omitted. + ResponseDescription string +} + +// makePropstats returns a slice containing those of x and y whose Props slice +// is non-empty. If both are empty, it returns a slice containing an otherwise +// zero Propstat whose HTTP status code is 200 OK. +func makePropstats(x, y Propstat) []Propstat { + pstats := make([]Propstat, 0, 2) + if len(x.Props) != 0 { + pstats = append(pstats, x) + } + if len(y.Props) != 0 { + pstats = append(pstats, y) + } + if len(pstats) == 0 { + pstats = append(pstats, Propstat{ + Status: http.StatusOK, + }) + } + return pstats +} + +// DeadPropsHolder holds the dead properties of a resource. +// +// Dead properties are those properties that are explicitly defined. In +// comparison, live properties, such as DAV:getcontentlength, are implicitly +// defined by the underlying resource, and cannot be explicitly overridden or +// removed. See the Terminology section of +// http://www.webdav.org/specs/rfc4918.html#rfc.section.3 +// +// There is a whitelist of the names of live properties. This package handles +// all live properties, and will only pass non-whitelisted names to the Patch +// method of DeadPropsHolder implementations. +type DeadPropsHolder interface { + // DeadProps returns a copy of the dead properties held. + DeadProps() (map[xml.Name]Property, error) + + // Patch patches the dead properties held. + // + // Patching is atomic; either all or no patches succeed. It returns (nil, + // non-nil) if an internal server error occurred, otherwise the Propstats + // collectively contain one Property for each proposed patch Property. If + // all patches succeed, Patch returns a slice of length one and a Propstat + // element with a 200 OK HTTP status code. If none succeed, for reasons + // other than an internal server error, no Propstat has status 200 OK. + // + // For more details on when various HTTP status codes apply, see + // http://www.webdav.org/specs/rfc4918.html#PROPPATCH-status + Patch([]Proppatch) ([]Propstat, error) +} + +// liveProps contains all supported, protected DAV: properties. +var liveProps = map[xml.Name]struct { + // findFn implements the propfind function of this property. If nil, + // it indicates a hidden property. + findFn func(FileSystem, LockSystem, string, os.FileInfo) (string, error) + // dir is true if the property applies to directories. + dir bool +}{ + xml.Name{Space: "DAV:", Local: "resourcetype"}: { + findFn: findResourceType, + dir: true, + }, + xml.Name{Space: "DAV:", Local: "displayname"}: { + findFn: findDisplayName, + dir: true, + }, + xml.Name{Space: "DAV:", Local: "getcontentlength"}: { + findFn: findContentLength, + dir: true, + }, + xml.Name{Space: "DAV:", Local: "getlastmodified"}: { + findFn: findLastModified, + dir: true, + }, + xml.Name{Space: "DAV:", Local: "creationdate"}: { + findFn: nil, + dir: true, + }, + xml.Name{Space: "DAV:", Local: "getcontentlanguage"}: { + findFn: nil, + dir: true, + }, + xml.Name{Space: "DAV:", Local: "getcontenttype"}: { + findFn: findContentType, + dir: true, + }, + xml.Name{Space: "DAV:", Local: "getetag"}: { + findFn: findETag, + // findETag implements ETag as the concatenated hex values of a file's + // modification time and size. This is not a reliable synchronization + // mechanism for directories, so we do not advertise getetag for DAV + // collections. + dir: false, + }, + + // TODO: The lockdiscovery property requires LockSystem to list the + // active locks on a resource. + xml.Name{Space: "DAV:", Local: "lockdiscovery"}: {}, + xml.Name{Space: "DAV:", Local: "supportedlock"}: { + findFn: findSupportedLock, + dir: true, + }, +} + +// TODO(nigeltao) merge props and allprop? + +// Props returns the status of the properties named pnames for resource name. +// +// Each Propstat has a unique status and each property name will only be part +// of one Propstat element. +func props(fs FileSystem, ls LockSystem, name string, pnames []xml.Name) ([]Propstat, error) { + f, err := fs.OpenFile(name, os.O_RDONLY, 0) + if err != nil { + return nil, err + } + defer f.Close() + fi, err := f.Stat() + if err != nil { + return nil, err + } + isDir := fi.IsDir() + + var deadProps map[xml.Name]Property + if dph, ok := f.(DeadPropsHolder); ok { + deadProps, err = dph.DeadProps() + if err != nil { + return nil, err + } + } + + pstatOK := Propstat{Status: http.StatusOK} + pstatNotFound := Propstat{Status: http.StatusNotFound} + for _, pn := range pnames { + // If this file has dead properties, check if they contain pn. + if dp, ok := deadProps[pn]; ok { + pstatOK.Props = append(pstatOK.Props, dp) + continue + } + // Otherwise, it must either be a live property or we don't know it. + if prop := liveProps[pn]; prop.findFn != nil && (prop.dir || !isDir) { + innerXML, err := prop.findFn(fs, ls, name, fi) + if err != nil { + return nil, err + } + pstatOK.Props = append(pstatOK.Props, Property{ + XMLName: pn, + InnerXML: []byte(innerXML), + }) + } else { + pstatNotFound.Props = append(pstatNotFound.Props, Property{ + XMLName: pn, + }) + } + } + return makePropstats(pstatOK, pstatNotFound), nil +} + +// Propnames returns the property names defined for resource name. +func propnames(fs FileSystem, ls LockSystem, name string) ([]xml.Name, error) { + f, err := fs.OpenFile(name, os.O_RDONLY, 0) + if err != nil { + return nil, err + } + defer f.Close() + fi, err := f.Stat() + if err != nil { + return nil, err + } + isDir := fi.IsDir() + + var deadProps map[xml.Name]Property + if dph, ok := f.(DeadPropsHolder); ok { + deadProps, err = dph.DeadProps() + if err != nil { + return nil, err + } + } + + pnames := make([]xml.Name, 0, len(liveProps)+len(deadProps)) + for pn, prop := range liveProps { + if prop.findFn != nil && (prop.dir || !isDir) { + pnames = append(pnames, pn) + } + } + for pn := range deadProps { + pnames = append(pnames, pn) + } + return pnames, nil +} + +// Allprop returns the properties defined for resource name and the properties +// named in include. +// +// Note that RFC 4918 defines 'allprop' to return the DAV: properties defined +// within the RFC plus dead properties. Other live properties should only be +// returned if they are named in 'include'. +// +// See http://www.webdav.org/specs/rfc4918.html#METHOD_PROPFIND +func allprop(fs FileSystem, ls LockSystem, name string, include []xml.Name) ([]Propstat, error) { + pnames, err := propnames(fs, ls, name) + if err != nil { + return nil, err + } + // Add names from include if they are not already covered in pnames. + nameset := make(map[xml.Name]bool) + for _, pn := range pnames { + nameset[pn] = true + } + for _, pn := range include { + if !nameset[pn] { + pnames = append(pnames, pn) + } + } + return props(fs, ls, name, pnames) +} + +// Patch patches the properties of resource name. The return values are +// constrained in the same manner as DeadPropsHolder.Patch. +func patch(fs FileSystem, ls LockSystem, name string, patches []Proppatch) ([]Propstat, error) { + conflict := false +loop: + for _, patch := range patches { + for _, p := range patch.Props { + if _, ok := liveProps[p.XMLName]; ok { + conflict = true + break loop + } + } + } + if conflict { + pstatForbidden := Propstat{ + Status: http.StatusForbidden, + XMLError: ``, + } + pstatFailedDep := Propstat{ + Status: StatusFailedDependency, + } + for _, patch := range patches { + for _, p := range patch.Props { + if _, ok := liveProps[p.XMLName]; ok { + pstatForbidden.Props = append(pstatForbidden.Props, Property{XMLName: p.XMLName}) + } else { + pstatFailedDep.Props = append(pstatFailedDep.Props, Property{XMLName: p.XMLName}) + } + } + } + return makePropstats(pstatForbidden, pstatFailedDep), nil + } + + f, err := fs.OpenFile(name, os.O_RDWR, 0) + if err != nil { + return nil, err + } + defer f.Close() + if dph, ok := f.(DeadPropsHolder); ok { + ret, err := dph.Patch(patches) + if err != nil { + return nil, err + } + // http://www.webdav.org/specs/rfc4918.html#ELEMENT_propstat says that + // "The contents of the prop XML element must only list the names of + // properties to which the result in the status element applies." + for _, pstat := range ret { + for i, p := range pstat.Props { + pstat.Props[i] = Property{XMLName: p.XMLName} + } + } + return ret, nil + } + // The file doesn't implement the optional DeadPropsHolder interface, so + // all patches are forbidden. + pstat := Propstat{Status: http.StatusForbidden} + for _, patch := range patches { + for _, p := range patch.Props { + pstat.Props = append(pstat.Props, Property{XMLName: p.XMLName}) + } + } + return []Propstat{pstat}, nil +} + +func findResourceType(fs FileSystem, ls LockSystem, name string, fi os.FileInfo) (string, error) { + if fi.IsDir() { + return ``, nil + } + return "", nil +} + +func findDisplayName(fs FileSystem, ls LockSystem, name string, fi os.FileInfo) (string, error) { + if slashClean(name) == "/" { + // Hide the real name of a possibly prefixed root directory. + return "", nil + } + return fi.Name(), nil +} + +func findContentLength(fs FileSystem, ls LockSystem, name string, fi os.FileInfo) (string, error) { + return strconv.FormatInt(fi.Size(), 10), nil +} + +func findLastModified(fs FileSystem, ls LockSystem, name string, fi os.FileInfo) (string, error) { + return fi.ModTime().Format(http.TimeFormat), nil +} + +func findContentType(fs FileSystem, ls LockSystem, name string, fi os.FileInfo) (string, error) { + f, err := fs.OpenFile(name, os.O_RDONLY, 0) + if err != nil { + return "", err + } + defer f.Close() + // This implementation is based on serveContent's code in the standard net/http package. + ctype := mime.TypeByExtension(filepath.Ext(name)) + if ctype == "" { + // Read a chunk to decide between utf-8 text and binary. + var buf [512]byte + n, _ := io.ReadFull(f, buf[:]) + ctype = http.DetectContentType(buf[:n]) + // Rewind file. + _, err = f.Seek(0, os.SEEK_SET) + } + return ctype, err +} + +func findETag(fs FileSystem, ls LockSystem, name string, fi os.FileInfo) (string, error) { + // The Apache http 2.4 web server by default concatenates the + // modification time and size of a file. We replicate the heuristic + // with nanosecond granularity. + return fmt.Sprintf(`"%x%x"`, fi.ModTime().UnixNano(), fi.Size()), nil +} + +func findSupportedLock(fs FileSystem, ls LockSystem, name string, fi os.FileInfo) (string, error) { + return `` + + `` + + `` + + `` + + ``, nil +} diff --git a/vendor/golang.org/x/net/webdav/prop_test.go b/vendor/golang.org/x/net/webdav/prop_test.go new file mode 100644 index 0000000..3ad19f4 --- /dev/null +++ b/vendor/golang.org/x/net/webdav/prop_test.go @@ -0,0 +1,619 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package webdav + +import ( + "fmt" + "net/http" + "os" + "reflect" + "sort" + "testing" + + "golang.org/x/net/webdav/internal/xml" +) + +func TestMemPS(t *testing.T) { + // calcProps calculates the getlastmodified and getetag DAV: property + // values in pstats for resource name in file-system fs. + calcProps := func(name string, fs FileSystem, ls LockSystem, pstats []Propstat) error { + fi, err := fs.Stat(name) + if err != nil { + return err + } + for _, pst := range pstats { + for i, p := range pst.Props { + switch p.XMLName { + case xml.Name{Space: "DAV:", Local: "getlastmodified"}: + p.InnerXML = []byte(fi.ModTime().Format(http.TimeFormat)) + pst.Props[i] = p + case xml.Name{Space: "DAV:", Local: "getetag"}: + if fi.IsDir() { + continue + } + etag, err := findETag(fs, ls, name, fi) + if err != nil { + return err + } + p.InnerXML = []byte(etag) + pst.Props[i] = p + } + } + } + return nil + } + + const ( + lockEntry = `` + + `` + + `` + + `` + + `` + statForbiddenError = `` + ) + + type propOp struct { + op string + name string + pnames []xml.Name + patches []Proppatch + wantPnames []xml.Name + wantPropstats []Propstat + } + + testCases := []struct { + desc string + noDeadProps bool + buildfs []string + propOp []propOp + }{{ + desc: "propname", + buildfs: []string{"mkdir /dir", "touch /file"}, + propOp: []propOp{{ + op: "propname", + name: "/dir", + wantPnames: []xml.Name{ + xml.Name{Space: "DAV:", Local: "resourcetype"}, + xml.Name{Space: "DAV:", Local: "displayname"}, + xml.Name{Space: "DAV:", Local: "getcontentlength"}, + xml.Name{Space: "DAV:", Local: "getlastmodified"}, + xml.Name{Space: "DAV:", Local: "getcontenttype"}, + xml.Name{Space: "DAV:", Local: "supportedlock"}, + }, + }, { + op: "propname", + name: "/file", + wantPnames: []xml.Name{ + xml.Name{Space: "DAV:", Local: "resourcetype"}, + xml.Name{Space: "DAV:", Local: "displayname"}, + xml.Name{Space: "DAV:", Local: "getcontentlength"}, + xml.Name{Space: "DAV:", Local: "getlastmodified"}, + xml.Name{Space: "DAV:", Local: "getcontenttype"}, + xml.Name{Space: "DAV:", Local: "getetag"}, + xml.Name{Space: "DAV:", Local: "supportedlock"}, + }, + }}, + }, { + desc: "allprop dir and file", + buildfs: []string{"mkdir /dir", "write /file foobarbaz"}, + propOp: []propOp{{ + op: "allprop", + name: "/dir", + wantPropstats: []Propstat{{ + Status: http.StatusOK, + Props: []Property{{ + XMLName: xml.Name{Space: "DAV:", Local: "resourcetype"}, + InnerXML: []byte(``), + }, { + XMLName: xml.Name{Space: "DAV:", Local: "displayname"}, + InnerXML: []byte("dir"), + }, { + XMLName: xml.Name{Space: "DAV:", Local: "getcontentlength"}, + InnerXML: []byte("0"), + }, { + XMLName: xml.Name{Space: "DAV:", Local: "getlastmodified"}, + InnerXML: nil, // Calculated during test. + }, { + XMLName: xml.Name{Space: "DAV:", Local: "getcontenttype"}, + InnerXML: []byte("text/plain; charset=utf-8"), + }, { + XMLName: xml.Name{Space: "DAV:", Local: "supportedlock"}, + InnerXML: []byte(lockEntry), + }}, + }}, + }, { + op: "allprop", + name: "/file", + wantPropstats: []Propstat{{ + Status: http.StatusOK, + Props: []Property{{ + XMLName: xml.Name{Space: "DAV:", Local: "resourcetype"}, + InnerXML: []byte(""), + }, { + XMLName: xml.Name{Space: "DAV:", Local: "displayname"}, + InnerXML: []byte("file"), + }, { + XMLName: xml.Name{Space: "DAV:", Local: "getcontentlength"}, + InnerXML: []byte("9"), + }, { + XMLName: xml.Name{Space: "DAV:", Local: "getlastmodified"}, + InnerXML: nil, // Calculated during test. + }, { + XMLName: xml.Name{Space: "DAV:", Local: "getcontenttype"}, + InnerXML: []byte("text/plain; charset=utf-8"), + }, { + XMLName: xml.Name{Space: "DAV:", Local: "getetag"}, + InnerXML: nil, // Calculated during test. + }, { + XMLName: xml.Name{Space: "DAV:", Local: "supportedlock"}, + InnerXML: []byte(lockEntry), + }}, + }}, + }, { + op: "allprop", + name: "/file", + pnames: []xml.Name{ + {"DAV:", "resourcetype"}, + {"foo", "bar"}, + }, + wantPropstats: []Propstat{{ + Status: http.StatusOK, + Props: []Property{{ + XMLName: xml.Name{Space: "DAV:", Local: "resourcetype"}, + InnerXML: []byte(""), + }, { + XMLName: xml.Name{Space: "DAV:", Local: "displayname"}, + InnerXML: []byte("file"), + }, { + XMLName: xml.Name{Space: "DAV:", Local: "getcontentlength"}, + InnerXML: []byte("9"), + }, { + XMLName: xml.Name{Space: "DAV:", Local: "getlastmodified"}, + InnerXML: nil, // Calculated during test. + }, { + XMLName: xml.Name{Space: "DAV:", Local: "getcontenttype"}, + InnerXML: []byte("text/plain; charset=utf-8"), + }, { + XMLName: xml.Name{Space: "DAV:", Local: "getetag"}, + InnerXML: nil, // Calculated during test. + }, { + XMLName: xml.Name{Space: "DAV:", Local: "supportedlock"}, + InnerXML: []byte(lockEntry), + }}}, { + Status: http.StatusNotFound, + Props: []Property{{ + XMLName: xml.Name{Space: "foo", Local: "bar"}, + }}}, + }, + }}, + }, { + desc: "propfind DAV:resourcetype", + buildfs: []string{"mkdir /dir", "touch /file"}, + propOp: []propOp{{ + op: "propfind", + name: "/dir", + pnames: []xml.Name{{"DAV:", "resourcetype"}}, + wantPropstats: []Propstat{{ + Status: http.StatusOK, + Props: []Property{{ + XMLName: xml.Name{Space: "DAV:", Local: "resourcetype"}, + InnerXML: []byte(``), + }}, + }}, + }, { + op: "propfind", + name: "/file", + pnames: []xml.Name{{"DAV:", "resourcetype"}}, + wantPropstats: []Propstat{{ + Status: http.StatusOK, + Props: []Property{{ + XMLName: xml.Name{Space: "DAV:", Local: "resourcetype"}, + InnerXML: []byte(""), + }}, + }}, + }}, + }, { + desc: "propfind unsupported DAV properties", + buildfs: []string{"mkdir /dir"}, + propOp: []propOp{{ + op: "propfind", + name: "/dir", + pnames: []xml.Name{{"DAV:", "getcontentlanguage"}}, + wantPropstats: []Propstat{{ + Status: http.StatusNotFound, + Props: []Property{{ + XMLName: xml.Name{Space: "DAV:", Local: "getcontentlanguage"}, + }}, + }}, + }, { + op: "propfind", + name: "/dir", + pnames: []xml.Name{{"DAV:", "creationdate"}}, + wantPropstats: []Propstat{{ + Status: http.StatusNotFound, + Props: []Property{{ + XMLName: xml.Name{Space: "DAV:", Local: "creationdate"}, + }}, + }}, + }}, + }, { + desc: "propfind getetag for files but not for directories", + buildfs: []string{"mkdir /dir", "touch /file"}, + propOp: []propOp{{ + op: "propfind", + name: "/dir", + pnames: []xml.Name{{"DAV:", "getetag"}}, + wantPropstats: []Propstat{{ + Status: http.StatusNotFound, + Props: []Property{{ + XMLName: xml.Name{Space: "DAV:", Local: "getetag"}, + }}, + }}, + }, { + op: "propfind", + name: "/file", + pnames: []xml.Name{{"DAV:", "getetag"}}, + wantPropstats: []Propstat{{ + Status: http.StatusOK, + Props: []Property{{ + XMLName: xml.Name{Space: "DAV:", Local: "getetag"}, + InnerXML: nil, // Calculated during test. + }}, + }}, + }}, + }, { + desc: "proppatch property on no-dead-properties file system", + buildfs: []string{"mkdir /dir"}, + noDeadProps: true, + propOp: []propOp{{ + op: "proppatch", + name: "/dir", + patches: []Proppatch{{ + Props: []Property{{ + XMLName: xml.Name{Space: "foo", Local: "bar"}, + }}, + }}, + wantPropstats: []Propstat{{ + Status: http.StatusForbidden, + Props: []Property{{ + XMLName: xml.Name{Space: "foo", Local: "bar"}, + }}, + }}, + }, { + op: "proppatch", + name: "/dir", + patches: []Proppatch{{ + Props: []Property{{ + XMLName: xml.Name{Space: "DAV:", Local: "getetag"}, + }}, + }}, + wantPropstats: []Propstat{{ + Status: http.StatusForbidden, + XMLError: statForbiddenError, + Props: []Property{{ + XMLName: xml.Name{Space: "DAV:", Local: "getetag"}, + }}, + }}, + }}, + }, { + desc: "proppatch dead property", + buildfs: []string{"mkdir /dir"}, + propOp: []propOp{{ + op: "proppatch", + name: "/dir", + patches: []Proppatch{{ + Props: []Property{{ + XMLName: xml.Name{Space: "foo", Local: "bar"}, + InnerXML: []byte("baz"), + }}, + }}, + wantPropstats: []Propstat{{ + Status: http.StatusOK, + Props: []Property{{ + XMLName: xml.Name{Space: "foo", Local: "bar"}, + }}, + }}, + }, { + op: "propfind", + name: "/dir", + pnames: []xml.Name{{Space: "foo", Local: "bar"}}, + wantPropstats: []Propstat{{ + Status: http.StatusOK, + Props: []Property{{ + XMLName: xml.Name{Space: "foo", Local: "bar"}, + InnerXML: []byte("baz"), + }}, + }}, + }}, + }, { + desc: "proppatch dead property with failed dependency", + buildfs: []string{"mkdir /dir"}, + propOp: []propOp{{ + op: "proppatch", + name: "/dir", + patches: []Proppatch{{ + Props: []Property{{ + XMLName: xml.Name{Space: "foo", Local: "bar"}, + InnerXML: []byte("baz"), + }}, + }, { + Props: []Property{{ + XMLName: xml.Name{Space: "DAV:", Local: "displayname"}, + InnerXML: []byte("xxx"), + }}, + }}, + wantPropstats: []Propstat{{ + Status: http.StatusForbidden, + XMLError: statForbiddenError, + Props: []Property{{ + XMLName: xml.Name{Space: "DAV:", Local: "displayname"}, + }}, + }, { + Status: StatusFailedDependency, + Props: []Property{{ + XMLName: xml.Name{Space: "foo", Local: "bar"}, + }}, + }}, + }, { + op: "propfind", + name: "/dir", + pnames: []xml.Name{{Space: "foo", Local: "bar"}}, + wantPropstats: []Propstat{{ + Status: http.StatusNotFound, + Props: []Property{{ + XMLName: xml.Name{Space: "foo", Local: "bar"}, + }}, + }}, + }}, + }, { + desc: "proppatch remove dead property", + buildfs: []string{"mkdir /dir"}, + propOp: []propOp{{ + op: "proppatch", + name: "/dir", + patches: []Proppatch{{ + Props: []Property{{ + XMLName: xml.Name{Space: "foo", Local: "bar"}, + InnerXML: []byte("baz"), + }, { + XMLName: xml.Name{Space: "spam", Local: "ham"}, + InnerXML: []byte("eggs"), + }}, + }}, + wantPropstats: []Propstat{{ + Status: http.StatusOK, + Props: []Property{{ + XMLName: xml.Name{Space: "foo", Local: "bar"}, + }, { + XMLName: xml.Name{Space: "spam", Local: "ham"}, + }}, + }}, + }, { + op: "propfind", + name: "/dir", + pnames: []xml.Name{ + {Space: "foo", Local: "bar"}, + {Space: "spam", Local: "ham"}, + }, + wantPropstats: []Propstat{{ + Status: http.StatusOK, + Props: []Property{{ + XMLName: xml.Name{Space: "foo", Local: "bar"}, + InnerXML: []byte("baz"), + }, { + XMLName: xml.Name{Space: "spam", Local: "ham"}, + InnerXML: []byte("eggs"), + }}, + }}, + }, { + op: "proppatch", + name: "/dir", + patches: []Proppatch{{ + Remove: true, + Props: []Property{{ + XMLName: xml.Name{Space: "foo", Local: "bar"}, + }}, + }}, + wantPropstats: []Propstat{{ + Status: http.StatusOK, + Props: []Property{{ + XMLName: xml.Name{Space: "foo", Local: "bar"}, + }}, + }}, + }, { + op: "propfind", + name: "/dir", + pnames: []xml.Name{ + {Space: "foo", Local: "bar"}, + {Space: "spam", Local: "ham"}, + }, + wantPropstats: []Propstat{{ + Status: http.StatusNotFound, + Props: []Property{{ + XMLName: xml.Name{Space: "foo", Local: "bar"}, + }}, + }, { + Status: http.StatusOK, + Props: []Property{{ + XMLName: xml.Name{Space: "spam", Local: "ham"}, + InnerXML: []byte("eggs"), + }}, + }}, + }}, + }, { + desc: "propname with dead property", + buildfs: []string{"touch /file"}, + propOp: []propOp{{ + op: "proppatch", + name: "/file", + patches: []Proppatch{{ + Props: []Property{{ + XMLName: xml.Name{Space: "foo", Local: "bar"}, + InnerXML: []byte("baz"), + }}, + }}, + wantPropstats: []Propstat{{ + Status: http.StatusOK, + Props: []Property{{ + XMLName: xml.Name{Space: "foo", Local: "bar"}, + }}, + }}, + }, { + op: "propname", + name: "/file", + wantPnames: []xml.Name{ + xml.Name{Space: "DAV:", Local: "resourcetype"}, + xml.Name{Space: "DAV:", Local: "displayname"}, + xml.Name{Space: "DAV:", Local: "getcontentlength"}, + xml.Name{Space: "DAV:", Local: "getlastmodified"}, + xml.Name{Space: "DAV:", Local: "getcontenttype"}, + xml.Name{Space: "DAV:", Local: "getetag"}, + xml.Name{Space: "DAV:", Local: "supportedlock"}, + xml.Name{Space: "foo", Local: "bar"}, + }, + }}, + }, { + desc: "proppatch remove unknown dead property", + buildfs: []string{"mkdir /dir"}, + propOp: []propOp{{ + op: "proppatch", + name: "/dir", + patches: []Proppatch{{ + Remove: true, + Props: []Property{{ + XMLName: xml.Name{Space: "foo", Local: "bar"}, + }}, + }}, + wantPropstats: []Propstat{{ + Status: http.StatusOK, + Props: []Property{{ + XMLName: xml.Name{Space: "foo", Local: "bar"}, + }}, + }}, + }}, + }, { + desc: "bad: propfind unknown property", + buildfs: []string{"mkdir /dir"}, + propOp: []propOp{{ + op: "propfind", + name: "/dir", + pnames: []xml.Name{{"foo:", "bar"}}, + wantPropstats: []Propstat{{ + Status: http.StatusNotFound, + Props: []Property{{ + XMLName: xml.Name{Space: "foo:", Local: "bar"}, + }}, + }}, + }}, + }} + + for _, tc := range testCases { + fs, err := buildTestFS(tc.buildfs) + if err != nil { + t.Fatalf("%s: cannot create test filesystem: %v", tc.desc, err) + } + if tc.noDeadProps { + fs = noDeadPropsFS{fs} + } + ls := NewMemLS() + for _, op := range tc.propOp { + desc := fmt.Sprintf("%s: %s %s", tc.desc, op.op, op.name) + if err = calcProps(op.name, fs, ls, op.wantPropstats); err != nil { + t.Fatalf("%s: calcProps: %v", desc, err) + } + + // Call property system. + var propstats []Propstat + switch op.op { + case "propname": + pnames, err := propnames(fs, ls, op.name) + if err != nil { + t.Errorf("%s: got error %v, want nil", desc, err) + continue + } + sort.Sort(byXMLName(pnames)) + sort.Sort(byXMLName(op.wantPnames)) + if !reflect.DeepEqual(pnames, op.wantPnames) { + t.Errorf("%s: pnames\ngot %q\nwant %q", desc, pnames, op.wantPnames) + } + continue + case "allprop": + propstats, err = allprop(fs, ls, op.name, op.pnames) + case "propfind": + propstats, err = props(fs, ls, op.name, op.pnames) + case "proppatch": + propstats, err = patch(fs, ls, op.name, op.patches) + default: + t.Fatalf("%s: %s not implemented", desc, op.op) + } + if err != nil { + t.Errorf("%s: got error %v, want nil", desc, err) + continue + } + // Compare return values from allprop, propfind or proppatch. + for _, pst := range propstats { + sort.Sort(byPropname(pst.Props)) + } + for _, pst := range op.wantPropstats { + sort.Sort(byPropname(pst.Props)) + } + sort.Sort(byStatus(propstats)) + sort.Sort(byStatus(op.wantPropstats)) + if !reflect.DeepEqual(propstats, op.wantPropstats) { + t.Errorf("%s: propstat\ngot %q\nwant %q", desc, propstats, op.wantPropstats) + } + } + } +} + +func cmpXMLName(a, b xml.Name) bool { + if a.Space != b.Space { + return a.Space < b.Space + } + return a.Local < b.Local +} + +type byXMLName []xml.Name + +func (b byXMLName) Len() int { return len(b) } +func (b byXMLName) Swap(i, j int) { b[i], b[j] = b[j], b[i] } +func (b byXMLName) Less(i, j int) bool { return cmpXMLName(b[i], b[j]) } + +type byPropname []Property + +func (b byPropname) Len() int { return len(b) } +func (b byPropname) Swap(i, j int) { b[i], b[j] = b[j], b[i] } +func (b byPropname) Less(i, j int) bool { return cmpXMLName(b[i].XMLName, b[j].XMLName) } + +type byStatus []Propstat + +func (b byStatus) Len() int { return len(b) } +func (b byStatus) Swap(i, j int) { b[i], b[j] = b[j], b[i] } +func (b byStatus) Less(i, j int) bool { return b[i].Status < b[j].Status } + +type noDeadPropsFS struct { + FileSystem +} + +func (fs noDeadPropsFS) OpenFile(name string, flag int, perm os.FileMode) (File, error) { + f, err := fs.FileSystem.OpenFile(name, flag, perm) + if err != nil { + return nil, err + } + return noDeadPropsFile{f}, nil +} + +// noDeadPropsFile wraps a File but strips any optional DeadPropsHolder methods +// provided by the underlying File implementation. +type noDeadPropsFile struct { + f File +} + +func (f noDeadPropsFile) Close() error { return f.f.Close() } +func (f noDeadPropsFile) Read(p []byte) (int, error) { return f.f.Read(p) } +func (f noDeadPropsFile) Readdir(count int) ([]os.FileInfo, error) { return f.f.Readdir(count) } +func (f noDeadPropsFile) Seek(off int64, whence int) (int64, error) { return f.f.Seek(off, whence) } +func (f noDeadPropsFile) Stat() (os.FileInfo, error) { return f.f.Stat() } +func (f noDeadPropsFile) Write(p []byte) (int, error) { return f.f.Write(p) } diff --git a/vendor/golang.org/x/net/webdav/webdav.go b/vendor/golang.org/x/net/webdav/webdav.go new file mode 100644 index 0000000..82f8a90 --- /dev/null +++ b/vendor/golang.org/x/net/webdav/webdav.go @@ -0,0 +1,706 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package webdav etc etc TODO. +package webdav // import "golang.org/x/net/webdav" + +import ( + "errors" + "fmt" + "io" + "log" + "net/http" + "net/url" + "os" + "path" + "runtime" + "strings" + "time" +) + +// Package webdav's XML output requires the standard library's encoding/xml +// package version 1.5 or greater. Otherwise, it will produce malformed XML. +// +// As of May 2015, the Go stable release is version 1.4, so we print a message +// to let users know that this golang.org/x/etc package won't work yet. +// +// This package also won't work with Go 1.3 and earlier, but making this +// runtime version check catch all the earlier versions too, and not just +// "1.4.x", isn't worth the complexity. +// +// TODO: delete this check at some point after Go 1.5 is released. +var go1Dot4 = strings.HasPrefix(runtime.Version(), "go1.4.") + +func init() { + if go1Dot4 { + log.Println("package webdav requires Go version 1.5 or greater") + } +} + +type Handler struct { + // Prefix is the URL path prefix to strip from WebDAV resource paths. + Prefix string + // FileSystem is the virtual file system. + FileSystem FileSystem + // LockSystem is the lock management system. + LockSystem LockSystem + // Logger is an optional error logger. If non-nil, it will be called + // for all HTTP requests. + Logger func(*http.Request, error) +} + +func (h *Handler) stripPrefix(p string) (string, int, error) { + if h.Prefix == "" { + return p, http.StatusOK, nil + } + if r := strings.TrimPrefix(p, h.Prefix); len(r) < len(p) { + return r, http.StatusOK, nil + } + return p, http.StatusNotFound, errPrefixMismatch +} + +func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { + status, err := http.StatusBadRequest, errUnsupportedMethod + if h.FileSystem == nil { + status, err = http.StatusInternalServerError, errNoFileSystem + } else if h.LockSystem == nil { + status, err = http.StatusInternalServerError, errNoLockSystem + } else { + switch r.Method { + case "OPTIONS": + status, err = h.handleOptions(w, r) + case "GET", "HEAD", "POST": + status, err = h.handleGetHeadPost(w, r) + case "DELETE": + status, err = h.handleDelete(w, r) + case "PUT": + status, err = h.handlePut(w, r) + case "MKCOL": + status, err = h.handleMkcol(w, r) + case "COPY", "MOVE": + status, err = h.handleCopyMove(w, r) + case "LOCK": + status, err = h.handleLock(w, r) + case "UNLOCK": + status, err = h.handleUnlock(w, r) + case "PROPFIND": + status, err = h.handlePropfind(w, r) + case "PROPPATCH": + status, err = h.handleProppatch(w, r) + } + } + + if status != 0 { + w.WriteHeader(status) + if status != http.StatusNoContent { + w.Write([]byte(StatusText(status))) + } + } + if h.Logger != nil { + h.Logger(r, err) + } +} + +func (h *Handler) lock(now time.Time, root string) (token string, status int, err error) { + token, err = h.LockSystem.Create(now, LockDetails{ + Root: root, + Duration: infiniteTimeout, + ZeroDepth: true, + }) + if err != nil { + if err == ErrLocked { + return "", StatusLocked, err + } + return "", http.StatusInternalServerError, err + } + return token, 0, nil +} + +func (h *Handler) confirmLocks(r *http.Request, src, dst string) (release func(), status int, err error) { + hdr := r.Header.Get("If") + if hdr == "" { + // An empty If header means that the client hasn't previously created locks. + // Even if this client doesn't care about locks, we still need to check that + // the resources aren't locked by another client, so we create temporary + // locks that would conflict with another client's locks. These temporary + // locks are unlocked at the end of the HTTP request. + now, srcToken, dstToken := time.Now(), "", "" + if src != "" { + srcToken, status, err = h.lock(now, src) + if err != nil { + return nil, status, err + } + } + if dst != "" { + dstToken, status, err = h.lock(now, dst) + if err != nil { + if srcToken != "" { + h.LockSystem.Unlock(now, srcToken) + } + return nil, status, err + } + } + + return func() { + if dstToken != "" { + h.LockSystem.Unlock(now, dstToken) + } + if srcToken != "" { + h.LockSystem.Unlock(now, srcToken) + } + }, 0, nil + } + + ih, ok := parseIfHeader(hdr) + if !ok { + return nil, http.StatusBadRequest, errInvalidIfHeader + } + // ih is a disjunction (OR) of ifLists, so any ifList will do. + for _, l := range ih.lists { + lsrc := l.resourceTag + if lsrc == "" { + lsrc = src + } else { + u, err := url.Parse(lsrc) + if err != nil { + continue + } + if u.Host != r.Host { + continue + } + lsrc = u.Path + } + release, err = h.LockSystem.Confirm(time.Now(), lsrc, dst, l.conditions...) + if err == ErrConfirmationFailed { + continue + } + if err != nil { + return nil, http.StatusInternalServerError, err + } + return release, 0, nil + } + // Section 10.4.1 says that "If this header is evaluated and all state lists + // fail, then the request must fail with a 412 (Precondition Failed) status." + // We follow the spec even though the cond_put_corrupt_token test case from + // the litmus test warns on seeing a 412 instead of a 423 (Locked). + return nil, http.StatusPreconditionFailed, ErrLocked +} + +func (h *Handler) handleOptions(w http.ResponseWriter, r *http.Request) (status int, err error) { + reqPath, status, err := h.stripPrefix(r.URL.Path) + if err != nil { + return status, err + } + allow := "OPTIONS, LOCK, PUT, MKCOL" + if fi, err := h.FileSystem.Stat(reqPath); err == nil { + if fi.IsDir() { + allow = "OPTIONS, LOCK, GET, HEAD, POST, DELETE, PROPPATCH, COPY, MOVE, UNLOCK, PROPFIND" + } else { + allow = "OPTIONS, LOCK, GET, HEAD, POST, DELETE, PROPPATCH, COPY, MOVE, UNLOCK, PROPFIND, PUT" + } + } + w.Header().Set("Allow", allow) + // http://www.webdav.org/specs/rfc4918.html#dav.compliance.classes + w.Header().Set("DAV", "1, 2") + // http://msdn.microsoft.com/en-au/library/cc250217.aspx + w.Header().Set("MS-Author-Via", "DAV") + return 0, nil +} + +func (h *Handler) handleGetHeadPost(w http.ResponseWriter, r *http.Request) (status int, err error) { + reqPath, status, err := h.stripPrefix(r.URL.Path) + if err != nil { + return status, err + } + // TODO: check locks for read-only access?? + f, err := h.FileSystem.OpenFile(reqPath, os.O_RDONLY, 0) + if err != nil { + return http.StatusNotFound, err + } + defer f.Close() + fi, err := f.Stat() + if err != nil { + return http.StatusNotFound, err + } + if !fi.IsDir() { + etag, err := findETag(h.FileSystem, h.LockSystem, reqPath, fi) + if err != nil { + return http.StatusInternalServerError, err + } + w.Header().Set("ETag", etag) + } + // Let ServeContent determine the Content-Type header. + http.ServeContent(w, r, reqPath, fi.ModTime(), f) + return 0, nil +} + +func (h *Handler) handleDelete(w http.ResponseWriter, r *http.Request) (status int, err error) { + reqPath, status, err := h.stripPrefix(r.URL.Path) + if err != nil { + return status, err + } + release, status, err := h.confirmLocks(r, reqPath, "") + if err != nil { + return status, err + } + defer release() + + // TODO: return MultiStatus where appropriate. + + // "godoc os RemoveAll" says that "If the path does not exist, RemoveAll + // returns nil (no error)." WebDAV semantics are that it should return a + // "404 Not Found". We therefore have to Stat before we RemoveAll. + if _, err := h.FileSystem.Stat(reqPath); err != nil { + if os.IsNotExist(err) { + return http.StatusNotFound, err + } + return http.StatusMethodNotAllowed, err + } + if err := h.FileSystem.RemoveAll(reqPath); err != nil { + return http.StatusMethodNotAllowed, err + } + return http.StatusNoContent, nil +} + +func (h *Handler) handlePut(w http.ResponseWriter, r *http.Request) (status int, err error) { + reqPath, status, err := h.stripPrefix(r.URL.Path) + if err != nil { + return status, err + } + release, status, err := h.confirmLocks(r, reqPath, "") + if err != nil { + return status, err + } + defer release() + // TODO(rost): Support the If-Match, If-None-Match headers? See bradfitz' + // comments in http.checkEtag. + + f, err := h.FileSystem.OpenFile(reqPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666) + if err != nil { + return http.StatusNotFound, err + } + _, copyErr := io.Copy(f, r.Body) + fi, statErr := f.Stat() + closeErr := f.Close() + // TODO(rost): Returning 405 Method Not Allowed might not be appropriate. + if copyErr != nil { + return http.StatusMethodNotAllowed, copyErr + } + if statErr != nil { + return http.StatusMethodNotAllowed, statErr + } + if closeErr != nil { + return http.StatusMethodNotAllowed, closeErr + } + etag, err := findETag(h.FileSystem, h.LockSystem, reqPath, fi) + if err != nil { + return http.StatusInternalServerError, err + } + w.Header().Set("ETag", etag) + return http.StatusCreated, nil +} + +func (h *Handler) handleMkcol(w http.ResponseWriter, r *http.Request) (status int, err error) { + reqPath, status, err := h.stripPrefix(r.URL.Path) + if err != nil { + return status, err + } + release, status, err := h.confirmLocks(r, reqPath, "") + if err != nil { + return status, err + } + defer release() + + if r.ContentLength > 0 { + return http.StatusUnsupportedMediaType, nil + } + if err := h.FileSystem.Mkdir(reqPath, 0777); err != nil { + if os.IsNotExist(err) { + return http.StatusConflict, err + } + return http.StatusMethodNotAllowed, err + } + return http.StatusCreated, nil +} + +func (h *Handler) handleCopyMove(w http.ResponseWriter, r *http.Request) (status int, err error) { + hdr := r.Header.Get("Destination") + if hdr == "" { + return http.StatusBadRequest, errInvalidDestination + } + u, err := url.Parse(hdr) + if err != nil { + return http.StatusBadRequest, errInvalidDestination + } + if u.Host != r.Host { + return http.StatusBadGateway, errInvalidDestination + } + + src, status, err := h.stripPrefix(r.URL.Path) + if err != nil { + return status, err + } + + dst, status, err := h.stripPrefix(u.Path) + if err != nil { + return status, err + } + + if dst == "" { + return http.StatusBadGateway, errInvalidDestination + } + if dst == src { + return http.StatusForbidden, errDestinationEqualsSource + } + + if r.Method == "COPY" { + // Section 7.5.1 says that a COPY only needs to lock the destination, + // not both destination and source. Strictly speaking, this is racy, + // even though a COPY doesn't modify the source, if a concurrent + // operation modifies the source. However, the litmus test explicitly + // checks that COPYing a locked-by-another source is OK. + release, status, err := h.confirmLocks(r, "", dst) + if err != nil { + return status, err + } + defer release() + + // Section 9.8.3 says that "The COPY method on a collection without a Depth + // header must act as if a Depth header with value "infinity" was included". + depth := infiniteDepth + if hdr := r.Header.Get("Depth"); hdr != "" { + depth = parseDepth(hdr) + if depth != 0 && depth != infiniteDepth { + // Section 9.8.3 says that "A client may submit a Depth header on a + // COPY on a collection with a value of "0" or "infinity"." + return http.StatusBadRequest, errInvalidDepth + } + } + return copyFiles(h.FileSystem, src, dst, r.Header.Get("Overwrite") != "F", depth, 0) + } + + release, status, err := h.confirmLocks(r, src, dst) + if err != nil { + return status, err + } + defer release() + + // Section 9.9.2 says that "The MOVE method on a collection must act as if + // a "Depth: infinity" header was used on it. A client must not submit a + // Depth header on a MOVE on a collection with any value but "infinity"." + if hdr := r.Header.Get("Depth"); hdr != "" { + if parseDepth(hdr) != infiniteDepth { + return http.StatusBadRequest, errInvalidDepth + } + } + return moveFiles(h.FileSystem, src, dst, r.Header.Get("Overwrite") == "T") +} + +func (h *Handler) handleLock(w http.ResponseWriter, r *http.Request) (retStatus int, retErr error) { + duration, err := parseTimeout(r.Header.Get("Timeout")) + if err != nil { + return http.StatusBadRequest, err + } + li, status, err := readLockInfo(r.Body) + if err != nil { + return status, err + } + + token, ld, now, created := "", LockDetails{}, time.Now(), false + if li == (lockInfo{}) { + // An empty lockInfo means to refresh the lock. + ih, ok := parseIfHeader(r.Header.Get("If")) + if !ok { + return http.StatusBadRequest, errInvalidIfHeader + } + if len(ih.lists) == 1 && len(ih.lists[0].conditions) == 1 { + token = ih.lists[0].conditions[0].Token + } + if token == "" { + return http.StatusBadRequest, errInvalidLockToken + } + ld, err = h.LockSystem.Refresh(now, token, duration) + if err != nil { + if err == ErrNoSuchLock { + return http.StatusPreconditionFailed, err + } + return http.StatusInternalServerError, err + } + + } else { + // Section 9.10.3 says that "If no Depth header is submitted on a LOCK request, + // then the request MUST act as if a "Depth:infinity" had been submitted." + depth := infiniteDepth + if hdr := r.Header.Get("Depth"); hdr != "" { + depth = parseDepth(hdr) + if depth != 0 && depth != infiniteDepth { + // Section 9.10.3 says that "Values other than 0 or infinity must not be + // used with the Depth header on a LOCK method". + return http.StatusBadRequest, errInvalidDepth + } + } + reqPath, status, err := h.stripPrefix(r.URL.Path) + if err != nil { + return status, err + } + ld = LockDetails{ + Root: reqPath, + Duration: duration, + OwnerXML: li.Owner.InnerXML, + ZeroDepth: depth == 0, + } + token, err = h.LockSystem.Create(now, ld) + if err != nil { + if err == ErrLocked { + return StatusLocked, err + } + return http.StatusInternalServerError, err + } + defer func() { + if retErr != nil { + h.LockSystem.Unlock(now, token) + } + }() + + // Create the resource if it didn't previously exist. + if _, err := h.FileSystem.Stat(reqPath); err != nil { + f, err := h.FileSystem.OpenFile(reqPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666) + if err != nil { + // TODO: detect missing intermediate dirs and return http.StatusConflict? + return http.StatusInternalServerError, err + } + f.Close() + created = true + } + + // http://www.webdav.org/specs/rfc4918.html#HEADER_Lock-Token says that the + // Lock-Token value is a Coded-URL. We add angle brackets. + w.Header().Set("Lock-Token", "<"+token+">") + } + + w.Header().Set("Content-Type", "application/xml; charset=utf-8") + if created { + // This is "w.WriteHeader(http.StatusCreated)" and not "return + // http.StatusCreated, nil" because we write our own (XML) response to w + // and Handler.ServeHTTP would otherwise write "Created". + w.WriteHeader(http.StatusCreated) + } + writeLockInfo(w, token, ld) + return 0, nil +} + +func (h *Handler) handleUnlock(w http.ResponseWriter, r *http.Request) (status int, err error) { + // http://www.webdav.org/specs/rfc4918.html#HEADER_Lock-Token says that the + // Lock-Token value is a Coded-URL. We strip its angle brackets. + t := r.Header.Get("Lock-Token") + if len(t) < 2 || t[0] != '<' || t[len(t)-1] != '>' { + return http.StatusBadRequest, errInvalidLockToken + } + t = t[1 : len(t)-1] + + switch err = h.LockSystem.Unlock(time.Now(), t); err { + case nil: + return http.StatusNoContent, err + case ErrForbidden: + return http.StatusForbidden, err + case ErrLocked: + return StatusLocked, err + case ErrNoSuchLock: + return http.StatusConflict, err + default: + return http.StatusInternalServerError, err + } +} + +func (h *Handler) handlePropfind(w http.ResponseWriter, r *http.Request) (status int, err error) { + reqPath, status, err := h.stripPrefix(r.URL.Path) + if err != nil { + return status, err + } + fi, err := h.FileSystem.Stat(reqPath) + if err != nil { + if os.IsNotExist(err) { + return http.StatusNotFound, err + } + return http.StatusMethodNotAllowed, err + } + depth := infiniteDepth + if hdr := r.Header.Get("Depth"); hdr != "" { + depth = parseDepth(hdr) + if depth == invalidDepth { + return http.StatusBadRequest, errInvalidDepth + } + } + pf, status, err := readPropfind(r.Body) + if err != nil { + return status, err + } + + mw := multistatusWriter{w: w} + + walkFn := func(reqPath string, info os.FileInfo, err error) error { + if err != nil { + return err + } + var pstats []Propstat + if pf.Propname != nil { + pnames, err := propnames(h.FileSystem, h.LockSystem, reqPath) + if err != nil { + return err + } + pstat := Propstat{Status: http.StatusOK} + for _, xmlname := range pnames { + pstat.Props = append(pstat.Props, Property{XMLName: xmlname}) + } + pstats = append(pstats, pstat) + } else if pf.Allprop != nil { + pstats, err = allprop(h.FileSystem, h.LockSystem, reqPath, pf.Prop) + } else { + pstats, err = props(h.FileSystem, h.LockSystem, reqPath, pf.Prop) + } + if err != nil { + return err + } + return mw.write(makePropstatResponse(path.Join(h.Prefix, reqPath), pstats)) + } + + walkErr := walkFS(h.FileSystem, depth, reqPath, fi, walkFn) + closeErr := mw.close() + if walkErr != nil { + return http.StatusInternalServerError, walkErr + } + if closeErr != nil { + return http.StatusInternalServerError, closeErr + } + return 0, nil +} + +func (h *Handler) handleProppatch(w http.ResponseWriter, r *http.Request) (status int, err error) { + reqPath, status, err := h.stripPrefix(r.URL.Path) + if err != nil { + return status, err + } + release, status, err := h.confirmLocks(r, reqPath, "") + if err != nil { + return status, err + } + defer release() + + if _, err := h.FileSystem.Stat(reqPath); err != nil { + if os.IsNotExist(err) { + return http.StatusNotFound, err + } + return http.StatusMethodNotAllowed, err + } + patches, status, err := readProppatch(r.Body) + if err != nil { + return status, err + } + pstats, err := patch(h.FileSystem, h.LockSystem, reqPath, patches) + if err != nil { + return http.StatusInternalServerError, err + } + mw := multistatusWriter{w: w} + writeErr := mw.write(makePropstatResponse(r.URL.Path, pstats)) + closeErr := mw.close() + if writeErr != nil { + return http.StatusInternalServerError, writeErr + } + if closeErr != nil { + return http.StatusInternalServerError, closeErr + } + return 0, nil +} + +func makePropstatResponse(href string, pstats []Propstat) *response { + resp := response{ + Href: []string{href}, + Propstat: make([]propstat, 0, len(pstats)), + } + for _, p := range pstats { + var xmlErr *xmlError + if p.XMLError != "" { + xmlErr = &xmlError{InnerXML: []byte(p.XMLError)} + } + resp.Propstat = append(resp.Propstat, propstat{ + Status: fmt.Sprintf("HTTP/1.1 %d %s", p.Status, StatusText(p.Status)), + Prop: p.Props, + ResponseDescription: p.ResponseDescription, + Error: xmlErr, + }) + } + return &resp +} + +const ( + infiniteDepth = -1 + invalidDepth = -2 +) + +// parseDepth maps the strings "0", "1" and "infinity" to 0, 1 and +// infiniteDepth. Parsing any other string returns invalidDepth. +// +// Different WebDAV methods have further constraints on valid depths: +// - PROPFIND has no further restrictions, as per section 9.1. +// - COPY accepts only "0" or "infinity", as per section 9.8.3. +// - MOVE accepts only "infinity", as per section 9.9.2. +// - LOCK accepts only "0" or "infinity", as per section 9.10.3. +// These constraints are enforced by the handleXxx methods. +func parseDepth(s string) int { + switch s { + case "0": + return 0 + case "1": + return 1 + case "infinity": + return infiniteDepth + } + return invalidDepth +} + +// http://www.webdav.org/specs/rfc4918.html#status.code.extensions.to.http11 +const ( + StatusMulti = 207 + StatusUnprocessableEntity = 422 + StatusLocked = 423 + StatusFailedDependency = 424 + StatusInsufficientStorage = 507 +) + +func StatusText(code int) string { + switch code { + case StatusMulti: + return "Multi-Status" + case StatusUnprocessableEntity: + return "Unprocessable Entity" + case StatusLocked: + return "Locked" + case StatusFailedDependency: + return "Failed Dependency" + case StatusInsufficientStorage: + return "Insufficient Storage" + } + return http.StatusText(code) +} + +var ( + errDestinationEqualsSource = errors.New("webdav: destination equals source") + errDirectoryNotEmpty = errors.New("webdav: directory not empty") + errInvalidDepth = errors.New("webdav: invalid depth") + errInvalidDestination = errors.New("webdav: invalid destination") + errInvalidIfHeader = errors.New("webdav: invalid If header") + errInvalidLockInfo = errors.New("webdav: invalid lock info") + errInvalidLockToken = errors.New("webdav: invalid lock token") + errInvalidPropfind = errors.New("webdav: invalid propfind") + errInvalidProppatch = errors.New("webdav: invalid proppatch") + errInvalidResponse = errors.New("webdav: invalid response") + errInvalidTimeout = errors.New("webdav: invalid timeout") + errNoFileSystem = errors.New("webdav: no file system") + errNoLockSystem = errors.New("webdav: no lock system") + errNotADirectory = errors.New("webdav: not a directory") + errPrefixMismatch = errors.New("webdav: prefix mismatch") + errRecursionTooDeep = errors.New("webdav: recursion too deep") + errUnsupportedLockInfo = errors.New("webdav: unsupported lock info") + errUnsupportedMethod = errors.New("webdav: unsupported method") +) diff --git a/vendor/golang.org/x/net/webdav/webdav_test.go b/vendor/golang.org/x/net/webdav/webdav_test.go new file mode 100644 index 0000000..45b4055 --- /dev/null +++ b/vendor/golang.org/x/net/webdav/webdav_test.go @@ -0,0 +1,155 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package webdav + +import ( + "fmt" + "io" + "net/http" + "net/http/httptest" + "reflect" + "sort" + "strings" + "testing" +) + +// TODO: add tests to check XML responses with the expected prefix path +func TestPrefix(t *testing.T) { + const dst, blah = "Destination", "blah blah blah" + + do := func(method, urlStr string, body io.Reader, wantStatusCode int, headers ...string) error { + req, err := http.NewRequest(method, urlStr, body) + if err != nil { + return err + } + for len(headers) >= 2 { + req.Header.Add(headers[0], headers[1]) + headers = headers[2:] + } + res, err := http.DefaultClient.Do(req) + if err != nil { + return err + } + defer res.Body.Close() + if res.StatusCode != wantStatusCode { + return fmt.Errorf("got status code %d, want %d", res.StatusCode, wantStatusCode) + } + return nil + } + + prefixes := []string{ + "/", + "/a/", + "/a/b/", + "/a/b/c/", + } + for _, prefix := range prefixes { + fs := NewMemFS() + h := &Handler{ + FileSystem: fs, + LockSystem: NewMemLS(), + } + mux := http.NewServeMux() + if prefix != "/" { + h.Prefix = prefix + } + mux.Handle(prefix, h) + srv := httptest.NewServer(mux) + defer srv.Close() + + // The script is: + // MKCOL /a + // MKCOL /a/b + // PUT /a/b/c + // COPY /a/b/c /a/b/d + // MKCOL /a/b/e + // MOVE /a/b/d /a/b/e/f + // which should yield the (possibly stripped) filenames /a/b/c and + // /a/b/e/f, plus their parent directories. + + wantA := map[string]int{ + "/": http.StatusCreated, + "/a/": http.StatusMovedPermanently, + "/a/b/": http.StatusNotFound, + "/a/b/c/": http.StatusNotFound, + }[prefix] + if err := do("MKCOL", srv.URL+"/a", nil, wantA); err != nil { + t.Errorf("prefix=%-9q MKCOL /a: %v", prefix, err) + continue + } + + wantB := map[string]int{ + "/": http.StatusCreated, + "/a/": http.StatusCreated, + "/a/b/": http.StatusMovedPermanently, + "/a/b/c/": http.StatusNotFound, + }[prefix] + if err := do("MKCOL", srv.URL+"/a/b", nil, wantB); err != nil { + t.Errorf("prefix=%-9q MKCOL /a/b: %v", prefix, err) + continue + } + + wantC := map[string]int{ + "/": http.StatusCreated, + "/a/": http.StatusCreated, + "/a/b/": http.StatusCreated, + "/a/b/c/": http.StatusMovedPermanently, + }[prefix] + if err := do("PUT", srv.URL+"/a/b/c", strings.NewReader(blah), wantC); err != nil { + t.Errorf("prefix=%-9q PUT /a/b/c: %v", prefix, err) + continue + } + + wantD := map[string]int{ + "/": http.StatusCreated, + "/a/": http.StatusCreated, + "/a/b/": http.StatusCreated, + "/a/b/c/": http.StatusMovedPermanently, + }[prefix] + if err := do("COPY", srv.URL+"/a/b/c", nil, wantD, dst, srv.URL+"/a/b/d"); err != nil { + t.Errorf("prefix=%-9q COPY /a/b/c /a/b/d: %v", prefix, err) + continue + } + + wantE := map[string]int{ + "/": http.StatusCreated, + "/a/": http.StatusCreated, + "/a/b/": http.StatusCreated, + "/a/b/c/": http.StatusNotFound, + }[prefix] + if err := do("MKCOL", srv.URL+"/a/b/e", nil, wantE); err != nil { + t.Errorf("prefix=%-9q MKCOL /a/b/e: %v", prefix, err) + continue + } + + wantF := map[string]int{ + "/": http.StatusCreated, + "/a/": http.StatusCreated, + "/a/b/": http.StatusCreated, + "/a/b/c/": http.StatusNotFound, + }[prefix] + if err := do("MOVE", srv.URL+"/a/b/d", nil, wantF, dst, srv.URL+"/a/b/e/f"); err != nil { + t.Errorf("prefix=%-9q MOVE /a/b/d /a/b/e/f: %v", prefix, err) + continue + } + + got, err := find(nil, fs, "/") + if err != nil { + t.Errorf("prefix=%-9q find: %v", prefix, err) + continue + } + sort.Strings(got) + want := map[string][]string{ + "/": []string{"/", "/a", "/a/b", "/a/b/c", "/a/b/e", "/a/b/e/f"}, + "/a/": []string{"/", "/b", "/b/c", "/b/e", "/b/e/f"}, + "/a/b/": []string{"/", "/c", "/e", "/e/f"}, + "/a/b/c/": []string{"/"}, + }[prefix] + if !reflect.DeepEqual(got, want) { + t.Errorf("prefix=%-9q find:\ngot %v\nwant %v", prefix, got, want) + continue + } + } +} diff --git a/vendor/golang.org/x/net/webdav/xml.go b/vendor/golang.org/x/net/webdav/xml.go new file mode 100644 index 0000000..8705cda --- /dev/null +++ b/vendor/golang.org/x/net/webdav/xml.go @@ -0,0 +1,469 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package webdav + +// The XML encoding is covered by Section 14. +// http://www.webdav.org/specs/rfc4918.html#xml.element.definitions + +import ( + "bytes" + "fmt" + "io" + "net/http" + "time" + + "golang.org/x/net/webdav/internal/xml" +) + +// http://www.webdav.org/specs/rfc4918.html#ELEMENT_lockinfo +type lockInfo struct { + XMLName xml.Name `xml:"lockinfo"` + Exclusive *struct{} `xml:"lockscope>exclusive"` + Shared *struct{} `xml:"lockscope>shared"` + Write *struct{} `xml:"locktype>write"` + Owner owner `xml:"owner"` +} + +// http://www.webdav.org/specs/rfc4918.html#ELEMENT_owner +type owner struct { + InnerXML string `xml:",innerxml"` +} + +func readLockInfo(r io.Reader) (li lockInfo, status int, err error) { + c := &countingReader{r: r} + if err = xml.NewDecoder(c).Decode(&li); err != nil { + if err == io.EOF { + if c.n == 0 { + // An empty body means to refresh the lock. + // http://www.webdav.org/specs/rfc4918.html#refreshing-locks + return lockInfo{}, 0, nil + } + err = errInvalidLockInfo + } + return lockInfo{}, http.StatusBadRequest, err + } + // We only support exclusive (non-shared) write locks. In practice, these are + // the only types of locks that seem to matter. + if li.Exclusive == nil || li.Shared != nil || li.Write == nil { + return lockInfo{}, http.StatusNotImplemented, errUnsupportedLockInfo + } + return li, 0, nil +} + +type countingReader struct { + n int + r io.Reader +} + +func (c *countingReader) Read(p []byte) (int, error) { + n, err := c.r.Read(p) + c.n += n + return n, err +} + +func writeLockInfo(w io.Writer, token string, ld LockDetails) (int, error) { + depth := "infinity" + if ld.ZeroDepth { + depth = "0" + } + timeout := ld.Duration / time.Second + return fmt.Fprintf(w, "\n"+ + "\n"+ + " \n"+ + " \n"+ + " %s\n"+ + " %s\n"+ + " Second-%d\n"+ + " %s\n"+ + " %s\n"+ + "", + depth, ld.OwnerXML, timeout, escape(token), escape(ld.Root), + ) +} + +func escape(s string) string { + for i := 0; i < len(s); i++ { + switch s[i] { + case '"', '&', '\'', '<', '>': + b := bytes.NewBuffer(nil) + xml.EscapeText(b, []byte(s)) + return b.String() + } + } + return s +} + +// Next returns the next token, if any, in the XML stream of d. +// RFC 4918 requires to ignore comments, processing instructions +// and directives. +// http://www.webdav.org/specs/rfc4918.html#property_values +// http://www.webdav.org/specs/rfc4918.html#xml-extensibility +func next(d *xml.Decoder) (xml.Token, error) { + for { + t, err := d.Token() + if err != nil { + return t, err + } + switch t.(type) { + case xml.Comment, xml.Directive, xml.ProcInst: + continue + default: + return t, nil + } + } +} + +// http://www.webdav.org/specs/rfc4918.html#ELEMENT_prop (for propfind) +type propfindProps []xml.Name + +// UnmarshalXML appends the property names enclosed within start to pn. +// +// It returns an error if start does not contain any properties or if +// properties contain values. Character data between properties is ignored. +func (pn *propfindProps) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { + for { + t, err := next(d) + if err != nil { + return err + } + switch t.(type) { + case xml.EndElement: + if len(*pn) == 0 { + return fmt.Errorf("%s must not be empty", start.Name.Local) + } + return nil + case xml.StartElement: + name := t.(xml.StartElement).Name + t, err = next(d) + if err != nil { + return err + } + if _, ok := t.(xml.EndElement); !ok { + return fmt.Errorf("unexpected token %T", t) + } + *pn = append(*pn, name) + } + } +} + +// http://www.webdav.org/specs/rfc4918.html#ELEMENT_propfind +type propfind struct { + XMLName xml.Name `xml:"DAV: propfind"` + Allprop *struct{} `xml:"DAV: allprop"` + Propname *struct{} `xml:"DAV: propname"` + Prop propfindProps `xml:"DAV: prop"` + Include propfindProps `xml:"DAV: include"` +} + +func readPropfind(r io.Reader) (pf propfind, status int, err error) { + c := countingReader{r: r} + if err = xml.NewDecoder(&c).Decode(&pf); err != nil { + if err == io.EOF { + if c.n == 0 { + // An empty body means to propfind allprop. + // http://www.webdav.org/specs/rfc4918.html#METHOD_PROPFIND + return propfind{Allprop: new(struct{})}, 0, nil + } + err = errInvalidPropfind + } + return propfind{}, http.StatusBadRequest, err + } + + if pf.Allprop == nil && pf.Include != nil { + return propfind{}, http.StatusBadRequest, errInvalidPropfind + } + if pf.Allprop != nil && (pf.Prop != nil || pf.Propname != nil) { + return propfind{}, http.StatusBadRequest, errInvalidPropfind + } + if pf.Prop != nil && pf.Propname != nil { + return propfind{}, http.StatusBadRequest, errInvalidPropfind + } + if pf.Propname == nil && pf.Allprop == nil && pf.Prop == nil { + return propfind{}, http.StatusBadRequest, errInvalidPropfind + } + return pf, 0, nil +} + +// Property represents a single DAV resource property as defined in RFC 4918. +// See http://www.webdav.org/specs/rfc4918.html#data.model.for.resource.properties +type Property struct { + // XMLName is the fully qualified name that identifies this property. + XMLName xml.Name + + // Lang is an optional xml:lang attribute. + Lang string `xml:"xml:lang,attr,omitempty"` + + // InnerXML contains the XML representation of the property value. + // See http://www.webdav.org/specs/rfc4918.html#property_values + // + // Property values of complex type or mixed-content must have fully + // expanded XML namespaces or be self-contained with according + // XML namespace declarations. They must not rely on any XML + // namespace declarations within the scope of the XML document, + // even including the DAV: namespace. + InnerXML []byte `xml:",innerxml"` +} + +// http://www.webdav.org/specs/rfc4918.html#ELEMENT_error +// See multistatusWriter for the "D:" namespace prefix. +type xmlError struct { + XMLName xml.Name `xml:"D:error"` + InnerXML []byte `xml:",innerxml"` +} + +// http://www.webdav.org/specs/rfc4918.html#ELEMENT_propstat +// See multistatusWriter for the "D:" namespace prefix. +type propstat struct { + Prop []Property `xml:"D:prop>_ignored_"` + Status string `xml:"D:status"` + Error *xmlError `xml:"D:error"` + ResponseDescription string `xml:"D:responsedescription,omitempty"` +} + +// MarshalXML prepends the "D:" namespace prefix on properties in the DAV: namespace +// before encoding. See multistatusWriter. +func (ps propstat) MarshalXML(e *xml.Encoder, start xml.StartElement) error { + for k, prop := range ps.Prop { + if prop.XMLName.Space == "DAV:" { + prop.XMLName = xml.Name{Space: "", Local: "D:" + prop.XMLName.Local} + ps.Prop[k] = prop + } + } + // Distinct type to avoid infinite recursion of MarshalXML. + type newpropstat propstat + return e.EncodeElement(newpropstat(ps), start) +} + +// http://www.webdav.org/specs/rfc4918.html#ELEMENT_response +// See multistatusWriter for the "D:" namespace prefix. +type response struct { + XMLName xml.Name `xml:"D:response"` + Href []string `xml:"D:href"` + Propstat []propstat `xml:"D:propstat"` + Status string `xml:"D:status,omitempty"` + Error *xmlError `xml:"D:error"` + ResponseDescription string `xml:"D:responsedescription,omitempty"` +} + +// MultistatusWriter marshals one or more Responses into a XML +// multistatus response. +// See http://www.webdav.org/specs/rfc4918.html#ELEMENT_multistatus +// TODO(rsto, mpl): As a workaround, the "D:" namespace prefix, defined as +// "DAV:" on this element, is prepended on the nested response, as well as on all +// its nested elements. All property names in the DAV: namespace are prefixed as +// well. This is because some versions of Mini-Redirector (on windows 7) ignore +// elements with a default namespace (no prefixed namespace). A less intrusive fix +// should be possible after golang.org/cl/11074. See https://golang.org/issue/11177 +type multistatusWriter struct { + // ResponseDescription contains the optional responsedescription + // of the multistatus XML element. Only the latest content before + // close will be emitted. Empty response descriptions are not + // written. + responseDescription string + + w http.ResponseWriter + enc *xml.Encoder +} + +// Write validates and emits a DAV response as part of a multistatus response +// element. +// +// It sets the HTTP status code of its underlying http.ResponseWriter to 207 +// (Multi-Status) and populates the Content-Type header. If r is the +// first, valid response to be written, Write prepends the XML representation +// of r with a multistatus tag. Callers must call close after the last response +// has been written. +func (w *multistatusWriter) write(r *response) error { + switch len(r.Href) { + case 0: + return errInvalidResponse + case 1: + if len(r.Propstat) > 0 != (r.Status == "") { + return errInvalidResponse + } + default: + if len(r.Propstat) > 0 || r.Status == "" { + return errInvalidResponse + } + } + err := w.writeHeader() + if err != nil { + return err + } + return w.enc.Encode(r) +} + +// writeHeader writes a XML multistatus start element on w's underlying +// http.ResponseWriter and returns the result of the write operation. +// After the first write attempt, writeHeader becomes a no-op. +func (w *multistatusWriter) writeHeader() error { + if w.enc != nil { + return nil + } + w.w.Header().Add("Content-Type", "text/xml; charset=utf-8") + w.w.WriteHeader(StatusMulti) + _, err := fmt.Fprintf(w.w, ``) + if err != nil { + return err + } + w.enc = xml.NewEncoder(w.w) + return w.enc.EncodeToken(xml.StartElement{ + Name: xml.Name{ + Space: "DAV:", + Local: "multistatus", + }, + Attr: []xml.Attr{{ + Name: xml.Name{Space: "xmlns", Local: "D"}, + Value: "DAV:", + }}, + }) +} + +// Close completes the marshalling of the multistatus response. It returns +// an error if the multistatus response could not be completed. If both the +// return value and field enc of w are nil, then no multistatus response has +// been written. +func (w *multistatusWriter) close() error { + if w.enc == nil { + return nil + } + var end []xml.Token + if w.responseDescription != "" { + name := xml.Name{Space: "DAV:", Local: "responsedescription"} + end = append(end, + xml.StartElement{Name: name}, + xml.CharData(w.responseDescription), + xml.EndElement{Name: name}, + ) + } + end = append(end, xml.EndElement{ + Name: xml.Name{Space: "DAV:", Local: "multistatus"}, + }) + for _, t := range end { + err := w.enc.EncodeToken(t) + if err != nil { + return err + } + } + return w.enc.Flush() +} + +// http://www.webdav.org/specs/rfc4918.html#ELEMENT_prop (for proppatch) +type proppatchProps []Property + +var xmlLangName = xml.Name{Space: "http://www.w3.org/XML/1998/namespace", Local: "lang"} + +func xmlLang(s xml.StartElement, d string) string { + for _, attr := range s.Attr { + if attr.Name == xmlLangName { + return attr.Value + } + } + return d +} + +type xmlValue []byte + +func (v *xmlValue) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { + // The XML value of a property can be arbitrary, mixed-content XML. + // To make sure that the unmarshalled value contains all required + // namespaces, we encode all the property value XML tokens into a + // buffer. This forces the encoder to redeclare any used namespaces. + var b bytes.Buffer + e := xml.NewEncoder(&b) + for { + t, err := next(d) + if err != nil { + return err + } + if e, ok := t.(xml.EndElement); ok && e.Name == start.Name { + break + } + if err = e.EncodeToken(t); err != nil { + return err + } + } + err := e.Flush() + if err != nil { + return err + } + *v = b.Bytes() + return nil +} + +// UnmarshalXML appends the property names and values enclosed within start +// to ps. +// +// An xml:lang attribute that is defined either on the DAV:prop or property +// name XML element is propagated to the property's Lang field. +// +// UnmarshalXML returns an error if start does not contain any properties or if +// property values contain syntactically incorrect XML. +func (ps *proppatchProps) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { + lang := xmlLang(start, "") + for { + t, err := next(d) + if err != nil { + return err + } + switch elem := t.(type) { + case xml.EndElement: + if len(*ps) == 0 { + return fmt.Errorf("%s must not be empty", start.Name.Local) + } + return nil + case xml.StartElement: + p := Property{ + XMLName: t.(xml.StartElement).Name, + Lang: xmlLang(t.(xml.StartElement), lang), + } + err = d.DecodeElement(((*xmlValue)(&p.InnerXML)), &elem) + if err != nil { + return err + } + *ps = append(*ps, p) + } + } +} + +// http://www.webdav.org/specs/rfc4918.html#ELEMENT_set +// http://www.webdav.org/specs/rfc4918.html#ELEMENT_remove +type setRemove struct { + XMLName xml.Name + Lang string `xml:"xml:lang,attr,omitempty"` + Prop proppatchProps `xml:"DAV: prop"` +} + +// http://www.webdav.org/specs/rfc4918.html#ELEMENT_propertyupdate +type propertyupdate struct { + XMLName xml.Name `xml:"DAV: propertyupdate"` + Lang string `xml:"xml:lang,attr,omitempty"` + SetRemove []setRemove `xml:",any"` +} + +func readProppatch(r io.Reader) (patches []Proppatch, status int, err error) { + var pu propertyupdate + if err = xml.NewDecoder(r).Decode(&pu); err != nil { + return nil, http.StatusBadRequest, err + } + for _, op := range pu.SetRemove { + remove := false + switch op.XMLName { + case xml.Name{Space: "DAV:", Local: "set"}: + // No-op. + case xml.Name{Space: "DAV:", Local: "remove"}: + for _, p := range op.Prop { + if len(p.InnerXML) > 0 { + return nil, http.StatusBadRequest, errInvalidProppatch + } + } + remove = true + default: + return nil, http.StatusBadRequest, errInvalidProppatch + } + patches = append(patches, Proppatch{Remove: remove, Props: op.Prop}) + } + return patches, 0, nil +} diff --git a/vendor/golang.org/x/net/webdav/xml_test.go b/vendor/golang.org/x/net/webdav/xml_test.go new file mode 100644 index 0000000..bc5641f --- /dev/null +++ b/vendor/golang.org/x/net/webdav/xml_test.go @@ -0,0 +1,909 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package webdav + +import ( + "bytes" + "fmt" + "io" + "net/http" + "net/http/httptest" + "reflect" + "sort" + "strings" + "testing" + + "golang.org/x/net/webdav/internal/xml" +) + +func TestReadLockInfo(t *testing.T) { + // The "section x.y.z" test cases come from section x.y.z of the spec at + // http://www.webdav.org/specs/rfc4918.html + testCases := []struct { + desc string + input string + wantLI lockInfo + wantStatus int + }{{ + "bad: junk", + "xxx", + lockInfo{}, + http.StatusBadRequest, + }, { + "bad: invalid owner XML", + "" + + "\n" + + " \n" + + " \n" + + " \n" + + " no end tag \n" + + " \n" + + "", + lockInfo{}, + http.StatusBadRequest, + }, { + "bad: invalid UTF-8", + "" + + "\n" + + " \n" + + " \n" + + " \n" + + " \xff \n" + + " \n" + + "", + lockInfo{}, + http.StatusBadRequest, + }, { + "bad: unfinished XML #1", + "" + + "\n" + + " \n" + + " \n", + lockInfo{}, + http.StatusBadRequest, + }, { + "bad: unfinished XML #2", + "" + + "\n" + + " \n" + + " \n" + + " \n", + lockInfo{}, + http.StatusBadRequest, + }, { + "good: empty", + "", + lockInfo{}, + 0, + }, { + "good: plain-text owner", + "" + + "\n" + + " \n" + + " \n" + + " gopher\n" + + "", + lockInfo{ + XMLName: xml.Name{Space: "DAV:", Local: "lockinfo"}, + Exclusive: new(struct{}), + Write: new(struct{}), + Owner: owner{ + InnerXML: "gopher", + }, + }, + 0, + }, { + "section 9.10.7", + "" + + "\n" + + " \n" + + " \n" + + " \n" + + " http://example.org/~ejw/contact.html\n" + + " \n" + + "", + lockInfo{ + XMLName: xml.Name{Space: "DAV:", Local: "lockinfo"}, + Exclusive: new(struct{}), + Write: new(struct{}), + Owner: owner{ + InnerXML: "\n http://example.org/~ejw/contact.html\n ", + }, + }, + 0, + }} + + for _, tc := range testCases { + li, status, err := readLockInfo(strings.NewReader(tc.input)) + if tc.wantStatus != 0 { + if err == nil { + t.Errorf("%s: got nil error, want non-nil", tc.desc) + continue + } + } else if err != nil { + t.Errorf("%s: %v", tc.desc, err) + continue + } + if !reflect.DeepEqual(li, tc.wantLI) || status != tc.wantStatus { + t.Errorf("%s:\ngot lockInfo=%v, status=%v\nwant lockInfo=%v, status=%v", + tc.desc, li, status, tc.wantLI, tc.wantStatus) + continue + } + } +} + +func TestReadPropfind(t *testing.T) { + testCases := []struct { + desc string + input string + wantPF propfind + wantStatus int + }{{ + desc: "propfind: propname", + input: "" + + "\n" + + " \n" + + "", + wantPF: propfind{ + XMLName: xml.Name{Space: "DAV:", Local: "propfind"}, + Propname: new(struct{}), + }, + }, { + desc: "propfind: empty body means allprop", + input: "", + wantPF: propfind{ + Allprop: new(struct{}), + }, + }, { + desc: "propfind: allprop", + input: "" + + "\n" + + " \n" + + "", + wantPF: propfind{ + XMLName: xml.Name{Space: "DAV:", Local: "propfind"}, + Allprop: new(struct{}), + }, + }, { + desc: "propfind: allprop followed by include", + input: "" + + "\n" + + " \n" + + " \n" + + "", + wantPF: propfind{ + XMLName: xml.Name{Space: "DAV:", Local: "propfind"}, + Allprop: new(struct{}), + Include: propfindProps{xml.Name{Space: "DAV:", Local: "displayname"}}, + }, + }, { + desc: "propfind: include followed by allprop", + input: "" + + "\n" + + " \n" + + " \n" + + "", + wantPF: propfind{ + XMLName: xml.Name{Space: "DAV:", Local: "propfind"}, + Allprop: new(struct{}), + Include: propfindProps{xml.Name{Space: "DAV:", Local: "displayname"}}, + }, + }, { + desc: "propfind: propfind", + input: "" + + "\n" + + " \n" + + "", + wantPF: propfind{ + XMLName: xml.Name{Space: "DAV:", Local: "propfind"}, + Prop: propfindProps{xml.Name{Space: "DAV:", Local: "displayname"}}, + }, + }, { + desc: "propfind: prop with ignored comments", + input: "" + + "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + "", + wantPF: propfind{ + XMLName: xml.Name{Space: "DAV:", Local: "propfind"}, + Prop: propfindProps{xml.Name{Space: "DAV:", Local: "displayname"}}, + }, + }, { + desc: "propfind: propfind with ignored whitespace", + input: "" + + "\n" + + " \n" + + "", + wantPF: propfind{ + XMLName: xml.Name{Space: "DAV:", Local: "propfind"}, + Prop: propfindProps{xml.Name{Space: "DAV:", Local: "displayname"}}, + }, + }, { + desc: "propfind: propfind with ignored mixed-content", + input: "" + + "\n" + + " foobar\n" + + "", + wantPF: propfind{ + XMLName: xml.Name{Space: "DAV:", Local: "propfind"}, + Prop: propfindProps{xml.Name{Space: "DAV:", Local: "displayname"}}, + }, + }, { + desc: "propfind: propname with ignored element (section A.4)", + input: "" + + "\n" + + " \n" + + " *boss*\n" + + "", + wantPF: propfind{ + XMLName: xml.Name{Space: "DAV:", Local: "propfind"}, + Propname: new(struct{}), + }, + }, { + desc: "propfind: bad: junk", + input: "xxx", + wantStatus: http.StatusBadRequest, + }, { + desc: "propfind: bad: propname and allprop (section A.3)", + input: "" + + "\n" + + " " + + " " + + "", + wantStatus: http.StatusBadRequest, + }, { + desc: "propfind: bad: propname and prop", + input: "" + + "\n" + + " \n" + + " \n" + + "", + wantStatus: http.StatusBadRequest, + }, { + desc: "propfind: bad: allprop and prop", + input: "" + + "\n" + + " \n" + + " \n" + + "", + wantStatus: http.StatusBadRequest, + }, { + desc: "propfind: bad: empty propfind with ignored element (section A.4)", + input: "" + + "\n" + + " \n" + + "", + wantStatus: http.StatusBadRequest, + }, { + desc: "propfind: bad: empty prop", + input: "" + + "\n" + + " \n" + + "", + wantStatus: http.StatusBadRequest, + }, { + desc: "propfind: bad: prop with just chardata", + input: "" + + "\n" + + " foo\n" + + "", + wantStatus: http.StatusBadRequest, + }, { + desc: "bad: interrupted prop", + input: "" + + "\n" + + " \n", + wantStatus: http.StatusBadRequest, + }, { + desc: "bad: malformed end element prop", + input: "" + + "\n" + + " \n", + wantStatus: http.StatusBadRequest, + }, { + desc: "propfind: bad: property with chardata value", + input: "" + + "\n" + + " bar\n" + + "", + wantStatus: http.StatusBadRequest, + }, { + desc: "propfind: bad: property with whitespace value", + input: "" + + "\n" + + " \n" + + "", + wantStatus: http.StatusBadRequest, + }, { + desc: "propfind: bad: include without allprop", + input: "" + + "\n" + + " \n" + + "", + wantStatus: http.StatusBadRequest, + }} + + for _, tc := range testCases { + pf, status, err := readPropfind(strings.NewReader(tc.input)) + if tc.wantStatus != 0 { + if err == nil { + t.Errorf("%s: got nil error, want non-nil", tc.desc) + continue + } + } else if err != nil { + t.Errorf("%s: %v", tc.desc, err) + continue + } + if !reflect.DeepEqual(pf, tc.wantPF) || status != tc.wantStatus { + t.Errorf("%s:\ngot propfind=%v, status=%v\nwant propfind=%v, status=%v", + tc.desc, pf, status, tc.wantPF, tc.wantStatus) + continue + } + } +} + +func TestMultistatusWriter(t *testing.T) { + if go1Dot4 { + t.Skip("TestMultistatusWriter requires Go version 1.5 or greater") + } + + ///The "section x.y.z" test cases come from section x.y.z of the spec at + // http://www.webdav.org/specs/rfc4918.html + testCases := []struct { + desc string + responses []response + respdesc string + writeHeader bool + wantXML string + wantCode int + wantErr error + }{{ + desc: "section 9.2.2 (failed dependency)", + responses: []response{{ + Href: []string{"http://example.com/foo"}, + Propstat: []propstat{{ + Prop: []Property{{ + XMLName: xml.Name{ + Space: "http://ns.example.com/", + Local: "Authors", + }, + }}, + Status: "HTTP/1.1 424 Failed Dependency", + }, { + Prop: []Property{{ + XMLName: xml.Name{ + Space: "http://ns.example.com/", + Local: "Copyright-Owner", + }, + }}, + Status: "HTTP/1.1 409 Conflict", + }}, + ResponseDescription: "Copyright Owner cannot be deleted or altered.", + }}, + wantXML: `` + + `` + + `` + + ` ` + + ` http://example.com/foo` + + ` ` + + ` ` + + ` ` + + ` ` + + ` HTTP/1.1 424 Failed Dependency` + + ` ` + + ` ` + + ` ` + + ` ` + + ` ` + + ` HTTP/1.1 409 Conflict` + + ` ` + + ` Copyright Owner cannot be deleted or altered.` + + `` + + ``, + wantCode: StatusMulti, + }, { + desc: "section 9.6.2 (lock-token-submitted)", + responses: []response{{ + Href: []string{"http://example.com/foo"}, + Status: "HTTP/1.1 423 Locked", + Error: &xmlError{ + InnerXML: []byte(``), + }, + }}, + wantXML: `` + + `` + + `` + + ` ` + + ` http://example.com/foo` + + ` HTTP/1.1 423 Locked` + + ` ` + + ` ` + + ``, + wantCode: StatusMulti, + }, { + desc: "section 9.1.3", + responses: []response{{ + Href: []string{"http://example.com/foo"}, + Propstat: []propstat{{ + Prop: []Property{{ + XMLName: xml.Name{Space: "http://ns.example.com/boxschema/", Local: "bigbox"}, + InnerXML: []byte(`` + + `` + + `Box type A` + + ``), + }, { + XMLName: xml.Name{Space: "http://ns.example.com/boxschema/", Local: "author"}, + InnerXML: []byte(`` + + `` + + `J.J. Johnson` + + ``), + }}, + Status: "HTTP/1.1 200 OK", + }, { + Prop: []Property{{ + XMLName: xml.Name{Space: "http://ns.example.com/boxschema/", Local: "DingALing"}, + }, { + XMLName: xml.Name{Space: "http://ns.example.com/boxschema/", Local: "Random"}, + }}, + Status: "HTTP/1.1 403 Forbidden", + ResponseDescription: "The user does not have access to the DingALing property.", + }}, + }}, + respdesc: "There has been an access violation error.", + wantXML: `` + + `` + + `` + + ` ` + + ` http://example.com/foo` + + ` ` + + ` ` + + ` Box type A` + + ` J.J. Johnson` + + ` ` + + ` HTTP/1.1 200 OK` + + ` ` + + ` ` + + ` ` + + ` ` + + ` ` + + ` ` + + ` HTTP/1.1 403 Forbidden` + + ` The user does not have access to the DingALing property.` + + ` ` + + ` ` + + ` There has been an access violation error.` + + ``, + wantCode: StatusMulti, + }, { + desc: "no response written", + // default of http.responseWriter + wantCode: http.StatusOK, + }, { + desc: "no response written (with description)", + respdesc: "too bad", + // default of http.responseWriter + wantCode: http.StatusOK, + }, { + desc: "empty multistatus with header", + writeHeader: true, + wantXML: ``, + wantCode: StatusMulti, + }, { + desc: "bad: no href", + responses: []response{{ + Propstat: []propstat{{ + Prop: []Property{{ + XMLName: xml.Name{ + Space: "http://example.com/", + Local: "foo", + }, + }}, + Status: "HTTP/1.1 200 OK", + }}, + }}, + wantErr: errInvalidResponse, + // default of http.responseWriter + wantCode: http.StatusOK, + }, { + desc: "bad: multiple hrefs and no status", + responses: []response{{ + Href: []string{"http://example.com/foo", "http://example.com/bar"}, + }}, + wantErr: errInvalidResponse, + // default of http.responseWriter + wantCode: http.StatusOK, + }, { + desc: "bad: one href and no propstat", + responses: []response{{ + Href: []string{"http://example.com/foo"}, + }}, + wantErr: errInvalidResponse, + // default of http.responseWriter + wantCode: http.StatusOK, + }, { + desc: "bad: status with one href and propstat", + responses: []response{{ + Href: []string{"http://example.com/foo"}, + Propstat: []propstat{{ + Prop: []Property{{ + XMLName: xml.Name{ + Space: "http://example.com/", + Local: "foo", + }, + }}, + Status: "HTTP/1.1 200 OK", + }}, + Status: "HTTP/1.1 200 OK", + }}, + wantErr: errInvalidResponse, + // default of http.responseWriter + wantCode: http.StatusOK, + }, { + desc: "bad: multiple hrefs and propstat", + responses: []response{{ + Href: []string{ + "http://example.com/foo", + "http://example.com/bar", + }, + Propstat: []propstat{{ + Prop: []Property{{ + XMLName: xml.Name{ + Space: "http://example.com/", + Local: "foo", + }, + }}, + Status: "HTTP/1.1 200 OK", + }}, + }}, + wantErr: errInvalidResponse, + // default of http.responseWriter + wantCode: http.StatusOK, + }} + + n := xmlNormalizer{omitWhitespace: true} +loop: + for _, tc := range testCases { + rec := httptest.NewRecorder() + w := multistatusWriter{w: rec, responseDescription: tc.respdesc} + if tc.writeHeader { + if err := w.writeHeader(); err != nil { + t.Errorf("%s: got writeHeader error %v, want nil", tc.desc, err) + continue + } + } + for _, r := range tc.responses { + if err := w.write(&r); err != nil { + if err != tc.wantErr { + t.Errorf("%s: got write error %v, want %v", + tc.desc, err, tc.wantErr) + } + continue loop + } + } + if err := w.close(); err != tc.wantErr { + t.Errorf("%s: got close error %v, want %v", + tc.desc, err, tc.wantErr) + continue + } + if rec.Code != tc.wantCode { + t.Errorf("%s: got HTTP status code %d, want %d\n", + tc.desc, rec.Code, tc.wantCode) + continue + } + gotXML := rec.Body.String() + eq, err := n.equalXML(strings.NewReader(gotXML), strings.NewReader(tc.wantXML)) + if err != nil { + t.Errorf("%s: equalXML: %v", tc.desc, err) + continue + } + if !eq { + t.Errorf("%s: XML body\ngot %s\nwant %s", tc.desc, gotXML, tc.wantXML) + } + } +} + +func TestReadProppatch(t *testing.T) { + ppStr := func(pps []Proppatch) string { + var outer []string + for _, pp := range pps { + var inner []string + for _, p := range pp.Props { + inner = append(inner, fmt.Sprintf("{XMLName: %q, Lang: %q, InnerXML: %q}", + p.XMLName, p.Lang, p.InnerXML)) + } + outer = append(outer, fmt.Sprintf("{Remove: %t, Props: [%s]}", + pp.Remove, strings.Join(inner, ", "))) + } + return "[" + strings.Join(outer, ", ") + "]" + } + + testCases := []struct { + desc string + input string + wantPP []Proppatch + wantStatus int + }{{ + desc: "proppatch: section 9.2 (with simple property value)", + input: `` + + `` + + `` + + ` ` + + ` somevalue` + + ` ` + + ` ` + + ` ` + + ` ` + + ``, + wantPP: []Proppatch{{ + Props: []Property{{ + xml.Name{Space: "http://ns.example.com/z/", Local: "Authors"}, + "", + []byte(`somevalue`), + }}, + }, { + Remove: true, + Props: []Property{{ + xml.Name{Space: "http://ns.example.com/z/", Local: "Copyright-Owner"}, + "", + nil, + }}, + }}, + }, { + desc: "proppatch: lang attribute on prop", + input: `` + + `` + + `` + + ` ` + + ` ` + + ` ` + + ` ` + + ` ` + + ``, + wantPP: []Proppatch{{ + Props: []Property{{ + xml.Name{Space: "http://example.com/ns", Local: "foo"}, + "en", + nil, + }}, + }}, + }, { + desc: "bad: remove with value", + input: `` + + `` + + `` + + ` ` + + ` ` + + ` ` + + ` Jim Whitehead` + + ` ` + + ` ` + + ` ` + + ``, + wantStatus: http.StatusBadRequest, + }, { + desc: "bad: empty propertyupdate", + input: `` + + `` + + ``, + wantStatus: http.StatusBadRequest, + }, { + desc: "bad: empty prop", + input: `` + + `` + + `` + + ` ` + + ` ` + + ` ` + + ``, + wantStatus: http.StatusBadRequest, + }} + + for _, tc := range testCases { + pp, status, err := readProppatch(strings.NewReader(tc.input)) + if tc.wantStatus != 0 { + if err == nil { + t.Errorf("%s: got nil error, want non-nil", tc.desc) + continue + } + } else if err != nil { + t.Errorf("%s: %v", tc.desc, err) + continue + } + if status != tc.wantStatus { + t.Errorf("%s: got status %d, want %d", tc.desc, status, tc.wantStatus) + continue + } + if !reflect.DeepEqual(pp, tc.wantPP) || status != tc.wantStatus { + t.Errorf("%s: proppatch\ngot %v\nwant %v", tc.desc, ppStr(pp), ppStr(tc.wantPP)) + } + } +} + +func TestUnmarshalXMLValue(t *testing.T) { + testCases := []struct { + desc string + input string + wantVal string + }{{ + desc: "simple char data", + input: "foo", + wantVal: "foo", + }, { + desc: "empty element", + input: "", + wantVal: "", + }, { + desc: "preserve namespace", + input: ``, + wantVal: ``, + }, { + desc: "preserve root element namespace", + input: ``, + wantVal: ``, + }, { + desc: "preserve whitespace", + input: " \t ", + wantVal: " \t ", + }, { + desc: "preserve mixed content", + input: ` a `, + wantVal: ` a `, + }, { + desc: "section 9.2", + input: `` + + `` + + ` Jim Whitehead` + + ` Roy Fielding` + + ``, + wantVal: `` + + ` Jim Whitehead` + + ` Roy Fielding`, + }, { + desc: "section 4.3.1 (mixed content)", + input: `` + + `` + + ` Jane Doe` + + ` ` + + ` mailto:jane.doe@example.com` + + ` http://www.example.com` + + ` ` + + ` Jane has been working way too long on the` + + ` long-awaited revision of ]]>.` + + ` ` + + ``, + wantVal: `` + + ` Jane Doe` + + ` ` + + ` mailto:jane.doe@example.com` + + ` http://www.example.com` + + ` ` + + ` Jane has been working way too long on the` + + ` long-awaited revision of <RFC2518>.` + + ` `, + }} + + var n xmlNormalizer + for _, tc := range testCases { + d := xml.NewDecoder(strings.NewReader(tc.input)) + var v xmlValue + if err := d.Decode(&v); err != nil { + t.Errorf("%s: got error %v, want nil", tc.desc, err) + continue + } + eq, err := n.equalXML(bytes.NewReader(v), strings.NewReader(tc.wantVal)) + if err != nil { + t.Errorf("%s: equalXML: %v", tc.desc, err) + continue + } + if !eq { + t.Errorf("%s:\ngot %s\nwant %s", tc.desc, string(v), tc.wantVal) + } + } +} + +// xmlNormalizer normalizes XML. +type xmlNormalizer struct { + // omitWhitespace instructs to ignore whitespace between element tags. + omitWhitespace bool + // omitComments instructs to ignore XML comments. + omitComments bool +} + +// normalize writes the normalized XML content of r to w. It applies the +// following rules +// +// * Rename namespace prefixes according to an internal heuristic. +// * Remove unnecessary namespace declarations. +// * Sort attributes in XML start elements in lexical order of their +// fully qualified name. +// * Remove XML directives and processing instructions. +// * Remove CDATA between XML tags that only contains whitespace, if +// instructed to do so. +// * Remove comments, if instructed to do so. +// +func (n *xmlNormalizer) normalize(w io.Writer, r io.Reader) error { + d := xml.NewDecoder(r) + e := xml.NewEncoder(w) + for { + t, err := d.Token() + if err != nil { + if t == nil && err == io.EOF { + break + } + return err + } + switch val := t.(type) { + case xml.Directive, xml.ProcInst: + continue + case xml.Comment: + if n.omitComments { + continue + } + case xml.CharData: + if n.omitWhitespace && len(bytes.TrimSpace(val)) == 0 { + continue + } + case xml.StartElement: + start, _ := xml.CopyToken(val).(xml.StartElement) + attr := start.Attr[:0] + for _, a := range start.Attr { + if a.Name.Space == "xmlns" || a.Name.Local == "xmlns" { + continue + } + attr = append(attr, a) + } + sort.Sort(byName(attr)) + start.Attr = attr + t = start + } + err = e.EncodeToken(t) + if err != nil { + return err + } + } + return e.Flush() +} + +// equalXML tests for equality of the normalized XML contents of a and b. +func (n *xmlNormalizer) equalXML(a, b io.Reader) (bool, error) { + var buf bytes.Buffer + if err := n.normalize(&buf, a); err != nil { + return false, err + } + normA := buf.String() + buf.Reset() + if err := n.normalize(&buf, b); err != nil { + return false, err + } + normB := buf.String() + return normA == normB, nil +} + +type byName []xml.Attr + +func (a byName) Len() int { return len(a) } +func (a byName) Swap(i, j int) { a[i], a[j] = a[j], a[i] } +func (a byName) Less(i, j int) bool { + if a[i].Name.Space != a[j].Name.Space { + return a[i].Name.Space < a[j].Name.Space + } + return a[i].Name.Local < a[j].Name.Local +} diff --git a/vendor/golang.org/x/net/websocket/client.go b/vendor/golang.org/x/net/websocket/client.go new file mode 100644 index 0000000..20d1e1e --- /dev/null +++ b/vendor/golang.org/x/net/websocket/client.go @@ -0,0 +1,113 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package websocket + +import ( + "bufio" + "crypto/tls" + "io" + "net" + "net/http" + "net/url" +) + +// DialError is an error that occurs while dialling a websocket server. +type DialError struct { + *Config + Err error +} + +func (e *DialError) Error() string { + return "websocket.Dial " + e.Config.Location.String() + ": " + e.Err.Error() +} + +// NewConfig creates a new WebSocket config for client connection. +func NewConfig(server, origin string) (config *Config, err error) { + config = new(Config) + config.Version = ProtocolVersionHybi13 + config.Location, err = url.ParseRequestURI(server) + if err != nil { + return + } + config.Origin, err = url.ParseRequestURI(origin) + if err != nil { + return + } + config.Header = http.Header(make(map[string][]string)) + return +} + +// NewClient creates a new WebSocket client connection over rwc. +func NewClient(config *Config, rwc io.ReadWriteCloser) (ws *Conn, err error) { + br := bufio.NewReader(rwc) + bw := bufio.NewWriter(rwc) + err = hybiClientHandshake(config, br, bw) + if err != nil { + return + } + buf := bufio.NewReadWriter(br, bw) + ws = newHybiClientConn(config, buf, rwc) + return +} + +// Dial opens a new client connection to a WebSocket. +func Dial(url_, protocol, origin string) (ws *Conn, err error) { + config, err := NewConfig(url_, origin) + if err != nil { + return nil, err + } + if protocol != "" { + config.Protocol = []string{protocol} + } + return DialConfig(config) +} + +var portMap = map[string]string{ + "ws": "80", + "wss": "443", +} + +func parseAuthority(location *url.URL) string { + if _, ok := portMap[location.Scheme]; ok { + if _, _, err := net.SplitHostPort(location.Host); err != nil { + return net.JoinHostPort(location.Host, portMap[location.Scheme]) + } + } + return location.Host +} + +// DialConfig opens a new client connection to a WebSocket with a config. +func DialConfig(config *Config) (ws *Conn, err error) { + var client net.Conn + if config.Location == nil { + return nil, &DialError{config, ErrBadWebSocketLocation} + } + if config.Origin == nil { + return nil, &DialError{config, ErrBadWebSocketOrigin} + } + switch config.Location.Scheme { + case "ws": + client, err = net.Dial("tcp", parseAuthority(config.Location)) + + case "wss": + client, err = tls.Dial("tcp", parseAuthority(config.Location), config.TlsConfig) + + default: + err = ErrBadScheme + } + if err != nil { + goto Error + } + + ws, err = NewClient(config, client) + if err != nil { + client.Close() + goto Error + } + return + +Error: + return nil, &DialError{config, err} +} diff --git a/vendor/golang.org/x/net/websocket/exampledial_test.go b/vendor/golang.org/x/net/websocket/exampledial_test.go new file mode 100644 index 0000000..72bb9d4 --- /dev/null +++ b/vendor/golang.org/x/net/websocket/exampledial_test.go @@ -0,0 +1,31 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package websocket_test + +import ( + "fmt" + "log" + + "golang.org/x/net/websocket" +) + +// This example demonstrates a trivial client. +func ExampleDial() { + origin := "http://localhost/" + url := "ws://localhost:12345/ws" + ws, err := websocket.Dial(url, "", origin) + if err != nil { + log.Fatal(err) + } + if _, err := ws.Write([]byte("hello, world!\n")); err != nil { + log.Fatal(err) + } + var msg = make([]byte, 512) + var n int + if n, err = ws.Read(msg); err != nil { + log.Fatal(err) + } + fmt.Printf("Received: %s.\n", msg[:n]) +} diff --git a/vendor/golang.org/x/net/websocket/examplehandler_test.go b/vendor/golang.org/x/net/websocket/examplehandler_test.go new file mode 100644 index 0000000..f22a98f --- /dev/null +++ b/vendor/golang.org/x/net/websocket/examplehandler_test.go @@ -0,0 +1,26 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package websocket_test + +import ( + "io" + "net/http" + + "golang.org/x/net/websocket" +) + +// Echo the data received on the WebSocket. +func EchoServer(ws *websocket.Conn) { + io.Copy(ws, ws) +} + +// This example demonstrates a trivial echo server. +func ExampleHandler() { + http.Handle("/echo", websocket.Handler(EchoServer)) + err := http.ListenAndServe(":12345", nil) + if err != nil { + panic("ListenAndServe: " + err.Error()) + } +} diff --git a/vendor/golang.org/x/net/websocket/hybi.go b/vendor/golang.org/x/net/websocket/hybi.go new file mode 100644 index 0000000..60bbc84 --- /dev/null +++ b/vendor/golang.org/x/net/websocket/hybi.go @@ -0,0 +1,586 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package websocket + +// This file implements a protocol of hybi draft. +// http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17 + +import ( + "bufio" + "bytes" + "crypto/rand" + "crypto/sha1" + "encoding/base64" + "encoding/binary" + "fmt" + "io" + "io/ioutil" + "net/http" + "net/url" + "strings" +) + +const ( + websocketGUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" + + closeStatusNormal = 1000 + closeStatusGoingAway = 1001 + closeStatusProtocolError = 1002 + closeStatusUnsupportedData = 1003 + closeStatusFrameTooLarge = 1004 + closeStatusNoStatusRcvd = 1005 + closeStatusAbnormalClosure = 1006 + closeStatusBadMessageData = 1007 + closeStatusPolicyViolation = 1008 + closeStatusTooBigData = 1009 + closeStatusExtensionMismatch = 1010 + + maxControlFramePayloadLength = 125 +) + +var ( + ErrBadMaskingKey = &ProtocolError{"bad masking key"} + ErrBadPongMessage = &ProtocolError{"bad pong message"} + ErrBadClosingStatus = &ProtocolError{"bad closing status"} + ErrUnsupportedExtensions = &ProtocolError{"unsupported extensions"} + ErrNotImplemented = &ProtocolError{"not implemented"} + + handshakeHeader = map[string]bool{ + "Host": true, + "Upgrade": true, + "Connection": true, + "Sec-Websocket-Key": true, + "Sec-Websocket-Origin": true, + "Sec-Websocket-Version": true, + "Sec-Websocket-Protocol": true, + "Sec-Websocket-Accept": true, + } +) + +// A hybiFrameHeader is a frame header as defined in hybi draft. +type hybiFrameHeader struct { + Fin bool + Rsv [3]bool + OpCode byte + Length int64 + MaskingKey []byte + + data *bytes.Buffer +} + +// A hybiFrameReader is a reader for hybi frame. +type hybiFrameReader struct { + reader io.Reader + + header hybiFrameHeader + pos int64 + length int +} + +func (frame *hybiFrameReader) Read(msg []byte) (n int, err error) { + n, err = frame.reader.Read(msg) + if err != nil { + return 0, err + } + if frame.header.MaskingKey != nil { + for i := 0; i < n; i++ { + msg[i] = msg[i] ^ frame.header.MaskingKey[frame.pos%4] + frame.pos++ + } + } + return n, err +} + +func (frame *hybiFrameReader) PayloadType() byte { return frame.header.OpCode } + +func (frame *hybiFrameReader) HeaderReader() io.Reader { + if frame.header.data == nil { + return nil + } + if frame.header.data.Len() == 0 { + return nil + } + return frame.header.data +} + +func (frame *hybiFrameReader) TrailerReader() io.Reader { return nil } + +func (frame *hybiFrameReader) Len() (n int) { return frame.length } + +// A hybiFrameReaderFactory creates new frame reader based on its frame type. +type hybiFrameReaderFactory struct { + *bufio.Reader +} + +// NewFrameReader reads a frame header from the connection, and creates new reader for the frame. +// See Section 5.2 Base Framing protocol for detail. +// http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17#section-5.2 +func (buf hybiFrameReaderFactory) NewFrameReader() (frame frameReader, err error) { + hybiFrame := new(hybiFrameReader) + frame = hybiFrame + var header []byte + var b byte + // First byte. FIN/RSV1/RSV2/RSV3/OpCode(4bits) + b, err = buf.ReadByte() + if err != nil { + return + } + header = append(header, b) + hybiFrame.header.Fin = ((header[0] >> 7) & 1) != 0 + for i := 0; i < 3; i++ { + j := uint(6 - i) + hybiFrame.header.Rsv[i] = ((header[0] >> j) & 1) != 0 + } + hybiFrame.header.OpCode = header[0] & 0x0f + + // Second byte. Mask/Payload len(7bits) + b, err = buf.ReadByte() + if err != nil { + return + } + header = append(header, b) + mask := (b & 0x80) != 0 + b &= 0x7f + lengthFields := 0 + switch { + case b <= 125: // Payload length 7bits. + hybiFrame.header.Length = int64(b) + case b == 126: // Payload length 7+16bits + lengthFields = 2 + case b == 127: // Payload length 7+64bits + lengthFields = 8 + } + for i := 0; i < lengthFields; i++ { + b, err = buf.ReadByte() + if err != nil { + return + } + if lengthFields == 8 && i == 0 { // MSB must be zero when 7+64 bits + b &= 0x7f + } + header = append(header, b) + hybiFrame.header.Length = hybiFrame.header.Length*256 + int64(b) + } + if mask { + // Masking key. 4 bytes. + for i := 0; i < 4; i++ { + b, err = buf.ReadByte() + if err != nil { + return + } + header = append(header, b) + hybiFrame.header.MaskingKey = append(hybiFrame.header.MaskingKey, b) + } + } + hybiFrame.reader = io.LimitReader(buf.Reader, hybiFrame.header.Length) + hybiFrame.header.data = bytes.NewBuffer(header) + hybiFrame.length = len(header) + int(hybiFrame.header.Length) + return +} + +// A HybiFrameWriter is a writer for hybi frame. +type hybiFrameWriter struct { + writer *bufio.Writer + + header *hybiFrameHeader +} + +func (frame *hybiFrameWriter) Write(msg []byte) (n int, err error) { + var header []byte + var b byte + if frame.header.Fin { + b |= 0x80 + } + for i := 0; i < 3; i++ { + if frame.header.Rsv[i] { + j := uint(6 - i) + b |= 1 << j + } + } + b |= frame.header.OpCode + header = append(header, b) + if frame.header.MaskingKey != nil { + b = 0x80 + } else { + b = 0 + } + lengthFields := 0 + length := len(msg) + switch { + case length <= 125: + b |= byte(length) + case length < 65536: + b |= 126 + lengthFields = 2 + default: + b |= 127 + lengthFields = 8 + } + header = append(header, b) + for i := 0; i < lengthFields; i++ { + j := uint((lengthFields - i - 1) * 8) + b = byte((length >> j) & 0xff) + header = append(header, b) + } + if frame.header.MaskingKey != nil { + if len(frame.header.MaskingKey) != 4 { + return 0, ErrBadMaskingKey + } + header = append(header, frame.header.MaskingKey...) + frame.writer.Write(header) + data := make([]byte, length) + for i := range data { + data[i] = msg[i] ^ frame.header.MaskingKey[i%4] + } + frame.writer.Write(data) + err = frame.writer.Flush() + return length, err + } + frame.writer.Write(header) + frame.writer.Write(msg) + err = frame.writer.Flush() + return length, err +} + +func (frame *hybiFrameWriter) Close() error { return nil } + +type hybiFrameWriterFactory struct { + *bufio.Writer + needMaskingKey bool +} + +func (buf hybiFrameWriterFactory) NewFrameWriter(payloadType byte) (frame frameWriter, err error) { + frameHeader := &hybiFrameHeader{Fin: true, OpCode: payloadType} + if buf.needMaskingKey { + frameHeader.MaskingKey, err = generateMaskingKey() + if err != nil { + return nil, err + } + } + return &hybiFrameWriter{writer: buf.Writer, header: frameHeader}, nil +} + +type hybiFrameHandler struct { + conn *Conn + payloadType byte +} + +func (handler *hybiFrameHandler) HandleFrame(frame frameReader) (frameReader, error) { + if handler.conn.IsServerConn() { + // The client MUST mask all frames sent to the server. + if frame.(*hybiFrameReader).header.MaskingKey == nil { + handler.WriteClose(closeStatusProtocolError) + return nil, io.EOF + } + } else { + // The server MUST NOT mask all frames. + if frame.(*hybiFrameReader).header.MaskingKey != nil { + handler.WriteClose(closeStatusProtocolError) + return nil, io.EOF + } + } + if header := frame.HeaderReader(); header != nil { + io.Copy(ioutil.Discard, header) + } + switch frame.PayloadType() { + case ContinuationFrame: + frame.(*hybiFrameReader).header.OpCode = handler.payloadType + case TextFrame, BinaryFrame: + handler.payloadType = frame.PayloadType() + case CloseFrame: + return nil, io.EOF + case PingFrame, PongFrame: + b := make([]byte, maxControlFramePayloadLength) + n, err := io.ReadFull(frame, b) + if err != nil && err != io.EOF && err != io.ErrUnexpectedEOF { + return nil, err + } + io.Copy(ioutil.Discard, frame) + if frame.PayloadType() == PingFrame { + if _, err := handler.WritePong(b[:n]); err != nil { + return nil, err + } + } + return nil, nil + } + return frame, nil +} + +func (handler *hybiFrameHandler) WriteClose(status int) (err error) { + handler.conn.wio.Lock() + defer handler.conn.wio.Unlock() + w, err := handler.conn.frameWriterFactory.NewFrameWriter(CloseFrame) + if err != nil { + return err + } + msg := make([]byte, 2) + binary.BigEndian.PutUint16(msg, uint16(status)) + _, err = w.Write(msg) + w.Close() + return err +} + +func (handler *hybiFrameHandler) WritePong(msg []byte) (n int, err error) { + handler.conn.wio.Lock() + defer handler.conn.wio.Unlock() + w, err := handler.conn.frameWriterFactory.NewFrameWriter(PongFrame) + if err != nil { + return 0, err + } + n, err = w.Write(msg) + w.Close() + return n, err +} + +// newHybiConn creates a new WebSocket connection speaking hybi draft protocol. +func newHybiConn(config *Config, buf *bufio.ReadWriter, rwc io.ReadWriteCloser, request *http.Request) *Conn { + if buf == nil { + br := bufio.NewReader(rwc) + bw := bufio.NewWriter(rwc) + buf = bufio.NewReadWriter(br, bw) + } + ws := &Conn{config: config, request: request, buf: buf, rwc: rwc, + frameReaderFactory: hybiFrameReaderFactory{buf.Reader}, + frameWriterFactory: hybiFrameWriterFactory{ + buf.Writer, request == nil}, + PayloadType: TextFrame, + defaultCloseStatus: closeStatusNormal} + ws.frameHandler = &hybiFrameHandler{conn: ws} + return ws +} + +// generateMaskingKey generates a masking key for a frame. +func generateMaskingKey() (maskingKey []byte, err error) { + maskingKey = make([]byte, 4) + if _, err = io.ReadFull(rand.Reader, maskingKey); err != nil { + return + } + return +} + +// generateNonce generates a nonce consisting of a randomly selected 16-byte +// value that has been base64-encoded. +func generateNonce() (nonce []byte) { + key := make([]byte, 16) + if _, err := io.ReadFull(rand.Reader, key); err != nil { + panic(err) + } + nonce = make([]byte, 24) + base64.StdEncoding.Encode(nonce, key) + return +} + +// removeZone removes IPv6 zone identifer from host. +// E.g., "[fe80::1%en0]:8080" to "[fe80::1]:8080" +func removeZone(host string) string { + if !strings.HasPrefix(host, "[") { + return host + } + i := strings.LastIndex(host, "]") + if i < 0 { + return host + } + j := strings.LastIndex(host[:i], "%") + if j < 0 { + return host + } + return host[:j] + host[i:] +} + +// getNonceAccept computes the base64-encoded SHA-1 of the concatenation of +// the nonce ("Sec-WebSocket-Key" value) with the websocket GUID string. +func getNonceAccept(nonce []byte) (expected []byte, err error) { + h := sha1.New() + if _, err = h.Write(nonce); err != nil { + return + } + if _, err = h.Write([]byte(websocketGUID)); err != nil { + return + } + expected = make([]byte, 28) + base64.StdEncoding.Encode(expected, h.Sum(nil)) + return +} + +// Client handshake described in draft-ietf-hybi-thewebsocket-protocol-17 +func hybiClientHandshake(config *Config, br *bufio.Reader, bw *bufio.Writer) (err error) { + bw.WriteString("GET " + config.Location.RequestURI() + " HTTP/1.1\r\n") + + // According to RFC 6874, an HTTP client, proxy, or other + // intermediary must remove any IPv6 zone identifier attached + // to an outgoing URI. + bw.WriteString("Host: " + removeZone(config.Location.Host) + "\r\n") + bw.WriteString("Upgrade: websocket\r\n") + bw.WriteString("Connection: Upgrade\r\n") + nonce := generateNonce() + if config.handshakeData != nil { + nonce = []byte(config.handshakeData["key"]) + } + bw.WriteString("Sec-WebSocket-Key: " + string(nonce) + "\r\n") + bw.WriteString("Origin: " + strings.ToLower(config.Origin.String()) + "\r\n") + + if config.Version != ProtocolVersionHybi13 { + return ErrBadProtocolVersion + } + + bw.WriteString("Sec-WebSocket-Version: " + fmt.Sprintf("%d", config.Version) + "\r\n") + if len(config.Protocol) > 0 { + bw.WriteString("Sec-WebSocket-Protocol: " + strings.Join(config.Protocol, ", ") + "\r\n") + } + // TODO(ukai): send Sec-WebSocket-Extensions. + err = config.Header.WriteSubset(bw, handshakeHeader) + if err != nil { + return err + } + + bw.WriteString("\r\n") + if err = bw.Flush(); err != nil { + return err + } + + resp, err := http.ReadResponse(br, &http.Request{Method: "GET"}) + if err != nil { + return err + } + if resp.StatusCode != 101 { + return ErrBadStatus + } + if strings.ToLower(resp.Header.Get("Upgrade")) != "websocket" || + strings.ToLower(resp.Header.Get("Connection")) != "upgrade" { + return ErrBadUpgrade + } + expectedAccept, err := getNonceAccept(nonce) + if err != nil { + return err + } + if resp.Header.Get("Sec-WebSocket-Accept") != string(expectedAccept) { + return ErrChallengeResponse + } + if resp.Header.Get("Sec-WebSocket-Extensions") != "" { + return ErrUnsupportedExtensions + } + offeredProtocol := resp.Header.Get("Sec-WebSocket-Protocol") + if offeredProtocol != "" { + protocolMatched := false + for i := 0; i < len(config.Protocol); i++ { + if config.Protocol[i] == offeredProtocol { + protocolMatched = true + break + } + } + if !protocolMatched { + return ErrBadWebSocketProtocol + } + config.Protocol = []string{offeredProtocol} + } + + return nil +} + +// newHybiClientConn creates a client WebSocket connection after handshake. +func newHybiClientConn(config *Config, buf *bufio.ReadWriter, rwc io.ReadWriteCloser) *Conn { + return newHybiConn(config, buf, rwc, nil) +} + +// A HybiServerHandshaker performs a server handshake using hybi draft protocol. +type hybiServerHandshaker struct { + *Config + accept []byte +} + +func (c *hybiServerHandshaker) ReadHandshake(buf *bufio.Reader, req *http.Request) (code int, err error) { + c.Version = ProtocolVersionHybi13 + if req.Method != "GET" { + return http.StatusMethodNotAllowed, ErrBadRequestMethod + } + // HTTP version can be safely ignored. + + if strings.ToLower(req.Header.Get("Upgrade")) != "websocket" || + !strings.Contains(strings.ToLower(req.Header.Get("Connection")), "upgrade") { + return http.StatusBadRequest, ErrNotWebSocket + } + + key := req.Header.Get("Sec-Websocket-Key") + if key == "" { + return http.StatusBadRequest, ErrChallengeResponse + } + version := req.Header.Get("Sec-Websocket-Version") + switch version { + case "13": + c.Version = ProtocolVersionHybi13 + default: + return http.StatusBadRequest, ErrBadWebSocketVersion + } + var scheme string + if req.TLS != nil { + scheme = "wss" + } else { + scheme = "ws" + } + c.Location, err = url.ParseRequestURI(scheme + "://" + req.Host + req.URL.RequestURI()) + if err != nil { + return http.StatusBadRequest, err + } + protocol := strings.TrimSpace(req.Header.Get("Sec-Websocket-Protocol")) + if protocol != "" { + protocols := strings.Split(protocol, ",") + for i := 0; i < len(protocols); i++ { + c.Protocol = append(c.Protocol, strings.TrimSpace(protocols[i])) + } + } + c.accept, err = getNonceAccept([]byte(key)) + if err != nil { + return http.StatusInternalServerError, err + } + return http.StatusSwitchingProtocols, nil +} + +// Origin parses the Origin header in req. +// If the Origin header is not set, it returns nil and nil. +func Origin(config *Config, req *http.Request) (*url.URL, error) { + var origin string + switch config.Version { + case ProtocolVersionHybi13: + origin = req.Header.Get("Origin") + } + if origin == "" { + return nil, nil + } + return url.ParseRequestURI(origin) +} + +func (c *hybiServerHandshaker) AcceptHandshake(buf *bufio.Writer) (err error) { + if len(c.Protocol) > 0 { + if len(c.Protocol) != 1 { + // You need choose a Protocol in Handshake func in Server. + return ErrBadWebSocketProtocol + } + } + buf.WriteString("HTTP/1.1 101 Switching Protocols\r\n") + buf.WriteString("Upgrade: websocket\r\n") + buf.WriteString("Connection: Upgrade\r\n") + buf.WriteString("Sec-WebSocket-Accept: " + string(c.accept) + "\r\n") + if len(c.Protocol) > 0 { + buf.WriteString("Sec-WebSocket-Protocol: " + c.Protocol[0] + "\r\n") + } + // TODO(ukai): send Sec-WebSocket-Extensions. + if c.Header != nil { + err := c.Header.WriteSubset(buf, handshakeHeader) + if err != nil { + return err + } + } + buf.WriteString("\r\n") + return buf.Flush() +} + +func (c *hybiServerHandshaker) NewServerConn(buf *bufio.ReadWriter, rwc io.ReadWriteCloser, request *http.Request) *Conn { + return newHybiServerConn(c.Config, buf, rwc, request) +} + +// newHybiServerConn returns a new WebSocket connection speaking hybi draft protocol. +func newHybiServerConn(config *Config, buf *bufio.ReadWriter, rwc io.ReadWriteCloser, request *http.Request) *Conn { + return newHybiConn(config, buf, rwc, request) +} diff --git a/vendor/golang.org/x/net/websocket/hybi_test.go b/vendor/golang.org/x/net/websocket/hybi_test.go new file mode 100644 index 0000000..9504aa2 --- /dev/null +++ b/vendor/golang.org/x/net/websocket/hybi_test.go @@ -0,0 +1,608 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package websocket + +import ( + "bufio" + "bytes" + "fmt" + "io" + "net/http" + "net/url" + "strings" + "testing" +) + +// Test the getNonceAccept function with values in +// http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17 +func TestSecWebSocketAccept(t *testing.T) { + nonce := []byte("dGhlIHNhbXBsZSBub25jZQ==") + expected := []byte("s3pPLMBiTxaQ9kYGzzhZRbK+xOo=") + accept, err := getNonceAccept(nonce) + if err != nil { + t.Errorf("getNonceAccept: returned error %v", err) + return + } + if !bytes.Equal(expected, accept) { + t.Errorf("getNonceAccept: expected %q got %q", expected, accept) + } +} + +func TestHybiClientHandshake(t *testing.T) { + type test struct { + url, host string + } + tests := []test{ + {"ws://server.example.com/chat", "server.example.com"}, + {"ws://127.0.0.1/chat", "127.0.0.1"}, + } + if _, err := url.ParseRequestURI("http://[fe80::1%25lo0]"); err == nil { + tests = append(tests, test{"ws://[fe80::1%25lo0]/chat", "[fe80::1]"}) + } + + for _, tt := range tests { + var b bytes.Buffer + bw := bufio.NewWriter(&b) + br := bufio.NewReader(strings.NewReader(`HTTP/1.1 101 Switching Protocols +Upgrade: websocket +Connection: Upgrade +Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo= +Sec-WebSocket-Protocol: chat + +`)) + var err error + var config Config + config.Location, err = url.ParseRequestURI(tt.url) + if err != nil { + t.Fatal("location url", err) + } + config.Origin, err = url.ParseRequestURI("http://example.com") + if err != nil { + t.Fatal("origin url", err) + } + config.Protocol = append(config.Protocol, "chat") + config.Protocol = append(config.Protocol, "superchat") + config.Version = ProtocolVersionHybi13 + config.handshakeData = map[string]string{ + "key": "dGhlIHNhbXBsZSBub25jZQ==", + } + if err := hybiClientHandshake(&config, br, bw); err != nil { + t.Fatal("handshake", err) + } + req, err := http.ReadRequest(bufio.NewReader(&b)) + if err != nil { + t.Fatal("read request", err) + } + if req.Method != "GET" { + t.Errorf("request method expected GET, but got %s", req.Method) + } + if req.URL.Path != "/chat" { + t.Errorf("request path expected /chat, but got %s", req.URL.Path) + } + if req.Proto != "HTTP/1.1" { + t.Errorf("request proto expected HTTP/1.1, but got %s", req.Proto) + } + if req.Host != tt.host { + t.Errorf("request host expected %s, but got %s", tt.host, req.Host) + } + var expectedHeader = map[string]string{ + "Connection": "Upgrade", + "Upgrade": "websocket", + "Sec-Websocket-Key": config.handshakeData["key"], + "Origin": config.Origin.String(), + "Sec-Websocket-Protocol": "chat, superchat", + "Sec-Websocket-Version": fmt.Sprintf("%d", ProtocolVersionHybi13), + } + for k, v := range expectedHeader { + if req.Header.Get(k) != v { + t.Errorf("%s expected %s, but got %v", k, v, req.Header.Get(k)) + } + } + } +} + +func TestHybiClientHandshakeWithHeader(t *testing.T) { + b := bytes.NewBuffer([]byte{}) + bw := bufio.NewWriter(b) + br := bufio.NewReader(strings.NewReader(`HTTP/1.1 101 Switching Protocols +Upgrade: websocket +Connection: Upgrade +Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo= +Sec-WebSocket-Protocol: chat + +`)) + var err error + config := new(Config) + config.Location, err = url.ParseRequestURI("ws://server.example.com/chat") + if err != nil { + t.Fatal("location url", err) + } + config.Origin, err = url.ParseRequestURI("http://example.com") + if err != nil { + t.Fatal("origin url", err) + } + config.Protocol = append(config.Protocol, "chat") + config.Protocol = append(config.Protocol, "superchat") + config.Version = ProtocolVersionHybi13 + config.Header = http.Header(make(map[string][]string)) + config.Header.Add("User-Agent", "test") + + config.handshakeData = map[string]string{ + "key": "dGhlIHNhbXBsZSBub25jZQ==", + } + err = hybiClientHandshake(config, br, bw) + if err != nil { + t.Errorf("handshake failed: %v", err) + } + req, err := http.ReadRequest(bufio.NewReader(b)) + if err != nil { + t.Fatalf("read request: %v", err) + } + if req.Method != "GET" { + t.Errorf("request method expected GET, but got %q", req.Method) + } + if req.URL.Path != "/chat" { + t.Errorf("request path expected /chat, but got %q", req.URL.Path) + } + if req.Proto != "HTTP/1.1" { + t.Errorf("request proto expected HTTP/1.1, but got %q", req.Proto) + } + if req.Host != "server.example.com" { + t.Errorf("request Host expected server.example.com, but got %v", req.Host) + } + var expectedHeader = map[string]string{ + "Connection": "Upgrade", + "Upgrade": "websocket", + "Sec-Websocket-Key": config.handshakeData["key"], + "Origin": config.Origin.String(), + "Sec-Websocket-Protocol": "chat, superchat", + "Sec-Websocket-Version": fmt.Sprintf("%d", ProtocolVersionHybi13), + "User-Agent": "test", + } + for k, v := range expectedHeader { + if req.Header.Get(k) != v { + t.Errorf(fmt.Sprintf("%s expected %q but got %q", k, v, req.Header.Get(k))) + } + } +} + +func TestHybiServerHandshake(t *testing.T) { + config := new(Config) + handshaker := &hybiServerHandshaker{Config: config} + br := bufio.NewReader(strings.NewReader(`GET /chat HTTP/1.1 +Host: server.example.com +Upgrade: websocket +Connection: Upgrade +Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ== +Origin: http://example.com +Sec-WebSocket-Protocol: chat, superchat +Sec-WebSocket-Version: 13 + +`)) + req, err := http.ReadRequest(br) + if err != nil { + t.Fatal("request", err) + } + code, err := handshaker.ReadHandshake(br, req) + if err != nil { + t.Errorf("handshake failed: %v", err) + } + if code != http.StatusSwitchingProtocols { + t.Errorf("status expected %q but got %q", http.StatusSwitchingProtocols, code) + } + expectedProtocols := []string{"chat", "superchat"} + if fmt.Sprintf("%v", config.Protocol) != fmt.Sprintf("%v", expectedProtocols) { + t.Errorf("protocol expected %q but got %q", expectedProtocols, config.Protocol) + } + b := bytes.NewBuffer([]byte{}) + bw := bufio.NewWriter(b) + + config.Protocol = config.Protocol[:1] + + err = handshaker.AcceptHandshake(bw) + if err != nil { + t.Errorf("handshake response failed: %v", err) + } + expectedResponse := strings.Join([]string{ + "HTTP/1.1 101 Switching Protocols", + "Upgrade: websocket", + "Connection: Upgrade", + "Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=", + "Sec-WebSocket-Protocol: chat", + "", ""}, "\r\n") + + if b.String() != expectedResponse { + t.Errorf("handshake expected %q but got %q", expectedResponse, b.String()) + } +} + +func TestHybiServerHandshakeNoSubProtocol(t *testing.T) { + config := new(Config) + handshaker := &hybiServerHandshaker{Config: config} + br := bufio.NewReader(strings.NewReader(`GET /chat HTTP/1.1 +Host: server.example.com +Upgrade: websocket +Connection: Upgrade +Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ== +Origin: http://example.com +Sec-WebSocket-Version: 13 + +`)) + req, err := http.ReadRequest(br) + if err != nil { + t.Fatal("request", err) + } + code, err := handshaker.ReadHandshake(br, req) + if err != nil { + t.Errorf("handshake failed: %v", err) + } + if code != http.StatusSwitchingProtocols { + t.Errorf("status expected %q but got %q", http.StatusSwitchingProtocols, code) + } + if len(config.Protocol) != 0 { + t.Errorf("len(config.Protocol) expected 0, but got %q", len(config.Protocol)) + } + b := bytes.NewBuffer([]byte{}) + bw := bufio.NewWriter(b) + + err = handshaker.AcceptHandshake(bw) + if err != nil { + t.Errorf("handshake response failed: %v", err) + } + expectedResponse := strings.Join([]string{ + "HTTP/1.1 101 Switching Protocols", + "Upgrade: websocket", + "Connection: Upgrade", + "Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=", + "", ""}, "\r\n") + + if b.String() != expectedResponse { + t.Errorf("handshake expected %q but got %q", expectedResponse, b.String()) + } +} + +func TestHybiServerHandshakeHybiBadVersion(t *testing.T) { + config := new(Config) + handshaker := &hybiServerHandshaker{Config: config} + br := bufio.NewReader(strings.NewReader(`GET /chat HTTP/1.1 +Host: server.example.com +Upgrade: websocket +Connection: Upgrade +Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ== +Sec-WebSocket-Origin: http://example.com +Sec-WebSocket-Protocol: chat, superchat +Sec-WebSocket-Version: 9 + +`)) + req, err := http.ReadRequest(br) + if err != nil { + t.Fatal("request", err) + } + code, err := handshaker.ReadHandshake(br, req) + if err != ErrBadWebSocketVersion { + t.Errorf("handshake expected err %q but got %q", ErrBadWebSocketVersion, err) + } + if code != http.StatusBadRequest { + t.Errorf("status expected %q but got %q", http.StatusBadRequest, code) + } +} + +func testHybiFrame(t *testing.T, testHeader, testPayload, testMaskedPayload []byte, frameHeader *hybiFrameHeader) { + b := bytes.NewBuffer([]byte{}) + frameWriterFactory := &hybiFrameWriterFactory{bufio.NewWriter(b), false} + w, _ := frameWriterFactory.NewFrameWriter(TextFrame) + w.(*hybiFrameWriter).header = frameHeader + _, err := w.Write(testPayload) + w.Close() + if err != nil { + t.Errorf("Write error %q", err) + } + var expectedFrame []byte + expectedFrame = append(expectedFrame, testHeader...) + expectedFrame = append(expectedFrame, testMaskedPayload...) + if !bytes.Equal(expectedFrame, b.Bytes()) { + t.Errorf("frame expected %q got %q", expectedFrame, b.Bytes()) + } + frameReaderFactory := &hybiFrameReaderFactory{bufio.NewReader(b)} + r, err := frameReaderFactory.NewFrameReader() + if err != nil { + t.Errorf("Read error %q", err) + } + if header := r.HeaderReader(); header == nil { + t.Errorf("no header") + } else { + actualHeader := make([]byte, r.Len()) + n, err := header.Read(actualHeader) + if err != nil { + t.Errorf("Read header error %q", err) + } else { + if n < len(testHeader) { + t.Errorf("header too short %q got %q", testHeader, actualHeader[:n]) + } + if !bytes.Equal(testHeader, actualHeader[:n]) { + t.Errorf("header expected %q got %q", testHeader, actualHeader[:n]) + } + } + } + if trailer := r.TrailerReader(); trailer != nil { + t.Errorf("unexpected trailer %q", trailer) + } + frame := r.(*hybiFrameReader) + if frameHeader.Fin != frame.header.Fin || + frameHeader.OpCode != frame.header.OpCode || + len(testPayload) != int(frame.header.Length) { + t.Errorf("mismatch %v (%d) vs %v", frameHeader, len(testPayload), frame) + } + payload := make([]byte, len(testPayload)) + _, err = r.Read(payload) + if err != nil && err != io.EOF { + t.Errorf("read %v", err) + } + if !bytes.Equal(testPayload, payload) { + t.Errorf("payload %q vs %q", testPayload, payload) + } +} + +func TestHybiShortTextFrame(t *testing.T) { + frameHeader := &hybiFrameHeader{Fin: true, OpCode: TextFrame} + payload := []byte("hello") + testHybiFrame(t, []byte{0x81, 0x05}, payload, payload, frameHeader) + + payload = make([]byte, 125) + testHybiFrame(t, []byte{0x81, 125}, payload, payload, frameHeader) +} + +func TestHybiShortMaskedTextFrame(t *testing.T) { + frameHeader := &hybiFrameHeader{Fin: true, OpCode: TextFrame, + MaskingKey: []byte{0xcc, 0x55, 0x80, 0x20}} + payload := []byte("hello") + maskedPayload := []byte{0xa4, 0x30, 0xec, 0x4c, 0xa3} + header := []byte{0x81, 0x85} + header = append(header, frameHeader.MaskingKey...) + testHybiFrame(t, header, payload, maskedPayload, frameHeader) +} + +func TestHybiShortBinaryFrame(t *testing.T) { + frameHeader := &hybiFrameHeader{Fin: true, OpCode: BinaryFrame} + payload := []byte("hello") + testHybiFrame(t, []byte{0x82, 0x05}, payload, payload, frameHeader) + + payload = make([]byte, 125) + testHybiFrame(t, []byte{0x82, 125}, payload, payload, frameHeader) +} + +func TestHybiControlFrame(t *testing.T) { + payload := []byte("hello") + + frameHeader := &hybiFrameHeader{Fin: true, OpCode: PingFrame} + testHybiFrame(t, []byte{0x89, 0x05}, payload, payload, frameHeader) + + frameHeader = &hybiFrameHeader{Fin: true, OpCode: PingFrame} + testHybiFrame(t, []byte{0x89, 0x00}, nil, nil, frameHeader) + + frameHeader = &hybiFrameHeader{Fin: true, OpCode: PongFrame} + testHybiFrame(t, []byte{0x8A, 0x05}, payload, payload, frameHeader) + + frameHeader = &hybiFrameHeader{Fin: true, OpCode: PongFrame} + testHybiFrame(t, []byte{0x8A, 0x00}, nil, nil, frameHeader) + + frameHeader = &hybiFrameHeader{Fin: true, OpCode: CloseFrame} + payload = []byte{0x03, 0xe8} // 1000 + testHybiFrame(t, []byte{0x88, 0x02}, payload, payload, frameHeader) +} + +func TestHybiLongFrame(t *testing.T) { + frameHeader := &hybiFrameHeader{Fin: true, OpCode: TextFrame} + payload := make([]byte, 126) + testHybiFrame(t, []byte{0x81, 126, 0x00, 126}, payload, payload, frameHeader) + + payload = make([]byte, 65535) + testHybiFrame(t, []byte{0x81, 126, 0xff, 0xff}, payload, payload, frameHeader) + + payload = make([]byte, 65536) + testHybiFrame(t, []byte{0x81, 127, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00}, payload, payload, frameHeader) +} + +func TestHybiClientRead(t *testing.T) { + wireData := []byte{0x81, 0x05, 'h', 'e', 'l', 'l', 'o', + 0x89, 0x05, 'h', 'e', 'l', 'l', 'o', // ping + 0x81, 0x05, 'w', 'o', 'r', 'l', 'd'} + br := bufio.NewReader(bytes.NewBuffer(wireData)) + bw := bufio.NewWriter(bytes.NewBuffer([]byte{})) + conn := newHybiConn(newConfig(t, "/"), bufio.NewReadWriter(br, bw), nil, nil) + + msg := make([]byte, 512) + n, err := conn.Read(msg) + if err != nil { + t.Errorf("read 1st frame, error %q", err) + } + if n != 5 { + t.Errorf("read 1st frame, expect 5, got %d", n) + } + if !bytes.Equal(wireData[2:7], msg[:n]) { + t.Errorf("read 1st frame %v, got %v", wireData[2:7], msg[:n]) + } + n, err = conn.Read(msg) + if err != nil { + t.Errorf("read 2nd frame, error %q", err) + } + if n != 5 { + t.Errorf("read 2nd frame, expect 5, got %d", n) + } + if !bytes.Equal(wireData[16:21], msg[:n]) { + t.Errorf("read 2nd frame %v, got %v", wireData[16:21], msg[:n]) + } + n, err = conn.Read(msg) + if err == nil { + t.Errorf("read not EOF") + } + if n != 0 { + t.Errorf("expect read 0, got %d", n) + } +} + +func TestHybiShortRead(t *testing.T) { + wireData := []byte{0x81, 0x05, 'h', 'e', 'l', 'l', 'o', + 0x89, 0x05, 'h', 'e', 'l', 'l', 'o', // ping + 0x81, 0x05, 'w', 'o', 'r', 'l', 'd'} + br := bufio.NewReader(bytes.NewBuffer(wireData)) + bw := bufio.NewWriter(bytes.NewBuffer([]byte{})) + conn := newHybiConn(newConfig(t, "/"), bufio.NewReadWriter(br, bw), nil, nil) + + step := 0 + pos := 0 + expectedPos := []int{2, 5, 16, 19} + expectedLen := []int{3, 2, 3, 2} + for { + msg := make([]byte, 3) + n, err := conn.Read(msg) + if step >= len(expectedPos) { + if err == nil { + t.Errorf("read not EOF") + } + if n != 0 { + t.Errorf("expect read 0, got %d", n) + } + return + } + pos = expectedPos[step] + endPos := pos + expectedLen[step] + if err != nil { + t.Errorf("read from %d, got error %q", pos, err) + return + } + if n != endPos-pos { + t.Errorf("read from %d, expect %d, got %d", pos, endPos-pos, n) + } + if !bytes.Equal(wireData[pos:endPos], msg[:n]) { + t.Errorf("read from %d, frame %v, got %v", pos, wireData[pos:endPos], msg[:n]) + } + step++ + } +} + +func TestHybiServerRead(t *testing.T) { + wireData := []byte{0x81, 0x85, 0xcc, 0x55, 0x80, 0x20, + 0xa4, 0x30, 0xec, 0x4c, 0xa3, // hello + 0x89, 0x85, 0xcc, 0x55, 0x80, 0x20, + 0xa4, 0x30, 0xec, 0x4c, 0xa3, // ping: hello + 0x81, 0x85, 0xed, 0x83, 0xb4, 0x24, + 0x9a, 0xec, 0xc6, 0x48, 0x89, // world + } + br := bufio.NewReader(bytes.NewBuffer(wireData)) + bw := bufio.NewWriter(bytes.NewBuffer([]byte{})) + conn := newHybiConn(newConfig(t, "/"), bufio.NewReadWriter(br, bw), nil, new(http.Request)) + + expected := [][]byte{[]byte("hello"), []byte("world")} + + msg := make([]byte, 512) + n, err := conn.Read(msg) + if err != nil { + t.Errorf("read 1st frame, error %q", err) + } + if n != 5 { + t.Errorf("read 1st frame, expect 5, got %d", n) + } + if !bytes.Equal(expected[0], msg[:n]) { + t.Errorf("read 1st frame %q, got %q", expected[0], msg[:n]) + } + + n, err = conn.Read(msg) + if err != nil { + t.Errorf("read 2nd frame, error %q", err) + } + if n != 5 { + t.Errorf("read 2nd frame, expect 5, got %d", n) + } + if !bytes.Equal(expected[1], msg[:n]) { + t.Errorf("read 2nd frame %q, got %q", expected[1], msg[:n]) + } + + n, err = conn.Read(msg) + if err == nil { + t.Errorf("read not EOF") + } + if n != 0 { + t.Errorf("expect read 0, got %d", n) + } +} + +func TestHybiServerReadWithoutMasking(t *testing.T) { + wireData := []byte{0x81, 0x05, 'h', 'e', 'l', 'l', 'o'} + br := bufio.NewReader(bytes.NewBuffer(wireData)) + bw := bufio.NewWriter(bytes.NewBuffer([]byte{})) + conn := newHybiConn(newConfig(t, "/"), bufio.NewReadWriter(br, bw), nil, new(http.Request)) + // server MUST close the connection upon receiving a non-masked frame. + msg := make([]byte, 512) + _, err := conn.Read(msg) + if err != io.EOF { + t.Errorf("read 1st frame, expect %q, but got %q", io.EOF, err) + } +} + +func TestHybiClientReadWithMasking(t *testing.T) { + wireData := []byte{0x81, 0x85, 0xcc, 0x55, 0x80, 0x20, + 0xa4, 0x30, 0xec, 0x4c, 0xa3, // hello + } + br := bufio.NewReader(bytes.NewBuffer(wireData)) + bw := bufio.NewWriter(bytes.NewBuffer([]byte{})) + conn := newHybiConn(newConfig(t, "/"), bufio.NewReadWriter(br, bw), nil, nil) + + // client MUST close the connection upon receiving a masked frame. + msg := make([]byte, 512) + _, err := conn.Read(msg) + if err != io.EOF { + t.Errorf("read 1st frame, expect %q, but got %q", io.EOF, err) + } +} + +// Test the hybiServerHandshaker supports firefox implementation and +// checks Connection request header include (but it's not necessary +// equal to) "upgrade" +func TestHybiServerFirefoxHandshake(t *testing.T) { + config := new(Config) + handshaker := &hybiServerHandshaker{Config: config} + br := bufio.NewReader(strings.NewReader(`GET /chat HTTP/1.1 +Host: server.example.com +Upgrade: websocket +Connection: keep-alive, upgrade +Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ== +Origin: http://example.com +Sec-WebSocket-Protocol: chat, superchat +Sec-WebSocket-Version: 13 + +`)) + req, err := http.ReadRequest(br) + if err != nil { + t.Fatal("request", err) + } + code, err := handshaker.ReadHandshake(br, req) + if err != nil { + t.Errorf("handshake failed: %v", err) + } + if code != http.StatusSwitchingProtocols { + t.Errorf("status expected %q but got %q", http.StatusSwitchingProtocols, code) + } + b := bytes.NewBuffer([]byte{}) + bw := bufio.NewWriter(b) + + config.Protocol = []string{"chat"} + + err = handshaker.AcceptHandshake(bw) + if err != nil { + t.Errorf("handshake response failed: %v", err) + } + expectedResponse := strings.Join([]string{ + "HTTP/1.1 101 Switching Protocols", + "Upgrade: websocket", + "Connection: Upgrade", + "Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=", + "Sec-WebSocket-Protocol: chat", + "", ""}, "\r\n") + + if b.String() != expectedResponse { + t.Errorf("handshake expected %q but got %q", expectedResponse, b.String()) + } +} diff --git a/vendor/golang.org/x/net/websocket/server.go b/vendor/golang.org/x/net/websocket/server.go new file mode 100644 index 0000000..0895dea --- /dev/null +++ b/vendor/golang.org/x/net/websocket/server.go @@ -0,0 +1,113 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package websocket + +import ( + "bufio" + "fmt" + "io" + "net/http" +) + +func newServerConn(rwc io.ReadWriteCloser, buf *bufio.ReadWriter, req *http.Request, config *Config, handshake func(*Config, *http.Request) error) (conn *Conn, err error) { + var hs serverHandshaker = &hybiServerHandshaker{Config: config} + code, err := hs.ReadHandshake(buf.Reader, req) + if err == ErrBadWebSocketVersion { + fmt.Fprintf(buf, "HTTP/1.1 %03d %s\r\n", code, http.StatusText(code)) + fmt.Fprintf(buf, "Sec-WebSocket-Version: %s\r\n", SupportedProtocolVersion) + buf.WriteString("\r\n") + buf.WriteString(err.Error()) + buf.Flush() + return + } + if err != nil { + fmt.Fprintf(buf, "HTTP/1.1 %03d %s\r\n", code, http.StatusText(code)) + buf.WriteString("\r\n") + buf.WriteString(err.Error()) + buf.Flush() + return + } + if handshake != nil { + err = handshake(config, req) + if err != nil { + code = http.StatusForbidden + fmt.Fprintf(buf, "HTTP/1.1 %03d %s\r\n", code, http.StatusText(code)) + buf.WriteString("\r\n") + buf.Flush() + return + } + } + err = hs.AcceptHandshake(buf.Writer) + if err != nil { + code = http.StatusBadRequest + fmt.Fprintf(buf, "HTTP/1.1 %03d %s\r\n", code, http.StatusText(code)) + buf.WriteString("\r\n") + buf.Flush() + return + } + conn = hs.NewServerConn(buf, rwc, req) + return +} + +// Server represents a server of a WebSocket. +type Server struct { + // Config is a WebSocket configuration for new WebSocket connection. + Config + + // Handshake is an optional function in WebSocket handshake. + // For example, you can check, or don't check Origin header. + // Another example, you can select config.Protocol. + Handshake func(*Config, *http.Request) error + + // Handler handles a WebSocket connection. + Handler +} + +// ServeHTTP implements the http.Handler interface for a WebSocket +func (s Server) ServeHTTP(w http.ResponseWriter, req *http.Request) { + s.serveWebSocket(w, req) +} + +func (s Server) serveWebSocket(w http.ResponseWriter, req *http.Request) { + rwc, buf, err := w.(http.Hijacker).Hijack() + if err != nil { + panic("Hijack failed: " + err.Error()) + } + // The server should abort the WebSocket connection if it finds + // the client did not send a handshake that matches with protocol + // specification. + defer rwc.Close() + conn, err := newServerConn(rwc, buf, req, &s.Config, s.Handshake) + if err != nil { + return + } + if conn == nil { + panic("unexpected nil conn") + } + s.Handler(conn) +} + +// Handler is a simple interface to a WebSocket browser client. +// It checks if Origin header is valid URL by default. +// You might want to verify websocket.Conn.Config().Origin in the func. +// If you use Server instead of Handler, you could call websocket.Origin and +// check the origin in your Handshake func. So, if you want to accept +// non-browser clients, which do not send an Origin header, set a +// Server.Handshake that does not check the origin. +type Handler func(*Conn) + +func checkOrigin(config *Config, req *http.Request) (err error) { + config.Origin, err = Origin(config, req) + if err == nil && config.Origin == nil { + return fmt.Errorf("null origin") + } + return err +} + +// ServeHTTP implements the http.Handler interface for a WebSocket +func (h Handler) ServeHTTP(w http.ResponseWriter, req *http.Request) { + s := Server{Handler: h, Handshake: checkOrigin} + s.serveWebSocket(w, req) +} diff --git a/vendor/golang.org/x/net/websocket/websocket.go b/vendor/golang.org/x/net/websocket/websocket.go new file mode 100644 index 0000000..6068400 --- /dev/null +++ b/vendor/golang.org/x/net/websocket/websocket.go @@ -0,0 +1,412 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package websocket implements a client and server for the WebSocket protocol +// as specified in RFC 6455. +package websocket // import "golang.org/x/net/websocket" + +import ( + "bufio" + "crypto/tls" + "encoding/json" + "errors" + "io" + "io/ioutil" + "net" + "net/http" + "net/url" + "sync" + "time" +) + +const ( + ProtocolVersionHybi13 = 13 + ProtocolVersionHybi = ProtocolVersionHybi13 + SupportedProtocolVersion = "13" + + ContinuationFrame = 0 + TextFrame = 1 + BinaryFrame = 2 + CloseFrame = 8 + PingFrame = 9 + PongFrame = 10 + UnknownFrame = 255 +) + +// ProtocolError represents WebSocket protocol errors. +type ProtocolError struct { + ErrorString string +} + +func (err *ProtocolError) Error() string { return err.ErrorString } + +var ( + ErrBadProtocolVersion = &ProtocolError{"bad protocol version"} + ErrBadScheme = &ProtocolError{"bad scheme"} + ErrBadStatus = &ProtocolError{"bad status"} + ErrBadUpgrade = &ProtocolError{"missing or bad upgrade"} + ErrBadWebSocketOrigin = &ProtocolError{"missing or bad WebSocket-Origin"} + ErrBadWebSocketLocation = &ProtocolError{"missing or bad WebSocket-Location"} + ErrBadWebSocketProtocol = &ProtocolError{"missing or bad WebSocket-Protocol"} + ErrBadWebSocketVersion = &ProtocolError{"missing or bad WebSocket Version"} + ErrChallengeResponse = &ProtocolError{"mismatch challenge/response"} + ErrBadFrame = &ProtocolError{"bad frame"} + ErrBadFrameBoundary = &ProtocolError{"not on frame boundary"} + ErrNotWebSocket = &ProtocolError{"not websocket protocol"} + ErrBadRequestMethod = &ProtocolError{"bad method"} + ErrNotSupported = &ProtocolError{"not supported"} +) + +// Addr is an implementation of net.Addr for WebSocket. +type Addr struct { + *url.URL +} + +// Network returns the network type for a WebSocket, "websocket". +func (addr *Addr) Network() string { return "websocket" } + +// Config is a WebSocket configuration +type Config struct { + // A WebSocket server address. + Location *url.URL + + // A Websocket client origin. + Origin *url.URL + + // WebSocket subprotocols. + Protocol []string + + // WebSocket protocol version. + Version int + + // TLS config for secure WebSocket (wss). + TlsConfig *tls.Config + + // Additional header fields to be sent in WebSocket opening handshake. + Header http.Header + + handshakeData map[string]string +} + +// serverHandshaker is an interface to handle WebSocket server side handshake. +type serverHandshaker interface { + // ReadHandshake reads handshake request message from client. + // Returns http response code and error if any. + ReadHandshake(buf *bufio.Reader, req *http.Request) (code int, err error) + + // AcceptHandshake accepts the client handshake request and sends + // handshake response back to client. + AcceptHandshake(buf *bufio.Writer) (err error) + + // NewServerConn creates a new WebSocket connection. + NewServerConn(buf *bufio.ReadWriter, rwc io.ReadWriteCloser, request *http.Request) (conn *Conn) +} + +// frameReader is an interface to read a WebSocket frame. +type frameReader interface { + // Reader is to read payload of the frame. + io.Reader + + // PayloadType returns payload type. + PayloadType() byte + + // HeaderReader returns a reader to read header of the frame. + HeaderReader() io.Reader + + // TrailerReader returns a reader to read trailer of the frame. + // If it returns nil, there is no trailer in the frame. + TrailerReader() io.Reader + + // Len returns total length of the frame, including header and trailer. + Len() int +} + +// frameReaderFactory is an interface to creates new frame reader. +type frameReaderFactory interface { + NewFrameReader() (r frameReader, err error) +} + +// frameWriter is an interface to write a WebSocket frame. +type frameWriter interface { + // Writer is to write payload of the frame. + io.WriteCloser +} + +// frameWriterFactory is an interface to create new frame writer. +type frameWriterFactory interface { + NewFrameWriter(payloadType byte) (w frameWriter, err error) +} + +type frameHandler interface { + HandleFrame(frame frameReader) (r frameReader, err error) + WriteClose(status int) (err error) +} + +// Conn represents a WebSocket connection. +type Conn struct { + config *Config + request *http.Request + + buf *bufio.ReadWriter + rwc io.ReadWriteCloser + + rio sync.Mutex + frameReaderFactory + frameReader + + wio sync.Mutex + frameWriterFactory + + frameHandler + PayloadType byte + defaultCloseStatus int +} + +// Read implements the io.Reader interface: +// it reads data of a frame from the WebSocket connection. +// if msg is not large enough for the frame data, it fills the msg and next Read +// will read the rest of the frame data. +// it reads Text frame or Binary frame. +func (ws *Conn) Read(msg []byte) (n int, err error) { + ws.rio.Lock() + defer ws.rio.Unlock() +again: + if ws.frameReader == nil { + frame, err := ws.frameReaderFactory.NewFrameReader() + if err != nil { + return 0, err + } + ws.frameReader, err = ws.frameHandler.HandleFrame(frame) + if err != nil { + return 0, err + } + if ws.frameReader == nil { + goto again + } + } + n, err = ws.frameReader.Read(msg) + if err == io.EOF { + if trailer := ws.frameReader.TrailerReader(); trailer != nil { + io.Copy(ioutil.Discard, trailer) + } + ws.frameReader = nil + goto again + } + return n, err +} + +// Write implements the io.Writer interface: +// it writes data as a frame to the WebSocket connection. +func (ws *Conn) Write(msg []byte) (n int, err error) { + ws.wio.Lock() + defer ws.wio.Unlock() + w, err := ws.frameWriterFactory.NewFrameWriter(ws.PayloadType) + if err != nil { + return 0, err + } + n, err = w.Write(msg) + w.Close() + if err != nil { + return n, err + } + return n, err +} + +// Close implements the io.Closer interface. +func (ws *Conn) Close() error { + err := ws.frameHandler.WriteClose(ws.defaultCloseStatus) + err1 := ws.rwc.Close() + if err != nil { + return err + } + return err1 +} + +func (ws *Conn) IsClientConn() bool { return ws.request == nil } +func (ws *Conn) IsServerConn() bool { return ws.request != nil } + +// LocalAddr returns the WebSocket Origin for the connection for client, or +// the WebSocket location for server. +func (ws *Conn) LocalAddr() net.Addr { + if ws.IsClientConn() { + return &Addr{ws.config.Origin} + } + return &Addr{ws.config.Location} +} + +// RemoteAddr returns the WebSocket location for the connection for client, or +// the Websocket Origin for server. +func (ws *Conn) RemoteAddr() net.Addr { + if ws.IsClientConn() { + return &Addr{ws.config.Location} + } + return &Addr{ws.config.Origin} +} + +var errSetDeadline = errors.New("websocket: cannot set deadline: not using a net.Conn") + +// SetDeadline sets the connection's network read & write deadlines. +func (ws *Conn) SetDeadline(t time.Time) error { + if conn, ok := ws.rwc.(net.Conn); ok { + return conn.SetDeadline(t) + } + return errSetDeadline +} + +// SetReadDeadline sets the connection's network read deadline. +func (ws *Conn) SetReadDeadline(t time.Time) error { + if conn, ok := ws.rwc.(net.Conn); ok { + return conn.SetReadDeadline(t) + } + return errSetDeadline +} + +// SetWriteDeadline sets the connection's network write deadline. +func (ws *Conn) SetWriteDeadline(t time.Time) error { + if conn, ok := ws.rwc.(net.Conn); ok { + return conn.SetWriteDeadline(t) + } + return errSetDeadline +} + +// Config returns the WebSocket config. +func (ws *Conn) Config() *Config { return ws.config } + +// Request returns the http request upgraded to the WebSocket. +// It is nil for client side. +func (ws *Conn) Request() *http.Request { return ws.request } + +// Codec represents a symmetric pair of functions that implement a codec. +type Codec struct { + Marshal func(v interface{}) (data []byte, payloadType byte, err error) + Unmarshal func(data []byte, payloadType byte, v interface{}) (err error) +} + +// Send sends v marshaled by cd.Marshal as single frame to ws. +func (cd Codec) Send(ws *Conn, v interface{}) (err error) { + data, payloadType, err := cd.Marshal(v) + if err != nil { + return err + } + ws.wio.Lock() + defer ws.wio.Unlock() + w, err := ws.frameWriterFactory.NewFrameWriter(payloadType) + if err != nil { + return err + } + _, err = w.Write(data) + w.Close() + return err +} + +// Receive receives single frame from ws, unmarshaled by cd.Unmarshal and stores in v. +func (cd Codec) Receive(ws *Conn, v interface{}) (err error) { + ws.rio.Lock() + defer ws.rio.Unlock() + if ws.frameReader != nil { + _, err = io.Copy(ioutil.Discard, ws.frameReader) + if err != nil { + return err + } + ws.frameReader = nil + } +again: + frame, err := ws.frameReaderFactory.NewFrameReader() + if err != nil { + return err + } + frame, err = ws.frameHandler.HandleFrame(frame) + if err != nil { + return err + } + if frame == nil { + goto again + } + payloadType := frame.PayloadType() + data, err := ioutil.ReadAll(frame) + if err != nil { + return err + } + return cd.Unmarshal(data, payloadType, v) +} + +func marshal(v interface{}) (msg []byte, payloadType byte, err error) { + switch data := v.(type) { + case string: + return []byte(data), TextFrame, nil + case []byte: + return data, BinaryFrame, nil + } + return nil, UnknownFrame, ErrNotSupported +} + +func unmarshal(msg []byte, payloadType byte, v interface{}) (err error) { + switch data := v.(type) { + case *string: + *data = string(msg) + return nil + case *[]byte: + *data = msg + return nil + } + return ErrNotSupported +} + +/* +Message is a codec to send/receive text/binary data in a frame on WebSocket connection. +To send/receive text frame, use string type. +To send/receive binary frame, use []byte type. + +Trivial usage: + + import "websocket" + + // receive text frame + var message string + websocket.Message.Receive(ws, &message) + + // send text frame + message = "hello" + websocket.Message.Send(ws, message) + + // receive binary frame + var data []byte + websocket.Message.Receive(ws, &data) + + // send binary frame + data = []byte{0, 1, 2} + websocket.Message.Send(ws, data) + +*/ +var Message = Codec{marshal, unmarshal} + +func jsonMarshal(v interface{}) (msg []byte, payloadType byte, err error) { + msg, err = json.Marshal(v) + return msg, TextFrame, err +} + +func jsonUnmarshal(msg []byte, payloadType byte, v interface{}) (err error) { + return json.Unmarshal(msg, v) +} + +/* +JSON is a codec to send/receive JSON data in a frame from a WebSocket connection. + +Trivial usage: + + import "websocket" + + type T struct { + Msg string + Count int + } + + // receive JSON type T + var data T + websocket.JSON.Receive(ws, &data) + + // send JSON type T + websocket.JSON.Send(ws, data) +*/ +var JSON = Codec{jsonMarshal, jsonUnmarshal} diff --git a/vendor/golang.org/x/net/websocket/websocket_test.go b/vendor/golang.org/x/net/websocket/websocket_test.go new file mode 100644 index 0000000..05b7e53 --- /dev/null +++ b/vendor/golang.org/x/net/websocket/websocket_test.go @@ -0,0 +1,587 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package websocket + +import ( + "bytes" + "fmt" + "io" + "log" + "net" + "net/http" + "net/http/httptest" + "net/url" + "reflect" + "runtime" + "strings" + "sync" + "testing" + "time" +) + +var serverAddr string +var once sync.Once + +func echoServer(ws *Conn) { + defer ws.Close() + io.Copy(ws, ws) +} + +type Count struct { + S string + N int +} + +func countServer(ws *Conn) { + defer ws.Close() + for { + var count Count + err := JSON.Receive(ws, &count) + if err != nil { + return + } + count.N++ + count.S = strings.Repeat(count.S, count.N) + err = JSON.Send(ws, count) + if err != nil { + return + } + } +} + +type testCtrlAndDataHandler struct { + hybiFrameHandler +} + +func (h *testCtrlAndDataHandler) WritePing(b []byte) (int, error) { + h.hybiFrameHandler.conn.wio.Lock() + defer h.hybiFrameHandler.conn.wio.Unlock() + w, err := h.hybiFrameHandler.conn.frameWriterFactory.NewFrameWriter(PingFrame) + if err != nil { + return 0, err + } + n, err := w.Write(b) + w.Close() + return n, err +} + +func ctrlAndDataServer(ws *Conn) { + defer ws.Close() + h := &testCtrlAndDataHandler{hybiFrameHandler: hybiFrameHandler{conn: ws}} + ws.frameHandler = h + + go func() { + for i := 0; ; i++ { + var b []byte + if i%2 != 0 { // with or without payload + b = []byte(fmt.Sprintf("#%d-CONTROL-FRAME-FROM-SERVER", i)) + } + if _, err := h.WritePing(b); err != nil { + break + } + if _, err := h.WritePong(b); err != nil { // unsolicited pong + break + } + time.Sleep(10 * time.Millisecond) + } + }() + + b := make([]byte, 128) + for { + n, err := ws.Read(b) + if err != nil { + break + } + if _, err := ws.Write(b[:n]); err != nil { + break + } + } +} + +func subProtocolHandshake(config *Config, req *http.Request) error { + for _, proto := range config.Protocol { + if proto == "chat" { + config.Protocol = []string{proto} + return nil + } + } + return ErrBadWebSocketProtocol +} + +func subProtoServer(ws *Conn) { + for _, proto := range ws.Config().Protocol { + io.WriteString(ws, proto) + } +} + +func startServer() { + http.Handle("/echo", Handler(echoServer)) + http.Handle("/count", Handler(countServer)) + http.Handle("/ctrldata", Handler(ctrlAndDataServer)) + subproto := Server{ + Handshake: subProtocolHandshake, + Handler: Handler(subProtoServer), + } + http.Handle("/subproto", subproto) + server := httptest.NewServer(nil) + serverAddr = server.Listener.Addr().String() + log.Print("Test WebSocket server listening on ", serverAddr) +} + +func newConfig(t *testing.T, path string) *Config { + config, _ := NewConfig(fmt.Sprintf("ws://%s%s", serverAddr, path), "http://localhost") + return config +} + +func TestEcho(t *testing.T) { + once.Do(startServer) + + // websocket.Dial() + client, err := net.Dial("tcp", serverAddr) + if err != nil { + t.Fatal("dialing", err) + } + conn, err := NewClient(newConfig(t, "/echo"), client) + if err != nil { + t.Errorf("WebSocket handshake error: %v", err) + return + } + + msg := []byte("hello, world\n") + if _, err := conn.Write(msg); err != nil { + t.Errorf("Write: %v", err) + } + var actual_msg = make([]byte, 512) + n, err := conn.Read(actual_msg) + if err != nil { + t.Errorf("Read: %v", err) + } + actual_msg = actual_msg[0:n] + if !bytes.Equal(msg, actual_msg) { + t.Errorf("Echo: expected %q got %q", msg, actual_msg) + } + conn.Close() +} + +func TestAddr(t *testing.T) { + once.Do(startServer) + + // websocket.Dial() + client, err := net.Dial("tcp", serverAddr) + if err != nil { + t.Fatal("dialing", err) + } + conn, err := NewClient(newConfig(t, "/echo"), client) + if err != nil { + t.Errorf("WebSocket handshake error: %v", err) + return + } + + ra := conn.RemoteAddr().String() + if !strings.HasPrefix(ra, "ws://") || !strings.HasSuffix(ra, "/echo") { + t.Errorf("Bad remote addr: %v", ra) + } + la := conn.LocalAddr().String() + if !strings.HasPrefix(la, "http://") { + t.Errorf("Bad local addr: %v", la) + } + conn.Close() +} + +func TestCount(t *testing.T) { + once.Do(startServer) + + // websocket.Dial() + client, err := net.Dial("tcp", serverAddr) + if err != nil { + t.Fatal("dialing", err) + } + conn, err := NewClient(newConfig(t, "/count"), client) + if err != nil { + t.Errorf("WebSocket handshake error: %v", err) + return + } + + var count Count + count.S = "hello" + if err := JSON.Send(conn, count); err != nil { + t.Errorf("Write: %v", err) + } + if err := JSON.Receive(conn, &count); err != nil { + t.Errorf("Read: %v", err) + } + if count.N != 1 { + t.Errorf("count: expected %d got %d", 1, count.N) + } + if count.S != "hello" { + t.Errorf("count: expected %q got %q", "hello", count.S) + } + if err := JSON.Send(conn, count); err != nil { + t.Errorf("Write: %v", err) + } + if err := JSON.Receive(conn, &count); err != nil { + t.Errorf("Read: %v", err) + } + if count.N != 2 { + t.Errorf("count: expected %d got %d", 2, count.N) + } + if count.S != "hellohello" { + t.Errorf("count: expected %q got %q", "hellohello", count.S) + } + conn.Close() +} + +func TestWithQuery(t *testing.T) { + once.Do(startServer) + + client, err := net.Dial("tcp", serverAddr) + if err != nil { + t.Fatal("dialing", err) + } + + config := newConfig(t, "/echo") + config.Location, err = url.ParseRequestURI(fmt.Sprintf("ws://%s/echo?q=v", serverAddr)) + if err != nil { + t.Fatal("location url", err) + } + + ws, err := NewClient(config, client) + if err != nil { + t.Errorf("WebSocket handshake: %v", err) + return + } + ws.Close() +} + +func testWithProtocol(t *testing.T, subproto []string) (string, error) { + once.Do(startServer) + + client, err := net.Dial("tcp", serverAddr) + if err != nil { + t.Fatal("dialing", err) + } + + config := newConfig(t, "/subproto") + config.Protocol = subproto + + ws, err := NewClient(config, client) + if err != nil { + return "", err + } + msg := make([]byte, 16) + n, err := ws.Read(msg) + if err != nil { + return "", err + } + ws.Close() + return string(msg[:n]), nil +} + +func TestWithProtocol(t *testing.T) { + proto, err := testWithProtocol(t, []string{"chat"}) + if err != nil { + t.Errorf("SubProto: unexpected error: %v", err) + } + if proto != "chat" { + t.Errorf("SubProto: expected %q, got %q", "chat", proto) + } +} + +func TestWithTwoProtocol(t *testing.T) { + proto, err := testWithProtocol(t, []string{"test", "chat"}) + if err != nil { + t.Errorf("SubProto: unexpected error: %v", err) + } + if proto != "chat" { + t.Errorf("SubProto: expected %q, got %q", "chat", proto) + } +} + +func TestWithBadProtocol(t *testing.T) { + _, err := testWithProtocol(t, []string{"test"}) + if err != ErrBadStatus { + t.Errorf("SubProto: expected %v, got %v", ErrBadStatus, err) + } +} + +func TestHTTP(t *testing.T) { + once.Do(startServer) + + // If the client did not send a handshake that matches the protocol + // specification, the server MUST return an HTTP response with an + // appropriate error code (such as 400 Bad Request) + resp, err := http.Get(fmt.Sprintf("http://%s/echo", serverAddr)) + if err != nil { + t.Errorf("Get: error %#v", err) + return + } + if resp == nil { + t.Error("Get: resp is null") + return + } + if resp.StatusCode != http.StatusBadRequest { + t.Errorf("Get: expected %q got %q", http.StatusBadRequest, resp.StatusCode) + } +} + +func TestTrailingSpaces(t *testing.T) { + // http://code.google.com/p/go/issues/detail?id=955 + // The last runs of this create keys with trailing spaces that should not be + // generated by the client. + once.Do(startServer) + config := newConfig(t, "/echo") + for i := 0; i < 30; i++ { + // body + ws, err := DialConfig(config) + if err != nil { + t.Errorf("Dial #%d failed: %v", i, err) + break + } + ws.Close() + } +} + +func TestDialConfigBadVersion(t *testing.T) { + once.Do(startServer) + config := newConfig(t, "/echo") + config.Version = 1234 + + _, err := DialConfig(config) + + if dialerr, ok := err.(*DialError); ok { + if dialerr.Err != ErrBadProtocolVersion { + t.Errorf("dial expected err %q but got %q", ErrBadProtocolVersion, dialerr.Err) + } + } +} + +func TestSmallBuffer(t *testing.T) { + // http://code.google.com/p/go/issues/detail?id=1145 + // Read should be able to handle reading a fragment of a frame. + once.Do(startServer) + + // websocket.Dial() + client, err := net.Dial("tcp", serverAddr) + if err != nil { + t.Fatal("dialing", err) + } + conn, err := NewClient(newConfig(t, "/echo"), client) + if err != nil { + t.Errorf("WebSocket handshake error: %v", err) + return + } + + msg := []byte("hello, world\n") + if _, err := conn.Write(msg); err != nil { + t.Errorf("Write: %v", err) + } + var small_msg = make([]byte, 8) + n, err := conn.Read(small_msg) + if err != nil { + t.Errorf("Read: %v", err) + } + if !bytes.Equal(msg[:len(small_msg)], small_msg) { + t.Errorf("Echo: expected %q got %q", msg[:len(small_msg)], small_msg) + } + var second_msg = make([]byte, len(msg)) + n, err = conn.Read(second_msg) + if err != nil { + t.Errorf("Read: %v", err) + } + second_msg = second_msg[0:n] + if !bytes.Equal(msg[len(small_msg):], second_msg) { + t.Errorf("Echo: expected %q got %q", msg[len(small_msg):], second_msg) + } + conn.Close() +} + +var parseAuthorityTests = []struct { + in *url.URL + out string +}{ + { + &url.URL{ + Scheme: "ws", + Host: "www.google.com", + }, + "www.google.com:80", + }, + { + &url.URL{ + Scheme: "wss", + Host: "www.google.com", + }, + "www.google.com:443", + }, + { + &url.URL{ + Scheme: "ws", + Host: "www.google.com:80", + }, + "www.google.com:80", + }, + { + &url.URL{ + Scheme: "wss", + Host: "www.google.com:443", + }, + "www.google.com:443", + }, + // some invalid ones for parseAuthority. parseAuthority doesn't + // concern itself with the scheme unless it actually knows about it + { + &url.URL{ + Scheme: "http", + Host: "www.google.com", + }, + "www.google.com", + }, + { + &url.URL{ + Scheme: "http", + Host: "www.google.com:80", + }, + "www.google.com:80", + }, + { + &url.URL{ + Scheme: "asdf", + Host: "127.0.0.1", + }, + "127.0.0.1", + }, + { + &url.URL{ + Scheme: "asdf", + Host: "www.google.com", + }, + "www.google.com", + }, +} + +func TestParseAuthority(t *testing.T) { + for _, tt := range parseAuthorityTests { + out := parseAuthority(tt.in) + if out != tt.out { + t.Errorf("got %v; want %v", out, tt.out) + } + } +} + +type closerConn struct { + net.Conn + closed int // count of the number of times Close was called +} + +func (c *closerConn) Close() error { + c.closed++ + return c.Conn.Close() +} + +func TestClose(t *testing.T) { + if runtime.GOOS == "plan9" { + t.Skip("see golang.org/issue/11454") + } + + once.Do(startServer) + + conn, err := net.Dial("tcp", serverAddr) + if err != nil { + t.Fatal("dialing", err) + } + + cc := closerConn{Conn: conn} + + client, err := NewClient(newConfig(t, "/echo"), &cc) + if err != nil { + t.Fatalf("WebSocket handshake: %v", err) + } + + // set the deadline to ten minutes ago, which will have expired by the time + // client.Close sends the close status frame. + conn.SetDeadline(time.Now().Add(-10 * time.Minute)) + + if err := client.Close(); err == nil { + t.Errorf("ws.Close(): expected error, got %v", err) + } + if cc.closed < 1 { + t.Fatalf("ws.Close(): expected underlying ws.rwc.Close to be called > 0 times, got: %v", cc.closed) + } +} + +var originTests = []struct { + req *http.Request + origin *url.URL +}{ + { + req: &http.Request{ + Header: http.Header{ + "Origin": []string{"http://www.example.com"}, + }, + }, + origin: &url.URL{ + Scheme: "http", + Host: "www.example.com", + }, + }, + { + req: &http.Request{}, + }, +} + +func TestOrigin(t *testing.T) { + conf := newConfig(t, "/echo") + conf.Version = ProtocolVersionHybi13 + for i, tt := range originTests { + origin, err := Origin(conf, tt.req) + if err != nil { + t.Error(err) + continue + } + if !reflect.DeepEqual(origin, tt.origin) { + t.Errorf("#%d: got origin %v; want %v", i, origin, tt.origin) + continue + } + } +} + +func TestCtrlAndData(t *testing.T) { + once.Do(startServer) + + c, err := net.Dial("tcp", serverAddr) + if err != nil { + t.Fatal(err) + } + ws, err := NewClient(newConfig(t, "/ctrldata"), c) + if err != nil { + t.Fatal(err) + } + defer ws.Close() + + h := &testCtrlAndDataHandler{hybiFrameHandler: hybiFrameHandler{conn: ws}} + ws.frameHandler = h + + b := make([]byte, 128) + for i := 0; i < 2; i++ { + data := []byte(fmt.Sprintf("#%d-DATA-FRAME-FROM-CLIENT", i)) + if _, err := ws.Write(data); err != nil { + t.Fatalf("#%d: %v", i, err) + } + var ctrl []byte + if i%2 != 0 { // with or without payload + ctrl = []byte(fmt.Sprintf("#%d-CONTROL-FRAME-FROM-CLIENT", i)) + } + if _, err := h.WritePing(ctrl); err != nil { + t.Fatalf("#%d: %v", i, err) + } + n, err := ws.Read(b) + if err != nil { + t.Fatalf("#%d: %v", i, err) + } + if !bytes.Equal(b[:n], data) { + t.Fatalf("#%d: got %v; want %v", i, b[:n], data) + } + } +} diff --git a/vendor/golang.org/x/sys b/vendor/golang.org/x/sys new file mode 160000 index 0000000..d9157a9 --- /dev/null +++ b/vendor/golang.org/x/sys @@ -0,0 +1 @@ +Subproject commit d9157a9621b69ad1d8d77a1933590c416593f24f diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/.drone.yml b/vendor/gopkg.in/alexzorin/libvirt-go.v2/.drone.yml new file mode 100644 index 0000000..da5ca0d --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/.drone.yml @@ -0,0 +1,7 @@ +image: alexzorin/libvirt-go_test:1.2 +script: + - go test -v +notify: + email: + recipients: + - git@zor.io diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/.gitignore b/vendor/gopkg.in/alexzorin/libvirt-go.v2/.gitignore new file mode 100644 index 0000000..ce6b260 --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/.gitignore @@ -0,0 +1,3 @@ +*.sublime-workspace +*.sublime-project +.vagrant \ No newline at end of file diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/LICENSE b/vendor/gopkg.in/alexzorin/libvirt-go.v2/LICENSE new file mode 100644 index 0000000..202f5fc --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2013 Alex Zorin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/README.md b/vendor/gopkg.in/alexzorin/libvirt-go.v2/README.md new file mode 100644 index 0000000..f7638f5 --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/README.md @@ -0,0 +1,49 @@ +# libvirt-go + +[![Build Status](http://ci.serversaurus.com/github.com/alexzorin/libvirt-go/status.svg?branch=master)](http://ci.serversaurus.com/github.com/alexzorin/libvirt-go) + +Go bindings for libvirt. + +Make sure to have `libvirt-dev` package (or the development files otherwise somewhere in your include path) + +## Version Support +Currently, the only supported version of libvirt is **1.2.2**, tagged as `v2.x` releases `gopkg.in/alexzorin/libvirt-go.v2` [(docs)](http://gopkg.in/alexzorin/libvirt-go.v2). + +The bindings will probably work with versions of libvirt that are higher than 1.2.2, depending on what is added in those releases. However, no features are currently being added that will cause the build or tests to break against 1.2.2. + +### OS Compatibility Matrix + +To quickly see what version of libvirt your OS can easily support (may be outdated). Obviously, nothing below 1.2.2 is usable with these bindings. + +| OS Release | libvirt Version | +| ------------ | ------------------------------ | +| FC19 | 1.2.9 from libvirt.org/sources | +| Debian 7 | 1.2.4 from wheezy-backports | +| Debian 6 | 0.9.12 from squeeze-backports | +| Ubuntu 14.04 | 1.2.2 from trusty | +| RHEL 6 | 0.10.x | +| RHEL 5 | 0.8.x | + + +### 0.9.x Support + +Previously there was support for libvirt 0.9.8 and below, however this is no longer being updated. These releases were tagged `v1.x` at `gopkg.in/alexzorin/libvirt-go.v1` [(docs)](http://gopkg.in/alexzorin/libvirt-go.v1). + +## Documentation + +* [api documentation for the bindings](http://godoc.org/github.com/alexzorin/libvirt-go) +* [api documentation for libvirt](http://libvirt.org/html/libvirt-libvirt.html) + +## Contributing + +Please fork and write tests. + +Integration tests are available where functionality isn't provided by the test driver, see `integration_test.go`. + +A `Vagrantfile` is included to run the integration tests: + +* `cd ./vagrant/{branch}` (i.e `./vagrant/master`, where you will find a `Vagrantfile` for the `master` branch) +* `vagrant up` to provision the virtual machine +* `vagrant ssh` to login to the virtual machine + +Once inside, `sudo su -`, `cd /libvirt-go` and `go test -tags integration`. diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/cfuncs.go b/vendor/gopkg.in/alexzorin/libvirt-go.v2/cfuncs.go new file mode 100644 index 0000000..81ae515 --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/cfuncs.go @@ -0,0 +1,96 @@ +package libvirt + +/* +#cgo LDFLAGS: -lvirt -ldl +#include +#include +#include + +void virErrorFuncDummy(void *userData, virErrorPtr error) +{ +} + +int domainEventLifecycleCallback_cgo(virConnectPtr c, virDomainPtr d, + int event, int detail, void *data) +{ + return domainEventLifecycleCallback(c, d, event, detail, data); +} + +int domainEventGenericCallback_cgo(virConnectPtr c, virDomainPtr d, void *data) +{ + return domainEventGenericCallback(c, d, data); +} + +int domainEventRTCChangeCallback_cgo(virConnectPtr c, virDomainPtr d, + long long utcoffset, void *data) +{ + return domainEventRTCChangeCallback(c, d, utcoffset, data); +} + +int domainEventWatchdogCallback_cgo(virConnectPtr c, virDomainPtr d, + int action, void *data) +{ + return domainEventWatchdogCallback(c, d, action, data); +} + +int domainEventIOErrorCallback_cgo(virConnectPtr c, virDomainPtr d, + const char *srcPath, const char *devAlias, + int action, void *data) +{ + return domainEventIOErrorCallback(c, d, srcPath, devAlias, action, data); +} + +int domainEventGraphicsCallback_cgo(virConnectPtr c, virDomainPtr d, + int phase, const virDomainEventGraphicsAddress *local, + const virDomainEventGraphicsAddress *remote, + const char *authScheme, + const virDomainEventGraphicsSubject *subject, void *data) +{ + return domainEventGraphicsCallback(c, d, phase, local, remote, authScheme, subject, data); +} + +int domainEventIOErrorReasonCallback_cgo(virConnectPtr c, virDomainPtr d, + const char *srcPath, const char *devAlias, + int action, const char *reason, void *data) +{ + return domainEventIOErrorReasonCallback(c, d, srcPath, devAlias, action, reason, data); +} + +int domainEventBlockJobCallback_cgo(virConnectPtr c, virDomainPtr d, + const char *disk, int type, int status, void *data) +{ + return domainEventIOErrorReasonCallback(c, d, disk, type, status, data); +} + +int domainEventDiskChangeCallback_cgo(virConnectPtr c, virDomainPtr d, + const char *oldSrcPath, const char *newSrcPath, + const char *devAlias, int reason, void *data) +{ + return domainEventDiskChangeCallback(c, d, oldSrcPath, newSrcPath, devAlias, reason, data); +} + +int domainEventTrayChangeCallback_cgo(virConnectPtr c, virDomainPtr d, + const char *devAlias, int reason, void *data) +{ + return domainEventTrayChangeCallback(c, d, devAlias, reason, data); +} + +int domainEventReasonCallback_cgo(virConnectPtr c, virDomainPtr d, + int reason, void *data) +{ + return domainEventReasonCallback(c, d, reason, data); +} + +int domainEventBalloonChangeCallback_cgo(virConnectPtr c, virDomainPtr d, + unsigned long long actual, void *data) +{ + return domainEventBalloonChangeCallback(c, d, actual, data); +} + +int domainEventDeviceRemovedCallback_cgo(virConnectPtr c, virDomainPtr d, + const char *devAlias, void *data) +{ + return domainEventDeviceRemovedCallback(c, d, devAlias, data); +} +*/ +import "C" diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/constants.go b/vendor/gopkg.in/alexzorin/libvirt-go.v2/constants.go new file mode 100644 index 0000000..a9f2ceb --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/constants.go @@ -0,0 +1,385 @@ +package libvirt + +/* +#cgo LDFLAGS: -lvirt -ldl +#include +#include +#include +*/ +import "C" + +// virDomainState +const ( + VIR_DOMAIN_NOSTATE = C.VIR_DOMAIN_NOSTATE + VIR_DOMAIN_RUNNING = C.VIR_DOMAIN_RUNNING + VIR_DOMAIN_BLOCKED = C.VIR_DOMAIN_BLOCKED + VIR_DOMAIN_PAUSED = C.VIR_DOMAIN_PAUSED + VIR_DOMAIN_SHUTDOWN = C.VIR_DOMAIN_SHUTDOWN + VIR_DOMAIN_CRASHED = C.VIR_DOMAIN_CRASHED + VIR_DOMAIN_PMSUSPENDED = C.VIR_DOMAIN_PMSUSPENDED + VIR_DOMAIN_SHUTOFF = C.VIR_DOMAIN_SHUTOFF +) + +//virConnectListAllDomainsFlags +const ( + VIR_CONNECT_LIST_DOMAINS_ACTIVE = C.VIR_CONNECT_LIST_DOMAINS_ACTIVE + VIR_CONNECT_LIST_DOMAINS_INACTIVE = C.VIR_CONNECT_LIST_DOMAINS_INACTIVE + VIR_CONNECT_LIST_DOMAINS_PERSISTENT = C.VIR_CONNECT_LIST_DOMAINS_PERSISTENT + VIR_CONNECT_LIST_DOMAINS_TRANSIENT = C.VIR_CONNECT_LIST_DOMAINS_TRANSIENT + VIR_CONNECT_LIST_DOMAINS_RUNNING = C.VIR_CONNECT_LIST_DOMAINS_RUNNING + VIR_CONNECT_LIST_DOMAINS_PAUSED = C.VIR_CONNECT_LIST_DOMAINS_PAUSED + VIR_CONNECT_LIST_DOMAINS_SHUTOFF = C.VIR_CONNECT_LIST_DOMAINS_SHUTOFF + VIR_CONNECT_LIST_DOMAINS_OTHER = C.VIR_CONNECT_LIST_DOMAINS_OTHER + VIR_CONNECT_LIST_DOMAINS_MANAGEDSAVE = C.VIR_CONNECT_LIST_DOMAINS_MANAGEDSAVE + VIR_CONNECT_LIST_DOMAINS_NO_MANAGEDSAVE = C.VIR_CONNECT_LIST_DOMAINS_NO_MANAGEDSAVE + VIR_CONNECT_LIST_DOMAINS_AUTOSTART = C.VIR_CONNECT_LIST_DOMAINS_AUTOSTART + VIR_CONNECT_LIST_DOMAINS_NO_AUTOSTART = C.VIR_CONNECT_LIST_DOMAINS_NO_AUTOSTART + VIR_CONNECT_LIST_DOMAINS_HAS_SNAPSHOT = C.VIR_CONNECT_LIST_DOMAINS_HAS_SNAPSHOT + VIR_CONNECT_LIST_DOMAINS_NO_SNAPSHOT = C.VIR_CONNECT_LIST_DOMAINS_NO_SNAPSHOT +) + +// virDomainMetadataType +const ( + VIR_DOMAIN_METADATA_DESCRIPTION = C.VIR_DOMAIN_METADATA_DESCRIPTION + VIR_DOMAIN_METADATA_TITLE = C.VIR_DOMAIN_METADATA_TITLE + VIR_DOMAIN_METADATA_ELEMENT = C.VIR_DOMAIN_METADATA_ELEMENT +) + +// virDomainVcpuFlags +const ( + VIR_DOMAIN_VCPU_CONFIG = C.VIR_DOMAIN_VCPU_CONFIG + VIR_DOMAIN_VCPU_CURRENT = C.VIR_DOMAIN_VCPU_CURRENT + VIR_DOMAIN_VCPU_LIVE = C.VIR_DOMAIN_VCPU_LIVE + VIR_DOMAIN_VCPU_MAXIMUM = C.VIR_DOMAIN_VCPU_MAXIMUM + VIR_DOMAIN_VCPU_GUEST = C.VIR_DOMAIN_VCPU_GUEST +) + +// virDomainMemoryModFlags +const ( + VIR_DOMAIN_MEM_CONFIG = C.VIR_DOMAIN_AFFECT_CONFIG + VIR_DOMAIN_MEM_CURRENT = C.VIR_DOMAIN_AFFECT_CURRENT + VIR_DOMAIN_MEM_LIVE = C.VIR_DOMAIN_AFFECT_LIVE + VIR_DOMAIN_MEM_MAXIMUM = C.VIR_DOMAIN_MEM_MAXIMUM +) + +// virStoragePoolState +const ( + VIR_STORAGE_POOL_INACTIVE = C.VIR_STORAGE_POOL_INACTIVE // Not running + VIR_STORAGE_POOL_BUILDING = C.VIR_STORAGE_POOL_BUILDING // Initializing pool,not available + VIR_STORAGE_POOL_RUNNING = C.VIR_STORAGE_POOL_RUNNING // Running normally + VIR_STORAGE_POOL_DEGRADED = C.VIR_STORAGE_POOL_DEGRADED // Running degraded + VIR_STORAGE_POOL_INACCESSIBLE = C.VIR_STORAGE_POOL_INACCESSIBLE // Running,but not accessible +) + +// virStoragePoolBuildFlags +const ( + VIR_STORAGE_POOL_BUILD_NEW = C.VIR_STORAGE_POOL_BUILD_NEW // Regular build from scratch + VIR_STORAGE_POOL_BUILD_REPAIR = C.VIR_STORAGE_POOL_BUILD_REPAIR // Repair / reinitialize + VIR_STORAGE_POOL_BUILD_RESIZE = C.VIR_STORAGE_POOL_BUILD_RESIZE // Extend existing pool + VIR_STORAGE_POOL_BUILD_NO_OVERWRITE = C.VIR_STORAGE_POOL_BUILD_NO_OVERWRITE // Do not overwrite existing pool + VIR_STORAGE_POOL_BUILD_OVERWRITE = C.VIR_STORAGE_POOL_BUILD_OVERWRITE // Overwrite data +) + +// virDomainDestroyFlags +const ( + VIR_DOMAIN_DESTROY_DEFAULT = C.VIR_DOMAIN_DESTROY_DEFAULT + VIR_DOMAIN_DESTROY_GRACEFUL = C.VIR_DOMAIN_DESTROY_GRACEFUL +) + +// virDomainShutdownFlags +const ( + VIR_DOMAIN_SHUTDOWN_DEFAULT = C.VIR_DOMAIN_SHUTDOWN_DEFAULT + VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN = C.VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN + VIR_DOMAIN_SHUTDOWN_GUEST_AGENT = C.VIR_DOMAIN_SHUTDOWN_GUEST_AGENT + VIR_DOMAIN_SHUTDOWN_INITCTL = C.VIR_DOMAIN_SHUTDOWN_INITCTL + VIR_DOMAIN_SHUTDOWN_SIGNAL = C.VIR_DOMAIN_SHUTDOWN_SIGNAL +) + +// virDomainAttachDeviceFlags +const ( + VIR_DOMAIN_DEVICE_MODIFY_CONFIG = C.VIR_DOMAIN_AFFECT_CONFIG + VIR_DOMAIN_DEVICE_MODIFY_CURRENT = C.VIR_DOMAIN_AFFECT_CURRENT + VIR_DOMAIN_DEVICE_MODIFY_LIVE = C.VIR_DOMAIN_AFFECT_LIVE + VIR_DOMAIN_DEVICE_MODIFY_FORCE = C.VIR_DOMAIN_DEVICE_MODIFY_FORCE +) + +// virStorageVolCreateFlags +const ( + VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA = C.VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA +) + +// virStorageVolDeleteFlags +const ( + VIR_STORAGE_VOL_DELETE_NORMAL = C.VIR_STORAGE_VOL_DELETE_NORMAL // Delete metadata only (fast) + VIR_STORAGE_VOL_DELETE_ZEROED = C.VIR_STORAGE_VOL_DELETE_ZEROED // Clear all data to zeros (slow) +) + +// virStorageVolResizeFlags +const ( + VIR_STORAGE_VOL_RESIZE_ALLOCATE = C.VIR_STORAGE_VOL_RESIZE_ALLOCATE // force allocation of new size + VIR_STORAGE_VOL_RESIZE_DELTA = C.VIR_STORAGE_VOL_RESIZE_DELTA // size is relative to current + VIR_STORAGE_VOL_RESIZE_SHRINK = C.VIR_STORAGE_VOL_RESIZE_SHRINK // allow decrease in capacity +) + +// virStorageVolType +const ( + VIR_STORAGE_VOL_FILE = C.VIR_STORAGE_VOL_FILE // Regular file based volumes + VIR_STORAGE_VOL_BLOCK = C.VIR_STORAGE_VOL_BLOCK // Block based volumes + VIR_STORAGE_VOL_DIR = C.VIR_STORAGE_VOL_DIR // Directory-passthrough based volume + VIR_STORAGE_VOL_NETWORK = C.VIR_STORAGE_VOL_NETWORK //Network volumes like RBD (RADOS Block Device) + VIR_STORAGE_VOL_NETDIR = C.VIR_STORAGE_VOL_NETDIR // Network accessible directory that can contain other network volumes +) + +// virStorageVolWipeAlgorithm +const ( + VIR_STORAGE_VOL_WIPE_ALG_ZERO = C.VIR_STORAGE_VOL_WIPE_ALG_ZERO // 1-pass, all zeroes + VIR_STORAGE_VOL_WIPE_ALG_NNSA = C.VIR_STORAGE_VOL_WIPE_ALG_NNSA // 4-pass NNSA Policy Letter NAP-14.1-C (XVI-8) + VIR_STORAGE_VOL_WIPE_ALG_DOD = C.VIR_STORAGE_VOL_WIPE_ALG_DOD // 4-pass DoD 5220.22-M section 8-306 procedure + VIR_STORAGE_VOL_WIPE_ALG_BSI = C.VIR_STORAGE_VOL_WIPE_ALG_BSI // 9-pass method recommended by the German Center of Security in Information Technologies + VIR_STORAGE_VOL_WIPE_ALG_GUTMANN = C.VIR_STORAGE_VOL_WIPE_ALG_GUTMANN // The canonical 35-pass sequence + VIR_STORAGE_VOL_WIPE_ALG_SCHNEIER = C.VIR_STORAGE_VOL_WIPE_ALG_SCHNEIER // 7-pass method described by Bruce Schneier in "Applied Cryptography" (1996) + VIR_STORAGE_VOL_WIPE_ALG_PFITZNER7 = C.VIR_STORAGE_VOL_WIPE_ALG_PFITZNER7 // 7-pass random + VIR_STORAGE_VOL_WIPE_ALG_PFITZNER33 = C.VIR_STORAGE_VOL_WIPE_ALG_PFITZNER33 // 33-pass random + VIR_STORAGE_VOL_WIPE_ALG_RANDOM = C.VIR_STORAGE_VOL_WIPE_ALG_RANDOM // 1-pass random +) + +// virSecretUsageType +const ( + VIR_SECRET_USAGE_TYPE_NONE = C.VIR_SECRET_USAGE_TYPE_NONE + VIR_SECRET_USAGE_TYPE_VOLUME = C.VIR_SECRET_USAGE_TYPE_VOLUME + VIR_SECRET_USAGE_TYPE_CEPH = C.VIR_SECRET_USAGE_TYPE_CEPH + VIR_SECRET_USAGE_TYPE_ISCSI = C.VIR_SECRET_USAGE_TYPE_ISCSI +) + +// virConnectListAllNetworksFlags +const ( + VIR_CONNECT_LIST_NETWORKS_INACTIVE = C.VIR_CONNECT_LIST_NETWORKS_INACTIVE + VIR_CONNECT_LIST_NETWORKS_ACTIVE = C.VIR_CONNECT_LIST_NETWORKS_ACTIVE + VIR_CONNECT_LIST_NETWORKS_PERSISTENT = C.VIR_CONNECT_LIST_NETWORKS_PERSISTENT + VIR_CONNECT_LIST_NETWORKS_TRANSIENT = C.VIR_CONNECT_LIST_NETWORKS_TRANSIENT + VIR_CONNECT_LIST_NETWORKS_AUTOSTART = C.VIR_CONNECT_LIST_NETWORKS_AUTOSTART + VIR_CONNECT_LIST_NETWORKS_NO_AUTOSTART = C.VIR_CONNECT_LIST_NETWORKS_NO_AUTOSTART +) + +// virConnectListAllStoragePoolsFlags +const ( + VIR_CONNECT_LIST_STORAGE_POOLS_INACTIVE = C.VIR_CONNECT_LIST_STORAGE_POOLS_INACTIVE + VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVE = C.VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVE + VIR_CONNECT_LIST_STORAGE_POOLS_PERSISTENT = C.VIR_CONNECT_LIST_STORAGE_POOLS_PERSISTENT + VIR_CONNECT_LIST_STORAGE_POOLS_TRANSIENT = C.VIR_CONNECT_LIST_STORAGE_POOLS_TRANSIENT + VIR_CONNECT_LIST_STORAGE_POOLS_AUTOSTART = C.VIR_CONNECT_LIST_STORAGE_POOLS_AUTOSTART + VIR_CONNECT_LIST_STORAGE_POOLS_NO_AUTOSTART = C.VIR_CONNECT_LIST_STORAGE_POOLS_NO_AUTOSTART + VIR_CONNECT_LIST_STORAGE_POOLS_DIR = C.VIR_CONNECT_LIST_STORAGE_POOLS_DIR + VIR_CONNECT_LIST_STORAGE_POOLS_FS = C.VIR_CONNECT_LIST_STORAGE_POOLS_FS + VIR_CONNECT_LIST_STORAGE_POOLS_NETFS = C.VIR_CONNECT_LIST_STORAGE_POOLS_NETFS + VIR_CONNECT_LIST_STORAGE_POOLS_LOGICAL = C.VIR_CONNECT_LIST_STORAGE_POOLS_LOGICAL + VIR_CONNECT_LIST_STORAGE_POOLS_DISK = C.VIR_CONNECT_LIST_STORAGE_POOLS_DISK + VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI = C.VIR_CONNECT_LIST_STORAGE_POOLS_ISCSI + VIR_CONNECT_LIST_STORAGE_POOLS_SCSI = C.VIR_CONNECT_LIST_STORAGE_POOLS_SCSI + VIR_CONNECT_LIST_STORAGE_POOLS_MPATH = C.VIR_CONNECT_LIST_STORAGE_POOLS_MPATH + VIR_CONNECT_LIST_STORAGE_POOLS_RBD = C.VIR_CONNECT_LIST_STORAGE_POOLS_RBD + VIR_CONNECT_LIST_STORAGE_POOLS_SHEEPDOG = C.VIR_CONNECT_LIST_STORAGE_POOLS_SHEEPDOG + VIR_CONNECT_LIST_STORAGE_POOLS_GLUSTER = C.VIR_CONNECT_LIST_STORAGE_POOLS_GLUSTER +) + +// virStreamFlags +const ( + VIR_STREAM_NONBLOCK = C.VIR_STREAM_NONBLOCK +) + +// virKeycodeSet +const ( + VIR_KEYCODE_SET_LINUX = C.VIR_KEYCODE_SET_LINUX + VIR_KEYCODE_SET_XT = C.VIR_KEYCODE_SET_XT + VIR_KEYCODE_SET_ATSET1 = C.VIR_KEYCODE_SET_ATSET1 + VIR_KEYCODE_SET_ATSET2 = C.VIR_KEYCODE_SET_ATSET2 + VIR_KEYCODE_SET_ATSET3 = C.VIR_KEYCODE_SET_ATSET3 + VIR_KEYCODE_SET_OSX = C.VIR_KEYCODE_SET_OSX + VIR_KEYCODE_SET_XT_KBD = C.VIR_KEYCODE_SET_XT_KBD + VIR_KEYCODE_SET_USB = C.VIR_KEYCODE_SET_USB + VIR_KEYCODE_SET_WIN32 = C.VIR_KEYCODE_SET_WIN32 + VIR_KEYCODE_SET_RFB = C.VIR_KEYCODE_SET_RFB +) + +// virDomainCreateFlags +const ( + VIR_DOMAIN_NONE = C.VIR_DOMAIN_NONE + VIR_DOMAIN_START_PAUSED = C.VIR_DOMAIN_START_PAUSED + VIR_DOMAIN_START_AUTODESTROY = C.VIR_DOMAIN_START_AUTODESTROY + VIR_DOMAIN_START_BYPASS_CACHE = C.VIR_DOMAIN_START_BYPASS_CACHE + VIR_DOMAIN_START_FORCE_BOOT = C.VIR_DOMAIN_START_FORCE_BOOT +) + +const VIR_DOMAIN_MEMORY_PARAM_UNLIMITED = C.VIR_DOMAIN_MEMORY_PARAM_UNLIMITED + +// virDomainEventID +const ( + // event parameter in the callback is of type DomainLifecycleEvent + VIR_DOMAIN_EVENT_ID_LIFECYCLE = C.VIR_DOMAIN_EVENT_ID_LIFECYCLE + + // event parameter in the callback is nil + VIR_DOMAIN_EVENT_ID_REBOOT = C.VIR_DOMAIN_EVENT_ID_REBOOT + + // event parameter in the callback is of type DomainRTCChangeEvent + VIR_DOMAIN_EVENT_ID_RTC_CHANGE = C.VIR_DOMAIN_EVENT_ID_RTC_CHANGE + + // event parameter in the callback is of type DomainWatchdogEvent + VIR_DOMAIN_EVENT_ID_WATCHDOG = C.VIR_DOMAIN_EVENT_ID_WATCHDOG + + // event parameter in the callback is of type DomainIOErrorEvent + VIR_DOMAIN_EVENT_ID_IO_ERROR = C.VIR_DOMAIN_EVENT_ID_IO_ERROR + + // event parameter in the callback is of type DomainGraphicsEvent + VIR_DOMAIN_EVENT_ID_GRAPHICS = C.VIR_DOMAIN_EVENT_ID_GRAPHICS + + // virConnectDomainEventIOErrorReasonCallback + VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON = C.VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON + + // event parameter in the callback is nil + VIR_DOMAIN_EVENT_ID_CONTROL_ERROR = C.VIR_DOMAIN_EVENT_ID_CONTROL_ERROR + + // event parameter in the callback is of type DomainBlockJobEvent + VIR_DOMAIN_EVENT_ID_BLOCK_JOB = C.VIR_DOMAIN_EVENT_ID_BLOCK_JOB + + // event parameter in the callback is of type DomainDiskChangeEvent + VIR_DOMAIN_EVENT_ID_DISK_CHANGE = C.VIR_DOMAIN_EVENT_ID_DISK_CHANGE + + // event parameter in the callback is of type DomainTrayChangeEvent + VIR_DOMAIN_EVENT_ID_TRAY_CHANGE = C.VIR_DOMAIN_EVENT_ID_TRAY_CHANGE + + // event parameter in the callback is of type DomainReasonEvent + VIR_DOMAIN_EVENT_ID_PMWAKEUP = C.VIR_DOMAIN_EVENT_ID_PMWAKEUP + + // event parameter in the callback is of type DomainReasonEvent + VIR_DOMAIN_EVENT_ID_PMSUSPEND = C.VIR_DOMAIN_EVENT_ID_PMSUSPEND + + // event parameter in the callback is of type DomainBalloonChangeEvent + VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE = C.VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE + + // event parameter in the callback is of type DomainReasonEvent + VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK = C.VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK + + // event parameter in the callback is of type DomainDeviceRemovedEvent + VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED = C.VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED + + // TODO Post 1.2.4, enable later + // event parameter in the callback is of type DomainBlockJobEvent + // VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2 = C.VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2 +) + +// virDomainEventType +const ( + VIR_DOMAIN_EVENT_DEFINED = C.VIR_DOMAIN_EVENT_DEFINED + VIR_DOMAIN_EVENT_UNDEFINED = C.VIR_DOMAIN_EVENT_UNDEFINED + VIR_DOMAIN_EVENT_STARTED = C.VIR_DOMAIN_EVENT_STARTED + VIR_DOMAIN_EVENT_SUSPENDED = C.VIR_DOMAIN_EVENT_SUSPENDED + VIR_DOMAIN_EVENT_RESUMED = C.VIR_DOMAIN_EVENT_RESUMED + VIR_DOMAIN_EVENT_STOPPED = C.VIR_DOMAIN_EVENT_STOPPED + VIR_DOMAIN_EVENT_SHUTDOWN = C.VIR_DOMAIN_EVENT_SHUTDOWN + VIR_DOMAIN_EVENT_PMSUSPENDED = C.VIR_DOMAIN_EVENT_PMSUSPENDED + VIR_DOMAIN_EVENT_CRASHED = C.VIR_DOMAIN_EVENT_CRASHED +) + +// virDomainEventWatchdogAction: +// The action that is to be taken due to the watchdog device firing +const ( + // No action, watchdog ignored + VIR_DOMAIN_EVENT_WATCHDOG_NONE = C.VIR_DOMAIN_EVENT_WATCHDOG_NONE + + // Guest CPUs are paused + VIR_DOMAIN_EVENT_WATCHDOG_PAUSE = C.VIR_DOMAIN_EVENT_WATCHDOG_PAUSE + + // Guest CPUs are reset + VIR_DOMAIN_EVENT_WATCHDOG_RESET = C.VIR_DOMAIN_EVENT_WATCHDOG_RESET + + // Guest is forcibly powered off + VIR_DOMAIN_EVENT_WATCHDOG_POWEROFF = C.VIR_DOMAIN_EVENT_WATCHDOG_POWEROFF + + // Guest is requested to gracefully shutdown + VIR_DOMAIN_EVENT_WATCHDOG_SHUTDOWN = C.VIR_DOMAIN_EVENT_WATCHDOG_SHUTDOWN + + // No action, a debug message logged + VIR_DOMAIN_EVENT_WATCHDOG_DEBUG = C.VIR_DOMAIN_EVENT_WATCHDOG_DEBUG +) + +// virDomainEventIOErrorAction +// The action that is to be taken due to an IO error occurring +const ( + // No action, IO error ignored + VIR_DOMAIN_EVENT_IO_ERROR_NONE = C.VIR_DOMAIN_EVENT_IO_ERROR_NONE + + // Guest CPUs are paused + VIR_DOMAIN_EVENT_IO_ERROR_PAUSE = C.VIR_DOMAIN_EVENT_IO_ERROR_PAUSE + + // IO error reported to guest OS + VIR_DOMAIN_EVENT_IO_ERROR_REPORT = C.VIR_DOMAIN_EVENT_IO_ERROR_REPORT +) + +// virDomainEventGraphicsPhase +// The phase of the graphics client connection +const ( + // Initial socket connection established + VIR_DOMAIN_EVENT_GRAPHICS_CONNECT = C.VIR_DOMAIN_EVENT_GRAPHICS_CONNECT + + // Authentication & setup completed + VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZE = C.VIR_DOMAIN_EVENT_GRAPHICS_INITIALIZE + + // Final socket disconnection + VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECT = C.VIR_DOMAIN_EVENT_GRAPHICS_DISCONNECT +) + +// virDomainEventGraphicsAddressType +const ( + // IPv4 address + VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4 = C.VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4 + + // IPv6 address + VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6 = C.VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6 + + // UNIX socket path + VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_UNIX = C.VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_UNIX +) + +// virDomainBlockJobType +const ( + // Placeholder + VIR_DOMAIN_BLOCK_JOB_TYPE_UNKNOWN = C.VIR_DOMAIN_BLOCK_JOB_TYPE_UNKNOWN + + // Block Pull (virDomainBlockPull, or virDomainBlockRebase without + // flags), job ends on completion + VIR_DOMAIN_BLOCK_JOB_TYPE_PULL = C.VIR_DOMAIN_BLOCK_JOB_TYPE_PULL + + // Block Copy (virDomainBlockCopy, or virDomainBlockRebase with + // flags), job exists as long as mirroring is active + VIR_DOMAIN_BLOCK_JOB_TYPE_COPY = C.VIR_DOMAIN_BLOCK_JOB_TYPE_COPY + + // Block Commit (virDomainBlockCommit without flags), job ends on + // completion + VIR_DOMAIN_BLOCK_JOB_TYPE_COMMIT = C.VIR_DOMAIN_BLOCK_JOB_TYPE_COMMIT + + // TODO Post 1.2.4, enable later + // Active Block Commit (virDomainBlockCommit with flags), job + // exists as long as sync is active + // VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT = C.VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT +) + +// virConnectDomainEventBlockJobStatus +const ( + VIR_DOMAIN_BLOCK_JOB_COMPLETED = C.VIR_DOMAIN_BLOCK_JOB_COMPLETED + VIR_DOMAIN_BLOCK_JOB_FAILED = C.VIR_DOMAIN_BLOCK_JOB_FAILED + VIR_DOMAIN_BLOCK_JOB_CANCELED = C.VIR_DOMAIN_BLOCK_JOB_CANCELED + VIR_DOMAIN_BLOCK_JOB_READY = C.VIR_DOMAIN_BLOCK_JOB_READY +) + +// virConnectDomainEventDiskChangeReason +const ( + // OldSrcPath is set + VIR_DOMAIN_EVENT_DISK_CHANGE_MISSING_ON_START = C.VIR_DOMAIN_EVENT_DISK_CHANGE_MISSING_ON_START + VIR_DOMAIN_EVENT_DISK_DROP_MISSING_ON_START = C.VIR_DOMAIN_EVENT_DISK_DROP_MISSING_ON_START +) + +// virConnectDomainEventTrayChangeReason +const ( + VIR_DOMAIN_EVENT_TRAY_CHANGE_OPEN = C.VIR_DOMAIN_EVENT_TRAY_CHANGE_OPEN + VIR_DOMAIN_EVENT_TRAY_CHANGE_CLOSE = C.VIR_DOMAIN_EVENT_TRAY_CHANGE_CLOSE +) diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/domain.go b/vendor/gopkg.in/alexzorin/libvirt-go.v2/domain.go new file mode 100644 index 0000000..e13abe1 --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/domain.go @@ -0,0 +1,574 @@ +package libvirt + +/* +#cgo LDFLAGS: -lvirt -ldl +#include +#include +#include +*/ +import "C" + +import ( + "reflect" + "strings" + "unsafe" +) + +type VirDomain struct { + ptr C.virDomainPtr +} + +type VirDomainBlockInfo struct { + ptr C.virDomainBlockInfo +} + +type VirDomainInfo struct { + ptr C.virDomainInfo +} + +type VirTypedParameter struct { + Name string + Value interface{} +} + +type VirTypedParameters []VirTypedParameter + +func (dest *VirTypedParameters) loadFromCPtr(params C.virTypedParameterPtr, nParams int) { + // reset slice + *dest = VirTypedParameters{} + + // transform that C array to a go slice + hdr := reflect.SliceHeader{ + Data: uintptr(unsafe.Pointer(params)), + Len: int(nParams), + Cap: int(nParams), + } + rawParams := *(*[]C.struct__virTypedParameter)(unsafe.Pointer(&hdr)) + + // there is probably a more elegant way to deal with that union + for _, rawParam := range rawParams { + name := C.GoStringN(&rawParam.field[0], C.VIR_TYPED_PARAM_FIELD_LENGTH) + if nbIdx := strings.Index(name, "\x00"); nbIdx != -1 { + name = name[:nbIdx] + } + switch rawParam._type { + case C.VIR_TYPED_PARAM_INT: + *dest = append(*dest, VirTypedParameter{name, int(*(*C.int)(unsafe.Pointer(&rawParam.value[0])))}) + case C.VIR_TYPED_PARAM_UINT: + *dest = append(*dest, VirTypedParameter{name, uint32(*(*C.uint)(unsafe.Pointer(&rawParam.value[0])))}) + case C.VIR_TYPED_PARAM_LLONG: + *dest = append(*dest, VirTypedParameter{name, int64(*(*C.longlong)(unsafe.Pointer(&rawParam.value[0])))}) + case C.VIR_TYPED_PARAM_ULLONG: + *dest = append(*dest, VirTypedParameter{name, uint64(*(*C.ulonglong)(unsafe.Pointer(&rawParam.value[0])))}) + case C.VIR_TYPED_PARAM_DOUBLE: + *dest = append(*dest, VirTypedParameter{name, float64(*(*C.double)(unsafe.Pointer(&rawParam.value[0])))}) + case C.VIR_TYPED_PARAM_BOOLEAN: + if int(*(*C.char)(unsafe.Pointer(&rawParam.value[0]))) == 1 { + *dest = append(*dest, VirTypedParameter{name, true}) + } else { + *dest = append(*dest, VirTypedParameter{name, false}) + } + case C.VIR_TYPED_PARAM_STRING: + *dest = append(*dest, VirTypedParameter{name, C.GoString((*C.char)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(&rawParam.value[0])))))}) + } + } +} + +func (d *VirDomain) Free() error { + if result := C.virDomainFree(d.ptr); result != 0 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) Create() error { + result := C.virDomainCreate(d.ptr) + if result == -1 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) Destroy() error { + result := C.virDomainDestroy(d.ptr) + if result == -1 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) Shutdown() error { + result := C.virDomainShutdown(d.ptr) + if result == -1 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) Reboot(flags uint) error { + result := C.virDomainReboot(d.ptr, C.uint(flags)) + if result == -1 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) IsActive() (bool, error) { + result := C.virDomainIsActive(d.ptr) + if result == -1 { + return false, GetLastError() + } + if result == 1 { + return true, nil + } + return false, nil +} + +func (d *VirDomain) SetAutostart(autostart bool) error { + var cAutostart C.int + switch autostart { + case true: + cAutostart = 1 + default: + cAutostart = 0 + } + result := C.virDomainSetAutostart(d.ptr, cAutostart) + if result == -1 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) GetAutostart() (bool, error) { + var out C.int + result := C.virDomainGetAutostart(d.ptr, (*C.int)(unsafe.Pointer(&out))) + if result == -1 { + return false, GetLastError() + } + switch out { + case 1: + return true, nil + default: + return false, nil + } +} + +func (d *VirDomain) GetBlockInfo(disk string, flag uint) (VirDomainBlockInfo, error) { + bi := VirDomainBlockInfo{} + var ptr C.virDomainBlockInfo + cDisk := C.CString(disk) + defer C.free(unsafe.Pointer(cDisk)) + result := C.virDomainGetBlockInfo(d.ptr, cDisk, (*C.virDomainBlockInfo)(unsafe.Pointer(&ptr)), C.uint(flag)) + if result == -1 { + return bi, GetLastError() + } + bi.ptr = ptr + return bi, nil +} + +func (b *VirDomainBlockInfo) Allocation() uint64 { + return uint64(b.ptr.allocation) +} + +func (b *VirDomainBlockInfo) Capacity() uint64 { + return uint64(b.ptr.capacity) +} + +func (b *VirDomainBlockInfo) Physical() uint64 { + return uint64(b.ptr.physical) +} + +func (d *VirDomain) GetName() (string, error) { + name := C.virDomainGetName(d.ptr) + if name == nil { + return "", GetLastError() + } + return C.GoString(name), nil +} + +func (d *VirDomain) GetState() ([]int, error) { + var cState C.int + var cReason C.int + result := C.virDomainGetState(d.ptr, + (*C.int)(unsafe.Pointer(&cState)), + (*C.int)(unsafe.Pointer(&cReason)), + 0) + if int(result) == -1 { + return []int{}, GetLastError() + } + return []int{int(cState), int(cReason)}, nil +} + +func (d *VirDomain) GetID() (uint, error) { + id := uint(C.virDomainGetID(d.ptr)) + if id == ^uint(0) { + return id, GetLastError() + } + return id, nil +} + +func (d *VirDomain) GetUUID() ([]byte, error) { + var cUuid [C.VIR_UUID_BUFLEN](byte) + cuidPtr := unsafe.Pointer(&cUuid) + result := C.virDomainGetUUID(d.ptr, (*C.uchar)(cuidPtr)) + if result != 0 { + return []byte{}, GetLastError() + } + return C.GoBytes(cuidPtr, C.VIR_UUID_BUFLEN), nil +} + +func (d *VirDomain) GetUUIDString() (string, error) { + var cUuid [C.VIR_UUID_STRING_BUFLEN](C.char) + cuidPtr := unsafe.Pointer(&cUuid) + result := C.virDomainGetUUIDString(d.ptr, (*C.char)(cuidPtr)) + if result != 0 { + return "", GetLastError() + } + return C.GoString((*C.char)(cuidPtr)), nil +} + +func (d *VirDomain) GetInfo() (VirDomainInfo, error) { + di := VirDomainInfo{} + var ptr C.virDomainInfo + result := C.virDomainGetInfo(d.ptr, (*C.virDomainInfo)(unsafe.Pointer(&ptr))) + if result == -1 { + return di, GetLastError() + } + di.ptr = ptr + return di, nil +} + +func (d *VirDomain) GetXMLDesc(flags uint32) (string, error) { + result := C.virDomainGetXMLDesc(d.ptr, C.uint(flags)) + if result == nil { + return "", GetLastError() + } + xml := C.GoString(result) + C.free(unsafe.Pointer(result)) + return xml, nil +} + +func (i *VirDomainInfo) GetState() uint8 { + return uint8(i.ptr.state) +} + +func (i *VirDomainInfo) GetMaxMem() uint64 { + return uint64(i.ptr.maxMem) +} + +func (i *VirDomainInfo) GetMemory() uint64 { + return uint64(i.ptr.memory) +} + +func (i *VirDomainInfo) GetNrVirtCpu() uint16 { + return uint16(i.ptr.nrVirtCpu) +} + +func (i *VirDomainInfo) GetCpuTime() uint64 { + return uint64(i.ptr.cpuTime) +} + +func (d *VirDomain) GetCPUStats(params *VirTypedParameters, nParams int, startCpu int, nCpus uint32, flags uint32) (int, error) { + var cParams C.virTypedParameterPtr + var cParamsLen int + + cParamsLen = int(nCpus) * nParams + + if params != nil && cParamsLen > 0 { + cParams = (C.virTypedParameterPtr)(C.calloc(C.size_t(cParamsLen), C.size_t(unsafe.Sizeof(C.struct__virTypedParameter{})))) + defer C.virTypedParamsFree(cParams, C.int(cParamsLen)) + } else { + cParamsLen = 0 + cParams = nil + } + + result := int(C.virDomainGetCPUStats(d.ptr, (C.virTypedParameterPtr)(cParams), C.uint(nParams), C.int(startCpu), C.uint(nCpus), C.uint(flags))) + if result == -1 { + return result, GetLastError() + } + + if cParamsLen > 0 { + params.loadFromCPtr(cParams, cParamsLen) + } + + return result, nil +} + +// Warning: No test written for this function +func (d *VirDomain) GetInterfaceParameters(device string, params *VirTypedParameters, nParams *int, flags uint32) (int, error) { + var cParams C.virTypedParameterPtr + + if params != nil && *nParams > 0 { + cParams = (C.virTypedParameterPtr)(C.calloc(C.size_t(*nParams), C.size_t(unsafe.Sizeof(C.struct__virTypedParameter{})))) + defer C.virTypedParamsFree(cParams, C.int(*nParams)) + } else { + cParams = nil + } + + result := int(C.virDomainGetInterfaceParameters(d.ptr, C.CString(device), (C.virTypedParameterPtr)(cParams), (*C.int)(unsafe.Pointer(nParams)), C.uint(flags))) + if result == -1 { + return result, GetLastError() + } + + if params != nil && *nParams > 0 { + params.loadFromCPtr(cParams, *nParams) + } + + return result, nil +} + +func (d *VirDomain) GetMetadata(tipus int, uri string, flags uint32) (string, error) { + var cUri *C.char + if uri != "" { + cUri = C.CString(uri) + defer C.free(unsafe.Pointer(cUri)) + } + + result := C.virDomainGetMetadata(d.ptr, C.int(tipus), cUri, C.uint(flags)) + if result == nil { + return "", GetLastError() + + } + defer C.free(unsafe.Pointer(result)) + return C.GoString(result), nil +} + +func (d *VirDomain) SetMetadata(metaDataType int, metaDataCont, uriKey, uri string, flags uint32) error { + var cMetaDataCont *C.char + var cUriKey *C.char + var cUri *C.char + + cMetaDataCont = C.CString(metaDataCont) + defer C.free(unsafe.Pointer(cMetaDataCont)) + + if metaDataType == VIR_DOMAIN_METADATA_ELEMENT { + cUriKey = C.CString(uriKey) + defer C.free(unsafe.Pointer(cUriKey)) + cUri = C.CString(uri) + defer C.free(unsafe.Pointer(cUri)) + } + result := C.virDomainSetMetadata(d.ptr, C.int(metaDataType), cMetaDataCont, cUriKey, cUri, C.uint(flags)) + if result == -1 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) Undefine() error { + result := C.virDomainUndefine(d.ptr) + if result == -1 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) SetMaxMemory(memory uint) error { + result := C.virDomainSetMaxMemory(d.ptr, C.ulong(memory)) + if result == -1 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) SetMemory(memory uint64) error { + result := C.virDomainSetMemory(d.ptr, C.ulong(memory)) + if result == -1 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) SetMemoryFlags(memory uint64, flags uint32) error { + result := C.virDomainSetMemoryFlags(d.ptr, C.ulong(memory), C.uint(flags)) + if result == -1 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) SetMemoryStatsPeriod(period int, flags uint) error { + result := C.virDomainSetMemoryStatsPeriod(d.ptr, C.int(period), C.uint(flags)) + if result == -1 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) SetVcpus(vcpu uint) error { + result := C.virDomainSetVcpus(d.ptr, C.uint(vcpu)) + if result == -1 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) SetVcpusFlags(vcpu uint, flags uint) error { + result := C.virDomainSetVcpusFlags(d.ptr, C.uint(vcpu), C.uint(flags)) + if result == -1 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) Suspend() error { + result := C.virDomainSuspend(d.ptr) + if result == -1 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) Resume() error { + result := C.virDomainResume(d.ptr) + if result == -1 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) AbortJob() error { + result := C.virDomainAbortJob(d.ptr) + if result == -1 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) DestroyFlags(flags uint) error { + result := C.virDomainDestroyFlags(d.ptr, C.uint(flags)) + if result == -1 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) ShutdownFlags(flags uint) error { + result := C.virDomainShutdownFlags(d.ptr, C.uint(flags)) + if result == -1 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) AttachDevice(xml string) error { + cXml := C.CString(xml) + defer C.free(unsafe.Pointer(cXml)) + result := C.virDomainAttachDevice(d.ptr, cXml) + if result == -1 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) AttachDeviceFlags(xml string, flags uint) error { + cXml := C.CString(xml) + defer C.free(unsafe.Pointer(cXml)) + result := C.virDomainAttachDeviceFlags(d.ptr, cXml, C.uint(flags)) + if result == -1 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) DetachDevice(xml string) error { + cXml := C.CString(xml) + defer C.free(unsafe.Pointer(cXml)) + result := C.virDomainDetachDevice(d.ptr, cXml) + if result == -1 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) DetachDeviceFlags(xml string, flags uint) error { + cXml := C.CString(xml) + defer C.free(unsafe.Pointer(cXml)) + result := C.virDomainDetachDeviceFlags(d.ptr, cXml, C.uint(flags)) + if result == -1 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) Screenshot(stream *VirStream, screen, flags uint) (string, error) { + cType := C.virDomainScreenshot(d.ptr, stream.ptr, C.uint(screen), C.uint(flags)) + if cType == nil { + return "", GetLastError() + } + defer C.free(unsafe.Pointer(cType)) + + mimeType := C.GoString(cType) + return mimeType, nil +} + +func (d *VirDomain) SendKey(codeset, holdtime uint, keycodes []uint, flags uint) error { + result := C.virDomainSendKey(d.ptr, C.uint(codeset), C.uint(holdtime), (*C.uint)(unsafe.Pointer(&keycodes[0])), C.int(len(keycodes)), C.uint(flags)) + if result == -1 { + return GetLastError() + } + + return nil +} + +func (d *VirDomain) BlockStatsFlags(disk string, params *VirTypedParameters, nParams int, flags uint32) (int, error) { + var cParams C.virTypedParameterPtr + cDisk := C.CString(disk) + defer C.free(unsafe.Pointer(cDisk)) + + cParamsLen := C.int(nParams) + + if params != nil && nParams > 0 { + cParams = (C.virTypedParameterPtr)(C.calloc(C.size_t(nParams), C.size_t(unsafe.Sizeof(C.struct__virTypedParameter{})))) + defer C.virTypedParamsFree(cParams, cParamsLen) + } else { + cParams = nil + } + + result := int(C.virDomainBlockStatsFlags(d.ptr, cDisk, (C.virTypedParameterPtr)(cParams), &cParamsLen, C.uint(flags))) + if result == -1 { + return result, GetLastError() + } + + if cParamsLen > 0 && params != nil { + params.loadFromCPtr(cParams, nParams) + } + + return int(cParamsLen), nil +} + +type VirDomainInterfaceStats struct { + RxBytes int64 + RxPackets int64 + RxErrs int64 + RxDrop int64 + TxBytes int64 + TxPackets int64 + TxErrs int64 + TxDrop int64 +} + +func (d *VirDomain) InterfaceStats(path string) (VirDomainInterfaceStats, error) { + cPath := C.CString(path) + defer C.free(unsafe.Pointer(cPath)) + + size := C.size_t(unsafe.Sizeof(C.struct__virDomainInterfaceStats{})) + + cStats := (C.virDomainInterfaceStatsPtr)(C.malloc(size)) + defer C.free(unsafe.Pointer(cStats)) + + result := C.virDomainInterfaceStats(d.ptr, cPath, (C.virDomainInterfaceStatsPtr)(cStats), size) + + if result != 0 { + return VirDomainInterfaceStats{}, GetLastError() + } + return VirDomainInterfaceStats{ + RxBytes: int64(cStats.rx_bytes), + RxPackets: int64(cStats.rx_packets), + RxErrs: int64(cStats.rx_errs), + RxDrop: int64(cStats.rx_drop), + TxBytes: int64(cStats.tx_bytes), + TxPackets: int64(cStats.tx_packets), + TxErrs: int64(cStats.tx_errs), + TxDrop: int64(cStats.tx_drop), + }, nil +} diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/domain_test.go b/vendor/gopkg.in/alexzorin/libvirt-go.v2/domain_test.go new file mode 100644 index 0000000..368abee --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/domain_test.go @@ -0,0 +1,483 @@ +package libvirt + +import ( + "strings" + "testing" + "time" +) + +func buildTestDomain() (VirDomain, VirConnection) { + conn := buildTestConnection() + dom, err := conn.DomainDefineXML(` + ` + time.Now().String() + ` + 8192 + + hvm + + `) + if err != nil { + panic(err) + } + return dom, conn +} + +func TestUndefineDomain(t *testing.T) { + dom, conn := buildTestDomain() + defer func() { + dom.Free() + conn.CloseConnection() + }() + name, err := dom.GetName() + if err != nil { + t.Error(err) + return + } + if err := dom.Undefine(); err != nil { + t.Error(err) + return + } + if _, err := conn.LookupDomainByName(name); err == nil { + t.Fatal("Shouldn't have been able to find domain") + return + } +} + +func TestGetDomainName(t *testing.T) { + dom, conn := buildTestDomain() + defer func() { + dom.Undefine() + dom.Free() + conn.CloseConnection() + }() + if _, err := dom.GetName(); err != nil { + t.Error(err) + return + } +} + +func TestGetDomainState(t *testing.T) { + dom, conn := buildTestDomain() + defer func() { + dom.Free() + conn.CloseConnection() + }() + state, err := dom.GetState() + if err != nil { + t.Error(err) + return + } + if len(state) != 2 { + t.Error("Length of domain state should be 2") + return + } + if state[0] != 5 || state[1] != 0 { + t.Error("Domain state in test transport should be [5 0]") + return + } +} + +func TestGetDomainID(t *testing.T) { + dom, conn := buildTestDomain() + defer func() { + dom.Free() + conn.CloseConnection() + }() + + if err := dom.Create(); err != nil { + t.Error("Failed to create domain") + } + + if id, err := dom.GetID(); id == ^uint(0) || err != nil { + dom.Destroy() + t.Error("Couldn't get domain ID") + return + } + dom.Destroy() +} + +func TestGetDomainUUID(t *testing.T) { + dom, conn := buildTestDomain() + defer func() { + dom.Free() + conn.CloseConnection() + }() + _, err := dom.GetUUID() + // how to test uuid validity? + if err != nil { + t.Error(err) + return + } +} + +func TestGetDomainUUIDString(t *testing.T) { + dom, conn := buildTestDomain() + defer func() { + dom.Free() + conn.CloseConnection() + }() + _, err := dom.GetUUIDString() + if err != nil { + t.Error(err) + return + } +} + +func TestGetDomainInfo(t *testing.T) { + dom, conn := buildTestDomain() + defer func() { + dom.Free() + conn.CloseConnection() + }() + _, err := dom.GetInfo() + if err != nil { + t.Error(err) + return + } +} + +func TestGetDomainXMLDesc(t *testing.T) { + dom, conn := buildTestDomain() + defer func() { + dom.Free() + conn.CloseConnection() + }() + _, err := dom.GetXMLDesc(0) + if err != nil { + t.Error(err) + return + } +} + +func TestCreateDomainSnapshotXML(t *testing.T) { + dom, conn := buildTestDomain() + defer func() { + dom.Free() + conn.CloseConnection() + }() + ss, err := dom.CreateSnapshotXML(` + + Test snapshot that will fail because its unsupported + + `, 0) + if err != nil { + t.Error(err) + return + } + defer ss.Free() +} + +func TestSaveDomain(t *testing.T) { + dom, conn := buildTestDomain() + defer func() { + dom.Free() + conn.CloseConnection() + }() + // get the name so we can get a handle on it later + domName, err := dom.GetName() + if err != nil { + t.Error(err) + return + } + const tmpFile = "/tmp/libvirt-go-test.tmp" + if err := dom.Save(tmpFile); err != nil { + t.Error(err) + return + } + if err := conn.Restore(tmpFile); err != nil { + t.Error(err) + return + } + if _, err = conn.LookupDomainByName(domName); err != nil { + t.Error(err) + return + } +} + +func TestSaveDomainFlags(t *testing.T) { + dom, conn := buildTestDomain() + defer func() { + dom.Free() + conn.CloseConnection() + }() + const srcFile = "/tmp/libvirt-go-test.tmp" + if err := dom.SaveFlags(srcFile, "", 0); err == nil { + t.Fatal("expected xml modification unsupported") + return + } +} + +func TestCreateDestroyDomain(t *testing.T) { + dom, conn := buildTestDomain() + defer func() { + dom.Free() + conn.CloseConnection() + }() + if err := dom.Create(); err != nil { + t.Error(err) + return + } + state, err := dom.GetState() + if err != nil { + t.Error(err) + return + } + if state[0] != VIR_DOMAIN_RUNNING { + t.Fatal("Domain should be running") + return + } + if err = dom.Destroy(); err != nil { + t.Error(err) + return + } + state, err = dom.GetState() + if err != nil { + t.Error(err) + return + } + if state[0] != VIR_DOMAIN_SHUTOFF { + t.Fatal("Domain should be destroyed") + return + } +} + +func TestShutdownDomain(t *testing.T) { + dom, conn := buildTestDomain() + defer conn.CloseConnection() + if err := dom.Create(); err != nil { + t.Error(err) + return + } + if err := dom.Shutdown(); err != nil { + t.Error(err) + return + } + state, err := dom.GetState() + if err != nil { + t.Error(err) + return + } + if state[0] != 5 || state[1] != 1 { + t.Fatal("state should be [5 1]") + return + } +} + +func TestShutdownReboot(t *testing.T) { + dom, conn := buildTestDomain() + defer func() { + dom.Free() + conn.CloseConnection() + }() + if err := dom.Reboot(0); err != nil { + t.Error(err) + return + } +} + +func TestDomainAutostart(t *testing.T) { + dom, conn := buildTestDomain() + defer func() { + dom.Free() + conn.CloseConnection() + }() + as, err := dom.GetAutostart() + if err != nil { + t.Error(err) + return + } + if as { + t.Fatal("autostart should be false") + return + } + if err := dom.SetAutostart(true); err != nil { + t.Error(err) + return + } + as, err = dom.GetAutostart() + if err != nil { + t.Error(err) + return + } + if !as { + t.Fatal("autostart should be true") + return + } +} + +func TestDomainIsActive(t *testing.T) { + dom, conn := buildTestDomain() + defer func() { + dom.Free() + conn.CloseConnection() + }() + if err := dom.Create(); err != nil { + t.Log(err) + return + } + active, err := dom.IsActive() + if err != nil { + t.Error(err) + return + } + if !active { + t.Fatal("Domain should be active") + return + } + if err := dom.Destroy(); err != nil { + t.Error(err) + return + } + active, err = dom.IsActive() + if err != nil { + t.Error(err) + return + } + if active { + t.Fatal("Domain should be inactive") + return + } +} + +func TestDomainSetMaxMemory(t *testing.T) { + const mem = 8192 * 100 + dom, conn := buildTestDomain() + defer func() { + dom.Free() + conn.CloseConnection() + }() + if err := dom.SetMaxMemory(mem); err != nil { + t.Error(err) + return + } +} + +func TestDomainSetMemory(t *testing.T) { + dom, conn := buildTestDomain() + defer func() { + dom.Free() + conn.CloseConnection() + }() + if err := dom.Create(); err != nil { + t.Error(err) + return + } + if err := dom.SetMemory(1024); err != nil { + t.Error(err) + return + } +} + +func TestDomainSetVcpus(t *testing.T) { + dom, conn := buildTestDomain() + defer func() { + dom.Free() + conn.CloseConnection() + }() + if err := dom.Create(); err != nil { + t.Error(err) + return + } + if err := dom.SetVcpus(1); err != nil { + t.Error(err) + return + } + if err := dom.SetVcpusFlags(1, VIR_DOMAIN_VCPU_LIVE); err != nil { + t.Error(err) + return + } +} + +func TestDomainFree(t *testing.T) { + dom, conn := buildTestDomain() + defer conn.CloseConnection() + if err := dom.Free(); err != nil { + t.Error(err) + return + } +} + +func TestDomainSuspend(t *testing.T) { + dom, conn := buildTestDomain() + defer func() { + dom.Free() + conn.CloseConnection() + }() + if err := dom.Create(); err != nil { + t.Error(err) + return + } + defer dom.Destroy() + if err := dom.Suspend(); err != nil { + t.Error(err) + return + } + defer dom.Resume() +} + +func TesDomainShutdownFlags(t *testing.T) { + dom, conn := buildTestDomain() + defer conn.CloseConnection() + if err := dom.Create(); err != nil { + t.Error(err) + return + } + if err := dom.ShutdownFlags(VIR_DOMAIN_SHUTDOWN_SIGNAL); err != nil { + t.Error(err) + return + } + state, err := dom.GetState() + if err != nil { + t.Error(err) + return + } + if state[0] != 5 || state[1] != 1 { + t.Fatal("state should be [5 1]") + return + } +} + +func TesDomainDestoryFlags(t *testing.T) { + dom, conn := buildTestDomain() + defer conn.CloseConnection() + if err := dom.Create(); err != nil { + t.Error(err) + return + } + if err := dom.DestroyFlags(VIR_DOMAIN_DESTROY_GRACEFUL); err != nil { + t.Error(err) + return + } + state, err := dom.GetState() + if err != nil { + t.Error(err) + return + } + if state[0] != 5 || state[1] != 1 { + t.Fatal("state should be [5 1]") + return + } +} + +func TestDomainScreenshot(t *testing.T) { + dom, conn := buildTestDomain() + defer func() { + dom.Free() + conn.CloseConnection() + }() + if err := dom.Create(); err != nil { + t.Error(err) + return + } + stream, err := NewVirStream(&conn, 0) + if err != nil { + t.Fatalf("failed to create new stream: %s", err) + } + defer stream.Free() + mime, err := dom.Screenshot(stream, 0, 0) + if err != nil { + t.Fatalf("failed to take screenshot: %s", err) + } + if strings.Index(mime, "image/") != 0 { + t.Fatalf("Wanted image/*, got %s", mime) + } +} diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/error.go b/vendor/gopkg.in/alexzorin/libvirt-go.v2/error.go new file mode 100644 index 0000000..810cd25 --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/error.go @@ -0,0 +1,504 @@ +package libvirt + +/* +#cgo LDFLAGS: -lvirt -ldl +#include +#include +#include + +#ifndef VIR_FROM_BHYVE +#define VIR_FROM_BHYVE 57 +#endif + +#ifndef VIR_FROM_CRYPTO +#define VIR_FROM_CRYPTO 58 +#endif + +#ifndef VIR_FROM_FIREWALL +#define VIR_FROM_FIREWALL 59 +#endif + +*/ +import "C" + +import "fmt" + +// virErrorLevel +const ( + VIR_ERR_NONE = C.VIR_ERR_NONE + VIR_ERR_WARNING = C.VIR_ERR_WARNING + VIR_ERR_ERROR = C.VIR_ERR_ERROR +) + +// virErrorNumber +const ( + VIR_ERR_OK = C.VIR_ERR_OK + + // internal error + VIR_ERR_INTERNAL_ERROR = C.VIR_ERR_INTERNAL_ERROR + + // memory allocation failure + VIR_ERR_NO_MEMORY = C.VIR_ERR_NO_MEMORY + + // no support for this function + VIR_ERR_NO_SUPPORT = C.VIR_ERR_NO_SUPPORT + + // could not resolve hostname + VIR_ERR_UNKNOWN_HOST = C.VIR_ERR_UNKNOWN_HOST + + // can't connect to hypervisor + VIR_ERR_NO_CONNECT = C.VIR_ERR_NO_CONNECT + + // invalid connection object + VIR_ERR_INVALID_CONN = C.VIR_ERR_INVALID_CONN + + // invalid domain object + VIR_ERR_INVALID_DOMAIN = C.VIR_ERR_INVALID_DOMAIN + + // invalid function argument + VIR_ERR_INVALID_ARG = C.VIR_ERR_INVALID_ARG + + // a command to hypervisor failed + VIR_ERR_OPERATION_FAILED = C.VIR_ERR_OPERATION_FAILED + + // a HTTP GET command to failed + VIR_ERR_GET_FAILED = C.VIR_ERR_GET_FAILED + + // a HTTP POST command to failed + VIR_ERR_POST_FAILED = C.VIR_ERR_POST_FAILED + + // unexpected HTTP error code + VIR_ERR_HTTP_ERROR = C.VIR_ERR_HTTP_ERROR + + // failure to serialize an S-Expr + VIR_ERR_SEXPR_SERIAL = C.VIR_ERR_SEXPR_SERIAL + + // could not open Xen hypervisor control + VIR_ERR_NO_XEN = C.VIR_ERR_NO_XEN + + // failure doing an hypervisor call + VIR_ERR_XEN_CALL = C.VIR_ERR_XEN_CALL + + // unknown OS type + VIR_ERR_OS_TYPE = C.VIR_ERR_OS_TYPE + + // missing kernel information + VIR_ERR_NO_KERNEL = C.VIR_ERR_NO_KERNEL + + // missing root device information + VIR_ERR_NO_ROOT = C.VIR_ERR_NO_ROOT + + // missing source device information + VIR_ERR_NO_SOURCE = C.VIR_ERR_NO_SOURCE + + // missing target device information + VIR_ERR_NO_TARGET = C.VIR_ERR_NO_TARGET + + // missing domain name information + VIR_ERR_NO_NAME = C.VIR_ERR_NO_NAME + + // missing domain OS information + VIR_ERR_NO_OS = C.VIR_ERR_NO_OS + + // missing domain devices information + VIR_ERR_NO_DEVICE = C.VIR_ERR_NO_DEVICE + + // could not open Xen Store control + VIR_ERR_NO_XENSTORE = C.VIR_ERR_NO_XENSTORE + + // too many drivers registered + VIR_ERR_DRIVER_FULL = C.VIR_ERR_DRIVER_FULL + + // not supported by the drivers (DEPRECATED) + VIR_ERR_CALL_FAILED = C.VIR_ERR_CALL_FAILED + + // an XML description is not well formed or broken + VIR_ERR_XML_ERROR = C.VIR_ERR_XML_ERROR + + // the domain already exist + VIR_ERR_DOM_EXIST = C.VIR_ERR_DOM_EXIST + + // operation forbidden on read-only connections + VIR_ERR_OPERATION_DENIED = C.VIR_ERR_OPERATION_DENIED + + // failed to open a conf file + VIR_ERR_OPEN_FAILED = C.VIR_ERR_OPEN_FAILED + + // failed to read a conf file + VIR_ERR_READ_FAILED = C.VIR_ERR_READ_FAILED + + // failed to parse a conf file + VIR_ERR_PARSE_FAILED = C.VIR_ERR_PARSE_FAILED + + // failed to parse the syntax of a conf file + VIR_ERR_CONF_SYNTAX = C.VIR_ERR_CONF_SYNTAX + + // failed to write a conf file + VIR_ERR_WRITE_FAILED = C.VIR_ERR_WRITE_FAILED + + // detail of an XML error + VIR_ERR_XML_DETAIL = C.VIR_ERR_XML_DETAIL + + // invalid network object + VIR_ERR_INVALID_NETWORK = C.VIR_ERR_INVALID_NETWORK + + // the network already exist + VIR_ERR_NETWORK_EXIST = C.VIR_ERR_NETWORK_EXIST + + // general system call failure + VIR_ERR_SYSTEM_ERROR = C.VIR_ERR_SYSTEM_ERROR + + // some sort of RPC error + VIR_ERR_RPC = C.VIR_ERR_RPC + + // error from a GNUTLS call + VIR_ERR_GNUTLS_ERROR = C.VIR_ERR_GNUTLS_ERROR + + // failed to start network + VIR_WAR_NO_NETWORK = C.VIR_WAR_NO_NETWORK + + // domain not found or unexpectedly disappeared + VIR_ERR_NO_DOMAIN = C.VIR_ERR_NO_DOMAIN + + // network not found + VIR_ERR_NO_NETWORK = C.VIR_ERR_NO_NETWORK + + // invalid MAC address + VIR_ERR_INVALID_MAC = C.VIR_ERR_INVALID_MAC + + // authentication failed + VIR_ERR_AUTH_FAILED = C.VIR_ERR_AUTH_FAILED + + // invalid storage pool object + VIR_ERR_INVALID_STORAGE_POOL = C.VIR_ERR_INVALID_STORAGE_POOL + + // invalid storage vol object + VIR_ERR_INVALID_STORAGE_VOL = C.VIR_ERR_INVALID_STORAGE_VOL + + // failed to start storage + VIR_WAR_NO_STORAGE = C.VIR_WAR_NO_STORAGE + + // storage pool not found + VIR_ERR_NO_STORAGE_POOL = C.VIR_ERR_NO_STORAGE_POOL + + // storage volume not found + VIR_ERR_NO_STORAGE_VOL = C.VIR_ERR_NO_STORAGE_VOL + + // failed to start node driver + VIR_WAR_NO_NODE = C.VIR_WAR_NO_NODE + + // invalid node device object + VIR_ERR_INVALID_NODE_DEVICE = C.VIR_ERR_INVALID_NODE_DEVICE + + // node device not found + VIR_ERR_NO_NODE_DEVICE = C.VIR_ERR_NO_NODE_DEVICE + + // security model not found + VIR_ERR_NO_SECURITY_MODEL = C.VIR_ERR_NO_SECURITY_MODEL + + // operation is not applicable at this time + VIR_ERR_OPERATION_INVALID = C.VIR_ERR_OPERATION_INVALID + + // failed to start interface driver + VIR_WAR_NO_INTERFACE = C.VIR_WAR_NO_INTERFACE + + // interface driver not running + VIR_ERR_NO_INTERFACE = C.VIR_ERR_NO_INTERFACE + + // invalid interface object + VIR_ERR_INVALID_INTERFACE = C.VIR_ERR_INVALID_INTERFACE + + // more than one matching interface found + VIR_ERR_MULTIPLE_INTERFACES = C.VIR_ERR_MULTIPLE_INTERFACES + + // failed to start nwfilter driver + VIR_WAR_NO_NWFILTER = C.VIR_WAR_NO_NWFILTER + + // invalid nwfilter object + VIR_ERR_INVALID_NWFILTER = C.VIR_ERR_INVALID_NWFILTER + + // nw filter pool not found + VIR_ERR_NO_NWFILTER = C.VIR_ERR_NO_NWFILTER + + // nw filter pool not found + VIR_ERR_BUILD_FIREWALL = C.VIR_ERR_BUILD_FIREWALL + + // failed to start secret storage + VIR_WAR_NO_SECRET = C.VIR_WAR_NO_SECRET + + // invalid secret + VIR_ERR_INVALID_SECRET = C.VIR_ERR_INVALID_SECRET + + // secret not found + VIR_ERR_NO_SECRET = C.VIR_ERR_NO_SECRET + + // unsupported configuration construct + VIR_ERR_CONFIG_UNSUPPORTED = C.VIR_ERR_CONFIG_UNSUPPORTED + + // timeout occurred during operation + VIR_ERR_OPERATION_TIMEOUT = C.VIR_ERR_OPERATION_TIMEOUT + + // a migration worked, but making the VM persist on the dest host failed + VIR_ERR_MIGRATE_PERSIST_FAILED = C.VIR_ERR_MIGRATE_PERSIST_FAILED + + // a synchronous hook script failed + VIR_ERR_HOOK_SCRIPT_FAILED = C.VIR_ERR_HOOK_SCRIPT_FAILED + + // invalid domain snapshot + VIR_ERR_INVALID_DOMAIN_SNAPSHOT = C.VIR_ERR_INVALID_DOMAIN_SNAPSHOT + + // domain snapshot not found + VIR_ERR_NO_DOMAIN_SNAPSHOT = C.VIR_ERR_NO_DOMAIN_SNAPSHOT + + // stream pointer not valid + VIR_ERR_INVALID_STREAM = C.VIR_ERR_INVALID_STREAM + + // valid API use but unsupported by the given driver + VIR_ERR_ARGUMENT_UNSUPPORTED = C.VIR_ERR_ARGUMENT_UNSUPPORTED + + // storage pool probe failed + VIR_ERR_STORAGE_PROBE_FAILED = C.VIR_ERR_STORAGE_PROBE_FAILED + + // storage pool already built + VIR_ERR_STORAGE_POOL_BUILT = C.VIR_ERR_STORAGE_POOL_BUILT + + // force was not requested for a risky domain snapshot revert + VIR_ERR_SNAPSHOT_REVERT_RISKY = C.VIR_ERR_SNAPSHOT_REVERT_RISKY + + // operation on a domain was canceled/aborted by user + VIR_ERR_OPERATION_ABORTED = C.VIR_ERR_OPERATION_ABORTED + + // authentication cancelled + VIR_ERR_AUTH_CANCELLED = C.VIR_ERR_AUTH_CANCELLED + + // The metadata is not present + VIR_ERR_NO_DOMAIN_METADATA = C.VIR_ERR_NO_DOMAIN_METADATA + + // Migration is not safe + VIR_ERR_MIGRATE_UNSAFE = C.VIR_ERR_MIGRATE_UNSAFE + + // integer overflow + VIR_ERR_OVERFLOW = C.VIR_ERR_OVERFLOW + + // action prevented by block copy job + VIR_ERR_BLOCK_COPY_ACTIVE = C.VIR_ERR_BLOCK_COPY_ACTIVE + + // The requested operation is not supported + VIR_ERR_OPERATION_UNSUPPORTED = C.VIR_ERR_OPERATION_UNSUPPORTED + + // error in ssh transport driver + VIR_ERR_SSH = C.VIR_ERR_SSH + + // guest agent is unresponsive, not running or not usable + VIR_ERR_AGENT_UNRESPONSIVE = C.VIR_ERR_AGENT_UNRESPONSIVE + + // resource is already in use + VIR_ERR_RESOURCE_BUSY = C.VIR_ERR_RESOURCE_BUSY + + // operation on the object/resource was denied + VIR_ERR_ACCESS_DENIED = C.VIR_ERR_ACCESS_DENIED + + // error from a dbus service + VIR_ERR_DBUS_SERVICE = C.VIR_ERR_DBUS_SERVICE + + // the storage vol already exists + VIR_ERR_STORAGE_VOL_EXIST = C.VIR_ERR_STORAGE_VOL_EXIST + + // given CPU is incompatible with host CPU + // added in libvirt 1.2.6 + // VIR_ERR_CPU_INCOMPATIBLE = C.VIR_ERR_CPU_INCOMPATIBLE +) + +// virErrorDomain +const ( + VIR_FROM_NONE = C.VIR_FROM_NONE + + // Error at Xen hypervisor layer + VIR_FROM_XEN = C.VIR_FROM_XEN + + // Error at connection with xend daemon + VIR_FROM_XEND = C.VIR_FROM_XEND + + // Error at connection with xen store + VIR_FROM_XENSTORE = C.VIR_FROM_XENSTORE + + // Error in the S-Expression code + VIR_FROM_SEXPR = C.VIR_FROM_SEXPR + + // Error in the XML code + VIR_FROM_XML = C.VIR_FROM_XML + + // Error when operating on a domain + VIR_FROM_DOM = C.VIR_FROM_DOM + + // Error in the XML-RPC code + VIR_FROM_RPC = C.VIR_FROM_RPC + + // Error in the proxy code; unused since 0.8.6 + VIR_FROM_PROXY = C.VIR_FROM_PROXY + + // Error in the configuration file handling + VIR_FROM_CONF = C.VIR_FROM_CONF + + // Error at the QEMU daemon + VIR_FROM_QEMU = C.VIR_FROM_QEMU + + // Error when operating on a network + VIR_FROM_NET = C.VIR_FROM_NET + + // Error from test driver + VIR_FROM_TEST = C.VIR_FROM_TEST + + // Error from remote driver + VIR_FROM_REMOTE = C.VIR_FROM_REMOTE + + // Error from OpenVZ driver + VIR_FROM_OPENVZ = C.VIR_FROM_OPENVZ + + // Error at Xen XM layer + VIR_FROM_XENXM = C.VIR_FROM_XENXM + + // Error in the Linux Stats code + VIR_FROM_STATS_LINUX = C.VIR_FROM_STATS_LINUX + + // Error from Linux Container driver + VIR_FROM_LXC = C.VIR_FROM_LXC + + // Error from storage driver + VIR_FROM_STORAGE = C.VIR_FROM_STORAGE + + // Error from network config + VIR_FROM_NETWORK = C.VIR_FROM_NETWORK + + // Error from domain config + VIR_FROM_DOMAIN = C.VIR_FROM_DOMAIN + + // Error at the UML driver + VIR_FROM_UML = C.VIR_FROM_UML + + // Error from node device monitor + VIR_FROM_NODEDEV = C.VIR_FROM_NODEDEV + + // Error from xen inotify layer + VIR_FROM_XEN_INOTIFY = C.VIR_FROM_XEN_INOTIFY + + // Error from security framework + VIR_FROM_SECURITY = C.VIR_FROM_SECURITY + + // Error from VirtualBox driver + VIR_FROM_VBOX = C.VIR_FROM_VBOX + + // Error when operating on an interface + VIR_FROM_INTERFACE = C.VIR_FROM_INTERFACE + + // The OpenNebula driver no longer exists. Retained for ABI/API compat only + VIR_FROM_ONE = C.VIR_FROM_ONE + + // Error from ESX driver + VIR_FROM_ESX = C.VIR_FROM_ESX + + // Error from IBM power hypervisor + VIR_FROM_PHYP = C.VIR_FROM_PHYP + + // Error from secret storage + VIR_FROM_SECRET = C.VIR_FROM_SECRET + + // Error from CPU driver + VIR_FROM_CPU = C.VIR_FROM_CPU + + // Error from XenAPI + VIR_FROM_XENAPI = C.VIR_FROM_XENAPI + + // Error from network filter driver + VIR_FROM_NWFILTER = C.VIR_FROM_NWFILTER + + // Error from Synchronous hooks + VIR_FROM_HOOK = C.VIR_FROM_HOOK + + // Error from domain snapshot + VIR_FROM_DOMAIN_SNAPSHOT = C.VIR_FROM_DOMAIN_SNAPSHOT + + // Error from auditing subsystem + VIR_FROM_AUDIT = C.VIR_FROM_AUDIT + + // Error from sysinfo/SMBIOS + VIR_FROM_SYSINFO = C.VIR_FROM_SYSINFO + + // Error from I/O streams + VIR_FROM_STREAMS = C.VIR_FROM_STREAMS + + // Error from VMware driver + VIR_FROM_VMWARE = C.VIR_FROM_VMWARE + + // Error from event loop impl + VIR_FROM_EVENT = C.VIR_FROM_EVENT + + // Error from libxenlight driver + VIR_FROM_LIBXL = C.VIR_FROM_LIBXL + + // Error from lock manager + VIR_FROM_LOCKING = C.VIR_FROM_LOCKING + + // Error from Hyper-V driver + VIR_FROM_HYPERV = C.VIR_FROM_HYPERV + + // Error from capabilities + VIR_FROM_CAPABILITIES = C.VIR_FROM_CAPABILITIES + + // Error from URI handling + VIR_FROM_URI = C.VIR_FROM_URI + + // Error from auth handling + VIR_FROM_AUTH = C.VIR_FROM_AUTH + + // Error from DBus + VIR_FROM_DBUS = C.VIR_FROM_DBUS + + // Error from Parallels + VIR_FROM_PARALLELS = C.VIR_FROM_PARALLELS + + // Error from Device + VIR_FROM_DEVICE = C.VIR_FROM_DEVICE + + // Error from libssh2 connection transport + VIR_FROM_SSH = C.VIR_FROM_SSH + + // Error from lockspace + VIR_FROM_LOCKSPACE = C.VIR_FROM_LOCKSPACE + + // Error from initctl device communication + VIR_FROM_INITCTL = C.VIR_FROM_INITCTL + + // Error from identity code + VIR_FROM_IDENTITY = C.VIR_FROM_IDENTITY + + // Error from cgroups + VIR_FROM_CGROUP = C.VIR_FROM_CGROUP + + // Error from access control manager + VIR_FROM_ACCESS = C.VIR_FROM_ACCESS + + // Error from systemd code + VIR_FROM_SYSTEMD = C.VIR_FROM_SYSTEMD + + // Error from bhyve driver + VIR_FROM_BHYVE = C.VIR_FROM_BHYVE + + // Error from crypto code + VIR_FROM_CRYPTO = C.VIR_FROM_CRYPTO + + // Error from firewall + VIR_FROM_FIREWALL = C.VIR_FROM_FIREWALL +) + +type VirError struct { + Code int + Domain int + Message string + Level int +} + +func (err VirError) Error() string { + return fmt.Sprintf("[Code-%d] [Domain-%d] %s", + err.Code, err.Domain, err.Message) +} diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/events.go b/vendor/gopkg.in/alexzorin/libvirt-go.v2/events.go new file mode 100644 index 0000000..04f94f1 --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/events.go @@ -0,0 +1,321 @@ +package libvirt + +import ( + "unsafe" +) + +/* +#cgo LDFLAGS: -lvirt -ldl +#include +*/ +import "C" + +type DomainLifecycleEvent struct { + Event int + Detail int +} + +type DomainRTCChangeEvent struct { + Utcoffset int64 +} + +type DomainWatchdogEvent struct { + Action int +} + +type DomainIOErrorEvent struct { + SrcPath string + DevAlias string + Action int +} + +type DomainEventGraphicsAddress struct { + Family int + Node string + Service string +} + +type DomainEventGraphicsSubjectIdentity struct { + Type string + Name string +} + +type DomainGraphicsEvent struct { + Phase int + Local DomainEventGraphicsAddress + Remote DomainEventGraphicsAddress + AuthScheme string + Subject []DomainEventGraphicsSubjectIdentity +} + +type DomainIOErrorReasonEvent struct { + DomainIOErrorEvent + Reason string +} + +type DomainBlockJobEvent struct { + Disk string + Type int + Status int +} + +type DomainDiskChangeEvent struct { + OldSrcPath string + NewSrcPath string + DevAlias string + Reason int +} + +type DomainTrayChangeEvent struct { + DevAlias string + Reason int +} + +type DomainReasonEvent struct { + Reason int +} + +type DomainBalloonChangeEvent struct { + Actual uint64 +} + +type DomainDeviceRemovedEvent struct { + DevAlias string +} + +//export domainEventLifecycleCallback +func domainEventLifecycleCallback(c C.virConnectPtr, d C.virDomainPtr, + event int, detail int, + opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + eventDetails := DomainLifecycleEvent{ + Event: event, + Detail: detail, + } + + return (*context.cb)(&connection, &domain, eventDetails, context.f) +} + +//export domainEventGenericCallback +func domainEventGenericCallback(c C.virConnectPtr, d C.virDomainPtr, + opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + return (*context.cb)(&connection, &domain, nil, context.f) +} + +//export domainEventRTCChangeCallback +func domainEventRTCChangeCallback(c C.virConnectPtr, d C.virDomainPtr, + utcoffset int64, opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + eventDetails := DomainRTCChangeEvent{ + Utcoffset: utcoffset, + } + + return (*context.cb)(&connection, &domain, eventDetails, context.f) +} + +//export domainEventWatchdogCallback +func domainEventWatchdogCallback(c C.virConnectPtr, d C.virDomainPtr, + action int, opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + eventDetails := DomainWatchdogEvent{ + Action: action, + } + + return (*context.cb)(&connection, &domain, eventDetails, context.f) +} + +//export domainEventIOErrorCallback +func domainEventIOErrorCallback(c C.virConnectPtr, d C.virDomainPtr, + srcPath string, devAlias string, action int, opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + eventDetails := DomainIOErrorEvent{ + SrcPath: srcPath, + DevAlias: devAlias, + Action: action, + } + + return (*context.cb)(&connection, &domain, eventDetails, context.f) +} + +//export domainEventGraphicsCallback +func domainEventGraphicsCallback(c C.virConnectPtr, d C.virDomainPtr, + phase int, + local C.virDomainEventGraphicsAddressPtr, + remote C.virDomainEventGraphicsAddressPtr, + authScheme string, + subject C.virDomainEventGraphicsSubjectPtr, + opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + subjectGo := make([]DomainEventGraphicsSubjectIdentity, subject.nidentity) + nidentities := int(subject.nidentity) + identities := (*[1 << 30]C.virDomainEventGraphicsSubjectIdentity)(unsafe.Pointer(&subject.identities))[:nidentities:nidentities] + for _, identity := range identities { + subjectGo = append(subjectGo, + DomainEventGraphicsSubjectIdentity{ + Type: C.GoString(identity._type), + Name: C.GoString(identity.name), + }, + ) + } + + eventDetails := DomainGraphicsEvent{ + Phase: phase, + Local: DomainEventGraphicsAddress{ + Family: int(local.family), + Node: C.GoString(local.node), + Service: C.GoString(local.service), + }, + Remote: DomainEventGraphicsAddress{ + Family: int(remote.family), + Node: C.GoString(remote.node), + Service: C.GoString(remote.service), + }, + AuthScheme: authScheme, + Subject: subjectGo, + } + + return (*context.cb)(&connection, &domain, eventDetails, context.f) +} + +//export domainEventIOErrorReasonCallback +func domainEventIOErrorReasonCallback(c C.virConnectPtr, d C.virDomainPtr, + srcPath string, devAlias string, action int, reason string, + opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + eventDetails := DomainIOErrorReasonEvent{ + DomainIOErrorEvent: DomainIOErrorEvent{ + SrcPath: srcPath, + DevAlias: devAlias, + Action: action, + }, + Reason: reason, + } + + return (*context.cb)(&connection, &domain, eventDetails, context.f) +} + +//export domainEventBlockJobCallback +func domainEventBlockJobCallback(c C.virConnectPtr, d C.virDomainPtr, + disk string, _type int, status int, opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + eventDetails := DomainBlockJobEvent{ + Disk: disk, + Type: _type, + Status: status, + } + + return (*context.cb)(&connection, &domain, eventDetails, context.f) +} + +//export domainEventDiskChangeCallback +func domainEventDiskChangeCallback(c C.virConnectPtr, d C.virDomainPtr, + oldSrcPath string, newSrcPath string, devAlias string, + reason int, opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + eventDetails := DomainDiskChangeEvent{ + OldSrcPath: oldSrcPath, + NewSrcPath: newSrcPath, + DevAlias: devAlias, + Reason: reason, + } + + return (*context.cb)(&connection, &domain, eventDetails, context.f) +} + +//export domainEventTrayChangeCallback +func domainEventTrayChangeCallback(c C.virConnectPtr, d C.virDomainPtr, + devAlias string, reason int, opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + eventDetails := DomainTrayChangeEvent{ + DevAlias: devAlias, + Reason: reason, + } + + return (*context.cb)(&connection, &domain, eventDetails, context.f) +} + +//export domainEventReasonCallback +func domainEventReasonCallback(c C.virConnectPtr, d C.virDomainPtr, + reason int, opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + eventDetails := DomainReasonEvent{ + Reason: reason, + } + + return (*context.cb)(&connection, &domain, eventDetails, context.f) +} + +//export domainEventBalloonChangeCallback +func domainEventBalloonChangeCallback(c C.virConnectPtr, d C.virDomainPtr, + actual uint64, opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + eventDetails := DomainBalloonChangeEvent{ + Actual: actual, + } + + return (*context.cb)(&connection, &domain, eventDetails, context.f) +} + +//export domainEventDeviceRemovedCallback +func domainEventDeviceRemovedCallback(c C.virConnectPtr, d C.virDomainPtr, + devAlias string, opaque unsafe.Pointer) int { + + context := *(*domainCallbackContext)(opaque) + domain := VirDomain{ptr: d} + connection := VirConnection{ptr: c} + + eventDetails := DomainDeviceRemovedEvent{ + DevAlias: devAlias, + } + + return (*context.cb)(&connection, &domain, eventDetails, context.f) +} diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/integration_test.go b/vendor/gopkg.in/alexzorin/libvirt-go.v2/integration_test.go new file mode 100644 index 0000000..0ec6eb8 --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/integration_test.go @@ -0,0 +1,962 @@ +// +build integration + +package libvirt + +import ( + "io/ioutil" + "os" + "strings" + "testing" + "time" +) + +func defineTestLxcDomain(conn VirConnection, title string) (VirDomain, error) { + if title == "" { + title = time.Now().String() + } + xml := ` + ` + title + ` + ` + title + ` + 102400 + + exe + /bin/sh + + + + + ` + dom, err := conn.DomainDefineXML(xml) + return dom, err +} + +// Integration tests are run against LXC using Libvirt 1.2.x +// on Debian Wheezy (libvirt from wheezy-backports) +// +// To run, +// go test -tags integration + +func TestIntegrationGetMetadata(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + title := time.Now().String() + dom, err := defineTestLxcDomain(conn, title) + if err != nil { + t.Error(err) + return + } + defer dom.Free() + if err := dom.Create(); err != nil { + t.Error(err) + return + } + v, err := dom.GetMetadata(VIR_DOMAIN_METADATA_TITLE, "", 0) + dom.Destroy() + if err != nil { + t.Error(err) + return + } + if v != title { + t.Fatal("title didnt match: expected %s, got %s", title, v) + return + } + if err := dom.Undefine(); err != nil { + t.Error(err) + return + } +} + +func TestIntegrationSetMetadata(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + dom, err := defineTestLxcDomain(conn, "") + if err != nil { + t.Error(err) + return + } + defer func() { + dom.Undefine() + dom.Free() + }() + const domTitle = "newtitle" + if err := dom.SetMetadata(VIR_DOMAIN_METADATA_TITLE, domTitle, "", "", 0); err != nil { + t.Error(err) + return + } + v, err := dom.GetMetadata(VIR_DOMAIN_METADATA_TITLE, "", 0) + if err != nil { + t.Error(err) + return + } + if v != domTitle { + t.Fatalf("VIR_DOMAIN_METADATA_TITLE should have been %s, not %s", domTitle, v) + return + } +} + +func TestIntegrationGetSysinfo(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + info, err := conn.GetSysinfo(0) + if err != nil { + t.Error(err) + return + } + if strings.Index(info, " + + + + ` +} + +func TestIntergrationDefineUndefineNWFilterXML(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + filter, err := conn.NWFilterDefineXML(testNWFilterXML("", "ipv4")) + if err != nil { + t.Fatal(err) + } + defer func() { + if err := filter.Undefine(); err != nil { + t.Fatal(err) + } + filter.Free() + }() + _, err = conn.NWFilterDefineXML(testNWFilterXML("", "bad")) + if err == nil { + t.Fatal("Should have had an error") + } +} + +func TestIntegrationNWFilterGetName(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + filter, err := conn.NWFilterDefineXML(testNWFilterXML("", "ipv4")) + if err != nil { + t.Error(err) + return + } + defer func() { + filter.Undefine() + filter.Free() + }() + if _, err := filter.GetName(); err != nil { + t.Error(err) + } +} + +func TestIntegrationNWFilterGetUUID(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + filter, err := conn.NWFilterDefineXML(testNWFilterXML("", "ipv4")) + if err != nil { + t.Error(err) + return + } + defer func() { + filter.Undefine() + filter.Free() + }() + if _, err := filter.GetUUID(); err != nil { + t.Error(err) + } +} + +func TestIntegrationNWFilterGetUUIDString(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + filter, err := conn.NWFilterDefineXML(testNWFilterXML("", "ipv4")) + if err != nil { + t.Error(err) + return + } + defer func() { + filter.Undefine() + filter.Free() + }() + if _, err := filter.GetUUIDString(); err != nil { + t.Error(err) + } +} + +func TestIntegrationNWFilterGetXMLDesc(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + filter, err := conn.NWFilterDefineXML(testNWFilterXML("", "ipv4")) + if err != nil { + t.Error(err) + return + } + defer func() { + filter.Undefine() + filter.Free() + }() + if _, err := filter.GetXMLDesc(0); err != nil { + t.Error(err) + } +} + +func TestIntegrationLookupNWFilterByName(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + origName := time.Now().String() + filter, err := conn.NWFilterDefineXML(testNWFilterXML(origName, "ipv4")) + if err != nil { + t.Error(err) + return + } + defer func() { + filter.Undefine() + filter.Free() + }() + filter, err = conn.LookupNWFilterByName(origName) + if err != nil { + t.Error(err) + return + } + var newName string + newName, err = filter.GetName() + if err != nil { + t.Error(err) + return + } + if newName != origName { + t.Fatalf("expected filter name: %s ,got: %s", origName, newName) + } +} + +func TestIntegrationLookupNWFilterByUUIDString(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + origName := time.Now().String() + filter, err := conn.NWFilterDefineXML(testNWFilterXML(origName, "ipv4")) + if err != nil { + t.Error(err) + return + } + defer func() { + filter.Undefine() + filter.Free() + }() + filter, err = conn.LookupNWFilterByName(origName) + if err != nil { + t.Error(err) + return + } + var filterUUID string + filterUUID, err = filter.GetUUIDString() + if err != nil { + t.Error(err) + return + } + filter, err = conn.LookupNWFilterByUUIDString(filterUUID) + if err != nil { + t.Error(err) + return + } + name, err := filter.GetName() + if err != nil { + t.Error(err) + return + } + if name != origName { + t.Fatalf("fetching by UUID: expected filter name: %s ,got: %s", name, origName) + } +} + +func TestIntegrationDomainAttachDetachDevice(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + + dom, err := defineTestLxcDomain(conn, "") + if err != nil { + t.Error(err) + return + } + defer func() { + dom.Undefine() + dom.Free() + }() + const nwXml = ` + + + + ` + if err := dom.AttachDeviceFlags(nwXml, VIR_DOMAIN_DEVICE_MODIFY_CONFIG); err != nil { + t.Error(err) + return + } + if err := dom.DetachDeviceFlags(nwXml, VIR_DOMAIN_DEVICE_MODIFY_CONFIG); err != nil { + t.Error(err) + return + } +} + +func TestStorageVolResize(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + + poolPath, err := ioutil.TempDir("", "default-pool-test-1") + if err != nil { + t.Error(err) + return + } + defer os.RemoveAll(poolPath) + pool, err := conn.StoragePoolDefineXML(` + default-pool-test-1 + + `+poolPath+` + + `, 0) + defer func() { + pool.Undefine() + pool.Free() + }() + if err := pool.Create(0); err != nil { + t.Error(err) + return + } + defer pool.Destroy() + vol, err := pool.StorageVolCreateXML(testStorageVolXML("", poolPath), 0) + if err != nil { + t.Error(err) + return + } + defer func() { + vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) + vol.Free() + }() + const newCapacityInBytes = 12582912 + if err := vol.Resize(newCapacityInBytes, VIR_STORAGE_VOL_RESIZE_ALLOCATE); err != nil { + t.Fatal(err) + } +} + +func TestStorageVolWipe(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + + poolPath, err := ioutil.TempDir("", "default-pool-test-1") + if err != nil { + t.Error(err) + return + } + defer os.RemoveAll(poolPath) + pool, err := conn.StoragePoolDefineXML(` + default-pool-test-1 + + `+poolPath+` + + `, 0) + defer func() { + pool.Undefine() + pool.Free() + }() + if err := pool.Create(0); err != nil { + t.Error(err) + return + } + defer pool.Destroy() + vol, err := pool.StorageVolCreateXML(testStorageVolXML("", poolPath), 0) + if err != nil { + t.Error(err) + return + } + defer func() { + vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) + vol.Free() + }() + if err := vol.Wipe(0); err != nil { + t.Fatal(err) + } +} + +func TestStorageVolWipePattern(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + + poolPath, err := ioutil.TempDir("", "default-pool-test-1") + if err != nil { + t.Error(err) + return + } + defer os.RemoveAll(poolPath) + pool, err := conn.StoragePoolDefineXML(` + default-pool-test-1 + + `+poolPath+` + + `, 0) + defer func() { + pool.Undefine() + pool.Free() + }() + if err := pool.Create(0); err != nil { + t.Error(err) + return + } + defer pool.Destroy() + vol, err := pool.StorageVolCreateXML(testStorageVolXML("", poolPath), 0) + if err != nil { + t.Error(err) + return + } + defer func() { + vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) + vol.Free() + }() + if err := vol.WipePattern(VIR_STORAGE_VOL_WIPE_ALG_ZERO, 0); err != nil { + t.Fatal(err) + } +} + +func testSecretTypeCephFromXML(name string) string { + var setName string + if name == "" { + setName = time.Now().String() + } else { + setName = name + } + return ` + + ` + setName + ` + + ` +} + +func TestIntegrationSecretDefineUndefine(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + sec, err := conn.SecretDefineXML(testSecretTypeCephFromXML(""), 0) + if err != nil { + t.Fatal(err) + } + defer sec.Free() + + if err := sec.Undefine(); err != nil { + t.Fatal(err) + } +} + +func TestIntegrationSecretGetUUID(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + sec, err := conn.SecretDefineXML(testSecretTypeCephFromXML(""), 0) + if err != nil { + t.Error(err) + return + } + defer func() { + sec.Undefine() + sec.Free() + }() + if _, err := sec.GetUUID(); err != nil { + t.Error(err) + } +} + +func TestIntegrationSecretGetUUIDString(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + sec, err := conn.SecretDefineXML(testSecretTypeCephFromXML(""), 0) + if err != nil { + t.Error(err) + return + } + defer func() { + sec.Undefine() + sec.Free() + }() + if _, err := sec.GetUUIDString(); err != nil { + t.Error(err) + } +} + +func TestIntegrationSecretGetXMLDesc(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + sec, err := conn.SecretDefineXML(testSecretTypeCephFromXML(""), 0) + if err != nil { + t.Error(err) + return + } + defer func() { + sec.Undefine() + sec.Free() + }() + if _, err := sec.GetXMLDesc(0); err != nil { + t.Error(err) + } +} + +func TestIntegrationSecretGetUsageType(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + sec, err := conn.SecretDefineXML(testSecretTypeCephFromXML(""), 0) + if err != nil { + t.Error(err) + return + } + defer func() { + sec.Undefine() + sec.Free() + }() + uType, err := sec.GetUsageType() + if err != nil { + t.Error(err) + return + } + if uType != VIR_SECRET_USAGE_TYPE_CEPH { + t.Fatal("unexpected usage type.Expected usage type is Ceph") + } +} + +func TestIntegrationSecretGetUsageID(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + setUsageID := time.Now().String() + sec, err := conn.SecretDefineXML(testSecretTypeCephFromXML(setUsageID), 0) + if err != nil { + t.Error(err) + return + } + defer func() { + sec.Undefine() + sec.Free() + }() + recUsageID, err := sec.GetUsageID() + if err != nil { + t.Error(err) + return + } + if recUsageID != setUsageID { + t.Fatalf("exepected usage ID: %s, got: %s", setUsageID, recUsageID) + } +} + +func TestIntegrationLookupSecretByUsage(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + usageID := time.Now().String() + sec, err := conn.SecretDefineXML(testSecretTypeCephFromXML(usageID), 0) + if err != nil { + t.Error(err) + return + } + defer func() { + sec.Undefine() + sec.Free() + }() + sec, err = conn.LookupSecretByUsage(VIR_SECRET_USAGE_TYPE_CEPH, usageID) + if err != nil { + t.Fatal(err) + } +} + +func TestIntegrationGetDomainCPUStats(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Fatal(err) + } + defer conn.CloseConnection() + dom, err := defineTestLxcDomain(conn, "") + if err != nil { + t.Fatal(err) + } + defer func() { + dom.Undefine() + dom.Free() + }() + + if err := dom.Create(); err != nil { + t.Fatal(err) + } + defer dom.Destroy() + + // ... if @params is NULL and @nparams is 0 and @ncpus is 0, the + // number of cpus available to query is returned. From the host perspective, + ncpus, err := dom.GetCPUStats(nil, 0, 0, 0, 0) + if err != nil { + t.Fatal(err) + } + if ncpus != 1 { + t.Fatal("Number of CPUs should be 1") + } + + // ... if @params is NULL and @nparams is 0 and @ncpus is 1, + // and the return value will be how many statistics are available for the given @start_cpu. + nparams, err := dom.GetCPUStats(nil, 0, 0, 1, 0) + if err != nil { + t.Fatal(err) + } + + const lxcNumParams = 1 + const lxcParamName = "cpu_time" + + if nparams != lxcNumParams { + t.Fatal("Number of parameters for this hypervisor should be 2, got ", nparams) + } + var params VirTypedParameters + if _, err = dom.GetCPUStats(¶ms, nparams, 0, uint32(ncpus), 0); err != nil { + t.Fatal(err) + } + + if len(params) != lxcNumParams { + t.Fatalf("Wanted %d returned parameters, got %d", lxcNumParams, len(params)) + } + param := params[0] + if param.Name != lxcParamName { + t.Fatalf("Wanted param '%s', got '%s'", lxcParamName, param.Name) + } + if _, ok := param.Value.(uint64); !ok { + t.Fatalf("Wanted uint64 param, got %v instead", param.Value) + } +} + +// Not supported on libvirt driver, so no integration test +// func TestGetInterfaceParameters(t *testing.T) { +// dom, conn := buildTestDomain() +// defer func() { +// dom.Undefine() +// dom.Free() +// conn.CloseConnection() +// }() +// iface := "either mac or path to interface" +// nparams := int(0) +// if _, err := dom.GetInterfaceParameters(iface, nil, &nparams, 0); err != nil { +// t.Error(err) +// return +// } + +// var params VirTypedParameters +// if _, err := dom.GetInterfaceParameters(iface, ¶ms, &nparams, 0); err != nil { +// t.Error(err) +// return +// } +// } + +func TestIntegrationListAllInterfaces(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + ifaces, err := conn.ListAllInterfaces(0) + if err != nil { + t.Fatal(err) + } + lookingFor := "lo" + found := false + for _, iface := range ifaces { + name, err := iface.GetName() + if err != nil { + t.Fatal(err) + } + if name == lookingFor { + found = true + } + iface.Free() + } + if found == false { + t.Fatalf("interface %s not found", lookingFor) + } +} + +func TestIntergrationListAllNWFilters(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + + testNWFilterName := time.Now().String() + filter, err := conn.NWFilterDefineXML(testNWFilterXML(testNWFilterName, "ipv4")) + if err != nil { + t.Error(err) + return + } + defer func() { + filter.Undefine() + filter.Free() + }() + + filters, err := conn.ListAllNWFilters(0) + if len(filters) == 0 { + t.Fatal("length of []VirNWFilter shouldn't be 0") + } + + found := false + for _, f := range filters { + name, _ := f.GetName() + if name == testNWFilterName { + found = true + } + f.Free() + } + if found == false { + t.Fatalf("NWFilter %s not found", testNWFilterName) + } +} + +func TestIntegrationDomainBlockStatsFlags(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Fatal(err) + } + defer conn.CloseConnection() + + dom, err := defineTestLxcDomain(conn, "") + if err != nil { + t.Fatal(err) + } + defer func() { + dom.Undefine() + dom.Free() + }() + + if err := dom.Create(); err != nil { + t.Fatal(err) + } + defer dom.Destroy() + + // special case, count number of parameters + _, err = dom.BlockStatsFlags("", nil, 0, 0) + if err != nil { + t.Fatal(err) + } +} + +func TestIntegrationDomainInterfaceStats(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Fatal(err) + } + defer conn.CloseConnection() + + dom, err := defineTestLxcDomain(conn, "") + if err != nil { + t.Fatal(err) + } + defer func() { + dom.Undefine() + dom.Free() + }() + const nwXml = ` + + + + ` + if err := dom.AttachDeviceFlags(nwXml, VIR_DOMAIN_DEVICE_MODIFY_CONFIG); err != nil { + t.Fatal(err) + } + + if err := dom.Create(); err != nil { + t.Fatal(err) + } + + if _, err := dom.InterfaceStats("vnet0"); err != nil { + t.Error(err) + } + + if err := dom.Destroy(); err != nil { + t.Fatal(err) + } + + if err := dom.DetachDeviceFlags(nwXml, VIR_DOMAIN_DEVICE_MODIFY_CONFIG); err != nil { + t.Fatal(err) + } +} + +func TestStorageVolUploadDownload(t *testing.T) { + conn, err := NewVirConnection("lxc:///") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + + poolPath, err := ioutil.TempDir("", "default-pool-test-1") + if err != nil { + t.Error(err) + return + } + defer os.RemoveAll(poolPath) + pool, err := conn.StoragePoolDefineXML(` + default-pool-test-1 + + `+poolPath+` + + `, 0) + defer func() { + pool.Undefine() + pool.Free() + }() + if err := pool.Create(0); err != nil { + t.Error(err) + return + } + defer pool.Destroy() + vol, err := pool.StorageVolCreateXML(testStorageVolXML("", poolPath), 0) + if err != nil { + t.Error(err) + return + } + defer func() { + vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) + vol.Free() + }() + + data := []byte{1, 2, 3, 4, 5, 6} + + // write above data to the vol + // 1. create a stream + stream, err := NewVirStream(&conn, 0) + if err != nil { + t.Fatal(err) + } + defer func() { + stream.Free() + }() + + // 2. set it up to upload from stream + if err := vol.Upload(stream, 0, uint64(len(data)), 0); err != nil { + stream.Abort() + t.Fatal(err) + } + + // 3. do the actual writing + if n, err := stream.Write(data); err != nil || n != len(data) { + t.Fatal(err, n) + } + + // 4. finish! + if err := stream.Close(); err != nil { + t.Fatal(err) + } + + // read back the data + // 1. create a stream + downStream, err := NewVirStream(&conn, 0) + if err != nil { + t.Fatal(err) + } + defer func() { + downStream.Free() + }() + + // 2. set it up to download from stream + if err := vol.Download(downStream, 0, uint64(len(data)), 0); err != nil { + downStream.Abort() + t.Fatal(err) + } + + // 3. do the actual reading + buf := make([]byte, 1024) + if n, err := downStream.Read(buf); err != nil || n != len(data) { + t.Fatal(err, n) + } + + t.Logf("read back: %#v", buf[:len(data)]) + + // 4. finish! + if err := downStream.Close(); err != nil { + t.Fatal(err) + } +} diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/interface.go b/vendor/gopkg.in/alexzorin/libvirt-go.v2/interface.go new file mode 100644 index 0000000..eeb9605 --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/interface.go @@ -0,0 +1,87 @@ +package libvirt + +/* +#cgo LDFLAGS: -lvirt -ldl +#include +#include +#include +*/ +import "C" + +import ( + "unsafe" +) + +type VirInterface struct { + ptr C.virInterfacePtr +} + +func (n *VirInterface) Create(flags uint32) error { + result := C.virInterfaceCreate(n.ptr, C.uint(flags)) + if result == -1 { + return GetLastError() + } + return nil +} + +func (n *VirInterface) Destroy(flags uint32) error { + result := C.virInterfaceDestroy(n.ptr, C.uint(flags)) + if result == -1 { + return GetLastError() + } + return nil +} + +func (n *VirInterface) IsActive() (bool, error) { + result := C.virInterfaceIsActive(n.ptr) + if result == -1 { + return false, GetLastError() + } + if result == 1 { + return true, nil + } + return false, nil +} + +func (n *VirInterface) GetMACString() (string, error) { + result := C.virInterfaceGetMACString(n.ptr) + if result == nil { + return "", GetLastError() + } + mac := C.GoString(result) + return mac, nil +} + +func (n *VirInterface) GetName() (string, error) { + result := C.virInterfaceGetName(n.ptr) + if result == nil { + return "", GetLastError() + } + name := C.GoString(result) + return name, nil +} + +func (n *VirInterface) GetXMLDesc(flags uint32) (string, error) { + result := C.virInterfaceGetXMLDesc(n.ptr, C.uint(flags)) + if result == nil { + return "", GetLastError() + } + xml := C.GoString(result) + C.free(unsafe.Pointer(result)) + return xml, nil +} + +func (n *VirInterface) Undefine() error { + result := C.virInterfaceUndefine(n.ptr) + if result == -1 { + return GetLastError() + } + return nil +} + +func (n *VirInterface) Free() error { + if result := C.virInterfaceFree(n.ptr); result != 0 { + return GetLastError() + } + return nil +} diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/interface_test.go b/vendor/gopkg.in/alexzorin/libvirt-go.v2/interface_test.go new file mode 100644 index 0000000..6d35eb3 --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/interface_test.go @@ -0,0 +1,128 @@ +package libvirt + +import ( + "crypto/rand" + "fmt" + "testing" +) + +func buildTestInterface(mac string) (VirInterface, VirConnection) { + conn := buildTestConnection() + xml := `` + iface, err := conn.InterfaceDefineXML(xml, 0) + if err != nil { + panic(err) + } + return iface, conn +} + +func generateRandomMac() string { + macBuf := make([]byte, 3) + if _, err := rand.Read(macBuf); err != nil { + panic(err) + } + return fmt.Sprintf("aa:bb:cc:%02x:%02x:%02x", macBuf[0], macBuf[1], macBuf[2]) +} + +func TestCreateDestroyInterface(t *testing.T) { + iface, conn := buildTestInterface(generateRandomMac()) + defer iface.Free() + defer conn.CloseConnection() + if err := iface.Create(0); err != nil { + t.Error(err) + return + } + if err := iface.Destroy(0); err != nil { + t.Error(err) + } +} + +func TestUndefineInterface(t *testing.T) { + iface, conn := buildTestInterface(generateRandomMac()) + defer iface.Free() + defer conn.CloseConnection() + name, err := iface.GetName() + if err != nil { + t.Error(err) + return + } + if err := iface.Undefine(); err != nil { + t.Error(err) + return + } + if _, err := conn.LookupInterfaceByName(name); err == nil { + t.Fatal("Shouldn't have been able to find interface") + } +} + +func TestGetInterfaceName(t *testing.T) { + iface, conn := buildTestInterface(generateRandomMac()) + defer iface.Free() + defer conn.CloseConnection() + if _, err := iface.GetName(); err != nil { + t.Fatal(err) + } +} + +func TestInterfaceIsActive(t *testing.T) { + iface, conn := buildTestInterface(generateRandomMac()) + defer iface.Free() + defer conn.CloseConnection() + if err := iface.Create(0); err != nil { + t.Log(err) + return + } + active, err := iface.IsActive() + if err != nil { + t.Error(err) + return + } + if !active { + t.Fatal("Interface should be active") + } + if err := iface.Destroy(0); err != nil { + t.Error(err) + return + } + active, err = iface.IsActive() + if err != nil { + t.Error(err) + return + } + if active { + t.Fatal("Interface should be inactive") + } +} + +func TestGetMACString(t *testing.T) { + origMac := generateRandomMac() + iface, conn := buildTestInterface(origMac) + defer iface.Free() + defer conn.CloseConnection() + mac, err := iface.GetMACString() + if err != nil { + t.Error(err) + return + } + if mac != origMac { + t.Fatalf("expected MAC: %s , got: %s", origMac, mac) + } +} + +func TestGetInterfaceXMLDesc(t *testing.T) { + iface, conn := buildTestInterface(generateRandomMac()) + defer conn.CloseConnection() + defer iface.Free() + if _, err := iface.GetXMLDesc(0); err != nil { + t.Error(err) + } +} + +func TestInterfaceFree(t *testing.T) { + iface, conn := buildTestInterface(generateRandomMac()) + defer conn.CloseConnection() + if err := iface.Free(); err != nil { + t.Error(err) + return + } +} diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/libvirt.go b/vendor/gopkg.in/alexzorin/libvirt-go.v2/libvirt.go new file mode 100644 index 0000000..a607010 --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/libvirt.go @@ -0,0 +1,878 @@ +package libvirt + +import ( + "io/ioutil" + "reflect" + "unsafe" +) + +/* +#cgo LDFLAGS: -lvirt -ldl +#include +#include +#include + +void virErrorFuncDummy(void *userData, virErrorPtr error); + +int domainEventLifecycleCallback_cgo(virConnectPtr c, virDomainPtr d, + int event, int detail, void* data); + +int domainEventGenericCallback_cgo(virConnectPtr c, virDomainPtr d, void* data); + +int domainEventRTCChangeCallback_cgo(virConnectPtr c, virDomainPtr d, + long long utcoffset, void* data); + +int domainEventWatchdogCallback_cgo(virConnectPtr c, virDomainPtr d, + int action, void* data); + +int domainEventIOErrorCallback_cgo(virConnectPtr c, virDomainPtr d, + const char *srcPath, const char *devAlias, + int action, void* data); + +int domainEventGraphicsCallback_cgo(virConnectPtr c, virDomainPtr d, + int phase, const virDomainEventGraphicsAddress *local, + const virDomainEventGraphicsAddress *remote, + const char *authScheme, + const virDomainEventGraphicsSubject *subject, void* data); + +int domainEventIOErrorReasonCallback_cgo(virConnectPtr c, virDomainPtr d, + const char *srcPath, const char *devAlias, + int action, const char *reason, void* data); + +int domainEventBlockJobCallback_cgo(virConnectPtr c, virDomainPtr d, + const char *disk, int type, int status, void* data); + +int domainEventDiskChangeCallback_cgo(virConnectPtr c, virDomainPtr d, + const char *oldSrcPath, const char *newSrcPath, + const char *devAlias, int reason, void* data); + +int domainEventTrayChangeCallback_cgo(virConnectPtr c, virDomainPtr d, + const char *devAlias, int reason, void* data); + +int domainEventReasonCallback_cgo(virConnectPtr c, virDomainPtr d, + int reason, void* data); + +int domainEventBalloonChangeCallback_cgo(virConnectPtr c, virDomainPtr d, + unsigned long long actual, void* data); + +int domainEventDeviceRemovedCallback_cgo(virConnectPtr c, virDomainPtr d, + const char *devAlias, void* data); +*/ +import "C" + +func init() { + // libvirt won't print to stderr + C.virSetErrorFunc(nil, C.virErrorFunc(unsafe.Pointer(C.virErrorFuncDummy))) +} + +type VirConnection struct { + ptr C.virConnectPtr +} + +func NewVirConnection(uri string) (VirConnection, error) { + var cUri *C.char + if uri != "" { + cUri = C.CString(uri) + defer C.free(unsafe.Pointer(cUri)) + } + ptr := C.virConnectOpen(cUri) + if ptr == nil { + return VirConnection{}, GetLastError() + } + obj := VirConnection{ptr: ptr} + return obj, nil +} + +func NewVirConnectionReadOnly(uri string) (VirConnection, error) { + var cUri *C.char + if uri != "" { + cUri = C.CString(uri) + defer C.free(unsafe.Pointer(cUri)) + } + ptr := C.virConnectOpenReadOnly(cUri) + if ptr == nil { + return VirConnection{}, GetLastError() + } + obj := VirConnection{ptr: ptr} + return obj, nil +} + +func GetLastError() VirError { + var virErr VirError + err := C.virGetLastError() + + virErr.Code = int(err.code) + virErr.Domain = int(err.domain) + virErr.Message = C.GoString(err.message) + virErr.Level = int(err.level) + + C.virResetError(err) + return virErr +} + +func (c *VirConnection) CloseConnection() (int, error) { + result := int(C.virConnectClose(c.ptr)) + if result == -1 { + return result, GetLastError() + } + return result, nil +} + +func (c *VirConnection) UnrefAndCloseConnection() error { + closeRes := 1 + var err error + for closeRes > 0 { + closeRes, err = c.CloseConnection() + if err != nil { + return err + } + } + return nil +} + +func (c *VirConnection) GetCapabilities() (string, error) { + str := C.virConnectGetCapabilities(c.ptr) + if str == nil { + return "", GetLastError() + } + capabilities := C.GoString(str) + C.free(unsafe.Pointer(str)) + return capabilities, nil +} + +func (c *VirConnection) GetNodeInfo() (VirNodeInfo, error) { + ni := VirNodeInfo{} + var ptr C.virNodeInfo + result := C.virNodeGetInfo(c.ptr, (*C.virNodeInfo)(unsafe.Pointer(&ptr))) + if result == -1 { + return ni, GetLastError() + } + ni.ptr = ptr + return ni, nil +} + +func (c *VirConnection) GetHostname() (string, error) { + str := C.virConnectGetHostname(c.ptr) + if str == nil { + return "", GetLastError() + } + hostname := C.GoString(str) + C.free(unsafe.Pointer(str)) + return hostname, nil +} + +func (c *VirConnection) GetLibVersion() (uint32, error) { + var version C.ulong + if err := C.virConnectGetLibVersion(c.ptr, &version); err < 0 { + return 0, GetLastError() + } + return uint32(version), nil +} + +func (c *VirConnection) GetType() (string, error) { + str := C.virConnectGetType(c.ptr) + if str == nil { + return "", GetLastError() + } + hypDriver := C.GoString(str) + return hypDriver, nil +} + +func (c *VirConnection) IsAlive() (bool, error) { + result := C.virConnectIsAlive(c.ptr) + if result == -1 { + return false, GetLastError() + } + if result == 1 { + return true, nil + } + return false, nil +} + +func (c *VirConnection) IsEncrypted() (bool, error) { + result := C.virConnectIsEncrypted(c.ptr) + if result == -1 { + return false, GetLastError() + } + if result == 1 { + return true, nil + } + return false, nil +} + +func (c *VirConnection) IsSecure() (bool, error) { + result := C.virConnectIsSecure(c.ptr) + if result == -1 { + return false, GetLastError() + } + if result == 1 { + return true, nil + } + return false, nil +} + +func (c *VirConnection) ListDefinedDomains() ([]string, error) { + var names [1024](*C.char) + namesPtr := unsafe.Pointer(&names) + numDomains := C.virConnectListDefinedDomains( + c.ptr, + (**C.char)(namesPtr), + 1024) + if numDomains == -1 { + return nil, GetLastError() + } + goNames := make([]string, numDomains) + for k := 0; k < int(numDomains); k++ { + goNames[k] = C.GoString(names[k]) + C.free(unsafe.Pointer(names[k])) + } + return goNames, nil +} + +func (c *VirConnection) ListDomains() ([]uint32, error) { + var cDomainsIds [512](uint32) + cDomainsPointer := unsafe.Pointer(&cDomainsIds) + numDomains := C.virConnectListDomains(c.ptr, (*C.int)(cDomainsPointer), 512) + if numDomains == -1 { + return nil, GetLastError() + } + + return cDomainsIds[:numDomains], nil +} + +func (c *VirConnection) ListInterfaces() ([]string, error) { + const maxIfaces = 1024 + var names [maxIfaces](*C.char) + namesPtr := unsafe.Pointer(&names) + numIfaces := C.virConnectListInterfaces( + c.ptr, + (**C.char)(namesPtr), + maxIfaces) + if numIfaces == -1 { + return nil, GetLastError() + } + goNames := make([]string, numIfaces) + for k := 0; k < int(numIfaces); k++ { + goNames[k] = C.GoString(names[k]) + C.free(unsafe.Pointer(names[k])) + } + return goNames, nil +} + +func (c *VirConnection) ListNetworks() ([]string, error) { + const maxNets = 1024 + var names [maxNets](*C.char) + namesPtr := unsafe.Pointer(&names) + numNetworks := C.virConnectListNetworks( + c.ptr, + (**C.char)(namesPtr), + maxNets) + if numNetworks == -1 { + return nil, GetLastError() + } + goNames := make([]string, numNetworks) + for k := 0; k < int(numNetworks); k++ { + goNames[k] = C.GoString(names[k]) + C.free(unsafe.Pointer(names[k])) + } + return goNames, nil +} + +func (c *VirConnection) ListStoragePools() ([]string, error) { + const maxPools = 1024 + var names [maxPools](*C.char) + namesPtr := unsafe.Pointer(&names) + numStoragePools := C.virConnectListStoragePools( + c.ptr, + (**C.char)(namesPtr), + maxPools) + if numStoragePools == -1 { + return nil, GetLastError() + } + goNames := make([]string, numStoragePools) + for k := 0; k < int(numStoragePools); k++ { + goNames[k] = C.GoString(names[k]) + C.free(unsafe.Pointer(names[k])) + } + return goNames, nil +} + +func (c *VirConnection) LookupDomainById(id uint32) (VirDomain, error) { + ptr := C.virDomainLookupByID(c.ptr, C.int(id)) + if ptr == nil { + return VirDomain{}, GetLastError() + } + return VirDomain{ptr: ptr}, nil +} + +func (c *VirConnection) LookupDomainByName(id string) (VirDomain, error) { + cName := C.CString(id) + defer C.free(unsafe.Pointer(cName)) + ptr := C.virDomainLookupByName(c.ptr, cName) + if ptr == nil { + return VirDomain{}, GetLastError() + } + return VirDomain{ptr: ptr}, nil +} + +func (c *VirConnection) DomainCreateXMLFromFile(xmlFile string, flags uint32) (VirDomain, error) { + xmlConfig, err := ioutil.ReadFile(xmlFile) + if err != nil { + return VirDomain{}, err + } + return c.DomainCreateXML(string(xmlConfig), flags) +} + +func (c *VirConnection) DomainCreateXML(xmlConfig string, flags uint32) (VirDomain, error) { + cXml := C.CString(string(xmlConfig)) + defer C.free(unsafe.Pointer(cXml)) + ptr := C.virDomainCreateXML(c.ptr, cXml, C.uint(flags)) + if ptr == nil { + return VirDomain{}, GetLastError() + } + return VirDomain{ptr: ptr}, nil +} + +func (c *VirConnection) DomainDefineXMLFromFile(xmlFile string) (VirDomain, error) { + xmlConfig, err := ioutil.ReadFile(xmlFile) + if err != nil { + return VirDomain{}, err + } + return c.DomainDefineXML(string(xmlConfig)) +} + +func (c *VirConnection) DomainDefineXML(xmlConfig string) (VirDomain, error) { + cXml := C.CString(string(xmlConfig)) + defer C.free(unsafe.Pointer(cXml)) + ptr := C.virDomainDefineXML(c.ptr, cXml) + if ptr == nil { + return VirDomain{}, GetLastError() + } + return VirDomain{ptr: ptr}, nil +} + +func (c *VirConnection) ListDefinedInterfaces() ([]string, error) { + const maxIfaces = 1024 + var names [maxIfaces](*C.char) + namesPtr := unsafe.Pointer(&names) + numIfaces := C.virConnectListDefinedInterfaces( + c.ptr, + (**C.char)(namesPtr), + maxIfaces) + if numIfaces == -1 { + return nil, GetLastError() + } + goNames := make([]string, numIfaces) + for k := 0; k < int(numIfaces); k++ { + goNames[k] = C.GoString(names[k]) + C.free(unsafe.Pointer(names[k])) + } + return goNames, nil +} + +func (c *VirConnection) ListDefinedNetworks() ([]string, error) { + const maxNets = 1024 + var names [maxNets](*C.char) + namesPtr := unsafe.Pointer(&names) + numNetworks := C.virConnectListDefinedNetworks( + c.ptr, + (**C.char)(namesPtr), + maxNets) + if numNetworks == -1 { + return nil, GetLastError() + } + goNames := make([]string, numNetworks) + for k := 0; k < int(numNetworks); k++ { + goNames[k] = C.GoString(names[k]) + C.free(unsafe.Pointer(names[k])) + } + return goNames, nil +} + +func (c *VirConnection) ListDefinedStoragePools() ([]string, error) { + const maxPools = 1024 + var names [maxPools](*C.char) + namesPtr := unsafe.Pointer(&names) + numStoragePools := C.virConnectListDefinedStoragePools( + c.ptr, + (**C.char)(namesPtr), + maxPools) + if numStoragePools == -1 { + return nil, GetLastError() + } + goNames := make([]string, numStoragePools) + for k := 0; k < int(numStoragePools); k++ { + goNames[k] = C.GoString(names[k]) + C.free(unsafe.Pointer(names[k])) + } + return goNames, nil +} + +func (c *VirConnection) NumOfDefinedInterfaces() (int, error) { + result := int(C.virConnectNumOfDefinedInterfaces(c.ptr)) + if result == -1 { + return 0, GetLastError() + } + return result, nil +} + +func (c *VirConnection) NumOfDefinedNetworks() (int, error) { + result := int(C.virConnectNumOfDefinedNetworks(c.ptr)) + if result == -1 { + return 0, GetLastError() + } + return result, nil +} + +func (c *VirConnection) NumOfDefinedStoragePools() (int, error) { + result := int(C.virConnectNumOfDefinedStoragePools(c.ptr)) + if result == -1 { + return 0, GetLastError() + } + return result, nil +} + +func (c *VirConnection) NumOfDomains() (int, error) { + result := int(C.virConnectNumOfDomains(c.ptr)) + if result == -1 { + return 0, GetLastError() + } + return result, nil +} + +func (c *VirConnection) NumOfInterfaces() (int, error) { + result := int(C.virConnectNumOfInterfaces(c.ptr)) + if result == -1 { + return 0, GetLastError() + } + return result, nil +} + +func (c *VirConnection) NumOfNetworks() (int, error) { + result := int(C.virConnectNumOfNetworks(c.ptr)) + if result == -1 { + return 0, GetLastError() + } + return result, nil +} + +func (c *VirConnection) NumOfNWFilters() (int, error) { + result := int(C.virConnectNumOfNWFilters(c.ptr)) + if result == -1 { + return 0, GetLastError() + } + return result, nil +} + +func (c *VirConnection) NumOfSecrets() (int, error) { + result := int(C.virConnectNumOfSecrets(c.ptr)) + if result == -1 { + return 0, GetLastError() + } + return result, nil +} + +func (c *VirConnection) NetworkDefineXMLFromFile(xmlFile string) (VirNetwork, error) { + xmlConfig, err := ioutil.ReadFile(xmlFile) + if err != nil { + return VirNetwork{}, err + } + return c.NetworkDefineXML(string(xmlConfig)) +} + +func (c *VirConnection) NetworkDefineXML(xmlConfig string) (VirNetwork, error) { + cXml := C.CString(string(xmlConfig)) + defer C.free(unsafe.Pointer(cXml)) + ptr := C.virNetworkDefineXML(c.ptr, cXml) + if ptr == nil { + return VirNetwork{}, GetLastError() + } + return VirNetwork{ptr: ptr}, nil +} + +func (c *VirConnection) LookupNetworkByName(name string) (VirNetwork, error) { + cName := C.CString(name) + defer C.free(unsafe.Pointer(cName)) + ptr := C.virNetworkLookupByName(c.ptr, cName) + if ptr == nil { + return VirNetwork{}, GetLastError() + } + return VirNetwork{ptr: ptr}, nil +} + +func (c *VirConnection) GetSysinfo(flags uint) (string, error) { + cStr := C.virConnectGetSysinfo(c.ptr, C.uint(flags)) + if cStr == nil { + return "", GetLastError() + } + info := C.GoString(cStr) + C.free(unsafe.Pointer(cStr)) + return info, nil +} + +func (c *VirConnection) GetURI() (string, error) { + cStr := C.virConnectGetURI(c.ptr) + if cStr == nil { + return "", GetLastError() + } + uri := C.GoString(cStr) + C.free(unsafe.Pointer(cStr)) + return uri, nil +} + +func (c *VirConnection) GetMaxVcpus(typeAttr string) (int, error) { + var cTypeAttr *C.char + if typeAttr != "" { + cTypeAttr = C.CString(typeAttr) + defer C.free(unsafe.Pointer(cTypeAttr)) + } + result := int(C.virConnectGetMaxVcpus(c.ptr, cTypeAttr)) + if result == -1 { + return 0, GetLastError() + } + return result, nil +} + +func (c *VirConnection) InterfaceDefineXMLFromFile(xmlFile string) (VirInterface, error) { + xmlConfig, err := ioutil.ReadFile(xmlFile) + if err != nil { + return VirInterface{}, err + } + return c.InterfaceDefineXML(string(xmlConfig), 0) +} + +func (c *VirConnection) InterfaceDefineXML(xmlConfig string, flags uint32) (VirInterface, error) { + cXml := C.CString(string(xmlConfig)) + defer C.free(unsafe.Pointer(cXml)) + ptr := C.virInterfaceDefineXML(c.ptr, cXml, C.uint(flags)) + if ptr == nil { + return VirInterface{}, GetLastError() + } + return VirInterface{ptr: ptr}, nil +} + +func (c *VirConnection) LookupInterfaceByName(name string) (VirInterface, error) { + cName := C.CString(name) + defer C.free(unsafe.Pointer(cName)) + ptr := C.virInterfaceLookupByName(c.ptr, cName) + if ptr == nil { + return VirInterface{}, GetLastError() + } + return VirInterface{ptr: ptr}, nil +} + +func (c *VirConnection) LookupInterfaceByMACString(mac string) (VirInterface, error) { + cName := C.CString(mac) + defer C.free(unsafe.Pointer(cName)) + ptr := C.virInterfaceLookupByMACString(c.ptr, cName) + if ptr == nil { + return VirInterface{}, GetLastError() + } + return VirInterface{ptr: ptr}, nil +} + +func (c *VirConnection) StoragePoolDefineXMLFromFile(xmlFile string) (VirStoragePool, error) { + xmlConfig, err := ioutil.ReadFile(xmlFile) + if err != nil { + return VirStoragePool{}, err + } + return c.StoragePoolDefineXML(string(xmlConfig), 0) +} + +func (c *VirConnection) StoragePoolDefineXML(xmlConfig string, flags uint32) (VirStoragePool, error) { + cXml := C.CString(string(xmlConfig)) + defer C.free(unsafe.Pointer(cXml)) + ptr := C.virStoragePoolDefineXML(c.ptr, cXml, C.uint(flags)) + if ptr == nil { + return VirStoragePool{}, GetLastError() + } + return VirStoragePool{ptr: ptr}, nil +} + +func (c *VirConnection) LookupStoragePoolByName(name string) (VirStoragePool, error) { + cName := C.CString(name) + defer C.free(unsafe.Pointer(cName)) + ptr := C.virStoragePoolLookupByName(c.ptr, cName) + if ptr == nil { + return VirStoragePool{}, GetLastError() + } + return VirStoragePool{ptr: ptr}, nil +} + +func (c *VirConnection) LookupStoragePoolByUUIDString(uuid string) (VirStoragePool, error) { + cUuid := C.CString(uuid) + defer C.free(unsafe.Pointer(cUuid)) + ptr := C.virStoragePoolLookupByUUIDString(c.ptr, cUuid) + if ptr == nil { + return VirStoragePool{}, GetLastError() + } + return VirStoragePool{ptr: ptr}, nil +} + +func (c *VirConnection) NWFilterDefineXMLFromFile(xmlFile string) (VirNWFilter, error) { + xmlConfig, err := ioutil.ReadFile(xmlFile) + if err != nil { + return VirNWFilter{}, err + } + return c.NWFilterDefineXML(string(xmlConfig)) +} + +func (c *VirConnection) NWFilterDefineXML(xmlConfig string) (VirNWFilter, error) { + cXml := C.CString(string(xmlConfig)) + defer C.free(unsafe.Pointer(cXml)) + ptr := C.virNWFilterDefineXML(c.ptr, cXml) + if ptr == nil { + return VirNWFilter{}, GetLastError() + } + return VirNWFilter{ptr: ptr}, nil +} + +func (c *VirConnection) LookupNWFilterByName(name string) (VirNWFilter, error) { + cName := C.CString(name) + defer C.free(unsafe.Pointer(cName)) + ptr := C.virNWFilterLookupByName(c.ptr, cName) + if ptr == nil { + return VirNWFilter{}, GetLastError() + } + return VirNWFilter{ptr: ptr}, nil +} + +func (c *VirConnection) LookupNWFilterByUUIDString(uuid string) (VirNWFilter, error) { + cUuid := C.CString(uuid) + defer C.free(unsafe.Pointer(cUuid)) + ptr := C.virNWFilterLookupByUUIDString(c.ptr, cUuid) + if ptr == nil { + return VirNWFilter{}, GetLastError() + } + return VirNWFilter{ptr: ptr}, nil +} + +func (c *VirConnection) LookupStorageVolByKey(key string) (VirStorageVol, error) { + cKey := C.CString(key) + defer C.free(unsafe.Pointer(cKey)) + ptr := C.virStorageVolLookupByKey(c.ptr, cKey) + if ptr == nil { + return VirStorageVol{}, GetLastError() + } + return VirStorageVol{ptr: ptr}, nil +} + +func (c *VirConnection) LookupStorageVolByPath(path string) (VirStorageVol, error) { + cPath := C.CString(path) + defer C.free(unsafe.Pointer(cPath)) + ptr := C.virStorageVolLookupByPath(c.ptr, cPath) + if ptr == nil { + return VirStorageVol{}, GetLastError() + } + return VirStorageVol{ptr: ptr}, nil +} + +func (c *VirConnection) SecretDefineXMLFromFile(xmlFile string) (VirSecret, error) { + xmlConfig, err := ioutil.ReadFile(xmlFile) + if err != nil { + return VirSecret{}, err + } + return c.SecretDefineXML(string(xmlConfig), 0) +} + +func (c *VirConnection) SecretDefineXML(xmlConfig string, flags uint32) (VirSecret, error) { + cXml := C.CString(string(xmlConfig)) + defer C.free(unsafe.Pointer(cXml)) + ptr := C.virSecretDefineXML(c.ptr, cXml, C.uint(flags)) + if ptr == nil { + return VirSecret{}, GetLastError() + } + return VirSecret{ptr: ptr}, nil +} + +func (c *VirConnection) LookupSecretByUUIDString(uuid string) (VirSecret, error) { + cUuid := C.CString(uuid) + defer C.free(unsafe.Pointer(cUuid)) + ptr := C.virSecretLookupByUUIDString(c.ptr, cUuid) + if ptr == nil { + return VirSecret{}, GetLastError() + } + return VirSecret{ptr: ptr}, nil +} + +func (c *VirConnection) LookupSecretByUsage(usageType int, usageID string) (VirSecret, error) { + cUsageID := C.CString(usageID) + defer C.free(unsafe.Pointer(cUsageID)) + ptr := C.virSecretLookupByUsage(c.ptr, C.int(usageType), cUsageID) + if ptr == nil { + return VirSecret{}, GetLastError() + } + return VirSecret{ptr: ptr}, nil +} + +func (c *VirConnection) ListAllInterfaces(flags uint32) ([]VirInterface, error) { + var cList *C.virInterfacePtr + numIfaces := C.virConnectListAllInterfaces(c.ptr, (**C.virInterfacePtr)(&cList), C.uint(flags)) + if numIfaces == -1 { + return nil, GetLastError() + } + hdr := reflect.SliceHeader{ + Data: uintptr(unsafe.Pointer(cList)), + Len: int(numIfaces), + Cap: int(numIfaces), + } + var ifaces []VirInterface + slice := *(*[]C.virInterfacePtr)(unsafe.Pointer(&hdr)) + for _, ptr := range slice { + ifaces = append(ifaces, VirInterface{ptr}) + } + C.free(unsafe.Pointer(cList)) + return ifaces, nil +} + +func (c *VirConnection) ListAllNetworks(flags uint32) ([]VirNetwork, error) { + var cList *C.virNetworkPtr + numNets := C.virConnectListAllNetworks(c.ptr, (**C.virNetworkPtr)(&cList), C.uint(flags)) + if numNets == -1 { + return nil, GetLastError() + } + hdr := reflect.SliceHeader{ + Data: uintptr(unsafe.Pointer(cList)), + Len: int(numNets), + Cap: int(numNets), + } + var nets []VirNetwork + slice := *(*[]C.virNetworkPtr)(unsafe.Pointer(&hdr)) + for _, ptr := range slice { + nets = append(nets, VirNetwork{ptr}) + } + C.free(unsafe.Pointer(cList)) + return nets, nil +} + +func (c *VirConnection) ListAllDomains(flags uint32) ([]VirDomain, error) { + var cList *C.virDomainPtr + numDomains := C.virConnectListAllDomains(c.ptr, (**C.virDomainPtr)(&cList), C.uint(flags)) + if numDomains == -1 { + return nil, GetLastError() + } + hdr := reflect.SliceHeader{ + Data: uintptr(unsafe.Pointer(cList)), + Len: int(numDomains), + Cap: int(numDomains), + } + var domains []VirDomain + slice := *(*[]C.virDomainPtr)(unsafe.Pointer(&hdr)) + for _, ptr := range slice { + domains = append(domains, VirDomain{ptr}) + } + C.free(unsafe.Pointer(cList)) + return domains, nil +} + +func (c *VirConnection) ListAllNWFilters(flags uint32) ([]VirNWFilter, error) { + var cList *C.virNWFilterPtr + numNWFilters := C.virConnectListAllNWFilters(c.ptr, (**C.virNWFilterPtr)(&cList), C.uint(flags)) + if numNWFilters == -1 { + return nil, GetLastError() + } + hdr := reflect.SliceHeader{ + Data: uintptr(unsafe.Pointer(cList)), + Len: int(numNWFilters), + Cap: int(numNWFilters), + } + var filters []VirNWFilter + slice := *(*[]C.virNWFilterPtr)(unsafe.Pointer(&hdr)) + for _, ptr := range slice { + filters = append(filters, VirNWFilter{ptr}) + } + C.free(unsafe.Pointer(cList)) + return filters, nil +} + +func (c *VirConnection) ListAllStoragePools(flags uint32) ([]VirStoragePool, error) { + var cList *C.virStoragePoolPtr + numPools := C.virConnectListAllStoragePools(c.ptr, (**C.virStoragePoolPtr)(&cList), C.uint(flags)) + if numPools == -1 { + return nil, GetLastError() + } + hdr := reflect.SliceHeader{ + Data: uintptr(unsafe.Pointer(cList)), + Len: int(numPools), + Cap: int(numPools), + } + var pools []VirStoragePool + slice := *(*[]C.virStoragePoolPtr)(unsafe.Pointer(&hdr)) + for _, ptr := range slice { + pools = append(pools, VirStoragePool{ptr}) + } + C.free(unsafe.Pointer(cList)) + return pools, nil +} + +type DomainEventCallback func(c *VirConnection, d *VirDomain, + event interface{}, f func()) int + +type domainCallbackContext struct { + cb *DomainEventCallback + f func() +} + +func (c *VirConnection) DomainEventRegister(dom VirDomain, + eventId int, + callback *DomainEventCallback, + opaque func()) int { + var callbackPtr unsafe.Pointer + context := domainCallbackContext{ + cb: callback, + f: opaque, + } + + switch eventId { + case VIR_DOMAIN_EVENT_ID_LIFECYCLE: + callbackPtr = unsafe.Pointer(C.domainEventLifecycleCallback_cgo) + case VIR_DOMAIN_EVENT_ID_REBOOT: + case VIR_DOMAIN_EVENT_ID_CONTROL_ERROR: + callbackPtr = unsafe.Pointer(C.domainEventGenericCallback_cgo) + case VIR_DOMAIN_EVENT_ID_RTC_CHANGE: + callbackPtr = unsafe.Pointer(C.domainEventRTCChangeCallback_cgo) + case VIR_DOMAIN_EVENT_ID_WATCHDOG: + callbackPtr = unsafe.Pointer(C.domainEventWatchdogCallback_cgo) + case VIR_DOMAIN_EVENT_ID_IO_ERROR: + callbackPtr = unsafe.Pointer(C.domainEventIOErrorCallback_cgo) + case VIR_DOMAIN_EVENT_ID_GRAPHICS: + callbackPtr = unsafe.Pointer(C.domainEventGraphicsCallback_cgo) + case VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON: + callbackPtr = unsafe.Pointer(C.domainEventIOErrorReasonCallback_cgo) + case VIR_DOMAIN_EVENT_ID_BLOCK_JOB: + // TODO Post 1.2.4, uncomment later + // case VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2: + callbackPtr = unsafe.Pointer(C.domainEventBlockJobCallback_cgo) + case VIR_DOMAIN_EVENT_ID_DISK_CHANGE: + callbackPtr = unsafe.Pointer(C.domainEventDiskChangeCallback_cgo) + case VIR_DOMAIN_EVENT_ID_TRAY_CHANGE: + callbackPtr = unsafe.Pointer(C.domainEventTrayChangeCallback_cgo) + case VIR_DOMAIN_EVENT_ID_PMWAKEUP: + case VIR_DOMAIN_EVENT_ID_PMSUSPEND: + case VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK: + callbackPtr = unsafe.Pointer(C.domainEventReasonCallback_cgo) + case VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE: + callbackPtr = unsafe.Pointer(C.domainEventBalloonChangeCallback_cgo) + case VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED: + callbackPtr = unsafe.Pointer(C.domainEventDeviceRemovedCallback_cgo) + default: + } + ret := C.virConnectDomainEventRegisterAny(c.ptr, dom.ptr, C.VIR_DOMAIN_EVENT_ID_LIFECYCLE, + C.virConnectDomainEventGenericCallback(callbackPtr), + unsafe.Pointer(&context), + nil) + return int(ret) +} + +func (c *VirConnection) DomainEventDeregister(callbackId int) int { + // Deregister the callback + return int(C.virConnectDomainEventDeregisterAny(c.ptr, C.int(callbackId))) +} + +func EventRegisterDefaultImpl() int { + return int(C.virEventRegisterDefaultImpl()) +} + +func EventRunDefaultImpl() int { + return int(C.virEventRunDefaultImpl()) +} diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/libvirt_test.go b/vendor/gopkg.in/alexzorin/libvirt-go.v2/libvirt_test.go new file mode 100644 index 0000000..ca2ada2 --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/libvirt_test.go @@ -0,0 +1,873 @@ +package libvirt + +import ( + "testing" + "time" +) + +func buildTestConnection() VirConnection { + conn, err := NewVirConnection("test:///default") + if err != nil { + panic(err) + } + return conn +} + +func TestConnection(t *testing.T) { + conn, err := NewVirConnection("test:///default") + if err != nil { + t.Error(err) + return + } + _, err = conn.CloseConnection() + if err != nil { + t.Error(err) + return + } +} + +func TestConnectionReadOnly(t *testing.T) { + conn, err := NewVirConnectionReadOnly("test:///default") + if err != nil { + t.Error(err) + return + } + defer conn.CloseConnection() + + _, err = conn.NetworkDefineXML(` + ` + time.Now().String() + ` + + + + + `) + if err == nil { + t.Fatal("writing on a read only connection") + } +} + +func TestInvalidConnection(t *testing.T) { + _, err := NewVirConnection("invalid_transport:///default") + if err == nil { + t.Error("Non-existent transport works") + } +} + +func TestGetType(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + tp, err := conn.GetType() + if err != nil { + t.Error(err) + return + } + if tp != "Test" { + t.Fatalf("type should have been test: %s", tp) + return + } +} + +func TestIsAlive(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + alive, err := conn.IsAlive() + if err != nil { + t.Error(err) + return + } + if !alive { + t.Fatal("Connection should be alive") + return + } +} + +func TestIsEncryptedAndSecure(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + secure, err := conn.IsSecure() + if err != nil { + t.Log(err) + return + } + enc, err := conn.IsEncrypted() + if err != nil { + t.Error(err) + return + } + if !secure { + t.Fatal("Test driver should be secure") + return + } + if enc { + t.Fatal("Test driver should not be encrypted") + return + } +} + +func TestCapabilities(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + capabilities, err := conn.GetCapabilities() + if err != nil { + t.Error(err) + return + } + if capabilities == "" { + t.Error("Capabilities was empty") + return + } +} + +func TestGetNodeInfo(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + ni, err := conn.GetNodeInfo() + if err != nil { + t.Error(err) + return + } + if ni.GetModel() != "i686" { + t.Error("Expected i686 model in test transport") + return + } +} + +func TestHostname(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + hostname, err := conn.GetHostname() + if err != nil { + t.Error(err) + return + } + if hostname == "" { + t.Error("Hostname was empty") + return + } +} + +func TestLibVersion(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + version, err := conn.GetLibVersion() + if err != nil { + t.Error(err) + return + } + if version == 0 { + t.Error("Version was 0") + return + } +} + +func TestListDefinedDomains(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + doms, err := conn.ListDefinedDomains() + if err != nil { + t.Error(err) + return + } + if doms == nil { + t.Fatal("ListDefinedDomains shouldn't be nil") + return + } +} + +func TestListDomains(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + doms, err := conn.ListDomains() + if err != nil { + t.Error(err) + return + } + if doms == nil { + t.Fatal("ListDomains shouldn't be nil") + return + } +} + +func TestListInterfaces(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + _, err := conn.ListInterfaces() + if err != nil { + t.Error(err) + return + } +} + +func TestListNetworks(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + _, err := conn.ListNetworks() + if err != nil { + t.Error(err) + return + } +} + +func TestListStoragePools(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + _, err := conn.ListStoragePools() + if err != nil { + t.Error(err) + return + } +} + +func TestLookupDomainById(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + ids, err := conn.ListDomains() + if err != nil { + t.Error(err) + return + } + t.Log(ids) + if len(ids) == 0 { + t.Fatal("Length of ListDomains shouldn't be zero") + return + } + dom, err := conn.LookupDomainById(ids[0]) + if err != nil { + t.Error(err) + return + } + defer dom.Free() +} + +func TestLookupInvalidDomainById(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + _, err := conn.LookupDomainById(12345) + if err == nil { + t.Error("Domain #12345 shouldn't exist in test transport") + return + } +} + +func TestLookupDomainByName(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + dom, err := conn.LookupDomainByName("test") + if err != nil { + t.Error(err) + return + } + defer dom.Free() +} + +func TestLookupInvalidDomainByName(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + _, err := conn.LookupDomainByName("non_existent_domain") + if err == nil { + t.Error("Could find non-existent domain by name") + return + } +} + +func TestDomainCreateXML(t *testing.T) { + conn := buildTestConnection() + nodom := VirDomain{} + defer conn.CloseConnection() + // Test a minimally valid xml + defName := time.Now().String() + xml := ` + ` + defName + ` + 8192 + + hvm + + ` + dom, err := conn.DomainCreateXML(xml, VIR_DOMAIN_NONE) + if err != nil { + t.Error(err) + return + } + defer func() { + if dom != nodom { + dom.Destroy() + dom.Free() + } + }() + name, err := dom.GetName() + if err != nil { + t.Error(err) + return + } + if name != defName { + t.Fatalf("Name was not '%s': %s", defName, name) + return + } + + // Destroy the domain: it should not be persistent + if err := dom.Destroy(); err != nil { + t.Error(err) + return + } + dom = nodom + + testeddom, err := conn.LookupDomainByName(defName) + if testeddom != nodom { + t.Fatal("Created domain is persisting") + return + } +} + +func TestDomainDefineXML(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + // Test a minimally valid xml + defName := time.Now().String() + xml := ` + ` + defName + ` + 8192 + + hvm + + ` + dom, err := conn.DomainDefineXML(xml) + if err != nil { + t.Error(err) + return + } + defer func() { + dom.Undefine() + dom.Free() + }() + name, err := dom.GetName() + if err != nil { + t.Error(err) + return + } + if name != defName { + t.Fatalf("Name was not 'test': %s", name) + return + } + // And an invalid one + xml = `` + _, err = conn.DomainDefineXML(xml) + if err == nil { + t.Fatal("Should have had an error") + return + } +} + +func TestListDefinedInterfaces(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + _, err := conn.ListDefinedInterfaces() + if err != nil { + t.Error(err) + return + } +} + +func TestListDefinedNetworks(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + _, err := conn.ListDefinedNetworks() + if err != nil { + t.Error(err) + return + } +} + +func TestListDefinedStoragePools(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + _, err := conn.ListDefinedStoragePools() + if err != nil { + t.Error(err) + return + } +} + +func TestNumOfDefinedInterfaces(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + if _, err := conn.NumOfDefinedInterfaces(); err != nil { + t.Error(err) + return + } +} + +func TestNumOfDefinedNetworks(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + if _, err := conn.NumOfDefinedNetworks(); err != nil { + t.Error(err) + return + } +} + +func TestNumOfDefinedStoragePools(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + if _, err := conn.NumOfDefinedStoragePools(); err != nil { + t.Error(err) + return + } +} + +func TestNumOfDomains(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + if _, err := conn.NumOfDomains(); err != nil { + t.Error(err) + return + } +} + +func TestNumOfInterfaces(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + if _, err := conn.NumOfInterfaces(); err != nil { + t.Error(err) + return + } +} + +func TestNumOfNetworks(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + if _, err := conn.NumOfNetworks(); err != nil { + t.Error(err) + return + } +} + +func TestNumOfNWFilters(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + if _, err := conn.NumOfNWFilters(); err == nil { + t.Fatalf("NumOfNWFilters should fail due to no support on test driver") + return + } +} + +func TestNumOfSecrets(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + if _, err := conn.NumOfSecrets(); err == nil { + t.Fatalf("NumOfSecrets should fail due to no support on test driver") + return + } +} + +func TestGetURI(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + uri, err := conn.GetURI() + if err != nil { + t.Error(err) + } + origUri := "test:///default" + if uri != origUri { + t.Fatalf("should be %s but got %s", origUri, uri) + } +} + +func TestGetMaxVcpus(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + _, err := conn.GetMaxVcpus("") + if err != nil { + t.Error(err) + } +} + +func TestInterfaceDefineXML(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + defName := "ethTest0" + xml := `` + iface, err := conn.InterfaceDefineXML(xml, 0) + if err != nil { + t.Fatal(err) + } + defer iface.Undefine() + name, err := iface.GetName() + if err != nil { + t.Error(err) + return + } + if name != defName { + t.Fatalf("Expected interface name: %s,got: %s", defName, name) + return + } + // Invalid configuration + xml = `` + _, err = conn.InterfaceDefineXML(xml, 0) + if err == nil { + t.Fatal("Should have had an error") + return + } +} + +func TestLookupInterfaceByName(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + testEth := "eth1" + iface, err := conn.LookupInterfaceByName(testEth) + if err != nil { + t.Error(err) + return + } + var ifName string + ifName, err = iface.GetName() + if err != nil { + t.Error(err) + return + } + if ifName != testEth { + t.Fatalf("expected interface name: %s ,got: %s", testEth, ifName) + } +} + +func TestLookupInterfaceByMACString(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + testMAC := "aa:bb:cc:dd:ee:ff" + iface, err := conn.LookupInterfaceByMACString(testMAC) + if err != nil { + t.Error(err) + return + } + var ifMAC string + ifMAC, err = iface.GetMACString() + if err != nil { + t.Error(err) + return + } + if ifMAC != testMAC { + t.Fatalf("expected interface MAC: %s ,got: %s", testMAC, ifMAC) + } +} + +func TestStoragePoolDefineXML(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + defName := "default-pool-test-0" + xml := `default-pool-test-0 + /default-pool` + pool, err := conn.StoragePoolDefineXML(xml, 0) + if err != nil { + t.Fatal(err) + return + } + defer pool.Free() + defer pool.Undefine() + name, err := pool.GetName() + if err != nil { + t.Error(err) + return + } + if name != defName { + t.Fatalf("Expected storage pool name: %s,got: %s", defName, name) + return + } + // Invalid configuration + xml = `` + _, err = conn.StoragePoolDefineXML(xml, 0) + if err == nil { + t.Fatal("Should have had an error") + return + } +} + +func TestLookupStoragePoolByName(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + testPool := "default-pool" + pool, err := conn.LookupStoragePoolByName(testPool) + if err != nil { + t.Error(err) + return + } + defer pool.Free() + var poolName string + poolName, err = pool.GetName() + if err != nil { + t.Error(err) + return + } + if poolName != testPool { + t.Fatalf("expected storage pool name: %s ,got: %s", testPool, poolName) + } +} + +func TestLookupStoragePoolByUUIDString(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + poolName := "default-pool" + pool, err := conn.LookupStoragePoolByName(poolName) + if err != nil { + t.Error(err) + return + } + defer pool.Free() + var poolUUID string + poolUUID, err = pool.GetUUIDString() + if err != nil { + t.Error(err) + return + } + pool, err = conn.LookupStoragePoolByUUIDString(poolUUID) + if err != nil { + t.Error(err) + return + } + name, err := pool.GetName() + if err != nil { + t.Error(err) + } + if name != poolName { + t.Fatalf("fetching by UUID: expected storage pool name: %s ,got: %s", name, poolName) + } +} + +func TestLookupStorageVolByKey(t *testing.T) { + pool, conn := buildTestStoragePool("") + defer func() { + pool.Undefine() + pool.Free() + conn.CloseConnection() + }() + if err := pool.Create(0); err != nil { + t.Error(err) + return + } + defer pool.Destroy() + defPoolPath := "default-pool" + defVolName := time.Now().String() + defVolKey := "/" + defPoolPath + "/" + defVolName + vol, err := pool.StorageVolCreateXML(testStorageVolXML(defVolName, defPoolPath), 0) + if err != nil { + t.Error(err) + return + } + defer func() { + vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) + vol.Free() + }() + vol, err = conn.LookupStorageVolByKey(defVolKey) + if err != nil { + t.Error(err) + return + } + key, err := vol.GetKey() + if err != nil { + t.Error(err) + return + } + if key != defVolKey { + t.Fatalf("expected storage volume key: %s ,got: %s", defVolKey, key) + } +} + +func TestLookupStorageVolByPath(t *testing.T) { + pool, conn := buildTestStoragePool("") + defer func() { + pool.Undefine() + pool.Free() + conn.CloseConnection() + }() + if err := pool.Create(0); err != nil { + t.Error(err) + return + } + defer pool.Destroy() + defPoolPath := "default-pool" + defVolName := time.Now().String() + defVolPath := "/" + defPoolPath + "/" + defVolName + vol, err := pool.StorageVolCreateXML(testStorageVolXML(defVolName, defPoolPath), 0) + if err != nil { + t.Error(err) + return + } + defer func() { + vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) + vol.Free() + }() + vol, err = conn.LookupStorageVolByPath(defVolPath) + if err != nil { + t.Error(err) + return + } + path, err := vol.GetPath() + if err != nil { + t.Error(err) + return + } + if path != defVolPath { + t.Fatalf("expected storage volume path: %s ,got: %s", defVolPath, path) + } +} + +func TestListAllDomains(t *testing.T) { + conn := buildTestConnection() + defer conn.CloseConnection() + doms, err := conn.ListAllDomains(VIR_CONNECT_LIST_DOMAINS_PERSISTENT) + if err != nil { + t.Error(err) + return + } + if len(doms) == 0 { + t.Fatal("length of []VirDomain shouldn't be 0") + } + testDomName := "test" + found := false + for _, dom := range doms { + name, _ := dom.GetName() + if name == testDomName { + found = true + } + // not mandatory for the tests but lets make it in a proper way + dom.Free() + } + if found == false { + t.Fatalf("domain %s not found", testDomName) + } +} + +func TestListAllNetworks(t *testing.T) { + testNetwork := time.Now().String() + net, conn := buildTestNetwork(testNetwork) + defer func() { + // actually,no nicessaty to destroy as the network is being removed as soon as + // the test connection is closed + net.Destroy() + net.Free() + conn.CloseConnection() + }() + nets, err := conn.ListAllNetworks(VIR_CONNECT_LIST_NETWORKS_INACTIVE) + if err != nil { + t.Fatal(err) + } + if len(nets) == 0 { + t.Fatal("length of []VirNetwork shouldn't be 0") + } + found := false + for _, n := range nets { + name, _ := n.GetName() + if name == testNetwork { + found = true + } + n.Free() + } + if found == false { + t.Fatalf("network %s not found", testNetwork) + } +} + +func TestListAllStoragePools(t *testing.T) { + testStoragePool := "default-pool-test-1" + pool, conn := buildTestStoragePool(testStoragePool) + defer func() { + pool.Undefine() + pool.Free() + conn.CloseConnection() + }() + pools, err := conn.ListAllStoragePools(VIR_STORAGE_POOL_INACTIVE) + if err != nil { + t.Fatal(err) + } + if len(pools) == 0 { + t.Fatal("length of []VirStoragePool shouldn't be 0") + } + found := false + for _, p := range pools { + name, _ := p.GetName() + if name == testStoragePool { + found = true + } + p.Free() + } + if found == false { + t.Fatalf("storage pool %s not found", testStoragePool) + } +} + +func TestDomainEventRegister(t *testing.T) { + + callbackId := -1 + + conn := buildTestConnection() + defer func() { + if callbackId >= 0 { + conn.DomainEventDeregister(callbackId) + } + conn.CloseConnection() + }() + + nodom := VirDomain{} + defName := time.Now().String() + + nbEvents := 0 + + callback := DomainEventCallback( + func(c *VirConnection, d *VirDomain, eventDetails interface{}, f func()) int { + if lifecycleEvent, ok := eventDetails.(DomainLifecycleEvent); ok { + if lifecycleEvent.Event == VIR_DOMAIN_EVENT_STARTED { + domName, _ := d.GetName() + if defName != domName { + t.Fatalf("Name was not '%s': %s", defName, domName) + } + } + } else { + t.Fatalf("event details isn't DomainLifecycleEvent") + } + f() + return 0 + }, + ) + + EventRegisterDefaultImpl() + + callbackId = conn.DomainEventRegister( + VirDomain{}, + VIR_DOMAIN_EVENT_ID_LIFECYCLE, + &callback, + func() { + nbEvents++ + }, + ) + + // Test a minimally valid xml + xml := ` + ` + defName + ` + 8192 + + hvm + + ` + dom, err := conn.DomainCreateXML(xml, VIR_DOMAIN_NONE) + if err != nil { + t.Error(err) + return + } + + // This is blocking as long as there is no message + EventRunDefaultImpl() + if nbEvents == 0 { + t.Fatal("At least one event was expected") + } + + defer func() { + if dom != nodom { + dom.Destroy() + dom.Free() + } + }() + + // Deregister the event + if ret := conn.DomainEventDeregister(callbackId); ret < 0 { + t.Fatal("Event deregistration failed") + } + callbackId = -1 // Don't deregister twice +} diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/network.go b/vendor/gopkg.in/alexzorin/libvirt-go.v2/network.go new file mode 100644 index 0000000..87b6b0a --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/network.go @@ -0,0 +1,147 @@ +package libvirt + +/* +#cgo LDFLAGS: -lvirt -ldl +#include +#include +#include +*/ +import "C" + +import ( + "unsafe" +) + +type VirNetwork struct { + ptr C.virNetworkPtr +} + +func (n *VirNetwork) Free() error { + if result := C.virNetworkFree(n.ptr); result != 0 { + return GetLastError() + } + return nil +} + +func (n *VirNetwork) Create() error { + result := C.virNetworkCreate(n.ptr) + if result == -1 { + return GetLastError() + } + return nil +} + +func (n *VirNetwork) Destroy() error { + result := C.virNetworkDestroy(n.ptr) + if result == -1 { + return GetLastError() + } + return nil +} + +func (n *VirNetwork) IsActive() (bool, error) { + result := C.virNetworkIsActive(n.ptr) + if result == -1 { + return false, GetLastError() + } + if result == 1 { + return true, nil + } + return false, nil +} + +func (n *VirNetwork) IsPersistent() (bool, error) { + result := C.virNetworkIsPersistent(n.ptr) + if result == -1 { + return false, GetLastError() + } + if result == 1 { + return true, nil + } + return false, nil +} + +func (n *VirNetwork) GetAutostart() (bool, error) { + var out C.int + result := C.virNetworkGetAutostart(n.ptr, (*C.int)(unsafe.Pointer(&out))) + if result == -1 { + return false, GetLastError() + } + switch out { + case 1: + return true, nil + default: + return false, nil + } +} + +func (n *VirNetwork) SetAutostart(autostart bool) error { + var cAutostart C.int + switch autostart { + case true: + cAutostart = 1 + default: + cAutostart = 0 + } + result := C.virNetworkSetAutostart(n.ptr, cAutostart) + if result == -1 { + return GetLastError() + } + return nil +} + +func (n *VirNetwork) GetName() (string, error) { + name := C.virNetworkGetName(n.ptr) + if name == nil { + return "", GetLastError() + } + return C.GoString(name), nil +} + +func (n *VirNetwork) GetUUID() ([]byte, error) { + var cUuid [C.VIR_UUID_BUFLEN](byte) + cuidPtr := unsafe.Pointer(&cUuid) + result := C.virNetworkGetUUID(n.ptr, (*C.uchar)(cuidPtr)) + if result != 0 { + return []byte{}, GetLastError() + } + return C.GoBytes(cuidPtr, C.VIR_UUID_BUFLEN), nil +} + +func (n *VirNetwork) GetUUIDString() (string, error) { + var cUuid [C.VIR_UUID_STRING_BUFLEN](C.char) + cuidPtr := unsafe.Pointer(&cUuid) + result := C.virNetworkGetUUIDString(n.ptr, (*C.char)(cuidPtr)) + if result != 0 { + return "", GetLastError() + } + return C.GoString((*C.char)(cuidPtr)), nil +} + +func (n *VirNetwork) GetBridgeName() (string, error) { + result := C.virNetworkGetBridgeName(n.ptr) + if result == nil { + return "", GetLastError() + } + bridge := C.GoString(result) + C.free(unsafe.Pointer(result)) + return bridge, nil +} + +func (n *VirNetwork) GetXMLDesc(flags uint32) (string, error) { + result := C.virNetworkGetXMLDesc(n.ptr, C.uint(flags)) + if result == nil { + return "", GetLastError() + } + xml := C.GoString(result) + C.free(unsafe.Pointer(result)) + return xml, nil +} + +func (n *VirNetwork) Undefine() error { + result := C.virNetworkUndefine(n.ptr) + if result == -1 { + return GetLastError() + } + return nil +} diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/network_test.go b/vendor/gopkg.in/alexzorin/libvirt-go.v2/network_test.go new file mode 100644 index 0000000..0a46d57 --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/network_test.go @@ -0,0 +1,184 @@ +package libvirt + +import ( + "testing" + "time" +) + +func buildTestNetwork(netName string) (VirNetwork, VirConnection) { + conn := buildTestConnection() + var name string + if netName == "" { + name = time.Now().String() + } else { + name = netName + } + net, err := conn.NetworkDefineXML(` + ` + name + ` + + + + + `) + if err != nil { + panic(err) + } + return net, conn +} + +func TestGetNetworkName(t *testing.T) { + net, conn := buildTestNetwork("") + defer func() { + net.Free() + conn.CloseConnection() + }() + if _, err := net.GetName(); err != nil { + t.Fatal(err) + return + } +} + +func TestGetNetworkUUID(t *testing.T) { + net, conn := buildTestNetwork("") + defer func() { + net.Free() + conn.CloseConnection() + }() + _, err := net.GetUUID() + if err != nil { + t.Error(err) + return + } +} + +func TestGetNetworkUUIDString(t *testing.T) { + net, conn := buildTestNetwork("") + defer func() { + net.Free() + conn.CloseConnection() + }() + _, err := net.GetUUIDString() + if err != nil { + t.Error(err) + return + } +} + +func TestGetNetworkXMLDesc(t *testing.T) { + net, conn := buildTestNetwork("") + defer func() { + net.Free() + conn.CloseConnection() + }() + if _, err := net.GetXMLDesc(0); err != nil { + t.Error(err) + return + } +} + +func TestCreateDestroyNetwork(t *testing.T) { + net, conn := buildTestNetwork("") + defer func() { + net.Free() + conn.CloseConnection() + }() + if err := net.Create(); err != nil { + t.Error(err) + return + } + + if err := net.Destroy(); err != nil { + t.Error(err) + return + } +} + +func TestNetworkAutostart(t *testing.T) { + net, conn := buildTestNetwork("") + defer func() { + net.Free() + conn.CloseConnection() + }() + as, err := net.GetAutostart() + if err != nil { + t.Error(err) + return + } + if as { + t.Fatal("autostart should be false") + return + } + if err := net.SetAutostart(true); err != nil { + t.Error(err) + return + } + as, err = net.GetAutostart() + if err != nil { + t.Error(err) + return + } + if !as { + t.Fatal("autostart should be true") + return + } +} + +func TestNetworkIsActive(t *testing.T) { + net, conn := buildTestNetwork("") + defer func() { + net.Free() + conn.CloseConnection() + }() + if err := net.Create(); err != nil { + t.Log(err) + return + } + active, err := net.IsActive() + if err != nil { + t.Error(err) + return + } + if !active { + t.Fatal("Network should be active") + return + } + if err := net.Destroy(); err != nil { + t.Error(err) + return + } + active, err = net.IsActive() + if err != nil { + t.Error(err) + return + } + if active { + t.Fatal("Network should be inactive") + return + } +} + +func TestNetworkGetBridgeName(t *testing.T) { + net, conn := buildTestNetwork("") + defer func() { + net.Free() + conn.CloseConnection() + }() + if err := net.Create(); err != nil { + t.Error(err) + return + } + brName := "testbr0" + br, err := net.GetBridgeName() + if err != nil { + t.Errorf("got %s but expected %s", br, brName) + } +} + +func TestNetworkFree(t *testing.T) { + net, conn := buildTestNetwork("") + defer conn.CloseConnection() + if err := net.Free(); err != nil { + t.Error(err) + return + } +} diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/nodeinfo.go b/vendor/gopkg.in/alexzorin/libvirt-go.v2/nodeinfo.go new file mode 100644 index 0000000..fdcc307 --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/nodeinfo.go @@ -0,0 +1,50 @@ +package libvirt + +/* +#cgo LDFLAGS: -lvirt -ldl +#include +#include +#include +*/ +import "C" + +import ( + "unsafe" +) + +type VirNodeInfo struct { + ptr C.virNodeInfo +} + +func (ni *VirNodeInfo) GetModel() string { + model := C.GoString((*C.char)(unsafe.Pointer(&ni.ptr.model))) + return model +} + +func (ni *VirNodeInfo) GetMemoryKB() uint64 { + return uint64(ni.ptr.memory) +} + +func (ni *VirNodeInfo) GetCPUs() uint32 { + return uint32(ni.ptr.cpus) +} + +func (ni *VirNodeInfo) GetMhz() uint32 { + return uint32(ni.ptr.mhz) +} + +func (ni *VirNodeInfo) GetNodes() uint32 { + return uint32(ni.ptr.nodes) +} + +func (ni *VirNodeInfo) GetSockets() uint32 { + return uint32(ni.ptr.sockets) +} + +func (ni *VirNodeInfo) GetCores() uint32 { + return uint32(ni.ptr.cores) +} + +func (ni *VirNodeInfo) GetThreads() uint32 { + return uint32(ni.ptr.threads) +} diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/nwfilter.go b/vendor/gopkg.in/alexzorin/libvirt-go.v2/nwfilter.go new file mode 100644 index 0000000..b2d4f41 --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/nwfilter.go @@ -0,0 +1,70 @@ +package libvirt + +/* +#cgo LDFLAGS: -lvirt -ldl +#include +#include +#include +*/ +import "C" + +import ( + "unsafe" +) + +type VirNWFilter struct { + ptr C.virNWFilterPtr +} + +func (f *VirNWFilter) Free() error { + if result := C.virNWFilterFree(f.ptr); result != 0 { + return GetLastError() + } + return nil +} + +func (f *VirNWFilter) GetName() (string, error) { + name := C.virNWFilterGetName(f.ptr) + if name == nil { + return "", GetLastError() + } + return C.GoString(name), nil +} + +func (f *VirNWFilter) Undefine() error { + result := C.virNWFilterUndefine(f.ptr) + if result == -1 { + return GetLastError() + } + return nil +} + +func (f *VirNWFilter) GetUUID() ([]byte, error) { + var cUuid [C.VIR_UUID_BUFLEN](byte) + cuidPtr := unsafe.Pointer(&cUuid) + result := C.virNWFilterGetUUID(f.ptr, (*C.uchar)(cuidPtr)) + if result != 0 { + return []byte{}, GetLastError() + } + return C.GoBytes(cuidPtr, C.VIR_UUID_BUFLEN), nil +} + +func (f *VirNWFilter) GetUUIDString() (string, error) { + var cUuid [C.VIR_UUID_STRING_BUFLEN](C.char) + cuidPtr := unsafe.Pointer(&cUuid) + result := C.virNWFilterGetUUIDString(f.ptr, (*C.char)(cuidPtr)) + if result != 0 { + return "", GetLastError() + } + return C.GoString((*C.char)(cuidPtr)), nil +} + +func (f *VirNWFilter) GetXMLDesc(flags uint32) (string, error) { + result := C.virNWFilterGetXMLDesc(f.ptr, C.uint(flags)) + if result == nil { + return "", GetLastError() + } + xml := C.GoString(result) + C.free(unsafe.Pointer(result)) + return xml, nil +} diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/secret.go b/vendor/gopkg.in/alexzorin/libvirt-go.v2/secret.go new file mode 100644 index 0000000..b5f820d --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/secret.go @@ -0,0 +1,78 @@ +package libvirt + +/* +#cgo LDFLAGS: -lvirt -ldl +#include +#include +#include +*/ +import "C" + +import ( + "unsafe" +) + +type VirSecret struct { + ptr C.virSecretPtr +} + +func (s *VirSecret) Free() error { + if result := C.virSecretFree(s.ptr); result != 0 { + return GetLastError() + } + return nil +} + +func (s *VirSecret) Undefine() error { + result := C.virSecretUndefine(s.ptr) + if result == -1 { + return GetLastError() + } + return nil +} + +func (s *VirSecret) GetUUID() ([]byte, error) { + var cUuid [C.VIR_UUID_BUFLEN](byte) + cuidPtr := unsafe.Pointer(&cUuid) + result := C.virSecretGetUUID(s.ptr, (*C.uchar)(cuidPtr)) + if result != 0 { + return []byte{}, GetLastError() + } + return C.GoBytes(cuidPtr, C.VIR_UUID_BUFLEN), nil +} + +func (s *VirSecret) GetUUIDString() (string, error) { + var cUuid [C.VIR_UUID_STRING_BUFLEN](C.char) + cuidPtr := unsafe.Pointer(&cUuid) + result := C.virSecretGetUUIDString(s.ptr, (*C.char)(cuidPtr)) + if result != 0 { + return "", GetLastError() + } + return C.GoString((*C.char)(cuidPtr)), nil +} + +func (s *VirSecret) GetUsageID() (string, error) { + result := C.virSecretGetUsageID(s.ptr) + if result == nil { + return "", GetLastError() + } + return C.GoString(result), nil +} + +func (s *VirSecret) GetUsageType() (int, error) { + result := int(C.virSecretGetUsageType(s.ptr)) + if result == -1 { + return 0, GetLastError() + } + return result, nil +} + +func (s *VirSecret) GetXMLDesc(flags uint32) (string, error) { + result := C.virSecretGetXMLDesc(s.ptr, C.uint(flags)) + if result == nil { + return "", GetLastError() + } + xml := C.GoString(result) + C.free(unsafe.Pointer(result)) + return xml, nil +} diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/snapshot.go b/vendor/gopkg.in/alexzorin/libvirt-go.v2/snapshot.go new file mode 100644 index 0000000..55955c4 --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/snapshot.go @@ -0,0 +1,95 @@ +package libvirt + +/* +#cgo LDFLAGS: -lvirt -ldl +#include +#include +#include +*/ +import "C" + +import ( + "unsafe" +) + +type VirDomainSnapshot struct { + ptr C.virDomainSnapshotPtr +} + +func (s *VirDomainSnapshot) Free() error { + if result := C.virDomainSnapshotFree(s.ptr); result != 0 { + return GetLastError() + } + return nil +} + +func (s *VirDomainSnapshot) Delete(flags uint32) error { + result := C.virDomainSnapshotDelete(s.ptr, C.uint(flags)) + if result != 0 { + return GetLastError() + } + return nil +} + +func (s *VirDomainSnapshot) RevertToSnapshot(flags uint32) error { + result := C.virDomainRevertToSnapshot(s.ptr, C.uint(flags)) + if result != 0 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) CreateSnapshotXML(xml string, flags uint32) (VirDomainSnapshot, error) { + cXml := C.CString(xml) + defer C.free(unsafe.Pointer(cXml)) + result := C.virDomainSnapshotCreateXML(d.ptr, cXml, C.uint(flags)) + if result == nil { + return VirDomainSnapshot{}, GetLastError() + } + return VirDomainSnapshot{ptr: result}, nil +} + +func (d *VirDomain) Save(destFile string) error { + cPath := C.CString(destFile) + defer C.free(unsafe.Pointer(cPath)) + result := C.virDomainSave(d.ptr, cPath) + if result == -1 { + return GetLastError() + } + return nil +} + +func (d *VirDomain) SaveFlags(destFile string, destXml string, flags uint32) error { + cDestFile := C.CString(destFile) + cDestXml := C.CString(destXml) + defer C.free(unsafe.Pointer(cDestXml)) + defer C.free(unsafe.Pointer(cDestFile)) + result := C.virDomainSaveFlags(d.ptr, cDestFile, cDestXml, C.uint(flags)) + if result == -1 { + return GetLastError() + } + return nil +} + +func (conn VirConnection) Restore(srcFile string) error { + cPath := C.CString(srcFile) + defer C.free(unsafe.Pointer(cPath)) + if result := C.virDomainRestore(conn.ptr, cPath); result == -1 { + return GetLastError() + } + return nil +} + +func (conn VirConnection) RestoreFlags(srcFile, xmlConf string, flags uint32) error { + cPath := C.CString(srcFile) + defer C.free(unsafe.Pointer(cPath)) + var cXmlConf *C.char + if xmlConf != "" { + cXmlConf = C.CString(xmlConf) + defer C.free(unsafe.Pointer(cXmlConf)) + } + if result := C.virDomainRestoreFlags(conn.ptr, cPath, cXmlConf, C.uint(flags)); result == -1 { + return GetLastError() + } + return nil +} diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/storage_pool.go b/vendor/gopkg.in/alexzorin/libvirt-go.v2/storage_pool.go new file mode 100644 index 0000000..8d3562c --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/storage_pool.go @@ -0,0 +1,210 @@ +package libvirt + +/* +#cgo LDFLAGS: -lvirt -ldl +#include +#include +#include +*/ +import "C" + +import ( + "io/ioutil" + "unsafe" +) + +type VirStoragePool struct { + ptr C.virStoragePoolPtr +} + +type VirStoragePoolInfo struct { + ptr C.virStoragePoolInfo +} + +func (p *VirStoragePool) Build(flags uint32) error { + result := C.virStoragePoolBuild(p.ptr, C.uint(flags)) + if result == -1 { + return GetLastError() + } + return nil +} + +func (p *VirStoragePool) Create(flags uint32) error { + result := C.virStoragePoolCreate(p.ptr, C.uint(flags)) + if result == -1 { + return GetLastError() + } + return nil +} + +func (p *VirStoragePool) Delete(flags uint32) error { + result := C.virStoragePoolDelete(p.ptr, C.uint(flags)) + if result == -1 { + return GetLastError() + } + return nil +} + +func (p *VirStoragePool) Destroy() error { + result := C.virStoragePoolDestroy(p.ptr) + if result == -1 { + return GetLastError() + } + return nil +} + +func (p *VirStoragePool) Free() error { + if result := C.virStoragePoolFree(p.ptr); result != 0 { + return GetLastError() + } + return nil +} + +func (p *VirStoragePool) GetAutostart() (bool, error) { + var out C.int + result := C.virStoragePoolGetAutostart(p.ptr, (*C.int)(unsafe.Pointer(&out))) + if result == -1 { + return false, GetLastError() + } + switch out { + case 1: + return true, nil + default: + return false, nil + } +} + +func (p *VirStoragePool) GetInfo() (VirStoragePoolInfo, error) { + pi := VirStoragePoolInfo{} + var ptr C.virStoragePoolInfo + result := C.virStoragePoolGetInfo(p.ptr, (*C.virStoragePoolInfo)(unsafe.Pointer(&ptr))) + if result == -1 { + return pi, GetLastError() + } + pi.ptr = ptr + return pi, nil +} + +func (p *VirStoragePool) GetName() (string, error) { + name := C.virStoragePoolGetName(p.ptr) + if name == nil { + return "", GetLastError() + } + return C.GoString(name), nil +} + +func (p *VirStoragePool) GetUUID() ([]byte, error) { + var cUuid [C.VIR_UUID_BUFLEN](byte) + cuidPtr := unsafe.Pointer(&cUuid) + result := C.virStoragePoolGetUUID(p.ptr, (*C.uchar)(cuidPtr)) + if result != 0 { + return []byte{}, GetLastError() + } + return C.GoBytes(cuidPtr, C.VIR_UUID_BUFLEN), nil +} + +func (p *VirStoragePool) GetUUIDString() (string, error) { + var cUuid [C.VIR_UUID_STRING_BUFLEN](C.char) + cuidPtr := unsafe.Pointer(&cUuid) + result := C.virStoragePoolGetUUIDString(p.ptr, (*C.char)(cuidPtr)) + if result != 0 { + return "", GetLastError() + } + return C.GoString((*C.char)(cuidPtr)), nil +} + +func (p *VirStoragePool) GetXMLDesc(flags uint32) (string, error) { + result := C.virStoragePoolGetXMLDesc(p.ptr, C.uint(flags)) + if result == nil { + return "", GetLastError() + } + xml := C.GoString(result) + C.free(unsafe.Pointer(result)) + return xml, nil +} + +func (p *VirStoragePool) IsActive() (bool, error) { + result := C.virStoragePoolIsActive(p.ptr) + if result == -1 { + return false, GetLastError() + } + if result == 1 { + return true, nil + } + return false, nil +} + +func (p *VirStoragePool) SetAutostart(autostart bool) error { + var cAutostart C.int + switch autostart { + case true: + cAutostart = 1 + default: + cAutostart = 0 + } + result := C.virStoragePoolSetAutostart(p.ptr, cAutostart) + if result == -1 { + return GetLastError() + } + return nil +} + +func (p *VirStoragePool) Refresh(flags uint32) error { + result := C.virStoragePoolRefresh(p.ptr, C.uint(flags)) + if result == -1 { + return GetLastError() + } + return nil +} + +func (p *VirStoragePool) Undefine() error { + result := C.virStoragePoolUndefine(p.ptr) + if result == -1 { + return GetLastError() + } + return nil +} + +func (i *VirStoragePoolInfo) GetState() uint8 { + return uint8(i.ptr.state) +} + +func (i *VirStoragePoolInfo) GetCapacityInBytes() uint64 { + return uint64(i.ptr.capacity) +} + +func (i *VirStoragePoolInfo) GetAllocationInBytes() uint64 { + return uint64(i.ptr.allocation) +} + +func (i *VirStoragePoolInfo) GetAvailableInBytes() uint64 { + return uint64(i.ptr.available) +} + +func (p *VirStoragePool) StorageVolCreateXMLFromFile(xmlFile string, flags uint32) (VirStorageVol, error) { + xmlConfig, err := ioutil.ReadFile(xmlFile) + if err != nil { + return VirStorageVol{}, err + } + return p.StorageVolCreateXML(string(xmlConfig), flags) +} + +func (p *VirStoragePool) StorageVolCreateXML(xmlConfig string, flags uint32) (VirStorageVol, error) { + cXml := C.CString(string(xmlConfig)) + defer C.free(unsafe.Pointer(cXml)) + ptr := C.virStorageVolCreateXML(p.ptr, cXml, C.uint(flags)) + if ptr == nil { + return VirStorageVol{}, GetLastError() + } + return VirStorageVol{ptr: ptr}, nil +} + +func (p *VirStoragePool) LookupStorageVolByName(name string) (VirStorageVol, error) { + cName := C.CString(name) + defer C.free(unsafe.Pointer(cName)) + ptr := C.virStorageVolLookupByName(p.ptr, cName) + if ptr == nil { + return VirStorageVol{}, GetLastError() + } + return VirStorageVol{ptr: ptr}, nil +} diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/storage_pool_test.go b/vendor/gopkg.in/alexzorin/libvirt-go.v2/storage_pool_test.go new file mode 100644 index 0000000..ce25410 --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/storage_pool_test.go @@ -0,0 +1,292 @@ +package libvirt + +import ( + "testing" + "time" +) + +func buildTestStoragePool(poolName string) (VirStoragePool, VirConnection) { + conn := buildTestConnection() + var name string + if poolName == "" { + name = "default-pool-test-1" + } else { + name = poolName + } + pool, err := conn.StoragePoolDefineXML(` + `+name+` + + /default-pool + + `, 0) + if err != nil { + panic(err) + } + return pool, conn +} + +func TestStoragePoolBuild(t *testing.T) { + pool, conn := buildTestStoragePool("") + defer func() { + pool.Undefine() + pool.Free() + conn.CloseConnection() + }() + if err := pool.Build(VIR_STORAGE_POOL_BUILD_NEW); err != nil { + t.Fatal(err) + } +} + +func TestUndefineStoragePool(t *testing.T) { + pool, conn := buildTestStoragePool("") + defer func() { + pool.Free() + conn.CloseConnection() + }() + name, err := pool.GetName() + if err != nil { + t.Error(err) + return + } + if err := pool.Undefine(); err != nil { + t.Error(err) + return + } + if _, err := conn.LookupStoragePoolByName(name); err == nil { + t.Fatal("Shouldn't have been able to find storage pool") + return + } +} + +func TestGetStoragePoolName(t *testing.T) { + pool, conn := buildTestStoragePool("") + defer func() { + pool.Undefine() + pool.Free() + conn.CloseConnection() + }() + if _, err := pool.GetName(); err != nil { + t.Error(err) + } +} + +func TestGetStoragePoolUUID(t *testing.T) { + pool, conn := buildTestStoragePool("") + defer func() { + pool.Undefine() + pool.Free() + conn.CloseConnection() + }() + if _, err := pool.GetUUID(); err != nil { + t.Error(err) + } +} + +func TestGetStoragePoolUUIDString(t *testing.T) { + pool, conn := buildTestStoragePool("") + defer func() { + pool.Undefine() + pool.Free() + conn.CloseConnection() + }() + if _, err := pool.GetUUIDString(); err != nil { + t.Error(err) + } +} + +func TestGetStoragePoolInfo(t *testing.T) { + pool, conn := buildTestStoragePool("") + defer func() { + pool.Undefine() + pool.Free() + conn.CloseConnection() + }() + if _, err := pool.GetInfo(); err != nil { + t.Error(err) + } +} + +func TestGetStoragePoolXMLDesc(t *testing.T) { + pool, conn := buildTestStoragePool("") + defer func() { + pool.Undefine() + pool.Free() + conn.CloseConnection() + }() + if _, err := pool.GetXMLDesc(0); err != nil { + t.Error(err) + } +} + +func TestStoragePoolRefresh(t *testing.T) { + pool, conn := buildTestStoragePool("") + defer func() { + pool.Destroy() + pool.Undefine() + pool.Free() + conn.CloseConnection() + }() + if err := pool.Create(0); err != nil { + t.Error(err) + return + } + if err := pool.Refresh(0); err != nil { + t.Error(err) + } +} + +func TestCreateDestroyStoragePool(t *testing.T) { + pool, conn := buildTestStoragePool("") + defer func() { + pool.Undefine() + pool.Free() + conn.CloseConnection() + }() + if err := pool.Create(0); err != nil { + t.Error(err) + return + } + state, err := pool.GetInfo() + if err != nil { + t.Error(err) + return + } + if state.GetState() != VIR_STORAGE_POOL_RUNNING { + t.Fatal("Storage pool should be running") + } + if err = pool.Destroy(); err != nil { + t.Error(err) + return + } + + state, err = pool.GetInfo() + if err != nil { + t.Error(err) + return + } + if state.GetState() != VIR_STORAGE_POOL_INACTIVE { + t.Fatal("Storage pool should be inactive") + } +} + +func TestStoragePoolAutostart(t *testing.T) { + pool, conn := buildTestStoragePool("") + defer func() { + pool.Undefine() + pool.Free() + conn.CloseConnection() + }() + as, err := pool.GetAutostart() + if err != nil { + t.Error(err) + return + } + if as { + t.Fatal("autostart should be false") + } + if err := pool.SetAutostart(true); err != nil { + t.Error(err) + return + } + as, err = pool.GetAutostart() + if err != nil { + t.Error(err) + return + } + if !as { + t.Fatal("autostart should be true") + } +} + +func TestStoragePoolIsActive(t *testing.T) { + pool, conn := buildTestStoragePool("") + defer func() { + pool.Undefine() + pool.Free() + conn.CloseConnection() + }() + + if err := pool.Create(0); err != nil { + t.Error(err) + return + } + active, err := pool.IsActive() + if err != nil { + t.Error(err) + return + } + if !active { + t.Fatal("Storage pool should be active") + } + if err := pool.Destroy(); err != nil { + t.Error(err) + return + } + active, err = pool.IsActive() + if err != nil { + t.Error(err) + return + } + if active { + t.Fatal("Storage pool should be inactive") + } +} + +func TestStorageVolCreateDelete(t *testing.T) { + pool, conn := buildTestStoragePool("") + defer func() { + pool.Undefine() + pool.Free() + conn.CloseConnection() + }() + if err := pool.Create(0); err != nil { + t.Error(err) + return + } + defer pool.Destroy() + vol, err := pool.StorageVolCreateXML(testStorageVolXML("", "default-pool"), 0) + if err != nil { + t.Fatal(err) + } + defer vol.Free() + if err := vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL); err != nil { + t.Fatal(err) + } +} + +func TestLookupStorageVolByName(t *testing.T) { + pool, conn := buildTestStoragePool("") + defer func() { + pool.Undefine() + pool.Free() + conn.CloseConnection() + }() + if err := pool.Create(0); err != nil { + t.Error(err) + return + } + defer pool.Destroy() + defVolName := time.Now().String() + vol, err := pool.StorageVolCreateXML(testStorageVolXML(defVolName, "default-pool"), 0) + if err != nil { + t.Error(err) + return + } + defer func() { + vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) + vol.Free() + }() + vol, err = pool.LookupStorageVolByName(defVolName) + if err != nil { + t.Error(err) + return + } + name, err := vol.GetName() + if err != nil { + t.Error(err) + return + } + if name != defVolName { + t.Fatalf("expected storage volume name: %s ,got: %s", defVolName, name) + } +} diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/storage_volume.go b/vendor/gopkg.in/alexzorin/libvirt-go.v2/storage_volume.go new file mode 100644 index 0000000..26b446e --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/storage_volume.go @@ -0,0 +1,134 @@ +package libvirt + +/* +#cgo LDFLAGS: -lvirt -ldl +#include +#include +#include +*/ +import "C" + +import ( + "unsafe" +) + +type VirStorageVol struct { + ptr C.virStorageVolPtr +} + +type VirStorageVolInfo struct { + ptr C.virStorageVolInfo +} + +func (v *VirStorageVol) Delete(flags uint32) error { + result := C.virStorageVolDelete(v.ptr, C.uint(flags)) + if result == -1 { + return GetLastError() + } + return nil +} + +func (v *VirStorageVol) Free() error { + if result := C.virStorageVolFree(v.ptr); result != 0 { + return GetLastError() + } + return nil +} + +func (v *VirStorageVol) GetInfo() (VirStorageVolInfo, error) { + vi := VirStorageVolInfo{} + var ptr C.virStorageVolInfo + result := C.virStorageVolGetInfo(v.ptr, (*C.virStorageVolInfo)(unsafe.Pointer(&ptr))) + if result == -1 { + return vi, GetLastError() + } + vi.ptr = ptr + return vi, nil +} + +func (i *VirStorageVolInfo) GetType() int { + return int(i.ptr._type) +} + +func (i *VirStorageVolInfo) GetCapacityInBytes() uint64 { + return uint64(i.ptr.capacity) +} + +func (i *VirStorageVolInfo) GetAllocationInBytes() uint64 { + return uint64(i.ptr.allocation) +} + +func (v *VirStorageVol) GetKey() (string, error) { + key := C.virStorageVolGetKey(v.ptr) + if key == nil { + return "", GetLastError() + } + return C.GoString(key), nil +} + +func (v *VirStorageVol) GetName() (string, error) { + name := C.virStorageVolGetName(v.ptr) + if name == nil { + return "", GetLastError() + } + return C.GoString(name), nil +} + +func (v *VirStorageVol) GetPath() (string, error) { + result := C.virStorageVolGetPath(v.ptr) + if result == nil { + return "", GetLastError() + } + path := C.GoString(result) + C.free(unsafe.Pointer(result)) + return path, nil +} + +func (v *VirStorageVol) GetXMLDesc(flags uint32) (string, error) { + result := C.virStorageVolGetXMLDesc(v.ptr, C.uint(flags)) + if result == nil { + return "", GetLastError() + } + xml := C.GoString(result) + C.free(unsafe.Pointer(result)) + return xml, nil +} + +func (v *VirStorageVol) Resize(capacity uint64, flags uint32) error { + result := C.virStorageVolResize(v.ptr, C.ulonglong(capacity), C.uint(flags)) + if result == -1 { + return GetLastError() + } + return nil +} + +func (v *VirStorageVol) Wipe(flags uint32) error { + result := C.virStorageVolWipe(v.ptr, C.uint(flags)) + if result == -1 { + return GetLastError() + } + return nil +} +func (v *VirStorageVol) WipePattern(algorithm uint32, flags uint32) error { + result := C.virStorageVolWipePattern(v.ptr, C.uint(algorithm), C.uint(flags)) + if result == -1 { + return GetLastError() + } + return nil +} + +func (v *VirStorageVol) Upload(stream *VirStream, offset, length uint64, flags uint32) error { + if C.virStorageVolUpload(v.ptr, stream.ptr, C.ulonglong(offset), + C.ulonglong(length), C.uint(flags)) == -1 { + return GetLastError() + } + return nil +} + +func (v *VirStorageVol) Download(stream *VirStream, offset, length uint64, flags uint32) error { + if C.virStorageVolDownload(v.ptr, stream.ptr, C.ulonglong(offset), + C.ulonglong(length), C.uint(flags)) == -1 { + return GetLastError() + } + return nil +} diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/storage_volume_test.go b/vendor/gopkg.in/alexzorin/libvirt-go.v2/storage_volume_test.go new file mode 100644 index 0000000..83eeefa --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/storage_volume_test.go @@ -0,0 +1,157 @@ +package libvirt + +import ( + "testing" + "time" +) + +func testStorageVolXML(volName, poolPath string) string { + defName := volName + if defName == "" { + defName = time.Now().String() + } + return ` + ` + defName + ` + 0 + 10 + + ` + "/" + poolPath + "/" + defName + ` + + 107 + 107 + 0744 + + + + ` +} + +func TestStorageVolGetInfo(t *testing.T) { + pool, conn := buildTestStoragePool("") + defer func() { + pool.Undefine() + pool.Free() + conn.CloseConnection() + }() + if err := pool.Create(0); err != nil { + t.Error(err) + return + } + defer pool.Destroy() + vol, err := pool.StorageVolCreateXML(testStorageVolXML("", "default-pool"), 0) + if err != nil { + t.Error(err) + return + } + defer func() { + vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) + vol.Free() + }() + if _, err := vol.GetInfo(); err != nil { + t.Fatal(err) + } +} + +func TestStorageVolGetKey(t *testing.T) { + pool, conn := buildTestStoragePool("") + defer func() { + pool.Undefine() + pool.Free() + conn.CloseConnection() + }() + if err := pool.Create(0); err != nil { + t.Error(err) + return + } + defer pool.Destroy() + vol, err := pool.StorageVolCreateXML(testStorageVolXML("", "default-pool"), 0) + if err != nil { + t.Error(err) + return + } + defer func() { + vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) + vol.Free() + }() + if _, err := vol.GetKey(); err != nil { + t.Fatal(err) + } +} + +func TestStorageVolGetName(t *testing.T) { + pool, conn := buildTestStoragePool("") + defer func() { + pool.Undefine() + pool.Free() + conn.CloseConnection() + }() + if err := pool.Create(0); err != nil { + t.Error(err) + return + } + defer pool.Destroy() + vol, err := pool.StorageVolCreateXML(testStorageVolXML("", "default-pool"), 0) + if err != nil { + t.Error(err) + return + } + defer func() { + vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) + vol.Free() + }() + if _, err := vol.GetName(); err != nil { + t.Fatal(err) + } +} + +func TestStorageVolGetPath(t *testing.T) { + pool, conn := buildTestStoragePool("") + defer func() { + pool.Undefine() + pool.Free() + conn.CloseConnection() + }() + if err := pool.Create(0); err != nil { + t.Error(err) + return + } + defer pool.Destroy() + vol, err := pool.StorageVolCreateXML(testStorageVolXML("", "default-pool"), 0) + if err != nil { + t.Error(err) + return + } + defer func() { + vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) + vol.Free() + }() + if _, err := vol.GetPath(); err != nil { + t.Fatal(err) + } +} + +func TestStorageVolGetXMLDesc(t *testing.T) { + pool, conn := buildTestStoragePool("") + defer func() { + pool.Undefine() + pool.Free() + conn.CloseConnection() + }() + if err := pool.Create(0); err != nil { + t.Error(err) + return + } + defer pool.Destroy() + vol, err := pool.StorageVolCreateXML(testStorageVolXML("", "default-pool"), 0) + if err != nil { + t.Error(err) + return + } + defer func() { + vol.Delete(VIR_STORAGE_VOL_DELETE_NORMAL) + vol.Free() + }() + if _, err := vol.GetXMLDesc(0); err != nil { + t.Fatal(err) + } +} diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/stream.go b/vendor/gopkg.in/alexzorin/libvirt-go.v2/stream.go new file mode 100644 index 0000000..e0b142b --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/stream.go @@ -0,0 +1,79 @@ +package libvirt + +/* +#cgo LDFLAGS: -lvirt -ldl +#include +#include +#include +*/ +import "C" +import ( + "io" + "unsafe" +) + +type VirStream struct { + ptr C.virStreamPtr +} + +func NewVirStream(c *VirConnection, flags uint) (*VirStream, error) { + virStream := C.virStreamNew(c.ptr, C.uint(flags)) + if virStream == nil { + return nil, GetLastError() + } + + return &VirStream{ + ptr: virStream, + }, nil +} + +func (v *VirStream) Abort() error { + result := C.virStreamAbort(v.ptr) + if result == -1 { + return GetLastError() + } + + return nil +} + +func (v *VirStream) Close() error { + result := C.virStreamFinish(v.ptr) + if result == -1 { + return GetLastError() + } + + return nil +} + +func (v *VirStream) Free() error { + result := C.virStreamFree(v.ptr) + if result == -1 { + return GetLastError() + } + + return nil +} + +func (v *VirStream) Read(p []byte) (int, error) { + n := C.virStreamRecv(v.ptr, (*C.char)(unsafe.Pointer(&p[0])), C.size_t(len(p))) + if n < 0 { + return 0, GetLastError() + } + if n == 0 { + return 0, io.EOF + } + + return int(n), nil +} + +func (v *VirStream) Write(p []byte) (int, error) { + n := C.virStreamSend(v.ptr, (*C.char)(unsafe.Pointer(&p[0])), C.size_t(len(p))) + if n < 0 { + return 0, GetLastError() + } + if n == 0 { + return 0, io.EOF + } + + return int(n), nil +} diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/vagrant/master/Vagrantfile b/vendor/gopkg.in/alexzorin/libvirt-go.v2/vagrant/master/Vagrantfile new file mode 100644 index 0000000..520b250 --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/vagrant/master/Vagrantfile @@ -0,0 +1,83 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +####################################################################################################### +# +# If you get problems about guest additions versions, please get this plugin to fix it up: +# +# vagrant plugin install vagrant-vbguest +# +####################################################################################################### + +require '../vagrant-provision-reboot-plugin' + +VAGRANTFILE_API_VERSION = "2" + +Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| + config.vm.box = "chef/fedora-19" + config.vm.provision "shell", privileged: true, inline: <<-EOF + set -e + echo "Installing LXC + libvirt dependencies" + yum -y install cyrus-sasl-devel device-mapper-devel gnutls-devel \ + libxml2-devel cyrus-sasl-md5 gnutls-utils nc numactl numactl-libs libwsman1 \ + libwsman-devel avahi-devel e2fsprogs-devel libcap-ng-devel libnl-devel \ + libpciaccess-devel libselinux-devel libssh2-devel libudev-devel netcf-devel \ + numactl-devel parted-devel python-devel readline-devel xen-devel xhtml1-dtds \ + xmlrpc-c-devel yajl-devel pm-utils dmidecode libcgroup numad iptables-ipv6 \ + radvd lzop glusterfs-client iscsi-initiator-utils sheepdog fuse-libs \ + glusterfs-api librados2 librbd1 qemu-img lxc + + echo "Download libvirt 1.2.2 RPMs" + mkdir -p /tmp/rpms && cd /tmp/rpms + wget -N http://libvirt.org/sources/libvirt-client-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-config-network-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-config-nwfilter-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-driver-interface-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-driver-libxl-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-driver-lxc-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-driver-network-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-driver-nodedev-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-driver-nwfilter-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-driver-qemu-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-driver-secret-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-driver-storage-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-driver-uml-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-driver-vbox-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-driver-xen-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-daemon-lxc-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-devel-1.2.2-1.fc19.x86_64.rpm \ + http://libvirt.org/sources/libvirt-docs-1.2.2-1.fc19.x86_64.rpm + + echo "Installing libvirt RPMs" + cd /tmp/rpms + # sigh, bad rpm + rpm -ivh *.rpm || true + + GOVERSION="1.3.3" + GOTARBALL="go${GOVERSION}.linux-amd64.tar.gz" + export GOROOT=/usr/local/go + export GOPATH=/opt/go + export PATH=$PATH:$GOROOT/bin:$GOPATH/bin + echo "Installing Go $GOVERSION" + if [ ! $(which go) ]; then + echo " Downloading $GOTARBALL" + wget --quiet --directory-prefix=/tmp https://storage.googleapis.com/golang/$GOTARBALL + echo " Extracting $GOTARBALL to $GOROOT" + tar -C /usr/local -xzf /tmp/$GOTARBALL + echo " Configuring GOPATH" + mkdir -p $GOPATH/src $GOPATH/bin $GOPATH/pkg + chown -R vagrant $GOPATH + echo " Configuring env vars" + echo "export PATH=\$PATH:$GOROOT/bin:$GOPATH/bin" | tee /etc/profile.d/golang.sh > /dev/null + echo "export GOROOT=$GOROOT" | tee --append /etc/profile.d/golang.sh > /dev/null + echo "export GOPATH=$GOPATH" | tee --append /etc/profile.d/golang.sh > /dev/null + fi + + systemctl enable lxc + systemctl enable libvirtd + EOF + + config.vm.provision :unix_reboot + config.vm.synced_folder "../..", "/libvirt-go" +end diff --git a/vendor/gopkg.in/alexzorin/libvirt-go.v2/vagrant/vagrant-provision-reboot-plugin.rb b/vendor/gopkg.in/alexzorin/libvirt-go.v2/vagrant/vagrant-provision-reboot-plugin.rb new file mode 100644 index 0000000..99d9920 --- /dev/null +++ b/vendor/gopkg.in/alexzorin/libvirt-go.v2/vagrant/vagrant-provision-reboot-plugin.rb @@ -0,0 +1,176 @@ +# A quick hack to allow rebooting of a Vagrant VM during provisioning. +# +# This is tested with Vagrant 1.4.3. It may work with slightly earlier versions, +# but definitely won't work with much earlier versions. The code is fragile with +# respect to internal changes in Vagrant. +# +# Adapted from: https://gist.github.com/ukabu/6780121 +# +# This file should be placed into the same folder as your Vagrantfile. Then in +# your Vagrantfile, you'll want to do something like the following: +# +# ---------------------------------------------------------------------------- +# +# require './vagrant-provision-reboot-plugin' +# +# Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| +# +# # Run your pre-reboot provisioning block. +# #config.vm.provision :chef_solo do |chef| +# # ... +# #end +# +# # Run a reboot of a *NIX guest. +# config.vm.provision :unix_reboot +# # Run a reboot of a Windows guest, assuming that you are set up with the +# # relevant plugins and configurations to manage a Windows guest in Vagrant. +# #config.vm.provision :windows_reboot +# +# # Run your post-reboot provisioning block. +# #config.vm.provision :chef_solo do |chef| +# # ... +# #end +# +# ---------------------------------------------------------------------------- +# +# The provisioner takes care of remounting the synced folders. +# +# This will work for the VirtualBox provider. For other providers, a +# 'remount_synched_folders' action must be added to the provider implementation. + +require 'vagrant' + +# Monkey-patch the VirtualBox provider to be able to remap synced folders after +# reboot. +# +# This involves pulling out some code fragments from the existing SyncedFolders +# class - which is unpleasant, but there are no usefully exposed methods such +# that we can run only what we need to. +module VagrantPlugins + module ProviderVirtualBox + module Action + + class RemountSyncedFolders < SyncedFolders + + def initialize(app, env) + super(app, env) + end + + def call(env) + @env = env + @app.call(env) + + # Copied out of /lib/vagrant/action/builtin/synced_folders.rb in + # Vagrant 1.4.3. This is going to be fragile with respect to future + # changes, but that's just the way the cookie crumbles. + # + # We can't just run the whole SyncedFolders.call() method because + # it undertakes a lot more setup and will error out if invoked twice + # during "vagrant up" or "vagrant provision". + folders = synced_folders(env[:machine]) + folders.each do |impl_name, fs| + plugins[impl_name.to_sym][0].new.enable(env[:machine], fs, impl_opts(impl_name, env)) + end + end + end + + def self.action_remount_synced_folders + Vagrant::Action::Builder.new.tap do |b| + b.use RemountSyncedFolders + end + end + + end + end +end + +# Define the plugin. +class RebootPlugin < Vagrant.plugin('2') + name 'Reboot Plugin' + + # This plugin provides a provisioner called unix_reboot. + provisioner 'unix_reboot' do + + # Create a provisioner. + class RebootProvisioner < Vagrant.plugin('2', :provisioner) + # Initialization, define internal state. Nothing needed. + def initialize(machine, config) + super(machine, config) + end + + # Configuration changes to be done. Nothing needed here either. + def configure(root_config) + super(root_config) + end + + # Run the provisioning. + def provision + command = 'shutdown -r now' + @machine.ui.info("Issuing command: #{command}") + @machine.communicate.sudo(command) do |type, data| + if type == :stderr + @machine.ui.error(data); + end + end + + begin + sleep 5 + end until @machine.communicate.ready? + + # Now the machine is up again, perform the necessary tasks. + @machine.ui.info("Launching remount_synced_folders action...") + @machine.action('remount_synced_folders') + end + + # Nothing needs to be done on cleanup. + def cleanup + super + end + end + RebootProvisioner + + end + + # This plugin provides a provisioner called windows_reboot. + provisioner 'windows_reboot' do + + # Create a provisioner. + class RebootProvisioner < Vagrant.plugin('2', :provisioner) + # Initialization, define internal state. Nothing needed. + def initialize(machine, config) + super(machine, config) + end + + # Configuration changes to be done. Nothing needed here either. + def configure(root_config) + super(root_config) + end + + # Run the provisioning. + def provision + command = 'shutdown -t 0 -r -f' + @machine.ui.info("Issuing command: #{command}") + @machine.communicate.execute(command) do + if type == :stderr + @machine.ui.error(data); + end + end + + begin + sleep 5 + end until @machine.communicate.ready? + + # Now the machine is up again, perform the necessary tasks. + @machine.ui.info("Launching remount_synced_folders action...") + @machine.action('remount_synced_folders') + end + + # Nothing needs to be done on cleanup. + def cleanup + super + end + end + RebootProvisioner + + end +end From 7f9515fa668940cb9d4f77f31b0a5dd7b08cd732 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Mon, 9 Nov 2015 12:45:40 +0000 Subject: [PATCH 3/5] fix Signed-off-by: Vasiliy Tolstov --- vendor/golang.org/x/sys | 1 - 1 file changed, 1 deletion(-) delete mode 160000 vendor/golang.org/x/sys diff --git a/vendor/golang.org/x/sys b/vendor/golang.org/x/sys deleted file mode 160000 index d9157a9..0000000 --- a/vendor/golang.org/x/sys +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d9157a9621b69ad1d8d77a1933590c416593f24f From 7c082722113b3ae54897d8301df97cfa9c612f62 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Mon, 9 Nov 2015 12:45:52 +0000 Subject: [PATCH 4/5] fix Signed-off-by: Vasiliy Tolstov --- vendor/golang.org/x/sys/.gitattributes | 10 + vendor/golang.org/x/sys/.gitignore | 2 + vendor/golang.org/x/sys/AUTHORS | 3 + vendor/golang.org/x/sys/CONTRIBUTING.md | 31 + vendor/golang.org/x/sys/CONTRIBUTORS | 3 + vendor/golang.org/x/sys/LICENSE | 27 + vendor/golang.org/x/sys/PATENTS | 22 + vendor/golang.org/x/sys/README | 3 + vendor/golang.org/x/sys/codereview.cfg | 1 + vendor/golang.org/x/sys/plan9/asm.s | 8 + vendor/golang.org/x/sys/plan9/asm_plan9_386.s | 30 + .../golang.org/x/sys/plan9/asm_plan9_amd64.s | 30 + vendor/golang.org/x/sys/plan9/const_plan9.go | 59 + vendor/golang.org/x/sys/plan9/dir_plan9.go | 212 ++ vendor/golang.org/x/sys/plan9/env_plan9.go | 27 + vendor/golang.org/x/sys/plan9/env_unset.go | 14 + vendor/golang.org/x/sys/plan9/errors_plan9.go | 50 + vendor/golang.org/x/sys/plan9/mkall.sh | 138 ++ vendor/golang.org/x/sys/plan9/mkerrors.sh | 246 ++ vendor/golang.org/x/sys/plan9/mksyscall.pl | 319 +++ .../golang.org/x/sys/plan9/mksysnum_plan9.sh | 25 + .../golang.org/x/sys/plan9/pwd_go15_plan9.go | 21 + vendor/golang.org/x/sys/plan9/pwd_plan9.go | 23 + vendor/golang.org/x/sys/plan9/race.go | 30 + vendor/golang.org/x/sys/plan9/race0.go | 25 + vendor/golang.org/x/sys/plan9/str.go | 22 + vendor/golang.org/x/sys/plan9/syscall.go | 74 + .../golang.org/x/sys/plan9/syscall_plan9.go | 349 +++ vendor/golang.org/x/sys/plan9/syscall_test.go | 33 + .../x/sys/plan9/zsyscall_plan9_386.go | 292 +++ .../x/sys/plan9/zsyscall_plan9_amd64.go | 292 +++ .../golang.org/x/sys/plan9/zsysnum_plan9.go | 49 + vendor/golang.org/x/sys/unix/.gitignore | 1 + vendor/golang.org/x/sys/unix/asm.s | 10 + vendor/golang.org/x/sys/unix/asm_darwin_386.s | 29 + .../golang.org/x/sys/unix/asm_darwin_amd64.s | 29 + vendor/golang.org/x/sys/unix/asm_darwin_arm.s | 30 + .../golang.org/x/sys/unix/asm_darwin_arm64.s | 30 + .../golang.org/x/sys/unix/asm_dragonfly_386.s | 29 + .../x/sys/unix/asm_dragonfly_amd64.s | 29 + .../golang.org/x/sys/unix/asm_freebsd_386.s | 29 + .../golang.org/x/sys/unix/asm_freebsd_amd64.s | 29 + .../golang.org/x/sys/unix/asm_freebsd_arm.s | 29 + vendor/golang.org/x/sys/unix/asm_linux_386.s | 35 + .../golang.org/x/sys/unix/asm_linux_amd64.s | 29 + vendor/golang.org/x/sys/unix/asm_linux_arm.s | 29 + .../golang.org/x/sys/unix/asm_linux_arm64.s | 24 + .../golang.org/x/sys/unix/asm_linux_ppc64x.s | 28 + vendor/golang.org/x/sys/unix/asm_netbsd_386.s | 29 + .../golang.org/x/sys/unix/asm_netbsd_amd64.s | 29 + vendor/golang.org/x/sys/unix/asm_netbsd_arm.s | 29 + .../golang.org/x/sys/unix/asm_openbsd_386.s | 29 + .../golang.org/x/sys/unix/asm_openbsd_amd64.s | 29 + .../golang.org/x/sys/unix/asm_solaris_amd64.s | 17 + vendor/golang.org/x/sys/unix/constants.go | 13 + vendor/golang.org/x/sys/unix/creds_test.go | 121 + vendor/golang.org/x/sys/unix/env_unix.go | 27 + vendor/golang.org/x/sys/unix/env_unset.go | 14 + vendor/golang.org/x/sys/unix/export_test.go | 9 + vendor/golang.org/x/sys/unix/flock.go | 24 + .../x/sys/unix/flock_linux_32bit.go | 13 + vendor/golang.org/x/sys/unix/gccgo.go | 46 + vendor/golang.org/x/sys/unix/gccgo_c.c | 41 + .../x/sys/unix/gccgo_linux_amd64.go | 20 + vendor/golang.org/x/sys/unix/mkall.sh | 274 +++ vendor/golang.org/x/sys/unix/mkerrors.sh | 466 ++++ vendor/golang.org/x/sys/unix/mksyscall.pl | 323 +++ .../x/sys/unix/mksyscall_solaris.pl | 294 +++ .../golang.org/x/sys/unix/mksysctl_openbsd.pl | 264 ++ .../golang.org/x/sys/unix/mksysnum_darwin.pl | 39 + .../x/sys/unix/mksysnum_dragonfly.pl | 50 + .../golang.org/x/sys/unix/mksysnum_freebsd.pl | 63 + .../golang.org/x/sys/unix/mksysnum_linux.pl | 58 + .../golang.org/x/sys/unix/mksysnum_netbsd.pl | 58 + .../golang.org/x/sys/unix/mksysnum_openbsd.pl | 50 + .../golang.org/x/sys/unix/mmap_unix_test.go | 23 + vendor/golang.org/x/sys/unix/race.go | 30 + vendor/golang.org/x/sys/unix/race0.go | 25 + .../golang.org/x/sys/unix/sockcmsg_linux.go | 36 + vendor/golang.org/x/sys/unix/sockcmsg_unix.go | 103 + vendor/golang.org/x/sys/unix/str.go | 26 + vendor/golang.org/x/sys/unix/syscall.go | 74 + vendor/golang.org/x/sys/unix/syscall_bsd.go | 628 +++++ .../golang.org/x/sys/unix/syscall_bsd_test.go | 42 + .../golang.org/x/sys/unix/syscall_darwin.go | 509 ++++ .../x/sys/unix/syscall_darwin_386.go | 79 + .../x/sys/unix/syscall_darwin_amd64.go | 81 + .../x/sys/unix/syscall_darwin_arm.go | 73 + .../x/sys/unix/syscall_darwin_arm64.go | 79 + .../x/sys/unix/syscall_dragonfly.go | 411 ++++ .../x/sys/unix/syscall_dragonfly_386.go | 63 + .../x/sys/unix/syscall_dragonfly_amd64.go | 63 + .../golang.org/x/sys/unix/syscall_freebsd.go | 682 ++++++ .../x/sys/unix/syscall_freebsd_386.go | 63 + .../x/sys/unix/syscall_freebsd_amd64.go | 63 + .../x/sys/unix/syscall_freebsd_arm.go | 63 + .../x/sys/unix/syscall_freebsd_test.go | 20 + vendor/golang.org/x/sys/unix/syscall_linux.go | 1086 ++++++++ .../x/sys/unix/syscall_linux_386.go | 388 +++ .../x/sys/unix/syscall_linux_amd64.go | 146 ++ .../x/sys/unix/syscall_linux_arm.go | 233 ++ .../x/sys/unix/syscall_linux_arm64.go | 150 ++ .../x/sys/unix/syscall_linux_ppc64x.go | 96 + .../golang.org/x/sys/unix/syscall_netbsd.go | 492 ++++ .../x/sys/unix/syscall_netbsd_386.go | 44 + .../x/sys/unix/syscall_netbsd_amd64.go | 44 + .../x/sys/unix/syscall_netbsd_arm.go | 44 + .../golang.org/x/sys/unix/syscall_no_getwd.go | 11 + .../golang.org/x/sys/unix/syscall_openbsd.go | 303 +++ .../x/sys/unix/syscall_openbsd_386.go | 44 + .../x/sys/unix/syscall_openbsd_amd64.go | 44 + .../golang.org/x/sys/unix/syscall_solaris.go | 713 ++++++ .../x/sys/unix/syscall_solaris_amd64.go | 37 + vendor/golang.org/x/sys/unix/syscall_test.go | 50 + vendor/golang.org/x/sys/unix/syscall_unix.go | 297 +++ .../x/sys/unix/syscall_unix_test.go | 318 +++ vendor/golang.org/x/sys/unix/types_darwin.go | 250 ++ .../golang.org/x/sys/unix/types_dragonfly.go | 242 ++ vendor/golang.org/x/sys/unix/types_freebsd.go | 353 +++ vendor/golang.org/x/sys/unix/types_linux.go | 399 +++ vendor/golang.org/x/sys/unix/types_netbsd.go | 232 ++ vendor/golang.org/x/sys/unix/types_openbsd.go | 244 ++ vendor/golang.org/x/sys/unix/types_solaris.go | 260 ++ .../x/sys/unix/zerrors_darwin_386.go | 1576 ++++++++++++ .../x/sys/unix/zerrors_darwin_amd64.go | 1576 ++++++++++++ .../x/sys/unix/zerrors_darwin_arm.go | 1293 ++++++++++ .../x/sys/unix/zerrors_darwin_arm64.go | 1576 ++++++++++++ .../x/sys/unix/zerrors_dragonfly_386.go | 1530 ++++++++++++ .../x/sys/unix/zerrors_dragonfly_amd64.go | 1530 ++++++++++++ .../x/sys/unix/zerrors_freebsd_386.go | 1743 +++++++++++++ .../x/sys/unix/zerrors_freebsd_amd64.go | 1748 +++++++++++++ .../x/sys/unix/zerrors_freebsd_arm.go | 1729 +++++++++++++ .../x/sys/unix/zerrors_linux_386.go | 1761 +++++++++++++ .../x/sys/unix/zerrors_linux_amd64.go | 1762 +++++++++++++ .../x/sys/unix/zerrors_linux_arm.go | 1577 ++++++++++++ .../x/sys/unix/zerrors_linux_arm64.go | 1843 ++++++++++++++ .../x/sys/unix/zerrors_linux_ppc64.go | 1922 +++++++++++++++ .../x/sys/unix/zerrors_linux_ppc64le.go | 1921 +++++++++++++++ .../x/sys/unix/zerrors_netbsd_386.go | 1712 +++++++++++++ .../x/sys/unix/zerrors_netbsd_amd64.go | 1702 +++++++++++++ .../x/sys/unix/zerrors_netbsd_arm.go | 1688 +++++++++++++ .../x/sys/unix/zerrors_openbsd_386.go | 1584 ++++++++++++ .../x/sys/unix/zerrors_openbsd_amd64.go | 1583 ++++++++++++ .../x/sys/unix/zerrors_solaris_amd64.go | 1436 +++++++++++ .../x/sys/unix/zsyscall_darwin_386.go | 1426 +++++++++++ .../x/sys/unix/zsyscall_darwin_amd64.go | 1442 +++++++++++ .../x/sys/unix/zsyscall_darwin_arm.go | 1426 +++++++++++ .../x/sys/unix/zsyscall_darwin_arm64.go | 1426 +++++++++++ .../x/sys/unix/zsyscall_dragonfly_386.go | 1412 +++++++++++ .../x/sys/unix/zsyscall_dragonfly_amd64.go | 1412 +++++++++++ .../x/sys/unix/zsyscall_freebsd_386.go | 1664 +++++++++++++ .../x/sys/unix/zsyscall_freebsd_amd64.go | 1664 +++++++++++++ .../x/sys/unix/zsyscall_freebsd_arm.go | 1664 +++++++++++++ .../x/sys/unix/zsyscall_linux_386.go | 1628 ++++++++++++ .../x/sys/unix/zsyscall_linux_amd64.go | 1822 ++++++++++++++ .../x/sys/unix/zsyscall_linux_arm.go | 1756 +++++++++++++ .../x/sys/unix/zsyscall_linux_arm64.go | 1750 +++++++++++++ .../x/sys/unix/zsyscall_linux_ppc64.go | 1792 ++++++++++++++ .../x/sys/unix/zsyscall_linux_ppc64le.go | 1792 ++++++++++++++ .../x/sys/unix/zsyscall_netbsd_386.go | 1326 ++++++++++ .../x/sys/unix/zsyscall_netbsd_amd64.go | 1326 ++++++++++ .../x/sys/unix/zsyscall_netbsd_arm.go | 1326 ++++++++++ .../x/sys/unix/zsyscall_openbsd_386.go | 1386 +++++++++++ .../x/sys/unix/zsyscall_openbsd_amd64.go | 1386 +++++++++++ .../x/sys/unix/zsyscall_solaris_amd64.go | 1559 ++++++++++++ .../golang.org/x/sys/unix/zsysctl_openbsd.go | 270 ++ .../x/sys/unix/zsysnum_darwin_386.go | 398 +++ .../x/sys/unix/zsysnum_darwin_amd64.go | 398 +++ .../x/sys/unix/zsysnum_darwin_arm.go | 358 +++ .../x/sys/unix/zsysnum_darwin_arm64.go | 398 +++ .../x/sys/unix/zsysnum_dragonfly_386.go | 304 +++ .../x/sys/unix/zsysnum_dragonfly_amd64.go | 304 +++ .../x/sys/unix/zsysnum_freebsd_386.go | 351 +++ .../x/sys/unix/zsysnum_freebsd_amd64.go | 351 +++ .../x/sys/unix/zsysnum_freebsd_arm.go | 351 +++ .../x/sys/unix/zsysnum_linux_386.go | 355 +++ .../x/sys/unix/zsysnum_linux_amd64.go | 321 +++ .../x/sys/unix/zsysnum_linux_arm.go | 356 +++ .../x/sys/unix/zsysnum_linux_arm64.go | 272 ++ .../x/sys/unix/zsysnum_linux_ppc64.go | 360 +++ .../x/sys/unix/zsysnum_linux_ppc64le.go | 353 +++ .../x/sys/unix/zsysnum_netbsd_386.go | 273 +++ .../x/sys/unix/zsysnum_netbsd_amd64.go | 273 +++ .../x/sys/unix/zsysnum_netbsd_arm.go | 273 +++ .../x/sys/unix/zsysnum_openbsd_386.go | 207 ++ .../x/sys/unix/zsysnum_openbsd_amd64.go | 207 ++ .../x/sys/unix/zsysnum_solaris_amd64.go | 13 + .../x/sys/unix/ztypes_darwin_386.go | 447 ++++ .../x/sys/unix/ztypes_darwin_amd64.go | 462 ++++ .../x/sys/unix/ztypes_darwin_arm.go | 449 ++++ .../x/sys/unix/ztypes_darwin_arm64.go | 457 ++++ .../x/sys/unix/ztypes_dragonfly_386.go | 437 ++++ .../x/sys/unix/ztypes_dragonfly_amd64.go | 443 ++++ .../x/sys/unix/ztypes_freebsd_386.go | 502 ++++ .../x/sys/unix/ztypes_freebsd_amd64.go | 505 ++++ .../x/sys/unix/ztypes_freebsd_arm.go | 497 ++++ .../golang.org/x/sys/unix/ztypes_linux_386.go | 592 +++++ .../x/sys/unix/ztypes_linux_amd64.go | 610 +++++ .../golang.org/x/sys/unix/ztypes_linux_arm.go | 683 ++++++ .../x/sys/unix/ztypes_linux_arm64.go | 597 +++++ .../x/sys/unix/ztypes_linux_ppc64.go | 607 +++++ .../x/sys/unix/ztypes_linux_ppc64le.go | 607 +++++ .../x/sys/unix/ztypes_netbsd_386.go | 396 +++ .../x/sys/unix/ztypes_netbsd_amd64.go | 403 +++ .../x/sys/unix/ztypes_netbsd_arm.go | 401 +++ .../x/sys/unix/ztypes_openbsd_386.go | 441 ++++ .../x/sys/unix/ztypes_openbsd_amd64.go | 448 ++++ .../x/sys/unix/ztypes_solaris_amd64.go | 422 ++++ vendor/golang.org/x/sys/windows/asm.s | 8 + .../x/sys/windows/asm_windows_386.s | 13 + .../x/sys/windows/asm_windows_amd64.s | 13 + .../golang.org/x/sys/windows/dll_windows.go | 275 +++ vendor/golang.org/x/sys/windows/env_unset.go | 14 + .../golang.org/x/sys/windows/env_windows.go | 25 + vendor/golang.org/x/sys/windows/eventlog.go | 20 + .../golang.org/x/sys/windows/exec_windows.go | 97 + vendor/golang.org/x/sys/windows/race.go | 30 + vendor/golang.org/x/sys/windows/race0.go | 25 + .../x/sys/windows/registry/export_test.go | 11 + .../golang.org/x/sys/windows/registry/key.go | 178 ++ .../x/sys/windows/registry/registry_test.go | 754 ++++++ .../x/sys/windows/registry/syscall.go | 33 + .../x/sys/windows/registry/value.go | 384 +++ .../sys/windows/registry/zsyscall_windows.go | 82 + .../x/sys/windows/security_windows.go | 435 ++++ vendor/golang.org/x/sys/windows/service.go | 143 ++ vendor/golang.org/x/sys/windows/str.go | 22 + .../golang.org/x/sys/windows/svc/debug/log.go | 56 + .../x/sys/windows/svc/debug/service.go | 45 + vendor/golang.org/x/sys/windows/svc/event.go | 48 + .../x/sys/windows/svc/eventlog/install.go | 80 + .../x/sys/windows/svc/eventlog/log.go | 70 + .../x/sys/windows/svc/eventlog/log_test.go | 51 + .../x/sys/windows/svc/example/beep.go | 22 + .../x/sys/windows/svc/example/install.go | 92 + .../x/sys/windows/svc/example/main.go | 76 + .../x/sys/windows/svc/example/manage.go | 62 + .../x/sys/windows/svc/example/service.go | 82 + vendor/golang.org/x/sys/windows/svc/go12.c | 24 + vendor/golang.org/x/sys/windows/svc/go12.go | 11 + vendor/golang.org/x/sys/windows/svc/go13.go | 31 + .../x/sys/windows/svc/mgr/config.go | 139 ++ .../golang.org/x/sys/windows/svc/mgr/mgr.go | 116 + .../x/sys/windows/svc/mgr/mgr_test.go | 154 ++ .../x/sys/windows/svc/mgr/service.go | 74 + .../golang.org/x/sys/windows/svc/security.go | 62 + .../golang.org/x/sys/windows/svc/service.go | 316 +++ .../golang.org/x/sys/windows/svc/svc_test.go | 118 + vendor/golang.org/x/sys/windows/svc/sys_386.s | 67 + .../golang.org/x/sys/windows/svc/sys_amd64.s | 41 + vendor/golang.org/x/sys/windows/syscall.go | 77 + .../golang.org/x/sys/windows/syscall_test.go | 33 + .../x/sys/windows/syscall_windows.go | 986 ++++++++ .../x/sys/windows/syscall_windows_test.go | 107 + .../x/sys/windows/zsyscall_windows.go | 2177 +++++++++++++++++ .../x/sys/windows/ztypes_windows.go | 1137 +++++++++ .../x/sys/windows/ztypes_windows_386.go | 22 + .../x/sys/windows/ztypes_windows_amd64.go | 22 + 258 files changed, 108363 insertions(+) create mode 100644 vendor/golang.org/x/sys/.gitattributes create mode 100644 vendor/golang.org/x/sys/.gitignore create mode 100644 vendor/golang.org/x/sys/AUTHORS create mode 100644 vendor/golang.org/x/sys/CONTRIBUTING.md create mode 100644 vendor/golang.org/x/sys/CONTRIBUTORS create mode 100644 vendor/golang.org/x/sys/LICENSE create mode 100644 vendor/golang.org/x/sys/PATENTS create mode 100644 vendor/golang.org/x/sys/README create mode 100644 vendor/golang.org/x/sys/codereview.cfg create mode 100644 vendor/golang.org/x/sys/plan9/asm.s create mode 100644 vendor/golang.org/x/sys/plan9/asm_plan9_386.s create mode 100644 vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s create mode 100644 vendor/golang.org/x/sys/plan9/const_plan9.go create mode 100644 vendor/golang.org/x/sys/plan9/dir_plan9.go create mode 100644 vendor/golang.org/x/sys/plan9/env_plan9.go create mode 100644 vendor/golang.org/x/sys/plan9/env_unset.go create mode 100644 vendor/golang.org/x/sys/plan9/errors_plan9.go create mode 100755 vendor/golang.org/x/sys/plan9/mkall.sh create mode 100755 vendor/golang.org/x/sys/plan9/mkerrors.sh create mode 100755 vendor/golang.org/x/sys/plan9/mksyscall.pl create mode 100755 vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh create mode 100644 vendor/golang.org/x/sys/plan9/pwd_go15_plan9.go create mode 100644 vendor/golang.org/x/sys/plan9/pwd_plan9.go create mode 100644 vendor/golang.org/x/sys/plan9/race.go create mode 100644 vendor/golang.org/x/sys/plan9/race0.go create mode 100644 vendor/golang.org/x/sys/plan9/str.go create mode 100644 vendor/golang.org/x/sys/plan9/syscall.go create mode 100644 vendor/golang.org/x/sys/plan9/syscall_plan9.go create mode 100644 vendor/golang.org/x/sys/plan9/syscall_test.go create mode 100644 vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go create mode 100644 vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go create mode 100644 vendor/golang.org/x/sys/plan9/zsysnum_plan9.go create mode 100644 vendor/golang.org/x/sys/unix/.gitignore create mode 100644 vendor/golang.org/x/sys/unix/asm.s create mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_386.s create mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_amd64.s create mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_arm.s create mode 100644 vendor/golang.org/x/sys/unix/asm_darwin_arm64.s create mode 100644 vendor/golang.org/x/sys/unix/asm_dragonfly_386.s create mode 100644 vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s create mode 100644 vendor/golang.org/x/sys/unix/asm_freebsd_386.s create mode 100644 vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s create mode 100644 vendor/golang.org/x/sys/unix/asm_freebsd_arm.s create mode 100644 vendor/golang.org/x/sys/unix/asm_linux_386.s create mode 100644 vendor/golang.org/x/sys/unix/asm_linux_amd64.s create mode 100644 vendor/golang.org/x/sys/unix/asm_linux_arm.s create mode 100644 vendor/golang.org/x/sys/unix/asm_linux_arm64.s create mode 100644 vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s create mode 100644 vendor/golang.org/x/sys/unix/asm_netbsd_386.s create mode 100644 vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s create mode 100644 vendor/golang.org/x/sys/unix/asm_netbsd_arm.s create mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_386.s create mode 100644 vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s create mode 100644 vendor/golang.org/x/sys/unix/asm_solaris_amd64.s create mode 100644 vendor/golang.org/x/sys/unix/constants.go create mode 100644 vendor/golang.org/x/sys/unix/creds_test.go create mode 100644 vendor/golang.org/x/sys/unix/env_unix.go create mode 100644 vendor/golang.org/x/sys/unix/env_unset.go create mode 100644 vendor/golang.org/x/sys/unix/export_test.go create mode 100644 vendor/golang.org/x/sys/unix/flock.go create mode 100644 vendor/golang.org/x/sys/unix/flock_linux_32bit.go create mode 100644 vendor/golang.org/x/sys/unix/gccgo.go create mode 100644 vendor/golang.org/x/sys/unix/gccgo_c.c create mode 100644 vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go create mode 100755 vendor/golang.org/x/sys/unix/mkall.sh create mode 100755 vendor/golang.org/x/sys/unix/mkerrors.sh create mode 100755 vendor/golang.org/x/sys/unix/mksyscall.pl create mode 100755 vendor/golang.org/x/sys/unix/mksyscall_solaris.pl create mode 100755 vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl create mode 100755 vendor/golang.org/x/sys/unix/mksysnum_darwin.pl create mode 100755 vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl create mode 100755 vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl create mode 100755 vendor/golang.org/x/sys/unix/mksysnum_linux.pl create mode 100755 vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl create mode 100755 vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl create mode 100644 vendor/golang.org/x/sys/unix/mmap_unix_test.go create mode 100644 vendor/golang.org/x/sys/unix/race.go create mode 100644 vendor/golang.org/x/sys/unix/race0.go create mode 100644 vendor/golang.org/x/sys/unix/sockcmsg_linux.go create mode 100644 vendor/golang.org/x/sys/unix/sockcmsg_unix.go create mode 100644 vendor/golang.org/x/sys/unix/str.go create mode 100644 vendor/golang.org/x/sys/unix/syscall.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_bsd.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_bsd_test.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_386.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_arm.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_dragonfly.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_dragonfly_386.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_freebsd_test.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_386.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_arm.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_arm64.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_no_getwd.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_solaris.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_test.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_unix.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_unix_test.go create mode 100644 vendor/golang.org/x/sys/unix/types_darwin.go create mode 100644 vendor/golang.org/x/sys/unix/types_dragonfly.go create mode 100644 vendor/golang.org/x/sys/unix/types_freebsd.go create mode 100644 vendor/golang.org/x/sys/unix/types_linux.go create mode 100644 vendor/golang.org/x/sys/unix/types_netbsd.go create mode 100644 vendor/golang.org/x/sys/unix/types_openbsd.go create mode 100644 vendor/golang.org/x/sys/unix/types_solaris.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_386.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_dragonfly_386.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_386.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_dragonfly_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysctl_openbsd.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_dragonfly_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_386.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_dragonfly_386.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_386.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_arm.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go create mode 100644 vendor/golang.org/x/sys/windows/asm.s create mode 100644 vendor/golang.org/x/sys/windows/asm_windows_386.s create mode 100644 vendor/golang.org/x/sys/windows/asm_windows_amd64.s create mode 100644 vendor/golang.org/x/sys/windows/dll_windows.go create mode 100644 vendor/golang.org/x/sys/windows/env_unset.go create mode 100644 vendor/golang.org/x/sys/windows/env_windows.go create mode 100644 vendor/golang.org/x/sys/windows/eventlog.go create mode 100644 vendor/golang.org/x/sys/windows/exec_windows.go create mode 100644 vendor/golang.org/x/sys/windows/race.go create mode 100644 vendor/golang.org/x/sys/windows/race0.go create mode 100644 vendor/golang.org/x/sys/windows/registry/export_test.go create mode 100644 vendor/golang.org/x/sys/windows/registry/key.go create mode 100644 vendor/golang.org/x/sys/windows/registry/registry_test.go create mode 100644 vendor/golang.org/x/sys/windows/registry/syscall.go create mode 100644 vendor/golang.org/x/sys/windows/registry/value.go create mode 100644 vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go create mode 100644 vendor/golang.org/x/sys/windows/security_windows.go create mode 100644 vendor/golang.org/x/sys/windows/service.go create mode 100644 vendor/golang.org/x/sys/windows/str.go create mode 100644 vendor/golang.org/x/sys/windows/svc/debug/log.go create mode 100644 vendor/golang.org/x/sys/windows/svc/debug/service.go create mode 100644 vendor/golang.org/x/sys/windows/svc/event.go create mode 100644 vendor/golang.org/x/sys/windows/svc/eventlog/install.go create mode 100644 vendor/golang.org/x/sys/windows/svc/eventlog/log.go create mode 100644 vendor/golang.org/x/sys/windows/svc/eventlog/log_test.go create mode 100644 vendor/golang.org/x/sys/windows/svc/example/beep.go create mode 100644 vendor/golang.org/x/sys/windows/svc/example/install.go create mode 100644 vendor/golang.org/x/sys/windows/svc/example/main.go create mode 100644 vendor/golang.org/x/sys/windows/svc/example/manage.go create mode 100644 vendor/golang.org/x/sys/windows/svc/example/service.go create mode 100644 vendor/golang.org/x/sys/windows/svc/go12.c create mode 100644 vendor/golang.org/x/sys/windows/svc/go12.go create mode 100644 vendor/golang.org/x/sys/windows/svc/go13.go create mode 100644 vendor/golang.org/x/sys/windows/svc/mgr/config.go create mode 100644 vendor/golang.org/x/sys/windows/svc/mgr/mgr.go create mode 100644 vendor/golang.org/x/sys/windows/svc/mgr/mgr_test.go create mode 100644 vendor/golang.org/x/sys/windows/svc/mgr/service.go create mode 100644 vendor/golang.org/x/sys/windows/svc/security.go create mode 100644 vendor/golang.org/x/sys/windows/svc/service.go create mode 100644 vendor/golang.org/x/sys/windows/svc/svc_test.go create mode 100644 vendor/golang.org/x/sys/windows/svc/sys_386.s create mode 100644 vendor/golang.org/x/sys/windows/svc/sys_amd64.s create mode 100644 vendor/golang.org/x/sys/windows/syscall.go create mode 100644 vendor/golang.org/x/sys/windows/syscall_test.go create mode 100644 vendor/golang.org/x/sys/windows/syscall_windows.go create mode 100644 vendor/golang.org/x/sys/windows/syscall_windows_test.go create mode 100644 vendor/golang.org/x/sys/windows/zsyscall_windows.go create mode 100644 vendor/golang.org/x/sys/windows/ztypes_windows.go create mode 100644 vendor/golang.org/x/sys/windows/ztypes_windows_386.go create mode 100644 vendor/golang.org/x/sys/windows/ztypes_windows_amd64.go diff --git a/vendor/golang.org/x/sys/.gitattributes b/vendor/golang.org/x/sys/.gitattributes new file mode 100644 index 0000000..d2f212e --- /dev/null +++ b/vendor/golang.org/x/sys/.gitattributes @@ -0,0 +1,10 @@ +# Treat all files in this repo as binary, with no git magic updating +# line endings. Windows users contributing to Go will need to use a +# modern version of git and editors capable of LF line endings. +# +# We'll prevent accidental CRLF line endings from entering the repo +# via the git-review gofmt checks. +# +# See golang.org/issue/9281 + +* -text diff --git a/vendor/golang.org/x/sys/.gitignore b/vendor/golang.org/x/sys/.gitignore new file mode 100644 index 0000000..8339fd6 --- /dev/null +++ b/vendor/golang.org/x/sys/.gitignore @@ -0,0 +1,2 @@ +# Add no patterns to .hgignore except for files generated by the build. +last-change diff --git a/vendor/golang.org/x/sys/AUTHORS b/vendor/golang.org/x/sys/AUTHORS new file mode 100644 index 0000000..15167cd --- /dev/null +++ b/vendor/golang.org/x/sys/AUTHORS @@ -0,0 +1,3 @@ +# This source code refers to The Go Authors for copyright purposes. +# The master list of authors is in the main Go distribution, +# visible at http://tip.golang.org/AUTHORS. diff --git a/vendor/golang.org/x/sys/CONTRIBUTING.md b/vendor/golang.org/x/sys/CONTRIBUTING.md new file mode 100644 index 0000000..88dff59 --- /dev/null +++ b/vendor/golang.org/x/sys/CONTRIBUTING.md @@ -0,0 +1,31 @@ +# Contributing to Go + +Go is an open source project. + +It is the work of hundreds of contributors. We appreciate your help! + + +## Filing issues + +When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: + +1. What version of Go are you using (`go version`)? +2. What operating system and processor architecture are you using? +3. What did you do? +4. What did you expect to see? +5. What did you see instead? + +General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. +The gophers there will answer or ask you to file an issue if you've tripped over a bug. + +## Contributing code + +Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) +before sending patches. + +**We do not accept GitHub pull requests** +(we use [Gerrit](https://code.google.com/p/gerrit/) instead for code review). + +Unless otherwise noted, the Go source files are distributed under +the BSD-style license found in the LICENSE file. + diff --git a/vendor/golang.org/x/sys/CONTRIBUTORS b/vendor/golang.org/x/sys/CONTRIBUTORS new file mode 100644 index 0000000..1c4577e --- /dev/null +++ b/vendor/golang.org/x/sys/CONTRIBUTORS @@ -0,0 +1,3 @@ +# This source code was written by the Go contributors. +# The master list of contributors is in the main Go distribution, +# visible at http://tip.golang.org/CONTRIBUTORS. diff --git a/vendor/golang.org/x/sys/LICENSE b/vendor/golang.org/x/sys/LICENSE new file mode 100644 index 0000000..6a66aea --- /dev/null +++ b/vendor/golang.org/x/sys/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/golang.org/x/sys/PATENTS b/vendor/golang.org/x/sys/PATENTS new file mode 100644 index 0000000..7330990 --- /dev/null +++ b/vendor/golang.org/x/sys/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/vendor/golang.org/x/sys/README b/vendor/golang.org/x/sys/README new file mode 100644 index 0000000..bd422b4 --- /dev/null +++ b/vendor/golang.org/x/sys/README @@ -0,0 +1,3 @@ +This repository holds supplemental Go packages for low-level interactions with the operating system. + +To submit changes to this repository, see http://golang.org/doc/contribute.html. diff --git a/vendor/golang.org/x/sys/codereview.cfg b/vendor/golang.org/x/sys/codereview.cfg new file mode 100644 index 0000000..3f8b14b --- /dev/null +++ b/vendor/golang.org/x/sys/codereview.cfg @@ -0,0 +1 @@ +issuerepo: golang/go diff --git a/vendor/golang.org/x/sys/plan9/asm.s b/vendor/golang.org/x/sys/plan9/asm.s new file mode 100644 index 0000000..d4ca868 --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/asm.s @@ -0,0 +1,8 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +#include "textflag.h" + +TEXT ·use(SB),NOSPLIT,$0 + RET diff --git a/vendor/golang.org/x/sys/plan9/asm_plan9_386.s b/vendor/golang.org/x/sys/plan9/asm_plan9_386.s new file mode 100644 index 0000000..bc5cab1 --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/asm_plan9_386.s @@ -0,0 +1,30 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +#include "textflag.h" + +// +// System call support for 386, Plan 9 +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-32 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-44 + JMP syscall·Syscall6(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 + JMP syscall·RawSyscall6(SB) + +TEXT ·seek(SB),NOSPLIT,$0-36 + JMP syscall·seek(SB) + +TEXT ·exit(SB),NOSPLIT,$4-4 + JMP syscall·exit(SB) diff --git a/vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s b/vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s new file mode 100644 index 0000000..d3448e6 --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/asm_plan9_amd64.s @@ -0,0 +1,30 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +#include "textflag.h" + +// +// System call support for amd64, Plan 9 +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-64 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-88 + JMP syscall·Syscall6(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 + JMP syscall·RawSyscall6(SB) + +TEXT ·seek(SB),NOSPLIT,$0-56 + JMP syscall·seek(SB) + +TEXT ·exit(SB),NOSPLIT,$8-8 + JMP syscall·exit(SB) diff --git a/vendor/golang.org/x/sys/plan9/const_plan9.go b/vendor/golang.org/x/sys/plan9/const_plan9.go new file mode 100644 index 0000000..430dac0 --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/const_plan9.go @@ -0,0 +1,59 @@ +package plan9 + +// Plan 9 Constants + +// Open modes +const ( + O_RDONLY = 0 + O_WRONLY = 1 + O_RDWR = 2 + O_TRUNC = 16 + O_CLOEXEC = 32 + O_EXCL = 0x1000 +) + +// Rfork flags +const ( + RFNAMEG = 1 << 0 + RFENVG = 1 << 1 + RFFDG = 1 << 2 + RFNOTEG = 1 << 3 + RFPROC = 1 << 4 + RFMEM = 1 << 5 + RFNOWAIT = 1 << 6 + RFCNAMEG = 1 << 10 + RFCENVG = 1 << 11 + RFCFDG = 1 << 12 + RFREND = 1 << 13 + RFNOMNT = 1 << 14 +) + +// Qid.Type bits +const ( + QTDIR = 0x80 + QTAPPEND = 0x40 + QTEXCL = 0x20 + QTMOUNT = 0x10 + QTAUTH = 0x08 + QTTMP = 0x04 + QTFILE = 0x00 +) + +// Dir.Mode bits +const ( + DMDIR = 0x80000000 + DMAPPEND = 0x40000000 + DMEXCL = 0x20000000 + DMMOUNT = 0x10000000 + DMAUTH = 0x08000000 + DMTMP = 0x04000000 + DMREAD = 0x4 + DMWRITE = 0x2 + DMEXEC = 0x1 +) + +const ( + STATMAX = 65535 + ERRMAX = 128 + STATFIXLEN = 49 +) diff --git a/vendor/golang.org/x/sys/plan9/dir_plan9.go b/vendor/golang.org/x/sys/plan9/dir_plan9.go new file mode 100644 index 0000000..0955e0c --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/dir_plan9.go @@ -0,0 +1,212 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Plan 9 directory marshalling. See intro(5). + +package plan9 + +import "errors" + +var ( + ErrShortStat = errors.New("stat buffer too short") + ErrBadStat = errors.New("malformed stat buffer") + ErrBadName = errors.New("bad character in file name") +) + +// A Qid represents a 9P server's unique identification for a file. +type Qid struct { + Path uint64 // the file server's unique identification for the file + Vers uint32 // version number for given Path + Type uint8 // the type of the file (plan9.QTDIR for example) +} + +// A Dir contains the metadata for a file. +type Dir struct { + // system-modified data + Type uint16 // server type + Dev uint32 // server subtype + + // file data + Qid Qid // unique id from server + Mode uint32 // permissions + Atime uint32 // last read time + Mtime uint32 // last write time + Length int64 // file length + Name string // last element of path + Uid string // owner name + Gid string // group name + Muid string // last modifier name +} + +var nullDir = Dir{ + Type: ^uint16(0), + Dev: ^uint32(0), + Qid: Qid{ + Path: ^uint64(0), + Vers: ^uint32(0), + Type: ^uint8(0), + }, + Mode: ^uint32(0), + Atime: ^uint32(0), + Mtime: ^uint32(0), + Length: ^int64(0), +} + +// Null assigns special "don't touch" values to members of d to +// avoid modifying them during plan9.Wstat. +func (d *Dir) Null() { *d = nullDir } + +// Marshal encodes a 9P stat message corresponding to d into b +// +// If there isn't enough space in b for a stat message, ErrShortStat is returned. +func (d *Dir) Marshal(b []byte) (n int, err error) { + n = STATFIXLEN + len(d.Name) + len(d.Uid) + len(d.Gid) + len(d.Muid) + if n > len(b) { + return n, ErrShortStat + } + + for _, c := range d.Name { + if c == '/' { + return n, ErrBadName + } + } + + b = pbit16(b, uint16(n)-2) + b = pbit16(b, d.Type) + b = pbit32(b, d.Dev) + b = pbit8(b, d.Qid.Type) + b = pbit32(b, d.Qid.Vers) + b = pbit64(b, d.Qid.Path) + b = pbit32(b, d.Mode) + b = pbit32(b, d.Atime) + b = pbit32(b, d.Mtime) + b = pbit64(b, uint64(d.Length)) + b = pstring(b, d.Name) + b = pstring(b, d.Uid) + b = pstring(b, d.Gid) + b = pstring(b, d.Muid) + + return n, nil +} + +// UnmarshalDir decodes a single 9P stat message from b and returns the resulting Dir. +// +// If b is too small to hold a valid stat message, ErrShortStat is returned. +// +// If the stat message itself is invalid, ErrBadStat is returned. +func UnmarshalDir(b []byte) (*Dir, error) { + if len(b) < STATFIXLEN { + return nil, ErrShortStat + } + size, buf := gbit16(b) + if len(b) != int(size)+2 { + return nil, ErrBadStat + } + b = buf + + var d Dir + d.Type, b = gbit16(b) + d.Dev, b = gbit32(b) + d.Qid.Type, b = gbit8(b) + d.Qid.Vers, b = gbit32(b) + d.Qid.Path, b = gbit64(b) + d.Mode, b = gbit32(b) + d.Atime, b = gbit32(b) + d.Mtime, b = gbit32(b) + + n, b := gbit64(b) + d.Length = int64(n) + + var ok bool + if d.Name, b, ok = gstring(b); !ok { + return nil, ErrBadStat + } + if d.Uid, b, ok = gstring(b); !ok { + return nil, ErrBadStat + } + if d.Gid, b, ok = gstring(b); !ok { + return nil, ErrBadStat + } + if d.Muid, b, ok = gstring(b); !ok { + return nil, ErrBadStat + } + + return &d, nil +} + +// pbit8 copies the 8-bit number v to b and returns the remaining slice of b. +func pbit8(b []byte, v uint8) []byte { + b[0] = byte(v) + return b[1:] +} + +// pbit16 copies the 16-bit number v to b in little-endian order and returns the remaining slice of b. +func pbit16(b []byte, v uint16) []byte { + b[0] = byte(v) + b[1] = byte(v >> 8) + return b[2:] +} + +// pbit32 copies the 32-bit number v to b in little-endian order and returns the remaining slice of b. +func pbit32(b []byte, v uint32) []byte { + b[0] = byte(v) + b[1] = byte(v >> 8) + b[2] = byte(v >> 16) + b[3] = byte(v >> 24) + return b[4:] +} + +// pbit64 copies the 64-bit number v to b in little-endian order and returns the remaining slice of b. +func pbit64(b []byte, v uint64) []byte { + b[0] = byte(v) + b[1] = byte(v >> 8) + b[2] = byte(v >> 16) + b[3] = byte(v >> 24) + b[4] = byte(v >> 32) + b[5] = byte(v >> 40) + b[6] = byte(v >> 48) + b[7] = byte(v >> 56) + return b[8:] +} + +// pstring copies the string s to b, prepending it with a 16-bit length in little-endian order, and +// returning the remaining slice of b.. +func pstring(b []byte, s string) []byte { + b = pbit16(b, uint16(len(s))) + n := copy(b, s) + return b[n:] +} + +// gbit8 reads an 8-bit number from b and returns it with the remaining slice of b. +func gbit8(b []byte) (uint8, []byte) { + return uint8(b[0]), b[1:] +} + +// gbit16 reads a 16-bit number in little-endian order from b and returns it with the remaining slice of b. +func gbit16(b []byte) (uint16, []byte) { + return uint16(b[0]) | uint16(b[1])<<8, b[2:] +} + +// gbit32 reads a 32-bit number in little-endian order from b and returns it with the remaining slice of b. +func gbit32(b []byte) (uint32, []byte) { + return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24, b[4:] +} + +// gbit64 reads a 64-bit number in little-endian order from b and returns it with the remaining slice of b. +func gbit64(b []byte) (uint64, []byte) { + lo := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 + hi := uint32(b[4]) | uint32(b[5])<<8 | uint32(b[6])<<16 | uint32(b[7])<<24 + return uint64(lo) | uint64(hi)<<32, b[8:] +} + +// gstring reads a string from b, prefixed with a 16-bit length in little-endian order. +// It returns the string with the remaining slice of b and a boolean. If the length is +// greater than the number of bytes in b, the boolean will be false. +func gstring(b []byte) (string, []byte, bool) { + n, b := gbit16(b) + if int(n) > len(b) { + return "", b, false + } + return string(b[:n]), b[n:], true +} diff --git a/vendor/golang.org/x/sys/plan9/env_plan9.go b/vendor/golang.org/x/sys/plan9/env_plan9.go new file mode 100644 index 0000000..25a96e7 --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/env_plan9.go @@ -0,0 +1,27 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Plan 9 environment variables. + +package plan9 + +import ( + "syscall" +) + +func Getenv(key string) (value string, found bool) { + return syscall.Getenv(key) +} + +func Setenv(key, value string) error { + return syscall.Setenv(key, value) +} + +func Clearenv() { + syscall.Clearenv() +} + +func Environ() []string { + return syscall.Environ() +} diff --git a/vendor/golang.org/x/sys/plan9/env_unset.go b/vendor/golang.org/x/sys/plan9/env_unset.go new file mode 100644 index 0000000..c37fc26 --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/env_unset.go @@ -0,0 +1,14 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.4 + +package plan9 + +import "syscall" + +func Unsetenv(key string) error { + // This was added in Go 1.4. + return syscall.Unsetenv(key) +} diff --git a/vendor/golang.org/x/sys/plan9/errors_plan9.go b/vendor/golang.org/x/sys/plan9/errors_plan9.go new file mode 100644 index 0000000..110cf6a --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/errors_plan9.go @@ -0,0 +1,50 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package plan9 + +import "syscall" + +// Constants +const ( + // Invented values to support what package os expects. + O_CREAT = 0x02000 + O_APPEND = 0x00400 + O_NOCTTY = 0x00000 + O_NONBLOCK = 0x00000 + O_SYNC = 0x00000 + O_ASYNC = 0x00000 + + S_IFMT = 0x1f000 + S_IFIFO = 0x1000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFBLK = 0x6000 + S_IFREG = 0x8000 + S_IFLNK = 0xa000 + S_IFSOCK = 0xc000 +) + +// Errors +var ( + EINVAL = syscall.NewError("bad arg in system call") + ENOTDIR = syscall.NewError("not a directory") + EISDIR = syscall.NewError("file is a directory") + ENOENT = syscall.NewError("file does not exist") + EEXIST = syscall.NewError("file already exists") + EMFILE = syscall.NewError("no free file descriptors") + EIO = syscall.NewError("i/o error") + ENAMETOOLONG = syscall.NewError("file name too long") + EINTR = syscall.NewError("interrupted") + EPERM = syscall.NewError("permission denied") + EBUSY = syscall.NewError("no free devices") + ETIMEDOUT = syscall.NewError("connection timed out") + EPLAN9 = syscall.NewError("not supported by plan 9") + + // The following errors do not correspond to any + // Plan 9 system messages. Invented to support + // what package os and others expect. + EACCES = syscall.NewError("access permission denied") + EAFNOSUPPORT = syscall.NewError("address family not supported by protocol") +) diff --git a/vendor/golang.org/x/sys/plan9/mkall.sh b/vendor/golang.org/x/sys/plan9/mkall.sh new file mode 100755 index 0000000..9f73c60 --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/mkall.sh @@ -0,0 +1,138 @@ +#!/usr/bin/env bash +# Copyright 2009 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +# The plan9 package provides access to the raw system call +# interface of the underlying operating system. Porting Go to +# a new architecture/operating system combination requires +# some manual effort, though there are tools that automate +# much of the process. The auto-generated files have names +# beginning with z. +# +# This script runs or (given -n) prints suggested commands to generate z files +# for the current system. Running those commands is not automatic. +# This script is documentation more than anything else. +# +# * asm_${GOOS}_${GOARCH}.s +# +# This hand-written assembly file implements system call dispatch. +# There are three entry points: +# +# func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr); +# func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr); +# func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr); +# +# The first and second are the standard ones; they differ only in +# how many arguments can be passed to the kernel. +# The third is for low-level use by the ForkExec wrapper; +# unlike the first two, it does not call into the scheduler to +# let it know that a system call is running. +# +# * syscall_${GOOS}.go +# +# This hand-written Go file implements system calls that need +# special handling and lists "//sys" comments giving prototypes +# for ones that can be auto-generated. Mksyscall reads those +# comments to generate the stubs. +# +# * syscall_${GOOS}_${GOARCH}.go +# +# Same as syscall_${GOOS}.go except that it contains code specific +# to ${GOOS} on one particular architecture. +# +# * types_${GOOS}.c +# +# This hand-written C file includes standard C headers and then +# creates typedef or enum names beginning with a dollar sign +# (use of $ in variable names is a gcc extension). The hardest +# part about preparing this file is figuring out which headers to +# include and which symbols need to be #defined to get the +# actual data structures that pass through to the kernel system calls. +# Some C libraries present alternate versions for binary compatibility +# and translate them on the way in and out of system calls, but +# there is almost always a #define that can get the real ones. +# See types_darwin.c and types_linux.c for examples. +# +# * zerror_${GOOS}_${GOARCH}.go +# +# This machine-generated file defines the system's error numbers, +# error strings, and signal numbers. The generator is "mkerrors.sh". +# Usually no arguments are needed, but mkerrors.sh will pass its +# arguments on to godefs. +# +# * zsyscall_${GOOS}_${GOARCH}.go +# +# Generated by mksyscall.pl; see syscall_${GOOS}.go above. +# +# * zsysnum_${GOOS}_${GOARCH}.go +# +# Generated by mksysnum_${GOOS}. +# +# * ztypes_${GOOS}_${GOARCH}.go +# +# Generated by godefs; see types_${GOOS}.c above. + +GOOSARCH="${GOOS}_${GOARCH}" + +# defaults +mksyscall="./mksyscall.pl" +mkerrors="./mkerrors.sh" +zerrors="zerrors_$GOOSARCH.go" +mksysctl="" +zsysctl="zsysctl_$GOOSARCH.go" +mksysnum= +mktypes= +run="sh" + +case "$1" in +-syscalls) + for i in zsyscall*go + do + sed 1q $i | sed 's;^// ;;' | sh > _$i && gofmt < _$i > $i + rm _$i + done + exit 0 + ;; +-n) + run="cat" + shift +esac + +case "$#" in +0) + ;; +*) + echo 'usage: mkall.sh [-n]' 1>&2 + exit 2 +esac + +case "$GOOSARCH" in +_* | *_ | _) + echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2 + exit 1 + ;; +plan9_386) + mkerrors= + mksyscall="./mksyscall.pl -l32 -plan9" + mksysnum="./mksysnum_plan9.sh /n/sources/plan9/sys/src/libc/9syscall/sys.h" + mktypes="XXX" + ;; +*) + echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2 + exit 1 + ;; +esac + +( + if [ -n "$mkerrors" ]; then echo "$mkerrors |gofmt >$zerrors"; fi + case "$GOOS" in + plan9) + syscall_goos="syscall_$GOOS.go" + if [ -n "$mksyscall" ]; then echo "$mksyscall $syscall_goos syscall_$GOOSARCH.go |gofmt >zsyscall_$GOOSARCH.go"; fi + ;; + esac + if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi + if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi + if [ -n "$mktypes" ]; then echo "$mktypes types_$GOOS.go |gofmt >ztypes_$GOOSARCH.go"; fi +) | $run diff --git a/vendor/golang.org/x/sys/plan9/mkerrors.sh b/vendor/golang.org/x/sys/plan9/mkerrors.sh new file mode 100755 index 0000000..052c86d --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/mkerrors.sh @@ -0,0 +1,246 @@ +#!/usr/bin/env bash +# Copyright 2009 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +# Generate Go code listing errors and other #defined constant +# values (ENAMETOOLONG etc.), by asking the preprocessor +# about the definitions. + +unset LANG +export LC_ALL=C +export LC_CTYPE=C + +CC=${CC:-gcc} + +uname=$(uname) + +includes=' +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +' + +ccflags="$@" + +# Write go tool cgo -godefs input. +( + echo package plan9 + echo + echo '/*' + indirect="includes_$(uname)" + echo "${!indirect} $includes" + echo '*/' + echo 'import "C"' + echo + echo 'const (' + + # The gcc command line prints all the #defines + # it encounters while processing the input + echo "${!indirect} $includes" | $CC -x c - -E -dM $ccflags | + awk ' + $1 != "#define" || $2 ~ /\(/ || $3 == "" {next} + + $2 ~ /^E([ABCD]X|[BIS]P|[SD]I|S|FL)$/ {next} # 386 registers + $2 ~ /^(SIGEV_|SIGSTKSZ|SIGRT(MIN|MAX))/ {next} + $2 ~ /^(SCM_SRCRT)$/ {next} + $2 ~ /^(MAP_FAILED)$/ {next} + + $2 !~ /^ETH_/ && + $2 !~ /^EPROC_/ && + $2 !~ /^EQUIV_/ && + $2 !~ /^EXPR_/ && + $2 ~ /^E[A-Z0-9_]+$/ || + $2 ~ /^B[0-9_]+$/ || + $2 ~ /^V[A-Z0-9]+$/ || + $2 ~ /^CS[A-Z0-9]/ || + $2 ~ /^I(SIG|CANON|CRNL|EXTEN|MAXBEL|STRIP|UTF8)$/ || + $2 ~ /^IGN/ || + $2 ~ /^IX(ON|ANY|OFF)$/ || + $2 ~ /^IN(LCR|PCK)$/ || + $2 ~ /(^FLU?SH)|(FLU?SH$)/ || + $2 ~ /^C(LOCAL|READ)$/ || + $2 == "BRKINT" || + $2 == "HUPCL" || + $2 == "PENDIN" || + $2 == "TOSTOP" || + $2 ~ /^PAR/ || + $2 ~ /^SIG[^_]/ || + $2 ~ /^O[CNPFP][A-Z]+[^_][A-Z]+$/ || + $2 ~ /^IN_/ || + $2 ~ /^LOCK_(SH|EX|NB|UN)$/ || + $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ || + $2 == "ICMPV6_FILTER" || + $2 == "SOMAXCONN" || + $2 == "NAME_MAX" || + $2 == "IFNAMSIZ" || + $2 ~ /^CTL_(MAXNAME|NET|QUERY)$/ || + $2 ~ /^SYSCTL_VERS/ || + $2 ~ /^(MS|MNT)_/ || + $2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ || + $2 ~ /^(O|F|FD|NAME|S|PTRACE|PT)_/ || + $2 ~ /^LINUX_REBOOT_CMD_/ || + $2 ~ /^LINUX_REBOOT_MAGIC[12]$/ || + $2 !~ "NLA_TYPE_MASK" && + $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P)_/ || + $2 ~ /^SIOC/ || + $2 ~ /^TIOC/ || + $2 !~ "RTF_BITS" && + $2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ || + $2 ~ /^BIOC/ || + $2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ || + $2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|NOFILE|STACK)|RLIM_INFINITY/ || + $2 ~ /^PRIO_(PROCESS|PGRP|USER)/ || + $2 ~ /^CLONE_[A-Z_]+/ || + $2 !~ /^(BPF_TIMEVAL)$/ && + $2 ~ /^(BPF|DLT)_/ || + $2 !~ "WMESGLEN" && + $2 ~ /^W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", $2, $2)} + $2 ~ /^__WCOREFLAG$/ {next} + $2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)} + + {next} + ' | sort + + echo ')' +) >_const.go + +# Pull out the error names for later. +errors=$( + echo '#include ' | $CC -x c - -E -dM $ccflags | + awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print $2 }' | + sort +) + +# Pull out the signal names for later. +signals=$( + echo '#include ' | $CC -x c - -E -dM $ccflags | + awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' | + egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' | + sort +) + +# Again, writing regexps to a file. +echo '#include ' | $CC -x c - -E -dM $ccflags | + awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print "^\t" $2 "[ \t]*=" }' | + sort >_error.grep +echo '#include ' | $CC -x c - -E -dM $ccflags | + awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' | + egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' | + sort >_signal.grep + +echo '// mkerrors.sh' "$@" +echo '// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT' +echo +go tool cgo -godefs -- "$@" _const.go >_error.out +cat _error.out | grep -vf _error.grep | grep -vf _signal.grep +echo +echo '// Errors' +echo 'const (' +cat _error.out | grep -f _error.grep | sed 's/=\(.*\)/= Errno(\1)/' +echo ')' + +echo +echo '// Signals' +echo 'const (' +cat _error.out | grep -f _signal.grep | sed 's/=\(.*\)/= Signal(\1)/' +echo ')' + +# Run C program to print error and syscall strings. +( + echo -E " +#include +#include +#include +#include +#include +#include + +#define nelem(x) (sizeof(x)/sizeof((x)[0])) + +enum { A = 'A', Z = 'Z', a = 'a', z = 'z' }; // avoid need for single quotes below + +int errors[] = { +" + for i in $errors + do + echo -E ' '$i, + done + + echo -E " +}; + +int signals[] = { +" + for i in $signals + do + echo -E ' '$i, + done + + # Use -E because on some systems bash builtin interprets \n itself. + echo -E ' +}; + +static int +intcmp(const void *a, const void *b) +{ + return *(int*)a - *(int*)b; +} + +int +main(void) +{ + int i, j, e; + char buf[1024], *p; + + printf("\n\n// Error table\n"); + printf("var errors = [...]string {\n"); + qsort(errors, nelem(errors), sizeof errors[0], intcmp); + for(i=0; i 0 && errors[i-1] == e) + continue; + strcpy(buf, strerror(e)); + // lowercase first letter: Bad -> bad, but STREAM -> STREAM. + if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z) + buf[0] += a - A; + printf("\t%d: \"%s\",\n", e, buf); + } + printf("}\n\n"); + + printf("\n\n// Signal table\n"); + printf("var signals = [...]string {\n"); + qsort(signals, nelem(signals), sizeof signals[0], intcmp); + for(i=0; i 0 && signals[i-1] == e) + continue; + strcpy(buf, strsignal(e)); + // lowercase first letter: Bad -> bad, but STREAM -> STREAM. + if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z) + buf[0] += a - A; + // cut trailing : number. + p = strrchr(buf, ":"[0]); + if(p) + *p = '\0'; + printf("\t%d: \"%s\",\n", e, buf); + } + printf("}\n\n"); + + return 0; +} + +' +) >_errors.c + +$CC $ccflags -o _errors _errors.c && $GORUN ./_errors && rm -f _errors.c _errors _const.go _error.grep _signal.grep _error.out diff --git a/vendor/golang.org/x/sys/plan9/mksyscall.pl b/vendor/golang.org/x/sys/plan9/mksyscall.pl new file mode 100755 index 0000000..ce8e1e4 --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/mksyscall.pl @@ -0,0 +1,319 @@ +#!/usr/bin/env perl +# Copyright 2009 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +# This program reads a file containing function prototypes +# (like syscall_plan9.go) and generates system call bodies. +# The prototypes are marked by lines beginning with "//sys" +# and read like func declarations if //sys is replaced by func, but: +# * The parameter lists must give a name for each argument. +# This includes return parameters. +# * The parameter lists must give a type for each argument: +# the (x, y, z int) shorthand is not allowed. +# * If the return parameter is an error number, it must be named errno. + +# A line beginning with //sysnb is like //sys, except that the +# goroutine will not be suspended during the execution of the system +# call. This must only be used for system calls which can never +# block, as otherwise the system call could cause all goroutines to +# hang. + +use strict; + +my $cmdline = "mksyscall.pl " . join(' ', @ARGV); +my $errors = 0; +my $_32bit = ""; +my $plan9 = 0; +my $openbsd = 0; +my $netbsd = 0; +my $dragonfly = 0; +my $nacl = 0; +my $arm = 0; # 64-bit value should use (even, odd)-pair + +if($ARGV[0] eq "-b32") { + $_32bit = "big-endian"; + shift; +} elsif($ARGV[0] eq "-l32") { + $_32bit = "little-endian"; + shift; +} +if($ARGV[0] eq "-plan9") { + $plan9 = 1; + shift; +} +if($ARGV[0] eq "-openbsd") { + $openbsd = 1; + shift; +} +if($ARGV[0] eq "-netbsd") { + $netbsd = 1; + shift; +} +if($ARGV[0] eq "-dragonfly") { + $dragonfly = 1; + shift; +} +if($ARGV[0] eq "-nacl") { + $nacl = 1; + shift; +} +if($ARGV[0] eq "-arm") { + $arm = 1; + shift; +} + +if($ARGV[0] =~ /^-/) { + print STDERR "usage: mksyscall.pl [-b32 | -l32] [file ...]\n"; + exit 1; +} + +sub parseparamlist($) { + my ($list) = @_; + $list =~ s/^\s*//; + $list =~ s/\s*$//; + if($list eq "") { + return (); + } + return split(/\s*,\s*/, $list); +} + +sub parseparam($) { + my ($p) = @_; + if($p !~ /^(\S*) (\S*)$/) { + print STDERR "$ARGV:$.: malformed parameter: $p\n"; + $errors = 1; + return ("xx", "int"); + } + return ($1, $2); +} + +my $text = ""; +while(<>) { + chomp; + s/\s+/ /g; + s/^\s+//; + s/\s+$//; + my $nonblock = /^\/\/sysnb /; + next if !/^\/\/sys / && !$nonblock; + + # Line must be of the form + # func Open(path string, mode int, perm int) (fd int, errno error) + # Split into name, in params, out params. + if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*((?i)SYS_[A-Z0-9_]+))?$/) { + print STDERR "$ARGV:$.: malformed //sys declaration\n"; + $errors = 1; + next; + } + my ($func, $in, $out, $sysname) = ($2, $3, $4, $5); + + # Split argument lists on comma. + my @in = parseparamlist($in); + my @out = parseparamlist($out); + + # Try in vain to keep people from editing this file. + # The theory is that they jump into the middle of the file + # without reading the header. + $text .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n"; + + # Go function header. + my $out_decl = @out ? sprintf(" (%s)", join(', ', @out)) : ""; + $text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out_decl; + + # Check if err return available + my $errvar = ""; + foreach my $p (@out) { + my ($name, $type) = parseparam($p); + if($type eq "error") { + $errvar = $name; + last; + } + } + + # Prepare arguments to Syscall. + my @args = (); + my @uses = (); + my $n = 0; + foreach my $p (@in) { + my ($name, $type) = parseparam($p); + if($type =~ /^\*/) { + push @args, "uintptr(unsafe.Pointer($name))"; + } elsif($type eq "string" && $errvar ne "") { + $text .= "\tvar _p$n *byte\n"; + $text .= "\t_p$n, $errvar = BytePtrFromString($name)\n"; + $text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n"; + push @args, "uintptr(unsafe.Pointer(_p$n))"; + push @uses, "use(unsafe.Pointer(_p$n))"; + $n++; + } elsif($type eq "string") { + print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n"; + $text .= "\tvar _p$n *byte\n"; + $text .= "\t_p$n, _ = BytePtrFromString($name)\n"; + push @args, "uintptr(unsafe.Pointer(_p$n))"; + push @uses, "use(unsafe.Pointer(_p$n))"; + $n++; + } elsif($type =~ /^\[\](.*)/) { + # Convert slice into pointer, length. + # Have to be careful not to take address of &a[0] if len == 0: + # pass dummy pointer in that case. + # Used to pass nil, but some OSes or simulators reject write(fd, nil, 0). + $text .= "\tvar _p$n unsafe.Pointer\n"; + $text .= "\tif len($name) > 0 {\n\t\t_p$n = unsafe.Pointer(\&${name}[0])\n\t}"; + $text .= " else {\n\t\t_p$n = unsafe.Pointer(&_zero)\n\t}"; + $text .= "\n"; + push @args, "uintptr(_p$n)", "uintptr(len($name))"; + $n++; + } elsif($type eq "int64" && ($openbsd || $netbsd)) { + push @args, "0"; + if($_32bit eq "big-endian") { + push @args, "uintptr($name>>32)", "uintptr($name)"; + } elsif($_32bit eq "little-endian") { + push @args, "uintptr($name)", "uintptr($name>>32)"; + } else { + push @args, "uintptr($name)"; + } + } elsif($type eq "int64" && $dragonfly) { + if ($func !~ /^extp(read|write)/i) { + push @args, "0"; + } + if($_32bit eq "big-endian") { + push @args, "uintptr($name>>32)", "uintptr($name)"; + } elsif($_32bit eq "little-endian") { + push @args, "uintptr($name)", "uintptr($name>>32)"; + } else { + push @args, "uintptr($name)"; + } + } elsif($type eq "int64" && $_32bit ne "") { + if(@args % 2 && $arm) { + # arm abi specifies 64-bit argument uses + # (even, odd) pair + push @args, "0" + } + if($_32bit eq "big-endian") { + push @args, "uintptr($name>>32)", "uintptr($name)"; + } else { + push @args, "uintptr($name)", "uintptr($name>>32)"; + } + } else { + push @args, "uintptr($name)"; + } + } + + # Determine which form to use; pad args with zeros. + my $asm = "Syscall"; + if ($nonblock) { + $asm = "RawSyscall"; + } + if(@args <= 3) { + while(@args < 3) { + push @args, "0"; + } + } elsif(@args <= 6) { + $asm .= "6"; + while(@args < 6) { + push @args, "0"; + } + } elsif(@args <= 9) { + $asm .= "9"; + while(@args < 9) { + push @args, "0"; + } + } else { + print STDERR "$ARGV:$.: too many arguments to system call\n"; + } + + # System call number. + if($sysname eq "") { + $sysname = "SYS_$func"; + $sysname =~ s/([a-z])([A-Z])/${1}_$2/g; # turn FooBar into Foo_Bar + $sysname =~ y/a-z/A-Z/; + if($nacl) { + $sysname =~ y/A-Z/a-z/; + } + } + + # Actual call. + my $args = join(', ', @args); + my $call = "$asm($sysname, $args)"; + + # Assign return values. + my $body = ""; + my @ret = ("_", "_", "_"); + my $do_errno = 0; + for(my $i=0; $i<@out; $i++) { + my $p = $out[$i]; + my ($name, $type) = parseparam($p); + my $reg = ""; + if($name eq "err" && !$plan9) { + $reg = "e1"; + $ret[2] = $reg; + $do_errno = 1; + } elsif($name eq "err" && $plan9) { + $ret[0] = "r0"; + $ret[2] = "e1"; + next; + } else { + $reg = sprintf("r%d", $i); + $ret[$i] = $reg; + } + if($type eq "bool") { + $reg = "$reg != 0"; + } + if($type eq "int64" && $_32bit ne "") { + # 64-bit number in r1:r0 or r0:r1. + if($i+2 > @out) { + print STDERR "$ARGV:$.: not enough registers for int64 return\n"; + } + if($_32bit eq "big-endian") { + $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1); + } else { + $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i); + } + $ret[$i] = sprintf("r%d", $i); + $ret[$i+1] = sprintf("r%d", $i+1); + } + if($reg ne "e1" || $plan9) { + $body .= "\t$name = $type($reg)\n"; + } + } + if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") { + $text .= "\t$call\n"; + } else { + $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n"; + } + foreach my $use (@uses) { + $text .= "\t$use\n"; + } + $text .= $body; + + if ($plan9 && $ret[2] eq "e1") { + $text .= "\tif int32(r0) == -1 {\n"; + $text .= "\t\terr = e1\n"; + $text .= "\t}\n"; + } elsif ($do_errno) { + $text .= "\tif e1 != 0 {\n"; + $text .= "\t\terr = e1\n"; + $text .= "\t}\n"; + } + $text .= "\treturn\n"; + $text .= "}\n\n"; +} + +chomp $text; +chomp $text; + +if($errors) { + exit 1; +} + +print <= 10 { + buf[i] = byte(val%10 + '0') + i-- + val /= 10 + } + buf[i] = byte(val + '0') + return string(buf[i:]) +} diff --git a/vendor/golang.org/x/sys/plan9/syscall.go b/vendor/golang.org/x/sys/plan9/syscall.go new file mode 100644 index 0000000..df6f8c5 --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/syscall.go @@ -0,0 +1,74 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build plan9 + +// Package plan9 contains an interface to the low-level operating system +// primitives. OS details vary depending on the underlying system, and +// by default, godoc will display the OS-specific documentation for the current +// system. If you want godoc to display documentation for another +// system, set $GOOS and $GOARCH to the desired system. For example, if +// you want to view documentation for freebsd/arm on linux/amd64, set $GOOS +// to freebsd and $GOARCH to arm. +// The primary use of this package is inside other packages that provide a more +// portable interface to the system, such as "os", "time" and "net". Use +// those packages rather than this one if you can. +// For details of the functions and data types in this package consult +// the manuals for the appropriate operating system. +// These calls return err == nil to indicate success; otherwise +// err represents an operating system error describing the failure and +// holds a value of type syscall.ErrorString. +package plan9 // import "golang.org/x/sys/plan9" + +import "unsafe" + +// ByteSliceFromString returns a NUL-terminated slice of bytes +// containing the text of s. If s contains a NUL byte at any +// location, it returns (nil, EINVAL). +func ByteSliceFromString(s string) ([]byte, error) { + for i := 0; i < len(s); i++ { + if s[i] == 0 { + return nil, EINVAL + } + } + a := make([]byte, len(s)+1) + copy(a, s) + return a, nil +} + +// BytePtrFromString returns a pointer to a NUL-terminated array of +// bytes containing the text of s. If s contains a NUL byte at any +// location, it returns (nil, EINVAL). +func BytePtrFromString(s string) (*byte, error) { + a, err := ByteSliceFromString(s) + if err != nil { + return nil, err + } + return &a[0], nil +} + +// Single-word zero for use when we need a valid pointer to 0 bytes. +// See mksyscall.pl. +var _zero uintptr + +func (ts *Timespec) Unix() (sec int64, nsec int64) { + return int64(ts.Sec), int64(ts.Nsec) +} + +func (tv *Timeval) Unix() (sec int64, nsec int64) { + return int64(tv.Sec), int64(tv.Usec) * 1000 +} + +func (ts *Timespec) Nano() int64 { + return int64(ts.Sec)*1e9 + int64(ts.Nsec) +} + +func (tv *Timeval) Nano() int64 { + return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000 +} + +// use is a no-op, but the compiler cannot see that it is. +// Calling use(p) ensures that p is kept live until that point. +//go:noescape +func use(p unsafe.Pointer) diff --git a/vendor/golang.org/x/sys/plan9/syscall_plan9.go b/vendor/golang.org/x/sys/plan9/syscall_plan9.go new file mode 100644 index 0000000..d39d07d --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/syscall_plan9.go @@ -0,0 +1,349 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Plan 9 system calls. +// This file is compiled as ordinary Go code, +// but it is also input to mksyscall, +// which parses the //sys lines and generates system call stubs. +// Note that sometimes we use a lowercase //sys name and +// wrap it in our own nicer implementation. + +package plan9 + +import ( + "syscall" + "unsafe" +) + +// A Note is a string describing a process note. +// It implements the os.Signal interface. +type Note string + +func (n Note) Signal() {} + +func (n Note) String() string { + return string(n) +} + +var ( + Stdin = 0 + Stdout = 1 + Stderr = 2 +) + +// For testing: clients can set this flag to force +// creation of IPv6 sockets to return EAFNOSUPPORT. +var SocketDisableIPv6 bool + +func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.ErrorString) +func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.ErrorString) +func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr) +func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr) + +func atoi(b []byte) (n uint) { + n = 0 + for i := 0; i < len(b); i++ { + n = n*10 + uint(b[i]-'0') + } + return +} + +func cstring(s []byte) string { + for i := range s { + if s[i] == 0 { + return string(s[0:i]) + } + } + return string(s) +} + +func errstr() string { + var buf [ERRMAX]byte + + RawSyscall(SYS_ERRSTR, uintptr(unsafe.Pointer(&buf[0])), uintptr(len(buf)), 0) + + buf[len(buf)-1] = 0 + return cstring(buf[:]) +} + +// Implemented in assembly to import from runtime. +func exit(code int) + +func Exit(code int) { exit(code) } + +func readnum(path string) (uint, error) { + var b [12]byte + + fd, e := Open(path, O_RDONLY) + if e != nil { + return 0, e + } + defer Close(fd) + + n, e := Pread(fd, b[:], 0) + + if e != nil { + return 0, e + } + + m := 0 + for ; m < n && b[m] == ' '; m++ { + } + + return atoi(b[m : n-1]), nil +} + +func Getpid() (pid int) { + n, _ := readnum("#c/pid") + return int(n) +} + +func Getppid() (ppid int) { + n, _ := readnum("#c/ppid") + return int(n) +} + +func Read(fd int, p []byte) (n int, err error) { + return Pread(fd, p, -1) +} + +func Write(fd int, p []byte) (n int, err error) { + return Pwrite(fd, p, -1) +} + +var ioSync int64 + +//sys fd2path(fd int, buf []byte) (err error) +func Fd2path(fd int) (path string, err error) { + var buf [512]byte + + e := fd2path(fd, buf[:]) + if e != nil { + return "", e + } + return cstring(buf[:]), nil +} + +//sys pipe(p *[2]int32) (err error) +func Pipe(p []int) (err error) { + if len(p) != 2 { + return syscall.ErrorString("bad arg in system call") + } + var pp [2]int32 + err = pipe(&pp) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +// Underlying system call writes to newoffset via pointer. +// Implemented in assembly to avoid allocation. +func seek(placeholder uintptr, fd int, offset int64, whence int) (newoffset int64, err string) + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + newoffset, e := seek(0, fd, offset, whence) + + if newoffset == -1 { + err = syscall.ErrorString(e) + } + return +} + +func Mkdir(path string, mode uint32) (err error) { + fd, err := Create(path, O_RDONLY, DMDIR|mode) + + if fd != -1 { + Close(fd) + } + + return +} + +type Waitmsg struct { + Pid int + Time [3]uint32 + Msg string +} + +func (w Waitmsg) Exited() bool { return true } +func (w Waitmsg) Signaled() bool { return false } + +func (w Waitmsg) ExitStatus() int { + if len(w.Msg) == 0 { + // a normal exit returns no message + return 0 + } + return 1 +} + +//sys await(s []byte) (n int, err error) +func Await(w *Waitmsg) (err error) { + var buf [512]byte + var f [5][]byte + + n, err := await(buf[:]) + + if err != nil || w == nil { + return + } + + nf := 0 + p := 0 + for i := 0; i < n && nf < len(f)-1; i++ { + if buf[i] == ' ' { + f[nf] = buf[p:i] + p = i + 1 + nf++ + } + } + f[nf] = buf[p:] + nf++ + + if nf != len(f) { + return syscall.ErrorString("invalid wait message") + } + w.Pid = int(atoi(f[0])) + w.Time[0] = uint32(atoi(f[1])) + w.Time[1] = uint32(atoi(f[2])) + w.Time[2] = uint32(atoi(f[3])) + w.Msg = cstring(f[4]) + if w.Msg == "''" { + // await() returns '' for no error + w.Msg = "" + } + return +} + +func Unmount(name, old string) (err error) { + fixwd() + oldp, err := BytePtrFromString(old) + if err != nil { + return err + } + oldptr := uintptr(unsafe.Pointer(oldp)) + + var r0 uintptr + var e syscall.ErrorString + + // bind(2) man page: If name is zero, everything bound or mounted upon old is unbound or unmounted. + if name == "" { + r0, _, e = Syscall(SYS_UNMOUNT, _zero, oldptr, 0) + } else { + namep, err := BytePtrFromString(name) + if err != nil { + return err + } + r0, _, e = Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(namep)), oldptr, 0) + } + + if int32(r0) == -1 { + err = e + } + return +} + +func Fchdir(fd int) (err error) { + path, err := Fd2path(fd) + + if err != nil { + return + } + + return Chdir(path) +} + +type Timespec struct { + Sec int32 + Nsec int32 +} + +type Timeval struct { + Sec int32 + Usec int32 +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = int32(nsec % 1e9 / 1e3) + tv.Sec = int32(nsec / 1e9) + return +} + +func nsec() int64 { + var scratch int64 + + r0, _, _ := Syscall(SYS_NSEC, uintptr(unsafe.Pointer(&scratch)), 0, 0) + // TODO(aram): remove hack after I fix _nsec in the pc64 kernel. + if r0 == 0 { + return scratch + } + return int64(r0) +} + +func Gettimeofday(tv *Timeval) error { + nsec := nsec() + *tv = NsecToTimeval(nsec) + return nil +} + +func Getpagesize() int { return 0x1000 } + +func Getegid() (egid int) { return -1 } +func Geteuid() (euid int) { return -1 } +func Getgid() (gid int) { return -1 } +func Getuid() (uid int) { return -1 } + +func Getgroups() (gids []int, err error) { + return make([]int, 0), nil +} + +//sys open(path string, mode int) (fd int, err error) +func Open(path string, mode int) (fd int, err error) { + fixwd() + return open(path, mode) +} + +//sys create(path string, mode int, perm uint32) (fd int, err error) +func Create(path string, mode int, perm uint32) (fd int, err error) { + fixwd() + return create(path, mode, perm) +} + +//sys remove(path string) (err error) +func Remove(path string) error { + fixwd() + return remove(path) +} + +//sys stat(path string, edir []byte) (n int, err error) +func Stat(path string, edir []byte) (n int, err error) { + fixwd() + return stat(path, edir) +} + +//sys bind(name string, old string, flag int) (err error) +func Bind(name string, old string, flag int) (err error) { + fixwd() + return bind(name, old, flag) +} + +//sys mount(fd int, afd int, old string, flag int, aname string) (err error) +func Mount(fd int, afd int, old string, flag int, aname string) (err error) { + fixwd() + return mount(fd, afd, old, flag, aname) +} + +//sys wstat(path string, edir []byte) (err error) +func Wstat(path string, edir []byte) (err error) { + fixwd() + return wstat(path, edir) +} + +//sys chdir(path string) (err error) +//sys Dup(oldfd int, newfd int) (fd int, err error) +//sys Pread(fd int, p []byte, offset int64) (n int, err error) +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) +//sys Close(fd int) (err error) +//sys Fstat(fd int, edir []byte) (n int, err error) +//sys Fwstat(fd int, edir []byte) (err error) diff --git a/vendor/golang.org/x/sys/plan9/syscall_test.go b/vendor/golang.org/x/sys/plan9/syscall_test.go new file mode 100644 index 0000000..8f829ba --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/syscall_test.go @@ -0,0 +1,33 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build plan9 + +package plan9_test + +import ( + "testing" + + "golang.org/x/sys/plan9" +) + +func testSetGetenv(t *testing.T, key, value string) { + err := plan9.Setenv(key, value) + if err != nil { + t.Fatalf("Setenv failed to set %q: %v", value, err) + } + newvalue, found := plan9.Getenv(key) + if !found { + t.Fatalf("Getenv failed to find %v variable (want value %q)", key, value) + } + if newvalue != value { + t.Fatalf("Getenv(%v) = %q; want %q", key, newvalue, value) + } +} + +func TestEnv(t *testing.T) { + testSetGetenv(t, "TESTENV", "AVALUE") + // make sure TESTENV gets set to "", not deleted + testSetGetenv(t, "TESTENV", "") +} diff --git a/vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go b/vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go new file mode 100644 index 0000000..b35598a --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/zsyscall_plan9_386.go @@ -0,0 +1,292 @@ +// mksyscall.pl -l32 -plan9 syscall_plan9.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +package plan9 + +import "unsafe" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fd2path(fd int, buf []byte) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_FD2PATH, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe(p *[2]int32) (err error) { + r0, _, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func await(s []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(s) > 0 { + _p0 = unsafe.Pointer(&s[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_AWAIT, uintptr(_p0), uintptr(len(s)), 0) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func open(path string, mode int) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func create(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func remove(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func stat(path string, edir []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(edir) > 0 { + _p1 = unsafe.Pointer(&edir[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(name string, old string, flag int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(old) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_BIND, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag)) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mount(fd int, afd int, old string, flag int, aname string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(old) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(aname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_MOUNT, uintptr(fd), uintptr(afd), uintptr(unsafe.Pointer(_p0)), uintptr(flag), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wstat(path string, edir []byte) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(edir) > 0 { + _p1 = unsafe.Pointer(&edir[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir))) + use(unsafe.Pointer(_p0)) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(oldfd int, newfd int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), uintptr(newfd), 0) + fd = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + r0, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, edir []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(edir) > 0 { + _p0 = unsafe.Pointer(&edir[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir))) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fwstat(fd int, edir []byte) (err error) { + var _p0 unsafe.Pointer + if len(edir) > 0 { + _p0 = unsafe.Pointer(&edir[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_FWSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir))) + if int32(r0) == -1 { + err = e1 + } + return +} diff --git a/vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go b/vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go new file mode 100644 index 0000000..b35598a --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/zsyscall_plan9_amd64.go @@ -0,0 +1,292 @@ +// mksyscall.pl -l32 -plan9 syscall_plan9.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +package plan9 + +import "unsafe" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fd2path(fd int, buf []byte) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_FD2PATH, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe(p *[2]int32) (err error) { + r0, _, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func await(s []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(s) > 0 { + _p0 = unsafe.Pointer(&s[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_AWAIT, uintptr(_p0), uintptr(len(s)), 0) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func open(path string, mode int) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func create(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func remove(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_REMOVE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func stat(path string, edir []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(edir) > 0 { + _p1 = unsafe.Pointer(&edir[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(name string, old string, flag int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(old) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_BIND, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag)) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mount(fd int, afd int, old string, flag int, aname string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(old) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(aname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_MOUNT, uintptr(fd), uintptr(afd), uintptr(unsafe.Pointer(_p0)), uintptr(flag), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wstat(path string, edir []byte) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(edir) > 0 { + _p1 = unsafe.Pointer(&edir[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(edir))) + use(unsafe.Pointer(_p0)) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(oldfd int, newfd int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), uintptr(newfd), 0) + fd = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + r0, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, edir []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(edir) > 0 { + _p0 = unsafe.Pointer(&edir[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir))) + n = int(r0) + if int32(r0) == -1 { + err = e1 + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fwstat(fd int, edir []byte) (err error) { + var _p0 unsafe.Pointer + if len(edir) > 0 { + _p0 = unsafe.Pointer(&edir[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_FWSTAT, uintptr(fd), uintptr(_p0), uintptr(len(edir))) + if int32(r0) == -1 { + err = e1 + } + return +} diff --git a/vendor/golang.org/x/sys/plan9/zsysnum_plan9.go b/vendor/golang.org/x/sys/plan9/zsysnum_plan9.go new file mode 100644 index 0000000..22e8abd --- /dev/null +++ b/vendor/golang.org/x/sys/plan9/zsysnum_plan9.go @@ -0,0 +1,49 @@ +// mksysnum_plan9.sh /opt/plan9/sys/src/libc/9syscall/sys.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +package plan9 + +const ( + SYS_SYSR1 = 0 + SYS_BIND = 2 + SYS_CHDIR = 3 + SYS_CLOSE = 4 + SYS_DUP = 5 + SYS_ALARM = 6 + SYS_EXEC = 7 + SYS_EXITS = 8 + SYS_FAUTH = 10 + SYS_SEGBRK = 12 + SYS_OPEN = 14 + SYS_OSEEK = 16 + SYS_SLEEP = 17 + SYS_RFORK = 19 + SYS_PIPE = 21 + SYS_CREATE = 22 + SYS_FD2PATH = 23 + SYS_BRK_ = 24 + SYS_REMOVE = 25 + SYS_NOTIFY = 28 + SYS_NOTED = 29 + SYS_SEGATTACH = 30 + SYS_SEGDETACH = 31 + SYS_SEGFREE = 32 + SYS_SEGFLUSH = 33 + SYS_RENDEZVOUS = 34 + SYS_UNMOUNT = 35 + SYS_SEMACQUIRE = 37 + SYS_SEMRELEASE = 38 + SYS_SEEK = 39 + SYS_FVERSION = 40 + SYS_ERRSTR = 41 + SYS_STAT = 42 + SYS_FSTAT = 43 + SYS_WSTAT = 44 + SYS_FWSTAT = 45 + SYS_MOUNT = 46 + SYS_AWAIT = 47 + SYS_PREAD = 50 + SYS_PWRITE = 51 + SYS_TSEMACQUIRE = 52 + SYS_NSEC = 53 +) diff --git a/vendor/golang.org/x/sys/unix/.gitignore b/vendor/golang.org/x/sys/unix/.gitignore new file mode 100644 index 0000000..e482715 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/.gitignore @@ -0,0 +1 @@ +_obj/ diff --git a/vendor/golang.org/x/sys/unix/asm.s b/vendor/golang.org/x/sys/unix/asm.s new file mode 100644 index 0000000..8ed2fdb --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm.s @@ -0,0 +1,10 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +TEXT ·use(SB),NOSPLIT,$0 + RET diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_386.s b/vendor/golang.org/x/sys/unix/asm_darwin_386.s new file mode 100644 index 0000000..8a72783 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_darwin_386.s @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for 386, Darwin +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-28 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-40 + JMP syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-52 + JMP syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 + JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s b/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s new file mode 100644 index 0000000..6321421 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for AMD64, Darwin +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-56 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-80 + JMP syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-104 + JMP syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 + JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_arm.s b/vendor/golang.org/x/sys/unix/asm_darwin_arm.s new file mode 100644 index 0000000..333242d --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_darwin_arm.s @@ -0,0 +1,30 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo +// +build arm,darwin + +#include "textflag.h" + +// +// System call support for ARM, Darwin +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-28 + B syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-40 + B syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-52 + B syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 + B syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 + B syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s b/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s new file mode 100644 index 0000000..97e0174 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s @@ -0,0 +1,30 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo +// +build arm64,darwin + +#include "textflag.h" + +// +// System call support for AMD64, Darwin +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-56 + B syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-80 + B syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-104 + B syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 + B syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 + B syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_dragonfly_386.s b/vendor/golang.org/x/sys/unix/asm_dragonfly_386.s new file mode 100644 index 0000000..7e55e0d --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_dragonfly_386.s @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for 386, FreeBSD +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-32 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-44 + JMP syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-56 + JMP syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-32 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-44 + JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s b/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s new file mode 100644 index 0000000..d5ed672 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for AMD64, DragonFly +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-64 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-88 + JMP syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-112 + JMP syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-64 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-88 + JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_386.s b/vendor/golang.org/x/sys/unix/asm_freebsd_386.s new file mode 100644 index 0000000..c9a0a26 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_freebsd_386.s @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for 386, FreeBSD +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-28 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-40 + JMP syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-52 + JMP syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 + JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s new file mode 100644 index 0000000..3517247 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for AMD64, FreeBSD +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-56 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-80 + JMP syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-104 + JMP syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 + JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s b/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s new file mode 100644 index 0000000..9227c87 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s @@ -0,0 +1,29 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for ARM, FreeBSD +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-28 + B syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-40 + B syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-52 + B syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 + B syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 + B syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_linux_386.s b/vendor/golang.org/x/sys/unix/asm_linux_386.s new file mode 100644 index 0000000..4db2909 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_linux_386.s @@ -0,0 +1,35 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System calls for 386, Linux +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-28 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-40 + JMP syscall·Syscall6(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 + JMP syscall·RawSyscall6(SB) + +TEXT ·socketcall(SB),NOSPLIT,$0-36 + JMP syscall·socketcall(SB) + +TEXT ·rawsocketcall(SB),NOSPLIT,$0-36 + JMP syscall·rawsocketcall(SB) + +TEXT ·seek(SB),NOSPLIT,$0-28 + JMP syscall·seek(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_linux_amd64.s b/vendor/golang.org/x/sys/unix/asm_linux_amd64.s new file mode 100644 index 0000000..44e25c6 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_linux_amd64.s @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System calls for AMD64, Linux +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-56 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-80 + JMP syscall·Syscall6(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 + JMP syscall·RawSyscall6(SB) + +TEXT ·gettimeofday(SB),NOSPLIT,$0-16 + JMP syscall·gettimeofday(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_linux_arm.s b/vendor/golang.org/x/sys/unix/asm_linux_arm.s new file mode 100644 index 0000000..cf0b574 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_linux_arm.s @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System calls for arm, Linux +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-28 + B syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-40 + B syscall·Syscall6(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 + B syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 + B syscall·RawSyscall6(SB) + +TEXT ·seek(SB),NOSPLIT,$0-32 + B syscall·seek(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_linux_arm64.s b/vendor/golang.org/x/sys/unix/asm_linux_arm64.s new file mode 100644 index 0000000..4be9bfe --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_linux_arm64.s @@ -0,0 +1,24 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build linux +// +build arm64 +// +build !gccgo + +#include "textflag.h" + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-56 + B syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-80 + B syscall·Syscall6(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 + B syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 + B syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s b/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s new file mode 100644 index 0000000..8d231fe --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s @@ -0,0 +1,28 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build linux +// +build ppc64 ppc64le +// +build !gccgo + +#include "textflag.h" + +// +// System calls for ppc64, Linux +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-56 + BR syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-80 + BR syscall·Syscall6(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 + BR syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 + BR syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_386.s b/vendor/golang.org/x/sys/unix/asm_netbsd_386.s new file mode 100644 index 0000000..48bdcd7 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_netbsd_386.s @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for 386, NetBSD +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-28 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-40 + JMP syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-52 + JMP syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 + JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s new file mode 100644 index 0000000..2ede05c --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for AMD64, NetBSD +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-56 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-80 + JMP syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-104 + JMP syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 + JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s b/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s new file mode 100644 index 0000000..e892857 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s @@ -0,0 +1,29 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for ARM, NetBSD +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-28 + B syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-40 + B syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-52 + B syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 + B syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 + B syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_386.s b/vendor/golang.org/x/sys/unix/asm_openbsd_386.s new file mode 100644 index 0000000..00576f3 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_openbsd_386.s @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for 386, OpenBSD +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-28 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-40 + JMP syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-52 + JMP syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 + JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s new file mode 100644 index 0000000..790ef77 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for AMD64, OpenBSD +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-56 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-80 + JMP syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-104 + JMP syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 + JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s b/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s new file mode 100644 index 0000000..43ed17a --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s @@ -0,0 +1,17 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go +// + +TEXT ·sysvicall6(SB),NOSPLIT,$0-64 + JMP syscall·sysvicall6(SB) + +TEXT ·rawSysvicall6(SB),NOSPLIT,$0-64 + JMP syscall·rawSysvicall6(SB) diff --git a/vendor/golang.org/x/sys/unix/constants.go b/vendor/golang.org/x/sys/unix/constants.go new file mode 100644 index 0000000..a96f0eb --- /dev/null +++ b/vendor/golang.org/x/sys/unix/constants.go @@ -0,0 +1,13 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package unix + +const ( + R_OK = 0x4 + W_OK = 0x2 + X_OK = 0x1 +) diff --git a/vendor/golang.org/x/sys/unix/creds_test.go b/vendor/golang.org/x/sys/unix/creds_test.go new file mode 100644 index 0000000..eaae7c3 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/creds_test.go @@ -0,0 +1,121 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build linux + +package unix_test + +import ( + "bytes" + "net" + "os" + "syscall" + "testing" + + "golang.org/x/sys/unix" +) + +// TestSCMCredentials tests the sending and receiving of credentials +// (PID, UID, GID) in an ancillary message between two UNIX +// sockets. The SO_PASSCRED socket option is enabled on the sending +// socket for this to work. +func TestSCMCredentials(t *testing.T) { + fds, err := unix.Socketpair(unix.AF_LOCAL, unix.SOCK_STREAM, 0) + if err != nil { + t.Fatalf("Socketpair: %v", err) + } + defer unix.Close(fds[0]) + defer unix.Close(fds[1]) + + err = unix.SetsockoptInt(fds[0], unix.SOL_SOCKET, unix.SO_PASSCRED, 1) + if err != nil { + t.Fatalf("SetsockoptInt: %v", err) + } + + srvFile := os.NewFile(uintptr(fds[0]), "server") + defer srvFile.Close() + srv, err := net.FileConn(srvFile) + if err != nil { + t.Errorf("FileConn: %v", err) + return + } + defer srv.Close() + + cliFile := os.NewFile(uintptr(fds[1]), "client") + defer cliFile.Close() + cli, err := net.FileConn(cliFile) + if err != nil { + t.Errorf("FileConn: %v", err) + return + } + defer cli.Close() + + var ucred unix.Ucred + if os.Getuid() != 0 { + ucred.Pid = int32(os.Getpid()) + ucred.Uid = 0 + ucred.Gid = 0 + oob := unix.UnixCredentials(&ucred) + _, _, err := cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil) + if op, ok := err.(*net.OpError); ok { + err = op.Err + } + if sys, ok := err.(*os.SyscallError); ok { + err = sys.Err + } + if err != syscall.EPERM { + t.Fatalf("WriteMsgUnix failed with %v, want EPERM", err) + } + } + + ucred.Pid = int32(os.Getpid()) + ucred.Uid = uint32(os.Getuid()) + ucred.Gid = uint32(os.Getgid()) + oob := unix.UnixCredentials(&ucred) + + // this is going to send a dummy byte + n, oobn, err := cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil) + if err != nil { + t.Fatalf("WriteMsgUnix: %v", err) + } + if n != 0 { + t.Fatalf("WriteMsgUnix n = %d, want 0", n) + } + if oobn != len(oob) { + t.Fatalf("WriteMsgUnix oobn = %d, want %d", oobn, len(oob)) + } + + oob2 := make([]byte, 10*len(oob)) + n, oobn2, flags, _, err := srv.(*net.UnixConn).ReadMsgUnix(nil, oob2) + if err != nil { + t.Fatalf("ReadMsgUnix: %v", err) + } + if flags != 0 { + t.Fatalf("ReadMsgUnix flags = 0x%x, want 0", flags) + } + if n != 1 { + t.Fatalf("ReadMsgUnix n = %d, want 1 (dummy byte)", n) + } + if oobn2 != oobn { + // without SO_PASSCRED set on the socket, ReadMsgUnix will + // return zero oob bytes + t.Fatalf("ReadMsgUnix oobn = %d, want %d", oobn2, oobn) + } + oob2 = oob2[:oobn2] + if !bytes.Equal(oob, oob2) { + t.Fatal("ReadMsgUnix oob bytes don't match") + } + + scm, err := unix.ParseSocketControlMessage(oob2) + if err != nil { + t.Fatalf("ParseSocketControlMessage: %v", err) + } + newUcred, err := unix.ParseUnixCredentials(&scm[0]) + if err != nil { + t.Fatalf("ParseUnixCredentials: %v", err) + } + if *newUcred != ucred { + t.Fatalf("ParseUnixCredentials = %+v, want %+v", newUcred, ucred) + } +} diff --git a/vendor/golang.org/x/sys/unix/env_unix.go b/vendor/golang.org/x/sys/unix/env_unix.go new file mode 100644 index 0000000..45e281a --- /dev/null +++ b/vendor/golang.org/x/sys/unix/env_unix.go @@ -0,0 +1,27 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +// Unix environment variables. + +package unix + +import "syscall" + +func Getenv(key string) (value string, found bool) { + return syscall.Getenv(key) +} + +func Setenv(key, value string) error { + return syscall.Setenv(key, value) +} + +func Clearenv() { + syscall.Clearenv() +} + +func Environ() []string { + return syscall.Environ() +} diff --git a/vendor/golang.org/x/sys/unix/env_unset.go b/vendor/golang.org/x/sys/unix/env_unset.go new file mode 100644 index 0000000..9222262 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/env_unset.go @@ -0,0 +1,14 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.4 + +package unix + +import "syscall" + +func Unsetenv(key string) error { + // This was added in Go 1.4. + return syscall.Unsetenv(key) +} diff --git a/vendor/golang.org/x/sys/unix/export_test.go b/vendor/golang.org/x/sys/unix/export_test.go new file mode 100644 index 0000000..b4fdd97 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/export_test.go @@ -0,0 +1,9 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package unix + +var Itoa = itoa diff --git a/vendor/golang.org/x/sys/unix/flock.go b/vendor/golang.org/x/sys/unix/flock.go new file mode 100644 index 0000000..ce67a59 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/flock.go @@ -0,0 +1,24 @@ +// +build linux darwin freebsd openbsd netbsd dragonfly + +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd + +package unix + +import "unsafe" + +// fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux +// systems by flock_linux_32bit.go to be SYS_FCNTL64. +var fcntl64Syscall uintptr = SYS_FCNTL + +// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. +func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { + _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) + if errno == 0 { + return nil + } + return errno +} diff --git a/vendor/golang.org/x/sys/unix/flock_linux_32bit.go b/vendor/golang.org/x/sys/unix/flock_linux_32bit.go new file mode 100644 index 0000000..362831c --- /dev/null +++ b/vendor/golang.org/x/sys/unix/flock_linux_32bit.go @@ -0,0 +1,13 @@ +// +build linux,386 linux,arm + +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package unix + +func init() { + // On 32-bit Linux systems, the fcntl syscall that matches Go's + // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. + fcntl64Syscall = SYS_FCNTL64 +} diff --git a/vendor/golang.org/x/sys/unix/gccgo.go b/vendor/golang.org/x/sys/unix/gccgo.go new file mode 100644 index 0000000..94c8232 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/gccgo.go @@ -0,0 +1,46 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build gccgo + +package unix + +import "syscall" + +// We can't use the gc-syntax .s files for gccgo. On the plus side +// much of the functionality can be written directly in Go. + +//extern gccgoRealSyscall +func realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r, errno uintptr) + +func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { + syscall.Entersyscall() + r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0) + syscall.Exitsyscall() + return r, 0, syscall.Errno(errno) +} + +func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { + syscall.Entersyscall() + r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0) + syscall.Exitsyscall() + return r, 0, syscall.Errno(errno) +} + +func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) { + syscall.Entersyscall() + r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9) + syscall.Exitsyscall() + return r, 0, syscall.Errno(errno) +} + +func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { + r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0) + return r, 0, syscall.Errno(errno) +} + +func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { + r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0) + return r, 0, syscall.Errno(errno) +} diff --git a/vendor/golang.org/x/sys/unix/gccgo_c.c b/vendor/golang.org/x/sys/unix/gccgo_c.c new file mode 100644 index 0000000..07f6be0 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/gccgo_c.c @@ -0,0 +1,41 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build gccgo + +#include +#include +#include + +#define _STRINGIFY2_(x) #x +#define _STRINGIFY_(x) _STRINGIFY2_(x) +#define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__) + +// Call syscall from C code because the gccgo support for calling from +// Go to C does not support varargs functions. + +struct ret { + uintptr_t r; + uintptr_t err; +}; + +struct ret +gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9) +{ + struct ret r; + + errno = 0; + r.r = syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9); + r.err = errno; + return r; +} + +// Define the use function in C so that it is not inlined. + +extern void use(void *) __asm__ (GOSYM_PREFIX GOPKGPATH ".use") __attribute__((noinline)); + +void +use(void *p __attribute__ ((unused))) +{ +} diff --git a/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go b/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go new file mode 100644 index 0000000..bffe1a7 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go @@ -0,0 +1,20 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build gccgo,linux,amd64 + +package unix + +import "syscall" + +//extern gettimeofday +func realGettimeofday(*Timeval, *byte) int32 + +func gettimeofday(tv *Timeval) (err syscall.Errno) { + r := realGettimeofday(tv, nil) + if r < 0 { + return syscall.GetErrno() + } + return 0 +} diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh new file mode 100755 index 0000000..de95a4b --- /dev/null +++ b/vendor/golang.org/x/sys/unix/mkall.sh @@ -0,0 +1,274 @@ +#!/usr/bin/env bash +# Copyright 2009 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +# The unix package provides access to the raw system call +# interface of the underlying operating system. Porting Go to +# a new architecture/operating system combination requires +# some manual effort, though there are tools that automate +# much of the process. The auto-generated files have names +# beginning with z. +# +# This script runs or (given -n) prints suggested commands to generate z files +# for the current system. Running those commands is not automatic. +# This script is documentation more than anything else. +# +# * asm_${GOOS}_${GOARCH}.s +# +# This hand-written assembly file implements system call dispatch. +# There are three entry points: +# +# func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr); +# func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr); +# func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr); +# +# The first and second are the standard ones; they differ only in +# how many arguments can be passed to the kernel. +# The third is for low-level use by the ForkExec wrapper; +# unlike the first two, it does not call into the scheduler to +# let it know that a system call is running. +# +# * syscall_${GOOS}.go +# +# This hand-written Go file implements system calls that need +# special handling and lists "//sys" comments giving prototypes +# for ones that can be auto-generated. Mksyscall reads those +# comments to generate the stubs. +# +# * syscall_${GOOS}_${GOARCH}.go +# +# Same as syscall_${GOOS}.go except that it contains code specific +# to ${GOOS} on one particular architecture. +# +# * types_${GOOS}.c +# +# This hand-written C file includes standard C headers and then +# creates typedef or enum names beginning with a dollar sign +# (use of $ in variable names is a gcc extension). The hardest +# part about preparing this file is figuring out which headers to +# include and which symbols need to be #defined to get the +# actual data structures that pass through to the kernel system calls. +# Some C libraries present alternate versions for binary compatibility +# and translate them on the way in and out of system calls, but +# there is almost always a #define that can get the real ones. +# See types_darwin.c and types_linux.c for examples. +# +# * zerror_${GOOS}_${GOARCH}.go +# +# This machine-generated file defines the system's error numbers, +# error strings, and signal numbers. The generator is "mkerrors.sh". +# Usually no arguments are needed, but mkerrors.sh will pass its +# arguments on to godefs. +# +# * zsyscall_${GOOS}_${GOARCH}.go +# +# Generated by mksyscall.pl; see syscall_${GOOS}.go above. +# +# * zsysnum_${GOOS}_${GOARCH}.go +# +# Generated by mksysnum_${GOOS}. +# +# * ztypes_${GOOS}_${GOARCH}.go +# +# Generated by godefs; see types_${GOOS}.c above. + +GOOSARCH="${GOOS}_${GOARCH}" + +# defaults +mksyscall="./mksyscall.pl" +mkerrors="./mkerrors.sh" +zerrors="zerrors_$GOOSARCH.go" +mksysctl="" +zsysctl="zsysctl_$GOOSARCH.go" +mksysnum= +mktypes= +run="sh" + +case "$1" in +-syscalls) + for i in zsyscall*go + do + sed 1q $i | sed 's;^// ;;' | sh > _$i && gofmt < _$i > $i + rm _$i + done + exit 0 + ;; +-n) + run="cat" + shift +esac + +case "$#" in +0) + ;; +*) + echo 'usage: mkall.sh [-n]' 1>&2 + exit 2 +esac + +GOOSARCH_in=syscall_$GOOSARCH.go +case "$GOOSARCH" in +_* | *_ | _) + echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2 + exit 1 + ;; +darwin_386) + mkerrors="$mkerrors -m32" + mksyscall="./mksyscall.pl -l32" + mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +darwin_amd64) + mkerrors="$mkerrors -m64" + mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +darwin_arm) + mkerrors="$mkerrors" + mksysnum="./mksysnum_darwin.pl /usr/include/sys/syscall.h" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +darwin_arm64) + mkerrors="$mkerrors -m64" + mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +dragonfly_386) + mkerrors="$mkerrors -m32" + mksyscall="./mksyscall.pl -l32 -dragonfly" + mksysnum="curl -s 'http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master' | ./mksysnum_dragonfly.pl" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +dragonfly_amd64) + mkerrors="$mkerrors -m64" + mksyscall="./mksyscall.pl -dragonfly" + mksysnum="curl -s 'http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master' | ./mksysnum_dragonfly.pl" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +freebsd_386) + mkerrors="$mkerrors -m32" + mksyscall="./mksyscall.pl -l32" + mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +freebsd_amd64) + mkerrors="$mkerrors -m64" + mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +freebsd_arm) + mkerrors="$mkerrors" + mksyscall="./mksyscall.pl -l32 -arm" + mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl" + # Let the type of C char be singed for making the bare syscall + # API consistent across over platforms. + mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" + ;; +linux_386) + mkerrors="$mkerrors -m32" + mksyscall="./mksyscall.pl -l32" + mksysnum="./mksysnum_linux.pl /usr/include/asm/unistd_32.h" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +linux_amd64) + unistd_h=$(ls -1 /usr/include/asm/unistd_64.h /usr/include/x86_64-linux-gnu/asm/unistd_64.h 2>/dev/null | head -1) + if [ "$unistd_h" = "" ]; then + echo >&2 cannot find unistd_64.h + exit 1 + fi + mkerrors="$mkerrors -m64" + mksysnum="./mksysnum_linux.pl $unistd_h" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +linux_arm) + mkerrors="$mkerrors" + mksyscall="./mksyscall.pl -l32 -arm" + mksysnum="curl -s 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/arch/arm/include/uapi/asm/unistd.h' | ./mksysnum_linux.pl -" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +linux_arm64) + unistd_h=$(ls -1 /usr/include/asm/unistd.h /usr/include/asm-generic/unistd.h 2>/dev/null | head -1) + if [ "$unistd_h" = "" ]; then + echo >&2 cannot find unistd_64.h + exit 1 + fi + mksysnum="./mksysnum_linux.pl $unistd_h" + # Let the type of C char be singed for making the bare syscall + # API consistent across over platforms. + mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" + ;; +linux_ppc64) + GOOSARCH_in=syscall_linux_ppc64x.go + unistd_h=/usr/include/asm/unistd.h + mkerrors="$mkerrors -m64" + mksysnum="./mksysnum_linux.pl $unistd_h" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +linux_ppc64le) + GOOSARCH_in=syscall_linux_ppc64x.go + unistd_h=/usr/include/powerpc64le-linux-gnu/asm/unistd.h + mkerrors="$mkerrors -m64" + mksysnum="./mksysnum_linux.pl $unistd_h" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +netbsd_386) + mkerrors="$mkerrors -m32" + mksyscall="./mksyscall.pl -l32 -netbsd" + mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +netbsd_amd64) + mkerrors="$mkerrors -m64" + mksyscall="./mksyscall.pl -netbsd" + mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +openbsd_386) + mkerrors="$mkerrors -m32" + mksyscall="./mksyscall.pl -l32 -openbsd" + mksysctl="./mksysctl_openbsd.pl" + zsysctl="zsysctl_openbsd.go" + mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +openbsd_amd64) + mkerrors="$mkerrors -m64" + mksyscall="./mksyscall.pl -openbsd" + mksysctl="./mksysctl_openbsd.pl" + zsysctl="zsysctl_openbsd.go" + mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +solaris_amd64) + mksyscall="./mksyscall_solaris.pl" + mkerrors="$mkerrors -m64" + mksysnum= + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +*) + echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2 + exit 1 + ;; +esac + +( + if [ -n "$mkerrors" ]; then echo "$mkerrors |gofmt >$zerrors"; fi + case "$GOOS" in + *) + syscall_goos="syscall_$GOOS.go" + case "$GOOS" in + darwin | dragonfly | freebsd | netbsd | openbsd) + syscall_goos="syscall_bsd.go $syscall_goos" + ;; + esac + if [ -n "$mksyscall" ]; then echo "$mksyscall $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go"; fi + ;; + esac + if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi + if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi + if [ -n "$mktypes" ]; then + echo "echo // +build $GOARCH,$GOOS > ztypes_$GOOSARCH.go"; + echo "$mktypes types_$GOOS.go | gofmt >>ztypes_$GOOSARCH.go"; + fi +) | $run diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh new file mode 100755 index 0000000..785855f --- /dev/null +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -0,0 +1,466 @@ +#!/usr/bin/env bash +# Copyright 2009 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +# Generate Go code listing errors and other #defined constant +# values (ENAMETOOLONG etc.), by asking the preprocessor +# about the definitions. + +unset LANG +export LC_ALL=C +export LC_CTYPE=C + +if test -z "$GOARCH" -o -z "$GOOS"; then + echo 1>&2 "GOARCH or GOOS not defined in environment" + exit 1 +fi + +CC=${CC:-cc} + +if [[ "$GOOS" -eq "solaris" ]]; then + # Assumes GNU versions of utilities in PATH. + export PATH=/usr/gnu/bin:$PATH +fi + +uname=$(uname) + +includes_Darwin=' +#define _DARWIN_C_SOURCE +#define KERNEL +#define _DARWIN_USE_64_BIT_INODE +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +' + +includes_DragonFly=' +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +' + +includes_FreeBSD=' +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if __FreeBSD__ >= 10 +#define IFT_CARP 0xf8 // IFT_CARP is deprecated in FreeBSD 10 +#undef SIOCAIFADDR +#define SIOCAIFADDR _IOW(105, 26, struct oifaliasreq) // ifaliasreq contains if_data +#undef SIOCSIFPHYADDR +#define SIOCSIFPHYADDR _IOW(105, 70, struct oifaliasreq) // ifaliasreq contains if_data +#endif +' + +includes_Linux=' +#define _LARGEFILE_SOURCE +#define _LARGEFILE64_SOURCE +#ifndef __LP64__ +#define _FILE_OFFSET_BITS 64 +#endif +#define _GNU_SOURCE + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef MSG_FASTOPEN +#define MSG_FASTOPEN 0x20000000 +#endif + +#ifndef PTRACE_GETREGS +#define PTRACE_GETREGS 0xc +#endif + +#ifndef PTRACE_SETREGS +#define PTRACE_SETREGS 0xd +#endif +' + +includes_NetBSD=' +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Needed since refers to it... +#define schedppq 1 +' + +includes_OpenBSD=' +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// We keep some constants not supported in OpenBSD 5.5 and beyond for +// the promise of compatibility. +#define EMUL_ENABLED 0x1 +#define EMUL_NATIVE 0x2 +#define IPV6_FAITH 0x1d +#define IPV6_OPTIONS 0x1 +#define IPV6_RTHDR_STRICT 0x1 +#define IPV6_SOCKOPT_RESERVED1 0x3 +#define SIOCGIFGENERIC 0xc020693a +#define SIOCSIFGENERIC 0x80206939 +#define WALTSIG 0x4 +' + +includes_SunOS=' +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +' + + +includes=' +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +' +ccflags="$@" + +# Write go tool cgo -godefs input. +( + echo package unix + echo + echo '/*' + indirect="includes_$(uname)" + echo "${!indirect} $includes" + echo '*/' + echo 'import "C"' + echo 'import "syscall"' + echo + echo 'const (' + + # The gcc command line prints all the #defines + # it encounters while processing the input + echo "${!indirect} $includes" | $CC -x c - -E -dM $ccflags | + awk ' + $1 != "#define" || $2 ~ /\(/ || $3 == "" {next} + + $2 ~ /^E([ABCD]X|[BIS]P|[SD]I|S|FL)$/ {next} # 386 registers + $2 ~ /^(SIGEV_|SIGSTKSZ|SIGRT(MIN|MAX))/ {next} + $2 ~ /^(SCM_SRCRT)$/ {next} + $2 ~ /^(MAP_FAILED)$/ {next} + $2 ~ /^ELF_.*$/ {next}# contains ELF_ARCH, etc. + + $2 ~ /^EXTATTR_NAMESPACE_NAMES/ || + $2 ~ /^EXTATTR_NAMESPACE_[A-Z]+_STRING/ {next} + + $2 !~ /^ETH_/ && + $2 !~ /^EPROC_/ && + $2 !~ /^EQUIV_/ && + $2 !~ /^EXPR_/ && + $2 ~ /^E[A-Z0-9_]+$/ || + $2 ~ /^B[0-9_]+$/ || + $2 ~ /^V[A-Z0-9]+$/ || + $2 ~ /^CS[A-Z0-9]/ || + $2 ~ /^I(SIG|CANON|CRNL|EXTEN|MAXBEL|STRIP|UTF8)$/ || + $2 ~ /^IGN/ || + $2 ~ /^IX(ON|ANY|OFF)$/ || + $2 ~ /^IN(LCR|PCK)$/ || + $2 ~ /(^FLU?SH)|(FLU?SH$)/ || + $2 ~ /^C(LOCAL|READ)$/ || + $2 == "BRKINT" || + $2 == "HUPCL" || + $2 == "PENDIN" || + $2 == "TOSTOP" || + $2 ~ /^PAR/ || + $2 ~ /^SIG[^_]/ || + $2 ~ /^O[CNPFP][A-Z]+[^_][A-Z]+$/ || + $2 ~ /^IN_/ || + $2 ~ /^LOCK_(SH|EX|NB|UN)$/ || + $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ || + $2 == "ICMPV6_FILTER" || + $2 == "SOMAXCONN" || + $2 == "NAME_MAX" || + $2 == "IFNAMSIZ" || + $2 ~ /^CTL_(MAXNAME|NET|QUERY)$/ || + $2 ~ /^SYSCTL_VERS/ || + $2 ~ /^(MS|MNT)_/ || + $2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ || + $2 ~ /^(O|F|FD|NAME|S|PTRACE|PT)_/ || + $2 ~ /^LINUX_REBOOT_CMD_/ || + $2 ~ /^LINUX_REBOOT_MAGIC[12]$/ || + $2 !~ "NLA_TYPE_MASK" && + $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P)_/ || + $2 ~ /^SIOC/ || + $2 ~ /^TIOC/ || + $2 ~ /^TCGET/ || + $2 ~ /^TCSET/ || + $2 ~ /^TC(FLSH|SBRK|XONC)$/ || + $2 !~ "RTF_BITS" && + $2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ || + $2 ~ /^BIOC/ || + $2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ || + $2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|NOFILE|STACK)|RLIM_INFINITY/ || + $2 ~ /^PRIO_(PROCESS|PGRP|USER)/ || + $2 ~ /^CLONE_[A-Z_]+/ || + $2 !~ /^(BPF_TIMEVAL)$/ && + $2 ~ /^(BPF|DLT)_/ || + $2 ~ /^CLOCK_/ || + $2 !~ "WMESGLEN" && + $2 ~ /^W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", $2, $2)} + $2 ~ /^__WCOREFLAG$/ {next} + $2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)} + + {next} + ' | sort + + echo ')' +) >_const.go + +# Pull out the error names for later. +errors=$( + echo '#include ' | $CC -x c - -E -dM $ccflags | + awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print $2 }' | + sort +) + +# Pull out the signal names for later. +signals=$( + echo '#include ' | $CC -x c - -E -dM $ccflags | + awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' | + egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' | + sort +) + +# Again, writing regexps to a file. +echo '#include ' | $CC -x c - -E -dM $ccflags | + awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print "^\t" $2 "[ \t]*=" }' | + sort >_error.grep +echo '#include ' | $CC -x c - -E -dM $ccflags | + awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' | + egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' | + sort >_signal.grep + +echo '// mkerrors.sh' "$@" +echo '// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT' +echo +echo "// +build ${GOARCH},${GOOS}" +echo +go tool cgo -godefs -- "$@" _const.go >_error.out +cat _error.out | grep -vf _error.grep | grep -vf _signal.grep +echo +echo '// Errors' +echo 'const (' +cat _error.out | grep -f _error.grep | sed 's/=\(.*\)/= syscall.Errno(\1)/' +echo ')' + +echo +echo '// Signals' +echo 'const (' +cat _error.out | grep -f _signal.grep | sed 's/=\(.*\)/= syscall.Signal(\1)/' +echo ')' + +# Run C program to print error and syscall strings. +( + echo -E " +#include +#include +#include +#include +#include +#include + +#define nelem(x) (sizeof(x)/sizeof((x)[0])) + +enum { A = 'A', Z = 'Z', a = 'a', z = 'z' }; // avoid need for single quotes below + +int errors[] = { +" + for i in $errors + do + echo -E ' '$i, + done + + echo -E " +}; + +int signals[] = { +" + for i in $signals + do + echo -E ' '$i, + done + + # Use -E because on some systems bash builtin interprets \n itself. + echo -E ' +}; + +static int +intcmp(const void *a, const void *b) +{ + return *(int*)a - *(int*)b; +} + +int +main(void) +{ + int i, j, e; + char buf[1024], *p; + + printf("\n\n// Error table\n"); + printf("var errors = [...]string {\n"); + qsort(errors, nelem(errors), sizeof errors[0], intcmp); + for(i=0; i 0 && errors[i-1] == e) + continue; + strcpy(buf, strerror(e)); + // lowercase first letter: Bad -> bad, but STREAM -> STREAM. + if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z) + buf[0] += a - A; + printf("\t%d: \"%s\",\n", e, buf); + } + printf("}\n\n"); + + printf("\n\n// Signal table\n"); + printf("var signals = [...]string {\n"); + qsort(signals, nelem(signals), sizeof signals[0], intcmp); + for(i=0; i 0 && signals[i-1] == e) + continue; + strcpy(buf, strsignal(e)); + // lowercase first letter: Bad -> bad, but STREAM -> STREAM. + if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z) + buf[0] += a - A; + // cut trailing : number. + p = strrchr(buf, ":"[0]); + if(p) + *p = '\0'; + printf("\t%d: \"%s\",\n", e, buf); + } + printf("}\n\n"); + + return 0; +} + +' +) >_errors.c + +$CC $ccflags -o _errors _errors.c && $GORUN ./_errors && rm -f _errors.c _errors _const.go _error.grep _signal.grep _error.out diff --git a/vendor/golang.org/x/sys/unix/mksyscall.pl b/vendor/golang.org/x/sys/unix/mksyscall.pl new file mode 100755 index 0000000..b1e7766 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/mksyscall.pl @@ -0,0 +1,323 @@ +#!/usr/bin/env perl +# Copyright 2009 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +# This program reads a file containing function prototypes +# (like syscall_darwin.go) and generates system call bodies. +# The prototypes are marked by lines beginning with "//sys" +# and read like func declarations if //sys is replaced by func, but: +# * The parameter lists must give a name for each argument. +# This includes return parameters. +# * The parameter lists must give a type for each argument: +# the (x, y, z int) shorthand is not allowed. +# * If the return parameter is an error number, it must be named errno. + +# A line beginning with //sysnb is like //sys, except that the +# goroutine will not be suspended during the execution of the system +# call. This must only be used for system calls which can never +# block, as otherwise the system call could cause all goroutines to +# hang. + +use strict; + +my $cmdline = "mksyscall.pl " . join(' ', @ARGV); +my $errors = 0; +my $_32bit = ""; +my $plan9 = 0; +my $openbsd = 0; +my $netbsd = 0; +my $dragonfly = 0; +my $arm = 0; # 64-bit value should use (even, odd)-pair + +if($ARGV[0] eq "-b32") { + $_32bit = "big-endian"; + shift; +} elsif($ARGV[0] eq "-l32") { + $_32bit = "little-endian"; + shift; +} +if($ARGV[0] eq "-plan9") { + $plan9 = 1; + shift; +} +if($ARGV[0] eq "-openbsd") { + $openbsd = 1; + shift; +} +if($ARGV[0] eq "-netbsd") { + $netbsd = 1; + shift; +} +if($ARGV[0] eq "-dragonfly") { + $dragonfly = 1; + shift; +} +if($ARGV[0] eq "-arm") { + $arm = 1; + shift; +} + +if($ARGV[0] =~ /^-/) { + print STDERR "usage: mksyscall.pl [-b32 | -l32] [file ...]\n"; + exit 1; +} + +if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") { + print STDERR "GOARCH or GOOS not defined in environment\n"; + exit 1; +} + +sub parseparamlist($) { + my ($list) = @_; + $list =~ s/^\s*//; + $list =~ s/\s*$//; + if($list eq "") { + return (); + } + return split(/\s*,\s*/, $list); +} + +sub parseparam($) { + my ($p) = @_; + if($p !~ /^(\S*) (\S*)$/) { + print STDERR "$ARGV:$.: malformed parameter: $p\n"; + $errors = 1; + return ("xx", "int"); + } + return ($1, $2); +} + +my $text = ""; +while(<>) { + chomp; + s/\s+/ /g; + s/^\s+//; + s/\s+$//; + my $nonblock = /^\/\/sysnb /; + next if !/^\/\/sys / && !$nonblock; + + # Line must be of the form + # func Open(path string, mode int, perm int) (fd int, errno error) + # Split into name, in params, out params. + if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*((?i)SYS_[A-Z0-9_]+))?$/) { + print STDERR "$ARGV:$.: malformed //sys declaration\n"; + $errors = 1; + next; + } + my ($func, $in, $out, $sysname) = ($2, $3, $4, $5); + + # Split argument lists on comma. + my @in = parseparamlist($in); + my @out = parseparamlist($out); + + # Try in vain to keep people from editing this file. + # The theory is that they jump into the middle of the file + # without reading the header. + $text .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n"; + + # Go function header. + my $out_decl = @out ? sprintf(" (%s)", join(', ', @out)) : ""; + $text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out_decl; + + # Check if err return available + my $errvar = ""; + foreach my $p (@out) { + my ($name, $type) = parseparam($p); + if($type eq "error") { + $errvar = $name; + last; + } + } + + # Prepare arguments to Syscall. + my @args = (); + my @uses = (); + my $n = 0; + foreach my $p (@in) { + my ($name, $type) = parseparam($p); + if($type =~ /^\*/) { + push @args, "uintptr(unsafe.Pointer($name))"; + } elsif($type eq "string" && $errvar ne "") { + $text .= "\tvar _p$n *byte\n"; + $text .= "\t_p$n, $errvar = BytePtrFromString($name)\n"; + $text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n"; + push @args, "uintptr(unsafe.Pointer(_p$n))"; + push @uses, "use(unsafe.Pointer(_p$n))"; + $n++; + } elsif($type eq "string") { + print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n"; + $text .= "\tvar _p$n *byte\n"; + $text .= "\t_p$n, _ = BytePtrFromString($name)\n"; + push @args, "uintptr(unsafe.Pointer(_p$n))"; + push @uses, "use(unsafe.Pointer(_p$n))"; + $n++; + } elsif($type =~ /^\[\](.*)/) { + # Convert slice into pointer, length. + # Have to be careful not to take address of &a[0] if len == 0: + # pass dummy pointer in that case. + # Used to pass nil, but some OSes or simulators reject write(fd, nil, 0). + $text .= "\tvar _p$n unsafe.Pointer\n"; + $text .= "\tif len($name) > 0 {\n\t\t_p$n = unsafe.Pointer(\&${name}[0])\n\t}"; + $text .= " else {\n\t\t_p$n = unsafe.Pointer(&_zero)\n\t}"; + $text .= "\n"; + push @args, "uintptr(_p$n)", "uintptr(len($name))"; + $n++; + } elsif($type eq "int64" && ($openbsd || $netbsd)) { + push @args, "0"; + if($_32bit eq "big-endian") { + push @args, "uintptr($name>>32)", "uintptr($name)"; + } elsif($_32bit eq "little-endian") { + push @args, "uintptr($name)", "uintptr($name>>32)"; + } else { + push @args, "uintptr($name)"; + } + } elsif($type eq "int64" && $dragonfly) { + if ($func !~ /^extp(read|write)/i) { + push @args, "0"; + } + if($_32bit eq "big-endian") { + push @args, "uintptr($name>>32)", "uintptr($name)"; + } elsif($_32bit eq "little-endian") { + push @args, "uintptr($name)", "uintptr($name>>32)"; + } else { + push @args, "uintptr($name)"; + } + } elsif($type eq "int64" && $_32bit ne "") { + if(@args % 2 && $arm) { + # arm abi specifies 64-bit argument uses + # (even, odd) pair + push @args, "0" + } + if($_32bit eq "big-endian") { + push @args, "uintptr($name>>32)", "uintptr($name)"; + } else { + push @args, "uintptr($name)", "uintptr($name>>32)"; + } + } else { + push @args, "uintptr($name)"; + } + } + + # Determine which form to use; pad args with zeros. + my $asm = "Syscall"; + if ($nonblock) { + $asm = "RawSyscall"; + } + if(@args <= 3) { + while(@args < 3) { + push @args, "0"; + } + } elsif(@args <= 6) { + $asm .= "6"; + while(@args < 6) { + push @args, "0"; + } + } elsif(@args <= 9) { + $asm .= "9"; + while(@args < 9) { + push @args, "0"; + } + } else { + print STDERR "$ARGV:$.: too many arguments to system call\n"; + } + + # System call number. + if($sysname eq "") { + $sysname = "SYS_$func"; + $sysname =~ s/([a-z])([A-Z])/${1}_$2/g; # turn FooBar into Foo_Bar + $sysname =~ y/a-z/A-Z/; + } + + # Actual call. + my $args = join(', ', @args); + my $call = "$asm($sysname, $args)"; + + # Assign return values. + my $body = ""; + my @ret = ("_", "_", "_"); + my $do_errno = 0; + for(my $i=0; $i<@out; $i++) { + my $p = $out[$i]; + my ($name, $type) = parseparam($p); + my $reg = ""; + if($name eq "err" && !$plan9) { + $reg = "e1"; + $ret[2] = $reg; + $do_errno = 1; + } elsif($name eq "err" && $plan9) { + $ret[0] = "r0"; + $ret[2] = "e1"; + next; + } else { + $reg = sprintf("r%d", $i); + $ret[$i] = $reg; + } + if($type eq "bool") { + $reg = "$reg != 0"; + } + if($type eq "int64" && $_32bit ne "") { + # 64-bit number in r1:r0 or r0:r1. + if($i+2 > @out) { + print STDERR "$ARGV:$.: not enough registers for int64 return\n"; + } + if($_32bit eq "big-endian") { + $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1); + } else { + $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i); + } + $ret[$i] = sprintf("r%d", $i); + $ret[$i+1] = sprintf("r%d", $i+1); + } + if($reg ne "e1" || $plan9) { + $body .= "\t$name = $type($reg)\n"; + } + } + if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") { + $text .= "\t$call\n"; + } else { + $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n"; + } + foreach my $use (@uses) { + $text .= "\t$use\n"; + } + $text .= $body; + + if ($plan9 && $ret[2] eq "e1") { + $text .= "\tif int32(r0) == -1 {\n"; + $text .= "\t\terr = e1\n"; + $text .= "\t}\n"; + } elsif ($do_errno) { + $text .= "\tif e1 != 0 {\n"; + $text .= "\t\terr = errnoErr(e1)\n"; + $text .= "\t}\n"; + } + $text .= "\treturn\n"; + $text .= "}\n\n"; +} + +chomp $text; +chomp $text; + +if($errors) { + exit 1; +} + +print <) { + chomp; + s/\s+/ /g; + s/^\s+//; + s/\s+$//; + $package = $1 if !$package && /^package (\S+)$/; + my $nonblock = /^\/\/sysnb /; + next if !/^\/\/sys / && !$nonblock; + + # Line must be of the form + # func Open(path string, mode int, perm int) (fd int, err error) + # Split into name, in params, out params. + if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*(?:(\w*)\.)?(\w*))?$/) { + print STDERR "$ARGV:$.: malformed //sys declaration\n"; + $errors = 1; + next; + } + my ($nb, $func, $in, $out, $modname, $sysname) = ($1, $2, $3, $4, $5, $6); + + # Split argument lists on comma. + my @in = parseparamlist($in); + my @out = parseparamlist($out); + + # So file name. + if($modname eq "") { + $modname = "libc"; + } + + # System call name. + if($sysname eq "") { + $sysname = "$func"; + } + + # System call pointer variable name. + my $sysvarname = "proc$sysname"; + + my $strconvfunc = "BytePtrFromString"; + my $strconvtype = "*byte"; + + $sysname =~ y/A-Z/a-z/; # All libc functions are lowercase. + + # Runtime import of function to allow cross-platform builds. + $dynimports .= "//go:cgo_import_dynamic libc_${sysname} ${sysname} \"$modname.so\"\n"; + # Link symbol to proc address variable. + $linknames .= "//go:linkname ${sysvarname} libc_${sysname}\n"; + # Library proc address variable. + push @vars, $sysvarname; + + # Go function header. + $out = join(', ', @out); + if($out ne "") { + $out = " ($out)"; + } + if($text ne "") { + $text .= "\n" + } + $text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out; + + # Check if err return available + my $errvar = ""; + foreach my $p (@out) { + my ($name, $type) = parseparam($p); + if($type eq "error") { + $errvar = $name; + last; + } + } + + # Prepare arguments to Syscall. + my @args = (); + my @uses = (); + my $n = 0; + foreach my $p (@in) { + my ($name, $type) = parseparam($p); + if($type =~ /^\*/) { + push @args, "uintptr(unsafe.Pointer($name))"; + } elsif($type eq "string" && $errvar ne "") { + $text .= "\tvar _p$n $strconvtype\n"; + $text .= "\t_p$n, $errvar = $strconvfunc($name)\n"; + $text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n"; + push @args, "uintptr(unsafe.Pointer(_p$n))"; + push @uses, "use(unsafe.Pointer(_p$n))"; + $n++; + } elsif($type eq "string") { + print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n"; + $text .= "\tvar _p$n $strconvtype\n"; + $text .= "\t_p$n, _ = $strconvfunc($name)\n"; + push @args, "uintptr(unsafe.Pointer(_p$n))"; + push @uses, "use(unsafe.Pointer(_p$n))"; + $n++; + } elsif($type =~ /^\[\](.*)/) { + # Convert slice into pointer, length. + # Have to be careful not to take address of &a[0] if len == 0: + # pass nil in that case. + $text .= "\tvar _p$n *$1\n"; + $text .= "\tif len($name) > 0 {\n\t\t_p$n = \&$name\[0]\n\t}\n"; + push @args, "uintptr(unsafe.Pointer(_p$n))", "uintptr(len($name))"; + $n++; + } elsif($type eq "int64" && $_32bit ne "") { + if($_32bit eq "big-endian") { + push @args, "uintptr($name >> 32)", "uintptr($name)"; + } else { + push @args, "uintptr($name)", "uintptr($name >> 32)"; + } + } elsif($type eq "bool") { + $text .= "\tvar _p$n uint32\n"; + $text .= "\tif $name {\n\t\t_p$n = 1\n\t} else {\n\t\t_p$n = 0\n\t}\n"; + push @args, "uintptr(_p$n)"; + $n++; + } else { + push @args, "uintptr($name)"; + } + } + my $nargs = @args; + + # Determine which form to use; pad args with zeros. + my $asm = "sysvicall6"; + if ($nonblock) { + $asm = "rawSysvicall6"; + } + if(@args <= 6) { + while(@args < 6) { + push @args, "0"; + } + } else { + print STDERR "$ARGV:$.: too many arguments to system call\n"; + } + + # Actual call. + my $args = join(', ', @args); + my $call = "$asm(uintptr(unsafe.Pointer(&$sysvarname)), $nargs, $args)"; + + # Assign return values. + my $body = ""; + my $failexpr = ""; + my @ret = ("_", "_", "_"); + my @pout= (); + my $do_errno = 0; + for(my $i=0; $i<@out; $i++) { + my $p = $out[$i]; + my ($name, $type) = parseparam($p); + my $reg = ""; + if($name eq "err") { + $reg = "e1"; + $ret[2] = $reg; + $do_errno = 1; + } else { + $reg = sprintf("r%d", $i); + $ret[$i] = $reg; + } + if($type eq "bool") { + $reg = "$reg != 0"; + } + if($type eq "int64" && $_32bit ne "") { + # 64-bit number in r1:r0 or r0:r1. + if($i+2 > @out) { + print STDERR "$ARGV:$.: not enough registers for int64 return\n"; + } + if($_32bit eq "big-endian") { + $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1); + } else { + $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i); + } + $ret[$i] = sprintf("r%d", $i); + $ret[$i+1] = sprintf("r%d", $i+1); + } + if($reg ne "e1") { + $body .= "\t$name = $type($reg)\n"; + } + } + if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") { + $text .= "\t$call\n"; + } else { + $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n"; + } + foreach my $use (@uses) { + $text .= "\t$use\n"; + } + $text .= $body; + + if ($do_errno) { + $text .= "\tif e1 != 0 {\n"; + $text .= "\t\terr = e1\n"; + $text .= "\t}\n"; + } + $text .= "\treturn\n"; + $text .= "}\n"; +} + +if($errors) { + exit 1; +} + +print < "net.inet", + "net.inet.ipproto" => "net.inet", + "net.inet6.ipv6proto" => "net.inet6", + "net.inet6.ipv6" => "net.inet6.ip6", + "net.inet.icmpv6" => "net.inet6.icmp6", + "net.inet6.divert6" => "net.inet6.divert", + "net.inet6.tcp6" => "net.inet.tcp", + "net.inet6.udp6" => "net.inet.udp", + "mpls" => "net.mpls", + "swpenc" => "vm.swapencrypt" +); + +# Node mappings +my %node_map = ( + "net.inet.ip.ifq" => "net.ifq", + "net.inet.pfsync" => "net.pfsync", + "net.mpls.ifq" => "net.ifq" +); + +my $ctlname; +my %mib = (); +my %sysctl = (); +my $node; + +sub debug() { + print STDERR "$_[0]\n" if $debug; +} + +# Walk the MIB and build a sysctl name to OID mapping. +sub build_sysctl() { + my ($node, $name, $oid) = @_; + my %node = %{$node}; + my @oid = @{$oid}; + + foreach my $key (sort keys %node) { + my @node = @{$node{$key}}; + my $nodename = $name.($name ne '' ? '.' : '').$key; + my @nodeoid = (@oid, $node[0]); + if ($node[1] eq 'CTLTYPE_NODE') { + if (exists $node_map{$nodename}) { + $node = \%mib; + $ctlname = $node_map{$nodename}; + foreach my $part (split /\./, $ctlname) { + $node = \%{@{$$node{$part}}[2]}; + } + } else { + $node = $node[2]; + } + &build_sysctl($node, $nodename, \@nodeoid); + } elsif ($node[1] ne '') { + $sysctl{$nodename} = \@nodeoid; + } + } +} + +foreach my $ctl (@ctls) { + $ctls{$ctl} = $ctl; +} + +# Build MIB +foreach my $header (@headers) { + &debug("Processing $header..."); + open HEADER, "/usr/include/$header" || + print STDERR "Failed to open $header\n"; + while (

    ) { + if ($_ =~ /^#define\s+(CTL_NAMES)\s+{/ || + $_ =~ /^#define\s+(CTL_(.*)_NAMES)\s+{/ || + $_ =~ /^#define\s+((.*)CTL_NAMES)\s+{/) { + if ($1 eq 'CTL_NAMES') { + # Top level. + $node = \%mib; + } else { + # Node. + my $nodename = lc($2); + if ($header =~ /^netinet\//) { + $ctlname = "net.inet.$nodename"; + } elsif ($header =~ /^netinet6\//) { + $ctlname = "net.inet6.$nodename"; + } elsif ($header =~ /^net\//) { + $ctlname = "net.$nodename"; + } else { + $ctlname = "$nodename"; + $ctlname =~ s/^(fs|net|kern)_/$1\./; + } + if (exists $ctl_map{$ctlname}) { + $ctlname = $ctl_map{$ctlname}; + } + if (not exists $ctls{$ctlname}) { + &debug("Ignoring $ctlname..."); + next; + } + + # Walk down from the top of the MIB. + $node = \%mib; + foreach my $part (split /\./, $ctlname) { + if (not exists $$node{$part}) { + &debug("Missing node $part"); + $$node{$part} = [ 0, '', {} ]; + } + $node = \%{@{$$node{$part}}[2]}; + } + } + + # Populate current node with entries. + my $i = -1; + while (defined($_) && $_ !~ /^}/) { + $_ =
    ; + $i++ if $_ =~ /{.*}/; + next if $_ !~ /{\s+"(\w+)",\s+(CTLTYPE_[A-Z]+)\s+}/; + $$node{$1} = [ $i, $2, {} ]; + } + } + } + close HEADER; +} + +&build_sysctl(\%mib, "", []); + +print <){ + if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){ + my $name = $1; + my $num = $2; + $name =~ y/a-z/A-Z/; + print " SYS_$name = $num;" + } +} + +print <){ + if(/^([0-9]+)\s+STD\s+({ \S+\s+(\w+).*)$/){ + my $num = $1; + my $proto = $2; + my $name = "SYS_$3"; + $name =~ y/a-z/A-Z/; + + # There are multiple entries for enosys and nosys, so comment them out. + if($name =~ /^SYS_E?NOSYS$/){ + $name = "// $name"; + } + if($name eq 'SYS_SYS_EXIT'){ + $name = 'SYS_EXIT'; + } + + print " $name = $num; // $proto\n"; + } +} + +print <){ + if(/^([0-9]+)\s+\S+\s+STD\s+({ \S+\s+(\w+).*)$/){ + my $num = $1; + my $proto = $2; + my $name = "SYS_$3"; + $name =~ y/a-z/A-Z/; + + # There are multiple entries for enosys and nosys, so comment them out. + if($name =~ /^SYS_E?NOSYS$/){ + $name = "// $name"; + } + if($name eq 'SYS_SYS_EXIT'){ + $name = 'SYS_EXIT'; + } + if($name =~ /^SYS_CAP_+/ || $name =~ /^SYS___CAP_+/){ + next + } + + print " $name = $num; // $proto\n"; + + # We keep Capsicum syscall numbers for FreeBSD + # 9-STABLE here because we are not sure whether they + # are mature and stable. + if($num == 513){ + print " SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); }\n"; + print " SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \\\n"; + print " SYS_CAP_ENTER = 516 // { int cap_enter(void); }\n"; + print " SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }\n"; + } + } +} + +print < 999){ + # ignore deprecated syscalls that are no longer implemented + # https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/unistd.h?id=refs/heads/master#n716 + return; + } + $name =~ y/a-z/A-Z/; + print " SYS_$name = $num;\n"; +} + +my $prev; +open(GCC, "gcc -E -dD $ARGV[0] |") || die "can't run gcc"; +while(){ + if(/^#define __NR_syscalls\s+/) { + # ignore redefinitions of __NR_syscalls + } + elsif(/^#define __NR_(\w+)\s+([0-9]+)/){ + $prev = $2; + fmt($1, $2); + } + elsif(/^#define __NR3264_(\w+)\s+([0-9]+)/){ + $prev = $2; + fmt($1, $2); + } + elsif(/^#define __NR_(\w+)\s+\(\w+\+\s*([0-9]+)\)/){ + fmt($1, $prev+$2) + } +} + +print <){ + if($line =~ /^(.*)\\$/) { + # Handle continuation + $line = $1; + $_ =~ s/^\s+//; + $line .= $_; + } else { + # New line + $line = $_; + } + next if $line =~ /\\$/; + if($line =~ /^([0-9]+)\s+((STD)|(NOERR))\s+(RUMP\s+)?({\s+\S+\s*\*?\s*\|(\S+)\|(\S*)\|(\w+).*\s+})(\s+(\S+))?$/) { + my $num = $1; + my $proto = $6; + my $compat = $8; + my $name = "$7_$9"; + + $name = "$7_$11" if $11 ne ''; + $name =~ y/a-z/A-Z/; + + if($compat eq '' || $compat eq '30' || $compat eq '50') { + print " $name = $num; // $proto\n"; + } + } +} + +print <){ + if(/^([0-9]+)\s+STD\s+(NOLOCK\s+)?({ \S+\s+\*?(\w+).*)$/){ + my $num = $1; + my $proto = $3; + my $name = $4; + $name =~ y/a-z/A-Z/; + + # There are multiple entries for enosys and nosys, so comment them out. + if($name =~ /^SYS_E?NOSYS$/){ + $name = "// $name"; + } + if($name eq 'SYS_SYS_EXIT'){ + $name = 'SYS_EXIT'; + } + + print " $name = $num; // $proto\n"; + } +} + +print < len(b) { + return nil, nil, EINVAL + } + return h, b[cmsgAlignOf(SizeofCmsghdr):h.Len], nil +} + +// UnixRights encodes a set of open file descriptors into a socket +// control message for sending to another process. +func UnixRights(fds ...int) []byte { + datalen := len(fds) * 4 + b := make([]byte, CmsgSpace(datalen)) + h := (*Cmsghdr)(unsafe.Pointer(&b[0])) + h.Level = SOL_SOCKET + h.Type = SCM_RIGHTS + h.SetLen(CmsgLen(datalen)) + data := cmsgData(h) + for _, fd := range fds { + *(*int32)(data) = int32(fd) + data = unsafe.Pointer(uintptr(data) + 4) + } + return b +} + +// ParseUnixRights decodes a socket control message that contains an +// integer array of open file descriptors from another process. +func ParseUnixRights(m *SocketControlMessage) ([]int, error) { + if m.Header.Level != SOL_SOCKET { + return nil, EINVAL + } + if m.Header.Type != SCM_RIGHTS { + return nil, EINVAL + } + fds := make([]int, len(m.Data)>>2) + for i, j := 0, 0; i < len(m.Data); i += 4 { + fds[j] = int(*(*int32)(unsafe.Pointer(&m.Data[i]))) + j++ + } + return fds, nil +} diff --git a/vendor/golang.org/x/sys/unix/str.go b/vendor/golang.org/x/sys/unix/str.go new file mode 100644 index 0000000..35ed664 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/str.go @@ -0,0 +1,26 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package unix + +func itoa(val int) string { // do it here rather than with fmt to avoid dependency + if val < 0 { + return "-" + uitoa(uint(-val)) + } + return uitoa(uint(val)) +} + +func uitoa(val uint) string { + var buf [32]byte // big enough for int64 + i := len(buf) - 1 + for val >= 10 { + buf[i] = byte(val%10 + '0') + i-- + val /= 10 + } + buf[i] = byte(val + '0') + return string(buf[i:]) +} diff --git a/vendor/golang.org/x/sys/unix/syscall.go b/vendor/golang.org/x/sys/unix/syscall.go new file mode 100644 index 0000000..6442a99 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall.go @@ -0,0 +1,74 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +// Package unix contains an interface to the low-level operating system +// primitives. OS details vary depending on the underlying system, and +// by default, godoc will display OS-specific documentation for the current +// system. If you want godoc to display OS documentation for another +// system, set $GOOS and $GOARCH to the desired system. For example, if +// you want to view documentation for freebsd/arm on linux/amd64, set $GOOS +// to freebsd and $GOARCH to arm. +// The primary use of this package is inside other packages that provide a more +// portable interface to the system, such as "os", "time" and "net". Use +// those packages rather than this one if you can. +// For details of the functions and data types in this package consult +// the manuals for the appropriate operating system. +// These calls return err == nil to indicate success; otherwise +// err represents an operating system error describing the failure and +// holds a value of type syscall.Errno. +package unix // import "golang.org/x/sys/unix" + +import "unsafe" + +// ByteSliceFromString returns a NUL-terminated slice of bytes +// containing the text of s. If s contains a NUL byte at any +// location, it returns (nil, EINVAL). +func ByteSliceFromString(s string) ([]byte, error) { + for i := 0; i < len(s); i++ { + if s[i] == 0 { + return nil, EINVAL + } + } + a := make([]byte, len(s)+1) + copy(a, s) + return a, nil +} + +// BytePtrFromString returns a pointer to a NUL-terminated array of +// bytes containing the text of s. If s contains a NUL byte at any +// location, it returns (nil, EINVAL). +func BytePtrFromString(s string) (*byte, error) { + a, err := ByteSliceFromString(s) + if err != nil { + return nil, err + } + return &a[0], nil +} + +// Single-word zero for use when we need a valid pointer to 0 bytes. +// See mkunix.pl. +var _zero uintptr + +func (ts *Timespec) Unix() (sec int64, nsec int64) { + return int64(ts.Sec), int64(ts.Nsec) +} + +func (tv *Timeval) Unix() (sec int64, nsec int64) { + return int64(tv.Sec), int64(tv.Usec) * 1000 +} + +func (ts *Timespec) Nano() int64 { + return int64(ts.Sec)*1e9 + int64(ts.Nsec) +} + +func (tv *Timeval) Nano() int64 { + return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000 +} + +// use is a no-op, but the compiler cannot see that it is. +// Calling use(p) ensures that p is kept live until that point. +//go:noescape +func use(p unsafe.Pointer) diff --git a/vendor/golang.org/x/sys/unix/syscall_bsd.go b/vendor/golang.org/x/sys/unix/syscall_bsd.go new file mode 100644 index 0000000..e967176 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_bsd.go @@ -0,0 +1,628 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd netbsd openbsd + +// BSD system call wrappers shared by *BSD based systems +// including OS X (Darwin) and FreeBSD. Like the other +// syscall_*.go files it is compiled as Go code but also +// used as input to mksyscall which parses the //sys +// lines and generates system call stubs. + +package unix + +import ( + "runtime" + "syscall" + "unsafe" +) + +/* + * Wrapped + */ + +//sysnb getgroups(ngid int, gid *_Gid_t) (n int, err error) +//sysnb setgroups(ngid int, gid *_Gid_t) (err error) + +func Getgroups() (gids []int, err error) { + n, err := getgroups(0, nil) + if err != nil { + return nil, err + } + if n == 0 { + return nil, nil + } + + // Sanity check group count. Max is 16 on BSD. + if n < 0 || n > 1000 { + return nil, EINVAL + } + + a := make([]_Gid_t, n) + n, err = getgroups(n, &a[0]) + if err != nil { + return nil, err + } + gids = make([]int, n) + for i, v := range a[0:n] { + gids[i] = int(v) + } + return +} + +func Setgroups(gids []int) (err error) { + if len(gids) == 0 { + return setgroups(0, nil) + } + + a := make([]_Gid_t, len(gids)) + for i, v := range gids { + a[i] = _Gid_t(v) + } + return setgroups(len(a), &a[0]) +} + +func ReadDirent(fd int, buf []byte) (n int, err error) { + // Final argument is (basep *uintptr) and the syscall doesn't take nil. + // 64 bits should be enough. (32 bits isn't even on 386). Since the + // actual system call is getdirentries64, 64 is a good guess. + // TODO(rsc): Can we use a single global basep for all calls? + var base = (*uintptr)(unsafe.Pointer(new(uint64))) + return Getdirentries(fd, buf, base) +} + +// Wait status is 7 bits at bottom, either 0 (exited), +// 0x7F (stopped), or a signal number that caused an exit. +// The 0x80 bit is whether there was a core dump. +// An extra number (exit code, signal causing a stop) +// is in the high bits. + +type WaitStatus uint32 + +const ( + mask = 0x7F + core = 0x80 + shift = 8 + + exited = 0 + stopped = 0x7F +) + +func (w WaitStatus) Exited() bool { return w&mask == exited } + +func (w WaitStatus) ExitStatus() int { + if w&mask != exited { + return -1 + } + return int(w >> shift) +} + +func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != 0 } + +func (w WaitStatus) Signal() syscall.Signal { + sig := syscall.Signal(w & mask) + if sig == stopped || sig == 0 { + return -1 + } + return sig +} + +func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 } + +func (w WaitStatus) Stopped() bool { return w&mask == stopped && syscall.Signal(w>>shift) != SIGSTOP } + +func (w WaitStatus) Continued() bool { return w&mask == stopped && syscall.Signal(w>>shift) == SIGSTOP } + +func (w WaitStatus) StopSignal() syscall.Signal { + if !w.Stopped() { + return -1 + } + return syscall.Signal(w>>shift) & 0xFF +} + +func (w WaitStatus) TrapCause() int { return -1 } + +//sys wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) + +func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) { + var status _C_int + wpid, err = wait4(pid, &status, options, rusage) + if wstatus != nil { + *wstatus = WaitStatus(status) + } + return +} + +//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) +//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) +//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) +//sysnb socket(domain int, typ int, proto int) (fd int, err error) +//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) +//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) +//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) +//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) +//sys Shutdown(s int, how int) (err error) + +func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) { + if sa.Port < 0 || sa.Port > 0xFFFF { + return nil, 0, EINVAL + } + sa.raw.Len = SizeofSockaddrInet4 + sa.raw.Family = AF_INET + p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) + p[0] = byte(sa.Port >> 8) + p[1] = byte(sa.Port) + for i := 0; i < len(sa.Addr); i++ { + sa.raw.Addr[i] = sa.Addr[i] + } + return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil +} + +func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) { + if sa.Port < 0 || sa.Port > 0xFFFF { + return nil, 0, EINVAL + } + sa.raw.Len = SizeofSockaddrInet6 + sa.raw.Family = AF_INET6 + p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) + p[0] = byte(sa.Port >> 8) + p[1] = byte(sa.Port) + sa.raw.Scope_id = sa.ZoneId + for i := 0; i < len(sa.Addr); i++ { + sa.raw.Addr[i] = sa.Addr[i] + } + return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil +} + +func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) { + name := sa.Name + n := len(name) + if n >= len(sa.raw.Path) || n == 0 { + return nil, 0, EINVAL + } + sa.raw.Len = byte(3 + n) // 2 for Family, Len; 1 for NUL + sa.raw.Family = AF_UNIX + for i := 0; i < n; i++ { + sa.raw.Path[i] = int8(name[i]) + } + return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil +} + +func (sa *SockaddrDatalink) sockaddr() (unsafe.Pointer, _Socklen, error) { + if sa.Index == 0 { + return nil, 0, EINVAL + } + sa.raw.Len = sa.Len + sa.raw.Family = AF_LINK + sa.raw.Index = sa.Index + sa.raw.Type = sa.Type + sa.raw.Nlen = sa.Nlen + sa.raw.Alen = sa.Alen + sa.raw.Slen = sa.Slen + for i := 0; i < len(sa.raw.Data); i++ { + sa.raw.Data[i] = sa.Data[i] + } + return unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil +} + +func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) { + switch rsa.Addr.Family { + case AF_LINK: + pp := (*RawSockaddrDatalink)(unsafe.Pointer(rsa)) + sa := new(SockaddrDatalink) + sa.Len = pp.Len + sa.Family = pp.Family + sa.Index = pp.Index + sa.Type = pp.Type + sa.Nlen = pp.Nlen + sa.Alen = pp.Alen + sa.Slen = pp.Slen + for i := 0; i < len(sa.Data); i++ { + sa.Data[i] = pp.Data[i] + } + return sa, nil + + case AF_UNIX: + pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa)) + if pp.Len < 2 || pp.Len > SizeofSockaddrUnix { + return nil, EINVAL + } + sa := new(SockaddrUnix) + + // Some BSDs include the trailing NUL in the length, whereas + // others do not. Work around this by subtracting the leading + // family and len. The path is then scanned to see if a NUL + // terminator still exists within the length. + n := int(pp.Len) - 2 // subtract leading Family, Len + for i := 0; i < n; i++ { + if pp.Path[i] == 0 { + // found early NUL; assume Len included the NUL + // or was overestimating. + n = i + break + } + } + bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n] + sa.Name = string(bytes) + return sa, nil + + case AF_INET: + pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa)) + sa := new(SockaddrInet4) + p := (*[2]byte)(unsafe.Pointer(&pp.Port)) + sa.Port = int(p[0])<<8 + int(p[1]) + for i := 0; i < len(sa.Addr); i++ { + sa.Addr[i] = pp.Addr[i] + } + return sa, nil + + case AF_INET6: + pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa)) + sa := new(SockaddrInet6) + p := (*[2]byte)(unsafe.Pointer(&pp.Port)) + sa.Port = int(p[0])<<8 + int(p[1]) + sa.ZoneId = pp.Scope_id + for i := 0; i < len(sa.Addr); i++ { + sa.Addr[i] = pp.Addr[i] + } + return sa, nil + } + return nil, EAFNOSUPPORT +} + +func Accept(fd int) (nfd int, sa Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + nfd, err = accept(fd, &rsa, &len) + if err != nil { + return + } + if runtime.GOOS == "darwin" && len == 0 { + // Accepted socket has no address. + // This is likely due to a bug in xnu kernels, + // where instead of ECONNABORTED error socket + // is accepted, but has no address. + Close(nfd) + return 0, nil, ECONNABORTED + } + sa, err = anyToSockaddr(&rsa) + if err != nil { + Close(nfd) + nfd = 0 + } + return +} + +func Getsockname(fd int) (sa Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + if err = getsockname(fd, &rsa, &len); err != nil { + return + } + // TODO(jsing): DragonFly has a "bug" (see issue 3349), which should be + // reported upstream. + if runtime.GOOS == "dragonfly" && rsa.Addr.Family == AF_UNSPEC && rsa.Addr.Len == 0 { + rsa.Addr.Family = AF_UNIX + rsa.Addr.Len = SizeofSockaddrUnix + } + return anyToSockaddr(&rsa) +} + +//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) + +func GetsockoptByte(fd, level, opt int) (value byte, err error) { + var n byte + vallen := _Socklen(1) + err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen) + return n, err +} + +func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) { + vallen := _Socklen(4) + err = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen) + return value, err +} + +func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) { + var value IPMreq + vallen := _Socklen(SizeofIPMreq) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, err +} + +func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) { + var value IPv6Mreq + vallen := _Socklen(SizeofIPv6Mreq) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, err +} + +func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) { + var value IPv6MTUInfo + vallen := _Socklen(SizeofIPv6MTUInfo) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, err +} + +func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) { + var value ICMPv6Filter + vallen := _Socklen(SizeofICMPv6Filter) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, err +} + +//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) +//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) +//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) + +func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { + var msg Msghdr + var rsa RawSockaddrAny + msg.Name = (*byte)(unsafe.Pointer(&rsa)) + msg.Namelen = uint32(SizeofSockaddrAny) + var iov Iovec + if len(p) > 0 { + iov.Base = (*byte)(unsafe.Pointer(&p[0])) + iov.SetLen(len(p)) + } + var dummy byte + if len(oob) > 0 { + // receive at least one normal byte + if len(p) == 0 { + iov.Base = &dummy + iov.SetLen(1) + } + msg.Control = (*byte)(unsafe.Pointer(&oob[0])) + msg.SetControllen(len(oob)) + } + msg.Iov = &iov + msg.Iovlen = 1 + if n, err = recvmsg(fd, &msg, flags); err != nil { + return + } + oobn = int(msg.Controllen) + recvflags = int(msg.Flags) + // source address is only specified if the socket is unconnected + if rsa.Addr.Family != AF_UNSPEC { + from, err = anyToSockaddr(&rsa) + } + return +} + +//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) + +func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) { + _, err = SendmsgN(fd, p, oob, to, flags) + return +} + +func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) { + var ptr unsafe.Pointer + var salen _Socklen + if to != nil { + ptr, salen, err = to.sockaddr() + if err != nil { + return 0, err + } + } + var msg Msghdr + msg.Name = (*byte)(unsafe.Pointer(ptr)) + msg.Namelen = uint32(salen) + var iov Iovec + if len(p) > 0 { + iov.Base = (*byte)(unsafe.Pointer(&p[0])) + iov.SetLen(len(p)) + } + var dummy byte + if len(oob) > 0 { + // send at least one normal byte + if len(p) == 0 { + iov.Base = &dummy + iov.SetLen(1) + } + msg.Control = (*byte)(unsafe.Pointer(&oob[0])) + msg.SetControllen(len(oob)) + } + msg.Iov = &iov + msg.Iovlen = 1 + if n, err = sendmsg(fd, &msg, flags); err != nil { + return 0, err + } + if len(oob) > 0 && len(p) == 0 { + n = 0 + } + return n, nil +} + +//sys kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) + +func Kevent(kq int, changes, events []Kevent_t, timeout *Timespec) (n int, err error) { + var change, event unsafe.Pointer + if len(changes) > 0 { + change = unsafe.Pointer(&changes[0]) + } + if len(events) > 0 { + event = unsafe.Pointer(&events[0]) + } + return kevent(kq, change, len(changes), event, len(events), timeout) +} + +//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL + +// sysctlmib translates name to mib number and appends any additional args. +func sysctlmib(name string, args ...int) ([]_C_int, error) { + // Translate name to mib number. + mib, err := nametomib(name) + if err != nil { + return nil, err + } + + for _, a := range args { + mib = append(mib, _C_int(a)) + } + + return mib, nil +} + +func Sysctl(name string) (string, error) { + return SysctlArgs(name) +} + +func SysctlArgs(name string, args ...int) (string, error) { + mib, err := sysctlmib(name, args...) + if err != nil { + return "", err + } + + // Find size. + n := uintptr(0) + if err := sysctl(mib, nil, &n, nil, 0); err != nil { + return "", err + } + if n == 0 { + return "", nil + } + + // Read into buffer of that size. + buf := make([]byte, n) + if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil { + return "", err + } + + // Throw away terminating NUL. + if n > 0 && buf[n-1] == '\x00' { + n-- + } + return string(buf[0:n]), nil +} + +func SysctlUint32(name string) (uint32, error) { + return SysctlUint32Args(name) +} + +func SysctlUint32Args(name string, args ...int) (uint32, error) { + mib, err := sysctlmib(name, args...) + if err != nil { + return 0, err + } + + n := uintptr(4) + buf := make([]byte, 4) + if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil { + return 0, err + } + if n != 4 { + return 0, EIO + } + return *(*uint32)(unsafe.Pointer(&buf[0])), nil +} + +func SysctlUint64(name string, args ...int) (uint64, error) { + mib, err := sysctlmib(name, args...) + if err != nil { + return 0, err + } + + n := uintptr(8) + buf := make([]byte, 8) + if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil { + return 0, err + } + if n != 8 { + return 0, EIO + } + return *(*uint64)(unsafe.Pointer(&buf[0])), nil +} + +func SysctlRaw(name string, args ...int) ([]byte, error) { + mib, err := sysctlmib(name, args...) + if err != nil { + return nil, err + } + + // Find size. + n := uintptr(0) + if err := sysctl(mib, nil, &n, nil, 0); err != nil { + return nil, err + } + if n == 0 { + return nil, nil + } + + // Read into buffer of that size. + buf := make([]byte, n) + if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil { + return nil, err + } + + // The actual call may return less than the original reported required + // size so ensure we deal with that. + return buf[:n], nil +} + +//sys utimes(path string, timeval *[2]Timeval) (err error) + +func Utimes(path string, tv []Timeval) error { + if tv == nil { + return utimes(path, nil) + } + if len(tv) != 2 { + return EINVAL + } + return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) +} + +func UtimesNano(path string, ts []Timespec) error { + if ts == nil { + return utimes(path, nil) + } + // TODO: The BSDs can do utimensat with SYS_UTIMENSAT but it + // isn't supported by darwin so this uses utimes instead + if len(ts) != 2 { + return EINVAL + } + // Not as efficient as it could be because Timespec and + // Timeval have different types in the different OSes + tv := [2]Timeval{ + NsecToTimeval(TimespecToNsec(ts[0])), + NsecToTimeval(TimespecToNsec(ts[1])), + } + return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) +} + +//sys futimes(fd int, timeval *[2]Timeval) (err error) + +func Futimes(fd int, tv []Timeval) error { + if tv == nil { + return futimes(fd, nil) + } + if len(tv) != 2 { + return EINVAL + } + return futimes(fd, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) +} + +//sys fcntl(fd int, cmd int, arg int) (val int, err error) + +// TODO: wrap +// Acct(name nil-string) (err error) +// Gethostuuid(uuid *byte, timeout *Timespec) (err error) +// Madvise(addr *byte, len int, behav int) (err error) +// Mprotect(addr *byte, len int, prot int) (err error) +// Msync(addr *byte, len int, flags int) (err error) +// Ptrace(req int, pid int, addr uintptr, data int) (ret uintptr, err error) + +var mapper = &mmapper{ + active: make(map[*byte][]byte), + mmap: mmap, + munmap: munmap, +} + +func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { + return mapper.Mmap(fd, offset, length, prot, flags) +} + +func Munmap(b []byte) (err error) { + return mapper.Munmap(b) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_bsd_test.go b/vendor/golang.org/x/sys/unix/syscall_bsd_test.go new file mode 100644 index 0000000..0bcd741 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_bsd_test.go @@ -0,0 +1,42 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd openbsd + +package unix_test + +import ( + "testing" + + "golang.org/x/sys/unix" +) + +const MNT_WAIT = 1 + +func TestGetfsstat(t *testing.T) { + n, err := unix.Getfsstat(nil, MNT_WAIT) + if err != nil { + t.Fatal(err) + } + + data := make([]unix.Statfs_t, n) + n, err = unix.Getfsstat(data, MNT_WAIT) + if err != nil { + t.Fatal(err) + } + + empty := unix.Statfs_t{} + for _, stat := range data { + if stat == empty { + t.Fatal("an empty Statfs_t struct was returned") + } + } +} + +func TestSysctlRaw(t *testing.T) { + _, err := unix.SysctlRaw("kern.proc.pid", unix.Getpid()) + if err != nil { + t.Fatal(err) + } +} diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go new file mode 100644 index 0000000..0d1771c --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go @@ -0,0 +1,509 @@ +// Copyright 2009,2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Darwin system calls. +// This file is compiled as ordinary Go code, +// but it is also input to mksyscall, +// which parses the //sys lines and generates system call stubs. +// Note that sometimes we use a lowercase //sys name and wrap +// it in our own nicer implementation, either here or in +// syscall_bsd.go or syscall_unix.go. + +package unix + +import ( + errorspkg "errors" + "syscall" + "unsafe" +) + +const ImplementsGetwd = true + +func Getwd() (string, error) { + buf := make([]byte, 2048) + attrs, err := getAttrList(".", attrList{CommonAttr: attrCmnFullpath}, buf, 0) + if err == nil && len(attrs) == 1 && len(attrs[0]) >= 2 { + wd := string(attrs[0]) + // Sanity check that it's an absolute path and ends + // in a null byte, which we then strip. + if wd[0] == '/' && wd[len(wd)-1] == 0 { + return wd[:len(wd)-1], nil + } + } + // If pkg/os/getwd.go gets ENOTSUP, it will fall back to the + // slow algorithm. + return "", ENOTSUP +} + +type SockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [12]int8 + raw RawSockaddrDatalink +} + +// Translate "kern.hostname" to []_C_int{0,1,2,3}. +func nametomib(name string) (mib []_C_int, err error) { + const siz = unsafe.Sizeof(mib[0]) + + // NOTE(rsc): It seems strange to set the buffer to have + // size CTL_MAXNAME+2 but use only CTL_MAXNAME + // as the size. I don't know why the +2 is here, but the + // kernel uses +2 for its own implementation of this function. + // I am scared that if we don't include the +2 here, the kernel + // will silently write 2 words farther than we specify + // and we'll get memory corruption. + var buf [CTL_MAXNAME + 2]_C_int + n := uintptr(CTL_MAXNAME) * siz + + p := (*byte)(unsafe.Pointer(&buf[0])) + bytes, err := ByteSliceFromString(name) + if err != nil { + return nil, err + } + + // Magic sysctl: "setting" 0.3 to a string name + // lets you read back the array of integers form. + if err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil { + return nil, err + } + return buf[0 : n/siz], nil +} + +// ParseDirent parses up to max directory entries in buf, +// appending the names to names. It returns the number +// bytes consumed from buf, the number of entries added +// to names, and the new names slice. +func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { + origlen := len(buf) + for max != 0 && len(buf) > 0 { + dirent := (*Dirent)(unsafe.Pointer(&buf[0])) + if dirent.Reclen == 0 { + buf = nil + break + } + buf = buf[dirent.Reclen:] + if dirent.Ino == 0 { // File absent in directory. + continue + } + bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0])) + var name = string(bytes[0:dirent.Namlen]) + if name == "." || name == ".." { // Useless names + continue + } + max-- + count++ + names = append(names, name) + } + return origlen - len(buf), count, names +} + +//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error) +func PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) } +func PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 0, 0) } + +const ( + attrBitMapCount = 5 + attrCmnFullpath = 0x08000000 +) + +type attrList struct { + bitmapCount uint16 + _ uint16 + CommonAttr uint32 + VolAttr uint32 + DirAttr uint32 + FileAttr uint32 + Forkattr uint32 +} + +func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) (attrs [][]byte, err error) { + if len(attrBuf) < 4 { + return nil, errorspkg.New("attrBuf too small") + } + attrList.bitmapCount = attrBitMapCount + + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return nil, err + } + + _, _, e1 := Syscall6( + SYS_GETATTRLIST, + uintptr(unsafe.Pointer(_p0)), + uintptr(unsafe.Pointer(&attrList)), + uintptr(unsafe.Pointer(&attrBuf[0])), + uintptr(len(attrBuf)), + uintptr(options), + 0, + ) + if e1 != 0 { + return nil, e1 + } + size := *(*uint32)(unsafe.Pointer(&attrBuf[0])) + + // dat is the section of attrBuf that contains valid data, + // without the 4 byte length header. All attribute offsets + // are relative to dat. + dat := attrBuf + if int(size) < len(attrBuf) { + dat = dat[:size] + } + dat = dat[4:] // remove length prefix + + for i := uint32(0); int(i) < len(dat); { + header := dat[i:] + if len(header) < 8 { + return attrs, errorspkg.New("truncated attribute header") + } + datOff := *(*int32)(unsafe.Pointer(&header[0])) + attrLen := *(*uint32)(unsafe.Pointer(&header[4])) + if datOff < 0 || uint32(datOff)+attrLen > uint32(len(dat)) { + return attrs, errorspkg.New("truncated results; attrBuf too small") + } + end := uint32(datOff) + attrLen + attrs = append(attrs, dat[datOff:end]) + i = end + if r := i % 4; r != 0 { + i += (4 - r) + } + } + return +} + +//sysnb pipe() (r int, w int, err error) + +func Pipe(p []int) (err error) { + if len(p) != 2 { + return EINVAL + } + p[0], p[1], err = pipe() + return +} + +func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { + var _p0 unsafe.Pointer + var bufsize uintptr + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf)) + } + r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(_p0), bufsize, uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +/* + * Wrapped + */ + +//sys kill(pid int, signum int, posix int) (err error) + +func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(signum), 1) } + +/* + * Exposed directly + */ +//sys Access(path string, mode uint32) (err error) +//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error) +//sys Chdir(path string) (err error) +//sys Chflags(path string, flags int) (err error) +//sys Chmod(path string, mode uint32) (err error) +//sys Chown(path string, uid int, gid int) (err error) +//sys Chroot(path string) (err error) +//sys Close(fd int) (err error) +//sys Dup(fd int) (nfd int, err error) +//sys Dup2(from int, to int) (err error) +//sys Exchangedata(path1 string, path2 string, options int) (err error) +//sys Exit(code int) +//sys Fchdir(fd int) (err error) +//sys Fchflags(fd int, flags int) (err error) +//sys Fchmod(fd int, mode uint32) (err error) +//sys Fchown(fd int, uid int, gid int) (err error) +//sys Flock(fd int, how int) (err error) +//sys Fpathconf(fd int, name int) (val int, err error) +//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64 +//sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64 +//sys Fsync(fd int) (err error) +//sys Ftruncate(fd int, length int64) (err error) +//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64 +//sys Getdtablesize() (size int) +//sysnb Getegid() (egid int) +//sysnb Geteuid() (uid int) +//sysnb Getgid() (gid int) +//sysnb Getpgid(pid int) (pgid int, err error) +//sysnb Getpgrp() (pgrp int) +//sysnb Getpid() (pid int) +//sysnb Getppid() (ppid int) +//sys Getpriority(which int, who int) (prio int, err error) +//sysnb Getrlimit(which int, lim *Rlimit) (err error) +//sysnb Getrusage(who int, rusage *Rusage) (err error) +//sysnb Getsid(pid int) (sid int, err error) +//sysnb Getuid() (uid int) +//sysnb Issetugid() (tainted bool) +//sys Kqueue() (fd int, err error) +//sys Lchown(path string, uid int, gid int) (err error) +//sys Link(path string, link string) (err error) +//sys Listen(s int, backlog int) (err error) +//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64 +//sys Mkdir(path string, mode uint32) (err error) +//sys Mkfifo(path string, mode uint32) (err error) +//sys Mknod(path string, mode uint32, dev int) (err error) +//sys Mlock(b []byte) (err error) +//sys Mlockall(flags int) (err error) +//sys Mprotect(b []byte, prot int) (err error) +//sys Munlock(b []byte) (err error) +//sys Munlockall() (err error) +//sys Open(path string, mode int, perm uint32) (fd int, err error) +//sys Pathconf(path string, name int) (val int, err error) +//sys Pread(fd int, p []byte, offset int64) (n int, err error) +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) +//sys read(fd int, p []byte) (n int, err error) +//sys Readlink(path string, buf []byte) (n int, err error) +//sys Rename(from string, to string) (err error) +//sys Revoke(path string) (err error) +//sys Rmdir(path string) (err error) +//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK +//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) +//sys Setegid(egid int) (err error) +//sysnb Seteuid(euid int) (err error) +//sysnb Setgid(gid int) (err error) +//sys Setlogin(name string) (err error) +//sysnb Setpgid(pid int, pgid int) (err error) +//sys Setpriority(which int, who int, prio int) (err error) +//sys Setprivexec(flag int) (err error) +//sysnb Setregid(rgid int, egid int) (err error) +//sysnb Setreuid(ruid int, euid int) (err error) +//sysnb Setrlimit(which int, lim *Rlimit) (err error) +//sysnb Setsid() (pid int, err error) +//sysnb Settimeofday(tp *Timeval) (err error) +//sysnb Setuid(uid int) (err error) +//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64 +//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64 +//sys Symlink(path string, link string) (err error) +//sys Sync() (err error) +//sys Truncate(path string, length int64) (err error) +//sys Umask(newmask int) (oldmask int) +//sys Undelete(path string) (err error) +//sys Unlink(path string) (err error) +//sys Unmount(path string, flags int) (err error) +//sys write(fd int, p []byte) (n int, err error) +//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) +//sys munmap(addr uintptr, length uintptr) (err error) +//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ +//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE + +/* + * Unimplemented + */ +// Profil +// Sigaction +// Sigprocmask +// Getlogin +// Sigpending +// Sigaltstack +// Ioctl +// Reboot +// Execve +// Vfork +// Sbrk +// Sstk +// Ovadvise +// Mincore +// Setitimer +// Swapon +// Select +// Sigsuspend +// Readv +// Writev +// Nfssvc +// Getfh +// Quotactl +// Mount +// Csops +// Waitid +// Add_profil +// Kdebug_trace +// Sigreturn +// Mmap +// Mlock +// Munlock +// Atsocket +// Kqueue_from_portset_np +// Kqueue_portset +// Getattrlist +// Setattrlist +// Getdirentriesattr +// Searchfs +// Delete +// Copyfile +// Poll +// Watchevent +// Waitevent +// Modwatch +// Getxattr +// Fgetxattr +// Setxattr +// Fsetxattr +// Removexattr +// Fremovexattr +// Listxattr +// Flistxattr +// Fsctl +// Initgroups +// Posix_spawn +// Nfsclnt +// Fhopen +// Minherit +// Semsys +// Msgsys +// Shmsys +// Semctl +// Semget +// Semop +// Msgctl +// Msgget +// Msgsnd +// Msgrcv +// Shmat +// Shmctl +// Shmdt +// Shmget +// Shm_open +// Shm_unlink +// Sem_open +// Sem_close +// Sem_unlink +// Sem_wait +// Sem_trywait +// Sem_post +// Sem_getvalue +// Sem_init +// Sem_destroy +// Open_extended +// Umask_extended +// Stat_extended +// Lstat_extended +// Fstat_extended +// Chmod_extended +// Fchmod_extended +// Access_extended +// Settid +// Gettid +// Setsgroups +// Getsgroups +// Setwgroups +// Getwgroups +// Mkfifo_extended +// Mkdir_extended +// Identitysvc +// Shared_region_check_np +// Shared_region_map_np +// __pthread_mutex_destroy +// __pthread_mutex_init +// __pthread_mutex_lock +// __pthread_mutex_trylock +// __pthread_mutex_unlock +// __pthread_cond_init +// __pthread_cond_destroy +// __pthread_cond_broadcast +// __pthread_cond_signal +// Setsid_with_pid +// __pthread_cond_timedwait +// Aio_fsync +// Aio_return +// Aio_suspend +// Aio_cancel +// Aio_error +// Aio_read +// Aio_write +// Lio_listio +// __pthread_cond_wait +// Iopolicysys +// Mlockall +// Munlockall +// __pthread_kill +// __pthread_sigmask +// __sigwait +// __disable_threadsignal +// __pthread_markcancel +// __pthread_canceled +// __semwait_signal +// Proc_info +// sendfile +// Stat64_extended +// Lstat64_extended +// Fstat64_extended +// __pthread_chdir +// __pthread_fchdir +// Audit +// Auditon +// Getauid +// Setauid +// Getaudit +// Setaudit +// Getaudit_addr +// Setaudit_addr +// Auditctl +// Bsdthread_create +// Bsdthread_terminate +// Stack_snapshot +// Bsdthread_register +// Workq_open +// Workq_ops +// __mac_execve +// __mac_syscall +// __mac_get_file +// __mac_set_file +// __mac_get_link +// __mac_set_link +// __mac_get_proc +// __mac_set_proc +// __mac_get_fd +// __mac_set_fd +// __mac_get_pid +// __mac_get_lcid +// __mac_get_lctx +// __mac_set_lctx +// Setlcid +// Read_nocancel +// Write_nocancel +// Open_nocancel +// Close_nocancel +// Wait4_nocancel +// Recvmsg_nocancel +// Sendmsg_nocancel +// Recvfrom_nocancel +// Accept_nocancel +// Msync_nocancel +// Fcntl_nocancel +// Select_nocancel +// Fsync_nocancel +// Connect_nocancel +// Sigsuspend_nocancel +// Readv_nocancel +// Writev_nocancel +// Sendto_nocancel +// Pread_nocancel +// Pwrite_nocancel +// Waitid_nocancel +// Poll_nocancel +// Msgsnd_nocancel +// Msgrcv_nocancel +// Sem_wait_nocancel +// Aio_suspend_nocancel +// __sigwait_nocancel +// __semwait_signal_nocancel +// __mac_mount +// __mac_get_mount +// __mac_getfsstat diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_386.go b/vendor/golang.org/x/sys/unix/syscall_darwin_386.go new file mode 100644 index 0000000..3195c8b --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_386.go @@ -0,0 +1,79 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build 386,darwin + +package unix + +import ( + "syscall" + "unsafe" +) + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = int32(nsec / 1e9) + ts.Nsec = int32(nsec % 1e9) + return +} + +func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = int32(nsec % 1e9 / 1e3) + tv.Sec = int32(nsec / 1e9) + return +} + +//sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error) +func Gettimeofday(tv *Timeval) (err error) { + // The tv passed to gettimeofday must be non-nil + // but is otherwise unused. The answers come back + // in the two registers. + sec, usec, err := gettimeofday(tv) + tv.Sec = int32(sec) + tv.Usec = int32(usec) + return err +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint32(fd) + k.Filter = int16(mode) + k.Flags = uint16(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint32(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + var length = uint64(count) + + _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(*offset>>32), uintptr(unsafe.Pointer(&length)), 0, 0, 0, 0) + + written = int(length) + + if e1 != 0 { + err = e1 + } + return +} + +func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) + +// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions +// of darwin/386 the syscall is called sysctl instead of __sysctl. +const SYS___SYSCTL = SYS_SYSCTL diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go new file mode 100644 index 0000000..7adb98d --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go @@ -0,0 +1,81 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build amd64,darwin + +package unix + +import ( + "syscall" + "unsafe" +) + +//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = nsec / 1e9 + ts.Nsec = nsec % 1e9 + return +} + +func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = int32(nsec % 1e9 / 1e3) + tv.Sec = int64(nsec / 1e9) + return +} + +//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error) +func Gettimeofday(tv *Timeval) (err error) { + // The tv passed to gettimeofday must be non-nil + // but is otherwise unused. The answers come back + // in the two registers. + sec, usec, err := gettimeofday(tv) + tv.Sec = sec + tv.Usec = usec + return err +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint64(fd) + k.Filter = int16(mode) + k.Flags = uint16(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + var length = uint64(count) + + _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(unsafe.Pointer(&length)), 0, 0) + + written = int(length) + + if e1 != 0 { + err = e1 + } + return +} + +func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) + +// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions +// of darwin/amd64 the syscall is called sysctl instead of __sysctl. +const SYS___SYSCTL = SYS_SYSCTL diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go new file mode 100644 index 0000000..e47ffd7 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go @@ -0,0 +1,73 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package unix + +import ( + "syscall" + "unsafe" +) + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = int32(nsec / 1e9) + ts.Nsec = int32(nsec % 1e9) + return +} + +func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = int32(nsec % 1e9 / 1e3) + tv.Sec = int32(nsec / 1e9) + return +} + +//sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error) +func Gettimeofday(tv *Timeval) (err error) { + // The tv passed to gettimeofday must be non-nil + // but is otherwise unused. The answers come back + // in the two registers. + sec, usec, err := gettimeofday(tv) + tv.Sec = int32(sec) + tv.Usec = int32(usec) + return err +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint32(fd) + k.Filter = int16(mode) + k.Flags = uint16(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint32(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + var length = uint64(count) + + _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(*offset>>32), uintptr(unsafe.Pointer(&length)), 0, 0, 0, 0) + + written = int(length) + + if e1 != 0 { + err = e1 + } + return +} + +func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go new file mode 100644 index 0000000..2560a95 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go @@ -0,0 +1,79 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build arm64,darwin + +package unix + +import ( + "syscall" + "unsafe" +) + +func Getpagesize() int { return 16384 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = nsec / 1e9 + ts.Nsec = nsec % 1e9 + return +} + +func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = int32(nsec % 1e9 / 1e3) + tv.Sec = int64(nsec / 1e9) + return +} + +//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error) +func Gettimeofday(tv *Timeval) (err error) { + // The tv passed to gettimeofday must be non-nil + // but is otherwise unused. The answers come back + // in the two registers. + sec, usec, err := gettimeofday(tv) + tv.Sec = sec + tv.Usec = usec + return err +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint64(fd) + k.Filter = int16(mode) + k.Flags = uint16(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + var length = uint64(count) + + _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(unsafe.Pointer(&length)), 0, 0) + + written = int(length) + + if e1 != 0 { + err = e1 + } + return +} + +func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic + +// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions +// of darwin/arm64 the syscall is called sysctl instead of __sysctl. +const SYS___SYSCTL = SYS_SYSCTL diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go new file mode 100644 index 0000000..fbbe0dc --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go @@ -0,0 +1,411 @@ +// Copyright 2009,2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// FreeBSD system calls. +// This file is compiled as ordinary Go code, +// but it is also input to mksyscall, +// which parses the //sys lines and generates system call stubs. +// Note that sometimes we use a lowercase //sys name and wrap +// it in our own nicer implementation, either here or in +// syscall_bsd.go or syscall_unix.go. + +package unix + +import "unsafe" + +type SockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [12]int8 + Rcf uint16 + Route [16]uint16 + raw RawSockaddrDatalink +} + +// Translate "kern.hostname" to []_C_int{0,1,2,3}. +func nametomib(name string) (mib []_C_int, err error) { + const siz = unsafe.Sizeof(mib[0]) + + // NOTE(rsc): It seems strange to set the buffer to have + // size CTL_MAXNAME+2 but use only CTL_MAXNAME + // as the size. I don't know why the +2 is here, but the + // kernel uses +2 for its own implementation of this function. + // I am scared that if we don't include the +2 here, the kernel + // will silently write 2 words farther than we specify + // and we'll get memory corruption. + var buf [CTL_MAXNAME + 2]_C_int + n := uintptr(CTL_MAXNAME) * siz + + p := (*byte)(unsafe.Pointer(&buf[0])) + bytes, err := ByteSliceFromString(name) + if err != nil { + return nil, err + } + + // Magic sysctl: "setting" 0.3 to a string name + // lets you read back the array of integers form. + if err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil { + return nil, err + } + return buf[0 : n/siz], nil +} + +// ParseDirent parses up to max directory entries in buf, +// appending the names to names. It returns the number +// bytes consumed from buf, the number of entries added +// to names, and the new names slice. +func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { + origlen := len(buf) + for max != 0 && len(buf) > 0 { + dirent := (*Dirent)(unsafe.Pointer(&buf[0])) + reclen := int(16+dirent.Namlen+1+7) & ^7 + buf = buf[reclen:] + if dirent.Fileno == 0 { // File absent in directory. + continue + } + bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0])) + var name = string(bytes[0:dirent.Namlen]) + if name == "." || name == ".." { // Useless names + continue + } + max-- + count++ + names = append(names, name) + } + return origlen - len(buf), count, names +} + +//sysnb pipe() (r int, w int, err error) + +func Pipe(p []int) (err error) { + if len(p) != 2 { + return EINVAL + } + p[0], p[1], err = pipe() + return +} + +//sys extpread(fd int, p []byte, flags int, offset int64) (n int, err error) +func Pread(fd int, p []byte, offset int64) (n int, err error) { + return extpread(fd, p, 0, offset) +} + +//sys extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error) +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + return extpwrite(fd, p, 0, offset) +} + +func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { + var _p0 unsafe.Pointer + var bufsize uintptr + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf)) + } + r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +/* + * Exposed directly + */ +//sys Access(path string, mode uint32) (err error) +//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error) +//sys Chdir(path string) (err error) +//sys Chflags(path string, flags int) (err error) +//sys Chmod(path string, mode uint32) (err error) +//sys Chown(path string, uid int, gid int) (err error) +//sys Chroot(path string) (err error) +//sys Close(fd int) (err error) +//sys Dup(fd int) (nfd int, err error) +//sys Dup2(from int, to int) (err error) +//sys Exit(code int) +//sys Fchdir(fd int) (err error) +//sys Fchflags(fd int, flags int) (err error) +//sys Fchmod(fd int, mode uint32) (err error) +//sys Fchown(fd int, uid int, gid int) (err error) +//sys Flock(fd int, how int) (err error) +//sys Fpathconf(fd int, name int) (val int, err error) +//sys Fstat(fd int, stat *Stat_t) (err error) +//sys Fstatfs(fd int, stat *Statfs_t) (err error) +//sys Fsync(fd int) (err error) +//sys Ftruncate(fd int, length int64) (err error) +//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) +//sys Getdtablesize() (size int) +//sysnb Getegid() (egid int) +//sysnb Geteuid() (uid int) +//sysnb Getgid() (gid int) +//sysnb Getpgid(pid int) (pgid int, err error) +//sysnb Getpgrp() (pgrp int) +//sysnb Getpid() (pid int) +//sysnb Getppid() (ppid int) +//sys Getpriority(which int, who int) (prio int, err error) +//sysnb Getrlimit(which int, lim *Rlimit) (err error) +//sysnb Getrusage(who int, rusage *Rusage) (err error) +//sysnb Getsid(pid int) (sid int, err error) +//sysnb Gettimeofday(tv *Timeval) (err error) +//sysnb Getuid() (uid int) +//sys Issetugid() (tainted bool) +//sys Kill(pid int, signum syscall.Signal) (err error) +//sys Kqueue() (fd int, err error) +//sys Lchown(path string, uid int, gid int) (err error) +//sys Link(path string, link string) (err error) +//sys Listen(s int, backlog int) (err error) +//sys Lstat(path string, stat *Stat_t) (err error) +//sys Mkdir(path string, mode uint32) (err error) +//sys Mkfifo(path string, mode uint32) (err error) +//sys Mknod(path string, mode uint32, dev int) (err error) +//sys Mlock(b []byte) (err error) +//sys Mlockall(flags int) (err error) +//sys Mprotect(b []byte, prot int) (err error) +//sys Munlock(b []byte) (err error) +//sys Munlockall() (err error) +//sys Nanosleep(time *Timespec, leftover *Timespec) (err error) +//sys Open(path string, mode int, perm uint32) (fd int, err error) +//sys Pathconf(path string, name int) (val int, err error) +//sys read(fd int, p []byte) (n int, err error) +//sys Readlink(path string, buf []byte) (n int, err error) +//sys Rename(from string, to string) (err error) +//sys Revoke(path string) (err error) +//sys Rmdir(path string) (err error) +//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK +//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) +//sysnb Setegid(egid int) (err error) +//sysnb Seteuid(euid int) (err error) +//sysnb Setgid(gid int) (err error) +//sys Setlogin(name string) (err error) +//sysnb Setpgid(pid int, pgid int) (err error) +//sys Setpriority(which int, who int, prio int) (err error) +//sysnb Setregid(rgid int, egid int) (err error) +//sysnb Setreuid(ruid int, euid int) (err error) +//sysnb Setresgid(rgid int, egid int, sgid int) (err error) +//sysnb Setresuid(ruid int, euid int, suid int) (err error) +//sysnb Setrlimit(which int, lim *Rlimit) (err error) +//sysnb Setsid() (pid int, err error) +//sysnb Settimeofday(tp *Timeval) (err error) +//sysnb Setuid(uid int) (err error) +//sys Stat(path string, stat *Stat_t) (err error) +//sys Statfs(path string, stat *Statfs_t) (err error) +//sys Symlink(path string, link string) (err error) +//sys Sync() (err error) +//sys Truncate(path string, length int64) (err error) +//sys Umask(newmask int) (oldmask int) +//sys Undelete(path string) (err error) +//sys Unlink(path string) (err error) +//sys Unmount(path string, flags int) (err error) +//sys write(fd int, p []byte) (n int, err error) +//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) +//sys munmap(addr uintptr, length uintptr) (err error) +//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ +//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE + +/* + * Unimplemented + * TODO(jsing): Update this list for DragonFly. + */ +// Profil +// Sigaction +// Sigprocmask +// Getlogin +// Sigpending +// Sigaltstack +// Ioctl +// Reboot +// Execve +// Vfork +// Sbrk +// Sstk +// Ovadvise +// Mincore +// Setitimer +// Swapon +// Select +// Sigsuspend +// Readv +// Writev +// Nfssvc +// Getfh +// Quotactl +// Mount +// Csops +// Waitid +// Add_profil +// Kdebug_trace +// Sigreturn +// Mmap +// Atsocket +// Kqueue_from_portset_np +// Kqueue_portset +// Getattrlist +// Setattrlist +// Getdirentriesattr +// Searchfs +// Delete +// Copyfile +// Poll +// Watchevent +// Waitevent +// Modwatch +// Getxattr +// Fgetxattr +// Setxattr +// Fsetxattr +// Removexattr +// Fremovexattr +// Listxattr +// Flistxattr +// Fsctl +// Initgroups +// Posix_spawn +// Nfsclnt +// Fhopen +// Minherit +// Semsys +// Msgsys +// Shmsys +// Semctl +// Semget +// Semop +// Msgctl +// Msgget +// Msgsnd +// Msgrcv +// Shmat +// Shmctl +// Shmdt +// Shmget +// Shm_open +// Shm_unlink +// Sem_open +// Sem_close +// Sem_unlink +// Sem_wait +// Sem_trywait +// Sem_post +// Sem_getvalue +// Sem_init +// Sem_destroy +// Open_extended +// Umask_extended +// Stat_extended +// Lstat_extended +// Fstat_extended +// Chmod_extended +// Fchmod_extended +// Access_extended +// Settid +// Gettid +// Setsgroups +// Getsgroups +// Setwgroups +// Getwgroups +// Mkfifo_extended +// Mkdir_extended +// Identitysvc +// Shared_region_check_np +// Shared_region_map_np +// __pthread_mutex_destroy +// __pthread_mutex_init +// __pthread_mutex_lock +// __pthread_mutex_trylock +// __pthread_mutex_unlock +// __pthread_cond_init +// __pthread_cond_destroy +// __pthread_cond_broadcast +// __pthread_cond_signal +// Setsid_with_pid +// __pthread_cond_timedwait +// Aio_fsync +// Aio_return +// Aio_suspend +// Aio_cancel +// Aio_error +// Aio_read +// Aio_write +// Lio_listio +// __pthread_cond_wait +// Iopolicysys +// __pthread_kill +// __pthread_sigmask +// __sigwait +// __disable_threadsignal +// __pthread_markcancel +// __pthread_canceled +// __semwait_signal +// Proc_info +// Stat64_extended +// Lstat64_extended +// Fstat64_extended +// __pthread_chdir +// __pthread_fchdir +// Audit +// Auditon +// Getauid +// Setauid +// Getaudit +// Setaudit +// Getaudit_addr +// Setaudit_addr +// Auditctl +// Bsdthread_create +// Bsdthread_terminate +// Stack_snapshot +// Bsdthread_register +// Workq_open +// Workq_ops +// __mac_execve +// __mac_syscall +// __mac_get_file +// __mac_set_file +// __mac_get_link +// __mac_set_link +// __mac_get_proc +// __mac_set_proc +// __mac_get_fd +// __mac_set_fd +// __mac_get_pid +// __mac_get_lcid +// __mac_get_lctx +// __mac_set_lctx +// Setlcid +// Read_nocancel +// Write_nocancel +// Open_nocancel +// Close_nocancel +// Wait4_nocancel +// Recvmsg_nocancel +// Sendmsg_nocancel +// Recvfrom_nocancel +// Accept_nocancel +// Msync_nocancel +// Fcntl_nocancel +// Select_nocancel +// Fsync_nocancel +// Connect_nocancel +// Sigsuspend_nocancel +// Readv_nocancel +// Writev_nocancel +// Sendto_nocancel +// Pread_nocancel +// Pwrite_nocancel +// Waitid_nocancel +// Poll_nocancel +// Msgsnd_nocancel +// Msgrcv_nocancel +// Sem_wait_nocancel +// Aio_suspend_nocancel +// __sigwait_nocancel +// __semwait_signal_nocancel +// __mac_mount +// __mac_get_mount +// __mac_getfsstat diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly_386.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly_386.go new file mode 100644 index 0000000..41c2e69 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly_386.go @@ -0,0 +1,63 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build 386,dragonfly + +package unix + +import ( + "syscall" + "unsafe" +) + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = int32(nsec / 1e9) + ts.Nsec = int32(nsec % 1e9) + return +} + +func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = int32(nsec % 1e9 / 1e3) + tv.Sec = int32(nsec / 1e9) + return +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint32(fd) + k.Filter = int16(mode) + k.Flags = uint16(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint32(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + var writtenOut uint64 = 0 + _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0) + + written = int(writtenOut) + + if e1 != 0 { + err = e1 + } + return +} + +func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go new file mode 100644 index 0000000..2ed9259 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go @@ -0,0 +1,63 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build amd64,dragonfly + +package unix + +import ( + "syscall" + "unsafe" +) + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = nsec / 1e9 + ts.Nsec = nsec % 1e9 + return +} + +func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = nsec % 1e9 / 1e3 + tv.Sec = int64(nsec / 1e9) + return +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint64(fd) + k.Filter = int16(mode) + k.Flags = uint16(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + var writtenOut uint64 = 0 + _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0) + + written = int(writtenOut) + + if e1 != 0 { + err = e1 + } + return +} + +func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/vendor/golang.org/x/sys/unix/syscall_freebsd.go new file mode 100644 index 0000000..ec56ed6 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd.go @@ -0,0 +1,682 @@ +// Copyright 2009,2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// FreeBSD system calls. +// This file is compiled as ordinary Go code, +// but it is also input to mksyscall, +// which parses the //sys lines and generates system call stubs. +// Note that sometimes we use a lowercase //sys name and wrap +// it in our own nicer implementation, either here or in +// syscall_bsd.go or syscall_unix.go. + +package unix + +import "unsafe" + +type SockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [46]int8 + raw RawSockaddrDatalink +} + +// Translate "kern.hostname" to []_C_int{0,1,2,3}. +func nametomib(name string) (mib []_C_int, err error) { + const siz = unsafe.Sizeof(mib[0]) + + // NOTE(rsc): It seems strange to set the buffer to have + // size CTL_MAXNAME+2 but use only CTL_MAXNAME + // as the size. I don't know why the +2 is here, but the + // kernel uses +2 for its own implementation of this function. + // I am scared that if we don't include the +2 here, the kernel + // will silently write 2 words farther than we specify + // and we'll get memory corruption. + var buf [CTL_MAXNAME + 2]_C_int + n := uintptr(CTL_MAXNAME) * siz + + p := (*byte)(unsafe.Pointer(&buf[0])) + bytes, err := ByteSliceFromString(name) + if err != nil { + return nil, err + } + + // Magic sysctl: "setting" 0.3 to a string name + // lets you read back the array of integers form. + if err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil { + return nil, err + } + return buf[0 : n/siz], nil +} + +// ParseDirent parses up to max directory entries in buf, +// appending the names to names. It returns the number +// bytes consumed from buf, the number of entries added +// to names, and the new names slice. +func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { + origlen := len(buf) + for max != 0 && len(buf) > 0 { + dirent := (*Dirent)(unsafe.Pointer(&buf[0])) + if dirent.Reclen == 0 { + buf = nil + break + } + buf = buf[dirent.Reclen:] + if dirent.Fileno == 0 { // File absent in directory. + continue + } + bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0])) + var name = string(bytes[0:dirent.Namlen]) + if name == "." || name == ".." { // Useless names + continue + } + max-- + count++ + names = append(names, name) + } + return origlen - len(buf), count, names +} + +//sysnb pipe() (r int, w int, err error) + +func Pipe(p []int) (err error) { + if len(p) != 2 { + return EINVAL + } + p[0], p[1], err = pipe() + return +} + +func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) { + var value IPMreqn + vallen := _Socklen(SizeofIPMreqn) + errno := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, errno +} + +func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq)) +} + +func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + nfd, err = accept4(fd, &rsa, &len, flags) + if err != nil { + return + } + if len > SizeofSockaddrAny { + panic("RawSockaddrAny too small") + } + sa, err = anyToSockaddr(&rsa) + if err != nil { + Close(nfd) + nfd = 0 + } + return +} + +func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { + var _p0 unsafe.Pointer + var bufsize uintptr + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf)) + } + r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +// Derive extattr namespace and attribute name + +func xattrnamespace(fullattr string) (ns int, attr string, err error) { + s := -1 + for idx, val := range fullattr { + if val == '.' { + s = idx + break + } + } + + if s == -1 { + return -1, "", ENOATTR + } + + namespace := fullattr[0:s] + attr = fullattr[s+1:] + + switch namespace { + case "user": + return EXTATTR_NAMESPACE_USER, attr, nil + case "system": + return EXTATTR_NAMESPACE_SYSTEM, attr, nil + default: + return -1, "", ENOATTR + } +} + +func initxattrdest(dest []byte, idx int) (d unsafe.Pointer) { + if len(dest) > idx { + return unsafe.Pointer(&dest[idx]) + } else { + return unsafe.Pointer(_zero) + } +} + +// FreeBSD implements its own syscalls to handle extended attributes + +func Getxattr(file string, attr string, dest []byte) (sz int, err error) { + d := initxattrdest(dest, 0) + destsize := len(dest) + + nsid, a, err := xattrnamespace(attr) + if err != nil { + return -1, err + } + + return ExtattrGetFile(file, nsid, a, uintptr(d), destsize) +} + +func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { + d := initxattrdest(dest, 0) + destsize := len(dest) + + nsid, a, err := xattrnamespace(attr) + if err != nil { + return -1, err + } + + return ExtattrGetFd(fd, nsid, a, uintptr(d), destsize) +} + +func Lgetxattr(link string, attr string, dest []byte) (sz int, err error) { + d := initxattrdest(dest, 0) + destsize := len(dest) + + nsid, a, err := xattrnamespace(attr) + if err != nil { + return -1, err + } + + return ExtattrGetLink(link, nsid, a, uintptr(d), destsize) +} + +// flags are unused on FreeBSD + +func Fsetxattr(fd int, attr string, data []byte, flags int) (err error) { + d := unsafe.Pointer(&data[0]) + datasiz := len(data) + + nsid, a, err := xattrnamespace(attr) + if err != nil { + return + } + + _, err = ExtattrSetFd(fd, nsid, a, uintptr(d), datasiz) + return +} + +func Setxattr(file string, attr string, data []byte, flags int) (err error) { + d := unsafe.Pointer(&data[0]) + datasiz := len(data) + + nsid, a, err := xattrnamespace(attr) + if err != nil { + return + } + + _, err = ExtattrSetFile(file, nsid, a, uintptr(d), datasiz) + return +} + +func Lsetxattr(link string, attr string, data []byte, flags int) (err error) { + d := unsafe.Pointer(&data[0]) + datasiz := len(data) + + nsid, a, err := xattrnamespace(attr) + if err != nil { + return + } + + _, err = ExtattrSetLink(link, nsid, a, uintptr(d), datasiz) + return +} + +func Removexattr(file string, attr string) (err error) { + nsid, a, err := xattrnamespace(attr) + if err != nil { + return + } + + err = ExtattrDeleteFile(file, nsid, a) + return +} + +func Fremovexattr(fd int, attr string) (err error) { + nsid, a, err := xattrnamespace(attr) + if err != nil { + return + } + + err = ExtattrDeleteFd(fd, nsid, a) + return +} + +func Lremovexattr(link string, attr string) (err error) { + nsid, a, err := xattrnamespace(attr) + if err != nil { + return + } + + err = ExtattrDeleteLink(link, nsid, a) + return +} + +func Listxattr(file string, dest []byte) (sz int, err error) { + d := initxattrdest(dest, 0) + destsiz := len(dest) + + // FreeBSD won't allow you to list xattrs from multiple namespaces + s := 0 + var e error + for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} { + stmp, e := ExtattrListFile(file, nsid, uintptr(d), destsiz) + + /* Errors accessing system attrs are ignored so that + * we can implement the Linux-like behavior of omitting errors that + * we don't have read permissions on + * + * Linux will still error if we ask for user attributes on a file that + * we don't have read permissions on, so don't ignore those errors + */ + if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER { + e = nil + continue + } else if e != nil { + return s, e + } + + s += stmp + destsiz -= s + if destsiz < 0 { + destsiz = 0 + } + d = initxattrdest(dest, s) + } + + return s, e +} + +func Flistxattr(fd int, dest []byte) (sz int, err error) { + d := initxattrdest(dest, 0) + destsiz := len(dest) + + s := 0 + var e error + for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} { + stmp, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz) + if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER { + e = nil + continue + } else if e != nil { + return s, e + } + + s += stmp + destsiz -= s + if destsiz < 0 { + destsiz = 0 + } + d = initxattrdest(dest, s) + } + + return s, e +} + +func Llistxattr(link string, dest []byte) (sz int, err error) { + d := initxattrdest(dest, 0) + destsiz := len(dest) + + s := 0 + var e error + for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} { + stmp, e := ExtattrListLink(link, nsid, uintptr(d), destsiz) + if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER { + e = nil + continue + } else if e != nil { + return s, e + } + + s += stmp + destsiz -= s + if destsiz < 0 { + destsiz = 0 + } + d = initxattrdest(dest, s) + } + + return s, e +} + +/* + * Exposed directly + */ +//sys Access(path string, mode uint32) (err error) +//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error) +//sys Chdir(path string) (err error) +//sys Chflags(path string, flags int) (err error) +//sys Chmod(path string, mode uint32) (err error) +//sys Chown(path string, uid int, gid int) (err error) +//sys Chroot(path string) (err error) +//sys Close(fd int) (err error) +//sys Dup(fd int) (nfd int, err error) +//sys Dup2(from int, to int) (err error) +//sys Exit(code int) +//sys ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) +//sys ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) +//sys ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) +//sys ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) +//sys ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) +//sys ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) +//sys ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) +//sys ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) +//sys ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) +//sys ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) +//sys ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) +//sys ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) +//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_POSIX_FADVISE +//sys Fchdir(fd int) (err error) +//sys Fchflags(fd int, flags int) (err error) +//sys Fchmod(fd int, mode uint32) (err error) +//sys Fchown(fd int, uid int, gid int) (err error) +//sys Flock(fd int, how int) (err error) +//sys Fpathconf(fd int, name int) (val int, err error) +//sys Fstat(fd int, stat *Stat_t) (err error) +//sys Fstatfs(fd int, stat *Statfs_t) (err error) +//sys Fsync(fd int) (err error) +//sys Ftruncate(fd int, length int64) (err error) +//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) +//sys Getdtablesize() (size int) +//sysnb Getegid() (egid int) +//sysnb Geteuid() (uid int) +//sysnb Getgid() (gid int) +//sysnb Getpgid(pid int) (pgid int, err error) +//sysnb Getpgrp() (pgrp int) +//sysnb Getpid() (pid int) +//sysnb Getppid() (ppid int) +//sys Getpriority(which int, who int) (prio int, err error) +//sysnb Getrlimit(which int, lim *Rlimit) (err error) +//sysnb Getrusage(who int, rusage *Rusage) (err error) +//sysnb Getsid(pid int) (sid int, err error) +//sysnb Gettimeofday(tv *Timeval) (err error) +//sysnb Getuid() (uid int) +//sys Issetugid() (tainted bool) +//sys Kill(pid int, signum syscall.Signal) (err error) +//sys Kqueue() (fd int, err error) +//sys Lchown(path string, uid int, gid int) (err error) +//sys Link(path string, link string) (err error) +//sys Listen(s int, backlog int) (err error) +//sys Lstat(path string, stat *Stat_t) (err error) +//sys Mkdir(path string, mode uint32) (err error) +//sys Mkfifo(path string, mode uint32) (err error) +//sys Mknod(path string, mode uint32, dev int) (err error) +//sys Mlock(b []byte) (err error) +//sys Mlockall(flags int) (err error) +//sys Mprotect(b []byte, prot int) (err error) +//sys Munlock(b []byte) (err error) +//sys Munlockall() (err error) +//sys Nanosleep(time *Timespec, leftover *Timespec) (err error) +//sys Open(path string, mode int, perm uint32) (fd int, err error) +//sys Pathconf(path string, name int) (val int, err error) +//sys Pread(fd int, p []byte, offset int64) (n int, err error) +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) +//sys read(fd int, p []byte) (n int, err error) +//sys Readlink(path string, buf []byte) (n int, err error) +//sys Rename(from string, to string) (err error) +//sys Revoke(path string) (err error) +//sys Rmdir(path string) (err error) +//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK +//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) +//sysnb Setegid(egid int) (err error) +//sysnb Seteuid(euid int) (err error) +//sysnb Setgid(gid int) (err error) +//sys Setlogin(name string) (err error) +//sysnb Setpgid(pid int, pgid int) (err error) +//sys Setpriority(which int, who int, prio int) (err error) +//sysnb Setregid(rgid int, egid int) (err error) +//sysnb Setreuid(ruid int, euid int) (err error) +//sysnb Setresgid(rgid int, egid int, sgid int) (err error) +//sysnb Setresuid(ruid int, euid int, suid int) (err error) +//sysnb Setrlimit(which int, lim *Rlimit) (err error) +//sysnb Setsid() (pid int, err error) +//sysnb Settimeofday(tp *Timeval) (err error) +//sysnb Setuid(uid int) (err error) +//sys Stat(path string, stat *Stat_t) (err error) +//sys Statfs(path string, stat *Statfs_t) (err error) +//sys Symlink(path string, link string) (err error) +//sys Sync() (err error) +//sys Truncate(path string, length int64) (err error) +//sys Umask(newmask int) (oldmask int) +//sys Undelete(path string) (err error) +//sys Unlink(path string) (err error) +//sys Unmount(path string, flags int) (err error) +//sys write(fd int, p []byte) (n int, err error) +//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) +//sys munmap(addr uintptr, length uintptr) (err error) +//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ +//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE +//sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) + +/* + * Unimplemented + */ +// Profil +// Sigaction +// Sigprocmask +// Getlogin +// Sigpending +// Sigaltstack +// Ioctl +// Reboot +// Execve +// Vfork +// Sbrk +// Sstk +// Ovadvise +// Mincore +// Setitimer +// Swapon +// Select +// Sigsuspend +// Readv +// Writev +// Nfssvc +// Getfh +// Quotactl +// Mount +// Csops +// Waitid +// Add_profil +// Kdebug_trace +// Sigreturn +// Mmap +// Mlock +// Munlock +// Atsocket +// Kqueue_from_portset_np +// Kqueue_portset +// Getattrlist +// Setattrlist +// Getdirentriesattr +// Searchfs +// Delete +// Copyfile +// Poll +// Watchevent +// Waitevent +// Modwatch +// Getxattr +// Fgetxattr +// Setxattr +// Fsetxattr +// Removexattr +// Fremovexattr +// Listxattr +// Flistxattr +// Fsctl +// Initgroups +// Posix_spawn +// Nfsclnt +// Fhopen +// Minherit +// Semsys +// Msgsys +// Shmsys +// Semctl +// Semget +// Semop +// Msgctl +// Msgget +// Msgsnd +// Msgrcv +// Shmat +// Shmctl +// Shmdt +// Shmget +// Shm_open +// Shm_unlink +// Sem_open +// Sem_close +// Sem_unlink +// Sem_wait +// Sem_trywait +// Sem_post +// Sem_getvalue +// Sem_init +// Sem_destroy +// Open_extended +// Umask_extended +// Stat_extended +// Lstat_extended +// Fstat_extended +// Chmod_extended +// Fchmod_extended +// Access_extended +// Settid +// Gettid +// Setsgroups +// Getsgroups +// Setwgroups +// Getwgroups +// Mkfifo_extended +// Mkdir_extended +// Identitysvc +// Shared_region_check_np +// Shared_region_map_np +// __pthread_mutex_destroy +// __pthread_mutex_init +// __pthread_mutex_lock +// __pthread_mutex_trylock +// __pthread_mutex_unlock +// __pthread_cond_init +// __pthread_cond_destroy +// __pthread_cond_broadcast +// __pthread_cond_signal +// Setsid_with_pid +// __pthread_cond_timedwait +// Aio_fsync +// Aio_return +// Aio_suspend +// Aio_cancel +// Aio_error +// Aio_read +// Aio_write +// Lio_listio +// __pthread_cond_wait +// Iopolicysys +// Mlockall +// Munlockall +// __pthread_kill +// __pthread_sigmask +// __sigwait +// __disable_threadsignal +// __pthread_markcancel +// __pthread_canceled +// __semwait_signal +// Proc_info +// Stat64_extended +// Lstat64_extended +// Fstat64_extended +// __pthread_chdir +// __pthread_fchdir +// Audit +// Auditon +// Getauid +// Setauid +// Getaudit +// Setaudit +// Getaudit_addr +// Setaudit_addr +// Auditctl +// Bsdthread_create +// Bsdthread_terminate +// Stack_snapshot +// Bsdthread_register +// Workq_open +// Workq_ops +// __mac_execve +// __mac_syscall +// __mac_get_file +// __mac_set_file +// __mac_get_link +// __mac_set_link +// __mac_get_proc +// __mac_set_proc +// __mac_get_fd +// __mac_set_fd +// __mac_get_pid +// __mac_get_lcid +// __mac_get_lctx +// __mac_set_lctx +// Setlcid +// Read_nocancel +// Write_nocancel +// Open_nocancel +// Close_nocancel +// Wait4_nocancel +// Recvmsg_nocancel +// Sendmsg_nocancel +// Recvfrom_nocancel +// Accept_nocancel +// Msync_nocancel +// Fcntl_nocancel +// Select_nocancel +// Fsync_nocancel +// Connect_nocancel +// Sigsuspend_nocancel +// Readv_nocancel +// Writev_nocancel +// Sendto_nocancel +// Pread_nocancel +// Pwrite_nocancel +// Waitid_nocancel +// Poll_nocancel +// Msgsnd_nocancel +// Msgrcv_nocancel +// Sem_wait_nocancel +// Aio_suspend_nocancel +// __sigwait_nocancel +// __semwait_signal_nocancel +// __mac_mount +// __mac_get_mount +// __mac_getfsstat diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go new file mode 100644 index 0000000..6255d40 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go @@ -0,0 +1,63 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build 386,freebsd + +package unix + +import ( + "syscall" + "unsafe" +) + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = int32(nsec / 1e9) + ts.Nsec = int32(nsec % 1e9) + return +} + +func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = int32(nsec % 1e9 / 1e3) + tv.Sec = int32(nsec / 1e9) + return +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint32(fd) + k.Filter = int16(mode) + k.Flags = uint16(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint32(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + var writtenOut uint64 = 0 + _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0) + + written = int(writtenOut) + + if e1 != 0 { + err = e1 + } + return +} + +func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go new file mode 100644 index 0000000..8b395d5 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go @@ -0,0 +1,63 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build amd64,freebsd + +package unix + +import ( + "syscall" + "unsafe" +) + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = nsec / 1e9 + ts.Nsec = nsec % 1e9 + return +} + +func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = nsec % 1e9 / 1e3 + tv.Sec = int64(nsec / 1e9) + return +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint64(fd) + k.Filter = int16(mode) + k.Flags = uint16(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + var writtenOut uint64 = 0 + _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0) + + written = int(writtenOut) + + if e1 != 0 { + err = e1 + } + return +} + +func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go new file mode 100644 index 0000000..4e72d46 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go @@ -0,0 +1,63 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build arm,freebsd + +package unix + +import ( + "syscall" + "unsafe" +) + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return ts.Sec*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = nsec / 1e9 + ts.Nsec = int32(nsec % 1e9) + return +} + +func TimevalToNsec(tv Timeval) int64 { return tv.Sec*1e9 + int64(tv.Usec)*1e3 } + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = int32(nsec % 1e9 / 1e3) + tv.Sec = nsec / 1e9 + return +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint32(fd) + k.Filter = int16(mode) + k.Flags = uint16(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint32(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + var writtenOut uint64 = 0 + _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0) + + written = int(writtenOut) + + if e1 != 0 { + err = e1 + } + return +} + +func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_test.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_test.go new file mode 100644 index 0000000..6171a01 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_test.go @@ -0,0 +1,20 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build freebsd + +package unix_test + +import ( + "testing" + + "golang.org/x/sys/unix" +) + +func TestSysctUint64(t *testing.T) { + _, err := unix.SysctlUint64("vm.max_kernel_address") + if err != nil { + t.Fatal(err) + } +} diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go new file mode 100644 index 0000000..d3ee5d2 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -0,0 +1,1086 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Linux system calls. +// This file is compiled as ordinary Go code, +// but it is also input to mksyscall, +// which parses the //sys lines and generates system call stubs. +// Note that sometimes we use a lowercase //sys name and +// wrap it in our own nicer implementation. + +package unix + +import ( + "syscall" + "unsafe" +) + +/* + * Wrapped + */ + +func Access(path string, mode uint32) (err error) { + return Faccessat(AT_FDCWD, path, mode, 0) +} + +func Chmod(path string, mode uint32) (err error) { + return Fchmodat(AT_FDCWD, path, mode, 0) +} + +func Chown(path string, uid int, gid int) (err error) { + return Fchownat(AT_FDCWD, path, uid, gid, 0) +} + +func Creat(path string, mode uint32) (fd int, err error) { + return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode) +} + +//sys linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) + +func Link(oldpath string, newpath string) (err error) { + return linkat(AT_FDCWD, oldpath, AT_FDCWD, newpath, 0) +} + +func Mkdir(path string, mode uint32) (err error) { + return Mkdirat(AT_FDCWD, path, mode) +} + +func Mknod(path string, mode uint32, dev int) (err error) { + return Mknodat(AT_FDCWD, path, mode, dev) +} + +func Open(path string, mode int, perm uint32) (fd int, err error) { + return openat(AT_FDCWD, path, mode|O_LARGEFILE, perm) +} + +//sys openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) + +func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { + return openat(dirfd, path, flags|O_LARGEFILE, mode) +} + +//sys readlinkat(dirfd int, path string, buf []byte) (n int, err error) + +func Readlink(path string, buf []byte) (n int, err error) { + return readlinkat(AT_FDCWD, path, buf) +} + +func Rename(oldpath string, newpath string) (err error) { + return Renameat(AT_FDCWD, oldpath, AT_FDCWD, newpath) +} + +func Rmdir(path string) error { + return unlinkat(AT_FDCWD, path, AT_REMOVEDIR) +} + +//sys symlinkat(oldpath string, newdirfd int, newpath string) (err error) + +func Symlink(oldpath string, newpath string) (err error) { + return symlinkat(oldpath, AT_FDCWD, newpath) +} + +func Unlink(path string) error { + return unlinkat(AT_FDCWD, path, 0) +} + +//sys unlinkat(dirfd int, path string, flags int) (err error) + +func Unlinkat(dirfd int, path string) error { + return unlinkat(dirfd, path, 0) +} + +//sys utimes(path string, times *[2]Timeval) (err error) + +func Utimes(path string, tv []Timeval) (err error) { + if tv == nil { + return utimes(path, nil) + } + if len(tv) != 2 { + return EINVAL + } + return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) +} + +//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) + +func UtimesNano(path string, ts []Timespec) error { + if ts == nil { + err := utimensat(AT_FDCWD, path, nil, 0) + if err != ENOSYS { + return err + } + return utimes(path, nil) + } + if len(ts) != 2 { + return EINVAL + } + err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0) + if err != ENOSYS { + return err + } + // If the utimensat syscall isn't available (utimensat was added to Linux + // in 2.6.22, Released, 8 July 2007) then fall back to utimes + var tv [2]Timeval + for i := 0; i < 2; i++ { + tv[i].Sec = ts[i].Sec + tv[i].Usec = ts[i].Nsec / 1000 + } + return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) +} + +func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error { + if ts == nil { + return utimensat(dirfd, path, nil, flags) + } + if len(ts) != 2 { + return EINVAL + } + return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags) +} + +//sys futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) + +func Futimesat(dirfd int, path string, tv []Timeval) error { + pathp, err := BytePtrFromString(path) + if err != nil { + return err + } + if tv == nil { + return futimesat(dirfd, pathp, nil) + } + if len(tv) != 2 { + return EINVAL + } + return futimesat(dirfd, pathp, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) +} + +func Futimes(fd int, tv []Timeval) (err error) { + // Believe it or not, this is the best we can do on Linux + // (and is what glibc does). + return Utimes("/proc/self/fd/"+itoa(fd), tv) +} + +const ImplementsGetwd = true + +//sys Getcwd(buf []byte) (n int, err error) + +func Getwd() (wd string, err error) { + var buf [PathMax]byte + n, err := Getcwd(buf[0:]) + if err != nil { + return "", err + } + // Getcwd returns the number of bytes written to buf, including the NUL. + if n < 1 || n > len(buf) || buf[n-1] != 0 { + return "", EINVAL + } + return string(buf[0 : n-1]), nil +} + +func Getgroups() (gids []int, err error) { + n, err := getgroups(0, nil) + if err != nil { + return nil, err + } + if n == 0 { + return nil, nil + } + + // Sanity check group count. Max is 1<<16 on Linux. + if n < 0 || n > 1<<20 { + return nil, EINVAL + } + + a := make([]_Gid_t, n) + n, err = getgroups(n, &a[0]) + if err != nil { + return nil, err + } + gids = make([]int, n) + for i, v := range a[0:n] { + gids[i] = int(v) + } + return +} + +func Setgroups(gids []int) (err error) { + if len(gids) == 0 { + return setgroups(0, nil) + } + + a := make([]_Gid_t, len(gids)) + for i, v := range gids { + a[i] = _Gid_t(v) + } + return setgroups(len(a), &a[0]) +} + +type WaitStatus uint32 + +// Wait status is 7 bits at bottom, either 0 (exited), +// 0x7F (stopped), or a signal number that caused an exit. +// The 0x80 bit is whether there was a core dump. +// An extra number (exit code, signal causing a stop) +// is in the high bits. At least that's the idea. +// There are various irregularities. For example, the +// "continued" status is 0xFFFF, distinguishing itself +// from stopped via the core dump bit. + +const ( + mask = 0x7F + core = 0x80 + exited = 0x00 + stopped = 0x7F + shift = 8 +) + +func (w WaitStatus) Exited() bool { return w&mask == exited } + +func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != exited } + +func (w WaitStatus) Stopped() bool { return w&0xFF == stopped } + +func (w WaitStatus) Continued() bool { return w == 0xFFFF } + +func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 } + +func (w WaitStatus) ExitStatus() int { + if !w.Exited() { + return -1 + } + return int(w>>shift) & 0xFF +} + +func (w WaitStatus) Signal() syscall.Signal { + if !w.Signaled() { + return -1 + } + return syscall.Signal(w & mask) +} + +func (w WaitStatus) StopSignal() syscall.Signal { + if !w.Stopped() { + return -1 + } + return syscall.Signal(w>>shift) & 0xFF +} + +func (w WaitStatus) TrapCause() int { + if w.StopSignal() != SIGTRAP { + return -1 + } + return int(w>>shift) >> 8 +} + +//sys wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) + +func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) { + var status _C_int + wpid, err = wait4(pid, &status, options, rusage) + if wstatus != nil { + *wstatus = WaitStatus(status) + } + return +} + +func Mkfifo(path string, mode uint32) (err error) { + return Mknod(path, mode|S_IFIFO, 0) +} + +func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) { + if sa.Port < 0 || sa.Port > 0xFFFF { + return nil, 0, EINVAL + } + sa.raw.Family = AF_INET + p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) + p[0] = byte(sa.Port >> 8) + p[1] = byte(sa.Port) + for i := 0; i < len(sa.Addr); i++ { + sa.raw.Addr[i] = sa.Addr[i] + } + return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil +} + +func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) { + if sa.Port < 0 || sa.Port > 0xFFFF { + return nil, 0, EINVAL + } + sa.raw.Family = AF_INET6 + p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) + p[0] = byte(sa.Port >> 8) + p[1] = byte(sa.Port) + sa.raw.Scope_id = sa.ZoneId + for i := 0; i < len(sa.Addr); i++ { + sa.raw.Addr[i] = sa.Addr[i] + } + return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil +} + +func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) { + name := sa.Name + n := len(name) + if n >= len(sa.raw.Path) { + return nil, 0, EINVAL + } + sa.raw.Family = AF_UNIX + for i := 0; i < n; i++ { + sa.raw.Path[i] = int8(name[i]) + } + // length is family (uint16), name, NUL. + sl := _Socklen(2) + if n > 0 { + sl += _Socklen(n) + 1 + } + if sa.raw.Path[0] == '@' { + sa.raw.Path[0] = 0 + // Don't count trailing NUL for abstract address. + sl-- + } + + return unsafe.Pointer(&sa.raw), sl, nil +} + +type SockaddrLinklayer struct { + Protocol uint16 + Ifindex int + Hatype uint16 + Pkttype uint8 + Halen uint8 + Addr [8]byte + raw RawSockaddrLinklayer +} + +func (sa *SockaddrLinklayer) sockaddr() (unsafe.Pointer, _Socklen, error) { + if sa.Ifindex < 0 || sa.Ifindex > 0x7fffffff { + return nil, 0, EINVAL + } + sa.raw.Family = AF_PACKET + sa.raw.Protocol = sa.Protocol + sa.raw.Ifindex = int32(sa.Ifindex) + sa.raw.Hatype = sa.Hatype + sa.raw.Pkttype = sa.Pkttype + sa.raw.Halen = sa.Halen + for i := 0; i < len(sa.Addr); i++ { + sa.raw.Addr[i] = sa.Addr[i] + } + return unsafe.Pointer(&sa.raw), SizeofSockaddrLinklayer, nil +} + +type SockaddrNetlink struct { + Family uint16 + Pad uint16 + Pid uint32 + Groups uint32 + raw RawSockaddrNetlink +} + +func (sa *SockaddrNetlink) sockaddr() (unsafe.Pointer, _Socklen, error) { + sa.raw.Family = AF_NETLINK + sa.raw.Pad = sa.Pad + sa.raw.Pid = sa.Pid + sa.raw.Groups = sa.Groups + return unsafe.Pointer(&sa.raw), SizeofSockaddrNetlink, nil +} + +func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) { + switch rsa.Addr.Family { + case AF_NETLINK: + pp := (*RawSockaddrNetlink)(unsafe.Pointer(rsa)) + sa := new(SockaddrNetlink) + sa.Family = pp.Family + sa.Pad = pp.Pad + sa.Pid = pp.Pid + sa.Groups = pp.Groups + return sa, nil + + case AF_PACKET: + pp := (*RawSockaddrLinklayer)(unsafe.Pointer(rsa)) + sa := new(SockaddrLinklayer) + sa.Protocol = pp.Protocol + sa.Ifindex = int(pp.Ifindex) + sa.Hatype = pp.Hatype + sa.Pkttype = pp.Pkttype + sa.Halen = pp.Halen + for i := 0; i < len(sa.Addr); i++ { + sa.Addr[i] = pp.Addr[i] + } + return sa, nil + + case AF_UNIX: + pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa)) + sa := new(SockaddrUnix) + if pp.Path[0] == 0 { + // "Abstract" Unix domain socket. + // Rewrite leading NUL as @ for textual display. + // (This is the standard convention.) + // Not friendly to overwrite in place, + // but the callers below don't care. + pp.Path[0] = '@' + } + + // Assume path ends at NUL. + // This is not technically the Linux semantics for + // abstract Unix domain sockets--they are supposed + // to be uninterpreted fixed-size binary blobs--but + // everyone uses this convention. + n := 0 + for n < len(pp.Path) && pp.Path[n] != 0 { + n++ + } + bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n] + sa.Name = string(bytes) + return sa, nil + + case AF_INET: + pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa)) + sa := new(SockaddrInet4) + p := (*[2]byte)(unsafe.Pointer(&pp.Port)) + sa.Port = int(p[0])<<8 + int(p[1]) + for i := 0; i < len(sa.Addr); i++ { + sa.Addr[i] = pp.Addr[i] + } + return sa, nil + + case AF_INET6: + pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa)) + sa := new(SockaddrInet6) + p := (*[2]byte)(unsafe.Pointer(&pp.Port)) + sa.Port = int(p[0])<<8 + int(p[1]) + sa.ZoneId = pp.Scope_id + for i := 0; i < len(sa.Addr); i++ { + sa.Addr[i] = pp.Addr[i] + } + return sa, nil + } + return nil, EAFNOSUPPORT +} + +func Accept(fd int) (nfd int, sa Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + nfd, err = accept(fd, &rsa, &len) + if err != nil { + return + } + sa, err = anyToSockaddr(&rsa) + if err != nil { + Close(nfd) + nfd = 0 + } + return +} + +func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + nfd, err = accept4(fd, &rsa, &len, flags) + if err != nil { + return + } + if len > SizeofSockaddrAny { + panic("RawSockaddrAny too small") + } + sa, err = anyToSockaddr(&rsa) + if err != nil { + Close(nfd) + nfd = 0 + } + return +} + +func Getsockname(fd int) (sa Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + if err = getsockname(fd, &rsa, &len); err != nil { + return + } + return anyToSockaddr(&rsa) +} + +func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) { + vallen := _Socklen(4) + err = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen) + return value, err +} + +func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) { + var value IPMreq + vallen := _Socklen(SizeofIPMreq) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, err +} + +func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) { + var value IPMreqn + vallen := _Socklen(SizeofIPMreqn) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, err +} + +func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) { + var value IPv6Mreq + vallen := _Socklen(SizeofIPv6Mreq) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, err +} + +func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) { + var value IPv6MTUInfo + vallen := _Socklen(SizeofIPv6MTUInfo) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, err +} + +func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) { + var value ICMPv6Filter + vallen := _Socklen(SizeofICMPv6Filter) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, err +} + +func GetsockoptUcred(fd, level, opt int) (*Ucred, error) { + var value Ucred + vallen := _Socklen(SizeofUcred) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, err +} + +func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq)) +} + +func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { + var msg Msghdr + var rsa RawSockaddrAny + msg.Name = (*byte)(unsafe.Pointer(&rsa)) + msg.Namelen = uint32(SizeofSockaddrAny) + var iov Iovec + if len(p) > 0 { + iov.Base = (*byte)(unsafe.Pointer(&p[0])) + iov.SetLen(len(p)) + } + var dummy byte + if len(oob) > 0 { + // receive at least one normal byte + if len(p) == 0 { + iov.Base = &dummy + iov.SetLen(1) + } + msg.Control = (*byte)(unsafe.Pointer(&oob[0])) + msg.SetControllen(len(oob)) + } + msg.Iov = &iov + msg.Iovlen = 1 + if n, err = recvmsg(fd, &msg, flags); err != nil { + return + } + oobn = int(msg.Controllen) + recvflags = int(msg.Flags) + // source address is only specified if the socket is unconnected + if rsa.Addr.Family != AF_UNSPEC { + from, err = anyToSockaddr(&rsa) + } + return +} + +func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) { + _, err = SendmsgN(fd, p, oob, to, flags) + return +} + +func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) { + var ptr unsafe.Pointer + var salen _Socklen + if to != nil { + var err error + ptr, salen, err = to.sockaddr() + if err != nil { + return 0, err + } + } + var msg Msghdr + msg.Name = (*byte)(unsafe.Pointer(ptr)) + msg.Namelen = uint32(salen) + var iov Iovec + if len(p) > 0 { + iov.Base = (*byte)(unsafe.Pointer(&p[0])) + iov.SetLen(len(p)) + } + var dummy byte + if len(oob) > 0 { + // send at least one normal byte + if len(p) == 0 { + iov.Base = &dummy + iov.SetLen(1) + } + msg.Control = (*byte)(unsafe.Pointer(&oob[0])) + msg.SetControllen(len(oob)) + } + msg.Iov = &iov + msg.Iovlen = 1 + if n, err = sendmsg(fd, &msg, flags); err != nil { + return 0, err + } + if len(oob) > 0 && len(p) == 0 { + n = 0 + } + return n, nil +} + +// BindToDevice binds the socket associated with fd to device. +func BindToDevice(fd int, device string) (err error) { + return SetsockoptString(fd, SOL_SOCKET, SO_BINDTODEVICE, device) +} + +//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error) + +func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, err error) { + // The peek requests are machine-size oriented, so we wrap it + // to retrieve arbitrary-length data. + + // The ptrace syscall differs from glibc's ptrace. + // Peeks returns the word in *data, not as the return value. + + var buf [sizeofPtr]byte + + // Leading edge. PEEKTEXT/PEEKDATA don't require aligned + // access (PEEKUSER warns that it might), but if we don't + // align our reads, we might straddle an unmapped page + // boundary and not get the bytes leading up to the page + // boundary. + n := 0 + if addr%sizeofPtr != 0 { + err = ptrace(req, pid, addr-addr%sizeofPtr, uintptr(unsafe.Pointer(&buf[0]))) + if err != nil { + return 0, err + } + n += copy(out, buf[addr%sizeofPtr:]) + out = out[n:] + } + + // Remainder. + for len(out) > 0 { + // We use an internal buffer to guarantee alignment. + // It's not documented if this is necessary, but we're paranoid. + err = ptrace(req, pid, addr+uintptr(n), uintptr(unsafe.Pointer(&buf[0]))) + if err != nil { + return n, err + } + copied := copy(out, buf[0:]) + n += copied + out = out[copied:] + } + + return n, nil +} + +func PtracePeekText(pid int, addr uintptr, out []byte) (count int, err error) { + return ptracePeek(PTRACE_PEEKTEXT, pid, addr, out) +} + +func PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) { + return ptracePeek(PTRACE_PEEKDATA, pid, addr, out) +} + +func ptracePoke(pokeReq int, peekReq int, pid int, addr uintptr, data []byte) (count int, err error) { + // As for ptracePeek, we need to align our accesses to deal + // with the possibility of straddling an invalid page. + + // Leading edge. + n := 0 + if addr%sizeofPtr != 0 { + var buf [sizeofPtr]byte + err = ptrace(peekReq, pid, addr-addr%sizeofPtr, uintptr(unsafe.Pointer(&buf[0]))) + if err != nil { + return 0, err + } + n += copy(buf[addr%sizeofPtr:], data) + word := *((*uintptr)(unsafe.Pointer(&buf[0]))) + err = ptrace(pokeReq, pid, addr-addr%sizeofPtr, word) + if err != nil { + return 0, err + } + data = data[n:] + } + + // Interior. + for len(data) > sizeofPtr { + word := *((*uintptr)(unsafe.Pointer(&data[0]))) + err = ptrace(pokeReq, pid, addr+uintptr(n), word) + if err != nil { + return n, err + } + n += sizeofPtr + data = data[sizeofPtr:] + } + + // Trailing edge. + if len(data) > 0 { + var buf [sizeofPtr]byte + err = ptrace(peekReq, pid, addr+uintptr(n), uintptr(unsafe.Pointer(&buf[0]))) + if err != nil { + return n, err + } + copy(buf[0:], data) + word := *((*uintptr)(unsafe.Pointer(&buf[0]))) + err = ptrace(pokeReq, pid, addr+uintptr(n), word) + if err != nil { + return n, err + } + n += len(data) + } + + return n, nil +} + +func PtracePokeText(pid int, addr uintptr, data []byte) (count int, err error) { + return ptracePoke(PTRACE_POKETEXT, PTRACE_PEEKTEXT, pid, addr, data) +} + +func PtracePokeData(pid int, addr uintptr, data []byte) (count int, err error) { + return ptracePoke(PTRACE_POKEDATA, PTRACE_PEEKDATA, pid, addr, data) +} + +func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) { + return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) +} + +func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) { + return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) +} + +func PtraceSetOptions(pid int, options int) (err error) { + return ptrace(PTRACE_SETOPTIONS, pid, 0, uintptr(options)) +} + +func PtraceGetEventMsg(pid int) (msg uint, err error) { + var data _C_long + err = ptrace(PTRACE_GETEVENTMSG, pid, 0, uintptr(unsafe.Pointer(&data))) + msg = uint(data) + return +} + +func PtraceCont(pid int, signal int) (err error) { + return ptrace(PTRACE_CONT, pid, 0, uintptr(signal)) +} + +func PtraceSyscall(pid int, signal int) (err error) { + return ptrace(PTRACE_SYSCALL, pid, 0, uintptr(signal)) +} + +func PtraceSingleStep(pid int) (err error) { return ptrace(PTRACE_SINGLESTEP, pid, 0, 0) } + +func PtraceAttach(pid int) (err error) { return ptrace(PTRACE_ATTACH, pid, 0, 0) } + +func PtraceDetach(pid int) (err error) { return ptrace(PTRACE_DETACH, pid, 0, 0) } + +//sys reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) + +func Reboot(cmd int) (err error) { + return reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, cmd, "") +} + +func clen(n []byte) int { + for i := 0; i < len(n); i++ { + if n[i] == 0 { + return i + } + } + return len(n) +} + +func ReadDirent(fd int, buf []byte) (n int, err error) { + return Getdents(fd, buf) +} + +func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { + origlen := len(buf) + count = 0 + for max != 0 && len(buf) > 0 { + dirent := (*Dirent)(unsafe.Pointer(&buf[0])) + buf = buf[dirent.Reclen:] + if dirent.Ino == 0 { // File absent in directory. + continue + } + bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0])) + var name = string(bytes[0:clen(bytes[:])]) + if name == "." || name == ".." { // Useless names + continue + } + max-- + count++ + names = append(names, name) + } + return origlen - len(buf), count, names +} + +//sys mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) + +func Mount(source string, target string, fstype string, flags uintptr, data string) (err error) { + // Certain file systems get rather angry and EINVAL if you give + // them an empty string of data, rather than NULL. + if data == "" { + return mount(source, target, fstype, flags, nil) + } + datap, err := BytePtrFromString(data) + if err != nil { + return err + } + return mount(source, target, fstype, flags, datap) +} + +// Sendto +// Recvfrom +// Socketpair + +/* + * Direct access + */ +//sys Acct(path string) (err error) +//sys Adjtimex(buf *Timex) (state int, err error) +//sys Chdir(path string) (err error) +//sys Chroot(path string) (err error) +//sys ClockGettime(clockid int32, time *Timespec) (err error) +//sys Close(fd int) (err error) +//sys Dup(oldfd int) (fd int, err error) +//sys Dup3(oldfd int, newfd int, flags int) (err error) +//sysnb EpollCreate(size int) (fd int, err error) +//sysnb EpollCreate1(flag int) (fd int, err error) +//sysnb EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) +//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) +//sys Exit(code int) = SYS_EXIT_GROUP +//sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error) +//sys Fallocate(fd int, mode uint32, off int64, len int64) (err error) +//sys Fchdir(fd int) (err error) +//sys Fchmod(fd int, mode uint32) (err error) +//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) +//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) +//sys fcntl(fd int, cmd int, arg int) (val int, err error) +//sys Fdatasync(fd int) (err error) +//sys Flock(fd int, how int) (err error) +//sys Fsync(fd int) (err error) +//sys Getdents(fd int, buf []byte) (n int, err error) = SYS_GETDENTS64 +//sysnb Getpgid(pid int) (pgid int, err error) + +func Getpgrp() (pid int) { + pid, _ = Getpgid(0) + return +} + +//sysnb Getpid() (pid int) +//sysnb Getppid() (ppid int) +//sys Getpriority(which int, who int) (prio int, err error) +//sysnb Getrusage(who int, rusage *Rusage) (err error) +//sysnb Gettid() (tid int) +//sys Getxattr(path string, attr string, dest []byte) (sz int, err error) +//sys InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) +//sysnb InotifyInit1(flags int) (fd int, err error) +//sysnb InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) +//sysnb Kill(pid int, sig syscall.Signal) (err error) +//sys Klogctl(typ int, buf []byte) (n int, err error) = SYS_SYSLOG +//sys Listxattr(path string, dest []byte) (sz int, err error) +//sys Mkdirat(dirfd int, path string, mode uint32) (err error) +//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error) +//sys Nanosleep(time *Timespec, leftover *Timespec) (err error) +//sys Pause() (err error) +//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT +//sysnb prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) = SYS_PRLIMIT64 +//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) +//sys read(fd int, p []byte) (n int, err error) +//sys Removexattr(path string, attr string) (err error) +//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) +//sys Setdomainname(p []byte) (err error) +//sys Sethostname(p []byte) (err error) +//sysnb Setpgid(pid int, pgid int) (err error) +//sysnb Setsid() (pid int, err error) +//sysnb Settimeofday(tv *Timeval) (err error) + +// issue 1435. +// On linux Setuid and Setgid only affects the current thread, not the process. +// This does not match what most callers expect so we must return an error +// here rather than letting the caller think that the call succeeded. + +func Setuid(uid int) (err error) { + return EOPNOTSUPP +} + +func Setgid(uid int) (err error) { + return EOPNOTSUPP +} + +//sys Setpriority(which int, who int, prio int) (err error) +//sys Setxattr(path string, attr string, data []byte, flags int) (err error) +//sys Sync() +//sysnb Sysinfo(info *Sysinfo_t) (err error) +//sys Tee(rfd int, wfd int, len int, flags int) (n int64, err error) +//sysnb Tgkill(tgid int, tid int, sig syscall.Signal) (err error) +//sysnb Times(tms *Tms) (ticks uintptr, err error) +//sysnb Umask(mask int) (oldmask int) +//sysnb Uname(buf *Utsname) (err error) +//sys Unmount(target string, flags int) (err error) = SYS_UMOUNT2 +//sys Unshare(flags int) (err error) +//sys Ustat(dev int, ubuf *Ustat_t) (err error) +//sys Utime(path string, buf *Utimbuf) (err error) +//sys write(fd int, p []byte) (n int, err error) +//sys exitThread(code int) (err error) = SYS_EXIT +//sys readlen(fd int, p *byte, np int) (n int, err error) = SYS_READ +//sys writelen(fd int, p *byte, np int) (n int, err error) = SYS_WRITE + +// mmap varies by architecture; see syscall_linux_*.go. +//sys munmap(addr uintptr, length uintptr) (err error) + +var mapper = &mmapper{ + active: make(map[*byte][]byte), + mmap: mmap, + munmap: munmap, +} + +func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { + return mapper.Mmap(fd, offset, length, prot, flags) +} + +func Munmap(b []byte) (err error) { + return mapper.Munmap(b) +} + +//sys Madvise(b []byte, advice int) (err error) +//sys Mprotect(b []byte, prot int) (err error) +//sys Mlock(b []byte) (err error) +//sys Munlock(b []byte) (err error) +//sys Mlockall(flags int) (err error) +//sys Munlockall() (err error) + +/* + * Unimplemented + */ +// AddKey +// AfsSyscall +// Alarm +// ArchPrctl +// Brk +// Capget +// Capset +// ClockGetres +// ClockNanosleep +// ClockSettime +// Clone +// CreateModule +// DeleteModule +// EpollCtlOld +// EpollPwait +// EpollWaitOld +// Eventfd +// Execve +// Fgetxattr +// Flistxattr +// Fork +// Fremovexattr +// Fsetxattr +// Futex +// GetKernelSyms +// GetMempolicy +// GetRobustList +// GetThreadArea +// Getitimer +// Getpmsg +// IoCancel +// IoDestroy +// IoGetevents +// IoSetup +// IoSubmit +// Ioctl +// IoprioGet +// IoprioSet +// KexecLoad +// Keyctl +// Lgetxattr +// Llistxattr +// LookupDcookie +// Lremovexattr +// Lsetxattr +// Mbind +// MigratePages +// Mincore +// ModifyLdt +// Mount +// MovePages +// Mprotect +// MqGetsetattr +// MqNotify +// MqOpen +// MqTimedreceive +// MqTimedsend +// MqUnlink +// Mremap +// Msgctl +// Msgget +// Msgrcv +// Msgsnd +// Msync +// Newfstatat +// Nfsservctl +// Personality +// Poll +// Ppoll +// Pselect6 +// Ptrace +// Putpmsg +// QueryModule +// Quotactl +// Readahead +// Readv +// RemapFilePages +// RequestKey +// RestartSyscall +// RtSigaction +// RtSigpending +// RtSigprocmask +// RtSigqueueinfo +// RtSigreturn +// RtSigsuspend +// RtSigtimedwait +// SchedGetPriorityMax +// SchedGetPriorityMin +// SchedGetaffinity +// SchedGetparam +// SchedGetscheduler +// SchedRrGetInterval +// SchedSetaffinity +// SchedSetparam +// SchedYield +// Security +// Semctl +// Semget +// Semop +// Semtimedop +// SetMempolicy +// SetRobustList +// SetThreadArea +// SetTidAddress +// Shmat +// Shmctl +// Shmdt +// Shmget +// Sigaltstack +// Signalfd +// Swapoff +// Swapon +// Sysfs +// TimerCreate +// TimerDelete +// TimerGetoverrun +// TimerGettime +// TimerSettime +// Timerfd +// Tkill (obsolete) +// Tuxcall +// Umount2 +// Uselib +// Utimensat +// Vfork +// Vhangup +// Vmsplice +// Vserver +// Waitid +// _Sysctl diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_386.go new file mode 100644 index 0000000..7171219 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_linux_386.go @@ -0,0 +1,388 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP) +// so that go vet can check that they are correct. + +// +build 386,linux + +package unix + +import ( + "syscall" + "unsafe" +) + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = int32(nsec / 1e9) + ts.Nsec = int32(nsec % 1e9) + return +} + +func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Sec = int32(nsec / 1e9) + tv.Usec = int32(nsec % 1e9 / 1e3) + return +} + +//sysnb pipe(p *[2]_C_int) (err error) + +func Pipe(p []int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe(&pp) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +//sysnb pipe2(p *[2]_C_int, flags int) (err error) + +func Pipe2(p []int, flags int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe2(&pp, flags) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +// 64-bit file system and 32-bit uid calls +// (386 default is 32-bit file system and 16-bit uid). +//sys Dup2(oldfd int, newfd int) (err error) +//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64 +//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32 +//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64 +//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64 +//sysnb Getegid() (egid int) = SYS_GETEGID32 +//sysnb Geteuid() (euid int) = SYS_GETEUID32 +//sysnb Getgid() (gid int) = SYS_GETGID32 +//sysnb Getuid() (uid int) = SYS_GETUID32 +//sysnb InotifyInit() (fd int, err error) +//sys Ioperm(from int, num int, on int) (err error) +//sys Iopl(level int) (err error) +//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32 +//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64 +//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 +//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64 +//sys Setfsgid(gid int) (err error) = SYS_SETFSGID32 +//sys Setfsuid(uid int) (err error) = SYS_SETFSUID32 +//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32 +//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32 +//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32 +//sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID32 +//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) +//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64 +//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) +//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64 +//sysnb getgroups(n int, list *_Gid_t) (nn int, err error) = SYS_GETGROUPS32 +//sysnb setgroups(n int, list *_Gid_t) (err error) = SYS_SETGROUPS32 +//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT + +//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) + +func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { + page := uintptr(offset / 4096) + if offset != int64(page)*4096 { + return 0, EINVAL + } + return mmap2(addr, length, prot, flags, fd, page) +} + +type rlimit32 struct { + Cur uint32 + Max uint32 +} + +//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT + +const rlimInf32 = ^uint32(0) +const rlimInf64 = ^uint64(0) + +func Getrlimit(resource int, rlim *Rlimit) (err error) { + err = prlimit(0, resource, nil, rlim) + if err != ENOSYS { + return err + } + + rl := rlimit32{} + err = getrlimit(resource, &rl) + if err != nil { + return + } + + if rl.Cur == rlimInf32 { + rlim.Cur = rlimInf64 + } else { + rlim.Cur = uint64(rl.Cur) + } + + if rl.Max == rlimInf32 { + rlim.Max = rlimInf64 + } else { + rlim.Max = uint64(rl.Max) + } + return +} + +//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT + +func Setrlimit(resource int, rlim *Rlimit) (err error) { + err = prlimit(0, resource, rlim, nil) + if err != ENOSYS { + return err + } + + rl := rlimit32{} + if rlim.Cur == rlimInf64 { + rl.Cur = rlimInf32 + } else if rlim.Cur < uint64(rlimInf32) { + rl.Cur = uint32(rlim.Cur) + } else { + return EINVAL + } + if rlim.Max == rlimInf64 { + rl.Max = rlimInf32 + } else if rlim.Max < uint64(rlimInf32) { + rl.Max = uint32(rlim.Max) + } else { + return EINVAL + } + + return setrlimit(resource, &rl) +} + +// Underlying system call writes to newoffset via pointer. +// Implemented in assembly to avoid allocation. +func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + newoffset, errno := seek(fd, offset, whence) + if errno != 0 { + return 0, errno + } + return newoffset, nil +} + +// Vsyscalls on amd64. +//sysnb Gettimeofday(tv *Timeval) (err error) +//sysnb Time(t *Time_t) (tt Time_t, err error) + +// On x86 Linux, all the socket calls go through an extra indirection, +// I think because the 5-register system call interface can't handle +// the 6-argument calls like sendto and recvfrom. Instead the +// arguments to the underlying system call are the number below +// and a pointer to an array of uintptr. We hide the pointer in the +// socketcall assembly to avoid allocation on every system call. + +const ( + // see linux/net.h + _SOCKET = 1 + _BIND = 2 + _CONNECT = 3 + _LISTEN = 4 + _ACCEPT = 5 + _GETSOCKNAME = 6 + _GETPEERNAME = 7 + _SOCKETPAIR = 8 + _SEND = 9 + _RECV = 10 + _SENDTO = 11 + _RECVFROM = 12 + _SHUTDOWN = 13 + _SETSOCKOPT = 14 + _GETSOCKOPT = 15 + _SENDMSG = 16 + _RECVMSG = 17 + _ACCEPT4 = 18 + _RECVMMSG = 19 + _SENDMMSG = 20 +) + +func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) +func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + fd, e := socketcall(_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0) + if e != 0 { + err = e + } + return +} + +func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { + fd, e := socketcall(_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) + if e != 0 { + err = e + } + return +} + +func getsockname(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, e := rawsocketcall(_GETSOCKNAME, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0) + if e != 0 { + err = e + } + return +} + +func getpeername(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, e := rawsocketcall(_GETPEERNAME, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0) + if e != 0 { + err = e + } + return +} + +func socketpair(domain int, typ int, flags int, fd *[2]int32) (err error) { + _, e := rawsocketcall(_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd)), 0, 0) + if e != 0 { + err = e + } + return +} + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, e := socketcall(_BIND, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0) + if e != 0 { + err = e + } + return +} + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, e := socketcall(_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0) + if e != 0 { + err = e + } + return +} + +func socket(domain int, typ int, proto int) (fd int, err error) { + fd, e := rawsocketcall(_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0) + if e != 0 { + err = e + } + return +} + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, e := socketcall(_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e != 0 { + err = e + } + return +} + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, e := socketcall(_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), vallen, 0) + if e != 0 { + err = e + } + return +} + +func recvfrom(s int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var base uintptr + if len(p) > 0 { + base = uintptr(unsafe.Pointer(&p[0])) + } + n, e := socketcall(_RECVFROM, uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + if e != 0 { + err = e + } + return +} + +func sendto(s int, p []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var base uintptr + if len(p) > 0 { + base = uintptr(unsafe.Pointer(&p[0])) + } + _, e := socketcall(_SENDTO, uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e != 0 { + err = e + } + return +} + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + n, e := socketcall(_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0) + if e != 0 { + err = e + } + return +} + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + n, e := socketcall(_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0) + if e != 0 { + err = e + } + return +} + +func Listen(s int, n int) (err error) { + _, e := socketcall(_LISTEN, uintptr(s), uintptr(n), 0, 0, 0, 0) + if e != 0 { + err = e + } + return +} + +func Shutdown(s, how int) (err error) { + _, e := socketcall(_SHUTDOWN, uintptr(s), uintptr(how), 0, 0, 0, 0) + if e != 0 { + err = e + } + return +} + +func Fstatfs(fd int, buf *Statfs_t) (err error) { + _, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf))) + if e != 0 { + err = e + } + return +} + +func Statfs(path string, buf *Statfs_t) (err error) { + pathp, err := BytePtrFromString(path) + if err != nil { + return err + } + _, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(pathp)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf))) + if e != 0 { + err = e + } + return +} + +func (r *PtraceRegs) PC() uint64 { return uint64(uint32(r.Eip)) } + +func (r *PtraceRegs) SetPC(pc uint64) { r.Eip = int32(pc) } + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint32(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go new file mode 100644 index 0000000..ae70c2a --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go @@ -0,0 +1,146 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build amd64,linux + +package unix + +import "syscall" + +//sys Dup2(oldfd int, newfd int) (err error) +//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 +//sys Fchown(fd int, uid int, gid int) (err error) +//sys Fstat(fd int, stat *Stat_t) (err error) +//sys Fstatfs(fd int, buf *Statfs_t) (err error) +//sys Ftruncate(fd int, length int64) (err error) +//sysnb Getegid() (egid int) +//sysnb Geteuid() (euid int) +//sysnb Getgid() (gid int) +//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) +//sysnb Getuid() (uid int) +//sysnb InotifyInit() (fd int, err error) +//sys Ioperm(from int, num int, on int) (err error) +//sys Iopl(level int) (err error) +//sys Lchown(path string, uid int, gid int) (err error) +//sys Listen(s int, n int) (err error) +//sys Lstat(path string, stat *Stat_t) (err error) +//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 +//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK +//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) +//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) +//sys Setfsgid(gid int) (err error) +//sys Setfsuid(uid int) (err error) +//sysnb Setregid(rgid int, egid int) (err error) +//sysnb Setresgid(rgid int, egid int, sgid int) (err error) +//sysnb Setresuid(ruid int, euid int, suid int) (err error) +//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) +//sysnb Setreuid(ruid int, euid int) (err error) +//sys Shutdown(fd int, how int) (err error) +//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) +//sys Stat(path string, stat *Stat_t) (err error) +//sys Statfs(path string, buf *Statfs_t) (err error) +//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) +//sys Truncate(path string, length int64) (err error) +//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) +//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) +//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) +//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) +//sysnb getgroups(n int, list *_Gid_t) (nn int, err error) +//sysnb setgroups(n int, list *_Gid_t) (err error) +//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) +//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) +//sysnb socket(domain int, typ int, proto int) (fd int, err error) +//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) +//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) +//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) +//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) +//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) +//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) +//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) +//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) + +//go:noescape +func gettimeofday(tv *Timeval) (err syscall.Errno) + +func Gettimeofday(tv *Timeval) (err error) { + errno := gettimeofday(tv) + if errno != 0 { + return errno + } + return nil +} + +func Getpagesize() int { return 4096 } + +func Time(t *Time_t) (tt Time_t, err error) { + var tv Timeval + errno := gettimeofday(&tv) + if errno != 0 { + return 0, errno + } + if t != nil { + *t = Time_t(tv.Sec) + } + return Time_t(tv.Sec), nil +} + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = nsec / 1e9 + ts.Nsec = nsec % 1e9 + return +} + +func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Sec = nsec / 1e9 + tv.Usec = nsec % 1e9 / 1e3 + return +} + +//sysnb pipe(p *[2]_C_int) (err error) + +func Pipe(p []int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe(&pp) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +//sysnb pipe2(p *[2]_C_int, flags int) (err error) + +func Pipe2(p []int, flags int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe2(&pp, flags) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +func (r *PtraceRegs) PC() uint64 { return r.Rip } + +func (r *PtraceRegs) SetPC(pc uint64) { r.Rip = pc } + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint64(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint64(length) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go new file mode 100644 index 0000000..abc41c3 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go @@ -0,0 +1,233 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build arm,linux + +package unix + +import ( + "syscall" + "unsafe" +) + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = int32(nsec / 1e9) + ts.Nsec = int32(nsec % 1e9) + return +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Sec = int32(nsec / 1e9) + tv.Usec = int32(nsec % 1e9 / 1e3) + return +} + +func Pipe(p []int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe2(&pp, 0) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +//sysnb pipe2(p *[2]_C_int, flags int) (err error) + +func Pipe2(p []int, flags int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe2(&pp, flags) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +// Underlying system call writes to newoffset via pointer. +// Implemented in assembly to avoid allocation. +func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + newoffset, errno := seek(fd, offset, whence) + if errno != 0 { + return 0, errno + } + return newoffset, nil +} + +//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) +//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) +//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) +//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) +//sysnb getgroups(n int, list *_Gid_t) (nn int, err error) = SYS_GETGROUPS32 +//sysnb setgroups(n int, list *_Gid_t) (err error) = SYS_SETGROUPS32 +//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) +//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) +//sysnb socket(domain int, typ int, proto int) (fd int, err error) +//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) +//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) +//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) +//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) +//sysnb socketpair(domain int, typ int, flags int, fd *[2]int32) (err error) +//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) +//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) + +// 64-bit file system and 32-bit uid calls +// (16-bit uid calls are not always supported in newer kernels) +//sys Dup2(oldfd int, newfd int) (err error) +//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32 +//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64 +//sysnb Getegid() (egid int) = SYS_GETEGID32 +//sysnb Geteuid() (euid int) = SYS_GETEUID32 +//sysnb Getgid() (gid int) = SYS_GETGID32 +//sysnb Getuid() (uid int) = SYS_GETUID32 +//sysnb InotifyInit() (fd int, err error) +//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32 +//sys Listen(s int, n int) (err error) +//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64 +//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64 +//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT +//sys Setfsgid(gid int) (err error) = SYS_SETFSGID32 +//sys Setfsuid(uid int) (err error) = SYS_SETFSUID32 +//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32 +//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32 +//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32 +//sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID32 +//sys Shutdown(fd int, how int) (err error) +//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) +//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64 + +// Vsyscalls on amd64. +//sysnb Gettimeofday(tv *Timeval) (err error) +//sysnb Time(t *Time_t) (tt Time_t, err error) + +//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 +//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64 +//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64 + +func Fadvise(fd int, offset int64, length int64, advice int) (err error) { + _, _, e1 := Syscall6(SYS_ARM_FADVISE64_64, uintptr(fd), uintptr(advice), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) + +func Fstatfs(fd int, buf *Statfs_t) (err error) { + _, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf))) + if e != 0 { + err = e + } + return +} + +func Statfs(path string, buf *Statfs_t) (err error) { + pathp, err := BytePtrFromString(path) + if err != nil { + return err + } + _, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(pathp)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf))) + if e != 0 { + err = e + } + return +} + +func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { + page := uintptr(offset / 4096) + if offset != int64(page)*4096 { + return 0, EINVAL + } + return mmap2(addr, length, prot, flags, fd, page) +} + +type rlimit32 struct { + Cur uint32 + Max uint32 +} + +//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT + +const rlimInf32 = ^uint32(0) +const rlimInf64 = ^uint64(0) + +func Getrlimit(resource int, rlim *Rlimit) (err error) { + err = prlimit(0, resource, nil, rlim) + if err != ENOSYS { + return err + } + + rl := rlimit32{} + err = getrlimit(resource, &rl) + if err != nil { + return + } + + if rl.Cur == rlimInf32 { + rlim.Cur = rlimInf64 + } else { + rlim.Cur = uint64(rl.Cur) + } + + if rl.Max == rlimInf32 { + rlim.Max = rlimInf64 + } else { + rlim.Max = uint64(rl.Max) + } + return +} + +//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT + +func Setrlimit(resource int, rlim *Rlimit) (err error) { + err = prlimit(0, resource, rlim, nil) + if err != ENOSYS { + return err + } + + rl := rlimit32{} + if rlim.Cur == rlimInf64 { + rl.Cur = rlimInf32 + } else if rlim.Cur < uint64(rlimInf32) { + rl.Cur = uint32(rlim.Cur) + } else { + return EINVAL + } + if rlim.Max == rlimInf64 { + rl.Max = rlimInf32 + } else if rlim.Max < uint64(rlimInf32) { + rl.Max = uint32(rlim.Max) + } else { + return EINVAL + } + + return setrlimit(resource, &rl) +} + +func (r *PtraceRegs) PC() uint64 { return uint64(r.Uregs[15]) } + +func (r *PtraceRegs) SetPC(pc uint64) { r.Uregs[15] = uint32(pc) } + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint32(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go new file mode 100644 index 0000000..f3d72df --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go @@ -0,0 +1,150 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build arm64,linux + +package unix + +const _SYS_dup = SYS_DUP3 + +//sys Fchown(fd int, uid int, gid int) (err error) +//sys Fstat(fd int, stat *Stat_t) (err error) +//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) +//sys Fstatfs(fd int, buf *Statfs_t) (err error) +//sys Ftruncate(fd int, length int64) (err error) +//sysnb Getegid() (egid int) +//sysnb Geteuid() (euid int) +//sysnb Getgid() (gid int) +//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) +//sysnb Getuid() (uid int) +//sys Listen(s int, n int) (err error) +//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 +//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK +//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS_PSELECT6 +//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) +//sys Setfsgid(gid int) (err error) +//sys Setfsuid(uid int) (err error) +//sysnb Setregid(rgid int, egid int) (err error) +//sysnb Setresgid(rgid int, egid int, sgid int) (err error) +//sysnb Setresuid(ruid int, euid int, suid int) (err error) +//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) +//sysnb Setreuid(ruid int, euid int) (err error) +//sys Shutdown(fd int, how int) (err error) +//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) + +func Stat(path string, stat *Stat_t) (err error) { + return Fstatat(AT_FDCWD, path, stat, 0) +} + +func Lchown(path string, uid int, gid int) (err error) { + return Fchownat(AT_FDCWD, path, uid, gid, AT_SYMLINK_NOFOLLOW) +} + +func Lstat(path string, stat *Stat_t) (err error) { + return Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW) +} + +//sys Statfs(path string, buf *Statfs_t) (err error) +//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) +//sys Truncate(path string, length int64) (err error) +//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) +//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) +//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) +//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) +//sysnb getgroups(n int, list *_Gid_t) (nn int, err error) +//sysnb setgroups(n int, list *_Gid_t) (err error) +//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) +//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) +//sysnb socket(domain int, typ int, proto int) (fd int, err error) +//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) +//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) +//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) +//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) +//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) +//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) +//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) +//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) + +func Getpagesize() int { return 65536 } + +//sysnb Gettimeofday(tv *Timeval) (err error) +//sysnb Time(t *Time_t) (tt Time_t, err error) + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = nsec / 1e9 + ts.Nsec = nsec % 1e9 + return +} + +func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Sec = nsec / 1e9 + tv.Usec = nsec % 1e9 / 1e3 + return +} + +func Pipe(p []int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe2(&pp, 0) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +//sysnb pipe2(p *[2]_C_int, flags int) (err error) + +func Pipe2(p []int, flags int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe2(&pp, flags) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +func (r *PtraceRegs) PC() uint64 { return r.Pc } + +func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc } + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint64(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint64(length) +} + +func InotifyInit() (fd int, err error) { + return InotifyInit1(0) +} + +// TODO(dfc): constants that should be in zsysnum_linux_arm64.go, remove +// these when the deprecated syscalls that the syscall package relies on +// are removed. +const ( + SYS_GETPGRP = 1060 + SYS_UTIMES = 1037 + SYS_FUTIMESAT = 1066 + SYS_PAUSE = 1061 + SYS_USTAT = 1070 + SYS_UTIME = 1063 + SYS_LCHOWN = 1032 + SYS_TIME = 1062 + SYS_EPOLL_CREATE = 1042 + SYS_EPOLL_WAIT = 1069 +) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go new file mode 100644 index 0000000..67eed63 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go @@ -0,0 +1,96 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build linux +// +build ppc64 ppc64le + +package unix + +//sys Fchown(fd int, uid int, gid int) (err error) +//sys Fstat(fd int, stat *Stat_t) (err error) +//sys Fstatfs(fd int, buf *Statfs_t) (err error) +//sys Ftruncate(fd int, length int64) (err error) +//sysnb Getegid() (egid int) +//sysnb Geteuid() (euid int) +//sysnb Getgid() (gid int) +//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = SYS_UGETRLIMIT +//sysnb Getuid() (uid int) +//sys Ioperm(from int, num int, on int) (err error) +//sys Iopl(level int) (err error) +//sys Lchown(path string, uid int, gid int) (err error) +//sys Listen(s int, n int) (err error) +//sys Lstat(path string, stat *Stat_t) (err error) +//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 +//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK +//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) +//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) +//sys Setfsgid(gid int) (err error) +//sys Setfsuid(uid int) (err error) +//sysnb Setregid(rgid int, egid int) (err error) +//sysnb Setresgid(rgid int, egid int, sgid int) (err error) +//sysnb Setresuid(ruid int, euid int, suid int) (err error) +//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) +//sysnb Setreuid(ruid int, euid int) (err error) +//sys Shutdown(fd int, how int) (err error) +//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) +//sys Stat(path string, stat *Stat_t) (err error) +//sys Statfs(path string, buf *Statfs_t) (err error) +//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) = SYS_SYNC_FILE_RANGE2 +//sys Truncate(path string, length int64) (err error) +//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) +//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) +//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) +//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) +//sysnb getgroups(n int, list *_Gid_t) (nn int, err error) +//sysnb setgroups(n int, list *_Gid_t) (err error) +//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) +//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) +//sysnb socket(domain int, typ int, proto int) (fd int, err error) +//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) +//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) +//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) +//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) +//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) +//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) +//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) +//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) + +func Getpagesize() int { return 65536 } + +//sysnb Gettimeofday(tv *Timeval) (err error) +//sysnb Time(t *Time_t) (tt Time_t, err error) + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = nsec / 1e9 + ts.Nsec = nsec % 1e9 + return +} + +func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Sec = nsec / 1e9 + tv.Usec = nsec % 1e9 / 1e3 + return +} + +func (r *PtraceRegs) PC() uint64 { return r.Nip } + +func (r *PtraceRegs) SetPC(pc uint64) { r.Nip = pc } + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint64(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint64(length) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/vendor/golang.org/x/sys/unix/syscall_netbsd.go new file mode 100644 index 0000000..c4e945c --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd.go @@ -0,0 +1,492 @@ +// Copyright 2009,2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// NetBSD system calls. +// This file is compiled as ordinary Go code, +// but it is also input to mksyscall, +// which parses the //sys lines and generates system call stubs. +// Note that sometimes we use a lowercase //sys name and wrap +// it in our own nicer implementation, either here or in +// syscall_bsd.go or syscall_unix.go. + +package unix + +import ( + "syscall" + "unsafe" +) + +type SockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [12]int8 + raw RawSockaddrDatalink +} + +func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) + +func sysctlNodes(mib []_C_int) (nodes []Sysctlnode, err error) { + var olen uintptr + + // Get a list of all sysctl nodes below the given MIB by performing + // a sysctl for the given MIB with CTL_QUERY appended. + mib = append(mib, CTL_QUERY) + qnode := Sysctlnode{Flags: SYSCTL_VERS_1} + qp := (*byte)(unsafe.Pointer(&qnode)) + sz := unsafe.Sizeof(qnode) + if err = sysctl(mib, nil, &olen, qp, sz); err != nil { + return nil, err + } + + // Now that we know the size, get the actual nodes. + nodes = make([]Sysctlnode, olen/sz) + np := (*byte)(unsafe.Pointer(&nodes[0])) + if err = sysctl(mib, np, &olen, qp, sz); err != nil { + return nil, err + } + + return nodes, nil +} + +func nametomib(name string) (mib []_C_int, err error) { + + // Split name into components. + var parts []string + last := 0 + for i := 0; i < len(name); i++ { + if name[i] == '.' { + parts = append(parts, name[last:i]) + last = i + 1 + } + } + parts = append(parts, name[last:]) + + // Discover the nodes and construct the MIB OID. + for partno, part := range parts { + nodes, err := sysctlNodes(mib) + if err != nil { + return nil, err + } + for _, node := range nodes { + n := make([]byte, 0) + for i := range node.Name { + if node.Name[i] != 0 { + n = append(n, byte(node.Name[i])) + } + } + if string(n) == part { + mib = append(mib, _C_int(node.Num)) + break + } + } + if len(mib) != partno+1 { + return nil, EINVAL + } + } + + return mib, nil +} + +// ParseDirent parses up to max directory entries in buf, +// appending the names to names. It returns the number +// bytes consumed from buf, the number of entries added +// to names, and the new names slice. +func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { + origlen := len(buf) + for max != 0 && len(buf) > 0 { + dirent := (*Dirent)(unsafe.Pointer(&buf[0])) + if dirent.Reclen == 0 { + buf = nil + break + } + buf = buf[dirent.Reclen:] + if dirent.Fileno == 0 { // File absent in directory. + continue + } + bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0])) + var name = string(bytes[0:dirent.Namlen]) + if name == "." || name == ".." { // Useless names + continue + } + max-- + count++ + names = append(names, name) + } + return origlen - len(buf), count, names +} + +//sysnb pipe() (fd1 int, fd2 int, err error) +func Pipe(p []int) (err error) { + if len(p) != 2 { + return EINVAL + } + p[0], p[1], err = pipe() + return +} + +//sys getdents(fd int, buf []byte) (n int, err error) +func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + return getdents(fd, buf) +} + +// TODO +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + return -1, ENOSYS +} + +/* + * Exposed directly + */ +//sys Access(path string, mode uint32) (err error) +//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error) +//sys Chdir(path string) (err error) +//sys Chflags(path string, flags int) (err error) +//sys Chmod(path string, mode uint32) (err error) +//sys Chown(path string, uid int, gid int) (err error) +//sys Chroot(path string) (err error) +//sys Close(fd int) (err error) +//sys Dup(fd int) (nfd int, err error) +//sys Dup2(from int, to int) (err error) +//sys Exit(code int) +//sys Fchdir(fd int) (err error) +//sys Fchflags(fd int, flags int) (err error) +//sys Fchmod(fd int, mode uint32) (err error) +//sys Fchown(fd int, uid int, gid int) (err error) +//sys Flock(fd int, how int) (err error) +//sys Fpathconf(fd int, name int) (val int, err error) +//sys Fstat(fd int, stat *Stat_t) (err error) +//sys Fsync(fd int) (err error) +//sys Ftruncate(fd int, length int64) (err error) +//sysnb Getegid() (egid int) +//sysnb Geteuid() (uid int) +//sysnb Getgid() (gid int) +//sysnb Getpgid(pid int) (pgid int, err error) +//sysnb Getpgrp() (pgrp int) +//sysnb Getpid() (pid int) +//sysnb Getppid() (ppid int) +//sys Getpriority(which int, who int) (prio int, err error) +//sysnb Getrlimit(which int, lim *Rlimit) (err error) +//sysnb Getrusage(who int, rusage *Rusage) (err error) +//sysnb Getsid(pid int) (sid int, err error) +//sysnb Gettimeofday(tv *Timeval) (err error) +//sysnb Getuid() (uid int) +//sys Issetugid() (tainted bool) +//sys Kill(pid int, signum syscall.Signal) (err error) +//sys Kqueue() (fd int, err error) +//sys Lchown(path string, uid int, gid int) (err error) +//sys Link(path string, link string) (err error) +//sys Listen(s int, backlog int) (err error) +//sys Lstat(path string, stat *Stat_t) (err error) +//sys Mkdir(path string, mode uint32) (err error) +//sys Mkfifo(path string, mode uint32) (err error) +//sys Mknod(path string, mode uint32, dev int) (err error) +//sys Mlock(b []byte) (err error) +//sys Mlockall(flags int) (err error) +//sys Mprotect(b []byte, prot int) (err error) +//sys Munlock(b []byte) (err error) +//sys Munlockall() (err error) +//sys Nanosleep(time *Timespec, leftover *Timespec) (err error) +//sys Open(path string, mode int, perm uint32) (fd int, err error) +//sys Pathconf(path string, name int) (val int, err error) +//sys Pread(fd int, p []byte, offset int64) (n int, err error) +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) +//sys read(fd int, p []byte) (n int, err error) +//sys Readlink(path string, buf []byte) (n int, err error) +//sys Rename(from string, to string) (err error) +//sys Revoke(path string) (err error) +//sys Rmdir(path string) (err error) +//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK +//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) +//sysnb Setegid(egid int) (err error) +//sysnb Seteuid(euid int) (err error) +//sysnb Setgid(gid int) (err error) +//sysnb Setpgid(pid int, pgid int) (err error) +//sys Setpriority(which int, who int, prio int) (err error) +//sysnb Setregid(rgid int, egid int) (err error) +//sysnb Setreuid(ruid int, euid int) (err error) +//sysnb Setrlimit(which int, lim *Rlimit) (err error) +//sysnb Setsid() (pid int, err error) +//sysnb Settimeofday(tp *Timeval) (err error) +//sysnb Setuid(uid int) (err error) +//sys Stat(path string, stat *Stat_t) (err error) +//sys Symlink(path string, link string) (err error) +//sys Sync() (err error) +//sys Truncate(path string, length int64) (err error) +//sys Umask(newmask int) (oldmask int) +//sys Unlink(path string) (err error) +//sys Unmount(path string, flags int) (err error) +//sys write(fd int, p []byte) (n int, err error) +//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) +//sys munmap(addr uintptr, length uintptr) (err error) +//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ +//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE + +/* + * Unimplemented + */ +// ____semctl13 +// __clone +// __fhopen40 +// __fhstat40 +// __fhstatvfs140 +// __fstat30 +// __getcwd +// __getfh30 +// __getlogin +// __lstat30 +// __mount50 +// __msgctl13 +// __msync13 +// __ntp_gettime30 +// __posix_chown +// __posix_fadvise50 +// __posix_fchown +// __posix_lchown +// __posix_rename +// __setlogin +// __shmctl13 +// __sigaction_sigtramp +// __sigaltstack14 +// __sigpending14 +// __sigprocmask14 +// __sigsuspend14 +// __sigtimedwait +// __stat30 +// __syscall +// __vfork14 +// _ksem_close +// _ksem_destroy +// _ksem_getvalue +// _ksem_init +// _ksem_open +// _ksem_post +// _ksem_trywait +// _ksem_unlink +// _ksem_wait +// _lwp_continue +// _lwp_create +// _lwp_ctl +// _lwp_detach +// _lwp_exit +// _lwp_getname +// _lwp_getprivate +// _lwp_kill +// _lwp_park +// _lwp_self +// _lwp_setname +// _lwp_setprivate +// _lwp_suspend +// _lwp_unpark +// _lwp_unpark_all +// _lwp_wait +// _lwp_wakeup +// _pset_bind +// _sched_getaffinity +// _sched_getparam +// _sched_setaffinity +// _sched_setparam +// acct +// aio_cancel +// aio_error +// aio_fsync +// aio_read +// aio_return +// aio_suspend +// aio_write +// break +// clock_getres +// clock_gettime +// clock_settime +// compat_09_ogetdomainname +// compat_09_osetdomainname +// compat_09_ouname +// compat_10_omsgsys +// compat_10_osemsys +// compat_10_oshmsys +// compat_12_fstat12 +// compat_12_getdirentries +// compat_12_lstat12 +// compat_12_msync +// compat_12_oreboot +// compat_12_oswapon +// compat_12_stat12 +// compat_13_sigaction13 +// compat_13_sigaltstack13 +// compat_13_sigpending13 +// compat_13_sigprocmask13 +// compat_13_sigreturn13 +// compat_13_sigsuspend13 +// compat_14___semctl +// compat_14_msgctl +// compat_14_shmctl +// compat_16___sigaction14 +// compat_16___sigreturn14 +// compat_20_fhstatfs +// compat_20_fstatfs +// compat_20_getfsstat +// compat_20_statfs +// compat_30___fhstat30 +// compat_30___fstat13 +// compat_30___lstat13 +// compat_30___stat13 +// compat_30_fhopen +// compat_30_fhstat +// compat_30_fhstatvfs1 +// compat_30_getdents +// compat_30_getfh +// compat_30_ntp_gettime +// compat_30_socket +// compat_40_mount +// compat_43_fstat43 +// compat_43_lstat43 +// compat_43_oaccept +// compat_43_ocreat +// compat_43_oftruncate +// compat_43_ogetdirentries +// compat_43_ogetdtablesize +// compat_43_ogethostid +// compat_43_ogethostname +// compat_43_ogetkerninfo +// compat_43_ogetpagesize +// compat_43_ogetpeername +// compat_43_ogetrlimit +// compat_43_ogetsockname +// compat_43_okillpg +// compat_43_olseek +// compat_43_ommap +// compat_43_oquota +// compat_43_orecv +// compat_43_orecvfrom +// compat_43_orecvmsg +// compat_43_osend +// compat_43_osendmsg +// compat_43_osethostid +// compat_43_osethostname +// compat_43_osetrlimit +// compat_43_osigblock +// compat_43_osigsetmask +// compat_43_osigstack +// compat_43_osigvec +// compat_43_otruncate +// compat_43_owait +// compat_43_stat43 +// execve +// extattr_delete_fd +// extattr_delete_file +// extattr_delete_link +// extattr_get_fd +// extattr_get_file +// extattr_get_link +// extattr_list_fd +// extattr_list_file +// extattr_list_link +// extattr_set_fd +// extattr_set_file +// extattr_set_link +// extattrctl +// fchroot +// fdatasync +// fgetxattr +// fktrace +// flistxattr +// fork +// fremovexattr +// fsetxattr +// fstatvfs1 +// fsync_range +// getcontext +// getitimer +// getvfsstat +// getxattr +// ioctl +// ktrace +// lchflags +// lchmod +// lfs_bmapv +// lfs_markv +// lfs_segclean +// lfs_segwait +// lgetxattr +// lio_listio +// listxattr +// llistxattr +// lremovexattr +// lseek +// lsetxattr +// lutimes +// madvise +// mincore +// minherit +// modctl +// mq_close +// mq_getattr +// mq_notify +// mq_open +// mq_receive +// mq_send +// mq_setattr +// mq_timedreceive +// mq_timedsend +// mq_unlink +// mremap +// msgget +// msgrcv +// msgsnd +// nfssvc +// ntp_adjtime +// pmc_control +// pmc_get_info +// poll +// pollts +// preadv +// profil +// pselect +// pset_assign +// pset_create +// pset_destroy +// ptrace +// pwritev +// quotactl +// rasctl +// readv +// reboot +// removexattr +// sa_enable +// sa_preempt +// sa_register +// sa_setconcurrency +// sa_stacks +// sa_yield +// sbrk +// sched_yield +// semconfig +// semget +// semop +// setcontext +// setitimer +// setxattr +// shmat +// shmdt +// shmget +// sstk +// statvfs1 +// swapctl +// sysarch +// syscall +// timer_create +// timer_delete +// timer_getoverrun +// timer_gettime +// timer_settime +// undelete +// utrace +// uuidgen +// vadvise +// vfork +// writev diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go new file mode 100644 index 0000000..1b0e1af --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go @@ -0,0 +1,44 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build 386,netbsd + +package unix + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = int64(nsec / 1e9) + ts.Nsec = int32(nsec % 1e9) + return +} + +func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = int32(nsec % 1e9 / 1e3) + tv.Sec = int64(nsec / 1e9) + return +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint32(fd) + k.Filter = uint32(mode) + k.Flags = uint32(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint32(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go new file mode 100644 index 0000000..1b6dcbe --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go @@ -0,0 +1,44 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build amd64,netbsd + +package unix + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = int64(nsec / 1e9) + ts.Nsec = int64(nsec % 1e9) + return +} + +func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = int32(nsec % 1e9 / 1e3) + tv.Sec = int64(nsec / 1e9) + return +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint64(fd) + k.Filter = uint32(mode) + k.Flags = uint32(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go new file mode 100644 index 0000000..87d1d6f --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go @@ -0,0 +1,44 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build arm,netbsd + +package unix + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = int64(nsec / 1e9) + ts.Nsec = int32(nsec % 1e9) + return +} + +func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = int32(nsec % 1e9 / 1e3) + tv.Sec = int64(nsec / 1e9) + return +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint32(fd) + k.Filter = uint32(mode) + k.Flags = uint32(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint32(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_no_getwd.go b/vendor/golang.org/x/sys/unix/syscall_no_getwd.go new file mode 100644 index 0000000..530792e --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_no_getwd.go @@ -0,0 +1,11 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build dragonfly freebsd netbsd openbsd + +package unix + +const ImplementsGetwd = false + +func Getwd() (string, error) { return "", ENOTSUP } diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go new file mode 100644 index 0000000..246131d --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go @@ -0,0 +1,303 @@ +// Copyright 2009,2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// OpenBSD system calls. +// This file is compiled as ordinary Go code, +// but it is also input to mksyscall, +// which parses the //sys lines and generates system call stubs. +// Note that sometimes we use a lowercase //sys name and wrap +// it in our own nicer implementation, either here or in +// syscall_bsd.go or syscall_unix.go. + +package unix + +import ( + "syscall" + "unsafe" +) + +type SockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [24]int8 + raw RawSockaddrDatalink +} + +func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) + +func nametomib(name string) (mib []_C_int, err error) { + + // Perform lookup via a binary search + left := 0 + right := len(sysctlMib) - 1 + for { + idx := left + (right-left)/2 + switch { + case name == sysctlMib[idx].ctlname: + return sysctlMib[idx].ctloid, nil + case name > sysctlMib[idx].ctlname: + left = idx + 1 + default: + right = idx - 1 + } + if left > right { + break + } + } + return nil, EINVAL +} + +// ParseDirent parses up to max directory entries in buf, +// appending the names to names. It returns the number +// bytes consumed from buf, the number of entries added +// to names, and the new names slice. +func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { + origlen := len(buf) + for max != 0 && len(buf) > 0 { + dirent := (*Dirent)(unsafe.Pointer(&buf[0])) + if dirent.Reclen == 0 { + buf = nil + break + } + buf = buf[dirent.Reclen:] + if dirent.Fileno == 0 { // File absent in directory. + continue + } + bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0])) + var name = string(bytes[0:dirent.Namlen]) + if name == "." || name == ".." { // Useless names + continue + } + max-- + count++ + names = append(names, name) + } + return origlen - len(buf), count, names +} + +//sysnb pipe(p *[2]_C_int) (err error) +func Pipe(p []int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe(&pp) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +//sys getdents(fd int, buf []byte) (n int, err error) +func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + return getdents(fd, buf) +} + +// TODO +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + return -1, ENOSYS +} + +func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { + var _p0 unsafe.Pointer + var bufsize uintptr + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf)) + } + r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +/* + * Exposed directly + */ +//sys Access(path string, mode uint32) (err error) +//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error) +//sys Chdir(path string) (err error) +//sys Chflags(path string, flags int) (err error) +//sys Chmod(path string, mode uint32) (err error) +//sys Chown(path string, uid int, gid int) (err error) +//sys Chroot(path string) (err error) +//sys Close(fd int) (err error) +//sys Dup(fd int) (nfd int, err error) +//sys Dup2(from int, to int) (err error) +//sys Exit(code int) +//sys Fchdir(fd int) (err error) +//sys Fchflags(fd int, flags int) (err error) +//sys Fchmod(fd int, mode uint32) (err error) +//sys Fchown(fd int, uid int, gid int) (err error) +//sys Flock(fd int, how int) (err error) +//sys Fpathconf(fd int, name int) (val int, err error) +//sys Fstat(fd int, stat *Stat_t) (err error) +//sys Fstatfs(fd int, stat *Statfs_t) (err error) +//sys Fsync(fd int) (err error) +//sys Ftruncate(fd int, length int64) (err error) +//sysnb Getegid() (egid int) +//sysnb Geteuid() (uid int) +//sysnb Getgid() (gid int) +//sysnb Getpgid(pid int) (pgid int, err error) +//sysnb Getpgrp() (pgrp int) +//sysnb Getpid() (pid int) +//sysnb Getppid() (ppid int) +//sys Getpriority(which int, who int) (prio int, err error) +//sysnb Getrlimit(which int, lim *Rlimit) (err error) +//sysnb Getrusage(who int, rusage *Rusage) (err error) +//sysnb Getsid(pid int) (sid int, err error) +//sysnb Gettimeofday(tv *Timeval) (err error) +//sysnb Getuid() (uid int) +//sys Issetugid() (tainted bool) +//sys Kill(pid int, signum syscall.Signal) (err error) +//sys Kqueue() (fd int, err error) +//sys Lchown(path string, uid int, gid int) (err error) +//sys Link(path string, link string) (err error) +//sys Listen(s int, backlog int) (err error) +//sys Lstat(path string, stat *Stat_t) (err error) +//sys Mkdir(path string, mode uint32) (err error) +//sys Mkfifo(path string, mode uint32) (err error) +//sys Mknod(path string, mode uint32, dev int) (err error) +//sys Mlock(b []byte) (err error) +//sys Mlockall(flags int) (err error) +//sys Mprotect(b []byte, prot int) (err error) +//sys Munlock(b []byte) (err error) +//sys Munlockall() (err error) +//sys Nanosleep(time *Timespec, leftover *Timespec) (err error) +//sys Open(path string, mode int, perm uint32) (fd int, err error) +//sys Pathconf(path string, name int) (val int, err error) +//sys Pread(fd int, p []byte, offset int64) (n int, err error) +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) +//sys read(fd int, p []byte) (n int, err error) +//sys Readlink(path string, buf []byte) (n int, err error) +//sys Rename(from string, to string) (err error) +//sys Revoke(path string) (err error) +//sys Rmdir(path string) (err error) +//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK +//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) +//sysnb Setegid(egid int) (err error) +//sysnb Seteuid(euid int) (err error) +//sysnb Setgid(gid int) (err error) +//sys Setlogin(name string) (err error) +//sysnb Setpgid(pid int, pgid int) (err error) +//sys Setpriority(which int, who int, prio int) (err error) +//sysnb Setregid(rgid int, egid int) (err error) +//sysnb Setreuid(ruid int, euid int) (err error) +//sysnb Setresgid(rgid int, egid int, sgid int) (err error) +//sysnb Setresuid(ruid int, euid int, suid int) (err error) +//sysnb Setrlimit(which int, lim *Rlimit) (err error) +//sysnb Setsid() (pid int, err error) +//sysnb Settimeofday(tp *Timeval) (err error) +//sysnb Setuid(uid int) (err error) +//sys Stat(path string, stat *Stat_t) (err error) +//sys Statfs(path string, stat *Statfs_t) (err error) +//sys Symlink(path string, link string) (err error) +//sys Sync() (err error) +//sys Truncate(path string, length int64) (err error) +//sys Umask(newmask int) (oldmask int) +//sys Unlink(path string) (err error) +//sys Unmount(path string, flags int) (err error) +//sys write(fd int, p []byte) (n int, err error) +//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) +//sys munmap(addr uintptr, length uintptr) (err error) +//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ +//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE + +/* + * Unimplemented + */ +// __getcwd +// __semctl +// __syscall +// __sysctl +// adjfreq +// break +// clock_getres +// clock_gettime +// clock_settime +// closefrom +// execve +// faccessat +// fchmodat +// fchownat +// fcntl +// fhopen +// fhstat +// fhstatfs +// fork +// fstatat +// futimens +// getfh +// getgid +// getitimer +// getlogin +// getresgid +// getresuid +// getrtable +// getthrid +// ioctl +// ktrace +// lfs_bmapv +// lfs_markv +// lfs_segclean +// lfs_segwait +// linkat +// mincore +// minherit +// mkdirat +// mkfifoat +// mknodat +// mount +// mquery +// msgctl +// msgget +// msgrcv +// msgsnd +// nfssvc +// nnpfspioctl +// openat +// poll +// preadv +// profil +// pwritev +// quotactl +// readlinkat +// readv +// reboot +// renameat +// rfork +// sched_yield +// semget +// semop +// setgroups +// setitimer +// setrtable +// setsockopt +// shmat +// shmctl +// shmdt +// shmget +// sigaction +// sigaltstack +// sigpending +// sigprocmask +// sigreturn +// sigsuspend +// symlinkat +// sysarch +// syscall +// threxit +// thrsigdivert +// thrsleep +// thrwakeup +// unlinkat +// utimensat +// vfork +// writev diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go new file mode 100644 index 0000000..9529b20 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go @@ -0,0 +1,44 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build 386,openbsd + +package unix + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = int64(nsec / 1e9) + ts.Nsec = int32(nsec % 1e9) + return +} + +func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = int32(nsec % 1e9 / 1e3) + tv.Sec = int64(nsec / 1e9) + return +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint32(fd) + k.Filter = int16(mode) + k.Flags = uint16(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint32(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go new file mode 100644 index 0000000..fc64029 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go @@ -0,0 +1,44 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build amd64,openbsd + +package unix + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = nsec / 1e9 + ts.Nsec = nsec % 1e9 + return +} + +func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = nsec % 1e9 / 1e3 + tv.Sec = nsec / 1e9 + return +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint64(fd) + k.Filter = int16(mode) + k.Flags = uint16(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go new file mode 100644 index 0000000..0083732 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go @@ -0,0 +1,713 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Solaris system calls. +// This file is compiled as ordinary Go code, +// but it is also input to mksyscall, +// which parses the //sys lines and generates system call stubs. +// Note that sometimes we use a lowercase //sys name and wrap +// it in our own nicer implementation, either here or in +// syscall_solaris.go or syscall_unix.go. + +package unix + +import ( + "sync/atomic" + "syscall" + "unsafe" +) + +// Implemented in runtime/syscall_solaris.go. +type syscallFunc uintptr + +func rawSysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) +func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) + +type SockaddrDatalink struct { + Family uint16 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [244]int8 + raw RawSockaddrDatalink +} + +func clen(n []byte) int { + for i := 0; i < len(n); i++ { + if n[i] == 0 { + return i + } + } + return len(n) +} + +// ParseDirent parses up to max directory entries in buf, +// appending the names to names. It returns the number +// bytes consumed from buf, the number of entries added +// to names, and the new names slice. +func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { + origlen := len(buf) + for max != 0 && len(buf) > 0 { + dirent := (*Dirent)(unsafe.Pointer(&buf[0])) + if dirent.Reclen == 0 { + buf = nil + break + } + buf = buf[dirent.Reclen:] + if dirent.Ino == 0 { // File absent in directory. + continue + } + bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0])) + var name = string(bytes[0:clen(bytes[:])]) + if name == "." || name == ".." { // Useless names + continue + } + max-- + count++ + names = append(names, name) + } + return origlen - len(buf), count, names +} + +func pipe() (r uintptr, w uintptr, err uintptr) + +func Pipe(p []int) (err error) { + if len(p) != 2 { + return EINVAL + } + r0, w0, e1 := pipe() + if e1 != 0 { + err = syscall.Errno(e1) + } + p[0], p[1] = int(r0), int(w0) + return +} + +func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) { + if sa.Port < 0 || sa.Port > 0xFFFF { + return nil, 0, EINVAL + } + sa.raw.Family = AF_INET + p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) + p[0] = byte(sa.Port >> 8) + p[1] = byte(sa.Port) + for i := 0; i < len(sa.Addr); i++ { + sa.raw.Addr[i] = sa.Addr[i] + } + return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil +} + +func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) { + if sa.Port < 0 || sa.Port > 0xFFFF { + return nil, 0, EINVAL + } + sa.raw.Family = AF_INET6 + p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) + p[0] = byte(sa.Port >> 8) + p[1] = byte(sa.Port) + sa.raw.Scope_id = sa.ZoneId + for i := 0; i < len(sa.Addr); i++ { + sa.raw.Addr[i] = sa.Addr[i] + } + return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil +} + +func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) { + name := sa.Name + n := len(name) + if n >= len(sa.raw.Path) { + return nil, 0, EINVAL + } + sa.raw.Family = AF_UNIX + for i := 0; i < n; i++ { + sa.raw.Path[i] = int8(name[i]) + } + // length is family (uint16), name, NUL. + sl := _Socklen(2) + if n > 0 { + sl += _Socklen(n) + 1 + } + if sa.raw.Path[0] == '@' { + sa.raw.Path[0] = 0 + // Don't count trailing NUL for abstract address. + sl-- + } + + return unsafe.Pointer(&sa.raw), sl, nil +} + +//sys getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = libsocket.getsockname + +func Getsockname(fd int) (sa Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + if err = getsockname(fd, &rsa, &len); err != nil { + return + } + return anyToSockaddr(&rsa) +} + +const ImplementsGetwd = true + +//sys Getcwd(buf []byte) (n int, err error) + +func Getwd() (wd string, err error) { + var buf [PathMax]byte + // Getcwd will return an error if it failed for any reason. + _, err = Getcwd(buf[0:]) + if err != nil { + return "", err + } + n := clen(buf[:]) + if n < 1 { + return "", EINVAL + } + return string(buf[:n]), nil +} + +/* + * Wrapped + */ + +//sysnb getgroups(ngid int, gid *_Gid_t) (n int, err error) +//sysnb setgroups(ngid int, gid *_Gid_t) (err error) + +func Getgroups() (gids []int, err error) { + n, err := getgroups(0, nil) + // Check for error and sanity check group count. Newer versions of + // Solaris allow up to 1024 (NGROUPS_MAX). + if n < 0 || n > 1024 { + if err != nil { + return nil, err + } + return nil, EINVAL + } else if n == 0 { + return nil, nil + } + + a := make([]_Gid_t, n) + n, err = getgroups(n, &a[0]) + if n == -1 { + return nil, err + } + gids = make([]int, n) + for i, v := range a[0:n] { + gids[i] = int(v) + } + return +} + +func Setgroups(gids []int) (err error) { + if len(gids) == 0 { + return setgroups(0, nil) + } + + a := make([]_Gid_t, len(gids)) + for i, v := range gids { + a[i] = _Gid_t(v) + } + return setgroups(len(a), &a[0]) +} + +func ReadDirent(fd int, buf []byte) (n int, err error) { + // Final argument is (basep *uintptr) and the syscall doesn't take nil. + // TODO(rsc): Can we use a single global basep for all calls? + return Getdents(fd, buf, new(uintptr)) +} + +// Wait status is 7 bits at bottom, either 0 (exited), +// 0x7F (stopped), or a signal number that caused an exit. +// The 0x80 bit is whether there was a core dump. +// An extra number (exit code, signal causing a stop) +// is in the high bits. + +type WaitStatus uint32 + +const ( + mask = 0x7F + core = 0x80 + shift = 8 + + exited = 0 + stopped = 0x7F +) + +func (w WaitStatus) Exited() bool { return w&mask == exited } + +func (w WaitStatus) ExitStatus() int { + if w&mask != exited { + return -1 + } + return int(w >> shift) +} + +func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != 0 } + +func (w WaitStatus) Signal() syscall.Signal { + sig := syscall.Signal(w & mask) + if sig == stopped || sig == 0 { + return -1 + } + return sig +} + +func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 } + +func (w WaitStatus) Stopped() bool { return w&mask == stopped && syscall.Signal(w>>shift) != SIGSTOP } + +func (w WaitStatus) Continued() bool { return w&mask == stopped && syscall.Signal(w>>shift) == SIGSTOP } + +func (w WaitStatus) StopSignal() syscall.Signal { + if !w.Stopped() { + return -1 + } + return syscall.Signal(w>>shift) & 0xFF +} + +func (w WaitStatus) TrapCause() int { return -1 } + +func wait4(pid uintptr, wstatus *WaitStatus, options uintptr, rusage *Rusage) (wpid uintptr, err uintptr) + +func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) { + r0, e1 := wait4(uintptr(pid), wstatus, uintptr(options), rusage) + if e1 != 0 { + err = syscall.Errno(e1) + } + return int(r0), err +} + +func gethostname() (name string, err uintptr) + +func Gethostname() (name string, err error) { + name, e1 := gethostname() + if e1 != 0 { + err = syscall.Errno(e1) + } + return name, err +} + +//sys utimes(path string, times *[2]Timeval) (err error) + +func Utimes(path string, tv []Timeval) (err error) { + if tv == nil { + return utimes(path, nil) + } + if len(tv) != 2 { + return EINVAL + } + return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) +} + +//sys utimensat(fd int, path string, times *[2]Timespec, flag int) (err error) + +func UtimesNano(path string, ts []Timespec) error { + if ts == nil { + return utimensat(AT_FDCWD, path, nil, 0) + } + if len(ts) != 2 { + return EINVAL + } + return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0) +} + +func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error { + if ts == nil { + return utimensat(dirfd, path, nil, flags) + } + if len(ts) != 2 { + return EINVAL + } + return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags) +} + +//sys fcntl(fd int, cmd int, arg int) (val int, err error) + +// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. +func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(unsafe.Pointer(lk)), 0, 0, 0) + if e1 != 0 { + return e1 + } + return nil +} + +//sys futimesat(fildes int, path *byte, times *[2]Timeval) (err error) + +func Futimesat(dirfd int, path string, tv []Timeval) error { + pathp, err := BytePtrFromString(path) + if err != nil { + return err + } + if tv == nil { + return futimesat(dirfd, pathp, nil) + } + if len(tv) != 2 { + return EINVAL + } + return futimesat(dirfd, pathp, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) +} + +// Solaris doesn't have an futimes function because it allows NULL to be +// specified as the path for futimesat. However, Go doesn't like +// NULL-style string interfaces, so this simple wrapper is provided. +func Futimes(fd int, tv []Timeval) error { + if tv == nil { + return futimesat(fd, nil, nil) + } + if len(tv) != 2 { + return EINVAL + } + return futimesat(fd, nil, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) +} + +func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) { + switch rsa.Addr.Family { + case AF_UNIX: + pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa)) + sa := new(SockaddrUnix) + // Assume path ends at NUL. + // This is not technically the Solaris semantics for + // abstract Unix domain sockets -- they are supposed + // to be uninterpreted fixed-size binary blobs -- but + // everyone uses this convention. + n := 0 + for n < len(pp.Path) && pp.Path[n] != 0 { + n++ + } + bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n] + sa.Name = string(bytes) + return sa, nil + + case AF_INET: + pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa)) + sa := new(SockaddrInet4) + p := (*[2]byte)(unsafe.Pointer(&pp.Port)) + sa.Port = int(p[0])<<8 + int(p[1]) + for i := 0; i < len(sa.Addr); i++ { + sa.Addr[i] = pp.Addr[i] + } + return sa, nil + + case AF_INET6: + pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa)) + sa := new(SockaddrInet6) + p := (*[2]byte)(unsafe.Pointer(&pp.Port)) + sa.Port = int(p[0])<<8 + int(p[1]) + sa.ZoneId = pp.Scope_id + for i := 0; i < len(sa.Addr); i++ { + sa.Addr[i] = pp.Addr[i] + } + return sa, nil + } + return nil, EAFNOSUPPORT +} + +//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) = libsocket.accept + +func Accept(fd int) (nfd int, sa Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + nfd, err = accept(fd, &rsa, &len) + if nfd == -1 { + return + } + sa, err = anyToSockaddr(&rsa) + if err != nil { + Close(nfd) + nfd = 0 + } + return +} + +//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.recvmsg + +func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { + var msg Msghdr + var rsa RawSockaddrAny + msg.Name = (*byte)(unsafe.Pointer(&rsa)) + msg.Namelen = uint32(SizeofSockaddrAny) + var iov Iovec + if len(p) > 0 { + iov.Base = (*int8)(unsafe.Pointer(&p[0])) + iov.SetLen(len(p)) + } + var dummy int8 + if len(oob) > 0 { + // receive at least one normal byte + if len(p) == 0 { + iov.Base = &dummy + iov.SetLen(1) + } + msg.Accrights = (*int8)(unsafe.Pointer(&oob[0])) + } + msg.Iov = &iov + msg.Iovlen = 1 + if n, err = recvmsg(fd, &msg, flags); n == -1 { + return + } + oobn = int(msg.Accrightslen) + // source address is only specified if the socket is unconnected + if rsa.Addr.Family != AF_UNSPEC { + from, err = anyToSockaddr(&rsa) + } + return +} + +func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) { + _, err = SendmsgN(fd, p, oob, to, flags) + return +} + +//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.sendmsg + +func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) { + var ptr unsafe.Pointer + var salen _Socklen + if to != nil { + ptr, salen, err = to.sockaddr() + if err != nil { + return 0, err + } + } + var msg Msghdr + msg.Name = (*byte)(unsafe.Pointer(ptr)) + msg.Namelen = uint32(salen) + var iov Iovec + if len(p) > 0 { + iov.Base = (*int8)(unsafe.Pointer(&p[0])) + iov.SetLen(len(p)) + } + var dummy int8 + if len(oob) > 0 { + // send at least one normal byte + if len(p) == 0 { + iov.Base = &dummy + iov.SetLen(1) + } + msg.Accrights = (*int8)(unsafe.Pointer(&oob[0])) + } + msg.Iov = &iov + msg.Iovlen = 1 + if n, err = sendmsg(fd, &msg, flags); err != nil { + return 0, err + } + if len(oob) > 0 && len(p) == 0 { + n = 0 + } + return n, nil +} + +//sys acct(path *byte) (err error) + +func Acct(path string) (err error) { + if len(path) == 0 { + // Assume caller wants to disable accounting. + return acct(nil) + } + + pathp, err := BytePtrFromString(path) + if err != nil { + return err + } + return acct(pathp) +} + +/* + * Expose the ioctl function + */ + +//sys ioctl(fd int, req int, arg uintptr) (err error) + +func IoctlSetInt(fd int, req int, value int) (err error) { + return ioctl(fd, req, uintptr(value)) +} + +func IoctlSetWinsize(fd int, req int, value *Winsize) (err error) { + return ioctl(fd, req, uintptr(unsafe.Pointer(value))) +} + +func IoctlSetTermios(fd int, req int, value *Termios) (err error) { + return ioctl(fd, req, uintptr(unsafe.Pointer(value))) +} + +func IoctlSetTermio(fd int, req int, value *Termio) (err error) { + return ioctl(fd, req, uintptr(unsafe.Pointer(value))) +} + +func IoctlGetInt(fd int, req int) (int, error) { + var value int + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return value, err +} + +func IoctlGetWinsize(fd int, req int) (*Winsize, error) { + var value Winsize + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return &value, err +} + +func IoctlGetTermios(fd int, req int) (*Termios, error) { + var value Termios + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return &value, err +} + +func IoctlGetTermio(fd int, req int) (*Termio, error) { + var value Termio + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return &value, err +} + +/* + * Exposed directly + */ +//sys Access(path string, mode uint32) (err error) +//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error) +//sys Chdir(path string) (err error) +//sys Chmod(path string, mode uint32) (err error) +//sys Chown(path string, uid int, gid int) (err error) +//sys Chroot(path string) (err error) +//sys Close(fd int) (err error) +//sys Creat(path string, mode uint32) (fd int, err error) +//sys Dup(fd int) (nfd int, err error) +//sys Dup2(oldfd int, newfd int) (err error) +//sys Exit(code int) +//sys Fchdir(fd int) (err error) +//sys Fchmod(fd int, mode uint32) (err error) +//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) +//sys Fchown(fd int, uid int, gid int) (err error) +//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) +//sys Fdatasync(fd int) (err error) +//sys Fpathconf(fd int, name int) (val int, err error) +//sys Fstat(fd int, stat *Stat_t) (err error) +//sys Getdents(fd int, buf []byte, basep *uintptr) (n int, err error) +//sysnb Getgid() (gid int) +//sysnb Getpid() (pid int) +//sysnb Getpgid(pid int) (pgid int, err error) +//sysnb Getpgrp() (pgid int, err error) +//sys Geteuid() (euid int) +//sys Getegid() (egid int) +//sys Getppid() (ppid int) +//sys Getpriority(which int, who int) (n int, err error) +//sysnb Getrlimit(which int, lim *Rlimit) (err error) +//sysnb Getrusage(who int, rusage *Rusage) (err error) +//sysnb Gettimeofday(tv *Timeval) (err error) +//sysnb Getuid() (uid int) +//sys Kill(pid int, signum syscall.Signal) (err error) +//sys Lchown(path string, uid int, gid int) (err error) +//sys Link(path string, link string) (err error) +//sys Listen(s int, backlog int) (err error) = libsocket.listen +//sys Lstat(path string, stat *Stat_t) (err error) +//sys Madvise(b []byte, advice int) (err error) +//sys Mkdir(path string, mode uint32) (err error) +//sys Mkdirat(dirfd int, path string, mode uint32) (err error) +//sys Mkfifo(path string, mode uint32) (err error) +//sys Mkfifoat(dirfd int, path string, mode uint32) (err error) +//sys Mknod(path string, mode uint32, dev int) (err error) +//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error) +//sys Mlock(b []byte) (err error) +//sys Mlockall(flags int) (err error) +//sys Mprotect(b []byte, prot int) (err error) +//sys Munlock(b []byte) (err error) +//sys Munlockall() (err error) +//sys Nanosleep(time *Timespec, leftover *Timespec) (err error) +//sys Open(path string, mode int, perm uint32) (fd int, err error) +//sys Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) +//sys Pathconf(path string, name int) (val int, err error) +//sys Pause() (err error) +//sys Pread(fd int, p []byte, offset int64) (n int, err error) +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) +//sys read(fd int, p []byte) (n int, err error) +//sys Readlink(path string, buf []byte) (n int, err error) +//sys Rename(from string, to string) (err error) +//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) +//sys Rmdir(path string) (err error) +//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = lseek +//sysnb Setegid(egid int) (err error) +//sysnb Seteuid(euid int) (err error) +//sysnb Setgid(gid int) (err error) +//sys Sethostname(p []byte) (err error) +//sysnb Setpgid(pid int, pgid int) (err error) +//sys Setpriority(which int, who int, prio int) (err error) +//sysnb Setregid(rgid int, egid int) (err error) +//sysnb Setreuid(ruid int, euid int) (err error) +//sysnb Setrlimit(which int, lim *Rlimit) (err error) +//sysnb Setsid() (pid int, err error) +//sysnb Setuid(uid int) (err error) +//sys Shutdown(s int, how int) (err error) = libsocket.shutdown +//sys Stat(path string, stat *Stat_t) (err error) +//sys Symlink(path string, link string) (err error) +//sys Sync() (err error) +//sysnb Times(tms *Tms) (ticks uintptr, err error) +//sys Truncate(path string, length int64) (err error) +//sys Fsync(fd int) (err error) +//sys Ftruncate(fd int, length int64) (err error) +//sys Umask(mask int) (oldmask int) +//sysnb Uname(buf *Utsname) (err error) +//sys Unmount(target string, flags int) (err error) = libc.umount +//sys Unlink(path string) (err error) +//sys Unlinkat(dirfd int, path string) (err error) +//sys Ustat(dev int, ubuf *Ustat_t) (err error) +//sys Utime(path string, buf *Utimbuf) (err error) +//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.bind +//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.connect +//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) +//sys munmap(addr uintptr, length uintptr) (err error) +//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.sendto +//sys socket(domain int, typ int, proto int) (fd int, err error) = libsocket.socket +//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) = libsocket.socketpair +//sys write(fd int, p []byte) (n int, err error) +//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) = libsocket.getsockopt +//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = libsocket.getpeername +//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) = libsocket.setsockopt +//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) = libsocket.recvfrom + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procread)), 3, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf), 0, 0, 0) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwrite)), 3, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf), 0, 0, 0) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +var mapper = &mmapper{ + active: make(map[*byte][]byte), + mmap: mmap, + munmap: munmap, +} + +func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { + return mapper.Mmap(fd, offset, length, prot, flags) +} + +func Munmap(b []byte) (err error) { + return mapper.Munmap(b) +} + +//sys sysconf(name int) (n int64, err error) + +// pageSize caches the value of Getpagesize, since it can't change +// once the system is booted. +var pageSize int64 // accessed atomically + +func Getpagesize() int { + n := atomic.LoadInt64(&pageSize) + if n == 0 { + n, _ = sysconf(_SC_PAGESIZE) + atomic.StoreInt64(&pageSize, n) + } + return int(n) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go new file mode 100644 index 0000000..2e44630 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go @@ -0,0 +1,37 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build amd64,solaris + +package unix + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = nsec / 1e9 + ts.Nsec = nsec % 1e9 + return +} + +func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = nsec % 1e9 / 1e3 + tv.Sec = int64(nsec / 1e9) + return +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + // TODO(aram): implement this, see issue 5847. + panic("unimplemented") +} diff --git a/vendor/golang.org/x/sys/unix/syscall_test.go b/vendor/golang.org/x/sys/unix/syscall_test.go new file mode 100644 index 0000000..95eac92 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_test.go @@ -0,0 +1,50 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package unix_test + +import ( + "fmt" + "testing" + + "golang.org/x/sys/unix" +) + +func testSetGetenv(t *testing.T, key, value string) { + err := unix.Setenv(key, value) + if err != nil { + t.Fatalf("Setenv failed to set %q: %v", value, err) + } + newvalue, found := unix.Getenv(key) + if !found { + t.Fatalf("Getenv failed to find %v variable (want value %q)", key, value) + } + if newvalue != value { + t.Fatalf("Getenv(%v) = %q; want %q", key, newvalue, value) + } +} + +func TestEnv(t *testing.T) { + testSetGetenv(t, "TESTENV", "AVALUE") + // make sure TESTENV gets set to "", not deleted + testSetGetenv(t, "TESTENV", "") +} + +func TestItoa(t *testing.T) { + // Make most negative integer: 0x8000... + i := 1 + for i<<1 != 0 { + i <<= 1 + } + if i >= 0 { + t.Fatal("bad math") + } + s := unix.Itoa(i) + f := fmt.Sprint(i) + if s != f { + t.Fatalf("itoa(%d) = %s, want %s", i, s, f) + } +} diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go new file mode 100644 index 0000000..b46b250 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_unix.go @@ -0,0 +1,297 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package unix + +import ( + "runtime" + "sync" + "syscall" + "unsafe" +) + +var ( + Stdin = 0 + Stdout = 1 + Stderr = 2 +) + +const ( + darwin64Bit = runtime.GOOS == "darwin" && sizeofPtr == 8 + dragonfly64Bit = runtime.GOOS == "dragonfly" && sizeofPtr == 8 + netbsd32Bit = runtime.GOOS == "netbsd" && sizeofPtr == 4 +) + +// Do the interface allocations only once for common +// Errno values. +var ( + errEAGAIN error = syscall.EAGAIN + errEINVAL error = syscall.EINVAL + errENOENT error = syscall.ENOENT +) + +// errnoErr returns common boxed Errno values, to prevent +// allocations at runtime. +func errnoErr(e syscall.Errno) error { + switch e { + case 0: + return nil + case EAGAIN: + return errEAGAIN + case EINVAL: + return errEINVAL + case ENOENT: + return errENOENT + } + return e +} + +func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) +func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) +func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) +func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) + +// Mmap manager, for use by operating system-specific implementations. + +type mmapper struct { + sync.Mutex + active map[*byte][]byte // active mappings; key is last byte in mapping + mmap func(addr, length uintptr, prot, flags, fd int, offset int64) (uintptr, error) + munmap func(addr uintptr, length uintptr) error +} + +func (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { + if length <= 0 { + return nil, EINVAL + } + + // Map the requested memory. + addr, errno := m.mmap(0, uintptr(length), prot, flags, fd, offset) + if errno != nil { + return nil, errno + } + + // Slice memory layout + var sl = struct { + addr uintptr + len int + cap int + }{addr, length, length} + + // Use unsafe to turn sl into a []byte. + b := *(*[]byte)(unsafe.Pointer(&sl)) + + // Register mapping in m and return it. + p := &b[cap(b)-1] + m.Lock() + defer m.Unlock() + m.active[p] = b + return b, nil +} + +func (m *mmapper) Munmap(data []byte) (err error) { + if len(data) == 0 || len(data) != cap(data) { + return EINVAL + } + + // Find the base of the mapping. + p := &data[cap(data)-1] + m.Lock() + defer m.Unlock() + b := m.active[p] + if b == nil || &b[0] != &data[0] { + return EINVAL + } + + // Unmap the memory and update m. + if errno := m.munmap(uintptr(unsafe.Pointer(&b[0])), uintptr(len(b))); errno != nil { + return errno + } + delete(m.active, p) + return nil +} + +func Read(fd int, p []byte) (n int, err error) { + n, err = read(fd, p) + if raceenabled { + if n > 0 { + raceWriteRange(unsafe.Pointer(&p[0]), n) + } + if err == nil { + raceAcquire(unsafe.Pointer(&ioSync)) + } + } + return +} + +func Write(fd int, p []byte) (n int, err error) { + if raceenabled { + raceReleaseMerge(unsafe.Pointer(&ioSync)) + } + n, err = write(fd, p) + if raceenabled && n > 0 { + raceReadRange(unsafe.Pointer(&p[0]), n) + } + return +} + +// For testing: clients can set this flag to force +// creation of IPv6 sockets to return EAFNOSUPPORT. +var SocketDisableIPv6 bool + +type Sockaddr interface { + sockaddr() (ptr unsafe.Pointer, len _Socklen, err error) // lowercase; only we can define Sockaddrs +} + +type SockaddrInet4 struct { + Port int + Addr [4]byte + raw RawSockaddrInet4 +} + +type SockaddrInet6 struct { + Port int + ZoneId uint32 + Addr [16]byte + raw RawSockaddrInet6 +} + +type SockaddrUnix struct { + Name string + raw RawSockaddrUnix +} + +func Bind(fd int, sa Sockaddr) (err error) { + ptr, n, err := sa.sockaddr() + if err != nil { + return err + } + return bind(fd, ptr, n) +} + +func Connect(fd int, sa Sockaddr) (err error) { + ptr, n, err := sa.sockaddr() + if err != nil { + return err + } + return connect(fd, ptr, n) +} + +func Getpeername(fd int) (sa Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + if err = getpeername(fd, &rsa, &len); err != nil { + return + } + return anyToSockaddr(&rsa) +} + +func GetsockoptInt(fd, level, opt int) (value int, err error) { + var n int32 + vallen := _Socklen(4) + err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen) + return int(n), err +} + +func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + if n, err = recvfrom(fd, p, flags, &rsa, &len); err != nil { + return + } + if rsa.Addr.Family != AF_UNSPEC { + from, err = anyToSockaddr(&rsa) + } + return +} + +func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) { + ptr, n, err := to.sockaddr() + if err != nil { + return err + } + return sendto(fd, p, flags, ptr, n) +} + +func SetsockoptByte(fd, level, opt int, value byte) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(&value), 1) +} + +func SetsockoptInt(fd, level, opt int, value int) (err error) { + var n = int32(value) + return setsockopt(fd, level, opt, unsafe.Pointer(&n), 4) +} + +func SetsockoptInet4Addr(fd, level, opt int, value [4]byte) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(&value[0]), 4) +} + +func SetsockoptIPMreq(fd, level, opt int, mreq *IPMreq) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(mreq), SizeofIPMreq) +} + +func SetsockoptIPv6Mreq(fd, level, opt int, mreq *IPv6Mreq) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(mreq), SizeofIPv6Mreq) +} + +func SetsockoptICMPv6Filter(fd, level, opt int, filter *ICMPv6Filter) error { + return setsockopt(fd, level, opt, unsafe.Pointer(filter), SizeofICMPv6Filter) +} + +func SetsockoptLinger(fd, level, opt int, l *Linger) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(l), SizeofLinger) +} + +func SetsockoptString(fd, level, opt int, s string) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(&[]byte(s)[0]), uintptr(len(s))) +} + +func SetsockoptTimeval(fd, level, opt int, tv *Timeval) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(tv), unsafe.Sizeof(*tv)) +} + +func Socket(domain, typ, proto int) (fd int, err error) { + if domain == AF_INET6 && SocketDisableIPv6 { + return -1, EAFNOSUPPORT + } + fd, err = socket(domain, typ, proto) + return +} + +func Socketpair(domain, typ, proto int) (fd [2]int, err error) { + var fdx [2]int32 + err = socketpair(domain, typ, proto, &fdx) + if err == nil { + fd[0] = int(fdx[0]) + fd[1] = int(fdx[1]) + } + return +} + +func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + if raceenabled { + raceReleaseMerge(unsafe.Pointer(&ioSync)) + } + return sendfile(outfd, infd, offset, count) +} + +var ioSync int64 + +func CloseOnExec(fd int) { fcntl(fd, F_SETFD, FD_CLOEXEC) } + +func SetNonblock(fd int, nonblocking bool) (err error) { + flag, err := fcntl(fd, F_GETFL, 0) + if err != nil { + return err + } + if nonblocking { + flag |= O_NONBLOCK + } else { + flag &= ^O_NONBLOCK + } + _, err = fcntl(fd, F_SETFL, flag) + return err +} diff --git a/vendor/golang.org/x/sys/unix/syscall_unix_test.go b/vendor/golang.org/x/sys/unix/syscall_unix_test.go new file mode 100644 index 0000000..bcc79d1 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_unix_test.go @@ -0,0 +1,318 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package unix_test + +import ( + "flag" + "fmt" + "io/ioutil" + "net" + "os" + "os/exec" + "path/filepath" + "runtime" + "testing" + "time" + + "golang.org/x/sys/unix" +) + +// Tests that below functions, structures and constants are consistent +// on all Unix-like systems. +func _() { + // program scheduling priority functions and constants + var ( + _ func(int, int, int) error = unix.Setpriority + _ func(int, int) (int, error) = unix.Getpriority + ) + const ( + _ int = unix.PRIO_USER + _ int = unix.PRIO_PROCESS + _ int = unix.PRIO_PGRP + ) + + // termios constants + const ( + _ int = unix.TCIFLUSH + _ int = unix.TCIOFLUSH + _ int = unix.TCOFLUSH + ) + + // fcntl file locking structure and constants + var ( + _ = unix.Flock_t{ + Type: int16(0), + Whence: int16(0), + Start: int64(0), + Len: int64(0), + Pid: int32(0), + } + ) + const ( + _ = unix.F_GETLK + _ = unix.F_SETLK + _ = unix.F_SETLKW + ) +} + +// TestFcntlFlock tests whether the file locking structure matches +// the calling convention of each kernel. +func TestFcntlFlock(t *testing.T) { + name := filepath.Join(os.TempDir(), "TestFcntlFlock") + fd, err := unix.Open(name, unix.O_CREAT|unix.O_RDWR|unix.O_CLOEXEC, 0) + if err != nil { + t.Fatalf("Open failed: %v", err) + } + defer unix.Unlink(name) + defer unix.Close(fd) + flock := unix.Flock_t{ + Type: unix.F_RDLCK, + Start: 0, Len: 0, Whence: 1, + } + if err := unix.FcntlFlock(uintptr(fd), unix.F_GETLK, &flock); err != nil { + t.Fatalf("FcntlFlock failed: %v", err) + } +} + +// TestPassFD tests passing a file descriptor over a Unix socket. +// +// This test involved both a parent and child process. The parent +// process is invoked as a normal test, with "go test", which then +// runs the child process by running the current test binary with args +// "-test.run=^TestPassFD$" and an environment variable used to signal +// that the test should become the child process instead. +func TestPassFD(t *testing.T) { + switch runtime.GOOS { + case "dragonfly": + // TODO(jsing): Figure out why sendmsg is returning EINVAL. + t.Skip("skipping test on dragonfly") + case "solaris": + // TODO(aram): Figure out why ReadMsgUnix is returning empty message. + t.Skip("skipping test on solaris, see issue 7402") + } + if os.Getenv("GO_WANT_HELPER_PROCESS") == "1" { + passFDChild() + return + } + + tempDir, err := ioutil.TempDir("", "TestPassFD") + if err != nil { + t.Fatal(err) + } + defer os.RemoveAll(tempDir) + + fds, err := unix.Socketpair(unix.AF_LOCAL, unix.SOCK_STREAM, 0) + if err != nil { + t.Fatalf("Socketpair: %v", err) + } + defer unix.Close(fds[0]) + defer unix.Close(fds[1]) + writeFile := os.NewFile(uintptr(fds[0]), "child-writes") + readFile := os.NewFile(uintptr(fds[1]), "parent-reads") + defer writeFile.Close() + defer readFile.Close() + + cmd := exec.Command(os.Args[0], "-test.run=^TestPassFD$", "--", tempDir) + cmd.Env = []string{"GO_WANT_HELPER_PROCESS=1"} + if lp := os.Getenv("LD_LIBRARY_PATH"); lp != "" { + cmd.Env = append(cmd.Env, "LD_LIBRARY_PATH="+lp) + } + cmd.ExtraFiles = []*os.File{writeFile} + + out, err := cmd.CombinedOutput() + if len(out) > 0 || err != nil { + t.Fatalf("child process: %q, %v", out, err) + } + + c, err := net.FileConn(readFile) + if err != nil { + t.Fatalf("FileConn: %v", err) + } + defer c.Close() + + uc, ok := c.(*net.UnixConn) + if !ok { + t.Fatalf("unexpected FileConn type; expected UnixConn, got %T", c) + } + + buf := make([]byte, 32) // expect 1 byte + oob := make([]byte, 32) // expect 24 bytes + closeUnix := time.AfterFunc(5*time.Second, func() { + t.Logf("timeout reading from unix socket") + uc.Close() + }) + _, oobn, _, _, err := uc.ReadMsgUnix(buf, oob) + closeUnix.Stop() + + scms, err := unix.ParseSocketControlMessage(oob[:oobn]) + if err != nil { + t.Fatalf("ParseSocketControlMessage: %v", err) + } + if len(scms) != 1 { + t.Fatalf("expected 1 SocketControlMessage; got scms = %#v", scms) + } + scm := scms[0] + gotFds, err := unix.ParseUnixRights(&scm) + if err != nil { + t.Fatalf("unix.ParseUnixRights: %v", err) + } + if len(gotFds) != 1 { + t.Fatalf("wanted 1 fd; got %#v", gotFds) + } + + f := os.NewFile(uintptr(gotFds[0]), "fd-from-child") + defer f.Close() + + got, err := ioutil.ReadAll(f) + want := "Hello from child process!\n" + if string(got) != want { + t.Errorf("child process ReadAll: %q, %v; want %q", got, err, want) + } +} + +// passFDChild is the child process used by TestPassFD. +func passFDChild() { + defer os.Exit(0) + + // Look for our fd. It should be fd 3, but we work around an fd leak + // bug here (http://golang.org/issue/2603) to let it be elsewhere. + var uc *net.UnixConn + for fd := uintptr(3); fd <= 10; fd++ { + f := os.NewFile(fd, "unix-conn") + var ok bool + netc, _ := net.FileConn(f) + uc, ok = netc.(*net.UnixConn) + if ok { + break + } + } + if uc == nil { + fmt.Println("failed to find unix fd") + return + } + + // Make a file f to send to our parent process on uc. + // We make it in tempDir, which our parent will clean up. + flag.Parse() + tempDir := flag.Arg(0) + f, err := ioutil.TempFile(tempDir, "") + if err != nil { + fmt.Printf("TempFile: %v", err) + return + } + + f.Write([]byte("Hello from child process!\n")) + f.Seek(0, 0) + + rights := unix.UnixRights(int(f.Fd())) + dummyByte := []byte("x") + n, oobn, err := uc.WriteMsgUnix(dummyByte, rights, nil) + if err != nil { + fmt.Printf("WriteMsgUnix: %v", err) + return + } + if n != 1 || oobn != len(rights) { + fmt.Printf("WriteMsgUnix = %d, %d; want 1, %d", n, oobn, len(rights)) + return + } +} + +// TestUnixRightsRoundtrip tests that UnixRights, ParseSocketControlMessage, +// and ParseUnixRights are able to successfully round-trip lists of file descriptors. +func TestUnixRightsRoundtrip(t *testing.T) { + testCases := [...][][]int{ + {{42}}, + {{1, 2}}, + {{3, 4, 5}}, + {{}}, + {{1, 2}, {3, 4, 5}, {}, {7}}, + } + for _, testCase := range testCases { + b := []byte{} + var n int + for _, fds := range testCase { + // Last assignment to n wins + n = len(b) + unix.CmsgLen(4*len(fds)) + b = append(b, unix.UnixRights(fds...)...) + } + // Truncate b + b = b[:n] + + scms, err := unix.ParseSocketControlMessage(b) + if err != nil { + t.Fatalf("ParseSocketControlMessage: %v", err) + } + if len(scms) != len(testCase) { + t.Fatalf("expected %v SocketControlMessage; got scms = %#v", len(testCase), scms) + } + for i, scm := range scms { + gotFds, err := unix.ParseUnixRights(&scm) + if err != nil { + t.Fatalf("ParseUnixRights: %v", err) + } + wantFds := testCase[i] + if len(gotFds) != len(wantFds) { + t.Fatalf("expected %v fds, got %#v", len(wantFds), gotFds) + } + for j, fd := range gotFds { + if fd != wantFds[j] { + t.Fatalf("expected fd %v, got %v", wantFds[j], fd) + } + } + } + } +} + +func TestRlimit(t *testing.T) { + var rlimit, zero unix.Rlimit + err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlimit) + if err != nil { + t.Fatalf("Getrlimit: save failed: %v", err) + } + if zero == rlimit { + t.Fatalf("Getrlimit: save failed: got zero value %#v", rlimit) + } + set := rlimit + set.Cur = set.Max - 1 + err = unix.Setrlimit(unix.RLIMIT_NOFILE, &set) + if err != nil { + t.Fatalf("Setrlimit: set failed: %#v %v", set, err) + } + var get unix.Rlimit + err = unix.Getrlimit(unix.RLIMIT_NOFILE, &get) + if err != nil { + t.Fatalf("Getrlimit: get failed: %v", err) + } + set = rlimit + set.Cur = set.Max - 1 + if set != get { + // Seems like Darwin requires some privilege to + // increase the soft limit of rlimit sandbox, though + // Setrlimit never reports an error. + switch runtime.GOOS { + case "darwin": + default: + t.Fatalf("Rlimit: change failed: wanted %#v got %#v", set, get) + } + } + err = unix.Setrlimit(unix.RLIMIT_NOFILE, &rlimit) + if err != nil { + t.Fatalf("Setrlimit: restore failed: %#v %v", rlimit, err) + } +} + +func TestSeekFailure(t *testing.T) { + _, err := unix.Seek(-1, 0, 0) + if err == nil { + t.Fatalf("Seek(-1, 0, 0) did not fail") + } + str := err.Error() // used to crash on Linux + t.Logf("Seek: %v", str) + if str == "" { + t.Fatalf("Seek(-1, 0, 0) return error with empty message") + } +} diff --git a/vendor/golang.org/x/sys/unix/types_darwin.go b/vendor/golang.org/x/sys/unix/types_darwin.go new file mode 100644 index 0000000..1153261 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/types_darwin.go @@ -0,0 +1,250 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +/* +Input to cgo -godefs. See also mkerrors.sh and mkall.sh +*/ + +// +godefs map struct_in_addr [4]byte /* in_addr */ +// +godefs map struct_in6_addr [16]byte /* in6_addr */ + +package unix + +/* +#define __DARWIN_UNIX03 0 +#define KERNEL +#define _DARWIN_USE_64_BIT_INODE +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum { + sizeofPtr = sizeof(void*), +}; + +union sockaddr_all { + struct sockaddr s1; // this one gets used for fields + struct sockaddr_in s2; // these pad it out + struct sockaddr_in6 s3; + struct sockaddr_un s4; + struct sockaddr_dl s5; +}; + +struct sockaddr_any { + struct sockaddr addr; + char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)]; +}; + +*/ +import "C" + +// Machine characteristics; for internal use. + +const ( + sizeofPtr = C.sizeofPtr + sizeofShort = C.sizeof_short + sizeofInt = C.sizeof_int + sizeofLong = C.sizeof_long + sizeofLongLong = C.sizeof_longlong +) + +// Basic types + +type ( + _C_short C.short + _C_int C.int + _C_long C.long + _C_long_long C.longlong +) + +// Time + +type Timespec C.struct_timespec + +type Timeval C.struct_timeval + +type Timeval32 C.struct_timeval32 + +// Processes + +type Rusage C.struct_rusage + +type Rlimit C.struct_rlimit + +type _Gid_t C.gid_t + +// Files + +type Stat_t C.struct_stat64 + +type Statfs_t C.struct_statfs64 + +type Flock_t C.struct_flock + +type Fstore_t C.struct_fstore + +type Radvisory_t C.struct_radvisory + +type Fbootstraptransfer_t C.struct_fbootstraptransfer + +type Log2phys_t C.struct_log2phys + +type Fsid C.struct_fsid + +type Dirent C.struct_dirent + +// Sockets + +type RawSockaddrInet4 C.struct_sockaddr_in + +type RawSockaddrInet6 C.struct_sockaddr_in6 + +type RawSockaddrUnix C.struct_sockaddr_un + +type RawSockaddrDatalink C.struct_sockaddr_dl + +type RawSockaddr C.struct_sockaddr + +type RawSockaddrAny C.struct_sockaddr_any + +type _Socklen C.socklen_t + +type Linger C.struct_linger + +type Iovec C.struct_iovec + +type IPMreq C.struct_ip_mreq + +type IPv6Mreq C.struct_ipv6_mreq + +type Msghdr C.struct_msghdr + +type Cmsghdr C.struct_cmsghdr + +type Inet4Pktinfo C.struct_in_pktinfo + +type Inet6Pktinfo C.struct_in6_pktinfo + +type IPv6MTUInfo C.struct_ip6_mtuinfo + +type ICMPv6Filter C.struct_icmp6_filter + +const ( + SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in + SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 + SizeofSockaddrAny = C.sizeof_struct_sockaddr_any + SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un + SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl + SizeofLinger = C.sizeof_struct_linger + SizeofIPMreq = C.sizeof_struct_ip_mreq + SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq + SizeofMsghdr = C.sizeof_struct_msghdr + SizeofCmsghdr = C.sizeof_struct_cmsghdr + SizeofInet4Pktinfo = C.sizeof_struct_in_pktinfo + SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo + SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo + SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter +) + +// Ptrace requests + +const ( + PTRACE_TRACEME = C.PT_TRACE_ME + PTRACE_CONT = C.PT_CONTINUE + PTRACE_KILL = C.PT_KILL +) + +// Events (kqueue, kevent) + +type Kevent_t C.struct_kevent + +// Select + +type FdSet C.fd_set + +// Routing and interface messages + +const ( + SizeofIfMsghdr = C.sizeof_struct_if_msghdr + SizeofIfData = C.sizeof_struct_if_data + SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr + SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr + SizeofIfmaMsghdr2 = C.sizeof_struct_ifma_msghdr2 + SizeofRtMsghdr = C.sizeof_struct_rt_msghdr + SizeofRtMetrics = C.sizeof_struct_rt_metrics +) + +type IfMsghdr C.struct_if_msghdr + +type IfData C.struct_if_data + +type IfaMsghdr C.struct_ifa_msghdr + +type IfmaMsghdr C.struct_ifma_msghdr + +type IfmaMsghdr2 C.struct_ifma_msghdr2 + +type RtMsghdr C.struct_rt_msghdr + +type RtMetrics C.struct_rt_metrics + +// Berkeley packet filter + +const ( + SizeofBpfVersion = C.sizeof_struct_bpf_version + SizeofBpfStat = C.sizeof_struct_bpf_stat + SizeofBpfProgram = C.sizeof_struct_bpf_program + SizeofBpfInsn = C.sizeof_struct_bpf_insn + SizeofBpfHdr = C.sizeof_struct_bpf_hdr +) + +type BpfVersion C.struct_bpf_version + +type BpfStat C.struct_bpf_stat + +type BpfProgram C.struct_bpf_program + +type BpfInsn C.struct_bpf_insn + +type BpfHdr C.struct_bpf_hdr + +// Terminal handling + +type Termios C.struct_termios + +// fchmodat-like syscalls. + +const ( + AT_FDCWD = C.AT_FDCWD + AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW +) diff --git a/vendor/golang.org/x/sys/unix/types_dragonfly.go b/vendor/golang.org/x/sys/unix/types_dragonfly.go new file mode 100644 index 0000000..f3c971d --- /dev/null +++ b/vendor/golang.org/x/sys/unix/types_dragonfly.go @@ -0,0 +1,242 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +/* +Input to cgo -godefs. See also mkerrors.sh and mkall.sh +*/ + +// +godefs map struct_in_addr [4]byte /* in_addr */ +// +godefs map struct_in6_addr [16]byte /* in6_addr */ + +package unix + +/* +#define KERNEL +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum { + sizeofPtr = sizeof(void*), +}; + +union sockaddr_all { + struct sockaddr s1; // this one gets used for fields + struct sockaddr_in s2; // these pad it out + struct sockaddr_in6 s3; + struct sockaddr_un s4; + struct sockaddr_dl s5; +}; + +struct sockaddr_any { + struct sockaddr addr; + char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)]; +}; + +*/ +import "C" + +// Machine characteristics; for internal use. + +const ( + sizeofPtr = C.sizeofPtr + sizeofShort = C.sizeof_short + sizeofInt = C.sizeof_int + sizeofLong = C.sizeof_long + sizeofLongLong = C.sizeof_longlong +) + +// Basic types + +type ( + _C_short C.short + _C_int C.int + _C_long C.long + _C_long_long C.longlong +) + +// Time + +type Timespec C.struct_timespec + +type Timeval C.struct_timeval + +// Processes + +type Rusage C.struct_rusage + +type Rlimit C.struct_rlimit + +type _Gid_t C.gid_t + +// Files + +const ( // Directory mode bits + S_IFMT = C.S_IFMT + S_IFIFO = C.S_IFIFO + S_IFCHR = C.S_IFCHR + S_IFDIR = C.S_IFDIR + S_IFBLK = C.S_IFBLK + S_IFREG = C.S_IFREG + S_IFLNK = C.S_IFLNK + S_IFSOCK = C.S_IFSOCK + S_ISUID = C.S_ISUID + S_ISGID = C.S_ISGID + S_ISVTX = C.S_ISVTX + S_IRUSR = C.S_IRUSR + S_IWUSR = C.S_IWUSR + S_IXUSR = C.S_IXUSR +) + +type Stat_t C.struct_stat + +type Statfs_t C.struct_statfs + +type Flock_t C.struct_flock + +type Dirent C.struct_dirent + +type Fsid C.struct_fsid + +// Sockets + +type RawSockaddrInet4 C.struct_sockaddr_in + +type RawSockaddrInet6 C.struct_sockaddr_in6 + +type RawSockaddrUnix C.struct_sockaddr_un + +type RawSockaddrDatalink C.struct_sockaddr_dl + +type RawSockaddr C.struct_sockaddr + +type RawSockaddrAny C.struct_sockaddr_any + +type _Socklen C.socklen_t + +type Linger C.struct_linger + +type Iovec C.struct_iovec + +type IPMreq C.struct_ip_mreq + +type IPv6Mreq C.struct_ipv6_mreq + +type Msghdr C.struct_msghdr + +type Cmsghdr C.struct_cmsghdr + +type Inet6Pktinfo C.struct_in6_pktinfo + +type IPv6MTUInfo C.struct_ip6_mtuinfo + +type ICMPv6Filter C.struct_icmp6_filter + +const ( + SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in + SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 + SizeofSockaddrAny = C.sizeof_struct_sockaddr_any + SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un + SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl + SizeofLinger = C.sizeof_struct_linger + SizeofIPMreq = C.sizeof_struct_ip_mreq + SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq + SizeofMsghdr = C.sizeof_struct_msghdr + SizeofCmsghdr = C.sizeof_struct_cmsghdr + SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo + SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo + SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter +) + +// Ptrace requests + +const ( + PTRACE_TRACEME = C.PT_TRACE_ME + PTRACE_CONT = C.PT_CONTINUE + PTRACE_KILL = C.PT_KILL +) + +// Events (kqueue, kevent) + +type Kevent_t C.struct_kevent + +// Select + +type FdSet C.fd_set + +// Routing and interface messages + +const ( + SizeofIfMsghdr = C.sizeof_struct_if_msghdr + SizeofIfData = C.sizeof_struct_if_data + SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr + SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr + SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr + SizeofRtMsghdr = C.sizeof_struct_rt_msghdr + SizeofRtMetrics = C.sizeof_struct_rt_metrics +) + +type IfMsghdr C.struct_if_msghdr + +type IfData C.struct_if_data + +type IfaMsghdr C.struct_ifa_msghdr + +type IfmaMsghdr C.struct_ifma_msghdr + +type IfAnnounceMsghdr C.struct_if_announcemsghdr + +type RtMsghdr C.struct_rt_msghdr + +type RtMetrics C.struct_rt_metrics + +// Berkeley packet filter + +const ( + SizeofBpfVersion = C.sizeof_struct_bpf_version + SizeofBpfStat = C.sizeof_struct_bpf_stat + SizeofBpfProgram = C.sizeof_struct_bpf_program + SizeofBpfInsn = C.sizeof_struct_bpf_insn + SizeofBpfHdr = C.sizeof_struct_bpf_hdr +) + +type BpfVersion C.struct_bpf_version + +type BpfStat C.struct_bpf_stat + +type BpfProgram C.struct_bpf_program + +type BpfInsn C.struct_bpf_insn + +type BpfHdr C.struct_bpf_hdr + +// Terminal handling + +type Termios C.struct_termios diff --git a/vendor/golang.org/x/sys/unix/types_freebsd.go b/vendor/golang.org/x/sys/unix/types_freebsd.go new file mode 100644 index 0000000..ae24557 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/types_freebsd.go @@ -0,0 +1,353 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +/* +Input to cgo -godefs. See also mkerrors.sh and mkall.sh +*/ + +// +godefs map struct_in_addr [4]byte /* in_addr */ +// +godefs map struct_in6_addr [16]byte /* in6_addr */ + +package unix + +/* +#define KERNEL +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum { + sizeofPtr = sizeof(void*), +}; + +union sockaddr_all { + struct sockaddr s1; // this one gets used for fields + struct sockaddr_in s2; // these pad it out + struct sockaddr_in6 s3; + struct sockaddr_un s4; + struct sockaddr_dl s5; +}; + +struct sockaddr_any { + struct sockaddr addr; + char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)]; +}; + +// This structure is a duplicate of stat on FreeBSD 8-STABLE. +// See /usr/include/sys/stat.h. +struct stat8 { +#undef st_atimespec st_atim +#undef st_mtimespec st_mtim +#undef st_ctimespec st_ctim +#undef st_birthtimespec st_birthtim + __dev_t st_dev; + ino_t st_ino; + mode_t st_mode; + nlink_t st_nlink; + uid_t st_uid; + gid_t st_gid; + __dev_t st_rdev; +#if __BSD_VISIBLE + struct timespec st_atimespec; + struct timespec st_mtimespec; + struct timespec st_ctimespec; +#else + time_t st_atime; + long __st_atimensec; + time_t st_mtime; + long __st_mtimensec; + time_t st_ctime; + long __st_ctimensec; +#endif + off_t st_size; + blkcnt_t st_blocks; + blksize_t st_blksize; + fflags_t st_flags; + __uint32_t st_gen; + __int32_t st_lspare; +#if __BSD_VISIBLE + struct timespec st_birthtimespec; + unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); + unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); +#else + time_t st_birthtime; + long st_birthtimensec; + unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec)); + unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec)); +#endif +}; + +// This structure is a duplicate of if_data on FreeBSD 8-STABLE. +// See /usr/include/net/if.h. +struct if_data8 { + u_char ifi_type; + u_char ifi_physical; + u_char ifi_addrlen; + u_char ifi_hdrlen; + u_char ifi_link_state; + u_char ifi_spare_char1; + u_char ifi_spare_char2; + u_char ifi_datalen; + u_long ifi_mtu; + u_long ifi_metric; + u_long ifi_baudrate; + u_long ifi_ipackets; + u_long ifi_ierrors; + u_long ifi_opackets; + u_long ifi_oerrors; + u_long ifi_collisions; + u_long ifi_ibytes; + u_long ifi_obytes; + u_long ifi_imcasts; + u_long ifi_omcasts; + u_long ifi_iqdrops; + u_long ifi_noproto; + u_long ifi_hwassist; + time_t ifi_epoch; + struct timeval ifi_lastchange; +}; + +// This structure is a duplicate of if_msghdr on FreeBSD 8-STABLE. +// See /usr/include/net/if.h. +struct if_msghdr8 { + u_short ifm_msglen; + u_char ifm_version; + u_char ifm_type; + int ifm_addrs; + int ifm_flags; + u_short ifm_index; + struct if_data8 ifm_data; +}; +*/ +import "C" + +// Machine characteristics; for internal use. + +const ( + sizeofPtr = C.sizeofPtr + sizeofShort = C.sizeof_short + sizeofInt = C.sizeof_int + sizeofLong = C.sizeof_long + sizeofLongLong = C.sizeof_longlong +) + +// Basic types + +type ( + _C_short C.short + _C_int C.int + _C_long C.long + _C_long_long C.longlong +) + +// Time + +type Timespec C.struct_timespec + +type Timeval C.struct_timeval + +// Processes + +type Rusage C.struct_rusage + +type Rlimit C.struct_rlimit + +type _Gid_t C.gid_t + +// Files + +const ( // Directory mode bits + S_IFMT = C.S_IFMT + S_IFIFO = C.S_IFIFO + S_IFCHR = C.S_IFCHR + S_IFDIR = C.S_IFDIR + S_IFBLK = C.S_IFBLK + S_IFREG = C.S_IFREG + S_IFLNK = C.S_IFLNK + S_IFSOCK = C.S_IFSOCK + S_ISUID = C.S_ISUID + S_ISGID = C.S_ISGID + S_ISVTX = C.S_ISVTX + S_IRUSR = C.S_IRUSR + S_IWUSR = C.S_IWUSR + S_IXUSR = C.S_IXUSR +) + +type Stat_t C.struct_stat8 + +type Statfs_t C.struct_statfs + +type Flock_t C.struct_flock + +type Dirent C.struct_dirent + +type Fsid C.struct_fsid + +// Advice to Fadvise + +const ( + FADV_NORMAL = C.POSIX_FADV_NORMAL + FADV_RANDOM = C.POSIX_FADV_RANDOM + FADV_SEQUENTIAL = C.POSIX_FADV_SEQUENTIAL + FADV_WILLNEED = C.POSIX_FADV_WILLNEED + FADV_DONTNEED = C.POSIX_FADV_DONTNEED + FADV_NOREUSE = C.POSIX_FADV_NOREUSE +) + +// Sockets + +type RawSockaddrInet4 C.struct_sockaddr_in + +type RawSockaddrInet6 C.struct_sockaddr_in6 + +type RawSockaddrUnix C.struct_sockaddr_un + +type RawSockaddrDatalink C.struct_sockaddr_dl + +type RawSockaddr C.struct_sockaddr + +type RawSockaddrAny C.struct_sockaddr_any + +type _Socklen C.socklen_t + +type Linger C.struct_linger + +type Iovec C.struct_iovec + +type IPMreq C.struct_ip_mreq + +type IPMreqn C.struct_ip_mreqn + +type IPv6Mreq C.struct_ipv6_mreq + +type Msghdr C.struct_msghdr + +type Cmsghdr C.struct_cmsghdr + +type Inet6Pktinfo C.struct_in6_pktinfo + +type IPv6MTUInfo C.struct_ip6_mtuinfo + +type ICMPv6Filter C.struct_icmp6_filter + +const ( + SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in + SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 + SizeofSockaddrAny = C.sizeof_struct_sockaddr_any + SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un + SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl + SizeofLinger = C.sizeof_struct_linger + SizeofIPMreq = C.sizeof_struct_ip_mreq + SizeofIPMreqn = C.sizeof_struct_ip_mreqn + SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq + SizeofMsghdr = C.sizeof_struct_msghdr + SizeofCmsghdr = C.sizeof_struct_cmsghdr + SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo + SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo + SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter +) + +// Ptrace requests + +const ( + PTRACE_TRACEME = C.PT_TRACE_ME + PTRACE_CONT = C.PT_CONTINUE + PTRACE_KILL = C.PT_KILL +) + +// Events (kqueue, kevent) + +type Kevent_t C.struct_kevent + +// Select + +type FdSet C.fd_set + +// Routing and interface messages + +const ( + sizeofIfMsghdr = C.sizeof_struct_if_msghdr + SizeofIfMsghdr = C.sizeof_struct_if_msghdr8 + sizeofIfData = C.sizeof_struct_if_data + SizeofIfData = C.sizeof_struct_if_data8 + SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr + SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr + SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr + SizeofRtMsghdr = C.sizeof_struct_rt_msghdr + SizeofRtMetrics = C.sizeof_struct_rt_metrics +) + +type ifMsghdr C.struct_if_msghdr + +type IfMsghdr C.struct_if_msghdr8 + +type ifData C.struct_if_data + +type IfData C.struct_if_data8 + +type IfaMsghdr C.struct_ifa_msghdr + +type IfmaMsghdr C.struct_ifma_msghdr + +type IfAnnounceMsghdr C.struct_if_announcemsghdr + +type RtMsghdr C.struct_rt_msghdr + +type RtMetrics C.struct_rt_metrics + +// Berkeley packet filter + +const ( + SizeofBpfVersion = C.sizeof_struct_bpf_version + SizeofBpfStat = C.sizeof_struct_bpf_stat + SizeofBpfZbuf = C.sizeof_struct_bpf_zbuf + SizeofBpfProgram = C.sizeof_struct_bpf_program + SizeofBpfInsn = C.sizeof_struct_bpf_insn + SizeofBpfHdr = C.sizeof_struct_bpf_hdr + SizeofBpfZbufHeader = C.sizeof_struct_bpf_zbuf_header +) + +type BpfVersion C.struct_bpf_version + +type BpfStat C.struct_bpf_stat + +type BpfZbuf C.struct_bpf_zbuf + +type BpfProgram C.struct_bpf_program + +type BpfInsn C.struct_bpf_insn + +type BpfHdr C.struct_bpf_hdr + +type BpfZbufHeader C.struct_bpf_zbuf_header + +// Terminal handling + +type Termios C.struct_termios diff --git a/vendor/golang.org/x/sys/unix/types_linux.go b/vendor/golang.org/x/sys/unix/types_linux.go new file mode 100644 index 0000000..9b75633 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/types_linux.go @@ -0,0 +1,399 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +/* +Input to cgo -godefs. See also mkerrors.sh and mkall.sh +*/ + +// +godefs map struct_in_addr [4]byte /* in_addr */ +// +godefs map struct_in6_addr [16]byte /* in6_addr */ + +package unix + +/* +#define _LARGEFILE_SOURCE +#define _LARGEFILE64_SOURCE +#define _FILE_OFFSET_BITS 64 +#define _GNU_SOURCE + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum { + sizeofPtr = sizeof(void*), +}; + +union sockaddr_all { + struct sockaddr s1; // this one gets used for fields + struct sockaddr_in s2; // these pad it out + struct sockaddr_in6 s3; + struct sockaddr_un s4; + struct sockaddr_ll s5; + struct sockaddr_nl s6; +}; + +struct sockaddr_any { + struct sockaddr addr; + char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)]; +}; + +// copied from /usr/include/linux/un.h +struct my_sockaddr_un { + sa_family_t sun_family; +#if defined(__ARM_EABI__) || defined(__powerpc64__) + // on ARM char is by default unsigned + signed char sun_path[108]; +#else + char sun_path[108]; +#endif +}; + +#ifdef __ARM_EABI__ +typedef struct user_regs PtraceRegs; +#elif defined(__aarch64__) +typedef struct user_pt_regs PtraceRegs; +#elif defined(__powerpc64__) +typedef struct pt_regs PtraceRegs; +#else +typedef struct user_regs_struct PtraceRegs; +#endif + +// The real epoll_event is a union, and godefs doesn't handle it well. +struct my_epoll_event { + uint32_t events; +#ifdef __ARM_EABI__ + // padding is not specified in linux/eventpoll.h but added to conform to the + // alignment requirements of EABI + int32_t padFd; +#endif + int32_t fd; + int32_t pad; +}; + +*/ +import "C" + +// Machine characteristics; for internal use. + +const ( + sizeofPtr = C.sizeofPtr + sizeofShort = C.sizeof_short + sizeofInt = C.sizeof_int + sizeofLong = C.sizeof_long + sizeofLongLong = C.sizeof_longlong + PathMax = C.PATH_MAX +) + +// Basic types + +type ( + _C_short C.short + _C_int C.int + _C_long C.long + _C_long_long C.longlong +) + +// Time + +type Timespec C.struct_timespec + +type Timeval C.struct_timeval + +type Timex C.struct_timex + +type Time_t C.time_t + +type Tms C.struct_tms + +type Utimbuf C.struct_utimbuf + +// Processes + +type Rusage C.struct_rusage + +type Rlimit C.struct_rlimit + +type _Gid_t C.gid_t + +// Files + +type Stat_t C.struct_stat + +type Statfs_t C.struct_statfs + +type Dirent C.struct_dirent + +type Fsid C.fsid_t + +type Flock_t C.struct_flock + +// Advice to Fadvise + +const ( + FADV_NORMAL = C.POSIX_FADV_NORMAL + FADV_RANDOM = C.POSIX_FADV_RANDOM + FADV_SEQUENTIAL = C.POSIX_FADV_SEQUENTIAL + FADV_WILLNEED = C.POSIX_FADV_WILLNEED + FADV_DONTNEED = C.POSIX_FADV_DONTNEED + FADV_NOREUSE = C.POSIX_FADV_NOREUSE +) + +// Sockets + +type RawSockaddrInet4 C.struct_sockaddr_in + +type RawSockaddrInet6 C.struct_sockaddr_in6 + +type RawSockaddrUnix C.struct_my_sockaddr_un + +type RawSockaddrLinklayer C.struct_sockaddr_ll + +type RawSockaddrNetlink C.struct_sockaddr_nl + +type RawSockaddr C.struct_sockaddr + +type RawSockaddrAny C.struct_sockaddr_any + +type _Socklen C.socklen_t + +type Linger C.struct_linger + +type Iovec C.struct_iovec + +type IPMreq C.struct_ip_mreq + +type IPMreqn C.struct_ip_mreqn + +type IPv6Mreq C.struct_ipv6_mreq + +type Msghdr C.struct_msghdr + +type Cmsghdr C.struct_cmsghdr + +type Inet4Pktinfo C.struct_in_pktinfo + +type Inet6Pktinfo C.struct_in6_pktinfo + +type IPv6MTUInfo C.struct_ip6_mtuinfo + +type ICMPv6Filter C.struct_icmp6_filter + +type Ucred C.struct_ucred + +type TCPInfo C.struct_tcp_info + +const ( + SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in + SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 + SizeofSockaddrAny = C.sizeof_struct_sockaddr_any + SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un + SizeofSockaddrLinklayer = C.sizeof_struct_sockaddr_ll + SizeofSockaddrNetlink = C.sizeof_struct_sockaddr_nl + SizeofLinger = C.sizeof_struct_linger + SizeofIPMreq = C.sizeof_struct_ip_mreq + SizeofIPMreqn = C.sizeof_struct_ip_mreqn + SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq + SizeofMsghdr = C.sizeof_struct_msghdr + SizeofCmsghdr = C.sizeof_struct_cmsghdr + SizeofInet4Pktinfo = C.sizeof_struct_in_pktinfo + SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo + SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo + SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter + SizeofUcred = C.sizeof_struct_ucred + SizeofTCPInfo = C.sizeof_struct_tcp_info +) + +// Netlink routing and interface messages + +const ( + IFA_UNSPEC = C.IFA_UNSPEC + IFA_ADDRESS = C.IFA_ADDRESS + IFA_LOCAL = C.IFA_LOCAL + IFA_LABEL = C.IFA_LABEL + IFA_BROADCAST = C.IFA_BROADCAST + IFA_ANYCAST = C.IFA_ANYCAST + IFA_CACHEINFO = C.IFA_CACHEINFO + IFA_MULTICAST = C.IFA_MULTICAST + IFLA_UNSPEC = C.IFLA_UNSPEC + IFLA_ADDRESS = C.IFLA_ADDRESS + IFLA_BROADCAST = C.IFLA_BROADCAST + IFLA_IFNAME = C.IFLA_IFNAME + IFLA_MTU = C.IFLA_MTU + IFLA_LINK = C.IFLA_LINK + IFLA_QDISC = C.IFLA_QDISC + IFLA_STATS = C.IFLA_STATS + IFLA_COST = C.IFLA_COST + IFLA_PRIORITY = C.IFLA_PRIORITY + IFLA_MASTER = C.IFLA_MASTER + IFLA_WIRELESS = C.IFLA_WIRELESS + IFLA_PROTINFO = C.IFLA_PROTINFO + IFLA_TXQLEN = C.IFLA_TXQLEN + IFLA_MAP = C.IFLA_MAP + IFLA_WEIGHT = C.IFLA_WEIGHT + IFLA_OPERSTATE = C.IFLA_OPERSTATE + IFLA_LINKMODE = C.IFLA_LINKMODE + IFLA_LINKINFO = C.IFLA_LINKINFO + IFLA_NET_NS_PID = C.IFLA_NET_NS_PID + IFLA_IFALIAS = C.IFLA_IFALIAS + IFLA_MAX = C.IFLA_MAX + RT_SCOPE_UNIVERSE = C.RT_SCOPE_UNIVERSE + RT_SCOPE_SITE = C.RT_SCOPE_SITE + RT_SCOPE_LINK = C.RT_SCOPE_LINK + RT_SCOPE_HOST = C.RT_SCOPE_HOST + RT_SCOPE_NOWHERE = C.RT_SCOPE_NOWHERE + RT_TABLE_UNSPEC = C.RT_TABLE_UNSPEC + RT_TABLE_COMPAT = C.RT_TABLE_COMPAT + RT_TABLE_DEFAULT = C.RT_TABLE_DEFAULT + RT_TABLE_MAIN = C.RT_TABLE_MAIN + RT_TABLE_LOCAL = C.RT_TABLE_LOCAL + RT_TABLE_MAX = C.RT_TABLE_MAX + RTA_UNSPEC = C.RTA_UNSPEC + RTA_DST = C.RTA_DST + RTA_SRC = C.RTA_SRC + RTA_IIF = C.RTA_IIF + RTA_OIF = C.RTA_OIF + RTA_GATEWAY = C.RTA_GATEWAY + RTA_PRIORITY = C.RTA_PRIORITY + RTA_PREFSRC = C.RTA_PREFSRC + RTA_METRICS = C.RTA_METRICS + RTA_MULTIPATH = C.RTA_MULTIPATH + RTA_FLOW = C.RTA_FLOW + RTA_CACHEINFO = C.RTA_CACHEINFO + RTA_TABLE = C.RTA_TABLE + RTN_UNSPEC = C.RTN_UNSPEC + RTN_UNICAST = C.RTN_UNICAST + RTN_LOCAL = C.RTN_LOCAL + RTN_BROADCAST = C.RTN_BROADCAST + RTN_ANYCAST = C.RTN_ANYCAST + RTN_MULTICAST = C.RTN_MULTICAST + RTN_BLACKHOLE = C.RTN_BLACKHOLE + RTN_UNREACHABLE = C.RTN_UNREACHABLE + RTN_PROHIBIT = C.RTN_PROHIBIT + RTN_THROW = C.RTN_THROW + RTN_NAT = C.RTN_NAT + RTN_XRESOLVE = C.RTN_XRESOLVE + RTNLGRP_NONE = C.RTNLGRP_NONE + RTNLGRP_LINK = C.RTNLGRP_LINK + RTNLGRP_NOTIFY = C.RTNLGRP_NOTIFY + RTNLGRP_NEIGH = C.RTNLGRP_NEIGH + RTNLGRP_TC = C.RTNLGRP_TC + RTNLGRP_IPV4_IFADDR = C.RTNLGRP_IPV4_IFADDR + RTNLGRP_IPV4_MROUTE = C.RTNLGRP_IPV4_MROUTE + RTNLGRP_IPV4_ROUTE = C.RTNLGRP_IPV4_ROUTE + RTNLGRP_IPV4_RULE = C.RTNLGRP_IPV4_RULE + RTNLGRP_IPV6_IFADDR = C.RTNLGRP_IPV6_IFADDR + RTNLGRP_IPV6_MROUTE = C.RTNLGRP_IPV6_MROUTE + RTNLGRP_IPV6_ROUTE = C.RTNLGRP_IPV6_ROUTE + RTNLGRP_IPV6_IFINFO = C.RTNLGRP_IPV6_IFINFO + RTNLGRP_IPV6_PREFIX = C.RTNLGRP_IPV6_PREFIX + RTNLGRP_IPV6_RULE = C.RTNLGRP_IPV6_RULE + RTNLGRP_ND_USEROPT = C.RTNLGRP_ND_USEROPT + SizeofNlMsghdr = C.sizeof_struct_nlmsghdr + SizeofNlMsgerr = C.sizeof_struct_nlmsgerr + SizeofRtGenmsg = C.sizeof_struct_rtgenmsg + SizeofNlAttr = C.sizeof_struct_nlattr + SizeofRtAttr = C.sizeof_struct_rtattr + SizeofIfInfomsg = C.sizeof_struct_ifinfomsg + SizeofIfAddrmsg = C.sizeof_struct_ifaddrmsg + SizeofRtMsg = C.sizeof_struct_rtmsg + SizeofRtNexthop = C.sizeof_struct_rtnexthop +) + +type NlMsghdr C.struct_nlmsghdr + +type NlMsgerr C.struct_nlmsgerr + +type RtGenmsg C.struct_rtgenmsg + +type NlAttr C.struct_nlattr + +type RtAttr C.struct_rtattr + +type IfInfomsg C.struct_ifinfomsg + +type IfAddrmsg C.struct_ifaddrmsg + +type RtMsg C.struct_rtmsg + +type RtNexthop C.struct_rtnexthop + +// Linux socket filter + +const ( + SizeofSockFilter = C.sizeof_struct_sock_filter + SizeofSockFprog = C.sizeof_struct_sock_fprog +) + +type SockFilter C.struct_sock_filter + +type SockFprog C.struct_sock_fprog + +// Inotify + +type InotifyEvent C.struct_inotify_event + +const SizeofInotifyEvent = C.sizeof_struct_inotify_event + +// Ptrace + +// Register structures +type PtraceRegs C.PtraceRegs + +// Misc + +type FdSet C.fd_set + +type Sysinfo_t C.struct_sysinfo + +type Utsname C.struct_utsname + +type Ustat_t C.struct_ustat + +type EpollEvent C.struct_my_epoll_event + +const ( + AT_FDCWD = C.AT_FDCWD + AT_REMOVEDIR = C.AT_REMOVEDIR + AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW +) + +// Terminal handling + +type Termios C.struct_termios diff --git a/vendor/golang.org/x/sys/unix/types_netbsd.go b/vendor/golang.org/x/sys/unix/types_netbsd.go new file mode 100644 index 0000000..d15f93d --- /dev/null +++ b/vendor/golang.org/x/sys/unix/types_netbsd.go @@ -0,0 +1,232 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +/* +Input to cgo -godefs. See also mkerrors.sh and mkall.sh +*/ + +// +godefs map struct_in_addr [4]byte /* in_addr */ +// +godefs map struct_in6_addr [16]byte /* in6_addr */ + +package unix + +/* +#define KERNEL +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum { + sizeofPtr = sizeof(void*), +}; + +union sockaddr_all { + struct sockaddr s1; // this one gets used for fields + struct sockaddr_in s2; // these pad it out + struct sockaddr_in6 s3; + struct sockaddr_un s4; + struct sockaddr_dl s5; +}; + +struct sockaddr_any { + struct sockaddr addr; + char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)]; +}; + +*/ +import "C" + +// Machine characteristics; for internal use. + +const ( + sizeofPtr = C.sizeofPtr + sizeofShort = C.sizeof_short + sizeofInt = C.sizeof_int + sizeofLong = C.sizeof_long + sizeofLongLong = C.sizeof_longlong +) + +// Basic types + +type ( + _C_short C.short + _C_int C.int + _C_long C.long + _C_long_long C.longlong +) + +// Time + +type Timespec C.struct_timespec + +type Timeval C.struct_timeval + +// Processes + +type Rusage C.struct_rusage + +type Rlimit C.struct_rlimit + +type _Gid_t C.gid_t + +// Files + +type Stat_t C.struct_stat + +type Statfs_t C.struct_statfs + +type Flock_t C.struct_flock + +type Dirent C.struct_dirent + +type Fsid C.fsid_t + +// Sockets + +type RawSockaddrInet4 C.struct_sockaddr_in + +type RawSockaddrInet6 C.struct_sockaddr_in6 + +type RawSockaddrUnix C.struct_sockaddr_un + +type RawSockaddrDatalink C.struct_sockaddr_dl + +type RawSockaddr C.struct_sockaddr + +type RawSockaddrAny C.struct_sockaddr_any + +type _Socklen C.socklen_t + +type Linger C.struct_linger + +type Iovec C.struct_iovec + +type IPMreq C.struct_ip_mreq + +type IPv6Mreq C.struct_ipv6_mreq + +type Msghdr C.struct_msghdr + +type Cmsghdr C.struct_cmsghdr + +type Inet6Pktinfo C.struct_in6_pktinfo + +type IPv6MTUInfo C.struct_ip6_mtuinfo + +type ICMPv6Filter C.struct_icmp6_filter + +const ( + SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in + SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 + SizeofSockaddrAny = C.sizeof_struct_sockaddr_any + SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un + SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl + SizeofLinger = C.sizeof_struct_linger + SizeofIPMreq = C.sizeof_struct_ip_mreq + SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq + SizeofMsghdr = C.sizeof_struct_msghdr + SizeofCmsghdr = C.sizeof_struct_cmsghdr + SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo + SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo + SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter +) + +// Ptrace requests + +const ( + PTRACE_TRACEME = C.PT_TRACE_ME + PTRACE_CONT = C.PT_CONTINUE + PTRACE_KILL = C.PT_KILL +) + +// Events (kqueue, kevent) + +type Kevent_t C.struct_kevent + +// Select + +type FdSet C.fd_set + +// Routing and interface messages + +const ( + SizeofIfMsghdr = C.sizeof_struct_if_msghdr + SizeofIfData = C.sizeof_struct_if_data + SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr + SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr + SizeofRtMsghdr = C.sizeof_struct_rt_msghdr + SizeofRtMetrics = C.sizeof_struct_rt_metrics +) + +type IfMsghdr C.struct_if_msghdr + +type IfData C.struct_if_data + +type IfaMsghdr C.struct_ifa_msghdr + +type IfAnnounceMsghdr C.struct_if_announcemsghdr + +type RtMsghdr C.struct_rt_msghdr + +type RtMetrics C.struct_rt_metrics + +type Mclpool C.struct_mclpool + +// Berkeley packet filter + +const ( + SizeofBpfVersion = C.sizeof_struct_bpf_version + SizeofBpfStat = C.sizeof_struct_bpf_stat + SizeofBpfProgram = C.sizeof_struct_bpf_program + SizeofBpfInsn = C.sizeof_struct_bpf_insn + SizeofBpfHdr = C.sizeof_struct_bpf_hdr +) + +type BpfVersion C.struct_bpf_version + +type BpfStat C.struct_bpf_stat + +type BpfProgram C.struct_bpf_program + +type BpfInsn C.struct_bpf_insn + +type BpfHdr C.struct_bpf_hdr + +type BpfTimeval C.struct_bpf_timeval + +// Terminal handling + +type Termios C.struct_termios + +// Sysctl + +type Sysctlnode C.struct_sysctlnode diff --git a/vendor/golang.org/x/sys/unix/types_openbsd.go b/vendor/golang.org/x/sys/unix/types_openbsd.go new file mode 100644 index 0000000..b66fe25 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/types_openbsd.go @@ -0,0 +1,244 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +/* +Input to cgo -godefs. See also mkerrors.sh and mkall.sh +*/ + +// +godefs map struct_in_addr [4]byte /* in_addr */ +// +godefs map struct_in6_addr [16]byte /* in6_addr */ + +package unix + +/* +#define KERNEL +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum { + sizeofPtr = sizeof(void*), +}; + +union sockaddr_all { + struct sockaddr s1; // this one gets used for fields + struct sockaddr_in s2; // these pad it out + struct sockaddr_in6 s3; + struct sockaddr_un s4; + struct sockaddr_dl s5; +}; + +struct sockaddr_any { + struct sockaddr addr; + char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)]; +}; + +*/ +import "C" + +// Machine characteristics; for internal use. + +const ( + sizeofPtr = C.sizeofPtr + sizeofShort = C.sizeof_short + sizeofInt = C.sizeof_int + sizeofLong = C.sizeof_long + sizeofLongLong = C.sizeof_longlong +) + +// Basic types + +type ( + _C_short C.short + _C_int C.int + _C_long C.long + _C_long_long C.longlong +) + +// Time + +type Timespec C.struct_timespec + +type Timeval C.struct_timeval + +// Processes + +type Rusage C.struct_rusage + +type Rlimit C.struct_rlimit + +type _Gid_t C.gid_t + +// Files + +const ( // Directory mode bits + S_IFMT = C.S_IFMT + S_IFIFO = C.S_IFIFO + S_IFCHR = C.S_IFCHR + S_IFDIR = C.S_IFDIR + S_IFBLK = C.S_IFBLK + S_IFREG = C.S_IFREG + S_IFLNK = C.S_IFLNK + S_IFSOCK = C.S_IFSOCK + S_ISUID = C.S_ISUID + S_ISGID = C.S_ISGID + S_ISVTX = C.S_ISVTX + S_IRUSR = C.S_IRUSR + S_IWUSR = C.S_IWUSR + S_IXUSR = C.S_IXUSR +) + +type Stat_t C.struct_stat + +type Statfs_t C.struct_statfs + +type Flock_t C.struct_flock + +type Dirent C.struct_dirent + +type Fsid C.fsid_t + +// Sockets + +type RawSockaddrInet4 C.struct_sockaddr_in + +type RawSockaddrInet6 C.struct_sockaddr_in6 + +type RawSockaddrUnix C.struct_sockaddr_un + +type RawSockaddrDatalink C.struct_sockaddr_dl + +type RawSockaddr C.struct_sockaddr + +type RawSockaddrAny C.struct_sockaddr_any + +type _Socklen C.socklen_t + +type Linger C.struct_linger + +type Iovec C.struct_iovec + +type IPMreq C.struct_ip_mreq + +type IPv6Mreq C.struct_ipv6_mreq + +type Msghdr C.struct_msghdr + +type Cmsghdr C.struct_cmsghdr + +type Inet6Pktinfo C.struct_in6_pktinfo + +type IPv6MTUInfo C.struct_ip6_mtuinfo + +type ICMPv6Filter C.struct_icmp6_filter + +const ( + SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in + SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 + SizeofSockaddrAny = C.sizeof_struct_sockaddr_any + SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un + SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl + SizeofLinger = C.sizeof_struct_linger + SizeofIPMreq = C.sizeof_struct_ip_mreq + SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq + SizeofMsghdr = C.sizeof_struct_msghdr + SizeofCmsghdr = C.sizeof_struct_cmsghdr + SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo + SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo + SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter +) + +// Ptrace requests + +const ( + PTRACE_TRACEME = C.PT_TRACE_ME + PTRACE_CONT = C.PT_CONTINUE + PTRACE_KILL = C.PT_KILL +) + +// Events (kqueue, kevent) + +type Kevent_t C.struct_kevent + +// Select + +type FdSet C.fd_set + +// Routing and interface messages + +const ( + SizeofIfMsghdr = C.sizeof_struct_if_msghdr + SizeofIfData = C.sizeof_struct_if_data + SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr + SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr + SizeofRtMsghdr = C.sizeof_struct_rt_msghdr + SizeofRtMetrics = C.sizeof_struct_rt_metrics +) + +type IfMsghdr C.struct_if_msghdr + +type IfData C.struct_if_data + +type IfaMsghdr C.struct_ifa_msghdr + +type IfAnnounceMsghdr C.struct_if_announcemsghdr + +type RtMsghdr C.struct_rt_msghdr + +type RtMetrics C.struct_rt_metrics + +type Mclpool C.struct_mclpool + +// Berkeley packet filter + +const ( + SizeofBpfVersion = C.sizeof_struct_bpf_version + SizeofBpfStat = C.sizeof_struct_bpf_stat + SizeofBpfProgram = C.sizeof_struct_bpf_program + SizeofBpfInsn = C.sizeof_struct_bpf_insn + SizeofBpfHdr = C.sizeof_struct_bpf_hdr +) + +type BpfVersion C.struct_bpf_version + +type BpfStat C.struct_bpf_stat + +type BpfProgram C.struct_bpf_program + +type BpfInsn C.struct_bpf_insn + +type BpfHdr C.struct_bpf_hdr + +type BpfTimeval C.struct_bpf_timeval + +// Terminal handling + +type Termios C.struct_termios diff --git a/vendor/golang.org/x/sys/unix/types_solaris.go b/vendor/golang.org/x/sys/unix/types_solaris.go new file mode 100644 index 0000000..6ad50ea --- /dev/null +++ b/vendor/golang.org/x/sys/unix/types_solaris.go @@ -0,0 +1,260 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +/* +Input to cgo -godefs. See also mkerrors.sh and mkall.sh +*/ + +// +godefs map struct_in_addr [4]byte /* in_addr */ +// +godefs map struct_in6_addr [16]byte /* in6_addr */ + +package unix + +/* +#define KERNEL +// These defines ensure that builds done on newer versions of Solaris are +// backwards-compatible with older versions of Solaris and +// OpenSolaris-based derivatives. +#define __USE_SUNOS_SOCKETS__ // msghdr +#define __USE_LEGACY_PROTOTYPES__ // iovec +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum { + sizeofPtr = sizeof(void*), +}; + +union sockaddr_all { + struct sockaddr s1; // this one gets used for fields + struct sockaddr_in s2; // these pad it out + struct sockaddr_in6 s3; + struct sockaddr_un s4; + struct sockaddr_dl s5; +}; + +struct sockaddr_any { + struct sockaddr addr; + char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)]; +}; + +*/ +import "C" + +// Machine characteristics; for internal use. + +const ( + sizeofPtr = C.sizeofPtr + sizeofShort = C.sizeof_short + sizeofInt = C.sizeof_int + sizeofLong = C.sizeof_long + sizeofLongLong = C.sizeof_longlong + PathMax = C.PATH_MAX +) + +// Basic types + +type ( + _C_short C.short + _C_int C.int + _C_long C.long + _C_long_long C.longlong +) + +// Time + +type Timespec C.struct_timespec + +type Timeval C.struct_timeval + +type Timeval32 C.struct_timeval32 + +type Tms C.struct_tms + +type Utimbuf C.struct_utimbuf + +// Processes + +type Rusage C.struct_rusage + +type Rlimit C.struct_rlimit + +type _Gid_t C.gid_t + +// Files + +const ( // Directory mode bits + S_IFMT = C.S_IFMT + S_IFIFO = C.S_IFIFO + S_IFCHR = C.S_IFCHR + S_IFDIR = C.S_IFDIR + S_IFBLK = C.S_IFBLK + S_IFREG = C.S_IFREG + S_IFLNK = C.S_IFLNK + S_IFSOCK = C.S_IFSOCK + S_ISUID = C.S_ISUID + S_ISGID = C.S_ISGID + S_ISVTX = C.S_ISVTX + S_IRUSR = C.S_IRUSR + S_IWUSR = C.S_IWUSR + S_IXUSR = C.S_IXUSR +) + +type Stat_t C.struct_stat + +type Flock_t C.struct_flock + +type Dirent C.struct_dirent + +// Sockets + +type RawSockaddrInet4 C.struct_sockaddr_in + +type RawSockaddrInet6 C.struct_sockaddr_in6 + +type RawSockaddrUnix C.struct_sockaddr_un + +type RawSockaddrDatalink C.struct_sockaddr_dl + +type RawSockaddr C.struct_sockaddr + +type RawSockaddrAny C.struct_sockaddr_any + +type _Socklen C.socklen_t + +type Linger C.struct_linger + +type Iovec C.struct_iovec + +type IPMreq C.struct_ip_mreq + +type IPv6Mreq C.struct_ipv6_mreq + +type Msghdr C.struct_msghdr + +type Cmsghdr C.struct_cmsghdr + +type Inet6Pktinfo C.struct_in6_pktinfo + +type IPv6MTUInfo C.struct_ip6_mtuinfo + +type ICMPv6Filter C.struct_icmp6_filter + +const ( + SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in + SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 + SizeofSockaddrAny = C.sizeof_struct_sockaddr_any + SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un + SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl + SizeofLinger = C.sizeof_struct_linger + SizeofIPMreq = C.sizeof_struct_ip_mreq + SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq + SizeofMsghdr = C.sizeof_struct_msghdr + SizeofCmsghdr = C.sizeof_struct_cmsghdr + SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo + SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo + SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter +) + +// Select + +type FdSet C.fd_set + +// Misc + +type Utsname C.struct_utsname + +type Ustat_t C.struct_ustat + +const ( + AT_FDCWD = C.AT_FDCWD + AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW + AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW + AT_REMOVEDIR = C.AT_REMOVEDIR + AT_EACCESS = C.AT_EACCESS +) + +// Routing and interface messages + +const ( + SizeofIfMsghdr = C.sizeof_struct_if_msghdr + SizeofIfData = C.sizeof_struct_if_data + SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr + SizeofRtMsghdr = C.sizeof_struct_rt_msghdr + SizeofRtMetrics = C.sizeof_struct_rt_metrics +) + +type IfMsghdr C.struct_if_msghdr + +type IfData C.struct_if_data + +type IfaMsghdr C.struct_ifa_msghdr + +type RtMsghdr C.struct_rt_msghdr + +type RtMetrics C.struct_rt_metrics + +// Berkeley packet filter + +const ( + SizeofBpfVersion = C.sizeof_struct_bpf_version + SizeofBpfStat = C.sizeof_struct_bpf_stat + SizeofBpfProgram = C.sizeof_struct_bpf_program + SizeofBpfInsn = C.sizeof_struct_bpf_insn + SizeofBpfHdr = C.sizeof_struct_bpf_hdr +) + +type BpfVersion C.struct_bpf_version + +type BpfStat C.struct_bpf_stat + +type BpfProgram C.struct_bpf_program + +type BpfInsn C.struct_bpf_insn + +type BpfTimeval C.struct_bpf_timeval + +type BpfHdr C.struct_bpf_hdr + +// sysconf information + +const _SC_PAGESIZE = C._SC_PAGESIZE + +// Terminal handling + +type Termios C.struct_termios + +type Termio C.struct_termio + +type Winsize C.struct_winsize diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go new file mode 100644 index 0000000..8e63888 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go @@ -0,0 +1,1576 @@ +// mkerrors.sh -m32 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build 386,darwin + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m32 _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1c + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x25 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x1e + AF_IPX = 0x17 + AF_ISDN = 0x1c + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x28 + AF_NATM = 0x1f + AF_NDRV = 0x1b + AF_NETBIOS = 0x21 + AF_NS = 0x6 + AF_OSI = 0x7 + AF_PPP = 0x22 + AF_PUP = 0x4 + AF_RESERVED_36 = 0x24 + AF_ROUTE = 0x11 + AF_SIP = 0x18 + AF_SNA = 0xb + AF_SYSTEM = 0x20 + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_UTUN = 0x26 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B9600 = 0x2580 + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc00c4279 + BIOCGETIF = 0x4020426b + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044272 + BIOCGRTIMEOUT = 0x4008426e + BIOCGSEESENT = 0x40044276 + BIOCGSTATS = 0x4008426f + BIOCIMMEDIATE = 0x80044270 + BIOCPROMISC = 0x20004269 + BIOCSBLEN = 0xc0044266 + BIOCSDLT = 0x80044278 + BIOCSETF = 0x80084267 + BIOCSETFNR = 0x8008427e + BIOCSETIF = 0x8020426c + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044273 + BIOCSRTIMEOUT = 0x8008426d + BIOCSSEESENT = 0x80044277 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x80000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0xc + CTL_NET = 0x4 + DLT_A429 = 0xb8 + DLT_A653_ICM = 0xb9 + DLT_AIRONET_HEADER = 0x78 + DLT_AOS = 0xde + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_AX25_KISS = 0xca + DLT_BACNET_MS_TP = 0xa5 + DLT_BLUETOOTH_HCI_H4 = 0xbb + DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 + DLT_CAN20B = 0xbe + DLT_CAN_SOCKETCAN = 0xe3 + DLT_CHAOS = 0x5 + DLT_CHDLC = 0x68 + DLT_CISCO_IOS = 0x76 + DLT_C_HDLC = 0x68 + DLT_C_HDLC_WITH_DIR = 0xcd + DLT_DBUS = 0xe7 + DLT_DECT = 0xdd + DLT_DOCSIS = 0x8f + DLT_DVB_CI = 0xeb + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_ERF = 0xc5 + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FC_2 = 0xe0 + DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 + DLT_FDDI = 0xa + DLT_FLEXRAY = 0xd2 + DLT_FRELAY = 0x6b + DLT_FRELAY_WITH_DIR = 0xce + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_GSMTAP_ABIS = 0xda + DLT_GSMTAP_UM = 0xd9 + DLT_HHDLC = 0x79 + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IEEE802_15_4 = 0xc3 + DLT_IEEE802_15_4_LINUX = 0xbf + DLT_IEEE802_15_4_NOFCS = 0xe6 + DLT_IEEE802_15_4_NONASK_PHY = 0xd7 + DLT_IEEE802_16_MAC_CPS = 0xbc + DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 + DLT_IPFILTER = 0x74 + DLT_IPMB = 0xc7 + DLT_IPMB_LINUX = 0xd1 + DLT_IPNET = 0xe2 + DLT_IPOIB = 0xf2 + DLT_IPV4 = 0xe4 + DLT_IPV6 = 0xe5 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_ATM_CEMIC = 0xee + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FIBRECHANNEL = 0xea + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_ISM = 0xc2 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_JUNIPER_SRX_E2E = 0xe9 + DLT_JUNIPER_ST = 0xc8 + DLT_JUNIPER_VP = 0xb7 + DLT_JUNIPER_VS = 0xe8 + DLT_LAPB_WITH_DIR = 0xcf + DLT_LAPD = 0xcb + DLT_LIN = 0xd4 + DLT_LINUX_EVDEV = 0xd8 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_PPP_WITHDIRECTION = 0xa6 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MATCHING_MAX = 0xf5 + DLT_MATCHING_MIN = 0x68 + DLT_MFR = 0xb6 + DLT_MOST = 0xd3 + DLT_MPEG_2_TS = 0xf3 + DLT_MPLS = 0xdb + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_MUX27010 = 0xec + DLT_NETANALYZER = 0xf0 + DLT_NETANALYZER_TRANSPARENT = 0xf1 + DLT_NFC_LLCP = 0xf5 + DLT_NFLOG = 0xef + DLT_NG40 = 0xf4 + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPI = 0xc0 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0x10 + DLT_PPP_ETHER = 0x33 + DLT_PPP_PPPD = 0xa6 + DLT_PPP_SERIAL = 0x32 + DLT_PPP_WITH_DIR = 0xcc + DLT_PPP_WITH_DIRECTION = 0xa6 + DLT_PRISM_HEADER = 0x77 + DLT_PRONET = 0x4 + DLT_RAIF1 = 0xc6 + DLT_RAW = 0xc + DLT_RIO = 0x7c + DLT_SCCP = 0x8e + DLT_SITA = 0xc4 + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf + DLT_STANAG_5066_D_PDU = 0xed + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + DLT_USB = 0xba + DLT_USB_LINUX = 0xbd + DLT_USB_LINUX_MMAPPED = 0xdc + DLT_USER0 = 0x93 + DLT_USER1 = 0x94 + DLT_USER10 = 0x9d + DLT_USER11 = 0x9e + DLT_USER12 = 0x9f + DLT_USER13 = 0xa0 + DLT_USER14 = 0xa1 + DLT_USER15 = 0xa2 + DLT_USER2 = 0x95 + DLT_USER3 = 0x96 + DLT_USER4 = 0x97 + DLT_USER5 = 0x98 + DLT_USER6 = 0x99 + DLT_USER7 = 0x9a + DLT_USER8 = 0x9b + DLT_USER9 = 0x9c + DLT_WIHART = 0xdf + DLT_X2E_SERIAL = 0xd5 + DLT_X2E_XORAYA = 0xd6 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EVFILT_AIO = -0x3 + EVFILT_FS = -0x9 + EVFILT_MACHPORT = -0x8 + EVFILT_PROC = -0x5 + EVFILT_READ = -0x1 + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0xe + EVFILT_THREADMARKER = 0xe + EVFILT_TIMER = -0x7 + EVFILT_USER = -0xa + EVFILT_VM = -0xc + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_DISPATCH = 0x80 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG0 = 0x1000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_OOBAND = 0x2000 + EV_POLL = 0x1000 + EV_RECEIPT = 0x40 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_ADDFILESIGS = 0x3d + F_ADDSIGS = 0x3b + F_ALLOCATEALL = 0x4 + F_ALLOCATECONTIG = 0x2 + F_CHKCLEAN = 0x29 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x43 + F_FINDSIGS = 0x4e + F_FLUSH_DATA = 0x28 + F_FREEZE_FS = 0x35 + F_FULLFSYNC = 0x33 + F_GETCODEDIR = 0x48 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0x7 + F_GETLKPID = 0x42 + F_GETNOSIGPIPE = 0x4a + F_GETOWN = 0x5 + F_GETPATH = 0x32 + F_GETPATH_MTMINFO = 0x47 + F_GETPROTECTIONCLASS = 0x3f + F_GETPROTECTIONLEVEL = 0x4d + F_GLOBAL_NOCACHE = 0x37 + F_LOG2PHYS = 0x31 + F_LOG2PHYS_EXT = 0x41 + F_NOCACHE = 0x30 + F_NODIRECT = 0x3e + F_OK = 0x0 + F_PATHPKG_CHECK = 0x34 + F_PEOFPOSMODE = 0x3 + F_PREALLOCATE = 0x2a + F_RDADVISE = 0x2c + F_RDAHEAD = 0x2d + F_RDLCK = 0x1 + F_SETBACKINGSTORE = 0x46 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x8 + F_SETLKW = 0x9 + F_SETLKWTIMEOUT = 0xa + F_SETNOSIGPIPE = 0x49 + F_SETOWN = 0x6 + F_SETPROTECTIONCLASS = 0x40 + F_SETSIZE = 0x2b + F_SINGLE_WRITER = 0x4c + F_THAW_FS = 0x36 + F_TRANSCODEKEY = 0x4b + F_UNLCK = 0x2 + F_VOLPOSMODE = 0x4 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFF_ALLMULTI = 0x200 + IFF_ALTPHYS = 0x4000 + IFF_BROADCAST = 0x2 + IFF_DEBUG = 0x4 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_AAL5 = 0x31 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ATM = 0x25 + IFT_BRIDGE = 0xd1 + IFT_CARP = 0xf8 + IFT_CELLULAR = 0xff + IFT_CEPT = 0x13 + IFT_DS3 = 0x1e + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_ETHER = 0x6 + IFT_FAITH = 0x38 + IFT_FDDI = 0xf + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_GIF = 0x37 + IFT_HDH1822 = 0x3 + IFT_HIPPI = 0x2f + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IEEE1394 = 0x90 + IFT_IEEE8023ADLAG = 0x88 + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88026 = 0xa + IFT_L2VLAN = 0x87 + IFT_LAPB = 0x10 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_NSIP = 0x1b + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PDP = 0xff + IFT_PFLOG = 0xf5 + IFT_PFSYNC = 0xf6 + IFT_PKTAP = 0xfe + IFT_PPP = 0x17 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PTPSERIAL = 0x16 + IFT_RS232 = 0x21 + IFT_SDLC = 0x11 + IFT_SIP = 0x1f + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_STARLAN = 0xb + IFT_STF = 0x39 + IFT_T1 = 0x12 + IFT_ULTRA = 0x1d + IFT_V35 = 0x2d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LINKLOCALNETNUM = 0xa9fe0000 + IN_LOOPBACKNET = 0x7f + IPPROTO_3PC = 0x22 + IPPROTO_ADFS = 0x44 + IPPROTO_AH = 0x33 + IPPROTO_AHIP = 0x3d + IPPROTO_APES = 0x63 + IPPROTO_ARGUS = 0xd + IPPROTO_AX25 = 0x5d + IPPROTO_BHA = 0x31 + IPPROTO_BLT = 0x1e + IPPROTO_BRSATMON = 0x4c + IPPROTO_CFTP = 0x3e + IPPROTO_CHAOS = 0x10 + IPPROTO_CMTP = 0x26 + IPPROTO_CPHB = 0x49 + IPPROTO_CPNX = 0x48 + IPPROTO_DDP = 0x25 + IPPROTO_DGP = 0x56 + IPPROTO_DIVERT = 0xfe + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_EMCON = 0xe + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GMTP = 0x64 + IPPROTO_GRE = 0x2f + IPPROTO_HELLO = 0x3f + IPPROTO_HMP = 0x14 + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IDPR = 0x23 + IPPROTO_IDRP = 0x2d + IPPROTO_IGMP = 0x2 + IPPROTO_IGP = 0x55 + IPPROTO_IGRP = 0x58 + IPPROTO_IL = 0x28 + IPPROTO_INLSP = 0x34 + IPPROTO_INP = 0x20 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPCV = 0x47 + IPPROTO_IPEIP = 0x5e + IPPROTO_IPIP = 0x4 + IPPROTO_IPPC = 0x43 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IRTP = 0x1c + IPPROTO_KRYPTOLAN = 0x41 + IPPROTO_LARP = 0x5b + IPPROTO_LEAF1 = 0x19 + IPPROTO_LEAF2 = 0x1a + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x34 + IPPROTO_MEAS = 0x13 + IPPROTO_MHRP = 0x30 + IPPROTO_MICP = 0x5f + IPPROTO_MTP = 0x5c + IPPROTO_MUX = 0x12 + IPPROTO_ND = 0x4d + IPPROTO_NHRP = 0x36 + IPPROTO_NONE = 0x3b + IPPROTO_NSP = 0x1f + IPPROTO_NVPII = 0xb + IPPROTO_OSPFIGP = 0x59 + IPPROTO_PGM = 0x71 + IPPROTO_PIGP = 0x9 + IPPROTO_PIM = 0x67 + IPPROTO_PRM = 0x15 + IPPROTO_PUP = 0xc + IPPROTO_PVP = 0x4b + IPPROTO_RAW = 0xff + IPPROTO_RCCMON = 0xa + IPPROTO_RDP = 0x1b + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_RVD = 0x42 + IPPROTO_SATEXPAK = 0x40 + IPPROTO_SATMON = 0x45 + IPPROTO_SCCSP = 0x60 + IPPROTO_SCTP = 0x84 + IPPROTO_SDRP = 0x2a + IPPROTO_SEP = 0x21 + IPPROTO_SRPC = 0x5a + IPPROTO_ST = 0x7 + IPPROTO_SVMTP = 0x52 + IPPROTO_SWIPE = 0x35 + IPPROTO_TCF = 0x57 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_TPXX = 0x27 + IPPROTO_TRUNK1 = 0x17 + IPPROTO_TRUNK2 = 0x18 + IPPROTO_TTP = 0x54 + IPPROTO_UDP = 0x11 + IPPROTO_VINES = 0x53 + IPPROTO_VISA = 0x46 + IPPROTO_VMTP = 0x51 + IPPROTO_WBEXPAK = 0x4f + IPPROTO_WBMON = 0x4e + IPPROTO_WSN = 0x4a + IPPROTO_XNET = 0xf + IPPROTO_XTP = 0x24 + IPV6_2292DSTOPTS = 0x17 + IPV6_2292HOPLIMIT = 0x14 + IPV6_2292HOPOPTS = 0x16 + IPV6_2292NEXTHOP = 0x15 + IPV6_2292PKTINFO = 0x13 + IPV6_2292PKTOPTIONS = 0x19 + IPV6_2292RTHDR = 0x18 + IPV6_BINDV6ONLY = 0x1b + IPV6_BOUND_IF = 0x7d + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x3c + IPV6_FW_ADD = 0x1e + IPV6_FW_DEL = 0x1f + IPV6_FW_FLUSH = 0x20 + IPV6_FW_GET = 0x22 + IPV6_FW_ZERO = 0x21 + IPV6_HLIMDEC = 0x1 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXOPTHDR = 0x800 + IPV6_MAXPACKET = 0xffff + IPV6_MAX_GROUP_SRC_FILTER = 0x200 + IPV6_MAX_MEMBERSHIPS = 0xfff + IPV6_MAX_SOCK_SRC_FILTER = 0x80 + IPV6_MIN_MEMBERSHIPS = 0x1f + IPV6_MMTU = 0x500 + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_RECVTCLASS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x24 + IPV6_UNICAST_HOPS = 0x4 + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_ADD_SOURCE_MEMBERSHIP = 0x46 + IP_BLOCK_SOURCE = 0x48 + IP_BOUND_IF = 0x19 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0xd + IP_DROP_SOURCE_MEMBERSHIP = 0x47 + IP_DUMMYNET_CONFIGURE = 0x3c + IP_DUMMYNET_DEL = 0x3d + IP_DUMMYNET_FLUSH = 0x3e + IP_DUMMYNET_GET = 0x40 + IP_FAITH = 0x16 + IP_FW_ADD = 0x28 + IP_FW_DEL = 0x29 + IP_FW_FLUSH = 0x2a + IP_FW_GET = 0x2c + IP_FW_RESETLOG = 0x2d + IP_FW_ZERO = 0x2b + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x15 + IP_MAXPACKET = 0xffff + IP_MAX_GROUP_SRC_FILTER = 0x200 + IP_MAX_MEMBERSHIPS = 0xfff + IP_MAX_SOCK_MUTE_FILTER = 0x80 + IP_MAX_SOCK_SRC_FILTER = 0x80 + IP_MF = 0x2000 + IP_MIN_MEMBERSHIPS = 0x1f + IP_MSFILTER = 0x4a + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_IFINDEX = 0x42 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_MULTICAST_VIF = 0xe + IP_NAT__XXX = 0x37 + IP_OFFMASK = 0x1fff + IP_OLD_FW_ADD = 0x32 + IP_OLD_FW_DEL = 0x33 + IP_OLD_FW_FLUSH = 0x34 + IP_OLD_FW_GET = 0x36 + IP_OLD_FW_RESETLOG = 0x38 + IP_OLD_FW_ZERO = 0x35 + IP_OPTIONS = 0x1 + IP_PKTINFO = 0x1a + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVPKTINFO = 0x1a + IP_RECVRETOPTS = 0x6 + IP_RECVTTL = 0x18 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RSVP_OFF = 0x10 + IP_RSVP_ON = 0xf + IP_RSVP_VIF_OFF = 0x12 + IP_RSVP_VIF_ON = 0x11 + IP_STRIPHDR = 0x17 + IP_TOS = 0x3 + IP_TRAFFIC_MGT_BACKGROUND = 0x41 + IP_TTL = 0x4 + IP_UNBLOCK_SOURCE = 0x49 + ISIG = 0x80 + ISTRIP = 0x20 + IUTF8 = 0x4000 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_CAN_REUSE = 0x9 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x5 + MADV_FREE_REUSABLE = 0x7 + MADV_FREE_REUSE = 0x8 + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_WILLNEED = 0x3 + MADV_ZERO_WIRED_PAGES = 0x6 + MAP_ANON = 0x1000 + MAP_COPY = 0x2 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_HASSEMAPHORE = 0x200 + MAP_JIT = 0x800 + MAP_NOCACHE = 0x400 + MAP_NOEXTEND = 0x100 + MAP_NORESERVE = 0x40 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_RESERVED0080 = 0x80 + MAP_SHARED = 0x1 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOF = 0x100 + MSG_EOR = 0x8 + MSG_FLUSH = 0x400 + MSG_HAVEMORE = 0x2000 + MSG_HOLD = 0x800 + MSG_NEEDSA = 0x10000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_RCVMORE = 0x4000 + MSG_SEND = 0x1000 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MSG_WAITSTREAM = 0x200 + MS_ASYNC = 0x1 + MS_DEACTIVATE = 0x8 + MS_INVALIDATE = 0x2 + MS_KILLPAGES = 0x4 + MS_SYNC = 0x10 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_DUMP2 = 0x7 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_IFLIST2 = 0x6 + NET_RT_MAXID = 0xa + NET_RT_STAT = 0x4 + NET_RT_TRASH = 0x5 + NOFLSH = 0x80000000 + NOTE_ABSOLUTE = 0x8 + NOTE_ATTRIB = 0x8 + NOTE_BACKGROUND = 0x40 + NOTE_CHILD = 0x4 + NOTE_CRITICAL = 0x20 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXITSTATUS = 0x4000000 + NOTE_EXIT_CSERROR = 0x40000 + NOTE_EXIT_DECRYPTFAIL = 0x10000 + NOTE_EXIT_DETAIL = 0x2000000 + NOTE_EXIT_DETAIL_MASK = 0x70000 + NOTE_EXIT_MEMORY = 0x20000 + NOTE_EXIT_REPARENTED = 0x80000 + NOTE_EXTEND = 0x4 + NOTE_FFAND = 0x40000000 + NOTE_FFCOPY = 0xc0000000 + NOTE_FFCTRLMASK = 0xc0000000 + NOTE_FFLAGSMASK = 0xffffff + NOTE_FFNOP = 0x0 + NOTE_FFOR = 0x80000000 + NOTE_FORK = 0x40000000 + NOTE_LEEWAY = 0x10 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_NONE = 0x80 + NOTE_NSECONDS = 0x4 + NOTE_PCTRLMASK = -0x100000 + NOTE_PDATAMASK = 0xfffff + NOTE_REAP = 0x10000000 + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_SECONDS = 0x1 + NOTE_SIGNAL = 0x8000000 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_TRIGGER = 0x1000000 + NOTE_USECONDS = 0x2 + NOTE_VM_ERROR = 0x10000000 + NOTE_VM_PRESSURE = 0x80000000 + NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000 + NOTE_VM_PRESSURE_TERMINATE = 0x40000000 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + OFDEL = 0x20000 + OFILL = 0x80 + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_ALERT = 0x20000000 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x1000000 + O_CREAT = 0x200 + O_DIRECTORY = 0x100000 + O_DP_GETRAWENCRYPTED = 0x1 + O_DSYNC = 0x400000 + O_EVTONLY = 0x8000 + O_EXCL = 0x800 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x20000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_POPUP = 0x80000000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_SHLOCK = 0x10 + O_SYMLINK = 0x200000 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PT_ATTACH = 0xa + PT_ATTACHEXC = 0xe + PT_CONTINUE = 0x7 + PT_DENY_ATTACH = 0x1f + PT_DETACH = 0xb + PT_FIRSTMACH = 0x20 + PT_FORCEQUOTA = 0x1e + PT_KILL = 0x8 + PT_READ_D = 0x2 + PT_READ_I = 0x1 + PT_READ_U = 0x3 + PT_SIGEXC = 0xc + PT_STEP = 0x9 + PT_THUPDATE = 0xd + PT_TRACE_ME = 0x0 + PT_WRITE_D = 0x5 + PT_WRITE_I = 0x4 + PT_WRITE_U = 0x6 + RLIMIT_AS = 0x5 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_CPU_USAGE_MONITOR = 0x2 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0x8 + RTAX_NETMASK = 0x2 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_NETMASK = 0x4 + RTF_BLACKHOLE = 0x1000 + RTF_BROADCAST = 0x400000 + RTF_CLONING = 0x100 + RTF_CONDEMNED = 0x2000000 + RTF_DELCLONE = 0x80 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_IFREF = 0x4000000 + RTF_IFSCOPE = 0x1000000 + RTF_LLINFO = 0x400 + RTF_LOCAL = 0x200000 + RTF_MODIFIED = 0x20 + RTF_MULTICAST = 0x800000 + RTF_NOIFREF = 0x2000 + RTF_PINNED = 0x100000 + RTF_PRCLONING = 0x10000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x40000 + RTF_PROXY = 0x8000000 + RTF_REJECT = 0x8 + RTF_ROUTER = 0x10000000 + RTF_STATIC = 0x800 + RTF_UP = 0x1 + RTF_WASCLONED = 0x20000 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DELMADDR = 0x10 + RTM_GET = 0x4 + RTM_GET2 = 0x14 + RTM_IFINFO = 0xe + RTM_IFINFO2 = 0x12 + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_NEWMADDR = 0xf + RTM_NEWMADDR2 = 0x13 + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x5 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + SCM_CREDS = 0x3 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x2 + SCM_TIMESTAMP_MONOTONIC = 0x4 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCAIFADDR = 0x8040691a + SIOCARPIPLL = 0xc0206928 + SIOCATMARK = 0x40047307 + SIOCAUTOADDR = 0xc0206926 + SIOCAUTONETMASK = 0x80206927 + SIOCDELMULTI = 0x80206932 + SIOCDIFADDR = 0x80206919 + SIOCDIFPHYADDR = 0x80206941 + SIOCGDRVSPEC = 0xc01c697b + SIOCGETVLAN = 0xc020697f + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0206921 + SIOCGIFALTMTU = 0xc0206948 + SIOCGIFASYNCMAP = 0xc020697c + SIOCGIFBOND = 0xc0206947 + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCAP = 0xc020695b + SIOCGIFCONF = 0xc0086924 + SIOCGIFDEVMTU = 0xc0206944 + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGENERIC = 0xc020693a + SIOCGIFKPI = 0xc0206987 + SIOCGIFMAC = 0xc0206982 + SIOCGIFMEDIA = 0xc0286938 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc0206933 + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPDSTADDR = 0xc0206940 + SIOCGIFPHYS = 0xc0206935 + SIOCGIFPSRCADDR = 0xc020693f + SIOCGIFSTATUS = 0xc331693d + SIOCGIFVLAN = 0xc020697f + SIOCGIFWAKEFLAGS = 0xc0206988 + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCIFCREATE = 0xc0206978 + SIOCIFCREATE2 = 0xc020697a + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc00c6981 + SIOCRSLVMULTI = 0xc008693b + SIOCSDRVSPEC = 0x801c697b + SIOCSETVLAN = 0x8020697e + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c + SIOCSIFALTMTU = 0x80206945 + SIOCSIFASYNCMAP = 0x8020697d + SIOCSIFBOND = 0x80206946 + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFCAP = 0x8020695a + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGENERIC = 0x80206939 + SIOCSIFKPI = 0x80206986 + SIOCSIFLLADDR = 0x8020693c + SIOCSIFMAC = 0x80206983 + SIOCSIFMEDIA = 0xc0206937 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x80206934 + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPHYADDR = 0x8040693e + SIOCSIFPHYS = 0x80206936 + SIOCSIFVLAN = 0x8020697e + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SOCK_DGRAM = 0x2 + SOCK_MAXADDRLEN = 0xff + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_DONTTRUNC = 0x2000 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LABEL = 0x1010 + SO_LINGER = 0x80 + SO_LINGER_SEC = 0x1080 + SO_NKE = 0x1021 + SO_NOADDRERR = 0x1023 + SO_NOSIGPIPE = 0x1022 + SO_NOTIFYCONFLICT = 0x1026 + SO_NP_EXTENSIONS = 0x1083 + SO_NREAD = 0x1020 + SO_NUMRCVPKT = 0x1112 + SO_NWRITE = 0x1024 + SO_OOBINLINE = 0x100 + SO_PEERLABEL = 0x1011 + SO_RANDOMPORT = 0x1082 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_REUSESHAREUID = 0x1025 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_TIMESTAMP = 0x400 + SO_TIMESTAMP_MONOTONIC = 0x800 + SO_TYPE = 0x1008 + SO_UPCALLCLOSEWAIT = 0x1027 + SO_USELOOPBACK = 0x40 + SO_WANTMORE = 0x4000 + SO_WANTOOBFLAG = 0x8000 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IFWHT = 0xe000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISTXT = 0x200 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_CONNECTIONTIMEOUT = 0x20 + TCP_ENABLE_ECN = 0x104 + TCP_KEEPALIVE = 0x10 + TCP_KEEPCNT = 0x102 + TCP_KEEPINTVL = 0x101 + TCP_MAXHLEN = 0x3c + TCP_MAXOLEN = 0x28 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_SACK = 0x4 + TCP_MAX_WINSHIFT = 0xe + TCP_MINMSS = 0xd8 + TCP_MSS = 0x200 + TCP_NODELAY = 0x1 + TCP_NOOPT = 0x8 + TCP_NOPUSH = 0x4 + TCP_NOTSENT_LOWAT = 0x201 + TCP_RXT_CONNDROPTIME = 0x80 + TCP_RXT_FINDROP = 0x100 + TCP_SENDMOREACKS = 0x103 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDCDTIMESTAMP = 0x40087458 + TIOCDRAIN = 0x2000745e + TIOCDSIMICROCODE = 0x20007455 + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLUSH = 0x80047410 + TIOCGDRAINWAIT = 0x40047456 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGPGRP = 0x40047477 + TIOCGWINSZ = 0x40087468 + TIOCIXOFF = 0x20007480 + TIOCIXON = 0x20007481 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGDTRWAIT = 0x4004745a + TIOCMGET = 0x4004746a + TIOCMODG = 0x40047403 + TIOCMODS = 0x80047404 + TIOCMSDTRWAIT = 0x8004745b + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCPTYGNAME = 0x40807453 + TIOCPTYGRANT = 0x20007454 + TIOCPTYUNLK = 0x20007452 + TIOCREMOTE = 0x80047469 + TIOCSBRK = 0x2000747b + TIOCSCONS = 0x20007463 + TIOCSCTTY = 0x20007461 + TIOCSDRAINWAIT = 0x80047457 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSIG = 0x2000745f + TIOCSPGRP = 0x80047476 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x20007465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCTIMESTAMP = 0x40087459 + TIOCUCNTL = 0x80047466 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VT0 = 0x0 + VT1 = 0x10000 + VTDLY = 0x10000 + VTIME = 0x11 + VWERASE = 0x4 + WCONTINUED = 0x10 + WCOREFLAG = 0x80 + WEXITED = 0x4 + WNOHANG = 0x1 + WNOWAIT = 0x20 + WORDSIZE = 0x20 + WSTOPPED = 0x8 + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADARCH = syscall.Errno(0x56) + EBADEXEC = syscall.Errno(0x55) + EBADF = syscall.Errno(0x9) + EBADMACHO = syscall.Errno(0x58) + EBADMSG = syscall.Errno(0x5e) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x59) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDEVERR = syscall.Errno(0x53) + EDOM = syscall.Errno(0x21) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x5a) + EILSEQ = syscall.Errno(0x5c) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x6a) + ELOOP = syscall.Errno(0x3e) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + EMULTIHOP = syscall.Errno(0x5f) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x5d) + ENOBUFS = syscall.Errno(0x37) + ENODATA = syscall.Errno(0x60) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOLINK = syscall.Errno(0x61) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x5b) + ENOPOLICY = syscall.Errno(0x67) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x62) + ENOSTR = syscall.Errno(0x63) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTRECOVERABLE = syscall.Errno(0x68) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x2d) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x66) + EOVERFLOW = syscall.Errno(0x54) + EOWNERDEAD = syscall.Errno(0x69) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x64) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + EPWROFF = syscall.Errno(0x52) + EQFULL = syscall.Errno(0x6a) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHLIBVERS = syscall.Errno(0x57) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIME = syscall.Errno(0x65) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "resource busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "operation timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "device power is off", + 83: "device error", + 84: "value too large to be stored in data type", + 85: "bad executable (or shared library)", + 86: "bad CPU type in executable", + 87: "shared library version mismatch", + 88: "malformed Mach-o file", + 89: "operation canceled", + 90: "identifier removed", + 91: "no message of desired type", + 92: "illegal byte sequence", + 93: "attribute not found", + 94: "bad message", + 95: "EMULTIHOP (Reserved)", + 96: "no message available on STREAM", + 97: "ENOLINK (Reserved)", + 98: "no STREAM resources", + 99: "not a STREAM", + 100: "protocol error", + 101: "STREAM ioctl timeout", + 102: "operation not supported on socket", + 103: "policy not found", + 104: "state not recoverable", + 105: "previous owner died", + 106: "interface output queue is full", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "suspended (signal)", + 18: "suspended", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go new file mode 100644 index 0000000..9594f93 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go @@ -0,0 +1,1576 @@ +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,darwin + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m64 _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1c + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x25 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x1e + AF_IPX = 0x17 + AF_ISDN = 0x1c + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x28 + AF_NATM = 0x1f + AF_NDRV = 0x1b + AF_NETBIOS = 0x21 + AF_NS = 0x6 + AF_OSI = 0x7 + AF_PPP = 0x22 + AF_PUP = 0x4 + AF_RESERVED_36 = 0x24 + AF_ROUTE = 0x11 + AF_SIP = 0x18 + AF_SNA = 0xb + AF_SYSTEM = 0x20 + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_UTUN = 0x26 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B9600 = 0x2580 + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc00c4279 + BIOCGETIF = 0x4020426b + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044272 + BIOCGRTIMEOUT = 0x4010426e + BIOCGSEESENT = 0x40044276 + BIOCGSTATS = 0x4008426f + BIOCIMMEDIATE = 0x80044270 + BIOCPROMISC = 0x20004269 + BIOCSBLEN = 0xc0044266 + BIOCSDLT = 0x80044278 + BIOCSETF = 0x80104267 + BIOCSETFNR = 0x8010427e + BIOCSETIF = 0x8020426c + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044273 + BIOCSRTIMEOUT = 0x8010426d + BIOCSSEESENT = 0x80044277 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x80000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0xc + CTL_NET = 0x4 + DLT_A429 = 0xb8 + DLT_A653_ICM = 0xb9 + DLT_AIRONET_HEADER = 0x78 + DLT_AOS = 0xde + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_AX25_KISS = 0xca + DLT_BACNET_MS_TP = 0xa5 + DLT_BLUETOOTH_HCI_H4 = 0xbb + DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 + DLT_CAN20B = 0xbe + DLT_CAN_SOCKETCAN = 0xe3 + DLT_CHAOS = 0x5 + DLT_CHDLC = 0x68 + DLT_CISCO_IOS = 0x76 + DLT_C_HDLC = 0x68 + DLT_C_HDLC_WITH_DIR = 0xcd + DLT_DBUS = 0xe7 + DLT_DECT = 0xdd + DLT_DOCSIS = 0x8f + DLT_DVB_CI = 0xeb + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_ERF = 0xc5 + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FC_2 = 0xe0 + DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 + DLT_FDDI = 0xa + DLT_FLEXRAY = 0xd2 + DLT_FRELAY = 0x6b + DLT_FRELAY_WITH_DIR = 0xce + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_GSMTAP_ABIS = 0xda + DLT_GSMTAP_UM = 0xd9 + DLT_HHDLC = 0x79 + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IEEE802_15_4 = 0xc3 + DLT_IEEE802_15_4_LINUX = 0xbf + DLT_IEEE802_15_4_NOFCS = 0xe6 + DLT_IEEE802_15_4_NONASK_PHY = 0xd7 + DLT_IEEE802_16_MAC_CPS = 0xbc + DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 + DLT_IPFILTER = 0x74 + DLT_IPMB = 0xc7 + DLT_IPMB_LINUX = 0xd1 + DLT_IPNET = 0xe2 + DLT_IPOIB = 0xf2 + DLT_IPV4 = 0xe4 + DLT_IPV6 = 0xe5 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_ATM_CEMIC = 0xee + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FIBRECHANNEL = 0xea + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_ISM = 0xc2 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_JUNIPER_SRX_E2E = 0xe9 + DLT_JUNIPER_ST = 0xc8 + DLT_JUNIPER_VP = 0xb7 + DLT_JUNIPER_VS = 0xe8 + DLT_LAPB_WITH_DIR = 0xcf + DLT_LAPD = 0xcb + DLT_LIN = 0xd4 + DLT_LINUX_EVDEV = 0xd8 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_PPP_WITHDIRECTION = 0xa6 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MATCHING_MAX = 0xf5 + DLT_MATCHING_MIN = 0x68 + DLT_MFR = 0xb6 + DLT_MOST = 0xd3 + DLT_MPEG_2_TS = 0xf3 + DLT_MPLS = 0xdb + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_MUX27010 = 0xec + DLT_NETANALYZER = 0xf0 + DLT_NETANALYZER_TRANSPARENT = 0xf1 + DLT_NFC_LLCP = 0xf5 + DLT_NFLOG = 0xef + DLT_NG40 = 0xf4 + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPI = 0xc0 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0x10 + DLT_PPP_ETHER = 0x33 + DLT_PPP_PPPD = 0xa6 + DLT_PPP_SERIAL = 0x32 + DLT_PPP_WITH_DIR = 0xcc + DLT_PPP_WITH_DIRECTION = 0xa6 + DLT_PRISM_HEADER = 0x77 + DLT_PRONET = 0x4 + DLT_RAIF1 = 0xc6 + DLT_RAW = 0xc + DLT_RIO = 0x7c + DLT_SCCP = 0x8e + DLT_SITA = 0xc4 + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf + DLT_STANAG_5066_D_PDU = 0xed + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + DLT_USB = 0xba + DLT_USB_LINUX = 0xbd + DLT_USB_LINUX_MMAPPED = 0xdc + DLT_USER0 = 0x93 + DLT_USER1 = 0x94 + DLT_USER10 = 0x9d + DLT_USER11 = 0x9e + DLT_USER12 = 0x9f + DLT_USER13 = 0xa0 + DLT_USER14 = 0xa1 + DLT_USER15 = 0xa2 + DLT_USER2 = 0x95 + DLT_USER3 = 0x96 + DLT_USER4 = 0x97 + DLT_USER5 = 0x98 + DLT_USER6 = 0x99 + DLT_USER7 = 0x9a + DLT_USER8 = 0x9b + DLT_USER9 = 0x9c + DLT_WIHART = 0xdf + DLT_X2E_SERIAL = 0xd5 + DLT_X2E_XORAYA = 0xd6 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EVFILT_AIO = -0x3 + EVFILT_FS = -0x9 + EVFILT_MACHPORT = -0x8 + EVFILT_PROC = -0x5 + EVFILT_READ = -0x1 + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0xe + EVFILT_THREADMARKER = 0xe + EVFILT_TIMER = -0x7 + EVFILT_USER = -0xa + EVFILT_VM = -0xc + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_DISPATCH = 0x80 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG0 = 0x1000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_OOBAND = 0x2000 + EV_POLL = 0x1000 + EV_RECEIPT = 0x40 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_ADDFILESIGS = 0x3d + F_ADDSIGS = 0x3b + F_ALLOCATEALL = 0x4 + F_ALLOCATECONTIG = 0x2 + F_CHKCLEAN = 0x29 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x43 + F_FINDSIGS = 0x4e + F_FLUSH_DATA = 0x28 + F_FREEZE_FS = 0x35 + F_FULLFSYNC = 0x33 + F_GETCODEDIR = 0x48 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0x7 + F_GETLKPID = 0x42 + F_GETNOSIGPIPE = 0x4a + F_GETOWN = 0x5 + F_GETPATH = 0x32 + F_GETPATH_MTMINFO = 0x47 + F_GETPROTECTIONCLASS = 0x3f + F_GETPROTECTIONLEVEL = 0x4d + F_GLOBAL_NOCACHE = 0x37 + F_LOG2PHYS = 0x31 + F_LOG2PHYS_EXT = 0x41 + F_NOCACHE = 0x30 + F_NODIRECT = 0x3e + F_OK = 0x0 + F_PATHPKG_CHECK = 0x34 + F_PEOFPOSMODE = 0x3 + F_PREALLOCATE = 0x2a + F_RDADVISE = 0x2c + F_RDAHEAD = 0x2d + F_RDLCK = 0x1 + F_SETBACKINGSTORE = 0x46 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x8 + F_SETLKW = 0x9 + F_SETLKWTIMEOUT = 0xa + F_SETNOSIGPIPE = 0x49 + F_SETOWN = 0x6 + F_SETPROTECTIONCLASS = 0x40 + F_SETSIZE = 0x2b + F_SINGLE_WRITER = 0x4c + F_THAW_FS = 0x36 + F_TRANSCODEKEY = 0x4b + F_UNLCK = 0x2 + F_VOLPOSMODE = 0x4 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFF_ALLMULTI = 0x200 + IFF_ALTPHYS = 0x4000 + IFF_BROADCAST = 0x2 + IFF_DEBUG = 0x4 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_AAL5 = 0x31 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ATM = 0x25 + IFT_BRIDGE = 0xd1 + IFT_CARP = 0xf8 + IFT_CELLULAR = 0xff + IFT_CEPT = 0x13 + IFT_DS3 = 0x1e + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_ETHER = 0x6 + IFT_FAITH = 0x38 + IFT_FDDI = 0xf + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_GIF = 0x37 + IFT_HDH1822 = 0x3 + IFT_HIPPI = 0x2f + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IEEE1394 = 0x90 + IFT_IEEE8023ADLAG = 0x88 + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88026 = 0xa + IFT_L2VLAN = 0x87 + IFT_LAPB = 0x10 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_NSIP = 0x1b + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PDP = 0xff + IFT_PFLOG = 0xf5 + IFT_PFSYNC = 0xf6 + IFT_PKTAP = 0xfe + IFT_PPP = 0x17 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PTPSERIAL = 0x16 + IFT_RS232 = 0x21 + IFT_SDLC = 0x11 + IFT_SIP = 0x1f + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_STARLAN = 0xb + IFT_STF = 0x39 + IFT_T1 = 0x12 + IFT_ULTRA = 0x1d + IFT_V35 = 0x2d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LINKLOCALNETNUM = 0xa9fe0000 + IN_LOOPBACKNET = 0x7f + IPPROTO_3PC = 0x22 + IPPROTO_ADFS = 0x44 + IPPROTO_AH = 0x33 + IPPROTO_AHIP = 0x3d + IPPROTO_APES = 0x63 + IPPROTO_ARGUS = 0xd + IPPROTO_AX25 = 0x5d + IPPROTO_BHA = 0x31 + IPPROTO_BLT = 0x1e + IPPROTO_BRSATMON = 0x4c + IPPROTO_CFTP = 0x3e + IPPROTO_CHAOS = 0x10 + IPPROTO_CMTP = 0x26 + IPPROTO_CPHB = 0x49 + IPPROTO_CPNX = 0x48 + IPPROTO_DDP = 0x25 + IPPROTO_DGP = 0x56 + IPPROTO_DIVERT = 0xfe + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_EMCON = 0xe + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GMTP = 0x64 + IPPROTO_GRE = 0x2f + IPPROTO_HELLO = 0x3f + IPPROTO_HMP = 0x14 + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IDPR = 0x23 + IPPROTO_IDRP = 0x2d + IPPROTO_IGMP = 0x2 + IPPROTO_IGP = 0x55 + IPPROTO_IGRP = 0x58 + IPPROTO_IL = 0x28 + IPPROTO_INLSP = 0x34 + IPPROTO_INP = 0x20 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPCV = 0x47 + IPPROTO_IPEIP = 0x5e + IPPROTO_IPIP = 0x4 + IPPROTO_IPPC = 0x43 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IRTP = 0x1c + IPPROTO_KRYPTOLAN = 0x41 + IPPROTO_LARP = 0x5b + IPPROTO_LEAF1 = 0x19 + IPPROTO_LEAF2 = 0x1a + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x34 + IPPROTO_MEAS = 0x13 + IPPROTO_MHRP = 0x30 + IPPROTO_MICP = 0x5f + IPPROTO_MTP = 0x5c + IPPROTO_MUX = 0x12 + IPPROTO_ND = 0x4d + IPPROTO_NHRP = 0x36 + IPPROTO_NONE = 0x3b + IPPROTO_NSP = 0x1f + IPPROTO_NVPII = 0xb + IPPROTO_OSPFIGP = 0x59 + IPPROTO_PGM = 0x71 + IPPROTO_PIGP = 0x9 + IPPROTO_PIM = 0x67 + IPPROTO_PRM = 0x15 + IPPROTO_PUP = 0xc + IPPROTO_PVP = 0x4b + IPPROTO_RAW = 0xff + IPPROTO_RCCMON = 0xa + IPPROTO_RDP = 0x1b + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_RVD = 0x42 + IPPROTO_SATEXPAK = 0x40 + IPPROTO_SATMON = 0x45 + IPPROTO_SCCSP = 0x60 + IPPROTO_SCTP = 0x84 + IPPROTO_SDRP = 0x2a + IPPROTO_SEP = 0x21 + IPPROTO_SRPC = 0x5a + IPPROTO_ST = 0x7 + IPPROTO_SVMTP = 0x52 + IPPROTO_SWIPE = 0x35 + IPPROTO_TCF = 0x57 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_TPXX = 0x27 + IPPROTO_TRUNK1 = 0x17 + IPPROTO_TRUNK2 = 0x18 + IPPROTO_TTP = 0x54 + IPPROTO_UDP = 0x11 + IPPROTO_VINES = 0x53 + IPPROTO_VISA = 0x46 + IPPROTO_VMTP = 0x51 + IPPROTO_WBEXPAK = 0x4f + IPPROTO_WBMON = 0x4e + IPPROTO_WSN = 0x4a + IPPROTO_XNET = 0xf + IPPROTO_XTP = 0x24 + IPV6_2292DSTOPTS = 0x17 + IPV6_2292HOPLIMIT = 0x14 + IPV6_2292HOPOPTS = 0x16 + IPV6_2292NEXTHOP = 0x15 + IPV6_2292PKTINFO = 0x13 + IPV6_2292PKTOPTIONS = 0x19 + IPV6_2292RTHDR = 0x18 + IPV6_BINDV6ONLY = 0x1b + IPV6_BOUND_IF = 0x7d + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x3c + IPV6_FW_ADD = 0x1e + IPV6_FW_DEL = 0x1f + IPV6_FW_FLUSH = 0x20 + IPV6_FW_GET = 0x22 + IPV6_FW_ZERO = 0x21 + IPV6_HLIMDEC = 0x1 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXOPTHDR = 0x800 + IPV6_MAXPACKET = 0xffff + IPV6_MAX_GROUP_SRC_FILTER = 0x200 + IPV6_MAX_MEMBERSHIPS = 0xfff + IPV6_MAX_SOCK_SRC_FILTER = 0x80 + IPV6_MIN_MEMBERSHIPS = 0x1f + IPV6_MMTU = 0x500 + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_RECVTCLASS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x24 + IPV6_UNICAST_HOPS = 0x4 + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_ADD_SOURCE_MEMBERSHIP = 0x46 + IP_BLOCK_SOURCE = 0x48 + IP_BOUND_IF = 0x19 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0xd + IP_DROP_SOURCE_MEMBERSHIP = 0x47 + IP_DUMMYNET_CONFIGURE = 0x3c + IP_DUMMYNET_DEL = 0x3d + IP_DUMMYNET_FLUSH = 0x3e + IP_DUMMYNET_GET = 0x40 + IP_FAITH = 0x16 + IP_FW_ADD = 0x28 + IP_FW_DEL = 0x29 + IP_FW_FLUSH = 0x2a + IP_FW_GET = 0x2c + IP_FW_RESETLOG = 0x2d + IP_FW_ZERO = 0x2b + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x15 + IP_MAXPACKET = 0xffff + IP_MAX_GROUP_SRC_FILTER = 0x200 + IP_MAX_MEMBERSHIPS = 0xfff + IP_MAX_SOCK_MUTE_FILTER = 0x80 + IP_MAX_SOCK_SRC_FILTER = 0x80 + IP_MF = 0x2000 + IP_MIN_MEMBERSHIPS = 0x1f + IP_MSFILTER = 0x4a + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_IFINDEX = 0x42 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_MULTICAST_VIF = 0xe + IP_NAT__XXX = 0x37 + IP_OFFMASK = 0x1fff + IP_OLD_FW_ADD = 0x32 + IP_OLD_FW_DEL = 0x33 + IP_OLD_FW_FLUSH = 0x34 + IP_OLD_FW_GET = 0x36 + IP_OLD_FW_RESETLOG = 0x38 + IP_OLD_FW_ZERO = 0x35 + IP_OPTIONS = 0x1 + IP_PKTINFO = 0x1a + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVPKTINFO = 0x1a + IP_RECVRETOPTS = 0x6 + IP_RECVTTL = 0x18 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RSVP_OFF = 0x10 + IP_RSVP_ON = 0xf + IP_RSVP_VIF_OFF = 0x12 + IP_RSVP_VIF_ON = 0x11 + IP_STRIPHDR = 0x17 + IP_TOS = 0x3 + IP_TRAFFIC_MGT_BACKGROUND = 0x41 + IP_TTL = 0x4 + IP_UNBLOCK_SOURCE = 0x49 + ISIG = 0x80 + ISTRIP = 0x20 + IUTF8 = 0x4000 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_CAN_REUSE = 0x9 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x5 + MADV_FREE_REUSABLE = 0x7 + MADV_FREE_REUSE = 0x8 + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_WILLNEED = 0x3 + MADV_ZERO_WIRED_PAGES = 0x6 + MAP_ANON = 0x1000 + MAP_COPY = 0x2 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_HASSEMAPHORE = 0x200 + MAP_JIT = 0x800 + MAP_NOCACHE = 0x400 + MAP_NOEXTEND = 0x100 + MAP_NORESERVE = 0x40 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_RESERVED0080 = 0x80 + MAP_SHARED = 0x1 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOF = 0x100 + MSG_EOR = 0x8 + MSG_FLUSH = 0x400 + MSG_HAVEMORE = 0x2000 + MSG_HOLD = 0x800 + MSG_NEEDSA = 0x10000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_RCVMORE = 0x4000 + MSG_SEND = 0x1000 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MSG_WAITSTREAM = 0x200 + MS_ASYNC = 0x1 + MS_DEACTIVATE = 0x8 + MS_INVALIDATE = 0x2 + MS_KILLPAGES = 0x4 + MS_SYNC = 0x10 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_DUMP2 = 0x7 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_IFLIST2 = 0x6 + NET_RT_MAXID = 0xa + NET_RT_STAT = 0x4 + NET_RT_TRASH = 0x5 + NOFLSH = 0x80000000 + NOTE_ABSOLUTE = 0x8 + NOTE_ATTRIB = 0x8 + NOTE_BACKGROUND = 0x40 + NOTE_CHILD = 0x4 + NOTE_CRITICAL = 0x20 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXITSTATUS = 0x4000000 + NOTE_EXIT_CSERROR = 0x40000 + NOTE_EXIT_DECRYPTFAIL = 0x10000 + NOTE_EXIT_DETAIL = 0x2000000 + NOTE_EXIT_DETAIL_MASK = 0x70000 + NOTE_EXIT_MEMORY = 0x20000 + NOTE_EXIT_REPARENTED = 0x80000 + NOTE_EXTEND = 0x4 + NOTE_FFAND = 0x40000000 + NOTE_FFCOPY = 0xc0000000 + NOTE_FFCTRLMASK = 0xc0000000 + NOTE_FFLAGSMASK = 0xffffff + NOTE_FFNOP = 0x0 + NOTE_FFOR = 0x80000000 + NOTE_FORK = 0x40000000 + NOTE_LEEWAY = 0x10 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_NONE = 0x80 + NOTE_NSECONDS = 0x4 + NOTE_PCTRLMASK = -0x100000 + NOTE_PDATAMASK = 0xfffff + NOTE_REAP = 0x10000000 + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_SECONDS = 0x1 + NOTE_SIGNAL = 0x8000000 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_TRIGGER = 0x1000000 + NOTE_USECONDS = 0x2 + NOTE_VM_ERROR = 0x10000000 + NOTE_VM_PRESSURE = 0x80000000 + NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000 + NOTE_VM_PRESSURE_TERMINATE = 0x40000000 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + OFDEL = 0x20000 + OFILL = 0x80 + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_ALERT = 0x20000000 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x1000000 + O_CREAT = 0x200 + O_DIRECTORY = 0x100000 + O_DP_GETRAWENCRYPTED = 0x1 + O_DSYNC = 0x400000 + O_EVTONLY = 0x8000 + O_EXCL = 0x800 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x20000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_POPUP = 0x80000000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_SHLOCK = 0x10 + O_SYMLINK = 0x200000 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PT_ATTACH = 0xa + PT_ATTACHEXC = 0xe + PT_CONTINUE = 0x7 + PT_DENY_ATTACH = 0x1f + PT_DETACH = 0xb + PT_FIRSTMACH = 0x20 + PT_FORCEQUOTA = 0x1e + PT_KILL = 0x8 + PT_READ_D = 0x2 + PT_READ_I = 0x1 + PT_READ_U = 0x3 + PT_SIGEXC = 0xc + PT_STEP = 0x9 + PT_THUPDATE = 0xd + PT_TRACE_ME = 0x0 + PT_WRITE_D = 0x5 + PT_WRITE_I = 0x4 + PT_WRITE_U = 0x6 + RLIMIT_AS = 0x5 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_CPU_USAGE_MONITOR = 0x2 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0x8 + RTAX_NETMASK = 0x2 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_NETMASK = 0x4 + RTF_BLACKHOLE = 0x1000 + RTF_BROADCAST = 0x400000 + RTF_CLONING = 0x100 + RTF_CONDEMNED = 0x2000000 + RTF_DELCLONE = 0x80 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_IFREF = 0x4000000 + RTF_IFSCOPE = 0x1000000 + RTF_LLINFO = 0x400 + RTF_LOCAL = 0x200000 + RTF_MODIFIED = 0x20 + RTF_MULTICAST = 0x800000 + RTF_NOIFREF = 0x2000 + RTF_PINNED = 0x100000 + RTF_PRCLONING = 0x10000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x40000 + RTF_PROXY = 0x8000000 + RTF_REJECT = 0x8 + RTF_ROUTER = 0x10000000 + RTF_STATIC = 0x800 + RTF_UP = 0x1 + RTF_WASCLONED = 0x20000 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DELMADDR = 0x10 + RTM_GET = 0x4 + RTM_GET2 = 0x14 + RTM_IFINFO = 0xe + RTM_IFINFO2 = 0x12 + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_NEWMADDR = 0xf + RTM_NEWMADDR2 = 0x13 + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x5 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + SCM_CREDS = 0x3 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x2 + SCM_TIMESTAMP_MONOTONIC = 0x4 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCAIFADDR = 0x8040691a + SIOCARPIPLL = 0xc0206928 + SIOCATMARK = 0x40047307 + SIOCAUTOADDR = 0xc0206926 + SIOCAUTONETMASK = 0x80206927 + SIOCDELMULTI = 0x80206932 + SIOCDIFADDR = 0x80206919 + SIOCDIFPHYADDR = 0x80206941 + SIOCGDRVSPEC = 0xc028697b + SIOCGETVLAN = 0xc020697f + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0206921 + SIOCGIFALTMTU = 0xc0206948 + SIOCGIFASYNCMAP = 0xc020697c + SIOCGIFBOND = 0xc0206947 + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCAP = 0xc020695b + SIOCGIFCONF = 0xc00c6924 + SIOCGIFDEVMTU = 0xc0206944 + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGENERIC = 0xc020693a + SIOCGIFKPI = 0xc0206987 + SIOCGIFMAC = 0xc0206982 + SIOCGIFMEDIA = 0xc02c6938 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc0206933 + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPDSTADDR = 0xc0206940 + SIOCGIFPHYS = 0xc0206935 + SIOCGIFPSRCADDR = 0xc020693f + SIOCGIFSTATUS = 0xc331693d + SIOCGIFVLAN = 0xc020697f + SIOCGIFWAKEFLAGS = 0xc0206988 + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCIFCREATE = 0xc0206978 + SIOCIFCREATE2 = 0xc020697a + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc0106981 + SIOCRSLVMULTI = 0xc010693b + SIOCSDRVSPEC = 0x8028697b + SIOCSETVLAN = 0x8020697e + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c + SIOCSIFALTMTU = 0x80206945 + SIOCSIFASYNCMAP = 0x8020697d + SIOCSIFBOND = 0x80206946 + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFCAP = 0x8020695a + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGENERIC = 0x80206939 + SIOCSIFKPI = 0x80206986 + SIOCSIFLLADDR = 0x8020693c + SIOCSIFMAC = 0x80206983 + SIOCSIFMEDIA = 0xc0206937 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x80206934 + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPHYADDR = 0x8040693e + SIOCSIFPHYS = 0x80206936 + SIOCSIFVLAN = 0x8020697e + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SOCK_DGRAM = 0x2 + SOCK_MAXADDRLEN = 0xff + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_DONTTRUNC = 0x2000 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LABEL = 0x1010 + SO_LINGER = 0x80 + SO_LINGER_SEC = 0x1080 + SO_NKE = 0x1021 + SO_NOADDRERR = 0x1023 + SO_NOSIGPIPE = 0x1022 + SO_NOTIFYCONFLICT = 0x1026 + SO_NP_EXTENSIONS = 0x1083 + SO_NREAD = 0x1020 + SO_NUMRCVPKT = 0x1112 + SO_NWRITE = 0x1024 + SO_OOBINLINE = 0x100 + SO_PEERLABEL = 0x1011 + SO_RANDOMPORT = 0x1082 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_REUSESHAREUID = 0x1025 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_TIMESTAMP = 0x400 + SO_TIMESTAMP_MONOTONIC = 0x800 + SO_TYPE = 0x1008 + SO_UPCALLCLOSEWAIT = 0x1027 + SO_USELOOPBACK = 0x40 + SO_WANTMORE = 0x4000 + SO_WANTOOBFLAG = 0x8000 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IFWHT = 0xe000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISTXT = 0x200 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_CONNECTIONTIMEOUT = 0x20 + TCP_ENABLE_ECN = 0x104 + TCP_KEEPALIVE = 0x10 + TCP_KEEPCNT = 0x102 + TCP_KEEPINTVL = 0x101 + TCP_MAXHLEN = 0x3c + TCP_MAXOLEN = 0x28 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_SACK = 0x4 + TCP_MAX_WINSHIFT = 0xe + TCP_MINMSS = 0xd8 + TCP_MSS = 0x200 + TCP_NODELAY = 0x1 + TCP_NOOPT = 0x8 + TCP_NOPUSH = 0x4 + TCP_NOTSENT_LOWAT = 0x201 + TCP_RXT_CONNDROPTIME = 0x80 + TCP_RXT_FINDROP = 0x100 + TCP_SENDMOREACKS = 0x103 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDCDTIMESTAMP = 0x40107458 + TIOCDRAIN = 0x2000745e + TIOCDSIMICROCODE = 0x20007455 + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLUSH = 0x80047410 + TIOCGDRAINWAIT = 0x40047456 + TIOCGETA = 0x40487413 + TIOCGETD = 0x4004741a + TIOCGPGRP = 0x40047477 + TIOCGWINSZ = 0x40087468 + TIOCIXOFF = 0x20007480 + TIOCIXON = 0x20007481 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGDTRWAIT = 0x4004745a + TIOCMGET = 0x4004746a + TIOCMODG = 0x40047403 + TIOCMODS = 0x80047404 + TIOCMSDTRWAIT = 0x8004745b + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCPTYGNAME = 0x40807453 + TIOCPTYGRANT = 0x20007454 + TIOCPTYUNLK = 0x20007452 + TIOCREMOTE = 0x80047469 + TIOCSBRK = 0x2000747b + TIOCSCONS = 0x20007463 + TIOCSCTTY = 0x20007461 + TIOCSDRAINWAIT = 0x80047457 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x80487414 + TIOCSETAF = 0x80487416 + TIOCSETAW = 0x80487415 + TIOCSETD = 0x8004741b + TIOCSIG = 0x2000745f + TIOCSPGRP = 0x80047476 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x20007465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCTIMESTAMP = 0x40107459 + TIOCUCNTL = 0x80047466 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VT0 = 0x0 + VT1 = 0x10000 + VTDLY = 0x10000 + VTIME = 0x11 + VWERASE = 0x4 + WCONTINUED = 0x10 + WCOREFLAG = 0x80 + WEXITED = 0x4 + WNOHANG = 0x1 + WNOWAIT = 0x20 + WORDSIZE = 0x40 + WSTOPPED = 0x8 + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADARCH = syscall.Errno(0x56) + EBADEXEC = syscall.Errno(0x55) + EBADF = syscall.Errno(0x9) + EBADMACHO = syscall.Errno(0x58) + EBADMSG = syscall.Errno(0x5e) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x59) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDEVERR = syscall.Errno(0x53) + EDOM = syscall.Errno(0x21) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x5a) + EILSEQ = syscall.Errno(0x5c) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x6a) + ELOOP = syscall.Errno(0x3e) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + EMULTIHOP = syscall.Errno(0x5f) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x5d) + ENOBUFS = syscall.Errno(0x37) + ENODATA = syscall.Errno(0x60) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOLINK = syscall.Errno(0x61) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x5b) + ENOPOLICY = syscall.Errno(0x67) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x62) + ENOSTR = syscall.Errno(0x63) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTRECOVERABLE = syscall.Errno(0x68) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x2d) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x66) + EOVERFLOW = syscall.Errno(0x54) + EOWNERDEAD = syscall.Errno(0x69) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x64) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + EPWROFF = syscall.Errno(0x52) + EQFULL = syscall.Errno(0x6a) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHLIBVERS = syscall.Errno(0x57) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIME = syscall.Errno(0x65) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "resource busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "operation timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "device power is off", + 83: "device error", + 84: "value too large to be stored in data type", + 85: "bad executable (or shared library)", + 86: "bad CPU type in executable", + 87: "shared library version mismatch", + 88: "malformed Mach-o file", + 89: "operation canceled", + 90: "identifier removed", + 91: "no message of desired type", + 92: "illegal byte sequence", + 93: "attribute not found", + 94: "bad message", + 95: "EMULTIHOP (Reserved)", + 96: "no message available on STREAM", + 97: "ENOLINK (Reserved)", + 98: "no STREAM resources", + 99: "not a STREAM", + 100: "protocol error", + 101: "STREAM ioctl timeout", + 102: "operation not supported on socket", + 103: "policy not found", + 104: "state not recoverable", + 105: "previous owner died", + 106: "interface output queue is full", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "suspended (signal)", + 18: "suspended", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go new file mode 100644 index 0000000..a410e88 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go @@ -0,0 +1,1293 @@ +// mkerrors.sh +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- _const.go + +// +build arm,darwin + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1c + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x25 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x1e + AF_IPX = 0x17 + AF_ISDN = 0x1c + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x28 + AF_NATM = 0x1f + AF_NDRV = 0x1b + AF_NETBIOS = 0x21 + AF_NS = 0x6 + AF_OSI = 0x7 + AF_PPP = 0x22 + AF_PUP = 0x4 + AF_RESERVED_36 = 0x24 + AF_ROUTE = 0x11 + AF_SIP = 0x18 + AF_SNA = 0xb + AF_SYSTEM = 0x20 + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_UTUN = 0x26 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B9600 = 0x2580 + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc00c4279 + BIOCGETIF = 0x4020426b + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044272 + BIOCGRTIMEOUT = 0x4010426e + BIOCGSEESENT = 0x40044276 + BIOCGSTATS = 0x4008426f + BIOCIMMEDIATE = 0x80044270 + BIOCPROMISC = 0x20004269 + BIOCSBLEN = 0xc0044266 + BIOCSDLT = 0x80044278 + BIOCSETF = 0x80104267 + BIOCSETIF = 0x8020426c + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044273 + BIOCSRTIMEOUT = 0x8010426d + BIOCSSEESENT = 0x80044277 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x80000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0xc + CTL_NET = 0x4 + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AX25 = 0x3 + DLT_CHAOS = 0x5 + DLT_CHDLC = 0x68 + DLT_C_HDLC = 0x68 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_FDDI = 0xa + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_NULL = 0x0 + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0x10 + DLT_PPP_SERIAL = 0x32 + DLT_PRONET = 0x4 + DLT_RAW = 0xc + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EVFILT_AIO = -0x3 + EVFILT_FS = -0x9 + EVFILT_MACHPORT = -0x8 + EVFILT_PROC = -0x5 + EVFILT_READ = -0x1 + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0xe + EVFILT_THREADMARKER = 0xe + EVFILT_TIMER = -0x7 + EVFILT_USER = -0xa + EVFILT_VM = -0xc + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_DISPATCH = 0x80 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG0 = 0x1000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_OOBAND = 0x2000 + EV_POLL = 0x1000 + EV_RECEIPT = 0x40 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_ADDFILESIGS = 0x3d + F_ADDSIGS = 0x3b + F_ALLOCATEALL = 0x4 + F_ALLOCATECONTIG = 0x2 + F_CHKCLEAN = 0x29 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x43 + F_FINDSIGS = 0x4e + F_FLUSH_DATA = 0x28 + F_FREEZE_FS = 0x35 + F_FULLFSYNC = 0x33 + F_GETCODEDIR = 0x48 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0x7 + F_GETLKPID = 0x42 + F_GETNOSIGPIPE = 0x4a + F_GETOWN = 0x5 + F_GETPATH = 0x32 + F_GETPATH_MTMINFO = 0x47 + F_GETPROTECTIONCLASS = 0x3f + F_GETPROTECTIONLEVEL = 0x4d + F_GLOBAL_NOCACHE = 0x37 + F_LOG2PHYS = 0x31 + F_LOG2PHYS_EXT = 0x41 + F_NOCACHE = 0x30 + F_NODIRECT = 0x3e + F_OK = 0x0 + F_PATHPKG_CHECK = 0x34 + F_PEOFPOSMODE = 0x3 + F_PREALLOCATE = 0x2a + F_RDADVISE = 0x2c + F_RDAHEAD = 0x2d + F_RDLCK = 0x1 + F_SETBACKINGSTORE = 0x46 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x8 + F_SETLKW = 0x9 + F_SETLKWTIMEOUT = 0xa + F_SETNOSIGPIPE = 0x49 + F_SETOWN = 0x6 + F_SETPROTECTIONCLASS = 0x40 + F_SETSIZE = 0x2b + F_SINGLE_WRITER = 0x4c + F_THAW_FS = 0x36 + F_TRANSCODEKEY = 0x4b + F_UNLCK = 0x2 + F_VOLPOSMODE = 0x4 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFF_ALLMULTI = 0x200 + IFF_ALTPHYS = 0x4000 + IFF_BROADCAST = 0x2 + IFF_DEBUG = 0x4 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_AAL5 = 0x31 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ATM = 0x25 + IFT_BRIDGE = 0xd1 + IFT_CARP = 0xf8 + IFT_CELLULAR = 0xff + IFT_CEPT = 0x13 + IFT_DS3 = 0x1e + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_ETHER = 0x6 + IFT_FAITH = 0x38 + IFT_FDDI = 0xf + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_GIF = 0x37 + IFT_HDH1822 = 0x3 + IFT_HIPPI = 0x2f + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IEEE1394 = 0x90 + IFT_IEEE8023ADLAG = 0x88 + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88026 = 0xa + IFT_L2VLAN = 0x87 + IFT_LAPB = 0x10 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_NSIP = 0x1b + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PDP = 0xff + IFT_PFLOG = 0xf5 + IFT_PFSYNC = 0xf6 + IFT_PPP = 0x17 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PTPSERIAL = 0x16 + IFT_RS232 = 0x21 + IFT_SDLC = 0x11 + IFT_SIP = 0x1f + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_STARLAN = 0xb + IFT_STF = 0x39 + IFT_T1 = 0x12 + IFT_ULTRA = 0x1d + IFT_V35 = 0x2d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LINKLOCALNETNUM = 0xa9fe0000 + IN_LOOPBACKNET = 0x7f + IPPROTO_3PC = 0x22 + IPPROTO_ADFS = 0x44 + IPPROTO_AH = 0x33 + IPPROTO_AHIP = 0x3d + IPPROTO_APES = 0x63 + IPPROTO_ARGUS = 0xd + IPPROTO_AX25 = 0x5d + IPPROTO_BHA = 0x31 + IPPROTO_BLT = 0x1e + IPPROTO_BRSATMON = 0x4c + IPPROTO_CFTP = 0x3e + IPPROTO_CHAOS = 0x10 + IPPROTO_CMTP = 0x26 + IPPROTO_CPHB = 0x49 + IPPROTO_CPNX = 0x48 + IPPROTO_DDP = 0x25 + IPPROTO_DGP = 0x56 + IPPROTO_DIVERT = 0xfe + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_EMCON = 0xe + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GMTP = 0x64 + IPPROTO_GRE = 0x2f + IPPROTO_HELLO = 0x3f + IPPROTO_HMP = 0x14 + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IDPR = 0x23 + IPPROTO_IDRP = 0x2d + IPPROTO_IGMP = 0x2 + IPPROTO_IGP = 0x55 + IPPROTO_IGRP = 0x58 + IPPROTO_IL = 0x28 + IPPROTO_INLSP = 0x34 + IPPROTO_INP = 0x20 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPCV = 0x47 + IPPROTO_IPEIP = 0x5e + IPPROTO_IPIP = 0x4 + IPPROTO_IPPC = 0x43 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IRTP = 0x1c + IPPROTO_KRYPTOLAN = 0x41 + IPPROTO_LARP = 0x5b + IPPROTO_LEAF1 = 0x19 + IPPROTO_LEAF2 = 0x1a + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x34 + IPPROTO_MEAS = 0x13 + IPPROTO_MHRP = 0x30 + IPPROTO_MICP = 0x5f + IPPROTO_MTP = 0x5c + IPPROTO_MUX = 0x12 + IPPROTO_ND = 0x4d + IPPROTO_NHRP = 0x36 + IPPROTO_NONE = 0x3b + IPPROTO_NSP = 0x1f + IPPROTO_NVPII = 0xb + IPPROTO_OSPFIGP = 0x59 + IPPROTO_PGM = 0x71 + IPPROTO_PIGP = 0x9 + IPPROTO_PIM = 0x67 + IPPROTO_PRM = 0x15 + IPPROTO_PUP = 0xc + IPPROTO_PVP = 0x4b + IPPROTO_RAW = 0xff + IPPROTO_RCCMON = 0xa + IPPROTO_RDP = 0x1b + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_RVD = 0x42 + IPPROTO_SATEXPAK = 0x40 + IPPROTO_SATMON = 0x45 + IPPROTO_SCCSP = 0x60 + IPPROTO_SCTP = 0x84 + IPPROTO_SDRP = 0x2a + IPPROTO_SEP = 0x21 + IPPROTO_SRPC = 0x5a + IPPROTO_ST = 0x7 + IPPROTO_SVMTP = 0x52 + IPPROTO_SWIPE = 0x35 + IPPROTO_TCF = 0x57 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_TPXX = 0x27 + IPPROTO_TRUNK1 = 0x17 + IPPROTO_TRUNK2 = 0x18 + IPPROTO_TTP = 0x54 + IPPROTO_UDP = 0x11 + IPPROTO_VINES = 0x53 + IPPROTO_VISA = 0x46 + IPPROTO_VMTP = 0x51 + IPPROTO_WBEXPAK = 0x4f + IPPROTO_WBMON = 0x4e + IPPROTO_WSN = 0x4a + IPPROTO_XNET = 0xf + IPPROTO_XTP = 0x24 + IPV6_2292DSTOPTS = 0x17 + IPV6_2292HOPLIMIT = 0x14 + IPV6_2292HOPOPTS = 0x16 + IPV6_2292NEXTHOP = 0x15 + IPV6_2292PKTINFO = 0x13 + IPV6_2292PKTOPTIONS = 0x19 + IPV6_2292RTHDR = 0x18 + IPV6_BINDV6ONLY = 0x1b + IPV6_BOUND_IF = 0x7d + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x78 + IPV6_FW_ADD = 0x1e + IPV6_FW_DEL = 0x1f + IPV6_FW_FLUSH = 0x20 + IPV6_FW_GET = 0x22 + IPV6_FW_ZERO = 0x21 + IPV6_HLIMDEC = 0x1 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXOPTHDR = 0x800 + IPV6_MAXPACKET = 0xffff + IPV6_MAX_GROUP_SRC_FILTER = 0x200 + IPV6_MAX_MEMBERSHIPS = 0xfff + IPV6_MAX_SOCK_SRC_FILTER = 0x80 + IPV6_MIN_MEMBERSHIPS = 0x1f + IPV6_MMTU = 0x500 + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_RECVTCLASS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x24 + IPV6_UNICAST_HOPS = 0x4 + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_ADD_SOURCE_MEMBERSHIP = 0x46 + IP_BLOCK_SOURCE = 0x48 + IP_BOUND_IF = 0x19 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0xd + IP_DROP_SOURCE_MEMBERSHIP = 0x47 + IP_DUMMYNET_CONFIGURE = 0x3c + IP_DUMMYNET_DEL = 0x3d + IP_DUMMYNET_FLUSH = 0x3e + IP_DUMMYNET_GET = 0x40 + IP_FAITH = 0x16 + IP_FW_ADD = 0x28 + IP_FW_DEL = 0x29 + IP_FW_FLUSH = 0x2a + IP_FW_GET = 0x2c + IP_FW_RESETLOG = 0x2d + IP_FW_ZERO = 0x2b + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x15 + IP_MAXPACKET = 0xffff + IP_MAX_GROUP_SRC_FILTER = 0x200 + IP_MAX_MEMBERSHIPS = 0xfff + IP_MAX_SOCK_MUTE_FILTER = 0x80 + IP_MAX_SOCK_SRC_FILTER = 0x80 + IP_MF = 0x2000 + IP_MIN_MEMBERSHIPS = 0x1f + IP_MSFILTER = 0x4a + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_IFINDEX = 0x42 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_MULTICAST_VIF = 0xe + IP_NAT__XXX = 0x37 + IP_OFFMASK = 0x1fff + IP_OLD_FW_ADD = 0x32 + IP_OLD_FW_DEL = 0x33 + IP_OLD_FW_FLUSH = 0x34 + IP_OLD_FW_GET = 0x36 + IP_OLD_FW_RESETLOG = 0x38 + IP_OLD_FW_ZERO = 0x35 + IP_OPTIONS = 0x1 + IP_PKTINFO = 0x1a + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVPKTINFO = 0x1a + IP_RECVRETOPTS = 0x6 + IP_RECVTTL = 0x18 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RSVP_OFF = 0x10 + IP_RSVP_ON = 0xf + IP_RSVP_VIF_OFF = 0x12 + IP_RSVP_VIF_ON = 0x11 + IP_STRIPHDR = 0x17 + IP_TOS = 0x3 + IP_TRAFFIC_MGT_BACKGROUND = 0x41 + IP_TTL = 0x4 + IP_UNBLOCK_SOURCE = 0x49 + ISIG = 0x80 + ISTRIP = 0x20 + IUTF8 = 0x4000 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_CAN_REUSE = 0x9 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x5 + MADV_FREE_REUSABLE = 0x7 + MADV_FREE_REUSE = 0x8 + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_WILLNEED = 0x3 + MADV_ZERO_WIRED_PAGES = 0x6 + MAP_ANON = 0x1000 + MAP_COPY = 0x2 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_HASSEMAPHORE = 0x200 + MAP_JIT = 0x800 + MAP_NOCACHE = 0x400 + MAP_NOEXTEND = 0x100 + MAP_NORESERVE = 0x40 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_RESERVED0080 = 0x80 + MAP_SHARED = 0x1 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOF = 0x100 + MSG_EOR = 0x8 + MSG_FLUSH = 0x400 + MSG_HAVEMORE = 0x2000 + MSG_HOLD = 0x800 + MSG_NEEDSA = 0x10000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_RCVMORE = 0x4000 + MSG_SEND = 0x1000 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MSG_WAITSTREAM = 0x200 + MS_ASYNC = 0x1 + MS_DEACTIVATE = 0x8 + MS_INVALIDATE = 0x2 + MS_KILLPAGES = 0x4 + MS_SYNC = 0x10 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_DUMP2 = 0x7 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_IFLIST2 = 0x6 + NET_RT_MAXID = 0xa + NET_RT_STAT = 0x4 + NET_RT_TRASH = 0x5 + NOFLSH = 0x80000000 + NOTE_ABSOLUTE = 0x8 + NOTE_ATTRIB = 0x8 + NOTE_BACKGROUND = 0x40 + NOTE_CHILD = 0x4 + NOTE_CRITICAL = 0x20 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXITSTATUS = 0x4000000 + NOTE_EXIT_CSERROR = 0x40000 + NOTE_EXIT_DECRYPTFAIL = 0x10000 + NOTE_EXIT_DETAIL = 0x2000000 + NOTE_EXIT_DETAIL_MASK = 0x70000 + NOTE_EXIT_MEMORY = 0x20000 + NOTE_EXIT_REPARENTED = 0x80000 + NOTE_EXTEND = 0x4 + NOTE_FFAND = 0x40000000 + NOTE_FFCOPY = 0xc0000000 + NOTE_FFCTRLMASK = 0xc0000000 + NOTE_FFLAGSMASK = 0xffffff + NOTE_FFNOP = 0x0 + NOTE_FFOR = 0x80000000 + NOTE_FORK = 0x40000000 + NOTE_LEEWAY = 0x10 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_NONE = 0x80 + NOTE_NSECONDS = 0x4 + NOTE_PCTRLMASK = -0x100000 + NOTE_PDATAMASK = 0xfffff + NOTE_REAP = 0x10000000 + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_SECONDS = 0x1 + NOTE_SIGNAL = 0x8000000 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_TRIGGER = 0x1000000 + NOTE_USECONDS = 0x2 + NOTE_VM_ERROR = 0x10000000 + NOTE_VM_PRESSURE = 0x80000000 + NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000 + NOTE_VM_PRESSURE_TERMINATE = 0x40000000 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + OFDEL = 0x20000 + OFILL = 0x80 + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_ALERT = 0x20000000 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x1000000 + O_CREAT = 0x200 + O_DIRECTORY = 0x100000 + O_DP_GETRAWENCRYPTED = 0x1 + O_DSYNC = 0x400000 + O_EVTONLY = 0x8000 + O_EXCL = 0x800 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x20000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_POPUP = 0x80000000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_SHLOCK = 0x10 + O_SYMLINK = 0x200000 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PT_ATTACH = 0xa + PT_ATTACHEXC = 0xe + PT_CONTINUE = 0x7 + PT_DENY_ATTACH = 0x1f + PT_DETACH = 0xb + PT_FIRSTMACH = 0x20 + PT_FORCEQUOTA = 0x1e + PT_KILL = 0x8 + PT_READ_D = 0x2 + PT_READ_I = 0x1 + PT_READ_U = 0x3 + PT_SIGEXC = 0xc + PT_STEP = 0x9 + PT_THUPDATE = 0xd + PT_TRACE_ME = 0x0 + PT_WRITE_D = 0x5 + PT_WRITE_I = 0x4 + PT_WRITE_U = 0x6 + RLIMIT_AS = 0x5 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_CPU_USAGE_MONITOR = 0x2 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0x8 + RTAX_NETMASK = 0x2 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_NETMASK = 0x4 + RTF_BLACKHOLE = 0x1000 + RTF_BROADCAST = 0x400000 + RTF_CLONING = 0x100 + RTF_CONDEMNED = 0x2000000 + RTF_DELCLONE = 0x80 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_IFREF = 0x4000000 + RTF_IFSCOPE = 0x1000000 + RTF_LLINFO = 0x400 + RTF_LOCAL = 0x200000 + RTF_MODIFIED = 0x20 + RTF_MULTICAST = 0x800000 + RTF_PINNED = 0x100000 + RTF_PRCLONING = 0x10000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x40000 + RTF_PROXY = 0x8000000 + RTF_REJECT = 0x8 + RTF_ROUTER = 0x10000000 + RTF_STATIC = 0x800 + RTF_UP = 0x1 + RTF_WASCLONED = 0x20000 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DELMADDR = 0x10 + RTM_GET = 0x4 + RTM_GET2 = 0x14 + RTM_IFINFO = 0xe + RTM_IFINFO2 = 0x12 + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_NEWMADDR = 0xf + RTM_NEWMADDR2 = 0x13 + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x5 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + SCM_CREDS = 0x3 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x2 + SCM_TIMESTAMP_MONOTONIC = 0x4 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCAIFADDR = 0x8040691a + SIOCARPIPLL = 0xc0206928 + SIOCATMARK = 0x40047307 + SIOCAUTOADDR = 0xc0206926 + SIOCAUTONETMASK = 0x80206927 + SIOCDELMULTI = 0x80206932 + SIOCDIFADDR = 0x80206919 + SIOCDIFPHYADDR = 0x80206941 + SIOCGDRVSPEC = 0xc028697b + SIOCGETVLAN = 0xc020697f + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0206921 + SIOCGIFALTMTU = 0xc0206948 + SIOCGIFASYNCMAP = 0xc020697c + SIOCGIFBOND = 0xc0206947 + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCAP = 0xc020695b + SIOCGIFCONF = 0xc00c6924 + SIOCGIFDEVMTU = 0xc0206944 + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGENERIC = 0xc020693a + SIOCGIFKPI = 0xc0206987 + SIOCGIFMAC = 0xc0206982 + SIOCGIFMEDIA = 0xc02c6938 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc0206933 + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPDSTADDR = 0xc0206940 + SIOCGIFPHYS = 0xc0206935 + SIOCGIFPSRCADDR = 0xc020693f + SIOCGIFSTATUS = 0xc331693d + SIOCGIFVLAN = 0xc020697f + SIOCGIFWAKEFLAGS = 0xc0206988 + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCIFCREATE = 0xc0206978 + SIOCIFCREATE2 = 0xc020697a + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc0106981 + SIOCRSLVMULTI = 0xc010693b + SIOCSDRVSPEC = 0x8028697b + SIOCSETVLAN = 0x8020697e + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c + SIOCSIFALTMTU = 0x80206945 + SIOCSIFASYNCMAP = 0x8020697d + SIOCSIFBOND = 0x80206946 + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFCAP = 0x8020695a + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGENERIC = 0x80206939 + SIOCSIFKPI = 0x80206986 + SIOCSIFLLADDR = 0x8020693c + SIOCSIFMAC = 0x80206983 + SIOCSIFMEDIA = 0xc0206937 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x80206934 + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPHYADDR = 0x8040693e + SIOCSIFPHYS = 0x80206936 + SIOCSIFVLAN = 0x8020697e + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SOCK_DGRAM = 0x2 + SOCK_MAXADDRLEN = 0xff + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_DONTTRUNC = 0x2000 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LABEL = 0x1010 + SO_LINGER = 0x80 + SO_LINGER_SEC = 0x1080 + SO_NKE = 0x1021 + SO_NOADDRERR = 0x1023 + SO_NOSIGPIPE = 0x1022 + SO_NOTIFYCONFLICT = 0x1026 + SO_NP_EXTENSIONS = 0x1083 + SO_NREAD = 0x1020 + SO_NUMRCVPKT = 0x1112 + SO_NWRITE = 0x1024 + SO_OOBINLINE = 0x100 + SO_PEERLABEL = 0x1011 + SO_RANDOMPORT = 0x1082 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_REUSESHAREUID = 0x1025 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_TIMESTAMP = 0x400 + SO_TIMESTAMP_MONOTONIC = 0x800 + SO_TYPE = 0x1008 + SO_UPCALLCLOSEWAIT = 0x1027 + SO_USELOOPBACK = 0x40 + SO_WANTMORE = 0x4000 + SO_WANTOOBFLAG = 0x8000 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IFWHT = 0xe000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISTXT = 0x200 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_CONNECTIONTIMEOUT = 0x20 + TCP_ENABLE_ECN = 0x104 + TCP_KEEPALIVE = 0x10 + TCP_KEEPCNT = 0x102 + TCP_KEEPINTVL = 0x101 + TCP_MAXHLEN = 0x3c + TCP_MAXOLEN = 0x28 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_SACK = 0x4 + TCP_MAX_WINSHIFT = 0xe + TCP_MINMSS = 0xd8 + TCP_MSS = 0x200 + TCP_NODELAY = 0x1 + TCP_NOOPT = 0x8 + TCP_NOPUSH = 0x4 + TCP_NOTSENT_LOWAT = 0x201 + TCP_RXT_CONNDROPTIME = 0x80 + TCP_RXT_FINDROP = 0x100 + TCP_SENDMOREACKS = 0x103 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDCDTIMESTAMP = 0x40107458 + TIOCDRAIN = 0x2000745e + TIOCDSIMICROCODE = 0x20007455 + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLUSH = 0x80047410 + TIOCGDRAINWAIT = 0x40047456 + TIOCGETA = 0x40487413 + TIOCGETD = 0x4004741a + TIOCGPGRP = 0x40047477 + TIOCGWINSZ = 0x40087468 + TIOCIXOFF = 0x20007480 + TIOCIXON = 0x20007481 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGDTRWAIT = 0x4004745a + TIOCMGET = 0x4004746a + TIOCMODG = 0x40047403 + TIOCMODS = 0x80047404 + TIOCMSDTRWAIT = 0x8004745b + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCPTYGNAME = 0x40807453 + TIOCPTYGRANT = 0x20007454 + TIOCPTYUNLK = 0x20007452 + TIOCREMOTE = 0x80047469 + TIOCSBRK = 0x2000747b + TIOCSCONS = 0x20007463 + TIOCSCTTY = 0x20007461 + TIOCSDRAINWAIT = 0x80047457 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x80487414 + TIOCSETAF = 0x80487416 + TIOCSETAW = 0x80487415 + TIOCSETD = 0x8004741b + TIOCSIG = 0x2000745f + TIOCSPGRP = 0x80047476 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x20007465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCTIMESTAMP = 0x40107459 + TIOCUCNTL = 0x80047466 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VT0 = 0x0 + VT1 = 0x10000 + VTDLY = 0x10000 + VTIME = 0x11 + VWERASE = 0x4 + WCONTINUED = 0x10 + WCOREFLAG = 0x80 + WEXITED = 0x4 + WNOHANG = 0x1 + WNOWAIT = 0x20 + WORDSIZE = 0x40 + WSTOPPED = 0x8 + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADARCH = syscall.Errno(0x56) + EBADEXEC = syscall.Errno(0x55) + EBADF = syscall.Errno(0x9) + EBADMACHO = syscall.Errno(0x58) + EBADMSG = syscall.Errno(0x5e) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x59) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDEVERR = syscall.Errno(0x53) + EDOM = syscall.Errno(0x21) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x5a) + EILSEQ = syscall.Errno(0x5c) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x6a) + ELOOP = syscall.Errno(0x3e) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + EMULTIHOP = syscall.Errno(0x5f) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x5d) + ENOBUFS = syscall.Errno(0x37) + ENODATA = syscall.Errno(0x60) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOLINK = syscall.Errno(0x61) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x5b) + ENOPOLICY = syscall.Errno(0x67) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x62) + ENOSTR = syscall.Errno(0x63) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTRECOVERABLE = syscall.Errno(0x68) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x2d) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x66) + EOVERFLOW = syscall.Errno(0x54) + EOWNERDEAD = syscall.Errno(0x69) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x64) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + EPWROFF = syscall.Errno(0x52) + EQFULL = syscall.Errno(0x6a) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHLIBVERS = syscall.Errno(0x57) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIME = syscall.Errno(0x65) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go new file mode 100644 index 0000000..3189c6b --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go @@ -0,0 +1,1576 @@ +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build arm64,darwin + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m64 _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1c + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x25 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x1e + AF_IPX = 0x17 + AF_ISDN = 0x1c + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x28 + AF_NATM = 0x1f + AF_NDRV = 0x1b + AF_NETBIOS = 0x21 + AF_NS = 0x6 + AF_OSI = 0x7 + AF_PPP = 0x22 + AF_PUP = 0x4 + AF_RESERVED_36 = 0x24 + AF_ROUTE = 0x11 + AF_SIP = 0x18 + AF_SNA = 0xb + AF_SYSTEM = 0x20 + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_UTUN = 0x26 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B9600 = 0x2580 + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc00c4279 + BIOCGETIF = 0x4020426b + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044272 + BIOCGRTIMEOUT = 0x4010426e + BIOCGSEESENT = 0x40044276 + BIOCGSTATS = 0x4008426f + BIOCIMMEDIATE = 0x80044270 + BIOCPROMISC = 0x20004269 + BIOCSBLEN = 0xc0044266 + BIOCSDLT = 0x80044278 + BIOCSETF = 0x80104267 + BIOCSETFNR = 0x8010427e + BIOCSETIF = 0x8020426c + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044273 + BIOCSRTIMEOUT = 0x8010426d + BIOCSSEESENT = 0x80044277 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x80000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0xc + CTL_NET = 0x4 + DLT_A429 = 0xb8 + DLT_A653_ICM = 0xb9 + DLT_AIRONET_HEADER = 0x78 + DLT_AOS = 0xde + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_AX25_KISS = 0xca + DLT_BACNET_MS_TP = 0xa5 + DLT_BLUETOOTH_HCI_H4 = 0xbb + DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 + DLT_CAN20B = 0xbe + DLT_CAN_SOCKETCAN = 0xe3 + DLT_CHAOS = 0x5 + DLT_CHDLC = 0x68 + DLT_CISCO_IOS = 0x76 + DLT_C_HDLC = 0x68 + DLT_C_HDLC_WITH_DIR = 0xcd + DLT_DBUS = 0xe7 + DLT_DECT = 0xdd + DLT_DOCSIS = 0x8f + DLT_DVB_CI = 0xeb + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_ERF = 0xc5 + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FC_2 = 0xe0 + DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 + DLT_FDDI = 0xa + DLT_FLEXRAY = 0xd2 + DLT_FRELAY = 0x6b + DLT_FRELAY_WITH_DIR = 0xce + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_GSMTAP_ABIS = 0xda + DLT_GSMTAP_UM = 0xd9 + DLT_HHDLC = 0x79 + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IEEE802_15_4 = 0xc3 + DLT_IEEE802_15_4_LINUX = 0xbf + DLT_IEEE802_15_4_NOFCS = 0xe6 + DLT_IEEE802_15_4_NONASK_PHY = 0xd7 + DLT_IEEE802_16_MAC_CPS = 0xbc + DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 + DLT_IPFILTER = 0x74 + DLT_IPMB = 0xc7 + DLT_IPMB_LINUX = 0xd1 + DLT_IPNET = 0xe2 + DLT_IPOIB = 0xf2 + DLT_IPV4 = 0xe4 + DLT_IPV6 = 0xe5 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_ATM_CEMIC = 0xee + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FIBRECHANNEL = 0xea + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_ISM = 0xc2 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_JUNIPER_SRX_E2E = 0xe9 + DLT_JUNIPER_ST = 0xc8 + DLT_JUNIPER_VP = 0xb7 + DLT_JUNIPER_VS = 0xe8 + DLT_LAPB_WITH_DIR = 0xcf + DLT_LAPD = 0xcb + DLT_LIN = 0xd4 + DLT_LINUX_EVDEV = 0xd8 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_PPP_WITHDIRECTION = 0xa6 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MATCHING_MAX = 0xf5 + DLT_MATCHING_MIN = 0x68 + DLT_MFR = 0xb6 + DLT_MOST = 0xd3 + DLT_MPEG_2_TS = 0xf3 + DLT_MPLS = 0xdb + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_MUX27010 = 0xec + DLT_NETANALYZER = 0xf0 + DLT_NETANALYZER_TRANSPARENT = 0xf1 + DLT_NFC_LLCP = 0xf5 + DLT_NFLOG = 0xef + DLT_NG40 = 0xf4 + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPI = 0xc0 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0x10 + DLT_PPP_ETHER = 0x33 + DLT_PPP_PPPD = 0xa6 + DLT_PPP_SERIAL = 0x32 + DLT_PPP_WITH_DIR = 0xcc + DLT_PPP_WITH_DIRECTION = 0xa6 + DLT_PRISM_HEADER = 0x77 + DLT_PRONET = 0x4 + DLT_RAIF1 = 0xc6 + DLT_RAW = 0xc + DLT_RIO = 0x7c + DLT_SCCP = 0x8e + DLT_SITA = 0xc4 + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf + DLT_STANAG_5066_D_PDU = 0xed + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + DLT_USB = 0xba + DLT_USB_LINUX = 0xbd + DLT_USB_LINUX_MMAPPED = 0xdc + DLT_USER0 = 0x93 + DLT_USER1 = 0x94 + DLT_USER10 = 0x9d + DLT_USER11 = 0x9e + DLT_USER12 = 0x9f + DLT_USER13 = 0xa0 + DLT_USER14 = 0xa1 + DLT_USER15 = 0xa2 + DLT_USER2 = 0x95 + DLT_USER3 = 0x96 + DLT_USER4 = 0x97 + DLT_USER5 = 0x98 + DLT_USER6 = 0x99 + DLT_USER7 = 0x9a + DLT_USER8 = 0x9b + DLT_USER9 = 0x9c + DLT_WIHART = 0xdf + DLT_X2E_SERIAL = 0xd5 + DLT_X2E_XORAYA = 0xd6 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EVFILT_AIO = -0x3 + EVFILT_FS = -0x9 + EVFILT_MACHPORT = -0x8 + EVFILT_PROC = -0x5 + EVFILT_READ = -0x1 + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0xe + EVFILT_THREADMARKER = 0xe + EVFILT_TIMER = -0x7 + EVFILT_USER = -0xa + EVFILT_VM = -0xc + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_DISPATCH = 0x80 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG0 = 0x1000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_OOBAND = 0x2000 + EV_POLL = 0x1000 + EV_RECEIPT = 0x40 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_ADDFILESIGS = 0x3d + F_ADDSIGS = 0x3b + F_ALLOCATEALL = 0x4 + F_ALLOCATECONTIG = 0x2 + F_CHKCLEAN = 0x29 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x43 + F_FINDSIGS = 0x4e + F_FLUSH_DATA = 0x28 + F_FREEZE_FS = 0x35 + F_FULLFSYNC = 0x33 + F_GETCODEDIR = 0x48 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0x7 + F_GETLKPID = 0x42 + F_GETNOSIGPIPE = 0x4a + F_GETOWN = 0x5 + F_GETPATH = 0x32 + F_GETPATH_MTMINFO = 0x47 + F_GETPROTECTIONCLASS = 0x3f + F_GETPROTECTIONLEVEL = 0x4d + F_GLOBAL_NOCACHE = 0x37 + F_LOG2PHYS = 0x31 + F_LOG2PHYS_EXT = 0x41 + F_NOCACHE = 0x30 + F_NODIRECT = 0x3e + F_OK = 0x0 + F_PATHPKG_CHECK = 0x34 + F_PEOFPOSMODE = 0x3 + F_PREALLOCATE = 0x2a + F_RDADVISE = 0x2c + F_RDAHEAD = 0x2d + F_RDLCK = 0x1 + F_SETBACKINGSTORE = 0x46 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x8 + F_SETLKW = 0x9 + F_SETLKWTIMEOUT = 0xa + F_SETNOSIGPIPE = 0x49 + F_SETOWN = 0x6 + F_SETPROTECTIONCLASS = 0x40 + F_SETSIZE = 0x2b + F_SINGLE_WRITER = 0x4c + F_THAW_FS = 0x36 + F_TRANSCODEKEY = 0x4b + F_UNLCK = 0x2 + F_VOLPOSMODE = 0x4 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFF_ALLMULTI = 0x200 + IFF_ALTPHYS = 0x4000 + IFF_BROADCAST = 0x2 + IFF_DEBUG = 0x4 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_AAL5 = 0x31 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ATM = 0x25 + IFT_BRIDGE = 0xd1 + IFT_CARP = 0xf8 + IFT_CELLULAR = 0xff + IFT_CEPT = 0x13 + IFT_DS3 = 0x1e + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_ETHER = 0x6 + IFT_FAITH = 0x38 + IFT_FDDI = 0xf + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_GIF = 0x37 + IFT_HDH1822 = 0x3 + IFT_HIPPI = 0x2f + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IEEE1394 = 0x90 + IFT_IEEE8023ADLAG = 0x88 + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88026 = 0xa + IFT_L2VLAN = 0x87 + IFT_LAPB = 0x10 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_NSIP = 0x1b + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PDP = 0xff + IFT_PFLOG = 0xf5 + IFT_PFSYNC = 0xf6 + IFT_PKTAP = 0xfe + IFT_PPP = 0x17 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PTPSERIAL = 0x16 + IFT_RS232 = 0x21 + IFT_SDLC = 0x11 + IFT_SIP = 0x1f + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_STARLAN = 0xb + IFT_STF = 0x39 + IFT_T1 = 0x12 + IFT_ULTRA = 0x1d + IFT_V35 = 0x2d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LINKLOCALNETNUM = 0xa9fe0000 + IN_LOOPBACKNET = 0x7f + IPPROTO_3PC = 0x22 + IPPROTO_ADFS = 0x44 + IPPROTO_AH = 0x33 + IPPROTO_AHIP = 0x3d + IPPROTO_APES = 0x63 + IPPROTO_ARGUS = 0xd + IPPROTO_AX25 = 0x5d + IPPROTO_BHA = 0x31 + IPPROTO_BLT = 0x1e + IPPROTO_BRSATMON = 0x4c + IPPROTO_CFTP = 0x3e + IPPROTO_CHAOS = 0x10 + IPPROTO_CMTP = 0x26 + IPPROTO_CPHB = 0x49 + IPPROTO_CPNX = 0x48 + IPPROTO_DDP = 0x25 + IPPROTO_DGP = 0x56 + IPPROTO_DIVERT = 0xfe + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_EMCON = 0xe + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GMTP = 0x64 + IPPROTO_GRE = 0x2f + IPPROTO_HELLO = 0x3f + IPPROTO_HMP = 0x14 + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IDPR = 0x23 + IPPROTO_IDRP = 0x2d + IPPROTO_IGMP = 0x2 + IPPROTO_IGP = 0x55 + IPPROTO_IGRP = 0x58 + IPPROTO_IL = 0x28 + IPPROTO_INLSP = 0x34 + IPPROTO_INP = 0x20 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPCV = 0x47 + IPPROTO_IPEIP = 0x5e + IPPROTO_IPIP = 0x4 + IPPROTO_IPPC = 0x43 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IRTP = 0x1c + IPPROTO_KRYPTOLAN = 0x41 + IPPROTO_LARP = 0x5b + IPPROTO_LEAF1 = 0x19 + IPPROTO_LEAF2 = 0x1a + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x34 + IPPROTO_MEAS = 0x13 + IPPROTO_MHRP = 0x30 + IPPROTO_MICP = 0x5f + IPPROTO_MTP = 0x5c + IPPROTO_MUX = 0x12 + IPPROTO_ND = 0x4d + IPPROTO_NHRP = 0x36 + IPPROTO_NONE = 0x3b + IPPROTO_NSP = 0x1f + IPPROTO_NVPII = 0xb + IPPROTO_OSPFIGP = 0x59 + IPPROTO_PGM = 0x71 + IPPROTO_PIGP = 0x9 + IPPROTO_PIM = 0x67 + IPPROTO_PRM = 0x15 + IPPROTO_PUP = 0xc + IPPROTO_PVP = 0x4b + IPPROTO_RAW = 0xff + IPPROTO_RCCMON = 0xa + IPPROTO_RDP = 0x1b + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_RVD = 0x42 + IPPROTO_SATEXPAK = 0x40 + IPPROTO_SATMON = 0x45 + IPPROTO_SCCSP = 0x60 + IPPROTO_SCTP = 0x84 + IPPROTO_SDRP = 0x2a + IPPROTO_SEP = 0x21 + IPPROTO_SRPC = 0x5a + IPPROTO_ST = 0x7 + IPPROTO_SVMTP = 0x52 + IPPROTO_SWIPE = 0x35 + IPPROTO_TCF = 0x57 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_TPXX = 0x27 + IPPROTO_TRUNK1 = 0x17 + IPPROTO_TRUNK2 = 0x18 + IPPROTO_TTP = 0x54 + IPPROTO_UDP = 0x11 + IPPROTO_VINES = 0x53 + IPPROTO_VISA = 0x46 + IPPROTO_VMTP = 0x51 + IPPROTO_WBEXPAK = 0x4f + IPPROTO_WBMON = 0x4e + IPPROTO_WSN = 0x4a + IPPROTO_XNET = 0xf + IPPROTO_XTP = 0x24 + IPV6_2292DSTOPTS = 0x17 + IPV6_2292HOPLIMIT = 0x14 + IPV6_2292HOPOPTS = 0x16 + IPV6_2292NEXTHOP = 0x15 + IPV6_2292PKTINFO = 0x13 + IPV6_2292PKTOPTIONS = 0x19 + IPV6_2292RTHDR = 0x18 + IPV6_BINDV6ONLY = 0x1b + IPV6_BOUND_IF = 0x7d + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x3c + IPV6_FW_ADD = 0x1e + IPV6_FW_DEL = 0x1f + IPV6_FW_FLUSH = 0x20 + IPV6_FW_GET = 0x22 + IPV6_FW_ZERO = 0x21 + IPV6_HLIMDEC = 0x1 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXOPTHDR = 0x800 + IPV6_MAXPACKET = 0xffff + IPV6_MAX_GROUP_SRC_FILTER = 0x200 + IPV6_MAX_MEMBERSHIPS = 0xfff + IPV6_MAX_SOCK_SRC_FILTER = 0x80 + IPV6_MIN_MEMBERSHIPS = 0x1f + IPV6_MMTU = 0x500 + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_RECVTCLASS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x24 + IPV6_UNICAST_HOPS = 0x4 + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_ADD_SOURCE_MEMBERSHIP = 0x46 + IP_BLOCK_SOURCE = 0x48 + IP_BOUND_IF = 0x19 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0xd + IP_DROP_SOURCE_MEMBERSHIP = 0x47 + IP_DUMMYNET_CONFIGURE = 0x3c + IP_DUMMYNET_DEL = 0x3d + IP_DUMMYNET_FLUSH = 0x3e + IP_DUMMYNET_GET = 0x40 + IP_FAITH = 0x16 + IP_FW_ADD = 0x28 + IP_FW_DEL = 0x29 + IP_FW_FLUSH = 0x2a + IP_FW_GET = 0x2c + IP_FW_RESETLOG = 0x2d + IP_FW_ZERO = 0x2b + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x15 + IP_MAXPACKET = 0xffff + IP_MAX_GROUP_SRC_FILTER = 0x200 + IP_MAX_MEMBERSHIPS = 0xfff + IP_MAX_SOCK_MUTE_FILTER = 0x80 + IP_MAX_SOCK_SRC_FILTER = 0x80 + IP_MF = 0x2000 + IP_MIN_MEMBERSHIPS = 0x1f + IP_MSFILTER = 0x4a + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_IFINDEX = 0x42 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_MULTICAST_VIF = 0xe + IP_NAT__XXX = 0x37 + IP_OFFMASK = 0x1fff + IP_OLD_FW_ADD = 0x32 + IP_OLD_FW_DEL = 0x33 + IP_OLD_FW_FLUSH = 0x34 + IP_OLD_FW_GET = 0x36 + IP_OLD_FW_RESETLOG = 0x38 + IP_OLD_FW_ZERO = 0x35 + IP_OPTIONS = 0x1 + IP_PKTINFO = 0x1a + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVPKTINFO = 0x1a + IP_RECVRETOPTS = 0x6 + IP_RECVTTL = 0x18 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RSVP_OFF = 0x10 + IP_RSVP_ON = 0xf + IP_RSVP_VIF_OFF = 0x12 + IP_RSVP_VIF_ON = 0x11 + IP_STRIPHDR = 0x17 + IP_TOS = 0x3 + IP_TRAFFIC_MGT_BACKGROUND = 0x41 + IP_TTL = 0x4 + IP_UNBLOCK_SOURCE = 0x49 + ISIG = 0x80 + ISTRIP = 0x20 + IUTF8 = 0x4000 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_CAN_REUSE = 0x9 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x5 + MADV_FREE_REUSABLE = 0x7 + MADV_FREE_REUSE = 0x8 + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_WILLNEED = 0x3 + MADV_ZERO_WIRED_PAGES = 0x6 + MAP_ANON = 0x1000 + MAP_COPY = 0x2 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_HASSEMAPHORE = 0x200 + MAP_JIT = 0x800 + MAP_NOCACHE = 0x400 + MAP_NOEXTEND = 0x100 + MAP_NORESERVE = 0x40 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_RESERVED0080 = 0x80 + MAP_SHARED = 0x1 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOF = 0x100 + MSG_EOR = 0x8 + MSG_FLUSH = 0x400 + MSG_HAVEMORE = 0x2000 + MSG_HOLD = 0x800 + MSG_NEEDSA = 0x10000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_RCVMORE = 0x4000 + MSG_SEND = 0x1000 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MSG_WAITSTREAM = 0x200 + MS_ASYNC = 0x1 + MS_DEACTIVATE = 0x8 + MS_INVALIDATE = 0x2 + MS_KILLPAGES = 0x4 + MS_SYNC = 0x10 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_DUMP2 = 0x7 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_IFLIST2 = 0x6 + NET_RT_MAXID = 0xa + NET_RT_STAT = 0x4 + NET_RT_TRASH = 0x5 + NOFLSH = 0x80000000 + NOTE_ABSOLUTE = 0x8 + NOTE_ATTRIB = 0x8 + NOTE_BACKGROUND = 0x40 + NOTE_CHILD = 0x4 + NOTE_CRITICAL = 0x20 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXITSTATUS = 0x4000000 + NOTE_EXIT_CSERROR = 0x40000 + NOTE_EXIT_DECRYPTFAIL = 0x10000 + NOTE_EXIT_DETAIL = 0x2000000 + NOTE_EXIT_DETAIL_MASK = 0x70000 + NOTE_EXIT_MEMORY = 0x20000 + NOTE_EXIT_REPARENTED = 0x80000 + NOTE_EXTEND = 0x4 + NOTE_FFAND = 0x40000000 + NOTE_FFCOPY = 0xc0000000 + NOTE_FFCTRLMASK = 0xc0000000 + NOTE_FFLAGSMASK = 0xffffff + NOTE_FFNOP = 0x0 + NOTE_FFOR = 0x80000000 + NOTE_FORK = 0x40000000 + NOTE_LEEWAY = 0x10 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_NONE = 0x80 + NOTE_NSECONDS = 0x4 + NOTE_PCTRLMASK = -0x100000 + NOTE_PDATAMASK = 0xfffff + NOTE_REAP = 0x10000000 + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_SECONDS = 0x1 + NOTE_SIGNAL = 0x8000000 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_TRIGGER = 0x1000000 + NOTE_USECONDS = 0x2 + NOTE_VM_ERROR = 0x10000000 + NOTE_VM_PRESSURE = 0x80000000 + NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000 + NOTE_VM_PRESSURE_TERMINATE = 0x40000000 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + OFDEL = 0x20000 + OFILL = 0x80 + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_ALERT = 0x20000000 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x1000000 + O_CREAT = 0x200 + O_DIRECTORY = 0x100000 + O_DP_GETRAWENCRYPTED = 0x1 + O_DSYNC = 0x400000 + O_EVTONLY = 0x8000 + O_EXCL = 0x800 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x20000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_POPUP = 0x80000000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_SHLOCK = 0x10 + O_SYMLINK = 0x200000 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PT_ATTACH = 0xa + PT_ATTACHEXC = 0xe + PT_CONTINUE = 0x7 + PT_DENY_ATTACH = 0x1f + PT_DETACH = 0xb + PT_FIRSTMACH = 0x20 + PT_FORCEQUOTA = 0x1e + PT_KILL = 0x8 + PT_READ_D = 0x2 + PT_READ_I = 0x1 + PT_READ_U = 0x3 + PT_SIGEXC = 0xc + PT_STEP = 0x9 + PT_THUPDATE = 0xd + PT_TRACE_ME = 0x0 + PT_WRITE_D = 0x5 + PT_WRITE_I = 0x4 + PT_WRITE_U = 0x6 + RLIMIT_AS = 0x5 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_CPU_USAGE_MONITOR = 0x2 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0x8 + RTAX_NETMASK = 0x2 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_NETMASK = 0x4 + RTF_BLACKHOLE = 0x1000 + RTF_BROADCAST = 0x400000 + RTF_CLONING = 0x100 + RTF_CONDEMNED = 0x2000000 + RTF_DELCLONE = 0x80 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_IFREF = 0x4000000 + RTF_IFSCOPE = 0x1000000 + RTF_LLINFO = 0x400 + RTF_LOCAL = 0x200000 + RTF_MODIFIED = 0x20 + RTF_MULTICAST = 0x800000 + RTF_NOIFREF = 0x2000 + RTF_PINNED = 0x100000 + RTF_PRCLONING = 0x10000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x40000 + RTF_PROXY = 0x8000000 + RTF_REJECT = 0x8 + RTF_ROUTER = 0x10000000 + RTF_STATIC = 0x800 + RTF_UP = 0x1 + RTF_WASCLONED = 0x20000 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DELMADDR = 0x10 + RTM_GET = 0x4 + RTM_GET2 = 0x14 + RTM_IFINFO = 0xe + RTM_IFINFO2 = 0x12 + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_NEWMADDR = 0xf + RTM_NEWMADDR2 = 0x13 + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x5 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + SCM_CREDS = 0x3 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x2 + SCM_TIMESTAMP_MONOTONIC = 0x4 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCAIFADDR = 0x8040691a + SIOCARPIPLL = 0xc0206928 + SIOCATMARK = 0x40047307 + SIOCAUTOADDR = 0xc0206926 + SIOCAUTONETMASK = 0x80206927 + SIOCDELMULTI = 0x80206932 + SIOCDIFADDR = 0x80206919 + SIOCDIFPHYADDR = 0x80206941 + SIOCGDRVSPEC = 0xc028697b + SIOCGETVLAN = 0xc020697f + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0206921 + SIOCGIFALTMTU = 0xc0206948 + SIOCGIFASYNCMAP = 0xc020697c + SIOCGIFBOND = 0xc0206947 + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCAP = 0xc020695b + SIOCGIFCONF = 0xc00c6924 + SIOCGIFDEVMTU = 0xc0206944 + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGENERIC = 0xc020693a + SIOCGIFKPI = 0xc0206987 + SIOCGIFMAC = 0xc0206982 + SIOCGIFMEDIA = 0xc02c6938 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc0206933 + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPDSTADDR = 0xc0206940 + SIOCGIFPHYS = 0xc0206935 + SIOCGIFPSRCADDR = 0xc020693f + SIOCGIFSTATUS = 0xc331693d + SIOCGIFVLAN = 0xc020697f + SIOCGIFWAKEFLAGS = 0xc0206988 + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCIFCREATE = 0xc0206978 + SIOCIFCREATE2 = 0xc020697a + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc0106981 + SIOCRSLVMULTI = 0xc010693b + SIOCSDRVSPEC = 0x8028697b + SIOCSETVLAN = 0x8020697e + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c + SIOCSIFALTMTU = 0x80206945 + SIOCSIFASYNCMAP = 0x8020697d + SIOCSIFBOND = 0x80206946 + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFCAP = 0x8020695a + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGENERIC = 0x80206939 + SIOCSIFKPI = 0x80206986 + SIOCSIFLLADDR = 0x8020693c + SIOCSIFMAC = 0x80206983 + SIOCSIFMEDIA = 0xc0206937 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x80206934 + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPHYADDR = 0x8040693e + SIOCSIFPHYS = 0x80206936 + SIOCSIFVLAN = 0x8020697e + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SOCK_DGRAM = 0x2 + SOCK_MAXADDRLEN = 0xff + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_DONTTRUNC = 0x2000 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LABEL = 0x1010 + SO_LINGER = 0x80 + SO_LINGER_SEC = 0x1080 + SO_NKE = 0x1021 + SO_NOADDRERR = 0x1023 + SO_NOSIGPIPE = 0x1022 + SO_NOTIFYCONFLICT = 0x1026 + SO_NP_EXTENSIONS = 0x1083 + SO_NREAD = 0x1020 + SO_NUMRCVPKT = 0x1112 + SO_NWRITE = 0x1024 + SO_OOBINLINE = 0x100 + SO_PEERLABEL = 0x1011 + SO_RANDOMPORT = 0x1082 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_REUSESHAREUID = 0x1025 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_TIMESTAMP = 0x400 + SO_TIMESTAMP_MONOTONIC = 0x800 + SO_TYPE = 0x1008 + SO_UPCALLCLOSEWAIT = 0x1027 + SO_USELOOPBACK = 0x40 + SO_WANTMORE = 0x4000 + SO_WANTOOBFLAG = 0x8000 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IFWHT = 0xe000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISTXT = 0x200 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_CONNECTIONTIMEOUT = 0x20 + TCP_ENABLE_ECN = 0x104 + TCP_KEEPALIVE = 0x10 + TCP_KEEPCNT = 0x102 + TCP_KEEPINTVL = 0x101 + TCP_MAXHLEN = 0x3c + TCP_MAXOLEN = 0x28 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_SACK = 0x4 + TCP_MAX_WINSHIFT = 0xe + TCP_MINMSS = 0xd8 + TCP_MSS = 0x200 + TCP_NODELAY = 0x1 + TCP_NOOPT = 0x8 + TCP_NOPUSH = 0x4 + TCP_NOTSENT_LOWAT = 0x201 + TCP_RXT_CONNDROPTIME = 0x80 + TCP_RXT_FINDROP = 0x100 + TCP_SENDMOREACKS = 0x103 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDCDTIMESTAMP = 0x40107458 + TIOCDRAIN = 0x2000745e + TIOCDSIMICROCODE = 0x20007455 + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLUSH = 0x80047410 + TIOCGDRAINWAIT = 0x40047456 + TIOCGETA = 0x40487413 + TIOCGETD = 0x4004741a + TIOCGPGRP = 0x40047477 + TIOCGWINSZ = 0x40087468 + TIOCIXOFF = 0x20007480 + TIOCIXON = 0x20007481 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGDTRWAIT = 0x4004745a + TIOCMGET = 0x4004746a + TIOCMODG = 0x40047403 + TIOCMODS = 0x80047404 + TIOCMSDTRWAIT = 0x8004745b + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCPTYGNAME = 0x40807453 + TIOCPTYGRANT = 0x20007454 + TIOCPTYUNLK = 0x20007452 + TIOCREMOTE = 0x80047469 + TIOCSBRK = 0x2000747b + TIOCSCONS = 0x20007463 + TIOCSCTTY = 0x20007461 + TIOCSDRAINWAIT = 0x80047457 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x80487414 + TIOCSETAF = 0x80487416 + TIOCSETAW = 0x80487415 + TIOCSETD = 0x8004741b + TIOCSIG = 0x2000745f + TIOCSPGRP = 0x80047476 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x20007465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCTIMESTAMP = 0x40107459 + TIOCUCNTL = 0x80047466 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VT0 = 0x0 + VT1 = 0x10000 + VTDLY = 0x10000 + VTIME = 0x11 + VWERASE = 0x4 + WCONTINUED = 0x10 + WCOREFLAG = 0x80 + WEXITED = 0x4 + WNOHANG = 0x1 + WNOWAIT = 0x20 + WORDSIZE = 0x40 + WSTOPPED = 0x8 + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADARCH = syscall.Errno(0x56) + EBADEXEC = syscall.Errno(0x55) + EBADF = syscall.Errno(0x9) + EBADMACHO = syscall.Errno(0x58) + EBADMSG = syscall.Errno(0x5e) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x59) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDEVERR = syscall.Errno(0x53) + EDOM = syscall.Errno(0x21) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x5a) + EILSEQ = syscall.Errno(0x5c) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x6a) + ELOOP = syscall.Errno(0x3e) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + EMULTIHOP = syscall.Errno(0x5f) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x5d) + ENOBUFS = syscall.Errno(0x37) + ENODATA = syscall.Errno(0x60) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOLINK = syscall.Errno(0x61) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x5b) + ENOPOLICY = syscall.Errno(0x67) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x62) + ENOSTR = syscall.Errno(0x63) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTRECOVERABLE = syscall.Errno(0x68) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x2d) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x66) + EOVERFLOW = syscall.Errno(0x54) + EOWNERDEAD = syscall.Errno(0x69) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x64) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + EPWROFF = syscall.Errno(0x52) + EQFULL = syscall.Errno(0x6a) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHLIBVERS = syscall.Errno(0x57) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIME = syscall.Errno(0x65) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "resource busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "operation timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "device power is off", + 83: "device error", + 84: "value too large to be stored in data type", + 85: "bad executable (or shared library)", + 86: "bad CPU type in executable", + 87: "shared library version mismatch", + 88: "malformed Mach-o file", + 89: "operation canceled", + 90: "identifier removed", + 91: "no message of desired type", + 92: "illegal byte sequence", + 93: "attribute not found", + 94: "bad message", + 95: "EMULTIHOP (Reserved)", + 96: "no message available on STREAM", + 97: "ENOLINK (Reserved)", + 98: "no STREAM resources", + 99: "not a STREAM", + 100: "protocol error", + 101: "STREAM ioctl timeout", + 102: "operation not supported on socket", + 103: "policy not found", + 104: "state not recoverable", + 105: "previous owner died", + 106: "interface output queue is full", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "suspended (signal)", + 18: "suspended", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_dragonfly_386.go b/vendor/golang.org/x/sys/unix/zerrors_dragonfly_386.go new file mode 100644 index 0000000..2a329f0 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_dragonfly_386.go @@ -0,0 +1,1530 @@ +// mkerrors.sh -m32 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build 386,dragonfly + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m32 _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_ATM = 0x1e + AF_BLUETOOTH = 0x21 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1a + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x23 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x1c + AF_IPX = 0x17 + AF_ISDN = 0x1a + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x24 + AF_MPLS = 0x22 + AF_NATM = 0x1d + AF_NETGRAPH = 0x20 + AF_NS = 0x6 + AF_OSI = 0x7 + AF_PUP = 0x4 + AF_ROUTE = 0x11 + AF_SIP = 0x18 + AF_SNA = 0xb + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B9600 = 0x2580 + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc0084279 + BIOCGETIF = 0x4020426b + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044272 + BIOCGRTIMEOUT = 0x4008426e + BIOCGSEESENT = 0x40044276 + BIOCGSTATS = 0x4008426f + BIOCIMMEDIATE = 0x80044270 + BIOCLOCK = 0x2000427a + BIOCPROMISC = 0x20004269 + BIOCSBLEN = 0xc0044266 + BIOCSDLT = 0x80044278 + BIOCSETF = 0x80084267 + BIOCSETIF = 0x8020426c + BIOCSETWF = 0x8008427b + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044273 + BIOCSRTIMEOUT = 0x8008426d + BIOCSSEESENT = 0x80044277 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DEFAULTBUFSIZE = 0x1000 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x80000 + BPF_MAXINSNS = 0x200 + BPF_MAX_CLONES = 0x80 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0xc + CTL_NET = 0x4 + DLT_A429 = 0xb8 + DLT_A653_ICM = 0xb9 + DLT_AIRONET_HEADER = 0x78 + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_AX25_KISS = 0xca + DLT_BACNET_MS_TP = 0xa5 + DLT_BLUETOOTH_HCI_H4 = 0xbb + DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 + DLT_CAN20B = 0xbe + DLT_CHAOS = 0x5 + DLT_CHDLC = 0x68 + DLT_CISCO_IOS = 0x76 + DLT_C_HDLC = 0x68 + DLT_C_HDLC_WITH_DIR = 0xcd + DLT_DOCSIS = 0x8f + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_ERF = 0xc5 + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FDDI = 0xa + DLT_FLEXRAY = 0xd2 + DLT_FRELAY = 0x6b + DLT_FRELAY_WITH_DIR = 0xce + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_HHDLC = 0x79 + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IEEE802_15_4 = 0xc3 + DLT_IEEE802_15_4_LINUX = 0xbf + DLT_IEEE802_15_4_NONASK_PHY = 0xd7 + DLT_IEEE802_16_MAC_CPS = 0xbc + DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 + DLT_IPFILTER = 0x74 + DLT_IPMB = 0xc7 + DLT_IPMB_LINUX = 0xd1 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_ISM = 0xc2 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_JUNIPER_ST = 0xc8 + DLT_JUNIPER_VP = 0xb7 + DLT_LAPB_WITH_DIR = 0xcf + DLT_LAPD = 0xcb + DLT_LIN = 0xd4 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MFR = 0xb6 + DLT_MOST = 0xd3 + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPI = 0xc0 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0x10 + DLT_PPP_ETHER = 0x33 + DLT_PPP_PPPD = 0xa6 + DLT_PPP_SERIAL = 0x32 + DLT_PPP_WITH_DIR = 0xcc + DLT_PRISM_HEADER = 0x77 + DLT_PRONET = 0x4 + DLT_RAIF1 = 0xc6 + DLT_RAW = 0xc + DLT_REDBACK_SMARTEDGE = 0x20 + DLT_RIO = 0x7c + DLT_SCCP = 0x8e + DLT_SITA = 0xc4 + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + DLT_USB = 0xba + DLT_USB_LINUX = 0xbd + DLT_X2E_SERIAL = 0xd5 + DLT_X2E_XORAYA = 0xd6 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DBF = 0xf + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EVFILT_AIO = -0x3 + EVFILT_EXCEPT = -0x8 + EVFILT_MARKER = 0xf + EVFILT_PROC = -0x5 + EVFILT_READ = -0x1 + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0x8 + EVFILT_TIMER = -0x7 + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG1 = 0x2000 + EV_NODATA = 0x1000 + EV_ONESHOT = 0x10 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTB = 0x9600 + EXTEXIT_LWP = 0x10000 + EXTEXIT_PROC = 0x0 + EXTEXIT_SETINT = 0x1 + EXTEXIT_SIMPLE = 0x0 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_DUP2FD = 0xa + F_DUP2FD_CLOEXEC = 0x12 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x11 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0x7 + F_GETOWN = 0x5 + F_OK = 0x0 + F_RDLCK = 0x1 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x8 + F_SETLKW = 0x9 + F_SETOWN = 0x6 + F_UNLCK = 0x2 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFAN_ARRIVAL = 0x0 + IFAN_DEPARTURE = 0x1 + IFF_ALLMULTI = 0x200 + IFF_ALTPHYS = 0x4000 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x118e72 + IFF_DEBUG = 0x4 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MONITOR = 0x40000 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_NPOLLING = 0x100000 + IFF_OACTIVE = 0x400 + IFF_OACTIVE_COMPAT = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_POLLING = 0x10000 + IFF_POLLING_COMPAT = 0x10000 + IFF_PPROMISC = 0x20000 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_SMART = 0x20 + IFF_STATICARP = 0x80000 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_A12MPPSWITCH = 0x82 + IFT_AAL2 = 0xbb + IFT_AAL5 = 0x31 + IFT_ADSL = 0x5e + IFT_AFLANE8023 = 0x3b + IFT_AFLANE8025 = 0x3c + IFT_ARAP = 0x58 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ASYNC = 0x54 + IFT_ATM = 0x25 + IFT_ATMDXI = 0x69 + IFT_ATMFUNI = 0x6a + IFT_ATMIMA = 0x6b + IFT_ATMLOGICAL = 0x50 + IFT_ATMRADIO = 0xbd + IFT_ATMSUBINTERFACE = 0x86 + IFT_ATMVCIENDPT = 0xc2 + IFT_ATMVIRTUAL = 0x95 + IFT_BGPPOLICYACCOUNTING = 0xa2 + IFT_BRIDGE = 0xd1 + IFT_BSC = 0x53 + IFT_CARP = 0xf8 + IFT_CCTEMUL = 0x3d + IFT_CEPT = 0x13 + IFT_CES = 0x85 + IFT_CHANNEL = 0x46 + IFT_CNR = 0x55 + IFT_COFFEE = 0x84 + IFT_COMPOSITELINK = 0x9b + IFT_DCN = 0x8d + IFT_DIGITALPOWERLINE = 0x8a + IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba + IFT_DLSW = 0x4a + IFT_DOCSCABLEDOWNSTREAM = 0x80 + IFT_DOCSCABLEMACLAYER = 0x7f + IFT_DOCSCABLEUPSTREAM = 0x81 + IFT_DS0 = 0x51 + IFT_DS0BUNDLE = 0x52 + IFT_DS1FDL = 0xaa + IFT_DS3 = 0x1e + IFT_DTM = 0x8c + IFT_DVBASILN = 0xac + IFT_DVBASIOUT = 0xad + IFT_DVBRCCDOWNSTREAM = 0x93 + IFT_DVBRCCMACLAYER = 0x92 + IFT_DVBRCCUPSTREAM = 0x94 + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_EPLRS = 0x57 + IFT_ESCON = 0x49 + IFT_ETHER = 0x6 + IFT_FAITH = 0xf2 + IFT_FAST = 0x7d + IFT_FASTETHER = 0x3e + IFT_FASTETHERFX = 0x45 + IFT_FDDI = 0xf + IFT_FIBRECHANNEL = 0x38 + IFT_FRAMERELAYINTERCONNECT = 0x3a + IFT_FRAMERELAYMPI = 0x5c + IFT_FRDLCIENDPT = 0xc1 + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_FRF16MFRBUNDLE = 0xa3 + IFT_FRFORWARD = 0x9e + IFT_G703AT2MB = 0x43 + IFT_G703AT64K = 0x42 + IFT_GIF = 0xf0 + IFT_GIGABITETHERNET = 0x75 + IFT_GR303IDT = 0xb2 + IFT_GR303RDT = 0xb1 + IFT_H323GATEKEEPER = 0xa4 + IFT_H323PROXY = 0xa5 + IFT_HDH1822 = 0x3 + IFT_HDLC = 0x76 + IFT_HDSL2 = 0xa8 + IFT_HIPERLAN2 = 0xb7 + IFT_HIPPI = 0x2f + IFT_HIPPIINTERFACE = 0x39 + IFT_HOSTPAD = 0x5a + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IBM370PARCHAN = 0x48 + IFT_IDSL = 0x9a + IFT_IEEE1394 = 0x90 + IFT_IEEE80211 = 0x47 + IFT_IEEE80212 = 0x37 + IFT_IEEE8023ADLAG = 0xa1 + IFT_IFGSN = 0x91 + IFT_IMT = 0xbe + IFT_INTERLEAVE = 0x7c + IFT_IP = 0x7e + IFT_IPFORWARD = 0x8e + IFT_IPOVERATM = 0x72 + IFT_IPOVERCDLC = 0x6d + IFT_IPOVERCLAW = 0x6e + IFT_IPSWITCH = 0x4e + IFT_ISDN = 0x3f + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISDNS = 0x4b + IFT_ISDNU = 0x4c + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88025CRFPINT = 0x62 + IFT_ISO88025DTR = 0x56 + IFT_ISO88025FIBER = 0x73 + IFT_ISO88026 = 0xa + IFT_ISUP = 0xb3 + IFT_L2VLAN = 0x87 + IFT_L3IPVLAN = 0x88 + IFT_L3IPXVLAN = 0x89 + IFT_LAPB = 0x10 + IFT_LAPD = 0x4d + IFT_LAPF = 0x77 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_MPC = 0x71 + IFT_MPLS = 0xa6 + IFT_MPLSTUNNEL = 0x96 + IFT_MSDSL = 0x8f + IFT_MVL = 0xbf + IFT_MYRINET = 0x63 + IFT_NFAS = 0xaf + IFT_NSIP = 0x1b + IFT_OPTICALCHANNEL = 0xc3 + IFT_OPTICALTRANSPORT = 0xc4 + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PFLOG = 0xf5 + IFT_PFSYNC = 0xf6 + IFT_PLC = 0xae + IFT_POS = 0xab + IFT_PPP = 0x17 + IFT_PPPMULTILINKBUNDLE = 0x6c + IFT_PROPBWAP2MP = 0xb8 + IFT_PROPCNLS = 0x59 + IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 + IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 + IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PROPWIRELESSP2P = 0x9d + IFT_PTPSERIAL = 0x16 + IFT_PVC = 0xf1 + IFT_QLLC = 0x44 + IFT_RADIOMAC = 0xbc + IFT_RADSL = 0x5f + IFT_REACHDSL = 0xc0 + IFT_RFC1483 = 0x9f + IFT_RS232 = 0x21 + IFT_RSRB = 0x4f + IFT_SDLC = 0x11 + IFT_SDSL = 0x60 + IFT_SHDSL = 0xa9 + IFT_SIP = 0x1f + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETOVERHEADCHANNEL = 0xb9 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_SRP = 0x97 + IFT_SS7SIGLINK = 0x9c + IFT_STACKTOSTACK = 0x6f + IFT_STARLAN = 0xb + IFT_STF = 0xf3 + IFT_T1 = 0x12 + IFT_TDLC = 0x74 + IFT_TERMPAD = 0x5b + IFT_TR008 = 0xb0 + IFT_TRANSPHDLC = 0x7b + IFT_TUNNEL = 0x83 + IFT_ULTRA = 0x1d + IFT_USB = 0xa0 + IFT_V11 = 0x40 + IFT_V35 = 0x2d + IFT_V36 = 0x41 + IFT_V37 = 0x78 + IFT_VDSL = 0x61 + IFT_VIRTUALIPADDRESS = 0x70 + IFT_VOICEEM = 0x64 + IFT_VOICEENCAP = 0x67 + IFT_VOICEFXO = 0x65 + IFT_VOICEFXS = 0x66 + IFT_VOICEOVERATM = 0x98 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25HUNTGROUP = 0x7a + IFT_X25MLP = 0x79 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LOOPBACKNET = 0x7f + IPPROTO_3PC = 0x22 + IPPROTO_ADFS = 0x44 + IPPROTO_AH = 0x33 + IPPROTO_AHIP = 0x3d + IPPROTO_APES = 0x63 + IPPROTO_ARGUS = 0xd + IPPROTO_AX25 = 0x5d + IPPROTO_BHA = 0x31 + IPPROTO_BLT = 0x1e + IPPROTO_BRSATMON = 0x4c + IPPROTO_CARP = 0x70 + IPPROTO_CFTP = 0x3e + IPPROTO_CHAOS = 0x10 + IPPROTO_CMTP = 0x26 + IPPROTO_CPHB = 0x49 + IPPROTO_CPNX = 0x48 + IPPROTO_DDP = 0x25 + IPPROTO_DGP = 0x56 + IPPROTO_DIVERT = 0xfe + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_EMCON = 0xe + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GMTP = 0x64 + IPPROTO_GRE = 0x2f + IPPROTO_HELLO = 0x3f + IPPROTO_HMP = 0x14 + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IDPR = 0x23 + IPPROTO_IDRP = 0x2d + IPPROTO_IGMP = 0x2 + IPPROTO_IGP = 0x55 + IPPROTO_IGRP = 0x58 + IPPROTO_IL = 0x28 + IPPROTO_INLSP = 0x34 + IPPROTO_INP = 0x20 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPCV = 0x47 + IPPROTO_IPEIP = 0x5e + IPPROTO_IPIP = 0x4 + IPPROTO_IPPC = 0x43 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IRTP = 0x1c + IPPROTO_KRYPTOLAN = 0x41 + IPPROTO_LARP = 0x5b + IPPROTO_LEAF1 = 0x19 + IPPROTO_LEAF2 = 0x1a + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x34 + IPPROTO_MEAS = 0x13 + IPPROTO_MHRP = 0x30 + IPPROTO_MICP = 0x5f + IPPROTO_MOBILE = 0x37 + IPPROTO_MTP = 0x5c + IPPROTO_MUX = 0x12 + IPPROTO_ND = 0x4d + IPPROTO_NHRP = 0x36 + IPPROTO_NONE = 0x3b + IPPROTO_NSP = 0x1f + IPPROTO_NVPII = 0xb + IPPROTO_OSPFIGP = 0x59 + IPPROTO_PFSYNC = 0xf0 + IPPROTO_PGM = 0x71 + IPPROTO_PIGP = 0x9 + IPPROTO_PIM = 0x67 + IPPROTO_PRM = 0x15 + IPPROTO_PUP = 0xc + IPPROTO_PVP = 0x4b + IPPROTO_RAW = 0xff + IPPROTO_RCCMON = 0xa + IPPROTO_RDP = 0x1b + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_RVD = 0x42 + IPPROTO_SATEXPAK = 0x40 + IPPROTO_SATMON = 0x45 + IPPROTO_SCCSP = 0x60 + IPPROTO_SCTP = 0x84 + IPPROTO_SDRP = 0x2a + IPPROTO_SEP = 0x21 + IPPROTO_SKIP = 0x39 + IPPROTO_SRPC = 0x5a + IPPROTO_ST = 0x7 + IPPROTO_SVMTP = 0x52 + IPPROTO_SWIPE = 0x35 + IPPROTO_TCF = 0x57 + IPPROTO_TCP = 0x6 + IPPROTO_TLSP = 0x38 + IPPROTO_TP = 0x1d + IPPROTO_TPXX = 0x27 + IPPROTO_TRUNK1 = 0x17 + IPPROTO_TRUNK2 = 0x18 + IPPROTO_TTP = 0x54 + IPPROTO_UDP = 0x11 + IPPROTO_UNKNOWN = 0x102 + IPPROTO_VINES = 0x53 + IPPROTO_VISA = 0x46 + IPPROTO_VMTP = 0x51 + IPPROTO_WBEXPAK = 0x4f + IPPROTO_WBMON = 0x4e + IPPROTO_WSN = 0x4a + IPPROTO_XNET = 0xf + IPPROTO_XTP = 0x24 + IPV6_AUTOFLOWLABEL = 0x3b + IPV6_BINDV6ONLY = 0x1b + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_DONTFRAG = 0x3e + IPV6_DSTOPTS = 0x32 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x78 + IPV6_FW_ADD = 0x1e + IPV6_FW_DEL = 0x1f + IPV6_FW_FLUSH = 0x20 + IPV6_FW_GET = 0x22 + IPV6_FW_ZERO = 0x21 + IPV6_HLIMDEC = 0x1 + IPV6_HOPLIMIT = 0x2f + IPV6_HOPOPTS = 0x31 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXPACKET = 0xffff + IPV6_MMTU = 0x500 + IPV6_MSFILTER = 0x4a + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_NEXTHOP = 0x30 + IPV6_PATHMTU = 0x2c + IPV6_PKTINFO = 0x2e + IPV6_PKTOPTIONS = 0x34 + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_PREFER_TEMPADDR = 0x3f + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVHOPLIMIT = 0x25 + IPV6_RECVHOPOPTS = 0x27 + IPV6_RECVPATHMTU = 0x2b + IPV6_RECVPKTINFO = 0x24 + IPV6_RECVRTHDR = 0x26 + IPV6_RECVTCLASS = 0x39 + IPV6_RTHDR = 0x33 + IPV6_RTHDRDSTOPTS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x3d + IPV6_UNICAST_HOPS = 0x4 + IPV6_USE_MIN_MTU = 0x2a + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0xd + IP_DUMMYNET_CONFIGURE = 0x3c + IP_DUMMYNET_DEL = 0x3d + IP_DUMMYNET_FLUSH = 0x3e + IP_DUMMYNET_GET = 0x40 + IP_FAITH = 0x16 + IP_FW_ADD = 0x32 + IP_FW_DEL = 0x33 + IP_FW_FLUSH = 0x34 + IP_FW_GET = 0x36 + IP_FW_RESETLOG = 0x37 + IP_FW_ZERO = 0x35 + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x15 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINTTL = 0x42 + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_MULTICAST_VIF = 0xe + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x1 + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVRETOPTS = 0x6 + IP_RECVTTL = 0x41 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RSVP_OFF = 0x10 + IP_RSVP_ON = 0xf + IP_RSVP_VIF_OFF = 0x12 + IP_RSVP_VIF_ON = 0x11 + IP_TOS = 0x3 + IP_TTL = 0x4 + ISIG = 0x80 + ISTRIP = 0x20 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_AUTOSYNC = 0x7 + MADV_CONTROL_END = 0xb + MADV_CONTROL_START = 0xa + MADV_CORE = 0x9 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x5 + MADV_INVAL = 0xa + MADV_NOCORE = 0x8 + MADV_NORMAL = 0x0 + MADV_NOSYNC = 0x6 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_SETMAP = 0xb + MADV_WILLNEED = 0x3 + MAP_ANON = 0x1000 + MAP_COPY = 0x2 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_HASSEMAPHORE = 0x200 + MAP_INHERIT = 0x80 + MAP_NOCORE = 0x20000 + MAP_NOEXTEND = 0x100 + MAP_NORESERVE = 0x40 + MAP_NOSYNC = 0x800 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_SHARED = 0x1 + MAP_SIZEALIGN = 0x40000 + MAP_STACK = 0x400 + MAP_TRYFIXED = 0x10000 + MAP_VPAGETABLE = 0x2000 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOF = 0x100 + MSG_EOR = 0x8 + MSG_FBLOCKING = 0x10000 + MSG_FMASK = 0xffff0000 + MSG_FNONBLOCKING = 0x20000 + MSG_NOSIGNAL = 0x400 + MSG_NOTIFICATION = 0x200 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_SYNC = 0x800 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x2 + MS_SYNC = 0x0 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_MAXID = 0x4 + NOFLSH = 0x80000000 + NOTE_ATTRIB = 0x8 + NOTE_CHILD = 0x4 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXTEND = 0x4 + NOTE_FORK = 0x40000000 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_OOB = 0x2 + NOTE_PCTRLMASK = 0xf0000000 + NOTE_PDATAMASK = 0xfffff + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x20000 + O_CREAT = 0x200 + O_DIRECT = 0x10000 + O_DIRECTORY = 0x8000000 + O_EXCL = 0x800 + O_EXLOCK = 0x20 + O_FAPPEND = 0x100000 + O_FASYNCWRITE = 0x800000 + O_FBLOCKING = 0x40000 + O_FBUFFERED = 0x2000000 + O_FMASK = 0x7fc0000 + O_FNONBLOCKING = 0x80000 + O_FOFFSET = 0x200000 + O_FSYNC = 0x80 + O_FSYNCWRITE = 0x400000 + O_FUNBUFFERED = 0x1000000 + O_MAPONREAD = 0x4000000 + O_NDELAY = 0x4 + O_NOCTTY = 0x8000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_SHLOCK = 0x10 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + RLIMIT_AS = 0xa + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0xb + RTAX_MPLS1 = 0x8 + RTAX_MPLS2 = 0x9 + RTAX_MPLS3 = 0xa + RTAX_NETMASK = 0x2 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_MPLS1 = 0x100 + RTA_MPLS2 = 0x200 + RTA_MPLS3 = 0x400 + RTA_NETMASK = 0x4 + RTF_BLACKHOLE = 0x1000 + RTF_BROADCAST = 0x400000 + RTF_CLONING = 0x100 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_LLINFO = 0x400 + RTF_LOCAL = 0x200000 + RTF_MODIFIED = 0x20 + RTF_MPLSOPS = 0x1000000 + RTF_MULTICAST = 0x800000 + RTF_PINNED = 0x100000 + RTF_PRCLONING = 0x10000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x40000 + RTF_REJECT = 0x8 + RTF_STATIC = 0x800 + RTF_UP = 0x1 + RTF_WASCLONED = 0x20000 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DELMADDR = 0x10 + RTM_GET = 0x4 + RTM_IEEE80211 = 0x12 + RTM_IFANNOUNCE = 0x11 + RTM_IFINFO = 0xe + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_NEWMADDR = 0xf + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x6 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_IWCAPSEGS = 0x400 + RTV_IWMAXSEGS = 0x200 + RTV_MSL = 0x100 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + SCM_CREDS = 0x3 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x2 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCADDRT = 0x8030720a + SIOCAIFADDR = 0x8040691a + SIOCALIFADDR = 0x8118691b + SIOCATMARK = 0x40047307 + SIOCDELMULTI = 0x80206932 + SIOCDELRT = 0x8030720b + SIOCDIFADDR = 0x80206919 + SIOCDIFPHYADDR = 0x80206949 + SIOCDLIFADDR = 0x8118691d + SIOCGDRVSPEC = 0xc01c697b + SIOCGETSGCNT = 0xc0147210 + SIOCGETVIFCNT = 0xc014720f + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0206921 + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCAP = 0xc020691f + SIOCGIFCONF = 0xc0086924 + SIOCGIFDATA = 0xc0206926 + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGENERIC = 0xc020693a + SIOCGIFGMEMB = 0xc024698a + SIOCGIFINDEX = 0xc0206920 + SIOCGIFMEDIA = 0xc0286938 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc0206933 + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPDSTADDR = 0xc0206948 + SIOCGIFPHYS = 0xc0206935 + SIOCGIFPOLLCPU = 0xc020697e + SIOCGIFPSRCADDR = 0xc0206947 + SIOCGIFSTATUS = 0xc331693b + SIOCGIFTSOLEN = 0xc0206980 + SIOCGLIFADDR = 0xc118691c + SIOCGLIFPHYADDR = 0xc118694b + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCGPRIVATE_0 = 0xc0206950 + SIOCGPRIVATE_1 = 0xc0206951 + SIOCIFCREATE = 0xc020697a + SIOCIFCREATE2 = 0xc020697c + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc00c6978 + SIOCSDRVSPEC = 0x801c697b + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFCAP = 0x8020691e + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGENERIC = 0x80206939 + SIOCSIFLLADDR = 0x8020693c + SIOCSIFMEDIA = 0xc0206937 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x80206934 + SIOCSIFNAME = 0x80206928 + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPHYADDR = 0x80406946 + SIOCSIFPHYS = 0x80206936 + SIOCSIFPOLLCPU = 0x8020697d + SIOCSIFTSOLEN = 0x8020697f + SIOCSLIFPHYADDR = 0x8118694a + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SOCK_DGRAM = 0x2 + SOCK_MAXADDRLEN = 0xff + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_ACCEPTFILTER = 0x1000 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LINGER = 0x80 + SO_NOSIGPIPE = 0x800 + SO_OOBINLINE = 0x100 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDSPACE = 0x100a + SO_SNDTIMEO = 0x1005 + SO_TIMESTAMP = 0x400 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_FASTKEEP = 0x80 + TCP_KEEPCNT = 0x400 + TCP_KEEPIDLE = 0x100 + TCP_KEEPINIT = 0x20 + TCP_KEEPINTVL = 0x200 + TCP_MAXBURST = 0x4 + TCP_MAXHLEN = 0x3c + TCP_MAXOLEN = 0x28 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MINMSS = 0x100 + TCP_MIN_WINSHIFT = 0x5 + TCP_MSS = 0x200 + TCP_NODELAY = 0x1 + TCP_NOOPT = 0x8 + TCP_NOPUSH = 0x4 + TCP_SIGNATURE_ENABLE = 0x10 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDCDTIMESTAMP = 0x40087458 + TIOCDRAIN = 0x2000745e + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLUSH = 0x80047410 + TIOCGDRAINWAIT = 0x40047456 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGPGRP = 0x40047477 + TIOCGSID = 0x40047463 + TIOCGSIZE = 0x40087468 + TIOCGWINSZ = 0x40087468 + TIOCISPTMASTER = 0x20007455 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGDTRWAIT = 0x4004745a + TIOCMGET = 0x4004746a + TIOCMODG = 0x40047403 + TIOCMODS = 0x80047404 + TIOCMSDTRWAIT = 0x8004745b + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCREMOTE = 0x80047469 + TIOCSBRK = 0x2000747b + TIOCSCTTY = 0x20007461 + TIOCSDRAINWAIT = 0x80047457 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSIG = 0x2000745f + TIOCSPGRP = 0x80047476 + TIOCSSIZE = 0x80087467 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x20007465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCTIMESTAMP = 0x40087459 + TIOCUCNTL = 0x80047466 + TOSTOP = 0x400000 + VCHECKPT = 0x13 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VERASE2 = 0x7 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VTIME = 0x11 + VWERASE = 0x4 + WCONTINUED = 0x4 + WCOREFLAG = 0x80 + WLINUXCLONE = 0x80000000 + WNOHANG = 0x1 + WSTOPPED = 0x7f + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EASYNC = syscall.Errno(0x63) + EAUTH = syscall.Errno(0x50) + EBADF = syscall.Errno(0x9) + EBADMSG = syscall.Errno(0x59) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x55) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDOM = syscall.Errno(0x21) + EDOOFUS = syscall.Errno(0x58) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x52) + EILSEQ = syscall.Errno(0x56) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x63) + ELOOP = syscall.Errno(0x3e) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + EMULTIHOP = syscall.Errno(0x5a) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x57) + ENOBUFS = syscall.Errno(0x37) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOLINK = syscall.Errno(0x5b) + ENOMEDIUM = syscall.Errno(0x5d) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x53) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x2d) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x2d) + EOVERFLOW = syscall.Errno(0x54) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x5c) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUNUSED94 = syscall.Errno(0x5e) + EUNUSED95 = syscall.Errno(0x5f) + EUNUSED96 = syscall.Errno(0x60) + EUNUSED97 = syscall.Errno(0x61) + EUNUSED98 = syscall.Errno(0x62) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCKPT = syscall.Signal(0x21) + SIGCKPTEXIT = syscall.Signal(0x22) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTHR = syscall.Signal(0x20) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "operation timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "identifier removed", + 83: "no message of desired type", + 84: "value too large to be stored in data type", + 85: "operation canceled", + 86: "illegal byte sequence", + 87: "attribute not found", + 88: "programming error", + 89: "bad message", + 90: "multihop attempted", + 91: "link has been severed", + 92: "protocol error", + 93: "no medium found", + 94: "unknown error: 94", + 95: "unknown error: 95", + 96: "unknown error: 96", + 97: "unknown error: 97", + 98: "unknown error: 98", + 99: "unknown error: 99", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "suspended (signal)", + 18: "suspended", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", + 32: "thread Scheduler", + 33: "checkPoint", + 34: "checkPointExit", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go new file mode 100644 index 0000000..0feceee --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go @@ -0,0 +1,1530 @@ +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,dragonfly + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m64 _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_ATM = 0x1e + AF_BLUETOOTH = 0x21 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1a + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x23 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x1c + AF_IPX = 0x17 + AF_ISDN = 0x1a + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x24 + AF_MPLS = 0x22 + AF_NATM = 0x1d + AF_NETGRAPH = 0x20 + AF_NS = 0x6 + AF_OSI = 0x7 + AF_PUP = 0x4 + AF_ROUTE = 0x11 + AF_SIP = 0x18 + AF_SNA = 0xb + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B9600 = 0x2580 + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc0104279 + BIOCGETIF = 0x4020426b + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044272 + BIOCGRTIMEOUT = 0x4010426e + BIOCGSEESENT = 0x40044276 + BIOCGSTATS = 0x4008426f + BIOCIMMEDIATE = 0x80044270 + BIOCLOCK = 0x2000427a + BIOCPROMISC = 0x20004269 + BIOCSBLEN = 0xc0044266 + BIOCSDLT = 0x80044278 + BIOCSETF = 0x80104267 + BIOCSETIF = 0x8020426c + BIOCSETWF = 0x8010427b + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044273 + BIOCSRTIMEOUT = 0x8010426d + BIOCSSEESENT = 0x80044277 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x8 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DEFAULTBUFSIZE = 0x1000 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x80000 + BPF_MAXINSNS = 0x200 + BPF_MAX_CLONES = 0x80 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0xc + CTL_NET = 0x4 + DLT_A429 = 0xb8 + DLT_A653_ICM = 0xb9 + DLT_AIRONET_HEADER = 0x78 + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_AX25_KISS = 0xca + DLT_BACNET_MS_TP = 0xa5 + DLT_BLUETOOTH_HCI_H4 = 0xbb + DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 + DLT_CAN20B = 0xbe + DLT_CHAOS = 0x5 + DLT_CHDLC = 0x68 + DLT_CISCO_IOS = 0x76 + DLT_C_HDLC = 0x68 + DLT_C_HDLC_WITH_DIR = 0xcd + DLT_DOCSIS = 0x8f + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_ERF = 0xc5 + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FDDI = 0xa + DLT_FLEXRAY = 0xd2 + DLT_FRELAY = 0x6b + DLT_FRELAY_WITH_DIR = 0xce + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_HHDLC = 0x79 + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IEEE802_15_4 = 0xc3 + DLT_IEEE802_15_4_LINUX = 0xbf + DLT_IEEE802_15_4_NONASK_PHY = 0xd7 + DLT_IEEE802_16_MAC_CPS = 0xbc + DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 + DLT_IPFILTER = 0x74 + DLT_IPMB = 0xc7 + DLT_IPMB_LINUX = 0xd1 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_ISM = 0xc2 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_JUNIPER_ST = 0xc8 + DLT_JUNIPER_VP = 0xb7 + DLT_LAPB_WITH_DIR = 0xcf + DLT_LAPD = 0xcb + DLT_LIN = 0xd4 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MFR = 0xb6 + DLT_MOST = 0xd3 + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPI = 0xc0 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0x10 + DLT_PPP_ETHER = 0x33 + DLT_PPP_PPPD = 0xa6 + DLT_PPP_SERIAL = 0x32 + DLT_PPP_WITH_DIR = 0xcc + DLT_PRISM_HEADER = 0x77 + DLT_PRONET = 0x4 + DLT_RAIF1 = 0xc6 + DLT_RAW = 0xc + DLT_REDBACK_SMARTEDGE = 0x20 + DLT_RIO = 0x7c + DLT_SCCP = 0x8e + DLT_SITA = 0xc4 + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + DLT_USB = 0xba + DLT_USB_LINUX = 0xbd + DLT_X2E_SERIAL = 0xd5 + DLT_X2E_XORAYA = 0xd6 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DBF = 0xf + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EVFILT_AIO = -0x3 + EVFILT_EXCEPT = -0x8 + EVFILT_MARKER = 0xf + EVFILT_PROC = -0x5 + EVFILT_READ = -0x1 + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0x8 + EVFILT_TIMER = -0x7 + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG1 = 0x2000 + EV_NODATA = 0x1000 + EV_ONESHOT = 0x10 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTB = 0x9600 + EXTEXIT_LWP = 0x10000 + EXTEXIT_PROC = 0x0 + EXTEXIT_SETINT = 0x1 + EXTEXIT_SIMPLE = 0x0 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_DUP2FD = 0xa + F_DUP2FD_CLOEXEC = 0x12 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x11 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0x7 + F_GETOWN = 0x5 + F_OK = 0x0 + F_RDLCK = 0x1 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x8 + F_SETLKW = 0x9 + F_SETOWN = 0x6 + F_UNLCK = 0x2 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFAN_ARRIVAL = 0x0 + IFAN_DEPARTURE = 0x1 + IFF_ALLMULTI = 0x200 + IFF_ALTPHYS = 0x4000 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x118e72 + IFF_DEBUG = 0x4 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MONITOR = 0x40000 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_NPOLLING = 0x100000 + IFF_OACTIVE = 0x400 + IFF_OACTIVE_COMPAT = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_POLLING = 0x10000 + IFF_POLLING_COMPAT = 0x10000 + IFF_PPROMISC = 0x20000 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_SMART = 0x20 + IFF_STATICARP = 0x80000 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_A12MPPSWITCH = 0x82 + IFT_AAL2 = 0xbb + IFT_AAL5 = 0x31 + IFT_ADSL = 0x5e + IFT_AFLANE8023 = 0x3b + IFT_AFLANE8025 = 0x3c + IFT_ARAP = 0x58 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ASYNC = 0x54 + IFT_ATM = 0x25 + IFT_ATMDXI = 0x69 + IFT_ATMFUNI = 0x6a + IFT_ATMIMA = 0x6b + IFT_ATMLOGICAL = 0x50 + IFT_ATMRADIO = 0xbd + IFT_ATMSUBINTERFACE = 0x86 + IFT_ATMVCIENDPT = 0xc2 + IFT_ATMVIRTUAL = 0x95 + IFT_BGPPOLICYACCOUNTING = 0xa2 + IFT_BRIDGE = 0xd1 + IFT_BSC = 0x53 + IFT_CARP = 0xf8 + IFT_CCTEMUL = 0x3d + IFT_CEPT = 0x13 + IFT_CES = 0x85 + IFT_CHANNEL = 0x46 + IFT_CNR = 0x55 + IFT_COFFEE = 0x84 + IFT_COMPOSITELINK = 0x9b + IFT_DCN = 0x8d + IFT_DIGITALPOWERLINE = 0x8a + IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba + IFT_DLSW = 0x4a + IFT_DOCSCABLEDOWNSTREAM = 0x80 + IFT_DOCSCABLEMACLAYER = 0x7f + IFT_DOCSCABLEUPSTREAM = 0x81 + IFT_DS0 = 0x51 + IFT_DS0BUNDLE = 0x52 + IFT_DS1FDL = 0xaa + IFT_DS3 = 0x1e + IFT_DTM = 0x8c + IFT_DVBASILN = 0xac + IFT_DVBASIOUT = 0xad + IFT_DVBRCCDOWNSTREAM = 0x93 + IFT_DVBRCCMACLAYER = 0x92 + IFT_DVBRCCUPSTREAM = 0x94 + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_EPLRS = 0x57 + IFT_ESCON = 0x49 + IFT_ETHER = 0x6 + IFT_FAITH = 0xf2 + IFT_FAST = 0x7d + IFT_FASTETHER = 0x3e + IFT_FASTETHERFX = 0x45 + IFT_FDDI = 0xf + IFT_FIBRECHANNEL = 0x38 + IFT_FRAMERELAYINTERCONNECT = 0x3a + IFT_FRAMERELAYMPI = 0x5c + IFT_FRDLCIENDPT = 0xc1 + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_FRF16MFRBUNDLE = 0xa3 + IFT_FRFORWARD = 0x9e + IFT_G703AT2MB = 0x43 + IFT_G703AT64K = 0x42 + IFT_GIF = 0xf0 + IFT_GIGABITETHERNET = 0x75 + IFT_GR303IDT = 0xb2 + IFT_GR303RDT = 0xb1 + IFT_H323GATEKEEPER = 0xa4 + IFT_H323PROXY = 0xa5 + IFT_HDH1822 = 0x3 + IFT_HDLC = 0x76 + IFT_HDSL2 = 0xa8 + IFT_HIPERLAN2 = 0xb7 + IFT_HIPPI = 0x2f + IFT_HIPPIINTERFACE = 0x39 + IFT_HOSTPAD = 0x5a + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IBM370PARCHAN = 0x48 + IFT_IDSL = 0x9a + IFT_IEEE1394 = 0x90 + IFT_IEEE80211 = 0x47 + IFT_IEEE80212 = 0x37 + IFT_IEEE8023ADLAG = 0xa1 + IFT_IFGSN = 0x91 + IFT_IMT = 0xbe + IFT_INTERLEAVE = 0x7c + IFT_IP = 0x7e + IFT_IPFORWARD = 0x8e + IFT_IPOVERATM = 0x72 + IFT_IPOVERCDLC = 0x6d + IFT_IPOVERCLAW = 0x6e + IFT_IPSWITCH = 0x4e + IFT_ISDN = 0x3f + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISDNS = 0x4b + IFT_ISDNU = 0x4c + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88025CRFPINT = 0x62 + IFT_ISO88025DTR = 0x56 + IFT_ISO88025FIBER = 0x73 + IFT_ISO88026 = 0xa + IFT_ISUP = 0xb3 + IFT_L2VLAN = 0x87 + IFT_L3IPVLAN = 0x88 + IFT_L3IPXVLAN = 0x89 + IFT_LAPB = 0x10 + IFT_LAPD = 0x4d + IFT_LAPF = 0x77 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_MPC = 0x71 + IFT_MPLS = 0xa6 + IFT_MPLSTUNNEL = 0x96 + IFT_MSDSL = 0x8f + IFT_MVL = 0xbf + IFT_MYRINET = 0x63 + IFT_NFAS = 0xaf + IFT_NSIP = 0x1b + IFT_OPTICALCHANNEL = 0xc3 + IFT_OPTICALTRANSPORT = 0xc4 + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PFLOG = 0xf5 + IFT_PFSYNC = 0xf6 + IFT_PLC = 0xae + IFT_POS = 0xab + IFT_PPP = 0x17 + IFT_PPPMULTILINKBUNDLE = 0x6c + IFT_PROPBWAP2MP = 0xb8 + IFT_PROPCNLS = 0x59 + IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 + IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 + IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PROPWIRELESSP2P = 0x9d + IFT_PTPSERIAL = 0x16 + IFT_PVC = 0xf1 + IFT_QLLC = 0x44 + IFT_RADIOMAC = 0xbc + IFT_RADSL = 0x5f + IFT_REACHDSL = 0xc0 + IFT_RFC1483 = 0x9f + IFT_RS232 = 0x21 + IFT_RSRB = 0x4f + IFT_SDLC = 0x11 + IFT_SDSL = 0x60 + IFT_SHDSL = 0xa9 + IFT_SIP = 0x1f + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETOVERHEADCHANNEL = 0xb9 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_SRP = 0x97 + IFT_SS7SIGLINK = 0x9c + IFT_STACKTOSTACK = 0x6f + IFT_STARLAN = 0xb + IFT_STF = 0xf3 + IFT_T1 = 0x12 + IFT_TDLC = 0x74 + IFT_TERMPAD = 0x5b + IFT_TR008 = 0xb0 + IFT_TRANSPHDLC = 0x7b + IFT_TUNNEL = 0x83 + IFT_ULTRA = 0x1d + IFT_USB = 0xa0 + IFT_V11 = 0x40 + IFT_V35 = 0x2d + IFT_V36 = 0x41 + IFT_V37 = 0x78 + IFT_VDSL = 0x61 + IFT_VIRTUALIPADDRESS = 0x70 + IFT_VOICEEM = 0x64 + IFT_VOICEENCAP = 0x67 + IFT_VOICEFXO = 0x65 + IFT_VOICEFXS = 0x66 + IFT_VOICEOVERATM = 0x98 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25HUNTGROUP = 0x7a + IFT_X25MLP = 0x79 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LOOPBACKNET = 0x7f + IPPROTO_3PC = 0x22 + IPPROTO_ADFS = 0x44 + IPPROTO_AH = 0x33 + IPPROTO_AHIP = 0x3d + IPPROTO_APES = 0x63 + IPPROTO_ARGUS = 0xd + IPPROTO_AX25 = 0x5d + IPPROTO_BHA = 0x31 + IPPROTO_BLT = 0x1e + IPPROTO_BRSATMON = 0x4c + IPPROTO_CARP = 0x70 + IPPROTO_CFTP = 0x3e + IPPROTO_CHAOS = 0x10 + IPPROTO_CMTP = 0x26 + IPPROTO_CPHB = 0x49 + IPPROTO_CPNX = 0x48 + IPPROTO_DDP = 0x25 + IPPROTO_DGP = 0x56 + IPPROTO_DIVERT = 0xfe + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_EMCON = 0xe + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GMTP = 0x64 + IPPROTO_GRE = 0x2f + IPPROTO_HELLO = 0x3f + IPPROTO_HMP = 0x14 + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IDPR = 0x23 + IPPROTO_IDRP = 0x2d + IPPROTO_IGMP = 0x2 + IPPROTO_IGP = 0x55 + IPPROTO_IGRP = 0x58 + IPPROTO_IL = 0x28 + IPPROTO_INLSP = 0x34 + IPPROTO_INP = 0x20 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPCV = 0x47 + IPPROTO_IPEIP = 0x5e + IPPROTO_IPIP = 0x4 + IPPROTO_IPPC = 0x43 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IRTP = 0x1c + IPPROTO_KRYPTOLAN = 0x41 + IPPROTO_LARP = 0x5b + IPPROTO_LEAF1 = 0x19 + IPPROTO_LEAF2 = 0x1a + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x34 + IPPROTO_MEAS = 0x13 + IPPROTO_MHRP = 0x30 + IPPROTO_MICP = 0x5f + IPPROTO_MOBILE = 0x37 + IPPROTO_MTP = 0x5c + IPPROTO_MUX = 0x12 + IPPROTO_ND = 0x4d + IPPROTO_NHRP = 0x36 + IPPROTO_NONE = 0x3b + IPPROTO_NSP = 0x1f + IPPROTO_NVPII = 0xb + IPPROTO_OSPFIGP = 0x59 + IPPROTO_PFSYNC = 0xf0 + IPPROTO_PGM = 0x71 + IPPROTO_PIGP = 0x9 + IPPROTO_PIM = 0x67 + IPPROTO_PRM = 0x15 + IPPROTO_PUP = 0xc + IPPROTO_PVP = 0x4b + IPPROTO_RAW = 0xff + IPPROTO_RCCMON = 0xa + IPPROTO_RDP = 0x1b + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_RVD = 0x42 + IPPROTO_SATEXPAK = 0x40 + IPPROTO_SATMON = 0x45 + IPPROTO_SCCSP = 0x60 + IPPROTO_SCTP = 0x84 + IPPROTO_SDRP = 0x2a + IPPROTO_SEP = 0x21 + IPPROTO_SKIP = 0x39 + IPPROTO_SRPC = 0x5a + IPPROTO_ST = 0x7 + IPPROTO_SVMTP = 0x52 + IPPROTO_SWIPE = 0x35 + IPPROTO_TCF = 0x57 + IPPROTO_TCP = 0x6 + IPPROTO_TLSP = 0x38 + IPPROTO_TP = 0x1d + IPPROTO_TPXX = 0x27 + IPPROTO_TRUNK1 = 0x17 + IPPROTO_TRUNK2 = 0x18 + IPPROTO_TTP = 0x54 + IPPROTO_UDP = 0x11 + IPPROTO_UNKNOWN = 0x102 + IPPROTO_VINES = 0x53 + IPPROTO_VISA = 0x46 + IPPROTO_VMTP = 0x51 + IPPROTO_WBEXPAK = 0x4f + IPPROTO_WBMON = 0x4e + IPPROTO_WSN = 0x4a + IPPROTO_XNET = 0xf + IPPROTO_XTP = 0x24 + IPV6_AUTOFLOWLABEL = 0x3b + IPV6_BINDV6ONLY = 0x1b + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_DONTFRAG = 0x3e + IPV6_DSTOPTS = 0x32 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x78 + IPV6_FW_ADD = 0x1e + IPV6_FW_DEL = 0x1f + IPV6_FW_FLUSH = 0x20 + IPV6_FW_GET = 0x22 + IPV6_FW_ZERO = 0x21 + IPV6_HLIMDEC = 0x1 + IPV6_HOPLIMIT = 0x2f + IPV6_HOPOPTS = 0x31 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXPACKET = 0xffff + IPV6_MMTU = 0x500 + IPV6_MSFILTER = 0x4a + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_NEXTHOP = 0x30 + IPV6_PATHMTU = 0x2c + IPV6_PKTINFO = 0x2e + IPV6_PKTOPTIONS = 0x34 + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_PREFER_TEMPADDR = 0x3f + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVHOPLIMIT = 0x25 + IPV6_RECVHOPOPTS = 0x27 + IPV6_RECVPATHMTU = 0x2b + IPV6_RECVPKTINFO = 0x24 + IPV6_RECVRTHDR = 0x26 + IPV6_RECVTCLASS = 0x39 + IPV6_RTHDR = 0x33 + IPV6_RTHDRDSTOPTS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x3d + IPV6_UNICAST_HOPS = 0x4 + IPV6_USE_MIN_MTU = 0x2a + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0xd + IP_DUMMYNET_CONFIGURE = 0x3c + IP_DUMMYNET_DEL = 0x3d + IP_DUMMYNET_FLUSH = 0x3e + IP_DUMMYNET_GET = 0x40 + IP_FAITH = 0x16 + IP_FW_ADD = 0x32 + IP_FW_DEL = 0x33 + IP_FW_FLUSH = 0x34 + IP_FW_GET = 0x36 + IP_FW_RESETLOG = 0x37 + IP_FW_ZERO = 0x35 + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x15 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINTTL = 0x42 + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_MULTICAST_VIF = 0xe + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x1 + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVRETOPTS = 0x6 + IP_RECVTTL = 0x41 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RSVP_OFF = 0x10 + IP_RSVP_ON = 0xf + IP_RSVP_VIF_OFF = 0x12 + IP_RSVP_VIF_ON = 0x11 + IP_TOS = 0x3 + IP_TTL = 0x4 + ISIG = 0x80 + ISTRIP = 0x20 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_AUTOSYNC = 0x7 + MADV_CONTROL_END = 0xb + MADV_CONTROL_START = 0xa + MADV_CORE = 0x9 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x5 + MADV_INVAL = 0xa + MADV_NOCORE = 0x8 + MADV_NORMAL = 0x0 + MADV_NOSYNC = 0x6 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_SETMAP = 0xb + MADV_WILLNEED = 0x3 + MAP_ANON = 0x1000 + MAP_COPY = 0x2 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_HASSEMAPHORE = 0x200 + MAP_INHERIT = 0x80 + MAP_NOCORE = 0x20000 + MAP_NOEXTEND = 0x100 + MAP_NORESERVE = 0x40 + MAP_NOSYNC = 0x800 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_SHARED = 0x1 + MAP_SIZEALIGN = 0x40000 + MAP_STACK = 0x400 + MAP_TRYFIXED = 0x10000 + MAP_VPAGETABLE = 0x2000 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOF = 0x100 + MSG_EOR = 0x8 + MSG_FBLOCKING = 0x10000 + MSG_FMASK = 0xffff0000 + MSG_FNONBLOCKING = 0x20000 + MSG_NOSIGNAL = 0x400 + MSG_NOTIFICATION = 0x200 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_SYNC = 0x800 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x2 + MS_SYNC = 0x0 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_MAXID = 0x4 + NOFLSH = 0x80000000 + NOTE_ATTRIB = 0x8 + NOTE_CHILD = 0x4 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXTEND = 0x4 + NOTE_FORK = 0x40000000 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_OOB = 0x2 + NOTE_PCTRLMASK = 0xf0000000 + NOTE_PDATAMASK = 0xfffff + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x20000 + O_CREAT = 0x200 + O_DIRECT = 0x10000 + O_DIRECTORY = 0x8000000 + O_EXCL = 0x800 + O_EXLOCK = 0x20 + O_FAPPEND = 0x100000 + O_FASYNCWRITE = 0x800000 + O_FBLOCKING = 0x40000 + O_FBUFFERED = 0x2000000 + O_FMASK = 0x7fc0000 + O_FNONBLOCKING = 0x80000 + O_FOFFSET = 0x200000 + O_FSYNC = 0x80 + O_FSYNCWRITE = 0x400000 + O_FUNBUFFERED = 0x1000000 + O_MAPONREAD = 0x4000000 + O_NDELAY = 0x4 + O_NOCTTY = 0x8000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_SHLOCK = 0x10 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + RLIMIT_AS = 0xa + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0xb + RTAX_MPLS1 = 0x8 + RTAX_MPLS2 = 0x9 + RTAX_MPLS3 = 0xa + RTAX_NETMASK = 0x2 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_MPLS1 = 0x100 + RTA_MPLS2 = 0x200 + RTA_MPLS3 = 0x400 + RTA_NETMASK = 0x4 + RTF_BLACKHOLE = 0x1000 + RTF_BROADCAST = 0x400000 + RTF_CLONING = 0x100 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_LLINFO = 0x400 + RTF_LOCAL = 0x200000 + RTF_MODIFIED = 0x20 + RTF_MPLSOPS = 0x1000000 + RTF_MULTICAST = 0x800000 + RTF_PINNED = 0x100000 + RTF_PRCLONING = 0x10000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x40000 + RTF_REJECT = 0x8 + RTF_STATIC = 0x800 + RTF_UP = 0x1 + RTF_WASCLONED = 0x20000 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DELMADDR = 0x10 + RTM_GET = 0x4 + RTM_IEEE80211 = 0x12 + RTM_IFANNOUNCE = 0x11 + RTM_IFINFO = 0xe + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_NEWMADDR = 0xf + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x6 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_IWCAPSEGS = 0x400 + RTV_IWMAXSEGS = 0x200 + RTV_MSL = 0x100 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + SCM_CREDS = 0x3 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x2 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCADDRT = 0x8040720a + SIOCAIFADDR = 0x8040691a + SIOCALIFADDR = 0x8118691b + SIOCATMARK = 0x40047307 + SIOCDELMULTI = 0x80206932 + SIOCDELRT = 0x8040720b + SIOCDIFADDR = 0x80206919 + SIOCDIFPHYADDR = 0x80206949 + SIOCDLIFADDR = 0x8118691d + SIOCGDRVSPEC = 0xc028697b + SIOCGETSGCNT = 0xc0207210 + SIOCGETVIFCNT = 0xc028720f + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0206921 + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCAP = 0xc020691f + SIOCGIFCONF = 0xc0106924 + SIOCGIFDATA = 0xc0206926 + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGENERIC = 0xc020693a + SIOCGIFGMEMB = 0xc028698a + SIOCGIFINDEX = 0xc0206920 + SIOCGIFMEDIA = 0xc0306938 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc0206933 + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPDSTADDR = 0xc0206948 + SIOCGIFPHYS = 0xc0206935 + SIOCGIFPOLLCPU = 0xc020697e + SIOCGIFPSRCADDR = 0xc0206947 + SIOCGIFSTATUS = 0xc331693b + SIOCGIFTSOLEN = 0xc0206980 + SIOCGLIFADDR = 0xc118691c + SIOCGLIFPHYADDR = 0xc118694b + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCGPRIVATE_0 = 0xc0206950 + SIOCGPRIVATE_1 = 0xc0206951 + SIOCIFCREATE = 0xc020697a + SIOCIFCREATE2 = 0xc020697c + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc0106978 + SIOCSDRVSPEC = 0x8028697b + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFCAP = 0x8020691e + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGENERIC = 0x80206939 + SIOCSIFLLADDR = 0x8020693c + SIOCSIFMEDIA = 0xc0206937 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x80206934 + SIOCSIFNAME = 0x80206928 + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPHYADDR = 0x80406946 + SIOCSIFPHYS = 0x80206936 + SIOCSIFPOLLCPU = 0x8020697d + SIOCSIFTSOLEN = 0x8020697f + SIOCSLIFPHYADDR = 0x8118694a + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SOCK_DGRAM = 0x2 + SOCK_MAXADDRLEN = 0xff + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_ACCEPTFILTER = 0x1000 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LINGER = 0x80 + SO_NOSIGPIPE = 0x800 + SO_OOBINLINE = 0x100 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDSPACE = 0x100a + SO_SNDTIMEO = 0x1005 + SO_TIMESTAMP = 0x400 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_FASTKEEP = 0x80 + TCP_KEEPCNT = 0x400 + TCP_KEEPIDLE = 0x100 + TCP_KEEPINIT = 0x20 + TCP_KEEPINTVL = 0x200 + TCP_MAXBURST = 0x4 + TCP_MAXHLEN = 0x3c + TCP_MAXOLEN = 0x28 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MINMSS = 0x100 + TCP_MIN_WINSHIFT = 0x5 + TCP_MSS = 0x200 + TCP_NODELAY = 0x1 + TCP_NOOPT = 0x8 + TCP_NOPUSH = 0x4 + TCP_SIGNATURE_ENABLE = 0x10 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDCDTIMESTAMP = 0x40107458 + TIOCDRAIN = 0x2000745e + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLUSH = 0x80047410 + TIOCGDRAINWAIT = 0x40047456 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGPGRP = 0x40047477 + TIOCGSID = 0x40047463 + TIOCGSIZE = 0x40087468 + TIOCGWINSZ = 0x40087468 + TIOCISPTMASTER = 0x20007455 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGDTRWAIT = 0x4004745a + TIOCMGET = 0x4004746a + TIOCMODG = 0x40047403 + TIOCMODS = 0x80047404 + TIOCMSDTRWAIT = 0x8004745b + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCREMOTE = 0x80047469 + TIOCSBRK = 0x2000747b + TIOCSCTTY = 0x20007461 + TIOCSDRAINWAIT = 0x80047457 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSIG = 0x2000745f + TIOCSPGRP = 0x80047476 + TIOCSSIZE = 0x80087467 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x20007465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCTIMESTAMP = 0x40107459 + TIOCUCNTL = 0x80047466 + TOSTOP = 0x400000 + VCHECKPT = 0x13 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VERASE2 = 0x7 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VTIME = 0x11 + VWERASE = 0x4 + WCONTINUED = 0x4 + WCOREFLAG = 0x80 + WLINUXCLONE = 0x80000000 + WNOHANG = 0x1 + WSTOPPED = 0x7f + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EASYNC = syscall.Errno(0x63) + EAUTH = syscall.Errno(0x50) + EBADF = syscall.Errno(0x9) + EBADMSG = syscall.Errno(0x59) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x55) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDOM = syscall.Errno(0x21) + EDOOFUS = syscall.Errno(0x58) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x52) + EILSEQ = syscall.Errno(0x56) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x63) + ELOOP = syscall.Errno(0x3e) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + EMULTIHOP = syscall.Errno(0x5a) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x57) + ENOBUFS = syscall.Errno(0x37) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOLINK = syscall.Errno(0x5b) + ENOMEDIUM = syscall.Errno(0x5d) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x53) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x2d) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x2d) + EOVERFLOW = syscall.Errno(0x54) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x5c) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUNUSED94 = syscall.Errno(0x5e) + EUNUSED95 = syscall.Errno(0x5f) + EUNUSED96 = syscall.Errno(0x60) + EUNUSED97 = syscall.Errno(0x61) + EUNUSED98 = syscall.Errno(0x62) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCKPT = syscall.Signal(0x21) + SIGCKPTEXIT = syscall.Signal(0x22) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTHR = syscall.Signal(0x20) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "operation timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "identifier removed", + 83: "no message of desired type", + 84: "value too large to be stored in data type", + 85: "operation canceled", + 86: "illegal byte sequence", + 87: "attribute not found", + 88: "programming error", + 89: "bad message", + 90: "multihop attempted", + 91: "link has been severed", + 92: "protocol error", + 93: "no medium found", + 94: "unknown error: 94", + 95: "unknown error: 95", + 96: "unknown error: 96", + 97: "unknown error: 97", + 98: "unknown error: 98", + 99: "unknown error: 99", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "suspended (signal)", + 18: "suspended", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", + 32: "thread Scheduler", + 33: "checkPoint", + 34: "checkPointExit", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go new file mode 100644 index 0000000..7b95751 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go @@ -0,0 +1,1743 @@ +// mkerrors.sh -m32 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build 386,freebsd + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m32 _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_ARP = 0x23 + AF_ATM = 0x1e + AF_BLUETOOTH = 0x24 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1a + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x25 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x1c + AF_INET6_SDP = 0x2a + AF_INET_SDP = 0x28 + AF_IPX = 0x17 + AF_ISDN = 0x1a + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x2a + AF_NATM = 0x1d + AF_NETBIOS = 0x6 + AF_NETGRAPH = 0x20 + AF_OSI = 0x7 + AF_PUP = 0x4 + AF_ROUTE = 0x11 + AF_SCLUSTER = 0x22 + AF_SIP = 0x18 + AF_SLOW = 0x21 + AF_SNA = 0xb + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_VENDOR00 = 0x27 + AF_VENDOR01 = 0x29 + AF_VENDOR02 = 0x2b + AF_VENDOR03 = 0x2d + AF_VENDOR04 = 0x2f + AF_VENDOR05 = 0x31 + AF_VENDOR06 = 0x33 + AF_VENDOR07 = 0x35 + AF_VENDOR08 = 0x37 + AF_VENDOR09 = 0x39 + AF_VENDOR10 = 0x3b + AF_VENDOR11 = 0x3d + AF_VENDOR12 = 0x3f + AF_VENDOR13 = 0x41 + AF_VENDOR14 = 0x43 + AF_VENDOR15 = 0x45 + AF_VENDOR16 = 0x47 + AF_VENDOR17 = 0x49 + AF_VENDOR18 = 0x4b + AF_VENDOR19 = 0x4d + AF_VENDOR20 = 0x4f + AF_VENDOR21 = 0x51 + AF_VENDOR22 = 0x53 + AF_VENDOR23 = 0x55 + AF_VENDOR24 = 0x57 + AF_VENDOR25 = 0x59 + AF_VENDOR26 = 0x5b + AF_VENDOR27 = 0x5d + AF_VENDOR28 = 0x5f + AF_VENDOR29 = 0x61 + AF_VENDOR30 = 0x63 + AF_VENDOR31 = 0x65 + AF_VENDOR32 = 0x67 + AF_VENDOR33 = 0x69 + AF_VENDOR34 = 0x6b + AF_VENDOR35 = 0x6d + AF_VENDOR36 = 0x6f + AF_VENDOR37 = 0x71 + AF_VENDOR38 = 0x73 + AF_VENDOR39 = 0x75 + AF_VENDOR40 = 0x77 + AF_VENDOR41 = 0x79 + AF_VENDOR42 = 0x7b + AF_VENDOR43 = 0x7d + AF_VENDOR44 = 0x7f + AF_VENDOR45 = 0x81 + AF_VENDOR46 = 0x83 + AF_VENDOR47 = 0x85 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B460800 = 0x70800 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B921600 = 0xe1000 + B9600 = 0x2580 + BIOCFEEDBACK = 0x8004427c + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDIRECTION = 0x40044276 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc0084279 + BIOCGETBUFMODE = 0x4004427d + BIOCGETIF = 0x4020426b + BIOCGETZMAX = 0x4004427f + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044272 + BIOCGRTIMEOUT = 0x4008426e + BIOCGSEESENT = 0x40044276 + BIOCGSTATS = 0x4008426f + BIOCGTSTAMP = 0x40044283 + BIOCIMMEDIATE = 0x80044270 + BIOCLOCK = 0x2000427a + BIOCPROMISC = 0x20004269 + BIOCROTZBUF = 0x400c4280 + BIOCSBLEN = 0xc0044266 + BIOCSDIRECTION = 0x80044277 + BIOCSDLT = 0x80044278 + BIOCSETBUFMODE = 0x8004427e + BIOCSETF = 0x80084267 + BIOCSETFNR = 0x80084282 + BIOCSETIF = 0x8020426c + BIOCSETWF = 0x8008427b + BIOCSETZBUF = 0x800c4281 + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044273 + BIOCSRTIMEOUT = 0x8008426d + BIOCSSEESENT = 0x80044277 + BIOCSTSTAMP = 0x80044284 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_BUFMODE_BUFFER = 0x1 + BPF_BUFMODE_ZBUF = 0x2 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x80000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_T_BINTIME = 0x2 + BPF_T_BINTIME_FAST = 0x102 + BPF_T_BINTIME_MONOTONIC = 0x202 + BPF_T_BINTIME_MONOTONIC_FAST = 0x302 + BPF_T_FAST = 0x100 + BPF_T_FLAG_MASK = 0x300 + BPF_T_FORMAT_MASK = 0x3 + BPF_T_MICROTIME = 0x0 + BPF_T_MICROTIME_FAST = 0x100 + BPF_T_MICROTIME_MONOTONIC = 0x200 + BPF_T_MICROTIME_MONOTONIC_FAST = 0x300 + BPF_T_MONOTONIC = 0x200 + BPF_T_MONOTONIC_FAST = 0x300 + BPF_T_NANOTIME = 0x1 + BPF_T_NANOTIME_FAST = 0x101 + BPF_T_NANOTIME_MONOTONIC = 0x201 + BPF_T_NANOTIME_MONOTONIC_FAST = 0x301 + BPF_T_NONE = 0x3 + BPF_T_NORMAL = 0x0 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CLOCK_MONOTONIC = 0x4 + CLOCK_MONOTONIC_FAST = 0xc + CLOCK_MONOTONIC_PRECISE = 0xb + CLOCK_PROCESS_CPUTIME_ID = 0xf + CLOCK_PROF = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_REALTIME_FAST = 0xa + CLOCK_REALTIME_PRECISE = 0x9 + CLOCK_SECOND = 0xd + CLOCK_THREAD_CPUTIME_ID = 0xe + CLOCK_UPTIME = 0x5 + CLOCK_UPTIME_FAST = 0x8 + CLOCK_UPTIME_PRECISE = 0x7 + CLOCK_VIRTUAL = 0x1 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0x18 + CTL_NET = 0x4 + DLT_A429 = 0xb8 + DLT_A653_ICM = 0xb9 + DLT_AIRONET_HEADER = 0x78 + DLT_AOS = 0xde + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_AX25_KISS = 0xca + DLT_BACNET_MS_TP = 0xa5 + DLT_BLUETOOTH_HCI_H4 = 0xbb + DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 + DLT_CAN20B = 0xbe + DLT_CAN_SOCKETCAN = 0xe3 + DLT_CHAOS = 0x5 + DLT_CHDLC = 0x68 + DLT_CISCO_IOS = 0x76 + DLT_C_HDLC = 0x68 + DLT_C_HDLC_WITH_DIR = 0xcd + DLT_DBUS = 0xe7 + DLT_DECT = 0xdd + DLT_DOCSIS = 0x8f + DLT_DVB_CI = 0xeb + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_ERF = 0xc5 + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FC_2 = 0xe0 + DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 + DLT_FDDI = 0xa + DLT_FLEXRAY = 0xd2 + DLT_FRELAY = 0x6b + DLT_FRELAY_WITH_DIR = 0xce + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_GSMTAP_ABIS = 0xda + DLT_GSMTAP_UM = 0xd9 + DLT_HHDLC = 0x79 + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IEEE802_15_4 = 0xc3 + DLT_IEEE802_15_4_LINUX = 0xbf + DLT_IEEE802_15_4_NOFCS = 0xe6 + DLT_IEEE802_15_4_NONASK_PHY = 0xd7 + DLT_IEEE802_16_MAC_CPS = 0xbc + DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 + DLT_IPFILTER = 0x74 + DLT_IPMB = 0xc7 + DLT_IPMB_LINUX = 0xd1 + DLT_IPNET = 0xe2 + DLT_IPOIB = 0xf2 + DLT_IPV4 = 0xe4 + DLT_IPV6 = 0xe5 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_ATM_CEMIC = 0xee + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FIBRECHANNEL = 0xea + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_ISM = 0xc2 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_JUNIPER_SRX_E2E = 0xe9 + DLT_JUNIPER_ST = 0xc8 + DLT_JUNIPER_VP = 0xb7 + DLT_JUNIPER_VS = 0xe8 + DLT_LAPB_WITH_DIR = 0xcf + DLT_LAPD = 0xcb + DLT_LIN = 0xd4 + DLT_LINUX_EVDEV = 0xd8 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_PPP_WITHDIRECTION = 0xa6 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MATCHING_MAX = 0xf6 + DLT_MATCHING_MIN = 0x68 + DLT_MFR = 0xb6 + DLT_MOST = 0xd3 + DLT_MPEG_2_TS = 0xf3 + DLT_MPLS = 0xdb + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_MUX27010 = 0xec + DLT_NETANALYZER = 0xf0 + DLT_NETANALYZER_TRANSPARENT = 0xf1 + DLT_NFC_LLCP = 0xf5 + DLT_NFLOG = 0xef + DLT_NG40 = 0xf4 + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x79 + DLT_PPI = 0xc0 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0x10 + DLT_PPP_ETHER = 0x33 + DLT_PPP_PPPD = 0xa6 + DLT_PPP_SERIAL = 0x32 + DLT_PPP_WITH_DIR = 0xcc + DLT_PPP_WITH_DIRECTION = 0xa6 + DLT_PRISM_HEADER = 0x77 + DLT_PRONET = 0x4 + DLT_RAIF1 = 0xc6 + DLT_RAW = 0xc + DLT_RIO = 0x7c + DLT_SCCP = 0x8e + DLT_SITA = 0xc4 + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf + DLT_STANAG_5066_D_PDU = 0xed + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + DLT_USB = 0xba + DLT_USB_LINUX = 0xbd + DLT_USB_LINUX_MMAPPED = 0xdc + DLT_USER0 = 0x93 + DLT_USER1 = 0x94 + DLT_USER10 = 0x9d + DLT_USER11 = 0x9e + DLT_USER12 = 0x9f + DLT_USER13 = 0xa0 + DLT_USER14 = 0xa1 + DLT_USER15 = 0xa2 + DLT_USER2 = 0x95 + DLT_USER3 = 0x96 + DLT_USER4 = 0x97 + DLT_USER5 = 0x98 + DLT_USER6 = 0x99 + DLT_USER7 = 0x9a + DLT_USER8 = 0x9b + DLT_USER9 = 0x9c + DLT_WIHART = 0xdf + DLT_X2E_SERIAL = 0xd5 + DLT_X2E_XORAYA = 0xd6 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EVFILT_AIO = -0x3 + EVFILT_FS = -0x9 + EVFILT_LIO = -0xa + EVFILT_PROC = -0x5 + EVFILT_READ = -0x1 + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0xb + EVFILT_TIMER = -0x7 + EVFILT_USER = -0xb + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_DISPATCH = 0x80 + EV_DROP = 0x1000 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_RECEIPT = 0x40 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTATTR_NAMESPACE_EMPTY = 0x0 + EXTATTR_NAMESPACE_SYSTEM = 0x2 + EXTATTR_NAMESPACE_USER = 0x1 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_CANCEL = 0x5 + F_DUP2FD = 0xa + F_DUP2FD_CLOEXEC = 0x12 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x11 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0xb + F_GETOWN = 0x5 + F_OGETLK = 0x7 + F_OK = 0x0 + F_OSETLK = 0x8 + F_OSETLKW = 0x9 + F_RDAHEAD = 0x10 + F_RDLCK = 0x1 + F_READAHEAD = 0xf + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0xc + F_SETLKW = 0xd + F_SETLK_REMOTE = 0xe + F_SETOWN = 0x6 + F_UNLCK = 0x2 + F_UNLCKSYS = 0x4 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFAN_ARRIVAL = 0x0 + IFAN_DEPARTURE = 0x1 + IFF_ALLMULTI = 0x200 + IFF_ALTPHYS = 0x4000 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x218f72 + IFF_CANTCONFIG = 0x10000 + IFF_DEBUG = 0x4 + IFF_DRV_OACTIVE = 0x400 + IFF_DRV_RUNNING = 0x40 + IFF_DYING = 0x200000 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MONITOR = 0x40000 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PPROMISC = 0x20000 + IFF_PROMISC = 0x100 + IFF_RENAMING = 0x400000 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_SMART = 0x20 + IFF_STATICARP = 0x80000 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_A12MPPSWITCH = 0x82 + IFT_AAL2 = 0xbb + IFT_AAL5 = 0x31 + IFT_ADSL = 0x5e + IFT_AFLANE8023 = 0x3b + IFT_AFLANE8025 = 0x3c + IFT_ARAP = 0x58 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ASYNC = 0x54 + IFT_ATM = 0x25 + IFT_ATMDXI = 0x69 + IFT_ATMFUNI = 0x6a + IFT_ATMIMA = 0x6b + IFT_ATMLOGICAL = 0x50 + IFT_ATMRADIO = 0xbd + IFT_ATMSUBINTERFACE = 0x86 + IFT_ATMVCIENDPT = 0xc2 + IFT_ATMVIRTUAL = 0x95 + IFT_BGPPOLICYACCOUNTING = 0xa2 + IFT_BRIDGE = 0xd1 + IFT_BSC = 0x53 + IFT_CARP = 0xf8 + IFT_CCTEMUL = 0x3d + IFT_CEPT = 0x13 + IFT_CES = 0x85 + IFT_CHANNEL = 0x46 + IFT_CNR = 0x55 + IFT_COFFEE = 0x84 + IFT_COMPOSITELINK = 0x9b + IFT_DCN = 0x8d + IFT_DIGITALPOWERLINE = 0x8a + IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba + IFT_DLSW = 0x4a + IFT_DOCSCABLEDOWNSTREAM = 0x80 + IFT_DOCSCABLEMACLAYER = 0x7f + IFT_DOCSCABLEUPSTREAM = 0x81 + IFT_DS0 = 0x51 + IFT_DS0BUNDLE = 0x52 + IFT_DS1FDL = 0xaa + IFT_DS3 = 0x1e + IFT_DTM = 0x8c + IFT_DVBASILN = 0xac + IFT_DVBASIOUT = 0xad + IFT_DVBRCCDOWNSTREAM = 0x93 + IFT_DVBRCCMACLAYER = 0x92 + IFT_DVBRCCUPSTREAM = 0x94 + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_EPLRS = 0x57 + IFT_ESCON = 0x49 + IFT_ETHER = 0x6 + IFT_FAITH = 0xf2 + IFT_FAST = 0x7d + IFT_FASTETHER = 0x3e + IFT_FASTETHERFX = 0x45 + IFT_FDDI = 0xf + IFT_FIBRECHANNEL = 0x38 + IFT_FRAMERELAYINTERCONNECT = 0x3a + IFT_FRAMERELAYMPI = 0x5c + IFT_FRDLCIENDPT = 0xc1 + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_FRF16MFRBUNDLE = 0xa3 + IFT_FRFORWARD = 0x9e + IFT_G703AT2MB = 0x43 + IFT_G703AT64K = 0x42 + IFT_GIF = 0xf0 + IFT_GIGABITETHERNET = 0x75 + IFT_GR303IDT = 0xb2 + IFT_GR303RDT = 0xb1 + IFT_H323GATEKEEPER = 0xa4 + IFT_H323PROXY = 0xa5 + IFT_HDH1822 = 0x3 + IFT_HDLC = 0x76 + IFT_HDSL2 = 0xa8 + IFT_HIPERLAN2 = 0xb7 + IFT_HIPPI = 0x2f + IFT_HIPPIINTERFACE = 0x39 + IFT_HOSTPAD = 0x5a + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IBM370PARCHAN = 0x48 + IFT_IDSL = 0x9a + IFT_IEEE1394 = 0x90 + IFT_IEEE80211 = 0x47 + IFT_IEEE80212 = 0x37 + IFT_IEEE8023ADLAG = 0xa1 + IFT_IFGSN = 0x91 + IFT_IMT = 0xbe + IFT_INFINIBAND = 0xc7 + IFT_INTERLEAVE = 0x7c + IFT_IP = 0x7e + IFT_IPFORWARD = 0x8e + IFT_IPOVERATM = 0x72 + IFT_IPOVERCDLC = 0x6d + IFT_IPOVERCLAW = 0x6e + IFT_IPSWITCH = 0x4e + IFT_IPXIP = 0xf9 + IFT_ISDN = 0x3f + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISDNS = 0x4b + IFT_ISDNU = 0x4c + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88025CRFPINT = 0x62 + IFT_ISO88025DTR = 0x56 + IFT_ISO88025FIBER = 0x73 + IFT_ISO88026 = 0xa + IFT_ISUP = 0xb3 + IFT_L2VLAN = 0x87 + IFT_L3IPVLAN = 0x88 + IFT_L3IPXVLAN = 0x89 + IFT_LAPB = 0x10 + IFT_LAPD = 0x4d + IFT_LAPF = 0x77 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_MPC = 0x71 + IFT_MPLS = 0xa6 + IFT_MPLSTUNNEL = 0x96 + IFT_MSDSL = 0x8f + IFT_MVL = 0xbf + IFT_MYRINET = 0x63 + IFT_NFAS = 0xaf + IFT_NSIP = 0x1b + IFT_OPTICALCHANNEL = 0xc3 + IFT_OPTICALTRANSPORT = 0xc4 + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PFLOG = 0xf6 + IFT_PFSYNC = 0xf7 + IFT_PLC = 0xae + IFT_POS = 0xab + IFT_PPP = 0x17 + IFT_PPPMULTILINKBUNDLE = 0x6c + IFT_PROPBWAP2MP = 0xb8 + IFT_PROPCNLS = 0x59 + IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 + IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 + IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PROPWIRELESSP2P = 0x9d + IFT_PTPSERIAL = 0x16 + IFT_PVC = 0xf1 + IFT_QLLC = 0x44 + IFT_RADIOMAC = 0xbc + IFT_RADSL = 0x5f + IFT_REACHDSL = 0xc0 + IFT_RFC1483 = 0x9f + IFT_RS232 = 0x21 + IFT_RSRB = 0x4f + IFT_SDLC = 0x11 + IFT_SDSL = 0x60 + IFT_SHDSL = 0xa9 + IFT_SIP = 0x1f + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETOVERHEADCHANNEL = 0xb9 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_SRP = 0x97 + IFT_SS7SIGLINK = 0x9c + IFT_STACKTOSTACK = 0x6f + IFT_STARLAN = 0xb + IFT_STF = 0xd7 + IFT_T1 = 0x12 + IFT_TDLC = 0x74 + IFT_TERMPAD = 0x5b + IFT_TR008 = 0xb0 + IFT_TRANSPHDLC = 0x7b + IFT_TUNNEL = 0x83 + IFT_ULTRA = 0x1d + IFT_USB = 0xa0 + IFT_V11 = 0x40 + IFT_V35 = 0x2d + IFT_V36 = 0x41 + IFT_V37 = 0x78 + IFT_VDSL = 0x61 + IFT_VIRTUALIPADDRESS = 0x70 + IFT_VOICEEM = 0x64 + IFT_VOICEENCAP = 0x67 + IFT_VOICEFXO = 0x65 + IFT_VOICEFXS = 0x66 + IFT_VOICEOVERATM = 0x98 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25HUNTGROUP = 0x7a + IFT_X25MLP = 0x79 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LOOPBACKNET = 0x7f + IN_RFC3021_MASK = 0xfffffffe + IPPROTO_3PC = 0x22 + IPPROTO_ADFS = 0x44 + IPPROTO_AH = 0x33 + IPPROTO_AHIP = 0x3d + IPPROTO_APES = 0x63 + IPPROTO_ARGUS = 0xd + IPPROTO_AX25 = 0x5d + IPPROTO_BHA = 0x31 + IPPROTO_BLT = 0x1e + IPPROTO_BRSATMON = 0x4c + IPPROTO_CARP = 0x70 + IPPROTO_CFTP = 0x3e + IPPROTO_CHAOS = 0x10 + IPPROTO_CMTP = 0x26 + IPPROTO_CPHB = 0x49 + IPPROTO_CPNX = 0x48 + IPPROTO_DDP = 0x25 + IPPROTO_DGP = 0x56 + IPPROTO_DIVERT = 0x102 + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_EMCON = 0xe + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GMTP = 0x64 + IPPROTO_GRE = 0x2f + IPPROTO_HELLO = 0x3f + IPPROTO_HIP = 0x8b + IPPROTO_HMP = 0x14 + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IDPR = 0x23 + IPPROTO_IDRP = 0x2d + IPPROTO_IGMP = 0x2 + IPPROTO_IGP = 0x55 + IPPROTO_IGRP = 0x58 + IPPROTO_IL = 0x28 + IPPROTO_INLSP = 0x34 + IPPROTO_INP = 0x20 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPCV = 0x47 + IPPROTO_IPEIP = 0x5e + IPPROTO_IPIP = 0x4 + IPPROTO_IPPC = 0x43 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IRTP = 0x1c + IPPROTO_KRYPTOLAN = 0x41 + IPPROTO_LARP = 0x5b + IPPROTO_LEAF1 = 0x19 + IPPROTO_LEAF2 = 0x1a + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x34 + IPPROTO_MEAS = 0x13 + IPPROTO_MH = 0x87 + IPPROTO_MHRP = 0x30 + IPPROTO_MICP = 0x5f + IPPROTO_MOBILE = 0x37 + IPPROTO_MPLS = 0x89 + IPPROTO_MTP = 0x5c + IPPROTO_MUX = 0x12 + IPPROTO_ND = 0x4d + IPPROTO_NHRP = 0x36 + IPPROTO_NONE = 0x3b + IPPROTO_NSP = 0x1f + IPPROTO_NVPII = 0xb + IPPROTO_OLD_DIVERT = 0xfe + IPPROTO_OSPFIGP = 0x59 + IPPROTO_PFSYNC = 0xf0 + IPPROTO_PGM = 0x71 + IPPROTO_PIGP = 0x9 + IPPROTO_PIM = 0x67 + IPPROTO_PRM = 0x15 + IPPROTO_PUP = 0xc + IPPROTO_PVP = 0x4b + IPPROTO_RAW = 0xff + IPPROTO_RCCMON = 0xa + IPPROTO_RDP = 0x1b + IPPROTO_RESERVED_253 = 0xfd + IPPROTO_RESERVED_254 = 0xfe + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_RVD = 0x42 + IPPROTO_SATEXPAK = 0x40 + IPPROTO_SATMON = 0x45 + IPPROTO_SCCSP = 0x60 + IPPROTO_SCTP = 0x84 + IPPROTO_SDRP = 0x2a + IPPROTO_SEND = 0x103 + IPPROTO_SEP = 0x21 + IPPROTO_SHIM6 = 0x8c + IPPROTO_SKIP = 0x39 + IPPROTO_SPACER = 0x7fff + IPPROTO_SRPC = 0x5a + IPPROTO_ST = 0x7 + IPPROTO_SVMTP = 0x52 + IPPROTO_SWIPE = 0x35 + IPPROTO_TCF = 0x57 + IPPROTO_TCP = 0x6 + IPPROTO_TLSP = 0x38 + IPPROTO_TP = 0x1d + IPPROTO_TPXX = 0x27 + IPPROTO_TRUNK1 = 0x17 + IPPROTO_TRUNK2 = 0x18 + IPPROTO_TTP = 0x54 + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPPROTO_VINES = 0x53 + IPPROTO_VISA = 0x46 + IPPROTO_VMTP = 0x51 + IPPROTO_WBEXPAK = 0x4f + IPPROTO_WBMON = 0x4e + IPPROTO_WSN = 0x4a + IPPROTO_XNET = 0xf + IPPROTO_XTP = 0x24 + IPV6_AUTOFLOWLABEL = 0x3b + IPV6_BINDANY = 0x40 + IPV6_BINDV6ONLY = 0x1b + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_DONTFRAG = 0x3e + IPV6_DSTOPTS = 0x32 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x78 + IPV6_FW_ADD = 0x1e + IPV6_FW_DEL = 0x1f + IPV6_FW_FLUSH = 0x20 + IPV6_FW_GET = 0x22 + IPV6_FW_ZERO = 0x21 + IPV6_HLIMDEC = 0x1 + IPV6_HOPLIMIT = 0x2f + IPV6_HOPOPTS = 0x31 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXOPTHDR = 0x800 + IPV6_MAXPACKET = 0xffff + IPV6_MAX_GROUP_SRC_FILTER = 0x200 + IPV6_MAX_MEMBERSHIPS = 0xfff + IPV6_MAX_SOCK_SRC_FILTER = 0x80 + IPV6_MIN_MEMBERSHIPS = 0x1f + IPV6_MMTU = 0x500 + IPV6_MSFILTER = 0x4a + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_NEXTHOP = 0x30 + IPV6_PATHMTU = 0x2c + IPV6_PKTINFO = 0x2e + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_PREFER_TEMPADDR = 0x3f + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVHOPLIMIT = 0x25 + IPV6_RECVHOPOPTS = 0x27 + IPV6_RECVPATHMTU = 0x2b + IPV6_RECVPKTINFO = 0x24 + IPV6_RECVRTHDR = 0x26 + IPV6_RECVTCLASS = 0x39 + IPV6_RTHDR = 0x33 + IPV6_RTHDRDSTOPTS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x3d + IPV6_UNICAST_HOPS = 0x4 + IPV6_USE_MIN_MTU = 0x2a + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_ADD_SOURCE_MEMBERSHIP = 0x46 + IP_BINDANY = 0x18 + IP_BLOCK_SOURCE = 0x48 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DONTFRAG = 0x43 + IP_DROP_MEMBERSHIP = 0xd + IP_DROP_SOURCE_MEMBERSHIP = 0x47 + IP_DUMMYNET3 = 0x31 + IP_DUMMYNET_CONFIGURE = 0x3c + IP_DUMMYNET_DEL = 0x3d + IP_DUMMYNET_FLUSH = 0x3e + IP_DUMMYNET_GET = 0x40 + IP_FAITH = 0x16 + IP_FW3 = 0x30 + IP_FW_ADD = 0x32 + IP_FW_DEL = 0x33 + IP_FW_FLUSH = 0x34 + IP_FW_GET = 0x36 + IP_FW_NAT_CFG = 0x38 + IP_FW_NAT_DEL = 0x39 + IP_FW_NAT_GET_CONFIG = 0x3a + IP_FW_NAT_GET_LOG = 0x3b + IP_FW_RESETLOG = 0x37 + IP_FW_TABLE_ADD = 0x28 + IP_FW_TABLE_DEL = 0x29 + IP_FW_TABLE_FLUSH = 0x2a + IP_FW_TABLE_GETSIZE = 0x2b + IP_FW_TABLE_LIST = 0x2c + IP_FW_ZERO = 0x35 + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x15 + IP_MAXPACKET = 0xffff + IP_MAX_GROUP_SRC_FILTER = 0x200 + IP_MAX_MEMBERSHIPS = 0xfff + IP_MAX_SOCK_MUTE_FILTER = 0x80 + IP_MAX_SOCK_SRC_FILTER = 0x80 + IP_MAX_SOURCE_FILTER = 0x400 + IP_MF = 0x2000 + IP_MINTTL = 0x42 + IP_MIN_MEMBERSHIPS = 0x1f + IP_MSFILTER = 0x4a + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_MULTICAST_VIF = 0xe + IP_OFFMASK = 0x1fff + IP_ONESBCAST = 0x17 + IP_OPTIONS = 0x1 + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVRETOPTS = 0x6 + IP_RECVTOS = 0x44 + IP_RECVTTL = 0x41 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RSVP_OFF = 0x10 + IP_RSVP_ON = 0xf + IP_RSVP_VIF_OFF = 0x12 + IP_RSVP_VIF_ON = 0x11 + IP_SENDSRCADDR = 0x7 + IP_TOS = 0x3 + IP_TTL = 0x4 + IP_UNBLOCK_SOURCE = 0x49 + ISIG = 0x80 + ISTRIP = 0x20 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_AUTOSYNC = 0x7 + MADV_CORE = 0x9 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x5 + MADV_NOCORE = 0x8 + MADV_NORMAL = 0x0 + MADV_NOSYNC = 0x6 + MADV_PROTECT = 0xa + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_WILLNEED = 0x3 + MAP_ALIGNED_SUPER = 0x1000000 + MAP_ALIGNMENT_MASK = -0x1000000 + MAP_ALIGNMENT_SHIFT = 0x18 + MAP_ANON = 0x1000 + MAP_ANONYMOUS = 0x1000 + MAP_COPY = 0x2 + MAP_EXCL = 0x4000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_HASSEMAPHORE = 0x200 + MAP_NOCORE = 0x20000 + MAP_NORESERVE = 0x40 + MAP_NOSYNC = 0x800 + MAP_PREFAULT_READ = 0x40000 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_RESERVED0080 = 0x80 + MAP_RESERVED0100 = 0x100 + MAP_SHARED = 0x1 + MAP_STACK = 0x400 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_CMSG_CLOEXEC = 0x40000 + MSG_COMPAT = 0x8000 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOF = 0x100 + MSG_EOR = 0x8 + MSG_NBIO = 0x4000 + MSG_NOSIGNAL = 0x20000 + MSG_NOTIFICATION = 0x2000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x2 + MS_SYNC = 0x0 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_IFLISTL = 0x5 + NET_RT_IFMALIST = 0x4 + NET_RT_MAXID = 0x6 + NOFLSH = 0x80000000 + NOTE_ATTRIB = 0x8 + NOTE_CHILD = 0x4 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXTEND = 0x4 + NOTE_FFAND = 0x40000000 + NOTE_FFCOPY = 0xc0000000 + NOTE_FFCTRLMASK = 0xc0000000 + NOTE_FFLAGSMASK = 0xffffff + NOTE_FFNOP = 0x0 + NOTE_FFOR = 0x80000000 + NOTE_FORK = 0x40000000 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_PCTRLMASK = 0xf0000000 + NOTE_PDATAMASK = 0xfffff + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_TRIGGER = 0x1000000 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x100000 + O_CREAT = 0x200 + O_DIRECT = 0x10000 + O_DIRECTORY = 0x20000 + O_EXCL = 0x800 + O_EXEC = 0x40000 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x8000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_SHLOCK = 0x10 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_TTY_INIT = 0x80000 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + RLIMIT_AS = 0xa + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0x8 + RTAX_NETMASK = 0x2 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_NETMASK = 0x4 + RTF_BLACKHOLE = 0x1000 + RTF_BROADCAST = 0x400000 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_FMASK = 0x1004d808 + RTF_GATEWAY = 0x2 + RTF_GWFLAG_COMPAT = 0x80000000 + RTF_HOST = 0x4 + RTF_LLDATA = 0x400 + RTF_LLINFO = 0x400 + RTF_LOCAL = 0x200000 + RTF_MODIFIED = 0x20 + RTF_MULTICAST = 0x800000 + RTF_PINNED = 0x100000 + RTF_PRCLONING = 0x10000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x40000 + RTF_REJECT = 0x8 + RTF_RNH_LOCKED = 0x40000000 + RTF_STATIC = 0x800 + RTF_STICKY = 0x10000000 + RTF_UP = 0x1 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DELMADDR = 0x10 + RTM_GET = 0x4 + RTM_IEEE80211 = 0x12 + RTM_IFANNOUNCE = 0x11 + RTM_IFINFO = 0xe + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_NEWMADDR = 0xf + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x5 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RTV_WEIGHT = 0x100 + RT_ALL_FIBS = -0x1 + RT_CACHING_CONTEXT = 0x1 + RT_DEFAULT_FIB = 0x0 + RT_NORTREF = 0x2 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_BINTIME = 0x4 + SCM_CREDS = 0x3 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x2 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCADDRT = 0x8030720a + SIOCAIFADDR = 0x8040691a + SIOCAIFGROUP = 0x80246987 + SIOCALIFADDR = 0x8118691b + SIOCATMARK = 0x40047307 + SIOCDELMULTI = 0x80206932 + SIOCDELRT = 0x8030720b + SIOCDIFADDR = 0x80206919 + SIOCDIFGROUP = 0x80246989 + SIOCDIFPHYADDR = 0x80206949 + SIOCDLIFADDR = 0x8118691d + SIOCGDRVSPEC = 0xc01c697b + SIOCGETSGCNT = 0xc0147210 + SIOCGETVIFCNT = 0xc014720f + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0206921 + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCAP = 0xc020691f + SIOCGIFCONF = 0xc0086924 + SIOCGIFDESCR = 0xc020692a + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFIB = 0xc020695c + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGENERIC = 0xc020693a + SIOCGIFGMEMB = 0xc024698a + SIOCGIFGROUP = 0xc0246988 + SIOCGIFINDEX = 0xc0206920 + SIOCGIFMAC = 0xc0206926 + SIOCGIFMEDIA = 0xc0286938 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc0206933 + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPDSTADDR = 0xc0206948 + SIOCGIFPHYS = 0xc0206935 + SIOCGIFPSRCADDR = 0xc0206947 + SIOCGIFSTATUS = 0xc331693b + SIOCGLIFADDR = 0xc118691c + SIOCGLIFPHYADDR = 0xc118694b + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCGPRIVATE_0 = 0xc0206950 + SIOCGPRIVATE_1 = 0xc0206951 + SIOCIFCREATE = 0xc020697a + SIOCIFCREATE2 = 0xc020697c + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc00c6978 + SIOCSDRVSPEC = 0x801c697b + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFCAP = 0x8020691e + SIOCSIFDESCR = 0x80206929 + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFIB = 0x8020695d + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGENERIC = 0x80206939 + SIOCSIFLLADDR = 0x8020693c + SIOCSIFMAC = 0x80206927 + SIOCSIFMEDIA = 0xc0206937 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x80206934 + SIOCSIFNAME = 0x80206928 + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPHYADDR = 0x80406946 + SIOCSIFPHYS = 0x80206936 + SIOCSIFRVNET = 0xc020695b + SIOCSIFVNET = 0xc020695a + SIOCSLIFPHYADDR = 0x8118694a + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SOCK_CLOEXEC = 0x10000000 + SOCK_DGRAM = 0x2 + SOCK_MAXADDRLEN = 0xff + SOCK_NONBLOCK = 0x20000000 + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_ACCEPTFILTER = 0x1000 + SO_BINTIME = 0x2000 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LABEL = 0x1009 + SO_LINGER = 0x80 + SO_LISTENINCQLEN = 0x1013 + SO_LISTENQLEN = 0x1012 + SO_LISTENQLIMIT = 0x1011 + SO_NOSIGPIPE = 0x800 + SO_NO_DDP = 0x8000 + SO_NO_OFFLOAD = 0x4000 + SO_OOBINLINE = 0x100 + SO_PEERLABEL = 0x1010 + SO_PROTOCOL = 0x1016 + SO_PROTOTYPE = 0x1016 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_SETFIB = 0x1014 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_TIMESTAMP = 0x400 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + SO_USER_COOKIE = 0x1015 + SO_VENDOR = 0x80000000 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_CA_NAME_MAX = 0x10 + TCP_CONGESTION = 0x40 + TCP_INFO = 0x20 + TCP_KEEPCNT = 0x400 + TCP_KEEPIDLE = 0x100 + TCP_KEEPINIT = 0x80 + TCP_KEEPINTVL = 0x200 + TCP_MAXBURST = 0x4 + TCP_MAXHLEN = 0x3c + TCP_MAXOLEN = 0x28 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_SACK = 0x4 + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0x10 + TCP_MINMSS = 0xd8 + TCP_MSS = 0x218 + TCP_NODELAY = 0x1 + TCP_NOOPT = 0x8 + TCP_NOPUSH = 0x4 + TCP_VENDOR = 0x80000000 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDRAIN = 0x2000745e + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLUSH = 0x80047410 + TIOCGDRAINWAIT = 0x40047456 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGPGRP = 0x40047477 + TIOCGPTN = 0x4004740f + TIOCGSID = 0x40047463 + TIOCGWINSZ = 0x40087468 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGDTRWAIT = 0x4004745a + TIOCMGET = 0x4004746a + TIOCMSDTRWAIT = 0x8004745b + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DCD = 0x40 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCPTMASTER = 0x2000741c + TIOCSBRK = 0x2000747b + TIOCSCTTY = 0x20007461 + TIOCSDRAINWAIT = 0x80047457 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSIG = 0x2004745f + TIOCSPGRP = 0x80047476 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x20007465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCTIMESTAMP = 0x40087459 + TIOCUCNTL = 0x80047466 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VERASE2 = 0x7 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VTIME = 0x11 + VWERASE = 0x4 + WCONTINUED = 0x4 + WCOREFLAG = 0x80 + WEXITED = 0x10 + WLINUXCLONE = 0x80000000 + WNOHANG = 0x1 + WNOWAIT = 0x8 + WSTOPPED = 0x2 + WTRAPPED = 0x20 + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADF = syscall.Errno(0x9) + EBADMSG = syscall.Errno(0x59) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x55) + ECAPMODE = syscall.Errno(0x5e) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDOM = syscall.Errno(0x21) + EDOOFUS = syscall.Errno(0x58) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x52) + EILSEQ = syscall.Errno(0x56) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x60) + ELOOP = syscall.Errno(0x3e) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + EMULTIHOP = syscall.Errno(0x5a) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x57) + ENOBUFS = syscall.Errno(0x37) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOLINK = syscall.Errno(0x5b) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x53) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCAPABLE = syscall.Errno(0x5d) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTRECOVERABLE = syscall.Errno(0x5f) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x2d) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x2d) + EOVERFLOW = syscall.Errno(0x54) + EOWNERDEAD = syscall.Errno(0x60) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x5c) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGLIBRT = syscall.Signal(0x21) + SIGLWP = syscall.Signal(0x20) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTHR = syscall.Signal(0x20) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "operation timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "identifier removed", + 83: "no message of desired type", + 84: "value too large to be stored in data type", + 85: "operation canceled", + 86: "illegal byte sequence", + 87: "attribute not found", + 88: "programming error", + 89: "bad message", + 90: "multihop attempted", + 91: "link has been severed", + 92: "protocol error", + 93: "capabilities insufficient", + 94: "not permitted in capability mode", + 95: "state not recoverable", + 96: "previous owner died", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "suspended (signal)", + 18: "suspended", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", + 32: "unknown signal", + 33: "unknown signal", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go new file mode 100644 index 0000000..e48e779 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go @@ -0,0 +1,1748 @@ +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,freebsd + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m64 _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_ARP = 0x23 + AF_ATM = 0x1e + AF_BLUETOOTH = 0x24 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1a + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x25 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x1c + AF_INET6_SDP = 0x2a + AF_INET_SDP = 0x28 + AF_IPX = 0x17 + AF_ISDN = 0x1a + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x2a + AF_NATM = 0x1d + AF_NETBIOS = 0x6 + AF_NETGRAPH = 0x20 + AF_OSI = 0x7 + AF_PUP = 0x4 + AF_ROUTE = 0x11 + AF_SCLUSTER = 0x22 + AF_SIP = 0x18 + AF_SLOW = 0x21 + AF_SNA = 0xb + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_VENDOR00 = 0x27 + AF_VENDOR01 = 0x29 + AF_VENDOR02 = 0x2b + AF_VENDOR03 = 0x2d + AF_VENDOR04 = 0x2f + AF_VENDOR05 = 0x31 + AF_VENDOR06 = 0x33 + AF_VENDOR07 = 0x35 + AF_VENDOR08 = 0x37 + AF_VENDOR09 = 0x39 + AF_VENDOR10 = 0x3b + AF_VENDOR11 = 0x3d + AF_VENDOR12 = 0x3f + AF_VENDOR13 = 0x41 + AF_VENDOR14 = 0x43 + AF_VENDOR15 = 0x45 + AF_VENDOR16 = 0x47 + AF_VENDOR17 = 0x49 + AF_VENDOR18 = 0x4b + AF_VENDOR19 = 0x4d + AF_VENDOR20 = 0x4f + AF_VENDOR21 = 0x51 + AF_VENDOR22 = 0x53 + AF_VENDOR23 = 0x55 + AF_VENDOR24 = 0x57 + AF_VENDOR25 = 0x59 + AF_VENDOR26 = 0x5b + AF_VENDOR27 = 0x5d + AF_VENDOR28 = 0x5f + AF_VENDOR29 = 0x61 + AF_VENDOR30 = 0x63 + AF_VENDOR31 = 0x65 + AF_VENDOR32 = 0x67 + AF_VENDOR33 = 0x69 + AF_VENDOR34 = 0x6b + AF_VENDOR35 = 0x6d + AF_VENDOR36 = 0x6f + AF_VENDOR37 = 0x71 + AF_VENDOR38 = 0x73 + AF_VENDOR39 = 0x75 + AF_VENDOR40 = 0x77 + AF_VENDOR41 = 0x79 + AF_VENDOR42 = 0x7b + AF_VENDOR43 = 0x7d + AF_VENDOR44 = 0x7f + AF_VENDOR45 = 0x81 + AF_VENDOR46 = 0x83 + AF_VENDOR47 = 0x85 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B460800 = 0x70800 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B921600 = 0xe1000 + B9600 = 0x2580 + BIOCFEEDBACK = 0x8004427c + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDIRECTION = 0x40044276 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc0104279 + BIOCGETBUFMODE = 0x4004427d + BIOCGETIF = 0x4020426b + BIOCGETZMAX = 0x4008427f + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044272 + BIOCGRTIMEOUT = 0x4010426e + BIOCGSEESENT = 0x40044276 + BIOCGSTATS = 0x4008426f + BIOCGTSTAMP = 0x40044283 + BIOCIMMEDIATE = 0x80044270 + BIOCLOCK = 0x2000427a + BIOCPROMISC = 0x20004269 + BIOCROTZBUF = 0x40184280 + BIOCSBLEN = 0xc0044266 + BIOCSDIRECTION = 0x80044277 + BIOCSDLT = 0x80044278 + BIOCSETBUFMODE = 0x8004427e + BIOCSETF = 0x80104267 + BIOCSETFNR = 0x80104282 + BIOCSETIF = 0x8020426c + BIOCSETWF = 0x8010427b + BIOCSETZBUF = 0x80184281 + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044273 + BIOCSRTIMEOUT = 0x8010426d + BIOCSSEESENT = 0x80044277 + BIOCSTSTAMP = 0x80044284 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x8 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_BUFMODE_BUFFER = 0x1 + BPF_BUFMODE_ZBUF = 0x2 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x80000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_T_BINTIME = 0x2 + BPF_T_BINTIME_FAST = 0x102 + BPF_T_BINTIME_MONOTONIC = 0x202 + BPF_T_BINTIME_MONOTONIC_FAST = 0x302 + BPF_T_FAST = 0x100 + BPF_T_FLAG_MASK = 0x300 + BPF_T_FORMAT_MASK = 0x3 + BPF_T_MICROTIME = 0x0 + BPF_T_MICROTIME_FAST = 0x100 + BPF_T_MICROTIME_MONOTONIC = 0x200 + BPF_T_MICROTIME_MONOTONIC_FAST = 0x300 + BPF_T_MONOTONIC = 0x200 + BPF_T_MONOTONIC_FAST = 0x300 + BPF_T_NANOTIME = 0x1 + BPF_T_NANOTIME_FAST = 0x101 + BPF_T_NANOTIME_MONOTONIC = 0x201 + BPF_T_NANOTIME_MONOTONIC_FAST = 0x301 + BPF_T_NONE = 0x3 + BPF_T_NORMAL = 0x0 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CLOCK_MONOTONIC = 0x4 + CLOCK_MONOTONIC_FAST = 0xc + CLOCK_MONOTONIC_PRECISE = 0xb + CLOCK_PROCESS_CPUTIME_ID = 0xf + CLOCK_PROF = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_REALTIME_FAST = 0xa + CLOCK_REALTIME_PRECISE = 0x9 + CLOCK_SECOND = 0xd + CLOCK_THREAD_CPUTIME_ID = 0xe + CLOCK_UPTIME = 0x5 + CLOCK_UPTIME_FAST = 0x8 + CLOCK_UPTIME_PRECISE = 0x7 + CLOCK_VIRTUAL = 0x1 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0x18 + CTL_NET = 0x4 + DLT_A429 = 0xb8 + DLT_A653_ICM = 0xb9 + DLT_AIRONET_HEADER = 0x78 + DLT_AOS = 0xde + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_AX25_KISS = 0xca + DLT_BACNET_MS_TP = 0xa5 + DLT_BLUETOOTH_HCI_H4 = 0xbb + DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 + DLT_CAN20B = 0xbe + DLT_CAN_SOCKETCAN = 0xe3 + DLT_CHAOS = 0x5 + DLT_CHDLC = 0x68 + DLT_CISCO_IOS = 0x76 + DLT_C_HDLC = 0x68 + DLT_C_HDLC_WITH_DIR = 0xcd + DLT_DBUS = 0xe7 + DLT_DECT = 0xdd + DLT_DOCSIS = 0x8f + DLT_DVB_CI = 0xeb + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_ERF = 0xc5 + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FC_2 = 0xe0 + DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 + DLT_FDDI = 0xa + DLT_FLEXRAY = 0xd2 + DLT_FRELAY = 0x6b + DLT_FRELAY_WITH_DIR = 0xce + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_GSMTAP_ABIS = 0xda + DLT_GSMTAP_UM = 0xd9 + DLT_HHDLC = 0x79 + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IEEE802_15_4 = 0xc3 + DLT_IEEE802_15_4_LINUX = 0xbf + DLT_IEEE802_15_4_NOFCS = 0xe6 + DLT_IEEE802_15_4_NONASK_PHY = 0xd7 + DLT_IEEE802_16_MAC_CPS = 0xbc + DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 + DLT_IPFILTER = 0x74 + DLT_IPMB = 0xc7 + DLT_IPMB_LINUX = 0xd1 + DLT_IPNET = 0xe2 + DLT_IPOIB = 0xf2 + DLT_IPV4 = 0xe4 + DLT_IPV6 = 0xe5 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_ATM_CEMIC = 0xee + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FIBRECHANNEL = 0xea + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_ISM = 0xc2 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_JUNIPER_SRX_E2E = 0xe9 + DLT_JUNIPER_ST = 0xc8 + DLT_JUNIPER_VP = 0xb7 + DLT_JUNIPER_VS = 0xe8 + DLT_LAPB_WITH_DIR = 0xcf + DLT_LAPD = 0xcb + DLT_LIN = 0xd4 + DLT_LINUX_EVDEV = 0xd8 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_PPP_WITHDIRECTION = 0xa6 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MATCHING_MAX = 0xf6 + DLT_MATCHING_MIN = 0x68 + DLT_MFR = 0xb6 + DLT_MOST = 0xd3 + DLT_MPEG_2_TS = 0xf3 + DLT_MPLS = 0xdb + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_MUX27010 = 0xec + DLT_NETANALYZER = 0xf0 + DLT_NETANALYZER_TRANSPARENT = 0xf1 + DLT_NFC_LLCP = 0xf5 + DLT_NFLOG = 0xef + DLT_NG40 = 0xf4 + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x79 + DLT_PPI = 0xc0 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0x10 + DLT_PPP_ETHER = 0x33 + DLT_PPP_PPPD = 0xa6 + DLT_PPP_SERIAL = 0x32 + DLT_PPP_WITH_DIR = 0xcc + DLT_PPP_WITH_DIRECTION = 0xa6 + DLT_PRISM_HEADER = 0x77 + DLT_PRONET = 0x4 + DLT_RAIF1 = 0xc6 + DLT_RAW = 0xc + DLT_RIO = 0x7c + DLT_SCCP = 0x8e + DLT_SITA = 0xc4 + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf + DLT_STANAG_5066_D_PDU = 0xed + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + DLT_USB = 0xba + DLT_USB_LINUX = 0xbd + DLT_USB_LINUX_MMAPPED = 0xdc + DLT_USER0 = 0x93 + DLT_USER1 = 0x94 + DLT_USER10 = 0x9d + DLT_USER11 = 0x9e + DLT_USER12 = 0x9f + DLT_USER13 = 0xa0 + DLT_USER14 = 0xa1 + DLT_USER15 = 0xa2 + DLT_USER2 = 0x95 + DLT_USER3 = 0x96 + DLT_USER4 = 0x97 + DLT_USER5 = 0x98 + DLT_USER6 = 0x99 + DLT_USER7 = 0x9a + DLT_USER8 = 0x9b + DLT_USER9 = 0x9c + DLT_WIHART = 0xdf + DLT_X2E_SERIAL = 0xd5 + DLT_X2E_XORAYA = 0xd6 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EVFILT_AIO = -0x3 + EVFILT_FS = -0x9 + EVFILT_LIO = -0xa + EVFILT_PROC = -0x5 + EVFILT_READ = -0x1 + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0xb + EVFILT_TIMER = -0x7 + EVFILT_USER = -0xb + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_DISPATCH = 0x80 + EV_DROP = 0x1000 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_RECEIPT = 0x40 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTATTR_NAMESPACE_EMPTY = 0x0 + EXTATTR_NAMESPACE_SYSTEM = 0x2 + EXTATTR_NAMESPACE_USER = 0x1 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_CANCEL = 0x5 + F_DUP2FD = 0xa + F_DUP2FD_CLOEXEC = 0x12 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x11 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0xb + F_GETOWN = 0x5 + F_OGETLK = 0x7 + F_OK = 0x0 + F_OSETLK = 0x8 + F_OSETLKW = 0x9 + F_RDAHEAD = 0x10 + F_RDLCK = 0x1 + F_READAHEAD = 0xf + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0xc + F_SETLKW = 0xd + F_SETLK_REMOTE = 0xe + F_SETOWN = 0x6 + F_UNLCK = 0x2 + F_UNLCKSYS = 0x4 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFAN_ARRIVAL = 0x0 + IFAN_DEPARTURE = 0x1 + IFF_ALLMULTI = 0x200 + IFF_ALTPHYS = 0x4000 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x218f72 + IFF_CANTCONFIG = 0x10000 + IFF_DEBUG = 0x4 + IFF_DRV_OACTIVE = 0x400 + IFF_DRV_RUNNING = 0x40 + IFF_DYING = 0x200000 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MONITOR = 0x40000 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PPROMISC = 0x20000 + IFF_PROMISC = 0x100 + IFF_RENAMING = 0x400000 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_SMART = 0x20 + IFF_STATICARP = 0x80000 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_A12MPPSWITCH = 0x82 + IFT_AAL2 = 0xbb + IFT_AAL5 = 0x31 + IFT_ADSL = 0x5e + IFT_AFLANE8023 = 0x3b + IFT_AFLANE8025 = 0x3c + IFT_ARAP = 0x58 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ASYNC = 0x54 + IFT_ATM = 0x25 + IFT_ATMDXI = 0x69 + IFT_ATMFUNI = 0x6a + IFT_ATMIMA = 0x6b + IFT_ATMLOGICAL = 0x50 + IFT_ATMRADIO = 0xbd + IFT_ATMSUBINTERFACE = 0x86 + IFT_ATMVCIENDPT = 0xc2 + IFT_ATMVIRTUAL = 0x95 + IFT_BGPPOLICYACCOUNTING = 0xa2 + IFT_BRIDGE = 0xd1 + IFT_BSC = 0x53 + IFT_CARP = 0xf8 + IFT_CCTEMUL = 0x3d + IFT_CEPT = 0x13 + IFT_CES = 0x85 + IFT_CHANNEL = 0x46 + IFT_CNR = 0x55 + IFT_COFFEE = 0x84 + IFT_COMPOSITELINK = 0x9b + IFT_DCN = 0x8d + IFT_DIGITALPOWERLINE = 0x8a + IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba + IFT_DLSW = 0x4a + IFT_DOCSCABLEDOWNSTREAM = 0x80 + IFT_DOCSCABLEMACLAYER = 0x7f + IFT_DOCSCABLEUPSTREAM = 0x81 + IFT_DS0 = 0x51 + IFT_DS0BUNDLE = 0x52 + IFT_DS1FDL = 0xaa + IFT_DS3 = 0x1e + IFT_DTM = 0x8c + IFT_DVBASILN = 0xac + IFT_DVBASIOUT = 0xad + IFT_DVBRCCDOWNSTREAM = 0x93 + IFT_DVBRCCMACLAYER = 0x92 + IFT_DVBRCCUPSTREAM = 0x94 + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_EPLRS = 0x57 + IFT_ESCON = 0x49 + IFT_ETHER = 0x6 + IFT_FAITH = 0xf2 + IFT_FAST = 0x7d + IFT_FASTETHER = 0x3e + IFT_FASTETHERFX = 0x45 + IFT_FDDI = 0xf + IFT_FIBRECHANNEL = 0x38 + IFT_FRAMERELAYINTERCONNECT = 0x3a + IFT_FRAMERELAYMPI = 0x5c + IFT_FRDLCIENDPT = 0xc1 + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_FRF16MFRBUNDLE = 0xa3 + IFT_FRFORWARD = 0x9e + IFT_G703AT2MB = 0x43 + IFT_G703AT64K = 0x42 + IFT_GIF = 0xf0 + IFT_GIGABITETHERNET = 0x75 + IFT_GR303IDT = 0xb2 + IFT_GR303RDT = 0xb1 + IFT_H323GATEKEEPER = 0xa4 + IFT_H323PROXY = 0xa5 + IFT_HDH1822 = 0x3 + IFT_HDLC = 0x76 + IFT_HDSL2 = 0xa8 + IFT_HIPERLAN2 = 0xb7 + IFT_HIPPI = 0x2f + IFT_HIPPIINTERFACE = 0x39 + IFT_HOSTPAD = 0x5a + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IBM370PARCHAN = 0x48 + IFT_IDSL = 0x9a + IFT_IEEE1394 = 0x90 + IFT_IEEE80211 = 0x47 + IFT_IEEE80212 = 0x37 + IFT_IEEE8023ADLAG = 0xa1 + IFT_IFGSN = 0x91 + IFT_IMT = 0xbe + IFT_INFINIBAND = 0xc7 + IFT_INTERLEAVE = 0x7c + IFT_IP = 0x7e + IFT_IPFORWARD = 0x8e + IFT_IPOVERATM = 0x72 + IFT_IPOVERCDLC = 0x6d + IFT_IPOVERCLAW = 0x6e + IFT_IPSWITCH = 0x4e + IFT_IPXIP = 0xf9 + IFT_ISDN = 0x3f + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISDNS = 0x4b + IFT_ISDNU = 0x4c + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88025CRFPINT = 0x62 + IFT_ISO88025DTR = 0x56 + IFT_ISO88025FIBER = 0x73 + IFT_ISO88026 = 0xa + IFT_ISUP = 0xb3 + IFT_L2VLAN = 0x87 + IFT_L3IPVLAN = 0x88 + IFT_L3IPXVLAN = 0x89 + IFT_LAPB = 0x10 + IFT_LAPD = 0x4d + IFT_LAPF = 0x77 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_MPC = 0x71 + IFT_MPLS = 0xa6 + IFT_MPLSTUNNEL = 0x96 + IFT_MSDSL = 0x8f + IFT_MVL = 0xbf + IFT_MYRINET = 0x63 + IFT_NFAS = 0xaf + IFT_NSIP = 0x1b + IFT_OPTICALCHANNEL = 0xc3 + IFT_OPTICALTRANSPORT = 0xc4 + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PFLOG = 0xf6 + IFT_PFSYNC = 0xf7 + IFT_PLC = 0xae + IFT_POS = 0xab + IFT_PPP = 0x17 + IFT_PPPMULTILINKBUNDLE = 0x6c + IFT_PROPBWAP2MP = 0xb8 + IFT_PROPCNLS = 0x59 + IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 + IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 + IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PROPWIRELESSP2P = 0x9d + IFT_PTPSERIAL = 0x16 + IFT_PVC = 0xf1 + IFT_QLLC = 0x44 + IFT_RADIOMAC = 0xbc + IFT_RADSL = 0x5f + IFT_REACHDSL = 0xc0 + IFT_RFC1483 = 0x9f + IFT_RS232 = 0x21 + IFT_RSRB = 0x4f + IFT_SDLC = 0x11 + IFT_SDSL = 0x60 + IFT_SHDSL = 0xa9 + IFT_SIP = 0x1f + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETOVERHEADCHANNEL = 0xb9 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_SRP = 0x97 + IFT_SS7SIGLINK = 0x9c + IFT_STACKTOSTACK = 0x6f + IFT_STARLAN = 0xb + IFT_STF = 0xd7 + IFT_T1 = 0x12 + IFT_TDLC = 0x74 + IFT_TERMPAD = 0x5b + IFT_TR008 = 0xb0 + IFT_TRANSPHDLC = 0x7b + IFT_TUNNEL = 0x83 + IFT_ULTRA = 0x1d + IFT_USB = 0xa0 + IFT_V11 = 0x40 + IFT_V35 = 0x2d + IFT_V36 = 0x41 + IFT_V37 = 0x78 + IFT_VDSL = 0x61 + IFT_VIRTUALIPADDRESS = 0x70 + IFT_VOICEEM = 0x64 + IFT_VOICEENCAP = 0x67 + IFT_VOICEFXO = 0x65 + IFT_VOICEFXS = 0x66 + IFT_VOICEOVERATM = 0x98 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25HUNTGROUP = 0x7a + IFT_X25MLP = 0x79 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LOOPBACKNET = 0x7f + IN_RFC3021_MASK = 0xfffffffe + IPPROTO_3PC = 0x22 + IPPROTO_ADFS = 0x44 + IPPROTO_AH = 0x33 + IPPROTO_AHIP = 0x3d + IPPROTO_APES = 0x63 + IPPROTO_ARGUS = 0xd + IPPROTO_AX25 = 0x5d + IPPROTO_BHA = 0x31 + IPPROTO_BLT = 0x1e + IPPROTO_BRSATMON = 0x4c + IPPROTO_CARP = 0x70 + IPPROTO_CFTP = 0x3e + IPPROTO_CHAOS = 0x10 + IPPROTO_CMTP = 0x26 + IPPROTO_CPHB = 0x49 + IPPROTO_CPNX = 0x48 + IPPROTO_DDP = 0x25 + IPPROTO_DGP = 0x56 + IPPROTO_DIVERT = 0x102 + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_EMCON = 0xe + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GMTP = 0x64 + IPPROTO_GRE = 0x2f + IPPROTO_HELLO = 0x3f + IPPROTO_HIP = 0x8b + IPPROTO_HMP = 0x14 + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IDPR = 0x23 + IPPROTO_IDRP = 0x2d + IPPROTO_IGMP = 0x2 + IPPROTO_IGP = 0x55 + IPPROTO_IGRP = 0x58 + IPPROTO_IL = 0x28 + IPPROTO_INLSP = 0x34 + IPPROTO_INP = 0x20 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPCV = 0x47 + IPPROTO_IPEIP = 0x5e + IPPROTO_IPIP = 0x4 + IPPROTO_IPPC = 0x43 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IRTP = 0x1c + IPPROTO_KRYPTOLAN = 0x41 + IPPROTO_LARP = 0x5b + IPPROTO_LEAF1 = 0x19 + IPPROTO_LEAF2 = 0x1a + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x34 + IPPROTO_MEAS = 0x13 + IPPROTO_MH = 0x87 + IPPROTO_MHRP = 0x30 + IPPROTO_MICP = 0x5f + IPPROTO_MOBILE = 0x37 + IPPROTO_MPLS = 0x89 + IPPROTO_MTP = 0x5c + IPPROTO_MUX = 0x12 + IPPROTO_ND = 0x4d + IPPROTO_NHRP = 0x36 + IPPROTO_NONE = 0x3b + IPPROTO_NSP = 0x1f + IPPROTO_NVPII = 0xb + IPPROTO_OLD_DIVERT = 0xfe + IPPROTO_OSPFIGP = 0x59 + IPPROTO_PFSYNC = 0xf0 + IPPROTO_PGM = 0x71 + IPPROTO_PIGP = 0x9 + IPPROTO_PIM = 0x67 + IPPROTO_PRM = 0x15 + IPPROTO_PUP = 0xc + IPPROTO_PVP = 0x4b + IPPROTO_RAW = 0xff + IPPROTO_RCCMON = 0xa + IPPROTO_RDP = 0x1b + IPPROTO_RESERVED_253 = 0xfd + IPPROTO_RESERVED_254 = 0xfe + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_RVD = 0x42 + IPPROTO_SATEXPAK = 0x40 + IPPROTO_SATMON = 0x45 + IPPROTO_SCCSP = 0x60 + IPPROTO_SCTP = 0x84 + IPPROTO_SDRP = 0x2a + IPPROTO_SEND = 0x103 + IPPROTO_SEP = 0x21 + IPPROTO_SHIM6 = 0x8c + IPPROTO_SKIP = 0x39 + IPPROTO_SPACER = 0x7fff + IPPROTO_SRPC = 0x5a + IPPROTO_ST = 0x7 + IPPROTO_SVMTP = 0x52 + IPPROTO_SWIPE = 0x35 + IPPROTO_TCF = 0x57 + IPPROTO_TCP = 0x6 + IPPROTO_TLSP = 0x38 + IPPROTO_TP = 0x1d + IPPROTO_TPXX = 0x27 + IPPROTO_TRUNK1 = 0x17 + IPPROTO_TRUNK2 = 0x18 + IPPROTO_TTP = 0x54 + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPPROTO_VINES = 0x53 + IPPROTO_VISA = 0x46 + IPPROTO_VMTP = 0x51 + IPPROTO_WBEXPAK = 0x4f + IPPROTO_WBMON = 0x4e + IPPROTO_WSN = 0x4a + IPPROTO_XNET = 0xf + IPPROTO_XTP = 0x24 + IPV6_AUTOFLOWLABEL = 0x3b + IPV6_BINDANY = 0x40 + IPV6_BINDV6ONLY = 0x1b + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_DONTFRAG = 0x3e + IPV6_DSTOPTS = 0x32 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x78 + IPV6_FW_ADD = 0x1e + IPV6_FW_DEL = 0x1f + IPV6_FW_FLUSH = 0x20 + IPV6_FW_GET = 0x22 + IPV6_FW_ZERO = 0x21 + IPV6_HLIMDEC = 0x1 + IPV6_HOPLIMIT = 0x2f + IPV6_HOPOPTS = 0x31 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXOPTHDR = 0x800 + IPV6_MAXPACKET = 0xffff + IPV6_MAX_GROUP_SRC_FILTER = 0x200 + IPV6_MAX_MEMBERSHIPS = 0xfff + IPV6_MAX_SOCK_SRC_FILTER = 0x80 + IPV6_MIN_MEMBERSHIPS = 0x1f + IPV6_MMTU = 0x500 + IPV6_MSFILTER = 0x4a + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_NEXTHOP = 0x30 + IPV6_PATHMTU = 0x2c + IPV6_PKTINFO = 0x2e + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_PREFER_TEMPADDR = 0x3f + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVHOPLIMIT = 0x25 + IPV6_RECVHOPOPTS = 0x27 + IPV6_RECVPATHMTU = 0x2b + IPV6_RECVPKTINFO = 0x24 + IPV6_RECVRTHDR = 0x26 + IPV6_RECVTCLASS = 0x39 + IPV6_RTHDR = 0x33 + IPV6_RTHDRDSTOPTS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x3d + IPV6_UNICAST_HOPS = 0x4 + IPV6_USE_MIN_MTU = 0x2a + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_ADD_SOURCE_MEMBERSHIP = 0x46 + IP_BINDANY = 0x18 + IP_BLOCK_SOURCE = 0x48 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DONTFRAG = 0x43 + IP_DROP_MEMBERSHIP = 0xd + IP_DROP_SOURCE_MEMBERSHIP = 0x47 + IP_DUMMYNET3 = 0x31 + IP_DUMMYNET_CONFIGURE = 0x3c + IP_DUMMYNET_DEL = 0x3d + IP_DUMMYNET_FLUSH = 0x3e + IP_DUMMYNET_GET = 0x40 + IP_FAITH = 0x16 + IP_FW3 = 0x30 + IP_FW_ADD = 0x32 + IP_FW_DEL = 0x33 + IP_FW_FLUSH = 0x34 + IP_FW_GET = 0x36 + IP_FW_NAT_CFG = 0x38 + IP_FW_NAT_DEL = 0x39 + IP_FW_NAT_GET_CONFIG = 0x3a + IP_FW_NAT_GET_LOG = 0x3b + IP_FW_RESETLOG = 0x37 + IP_FW_TABLE_ADD = 0x28 + IP_FW_TABLE_DEL = 0x29 + IP_FW_TABLE_FLUSH = 0x2a + IP_FW_TABLE_GETSIZE = 0x2b + IP_FW_TABLE_LIST = 0x2c + IP_FW_ZERO = 0x35 + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x15 + IP_MAXPACKET = 0xffff + IP_MAX_GROUP_SRC_FILTER = 0x200 + IP_MAX_MEMBERSHIPS = 0xfff + IP_MAX_SOCK_MUTE_FILTER = 0x80 + IP_MAX_SOCK_SRC_FILTER = 0x80 + IP_MAX_SOURCE_FILTER = 0x400 + IP_MF = 0x2000 + IP_MINTTL = 0x42 + IP_MIN_MEMBERSHIPS = 0x1f + IP_MSFILTER = 0x4a + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_MULTICAST_VIF = 0xe + IP_OFFMASK = 0x1fff + IP_ONESBCAST = 0x17 + IP_OPTIONS = 0x1 + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVRETOPTS = 0x6 + IP_RECVTOS = 0x44 + IP_RECVTTL = 0x41 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RSVP_OFF = 0x10 + IP_RSVP_ON = 0xf + IP_RSVP_VIF_OFF = 0x12 + IP_RSVP_VIF_ON = 0x11 + IP_SENDSRCADDR = 0x7 + IP_TOS = 0x3 + IP_TTL = 0x4 + IP_UNBLOCK_SOURCE = 0x49 + ISIG = 0x80 + ISTRIP = 0x20 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_AUTOSYNC = 0x7 + MADV_CORE = 0x9 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x5 + MADV_NOCORE = 0x8 + MADV_NORMAL = 0x0 + MADV_NOSYNC = 0x6 + MADV_PROTECT = 0xa + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_WILLNEED = 0x3 + MAP_32BIT = 0x80000 + MAP_ALIGNED_SUPER = 0x1000000 + MAP_ALIGNMENT_MASK = -0x1000000 + MAP_ALIGNMENT_SHIFT = 0x18 + MAP_ANON = 0x1000 + MAP_ANONYMOUS = 0x1000 + MAP_COPY = 0x2 + MAP_EXCL = 0x4000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_HASSEMAPHORE = 0x200 + MAP_NOCORE = 0x20000 + MAP_NORESERVE = 0x40 + MAP_NOSYNC = 0x800 + MAP_PREFAULT_READ = 0x40000 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_RESERVED0080 = 0x80 + MAP_RESERVED0100 = 0x100 + MAP_SHARED = 0x1 + MAP_STACK = 0x400 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_CMSG_CLOEXEC = 0x40000 + MSG_COMPAT = 0x8000 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOF = 0x100 + MSG_EOR = 0x8 + MSG_NBIO = 0x4000 + MSG_NOSIGNAL = 0x20000 + MSG_NOTIFICATION = 0x2000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x2 + MS_SYNC = 0x0 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_IFLISTL = 0x5 + NET_RT_IFMALIST = 0x4 + NET_RT_MAXID = 0x6 + NOFLSH = 0x80000000 + NOTE_ATTRIB = 0x8 + NOTE_CHILD = 0x4 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXTEND = 0x4 + NOTE_FFAND = 0x40000000 + NOTE_FFCOPY = 0xc0000000 + NOTE_FFCTRLMASK = 0xc0000000 + NOTE_FFLAGSMASK = 0xffffff + NOTE_FFNOP = 0x0 + NOTE_FFOR = 0x80000000 + NOTE_FORK = 0x40000000 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_MSECONDS = 0x2 + NOTE_NSECONDS = 0x8 + NOTE_PCTRLMASK = 0xf0000000 + NOTE_PDATAMASK = 0xfffff + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_SECONDS = 0x1 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_TRIGGER = 0x1000000 + NOTE_USECONDS = 0x4 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x100000 + O_CREAT = 0x200 + O_DIRECT = 0x10000 + O_DIRECTORY = 0x20000 + O_EXCL = 0x800 + O_EXEC = 0x40000 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x8000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_SHLOCK = 0x10 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_TTY_INIT = 0x80000 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + RLIMIT_AS = 0xa + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0x8 + RTAX_NETMASK = 0x2 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_NETMASK = 0x4 + RTF_BLACKHOLE = 0x1000 + RTF_BROADCAST = 0x400000 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_FMASK = 0x1004d808 + RTF_GATEWAY = 0x2 + RTF_GWFLAG_COMPAT = 0x80000000 + RTF_HOST = 0x4 + RTF_LLDATA = 0x400 + RTF_LLINFO = 0x400 + RTF_LOCAL = 0x200000 + RTF_MODIFIED = 0x20 + RTF_MULTICAST = 0x800000 + RTF_PINNED = 0x100000 + RTF_PRCLONING = 0x10000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x40000 + RTF_REJECT = 0x8 + RTF_RNH_LOCKED = 0x40000000 + RTF_STATIC = 0x800 + RTF_STICKY = 0x10000000 + RTF_UP = 0x1 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DELMADDR = 0x10 + RTM_GET = 0x4 + RTM_IEEE80211 = 0x12 + RTM_IFANNOUNCE = 0x11 + RTM_IFINFO = 0xe + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_NEWMADDR = 0xf + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x5 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RTV_WEIGHT = 0x100 + RT_ALL_FIBS = -0x1 + RT_CACHING_CONTEXT = 0x1 + RT_DEFAULT_FIB = 0x0 + RT_NORTREF = 0x2 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_BINTIME = 0x4 + SCM_CREDS = 0x3 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x2 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCADDRT = 0x8040720a + SIOCAIFADDR = 0x8040691a + SIOCAIFGROUP = 0x80286987 + SIOCALIFADDR = 0x8118691b + SIOCATMARK = 0x40047307 + SIOCDELMULTI = 0x80206932 + SIOCDELRT = 0x8040720b + SIOCDIFADDR = 0x80206919 + SIOCDIFGROUP = 0x80286989 + SIOCDIFPHYADDR = 0x80206949 + SIOCDLIFADDR = 0x8118691d + SIOCGDRVSPEC = 0xc028697b + SIOCGETSGCNT = 0xc0207210 + SIOCGETVIFCNT = 0xc028720f + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0206921 + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCAP = 0xc020691f + SIOCGIFCONF = 0xc0106924 + SIOCGIFDESCR = 0xc020692a + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFIB = 0xc020695c + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGENERIC = 0xc020693a + SIOCGIFGMEMB = 0xc028698a + SIOCGIFGROUP = 0xc0286988 + SIOCGIFINDEX = 0xc0206920 + SIOCGIFMAC = 0xc0206926 + SIOCGIFMEDIA = 0xc0306938 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc0206933 + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPDSTADDR = 0xc0206948 + SIOCGIFPHYS = 0xc0206935 + SIOCGIFPSRCADDR = 0xc0206947 + SIOCGIFSTATUS = 0xc331693b + SIOCGLIFADDR = 0xc118691c + SIOCGLIFPHYADDR = 0xc118694b + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCGPRIVATE_0 = 0xc0206950 + SIOCGPRIVATE_1 = 0xc0206951 + SIOCIFCREATE = 0xc020697a + SIOCIFCREATE2 = 0xc020697c + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc0106978 + SIOCSDRVSPEC = 0x8028697b + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFCAP = 0x8020691e + SIOCSIFDESCR = 0x80206929 + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFIB = 0x8020695d + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGENERIC = 0x80206939 + SIOCSIFLLADDR = 0x8020693c + SIOCSIFMAC = 0x80206927 + SIOCSIFMEDIA = 0xc0206937 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x80206934 + SIOCSIFNAME = 0x80206928 + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPHYADDR = 0x80406946 + SIOCSIFPHYS = 0x80206936 + SIOCSIFRVNET = 0xc020695b + SIOCSIFVNET = 0xc020695a + SIOCSLIFPHYADDR = 0x8118694a + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SOCK_CLOEXEC = 0x10000000 + SOCK_DGRAM = 0x2 + SOCK_MAXADDRLEN = 0xff + SOCK_NONBLOCK = 0x20000000 + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_ACCEPTFILTER = 0x1000 + SO_BINTIME = 0x2000 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LABEL = 0x1009 + SO_LINGER = 0x80 + SO_LISTENINCQLEN = 0x1013 + SO_LISTENQLEN = 0x1012 + SO_LISTENQLIMIT = 0x1011 + SO_NOSIGPIPE = 0x800 + SO_NO_DDP = 0x8000 + SO_NO_OFFLOAD = 0x4000 + SO_OOBINLINE = 0x100 + SO_PEERLABEL = 0x1010 + SO_PROTOCOL = 0x1016 + SO_PROTOTYPE = 0x1016 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_SETFIB = 0x1014 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_TIMESTAMP = 0x400 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + SO_USER_COOKIE = 0x1015 + SO_VENDOR = 0x80000000 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_CA_NAME_MAX = 0x10 + TCP_CONGESTION = 0x40 + TCP_INFO = 0x20 + TCP_KEEPCNT = 0x400 + TCP_KEEPIDLE = 0x100 + TCP_KEEPINIT = 0x80 + TCP_KEEPINTVL = 0x200 + TCP_MAXBURST = 0x4 + TCP_MAXHLEN = 0x3c + TCP_MAXOLEN = 0x28 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_SACK = 0x4 + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0x10 + TCP_MINMSS = 0xd8 + TCP_MSS = 0x218 + TCP_NODELAY = 0x1 + TCP_NOOPT = 0x8 + TCP_NOPUSH = 0x4 + TCP_VENDOR = 0x80000000 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDRAIN = 0x2000745e + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLUSH = 0x80047410 + TIOCGDRAINWAIT = 0x40047456 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGPGRP = 0x40047477 + TIOCGPTN = 0x4004740f + TIOCGSID = 0x40047463 + TIOCGWINSZ = 0x40087468 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGDTRWAIT = 0x4004745a + TIOCMGET = 0x4004746a + TIOCMSDTRWAIT = 0x8004745b + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DCD = 0x40 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCPTMASTER = 0x2000741c + TIOCSBRK = 0x2000747b + TIOCSCTTY = 0x20007461 + TIOCSDRAINWAIT = 0x80047457 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSIG = 0x2004745f + TIOCSPGRP = 0x80047476 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x20007465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCTIMESTAMP = 0x40107459 + TIOCUCNTL = 0x80047466 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VERASE2 = 0x7 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VTIME = 0x11 + VWERASE = 0x4 + WCONTINUED = 0x4 + WCOREFLAG = 0x80 + WEXITED = 0x10 + WLINUXCLONE = 0x80000000 + WNOHANG = 0x1 + WNOWAIT = 0x8 + WSTOPPED = 0x2 + WTRAPPED = 0x20 + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADF = syscall.Errno(0x9) + EBADMSG = syscall.Errno(0x59) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x55) + ECAPMODE = syscall.Errno(0x5e) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDOM = syscall.Errno(0x21) + EDOOFUS = syscall.Errno(0x58) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x52) + EILSEQ = syscall.Errno(0x56) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x60) + ELOOP = syscall.Errno(0x3e) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + EMULTIHOP = syscall.Errno(0x5a) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x57) + ENOBUFS = syscall.Errno(0x37) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOLINK = syscall.Errno(0x5b) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x53) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCAPABLE = syscall.Errno(0x5d) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTRECOVERABLE = syscall.Errno(0x5f) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x2d) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x2d) + EOVERFLOW = syscall.Errno(0x54) + EOWNERDEAD = syscall.Errno(0x60) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x5c) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGLIBRT = syscall.Signal(0x21) + SIGLWP = syscall.Signal(0x20) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTHR = syscall.Signal(0x20) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "operation timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "identifier removed", + 83: "no message of desired type", + 84: "value too large to be stored in data type", + 85: "operation canceled", + 86: "illegal byte sequence", + 87: "attribute not found", + 88: "programming error", + 89: "bad message", + 90: "multihop attempted", + 91: "link has been severed", + 92: "protocol error", + 93: "capabilities insufficient", + 94: "not permitted in capability mode", + 95: "state not recoverable", + 96: "previous owner died", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "suspended (signal)", + 18: "suspended", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", + 32: "unknown signal", + 33: "unknown signal", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go new file mode 100644 index 0000000..2afbe2d --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go @@ -0,0 +1,1729 @@ +// mkerrors.sh +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build arm,freebsd + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_ARP = 0x23 + AF_ATM = 0x1e + AF_BLUETOOTH = 0x24 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1a + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x25 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x1c + AF_INET6_SDP = 0x2a + AF_INET_SDP = 0x28 + AF_IPX = 0x17 + AF_ISDN = 0x1a + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x2a + AF_NATM = 0x1d + AF_NETBIOS = 0x6 + AF_NETGRAPH = 0x20 + AF_OSI = 0x7 + AF_PUP = 0x4 + AF_ROUTE = 0x11 + AF_SCLUSTER = 0x22 + AF_SIP = 0x18 + AF_SLOW = 0x21 + AF_SNA = 0xb + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_VENDOR00 = 0x27 + AF_VENDOR01 = 0x29 + AF_VENDOR02 = 0x2b + AF_VENDOR03 = 0x2d + AF_VENDOR04 = 0x2f + AF_VENDOR05 = 0x31 + AF_VENDOR06 = 0x33 + AF_VENDOR07 = 0x35 + AF_VENDOR08 = 0x37 + AF_VENDOR09 = 0x39 + AF_VENDOR10 = 0x3b + AF_VENDOR11 = 0x3d + AF_VENDOR12 = 0x3f + AF_VENDOR13 = 0x41 + AF_VENDOR14 = 0x43 + AF_VENDOR15 = 0x45 + AF_VENDOR16 = 0x47 + AF_VENDOR17 = 0x49 + AF_VENDOR18 = 0x4b + AF_VENDOR19 = 0x4d + AF_VENDOR20 = 0x4f + AF_VENDOR21 = 0x51 + AF_VENDOR22 = 0x53 + AF_VENDOR23 = 0x55 + AF_VENDOR24 = 0x57 + AF_VENDOR25 = 0x59 + AF_VENDOR26 = 0x5b + AF_VENDOR27 = 0x5d + AF_VENDOR28 = 0x5f + AF_VENDOR29 = 0x61 + AF_VENDOR30 = 0x63 + AF_VENDOR31 = 0x65 + AF_VENDOR32 = 0x67 + AF_VENDOR33 = 0x69 + AF_VENDOR34 = 0x6b + AF_VENDOR35 = 0x6d + AF_VENDOR36 = 0x6f + AF_VENDOR37 = 0x71 + AF_VENDOR38 = 0x73 + AF_VENDOR39 = 0x75 + AF_VENDOR40 = 0x77 + AF_VENDOR41 = 0x79 + AF_VENDOR42 = 0x7b + AF_VENDOR43 = 0x7d + AF_VENDOR44 = 0x7f + AF_VENDOR45 = 0x81 + AF_VENDOR46 = 0x83 + AF_VENDOR47 = 0x85 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B460800 = 0x70800 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B921600 = 0xe1000 + B9600 = 0x2580 + BIOCFEEDBACK = 0x8004427c + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDIRECTION = 0x40044276 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc0084279 + BIOCGETBUFMODE = 0x4004427d + BIOCGETIF = 0x4020426b + BIOCGETZMAX = 0x4004427f + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044272 + BIOCGRTIMEOUT = 0x4008426e + BIOCGSEESENT = 0x40044276 + BIOCGSTATS = 0x4008426f + BIOCGTSTAMP = 0x40044283 + BIOCIMMEDIATE = 0x80044270 + BIOCLOCK = 0x2000427a + BIOCPROMISC = 0x20004269 + BIOCROTZBUF = 0x400c4280 + BIOCSBLEN = 0xc0044266 + BIOCSDIRECTION = 0x80044277 + BIOCSDLT = 0x80044278 + BIOCSETBUFMODE = 0x8004427e + BIOCSETF = 0x80084267 + BIOCSETFNR = 0x80084282 + BIOCSETIF = 0x8020426c + BIOCSETWF = 0x8008427b + BIOCSETZBUF = 0x800c4281 + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044273 + BIOCSRTIMEOUT = 0x8008426d + BIOCSSEESENT = 0x80044277 + BIOCSTSTAMP = 0x80044284 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_BUFMODE_BUFFER = 0x1 + BPF_BUFMODE_ZBUF = 0x2 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x80000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_T_BINTIME = 0x2 + BPF_T_BINTIME_FAST = 0x102 + BPF_T_BINTIME_MONOTONIC = 0x202 + BPF_T_BINTIME_MONOTONIC_FAST = 0x302 + BPF_T_FAST = 0x100 + BPF_T_FLAG_MASK = 0x300 + BPF_T_FORMAT_MASK = 0x3 + BPF_T_MICROTIME = 0x0 + BPF_T_MICROTIME_FAST = 0x100 + BPF_T_MICROTIME_MONOTONIC = 0x200 + BPF_T_MICROTIME_MONOTONIC_FAST = 0x300 + BPF_T_MONOTONIC = 0x200 + BPF_T_MONOTONIC_FAST = 0x300 + BPF_T_NANOTIME = 0x1 + BPF_T_NANOTIME_FAST = 0x101 + BPF_T_NANOTIME_MONOTONIC = 0x201 + BPF_T_NANOTIME_MONOTONIC_FAST = 0x301 + BPF_T_NONE = 0x3 + BPF_T_NORMAL = 0x0 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0x18 + CTL_NET = 0x4 + DLT_A429 = 0xb8 + DLT_A653_ICM = 0xb9 + DLT_AIRONET_HEADER = 0x78 + DLT_AOS = 0xde + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_AX25_KISS = 0xca + DLT_BACNET_MS_TP = 0xa5 + DLT_BLUETOOTH_HCI_H4 = 0xbb + DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 + DLT_CAN20B = 0xbe + DLT_CAN_SOCKETCAN = 0xe3 + DLT_CHAOS = 0x5 + DLT_CHDLC = 0x68 + DLT_CISCO_IOS = 0x76 + DLT_C_HDLC = 0x68 + DLT_C_HDLC_WITH_DIR = 0xcd + DLT_DBUS = 0xe7 + DLT_DECT = 0xdd + DLT_DOCSIS = 0x8f + DLT_DVB_CI = 0xeb + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_ERF = 0xc5 + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FC_2 = 0xe0 + DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 + DLT_FDDI = 0xa + DLT_FLEXRAY = 0xd2 + DLT_FRELAY = 0x6b + DLT_FRELAY_WITH_DIR = 0xce + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_GSMTAP_ABIS = 0xda + DLT_GSMTAP_UM = 0xd9 + DLT_HHDLC = 0x79 + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IEEE802_15_4 = 0xc3 + DLT_IEEE802_15_4_LINUX = 0xbf + DLT_IEEE802_15_4_NOFCS = 0xe6 + DLT_IEEE802_15_4_NONASK_PHY = 0xd7 + DLT_IEEE802_16_MAC_CPS = 0xbc + DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 + DLT_IPFILTER = 0x74 + DLT_IPMB = 0xc7 + DLT_IPMB_LINUX = 0xd1 + DLT_IPNET = 0xe2 + DLT_IPOIB = 0xf2 + DLT_IPV4 = 0xe4 + DLT_IPV6 = 0xe5 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_ATM_CEMIC = 0xee + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FIBRECHANNEL = 0xea + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_ISM = 0xc2 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_JUNIPER_SRX_E2E = 0xe9 + DLT_JUNIPER_ST = 0xc8 + DLT_JUNIPER_VP = 0xb7 + DLT_JUNIPER_VS = 0xe8 + DLT_LAPB_WITH_DIR = 0xcf + DLT_LAPD = 0xcb + DLT_LIN = 0xd4 + DLT_LINUX_EVDEV = 0xd8 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_PPP_WITHDIRECTION = 0xa6 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MATCHING_MAX = 0xf6 + DLT_MATCHING_MIN = 0x68 + DLT_MFR = 0xb6 + DLT_MOST = 0xd3 + DLT_MPEG_2_TS = 0xf3 + DLT_MPLS = 0xdb + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_MUX27010 = 0xec + DLT_NETANALYZER = 0xf0 + DLT_NETANALYZER_TRANSPARENT = 0xf1 + DLT_NFC_LLCP = 0xf5 + DLT_NFLOG = 0xef + DLT_NG40 = 0xf4 + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x79 + DLT_PPI = 0xc0 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0x10 + DLT_PPP_ETHER = 0x33 + DLT_PPP_PPPD = 0xa6 + DLT_PPP_SERIAL = 0x32 + DLT_PPP_WITH_DIR = 0xcc + DLT_PPP_WITH_DIRECTION = 0xa6 + DLT_PRISM_HEADER = 0x77 + DLT_PRONET = 0x4 + DLT_RAIF1 = 0xc6 + DLT_RAW = 0xc + DLT_RIO = 0x7c + DLT_SCCP = 0x8e + DLT_SITA = 0xc4 + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf + DLT_STANAG_5066_D_PDU = 0xed + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + DLT_USB = 0xba + DLT_USB_LINUX = 0xbd + DLT_USB_LINUX_MMAPPED = 0xdc + DLT_USER0 = 0x93 + DLT_USER1 = 0x94 + DLT_USER10 = 0x9d + DLT_USER11 = 0x9e + DLT_USER12 = 0x9f + DLT_USER13 = 0xa0 + DLT_USER14 = 0xa1 + DLT_USER15 = 0xa2 + DLT_USER2 = 0x95 + DLT_USER3 = 0x96 + DLT_USER4 = 0x97 + DLT_USER5 = 0x98 + DLT_USER6 = 0x99 + DLT_USER7 = 0x9a + DLT_USER8 = 0x9b + DLT_USER9 = 0x9c + DLT_WIHART = 0xdf + DLT_X2E_SERIAL = 0xd5 + DLT_X2E_XORAYA = 0xd6 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EVFILT_AIO = -0x3 + EVFILT_FS = -0x9 + EVFILT_LIO = -0xa + EVFILT_PROC = -0x5 + EVFILT_READ = -0x1 + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0xb + EVFILT_TIMER = -0x7 + EVFILT_USER = -0xb + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_DISPATCH = 0x80 + EV_DROP = 0x1000 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_RECEIPT = 0x40 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTATTR_NAMESPACE_EMPTY = 0x0 + EXTATTR_NAMESPACE_SYSTEM = 0x2 + EXTATTR_NAMESPACE_USER = 0x1 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_CANCEL = 0x5 + F_DUP2FD = 0xa + F_DUP2FD_CLOEXEC = 0x12 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x11 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0xb + F_GETOWN = 0x5 + F_OGETLK = 0x7 + F_OK = 0x0 + F_OSETLK = 0x8 + F_OSETLKW = 0x9 + F_RDAHEAD = 0x10 + F_RDLCK = 0x1 + F_READAHEAD = 0xf + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0xc + F_SETLKW = 0xd + F_SETLK_REMOTE = 0xe + F_SETOWN = 0x6 + F_UNLCK = 0x2 + F_UNLCKSYS = 0x4 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFAN_ARRIVAL = 0x0 + IFAN_DEPARTURE = 0x1 + IFF_ALLMULTI = 0x200 + IFF_ALTPHYS = 0x4000 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x218f72 + IFF_CANTCONFIG = 0x10000 + IFF_DEBUG = 0x4 + IFF_DRV_OACTIVE = 0x400 + IFF_DRV_RUNNING = 0x40 + IFF_DYING = 0x200000 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MONITOR = 0x40000 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PPROMISC = 0x20000 + IFF_PROMISC = 0x100 + IFF_RENAMING = 0x400000 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_SMART = 0x20 + IFF_STATICARP = 0x80000 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_A12MPPSWITCH = 0x82 + IFT_AAL2 = 0xbb + IFT_AAL5 = 0x31 + IFT_ADSL = 0x5e + IFT_AFLANE8023 = 0x3b + IFT_AFLANE8025 = 0x3c + IFT_ARAP = 0x58 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ASYNC = 0x54 + IFT_ATM = 0x25 + IFT_ATMDXI = 0x69 + IFT_ATMFUNI = 0x6a + IFT_ATMIMA = 0x6b + IFT_ATMLOGICAL = 0x50 + IFT_ATMRADIO = 0xbd + IFT_ATMSUBINTERFACE = 0x86 + IFT_ATMVCIENDPT = 0xc2 + IFT_ATMVIRTUAL = 0x95 + IFT_BGPPOLICYACCOUNTING = 0xa2 + IFT_BRIDGE = 0xd1 + IFT_BSC = 0x53 + IFT_CARP = 0xf8 + IFT_CCTEMUL = 0x3d + IFT_CEPT = 0x13 + IFT_CES = 0x85 + IFT_CHANNEL = 0x46 + IFT_CNR = 0x55 + IFT_COFFEE = 0x84 + IFT_COMPOSITELINK = 0x9b + IFT_DCN = 0x8d + IFT_DIGITALPOWERLINE = 0x8a + IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba + IFT_DLSW = 0x4a + IFT_DOCSCABLEDOWNSTREAM = 0x80 + IFT_DOCSCABLEMACLAYER = 0x7f + IFT_DOCSCABLEUPSTREAM = 0x81 + IFT_DS0 = 0x51 + IFT_DS0BUNDLE = 0x52 + IFT_DS1FDL = 0xaa + IFT_DS3 = 0x1e + IFT_DTM = 0x8c + IFT_DVBASILN = 0xac + IFT_DVBASIOUT = 0xad + IFT_DVBRCCDOWNSTREAM = 0x93 + IFT_DVBRCCMACLAYER = 0x92 + IFT_DVBRCCUPSTREAM = 0x94 + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_EPLRS = 0x57 + IFT_ESCON = 0x49 + IFT_ETHER = 0x6 + IFT_FAITH = 0xf2 + IFT_FAST = 0x7d + IFT_FASTETHER = 0x3e + IFT_FASTETHERFX = 0x45 + IFT_FDDI = 0xf + IFT_FIBRECHANNEL = 0x38 + IFT_FRAMERELAYINTERCONNECT = 0x3a + IFT_FRAMERELAYMPI = 0x5c + IFT_FRDLCIENDPT = 0xc1 + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_FRF16MFRBUNDLE = 0xa3 + IFT_FRFORWARD = 0x9e + IFT_G703AT2MB = 0x43 + IFT_G703AT64K = 0x42 + IFT_GIF = 0xf0 + IFT_GIGABITETHERNET = 0x75 + IFT_GR303IDT = 0xb2 + IFT_GR303RDT = 0xb1 + IFT_H323GATEKEEPER = 0xa4 + IFT_H323PROXY = 0xa5 + IFT_HDH1822 = 0x3 + IFT_HDLC = 0x76 + IFT_HDSL2 = 0xa8 + IFT_HIPERLAN2 = 0xb7 + IFT_HIPPI = 0x2f + IFT_HIPPIINTERFACE = 0x39 + IFT_HOSTPAD = 0x5a + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IBM370PARCHAN = 0x48 + IFT_IDSL = 0x9a + IFT_IEEE1394 = 0x90 + IFT_IEEE80211 = 0x47 + IFT_IEEE80212 = 0x37 + IFT_IEEE8023ADLAG = 0xa1 + IFT_IFGSN = 0x91 + IFT_IMT = 0xbe + IFT_INFINIBAND = 0xc7 + IFT_INTERLEAVE = 0x7c + IFT_IP = 0x7e + IFT_IPFORWARD = 0x8e + IFT_IPOVERATM = 0x72 + IFT_IPOVERCDLC = 0x6d + IFT_IPOVERCLAW = 0x6e + IFT_IPSWITCH = 0x4e + IFT_IPXIP = 0xf9 + IFT_ISDN = 0x3f + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISDNS = 0x4b + IFT_ISDNU = 0x4c + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88025CRFPINT = 0x62 + IFT_ISO88025DTR = 0x56 + IFT_ISO88025FIBER = 0x73 + IFT_ISO88026 = 0xa + IFT_ISUP = 0xb3 + IFT_L2VLAN = 0x87 + IFT_L3IPVLAN = 0x88 + IFT_L3IPXVLAN = 0x89 + IFT_LAPB = 0x10 + IFT_LAPD = 0x4d + IFT_LAPF = 0x77 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_MPC = 0x71 + IFT_MPLS = 0xa6 + IFT_MPLSTUNNEL = 0x96 + IFT_MSDSL = 0x8f + IFT_MVL = 0xbf + IFT_MYRINET = 0x63 + IFT_NFAS = 0xaf + IFT_NSIP = 0x1b + IFT_OPTICALCHANNEL = 0xc3 + IFT_OPTICALTRANSPORT = 0xc4 + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PFLOG = 0xf6 + IFT_PFSYNC = 0xf7 + IFT_PLC = 0xae + IFT_POS = 0xab + IFT_PPP = 0x17 + IFT_PPPMULTILINKBUNDLE = 0x6c + IFT_PROPBWAP2MP = 0xb8 + IFT_PROPCNLS = 0x59 + IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 + IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 + IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PROPWIRELESSP2P = 0x9d + IFT_PTPSERIAL = 0x16 + IFT_PVC = 0xf1 + IFT_QLLC = 0x44 + IFT_RADIOMAC = 0xbc + IFT_RADSL = 0x5f + IFT_REACHDSL = 0xc0 + IFT_RFC1483 = 0x9f + IFT_RS232 = 0x21 + IFT_RSRB = 0x4f + IFT_SDLC = 0x11 + IFT_SDSL = 0x60 + IFT_SHDSL = 0xa9 + IFT_SIP = 0x1f + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETOVERHEADCHANNEL = 0xb9 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_SRP = 0x97 + IFT_SS7SIGLINK = 0x9c + IFT_STACKTOSTACK = 0x6f + IFT_STARLAN = 0xb + IFT_STF = 0xd7 + IFT_T1 = 0x12 + IFT_TDLC = 0x74 + IFT_TERMPAD = 0x5b + IFT_TR008 = 0xb0 + IFT_TRANSPHDLC = 0x7b + IFT_TUNNEL = 0x83 + IFT_ULTRA = 0x1d + IFT_USB = 0xa0 + IFT_V11 = 0x40 + IFT_V35 = 0x2d + IFT_V36 = 0x41 + IFT_V37 = 0x78 + IFT_VDSL = 0x61 + IFT_VIRTUALIPADDRESS = 0x70 + IFT_VOICEEM = 0x64 + IFT_VOICEENCAP = 0x67 + IFT_VOICEFXO = 0x65 + IFT_VOICEFXS = 0x66 + IFT_VOICEOVERATM = 0x98 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25HUNTGROUP = 0x7a + IFT_X25MLP = 0x79 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LOOPBACKNET = 0x7f + IN_RFC3021_MASK = 0xfffffffe + IPPROTO_3PC = 0x22 + IPPROTO_ADFS = 0x44 + IPPROTO_AH = 0x33 + IPPROTO_AHIP = 0x3d + IPPROTO_APES = 0x63 + IPPROTO_ARGUS = 0xd + IPPROTO_AX25 = 0x5d + IPPROTO_BHA = 0x31 + IPPROTO_BLT = 0x1e + IPPROTO_BRSATMON = 0x4c + IPPROTO_CARP = 0x70 + IPPROTO_CFTP = 0x3e + IPPROTO_CHAOS = 0x10 + IPPROTO_CMTP = 0x26 + IPPROTO_CPHB = 0x49 + IPPROTO_CPNX = 0x48 + IPPROTO_DDP = 0x25 + IPPROTO_DGP = 0x56 + IPPROTO_DIVERT = 0x102 + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_EMCON = 0xe + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GMTP = 0x64 + IPPROTO_GRE = 0x2f + IPPROTO_HELLO = 0x3f + IPPROTO_HIP = 0x8b + IPPROTO_HMP = 0x14 + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IDPR = 0x23 + IPPROTO_IDRP = 0x2d + IPPROTO_IGMP = 0x2 + IPPROTO_IGP = 0x55 + IPPROTO_IGRP = 0x58 + IPPROTO_IL = 0x28 + IPPROTO_INLSP = 0x34 + IPPROTO_INP = 0x20 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPCV = 0x47 + IPPROTO_IPEIP = 0x5e + IPPROTO_IPIP = 0x4 + IPPROTO_IPPC = 0x43 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IRTP = 0x1c + IPPROTO_KRYPTOLAN = 0x41 + IPPROTO_LARP = 0x5b + IPPROTO_LEAF1 = 0x19 + IPPROTO_LEAF2 = 0x1a + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x34 + IPPROTO_MEAS = 0x13 + IPPROTO_MH = 0x87 + IPPROTO_MHRP = 0x30 + IPPROTO_MICP = 0x5f + IPPROTO_MOBILE = 0x37 + IPPROTO_MPLS = 0x89 + IPPROTO_MTP = 0x5c + IPPROTO_MUX = 0x12 + IPPROTO_ND = 0x4d + IPPROTO_NHRP = 0x36 + IPPROTO_NONE = 0x3b + IPPROTO_NSP = 0x1f + IPPROTO_NVPII = 0xb + IPPROTO_OLD_DIVERT = 0xfe + IPPROTO_OSPFIGP = 0x59 + IPPROTO_PFSYNC = 0xf0 + IPPROTO_PGM = 0x71 + IPPROTO_PIGP = 0x9 + IPPROTO_PIM = 0x67 + IPPROTO_PRM = 0x15 + IPPROTO_PUP = 0xc + IPPROTO_PVP = 0x4b + IPPROTO_RAW = 0xff + IPPROTO_RCCMON = 0xa + IPPROTO_RDP = 0x1b + IPPROTO_RESERVED_253 = 0xfd + IPPROTO_RESERVED_254 = 0xfe + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_RVD = 0x42 + IPPROTO_SATEXPAK = 0x40 + IPPROTO_SATMON = 0x45 + IPPROTO_SCCSP = 0x60 + IPPROTO_SCTP = 0x84 + IPPROTO_SDRP = 0x2a + IPPROTO_SEND = 0x103 + IPPROTO_SEP = 0x21 + IPPROTO_SHIM6 = 0x8c + IPPROTO_SKIP = 0x39 + IPPROTO_SPACER = 0x7fff + IPPROTO_SRPC = 0x5a + IPPROTO_ST = 0x7 + IPPROTO_SVMTP = 0x52 + IPPROTO_SWIPE = 0x35 + IPPROTO_TCF = 0x57 + IPPROTO_TCP = 0x6 + IPPROTO_TLSP = 0x38 + IPPROTO_TP = 0x1d + IPPROTO_TPXX = 0x27 + IPPROTO_TRUNK1 = 0x17 + IPPROTO_TRUNK2 = 0x18 + IPPROTO_TTP = 0x54 + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPPROTO_VINES = 0x53 + IPPROTO_VISA = 0x46 + IPPROTO_VMTP = 0x51 + IPPROTO_WBEXPAK = 0x4f + IPPROTO_WBMON = 0x4e + IPPROTO_WSN = 0x4a + IPPROTO_XNET = 0xf + IPPROTO_XTP = 0x24 + IPV6_AUTOFLOWLABEL = 0x3b + IPV6_BINDANY = 0x40 + IPV6_BINDV6ONLY = 0x1b + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_DONTFRAG = 0x3e + IPV6_DSTOPTS = 0x32 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x78 + IPV6_FW_ADD = 0x1e + IPV6_FW_DEL = 0x1f + IPV6_FW_FLUSH = 0x20 + IPV6_FW_GET = 0x22 + IPV6_FW_ZERO = 0x21 + IPV6_HLIMDEC = 0x1 + IPV6_HOPLIMIT = 0x2f + IPV6_HOPOPTS = 0x31 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXOPTHDR = 0x800 + IPV6_MAXPACKET = 0xffff + IPV6_MAX_GROUP_SRC_FILTER = 0x200 + IPV6_MAX_MEMBERSHIPS = 0xfff + IPV6_MAX_SOCK_SRC_FILTER = 0x80 + IPV6_MIN_MEMBERSHIPS = 0x1f + IPV6_MMTU = 0x500 + IPV6_MSFILTER = 0x4a + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_NEXTHOP = 0x30 + IPV6_PATHMTU = 0x2c + IPV6_PKTINFO = 0x2e + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_PREFER_TEMPADDR = 0x3f + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVHOPLIMIT = 0x25 + IPV6_RECVHOPOPTS = 0x27 + IPV6_RECVPATHMTU = 0x2b + IPV6_RECVPKTINFO = 0x24 + IPV6_RECVRTHDR = 0x26 + IPV6_RECVTCLASS = 0x39 + IPV6_RTHDR = 0x33 + IPV6_RTHDRDSTOPTS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x3d + IPV6_UNICAST_HOPS = 0x4 + IPV6_USE_MIN_MTU = 0x2a + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_ADD_SOURCE_MEMBERSHIP = 0x46 + IP_BINDANY = 0x18 + IP_BLOCK_SOURCE = 0x48 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DONTFRAG = 0x43 + IP_DROP_MEMBERSHIP = 0xd + IP_DROP_SOURCE_MEMBERSHIP = 0x47 + IP_DUMMYNET3 = 0x31 + IP_DUMMYNET_CONFIGURE = 0x3c + IP_DUMMYNET_DEL = 0x3d + IP_DUMMYNET_FLUSH = 0x3e + IP_DUMMYNET_GET = 0x40 + IP_FAITH = 0x16 + IP_FW3 = 0x30 + IP_FW_ADD = 0x32 + IP_FW_DEL = 0x33 + IP_FW_FLUSH = 0x34 + IP_FW_GET = 0x36 + IP_FW_NAT_CFG = 0x38 + IP_FW_NAT_DEL = 0x39 + IP_FW_NAT_GET_CONFIG = 0x3a + IP_FW_NAT_GET_LOG = 0x3b + IP_FW_RESETLOG = 0x37 + IP_FW_TABLE_ADD = 0x28 + IP_FW_TABLE_DEL = 0x29 + IP_FW_TABLE_FLUSH = 0x2a + IP_FW_TABLE_GETSIZE = 0x2b + IP_FW_TABLE_LIST = 0x2c + IP_FW_ZERO = 0x35 + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x15 + IP_MAXPACKET = 0xffff + IP_MAX_GROUP_SRC_FILTER = 0x200 + IP_MAX_MEMBERSHIPS = 0xfff + IP_MAX_SOCK_MUTE_FILTER = 0x80 + IP_MAX_SOCK_SRC_FILTER = 0x80 + IP_MAX_SOURCE_FILTER = 0x400 + IP_MF = 0x2000 + IP_MINTTL = 0x42 + IP_MIN_MEMBERSHIPS = 0x1f + IP_MSFILTER = 0x4a + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_MULTICAST_VIF = 0xe + IP_OFFMASK = 0x1fff + IP_ONESBCAST = 0x17 + IP_OPTIONS = 0x1 + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVRETOPTS = 0x6 + IP_RECVTOS = 0x44 + IP_RECVTTL = 0x41 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RSVP_OFF = 0x10 + IP_RSVP_ON = 0xf + IP_RSVP_VIF_OFF = 0x12 + IP_RSVP_VIF_ON = 0x11 + IP_SENDSRCADDR = 0x7 + IP_TOS = 0x3 + IP_TTL = 0x4 + IP_UNBLOCK_SOURCE = 0x49 + ISIG = 0x80 + ISTRIP = 0x20 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_AUTOSYNC = 0x7 + MADV_CORE = 0x9 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x5 + MADV_NOCORE = 0x8 + MADV_NORMAL = 0x0 + MADV_NOSYNC = 0x6 + MADV_PROTECT = 0xa + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_WILLNEED = 0x3 + MAP_ALIGNED_SUPER = 0x1000000 + MAP_ALIGNMENT_MASK = -0x1000000 + MAP_ALIGNMENT_SHIFT = 0x18 + MAP_ANON = 0x1000 + MAP_ANONYMOUS = 0x1000 + MAP_COPY = 0x2 + MAP_EXCL = 0x4000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_HASSEMAPHORE = 0x200 + MAP_NOCORE = 0x20000 + MAP_NORESERVE = 0x40 + MAP_NOSYNC = 0x800 + MAP_PREFAULT_READ = 0x40000 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_RESERVED0080 = 0x80 + MAP_RESERVED0100 = 0x100 + MAP_SHARED = 0x1 + MAP_STACK = 0x400 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_CMSG_CLOEXEC = 0x40000 + MSG_COMPAT = 0x8000 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOF = 0x100 + MSG_EOR = 0x8 + MSG_NBIO = 0x4000 + MSG_NOSIGNAL = 0x20000 + MSG_NOTIFICATION = 0x2000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x2 + MS_SYNC = 0x0 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_IFLISTL = 0x5 + NET_RT_IFMALIST = 0x4 + NET_RT_MAXID = 0x6 + NOFLSH = 0x80000000 + NOTE_ATTRIB = 0x8 + NOTE_CHILD = 0x4 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXTEND = 0x4 + NOTE_FFAND = 0x40000000 + NOTE_FFCOPY = 0xc0000000 + NOTE_FFCTRLMASK = 0xc0000000 + NOTE_FFLAGSMASK = 0xffffff + NOTE_FFNOP = 0x0 + NOTE_FFOR = 0x80000000 + NOTE_FORK = 0x40000000 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_PCTRLMASK = 0xf0000000 + NOTE_PDATAMASK = 0xfffff + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_TRIGGER = 0x1000000 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x100000 + O_CREAT = 0x200 + O_DIRECT = 0x10000 + O_DIRECTORY = 0x20000 + O_EXCL = 0x800 + O_EXEC = 0x40000 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x8000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_SHLOCK = 0x10 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_TTY_INIT = 0x80000 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + RLIMIT_AS = 0xa + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0x8 + RTAX_NETMASK = 0x2 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_NETMASK = 0x4 + RTF_BLACKHOLE = 0x1000 + RTF_BROADCAST = 0x400000 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_FMASK = 0x1004d808 + RTF_GATEWAY = 0x2 + RTF_GWFLAG_COMPAT = 0x80000000 + RTF_HOST = 0x4 + RTF_LLDATA = 0x400 + RTF_LLINFO = 0x400 + RTF_LOCAL = 0x200000 + RTF_MODIFIED = 0x20 + RTF_MULTICAST = 0x800000 + RTF_PINNED = 0x100000 + RTF_PRCLONING = 0x10000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x40000 + RTF_REJECT = 0x8 + RTF_RNH_LOCKED = 0x40000000 + RTF_STATIC = 0x800 + RTF_STICKY = 0x10000000 + RTF_UP = 0x1 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DELMADDR = 0x10 + RTM_GET = 0x4 + RTM_IEEE80211 = 0x12 + RTM_IFANNOUNCE = 0x11 + RTM_IFINFO = 0xe + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_NEWMADDR = 0xf + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x5 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RTV_WEIGHT = 0x100 + RT_ALL_FIBS = -0x1 + RT_CACHING_CONTEXT = 0x1 + RT_DEFAULT_FIB = 0x0 + RT_NORTREF = 0x2 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_BINTIME = 0x4 + SCM_CREDS = 0x3 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x2 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCADDRT = 0x8030720a + SIOCAIFADDR = 0x8040691a + SIOCAIFGROUP = 0x80246987 + SIOCALIFADDR = 0x8118691b + SIOCATMARK = 0x40047307 + SIOCDELMULTI = 0x80206932 + SIOCDELRT = 0x8030720b + SIOCDIFADDR = 0x80206919 + SIOCDIFGROUP = 0x80246989 + SIOCDIFPHYADDR = 0x80206949 + SIOCDLIFADDR = 0x8118691d + SIOCGDRVSPEC = 0xc01c697b + SIOCGETSGCNT = 0xc0147210 + SIOCGETVIFCNT = 0xc014720f + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0206921 + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCAP = 0xc020691f + SIOCGIFCONF = 0xc0086924 + SIOCGIFDESCR = 0xc020692a + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFIB = 0xc020695c + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGENERIC = 0xc020693a + SIOCGIFGMEMB = 0xc024698a + SIOCGIFGROUP = 0xc0246988 + SIOCGIFINDEX = 0xc0206920 + SIOCGIFMAC = 0xc0206926 + SIOCGIFMEDIA = 0xc0286938 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc0206933 + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPDSTADDR = 0xc0206948 + SIOCGIFPHYS = 0xc0206935 + SIOCGIFPSRCADDR = 0xc0206947 + SIOCGIFSTATUS = 0xc331693b + SIOCGLIFADDR = 0xc118691c + SIOCGLIFPHYADDR = 0xc118694b + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCGPRIVATE_0 = 0xc0206950 + SIOCGPRIVATE_1 = 0xc0206951 + SIOCIFCREATE = 0xc020697a + SIOCIFCREATE2 = 0xc020697c + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc00c6978 + SIOCSDRVSPEC = 0x801c697b + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFCAP = 0x8020691e + SIOCSIFDESCR = 0x80206929 + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFIB = 0x8020695d + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGENERIC = 0x80206939 + SIOCSIFLLADDR = 0x8020693c + SIOCSIFMAC = 0x80206927 + SIOCSIFMEDIA = 0xc0206937 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x80206934 + SIOCSIFNAME = 0x80206928 + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPHYADDR = 0x80406946 + SIOCSIFPHYS = 0x80206936 + SIOCSIFRVNET = 0xc020695b + SIOCSIFVNET = 0xc020695a + SIOCSLIFPHYADDR = 0x8118694a + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SOCK_CLOEXEC = 0x10000000 + SOCK_DGRAM = 0x2 + SOCK_MAXADDRLEN = 0xff + SOCK_NONBLOCK = 0x20000000 + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_ACCEPTFILTER = 0x1000 + SO_BINTIME = 0x2000 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LABEL = 0x1009 + SO_LINGER = 0x80 + SO_LISTENINCQLEN = 0x1013 + SO_LISTENQLEN = 0x1012 + SO_LISTENQLIMIT = 0x1011 + SO_NOSIGPIPE = 0x800 + SO_NO_DDP = 0x8000 + SO_NO_OFFLOAD = 0x4000 + SO_OOBINLINE = 0x100 + SO_PEERLABEL = 0x1010 + SO_PROTOCOL = 0x1016 + SO_PROTOTYPE = 0x1016 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_SETFIB = 0x1014 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_TIMESTAMP = 0x400 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + SO_USER_COOKIE = 0x1015 + SO_VENDOR = 0x80000000 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_CA_NAME_MAX = 0x10 + TCP_CONGESTION = 0x40 + TCP_INFO = 0x20 + TCP_KEEPCNT = 0x400 + TCP_KEEPIDLE = 0x100 + TCP_KEEPINIT = 0x80 + TCP_KEEPINTVL = 0x200 + TCP_MAXBURST = 0x4 + TCP_MAXHLEN = 0x3c + TCP_MAXOLEN = 0x28 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_SACK = 0x4 + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0x10 + TCP_MINMSS = 0xd8 + TCP_MSS = 0x218 + TCP_NODELAY = 0x1 + TCP_NOOPT = 0x8 + TCP_NOPUSH = 0x4 + TCP_VENDOR = 0x80000000 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDRAIN = 0x2000745e + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLUSH = 0x80047410 + TIOCGDRAINWAIT = 0x40047456 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGPGRP = 0x40047477 + TIOCGPTN = 0x4004740f + TIOCGSID = 0x40047463 + TIOCGWINSZ = 0x40087468 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGDTRWAIT = 0x4004745a + TIOCMGET = 0x4004746a + TIOCMSDTRWAIT = 0x8004745b + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DCD = 0x40 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCPTMASTER = 0x2000741c + TIOCSBRK = 0x2000747b + TIOCSCTTY = 0x20007461 + TIOCSDRAINWAIT = 0x80047457 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSIG = 0x2004745f + TIOCSPGRP = 0x80047476 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x20007465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCTIMESTAMP = 0x40087459 + TIOCUCNTL = 0x80047466 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VERASE2 = 0x7 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VTIME = 0x11 + VWERASE = 0x4 + WCONTINUED = 0x4 + WCOREFLAG = 0x80 + WEXITED = 0x10 + WLINUXCLONE = 0x80000000 + WNOHANG = 0x1 + WNOWAIT = 0x8 + WSTOPPED = 0x2 + WTRAPPED = 0x20 + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADF = syscall.Errno(0x9) + EBADMSG = syscall.Errno(0x59) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x55) + ECAPMODE = syscall.Errno(0x5e) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDOM = syscall.Errno(0x21) + EDOOFUS = syscall.Errno(0x58) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x52) + EILSEQ = syscall.Errno(0x56) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x60) + ELOOP = syscall.Errno(0x3e) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + EMULTIHOP = syscall.Errno(0x5a) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x57) + ENOBUFS = syscall.Errno(0x37) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOLINK = syscall.Errno(0x5b) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x53) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCAPABLE = syscall.Errno(0x5d) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTRECOVERABLE = syscall.Errno(0x5f) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x2d) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x2d) + EOVERFLOW = syscall.Errno(0x54) + EOWNERDEAD = syscall.Errno(0x60) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x5c) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGLIBRT = syscall.Signal(0x21) + SIGLWP = syscall.Signal(0x20) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTHR = syscall.Signal(0x20) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "operation timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "identifier removed", + 83: "no message of desired type", + 84: "value too large to be stored in data type", + 85: "operation canceled", + 86: "illegal byte sequence", + 87: "attribute not found", + 88: "programming error", + 89: "bad message", + 90: "multihop attempted", + 91: "link has been severed", + 92: "protocol error", + 93: "capabilities insufficient", + 94: "not permitted in capability mode", + 95: "state not recoverable", + 96: "previous owner died", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "suspended (signal)", + 18: "suspended", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", + 32: "unknown signal", + 33: "unknown signal", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go new file mode 100644 index 0000000..6fbef75 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -0,0 +1,1761 @@ +// mkerrors.sh -m32 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build 386,linux + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m32 _const.go + +package unix + +import "syscall" + +const ( + AF_ALG = 0x26 + AF_APPLETALK = 0x5 + AF_ASH = 0x12 + AF_ATMPVC = 0x8 + AF_ATMSVC = 0x14 + AF_AX25 = 0x3 + AF_BLUETOOTH = 0x1f + AF_BRIDGE = 0x7 + AF_CAIF = 0x25 + AF_CAN = 0x1d + AF_DECnet = 0xc + AF_ECONET = 0x13 + AF_FILE = 0x1 + AF_IEEE802154 = 0x24 + AF_INET = 0x2 + AF_INET6 = 0xa + AF_IPX = 0x4 + AF_IRDA = 0x17 + AF_ISDN = 0x22 + AF_IUCV = 0x20 + AF_KEY = 0xf + AF_LLC = 0x1a + AF_LOCAL = 0x1 + AF_MAX = 0x28 + AF_NETBEUI = 0xd + AF_NETLINK = 0x10 + AF_NETROM = 0x6 + AF_NFC = 0x27 + AF_PACKET = 0x11 + AF_PHONET = 0x23 + AF_PPPOX = 0x18 + AF_RDS = 0x15 + AF_ROSE = 0xb + AF_ROUTE = 0x10 + AF_RXRPC = 0x21 + AF_SECURITY = 0xe + AF_SNA = 0x16 + AF_TIPC = 0x1e + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_WANPIPE = 0x19 + AF_X25 = 0x9 + ARPHRD_ADAPT = 0x108 + ARPHRD_APPLETLK = 0x8 + ARPHRD_ARCNET = 0x7 + ARPHRD_ASH = 0x30d + ARPHRD_ATM = 0x13 + ARPHRD_AX25 = 0x3 + ARPHRD_BIF = 0x307 + ARPHRD_CAIF = 0x336 + ARPHRD_CAN = 0x118 + ARPHRD_CHAOS = 0x5 + ARPHRD_CISCO = 0x201 + ARPHRD_CSLIP = 0x101 + ARPHRD_CSLIP6 = 0x103 + ARPHRD_DDCMP = 0x205 + ARPHRD_DLCI = 0xf + ARPHRD_ECONET = 0x30e + ARPHRD_EETHER = 0x2 + ARPHRD_ETHER = 0x1 + ARPHRD_EUI64 = 0x1b + ARPHRD_FCAL = 0x311 + ARPHRD_FCFABRIC = 0x313 + ARPHRD_FCPL = 0x312 + ARPHRD_FCPP = 0x310 + ARPHRD_FDDI = 0x306 + ARPHRD_FRAD = 0x302 + ARPHRD_HDLC = 0x201 + ARPHRD_HIPPI = 0x30c + ARPHRD_HWX25 = 0x110 + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + ARPHRD_IEEE80211 = 0x321 + ARPHRD_IEEE80211_PRISM = 0x322 + ARPHRD_IEEE80211_RADIOTAP = 0x323 + ARPHRD_IEEE802154 = 0x324 + ARPHRD_IEEE802_TR = 0x320 + ARPHRD_INFINIBAND = 0x20 + ARPHRD_IPDDP = 0x309 + ARPHRD_IPGRE = 0x30a + ARPHRD_IRDA = 0x30f + ARPHRD_LAPB = 0x204 + ARPHRD_LOCALTLK = 0x305 + ARPHRD_LOOPBACK = 0x304 + ARPHRD_METRICOM = 0x17 + ARPHRD_NETROM = 0x0 + ARPHRD_NONE = 0xfffe + ARPHRD_PHONET = 0x334 + ARPHRD_PHONET_PIPE = 0x335 + ARPHRD_PIMREG = 0x30b + ARPHRD_PPP = 0x200 + ARPHRD_PRONET = 0x4 + ARPHRD_RAWHDLC = 0x206 + ARPHRD_ROSE = 0x10e + ARPHRD_RSRVD = 0x104 + ARPHRD_SIT = 0x308 + ARPHRD_SKIP = 0x303 + ARPHRD_SLIP = 0x100 + ARPHRD_SLIP6 = 0x102 + ARPHRD_TUNNEL = 0x300 + ARPHRD_TUNNEL6 = 0x301 + ARPHRD_VOID = 0xffff + ARPHRD_X25 = 0x10f + B0 = 0x0 + B1000000 = 0x1008 + B110 = 0x3 + B115200 = 0x1002 + B1152000 = 0x1009 + B1200 = 0x9 + B134 = 0x4 + B150 = 0x5 + B1500000 = 0x100a + B1800 = 0xa + B19200 = 0xe + B200 = 0x6 + B2000000 = 0x100b + B230400 = 0x1003 + B2400 = 0xb + B2500000 = 0x100c + B300 = 0x7 + B3000000 = 0x100d + B3500000 = 0x100e + B38400 = 0xf + B4000000 = 0x100f + B460800 = 0x1004 + B4800 = 0xc + B50 = 0x1 + B500000 = 0x1005 + B57600 = 0x1001 + B576000 = 0x1006 + B600 = 0x8 + B75 = 0x2 + B921600 = 0x1007 + B9600 = 0xd + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXINSNS = 0x1000 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x800 + CLOCK_BOOTTIME = 0x7 + CLOCK_BOOTTIME_ALARM = 0x9 + CLOCK_DEFAULT = 0x0 + CLOCK_EXT = 0x1 + CLOCK_INT = 0x2 + CLOCK_MONOTONIC = 0x1 + CLOCK_MONOTONIC_COARSE = 0x6 + CLOCK_MONOTONIC_RAW = 0x4 + CLOCK_PROCESS_CPUTIME_ID = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_REALTIME_ALARM = 0x8 + CLOCK_REALTIME_COARSE = 0x5 + CLOCK_THREAD_CPUTIME_ID = 0x3 + CLOCK_TXFROMRX = 0x4 + CLOCK_TXINT = 0x3 + CLONE_CHILD_CLEARTID = 0x200000 + CLONE_CHILD_SETTID = 0x1000000 + CLONE_DETACHED = 0x400000 + CLONE_FILES = 0x400 + CLONE_FS = 0x200 + CLONE_IO = 0x80000000 + CLONE_NEWIPC = 0x8000000 + CLONE_NEWNET = 0x40000000 + CLONE_NEWNS = 0x20000 + CLONE_NEWPID = 0x20000000 + CLONE_NEWUSER = 0x10000000 + CLONE_NEWUTS = 0x4000000 + CLONE_PARENT = 0x8000 + CLONE_PARENT_SETTID = 0x100000 + CLONE_PTRACE = 0x2000 + CLONE_SETTLS = 0x80000 + CLONE_SIGHAND = 0x800 + CLONE_SYSVSEM = 0x40000 + CLONE_THREAD = 0x10000 + CLONE_UNTRACED = 0x800000 + CLONE_VFORK = 0x4000 + CLONE_VM = 0x100 + CREAD = 0x80 + CS5 = 0x0 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIGNAL = 0xff + CSIZE = 0x30 + CSTART = 0x11 + CSTATUS = 0x0 + CSTOP = 0x13 + CSTOPB = 0x40 + CSUSP = 0x1a + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 + ENCODING_DEFAULT = 0x0 + ENCODING_FM_MARK = 0x3 + ENCODING_FM_SPACE = 0x4 + ENCODING_MANCHESTER = 0x5 + ENCODING_NRZ = 0x1 + ENCODING_NRZI = 0x2 + EPOLLERR = 0x8 + EPOLLET = 0x80000000 + EPOLLHUP = 0x10 + EPOLLIN = 0x1 + EPOLLMSG = 0x400 + EPOLLONESHOT = 0x40000000 + EPOLLOUT = 0x4 + EPOLLPRI = 0x2 + EPOLLRDBAND = 0x80 + EPOLLRDHUP = 0x2000 + EPOLLRDNORM = 0x40 + EPOLLWRBAND = 0x200 + EPOLLWRNORM = 0x100 + EPOLL_CLOEXEC = 0x80000 + EPOLL_CTL_ADD = 0x1 + EPOLL_CTL_DEL = 0x2 + EPOLL_CTL_MOD = 0x3 + EPOLL_NONBLOCK = 0x800 + ETH_P_1588 = 0x88f7 + ETH_P_8021AD = 0x88a8 + ETH_P_8021AH = 0x88e7 + ETH_P_8021Q = 0x8100 + ETH_P_802_2 = 0x4 + ETH_P_802_3 = 0x1 + ETH_P_AARP = 0x80f3 + ETH_P_AF_IUCV = 0xfbfb + ETH_P_ALL = 0x3 + ETH_P_AOE = 0x88a2 + ETH_P_ARCNET = 0x1a + ETH_P_ARP = 0x806 + ETH_P_ATALK = 0x809b + ETH_P_ATMFATE = 0x8884 + ETH_P_ATMMPOA = 0x884c + ETH_P_AX25 = 0x2 + ETH_P_BPQ = 0x8ff + ETH_P_CAIF = 0xf7 + ETH_P_CAN = 0xc + ETH_P_CONTROL = 0x16 + ETH_P_CUST = 0x6006 + ETH_P_DDCMP = 0x6 + ETH_P_DEC = 0x6000 + ETH_P_DIAG = 0x6005 + ETH_P_DNA_DL = 0x6001 + ETH_P_DNA_RC = 0x6002 + ETH_P_DNA_RT = 0x6003 + ETH_P_DSA = 0x1b + ETH_P_ECONET = 0x18 + ETH_P_EDSA = 0xdada + ETH_P_FCOE = 0x8906 + ETH_P_FIP = 0x8914 + ETH_P_HDLC = 0x19 + ETH_P_IEEE802154 = 0xf6 + ETH_P_IEEEPUP = 0xa00 + ETH_P_IEEEPUPAT = 0xa01 + ETH_P_IP = 0x800 + ETH_P_IPV6 = 0x86dd + ETH_P_IPX = 0x8137 + ETH_P_IRDA = 0x17 + ETH_P_LAT = 0x6004 + ETH_P_LINK_CTL = 0x886c + ETH_P_LOCALTALK = 0x9 + ETH_P_LOOP = 0x60 + ETH_P_MOBITEX = 0x15 + ETH_P_MPLS_MC = 0x8848 + ETH_P_MPLS_UC = 0x8847 + ETH_P_PAE = 0x888e + ETH_P_PAUSE = 0x8808 + ETH_P_PHONET = 0xf5 + ETH_P_PPPTALK = 0x10 + ETH_P_PPP_DISC = 0x8863 + ETH_P_PPP_MP = 0x8 + ETH_P_PPP_SES = 0x8864 + ETH_P_PUP = 0x200 + ETH_P_PUPAT = 0x201 + ETH_P_QINQ1 = 0x9100 + ETH_P_QINQ2 = 0x9200 + ETH_P_QINQ3 = 0x9300 + ETH_P_RARP = 0x8035 + ETH_P_SCA = 0x6007 + ETH_P_SLOW = 0x8809 + ETH_P_SNAP = 0x5 + ETH_P_TDLS = 0x890d + ETH_P_TEB = 0x6558 + ETH_P_TIPC = 0x88ca + ETH_P_TRAILER = 0x1c + ETH_P_TR_802_2 = 0x11 + ETH_P_WAN_PPP = 0x7 + ETH_P_WCCP = 0x883e + ETH_P_X25 = 0x805 + EXTA = 0xe + EXTB = 0xf + EXTPROC = 0x10000 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x1000 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x406 + F_EXLCK = 0x4 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLEASE = 0x401 + F_GETLK = 0xc + F_GETLK64 = 0xc + F_GETOWN = 0x9 + F_GETOWN_EX = 0x10 + F_GETPIPE_SZ = 0x408 + F_GETSIG = 0xb + F_LOCK = 0x1 + F_NOTIFY = 0x402 + F_OK = 0x0 + F_RDLCK = 0x0 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLEASE = 0x400 + F_SETLK = 0xd + F_SETLK64 = 0xd + F_SETLKW = 0xe + F_SETLKW64 = 0xe + F_SETOWN = 0x8 + F_SETOWN_EX = 0xf + F_SETPIPE_SZ = 0x407 + F_SETSIG = 0xa + F_SHLCK = 0x8 + F_TEST = 0x3 + F_TLOCK = 0x2 + F_ULOCK = 0x0 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x400 + ICANON = 0x2 + ICMPV6_FILTER = 0x1 + ICRNL = 0x100 + IEXTEN = 0x8000 + IFA_F_DADFAILED = 0x8 + IFA_F_DEPRECATED = 0x20 + IFA_F_HOMEADDRESS = 0x10 + IFA_F_NODAD = 0x2 + IFA_F_OPTIMISTIC = 0x4 + IFA_F_PERMANENT = 0x80 + IFA_F_SECONDARY = 0x1 + IFA_F_TEMPORARY = 0x1 + IFA_F_TENTATIVE = 0x40 + IFA_MAX = 0x7 + IFF_802_1Q_VLAN = 0x1 + IFF_ALLMULTI = 0x200 + IFF_AUTOMEDIA = 0x4000 + IFF_BONDING = 0x20 + IFF_BRIDGE_PORT = 0x4000 + IFF_BROADCAST = 0x2 + IFF_DEBUG = 0x4 + IFF_DISABLE_NETPOLL = 0x1000 + IFF_DONT_BRIDGE = 0x800 + IFF_DORMANT = 0x20000 + IFF_DYNAMIC = 0x8000 + IFF_EBRIDGE = 0x2 + IFF_ECHO = 0x40000 + IFF_ISATAP = 0x80 + IFF_LOOPBACK = 0x8 + IFF_LOWER_UP = 0x10000 + IFF_MACVLAN_PORT = 0x2000 + IFF_MASTER = 0x400 + IFF_MASTER_8023AD = 0x8 + IFF_MASTER_ALB = 0x10 + IFF_MASTER_ARPMON = 0x100 + IFF_MULTICAST = 0x1000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_NO_PI = 0x1000 + IFF_ONE_QUEUE = 0x2000 + IFF_OVS_DATAPATH = 0x8000 + IFF_POINTOPOINT = 0x10 + IFF_PORTSEL = 0x2000 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SLAVE = 0x800 + IFF_SLAVE_INACTIVE = 0x4 + IFF_SLAVE_NEEDARP = 0x40 + IFF_TAP = 0x2 + IFF_TUN = 0x1 + IFF_TUN_EXCL = 0x8000 + IFF_TX_SKB_SHARING = 0x10000 + IFF_UNICAST_FLT = 0x20000 + IFF_UP = 0x1 + IFF_VNET_HDR = 0x4000 + IFF_VOLATILE = 0x70c5a + IFF_WAN_HDLC = 0x200 + IFF_XMIT_DST_RELEASE = 0x400 + IFNAMSIZ = 0x10 + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_ACCESS = 0x1 + IN_ALL_EVENTS = 0xfff + IN_ATTRIB = 0x4 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLOEXEC = 0x80000 + IN_CLOSE = 0x18 + IN_CLOSE_NOWRITE = 0x10 + IN_CLOSE_WRITE = 0x8 + IN_CREATE = 0x100 + IN_DELETE = 0x200 + IN_DELETE_SELF = 0x400 + IN_DONT_FOLLOW = 0x2000000 + IN_EXCL_UNLINK = 0x4000000 + IN_IGNORED = 0x8000 + IN_ISDIR = 0x40000000 + IN_LOOPBACKNET = 0x7f + IN_MASK_ADD = 0x20000000 + IN_MODIFY = 0x2 + IN_MOVE = 0xc0 + IN_MOVED_FROM = 0x40 + IN_MOVED_TO = 0x80 + IN_MOVE_SELF = 0x800 + IN_NONBLOCK = 0x800 + IN_ONESHOT = 0x80000000 + IN_ONLYDIR = 0x1000000 + IN_OPEN = 0x20 + IN_Q_OVERFLOW = 0x4000 + IN_UNMOUNT = 0x2000 + IPPROTO_AH = 0x33 + IPPROTO_COMP = 0x6c + IPPROTO_DCCP = 0x21 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_ESP = 0x32 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPIP = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_MTP = 0x5c + IPPROTO_NONE = 0x3b + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPV6_2292DSTOPTS = 0x4 + IPV6_2292HOPLIMIT = 0x8 + IPV6_2292HOPOPTS = 0x3 + IPV6_2292PKTINFO = 0x2 + IPV6_2292PKTOPTIONS = 0x6 + IPV6_2292RTHDR = 0x5 + IPV6_ADDRFORM = 0x1 + IPV6_ADD_MEMBERSHIP = 0x14 + IPV6_AUTHHDR = 0xa + IPV6_CHECKSUM = 0x7 + IPV6_DROP_MEMBERSHIP = 0x15 + IPV6_DSTOPTS = 0x3b + IPV6_HOPLIMIT = 0x34 + IPV6_HOPOPTS = 0x36 + IPV6_IPSEC_POLICY = 0x22 + IPV6_JOIN_ANYCAST = 0x1b + IPV6_JOIN_GROUP = 0x14 + IPV6_LEAVE_ANYCAST = 0x1c + IPV6_LEAVE_GROUP = 0x15 + IPV6_MTU = 0x18 + IPV6_MTU_DISCOVER = 0x17 + IPV6_MULTICAST_HOPS = 0x12 + IPV6_MULTICAST_IF = 0x11 + IPV6_MULTICAST_LOOP = 0x13 + IPV6_NEXTHOP = 0x9 + IPV6_PKTINFO = 0x32 + IPV6_PMTUDISC_DO = 0x2 + IPV6_PMTUDISC_DONT = 0x0 + IPV6_PMTUDISC_PROBE = 0x3 + IPV6_PMTUDISC_WANT = 0x1 + IPV6_RECVDSTOPTS = 0x3a + IPV6_RECVERR = 0x19 + IPV6_RECVHOPLIMIT = 0x33 + IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVPKTINFO = 0x31 + IPV6_RECVRTHDR = 0x38 + IPV6_RECVTCLASS = 0x42 + IPV6_ROUTER_ALERT = 0x16 + IPV6_RTHDR = 0x39 + IPV6_RTHDRDSTOPTS = 0x37 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_RXDSTOPTS = 0x3b + IPV6_RXHOPOPTS = 0x36 + IPV6_TCLASS = 0x43 + IPV6_UNICAST_HOPS = 0x10 + IPV6_V6ONLY = 0x1a + IPV6_XFRM_POLICY = 0x23 + IP_ADD_MEMBERSHIP = 0x23 + IP_ADD_SOURCE_MEMBERSHIP = 0x27 + IP_BLOCK_SOURCE = 0x26 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0x24 + IP_DROP_SOURCE_MEMBERSHIP = 0x28 + IP_FREEBIND = 0xf + IP_HDRINCL = 0x3 + IP_IPSEC_POLICY = 0x10 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINTTL = 0x15 + IP_MSFILTER = 0x29 + IP_MSS = 0x240 + IP_MTU = 0xe + IP_MTU_DISCOVER = 0xa + IP_MULTICAST_ALL = 0x31 + IP_MULTICAST_IF = 0x20 + IP_MULTICAST_LOOP = 0x22 + IP_MULTICAST_TTL = 0x21 + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x4 + IP_ORIGDSTADDR = 0x14 + IP_PASSSEC = 0x12 + IP_PKTINFO = 0x8 + IP_PKTOPTIONS = 0x9 + IP_PMTUDISC = 0xa + IP_PMTUDISC_DO = 0x2 + IP_PMTUDISC_DONT = 0x0 + IP_PMTUDISC_PROBE = 0x3 + IP_PMTUDISC_WANT = 0x1 + IP_RECVERR = 0xb + IP_RECVOPTS = 0x6 + IP_RECVORIGDSTADDR = 0x14 + IP_RECVRETOPTS = 0x7 + IP_RECVTOS = 0xd + IP_RECVTTL = 0xc + IP_RETOPTS = 0x7 + IP_RF = 0x8000 + IP_ROUTER_ALERT = 0x5 + IP_TOS = 0x1 + IP_TRANSPARENT = 0x13 + IP_TTL = 0x2 + IP_UNBLOCK_SOURCE = 0x25 + IP_XFRM_POLICY = 0x11 + ISIG = 0x1 + ISTRIP = 0x20 + IUTF8 = 0x4000 + IXANY = 0x800 + IXOFF = 0x1000 + IXON = 0x400 + LINUX_REBOOT_CMD_CAD_OFF = 0x0 + LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef + LINUX_REBOOT_CMD_HALT = 0xcdef0123 + LINUX_REBOOT_CMD_KEXEC = 0x45584543 + LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc + LINUX_REBOOT_CMD_RESTART = 0x1234567 + LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 + LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 + LINUX_REBOOT_MAGIC1 = 0xfee1dead + LINUX_REBOOT_MAGIC2 = 0x28121969 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DOFORK = 0xb + MADV_DONTFORK = 0xa + MADV_DONTNEED = 0x4 + MADV_HUGEPAGE = 0xe + MADV_HWPOISON = 0x64 + MADV_MERGEABLE = 0xc + MADV_NOHUGEPAGE = 0xf + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_REMOVE = 0x9 + MADV_SEQUENTIAL = 0x2 + MADV_UNMERGEABLE = 0xd + MADV_WILLNEED = 0x3 + MAP_32BIT = 0x40 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 + MAP_EXECUTABLE = 0x1000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_GROWSDOWN = 0x100 + MAP_HUGETLB = 0x40000 + MAP_LOCKED = 0x2000 + MAP_NONBLOCK = 0x10000 + MAP_NORESERVE = 0x4000 + MAP_POPULATE = 0x8000 + MAP_PRIVATE = 0x2 + MAP_SHARED = 0x1 + MAP_STACK = 0x20000 + MAP_TYPE = 0xf + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MNT_DETACH = 0x2 + MNT_EXPIRE = 0x4 + MNT_FORCE = 0x1 + MSG_CMSG_CLOEXEC = 0x40000000 + MSG_CONFIRM = 0x800 + MSG_CTRUNC = 0x8 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x40 + MSG_EOR = 0x80 + MSG_ERRQUEUE = 0x2000 + MSG_FASTOPEN = 0x20000000 + MSG_FIN = 0x200 + MSG_MORE = 0x8000 + MSG_NOSIGNAL = 0x4000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_PROXY = 0x10 + MSG_RST = 0x1000 + MSG_SYN = 0x400 + MSG_TRUNC = 0x20 + MSG_TRYHARD = 0x4 + MSG_WAITALL = 0x100 + MSG_WAITFORONE = 0x10000 + MS_ACTIVE = 0x40000000 + MS_ASYNC = 0x1 + MS_BIND = 0x1000 + MS_DIRSYNC = 0x80 + MS_INVALIDATE = 0x2 + MS_I_VERSION = 0x800000 + MS_KERNMOUNT = 0x400000 + MS_MANDLOCK = 0x40 + MS_MGC_MSK = 0xffff0000 + MS_MGC_VAL = 0xc0ed0000 + MS_MOVE = 0x2000 + MS_NOATIME = 0x400 + MS_NODEV = 0x4 + MS_NODIRATIME = 0x800 + MS_NOEXEC = 0x8 + MS_NOSUID = 0x2 + MS_NOUSER = -0x80000000 + MS_POSIXACL = 0x10000 + MS_PRIVATE = 0x40000 + MS_RDONLY = 0x1 + MS_REC = 0x4000 + MS_RELATIME = 0x200000 + MS_REMOUNT = 0x20 + MS_RMT_MASK = 0x800051 + MS_SHARED = 0x100000 + MS_SILENT = 0x8000 + MS_SLAVE = 0x80000 + MS_STRICTATIME = 0x1000000 + MS_SYNC = 0x4 + MS_SYNCHRONOUS = 0x10 + MS_UNBINDABLE = 0x20000 + NAME_MAX = 0xff + NETLINK_ADD_MEMBERSHIP = 0x1 + NETLINK_AUDIT = 0x9 + NETLINK_BROADCAST_ERROR = 0x4 + NETLINK_CONNECTOR = 0xb + NETLINK_CRYPTO = 0x15 + NETLINK_DNRTMSG = 0xe + NETLINK_DROP_MEMBERSHIP = 0x2 + NETLINK_ECRYPTFS = 0x13 + NETLINK_FIB_LOOKUP = 0xa + NETLINK_FIREWALL = 0x3 + NETLINK_GENERIC = 0x10 + NETLINK_INET_DIAG = 0x4 + NETLINK_IP6_FW = 0xd + NETLINK_ISCSI = 0x8 + NETLINK_KOBJECT_UEVENT = 0xf + NETLINK_NETFILTER = 0xc + NETLINK_NFLOG = 0x5 + NETLINK_NO_ENOBUFS = 0x5 + NETLINK_PKTINFO = 0x3 + NETLINK_RDMA = 0x14 + NETLINK_ROUTE = 0x0 + NETLINK_SCSITRANSPORT = 0x12 + NETLINK_SELINUX = 0x7 + NETLINK_UNUSED = 0x1 + NETLINK_USERSOCK = 0x2 + NETLINK_XFRM = 0x6 + NLA_ALIGNTO = 0x4 + NLA_F_NESTED = 0x8000 + NLA_F_NET_BYTEORDER = 0x4000 + NLA_HDRLEN = 0x4 + NLMSG_ALIGNTO = 0x4 + NLMSG_DONE = 0x3 + NLMSG_ERROR = 0x2 + NLMSG_HDRLEN = 0x10 + NLMSG_MIN_TYPE = 0x10 + NLMSG_NOOP = 0x1 + NLMSG_OVERRUN = 0x4 + NLM_F_ACK = 0x4 + NLM_F_APPEND = 0x800 + NLM_F_ATOMIC = 0x400 + NLM_F_CREATE = 0x400 + NLM_F_DUMP = 0x300 + NLM_F_DUMP_INTR = 0x10 + NLM_F_ECHO = 0x8 + NLM_F_EXCL = 0x200 + NLM_F_MATCH = 0x200 + NLM_F_MULTI = 0x2 + NLM_F_REPLACE = 0x100 + NLM_F_REQUEST = 0x1 + NLM_F_ROOT = 0x100 + NOFLSH = 0x80 + OCRNL = 0x8 + OFDEL = 0x80 + OFILL = 0x40 + ONLCR = 0x4 + ONLRET = 0x20 + ONOCR = 0x10 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x400 + O_ASYNC = 0x2000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x40 + O_DIRECT = 0x4000 + O_DIRECTORY = 0x10000 + O_DSYNC = 0x1000 + O_EXCL = 0x80 + O_FSYNC = 0x101000 + O_LARGEFILE = 0x8000 + O_NDELAY = 0x800 + O_NOATIME = 0x40000 + O_NOCTTY = 0x100 + O_NOFOLLOW = 0x20000 + O_NONBLOCK = 0x800 + O_PATH = 0x200000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x101000 + O_SYNC = 0x101000 + O_TRUNC = 0x200 + O_WRONLY = 0x1 + PACKET_ADD_MEMBERSHIP = 0x1 + PACKET_AUXDATA = 0x8 + PACKET_BROADCAST = 0x1 + PACKET_COPY_THRESH = 0x7 + PACKET_DROP_MEMBERSHIP = 0x2 + PACKET_FANOUT = 0x12 + PACKET_FANOUT_CPU = 0x2 + PACKET_FANOUT_FLAG_DEFRAG = 0x8000 + PACKET_FANOUT_HASH = 0x0 + PACKET_FANOUT_LB = 0x1 + PACKET_FASTROUTE = 0x6 + PACKET_HDRLEN = 0xb + PACKET_HOST = 0x0 + PACKET_LOOPBACK = 0x5 + PACKET_LOSS = 0xe + PACKET_MR_ALLMULTI = 0x2 + PACKET_MR_MULTICAST = 0x0 + PACKET_MR_PROMISC = 0x1 + PACKET_MR_UNICAST = 0x3 + PACKET_MULTICAST = 0x2 + PACKET_ORIGDEV = 0x9 + PACKET_OTHERHOST = 0x3 + PACKET_OUTGOING = 0x4 + PACKET_RECV_OUTPUT = 0x3 + PACKET_RESERVE = 0xc + PACKET_RX_RING = 0x5 + PACKET_STATISTICS = 0x6 + PACKET_TIMESTAMP = 0x11 + PACKET_TX_RING = 0xd + PACKET_TX_TIMESTAMP = 0x10 + PACKET_VERSION = 0xa + PACKET_VNET_HDR = 0xf + PARENB = 0x100 + PARITY_CRC16_PR0 = 0x2 + PARITY_CRC16_PR0_CCITT = 0x4 + PARITY_CRC16_PR1 = 0x3 + PARITY_CRC16_PR1_CCITT = 0x5 + PARITY_CRC32_PR0_CCITT = 0x6 + PARITY_CRC32_PR1_CCITT = 0x7 + PARITY_DEFAULT = 0x0 + PARITY_NONE = 0x1 + PARMRK = 0x8 + PARODD = 0x200 + PENDIN = 0x4000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_GROWSDOWN = 0x1000000 + PROT_GROWSUP = 0x2000000 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PR_CAPBSET_DROP = 0x18 + PR_CAPBSET_READ = 0x17 + PR_ENDIAN_BIG = 0x0 + PR_ENDIAN_LITTLE = 0x1 + PR_ENDIAN_PPC_LITTLE = 0x2 + PR_FPEMU_NOPRINT = 0x1 + PR_FPEMU_SIGFPE = 0x2 + PR_FP_EXC_ASYNC = 0x2 + PR_FP_EXC_DISABLED = 0x0 + PR_FP_EXC_DIV = 0x10000 + PR_FP_EXC_INV = 0x100000 + PR_FP_EXC_NONRECOV = 0x1 + PR_FP_EXC_OVF = 0x20000 + PR_FP_EXC_PRECISE = 0x3 + PR_FP_EXC_RES = 0x80000 + PR_FP_EXC_SW_ENABLE = 0x80 + PR_FP_EXC_UND = 0x40000 + PR_GET_DUMPABLE = 0x3 + PR_GET_ENDIAN = 0x13 + PR_GET_FPEMU = 0x9 + PR_GET_FPEXC = 0xb + PR_GET_KEEPCAPS = 0x7 + PR_GET_NAME = 0x10 + PR_GET_NO_NEW_PRIVS = 0x27 + PR_GET_PDEATHSIG = 0x2 + PR_GET_SECCOMP = 0x15 + PR_GET_SECUREBITS = 0x1b + PR_GET_TIMERSLACK = 0x1e + PR_GET_TIMING = 0xd + PR_GET_TSC = 0x19 + PR_GET_UNALIGN = 0x5 + PR_MCE_KILL = 0x21 + PR_MCE_KILL_CLEAR = 0x0 + PR_MCE_KILL_DEFAULT = 0x2 + PR_MCE_KILL_EARLY = 0x1 + PR_MCE_KILL_GET = 0x22 + PR_MCE_KILL_LATE = 0x0 + PR_MCE_KILL_SET = 0x1 + PR_SET_DUMPABLE = 0x4 + PR_SET_ENDIAN = 0x14 + PR_SET_FPEMU = 0xa + PR_SET_FPEXC = 0xc + PR_SET_KEEPCAPS = 0x8 + PR_SET_MM = 0x23 + PR_SET_MM_BRK = 0x7 + PR_SET_MM_END_CODE = 0x2 + PR_SET_MM_END_DATA = 0x4 + PR_SET_MM_START_BRK = 0x6 + PR_SET_MM_START_CODE = 0x1 + PR_SET_MM_START_DATA = 0x3 + PR_SET_MM_START_STACK = 0x5 + PR_SET_NAME = 0xf + PR_SET_NO_NEW_PRIVS = 0x26 + PR_SET_PDEATHSIG = 0x1 + PR_SET_PTRACER = 0x59616d61 + PR_SET_PTRACER_ANY = 0xffffffff + PR_SET_SECCOMP = 0x16 + PR_SET_SECUREBITS = 0x1c + PR_SET_TIMERSLACK = 0x1d + PR_SET_TIMING = 0xe + PR_SET_TSC = 0x1a + PR_SET_UNALIGN = 0x6 + PR_TASK_PERF_EVENTS_DISABLE = 0x1f + PR_TASK_PERF_EVENTS_ENABLE = 0x20 + PR_TIMING_STATISTICAL = 0x0 + PR_TIMING_TIMESTAMP = 0x1 + PR_TSC_ENABLE = 0x1 + PR_TSC_SIGSEGV = 0x2 + PR_UNALIGN_NOPRINT = 0x1 + PR_UNALIGN_SIGBUS = 0x2 + PTRACE_ATTACH = 0x10 + PTRACE_CONT = 0x7 + PTRACE_DETACH = 0x11 + PTRACE_EVENT_CLONE = 0x3 + PTRACE_EVENT_EXEC = 0x4 + PTRACE_EVENT_EXIT = 0x6 + PTRACE_EVENT_FORK = 0x1 + PTRACE_EVENT_SECCOMP = 0x7 + PTRACE_EVENT_STOP = 0x80 + PTRACE_EVENT_VFORK = 0x2 + PTRACE_EVENT_VFORK_DONE = 0x5 + PTRACE_GETEVENTMSG = 0x4201 + PTRACE_GETFPREGS = 0xe + PTRACE_GETFPXREGS = 0x12 + PTRACE_GETREGS = 0xc + PTRACE_GETREGSET = 0x4204 + PTRACE_GETSIGINFO = 0x4202 + PTRACE_GET_THREAD_AREA = 0x19 + PTRACE_INTERRUPT = 0x4207 + PTRACE_KILL = 0x8 + PTRACE_LISTEN = 0x4208 + PTRACE_OLDSETOPTIONS = 0x15 + PTRACE_O_MASK = 0xff + PTRACE_O_TRACECLONE = 0x8 + PTRACE_O_TRACEEXEC = 0x10 + PTRACE_O_TRACEEXIT = 0x40 + PTRACE_O_TRACEFORK = 0x2 + PTRACE_O_TRACESECCOMP = 0x80 + PTRACE_O_TRACESYSGOOD = 0x1 + PTRACE_O_TRACEVFORK = 0x4 + PTRACE_O_TRACEVFORKDONE = 0x20 + PTRACE_PEEKDATA = 0x2 + PTRACE_PEEKTEXT = 0x1 + PTRACE_PEEKUSR = 0x3 + PTRACE_POKEDATA = 0x5 + PTRACE_POKETEXT = 0x4 + PTRACE_POKEUSR = 0x6 + PTRACE_SEIZE = 0x4206 + PTRACE_SEIZE_DEVEL = 0x80000000 + PTRACE_SETFPREGS = 0xf + PTRACE_SETFPXREGS = 0x13 + PTRACE_SETOPTIONS = 0x4200 + PTRACE_SETREGS = 0xd + PTRACE_SETREGSET = 0x4205 + PTRACE_SETSIGINFO = 0x4203 + PTRACE_SET_THREAD_AREA = 0x1a + PTRACE_SINGLEBLOCK = 0x21 + PTRACE_SINGLESTEP = 0x9 + PTRACE_SYSCALL = 0x18 + PTRACE_SYSEMU = 0x1f + PTRACE_SYSEMU_SINGLESTEP = 0x20 + PTRACE_TRACEME = 0x0 + RLIMIT_AS = 0x9 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x7 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = -0x1 + RTAX_ADVMSS = 0x8 + RTAX_CWND = 0x7 + RTAX_FEATURES = 0xc + RTAX_FEATURE_ALLFRAG = 0x8 + RTAX_FEATURE_ECN = 0x1 + RTAX_FEATURE_SACK = 0x2 + RTAX_FEATURE_TIMESTAMP = 0x4 + RTAX_HOPLIMIT = 0xa + RTAX_INITCWND = 0xb + RTAX_INITRWND = 0xe + RTAX_LOCK = 0x1 + RTAX_MAX = 0xe + RTAX_MTU = 0x2 + RTAX_REORDERING = 0x9 + RTAX_RTO_MIN = 0xd + RTAX_RTT = 0x4 + RTAX_RTTVAR = 0x5 + RTAX_SSTHRESH = 0x6 + RTAX_UNSPEC = 0x0 + RTAX_WINDOW = 0x3 + RTA_ALIGNTO = 0x4 + RTA_MAX = 0x10 + RTCF_DIRECTSRC = 0x4000000 + RTCF_DOREDIRECT = 0x1000000 + RTCF_LOG = 0x2000000 + RTCF_MASQ = 0x400000 + RTCF_NAT = 0x800000 + RTCF_VALVE = 0x200000 + RTF_ADDRCLASSMASK = 0xf8000000 + RTF_ADDRCONF = 0x40000 + RTF_ALLONLINK = 0x20000 + RTF_BROADCAST = 0x10000000 + RTF_CACHE = 0x1000000 + RTF_DEFAULT = 0x10000 + RTF_DYNAMIC = 0x10 + RTF_FLOW = 0x2000000 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_INTERFACE = 0x40000000 + RTF_IRTT = 0x100 + RTF_LINKRT = 0x100000 + RTF_LOCAL = 0x80000000 + RTF_MODIFIED = 0x20 + RTF_MSS = 0x40 + RTF_MTU = 0x40 + RTF_MULTICAST = 0x20000000 + RTF_NAT = 0x8000000 + RTF_NOFORWARD = 0x1000 + RTF_NONEXTHOP = 0x200000 + RTF_NOPMTUDISC = 0x4000 + RTF_POLICY = 0x4000000 + RTF_REINSTATE = 0x8 + RTF_REJECT = 0x200 + RTF_STATIC = 0x400 + RTF_THROW = 0x2000 + RTF_UP = 0x1 + RTF_WINDOW = 0x80 + RTF_XRESOLVE = 0x800 + RTM_BASE = 0x10 + RTM_DELACTION = 0x31 + RTM_DELADDR = 0x15 + RTM_DELADDRLABEL = 0x49 + RTM_DELLINK = 0x11 + RTM_DELNEIGH = 0x1d + RTM_DELQDISC = 0x25 + RTM_DELROUTE = 0x19 + RTM_DELRULE = 0x21 + RTM_DELTCLASS = 0x29 + RTM_DELTFILTER = 0x2d + RTM_F_CLONED = 0x200 + RTM_F_EQUALIZE = 0x400 + RTM_F_NOTIFY = 0x100 + RTM_F_PREFIX = 0x800 + RTM_GETACTION = 0x32 + RTM_GETADDR = 0x16 + RTM_GETADDRLABEL = 0x4a + RTM_GETANYCAST = 0x3e + RTM_GETDCB = 0x4e + RTM_GETLINK = 0x12 + RTM_GETMULTICAST = 0x3a + RTM_GETNEIGH = 0x1e + RTM_GETNEIGHTBL = 0x42 + RTM_GETQDISC = 0x26 + RTM_GETROUTE = 0x1a + RTM_GETRULE = 0x22 + RTM_GETTCLASS = 0x2a + RTM_GETTFILTER = 0x2e + RTM_MAX = 0x4f + RTM_NEWACTION = 0x30 + RTM_NEWADDR = 0x14 + RTM_NEWADDRLABEL = 0x48 + RTM_NEWLINK = 0x10 + RTM_NEWNDUSEROPT = 0x44 + RTM_NEWNEIGH = 0x1c + RTM_NEWNEIGHTBL = 0x40 + RTM_NEWPREFIX = 0x34 + RTM_NEWQDISC = 0x24 + RTM_NEWROUTE = 0x18 + RTM_NEWRULE = 0x20 + RTM_NEWTCLASS = 0x28 + RTM_NEWTFILTER = 0x2c + RTM_NR_FAMILIES = 0x10 + RTM_NR_MSGTYPES = 0x40 + RTM_SETDCB = 0x4f + RTM_SETLINK = 0x13 + RTM_SETNEIGHTBL = 0x43 + RTNH_ALIGNTO = 0x4 + RTNH_F_DEAD = 0x1 + RTNH_F_ONLINK = 0x4 + RTNH_F_PERVASIVE = 0x2 + RTN_MAX = 0xb + RTPROT_BIRD = 0xc + RTPROT_BOOT = 0x3 + RTPROT_DHCP = 0x10 + RTPROT_DNROUTED = 0xd + RTPROT_GATED = 0x8 + RTPROT_KERNEL = 0x2 + RTPROT_MRT = 0xa + RTPROT_NTK = 0xf + RTPROT_RA = 0x9 + RTPROT_REDIRECT = 0x1 + RTPROT_STATIC = 0x4 + RTPROT_UNSPEC = 0x0 + RTPROT_XORP = 0xe + RTPROT_ZEBRA = 0xb + RT_CLASS_DEFAULT = 0xfd + RT_CLASS_LOCAL = 0xff + RT_CLASS_MAIN = 0xfe + RT_CLASS_MAX = 0xff + RT_CLASS_UNSPEC = 0x0 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_CREDENTIALS = 0x2 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x1d + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPNS = 0x23 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDDLCI = 0x8980 + SIOCADDMULTI = 0x8931 + SIOCADDRT = 0x890b + SIOCATMARK = 0x8905 + SIOCDARP = 0x8953 + SIOCDELDLCI = 0x8981 + SIOCDELMULTI = 0x8932 + SIOCDELRT = 0x890c + SIOCDEVPRIVATE = 0x89f0 + SIOCDIFADDR = 0x8936 + SIOCDRARP = 0x8960 + SIOCGARP = 0x8954 + SIOCGIFADDR = 0x8915 + SIOCGIFBR = 0x8940 + SIOCGIFBRDADDR = 0x8919 + SIOCGIFCONF = 0x8912 + SIOCGIFCOUNT = 0x8938 + SIOCGIFDSTADDR = 0x8917 + SIOCGIFENCAP = 0x8925 + SIOCGIFFLAGS = 0x8913 + SIOCGIFHWADDR = 0x8927 + SIOCGIFINDEX = 0x8933 + SIOCGIFMAP = 0x8970 + SIOCGIFMEM = 0x891f + SIOCGIFMETRIC = 0x891d + SIOCGIFMTU = 0x8921 + SIOCGIFNAME = 0x8910 + SIOCGIFNETMASK = 0x891b + SIOCGIFPFLAGS = 0x8935 + SIOCGIFSLAVE = 0x8929 + SIOCGIFTXQLEN = 0x8942 + SIOCGPGRP = 0x8904 + SIOCGRARP = 0x8961 + SIOCGSTAMP = 0x8906 + SIOCGSTAMPNS = 0x8907 + SIOCPROTOPRIVATE = 0x89e0 + SIOCRTMSG = 0x890d + SIOCSARP = 0x8955 + SIOCSIFADDR = 0x8916 + SIOCSIFBR = 0x8941 + SIOCSIFBRDADDR = 0x891a + SIOCSIFDSTADDR = 0x8918 + SIOCSIFENCAP = 0x8926 + SIOCSIFFLAGS = 0x8914 + SIOCSIFHWADDR = 0x8924 + SIOCSIFHWBROADCAST = 0x8937 + SIOCSIFLINK = 0x8911 + SIOCSIFMAP = 0x8971 + SIOCSIFMEM = 0x8920 + SIOCSIFMETRIC = 0x891e + SIOCSIFMTU = 0x8922 + SIOCSIFNAME = 0x8923 + SIOCSIFNETMASK = 0x891c + SIOCSIFPFLAGS = 0x8934 + SIOCSIFSLAVE = 0x8930 + SIOCSIFTXQLEN = 0x8943 + SIOCSPGRP = 0x8902 + SIOCSRARP = 0x8962 + SOCK_CLOEXEC = 0x80000 + SOCK_DCCP = 0x6 + SOCK_DGRAM = 0x2 + SOCK_NONBLOCK = 0x800 + SOCK_PACKET = 0xa + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_AAL = 0x109 + SOL_ATM = 0x108 + SOL_DECNET = 0x105 + SOL_ICMPV6 = 0x3a + SOL_IP = 0x0 + SOL_IPV6 = 0x29 + SOL_IRDA = 0x10a + SOL_PACKET = 0x107 + SOL_RAW = 0xff + SOL_SOCKET = 0x1 + SOL_TCP = 0x6 + SOL_X25 = 0x106 + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x1e + SO_ATTACH_FILTER = 0x1a + SO_BINDTODEVICE = 0x19 + SO_BROADCAST = 0x6 + SO_BSDCOMPAT = 0xe + SO_DEBUG = 0x1 + SO_DETACH_FILTER = 0x1b + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 + SO_KEEPALIVE = 0x9 + SO_LINGER = 0xd + SO_MARK = 0x24 + SO_NO_CHECK = 0xb + SO_OOBINLINE = 0xa + SO_PASSCRED = 0x10 + SO_PASSSEC = 0x22 + SO_PEERCRED = 0x11 + SO_PEERNAME = 0x1c + SO_PEERSEC = 0x1f + SO_PRIORITY = 0xc + SO_PROTOCOL = 0x26 + SO_RCVBUF = 0x8 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x12 + SO_RCVTIMEO = 0x14 + SO_REUSEADDR = 0x2 + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SNDBUF = 0x7 + SO_SNDBUFFORCE = 0x20 + SO_SNDLOWAT = 0x13 + SO_SNDTIMEO = 0x15 + SO_TIMESTAMP = 0x1d + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TYPE = 0x3 + S_BLKSIZE = 0x200 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TCFLSH = 0x540b + TCIFLUSH = 0x0 + TCIOFLUSH = 0x2 + TCOFLUSH = 0x1 + TCP_CONGESTION = 0xd + TCP_CORK = 0x3 + TCP_DEFER_ACCEPT = 0x9 + TCP_INFO = 0xb + TCP_KEEPCNT = 0x6 + TCP_KEEPIDLE = 0x4 + TCP_KEEPINTVL = 0x5 + TCP_LINGER2 = 0x8 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0xe + TCP_MD5SIG_MAXKEYLEN = 0x50 + TCP_MSS = 0x200 + TCP_NODELAY = 0x1 + TCP_QUICKACK = 0xc + TCP_SYNCNT = 0x7 + TCP_WINDOW_CLAMP = 0xa + TCSAFLUSH = 0x2 + TIOCCBRK = 0x5428 + TIOCCONS = 0x541d + TIOCEXCL = 0x540c + TIOCGDEV = 0x80045432 + TIOCGETD = 0x5424 + TIOCGICOUNT = 0x545d + TIOCGLCKTRMIOS = 0x5456 + TIOCGPGRP = 0x540f + TIOCGPTN = 0x80045430 + TIOCGRS485 = 0x542e + TIOCGSERIAL = 0x541e + TIOCGSID = 0x5429 + TIOCGSOFTCAR = 0x5419 + TIOCGWINSZ = 0x5413 + TIOCINQ = 0x541b + TIOCLINUX = 0x541c + TIOCMBIC = 0x5417 + TIOCMBIS = 0x5416 + TIOCMGET = 0x5415 + TIOCMIWAIT = 0x545c + TIOCMSET = 0x5418 + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x5422 + TIOCNXCL = 0x540d + TIOCOUTQ = 0x5411 + TIOCPKT = 0x5420 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x540e + TIOCSERCONFIG = 0x5453 + TIOCSERGETLSR = 0x5459 + TIOCSERGETMULTI = 0x545a + TIOCSERGSTRUCT = 0x5458 + TIOCSERGWILD = 0x5454 + TIOCSERSETMULTI = 0x545b + TIOCSERSWILD = 0x5455 + TIOCSER_TEMT = 0x1 + TIOCSETD = 0x5423 + TIOCSIG = 0x40045436 + TIOCSLCKTRMIOS = 0x5457 + TIOCSPGRP = 0x5410 + TIOCSPTLCK = 0x40045431 + TIOCSRS485 = 0x542f + TIOCSSERIAL = 0x541f + TIOCSSOFTCAR = 0x541a + TIOCSTI = 0x5412 + TIOCSWINSZ = 0x5414 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x100 + TUNATTACHFILTER = 0x400854d5 + TUNDETACHFILTER = 0x400854d6 + TUNGETFEATURES = 0x800454cf + TUNGETIFF = 0x800454d2 + TUNGETSNDBUF = 0x800454d3 + TUNGETVNETHDRSZ = 0x800454d7 + TUNSETDEBUG = 0x400454c9 + TUNSETGROUP = 0x400454ce + TUNSETIFF = 0x400454ca + TUNSETLINK = 0x400454cd + TUNSETNOCSUM = 0x400454c8 + TUNSETOFFLOAD = 0x400454d0 + TUNSETOWNER = 0x400454cc + TUNSETPERSIST = 0x400454cb + TUNSETSNDBUF = 0x400454d4 + TUNSETTXFILTER = 0x400454d1 + TUNSETVNETHDRSZ = 0x400454d8 + VDISCARD = 0xd + VEOF = 0x4 + VEOL = 0xb + VEOL2 = 0x10 + VERASE = 0x2 + VINTR = 0x0 + VKILL = 0x3 + VLNEXT = 0xf + VMIN = 0x6 + VQUIT = 0x1 + VREPRINT = 0xc + VSTART = 0x8 + VSTOP = 0x9 + VSUSP = 0xa + VSWTC = 0x7 + VT0 = 0x0 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe + WALL = 0x40000000 + WCLONE = 0x80000000 + WCONTINUED = 0x8 + WEXITED = 0x4 + WNOHANG = 0x1 + WNOTHREAD = 0x20000000 + WNOWAIT = 0x1000000 + WORDSIZE = 0x20 + WSTOPPED = 0x2 + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x62) + EADDRNOTAVAIL = syscall.Errno(0x63) + EADV = syscall.Errno(0x44) + EAFNOSUPPORT = syscall.Errno(0x61) + EAGAIN = syscall.Errno(0xb) + EALREADY = syscall.Errno(0x72) + EBADE = syscall.Errno(0x34) + EBADF = syscall.Errno(0x9) + EBADFD = syscall.Errno(0x4d) + EBADMSG = syscall.Errno(0x4a) + EBADR = syscall.Errno(0x35) + EBADRQC = syscall.Errno(0x38) + EBADSLT = syscall.Errno(0x39) + EBFONT = syscall.Errno(0x3b) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x7d) + ECHILD = syscall.Errno(0xa) + ECHRNG = syscall.Errno(0x2c) + ECOMM = syscall.Errno(0x46) + ECONNABORTED = syscall.Errno(0x67) + ECONNREFUSED = syscall.Errno(0x6f) + ECONNRESET = syscall.Errno(0x68) + EDEADLK = syscall.Errno(0x23) + EDEADLOCK = syscall.Errno(0x23) + EDESTADDRREQ = syscall.Errno(0x59) + EDOM = syscall.Errno(0x21) + EDOTDOT = syscall.Errno(0x49) + EDQUOT = syscall.Errno(0x7a) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EHOSTDOWN = syscall.Errno(0x70) + EHOSTUNREACH = syscall.Errno(0x71) + EHWPOISON = syscall.Errno(0x85) + EIDRM = syscall.Errno(0x2b) + EILSEQ = syscall.Errno(0x54) + EINPROGRESS = syscall.Errno(0x73) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x6a) + EISDIR = syscall.Errno(0x15) + EISNAM = syscall.Errno(0x78) + EKEYEXPIRED = syscall.Errno(0x7f) + EKEYREJECTED = syscall.Errno(0x81) + EKEYREVOKED = syscall.Errno(0x80) + EL2HLT = syscall.Errno(0x33) + EL2NSYNC = syscall.Errno(0x2d) + EL3HLT = syscall.Errno(0x2e) + EL3RST = syscall.Errno(0x2f) + ELIBACC = syscall.Errno(0x4f) + ELIBBAD = syscall.Errno(0x50) + ELIBEXEC = syscall.Errno(0x53) + ELIBMAX = syscall.Errno(0x52) + ELIBSCN = syscall.Errno(0x51) + ELNRNG = syscall.Errno(0x30) + ELOOP = syscall.Errno(0x28) + EMEDIUMTYPE = syscall.Errno(0x7c) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x5a) + EMULTIHOP = syscall.Errno(0x48) + ENAMETOOLONG = syscall.Errno(0x24) + ENAVAIL = syscall.Errno(0x77) + ENETDOWN = syscall.Errno(0x64) + ENETRESET = syscall.Errno(0x66) + ENETUNREACH = syscall.Errno(0x65) + ENFILE = syscall.Errno(0x17) + ENOANO = syscall.Errno(0x37) + ENOBUFS = syscall.Errno(0x69) + ENOCSI = syscall.Errno(0x32) + ENODATA = syscall.Errno(0x3d) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOKEY = syscall.Errno(0x7e) + ENOLCK = syscall.Errno(0x25) + ENOLINK = syscall.Errno(0x43) + ENOMEDIUM = syscall.Errno(0x7b) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x2a) + ENONET = syscall.Errno(0x40) + ENOPKG = syscall.Errno(0x41) + ENOPROTOOPT = syscall.Errno(0x5c) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x3f) + ENOSTR = syscall.Errno(0x3c) + ENOSYS = syscall.Errno(0x26) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x6b) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x27) + ENOTNAM = syscall.Errno(0x76) + ENOTRECOVERABLE = syscall.Errno(0x83) + ENOTSOCK = syscall.Errno(0x58) + ENOTSUP = syscall.Errno(0x5f) + ENOTTY = syscall.Errno(0x19) + ENOTUNIQ = syscall.Errno(0x4c) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x5f) + EOVERFLOW = syscall.Errno(0x4b) + EOWNERDEAD = syscall.Errno(0x82) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x60) + EPIPE = syscall.Errno(0x20) + EPROTO = syscall.Errno(0x47) + EPROTONOSUPPORT = syscall.Errno(0x5d) + EPROTOTYPE = syscall.Errno(0x5b) + ERANGE = syscall.Errno(0x22) + EREMCHG = syscall.Errno(0x4e) + EREMOTE = syscall.Errno(0x42) + EREMOTEIO = syscall.Errno(0x79) + ERESTART = syscall.Errno(0x55) + ERFKILL = syscall.Errno(0x84) + EROFS = syscall.Errno(0x1e) + ESHUTDOWN = syscall.Errno(0x6c) + ESOCKTNOSUPPORT = syscall.Errno(0x5e) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESRMNT = syscall.Errno(0x45) + ESTALE = syscall.Errno(0x74) + ESTRPIPE = syscall.Errno(0x56) + ETIME = syscall.Errno(0x3e) + ETIMEDOUT = syscall.Errno(0x6e) + ETOOMANYREFS = syscall.Errno(0x6d) + ETXTBSY = syscall.Errno(0x1a) + EUCLEAN = syscall.Errno(0x75) + EUNATCH = syscall.Errno(0x31) + EUSERS = syscall.Errno(0x57) + EWOULDBLOCK = syscall.Errno(0xb) + EXDEV = syscall.Errno(0x12) + EXFULL = syscall.Errno(0x36) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0x7) + SIGCHLD = syscall.Signal(0x11) + SIGCLD = syscall.Signal(0x11) + SIGCONT = syscall.Signal(0x12) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x1d) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPOLL = syscall.Signal(0x1d) + SIGPROF = syscall.Signal(0x1b) + SIGPWR = syscall.Signal(0x1e) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTKFLT = syscall.Signal(0x10) + SIGSTOP = syscall.Signal(0x13) + SIGSYS = syscall.Signal(0x1f) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x14) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGUNUSED = syscall.Signal(0x1f) + SIGURG = syscall.Signal(0x17) + SIGUSR1 = syscall.Signal(0xa) + SIGUSR2 = syscall.Signal(0xc) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "no such device or address", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource temporarily unavailable", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device or resource busy", + 17: "file exists", + 18: "invalid cross-device link", + 19: "no such device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "numerical result out of range", + 35: "resource deadlock avoided", + 36: "file name too long", + 37: "no locks available", + 38: "function not implemented", + 39: "directory not empty", + 40: "too many levels of symbolic links", + 42: "no message of desired type", + 43: "identifier removed", + 44: "channel number out of range", + 45: "level 2 not synchronized", + 46: "level 3 halted", + 47: "level 3 reset", + 48: "link number out of range", + 49: "protocol driver not attached", + 50: "no CSI structure available", + 51: "level 2 halted", + 52: "invalid exchange", + 53: "invalid request descriptor", + 54: "exchange full", + 55: "no anode", + 56: "invalid request code", + 57: "invalid slot", + 59: "bad font file format", + 60: "device not a stream", + 61: "no data available", + 62: "timer expired", + 63: "out of streams resources", + 64: "machine is not on the network", + 65: "package not installed", + 66: "object is remote", + 67: "link has been severed", + 68: "advertise error", + 69: "srmount error", + 70: "communication error on send", + 71: "protocol error", + 72: "multihop attempted", + 73: "RFS specific error", + 74: "bad message", + 75: "value too large for defined data type", + 76: "name not unique on network", + 77: "file descriptor in bad state", + 78: "remote address changed", + 79: "can not access a needed shared library", + 80: "accessing a corrupted shared library", + 81: ".lib section in a.out corrupted", + 82: "attempting to link in too many shared libraries", + 83: "cannot exec a shared library directly", + 84: "invalid or incomplete multibyte or wide character", + 85: "interrupted system call should be restarted", + 86: "streams pipe error", + 87: "too many users", + 88: "socket operation on non-socket", + 89: "destination address required", + 90: "message too long", + 91: "protocol wrong type for socket", + 92: "protocol not available", + 93: "protocol not supported", + 94: "socket type not supported", + 95: "operation not supported", + 96: "protocol family not supported", + 97: "address family not supported by protocol", + 98: "address already in use", + 99: "cannot assign requested address", + 100: "network is down", + 101: "network is unreachable", + 102: "network dropped connection on reset", + 103: "software caused connection abort", + 104: "connection reset by peer", + 105: "no buffer space available", + 106: "transport endpoint is already connected", + 107: "transport endpoint is not connected", + 108: "cannot send after transport endpoint shutdown", + 109: "too many references: cannot splice", + 110: "connection timed out", + 111: "connection refused", + 112: "host is down", + 113: "no route to host", + 114: "operation already in progress", + 115: "operation now in progress", + 116: "stale NFS file handle", + 117: "structure needs cleaning", + 118: "not a XENIX named type file", + 119: "no XENIX semaphores available", + 120: "is a named type file", + 121: "remote I/O error", + 122: "disk quota exceeded", + 123: "no medium found", + 124: "wrong medium type", + 125: "operation canceled", + 126: "required key not available", + 127: "key has expired", + 128: "key has been revoked", + 129: "key was rejected by service", + 130: "owner died", + 131: "state not recoverable", + 132: "operation not possible due to RF-kill", + 133: "unknown error 133", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/breakpoint trap", + 6: "aborted", + 7: "bus error", + 8: "floating point exception", + 9: "killed", + 10: "user defined signal 1", + 11: "segmentation fault", + 12: "user defined signal 2", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "stack fault", + 17: "child exited", + 18: "continued", + 19: "stopped (signal)", + 20: "stopped", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "urgent I/O condition", + 24: "CPU time limit exceeded", + 25: "file size limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window changed", + 29: "I/O possible", + 30: "power failure", + 31: "bad system call", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go new file mode 100644 index 0000000..b40ccb8 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -0,0 +1,1762 @@ +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,linux + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m64 _const.go + +package unix + +import "syscall" + +const ( + AF_ALG = 0x26 + AF_APPLETALK = 0x5 + AF_ASH = 0x12 + AF_ATMPVC = 0x8 + AF_ATMSVC = 0x14 + AF_AX25 = 0x3 + AF_BLUETOOTH = 0x1f + AF_BRIDGE = 0x7 + AF_CAIF = 0x25 + AF_CAN = 0x1d + AF_DECnet = 0xc + AF_ECONET = 0x13 + AF_FILE = 0x1 + AF_IEEE802154 = 0x24 + AF_INET = 0x2 + AF_INET6 = 0xa + AF_IPX = 0x4 + AF_IRDA = 0x17 + AF_ISDN = 0x22 + AF_IUCV = 0x20 + AF_KEY = 0xf + AF_LLC = 0x1a + AF_LOCAL = 0x1 + AF_MAX = 0x28 + AF_NETBEUI = 0xd + AF_NETLINK = 0x10 + AF_NETROM = 0x6 + AF_NFC = 0x27 + AF_PACKET = 0x11 + AF_PHONET = 0x23 + AF_PPPOX = 0x18 + AF_RDS = 0x15 + AF_ROSE = 0xb + AF_ROUTE = 0x10 + AF_RXRPC = 0x21 + AF_SECURITY = 0xe + AF_SNA = 0x16 + AF_TIPC = 0x1e + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_WANPIPE = 0x19 + AF_X25 = 0x9 + ARPHRD_ADAPT = 0x108 + ARPHRD_APPLETLK = 0x8 + ARPHRD_ARCNET = 0x7 + ARPHRD_ASH = 0x30d + ARPHRD_ATM = 0x13 + ARPHRD_AX25 = 0x3 + ARPHRD_BIF = 0x307 + ARPHRD_CAIF = 0x336 + ARPHRD_CAN = 0x118 + ARPHRD_CHAOS = 0x5 + ARPHRD_CISCO = 0x201 + ARPHRD_CSLIP = 0x101 + ARPHRD_CSLIP6 = 0x103 + ARPHRD_DDCMP = 0x205 + ARPHRD_DLCI = 0xf + ARPHRD_ECONET = 0x30e + ARPHRD_EETHER = 0x2 + ARPHRD_ETHER = 0x1 + ARPHRD_EUI64 = 0x1b + ARPHRD_FCAL = 0x311 + ARPHRD_FCFABRIC = 0x313 + ARPHRD_FCPL = 0x312 + ARPHRD_FCPP = 0x310 + ARPHRD_FDDI = 0x306 + ARPHRD_FRAD = 0x302 + ARPHRD_HDLC = 0x201 + ARPHRD_HIPPI = 0x30c + ARPHRD_HWX25 = 0x110 + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + ARPHRD_IEEE80211 = 0x321 + ARPHRD_IEEE80211_PRISM = 0x322 + ARPHRD_IEEE80211_RADIOTAP = 0x323 + ARPHRD_IEEE802154 = 0x324 + ARPHRD_IEEE802_TR = 0x320 + ARPHRD_INFINIBAND = 0x20 + ARPHRD_IPDDP = 0x309 + ARPHRD_IPGRE = 0x30a + ARPHRD_IRDA = 0x30f + ARPHRD_LAPB = 0x204 + ARPHRD_LOCALTLK = 0x305 + ARPHRD_LOOPBACK = 0x304 + ARPHRD_METRICOM = 0x17 + ARPHRD_NETROM = 0x0 + ARPHRD_NONE = 0xfffe + ARPHRD_PHONET = 0x334 + ARPHRD_PHONET_PIPE = 0x335 + ARPHRD_PIMREG = 0x30b + ARPHRD_PPP = 0x200 + ARPHRD_PRONET = 0x4 + ARPHRD_RAWHDLC = 0x206 + ARPHRD_ROSE = 0x10e + ARPHRD_RSRVD = 0x104 + ARPHRD_SIT = 0x308 + ARPHRD_SKIP = 0x303 + ARPHRD_SLIP = 0x100 + ARPHRD_SLIP6 = 0x102 + ARPHRD_TUNNEL = 0x300 + ARPHRD_TUNNEL6 = 0x301 + ARPHRD_VOID = 0xffff + ARPHRD_X25 = 0x10f + B0 = 0x0 + B1000000 = 0x1008 + B110 = 0x3 + B115200 = 0x1002 + B1152000 = 0x1009 + B1200 = 0x9 + B134 = 0x4 + B150 = 0x5 + B1500000 = 0x100a + B1800 = 0xa + B19200 = 0xe + B200 = 0x6 + B2000000 = 0x100b + B230400 = 0x1003 + B2400 = 0xb + B2500000 = 0x100c + B300 = 0x7 + B3000000 = 0x100d + B3500000 = 0x100e + B38400 = 0xf + B4000000 = 0x100f + B460800 = 0x1004 + B4800 = 0xc + B50 = 0x1 + B500000 = 0x1005 + B57600 = 0x1001 + B576000 = 0x1006 + B600 = 0x8 + B75 = 0x2 + B921600 = 0x1007 + B9600 = 0xd + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXINSNS = 0x1000 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x800 + CLOCK_BOOTTIME = 0x7 + CLOCK_BOOTTIME_ALARM = 0x9 + CLOCK_DEFAULT = 0x0 + CLOCK_EXT = 0x1 + CLOCK_INT = 0x2 + CLOCK_MONOTONIC = 0x1 + CLOCK_MONOTONIC_COARSE = 0x6 + CLOCK_MONOTONIC_RAW = 0x4 + CLOCK_PROCESS_CPUTIME_ID = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_REALTIME_ALARM = 0x8 + CLOCK_REALTIME_COARSE = 0x5 + CLOCK_THREAD_CPUTIME_ID = 0x3 + CLOCK_TXFROMRX = 0x4 + CLOCK_TXINT = 0x3 + CLONE_CHILD_CLEARTID = 0x200000 + CLONE_CHILD_SETTID = 0x1000000 + CLONE_DETACHED = 0x400000 + CLONE_FILES = 0x400 + CLONE_FS = 0x200 + CLONE_IO = 0x80000000 + CLONE_NEWIPC = 0x8000000 + CLONE_NEWNET = 0x40000000 + CLONE_NEWNS = 0x20000 + CLONE_NEWPID = 0x20000000 + CLONE_NEWUSER = 0x10000000 + CLONE_NEWUTS = 0x4000000 + CLONE_PARENT = 0x8000 + CLONE_PARENT_SETTID = 0x100000 + CLONE_PTRACE = 0x2000 + CLONE_SETTLS = 0x80000 + CLONE_SIGHAND = 0x800 + CLONE_SYSVSEM = 0x40000 + CLONE_THREAD = 0x10000 + CLONE_UNTRACED = 0x800000 + CLONE_VFORK = 0x4000 + CLONE_VM = 0x100 + CREAD = 0x80 + CS5 = 0x0 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIGNAL = 0xff + CSIZE = 0x30 + CSTART = 0x11 + CSTATUS = 0x0 + CSTOP = 0x13 + CSTOPB = 0x40 + CSUSP = 0x1a + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 + ENCODING_DEFAULT = 0x0 + ENCODING_FM_MARK = 0x3 + ENCODING_FM_SPACE = 0x4 + ENCODING_MANCHESTER = 0x5 + ENCODING_NRZ = 0x1 + ENCODING_NRZI = 0x2 + EPOLLERR = 0x8 + EPOLLET = 0x80000000 + EPOLLHUP = 0x10 + EPOLLIN = 0x1 + EPOLLMSG = 0x400 + EPOLLONESHOT = 0x40000000 + EPOLLOUT = 0x4 + EPOLLPRI = 0x2 + EPOLLRDBAND = 0x80 + EPOLLRDHUP = 0x2000 + EPOLLRDNORM = 0x40 + EPOLLWRBAND = 0x200 + EPOLLWRNORM = 0x100 + EPOLL_CLOEXEC = 0x80000 + EPOLL_CTL_ADD = 0x1 + EPOLL_CTL_DEL = 0x2 + EPOLL_CTL_MOD = 0x3 + EPOLL_NONBLOCK = 0x800 + ETH_P_1588 = 0x88f7 + ETH_P_8021AD = 0x88a8 + ETH_P_8021AH = 0x88e7 + ETH_P_8021Q = 0x8100 + ETH_P_802_2 = 0x4 + ETH_P_802_3 = 0x1 + ETH_P_AARP = 0x80f3 + ETH_P_AF_IUCV = 0xfbfb + ETH_P_ALL = 0x3 + ETH_P_AOE = 0x88a2 + ETH_P_ARCNET = 0x1a + ETH_P_ARP = 0x806 + ETH_P_ATALK = 0x809b + ETH_P_ATMFATE = 0x8884 + ETH_P_ATMMPOA = 0x884c + ETH_P_AX25 = 0x2 + ETH_P_BPQ = 0x8ff + ETH_P_CAIF = 0xf7 + ETH_P_CAN = 0xc + ETH_P_CONTROL = 0x16 + ETH_P_CUST = 0x6006 + ETH_P_DDCMP = 0x6 + ETH_P_DEC = 0x6000 + ETH_P_DIAG = 0x6005 + ETH_P_DNA_DL = 0x6001 + ETH_P_DNA_RC = 0x6002 + ETH_P_DNA_RT = 0x6003 + ETH_P_DSA = 0x1b + ETH_P_ECONET = 0x18 + ETH_P_EDSA = 0xdada + ETH_P_FCOE = 0x8906 + ETH_P_FIP = 0x8914 + ETH_P_HDLC = 0x19 + ETH_P_IEEE802154 = 0xf6 + ETH_P_IEEEPUP = 0xa00 + ETH_P_IEEEPUPAT = 0xa01 + ETH_P_IP = 0x800 + ETH_P_IPV6 = 0x86dd + ETH_P_IPX = 0x8137 + ETH_P_IRDA = 0x17 + ETH_P_LAT = 0x6004 + ETH_P_LINK_CTL = 0x886c + ETH_P_LOCALTALK = 0x9 + ETH_P_LOOP = 0x60 + ETH_P_MOBITEX = 0x15 + ETH_P_MPLS_MC = 0x8848 + ETH_P_MPLS_UC = 0x8847 + ETH_P_PAE = 0x888e + ETH_P_PAUSE = 0x8808 + ETH_P_PHONET = 0xf5 + ETH_P_PPPTALK = 0x10 + ETH_P_PPP_DISC = 0x8863 + ETH_P_PPP_MP = 0x8 + ETH_P_PPP_SES = 0x8864 + ETH_P_PUP = 0x200 + ETH_P_PUPAT = 0x201 + ETH_P_QINQ1 = 0x9100 + ETH_P_QINQ2 = 0x9200 + ETH_P_QINQ3 = 0x9300 + ETH_P_RARP = 0x8035 + ETH_P_SCA = 0x6007 + ETH_P_SLOW = 0x8809 + ETH_P_SNAP = 0x5 + ETH_P_TDLS = 0x890d + ETH_P_TEB = 0x6558 + ETH_P_TIPC = 0x88ca + ETH_P_TRAILER = 0x1c + ETH_P_TR_802_2 = 0x11 + ETH_P_WAN_PPP = 0x7 + ETH_P_WCCP = 0x883e + ETH_P_X25 = 0x805 + EXTA = 0xe + EXTB = 0xf + EXTPROC = 0x10000 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x1000 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x406 + F_EXLCK = 0x4 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLEASE = 0x401 + F_GETLK = 0x5 + F_GETLK64 = 0x5 + F_GETOWN = 0x9 + F_GETOWN_EX = 0x10 + F_GETPIPE_SZ = 0x408 + F_GETSIG = 0xb + F_LOCK = 0x1 + F_NOTIFY = 0x402 + F_OK = 0x0 + F_RDLCK = 0x0 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLEASE = 0x400 + F_SETLK = 0x6 + F_SETLK64 = 0x6 + F_SETLKW = 0x7 + F_SETLKW64 = 0x7 + F_SETOWN = 0x8 + F_SETOWN_EX = 0xf + F_SETPIPE_SZ = 0x407 + F_SETSIG = 0xa + F_SHLCK = 0x8 + F_TEST = 0x3 + F_TLOCK = 0x2 + F_ULOCK = 0x0 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x400 + ICANON = 0x2 + ICMPV6_FILTER = 0x1 + ICRNL = 0x100 + IEXTEN = 0x8000 + IFA_F_DADFAILED = 0x8 + IFA_F_DEPRECATED = 0x20 + IFA_F_HOMEADDRESS = 0x10 + IFA_F_NODAD = 0x2 + IFA_F_OPTIMISTIC = 0x4 + IFA_F_PERMANENT = 0x80 + IFA_F_SECONDARY = 0x1 + IFA_F_TEMPORARY = 0x1 + IFA_F_TENTATIVE = 0x40 + IFA_MAX = 0x7 + IFF_802_1Q_VLAN = 0x1 + IFF_ALLMULTI = 0x200 + IFF_AUTOMEDIA = 0x4000 + IFF_BONDING = 0x20 + IFF_BRIDGE_PORT = 0x4000 + IFF_BROADCAST = 0x2 + IFF_DEBUG = 0x4 + IFF_DISABLE_NETPOLL = 0x1000 + IFF_DONT_BRIDGE = 0x800 + IFF_DORMANT = 0x20000 + IFF_DYNAMIC = 0x8000 + IFF_EBRIDGE = 0x2 + IFF_ECHO = 0x40000 + IFF_ISATAP = 0x80 + IFF_LOOPBACK = 0x8 + IFF_LOWER_UP = 0x10000 + IFF_MACVLAN_PORT = 0x2000 + IFF_MASTER = 0x400 + IFF_MASTER_8023AD = 0x8 + IFF_MASTER_ALB = 0x10 + IFF_MASTER_ARPMON = 0x100 + IFF_MULTICAST = 0x1000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_NO_PI = 0x1000 + IFF_ONE_QUEUE = 0x2000 + IFF_OVS_DATAPATH = 0x8000 + IFF_POINTOPOINT = 0x10 + IFF_PORTSEL = 0x2000 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SLAVE = 0x800 + IFF_SLAVE_INACTIVE = 0x4 + IFF_SLAVE_NEEDARP = 0x40 + IFF_TAP = 0x2 + IFF_TUN = 0x1 + IFF_TUN_EXCL = 0x8000 + IFF_TX_SKB_SHARING = 0x10000 + IFF_UNICAST_FLT = 0x20000 + IFF_UP = 0x1 + IFF_VNET_HDR = 0x4000 + IFF_VOLATILE = 0x70c5a + IFF_WAN_HDLC = 0x200 + IFF_XMIT_DST_RELEASE = 0x400 + IFNAMSIZ = 0x10 + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_ACCESS = 0x1 + IN_ALL_EVENTS = 0xfff + IN_ATTRIB = 0x4 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLOEXEC = 0x80000 + IN_CLOSE = 0x18 + IN_CLOSE_NOWRITE = 0x10 + IN_CLOSE_WRITE = 0x8 + IN_CREATE = 0x100 + IN_DELETE = 0x200 + IN_DELETE_SELF = 0x400 + IN_DONT_FOLLOW = 0x2000000 + IN_EXCL_UNLINK = 0x4000000 + IN_IGNORED = 0x8000 + IN_ISDIR = 0x40000000 + IN_LOOPBACKNET = 0x7f + IN_MASK_ADD = 0x20000000 + IN_MODIFY = 0x2 + IN_MOVE = 0xc0 + IN_MOVED_FROM = 0x40 + IN_MOVED_TO = 0x80 + IN_MOVE_SELF = 0x800 + IN_NONBLOCK = 0x800 + IN_ONESHOT = 0x80000000 + IN_ONLYDIR = 0x1000000 + IN_OPEN = 0x20 + IN_Q_OVERFLOW = 0x4000 + IN_UNMOUNT = 0x2000 + IPPROTO_AH = 0x33 + IPPROTO_COMP = 0x6c + IPPROTO_DCCP = 0x21 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_ESP = 0x32 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPIP = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_MTP = 0x5c + IPPROTO_NONE = 0x3b + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPV6_2292DSTOPTS = 0x4 + IPV6_2292HOPLIMIT = 0x8 + IPV6_2292HOPOPTS = 0x3 + IPV6_2292PKTINFO = 0x2 + IPV6_2292PKTOPTIONS = 0x6 + IPV6_2292RTHDR = 0x5 + IPV6_ADDRFORM = 0x1 + IPV6_ADD_MEMBERSHIP = 0x14 + IPV6_AUTHHDR = 0xa + IPV6_CHECKSUM = 0x7 + IPV6_DROP_MEMBERSHIP = 0x15 + IPV6_DSTOPTS = 0x3b + IPV6_HOPLIMIT = 0x34 + IPV6_HOPOPTS = 0x36 + IPV6_IPSEC_POLICY = 0x22 + IPV6_JOIN_ANYCAST = 0x1b + IPV6_JOIN_GROUP = 0x14 + IPV6_LEAVE_ANYCAST = 0x1c + IPV6_LEAVE_GROUP = 0x15 + IPV6_MTU = 0x18 + IPV6_MTU_DISCOVER = 0x17 + IPV6_MULTICAST_HOPS = 0x12 + IPV6_MULTICAST_IF = 0x11 + IPV6_MULTICAST_LOOP = 0x13 + IPV6_NEXTHOP = 0x9 + IPV6_PKTINFO = 0x32 + IPV6_PMTUDISC_DO = 0x2 + IPV6_PMTUDISC_DONT = 0x0 + IPV6_PMTUDISC_PROBE = 0x3 + IPV6_PMTUDISC_WANT = 0x1 + IPV6_RECVDSTOPTS = 0x3a + IPV6_RECVERR = 0x19 + IPV6_RECVHOPLIMIT = 0x33 + IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVPKTINFO = 0x31 + IPV6_RECVRTHDR = 0x38 + IPV6_RECVTCLASS = 0x42 + IPV6_ROUTER_ALERT = 0x16 + IPV6_RTHDR = 0x39 + IPV6_RTHDRDSTOPTS = 0x37 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_RXDSTOPTS = 0x3b + IPV6_RXHOPOPTS = 0x36 + IPV6_TCLASS = 0x43 + IPV6_UNICAST_HOPS = 0x10 + IPV6_V6ONLY = 0x1a + IPV6_XFRM_POLICY = 0x23 + IP_ADD_MEMBERSHIP = 0x23 + IP_ADD_SOURCE_MEMBERSHIP = 0x27 + IP_BLOCK_SOURCE = 0x26 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0x24 + IP_DROP_SOURCE_MEMBERSHIP = 0x28 + IP_FREEBIND = 0xf + IP_HDRINCL = 0x3 + IP_IPSEC_POLICY = 0x10 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINTTL = 0x15 + IP_MSFILTER = 0x29 + IP_MSS = 0x240 + IP_MTU = 0xe + IP_MTU_DISCOVER = 0xa + IP_MULTICAST_ALL = 0x31 + IP_MULTICAST_IF = 0x20 + IP_MULTICAST_LOOP = 0x22 + IP_MULTICAST_TTL = 0x21 + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x4 + IP_ORIGDSTADDR = 0x14 + IP_PASSSEC = 0x12 + IP_PKTINFO = 0x8 + IP_PKTOPTIONS = 0x9 + IP_PMTUDISC = 0xa + IP_PMTUDISC_DO = 0x2 + IP_PMTUDISC_DONT = 0x0 + IP_PMTUDISC_PROBE = 0x3 + IP_PMTUDISC_WANT = 0x1 + IP_RECVERR = 0xb + IP_RECVOPTS = 0x6 + IP_RECVORIGDSTADDR = 0x14 + IP_RECVRETOPTS = 0x7 + IP_RECVTOS = 0xd + IP_RECVTTL = 0xc + IP_RETOPTS = 0x7 + IP_RF = 0x8000 + IP_ROUTER_ALERT = 0x5 + IP_TOS = 0x1 + IP_TRANSPARENT = 0x13 + IP_TTL = 0x2 + IP_UNBLOCK_SOURCE = 0x25 + IP_XFRM_POLICY = 0x11 + ISIG = 0x1 + ISTRIP = 0x20 + IUTF8 = 0x4000 + IXANY = 0x800 + IXOFF = 0x1000 + IXON = 0x400 + LINUX_REBOOT_CMD_CAD_OFF = 0x0 + LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef + LINUX_REBOOT_CMD_HALT = 0xcdef0123 + LINUX_REBOOT_CMD_KEXEC = 0x45584543 + LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc + LINUX_REBOOT_CMD_RESTART = 0x1234567 + LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 + LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 + LINUX_REBOOT_MAGIC1 = 0xfee1dead + LINUX_REBOOT_MAGIC2 = 0x28121969 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DOFORK = 0xb + MADV_DONTFORK = 0xa + MADV_DONTNEED = 0x4 + MADV_HUGEPAGE = 0xe + MADV_HWPOISON = 0x64 + MADV_MERGEABLE = 0xc + MADV_NOHUGEPAGE = 0xf + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_REMOVE = 0x9 + MADV_SEQUENTIAL = 0x2 + MADV_UNMERGEABLE = 0xd + MADV_WILLNEED = 0x3 + MAP_32BIT = 0x40 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 + MAP_EXECUTABLE = 0x1000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_GROWSDOWN = 0x100 + MAP_HUGETLB = 0x40000 + MAP_LOCKED = 0x2000 + MAP_NONBLOCK = 0x10000 + MAP_NORESERVE = 0x4000 + MAP_POPULATE = 0x8000 + MAP_PRIVATE = 0x2 + MAP_SHARED = 0x1 + MAP_STACK = 0x20000 + MAP_TYPE = 0xf + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MNT_DETACH = 0x2 + MNT_EXPIRE = 0x4 + MNT_FORCE = 0x1 + MSG_CMSG_CLOEXEC = 0x40000000 + MSG_CONFIRM = 0x800 + MSG_CTRUNC = 0x8 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x40 + MSG_EOR = 0x80 + MSG_ERRQUEUE = 0x2000 + MSG_FASTOPEN = 0x20000000 + MSG_FIN = 0x200 + MSG_MORE = 0x8000 + MSG_NOSIGNAL = 0x4000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_PROXY = 0x10 + MSG_RST = 0x1000 + MSG_SYN = 0x400 + MSG_TRUNC = 0x20 + MSG_TRYHARD = 0x4 + MSG_WAITALL = 0x100 + MSG_WAITFORONE = 0x10000 + MS_ACTIVE = 0x40000000 + MS_ASYNC = 0x1 + MS_BIND = 0x1000 + MS_DIRSYNC = 0x80 + MS_INVALIDATE = 0x2 + MS_I_VERSION = 0x800000 + MS_KERNMOUNT = 0x400000 + MS_MANDLOCK = 0x40 + MS_MGC_MSK = 0xffff0000 + MS_MGC_VAL = 0xc0ed0000 + MS_MOVE = 0x2000 + MS_NOATIME = 0x400 + MS_NODEV = 0x4 + MS_NODIRATIME = 0x800 + MS_NOEXEC = 0x8 + MS_NOSUID = 0x2 + MS_NOUSER = -0x80000000 + MS_POSIXACL = 0x10000 + MS_PRIVATE = 0x40000 + MS_RDONLY = 0x1 + MS_REC = 0x4000 + MS_RELATIME = 0x200000 + MS_REMOUNT = 0x20 + MS_RMT_MASK = 0x800051 + MS_SHARED = 0x100000 + MS_SILENT = 0x8000 + MS_SLAVE = 0x80000 + MS_STRICTATIME = 0x1000000 + MS_SYNC = 0x4 + MS_SYNCHRONOUS = 0x10 + MS_UNBINDABLE = 0x20000 + NAME_MAX = 0xff + NETLINK_ADD_MEMBERSHIP = 0x1 + NETLINK_AUDIT = 0x9 + NETLINK_BROADCAST_ERROR = 0x4 + NETLINK_CONNECTOR = 0xb + NETLINK_CRYPTO = 0x15 + NETLINK_DNRTMSG = 0xe + NETLINK_DROP_MEMBERSHIP = 0x2 + NETLINK_ECRYPTFS = 0x13 + NETLINK_FIB_LOOKUP = 0xa + NETLINK_FIREWALL = 0x3 + NETLINK_GENERIC = 0x10 + NETLINK_INET_DIAG = 0x4 + NETLINK_IP6_FW = 0xd + NETLINK_ISCSI = 0x8 + NETLINK_KOBJECT_UEVENT = 0xf + NETLINK_NETFILTER = 0xc + NETLINK_NFLOG = 0x5 + NETLINK_NO_ENOBUFS = 0x5 + NETLINK_PKTINFO = 0x3 + NETLINK_RDMA = 0x14 + NETLINK_ROUTE = 0x0 + NETLINK_SCSITRANSPORT = 0x12 + NETLINK_SELINUX = 0x7 + NETLINK_UNUSED = 0x1 + NETLINK_USERSOCK = 0x2 + NETLINK_XFRM = 0x6 + NLA_ALIGNTO = 0x4 + NLA_F_NESTED = 0x8000 + NLA_F_NET_BYTEORDER = 0x4000 + NLA_HDRLEN = 0x4 + NLMSG_ALIGNTO = 0x4 + NLMSG_DONE = 0x3 + NLMSG_ERROR = 0x2 + NLMSG_HDRLEN = 0x10 + NLMSG_MIN_TYPE = 0x10 + NLMSG_NOOP = 0x1 + NLMSG_OVERRUN = 0x4 + NLM_F_ACK = 0x4 + NLM_F_APPEND = 0x800 + NLM_F_ATOMIC = 0x400 + NLM_F_CREATE = 0x400 + NLM_F_DUMP = 0x300 + NLM_F_DUMP_INTR = 0x10 + NLM_F_ECHO = 0x8 + NLM_F_EXCL = 0x200 + NLM_F_MATCH = 0x200 + NLM_F_MULTI = 0x2 + NLM_F_REPLACE = 0x100 + NLM_F_REQUEST = 0x1 + NLM_F_ROOT = 0x100 + NOFLSH = 0x80 + OCRNL = 0x8 + OFDEL = 0x80 + OFILL = 0x40 + ONLCR = 0x4 + ONLRET = 0x20 + ONOCR = 0x10 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x400 + O_ASYNC = 0x2000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x40 + O_DIRECT = 0x4000 + O_DIRECTORY = 0x10000 + O_DSYNC = 0x1000 + O_EXCL = 0x80 + O_FSYNC = 0x101000 + O_LARGEFILE = 0x0 + O_NDELAY = 0x800 + O_NOATIME = 0x40000 + O_NOCTTY = 0x100 + O_NOFOLLOW = 0x20000 + O_NONBLOCK = 0x800 + O_PATH = 0x200000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x101000 + O_SYNC = 0x101000 + O_TRUNC = 0x200 + O_WRONLY = 0x1 + PACKET_ADD_MEMBERSHIP = 0x1 + PACKET_AUXDATA = 0x8 + PACKET_BROADCAST = 0x1 + PACKET_COPY_THRESH = 0x7 + PACKET_DROP_MEMBERSHIP = 0x2 + PACKET_FANOUT = 0x12 + PACKET_FANOUT_CPU = 0x2 + PACKET_FANOUT_FLAG_DEFRAG = 0x8000 + PACKET_FANOUT_HASH = 0x0 + PACKET_FANOUT_LB = 0x1 + PACKET_FASTROUTE = 0x6 + PACKET_HDRLEN = 0xb + PACKET_HOST = 0x0 + PACKET_LOOPBACK = 0x5 + PACKET_LOSS = 0xe + PACKET_MR_ALLMULTI = 0x2 + PACKET_MR_MULTICAST = 0x0 + PACKET_MR_PROMISC = 0x1 + PACKET_MR_UNICAST = 0x3 + PACKET_MULTICAST = 0x2 + PACKET_ORIGDEV = 0x9 + PACKET_OTHERHOST = 0x3 + PACKET_OUTGOING = 0x4 + PACKET_RECV_OUTPUT = 0x3 + PACKET_RESERVE = 0xc + PACKET_RX_RING = 0x5 + PACKET_STATISTICS = 0x6 + PACKET_TIMESTAMP = 0x11 + PACKET_TX_RING = 0xd + PACKET_TX_TIMESTAMP = 0x10 + PACKET_VERSION = 0xa + PACKET_VNET_HDR = 0xf + PARENB = 0x100 + PARITY_CRC16_PR0 = 0x2 + PARITY_CRC16_PR0_CCITT = 0x4 + PARITY_CRC16_PR1 = 0x3 + PARITY_CRC16_PR1_CCITT = 0x5 + PARITY_CRC32_PR0_CCITT = 0x6 + PARITY_CRC32_PR1_CCITT = 0x7 + PARITY_DEFAULT = 0x0 + PARITY_NONE = 0x1 + PARMRK = 0x8 + PARODD = 0x200 + PENDIN = 0x4000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_GROWSDOWN = 0x1000000 + PROT_GROWSUP = 0x2000000 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PR_CAPBSET_DROP = 0x18 + PR_CAPBSET_READ = 0x17 + PR_ENDIAN_BIG = 0x0 + PR_ENDIAN_LITTLE = 0x1 + PR_ENDIAN_PPC_LITTLE = 0x2 + PR_FPEMU_NOPRINT = 0x1 + PR_FPEMU_SIGFPE = 0x2 + PR_FP_EXC_ASYNC = 0x2 + PR_FP_EXC_DISABLED = 0x0 + PR_FP_EXC_DIV = 0x10000 + PR_FP_EXC_INV = 0x100000 + PR_FP_EXC_NONRECOV = 0x1 + PR_FP_EXC_OVF = 0x20000 + PR_FP_EXC_PRECISE = 0x3 + PR_FP_EXC_RES = 0x80000 + PR_FP_EXC_SW_ENABLE = 0x80 + PR_FP_EXC_UND = 0x40000 + PR_GET_DUMPABLE = 0x3 + PR_GET_ENDIAN = 0x13 + PR_GET_FPEMU = 0x9 + PR_GET_FPEXC = 0xb + PR_GET_KEEPCAPS = 0x7 + PR_GET_NAME = 0x10 + PR_GET_NO_NEW_PRIVS = 0x27 + PR_GET_PDEATHSIG = 0x2 + PR_GET_SECCOMP = 0x15 + PR_GET_SECUREBITS = 0x1b + PR_GET_TIMERSLACK = 0x1e + PR_GET_TIMING = 0xd + PR_GET_TSC = 0x19 + PR_GET_UNALIGN = 0x5 + PR_MCE_KILL = 0x21 + PR_MCE_KILL_CLEAR = 0x0 + PR_MCE_KILL_DEFAULT = 0x2 + PR_MCE_KILL_EARLY = 0x1 + PR_MCE_KILL_GET = 0x22 + PR_MCE_KILL_LATE = 0x0 + PR_MCE_KILL_SET = 0x1 + PR_SET_DUMPABLE = 0x4 + PR_SET_ENDIAN = 0x14 + PR_SET_FPEMU = 0xa + PR_SET_FPEXC = 0xc + PR_SET_KEEPCAPS = 0x8 + PR_SET_MM = 0x23 + PR_SET_MM_BRK = 0x7 + PR_SET_MM_END_CODE = 0x2 + PR_SET_MM_END_DATA = 0x4 + PR_SET_MM_START_BRK = 0x6 + PR_SET_MM_START_CODE = 0x1 + PR_SET_MM_START_DATA = 0x3 + PR_SET_MM_START_STACK = 0x5 + PR_SET_NAME = 0xf + PR_SET_NO_NEW_PRIVS = 0x26 + PR_SET_PDEATHSIG = 0x1 + PR_SET_PTRACER = 0x59616d61 + PR_SET_PTRACER_ANY = -0x1 + PR_SET_SECCOMP = 0x16 + PR_SET_SECUREBITS = 0x1c + PR_SET_TIMERSLACK = 0x1d + PR_SET_TIMING = 0xe + PR_SET_TSC = 0x1a + PR_SET_UNALIGN = 0x6 + PR_TASK_PERF_EVENTS_DISABLE = 0x1f + PR_TASK_PERF_EVENTS_ENABLE = 0x20 + PR_TIMING_STATISTICAL = 0x0 + PR_TIMING_TIMESTAMP = 0x1 + PR_TSC_ENABLE = 0x1 + PR_TSC_SIGSEGV = 0x2 + PR_UNALIGN_NOPRINT = 0x1 + PR_UNALIGN_SIGBUS = 0x2 + PTRACE_ARCH_PRCTL = 0x1e + PTRACE_ATTACH = 0x10 + PTRACE_CONT = 0x7 + PTRACE_DETACH = 0x11 + PTRACE_EVENT_CLONE = 0x3 + PTRACE_EVENT_EXEC = 0x4 + PTRACE_EVENT_EXIT = 0x6 + PTRACE_EVENT_FORK = 0x1 + PTRACE_EVENT_SECCOMP = 0x7 + PTRACE_EVENT_STOP = 0x80 + PTRACE_EVENT_VFORK = 0x2 + PTRACE_EVENT_VFORK_DONE = 0x5 + PTRACE_GETEVENTMSG = 0x4201 + PTRACE_GETFPREGS = 0xe + PTRACE_GETFPXREGS = 0x12 + PTRACE_GETREGS = 0xc + PTRACE_GETREGSET = 0x4204 + PTRACE_GETSIGINFO = 0x4202 + PTRACE_GET_THREAD_AREA = 0x19 + PTRACE_INTERRUPT = 0x4207 + PTRACE_KILL = 0x8 + PTRACE_LISTEN = 0x4208 + PTRACE_OLDSETOPTIONS = 0x15 + PTRACE_O_MASK = 0xff + PTRACE_O_TRACECLONE = 0x8 + PTRACE_O_TRACEEXEC = 0x10 + PTRACE_O_TRACEEXIT = 0x40 + PTRACE_O_TRACEFORK = 0x2 + PTRACE_O_TRACESECCOMP = 0x80 + PTRACE_O_TRACESYSGOOD = 0x1 + PTRACE_O_TRACEVFORK = 0x4 + PTRACE_O_TRACEVFORKDONE = 0x20 + PTRACE_PEEKDATA = 0x2 + PTRACE_PEEKTEXT = 0x1 + PTRACE_PEEKUSR = 0x3 + PTRACE_POKEDATA = 0x5 + PTRACE_POKETEXT = 0x4 + PTRACE_POKEUSR = 0x6 + PTRACE_SEIZE = 0x4206 + PTRACE_SEIZE_DEVEL = 0x80000000 + PTRACE_SETFPREGS = 0xf + PTRACE_SETFPXREGS = 0x13 + PTRACE_SETOPTIONS = 0x4200 + PTRACE_SETREGS = 0xd + PTRACE_SETREGSET = 0x4205 + PTRACE_SETSIGINFO = 0x4203 + PTRACE_SET_THREAD_AREA = 0x1a + PTRACE_SINGLEBLOCK = 0x21 + PTRACE_SINGLESTEP = 0x9 + PTRACE_SYSCALL = 0x18 + PTRACE_SYSEMU = 0x1f + PTRACE_SYSEMU_SINGLESTEP = 0x20 + PTRACE_TRACEME = 0x0 + RLIMIT_AS = 0x9 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x7 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = -0x1 + RTAX_ADVMSS = 0x8 + RTAX_CWND = 0x7 + RTAX_FEATURES = 0xc + RTAX_FEATURE_ALLFRAG = 0x8 + RTAX_FEATURE_ECN = 0x1 + RTAX_FEATURE_SACK = 0x2 + RTAX_FEATURE_TIMESTAMP = 0x4 + RTAX_HOPLIMIT = 0xa + RTAX_INITCWND = 0xb + RTAX_INITRWND = 0xe + RTAX_LOCK = 0x1 + RTAX_MAX = 0xe + RTAX_MTU = 0x2 + RTAX_REORDERING = 0x9 + RTAX_RTO_MIN = 0xd + RTAX_RTT = 0x4 + RTAX_RTTVAR = 0x5 + RTAX_SSTHRESH = 0x6 + RTAX_UNSPEC = 0x0 + RTAX_WINDOW = 0x3 + RTA_ALIGNTO = 0x4 + RTA_MAX = 0x10 + RTCF_DIRECTSRC = 0x4000000 + RTCF_DOREDIRECT = 0x1000000 + RTCF_LOG = 0x2000000 + RTCF_MASQ = 0x400000 + RTCF_NAT = 0x800000 + RTCF_VALVE = 0x200000 + RTF_ADDRCLASSMASK = 0xf8000000 + RTF_ADDRCONF = 0x40000 + RTF_ALLONLINK = 0x20000 + RTF_BROADCAST = 0x10000000 + RTF_CACHE = 0x1000000 + RTF_DEFAULT = 0x10000 + RTF_DYNAMIC = 0x10 + RTF_FLOW = 0x2000000 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_INTERFACE = 0x40000000 + RTF_IRTT = 0x100 + RTF_LINKRT = 0x100000 + RTF_LOCAL = 0x80000000 + RTF_MODIFIED = 0x20 + RTF_MSS = 0x40 + RTF_MTU = 0x40 + RTF_MULTICAST = 0x20000000 + RTF_NAT = 0x8000000 + RTF_NOFORWARD = 0x1000 + RTF_NONEXTHOP = 0x200000 + RTF_NOPMTUDISC = 0x4000 + RTF_POLICY = 0x4000000 + RTF_REINSTATE = 0x8 + RTF_REJECT = 0x200 + RTF_STATIC = 0x400 + RTF_THROW = 0x2000 + RTF_UP = 0x1 + RTF_WINDOW = 0x80 + RTF_XRESOLVE = 0x800 + RTM_BASE = 0x10 + RTM_DELACTION = 0x31 + RTM_DELADDR = 0x15 + RTM_DELADDRLABEL = 0x49 + RTM_DELLINK = 0x11 + RTM_DELNEIGH = 0x1d + RTM_DELQDISC = 0x25 + RTM_DELROUTE = 0x19 + RTM_DELRULE = 0x21 + RTM_DELTCLASS = 0x29 + RTM_DELTFILTER = 0x2d + RTM_F_CLONED = 0x200 + RTM_F_EQUALIZE = 0x400 + RTM_F_NOTIFY = 0x100 + RTM_F_PREFIX = 0x800 + RTM_GETACTION = 0x32 + RTM_GETADDR = 0x16 + RTM_GETADDRLABEL = 0x4a + RTM_GETANYCAST = 0x3e + RTM_GETDCB = 0x4e + RTM_GETLINK = 0x12 + RTM_GETMULTICAST = 0x3a + RTM_GETNEIGH = 0x1e + RTM_GETNEIGHTBL = 0x42 + RTM_GETQDISC = 0x26 + RTM_GETROUTE = 0x1a + RTM_GETRULE = 0x22 + RTM_GETTCLASS = 0x2a + RTM_GETTFILTER = 0x2e + RTM_MAX = 0x4f + RTM_NEWACTION = 0x30 + RTM_NEWADDR = 0x14 + RTM_NEWADDRLABEL = 0x48 + RTM_NEWLINK = 0x10 + RTM_NEWNDUSEROPT = 0x44 + RTM_NEWNEIGH = 0x1c + RTM_NEWNEIGHTBL = 0x40 + RTM_NEWPREFIX = 0x34 + RTM_NEWQDISC = 0x24 + RTM_NEWROUTE = 0x18 + RTM_NEWRULE = 0x20 + RTM_NEWTCLASS = 0x28 + RTM_NEWTFILTER = 0x2c + RTM_NR_FAMILIES = 0x10 + RTM_NR_MSGTYPES = 0x40 + RTM_SETDCB = 0x4f + RTM_SETLINK = 0x13 + RTM_SETNEIGHTBL = 0x43 + RTNH_ALIGNTO = 0x4 + RTNH_F_DEAD = 0x1 + RTNH_F_ONLINK = 0x4 + RTNH_F_PERVASIVE = 0x2 + RTN_MAX = 0xb + RTPROT_BIRD = 0xc + RTPROT_BOOT = 0x3 + RTPROT_DHCP = 0x10 + RTPROT_DNROUTED = 0xd + RTPROT_GATED = 0x8 + RTPROT_KERNEL = 0x2 + RTPROT_MRT = 0xa + RTPROT_NTK = 0xf + RTPROT_RA = 0x9 + RTPROT_REDIRECT = 0x1 + RTPROT_STATIC = 0x4 + RTPROT_UNSPEC = 0x0 + RTPROT_XORP = 0xe + RTPROT_ZEBRA = 0xb + RT_CLASS_DEFAULT = 0xfd + RT_CLASS_LOCAL = 0xff + RT_CLASS_MAIN = 0xfe + RT_CLASS_MAX = 0xff + RT_CLASS_UNSPEC = 0x0 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_CREDENTIALS = 0x2 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x1d + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPNS = 0x23 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDDLCI = 0x8980 + SIOCADDMULTI = 0x8931 + SIOCADDRT = 0x890b + SIOCATMARK = 0x8905 + SIOCDARP = 0x8953 + SIOCDELDLCI = 0x8981 + SIOCDELMULTI = 0x8932 + SIOCDELRT = 0x890c + SIOCDEVPRIVATE = 0x89f0 + SIOCDIFADDR = 0x8936 + SIOCDRARP = 0x8960 + SIOCGARP = 0x8954 + SIOCGIFADDR = 0x8915 + SIOCGIFBR = 0x8940 + SIOCGIFBRDADDR = 0x8919 + SIOCGIFCONF = 0x8912 + SIOCGIFCOUNT = 0x8938 + SIOCGIFDSTADDR = 0x8917 + SIOCGIFENCAP = 0x8925 + SIOCGIFFLAGS = 0x8913 + SIOCGIFHWADDR = 0x8927 + SIOCGIFINDEX = 0x8933 + SIOCGIFMAP = 0x8970 + SIOCGIFMEM = 0x891f + SIOCGIFMETRIC = 0x891d + SIOCGIFMTU = 0x8921 + SIOCGIFNAME = 0x8910 + SIOCGIFNETMASK = 0x891b + SIOCGIFPFLAGS = 0x8935 + SIOCGIFSLAVE = 0x8929 + SIOCGIFTXQLEN = 0x8942 + SIOCGPGRP = 0x8904 + SIOCGRARP = 0x8961 + SIOCGSTAMP = 0x8906 + SIOCGSTAMPNS = 0x8907 + SIOCPROTOPRIVATE = 0x89e0 + SIOCRTMSG = 0x890d + SIOCSARP = 0x8955 + SIOCSIFADDR = 0x8916 + SIOCSIFBR = 0x8941 + SIOCSIFBRDADDR = 0x891a + SIOCSIFDSTADDR = 0x8918 + SIOCSIFENCAP = 0x8926 + SIOCSIFFLAGS = 0x8914 + SIOCSIFHWADDR = 0x8924 + SIOCSIFHWBROADCAST = 0x8937 + SIOCSIFLINK = 0x8911 + SIOCSIFMAP = 0x8971 + SIOCSIFMEM = 0x8920 + SIOCSIFMETRIC = 0x891e + SIOCSIFMTU = 0x8922 + SIOCSIFNAME = 0x8923 + SIOCSIFNETMASK = 0x891c + SIOCSIFPFLAGS = 0x8934 + SIOCSIFSLAVE = 0x8930 + SIOCSIFTXQLEN = 0x8943 + SIOCSPGRP = 0x8902 + SIOCSRARP = 0x8962 + SOCK_CLOEXEC = 0x80000 + SOCK_DCCP = 0x6 + SOCK_DGRAM = 0x2 + SOCK_NONBLOCK = 0x800 + SOCK_PACKET = 0xa + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_AAL = 0x109 + SOL_ATM = 0x108 + SOL_DECNET = 0x105 + SOL_ICMPV6 = 0x3a + SOL_IP = 0x0 + SOL_IPV6 = 0x29 + SOL_IRDA = 0x10a + SOL_PACKET = 0x107 + SOL_RAW = 0xff + SOL_SOCKET = 0x1 + SOL_TCP = 0x6 + SOL_X25 = 0x106 + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x1e + SO_ATTACH_FILTER = 0x1a + SO_BINDTODEVICE = 0x19 + SO_BROADCAST = 0x6 + SO_BSDCOMPAT = 0xe + SO_DEBUG = 0x1 + SO_DETACH_FILTER = 0x1b + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 + SO_KEEPALIVE = 0x9 + SO_LINGER = 0xd + SO_MARK = 0x24 + SO_NO_CHECK = 0xb + SO_OOBINLINE = 0xa + SO_PASSCRED = 0x10 + SO_PASSSEC = 0x22 + SO_PEERCRED = 0x11 + SO_PEERNAME = 0x1c + SO_PEERSEC = 0x1f + SO_PRIORITY = 0xc + SO_PROTOCOL = 0x26 + SO_RCVBUF = 0x8 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x12 + SO_RCVTIMEO = 0x14 + SO_REUSEADDR = 0x2 + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SNDBUF = 0x7 + SO_SNDBUFFORCE = 0x20 + SO_SNDLOWAT = 0x13 + SO_SNDTIMEO = 0x15 + SO_TIMESTAMP = 0x1d + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TYPE = 0x3 + S_BLKSIZE = 0x200 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TCFLSH = 0x540b + TCIFLUSH = 0x0 + TCIOFLUSH = 0x2 + TCOFLUSH = 0x1 + TCP_CONGESTION = 0xd + TCP_CORK = 0x3 + TCP_DEFER_ACCEPT = 0x9 + TCP_INFO = 0xb + TCP_KEEPCNT = 0x6 + TCP_KEEPIDLE = 0x4 + TCP_KEEPINTVL = 0x5 + TCP_LINGER2 = 0x8 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0xe + TCP_MD5SIG_MAXKEYLEN = 0x50 + TCP_MSS = 0x200 + TCP_NODELAY = 0x1 + TCP_QUICKACK = 0xc + TCP_SYNCNT = 0x7 + TCP_WINDOW_CLAMP = 0xa + TCSAFLUSH = 0x2 + TIOCCBRK = 0x5428 + TIOCCONS = 0x541d + TIOCEXCL = 0x540c + TIOCGDEV = 0x80045432 + TIOCGETD = 0x5424 + TIOCGICOUNT = 0x545d + TIOCGLCKTRMIOS = 0x5456 + TIOCGPGRP = 0x540f + TIOCGPTN = 0x80045430 + TIOCGRS485 = 0x542e + TIOCGSERIAL = 0x541e + TIOCGSID = 0x5429 + TIOCGSOFTCAR = 0x5419 + TIOCGWINSZ = 0x5413 + TIOCINQ = 0x541b + TIOCLINUX = 0x541c + TIOCMBIC = 0x5417 + TIOCMBIS = 0x5416 + TIOCMGET = 0x5415 + TIOCMIWAIT = 0x545c + TIOCMSET = 0x5418 + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x5422 + TIOCNXCL = 0x540d + TIOCOUTQ = 0x5411 + TIOCPKT = 0x5420 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x540e + TIOCSERCONFIG = 0x5453 + TIOCSERGETLSR = 0x5459 + TIOCSERGETMULTI = 0x545a + TIOCSERGSTRUCT = 0x5458 + TIOCSERGWILD = 0x5454 + TIOCSERSETMULTI = 0x545b + TIOCSERSWILD = 0x5455 + TIOCSER_TEMT = 0x1 + TIOCSETD = 0x5423 + TIOCSIG = 0x40045436 + TIOCSLCKTRMIOS = 0x5457 + TIOCSPGRP = 0x5410 + TIOCSPTLCK = 0x40045431 + TIOCSRS485 = 0x542f + TIOCSSERIAL = 0x541f + TIOCSSOFTCAR = 0x541a + TIOCSTI = 0x5412 + TIOCSWINSZ = 0x5414 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x100 + TUNATTACHFILTER = 0x401054d5 + TUNDETACHFILTER = 0x401054d6 + TUNGETFEATURES = 0x800454cf + TUNGETIFF = 0x800454d2 + TUNGETSNDBUF = 0x800454d3 + TUNGETVNETHDRSZ = 0x800454d7 + TUNSETDEBUG = 0x400454c9 + TUNSETGROUP = 0x400454ce + TUNSETIFF = 0x400454ca + TUNSETLINK = 0x400454cd + TUNSETNOCSUM = 0x400454c8 + TUNSETOFFLOAD = 0x400454d0 + TUNSETOWNER = 0x400454cc + TUNSETPERSIST = 0x400454cb + TUNSETSNDBUF = 0x400454d4 + TUNSETTXFILTER = 0x400454d1 + TUNSETVNETHDRSZ = 0x400454d8 + VDISCARD = 0xd + VEOF = 0x4 + VEOL = 0xb + VEOL2 = 0x10 + VERASE = 0x2 + VINTR = 0x0 + VKILL = 0x3 + VLNEXT = 0xf + VMIN = 0x6 + VQUIT = 0x1 + VREPRINT = 0xc + VSTART = 0x8 + VSTOP = 0x9 + VSUSP = 0xa + VSWTC = 0x7 + VT0 = 0x0 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe + WALL = 0x40000000 + WCLONE = 0x80000000 + WCONTINUED = 0x8 + WEXITED = 0x4 + WNOHANG = 0x1 + WNOTHREAD = 0x20000000 + WNOWAIT = 0x1000000 + WORDSIZE = 0x40 + WSTOPPED = 0x2 + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x62) + EADDRNOTAVAIL = syscall.Errno(0x63) + EADV = syscall.Errno(0x44) + EAFNOSUPPORT = syscall.Errno(0x61) + EAGAIN = syscall.Errno(0xb) + EALREADY = syscall.Errno(0x72) + EBADE = syscall.Errno(0x34) + EBADF = syscall.Errno(0x9) + EBADFD = syscall.Errno(0x4d) + EBADMSG = syscall.Errno(0x4a) + EBADR = syscall.Errno(0x35) + EBADRQC = syscall.Errno(0x38) + EBADSLT = syscall.Errno(0x39) + EBFONT = syscall.Errno(0x3b) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x7d) + ECHILD = syscall.Errno(0xa) + ECHRNG = syscall.Errno(0x2c) + ECOMM = syscall.Errno(0x46) + ECONNABORTED = syscall.Errno(0x67) + ECONNREFUSED = syscall.Errno(0x6f) + ECONNRESET = syscall.Errno(0x68) + EDEADLK = syscall.Errno(0x23) + EDEADLOCK = syscall.Errno(0x23) + EDESTADDRREQ = syscall.Errno(0x59) + EDOM = syscall.Errno(0x21) + EDOTDOT = syscall.Errno(0x49) + EDQUOT = syscall.Errno(0x7a) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EHOSTDOWN = syscall.Errno(0x70) + EHOSTUNREACH = syscall.Errno(0x71) + EHWPOISON = syscall.Errno(0x85) + EIDRM = syscall.Errno(0x2b) + EILSEQ = syscall.Errno(0x54) + EINPROGRESS = syscall.Errno(0x73) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x6a) + EISDIR = syscall.Errno(0x15) + EISNAM = syscall.Errno(0x78) + EKEYEXPIRED = syscall.Errno(0x7f) + EKEYREJECTED = syscall.Errno(0x81) + EKEYREVOKED = syscall.Errno(0x80) + EL2HLT = syscall.Errno(0x33) + EL2NSYNC = syscall.Errno(0x2d) + EL3HLT = syscall.Errno(0x2e) + EL3RST = syscall.Errno(0x2f) + ELIBACC = syscall.Errno(0x4f) + ELIBBAD = syscall.Errno(0x50) + ELIBEXEC = syscall.Errno(0x53) + ELIBMAX = syscall.Errno(0x52) + ELIBSCN = syscall.Errno(0x51) + ELNRNG = syscall.Errno(0x30) + ELOOP = syscall.Errno(0x28) + EMEDIUMTYPE = syscall.Errno(0x7c) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x5a) + EMULTIHOP = syscall.Errno(0x48) + ENAMETOOLONG = syscall.Errno(0x24) + ENAVAIL = syscall.Errno(0x77) + ENETDOWN = syscall.Errno(0x64) + ENETRESET = syscall.Errno(0x66) + ENETUNREACH = syscall.Errno(0x65) + ENFILE = syscall.Errno(0x17) + ENOANO = syscall.Errno(0x37) + ENOBUFS = syscall.Errno(0x69) + ENOCSI = syscall.Errno(0x32) + ENODATA = syscall.Errno(0x3d) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOKEY = syscall.Errno(0x7e) + ENOLCK = syscall.Errno(0x25) + ENOLINK = syscall.Errno(0x43) + ENOMEDIUM = syscall.Errno(0x7b) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x2a) + ENONET = syscall.Errno(0x40) + ENOPKG = syscall.Errno(0x41) + ENOPROTOOPT = syscall.Errno(0x5c) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x3f) + ENOSTR = syscall.Errno(0x3c) + ENOSYS = syscall.Errno(0x26) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x6b) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x27) + ENOTNAM = syscall.Errno(0x76) + ENOTRECOVERABLE = syscall.Errno(0x83) + ENOTSOCK = syscall.Errno(0x58) + ENOTSUP = syscall.Errno(0x5f) + ENOTTY = syscall.Errno(0x19) + ENOTUNIQ = syscall.Errno(0x4c) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x5f) + EOVERFLOW = syscall.Errno(0x4b) + EOWNERDEAD = syscall.Errno(0x82) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x60) + EPIPE = syscall.Errno(0x20) + EPROTO = syscall.Errno(0x47) + EPROTONOSUPPORT = syscall.Errno(0x5d) + EPROTOTYPE = syscall.Errno(0x5b) + ERANGE = syscall.Errno(0x22) + EREMCHG = syscall.Errno(0x4e) + EREMOTE = syscall.Errno(0x42) + EREMOTEIO = syscall.Errno(0x79) + ERESTART = syscall.Errno(0x55) + ERFKILL = syscall.Errno(0x84) + EROFS = syscall.Errno(0x1e) + ESHUTDOWN = syscall.Errno(0x6c) + ESOCKTNOSUPPORT = syscall.Errno(0x5e) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESRMNT = syscall.Errno(0x45) + ESTALE = syscall.Errno(0x74) + ESTRPIPE = syscall.Errno(0x56) + ETIME = syscall.Errno(0x3e) + ETIMEDOUT = syscall.Errno(0x6e) + ETOOMANYREFS = syscall.Errno(0x6d) + ETXTBSY = syscall.Errno(0x1a) + EUCLEAN = syscall.Errno(0x75) + EUNATCH = syscall.Errno(0x31) + EUSERS = syscall.Errno(0x57) + EWOULDBLOCK = syscall.Errno(0xb) + EXDEV = syscall.Errno(0x12) + EXFULL = syscall.Errno(0x36) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0x7) + SIGCHLD = syscall.Signal(0x11) + SIGCLD = syscall.Signal(0x11) + SIGCONT = syscall.Signal(0x12) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x1d) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPOLL = syscall.Signal(0x1d) + SIGPROF = syscall.Signal(0x1b) + SIGPWR = syscall.Signal(0x1e) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTKFLT = syscall.Signal(0x10) + SIGSTOP = syscall.Signal(0x13) + SIGSYS = syscall.Signal(0x1f) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x14) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGUNUSED = syscall.Signal(0x1f) + SIGURG = syscall.Signal(0x17) + SIGUSR1 = syscall.Signal(0xa) + SIGUSR2 = syscall.Signal(0xc) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "no such device or address", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource temporarily unavailable", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device or resource busy", + 17: "file exists", + 18: "invalid cross-device link", + 19: "no such device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "numerical result out of range", + 35: "resource deadlock avoided", + 36: "file name too long", + 37: "no locks available", + 38: "function not implemented", + 39: "directory not empty", + 40: "too many levels of symbolic links", + 42: "no message of desired type", + 43: "identifier removed", + 44: "channel number out of range", + 45: "level 2 not synchronized", + 46: "level 3 halted", + 47: "level 3 reset", + 48: "link number out of range", + 49: "protocol driver not attached", + 50: "no CSI structure available", + 51: "level 2 halted", + 52: "invalid exchange", + 53: "invalid request descriptor", + 54: "exchange full", + 55: "no anode", + 56: "invalid request code", + 57: "invalid slot", + 59: "bad font file format", + 60: "device not a stream", + 61: "no data available", + 62: "timer expired", + 63: "out of streams resources", + 64: "machine is not on the network", + 65: "package not installed", + 66: "object is remote", + 67: "link has been severed", + 68: "advertise error", + 69: "srmount error", + 70: "communication error on send", + 71: "protocol error", + 72: "multihop attempted", + 73: "RFS specific error", + 74: "bad message", + 75: "value too large for defined data type", + 76: "name not unique on network", + 77: "file descriptor in bad state", + 78: "remote address changed", + 79: "can not access a needed shared library", + 80: "accessing a corrupted shared library", + 81: ".lib section in a.out corrupted", + 82: "attempting to link in too many shared libraries", + 83: "cannot exec a shared library directly", + 84: "invalid or incomplete multibyte or wide character", + 85: "interrupted system call should be restarted", + 86: "streams pipe error", + 87: "too many users", + 88: "socket operation on non-socket", + 89: "destination address required", + 90: "message too long", + 91: "protocol wrong type for socket", + 92: "protocol not available", + 93: "protocol not supported", + 94: "socket type not supported", + 95: "operation not supported", + 96: "protocol family not supported", + 97: "address family not supported by protocol", + 98: "address already in use", + 99: "cannot assign requested address", + 100: "network is down", + 101: "network is unreachable", + 102: "network dropped connection on reset", + 103: "software caused connection abort", + 104: "connection reset by peer", + 105: "no buffer space available", + 106: "transport endpoint is already connected", + 107: "transport endpoint is not connected", + 108: "cannot send after transport endpoint shutdown", + 109: "too many references: cannot splice", + 110: "connection timed out", + 111: "connection refused", + 112: "host is down", + 113: "no route to host", + 114: "operation already in progress", + 115: "operation now in progress", + 116: "stale NFS file handle", + 117: "structure needs cleaning", + 118: "not a XENIX named type file", + 119: "no XENIX semaphores available", + 120: "is a named type file", + 121: "remote I/O error", + 122: "disk quota exceeded", + 123: "no medium found", + 124: "wrong medium type", + 125: "operation canceled", + 126: "required key not available", + 127: "key has expired", + 128: "key has been revoked", + 129: "key was rejected by service", + 130: "owner died", + 131: "state not recoverable", + 132: "operation not possible due to RF-kill", + 133: "unknown error 133", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/breakpoint trap", + 6: "aborted", + 7: "bus error", + 8: "floating point exception", + 9: "killed", + 10: "user defined signal 1", + 11: "segmentation fault", + 12: "user defined signal 2", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "stack fault", + 17: "child exited", + 18: "continued", + 19: "stopped (signal)", + 20: "stopped", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "urgent I/O condition", + 24: "CPU time limit exceeded", + 25: "file size limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window changed", + 29: "I/O possible", + 30: "power failure", + 31: "bad system call", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go new file mode 100644 index 0000000..4535b78 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go @@ -0,0 +1,1577 @@ +// mkerrors.sh +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build arm,linux + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- _const.go + +package unix + +import "syscall" + +const ( + AF_ALG = 0x26 + AF_APPLETALK = 0x5 + AF_ASH = 0x12 + AF_ATMPVC = 0x8 + AF_ATMSVC = 0x14 + AF_AX25 = 0x3 + AF_BLUETOOTH = 0x1f + AF_BRIDGE = 0x7 + AF_CAIF = 0x25 + AF_CAN = 0x1d + AF_DECnet = 0xc + AF_ECONET = 0x13 + AF_FILE = 0x1 + AF_IEEE802154 = 0x24 + AF_INET = 0x2 + AF_INET6 = 0xa + AF_IPX = 0x4 + AF_IRDA = 0x17 + AF_ISDN = 0x22 + AF_IUCV = 0x20 + AF_KEY = 0xf + AF_LLC = 0x1a + AF_LOCAL = 0x1 + AF_MAX = 0x27 + AF_NETBEUI = 0xd + AF_NETLINK = 0x10 + AF_NETROM = 0x6 + AF_PACKET = 0x11 + AF_PHONET = 0x23 + AF_PPPOX = 0x18 + AF_RDS = 0x15 + AF_ROSE = 0xb + AF_ROUTE = 0x10 + AF_RXRPC = 0x21 + AF_SECURITY = 0xe + AF_SNA = 0x16 + AF_TIPC = 0x1e + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_WANPIPE = 0x19 + AF_X25 = 0x9 + ARPHRD_ADAPT = 0x108 + ARPHRD_APPLETLK = 0x8 + ARPHRD_ARCNET = 0x7 + ARPHRD_ASH = 0x30d + ARPHRD_ATM = 0x13 + ARPHRD_AX25 = 0x3 + ARPHRD_BIF = 0x307 + ARPHRD_CHAOS = 0x5 + ARPHRD_CISCO = 0x201 + ARPHRD_CSLIP = 0x101 + ARPHRD_CSLIP6 = 0x103 + ARPHRD_DDCMP = 0x205 + ARPHRD_DLCI = 0xf + ARPHRD_ECONET = 0x30e + ARPHRD_EETHER = 0x2 + ARPHRD_ETHER = 0x1 + ARPHRD_EUI64 = 0x1b + ARPHRD_FCAL = 0x311 + ARPHRD_FCFABRIC = 0x313 + ARPHRD_FCPL = 0x312 + ARPHRD_FCPP = 0x310 + ARPHRD_FDDI = 0x306 + ARPHRD_FRAD = 0x302 + ARPHRD_HDLC = 0x201 + ARPHRD_HIPPI = 0x30c + ARPHRD_HWX25 = 0x110 + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + ARPHRD_IEEE80211 = 0x321 + ARPHRD_IEEE80211_PRISM = 0x322 + ARPHRD_IEEE80211_RADIOTAP = 0x323 + ARPHRD_IEEE802154 = 0x324 + ARPHRD_IEEE802154_PHY = 0x325 + ARPHRD_IEEE802_TR = 0x320 + ARPHRD_INFINIBAND = 0x20 + ARPHRD_IPDDP = 0x309 + ARPHRD_IPGRE = 0x30a + ARPHRD_IRDA = 0x30f + ARPHRD_LAPB = 0x204 + ARPHRD_LOCALTLK = 0x305 + ARPHRD_LOOPBACK = 0x304 + ARPHRD_METRICOM = 0x17 + ARPHRD_NETROM = 0x0 + ARPHRD_NONE = 0xfffe + ARPHRD_PIMREG = 0x30b + ARPHRD_PPP = 0x200 + ARPHRD_PRONET = 0x4 + ARPHRD_RAWHDLC = 0x206 + ARPHRD_ROSE = 0x10e + ARPHRD_RSRVD = 0x104 + ARPHRD_SIT = 0x308 + ARPHRD_SKIP = 0x303 + ARPHRD_SLIP = 0x100 + ARPHRD_SLIP6 = 0x102 + ARPHRD_TUNNEL = 0x300 + ARPHRD_TUNNEL6 = 0x301 + ARPHRD_VOID = 0xffff + ARPHRD_X25 = 0x10f + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXINSNS = 0x1000 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + CLOCK_BOOTTIME = 0x7 + CLOCK_BOOTTIME_ALARM = 0x9 + CLOCK_DEFAULT = 0x0 + CLOCK_EXT = 0x1 + CLOCK_INT = 0x2 + CLOCK_MONOTONIC = 0x1 + CLOCK_MONOTONIC_COARSE = 0x6 + CLOCK_MONOTONIC_RAW = 0x4 + CLOCK_PROCESS_CPUTIME_ID = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_REALTIME_ALARM = 0x8 + CLOCK_REALTIME_COARSE = 0x5 + CLOCK_THREAD_CPUTIME_ID = 0x3 + CLOCK_TXFROMRX = 0x4 + CLOCK_TXINT = 0x3 + CLONE_CHILD_CLEARTID = 0x200000 + CLONE_CHILD_SETTID = 0x1000000 + CLONE_DETACHED = 0x400000 + CLONE_FILES = 0x400 + CLONE_FS = 0x200 + CLONE_IO = 0x80000000 + CLONE_NEWIPC = 0x8000000 + CLONE_NEWNET = 0x40000000 + CLONE_NEWNS = 0x20000 + CLONE_NEWPID = 0x20000000 + CLONE_NEWUSER = 0x10000000 + CLONE_NEWUTS = 0x4000000 + CLONE_PARENT = 0x8000 + CLONE_PARENT_SETTID = 0x100000 + CLONE_PTRACE = 0x2000 + CLONE_SETTLS = 0x80000 + CLONE_SIGHAND = 0x800 + CLONE_SYSVSEM = 0x40000 + CLONE_THREAD = 0x10000 + CLONE_UNTRACED = 0x800000 + CLONE_VFORK = 0x4000 + CLONE_VM = 0x100 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ELF_NGREG = 0x12 + ELF_PRARGSZ = 0x50 + EPOLLERR = 0x8 + EPOLLET = -0x80000000 + EPOLLHUP = 0x10 + EPOLLIN = 0x1 + EPOLLMSG = 0x400 + EPOLLONESHOT = 0x40000000 + EPOLLOUT = 0x4 + EPOLLPRI = 0x2 + EPOLLRDBAND = 0x80 + EPOLLRDHUP = 0x2000 + EPOLLRDNORM = 0x40 + EPOLLWRBAND = 0x200 + EPOLLWRNORM = 0x100 + EPOLL_CLOEXEC = 0x80000 + EPOLL_CTL_ADD = 0x1 + EPOLL_CTL_DEL = 0x2 + EPOLL_CTL_MOD = 0x3 + EPOLL_NONBLOCK = 0x800 + ETH_P_1588 = 0x88f7 + ETH_P_8021Q = 0x8100 + ETH_P_802_2 = 0x4 + ETH_P_802_3 = 0x1 + ETH_P_AARP = 0x80f3 + ETH_P_ALL = 0x3 + ETH_P_AOE = 0x88a2 + ETH_P_ARCNET = 0x1a + ETH_P_ARP = 0x806 + ETH_P_ATALK = 0x809b + ETH_P_ATMFATE = 0x8884 + ETH_P_ATMMPOA = 0x884c + ETH_P_AX25 = 0x2 + ETH_P_BPQ = 0x8ff + ETH_P_CAIF = 0xf7 + ETH_P_CAN = 0xc + ETH_P_CONTROL = 0x16 + ETH_P_CUST = 0x6006 + ETH_P_DDCMP = 0x6 + ETH_P_DEC = 0x6000 + ETH_P_DIAG = 0x6005 + ETH_P_DNA_DL = 0x6001 + ETH_P_DNA_RC = 0x6002 + ETH_P_DNA_RT = 0x6003 + ETH_P_DSA = 0x1b + ETH_P_ECONET = 0x18 + ETH_P_EDSA = 0xdada + ETH_P_FCOE = 0x8906 + ETH_P_FIP = 0x8914 + ETH_P_HDLC = 0x19 + ETH_P_IEEE802154 = 0xf6 + ETH_P_IEEEPUP = 0xa00 + ETH_P_IEEEPUPAT = 0xa01 + ETH_P_IP = 0x800 + ETH_P_IPV6 = 0x86dd + ETH_P_IPX = 0x8137 + ETH_P_IRDA = 0x17 + ETH_P_LAT = 0x6004 + ETH_P_LINK_CTL = 0x886c + ETH_P_LOCALTALK = 0x9 + ETH_P_LOOP = 0x60 + ETH_P_MOBITEX = 0x15 + ETH_P_MPLS_MC = 0x8848 + ETH_P_MPLS_UC = 0x8847 + ETH_P_PAE = 0x888e + ETH_P_PAUSE = 0x8808 + ETH_P_PHONET = 0xf5 + ETH_P_PPPTALK = 0x10 + ETH_P_PPP_DISC = 0x8863 + ETH_P_PPP_MP = 0x8 + ETH_P_PPP_SES = 0x8864 + ETH_P_PUP = 0x200 + ETH_P_PUPAT = 0x201 + ETH_P_RARP = 0x8035 + ETH_P_SCA = 0x6007 + ETH_P_SLOW = 0x8809 + ETH_P_SNAP = 0x5 + ETH_P_TEB = 0x6558 + ETH_P_TIPC = 0x88ca + ETH_P_TRAILER = 0x1c + ETH_P_TR_802_2 = 0x11 + ETH_P_WAN_PPP = 0x7 + ETH_P_WCCP = 0x883e + ETH_P_X25 = 0x805 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x406 + F_EXLCK = 0x4 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLEASE = 0x401 + F_GETLK = 0xc + F_GETLK64 = 0xc + F_GETOWN = 0x9 + F_GETOWN_EX = 0x10 + F_GETPIPE_SZ = 0x408 + F_GETSIG = 0xb + F_LOCK = 0x1 + F_NOTIFY = 0x402 + F_OK = 0x0 + F_RDLCK = 0x0 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLEASE = 0x400 + F_SETLK = 0xd + F_SETLK64 = 0xd + F_SETLKW = 0xe + F_SETLKW64 = 0xe + F_SETOWN = 0x8 + F_SETOWN_EX = 0xf + F_SETPIPE_SZ = 0x407 + F_SETSIG = 0xa + F_SHLCK = 0x8 + F_TEST = 0x3 + F_TLOCK = 0x2 + F_ULOCK = 0x0 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + ICMPV6_FILTER = 0x1 + IFA_F_DADFAILED = 0x8 + IFA_F_DEPRECATED = 0x20 + IFA_F_HOMEADDRESS = 0x10 + IFA_F_NODAD = 0x2 + IFA_F_OPTIMISTIC = 0x4 + IFA_F_PERMANENT = 0x80 + IFA_F_SECONDARY = 0x1 + IFA_F_TEMPORARY = 0x1 + IFA_F_TENTATIVE = 0x40 + IFA_MAX = 0x7 + IFF_ALLMULTI = 0x200 + IFF_AUTOMEDIA = 0x4000 + IFF_BROADCAST = 0x2 + IFF_DEBUG = 0x4 + IFF_DYNAMIC = 0x8000 + IFF_LOOPBACK = 0x8 + IFF_MASTER = 0x400 + IFF_MULTICAST = 0x1000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_NO_PI = 0x1000 + IFF_ONE_QUEUE = 0x2000 + IFF_POINTOPOINT = 0x10 + IFF_PORTSEL = 0x2000 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SLAVE = 0x800 + IFF_TAP = 0x2 + IFF_TUN = 0x1 + IFF_TUN_EXCL = 0x8000 + IFF_UP = 0x1 + IFF_VNET_HDR = 0x4000 + IFNAMSIZ = 0x10 + IN_ACCESS = 0x1 + IN_ALL_EVENTS = 0xfff + IN_ATTRIB = 0x4 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLOEXEC = 0x80000 + IN_CLOSE = 0x18 + IN_CLOSE_NOWRITE = 0x10 + IN_CLOSE_WRITE = 0x8 + IN_CREATE = 0x100 + IN_DELETE = 0x200 + IN_DELETE_SELF = 0x400 + IN_DONT_FOLLOW = 0x2000000 + IN_EXCL_UNLINK = 0x4000000 + IN_IGNORED = 0x8000 + IN_ISDIR = 0x40000000 + IN_LOOPBACKNET = 0x7f + IN_MASK_ADD = 0x20000000 + IN_MODIFY = 0x2 + IN_MOVE = 0xc0 + IN_MOVED_FROM = 0x40 + IN_MOVED_TO = 0x80 + IN_MOVE_SELF = 0x800 + IN_NONBLOCK = 0x800 + IN_ONESHOT = 0x80000000 + IN_ONLYDIR = 0x1000000 + IN_OPEN = 0x20 + IN_Q_OVERFLOW = 0x4000 + IN_UNMOUNT = 0x2000 + IPPROTO_AH = 0x33 + IPPROTO_COMP = 0x6c + IPPROTO_DCCP = 0x21 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_ESP = 0x32 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPIP = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_MTP = 0x5c + IPPROTO_NONE = 0x3b + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPV6_2292DSTOPTS = 0x4 + IPV6_2292HOPLIMIT = 0x8 + IPV6_2292HOPOPTS = 0x3 + IPV6_2292PKTINFO = 0x2 + IPV6_2292PKTOPTIONS = 0x6 + IPV6_2292RTHDR = 0x5 + IPV6_ADDRFORM = 0x1 + IPV6_ADD_MEMBERSHIP = 0x14 + IPV6_AUTHHDR = 0xa + IPV6_CHECKSUM = 0x7 + IPV6_DROP_MEMBERSHIP = 0x15 + IPV6_DSTOPTS = 0x3b + IPV6_HOPLIMIT = 0x34 + IPV6_HOPOPTS = 0x36 + IPV6_IPSEC_POLICY = 0x22 + IPV6_JOIN_ANYCAST = 0x1b + IPV6_JOIN_GROUP = 0x14 + IPV6_LEAVE_ANYCAST = 0x1c + IPV6_LEAVE_GROUP = 0x15 + IPV6_MTU = 0x18 + IPV6_MTU_DISCOVER = 0x17 + IPV6_MULTICAST_HOPS = 0x12 + IPV6_MULTICAST_IF = 0x11 + IPV6_MULTICAST_LOOP = 0x13 + IPV6_NEXTHOP = 0x9 + IPV6_PKTINFO = 0x32 + IPV6_PMTUDISC_DO = 0x2 + IPV6_PMTUDISC_DONT = 0x0 + IPV6_PMTUDISC_PROBE = 0x3 + IPV6_PMTUDISC_WANT = 0x1 + IPV6_RECVDSTOPTS = 0x3a + IPV6_RECVERR = 0x19 + IPV6_RECVHOPLIMIT = 0x33 + IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVPKTINFO = 0x31 + IPV6_RECVRTHDR = 0x38 + IPV6_RECVTCLASS = 0x42 + IPV6_ROUTER_ALERT = 0x16 + IPV6_RTHDR = 0x39 + IPV6_RTHDRDSTOPTS = 0x37 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_RXDSTOPTS = 0x3b + IPV6_RXHOPOPTS = 0x36 + IPV6_TCLASS = 0x43 + IPV6_UNICAST_HOPS = 0x10 + IPV6_V6ONLY = 0x1a + IPV6_XFRM_POLICY = 0x23 + IP_ADD_MEMBERSHIP = 0x23 + IP_ADD_SOURCE_MEMBERSHIP = 0x27 + IP_BLOCK_SOURCE = 0x26 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0x24 + IP_DROP_SOURCE_MEMBERSHIP = 0x28 + IP_FREEBIND = 0xf + IP_HDRINCL = 0x3 + IP_IPSEC_POLICY = 0x10 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINTTL = 0x15 + IP_MSFILTER = 0x29 + IP_MSS = 0x240 + IP_MTU = 0xe + IP_MTU_DISCOVER = 0xa + IP_MULTICAST_IF = 0x20 + IP_MULTICAST_LOOP = 0x22 + IP_MULTICAST_TTL = 0x21 + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x4 + IP_ORIGDSTADDR = 0x14 + IP_PASSSEC = 0x12 + IP_PKTINFO = 0x8 + IP_PKTOPTIONS = 0x9 + IP_PMTUDISC = 0xa + IP_PMTUDISC_DO = 0x2 + IP_PMTUDISC_DONT = 0x0 + IP_PMTUDISC_PROBE = 0x3 + IP_PMTUDISC_WANT = 0x1 + IP_RECVERR = 0xb + IP_RECVOPTS = 0x6 + IP_RECVORIGDSTADDR = 0x14 + IP_RECVRETOPTS = 0x7 + IP_RECVTOS = 0xd + IP_RECVTTL = 0xc + IP_RETOPTS = 0x7 + IP_RF = 0x8000 + IP_ROUTER_ALERT = 0x5 + IP_TOS = 0x1 + IP_TRANSPARENT = 0x13 + IP_TTL = 0x2 + IP_UNBLOCK_SOURCE = 0x25 + IP_XFRM_POLICY = 0x11 + LINUX_REBOOT_CMD_CAD_OFF = 0x0 + LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef + LINUX_REBOOT_CMD_HALT = 0xcdef0123 + LINUX_REBOOT_CMD_KEXEC = 0x45584543 + LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc + LINUX_REBOOT_CMD_RESTART = 0x1234567 + LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 + LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 + LINUX_REBOOT_MAGIC1 = 0xfee1dead + LINUX_REBOOT_MAGIC2 = 0x28121969 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DOFORK = 0xb + MADV_DONTFORK = 0xa + MADV_DONTNEED = 0x4 + MADV_HUGEPAGE = 0xe + MADV_HWPOISON = 0x64 + MADV_MERGEABLE = 0xc + MADV_NOHUGEPAGE = 0xf + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_REMOVE = 0x9 + MADV_SEQUENTIAL = 0x2 + MADV_UNMERGEABLE = 0xd + MADV_WILLNEED = 0x3 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 + MAP_EXECUTABLE = 0x1000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_GROWSDOWN = 0x100 + MAP_LOCKED = 0x2000 + MAP_NONBLOCK = 0x10000 + MAP_NORESERVE = 0x4000 + MAP_POPULATE = 0x8000 + MAP_PRIVATE = 0x2 + MAP_SHARED = 0x1 + MAP_TYPE = 0xf + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MNT_DETACH = 0x2 + MNT_EXPIRE = 0x4 + MNT_FORCE = 0x1 + MSG_CMSG_CLOEXEC = 0x40000000 + MSG_CONFIRM = 0x800 + MSG_CTRUNC = 0x8 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x40 + MSG_EOR = 0x80 + MSG_ERRQUEUE = 0x2000 + MSG_FASTOPEN = 0x20000000 + MSG_FIN = 0x200 + MSG_MORE = 0x8000 + MSG_NOSIGNAL = 0x4000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_PROXY = 0x10 + MSG_RST = 0x1000 + MSG_SYN = 0x400 + MSG_TRUNC = 0x20 + MSG_TRYHARD = 0x4 + MSG_WAITALL = 0x100 + MSG_WAITFORONE = 0x10000 + MS_ACTIVE = 0x40000000 + MS_ASYNC = 0x1 + MS_BIND = 0x1000 + MS_DIRSYNC = 0x80 + MS_INVALIDATE = 0x2 + MS_I_VERSION = 0x800000 + MS_KERNMOUNT = 0x400000 + MS_MANDLOCK = 0x40 + MS_MGC_MSK = 0xffff0000 + MS_MGC_VAL = 0xc0ed0000 + MS_MOVE = 0x2000 + MS_NOATIME = 0x400 + MS_NODEV = 0x4 + MS_NODIRATIME = 0x800 + MS_NOEXEC = 0x8 + MS_NOSUID = 0x2 + MS_NOUSER = -0x80000000 + MS_POSIXACL = 0x10000 + MS_PRIVATE = 0x40000 + MS_RDONLY = 0x1 + MS_REC = 0x4000 + MS_RELATIME = 0x200000 + MS_REMOUNT = 0x20 + MS_RMT_MASK = 0x800051 + MS_SHARED = 0x100000 + MS_SILENT = 0x8000 + MS_SLAVE = 0x80000 + MS_STRICTATIME = 0x1000000 + MS_SYNC = 0x4 + MS_SYNCHRONOUS = 0x10 + MS_UNBINDABLE = 0x20000 + NAME_MAX = 0xff + NETLINK_ADD_MEMBERSHIP = 0x1 + NETLINK_AUDIT = 0x9 + NETLINK_BROADCAST_ERROR = 0x4 + NETLINK_CONNECTOR = 0xb + NETLINK_DNRTMSG = 0xe + NETLINK_DROP_MEMBERSHIP = 0x2 + NETLINK_ECRYPTFS = 0x13 + NETLINK_FIB_LOOKUP = 0xa + NETLINK_FIREWALL = 0x3 + NETLINK_GENERIC = 0x10 + NETLINK_INET_DIAG = 0x4 + NETLINK_IP6_FW = 0xd + NETLINK_ISCSI = 0x8 + NETLINK_KOBJECT_UEVENT = 0xf + NETLINK_NETFILTER = 0xc + NETLINK_NFLOG = 0x5 + NETLINK_NO_ENOBUFS = 0x5 + NETLINK_PKTINFO = 0x3 + NETLINK_RDMA = 0x14 + NETLINK_ROUTE = 0x0 + NETLINK_SCSITRANSPORT = 0x12 + NETLINK_SELINUX = 0x7 + NETLINK_UNUSED = 0x1 + NETLINK_USERSOCK = 0x2 + NETLINK_XFRM = 0x6 + NLA_ALIGNTO = 0x4 + NLA_F_NESTED = 0x8000 + NLA_F_NET_BYTEORDER = 0x4000 + NLA_HDRLEN = 0x4 + NLMSG_ALIGNTO = 0x4 + NLMSG_DONE = 0x3 + NLMSG_ERROR = 0x2 + NLMSG_HDRLEN = 0x10 + NLMSG_MIN_TYPE = 0x10 + NLMSG_NOOP = 0x1 + NLMSG_OVERRUN = 0x4 + NLM_F_ACK = 0x4 + NLM_F_APPEND = 0x800 + NLM_F_ATOMIC = 0x400 + NLM_F_CREATE = 0x400 + NLM_F_DUMP = 0x300 + NLM_F_ECHO = 0x8 + NLM_F_EXCL = 0x200 + NLM_F_MATCH = 0x200 + NLM_F_MULTI = 0x2 + NLM_F_REPLACE = 0x100 + NLM_F_REQUEST = 0x1 + NLM_F_ROOT = 0x100 + O_ACCMODE = 0x3 + O_APPEND = 0x400 + O_ASYNC = 0x2000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x40 + O_DIRECT = 0x10000 + O_DIRECTORY = 0x4000 + O_DSYNC = 0x1000 + O_EXCL = 0x80 + O_FSYNC = 0x1000 + O_LARGEFILE = 0x20000 + O_NDELAY = 0x800 + O_NOATIME = 0x40000 + O_NOCTTY = 0x100 + O_NOFOLLOW = 0x8000 + O_NONBLOCK = 0x800 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x1000 + O_SYNC = 0x1000 + O_TRUNC = 0x200 + O_WRONLY = 0x1 + PACKET_ADD_MEMBERSHIP = 0x1 + PACKET_BROADCAST = 0x1 + PACKET_DROP_MEMBERSHIP = 0x2 + PACKET_FASTROUTE = 0x6 + PACKET_HOST = 0x0 + PACKET_LOOPBACK = 0x5 + PACKET_MR_ALLMULTI = 0x2 + PACKET_MR_MULTICAST = 0x0 + PACKET_MR_PROMISC = 0x1 + PACKET_MULTICAST = 0x2 + PACKET_OTHERHOST = 0x3 + PACKET_OUTGOING = 0x4 + PACKET_RECV_OUTPUT = 0x3 + PACKET_RX_RING = 0x5 + PACKET_STATISTICS = 0x6 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_GROWSDOWN = 0x1000000 + PROT_GROWSUP = 0x2000000 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PR_CAPBSET_DROP = 0x18 + PR_CAPBSET_READ = 0x17 + PR_CLEAR_SECCOMP_FILTER = 0x25 + PR_ENDIAN_BIG = 0x0 + PR_ENDIAN_LITTLE = 0x1 + PR_ENDIAN_PPC_LITTLE = 0x2 + PR_FPEMU_NOPRINT = 0x1 + PR_FPEMU_SIGFPE = 0x2 + PR_FP_EXC_ASYNC = 0x2 + PR_FP_EXC_DISABLED = 0x0 + PR_FP_EXC_DIV = 0x10000 + PR_FP_EXC_INV = 0x100000 + PR_FP_EXC_NONRECOV = 0x1 + PR_FP_EXC_OVF = 0x20000 + PR_FP_EXC_PRECISE = 0x3 + PR_FP_EXC_RES = 0x80000 + PR_FP_EXC_SW_ENABLE = 0x80 + PR_FP_EXC_UND = 0x40000 + PR_GET_DUMPABLE = 0x3 + PR_GET_ENDIAN = 0x13 + PR_GET_FPEMU = 0x9 + PR_GET_FPEXC = 0xb + PR_GET_KEEPCAPS = 0x7 + PR_GET_NAME = 0x10 + PR_GET_PDEATHSIG = 0x2 + PR_GET_SECCOMP = 0x15 + PR_GET_SECCOMP_FILTER = 0x23 + PR_GET_SECUREBITS = 0x1b + PR_GET_TIMERSLACK = 0x1e + PR_GET_TIMING = 0xd + PR_GET_TSC = 0x19 + PR_GET_UNALIGN = 0x5 + PR_MCE_KILL = 0x21 + PR_MCE_KILL_CLEAR = 0x0 + PR_MCE_KILL_DEFAULT = 0x2 + PR_MCE_KILL_EARLY = 0x1 + PR_MCE_KILL_GET = 0x22 + PR_MCE_KILL_LATE = 0x0 + PR_MCE_KILL_SET = 0x1 + PR_SECCOMP_FILTER_EVENT = 0x1 + PR_SECCOMP_FILTER_SYSCALL = 0x0 + PR_SET_DUMPABLE = 0x4 + PR_SET_ENDIAN = 0x14 + PR_SET_FPEMU = 0xa + PR_SET_FPEXC = 0xc + PR_SET_KEEPCAPS = 0x8 + PR_SET_NAME = 0xf + PR_SET_PDEATHSIG = 0x1 + PR_SET_PTRACER = 0x59616d61 + PR_SET_SECCOMP = 0x16 + PR_SET_SECCOMP_FILTER = 0x24 + PR_SET_SECUREBITS = 0x1c + PR_SET_TIMERSLACK = 0x1d + PR_SET_TIMING = 0xe + PR_SET_TSC = 0x1a + PR_SET_UNALIGN = 0x6 + PR_TASK_PERF_EVENTS_DISABLE = 0x1f + PR_TASK_PERF_EVENTS_ENABLE = 0x20 + PR_TIMING_STATISTICAL = 0x0 + PR_TIMING_TIMESTAMP = 0x1 + PR_TSC_ENABLE = 0x1 + PR_TSC_SIGSEGV = 0x2 + PR_UNALIGN_NOPRINT = 0x1 + PR_UNALIGN_SIGBUS = 0x2 + PTRACE_ATTACH = 0x10 + PTRACE_CONT = 0x7 + PTRACE_DETACH = 0x11 + PTRACE_EVENT_CLONE = 0x3 + PTRACE_EVENT_EXEC = 0x4 + PTRACE_EVENT_EXIT = 0x6 + PTRACE_EVENT_FORK = 0x1 + PTRACE_EVENT_VFORK = 0x2 + PTRACE_EVENT_VFORK_DONE = 0x5 + PTRACE_GETCRUNCHREGS = 0x19 + PTRACE_GETEVENTMSG = 0x4201 + PTRACE_GETFPREGS = 0xe + PTRACE_GETHBPREGS = 0x1d + PTRACE_GETREGS = 0xc + PTRACE_GETREGSET = 0x4204 + PTRACE_GETSIGINFO = 0x4202 + PTRACE_GETVFPREGS = 0x1b + PTRACE_GETWMMXREGS = 0x12 + PTRACE_GET_THREAD_AREA = 0x16 + PTRACE_KILL = 0x8 + PTRACE_OLDSETOPTIONS = 0x15 + PTRACE_O_MASK = 0x7f + PTRACE_O_TRACECLONE = 0x8 + PTRACE_O_TRACEEXEC = 0x10 + PTRACE_O_TRACEEXIT = 0x40 + PTRACE_O_TRACEFORK = 0x2 + PTRACE_O_TRACESYSGOOD = 0x1 + PTRACE_O_TRACEVFORK = 0x4 + PTRACE_O_TRACEVFORKDONE = 0x20 + PTRACE_PEEKDATA = 0x2 + PTRACE_PEEKTEXT = 0x1 + PTRACE_PEEKUSR = 0x3 + PTRACE_POKEDATA = 0x5 + PTRACE_POKETEXT = 0x4 + PTRACE_POKEUSR = 0x6 + PTRACE_SETCRUNCHREGS = 0x1a + PTRACE_SETFPREGS = 0xf + PTRACE_SETHBPREGS = 0x1e + PTRACE_SETOPTIONS = 0x4200 + PTRACE_SETREGS = 0xd + PTRACE_SETREGSET = 0x4205 + PTRACE_SETSIGINFO = 0x4203 + PTRACE_SETVFPREGS = 0x1c + PTRACE_SETWMMXREGS = 0x13 + PTRACE_SET_SYSCALL = 0x17 + PTRACE_SINGLESTEP = 0x9 + PTRACE_SYSCALL = 0x18 + PTRACE_TRACEME = 0x0 + PT_DATA_ADDR = 0x10004 + PT_TEXT_ADDR = 0x10000 + PT_TEXT_END_ADDR = 0x10008 + RLIMIT_AS = 0x9 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x7 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = -0x1 + RTAX_ADVMSS = 0x8 + RTAX_CWND = 0x7 + RTAX_FEATURES = 0xc + RTAX_FEATURE_ALLFRAG = 0x8 + RTAX_FEATURE_ECN = 0x1 + RTAX_FEATURE_SACK = 0x2 + RTAX_FEATURE_TIMESTAMP = 0x4 + RTAX_HOPLIMIT = 0xa + RTAX_INITCWND = 0xb + RTAX_INITRWND = 0xe + RTAX_LOCK = 0x1 + RTAX_MAX = 0xe + RTAX_MTU = 0x2 + RTAX_REORDERING = 0x9 + RTAX_RTO_MIN = 0xd + RTAX_RTT = 0x4 + RTAX_RTTVAR = 0x5 + RTAX_SSTHRESH = 0x6 + RTAX_UNSPEC = 0x0 + RTAX_WINDOW = 0x3 + RTA_ALIGNTO = 0x4 + RTA_MAX = 0x10 + RTCF_DIRECTSRC = 0x4000000 + RTCF_DOREDIRECT = 0x1000000 + RTCF_LOG = 0x2000000 + RTCF_MASQ = 0x400000 + RTCF_NAT = 0x800000 + RTCF_VALVE = 0x200000 + RTF_ADDRCLASSMASK = 0xf8000000 + RTF_ADDRCONF = 0x40000 + RTF_ALLONLINK = 0x20000 + RTF_BROADCAST = 0x10000000 + RTF_CACHE = 0x1000000 + RTF_DEFAULT = 0x10000 + RTF_DYNAMIC = 0x10 + RTF_FLOW = 0x2000000 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_INTERFACE = 0x40000000 + RTF_IRTT = 0x100 + RTF_LINKRT = 0x100000 + RTF_LOCAL = 0x80000000 + RTF_MODIFIED = 0x20 + RTF_MSS = 0x40 + RTF_MTU = 0x40 + RTF_MULTICAST = 0x20000000 + RTF_NAT = 0x8000000 + RTF_NOFORWARD = 0x1000 + RTF_NONEXTHOP = 0x200000 + RTF_NOPMTUDISC = 0x4000 + RTF_POLICY = 0x4000000 + RTF_REINSTATE = 0x8 + RTF_REJECT = 0x200 + RTF_STATIC = 0x400 + RTF_THROW = 0x2000 + RTF_UP = 0x1 + RTF_WINDOW = 0x80 + RTF_XRESOLVE = 0x800 + RTM_BASE = 0x10 + RTM_DELACTION = 0x31 + RTM_DELADDR = 0x15 + RTM_DELADDRLABEL = 0x49 + RTM_DELLINK = 0x11 + RTM_DELNEIGH = 0x1d + RTM_DELQDISC = 0x25 + RTM_DELROUTE = 0x19 + RTM_DELRULE = 0x21 + RTM_DELTCLASS = 0x29 + RTM_DELTFILTER = 0x2d + RTM_F_CLONED = 0x200 + RTM_F_EQUALIZE = 0x400 + RTM_F_NOTIFY = 0x100 + RTM_F_PREFIX = 0x800 + RTM_GETACTION = 0x32 + RTM_GETADDR = 0x16 + RTM_GETADDRLABEL = 0x4a + RTM_GETANYCAST = 0x3e + RTM_GETDCB = 0x4e + RTM_GETLINK = 0x12 + RTM_GETMULTICAST = 0x3a + RTM_GETNEIGH = 0x1e + RTM_GETNEIGHTBL = 0x42 + RTM_GETQDISC = 0x26 + RTM_GETROUTE = 0x1a + RTM_GETRULE = 0x22 + RTM_GETTCLASS = 0x2a + RTM_GETTFILTER = 0x2e + RTM_MAX = 0x4f + RTM_NEWACTION = 0x30 + RTM_NEWADDR = 0x14 + RTM_NEWADDRLABEL = 0x48 + RTM_NEWLINK = 0x10 + RTM_NEWNDUSEROPT = 0x44 + RTM_NEWNEIGH = 0x1c + RTM_NEWNEIGHTBL = 0x40 + RTM_NEWPREFIX = 0x34 + RTM_NEWQDISC = 0x24 + RTM_NEWROUTE = 0x18 + RTM_NEWRULE = 0x20 + RTM_NEWTCLASS = 0x28 + RTM_NEWTFILTER = 0x2c + RTM_NR_FAMILIES = 0x10 + RTM_NR_MSGTYPES = 0x40 + RTM_SETDCB = 0x4f + RTM_SETLINK = 0x13 + RTM_SETNEIGHTBL = 0x43 + RTNH_ALIGNTO = 0x4 + RTNH_F_DEAD = 0x1 + RTNH_F_ONLINK = 0x4 + RTNH_F_PERVASIVE = 0x2 + RTN_MAX = 0xb + RTPROT_BIRD = 0xc + RTPROT_BOOT = 0x3 + RTPROT_DHCP = 0x10 + RTPROT_DNROUTED = 0xd + RTPROT_GATED = 0x8 + RTPROT_KERNEL = 0x2 + RTPROT_MRT = 0xa + RTPROT_NTK = 0xf + RTPROT_RA = 0x9 + RTPROT_REDIRECT = 0x1 + RTPROT_STATIC = 0x4 + RTPROT_UNSPEC = 0x0 + RTPROT_XORP = 0xe + RTPROT_ZEBRA = 0xb + RT_CLASS_DEFAULT = 0xfd + RT_CLASS_LOCAL = 0xff + RT_CLASS_MAIN = 0xfe + RT_CLASS_MAX = 0xff + RT_CLASS_UNSPEC = 0x0 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_CREDENTIALS = 0x2 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x1d + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPNS = 0x23 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDDLCI = 0x8980 + SIOCADDMULTI = 0x8931 + SIOCADDRT = 0x890b + SIOCATMARK = 0x8905 + SIOCDARP = 0x8953 + SIOCDELDLCI = 0x8981 + SIOCDELMULTI = 0x8932 + SIOCDELRT = 0x890c + SIOCDEVPRIVATE = 0x89f0 + SIOCDIFADDR = 0x8936 + SIOCDRARP = 0x8960 + SIOCGARP = 0x8954 + SIOCGIFADDR = 0x8915 + SIOCGIFBR = 0x8940 + SIOCGIFBRDADDR = 0x8919 + SIOCGIFCONF = 0x8912 + SIOCGIFCOUNT = 0x8938 + SIOCGIFDSTADDR = 0x8917 + SIOCGIFENCAP = 0x8925 + SIOCGIFFLAGS = 0x8913 + SIOCGIFHWADDR = 0x8927 + SIOCGIFINDEX = 0x8933 + SIOCGIFMAP = 0x8970 + SIOCGIFMEM = 0x891f + SIOCGIFMETRIC = 0x891d + SIOCGIFMTU = 0x8921 + SIOCGIFNAME = 0x8910 + SIOCGIFNETMASK = 0x891b + SIOCGIFPFLAGS = 0x8935 + SIOCGIFSLAVE = 0x8929 + SIOCGIFTXQLEN = 0x8942 + SIOCGPGRP = 0x8904 + SIOCGRARP = 0x8961 + SIOCGSTAMP = 0x8906 + SIOCGSTAMPNS = 0x8907 + SIOCPROTOPRIVATE = 0x89e0 + SIOCRTMSG = 0x890d + SIOCSARP = 0x8955 + SIOCSIFADDR = 0x8916 + SIOCSIFBR = 0x8941 + SIOCSIFBRDADDR = 0x891a + SIOCSIFDSTADDR = 0x8918 + SIOCSIFENCAP = 0x8926 + SIOCSIFFLAGS = 0x8914 + SIOCSIFHWADDR = 0x8924 + SIOCSIFHWBROADCAST = 0x8937 + SIOCSIFLINK = 0x8911 + SIOCSIFMAP = 0x8971 + SIOCSIFMEM = 0x8920 + SIOCSIFMETRIC = 0x891e + SIOCSIFMTU = 0x8922 + SIOCSIFNAME = 0x8923 + SIOCSIFNETMASK = 0x891c + SIOCSIFPFLAGS = 0x8934 + SIOCSIFSLAVE = 0x8930 + SIOCSIFTXQLEN = 0x8943 + SIOCSPGRP = 0x8902 + SIOCSRARP = 0x8962 + SOCK_CLOEXEC = 0x80000 + SOCK_DCCP = 0x6 + SOCK_DGRAM = 0x2 + SOCK_NONBLOCK = 0x800 + SOCK_PACKET = 0xa + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_AAL = 0x109 + SOL_ATM = 0x108 + SOL_DECNET = 0x105 + SOL_ICMPV6 = 0x3a + SOL_IP = 0x0 + SOL_IPV6 = 0x29 + SOL_IRDA = 0x10a + SOL_PACKET = 0x107 + SOL_RAW = 0xff + SOL_SOCKET = 0x1 + SOL_TCP = 0x6 + SOL_X25 = 0x106 + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x1e + SO_ATTACH_FILTER = 0x1a + SO_BINDTODEVICE = 0x19 + SO_BROADCAST = 0x6 + SO_BSDCOMPAT = 0xe + SO_DEBUG = 0x1 + SO_DETACH_FILTER = 0x1b + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 + SO_KEEPALIVE = 0x9 + SO_LINGER = 0xd + SO_MARK = 0x24 + SO_NO_CHECK = 0xb + SO_OOBINLINE = 0xa + SO_PASSCRED = 0x10 + SO_PASSSEC = 0x22 + SO_PEERCRED = 0x11 + SO_PEERNAME = 0x1c + SO_PEERSEC = 0x1f + SO_PRIORITY = 0xc + SO_PROTOCOL = 0x26 + SO_RCVBUF = 0x8 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x12 + SO_RCVTIMEO = 0x14 + SO_REUSEADDR = 0x2 + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SNDBUF = 0x7 + SO_SNDBUFFORCE = 0x20 + SO_SNDLOWAT = 0x13 + SO_SNDTIMEO = 0x15 + SO_TIMESTAMP = 0x1d + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TYPE = 0x3 + S_BLKSIZE = 0x200 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TCIFLUSH = 0x0 + TCIOFLUSH = 0x2 + TCOFLUSH = 0x1 + TCP_CONGESTION = 0xd + TCP_CORK = 0x3 + TCP_DEFER_ACCEPT = 0x9 + TCP_INFO = 0xb + TCP_KEEPCNT = 0x6 + TCP_KEEPIDLE = 0x4 + TCP_KEEPINTVL = 0x5 + TCP_LINGER2 = 0x8 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0xe + TCP_MD5SIG_MAXKEYLEN = 0x50 + TCP_MSS = 0x200 + TCP_NODELAY = 0x1 + TCP_QUICKACK = 0xc + TCP_SYNCNT = 0x7 + TCP_WINDOW_CLAMP = 0xa + TIOCCBRK = 0x5428 + TIOCCONS = 0x541d + TIOCEXCL = 0x540c + TIOCGDEV = 0x80045432 + TIOCGETD = 0x5424 + TIOCGICOUNT = 0x545d + TIOCGLCKTRMIOS = 0x5456 + TIOCGPGRP = 0x540f + TIOCGPTN = 0x80045430 + TIOCGRS485 = 0x542e + TIOCGSERIAL = 0x541e + TIOCGSID = 0x5429 + TIOCGSOFTCAR = 0x5419 + TIOCGWINSZ = 0x5413 + TIOCINQ = 0x541b + TIOCLINUX = 0x541c + TIOCMBIC = 0x5417 + TIOCMBIS = 0x5416 + TIOCMGET = 0x5415 + TIOCMIWAIT = 0x545c + TIOCMSET = 0x5418 + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x5422 + TIOCNXCL = 0x540d + TIOCOUTQ = 0x5411 + TIOCPKT = 0x5420 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x540e + TIOCSERCONFIG = 0x5453 + TIOCSERGETLSR = 0x5459 + TIOCSERGETMULTI = 0x545a + TIOCSERGSTRUCT = 0x5458 + TIOCSERGWILD = 0x5454 + TIOCSERSETMULTI = 0x545b + TIOCSERSWILD = 0x5455 + TIOCSER_TEMT = 0x1 + TIOCSETD = 0x5423 + TIOCSIG = 0x40045436 + TIOCSLCKTRMIOS = 0x5457 + TIOCSPGRP = 0x5410 + TIOCSPTLCK = 0x40045431 + TIOCSRS485 = 0x542f + TIOCSSERIAL = 0x541f + TIOCSSOFTCAR = 0x541a + TIOCSTI = 0x5412 + TIOCSWINSZ = 0x5414 + TIOCVHANGUP = 0x5437 + TUNATTACHFILTER = 0x400854d5 + TUNDETACHFILTER = 0x400854d6 + TUNGETFEATURES = 0x800454cf + TUNGETIFF = 0x800454d2 + TUNGETSNDBUF = 0x800454d3 + TUNGETVNETHDRSZ = 0x800454d7 + TUNSETDEBUG = 0x400454c9 + TUNSETGROUP = 0x400454ce + TUNSETIFF = 0x400454ca + TUNSETLINK = 0x400454cd + TUNSETNOCSUM = 0x400454c8 + TUNSETOFFLOAD = 0x400454d0 + TUNSETOWNER = 0x400454cc + TUNSETPERSIST = 0x400454cb + TUNSETSNDBUF = 0x400454d4 + TUNSETTXFILTER = 0x400454d1 + TUNSETVNETHDRSZ = 0x400454d8 + WALL = 0x40000000 + WCLONE = 0x80000000 + WCONTINUED = 0x8 + WEXITED = 0x4 + WNOHANG = 0x1 + WNOTHREAD = 0x20000000 + WNOWAIT = 0x1000000 + WORDSIZE = 0x20 + WSTOPPED = 0x2 + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x62) + EADDRNOTAVAIL = syscall.Errno(0x63) + EADV = syscall.Errno(0x44) + EAFNOSUPPORT = syscall.Errno(0x61) + EAGAIN = syscall.Errno(0xb) + EALREADY = syscall.Errno(0x72) + EBADE = syscall.Errno(0x34) + EBADF = syscall.Errno(0x9) + EBADFD = syscall.Errno(0x4d) + EBADMSG = syscall.Errno(0x4a) + EBADR = syscall.Errno(0x35) + EBADRQC = syscall.Errno(0x38) + EBADSLT = syscall.Errno(0x39) + EBFONT = syscall.Errno(0x3b) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x7d) + ECHILD = syscall.Errno(0xa) + ECHRNG = syscall.Errno(0x2c) + ECOMM = syscall.Errno(0x46) + ECONNABORTED = syscall.Errno(0x67) + ECONNREFUSED = syscall.Errno(0x6f) + ECONNRESET = syscall.Errno(0x68) + EDEADLK = syscall.Errno(0x23) + EDEADLOCK = syscall.Errno(0x23) + EDESTADDRREQ = syscall.Errno(0x59) + EDOM = syscall.Errno(0x21) + EDOTDOT = syscall.Errno(0x49) + EDQUOT = syscall.Errno(0x7a) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EHOSTDOWN = syscall.Errno(0x70) + EHOSTUNREACH = syscall.Errno(0x71) + EHWPOISON = syscall.Errno(0x85) + EIDRM = syscall.Errno(0x2b) + EILSEQ = syscall.Errno(0x54) + EINPROGRESS = syscall.Errno(0x73) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x6a) + EISDIR = syscall.Errno(0x15) + EISNAM = syscall.Errno(0x78) + EKEYEXPIRED = syscall.Errno(0x7f) + EKEYREJECTED = syscall.Errno(0x81) + EKEYREVOKED = syscall.Errno(0x80) + EL2HLT = syscall.Errno(0x33) + EL2NSYNC = syscall.Errno(0x2d) + EL3HLT = syscall.Errno(0x2e) + EL3RST = syscall.Errno(0x2f) + ELIBACC = syscall.Errno(0x4f) + ELIBBAD = syscall.Errno(0x50) + ELIBEXEC = syscall.Errno(0x53) + ELIBMAX = syscall.Errno(0x52) + ELIBSCN = syscall.Errno(0x51) + ELNRNG = syscall.Errno(0x30) + ELOOP = syscall.Errno(0x28) + EMEDIUMTYPE = syscall.Errno(0x7c) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x5a) + EMULTIHOP = syscall.Errno(0x48) + ENAMETOOLONG = syscall.Errno(0x24) + ENAVAIL = syscall.Errno(0x77) + ENETDOWN = syscall.Errno(0x64) + ENETRESET = syscall.Errno(0x66) + ENETUNREACH = syscall.Errno(0x65) + ENFILE = syscall.Errno(0x17) + ENOANO = syscall.Errno(0x37) + ENOBUFS = syscall.Errno(0x69) + ENOCSI = syscall.Errno(0x32) + ENODATA = syscall.Errno(0x3d) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOKEY = syscall.Errno(0x7e) + ENOLCK = syscall.Errno(0x25) + ENOLINK = syscall.Errno(0x43) + ENOMEDIUM = syscall.Errno(0x7b) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x2a) + ENONET = syscall.Errno(0x40) + ENOPKG = syscall.Errno(0x41) + ENOPROTOOPT = syscall.Errno(0x5c) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x3f) + ENOSTR = syscall.Errno(0x3c) + ENOSYS = syscall.Errno(0x26) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x6b) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x27) + ENOTNAM = syscall.Errno(0x76) + ENOTRECOVERABLE = syscall.Errno(0x83) + ENOTSOCK = syscall.Errno(0x58) + ENOTSUP = syscall.Errno(0x5f) + ENOTTY = syscall.Errno(0x19) + ENOTUNIQ = syscall.Errno(0x4c) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x5f) + EOVERFLOW = syscall.Errno(0x4b) + EOWNERDEAD = syscall.Errno(0x82) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x60) + EPIPE = syscall.Errno(0x20) + EPROTO = syscall.Errno(0x47) + EPROTONOSUPPORT = syscall.Errno(0x5d) + EPROTOTYPE = syscall.Errno(0x5b) + ERANGE = syscall.Errno(0x22) + EREMCHG = syscall.Errno(0x4e) + EREMOTE = syscall.Errno(0x42) + EREMOTEIO = syscall.Errno(0x79) + ERESTART = syscall.Errno(0x55) + ERFKILL = syscall.Errno(0x84) + EROFS = syscall.Errno(0x1e) + ESHUTDOWN = syscall.Errno(0x6c) + ESOCKTNOSUPPORT = syscall.Errno(0x5e) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESRMNT = syscall.Errno(0x45) + ESTALE = syscall.Errno(0x74) + ESTRPIPE = syscall.Errno(0x56) + ETIME = syscall.Errno(0x3e) + ETIMEDOUT = syscall.Errno(0x6e) + ETOOMANYREFS = syscall.Errno(0x6d) + ETXTBSY = syscall.Errno(0x1a) + EUCLEAN = syscall.Errno(0x75) + EUNATCH = syscall.Errno(0x31) + EUSERS = syscall.Errno(0x57) + EWOULDBLOCK = syscall.Errno(0xb) + EXDEV = syscall.Errno(0x12) + EXFULL = syscall.Errno(0x36) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0x7) + SIGCHLD = syscall.Signal(0x11) + SIGCLD = syscall.Signal(0x11) + SIGCONT = syscall.Signal(0x12) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x1d) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPOLL = syscall.Signal(0x1d) + SIGPROF = syscall.Signal(0x1b) + SIGPWR = syscall.Signal(0x1e) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTKFLT = syscall.Signal(0x10) + SIGSTOP = syscall.Signal(0x13) + SIGSYS = syscall.Signal(0x1f) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x14) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGUNUSED = syscall.Signal(0x1f) + SIGURG = syscall.Signal(0x17) + SIGUSR1 = syscall.Signal(0xa) + SIGUSR2 = syscall.Signal(0xc) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "no such device or address", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource temporarily unavailable", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device or resource busy", + 17: "file exists", + 18: "invalid cross-device link", + 19: "no such device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "numerical result out of range", + 35: "resource deadlock avoided", + 36: "file name too long", + 37: "no locks available", + 38: "function not implemented", + 39: "directory not empty", + 40: "too many levels of symbolic links", + 42: "no message of desired type", + 43: "identifier removed", + 44: "channel number out of range", + 45: "level 2 not synchronized", + 46: "level 3 halted", + 47: "level 3 reset", + 48: "link number out of range", + 49: "protocol driver not attached", + 50: "no CSI structure available", + 51: "level 2 halted", + 52: "invalid exchange", + 53: "invalid request descriptor", + 54: "exchange full", + 55: "no anode", + 56: "invalid request code", + 57: "invalid slot", + 59: "bad font file format", + 60: "device not a stream", + 61: "no data available", + 62: "timer expired", + 63: "out of streams resources", + 64: "machine is not on the network", + 65: "package not installed", + 66: "object is remote", + 67: "link has been severed", + 68: "advertise error", + 69: "srmount error", + 70: "communication error on send", + 71: "protocol error", + 72: "multihop attempted", + 73: "RFS specific error", + 74: "bad message", + 75: "value too large for defined data type", + 76: "name not unique on network", + 77: "file descriptor in bad state", + 78: "remote address changed", + 79: "can not access a needed shared library", + 80: "accessing a corrupted shared library", + 81: ".lib section in a.out corrupted", + 82: "attempting to link in too many shared libraries", + 83: "cannot exec a shared library directly", + 84: "invalid or incomplete multibyte or wide character", + 85: "interrupted system call should be restarted", + 86: "streams pipe error", + 87: "too many users", + 88: "socket operation on non-socket", + 89: "destination address required", + 90: "message too long", + 91: "protocol wrong type for socket", + 92: "protocol not available", + 93: "protocol not supported", + 94: "socket type not supported", + 95: "operation not supported", + 96: "protocol family not supported", + 97: "address family not supported by protocol", + 98: "address already in use", + 99: "cannot assign requested address", + 100: "network is down", + 101: "network is unreachable", + 102: "network dropped connection on reset", + 103: "software caused connection abort", + 104: "connection reset by peer", + 105: "no buffer space available", + 106: "transport endpoint is already connected", + 107: "transport endpoint is not connected", + 108: "cannot send after transport endpoint shutdown", + 109: "too many references: cannot splice", + 110: "connection timed out", + 111: "connection refused", + 112: "host is down", + 113: "no route to host", + 114: "operation already in progress", + 115: "operation now in progress", + 116: "stale NFS file handle", + 117: "structure needs cleaning", + 118: "not a XENIX named type file", + 119: "no XENIX semaphores available", + 120: "is a named type file", + 121: "remote I/O error", + 122: "disk quota exceeded", + 123: "no medium found", + 124: "wrong medium type", + 125: "operation canceled", + 126: "required key not available", + 127: "key has expired", + 128: "key has been revoked", + 129: "key was rejected by service", + 130: "owner died", + 131: "state not recoverable", + 132: "operation not possible due to RF-kill", + 133: "unknown error 133", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/breakpoint trap", + 6: "aborted", + 7: "bus error", + 8: "floating point exception", + 9: "killed", + 10: "user defined signal 1", + 11: "segmentation fault", + 12: "user defined signal 2", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "stack fault", + 17: "child exited", + 18: "continued", + 19: "stopped (signal)", + 20: "stopped", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "urgent I/O condition", + 24: "CPU time limit exceeded", + 25: "file size limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window changed", + 29: "I/O possible", + 30: "power failure", + 31: "bad system call", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go new file mode 100644 index 0000000..165073f --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -0,0 +1,1843 @@ +// mkerrors.sh +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build arm64,linux + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- _const.go + +package unix + +import "syscall" + +const ( + AF_ALG = 0x26 + AF_APPLETALK = 0x5 + AF_ASH = 0x12 + AF_ATMPVC = 0x8 + AF_ATMSVC = 0x14 + AF_AX25 = 0x3 + AF_BLUETOOTH = 0x1f + AF_BRIDGE = 0x7 + AF_CAIF = 0x25 + AF_CAN = 0x1d + AF_DECnet = 0xc + AF_ECONET = 0x13 + AF_FILE = 0x1 + AF_IEEE802154 = 0x24 + AF_INET = 0x2 + AF_INET6 = 0xa + AF_IPX = 0x4 + AF_IRDA = 0x17 + AF_ISDN = 0x22 + AF_IUCV = 0x20 + AF_KEY = 0xf + AF_LLC = 0x1a + AF_LOCAL = 0x1 + AF_MAX = 0x29 + AF_NETBEUI = 0xd + AF_NETLINK = 0x10 + AF_NETROM = 0x6 + AF_NFC = 0x27 + AF_PACKET = 0x11 + AF_PHONET = 0x23 + AF_PPPOX = 0x18 + AF_RDS = 0x15 + AF_ROSE = 0xb + AF_ROUTE = 0x10 + AF_RXRPC = 0x21 + AF_SECURITY = 0xe + AF_SNA = 0x16 + AF_TIPC = 0x1e + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_VSOCK = 0x28 + AF_WANPIPE = 0x19 + AF_X25 = 0x9 + ARPHRD_ADAPT = 0x108 + ARPHRD_APPLETLK = 0x8 + ARPHRD_ARCNET = 0x7 + ARPHRD_ASH = 0x30d + ARPHRD_ATM = 0x13 + ARPHRD_AX25 = 0x3 + ARPHRD_BIF = 0x307 + ARPHRD_CAIF = 0x336 + ARPHRD_CAN = 0x118 + ARPHRD_CHAOS = 0x5 + ARPHRD_CISCO = 0x201 + ARPHRD_CSLIP = 0x101 + ARPHRD_CSLIP6 = 0x103 + ARPHRD_DDCMP = 0x205 + ARPHRD_DLCI = 0xf + ARPHRD_ECONET = 0x30e + ARPHRD_EETHER = 0x2 + ARPHRD_ETHER = 0x1 + ARPHRD_EUI64 = 0x1b + ARPHRD_FCAL = 0x311 + ARPHRD_FCFABRIC = 0x313 + ARPHRD_FCPL = 0x312 + ARPHRD_FCPP = 0x310 + ARPHRD_FDDI = 0x306 + ARPHRD_FRAD = 0x302 + ARPHRD_HDLC = 0x201 + ARPHRD_HIPPI = 0x30c + ARPHRD_HWX25 = 0x110 + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + ARPHRD_IEEE80211 = 0x321 + ARPHRD_IEEE80211_PRISM = 0x322 + ARPHRD_IEEE80211_RADIOTAP = 0x323 + ARPHRD_IEEE802154 = 0x324 + ARPHRD_IEEE802154_MONITOR = 0x325 + ARPHRD_IEEE802_TR = 0x320 + ARPHRD_INFINIBAND = 0x20 + ARPHRD_IP6GRE = 0x337 + ARPHRD_IPDDP = 0x309 + ARPHRD_IPGRE = 0x30a + ARPHRD_IRDA = 0x30f + ARPHRD_LAPB = 0x204 + ARPHRD_LOCALTLK = 0x305 + ARPHRD_LOOPBACK = 0x304 + ARPHRD_METRICOM = 0x17 + ARPHRD_NETLINK = 0x338 + ARPHRD_NETROM = 0x0 + ARPHRD_NONE = 0xfffe + ARPHRD_PHONET = 0x334 + ARPHRD_PHONET_PIPE = 0x335 + ARPHRD_PIMREG = 0x30b + ARPHRD_PPP = 0x200 + ARPHRD_PRONET = 0x4 + ARPHRD_RAWHDLC = 0x206 + ARPHRD_ROSE = 0x10e + ARPHRD_RSRVD = 0x104 + ARPHRD_SIT = 0x308 + ARPHRD_SKIP = 0x303 + ARPHRD_SLIP = 0x100 + ARPHRD_SLIP6 = 0x102 + ARPHRD_TUNNEL = 0x300 + ARPHRD_TUNNEL6 = 0x301 + ARPHRD_VOID = 0xffff + ARPHRD_X25 = 0x10f + B0 = 0x0 + B1000000 = 0x1008 + B110 = 0x3 + B115200 = 0x1002 + B1152000 = 0x1009 + B1200 = 0x9 + B134 = 0x4 + B150 = 0x5 + B1500000 = 0x100a + B1800 = 0xa + B19200 = 0xe + B200 = 0x6 + B2000000 = 0x100b + B230400 = 0x1003 + B2400 = 0xb + B2500000 = 0x100c + B300 = 0x7 + B3000000 = 0x100d + B3500000 = 0x100e + B38400 = 0xf + B4000000 = 0x100f + B460800 = 0x1004 + B4800 = 0xc + B50 = 0x1 + B500000 = 0x1005 + B57600 = 0x1001 + B576000 = 0x1006 + B600 = 0x8 + B75 = 0x2 + B921600 = 0x1007 + B9600 = 0xd + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXINSNS = 0x1000 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MOD = 0x90 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BPF_XOR = 0xa0 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x800 + CLOCK_BOOTTIME = 0x7 + CLOCK_BOOTTIME_ALARM = 0x9 + CLOCK_DEFAULT = 0x0 + CLOCK_EXT = 0x1 + CLOCK_INT = 0x2 + CLOCK_MONOTONIC = 0x1 + CLOCK_MONOTONIC_COARSE = 0x6 + CLOCK_MONOTONIC_RAW = 0x4 + CLOCK_PROCESS_CPUTIME_ID = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_REALTIME_ALARM = 0x8 + CLOCK_REALTIME_COARSE = 0x5 + CLOCK_THREAD_CPUTIME_ID = 0x3 + CLOCK_TXFROMRX = 0x4 + CLOCK_TXINT = 0x3 + CLONE_CHILD_CLEARTID = 0x200000 + CLONE_CHILD_SETTID = 0x1000000 + CLONE_DETACHED = 0x400000 + CLONE_FILES = 0x400 + CLONE_FS = 0x200 + CLONE_IO = 0x80000000 + CLONE_NEWIPC = 0x8000000 + CLONE_NEWNET = 0x40000000 + CLONE_NEWNS = 0x20000 + CLONE_NEWPID = 0x20000000 + CLONE_NEWUSER = 0x10000000 + CLONE_NEWUTS = 0x4000000 + CLONE_PARENT = 0x8000 + CLONE_PARENT_SETTID = 0x100000 + CLONE_PTRACE = 0x2000 + CLONE_SETTLS = 0x80000 + CLONE_SIGHAND = 0x800 + CLONE_SYSVSEM = 0x40000 + CLONE_THREAD = 0x10000 + CLONE_UNTRACED = 0x800000 + CLONE_VFORK = 0x4000 + CLONE_VM = 0x100 + CREAD = 0x80 + CS5 = 0x0 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIGNAL = 0xff + CSIZE = 0x30 + CSTART = 0x11 + CSTATUS = 0x0 + CSTOP = 0x13 + CSTOPB = 0x40 + CSUSP = 0x1a + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 + ELF_NGREG = 0x22 + ELF_PRARGSZ = 0x50 + ENCODING_DEFAULT = 0x0 + ENCODING_FM_MARK = 0x3 + ENCODING_FM_SPACE = 0x4 + ENCODING_MANCHESTER = 0x5 + ENCODING_NRZ = 0x1 + ENCODING_NRZI = 0x2 + EPOLLERR = 0x8 + EPOLLET = 0x80000000 + EPOLLHUP = 0x10 + EPOLLIN = 0x1 + EPOLLMSG = 0x400 + EPOLLONESHOT = 0x40000000 + EPOLLOUT = 0x4 + EPOLLPRI = 0x2 + EPOLLRDBAND = 0x80 + EPOLLRDHUP = 0x2000 + EPOLLRDNORM = 0x40 + EPOLLWAKEUP = 0x20000000 + EPOLLWRBAND = 0x200 + EPOLLWRNORM = 0x100 + EPOLL_CLOEXEC = 0x80000 + EPOLL_CTL_ADD = 0x1 + EPOLL_CTL_DEL = 0x2 + EPOLL_CTL_MOD = 0x3 + ETH_P_1588 = 0x88f7 + ETH_P_8021AD = 0x88a8 + ETH_P_8021AH = 0x88e7 + ETH_P_8021Q = 0x8100 + ETH_P_802_2 = 0x4 + ETH_P_802_3 = 0x1 + ETH_P_802_3_MIN = 0x600 + ETH_P_802_EX1 = 0x88b5 + ETH_P_AARP = 0x80f3 + ETH_P_AF_IUCV = 0xfbfb + ETH_P_ALL = 0x3 + ETH_P_AOE = 0x88a2 + ETH_P_ARCNET = 0x1a + ETH_P_ARP = 0x806 + ETH_P_ATALK = 0x809b + ETH_P_ATMFATE = 0x8884 + ETH_P_ATMMPOA = 0x884c + ETH_P_AX25 = 0x2 + ETH_P_BATMAN = 0x4305 + ETH_P_BPQ = 0x8ff + ETH_P_CAIF = 0xf7 + ETH_P_CAN = 0xc + ETH_P_CANFD = 0xd + ETH_P_CONTROL = 0x16 + ETH_P_CUST = 0x6006 + ETH_P_DDCMP = 0x6 + ETH_P_DEC = 0x6000 + ETH_P_DIAG = 0x6005 + ETH_P_DNA_DL = 0x6001 + ETH_P_DNA_RC = 0x6002 + ETH_P_DNA_RT = 0x6003 + ETH_P_DSA = 0x1b + ETH_P_ECONET = 0x18 + ETH_P_EDSA = 0xdada + ETH_P_FCOE = 0x8906 + ETH_P_FIP = 0x8914 + ETH_P_HDLC = 0x19 + ETH_P_IEEE802154 = 0xf6 + ETH_P_IEEEPUP = 0xa00 + ETH_P_IEEEPUPAT = 0xa01 + ETH_P_IP = 0x800 + ETH_P_IPV6 = 0x86dd + ETH_P_IPX = 0x8137 + ETH_P_IRDA = 0x17 + ETH_P_LAT = 0x6004 + ETH_P_LINK_CTL = 0x886c + ETH_P_LOCALTALK = 0x9 + ETH_P_LOOP = 0x60 + ETH_P_MOBITEX = 0x15 + ETH_P_MPLS_MC = 0x8848 + ETH_P_MPLS_UC = 0x8847 + ETH_P_MVRP = 0x88f5 + ETH_P_PAE = 0x888e + ETH_P_PAUSE = 0x8808 + ETH_P_PHONET = 0xf5 + ETH_P_PPPTALK = 0x10 + ETH_P_PPP_DISC = 0x8863 + ETH_P_PPP_MP = 0x8 + ETH_P_PPP_SES = 0x8864 + ETH_P_PRP = 0x88fb + ETH_P_PUP = 0x200 + ETH_P_PUPAT = 0x201 + ETH_P_QINQ1 = 0x9100 + ETH_P_QINQ2 = 0x9200 + ETH_P_QINQ3 = 0x9300 + ETH_P_RARP = 0x8035 + ETH_P_SCA = 0x6007 + ETH_P_SLOW = 0x8809 + ETH_P_SNAP = 0x5 + ETH_P_TDLS = 0x890d + ETH_P_TEB = 0x6558 + ETH_P_TIPC = 0x88ca + ETH_P_TRAILER = 0x1c + ETH_P_TR_802_2 = 0x11 + ETH_P_WAN_PPP = 0x7 + ETH_P_WCCP = 0x883e + ETH_P_X25 = 0x805 + EXTA = 0xe + EXTB = 0xf + EXTPROC = 0x10000 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x1000 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x406 + F_EXLCK = 0x4 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLEASE = 0x401 + F_GETLK = 0x5 + F_GETLK64 = 0x5 + F_GETOWN = 0x9 + F_GETOWN_EX = 0x10 + F_GETPIPE_SZ = 0x408 + F_GETSIG = 0xb + F_LOCK = 0x1 + F_NOTIFY = 0x402 + F_OK = 0x0 + F_RDLCK = 0x0 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLEASE = 0x400 + F_SETLK = 0x6 + F_SETLK64 = 0x6 + F_SETLKW = 0x7 + F_SETLKW64 = 0x7 + F_SETOWN = 0x8 + F_SETOWN_EX = 0xf + F_SETPIPE_SZ = 0x407 + F_SETSIG = 0xa + F_SHLCK = 0x8 + F_TEST = 0x3 + F_TLOCK = 0x2 + F_ULOCK = 0x0 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x400 + ICANON = 0x2 + ICMPV6_FILTER = 0x1 + ICRNL = 0x100 + IEXTEN = 0x8000 + IFA_F_DADFAILED = 0x8 + IFA_F_DEPRECATED = 0x20 + IFA_F_HOMEADDRESS = 0x10 + IFA_F_NODAD = 0x2 + IFA_F_OPTIMISTIC = 0x4 + IFA_F_PERMANENT = 0x80 + IFA_F_SECONDARY = 0x1 + IFA_F_TEMPORARY = 0x1 + IFA_F_TENTATIVE = 0x40 + IFA_MAX = 0x7 + IFF_802_1Q_VLAN = 0x1 + IFF_ALLMULTI = 0x200 + IFF_ATTACH_QUEUE = 0x200 + IFF_AUTOMEDIA = 0x4000 + IFF_BONDING = 0x20 + IFF_BRIDGE_PORT = 0x4000 + IFF_BROADCAST = 0x2 + IFF_DEBUG = 0x4 + IFF_DETACH_QUEUE = 0x400 + IFF_DISABLE_NETPOLL = 0x1000 + IFF_DONT_BRIDGE = 0x800 + IFF_DORMANT = 0x20000 + IFF_DYNAMIC = 0x8000 + IFF_EBRIDGE = 0x2 + IFF_ECHO = 0x40000 + IFF_ISATAP = 0x80 + IFF_LIVE_ADDR_CHANGE = 0x100000 + IFF_LOOPBACK = 0x8 + IFF_LOWER_UP = 0x10000 + IFF_MACVLAN = 0x200000 + IFF_MACVLAN_PORT = 0x2000 + IFF_MASTER = 0x400 + IFF_MASTER_8023AD = 0x8 + IFF_MASTER_ALB = 0x10 + IFF_MASTER_ARPMON = 0x100 + IFF_MULTICAST = 0x1000 + IFF_MULTI_QUEUE = 0x100 + IFF_NOARP = 0x80 + IFF_NOFILTER = 0x1000 + IFF_NOTRAILERS = 0x20 + IFF_NO_PI = 0x1000 + IFF_ONE_QUEUE = 0x2000 + IFF_OVS_DATAPATH = 0x8000 + IFF_PERSIST = 0x800 + IFF_POINTOPOINT = 0x10 + IFF_PORTSEL = 0x2000 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SLAVE = 0x800 + IFF_SLAVE_INACTIVE = 0x4 + IFF_SLAVE_NEEDARP = 0x40 + IFF_SUPP_NOFCS = 0x80000 + IFF_TAP = 0x2 + IFF_TEAM_PORT = 0x40000 + IFF_TUN = 0x1 + IFF_TUN_EXCL = 0x8000 + IFF_TX_SKB_SHARING = 0x10000 + IFF_UNICAST_FLT = 0x20000 + IFF_UP = 0x1 + IFF_VNET_HDR = 0x4000 + IFF_VOLATILE = 0x70c5a + IFF_WAN_HDLC = 0x200 + IFF_XMIT_DST_RELEASE = 0x400 + IFNAMSIZ = 0x10 + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_ACCESS = 0x1 + IN_ALL_EVENTS = 0xfff + IN_ATTRIB = 0x4 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLOEXEC = 0x80000 + IN_CLOSE = 0x18 + IN_CLOSE_NOWRITE = 0x10 + IN_CLOSE_WRITE = 0x8 + IN_CREATE = 0x100 + IN_DELETE = 0x200 + IN_DELETE_SELF = 0x400 + IN_DONT_FOLLOW = 0x2000000 + IN_EXCL_UNLINK = 0x4000000 + IN_IGNORED = 0x8000 + IN_ISDIR = 0x40000000 + IN_LOOPBACKNET = 0x7f + IN_MASK_ADD = 0x20000000 + IN_MODIFY = 0x2 + IN_MOVE = 0xc0 + IN_MOVED_FROM = 0x40 + IN_MOVED_TO = 0x80 + IN_MOVE_SELF = 0x800 + IN_NONBLOCK = 0x800 + IN_ONESHOT = 0x80000000 + IN_ONLYDIR = 0x1000000 + IN_OPEN = 0x20 + IN_Q_OVERFLOW = 0x4000 + IN_UNMOUNT = 0x2000 + IPPROTO_AH = 0x33 + IPPROTO_BEETPH = 0x5e + IPPROTO_COMP = 0x6c + IPPROTO_DCCP = 0x21 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_ESP = 0x32 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPIP = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_MH = 0x87 + IPPROTO_MTP = 0x5c + IPPROTO_NONE = 0x3b + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPV6_2292DSTOPTS = 0x4 + IPV6_2292HOPLIMIT = 0x8 + IPV6_2292HOPOPTS = 0x3 + IPV6_2292PKTINFO = 0x2 + IPV6_2292PKTOPTIONS = 0x6 + IPV6_2292RTHDR = 0x5 + IPV6_ADDRFORM = 0x1 + IPV6_ADD_MEMBERSHIP = 0x14 + IPV6_AUTHHDR = 0xa + IPV6_CHECKSUM = 0x7 + IPV6_DROP_MEMBERSHIP = 0x15 + IPV6_DSTOPTS = 0x3b + IPV6_HOPLIMIT = 0x34 + IPV6_HOPOPTS = 0x36 + IPV6_IPSEC_POLICY = 0x22 + IPV6_JOIN_ANYCAST = 0x1b + IPV6_JOIN_GROUP = 0x14 + IPV6_LEAVE_ANYCAST = 0x1c + IPV6_LEAVE_GROUP = 0x15 + IPV6_MTU = 0x18 + IPV6_MTU_DISCOVER = 0x17 + IPV6_MULTICAST_HOPS = 0x12 + IPV6_MULTICAST_IF = 0x11 + IPV6_MULTICAST_LOOP = 0x13 + IPV6_NEXTHOP = 0x9 + IPV6_PKTINFO = 0x32 + IPV6_PMTUDISC_DO = 0x2 + IPV6_PMTUDISC_DONT = 0x0 + IPV6_PMTUDISC_PROBE = 0x3 + IPV6_PMTUDISC_WANT = 0x1 + IPV6_RECVDSTOPTS = 0x3a + IPV6_RECVERR = 0x19 + IPV6_RECVHOPLIMIT = 0x33 + IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVPKTINFO = 0x31 + IPV6_RECVRTHDR = 0x38 + IPV6_RECVTCLASS = 0x42 + IPV6_ROUTER_ALERT = 0x16 + IPV6_RTHDR = 0x39 + IPV6_RTHDRDSTOPTS = 0x37 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_RXDSTOPTS = 0x3b + IPV6_RXHOPOPTS = 0x36 + IPV6_TCLASS = 0x43 + IPV6_UNICAST_HOPS = 0x10 + IPV6_V6ONLY = 0x1a + IPV6_XFRM_POLICY = 0x23 + IP_ADD_MEMBERSHIP = 0x23 + IP_ADD_SOURCE_MEMBERSHIP = 0x27 + IP_BLOCK_SOURCE = 0x26 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0x24 + IP_DROP_SOURCE_MEMBERSHIP = 0x28 + IP_FREEBIND = 0xf + IP_HDRINCL = 0x3 + IP_IPSEC_POLICY = 0x10 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINTTL = 0x15 + IP_MSFILTER = 0x29 + IP_MSS = 0x240 + IP_MTU = 0xe + IP_MTU_DISCOVER = 0xa + IP_MULTICAST_ALL = 0x31 + IP_MULTICAST_IF = 0x20 + IP_MULTICAST_LOOP = 0x22 + IP_MULTICAST_TTL = 0x21 + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x4 + IP_ORIGDSTADDR = 0x14 + IP_PASSSEC = 0x12 + IP_PKTINFO = 0x8 + IP_PKTOPTIONS = 0x9 + IP_PMTUDISC = 0xa + IP_PMTUDISC_DO = 0x2 + IP_PMTUDISC_DONT = 0x0 + IP_PMTUDISC_PROBE = 0x3 + IP_PMTUDISC_WANT = 0x1 + IP_RECVERR = 0xb + IP_RECVOPTS = 0x6 + IP_RECVORIGDSTADDR = 0x14 + IP_RECVRETOPTS = 0x7 + IP_RECVTOS = 0xd + IP_RECVTTL = 0xc + IP_RETOPTS = 0x7 + IP_RF = 0x8000 + IP_ROUTER_ALERT = 0x5 + IP_TOS = 0x1 + IP_TRANSPARENT = 0x13 + IP_TTL = 0x2 + IP_UNBLOCK_SOURCE = 0x25 + IP_UNICAST_IF = 0x32 + IP_XFRM_POLICY = 0x11 + ISIG = 0x1 + ISTRIP = 0x20 + IUTF8 = 0x4000 + IXANY = 0x800 + IXOFF = 0x1000 + IXON = 0x400 + LINUX_REBOOT_CMD_CAD_OFF = 0x0 + LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef + LINUX_REBOOT_CMD_HALT = 0xcdef0123 + LINUX_REBOOT_CMD_KEXEC = 0x45584543 + LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc + LINUX_REBOOT_CMD_RESTART = 0x1234567 + LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 + LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 + LINUX_REBOOT_MAGIC1 = 0xfee1dead + LINUX_REBOOT_MAGIC2 = 0x28121969 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DODUMP = 0x11 + MADV_DOFORK = 0xb + MADV_DONTDUMP = 0x10 + MADV_DONTFORK = 0xa + MADV_DONTNEED = 0x4 + MADV_HUGEPAGE = 0xe + MADV_HWPOISON = 0x64 + MADV_MERGEABLE = 0xc + MADV_NOHUGEPAGE = 0xf + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_REMOVE = 0x9 + MADV_SEQUENTIAL = 0x2 + MADV_UNMERGEABLE = 0xd + MADV_WILLNEED = 0x3 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 + MAP_EXECUTABLE = 0x1000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_GROWSDOWN = 0x100 + MAP_HUGETLB = 0x40000 + MAP_HUGE_MASK = 0x3f + MAP_HUGE_SHIFT = 0x1a + MAP_LOCKED = 0x2000 + MAP_NONBLOCK = 0x10000 + MAP_NORESERVE = 0x4000 + MAP_POPULATE = 0x8000 + MAP_PRIVATE = 0x2 + MAP_SHARED = 0x1 + MAP_STACK = 0x20000 + MAP_TYPE = 0xf + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MNT_DETACH = 0x2 + MNT_EXPIRE = 0x4 + MNT_FORCE = 0x1 + MSG_CMSG_CLOEXEC = 0x40000000 + MSG_CONFIRM = 0x800 + MSG_CTRUNC = 0x8 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x40 + MSG_EOR = 0x80 + MSG_ERRQUEUE = 0x2000 + MSG_FASTOPEN = 0x20000000 + MSG_FIN = 0x200 + MSG_MORE = 0x8000 + MSG_NOSIGNAL = 0x4000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_PROXY = 0x10 + MSG_RST = 0x1000 + MSG_SYN = 0x400 + MSG_TRUNC = 0x20 + MSG_TRYHARD = 0x4 + MSG_WAITALL = 0x100 + MSG_WAITFORONE = 0x10000 + MS_ACTIVE = 0x40000000 + MS_ASYNC = 0x1 + MS_BIND = 0x1000 + MS_DIRSYNC = 0x80 + MS_INVALIDATE = 0x2 + MS_I_VERSION = 0x800000 + MS_KERNMOUNT = 0x400000 + MS_MANDLOCK = 0x40 + MS_MGC_MSK = 0xffff0000 + MS_MGC_VAL = 0xc0ed0000 + MS_MOVE = 0x2000 + MS_NOATIME = 0x400 + MS_NODEV = 0x4 + MS_NODIRATIME = 0x800 + MS_NOEXEC = 0x8 + MS_NOSUID = 0x2 + MS_NOUSER = -0x80000000 + MS_POSIXACL = 0x10000 + MS_PRIVATE = 0x40000 + MS_RDONLY = 0x1 + MS_REC = 0x4000 + MS_RELATIME = 0x200000 + MS_REMOUNT = 0x20 + MS_RMT_MASK = 0x800051 + MS_SHARED = 0x100000 + MS_SILENT = 0x8000 + MS_SLAVE = 0x80000 + MS_STRICTATIME = 0x1000000 + MS_SYNC = 0x4 + MS_SYNCHRONOUS = 0x10 + MS_UNBINDABLE = 0x20000 + NAME_MAX = 0xff + NETLINK_ADD_MEMBERSHIP = 0x1 + NETLINK_AUDIT = 0x9 + NETLINK_BROADCAST_ERROR = 0x4 + NETLINK_CONNECTOR = 0xb + NETLINK_CRYPTO = 0x15 + NETLINK_DNRTMSG = 0xe + NETLINK_DROP_MEMBERSHIP = 0x2 + NETLINK_ECRYPTFS = 0x13 + NETLINK_FIB_LOOKUP = 0xa + NETLINK_FIREWALL = 0x3 + NETLINK_GENERIC = 0x10 + NETLINK_INET_DIAG = 0x4 + NETLINK_IP6_FW = 0xd + NETLINK_ISCSI = 0x8 + NETLINK_KOBJECT_UEVENT = 0xf + NETLINK_NETFILTER = 0xc + NETLINK_NFLOG = 0x5 + NETLINK_NO_ENOBUFS = 0x5 + NETLINK_PKTINFO = 0x3 + NETLINK_RDMA = 0x14 + NETLINK_ROUTE = 0x0 + NETLINK_RX_RING = 0x6 + NETLINK_SCSITRANSPORT = 0x12 + NETLINK_SELINUX = 0x7 + NETLINK_SOCK_DIAG = 0x4 + NETLINK_TX_RING = 0x7 + NETLINK_UNUSED = 0x1 + NETLINK_USERSOCK = 0x2 + NETLINK_XFRM = 0x6 + NLA_ALIGNTO = 0x4 + NLA_F_NESTED = 0x8000 + NLA_F_NET_BYTEORDER = 0x4000 + NLA_HDRLEN = 0x4 + NLMSG_ALIGNTO = 0x4 + NLMSG_DONE = 0x3 + NLMSG_ERROR = 0x2 + NLMSG_HDRLEN = 0x10 + NLMSG_MIN_TYPE = 0x10 + NLMSG_NOOP = 0x1 + NLMSG_OVERRUN = 0x4 + NLM_F_ACK = 0x4 + NLM_F_APPEND = 0x800 + NLM_F_ATOMIC = 0x400 + NLM_F_CREATE = 0x400 + NLM_F_DUMP = 0x300 + NLM_F_DUMP_INTR = 0x10 + NLM_F_ECHO = 0x8 + NLM_F_EXCL = 0x200 + NLM_F_MATCH = 0x200 + NLM_F_MULTI = 0x2 + NLM_F_REPLACE = 0x100 + NLM_F_REQUEST = 0x1 + NLM_F_ROOT = 0x100 + NOFLSH = 0x80 + OCRNL = 0x8 + OFDEL = 0x80 + OFILL = 0x40 + ONLCR = 0x4 + ONLRET = 0x20 + ONOCR = 0x10 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x400 + O_ASYNC = 0x2000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x40 + O_DIRECT = 0x10000 + O_DIRECTORY = 0x4000 + O_DSYNC = 0x1000 + O_EXCL = 0x80 + O_FSYNC = 0x101000 + O_LARGEFILE = 0x0 + O_NDELAY = 0x800 + O_NOATIME = 0x40000 + O_NOCTTY = 0x100 + O_NOFOLLOW = 0x8000 + O_NONBLOCK = 0x800 + O_PATH = 0x200000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x101000 + O_SYNC = 0x101000 + O_TMPFILE = 0x410000 + O_TRUNC = 0x200 + O_WRONLY = 0x1 + PACKET_ADD_MEMBERSHIP = 0x1 + PACKET_AUXDATA = 0x8 + PACKET_BROADCAST = 0x1 + PACKET_COPY_THRESH = 0x7 + PACKET_DROP_MEMBERSHIP = 0x2 + PACKET_FANOUT = 0x12 + PACKET_FANOUT_CPU = 0x2 + PACKET_FANOUT_FLAG_DEFRAG = 0x8000 + PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_HASH = 0x0 + PACKET_FANOUT_LB = 0x1 + PACKET_FANOUT_RND = 0x4 + PACKET_FANOUT_ROLLOVER = 0x3 + PACKET_FASTROUTE = 0x6 + PACKET_HDRLEN = 0xb + PACKET_HOST = 0x0 + PACKET_LOOPBACK = 0x5 + PACKET_LOSS = 0xe + PACKET_MR_ALLMULTI = 0x2 + PACKET_MR_MULTICAST = 0x0 + PACKET_MR_PROMISC = 0x1 + PACKET_MR_UNICAST = 0x3 + PACKET_MULTICAST = 0x2 + PACKET_ORIGDEV = 0x9 + PACKET_OTHERHOST = 0x3 + PACKET_OUTGOING = 0x4 + PACKET_RECV_OUTPUT = 0x3 + PACKET_RESERVE = 0xc + PACKET_RX_RING = 0x5 + PACKET_STATISTICS = 0x6 + PACKET_TIMESTAMP = 0x11 + PACKET_TX_HAS_OFF = 0x13 + PACKET_TX_RING = 0xd + PACKET_TX_TIMESTAMP = 0x10 + PACKET_VERSION = 0xa + PACKET_VNET_HDR = 0xf + PARENB = 0x100 + PARITY_CRC16_PR0 = 0x2 + PARITY_CRC16_PR0_CCITT = 0x4 + PARITY_CRC16_PR1 = 0x3 + PARITY_CRC16_PR1_CCITT = 0x5 + PARITY_CRC32_PR0_CCITT = 0x6 + PARITY_CRC32_PR1_CCITT = 0x7 + PARITY_DEFAULT = 0x0 + PARITY_NONE = 0x1 + PARMRK = 0x8 + PARODD = 0x200 + PENDIN = 0x4000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_GROWSDOWN = 0x1000000 + PROT_GROWSUP = 0x2000000 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PR_CAPBSET_DROP = 0x18 + PR_CAPBSET_READ = 0x17 + PR_ENDIAN_BIG = 0x0 + PR_ENDIAN_LITTLE = 0x1 + PR_ENDIAN_PPC_LITTLE = 0x2 + PR_FPEMU_NOPRINT = 0x1 + PR_FPEMU_SIGFPE = 0x2 + PR_FP_EXC_ASYNC = 0x2 + PR_FP_EXC_DISABLED = 0x0 + PR_FP_EXC_DIV = 0x10000 + PR_FP_EXC_INV = 0x100000 + PR_FP_EXC_NONRECOV = 0x1 + PR_FP_EXC_OVF = 0x20000 + PR_FP_EXC_PRECISE = 0x3 + PR_FP_EXC_RES = 0x80000 + PR_FP_EXC_SW_ENABLE = 0x80 + PR_FP_EXC_UND = 0x40000 + PR_GET_CHILD_SUBREAPER = 0x25 + PR_GET_DUMPABLE = 0x3 + PR_GET_ENDIAN = 0x13 + PR_GET_FPEMU = 0x9 + PR_GET_FPEXC = 0xb + PR_GET_KEEPCAPS = 0x7 + PR_GET_NAME = 0x10 + PR_GET_NO_NEW_PRIVS = 0x27 + PR_GET_PDEATHSIG = 0x2 + PR_GET_SECCOMP = 0x15 + PR_GET_SECUREBITS = 0x1b + PR_GET_TID_ADDRESS = 0x28 + PR_GET_TIMERSLACK = 0x1e + PR_GET_TIMING = 0xd + PR_GET_TSC = 0x19 + PR_GET_UNALIGN = 0x5 + PR_MCE_KILL = 0x21 + PR_MCE_KILL_CLEAR = 0x0 + PR_MCE_KILL_DEFAULT = 0x2 + PR_MCE_KILL_EARLY = 0x1 + PR_MCE_KILL_GET = 0x22 + PR_MCE_KILL_LATE = 0x0 + PR_MCE_KILL_SET = 0x1 + PR_SET_CHILD_SUBREAPER = 0x24 + PR_SET_DUMPABLE = 0x4 + PR_SET_ENDIAN = 0x14 + PR_SET_FPEMU = 0xa + PR_SET_FPEXC = 0xc + PR_SET_KEEPCAPS = 0x8 + PR_SET_MM = 0x23 + PR_SET_MM_ARG_END = 0x9 + PR_SET_MM_ARG_START = 0x8 + PR_SET_MM_AUXV = 0xc + PR_SET_MM_BRK = 0x7 + PR_SET_MM_END_CODE = 0x2 + PR_SET_MM_END_DATA = 0x4 + PR_SET_MM_ENV_END = 0xb + PR_SET_MM_ENV_START = 0xa + PR_SET_MM_EXE_FILE = 0xd + PR_SET_MM_START_BRK = 0x6 + PR_SET_MM_START_CODE = 0x1 + PR_SET_MM_START_DATA = 0x3 + PR_SET_MM_START_STACK = 0x5 + PR_SET_NAME = 0xf + PR_SET_NO_NEW_PRIVS = 0x26 + PR_SET_PDEATHSIG = 0x1 + PR_SET_PTRACER = 0x59616d61 + PR_SET_PTRACER_ANY = -0x1 + PR_SET_SECCOMP = 0x16 + PR_SET_SECUREBITS = 0x1c + PR_SET_TIMERSLACK = 0x1d + PR_SET_TIMING = 0xe + PR_SET_TSC = 0x1a + PR_SET_UNALIGN = 0x6 + PR_TASK_PERF_EVENTS_DISABLE = 0x1f + PR_TASK_PERF_EVENTS_ENABLE = 0x20 + PR_TIMING_STATISTICAL = 0x0 + PR_TIMING_TIMESTAMP = 0x1 + PR_TSC_ENABLE = 0x1 + PR_TSC_SIGSEGV = 0x2 + PR_UNALIGN_NOPRINT = 0x1 + PR_UNALIGN_SIGBUS = 0x2 + PTRACE_ATTACH = 0x10 + PTRACE_CONT = 0x7 + PTRACE_DETACH = 0x11 + PTRACE_EVENT_CLONE = 0x3 + PTRACE_EVENT_EXEC = 0x4 + PTRACE_EVENT_EXIT = 0x6 + PTRACE_EVENT_FORK = 0x1 + PTRACE_EVENT_SECCOMP = 0x7 + PTRACE_EVENT_STOP = 0x80 + PTRACE_EVENT_VFORK = 0x2 + PTRACE_EVENT_VFORK_DONE = 0x5 + PTRACE_GETEVENTMSG = 0x4201 + PTRACE_GETREGS = 0xc + PTRACE_GETREGSET = 0x4204 + PTRACE_GETSIGINFO = 0x4202 + PTRACE_GETSIGMASK = 0x420a + PTRACE_INTERRUPT = 0x4207 + PTRACE_KILL = 0x8 + PTRACE_LISTEN = 0x4208 + PTRACE_O_EXITKILL = 0x100000 + PTRACE_O_MASK = 0x1000ff + PTRACE_O_TRACECLONE = 0x8 + PTRACE_O_TRACEEXEC = 0x10 + PTRACE_O_TRACEEXIT = 0x40 + PTRACE_O_TRACEFORK = 0x2 + PTRACE_O_TRACESECCOMP = 0x80 + PTRACE_O_TRACESYSGOOD = 0x1 + PTRACE_O_TRACEVFORK = 0x4 + PTRACE_O_TRACEVFORKDONE = 0x20 + PTRACE_PEEKDATA = 0x2 + PTRACE_PEEKSIGINFO = 0x4209 + PTRACE_PEEKSIGINFO_SHARED = 0x1 + PTRACE_PEEKTEXT = 0x1 + PTRACE_PEEKUSR = 0x3 + PTRACE_POKEDATA = 0x5 + PTRACE_POKETEXT = 0x4 + PTRACE_POKEUSR = 0x6 + PTRACE_SEIZE = 0x4206 + PTRACE_SETOPTIONS = 0x4200 + PTRACE_SETREGS = 0xd + PTRACE_SETREGSET = 0x4205 + PTRACE_SETSIGINFO = 0x4203 + PTRACE_SETSIGMASK = 0x420b + PTRACE_SINGLESTEP = 0x9 + PTRACE_SYSCALL = 0x18 + PTRACE_TRACEME = 0x0 + RLIMIT_AS = 0x9 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x7 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = -0x1 + RTAX_ADVMSS = 0x8 + RTAX_CWND = 0x7 + RTAX_FEATURES = 0xc + RTAX_FEATURE_ALLFRAG = 0x8 + RTAX_FEATURE_ECN = 0x1 + RTAX_FEATURE_SACK = 0x2 + RTAX_FEATURE_TIMESTAMP = 0x4 + RTAX_HOPLIMIT = 0xa + RTAX_INITCWND = 0xb + RTAX_INITRWND = 0xe + RTAX_LOCK = 0x1 + RTAX_MAX = 0xf + RTAX_MTU = 0x2 + RTAX_QUICKACK = 0xf + RTAX_REORDERING = 0x9 + RTAX_RTO_MIN = 0xd + RTAX_RTT = 0x4 + RTAX_RTTVAR = 0x5 + RTAX_SSTHRESH = 0x6 + RTAX_UNSPEC = 0x0 + RTAX_WINDOW = 0x3 + RTA_ALIGNTO = 0x4 + RTA_MAX = 0x11 + RTCF_DIRECTSRC = 0x4000000 + RTCF_DOREDIRECT = 0x1000000 + RTCF_LOG = 0x2000000 + RTCF_MASQ = 0x400000 + RTCF_NAT = 0x800000 + RTCF_VALVE = 0x200000 + RTF_ADDRCLASSMASK = 0xf8000000 + RTF_ADDRCONF = 0x40000 + RTF_ALLONLINK = 0x20000 + RTF_BROADCAST = 0x10000000 + RTF_CACHE = 0x1000000 + RTF_DEFAULT = 0x10000 + RTF_DYNAMIC = 0x10 + RTF_FLOW = 0x2000000 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_INTERFACE = 0x40000000 + RTF_IRTT = 0x100 + RTF_LINKRT = 0x100000 + RTF_LOCAL = 0x80000000 + RTF_MODIFIED = 0x20 + RTF_MSS = 0x40 + RTF_MTU = 0x40 + RTF_MULTICAST = 0x20000000 + RTF_NAT = 0x8000000 + RTF_NOFORWARD = 0x1000 + RTF_NONEXTHOP = 0x200000 + RTF_NOPMTUDISC = 0x4000 + RTF_POLICY = 0x4000000 + RTF_REINSTATE = 0x8 + RTF_REJECT = 0x200 + RTF_STATIC = 0x400 + RTF_THROW = 0x2000 + RTF_UP = 0x1 + RTF_WINDOW = 0x80 + RTF_XRESOLVE = 0x800 + RTM_BASE = 0x10 + RTM_DELACTION = 0x31 + RTM_DELADDR = 0x15 + RTM_DELADDRLABEL = 0x49 + RTM_DELLINK = 0x11 + RTM_DELMDB = 0x55 + RTM_DELNEIGH = 0x1d + RTM_DELQDISC = 0x25 + RTM_DELROUTE = 0x19 + RTM_DELRULE = 0x21 + RTM_DELTCLASS = 0x29 + RTM_DELTFILTER = 0x2d + RTM_F_CLONED = 0x200 + RTM_F_EQUALIZE = 0x400 + RTM_F_NOTIFY = 0x100 + RTM_F_PREFIX = 0x800 + RTM_GETACTION = 0x32 + RTM_GETADDR = 0x16 + RTM_GETADDRLABEL = 0x4a + RTM_GETANYCAST = 0x3e + RTM_GETDCB = 0x4e + RTM_GETLINK = 0x12 + RTM_GETMDB = 0x56 + RTM_GETMULTICAST = 0x3a + RTM_GETNEIGH = 0x1e + RTM_GETNEIGHTBL = 0x42 + RTM_GETNETCONF = 0x52 + RTM_GETQDISC = 0x26 + RTM_GETROUTE = 0x1a + RTM_GETRULE = 0x22 + RTM_GETTCLASS = 0x2a + RTM_GETTFILTER = 0x2e + RTM_MAX = 0x57 + RTM_NEWACTION = 0x30 + RTM_NEWADDR = 0x14 + RTM_NEWADDRLABEL = 0x48 + RTM_NEWLINK = 0x10 + RTM_NEWMDB = 0x54 + RTM_NEWNDUSEROPT = 0x44 + RTM_NEWNEIGH = 0x1c + RTM_NEWNEIGHTBL = 0x40 + RTM_NEWNETCONF = 0x50 + RTM_NEWPREFIX = 0x34 + RTM_NEWQDISC = 0x24 + RTM_NEWROUTE = 0x18 + RTM_NEWRULE = 0x20 + RTM_NEWTCLASS = 0x28 + RTM_NEWTFILTER = 0x2c + RTM_NR_FAMILIES = 0x12 + RTM_NR_MSGTYPES = 0x48 + RTM_SETDCB = 0x4f + RTM_SETLINK = 0x13 + RTM_SETNEIGHTBL = 0x43 + RTNH_ALIGNTO = 0x4 + RTNH_F_DEAD = 0x1 + RTNH_F_ONLINK = 0x4 + RTNH_F_PERVASIVE = 0x2 + RTN_MAX = 0xb + RTPROT_BIRD = 0xc + RTPROT_BOOT = 0x3 + RTPROT_DHCP = 0x10 + RTPROT_DNROUTED = 0xd + RTPROT_GATED = 0x8 + RTPROT_KERNEL = 0x2 + RTPROT_MROUTED = 0x11 + RTPROT_MRT = 0xa + RTPROT_NTK = 0xf + RTPROT_RA = 0x9 + RTPROT_REDIRECT = 0x1 + RTPROT_STATIC = 0x4 + RTPROT_UNSPEC = 0x0 + RTPROT_XORP = 0xe + RTPROT_ZEBRA = 0xb + RT_CLASS_DEFAULT = 0xfd + RT_CLASS_LOCAL = 0xff + RT_CLASS_MAIN = 0xfe + RT_CLASS_MAX = 0xff + RT_CLASS_UNSPEC = 0x0 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_CREDENTIALS = 0x2 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x1d + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPNS = 0x23 + SCM_WIFI_STATUS = 0x29 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDDLCI = 0x8980 + SIOCADDMULTI = 0x8931 + SIOCADDRT = 0x890b + SIOCATMARK = 0x8905 + SIOCDARP = 0x8953 + SIOCDELDLCI = 0x8981 + SIOCDELMULTI = 0x8932 + SIOCDELRT = 0x890c + SIOCDEVPRIVATE = 0x89f0 + SIOCDIFADDR = 0x8936 + SIOCDRARP = 0x8960 + SIOCGARP = 0x8954 + SIOCGIFADDR = 0x8915 + SIOCGIFBR = 0x8940 + SIOCGIFBRDADDR = 0x8919 + SIOCGIFCONF = 0x8912 + SIOCGIFCOUNT = 0x8938 + SIOCGIFDSTADDR = 0x8917 + SIOCGIFENCAP = 0x8925 + SIOCGIFFLAGS = 0x8913 + SIOCGIFHWADDR = 0x8927 + SIOCGIFINDEX = 0x8933 + SIOCGIFMAP = 0x8970 + SIOCGIFMEM = 0x891f + SIOCGIFMETRIC = 0x891d + SIOCGIFMTU = 0x8921 + SIOCGIFNAME = 0x8910 + SIOCGIFNETMASK = 0x891b + SIOCGIFPFLAGS = 0x8935 + SIOCGIFSLAVE = 0x8929 + SIOCGIFTXQLEN = 0x8942 + SIOCGPGRP = 0x8904 + SIOCGRARP = 0x8961 + SIOCGSTAMP = 0x8906 + SIOCGSTAMPNS = 0x8907 + SIOCPROTOPRIVATE = 0x89e0 + SIOCRTMSG = 0x890d + SIOCSARP = 0x8955 + SIOCSIFADDR = 0x8916 + SIOCSIFBR = 0x8941 + SIOCSIFBRDADDR = 0x891a + SIOCSIFDSTADDR = 0x8918 + SIOCSIFENCAP = 0x8926 + SIOCSIFFLAGS = 0x8914 + SIOCSIFHWADDR = 0x8924 + SIOCSIFHWBROADCAST = 0x8937 + SIOCSIFLINK = 0x8911 + SIOCSIFMAP = 0x8971 + SIOCSIFMEM = 0x8920 + SIOCSIFMETRIC = 0x891e + SIOCSIFMTU = 0x8922 + SIOCSIFNAME = 0x8923 + SIOCSIFNETMASK = 0x891c + SIOCSIFPFLAGS = 0x8934 + SIOCSIFSLAVE = 0x8930 + SIOCSIFTXQLEN = 0x8943 + SIOCSPGRP = 0x8902 + SIOCSRARP = 0x8962 + SOCK_CLOEXEC = 0x80000 + SOCK_DCCP = 0x6 + SOCK_DGRAM = 0x2 + SOCK_NONBLOCK = 0x800 + SOCK_PACKET = 0xa + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_AAL = 0x109 + SOL_ATM = 0x108 + SOL_DECNET = 0x105 + SOL_ICMPV6 = 0x3a + SOL_IP = 0x0 + SOL_IPV6 = 0x29 + SOL_IRDA = 0x10a + SOL_PACKET = 0x107 + SOL_RAW = 0xff + SOL_SOCKET = 0x1 + SOL_TCP = 0x6 + SOL_X25 = 0x106 + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x1e + SO_ATTACH_FILTER = 0x1a + SO_BINDTODEVICE = 0x19 + SO_BROADCAST = 0x6 + SO_BSDCOMPAT = 0xe + SO_BUSY_POLL = 0x2e + SO_DEBUG = 0x1 + SO_DETACH_FILTER = 0x1b + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 + SO_GET_FILTER = 0x1a + SO_KEEPALIVE = 0x9 + SO_LINGER = 0xd + SO_LOCK_FILTER = 0x2c + SO_MARK = 0x24 + SO_MAX_PACING_RATE = 0x2f + SO_NOFCS = 0x2b + SO_NO_CHECK = 0xb + SO_OOBINLINE = 0xa + SO_PASSCRED = 0x10 + SO_PASSSEC = 0x22 + SO_PEEK_OFF = 0x2a + SO_PEERCRED = 0x11 + SO_PEERNAME = 0x1c + SO_PEERSEC = 0x1f + SO_PRIORITY = 0xc + SO_PROTOCOL = 0x26 + SO_RCVBUF = 0x8 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x12 + SO_RCVTIMEO = 0x14 + SO_REUSEADDR = 0x2 + SO_REUSEPORT = 0xf + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SELECT_ERR_QUEUE = 0x2d + SO_SNDBUF = 0x7 + SO_SNDBUFFORCE = 0x20 + SO_SNDLOWAT = 0x13 + SO_SNDTIMEO = 0x15 + SO_TIMESTAMP = 0x1d + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TYPE = 0x3 + SO_WIFI_STATUS = 0x29 + S_BLKSIZE = 0x200 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TCFLSH = 0x540b + TCIFLUSH = 0x0 + TCIOFLUSH = 0x2 + TCOFLUSH = 0x1 + TCP_CONGESTION = 0xd + TCP_COOKIE_IN_ALWAYS = 0x1 + TCP_COOKIE_MAX = 0x10 + TCP_COOKIE_MIN = 0x8 + TCP_COOKIE_OUT_NEVER = 0x2 + TCP_COOKIE_PAIR_SIZE = 0x20 + TCP_COOKIE_TRANSACTIONS = 0xf + TCP_CORK = 0x3 + TCP_DEFER_ACCEPT = 0x9 + TCP_FASTOPEN = 0x17 + TCP_INFO = 0xb + TCP_KEEPCNT = 0x6 + TCP_KEEPIDLE = 0x4 + TCP_KEEPINTVL = 0x5 + TCP_LINGER2 = 0x8 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0xe + TCP_MD5SIG_MAXKEYLEN = 0x50 + TCP_MSS = 0x200 + TCP_MSS_DEFAULT = 0x218 + TCP_MSS_DESIRED = 0x4c4 + TCP_NODELAY = 0x1 + TCP_QUEUE_SEQ = 0x15 + TCP_QUICKACK = 0xc + TCP_REPAIR = 0x13 + TCP_REPAIR_OPTIONS = 0x16 + TCP_REPAIR_QUEUE = 0x14 + TCP_SYNCNT = 0x7 + TCP_S_DATA_IN = 0x4 + TCP_S_DATA_OUT = 0x8 + TCP_THIN_DUPACK = 0x11 + TCP_THIN_LINEAR_TIMEOUTS = 0x10 + TCP_TIMESTAMP = 0x18 + TCP_USER_TIMEOUT = 0x12 + TCP_WINDOW_CLAMP = 0xa + TCSAFLUSH = 0x2 + TIOCCBRK = 0x5428 + TIOCCONS = 0x541d + TIOCEXCL = 0x540c + TIOCGDEV = 0x80045432 + TIOCGETD = 0x5424 + TIOCGEXCL = 0x80045440 + TIOCGICOUNT = 0x545d + TIOCGLCKTRMIOS = 0x5456 + TIOCGPGRP = 0x540f + TIOCGPKT = 0x80045438 + TIOCGPTLCK = 0x80045439 + TIOCGPTN = 0x80045430 + TIOCGRS485 = 0x542e + TIOCGSERIAL = 0x541e + TIOCGSID = 0x5429 + TIOCGSOFTCAR = 0x5419 + TIOCGWINSZ = 0x5413 + TIOCINQ = 0x541b + TIOCLINUX = 0x541c + TIOCMBIC = 0x5417 + TIOCMBIS = 0x5416 + TIOCMGET = 0x5415 + TIOCMIWAIT = 0x545c + TIOCMSET = 0x5418 + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x5422 + TIOCNXCL = 0x540d + TIOCOUTQ = 0x5411 + TIOCPKT = 0x5420 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x540e + TIOCSERCONFIG = 0x5453 + TIOCSERGETLSR = 0x5459 + TIOCSERGETMULTI = 0x545a + TIOCSERGSTRUCT = 0x5458 + TIOCSERGWILD = 0x5454 + TIOCSERSETMULTI = 0x545b + TIOCSERSWILD = 0x5455 + TIOCSER_TEMT = 0x1 + TIOCSETD = 0x5423 + TIOCSIG = 0x40045436 + TIOCSLCKTRMIOS = 0x5457 + TIOCSPGRP = 0x5410 + TIOCSPTLCK = 0x40045431 + TIOCSRS485 = 0x542f + TIOCSSERIAL = 0x541f + TIOCSSOFTCAR = 0x541a + TIOCSTI = 0x5412 + TIOCSWINSZ = 0x5414 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x100 + TUNATTACHFILTER = 0x401054d5 + TUNDETACHFILTER = 0x401054d6 + TUNGETFEATURES = 0x800454cf + TUNGETFILTER = 0x801054db + TUNGETIFF = 0x800454d2 + TUNGETSNDBUF = 0x800454d3 + TUNGETVNETHDRSZ = 0x800454d7 + TUNSETDEBUG = 0x400454c9 + TUNSETGROUP = 0x400454ce + TUNSETIFF = 0x400454ca + TUNSETIFINDEX = 0x400454da + TUNSETLINK = 0x400454cd + TUNSETNOCSUM = 0x400454c8 + TUNSETOFFLOAD = 0x400454d0 + TUNSETOWNER = 0x400454cc + TUNSETPERSIST = 0x400454cb + TUNSETQUEUE = 0x400454d9 + TUNSETSNDBUF = 0x400454d4 + TUNSETTXFILTER = 0x400454d1 + TUNSETVNETHDRSZ = 0x400454d8 + VDISCARD = 0xd + VEOF = 0x4 + VEOL = 0xb + VEOL2 = 0x10 + VERASE = 0x2 + VINTR = 0x0 + VKILL = 0x3 + VLNEXT = 0xf + VMIN = 0x6 + VQUIT = 0x1 + VREPRINT = 0xc + VSTART = 0x8 + VSTOP = 0x9 + VSUSP = 0xa + VSWTC = 0x7 + VT0 = 0x0 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe + WALL = 0x40000000 + WCLONE = 0x80000000 + WCONTINUED = 0x8 + WEXITED = 0x4 + WNOHANG = 0x1 + WNOTHREAD = 0x20000000 + WNOWAIT = 0x1000000 + WORDSIZE = 0x40 + WSTOPPED = 0x2 + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x62) + EADDRNOTAVAIL = syscall.Errno(0x63) + EADV = syscall.Errno(0x44) + EAFNOSUPPORT = syscall.Errno(0x61) + EAGAIN = syscall.Errno(0xb) + EALREADY = syscall.Errno(0x72) + EBADE = syscall.Errno(0x34) + EBADF = syscall.Errno(0x9) + EBADFD = syscall.Errno(0x4d) + EBADMSG = syscall.Errno(0x4a) + EBADR = syscall.Errno(0x35) + EBADRQC = syscall.Errno(0x38) + EBADSLT = syscall.Errno(0x39) + EBFONT = syscall.Errno(0x3b) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x7d) + ECHILD = syscall.Errno(0xa) + ECHRNG = syscall.Errno(0x2c) + ECOMM = syscall.Errno(0x46) + ECONNABORTED = syscall.Errno(0x67) + ECONNREFUSED = syscall.Errno(0x6f) + ECONNRESET = syscall.Errno(0x68) + EDEADLK = syscall.Errno(0x23) + EDEADLOCK = syscall.Errno(0x23) + EDESTADDRREQ = syscall.Errno(0x59) + EDOM = syscall.Errno(0x21) + EDOTDOT = syscall.Errno(0x49) + EDQUOT = syscall.Errno(0x7a) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EHOSTDOWN = syscall.Errno(0x70) + EHOSTUNREACH = syscall.Errno(0x71) + EHWPOISON = syscall.Errno(0x85) + EIDRM = syscall.Errno(0x2b) + EILSEQ = syscall.Errno(0x54) + EINPROGRESS = syscall.Errno(0x73) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x6a) + EISDIR = syscall.Errno(0x15) + EISNAM = syscall.Errno(0x78) + EKEYEXPIRED = syscall.Errno(0x7f) + EKEYREJECTED = syscall.Errno(0x81) + EKEYREVOKED = syscall.Errno(0x80) + EL2HLT = syscall.Errno(0x33) + EL2NSYNC = syscall.Errno(0x2d) + EL3HLT = syscall.Errno(0x2e) + EL3RST = syscall.Errno(0x2f) + ELIBACC = syscall.Errno(0x4f) + ELIBBAD = syscall.Errno(0x50) + ELIBEXEC = syscall.Errno(0x53) + ELIBMAX = syscall.Errno(0x52) + ELIBSCN = syscall.Errno(0x51) + ELNRNG = syscall.Errno(0x30) + ELOOP = syscall.Errno(0x28) + EMEDIUMTYPE = syscall.Errno(0x7c) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x5a) + EMULTIHOP = syscall.Errno(0x48) + ENAMETOOLONG = syscall.Errno(0x24) + ENAVAIL = syscall.Errno(0x77) + ENETDOWN = syscall.Errno(0x64) + ENETRESET = syscall.Errno(0x66) + ENETUNREACH = syscall.Errno(0x65) + ENFILE = syscall.Errno(0x17) + ENOANO = syscall.Errno(0x37) + ENOBUFS = syscall.Errno(0x69) + ENOCSI = syscall.Errno(0x32) + ENODATA = syscall.Errno(0x3d) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOKEY = syscall.Errno(0x7e) + ENOLCK = syscall.Errno(0x25) + ENOLINK = syscall.Errno(0x43) + ENOMEDIUM = syscall.Errno(0x7b) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x2a) + ENONET = syscall.Errno(0x40) + ENOPKG = syscall.Errno(0x41) + ENOPROTOOPT = syscall.Errno(0x5c) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x3f) + ENOSTR = syscall.Errno(0x3c) + ENOSYS = syscall.Errno(0x26) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x6b) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x27) + ENOTNAM = syscall.Errno(0x76) + ENOTRECOVERABLE = syscall.Errno(0x83) + ENOTSOCK = syscall.Errno(0x58) + ENOTSUP = syscall.Errno(0x5f) + ENOTTY = syscall.Errno(0x19) + ENOTUNIQ = syscall.Errno(0x4c) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x5f) + EOVERFLOW = syscall.Errno(0x4b) + EOWNERDEAD = syscall.Errno(0x82) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x60) + EPIPE = syscall.Errno(0x20) + EPROTO = syscall.Errno(0x47) + EPROTONOSUPPORT = syscall.Errno(0x5d) + EPROTOTYPE = syscall.Errno(0x5b) + ERANGE = syscall.Errno(0x22) + EREMCHG = syscall.Errno(0x4e) + EREMOTE = syscall.Errno(0x42) + EREMOTEIO = syscall.Errno(0x79) + ERESTART = syscall.Errno(0x55) + ERFKILL = syscall.Errno(0x84) + EROFS = syscall.Errno(0x1e) + ESHUTDOWN = syscall.Errno(0x6c) + ESOCKTNOSUPPORT = syscall.Errno(0x5e) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESRMNT = syscall.Errno(0x45) + ESTALE = syscall.Errno(0x74) + ESTRPIPE = syscall.Errno(0x56) + ETIME = syscall.Errno(0x3e) + ETIMEDOUT = syscall.Errno(0x6e) + ETOOMANYREFS = syscall.Errno(0x6d) + ETXTBSY = syscall.Errno(0x1a) + EUCLEAN = syscall.Errno(0x75) + EUNATCH = syscall.Errno(0x31) + EUSERS = syscall.Errno(0x57) + EWOULDBLOCK = syscall.Errno(0xb) + EXDEV = syscall.Errno(0x12) + EXFULL = syscall.Errno(0x36) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0x7) + SIGCHLD = syscall.Signal(0x11) + SIGCLD = syscall.Signal(0x11) + SIGCONT = syscall.Signal(0x12) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x1d) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPOLL = syscall.Signal(0x1d) + SIGPROF = syscall.Signal(0x1b) + SIGPWR = syscall.Signal(0x1e) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTKFLT = syscall.Signal(0x10) + SIGSTOP = syscall.Signal(0x13) + SIGSYS = syscall.Signal(0x1f) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x14) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGUNUSED = syscall.Signal(0x1f) + SIGURG = syscall.Signal(0x17) + SIGUSR1 = syscall.Signal(0xa) + SIGUSR2 = syscall.Signal(0xc) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "no such device or address", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource temporarily unavailable", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device or resource busy", + 17: "file exists", + 18: "invalid cross-device link", + 19: "no such device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "numerical result out of range", + 35: "resource deadlock avoided", + 36: "file name too long", + 37: "no locks available", + 38: "function not implemented", + 39: "directory not empty", + 40: "too many levels of symbolic links", + 42: "no message of desired type", + 43: "identifier removed", + 44: "channel number out of range", + 45: "level 2 not synchronized", + 46: "level 3 halted", + 47: "level 3 reset", + 48: "link number out of range", + 49: "protocol driver not attached", + 50: "no CSI structure available", + 51: "level 2 halted", + 52: "invalid exchange", + 53: "invalid request descriptor", + 54: "exchange full", + 55: "no anode", + 56: "invalid request code", + 57: "invalid slot", + 59: "bad font file format", + 60: "device not a stream", + 61: "no data available", + 62: "timer expired", + 63: "out of streams resources", + 64: "machine is not on the network", + 65: "package not installed", + 66: "object is remote", + 67: "link has been severed", + 68: "advertise error", + 69: "srmount error", + 70: "communication error on send", + 71: "protocol error", + 72: "multihop attempted", + 73: "RFS specific error", + 74: "bad message", + 75: "value too large for defined data type", + 76: "name not unique on network", + 77: "file descriptor in bad state", + 78: "remote address changed", + 79: "can not access a needed shared library", + 80: "accessing a corrupted shared library", + 81: ".lib section in a.out corrupted", + 82: "attempting to link in too many shared libraries", + 83: "cannot exec a shared library directly", + 84: "invalid or incomplete multibyte or wide character", + 85: "interrupted system call should be restarted", + 86: "streams pipe error", + 87: "too many users", + 88: "socket operation on non-socket", + 89: "destination address required", + 90: "message too long", + 91: "protocol wrong type for socket", + 92: "protocol not available", + 93: "protocol not supported", + 94: "socket type not supported", + 95: "operation not supported", + 96: "protocol family not supported", + 97: "address family not supported by protocol", + 98: "address already in use", + 99: "cannot assign requested address", + 100: "network is down", + 101: "network is unreachable", + 102: "network dropped connection on reset", + 103: "software caused connection abort", + 104: "connection reset by peer", + 105: "no buffer space available", + 106: "transport endpoint is already connected", + 107: "transport endpoint is not connected", + 108: "cannot send after transport endpoint shutdown", + 109: "too many references: cannot splice", + 110: "connection timed out", + 111: "connection refused", + 112: "host is down", + 113: "no route to host", + 114: "operation already in progress", + 115: "operation now in progress", + 116: "stale file handle", + 117: "structure needs cleaning", + 118: "not a XENIX named type file", + 119: "no XENIX semaphores available", + 120: "is a named type file", + 121: "remote I/O error", + 122: "disk quota exceeded", + 123: "no medium found", + 124: "wrong medium type", + 125: "operation canceled", + 126: "required key not available", + 127: "key has expired", + 128: "key has been revoked", + 129: "key was rejected by service", + 130: "owner died", + 131: "state not recoverable", + 132: "operation not possible due to RF-kill", + 133: "memory page has hardware error", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/breakpoint trap", + 6: "aborted", + 7: "bus error", + 8: "floating point exception", + 9: "killed", + 10: "user defined signal 1", + 11: "segmentation fault", + 12: "user defined signal 2", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "stack fault", + 17: "child exited", + 18: "continued", + 19: "stopped (signal)", + 20: "stopped", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "urgent I/O condition", + 24: "CPU time limit exceeded", + 25: "file size limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window changed", + 29: "I/O possible", + 30: "power failure", + 31: "bad system call", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go new file mode 100644 index 0000000..9d908d7 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go @@ -0,0 +1,1922 @@ +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build ppc64,linux + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m64 _const.go + +package unix + +import "syscall" + +const ( + AF_ALG = 0x26 + AF_APPLETALK = 0x5 + AF_ASH = 0x12 + AF_ATMPVC = 0x8 + AF_ATMSVC = 0x14 + AF_AX25 = 0x3 + AF_BLUETOOTH = 0x1f + AF_BRIDGE = 0x7 + AF_CAIF = 0x25 + AF_CAN = 0x1d + AF_DECnet = 0xc + AF_ECONET = 0x13 + AF_FILE = 0x1 + AF_IEEE802154 = 0x24 + AF_INET = 0x2 + AF_INET6 = 0xa + AF_IPX = 0x4 + AF_IRDA = 0x17 + AF_ISDN = 0x22 + AF_IUCV = 0x20 + AF_KEY = 0xf + AF_LLC = 0x1a + AF_LOCAL = 0x1 + AF_MAX = 0x29 + AF_NETBEUI = 0xd + AF_NETLINK = 0x10 + AF_NETROM = 0x6 + AF_NFC = 0x27 + AF_PACKET = 0x11 + AF_PHONET = 0x23 + AF_PPPOX = 0x18 + AF_RDS = 0x15 + AF_ROSE = 0xb + AF_ROUTE = 0x10 + AF_RXRPC = 0x21 + AF_SECURITY = 0xe + AF_SNA = 0x16 + AF_TIPC = 0x1e + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_VSOCK = 0x28 + AF_WANPIPE = 0x19 + AF_X25 = 0x9 + ARPHRD_6LOWPAN = 0x339 + ARPHRD_ADAPT = 0x108 + ARPHRD_APPLETLK = 0x8 + ARPHRD_ARCNET = 0x7 + ARPHRD_ASH = 0x30d + ARPHRD_ATM = 0x13 + ARPHRD_AX25 = 0x3 + ARPHRD_BIF = 0x307 + ARPHRD_CAIF = 0x336 + ARPHRD_CAN = 0x118 + ARPHRD_CHAOS = 0x5 + ARPHRD_CISCO = 0x201 + ARPHRD_CSLIP = 0x101 + ARPHRD_CSLIP6 = 0x103 + ARPHRD_DDCMP = 0x205 + ARPHRD_DLCI = 0xf + ARPHRD_ECONET = 0x30e + ARPHRD_EETHER = 0x2 + ARPHRD_ETHER = 0x1 + ARPHRD_EUI64 = 0x1b + ARPHRD_FCAL = 0x311 + ARPHRD_FCFABRIC = 0x313 + ARPHRD_FCPL = 0x312 + ARPHRD_FCPP = 0x310 + ARPHRD_FDDI = 0x306 + ARPHRD_FRAD = 0x302 + ARPHRD_HDLC = 0x201 + ARPHRD_HIPPI = 0x30c + ARPHRD_HWX25 = 0x110 + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + ARPHRD_IEEE80211 = 0x321 + ARPHRD_IEEE80211_PRISM = 0x322 + ARPHRD_IEEE80211_RADIOTAP = 0x323 + ARPHRD_IEEE802154 = 0x324 + ARPHRD_IEEE802154_MONITOR = 0x325 + ARPHRD_IEEE802_TR = 0x320 + ARPHRD_INFINIBAND = 0x20 + ARPHRD_IP6GRE = 0x337 + ARPHRD_IPDDP = 0x309 + ARPHRD_IPGRE = 0x30a + ARPHRD_IRDA = 0x30f + ARPHRD_LAPB = 0x204 + ARPHRD_LOCALTLK = 0x305 + ARPHRD_LOOPBACK = 0x304 + ARPHRD_METRICOM = 0x17 + ARPHRD_NETLINK = 0x338 + ARPHRD_NETROM = 0x0 + ARPHRD_NONE = 0xfffe + ARPHRD_PHONET = 0x334 + ARPHRD_PHONET_PIPE = 0x335 + ARPHRD_PIMREG = 0x30b + ARPHRD_PPP = 0x200 + ARPHRD_PRONET = 0x4 + ARPHRD_RAWHDLC = 0x206 + ARPHRD_ROSE = 0x10e + ARPHRD_RSRVD = 0x104 + ARPHRD_SIT = 0x308 + ARPHRD_SKIP = 0x303 + ARPHRD_SLIP = 0x100 + ARPHRD_SLIP6 = 0x102 + ARPHRD_TUNNEL = 0x300 + ARPHRD_TUNNEL6 = 0x301 + ARPHRD_VOID = 0xffff + ARPHRD_X25 = 0x10f + B0 = 0x0 + B1000000 = 0x17 + B110 = 0x3 + B115200 = 0x11 + B1152000 = 0x18 + B1200 = 0x9 + B134 = 0x4 + B150 = 0x5 + B1500000 = 0x19 + B1800 = 0xa + B19200 = 0xe + B200 = 0x6 + B2000000 = 0x1a + B230400 = 0x12 + B2400 = 0xb + B2500000 = 0x1b + B300 = 0x7 + B3000000 = 0x1c + B3500000 = 0x1d + B38400 = 0xf + B4000000 = 0x1e + B460800 = 0x13 + B4800 = 0xc + B50 = 0x1 + B500000 = 0x14 + B57600 = 0x10 + B576000 = 0x15 + B600 = 0x8 + B75 = 0x2 + B921600 = 0x16 + B9600 = 0xd + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXINSNS = 0x1000 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MOD = 0x90 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BPF_XOR = 0xa0 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CLOCK_BOOTTIME = 0x7 + CLOCK_BOOTTIME_ALARM = 0x9 + CLOCK_DEFAULT = 0x0 + CLOCK_EXT = 0x1 + CLOCK_INT = 0x2 + CLOCK_MONOTONIC = 0x1 + CLOCK_MONOTONIC_COARSE = 0x6 + CLOCK_MONOTONIC_RAW = 0x4 + CLOCK_PROCESS_CPUTIME_ID = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_REALTIME_ALARM = 0x8 + CLOCK_REALTIME_COARSE = 0x5 + CLOCK_THREAD_CPUTIME_ID = 0x3 + CLOCK_TXFROMRX = 0x4 + CLOCK_TXINT = 0x3 + CLONE_CHILD_CLEARTID = 0x200000 + CLONE_CHILD_SETTID = 0x1000000 + CLONE_DETACHED = 0x400000 + CLONE_FILES = 0x400 + CLONE_FS = 0x200 + CLONE_IO = 0x80000000 + CLONE_NEWIPC = 0x8000000 + CLONE_NEWNET = 0x40000000 + CLONE_NEWNS = 0x20000 + CLONE_NEWPID = 0x20000000 + CLONE_NEWUSER = 0x10000000 + CLONE_NEWUTS = 0x4000000 + CLONE_PARENT = 0x8000 + CLONE_PARENT_SETTID = 0x100000 + CLONE_PTRACE = 0x2000 + CLONE_SETTLS = 0x80000 + CLONE_SIGHAND = 0x800 + CLONE_SYSVSEM = 0x40000 + CLONE_THREAD = 0x10000 + CLONE_UNTRACED = 0x800000 + CLONE_VFORK = 0x4000 + CLONE_VM = 0x100 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIGNAL = 0xff + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x0 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + ENCODING_DEFAULT = 0x0 + ENCODING_FM_MARK = 0x3 + ENCODING_FM_SPACE = 0x4 + ENCODING_MANCHESTER = 0x5 + ENCODING_NRZ = 0x1 + ENCODING_NRZI = 0x2 + EPOLLERR = 0x8 + EPOLLET = 0x80000000 + EPOLLHUP = 0x10 + EPOLLIN = 0x1 + EPOLLMSG = 0x400 + EPOLLONESHOT = 0x40000000 + EPOLLOUT = 0x4 + EPOLLPRI = 0x2 + EPOLLRDBAND = 0x80 + EPOLLRDHUP = 0x2000 + EPOLLRDNORM = 0x40 + EPOLLWAKEUP = 0x20000000 + EPOLLWRBAND = 0x200 + EPOLLWRNORM = 0x100 + EPOLL_CLOEXEC = 0x80000 + EPOLL_CTL_ADD = 0x1 + EPOLL_CTL_DEL = 0x2 + EPOLL_CTL_MOD = 0x3 + ETH_P_1588 = 0x88f7 + ETH_P_8021AD = 0x88a8 + ETH_P_8021AH = 0x88e7 + ETH_P_8021Q = 0x8100 + ETH_P_80221 = 0x8917 + ETH_P_802_2 = 0x4 + ETH_P_802_3 = 0x1 + ETH_P_802_3_MIN = 0x600 + ETH_P_802_EX1 = 0x88b5 + ETH_P_AARP = 0x80f3 + ETH_P_AF_IUCV = 0xfbfb + ETH_P_ALL = 0x3 + ETH_P_AOE = 0x88a2 + ETH_P_ARCNET = 0x1a + ETH_P_ARP = 0x806 + ETH_P_ATALK = 0x809b + ETH_P_ATMFATE = 0x8884 + ETH_P_ATMMPOA = 0x884c + ETH_P_AX25 = 0x2 + ETH_P_BATMAN = 0x4305 + ETH_P_BPQ = 0x8ff + ETH_P_CAIF = 0xf7 + ETH_P_CAN = 0xc + ETH_P_CANFD = 0xd + ETH_P_CONTROL = 0x16 + ETH_P_CUST = 0x6006 + ETH_P_DDCMP = 0x6 + ETH_P_DEC = 0x6000 + ETH_P_DIAG = 0x6005 + ETH_P_DNA_DL = 0x6001 + ETH_P_DNA_RC = 0x6002 + ETH_P_DNA_RT = 0x6003 + ETH_P_DSA = 0x1b + ETH_P_ECONET = 0x18 + ETH_P_EDSA = 0xdada + ETH_P_FCOE = 0x8906 + ETH_P_FIP = 0x8914 + ETH_P_HDLC = 0x19 + ETH_P_IEEE802154 = 0xf6 + ETH_P_IEEEPUP = 0xa00 + ETH_P_IEEEPUPAT = 0xa01 + ETH_P_IP = 0x800 + ETH_P_IPV6 = 0x86dd + ETH_P_IPX = 0x8137 + ETH_P_IRDA = 0x17 + ETH_P_LAT = 0x6004 + ETH_P_LINK_CTL = 0x886c + ETH_P_LOCALTALK = 0x9 + ETH_P_LOOP = 0x60 + ETH_P_LOOPBACK = 0x9000 + ETH_P_MOBITEX = 0x15 + ETH_P_MPLS_MC = 0x8848 + ETH_P_MPLS_UC = 0x8847 + ETH_P_MVRP = 0x88f5 + ETH_P_PAE = 0x888e + ETH_P_PAUSE = 0x8808 + ETH_P_PHONET = 0xf5 + ETH_P_PPPTALK = 0x10 + ETH_P_PPP_DISC = 0x8863 + ETH_P_PPP_MP = 0x8 + ETH_P_PPP_SES = 0x8864 + ETH_P_PRP = 0x88fb + ETH_P_PUP = 0x200 + ETH_P_PUPAT = 0x201 + ETH_P_QINQ1 = 0x9100 + ETH_P_QINQ2 = 0x9200 + ETH_P_QINQ3 = 0x9300 + ETH_P_RARP = 0x8035 + ETH_P_SCA = 0x6007 + ETH_P_SLOW = 0x8809 + ETH_P_SNAP = 0x5 + ETH_P_TDLS = 0x890d + ETH_P_TEB = 0x6558 + ETH_P_TIPC = 0x88ca + ETH_P_TRAILER = 0x1c + ETH_P_TR_802_2 = 0x11 + ETH_P_WAN_PPP = 0x7 + ETH_P_WCCP = 0x883e + ETH_P_X25 = 0x805 + ETH_P_XDSA = 0xf8 + EXTA = 0xe + EXTB = 0xf + EXTPROC = 0x10000000 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x406 + F_EXLCK = 0x4 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLEASE = 0x401 + F_GETLK = 0x5 + F_GETLK64 = 0xc + F_GETOWN = 0x9 + F_GETOWN_EX = 0x10 + F_GETPIPE_SZ = 0x408 + F_GETSIG = 0xb + F_LOCK = 0x1 + F_NOTIFY = 0x402 + F_OFD_GETLK = 0x24 + F_OFD_SETLK = 0x25 + F_OFD_SETLKW = 0x26 + F_OK = 0x0 + F_RDLCK = 0x0 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLEASE = 0x400 + F_SETLK = 0x6 + F_SETLK64 = 0xd + F_SETLKW = 0x7 + F_SETLKW64 = 0xe + F_SETOWN = 0x8 + F_SETOWN_EX = 0xf + F_SETPIPE_SZ = 0x407 + F_SETSIG = 0xa + F_SHLCK = 0x8 + F_TEST = 0x3 + F_TLOCK = 0x2 + F_ULOCK = 0x0 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x4000 + ICANON = 0x100 + ICMPV6_FILTER = 0x1 + ICRNL = 0x100 + IEXTEN = 0x400 + IFA_F_DADFAILED = 0x8 + IFA_F_DEPRECATED = 0x20 + IFA_F_HOMEADDRESS = 0x10 + IFA_F_MANAGETEMPADDR = 0x100 + IFA_F_NODAD = 0x2 + IFA_F_NOPREFIXROUTE = 0x200 + IFA_F_OPTIMISTIC = 0x4 + IFA_F_PERMANENT = 0x80 + IFA_F_SECONDARY = 0x1 + IFA_F_TEMPORARY = 0x1 + IFA_F_TENTATIVE = 0x40 + IFA_MAX = 0x8 + IFF_ALLMULTI = 0x200 + IFF_ATTACH_QUEUE = 0x200 + IFF_AUTOMEDIA = 0x4000 + IFF_BROADCAST = 0x2 + IFF_DEBUG = 0x4 + IFF_DETACH_QUEUE = 0x400 + IFF_DORMANT = 0x20000 + IFF_DYNAMIC = 0x8000 + IFF_ECHO = 0x40000 + IFF_LOOPBACK = 0x8 + IFF_LOWER_UP = 0x10000 + IFF_MASTER = 0x400 + IFF_MULTICAST = 0x1000 + IFF_MULTI_QUEUE = 0x100 + IFF_NOARP = 0x80 + IFF_NOFILTER = 0x1000 + IFF_NOTRAILERS = 0x20 + IFF_NO_PI = 0x1000 + IFF_ONE_QUEUE = 0x2000 + IFF_PERSIST = 0x800 + IFF_POINTOPOINT = 0x10 + IFF_PORTSEL = 0x2000 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SLAVE = 0x800 + IFF_TAP = 0x2 + IFF_TUN = 0x1 + IFF_TUN_EXCL = 0x8000 + IFF_UP = 0x1 + IFF_VNET_HDR = 0x4000 + IFF_VOLATILE = 0x70c5a + IFNAMSIZ = 0x10 + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_ACCESS = 0x1 + IN_ALL_EVENTS = 0xfff + IN_ATTRIB = 0x4 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLOEXEC = 0x80000 + IN_CLOSE = 0x18 + IN_CLOSE_NOWRITE = 0x10 + IN_CLOSE_WRITE = 0x8 + IN_CREATE = 0x100 + IN_DELETE = 0x200 + IN_DELETE_SELF = 0x400 + IN_DONT_FOLLOW = 0x2000000 + IN_EXCL_UNLINK = 0x4000000 + IN_IGNORED = 0x8000 + IN_ISDIR = 0x40000000 + IN_LOOPBACKNET = 0x7f + IN_MASK_ADD = 0x20000000 + IN_MODIFY = 0x2 + IN_MOVE = 0xc0 + IN_MOVED_FROM = 0x40 + IN_MOVED_TO = 0x80 + IN_MOVE_SELF = 0x800 + IN_NONBLOCK = 0x800 + IN_ONESHOT = 0x80000000 + IN_ONLYDIR = 0x1000000 + IN_OPEN = 0x20 + IN_Q_OVERFLOW = 0x4000 + IN_UNMOUNT = 0x2000 + IPPROTO_AH = 0x33 + IPPROTO_BEETPH = 0x5e + IPPROTO_COMP = 0x6c + IPPROTO_DCCP = 0x21 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_ESP = 0x32 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPIP = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_MH = 0x87 + IPPROTO_MTP = 0x5c + IPPROTO_NONE = 0x3b + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPV6_2292DSTOPTS = 0x4 + IPV6_2292HOPLIMIT = 0x8 + IPV6_2292HOPOPTS = 0x3 + IPV6_2292PKTINFO = 0x2 + IPV6_2292PKTOPTIONS = 0x6 + IPV6_2292RTHDR = 0x5 + IPV6_ADDRFORM = 0x1 + IPV6_ADD_MEMBERSHIP = 0x14 + IPV6_AUTHHDR = 0xa + IPV6_CHECKSUM = 0x7 + IPV6_DROP_MEMBERSHIP = 0x15 + IPV6_DSTOPTS = 0x3b + IPV6_HOPLIMIT = 0x34 + IPV6_HOPOPTS = 0x36 + IPV6_IPSEC_POLICY = 0x22 + IPV6_JOIN_ANYCAST = 0x1b + IPV6_JOIN_GROUP = 0x14 + IPV6_LEAVE_ANYCAST = 0x1c + IPV6_LEAVE_GROUP = 0x15 + IPV6_MTU = 0x18 + IPV6_MTU_DISCOVER = 0x17 + IPV6_MULTICAST_HOPS = 0x12 + IPV6_MULTICAST_IF = 0x11 + IPV6_MULTICAST_LOOP = 0x13 + IPV6_NEXTHOP = 0x9 + IPV6_PKTINFO = 0x32 + IPV6_PMTUDISC_DO = 0x2 + IPV6_PMTUDISC_DONT = 0x0 + IPV6_PMTUDISC_INTERFACE = 0x4 + IPV6_PMTUDISC_OMIT = 0x5 + IPV6_PMTUDISC_PROBE = 0x3 + IPV6_PMTUDISC_WANT = 0x1 + IPV6_RECVDSTOPTS = 0x3a + IPV6_RECVERR = 0x19 + IPV6_RECVHOPLIMIT = 0x33 + IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVPKTINFO = 0x31 + IPV6_RECVRTHDR = 0x38 + IPV6_RECVTCLASS = 0x42 + IPV6_ROUTER_ALERT = 0x16 + IPV6_RTHDR = 0x39 + IPV6_RTHDRDSTOPTS = 0x37 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_RXDSTOPTS = 0x3b + IPV6_RXHOPOPTS = 0x36 + IPV6_TCLASS = 0x43 + IPV6_UNICAST_HOPS = 0x10 + IPV6_V6ONLY = 0x1a + IPV6_XFRM_POLICY = 0x23 + IP_ADD_MEMBERSHIP = 0x23 + IP_ADD_SOURCE_MEMBERSHIP = 0x27 + IP_BLOCK_SOURCE = 0x26 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0x24 + IP_DROP_SOURCE_MEMBERSHIP = 0x28 + IP_FREEBIND = 0xf + IP_HDRINCL = 0x3 + IP_IPSEC_POLICY = 0x10 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINTTL = 0x15 + IP_MSFILTER = 0x29 + IP_MSS = 0x240 + IP_MTU = 0xe + IP_MTU_DISCOVER = 0xa + IP_MULTICAST_ALL = 0x31 + IP_MULTICAST_IF = 0x20 + IP_MULTICAST_LOOP = 0x22 + IP_MULTICAST_TTL = 0x21 + IP_NODEFRAG = 0x16 + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x4 + IP_ORIGDSTADDR = 0x14 + IP_PASSSEC = 0x12 + IP_PKTINFO = 0x8 + IP_PKTOPTIONS = 0x9 + IP_PMTUDISC = 0xa + IP_PMTUDISC_DO = 0x2 + IP_PMTUDISC_DONT = 0x0 + IP_PMTUDISC_INTERFACE = 0x4 + IP_PMTUDISC_OMIT = 0x5 + IP_PMTUDISC_PROBE = 0x3 + IP_PMTUDISC_WANT = 0x1 + IP_RECVERR = 0xb + IP_RECVOPTS = 0x6 + IP_RECVORIGDSTADDR = 0x14 + IP_RECVRETOPTS = 0x7 + IP_RECVTOS = 0xd + IP_RECVTTL = 0xc + IP_RETOPTS = 0x7 + IP_RF = 0x8000 + IP_ROUTER_ALERT = 0x5 + IP_TOS = 0x1 + IP_TRANSPARENT = 0x13 + IP_TTL = 0x2 + IP_UNBLOCK_SOURCE = 0x25 + IP_UNICAST_IF = 0x32 + IP_XFRM_POLICY = 0x11 + ISIG = 0x80 + ISTRIP = 0x20 + IUTF8 = 0x4000 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LINUX_REBOOT_CMD_CAD_OFF = 0x0 + LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef + LINUX_REBOOT_CMD_HALT = 0xcdef0123 + LINUX_REBOOT_CMD_KEXEC = 0x45584543 + LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc + LINUX_REBOOT_CMD_RESTART = 0x1234567 + LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 + LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 + LINUX_REBOOT_MAGIC1 = 0xfee1dead + LINUX_REBOOT_MAGIC2 = 0x28121969 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DODUMP = 0x11 + MADV_DOFORK = 0xb + MADV_DONTDUMP = 0x10 + MADV_DONTFORK = 0xa + MADV_DONTNEED = 0x4 + MADV_HUGEPAGE = 0xe + MADV_HWPOISON = 0x64 + MADV_MERGEABLE = 0xc + MADV_NOHUGEPAGE = 0xf + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_REMOVE = 0x9 + MADV_SEQUENTIAL = 0x2 + MADV_UNMERGEABLE = 0xd + MADV_WILLNEED = 0x3 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 + MAP_EXECUTABLE = 0x1000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_GROWSDOWN = 0x100 + MAP_HUGETLB = 0x40000 + MAP_HUGE_MASK = 0x3f + MAP_HUGE_SHIFT = 0x1a + MAP_LOCKED = 0x80 + MAP_NONBLOCK = 0x10000 + MAP_NORESERVE = 0x40 + MAP_POPULATE = 0x8000 + MAP_PRIVATE = 0x2 + MAP_SHARED = 0x1 + MAP_STACK = 0x20000 + MAP_TYPE = 0xf + MCL_CURRENT = 0x2000 + MCL_FUTURE = 0x4000 + MNT_DETACH = 0x2 + MNT_EXPIRE = 0x4 + MNT_FORCE = 0x1 + MSG_CMSG_CLOEXEC = 0x40000000 + MSG_CONFIRM = 0x800 + MSG_CTRUNC = 0x8 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x40 + MSG_EOR = 0x80 + MSG_ERRQUEUE = 0x2000 + MSG_FASTOPEN = 0x20000000 + MSG_FIN = 0x200 + MSG_MORE = 0x8000 + MSG_NOSIGNAL = 0x4000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_PROXY = 0x10 + MSG_RST = 0x1000 + MSG_SYN = 0x400 + MSG_TRUNC = 0x20 + MSG_TRYHARD = 0x4 + MSG_WAITALL = 0x100 + MSG_WAITFORONE = 0x10000 + MS_ACTIVE = 0x40000000 + MS_ASYNC = 0x1 + MS_BIND = 0x1000 + MS_DIRSYNC = 0x80 + MS_INVALIDATE = 0x2 + MS_I_VERSION = 0x800000 + MS_KERNMOUNT = 0x400000 + MS_MANDLOCK = 0x40 + MS_MGC_MSK = 0xffff0000 + MS_MGC_VAL = 0xc0ed0000 + MS_MOVE = 0x2000 + MS_NOATIME = 0x400 + MS_NODEV = 0x4 + MS_NODIRATIME = 0x800 + MS_NOEXEC = 0x8 + MS_NOSUID = 0x2 + MS_NOUSER = -0x80000000 + MS_POSIXACL = 0x10000 + MS_PRIVATE = 0x40000 + MS_RDONLY = 0x1 + MS_REC = 0x4000 + MS_RELATIME = 0x200000 + MS_REMOUNT = 0x20 + MS_RMT_MASK = 0x800051 + MS_SHARED = 0x100000 + MS_SILENT = 0x8000 + MS_SLAVE = 0x80000 + MS_STRICTATIME = 0x1000000 + MS_SYNC = 0x4 + MS_SYNCHRONOUS = 0x10 + MS_UNBINDABLE = 0x20000 + NAME_MAX = 0xff + NETLINK_ADD_MEMBERSHIP = 0x1 + NETLINK_AUDIT = 0x9 + NETLINK_BROADCAST_ERROR = 0x4 + NETLINK_CONNECTOR = 0xb + NETLINK_CRYPTO = 0x15 + NETLINK_DNRTMSG = 0xe + NETLINK_DROP_MEMBERSHIP = 0x2 + NETLINK_ECRYPTFS = 0x13 + NETLINK_FIB_LOOKUP = 0xa + NETLINK_FIREWALL = 0x3 + NETLINK_GENERIC = 0x10 + NETLINK_INET_DIAG = 0x4 + NETLINK_IP6_FW = 0xd + NETLINK_ISCSI = 0x8 + NETLINK_KOBJECT_UEVENT = 0xf + NETLINK_NETFILTER = 0xc + NETLINK_NFLOG = 0x5 + NETLINK_NO_ENOBUFS = 0x5 + NETLINK_PKTINFO = 0x3 + NETLINK_RDMA = 0x14 + NETLINK_ROUTE = 0x0 + NETLINK_RX_RING = 0x6 + NETLINK_SCSITRANSPORT = 0x12 + NETLINK_SELINUX = 0x7 + NETLINK_SOCK_DIAG = 0x4 + NETLINK_TX_RING = 0x7 + NETLINK_UNUSED = 0x1 + NETLINK_USERSOCK = 0x2 + NETLINK_XFRM = 0x6 + NLA_ALIGNTO = 0x4 + NLA_F_NESTED = 0x8000 + NLA_F_NET_BYTEORDER = 0x4000 + NLA_HDRLEN = 0x4 + NLMSG_ALIGNTO = 0x4 + NLMSG_DONE = 0x3 + NLMSG_ERROR = 0x2 + NLMSG_HDRLEN = 0x10 + NLMSG_MIN_TYPE = 0x10 + NLMSG_NOOP = 0x1 + NLMSG_OVERRUN = 0x4 + NLM_F_ACK = 0x4 + NLM_F_APPEND = 0x800 + NLM_F_ATOMIC = 0x400 + NLM_F_CREATE = 0x400 + NLM_F_DUMP = 0x300 + NLM_F_DUMP_INTR = 0x10 + NLM_F_ECHO = 0x8 + NLM_F_EXCL = 0x200 + NLM_F_MATCH = 0x200 + NLM_F_MULTI = 0x2 + NLM_F_REPLACE = 0x100 + NLM_F_REQUEST = 0x1 + NLM_F_ROOT = 0x100 + NOFLSH = 0x80000000 + OCRNL = 0x8 + OFDEL = 0x80 + OFILL = 0x40 + ONLCR = 0x2 + ONLRET = 0x20 + ONOCR = 0x10 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x400 + O_ASYNC = 0x2000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x40 + O_DIRECT = 0x20000 + O_DIRECTORY = 0x4000 + O_DSYNC = 0x1000 + O_EXCL = 0x80 + O_FSYNC = 0x101000 + O_LARGEFILE = 0x0 + O_NDELAY = 0x800 + O_NOATIME = 0x40000 + O_NOCTTY = 0x100 + O_NOFOLLOW = 0x8000 + O_NONBLOCK = 0x800 + O_PATH = 0x200000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x101000 + O_SYNC = 0x101000 + O_TMPFILE = 0x410000 + O_TRUNC = 0x200 + O_WRONLY = 0x1 + PACKET_ADD_MEMBERSHIP = 0x1 + PACKET_AUXDATA = 0x8 + PACKET_BROADCAST = 0x1 + PACKET_COPY_THRESH = 0x7 + PACKET_DROP_MEMBERSHIP = 0x2 + PACKET_FANOUT = 0x12 + PACKET_FANOUT_CPU = 0x2 + PACKET_FANOUT_FLAG_DEFRAG = 0x8000 + PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_HASH = 0x0 + PACKET_FANOUT_LB = 0x1 + PACKET_FANOUT_QM = 0x5 + PACKET_FANOUT_RND = 0x4 + PACKET_FANOUT_ROLLOVER = 0x3 + PACKET_FASTROUTE = 0x6 + PACKET_HDRLEN = 0xb + PACKET_HOST = 0x0 + PACKET_KERNEL = 0x7 + PACKET_LOOPBACK = 0x5 + PACKET_LOSS = 0xe + PACKET_MR_ALLMULTI = 0x2 + PACKET_MR_MULTICAST = 0x0 + PACKET_MR_PROMISC = 0x1 + PACKET_MR_UNICAST = 0x3 + PACKET_MULTICAST = 0x2 + PACKET_ORIGDEV = 0x9 + PACKET_OTHERHOST = 0x3 + PACKET_OUTGOING = 0x4 + PACKET_QDISC_BYPASS = 0x14 + PACKET_RECV_OUTPUT = 0x3 + PACKET_RESERVE = 0xc + PACKET_RX_RING = 0x5 + PACKET_STATISTICS = 0x6 + PACKET_TIMESTAMP = 0x11 + PACKET_TX_HAS_OFF = 0x13 + PACKET_TX_RING = 0xd + PACKET_TX_TIMESTAMP = 0x10 + PACKET_USER = 0x6 + PACKET_VERSION = 0xa + PACKET_VNET_HDR = 0xf + PARENB = 0x1000 + PARITY_CRC16_PR0 = 0x2 + PARITY_CRC16_PR0_CCITT = 0x4 + PARITY_CRC16_PR1 = 0x3 + PARITY_CRC16_PR1_CCITT = 0x5 + PARITY_CRC32_PR0_CCITT = 0x6 + PARITY_CRC32_PR1_CCITT = 0x7 + PARITY_DEFAULT = 0x0 + PARITY_NONE = 0x1 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_GROWSDOWN = 0x1000000 + PROT_GROWSUP = 0x2000000 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_SAO = 0x10 + PROT_WRITE = 0x2 + PR_CAPBSET_DROP = 0x18 + PR_CAPBSET_READ = 0x17 + PR_ENDIAN_BIG = 0x0 + PR_ENDIAN_LITTLE = 0x1 + PR_ENDIAN_PPC_LITTLE = 0x2 + PR_FPEMU_NOPRINT = 0x1 + PR_FPEMU_SIGFPE = 0x2 + PR_FP_EXC_ASYNC = 0x2 + PR_FP_EXC_DISABLED = 0x0 + PR_FP_EXC_DIV = 0x10000 + PR_FP_EXC_INV = 0x100000 + PR_FP_EXC_NONRECOV = 0x1 + PR_FP_EXC_OVF = 0x20000 + PR_FP_EXC_PRECISE = 0x3 + PR_FP_EXC_RES = 0x80000 + PR_FP_EXC_SW_ENABLE = 0x80 + PR_FP_EXC_UND = 0x40000 + PR_GET_CHILD_SUBREAPER = 0x25 + PR_GET_DUMPABLE = 0x3 + PR_GET_ENDIAN = 0x13 + PR_GET_FPEMU = 0x9 + PR_GET_FPEXC = 0xb + PR_GET_KEEPCAPS = 0x7 + PR_GET_NAME = 0x10 + PR_GET_NO_NEW_PRIVS = 0x27 + PR_GET_PDEATHSIG = 0x2 + PR_GET_SECCOMP = 0x15 + PR_GET_SECUREBITS = 0x1b + PR_GET_THP_DISABLE = 0x2a + PR_GET_TID_ADDRESS = 0x28 + PR_GET_TIMERSLACK = 0x1e + PR_GET_TIMING = 0xd + PR_GET_TSC = 0x19 + PR_GET_UNALIGN = 0x5 + PR_MCE_KILL = 0x21 + PR_MCE_KILL_CLEAR = 0x0 + PR_MCE_KILL_DEFAULT = 0x2 + PR_MCE_KILL_EARLY = 0x1 + PR_MCE_KILL_GET = 0x22 + PR_MCE_KILL_LATE = 0x0 + PR_MCE_KILL_SET = 0x1 + PR_SET_CHILD_SUBREAPER = 0x24 + PR_SET_DUMPABLE = 0x4 + PR_SET_ENDIAN = 0x14 + PR_SET_FPEMU = 0xa + PR_SET_FPEXC = 0xc + PR_SET_KEEPCAPS = 0x8 + PR_SET_MM = 0x23 + PR_SET_MM_ARG_END = 0x9 + PR_SET_MM_ARG_START = 0x8 + PR_SET_MM_AUXV = 0xc + PR_SET_MM_BRK = 0x7 + PR_SET_MM_END_CODE = 0x2 + PR_SET_MM_END_DATA = 0x4 + PR_SET_MM_ENV_END = 0xb + PR_SET_MM_ENV_START = 0xa + PR_SET_MM_EXE_FILE = 0xd + PR_SET_MM_MAP = 0xe + PR_SET_MM_MAP_SIZE = 0xf + PR_SET_MM_START_BRK = 0x6 + PR_SET_MM_START_CODE = 0x1 + PR_SET_MM_START_DATA = 0x3 + PR_SET_MM_START_STACK = 0x5 + PR_SET_NAME = 0xf + PR_SET_NO_NEW_PRIVS = 0x26 + PR_SET_PDEATHSIG = 0x1 + PR_SET_PTRACER = 0x59616d61 + PR_SET_PTRACER_ANY = -0x1 + PR_SET_SECCOMP = 0x16 + PR_SET_SECUREBITS = 0x1c + PR_SET_THP_DISABLE = 0x29 + PR_SET_TIMERSLACK = 0x1d + PR_SET_TIMING = 0xe + PR_SET_TSC = 0x1a + PR_SET_UNALIGN = 0x6 + PR_TASK_PERF_EVENTS_DISABLE = 0x1f + PR_TASK_PERF_EVENTS_ENABLE = 0x20 + PR_TIMING_STATISTICAL = 0x0 + PR_TIMING_TIMESTAMP = 0x1 + PR_TSC_ENABLE = 0x1 + PR_TSC_SIGSEGV = 0x2 + PR_UNALIGN_NOPRINT = 0x1 + PR_UNALIGN_SIGBUS = 0x2 + PTRACE_ATTACH = 0x10 + PTRACE_CONT = 0x7 + PTRACE_DETACH = 0x11 + PTRACE_EVENT_CLONE = 0x3 + PTRACE_EVENT_EXEC = 0x4 + PTRACE_EVENT_EXIT = 0x6 + PTRACE_EVENT_FORK = 0x1 + PTRACE_EVENT_SECCOMP = 0x7 + PTRACE_EVENT_STOP = 0x80 + PTRACE_EVENT_VFORK = 0x2 + PTRACE_EVENT_VFORK_DONE = 0x5 + PTRACE_GETEVENTMSG = 0x4201 + PTRACE_GETEVRREGS = 0x14 + PTRACE_GETFPREGS = 0xe + PTRACE_GETREGS = 0xc + PTRACE_GETREGS64 = 0x16 + PTRACE_GETREGSET = 0x4204 + PTRACE_GETSIGINFO = 0x4202 + PTRACE_GETSIGMASK = 0x420a + PTRACE_GETVRREGS = 0x12 + PTRACE_GETVSRREGS = 0x1b + PTRACE_GET_DEBUGREG = 0x19 + PTRACE_INTERRUPT = 0x4207 + PTRACE_KILL = 0x8 + PTRACE_LISTEN = 0x4208 + PTRACE_O_EXITKILL = 0x100000 + PTRACE_O_MASK = 0x1000ff + PTRACE_O_TRACECLONE = 0x8 + PTRACE_O_TRACEEXEC = 0x10 + PTRACE_O_TRACEEXIT = 0x40 + PTRACE_O_TRACEFORK = 0x2 + PTRACE_O_TRACESECCOMP = 0x80 + PTRACE_O_TRACESYSGOOD = 0x1 + PTRACE_O_TRACEVFORK = 0x4 + PTRACE_O_TRACEVFORKDONE = 0x20 + PTRACE_PEEKDATA = 0x2 + PTRACE_PEEKSIGINFO = 0x4209 + PTRACE_PEEKSIGINFO_SHARED = 0x1 + PTRACE_PEEKTEXT = 0x1 + PTRACE_PEEKUSR = 0x3 + PTRACE_POKEDATA = 0x5 + PTRACE_POKETEXT = 0x4 + PTRACE_POKEUSR = 0x6 + PTRACE_SEIZE = 0x4206 + PTRACE_SETEVRREGS = 0x15 + PTRACE_SETFPREGS = 0xf + PTRACE_SETOPTIONS = 0x4200 + PTRACE_SETREGS = 0xd + PTRACE_SETREGS64 = 0x17 + PTRACE_SETREGSET = 0x4205 + PTRACE_SETSIGINFO = 0x4203 + PTRACE_SETSIGMASK = 0x420b + PTRACE_SETVRREGS = 0x13 + PTRACE_SETVSRREGS = 0x1c + PTRACE_SET_DEBUGREG = 0x1a + PTRACE_SINGLEBLOCK = 0x100 + PTRACE_SINGLESTEP = 0x9 + PTRACE_SYSCALL = 0x18 + PTRACE_TRACEME = 0x0 + PT_CCR = 0x26 + PT_CTR = 0x23 + PT_DAR = 0x29 + PT_DSCR = 0x2c + PT_DSISR = 0x2a + PT_FPR0 = 0x30 + PT_FPSCR = 0x50 + PT_LNK = 0x24 + PT_MSR = 0x21 + PT_NIP = 0x20 + PT_ORIG_R3 = 0x22 + PT_R0 = 0x0 + PT_R1 = 0x1 + PT_R10 = 0xa + PT_R11 = 0xb + PT_R12 = 0xc + PT_R13 = 0xd + PT_R14 = 0xe + PT_R15 = 0xf + PT_R16 = 0x10 + PT_R17 = 0x11 + PT_R18 = 0x12 + PT_R19 = 0x13 + PT_R2 = 0x2 + PT_R20 = 0x14 + PT_R21 = 0x15 + PT_R22 = 0x16 + PT_R23 = 0x17 + PT_R24 = 0x18 + PT_R25 = 0x19 + PT_R26 = 0x1a + PT_R27 = 0x1b + PT_R28 = 0x1c + PT_R29 = 0x1d + PT_R3 = 0x3 + PT_R30 = 0x1e + PT_R31 = 0x1f + PT_R4 = 0x4 + PT_R5 = 0x5 + PT_R6 = 0x6 + PT_R7 = 0x7 + PT_R8 = 0x8 + PT_R9 = 0x9 + PT_REGS_COUNT = 0x2c + PT_RESULT = 0x2b + PT_SOFTE = 0x27 + PT_TRAP = 0x28 + PT_VR0 = 0x52 + PT_VRSAVE = 0x94 + PT_VSCR = 0x93 + PT_VSR0 = 0x96 + PT_VSR31 = 0xd4 + PT_XER = 0x25 + RLIMIT_AS = 0x9 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x7 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = -0x1 + RTAX_ADVMSS = 0x8 + RTAX_CWND = 0x7 + RTAX_FEATURES = 0xc + RTAX_FEATURE_ALLFRAG = 0x8 + RTAX_FEATURE_ECN = 0x1 + RTAX_FEATURE_SACK = 0x2 + RTAX_FEATURE_TIMESTAMP = 0x4 + RTAX_HOPLIMIT = 0xa + RTAX_INITCWND = 0xb + RTAX_INITRWND = 0xe + RTAX_LOCK = 0x1 + RTAX_MAX = 0xf + RTAX_MTU = 0x2 + RTAX_QUICKACK = 0xf + RTAX_REORDERING = 0x9 + RTAX_RTO_MIN = 0xd + RTAX_RTT = 0x4 + RTAX_RTTVAR = 0x5 + RTAX_SSTHRESH = 0x6 + RTAX_UNSPEC = 0x0 + RTAX_WINDOW = 0x3 + RTA_ALIGNTO = 0x4 + RTA_MAX = 0x11 + RTCF_DIRECTSRC = 0x4000000 + RTCF_DOREDIRECT = 0x1000000 + RTCF_LOG = 0x2000000 + RTCF_MASQ = 0x400000 + RTCF_NAT = 0x800000 + RTCF_VALVE = 0x200000 + RTF_ADDRCLASSMASK = 0xf8000000 + RTF_ADDRCONF = 0x40000 + RTF_ALLONLINK = 0x20000 + RTF_BROADCAST = 0x10000000 + RTF_CACHE = 0x1000000 + RTF_DEFAULT = 0x10000 + RTF_DYNAMIC = 0x10 + RTF_FLOW = 0x2000000 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_INTERFACE = 0x40000000 + RTF_IRTT = 0x100 + RTF_LINKRT = 0x100000 + RTF_LOCAL = 0x80000000 + RTF_MODIFIED = 0x20 + RTF_MSS = 0x40 + RTF_MTU = 0x40 + RTF_MULTICAST = 0x20000000 + RTF_NAT = 0x8000000 + RTF_NOFORWARD = 0x1000 + RTF_NONEXTHOP = 0x200000 + RTF_NOPMTUDISC = 0x4000 + RTF_POLICY = 0x4000000 + RTF_REINSTATE = 0x8 + RTF_REJECT = 0x200 + RTF_STATIC = 0x400 + RTF_THROW = 0x2000 + RTF_UP = 0x1 + RTF_WINDOW = 0x80 + RTF_XRESOLVE = 0x800 + RTM_BASE = 0x10 + RTM_DELACTION = 0x31 + RTM_DELADDR = 0x15 + RTM_DELADDRLABEL = 0x49 + RTM_DELLINK = 0x11 + RTM_DELMDB = 0x55 + RTM_DELNEIGH = 0x1d + RTM_DELQDISC = 0x25 + RTM_DELROUTE = 0x19 + RTM_DELRULE = 0x21 + RTM_DELTCLASS = 0x29 + RTM_DELTFILTER = 0x2d + RTM_F_CLONED = 0x200 + RTM_F_EQUALIZE = 0x400 + RTM_F_NOTIFY = 0x100 + RTM_F_PREFIX = 0x800 + RTM_GETACTION = 0x32 + RTM_GETADDR = 0x16 + RTM_GETADDRLABEL = 0x4a + RTM_GETANYCAST = 0x3e + RTM_GETDCB = 0x4e + RTM_GETLINK = 0x12 + RTM_GETMDB = 0x56 + RTM_GETMULTICAST = 0x3a + RTM_GETNEIGH = 0x1e + RTM_GETNEIGHTBL = 0x42 + RTM_GETNETCONF = 0x52 + RTM_GETQDISC = 0x26 + RTM_GETROUTE = 0x1a + RTM_GETRULE = 0x22 + RTM_GETTCLASS = 0x2a + RTM_GETTFILTER = 0x2e + RTM_MAX = 0x57 + RTM_NEWACTION = 0x30 + RTM_NEWADDR = 0x14 + RTM_NEWADDRLABEL = 0x48 + RTM_NEWLINK = 0x10 + RTM_NEWMDB = 0x54 + RTM_NEWNDUSEROPT = 0x44 + RTM_NEWNEIGH = 0x1c + RTM_NEWNEIGHTBL = 0x40 + RTM_NEWNETCONF = 0x50 + RTM_NEWPREFIX = 0x34 + RTM_NEWQDISC = 0x24 + RTM_NEWROUTE = 0x18 + RTM_NEWRULE = 0x20 + RTM_NEWTCLASS = 0x28 + RTM_NEWTFILTER = 0x2c + RTM_NR_FAMILIES = 0x12 + RTM_NR_MSGTYPES = 0x48 + RTM_SETDCB = 0x4f + RTM_SETLINK = 0x13 + RTM_SETNEIGHTBL = 0x43 + RTNH_ALIGNTO = 0x4 + RTNH_F_DEAD = 0x1 + RTNH_F_ONLINK = 0x4 + RTNH_F_PERVASIVE = 0x2 + RTN_MAX = 0xb + RTPROT_BIRD = 0xc + RTPROT_BOOT = 0x3 + RTPROT_DHCP = 0x10 + RTPROT_DNROUTED = 0xd + RTPROT_GATED = 0x8 + RTPROT_KERNEL = 0x2 + RTPROT_MROUTED = 0x11 + RTPROT_MRT = 0xa + RTPROT_NTK = 0xf + RTPROT_RA = 0x9 + RTPROT_REDIRECT = 0x1 + RTPROT_STATIC = 0x4 + RTPROT_UNSPEC = 0x0 + RTPROT_XORP = 0xe + RTPROT_ZEBRA = 0xb + RT_CLASS_DEFAULT = 0xfd + RT_CLASS_LOCAL = 0xff + RT_CLASS_MAIN = 0xfe + RT_CLASS_MAX = 0xff + RT_CLASS_UNSPEC = 0x0 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_CREDENTIALS = 0x2 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x1d + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPNS = 0x23 + SCM_WIFI_STATUS = 0x29 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDDLCI = 0x8980 + SIOCADDMULTI = 0x8931 + SIOCADDRT = 0x890b + SIOCATMARK = 0x8905 + SIOCDARP = 0x8953 + SIOCDELDLCI = 0x8981 + SIOCDELMULTI = 0x8932 + SIOCDELRT = 0x890c + SIOCDEVPRIVATE = 0x89f0 + SIOCDIFADDR = 0x8936 + SIOCDRARP = 0x8960 + SIOCGARP = 0x8954 + SIOCGIFADDR = 0x8915 + SIOCGIFBR = 0x8940 + SIOCGIFBRDADDR = 0x8919 + SIOCGIFCONF = 0x8912 + SIOCGIFCOUNT = 0x8938 + SIOCGIFDSTADDR = 0x8917 + SIOCGIFENCAP = 0x8925 + SIOCGIFFLAGS = 0x8913 + SIOCGIFHWADDR = 0x8927 + SIOCGIFINDEX = 0x8933 + SIOCGIFMAP = 0x8970 + SIOCGIFMEM = 0x891f + SIOCGIFMETRIC = 0x891d + SIOCGIFMTU = 0x8921 + SIOCGIFNAME = 0x8910 + SIOCGIFNETMASK = 0x891b + SIOCGIFPFLAGS = 0x8935 + SIOCGIFSLAVE = 0x8929 + SIOCGIFTXQLEN = 0x8942 + SIOCGPGRP = 0x8904 + SIOCGRARP = 0x8961 + SIOCGSTAMP = 0x8906 + SIOCGSTAMPNS = 0x8907 + SIOCPROTOPRIVATE = 0x89e0 + SIOCRTMSG = 0x890d + SIOCSARP = 0x8955 + SIOCSIFADDR = 0x8916 + SIOCSIFBR = 0x8941 + SIOCSIFBRDADDR = 0x891a + SIOCSIFDSTADDR = 0x8918 + SIOCSIFENCAP = 0x8926 + SIOCSIFFLAGS = 0x8914 + SIOCSIFHWADDR = 0x8924 + SIOCSIFHWBROADCAST = 0x8937 + SIOCSIFLINK = 0x8911 + SIOCSIFMAP = 0x8971 + SIOCSIFMEM = 0x8920 + SIOCSIFMETRIC = 0x891e + SIOCSIFMTU = 0x8922 + SIOCSIFNAME = 0x8923 + SIOCSIFNETMASK = 0x891c + SIOCSIFPFLAGS = 0x8934 + SIOCSIFSLAVE = 0x8930 + SIOCSIFTXQLEN = 0x8943 + SIOCSPGRP = 0x8902 + SIOCSRARP = 0x8962 + SOCK_CLOEXEC = 0x80000 + SOCK_DCCP = 0x6 + SOCK_DGRAM = 0x2 + SOCK_NONBLOCK = 0x800 + SOCK_PACKET = 0xa + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_AAL = 0x109 + SOL_ATM = 0x108 + SOL_DECNET = 0x105 + SOL_ICMPV6 = 0x3a + SOL_IP = 0x0 + SOL_IPV6 = 0x29 + SOL_IRDA = 0x10a + SOL_PACKET = 0x107 + SOL_RAW = 0xff + SOL_SOCKET = 0x1 + SOL_TCP = 0x6 + SOL_X25 = 0x106 + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x1e + SO_ATTACH_FILTER = 0x1a + SO_BINDTODEVICE = 0x19 + SO_BPF_EXTENSIONS = 0x30 + SO_BROADCAST = 0x6 + SO_BSDCOMPAT = 0xe + SO_BUSY_POLL = 0x2e + SO_DEBUG = 0x1 + SO_DETACH_FILTER = 0x1b + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 + SO_GET_FILTER = 0x1a + SO_KEEPALIVE = 0x9 + SO_LINGER = 0xd + SO_LOCK_FILTER = 0x2c + SO_MARK = 0x24 + SO_MAX_PACING_RATE = 0x2f + SO_NOFCS = 0x2b + SO_NO_CHECK = 0xb + SO_OOBINLINE = 0xa + SO_PASSCRED = 0x14 + SO_PASSSEC = 0x22 + SO_PEEK_OFF = 0x2a + SO_PEERCRED = 0x15 + SO_PEERNAME = 0x1c + SO_PEERSEC = 0x1f + SO_PRIORITY = 0xc + SO_PROTOCOL = 0x26 + SO_RCVBUF = 0x8 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x10 + SO_RCVTIMEO = 0x12 + SO_REUSEADDR = 0x2 + SO_REUSEPORT = 0xf + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SELECT_ERR_QUEUE = 0x2d + SO_SNDBUF = 0x7 + SO_SNDBUFFORCE = 0x20 + SO_SNDLOWAT = 0x11 + SO_SNDTIMEO = 0x13 + SO_TIMESTAMP = 0x1d + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TYPE = 0x3 + SO_WIFI_STATUS = 0x29 + S_BLKSIZE = 0x200 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TCFLSH = 0x2000741f + TCIFLUSH = 0x0 + TCIOFLUSH = 0x2 + TCOFLUSH = 0x1 + TCP_CONGESTION = 0xd + TCP_COOKIE_IN_ALWAYS = 0x1 + TCP_COOKIE_MAX = 0x10 + TCP_COOKIE_MIN = 0x8 + TCP_COOKIE_OUT_NEVER = 0x2 + TCP_COOKIE_PAIR_SIZE = 0x20 + TCP_COOKIE_TRANSACTIONS = 0xf + TCP_CORK = 0x3 + TCP_DEFER_ACCEPT = 0x9 + TCP_FASTOPEN = 0x17 + TCP_INFO = 0xb + TCP_KEEPCNT = 0x6 + TCP_KEEPIDLE = 0x4 + TCP_KEEPINTVL = 0x5 + TCP_LINGER2 = 0x8 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0xe + TCP_MD5SIG_MAXKEYLEN = 0x50 + TCP_MSS = 0x200 + TCP_MSS_DEFAULT = 0x218 + TCP_MSS_DESIRED = 0x4c4 + TCP_NODELAY = 0x1 + TCP_QUEUE_SEQ = 0x15 + TCP_QUICKACK = 0xc + TCP_REPAIR = 0x13 + TCP_REPAIR_OPTIONS = 0x16 + TCP_REPAIR_QUEUE = 0x14 + TCP_SYNCNT = 0x7 + TCP_S_DATA_IN = 0x4 + TCP_S_DATA_OUT = 0x8 + TCP_THIN_DUPACK = 0x11 + TCP_THIN_LINEAR_TIMEOUTS = 0x10 + TCP_TIMESTAMP = 0x18 + TCP_USER_TIMEOUT = 0x12 + TCP_WINDOW_CLAMP = 0xa + TCSAFLUSH = 0x2 + TIOCCBRK = 0x5428 + TIOCCONS = 0x541d + TIOCEXCL = 0x540c + TIOCGDEV = 0x40045432 + TIOCGETC = 0x40067412 + TIOCGETD = 0x5424 + TIOCGETP = 0x40067408 + TIOCGEXCL = 0x40045440 + TIOCGICOUNT = 0x545d + TIOCGLCKTRMIOS = 0x5456 + TIOCGLTC = 0x40067474 + TIOCGPGRP = 0x40047477 + TIOCGPKT = 0x40045438 + TIOCGPTLCK = 0x40045439 + TIOCGPTN = 0x40045430 + TIOCGRS485 = 0x542e + TIOCGSERIAL = 0x541e + TIOCGSID = 0x5429 + TIOCGSOFTCAR = 0x5419 + TIOCGWINSZ = 0x40087468 + TIOCINQ = 0x4004667f + TIOCLINUX = 0x541c + TIOCMBIC = 0x5417 + TIOCMBIS = 0x5416 + TIOCMGET = 0x5415 + TIOCMIWAIT = 0x545c + TIOCMSET = 0x5418 + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_LOOP = 0x8000 + TIOCM_OUT1 = 0x2000 + TIOCM_OUT2 = 0x4000 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x5422 + TIOCNXCL = 0x540d + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x5420 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x540e + TIOCSERCONFIG = 0x5453 + TIOCSERGETLSR = 0x5459 + TIOCSERGETMULTI = 0x545a + TIOCSERGSTRUCT = 0x5458 + TIOCSERGWILD = 0x5454 + TIOCSERSETMULTI = 0x545b + TIOCSERSWILD = 0x5455 + TIOCSER_TEMT = 0x1 + TIOCSETC = 0x80067411 + TIOCSETD = 0x5423 + TIOCSETN = 0x8006740a + TIOCSETP = 0x80067409 + TIOCSIG = 0x80045436 + TIOCSLCKTRMIOS = 0x5457 + TIOCSLTC = 0x80067475 + TIOCSPGRP = 0x80047476 + TIOCSPTLCK = 0x80045431 + TIOCSRS485 = 0x542f + TIOCSSERIAL = 0x541f + TIOCSSOFTCAR = 0x541a + TIOCSTART = 0x2000746e + TIOCSTI = 0x5412 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x400000 + TUNATTACHFILTER = 0x801054d5 + TUNDETACHFILTER = 0x801054d6 + TUNGETFEATURES = 0x400454cf + TUNGETFILTER = 0x401054db + TUNGETIFF = 0x400454d2 + TUNGETSNDBUF = 0x400454d3 + TUNGETVNETHDRSZ = 0x400454d7 + TUNSETDEBUG = 0x800454c9 + TUNSETGROUP = 0x800454ce + TUNSETIFF = 0x800454ca + TUNSETIFINDEX = 0x800454da + TUNSETLINK = 0x800454cd + TUNSETNOCSUM = 0x800454c8 + TUNSETOFFLOAD = 0x800454d0 + TUNSETOWNER = 0x800454cc + TUNSETPERSIST = 0x800454cb + TUNSETQUEUE = 0x800454d9 + TUNSETSNDBUF = 0x800454d4 + TUNSETTXFILTER = 0x800454d1 + TUNSETVNETHDRSZ = 0x800454d8 + VDISCARD = 0x10 + VEOF = 0x4 + VEOL = 0x6 + VEOL2 = 0x8 + VERASE = 0x2 + VINTR = 0x0 + VKILL = 0x3 + VLNEXT = 0xf + VMIN = 0x5 + VQUIT = 0x1 + VREPRINT = 0xb + VSTART = 0xd + VSTOP = 0xe + VSUSP = 0xc + VSWTC = 0x9 + VT0 = 0x0 + VT1 = 0x10000 + VTDLY = 0x10000 + VTIME = 0x7 + VWERASE = 0xa + WALL = 0x40000000 + WCLONE = 0x80000000 + WCONTINUED = 0x8 + WEXITED = 0x4 + WNOHANG = 0x1 + WNOTHREAD = 0x20000000 + WNOWAIT = 0x1000000 + WORDSIZE = 0x40 + WSTOPPED = 0x2 + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x62) + EADDRNOTAVAIL = syscall.Errno(0x63) + EADV = syscall.Errno(0x44) + EAFNOSUPPORT = syscall.Errno(0x61) + EAGAIN = syscall.Errno(0xb) + EALREADY = syscall.Errno(0x72) + EBADE = syscall.Errno(0x34) + EBADF = syscall.Errno(0x9) + EBADFD = syscall.Errno(0x4d) + EBADMSG = syscall.Errno(0x4a) + EBADR = syscall.Errno(0x35) + EBADRQC = syscall.Errno(0x38) + EBADSLT = syscall.Errno(0x39) + EBFONT = syscall.Errno(0x3b) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x7d) + ECHILD = syscall.Errno(0xa) + ECHRNG = syscall.Errno(0x2c) + ECOMM = syscall.Errno(0x46) + ECONNABORTED = syscall.Errno(0x67) + ECONNREFUSED = syscall.Errno(0x6f) + ECONNRESET = syscall.Errno(0x68) + EDEADLK = syscall.Errno(0x23) + EDEADLOCK = syscall.Errno(0x3a) + EDESTADDRREQ = syscall.Errno(0x59) + EDOM = syscall.Errno(0x21) + EDOTDOT = syscall.Errno(0x49) + EDQUOT = syscall.Errno(0x7a) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EHOSTDOWN = syscall.Errno(0x70) + EHOSTUNREACH = syscall.Errno(0x71) + EHWPOISON = syscall.Errno(0x85) + EIDRM = syscall.Errno(0x2b) + EILSEQ = syscall.Errno(0x54) + EINPROGRESS = syscall.Errno(0x73) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x6a) + EISDIR = syscall.Errno(0x15) + EISNAM = syscall.Errno(0x78) + EKEYEXPIRED = syscall.Errno(0x7f) + EKEYREJECTED = syscall.Errno(0x81) + EKEYREVOKED = syscall.Errno(0x80) + EL2HLT = syscall.Errno(0x33) + EL2NSYNC = syscall.Errno(0x2d) + EL3HLT = syscall.Errno(0x2e) + EL3RST = syscall.Errno(0x2f) + ELIBACC = syscall.Errno(0x4f) + ELIBBAD = syscall.Errno(0x50) + ELIBEXEC = syscall.Errno(0x53) + ELIBMAX = syscall.Errno(0x52) + ELIBSCN = syscall.Errno(0x51) + ELNRNG = syscall.Errno(0x30) + ELOOP = syscall.Errno(0x28) + EMEDIUMTYPE = syscall.Errno(0x7c) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x5a) + EMULTIHOP = syscall.Errno(0x48) + ENAMETOOLONG = syscall.Errno(0x24) + ENAVAIL = syscall.Errno(0x77) + ENETDOWN = syscall.Errno(0x64) + ENETRESET = syscall.Errno(0x66) + ENETUNREACH = syscall.Errno(0x65) + ENFILE = syscall.Errno(0x17) + ENOANO = syscall.Errno(0x37) + ENOBUFS = syscall.Errno(0x69) + ENOCSI = syscall.Errno(0x32) + ENODATA = syscall.Errno(0x3d) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOKEY = syscall.Errno(0x7e) + ENOLCK = syscall.Errno(0x25) + ENOLINK = syscall.Errno(0x43) + ENOMEDIUM = syscall.Errno(0x7b) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x2a) + ENONET = syscall.Errno(0x40) + ENOPKG = syscall.Errno(0x41) + ENOPROTOOPT = syscall.Errno(0x5c) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x3f) + ENOSTR = syscall.Errno(0x3c) + ENOSYS = syscall.Errno(0x26) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x6b) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x27) + ENOTNAM = syscall.Errno(0x76) + ENOTRECOVERABLE = syscall.Errno(0x83) + ENOTSOCK = syscall.Errno(0x58) + ENOTSUP = syscall.Errno(0x5f) + ENOTTY = syscall.Errno(0x19) + ENOTUNIQ = syscall.Errno(0x4c) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x5f) + EOVERFLOW = syscall.Errno(0x4b) + EOWNERDEAD = syscall.Errno(0x82) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x60) + EPIPE = syscall.Errno(0x20) + EPROTO = syscall.Errno(0x47) + EPROTONOSUPPORT = syscall.Errno(0x5d) + EPROTOTYPE = syscall.Errno(0x5b) + ERANGE = syscall.Errno(0x22) + EREMCHG = syscall.Errno(0x4e) + EREMOTE = syscall.Errno(0x42) + EREMOTEIO = syscall.Errno(0x79) + ERESTART = syscall.Errno(0x55) + ERFKILL = syscall.Errno(0x84) + EROFS = syscall.Errno(0x1e) + ESHUTDOWN = syscall.Errno(0x6c) + ESOCKTNOSUPPORT = syscall.Errno(0x5e) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESRMNT = syscall.Errno(0x45) + ESTALE = syscall.Errno(0x74) + ESTRPIPE = syscall.Errno(0x56) + ETIME = syscall.Errno(0x3e) + ETIMEDOUT = syscall.Errno(0x6e) + ETOOMANYREFS = syscall.Errno(0x6d) + ETXTBSY = syscall.Errno(0x1a) + EUCLEAN = syscall.Errno(0x75) + EUNATCH = syscall.Errno(0x31) + EUSERS = syscall.Errno(0x57) + EWOULDBLOCK = syscall.Errno(0xb) + EXDEV = syscall.Errno(0x12) + EXFULL = syscall.Errno(0x36) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0x7) + SIGCHLD = syscall.Signal(0x11) + SIGCLD = syscall.Signal(0x11) + SIGCONT = syscall.Signal(0x12) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x1d) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPOLL = syscall.Signal(0x1d) + SIGPROF = syscall.Signal(0x1b) + SIGPWR = syscall.Signal(0x1e) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTKFLT = syscall.Signal(0x10) + SIGSTOP = syscall.Signal(0x13) + SIGSYS = syscall.Signal(0x1f) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x14) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGUNUSED = syscall.Signal(0x1f) + SIGURG = syscall.Signal(0x17) + SIGUSR1 = syscall.Signal(0xa) + SIGUSR2 = syscall.Signal(0xc) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "no such device or address", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource temporarily unavailable", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device or resource busy", + 17: "file exists", + 18: "invalid cross-device link", + 19: "no such device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "numerical result out of range", + 35: "resource deadlock avoided", + 36: "file name too long", + 37: "no locks available", + 38: "function not implemented", + 39: "directory not empty", + 40: "too many levels of symbolic links", + 42: "no message of desired type", + 43: "identifier removed", + 44: "channel number out of range", + 45: "level 2 not synchronized", + 46: "level 3 halted", + 47: "level 3 reset", + 48: "link number out of range", + 49: "protocol driver not attached", + 50: "no CSI structure available", + 51: "level 2 halted", + 52: "invalid exchange", + 53: "invalid request descriptor", + 54: "exchange full", + 55: "no anode", + 56: "invalid request code", + 57: "invalid slot", + 58: "file locking deadlock error", + 59: "bad font file format", + 60: "device not a stream", + 61: "no data available", + 62: "timer expired", + 63: "out of streams resources", + 64: "machine is not on the network", + 65: "package not installed", + 66: "object is remote", + 67: "link has been severed", + 68: "advertise error", + 69: "srmount error", + 70: "communication error on send", + 71: "protocol error", + 72: "multihop attempted", + 73: "RFS specific error", + 74: "bad message", + 75: "value too large for defined data type", + 76: "name not unique on network", + 77: "file descriptor in bad state", + 78: "remote address changed", + 79: "can not access a needed shared library", + 80: "accessing a corrupted shared library", + 81: ".lib section in a.out corrupted", + 82: "attempting to link in too many shared libraries", + 83: "cannot exec a shared library directly", + 84: "invalid or incomplete multibyte or wide character", + 85: "interrupted system call should be restarted", + 86: "streams pipe error", + 87: "too many users", + 88: "socket operation on non-socket", + 89: "destination address required", + 90: "message too long", + 91: "protocol wrong type for socket", + 92: "protocol not available", + 93: "protocol not supported", + 94: "socket type not supported", + 95: "operation not supported", + 96: "protocol family not supported", + 97: "address family not supported by protocol", + 98: "address already in use", + 99: "cannot assign requested address", + 100: "network is down", + 101: "network is unreachable", + 102: "network dropped connection on reset", + 103: "software caused connection abort", + 104: "connection reset by peer", + 105: "no buffer space available", + 106: "transport endpoint is already connected", + 107: "transport endpoint is not connected", + 108: "cannot send after transport endpoint shutdown", + 109: "too many references: cannot splice", + 110: "connection timed out", + 111: "connection refused", + 112: "host is down", + 113: "no route to host", + 114: "operation already in progress", + 115: "operation now in progress", + 116: "stale file handle", + 117: "structure needs cleaning", + 118: "not a XENIX named type file", + 119: "no XENIX semaphores available", + 120: "is a named type file", + 121: "remote I/O error", + 122: "disk quota exceeded", + 123: "no medium found", + 124: "wrong medium type", + 125: "operation canceled", + 126: "required key not available", + 127: "key has expired", + 128: "key has been revoked", + 129: "key was rejected by service", + 130: "owner died", + 131: "state not recoverable", + 132: "operation not possible due to RF-kill", + 133: "memory page has hardware error", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/breakpoint trap", + 6: "aborted", + 7: "bus error", + 8: "floating point exception", + 9: "killed", + 10: "user defined signal 1", + 11: "segmentation fault", + 12: "user defined signal 2", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "stack fault", + 17: "child exited", + 18: "continued", + 19: "stopped (signal)", + 20: "stopped", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "urgent I/O condition", + 24: "CPU time limit exceeded", + 25: "file size limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window changed", + 29: "I/O possible", + 30: "power failure", + 31: "bad system call", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go new file mode 100644 index 0000000..ccf05a2 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go @@ -0,0 +1,1921 @@ +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build ppc64le,linux + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m64 _const.go + +package unix + +import "syscall" + +const ( + AF_ALG = 0x26 + AF_APPLETALK = 0x5 + AF_ASH = 0x12 + AF_ATMPVC = 0x8 + AF_ATMSVC = 0x14 + AF_AX25 = 0x3 + AF_BLUETOOTH = 0x1f + AF_BRIDGE = 0x7 + AF_CAIF = 0x25 + AF_CAN = 0x1d + AF_DECnet = 0xc + AF_ECONET = 0x13 + AF_FILE = 0x1 + AF_IEEE802154 = 0x24 + AF_INET = 0x2 + AF_INET6 = 0xa + AF_IPX = 0x4 + AF_IRDA = 0x17 + AF_ISDN = 0x22 + AF_IUCV = 0x20 + AF_KEY = 0xf + AF_LLC = 0x1a + AF_LOCAL = 0x1 + AF_MAX = 0x29 + AF_NETBEUI = 0xd + AF_NETLINK = 0x10 + AF_NETROM = 0x6 + AF_NFC = 0x27 + AF_PACKET = 0x11 + AF_PHONET = 0x23 + AF_PPPOX = 0x18 + AF_RDS = 0x15 + AF_ROSE = 0xb + AF_ROUTE = 0x10 + AF_RXRPC = 0x21 + AF_SECURITY = 0xe + AF_SNA = 0x16 + AF_TIPC = 0x1e + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_VSOCK = 0x28 + AF_WANPIPE = 0x19 + AF_X25 = 0x9 + ARPHRD_ADAPT = 0x108 + ARPHRD_APPLETLK = 0x8 + ARPHRD_ARCNET = 0x7 + ARPHRD_ASH = 0x30d + ARPHRD_ATM = 0x13 + ARPHRD_AX25 = 0x3 + ARPHRD_BIF = 0x307 + ARPHRD_CAIF = 0x336 + ARPHRD_CAN = 0x118 + ARPHRD_CHAOS = 0x5 + ARPHRD_CISCO = 0x201 + ARPHRD_CSLIP = 0x101 + ARPHRD_CSLIP6 = 0x103 + ARPHRD_DDCMP = 0x205 + ARPHRD_DLCI = 0xf + ARPHRD_ECONET = 0x30e + ARPHRD_EETHER = 0x2 + ARPHRD_ETHER = 0x1 + ARPHRD_EUI64 = 0x1b + ARPHRD_FCAL = 0x311 + ARPHRD_FCFABRIC = 0x313 + ARPHRD_FCPL = 0x312 + ARPHRD_FCPP = 0x310 + ARPHRD_FDDI = 0x306 + ARPHRD_FRAD = 0x302 + ARPHRD_HDLC = 0x201 + ARPHRD_HIPPI = 0x30c + ARPHRD_HWX25 = 0x110 + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + ARPHRD_IEEE80211 = 0x321 + ARPHRD_IEEE80211_PRISM = 0x322 + ARPHRD_IEEE80211_RADIOTAP = 0x323 + ARPHRD_IEEE802154 = 0x324 + ARPHRD_IEEE802154_MONITOR = 0x325 + ARPHRD_IEEE802_TR = 0x320 + ARPHRD_INFINIBAND = 0x20 + ARPHRD_IP6GRE = 0x337 + ARPHRD_IPDDP = 0x309 + ARPHRD_IPGRE = 0x30a + ARPHRD_IRDA = 0x30f + ARPHRD_LAPB = 0x204 + ARPHRD_LOCALTLK = 0x305 + ARPHRD_LOOPBACK = 0x304 + ARPHRD_METRICOM = 0x17 + ARPHRD_NETLINK = 0x338 + ARPHRD_NETROM = 0x0 + ARPHRD_NONE = 0xfffe + ARPHRD_PHONET = 0x334 + ARPHRD_PHONET_PIPE = 0x335 + ARPHRD_PIMREG = 0x30b + ARPHRD_PPP = 0x200 + ARPHRD_PRONET = 0x4 + ARPHRD_RAWHDLC = 0x206 + ARPHRD_ROSE = 0x10e + ARPHRD_RSRVD = 0x104 + ARPHRD_SIT = 0x308 + ARPHRD_SKIP = 0x303 + ARPHRD_SLIP = 0x100 + ARPHRD_SLIP6 = 0x102 + ARPHRD_TUNNEL = 0x300 + ARPHRD_TUNNEL6 = 0x301 + ARPHRD_VOID = 0xffff + ARPHRD_X25 = 0x10f + B0 = 0x0 + B1000000 = 0x17 + B110 = 0x3 + B115200 = 0x11 + B1152000 = 0x18 + B1200 = 0x9 + B134 = 0x4 + B150 = 0x5 + B1500000 = 0x19 + B1800 = 0xa + B19200 = 0xe + B200 = 0x6 + B2000000 = 0x1a + B230400 = 0x12 + B2400 = 0xb + B2500000 = 0x1b + B300 = 0x7 + B3000000 = 0x1c + B3500000 = 0x1d + B38400 = 0xf + B4000000 = 0x1e + B460800 = 0x13 + B4800 = 0xc + B50 = 0x1 + B500000 = 0x14 + B57600 = 0x10 + B576000 = 0x15 + B600 = 0x8 + B75 = 0x2 + B921600 = 0x16 + B9600 = 0xd + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXINSNS = 0x1000 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MOD = 0x90 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BPF_XOR = 0xa0 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CLOCK_BOOTTIME = 0x7 + CLOCK_BOOTTIME_ALARM = 0x9 + CLOCK_DEFAULT = 0x0 + CLOCK_EXT = 0x1 + CLOCK_INT = 0x2 + CLOCK_MONOTONIC = 0x1 + CLOCK_MONOTONIC_COARSE = 0x6 + CLOCK_MONOTONIC_RAW = 0x4 + CLOCK_PROCESS_CPUTIME_ID = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_REALTIME_ALARM = 0x8 + CLOCK_REALTIME_COARSE = 0x5 + CLOCK_THREAD_CPUTIME_ID = 0x3 + CLOCK_TXFROMRX = 0x4 + CLOCK_TXINT = 0x3 + CLONE_CHILD_CLEARTID = 0x200000 + CLONE_CHILD_SETTID = 0x1000000 + CLONE_DETACHED = 0x400000 + CLONE_FILES = 0x400 + CLONE_FS = 0x200 + CLONE_IO = 0x80000000 + CLONE_NEWIPC = 0x8000000 + CLONE_NEWNET = 0x40000000 + CLONE_NEWNS = 0x20000 + CLONE_NEWPID = 0x20000000 + CLONE_NEWUSER = 0x10000000 + CLONE_NEWUTS = 0x4000000 + CLONE_PARENT = 0x8000 + CLONE_PARENT_SETTID = 0x100000 + CLONE_PTRACE = 0x2000 + CLONE_SETTLS = 0x80000 + CLONE_SIGHAND = 0x800 + CLONE_SYSVSEM = 0x40000 + CLONE_THREAD = 0x10000 + CLONE_UNTRACED = 0x800000 + CLONE_VFORK = 0x4000 + CLONE_VM = 0x100 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIGNAL = 0xff + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x0 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + ENCODING_DEFAULT = 0x0 + ENCODING_FM_MARK = 0x3 + ENCODING_FM_SPACE = 0x4 + ENCODING_MANCHESTER = 0x5 + ENCODING_NRZ = 0x1 + ENCODING_NRZI = 0x2 + EPOLLERR = 0x8 + EPOLLET = 0x80000000 + EPOLLHUP = 0x10 + EPOLLIN = 0x1 + EPOLLMSG = 0x400 + EPOLLONESHOT = 0x40000000 + EPOLLOUT = 0x4 + EPOLLPRI = 0x2 + EPOLLRDBAND = 0x80 + EPOLLRDHUP = 0x2000 + EPOLLRDNORM = 0x40 + EPOLLWAKEUP = 0x20000000 + EPOLLWRBAND = 0x200 + EPOLLWRNORM = 0x100 + EPOLL_CLOEXEC = 0x80000 + EPOLL_CTL_ADD = 0x1 + EPOLL_CTL_DEL = 0x2 + EPOLL_CTL_MOD = 0x3 + ETH_P_1588 = 0x88f7 + ETH_P_8021AD = 0x88a8 + ETH_P_8021AH = 0x88e7 + ETH_P_8021Q = 0x8100 + ETH_P_802_2 = 0x4 + ETH_P_802_3 = 0x1 + ETH_P_802_3_MIN = 0x600 + ETH_P_802_EX1 = 0x88b5 + ETH_P_AARP = 0x80f3 + ETH_P_AF_IUCV = 0xfbfb + ETH_P_ALL = 0x3 + ETH_P_AOE = 0x88a2 + ETH_P_ARCNET = 0x1a + ETH_P_ARP = 0x806 + ETH_P_ATALK = 0x809b + ETH_P_ATMFATE = 0x8884 + ETH_P_ATMMPOA = 0x884c + ETH_P_AX25 = 0x2 + ETH_P_BATMAN = 0x4305 + ETH_P_BPQ = 0x8ff + ETH_P_CAIF = 0xf7 + ETH_P_CAN = 0xc + ETH_P_CANFD = 0xd + ETH_P_CONTROL = 0x16 + ETH_P_CUST = 0x6006 + ETH_P_DDCMP = 0x6 + ETH_P_DEC = 0x6000 + ETH_P_DIAG = 0x6005 + ETH_P_DNA_DL = 0x6001 + ETH_P_DNA_RC = 0x6002 + ETH_P_DNA_RT = 0x6003 + ETH_P_DSA = 0x1b + ETH_P_ECONET = 0x18 + ETH_P_EDSA = 0xdada + ETH_P_FCOE = 0x8906 + ETH_P_FIP = 0x8914 + ETH_P_HDLC = 0x19 + ETH_P_IEEE802154 = 0xf6 + ETH_P_IEEEPUP = 0xa00 + ETH_P_IEEEPUPAT = 0xa01 + ETH_P_IP = 0x800 + ETH_P_IPV6 = 0x86dd + ETH_P_IPX = 0x8137 + ETH_P_IRDA = 0x17 + ETH_P_LAT = 0x6004 + ETH_P_LINK_CTL = 0x886c + ETH_P_LOCALTALK = 0x9 + ETH_P_LOOP = 0x60 + ETH_P_MOBITEX = 0x15 + ETH_P_MPLS_MC = 0x8848 + ETH_P_MPLS_UC = 0x8847 + ETH_P_MVRP = 0x88f5 + ETH_P_PAE = 0x888e + ETH_P_PAUSE = 0x8808 + ETH_P_PHONET = 0xf5 + ETH_P_PPPTALK = 0x10 + ETH_P_PPP_DISC = 0x8863 + ETH_P_PPP_MP = 0x8 + ETH_P_PPP_SES = 0x8864 + ETH_P_PRP = 0x88fb + ETH_P_PUP = 0x200 + ETH_P_PUPAT = 0x201 + ETH_P_QINQ1 = 0x9100 + ETH_P_QINQ2 = 0x9200 + ETH_P_QINQ3 = 0x9300 + ETH_P_RARP = 0x8035 + ETH_P_SCA = 0x6007 + ETH_P_SLOW = 0x8809 + ETH_P_SNAP = 0x5 + ETH_P_TDLS = 0x890d + ETH_P_TEB = 0x6558 + ETH_P_TIPC = 0x88ca + ETH_P_TRAILER = 0x1c + ETH_P_TR_802_2 = 0x11 + ETH_P_WAN_PPP = 0x7 + ETH_P_WCCP = 0x883e + ETH_P_X25 = 0x805 + EXTA = 0xe + EXTB = 0xf + EXTPROC = 0x10000000 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x406 + F_EXLCK = 0x4 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLEASE = 0x401 + F_GETLK = 0x5 + F_GETLK64 = 0xc + F_GETOWN = 0x9 + F_GETOWN_EX = 0x10 + F_GETPIPE_SZ = 0x408 + F_GETSIG = 0xb + F_LOCK = 0x1 + F_NOTIFY = 0x402 + F_OK = 0x0 + F_RDLCK = 0x0 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLEASE = 0x400 + F_SETLK = 0x6 + F_SETLK64 = 0xd + F_SETLKW = 0x7 + F_SETLKW64 = 0xe + F_SETOWN = 0x8 + F_SETOWN_EX = 0xf + F_SETPIPE_SZ = 0x407 + F_SETSIG = 0xa + F_SHLCK = 0x8 + F_TEST = 0x3 + F_TLOCK = 0x2 + F_ULOCK = 0x0 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x4000 + ICANON = 0x100 + ICMPV6_FILTER = 0x1 + ICRNL = 0x100 + IEXTEN = 0x400 + IFA_F_DADFAILED = 0x8 + IFA_F_DEPRECATED = 0x20 + IFA_F_HOMEADDRESS = 0x10 + IFA_F_NODAD = 0x2 + IFA_F_OPTIMISTIC = 0x4 + IFA_F_PERMANENT = 0x80 + IFA_F_SECONDARY = 0x1 + IFA_F_TEMPORARY = 0x1 + IFA_F_TENTATIVE = 0x40 + IFA_MAX = 0x7 + IFF_802_1Q_VLAN = 0x1 + IFF_ALLMULTI = 0x200 + IFF_ATTACH_QUEUE = 0x200 + IFF_AUTOMEDIA = 0x4000 + IFF_BONDING = 0x20 + IFF_BRIDGE_PORT = 0x4000 + IFF_BROADCAST = 0x2 + IFF_DEBUG = 0x4 + IFF_DETACH_QUEUE = 0x400 + IFF_DISABLE_NETPOLL = 0x1000 + IFF_DONT_BRIDGE = 0x800 + IFF_DORMANT = 0x20000 + IFF_DYNAMIC = 0x8000 + IFF_EBRIDGE = 0x2 + IFF_ECHO = 0x40000 + IFF_ISATAP = 0x80 + IFF_LIVE_ADDR_CHANGE = 0x100000 + IFF_LOOPBACK = 0x8 + IFF_LOWER_UP = 0x10000 + IFF_MACVLAN = 0x200000 + IFF_MACVLAN_PORT = 0x2000 + IFF_MASTER = 0x400 + IFF_MASTER_8023AD = 0x8 + IFF_MASTER_ALB = 0x10 + IFF_MASTER_ARPMON = 0x100 + IFF_MULTICAST = 0x1000 + IFF_MULTI_QUEUE = 0x100 + IFF_NOARP = 0x80 + IFF_NOFILTER = 0x1000 + IFF_NOTRAILERS = 0x20 + IFF_NO_PI = 0x1000 + IFF_ONE_QUEUE = 0x2000 + IFF_OVS_DATAPATH = 0x8000 + IFF_PERSIST = 0x800 + IFF_POINTOPOINT = 0x10 + IFF_PORTSEL = 0x2000 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SLAVE = 0x800 + IFF_SLAVE_INACTIVE = 0x4 + IFF_SLAVE_NEEDARP = 0x40 + IFF_SUPP_NOFCS = 0x80000 + IFF_TAP = 0x2 + IFF_TEAM_PORT = 0x40000 + IFF_TUN = 0x1 + IFF_TUN_EXCL = 0x8000 + IFF_TX_SKB_SHARING = 0x10000 + IFF_UNICAST_FLT = 0x20000 + IFF_UP = 0x1 + IFF_VNET_HDR = 0x4000 + IFF_VOLATILE = 0x70c5a + IFF_WAN_HDLC = 0x200 + IFF_XMIT_DST_RELEASE = 0x400 + IFNAMSIZ = 0x10 + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_ACCESS = 0x1 + IN_ALL_EVENTS = 0xfff + IN_ATTRIB = 0x4 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLOEXEC = 0x80000 + IN_CLOSE = 0x18 + IN_CLOSE_NOWRITE = 0x10 + IN_CLOSE_WRITE = 0x8 + IN_CREATE = 0x100 + IN_DELETE = 0x200 + IN_DELETE_SELF = 0x400 + IN_DONT_FOLLOW = 0x2000000 + IN_EXCL_UNLINK = 0x4000000 + IN_IGNORED = 0x8000 + IN_ISDIR = 0x40000000 + IN_LOOPBACKNET = 0x7f + IN_MASK_ADD = 0x20000000 + IN_MODIFY = 0x2 + IN_MOVE = 0xc0 + IN_MOVED_FROM = 0x40 + IN_MOVED_TO = 0x80 + IN_MOVE_SELF = 0x800 + IN_NONBLOCK = 0x800 + IN_ONESHOT = 0x80000000 + IN_ONLYDIR = 0x1000000 + IN_OPEN = 0x20 + IN_Q_OVERFLOW = 0x4000 + IN_UNMOUNT = 0x2000 + IPPROTO_AH = 0x33 + IPPROTO_BEETPH = 0x5e + IPPROTO_COMP = 0x6c + IPPROTO_DCCP = 0x21 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_ESP = 0x32 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPIP = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_MH = 0x87 + IPPROTO_MTP = 0x5c + IPPROTO_NONE = 0x3b + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPV6_2292DSTOPTS = 0x4 + IPV6_2292HOPLIMIT = 0x8 + IPV6_2292HOPOPTS = 0x3 + IPV6_2292PKTINFO = 0x2 + IPV6_2292PKTOPTIONS = 0x6 + IPV6_2292RTHDR = 0x5 + IPV6_ADDRFORM = 0x1 + IPV6_ADD_MEMBERSHIP = 0x14 + IPV6_AUTHHDR = 0xa + IPV6_CHECKSUM = 0x7 + IPV6_DROP_MEMBERSHIP = 0x15 + IPV6_DSTOPTS = 0x3b + IPV6_HOPLIMIT = 0x34 + IPV6_HOPOPTS = 0x36 + IPV6_IPSEC_POLICY = 0x22 + IPV6_JOIN_ANYCAST = 0x1b + IPV6_JOIN_GROUP = 0x14 + IPV6_LEAVE_ANYCAST = 0x1c + IPV6_LEAVE_GROUP = 0x15 + IPV6_MTU = 0x18 + IPV6_MTU_DISCOVER = 0x17 + IPV6_MULTICAST_HOPS = 0x12 + IPV6_MULTICAST_IF = 0x11 + IPV6_MULTICAST_LOOP = 0x13 + IPV6_NEXTHOP = 0x9 + IPV6_PKTINFO = 0x32 + IPV6_PMTUDISC_DO = 0x2 + IPV6_PMTUDISC_DONT = 0x0 + IPV6_PMTUDISC_PROBE = 0x3 + IPV6_PMTUDISC_WANT = 0x1 + IPV6_RECVDSTOPTS = 0x3a + IPV6_RECVERR = 0x19 + IPV6_RECVHOPLIMIT = 0x33 + IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVPKTINFO = 0x31 + IPV6_RECVRTHDR = 0x38 + IPV6_RECVTCLASS = 0x42 + IPV6_ROUTER_ALERT = 0x16 + IPV6_RTHDR = 0x39 + IPV6_RTHDRDSTOPTS = 0x37 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_RXDSTOPTS = 0x3b + IPV6_RXHOPOPTS = 0x36 + IPV6_TCLASS = 0x43 + IPV6_UNICAST_HOPS = 0x10 + IPV6_V6ONLY = 0x1a + IPV6_XFRM_POLICY = 0x23 + IP_ADD_MEMBERSHIP = 0x23 + IP_ADD_SOURCE_MEMBERSHIP = 0x27 + IP_BLOCK_SOURCE = 0x26 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0x24 + IP_DROP_SOURCE_MEMBERSHIP = 0x28 + IP_FREEBIND = 0xf + IP_HDRINCL = 0x3 + IP_IPSEC_POLICY = 0x10 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINTTL = 0x15 + IP_MSFILTER = 0x29 + IP_MSS = 0x240 + IP_MTU = 0xe + IP_MTU_DISCOVER = 0xa + IP_MULTICAST_ALL = 0x31 + IP_MULTICAST_IF = 0x20 + IP_MULTICAST_LOOP = 0x22 + IP_MULTICAST_TTL = 0x21 + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x4 + IP_ORIGDSTADDR = 0x14 + IP_PASSSEC = 0x12 + IP_PKTINFO = 0x8 + IP_PKTOPTIONS = 0x9 + IP_PMTUDISC = 0xa + IP_PMTUDISC_DO = 0x2 + IP_PMTUDISC_DONT = 0x0 + IP_PMTUDISC_PROBE = 0x3 + IP_PMTUDISC_WANT = 0x1 + IP_RECVERR = 0xb + IP_RECVOPTS = 0x6 + IP_RECVORIGDSTADDR = 0x14 + IP_RECVRETOPTS = 0x7 + IP_RECVTOS = 0xd + IP_RECVTTL = 0xc + IP_RETOPTS = 0x7 + IP_RF = 0x8000 + IP_ROUTER_ALERT = 0x5 + IP_TOS = 0x1 + IP_TRANSPARENT = 0x13 + IP_TTL = 0x2 + IP_UNBLOCK_SOURCE = 0x25 + IP_UNICAST_IF = 0x32 + IP_XFRM_POLICY = 0x11 + ISIG = 0x80 + ISTRIP = 0x20 + IUTF8 = 0x4000 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LINUX_REBOOT_CMD_CAD_OFF = 0x0 + LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef + LINUX_REBOOT_CMD_HALT = 0xcdef0123 + LINUX_REBOOT_CMD_KEXEC = 0x45584543 + LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc + LINUX_REBOOT_CMD_RESTART = 0x1234567 + LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 + LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 + LINUX_REBOOT_MAGIC1 = 0xfee1dead + LINUX_REBOOT_MAGIC2 = 0x28121969 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DODUMP = 0x11 + MADV_DOFORK = 0xb + MADV_DONTDUMP = 0x10 + MADV_DONTFORK = 0xa + MADV_DONTNEED = 0x4 + MADV_HUGEPAGE = 0xe + MADV_HWPOISON = 0x64 + MADV_MERGEABLE = 0xc + MADV_NOHUGEPAGE = 0xf + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_REMOVE = 0x9 + MADV_SEQUENTIAL = 0x2 + MADV_UNMERGEABLE = 0xd + MADV_WILLNEED = 0x3 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 + MAP_EXECUTABLE = 0x1000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_GROWSDOWN = 0x100 + MAP_HUGETLB = 0x40000 + MAP_HUGE_MASK = 0x3f + MAP_HUGE_SHIFT = 0x1a + MAP_LOCKED = 0x80 + MAP_NONBLOCK = 0x10000 + MAP_NORESERVE = 0x40 + MAP_POPULATE = 0x8000 + MAP_PRIVATE = 0x2 + MAP_SHARED = 0x1 + MAP_STACK = 0x20000 + MAP_TYPE = 0xf + MCL_CURRENT = 0x2000 + MCL_FUTURE = 0x4000 + MNT_DETACH = 0x2 + MNT_EXPIRE = 0x4 + MNT_FORCE = 0x1 + MSG_CMSG_CLOEXEC = 0x40000000 + MSG_CONFIRM = 0x800 + MSG_CTRUNC = 0x8 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x40 + MSG_EOR = 0x80 + MSG_ERRQUEUE = 0x2000 + MSG_FASTOPEN = 0x20000000 + MSG_FIN = 0x200 + MSG_MORE = 0x8000 + MSG_NOSIGNAL = 0x4000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_PROXY = 0x10 + MSG_RST = 0x1000 + MSG_SYN = 0x400 + MSG_TRUNC = 0x20 + MSG_TRYHARD = 0x4 + MSG_WAITALL = 0x100 + MSG_WAITFORONE = 0x10000 + MS_ACTIVE = 0x40000000 + MS_ASYNC = 0x1 + MS_BIND = 0x1000 + MS_DIRSYNC = 0x80 + MS_INVALIDATE = 0x2 + MS_I_VERSION = 0x800000 + MS_KERNMOUNT = 0x400000 + MS_MANDLOCK = 0x40 + MS_MGC_MSK = 0xffff0000 + MS_MGC_VAL = 0xc0ed0000 + MS_MOVE = 0x2000 + MS_NOATIME = 0x400 + MS_NODEV = 0x4 + MS_NODIRATIME = 0x800 + MS_NOEXEC = 0x8 + MS_NOSUID = 0x2 + MS_NOUSER = -0x80000000 + MS_POSIXACL = 0x10000 + MS_PRIVATE = 0x40000 + MS_RDONLY = 0x1 + MS_REC = 0x4000 + MS_RELATIME = 0x200000 + MS_REMOUNT = 0x20 + MS_RMT_MASK = 0x800051 + MS_SHARED = 0x100000 + MS_SILENT = 0x8000 + MS_SLAVE = 0x80000 + MS_STRICTATIME = 0x1000000 + MS_SYNC = 0x4 + MS_SYNCHRONOUS = 0x10 + MS_UNBINDABLE = 0x20000 + NAME_MAX = 0xff + NETLINK_ADD_MEMBERSHIP = 0x1 + NETLINK_AUDIT = 0x9 + NETLINK_BROADCAST_ERROR = 0x4 + NETLINK_CONNECTOR = 0xb + NETLINK_CRYPTO = 0x15 + NETLINK_DNRTMSG = 0xe + NETLINK_DROP_MEMBERSHIP = 0x2 + NETLINK_ECRYPTFS = 0x13 + NETLINK_FIB_LOOKUP = 0xa + NETLINK_FIREWALL = 0x3 + NETLINK_GENERIC = 0x10 + NETLINK_INET_DIAG = 0x4 + NETLINK_IP6_FW = 0xd + NETLINK_ISCSI = 0x8 + NETLINK_KOBJECT_UEVENT = 0xf + NETLINK_NETFILTER = 0xc + NETLINK_NFLOG = 0x5 + NETLINK_NO_ENOBUFS = 0x5 + NETLINK_PKTINFO = 0x3 + NETLINK_RDMA = 0x14 + NETLINK_ROUTE = 0x0 + NETLINK_RX_RING = 0x6 + NETLINK_SCSITRANSPORT = 0x12 + NETLINK_SELINUX = 0x7 + NETLINK_SOCK_DIAG = 0x4 + NETLINK_TX_RING = 0x7 + NETLINK_UNUSED = 0x1 + NETLINK_USERSOCK = 0x2 + NETLINK_XFRM = 0x6 + NLA_ALIGNTO = 0x4 + NLA_F_NESTED = 0x8000 + NLA_F_NET_BYTEORDER = 0x4000 + NLA_HDRLEN = 0x4 + NLMSG_ALIGNTO = 0x4 + NLMSG_DONE = 0x3 + NLMSG_ERROR = 0x2 + NLMSG_HDRLEN = 0x10 + NLMSG_MIN_TYPE = 0x10 + NLMSG_NOOP = 0x1 + NLMSG_OVERRUN = 0x4 + NLM_F_ACK = 0x4 + NLM_F_APPEND = 0x800 + NLM_F_ATOMIC = 0x400 + NLM_F_CREATE = 0x400 + NLM_F_DUMP = 0x300 + NLM_F_DUMP_INTR = 0x10 + NLM_F_ECHO = 0x8 + NLM_F_EXCL = 0x200 + NLM_F_MATCH = 0x200 + NLM_F_MULTI = 0x2 + NLM_F_REPLACE = 0x100 + NLM_F_REQUEST = 0x1 + NLM_F_ROOT = 0x100 + NOFLSH = 0x80000000 + OCRNL = 0x8 + OFDEL = 0x80 + OFILL = 0x40 + ONLCR = 0x2 + ONLRET = 0x20 + ONOCR = 0x10 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x400 + O_ASYNC = 0x2000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x40 + O_DIRECT = 0x20000 + O_DIRECTORY = 0x4000 + O_DSYNC = 0x1000 + O_EXCL = 0x80 + O_FSYNC = 0x101000 + O_LARGEFILE = 0x0 + O_NDELAY = 0x800 + O_NOATIME = 0x40000 + O_NOCTTY = 0x100 + O_NOFOLLOW = 0x8000 + O_NONBLOCK = 0x800 + O_PATH = 0x200000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x101000 + O_SYNC = 0x101000 + O_TMPFILE = 0x410000 + O_TRUNC = 0x200 + O_WRONLY = 0x1 + PACKET_ADD_MEMBERSHIP = 0x1 + PACKET_AUXDATA = 0x8 + PACKET_BROADCAST = 0x1 + PACKET_COPY_THRESH = 0x7 + PACKET_DROP_MEMBERSHIP = 0x2 + PACKET_FANOUT = 0x12 + PACKET_FANOUT_CPU = 0x2 + PACKET_FANOUT_FLAG_DEFRAG = 0x8000 + PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_HASH = 0x0 + PACKET_FANOUT_LB = 0x1 + PACKET_FANOUT_RND = 0x4 + PACKET_FANOUT_ROLLOVER = 0x3 + PACKET_FASTROUTE = 0x6 + PACKET_HDRLEN = 0xb + PACKET_HOST = 0x0 + PACKET_LOOPBACK = 0x5 + PACKET_LOSS = 0xe + PACKET_MR_ALLMULTI = 0x2 + PACKET_MR_MULTICAST = 0x0 + PACKET_MR_PROMISC = 0x1 + PACKET_MR_UNICAST = 0x3 + PACKET_MULTICAST = 0x2 + PACKET_ORIGDEV = 0x9 + PACKET_OTHERHOST = 0x3 + PACKET_OUTGOING = 0x4 + PACKET_RECV_OUTPUT = 0x3 + PACKET_RESERVE = 0xc + PACKET_RX_RING = 0x5 + PACKET_STATISTICS = 0x6 + PACKET_TIMESTAMP = 0x11 + PACKET_TX_HAS_OFF = 0x13 + PACKET_TX_RING = 0xd + PACKET_TX_TIMESTAMP = 0x10 + PACKET_VERSION = 0xa + PACKET_VNET_HDR = 0xf + PARENB = 0x1000 + PARITY_CRC16_PR0 = 0x2 + PARITY_CRC16_PR0_CCITT = 0x4 + PARITY_CRC16_PR1 = 0x3 + PARITY_CRC16_PR1_CCITT = 0x5 + PARITY_CRC32_PR0_CCITT = 0x6 + PARITY_CRC32_PR1_CCITT = 0x7 + PARITY_DEFAULT = 0x0 + PARITY_NONE = 0x1 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_GROWSDOWN = 0x1000000 + PROT_GROWSUP = 0x2000000 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_SAO = 0x10 + PROT_WRITE = 0x2 + PR_CAPBSET_DROP = 0x18 + PR_CAPBSET_READ = 0x17 + PR_ENDIAN_BIG = 0x0 + PR_ENDIAN_LITTLE = 0x1 + PR_ENDIAN_PPC_LITTLE = 0x2 + PR_FPEMU_NOPRINT = 0x1 + PR_FPEMU_SIGFPE = 0x2 + PR_FP_EXC_ASYNC = 0x2 + PR_FP_EXC_DISABLED = 0x0 + PR_FP_EXC_DIV = 0x10000 + PR_FP_EXC_INV = 0x100000 + PR_FP_EXC_NONRECOV = 0x1 + PR_FP_EXC_OVF = 0x20000 + PR_FP_EXC_PRECISE = 0x3 + PR_FP_EXC_RES = 0x80000 + PR_FP_EXC_SW_ENABLE = 0x80 + PR_FP_EXC_UND = 0x40000 + PR_GET_CHILD_SUBREAPER = 0x25 + PR_GET_DUMPABLE = 0x3 + PR_GET_ENDIAN = 0x13 + PR_GET_FPEMU = 0x9 + PR_GET_FPEXC = 0xb + PR_GET_KEEPCAPS = 0x7 + PR_GET_NAME = 0x10 + PR_GET_NO_NEW_PRIVS = 0x27 + PR_GET_PDEATHSIG = 0x2 + PR_GET_SECCOMP = 0x15 + PR_GET_SECUREBITS = 0x1b + PR_GET_TID_ADDRESS = 0x28 + PR_GET_TIMERSLACK = 0x1e + PR_GET_TIMING = 0xd + PR_GET_TSC = 0x19 + PR_GET_UNALIGN = 0x5 + PR_MCE_KILL = 0x21 + PR_MCE_KILL_CLEAR = 0x0 + PR_MCE_KILL_DEFAULT = 0x2 + PR_MCE_KILL_EARLY = 0x1 + PR_MCE_KILL_GET = 0x22 + PR_MCE_KILL_LATE = 0x0 + PR_MCE_KILL_SET = 0x1 + PR_SET_CHILD_SUBREAPER = 0x24 + PR_SET_DUMPABLE = 0x4 + PR_SET_ENDIAN = 0x14 + PR_SET_FPEMU = 0xa + PR_SET_FPEXC = 0xc + PR_SET_KEEPCAPS = 0x8 + PR_SET_MM = 0x23 + PR_SET_MM_ARG_END = 0x9 + PR_SET_MM_ARG_START = 0x8 + PR_SET_MM_AUXV = 0xc + PR_SET_MM_BRK = 0x7 + PR_SET_MM_END_CODE = 0x2 + PR_SET_MM_END_DATA = 0x4 + PR_SET_MM_ENV_END = 0xb + PR_SET_MM_ENV_START = 0xa + PR_SET_MM_EXE_FILE = 0xd + PR_SET_MM_START_BRK = 0x6 + PR_SET_MM_START_CODE = 0x1 + PR_SET_MM_START_DATA = 0x3 + PR_SET_MM_START_STACK = 0x5 + PR_SET_NAME = 0xf + PR_SET_NO_NEW_PRIVS = 0x26 + PR_SET_PDEATHSIG = 0x1 + PR_SET_PTRACER = 0x59616d61 + PR_SET_PTRACER_ANY = -0x1 + PR_SET_SECCOMP = 0x16 + PR_SET_SECUREBITS = 0x1c + PR_SET_TIMERSLACK = 0x1d + PR_SET_TIMING = 0xe + PR_SET_TSC = 0x1a + PR_SET_UNALIGN = 0x6 + PR_TASK_PERF_EVENTS_DISABLE = 0x1f + PR_TASK_PERF_EVENTS_ENABLE = 0x20 + PR_TIMING_STATISTICAL = 0x0 + PR_TIMING_TIMESTAMP = 0x1 + PR_TSC_ENABLE = 0x1 + PR_TSC_SIGSEGV = 0x2 + PR_UNALIGN_NOPRINT = 0x1 + PR_UNALIGN_SIGBUS = 0x2 + PTRACE_ATTACH = 0x10 + PTRACE_CONT = 0x7 + PTRACE_DETACH = 0x11 + PTRACE_EVENT_CLONE = 0x3 + PTRACE_EVENT_EXEC = 0x4 + PTRACE_EVENT_EXIT = 0x6 + PTRACE_EVENT_FORK = 0x1 + PTRACE_EVENT_SECCOMP = 0x7 + PTRACE_EVENT_STOP = 0x80 + PTRACE_EVENT_VFORK = 0x2 + PTRACE_EVENT_VFORK_DONE = 0x5 + PTRACE_GETEVENTMSG = 0x4201 + PTRACE_GETEVRREGS = 0x14 + PTRACE_GETFPREGS = 0xe + PTRACE_GETREGS = 0xc + PTRACE_GETREGS64 = 0x16 + PTRACE_GETREGSET = 0x4204 + PTRACE_GETSIGINFO = 0x4202 + PTRACE_GETSIGMASK = 0x420a + PTRACE_GETVRREGS = 0x12 + PTRACE_GETVSRREGS = 0x1b + PTRACE_GET_DEBUGREG = 0x19 + PTRACE_INTERRUPT = 0x4207 + PTRACE_KILL = 0x8 + PTRACE_LISTEN = 0x4208 + PTRACE_O_EXITKILL = 0x100000 + PTRACE_O_MASK = 0x1000ff + PTRACE_O_TRACECLONE = 0x8 + PTRACE_O_TRACEEXEC = 0x10 + PTRACE_O_TRACEEXIT = 0x40 + PTRACE_O_TRACEFORK = 0x2 + PTRACE_O_TRACESECCOMP = 0x80 + PTRACE_O_TRACESYSGOOD = 0x1 + PTRACE_O_TRACEVFORK = 0x4 + PTRACE_O_TRACEVFORKDONE = 0x20 + PTRACE_PEEKDATA = 0x2 + PTRACE_PEEKSIGINFO = 0x4209 + PTRACE_PEEKSIGINFO_SHARED = 0x1 + PTRACE_PEEKTEXT = 0x1 + PTRACE_PEEKUSR = 0x3 + PTRACE_POKEDATA = 0x5 + PTRACE_POKETEXT = 0x4 + PTRACE_POKEUSR = 0x6 + PTRACE_SEIZE = 0x4206 + PTRACE_SETEVRREGS = 0x15 + PTRACE_SETFPREGS = 0xf + PTRACE_SETOPTIONS = 0x4200 + PTRACE_SETREGS = 0xd + PTRACE_SETREGS64 = 0x17 + PTRACE_SETREGSET = 0x4205 + PTRACE_SETSIGINFO = 0x4203 + PTRACE_SETSIGMASK = 0x420b + PTRACE_SETVRREGS = 0x13 + PTRACE_SETVSRREGS = 0x1c + PTRACE_SET_DEBUGREG = 0x1a + PTRACE_SINGLEBLOCK = 0x100 + PTRACE_SINGLESTEP = 0x9 + PTRACE_SYSCALL = 0x18 + PTRACE_TRACEME = 0x0 + PT_CCR = 0x26 + PT_CTR = 0x23 + PT_DAR = 0x29 + PT_DSCR = 0x2c + PT_DSISR = 0x2a + PT_FPR0 = 0x30 + PT_FPSCR = 0x50 + PT_LNK = 0x24 + PT_MSR = 0x21 + PT_NIP = 0x20 + PT_ORIG_R3 = 0x22 + PT_R0 = 0x0 + PT_R1 = 0x1 + PT_R10 = 0xa + PT_R11 = 0xb + PT_R12 = 0xc + PT_R13 = 0xd + PT_R14 = 0xe + PT_R15 = 0xf + PT_R16 = 0x10 + PT_R17 = 0x11 + PT_R18 = 0x12 + PT_R19 = 0x13 + PT_R2 = 0x2 + PT_R20 = 0x14 + PT_R21 = 0x15 + PT_R22 = 0x16 + PT_R23 = 0x17 + PT_R24 = 0x18 + PT_R25 = 0x19 + PT_R26 = 0x1a + PT_R27 = 0x1b + PT_R28 = 0x1c + PT_R29 = 0x1d + PT_R3 = 0x3 + PT_R30 = 0x1e + PT_R31 = 0x1f + PT_R4 = 0x4 + PT_R5 = 0x5 + PT_R6 = 0x6 + PT_R7 = 0x7 + PT_R8 = 0x8 + PT_R9 = 0x9 + PT_REGS_COUNT = 0x2c + PT_RESULT = 0x2b + PT_SOFTE = 0x27 + PT_TRAP = 0x28 + PT_VR0 = 0x52 + PT_VRSAVE = 0x94 + PT_VSCR = 0x93 + PT_VSR0 = 0x96 + PT_VSR31 = 0xd4 + PT_XER = 0x25 + RLIMIT_AS = 0x9 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x7 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = -0x1 + RTAX_ADVMSS = 0x8 + RTAX_CWND = 0x7 + RTAX_FEATURES = 0xc + RTAX_FEATURE_ALLFRAG = 0x8 + RTAX_FEATURE_ECN = 0x1 + RTAX_FEATURE_SACK = 0x2 + RTAX_FEATURE_TIMESTAMP = 0x4 + RTAX_HOPLIMIT = 0xa + RTAX_INITCWND = 0xb + RTAX_INITRWND = 0xe + RTAX_LOCK = 0x1 + RTAX_MAX = 0xf + RTAX_MTU = 0x2 + RTAX_QUICKACK = 0xf + RTAX_REORDERING = 0x9 + RTAX_RTO_MIN = 0xd + RTAX_RTT = 0x4 + RTAX_RTTVAR = 0x5 + RTAX_SSTHRESH = 0x6 + RTAX_UNSPEC = 0x0 + RTAX_WINDOW = 0x3 + RTA_ALIGNTO = 0x4 + RTA_MAX = 0x11 + RTCF_DIRECTSRC = 0x4000000 + RTCF_DOREDIRECT = 0x1000000 + RTCF_LOG = 0x2000000 + RTCF_MASQ = 0x400000 + RTCF_NAT = 0x800000 + RTCF_VALVE = 0x200000 + RTF_ADDRCLASSMASK = 0xf8000000 + RTF_ADDRCONF = 0x40000 + RTF_ALLONLINK = 0x20000 + RTF_BROADCAST = 0x10000000 + RTF_CACHE = 0x1000000 + RTF_DEFAULT = 0x10000 + RTF_DYNAMIC = 0x10 + RTF_FLOW = 0x2000000 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_INTERFACE = 0x40000000 + RTF_IRTT = 0x100 + RTF_LINKRT = 0x100000 + RTF_LOCAL = 0x80000000 + RTF_MODIFIED = 0x20 + RTF_MSS = 0x40 + RTF_MTU = 0x40 + RTF_MULTICAST = 0x20000000 + RTF_NAT = 0x8000000 + RTF_NOFORWARD = 0x1000 + RTF_NONEXTHOP = 0x200000 + RTF_NOPMTUDISC = 0x4000 + RTF_POLICY = 0x4000000 + RTF_REINSTATE = 0x8 + RTF_REJECT = 0x200 + RTF_STATIC = 0x400 + RTF_THROW = 0x2000 + RTF_UP = 0x1 + RTF_WINDOW = 0x80 + RTF_XRESOLVE = 0x800 + RTM_BASE = 0x10 + RTM_DELACTION = 0x31 + RTM_DELADDR = 0x15 + RTM_DELADDRLABEL = 0x49 + RTM_DELLINK = 0x11 + RTM_DELMDB = 0x55 + RTM_DELNEIGH = 0x1d + RTM_DELQDISC = 0x25 + RTM_DELROUTE = 0x19 + RTM_DELRULE = 0x21 + RTM_DELTCLASS = 0x29 + RTM_DELTFILTER = 0x2d + RTM_F_CLONED = 0x200 + RTM_F_EQUALIZE = 0x400 + RTM_F_NOTIFY = 0x100 + RTM_F_PREFIX = 0x800 + RTM_GETACTION = 0x32 + RTM_GETADDR = 0x16 + RTM_GETADDRLABEL = 0x4a + RTM_GETANYCAST = 0x3e + RTM_GETDCB = 0x4e + RTM_GETLINK = 0x12 + RTM_GETMDB = 0x56 + RTM_GETMULTICAST = 0x3a + RTM_GETNEIGH = 0x1e + RTM_GETNEIGHTBL = 0x42 + RTM_GETNETCONF = 0x52 + RTM_GETQDISC = 0x26 + RTM_GETROUTE = 0x1a + RTM_GETRULE = 0x22 + RTM_GETTCLASS = 0x2a + RTM_GETTFILTER = 0x2e + RTM_MAX = 0x57 + RTM_NEWACTION = 0x30 + RTM_NEWADDR = 0x14 + RTM_NEWADDRLABEL = 0x48 + RTM_NEWLINK = 0x10 + RTM_NEWMDB = 0x54 + RTM_NEWNDUSEROPT = 0x44 + RTM_NEWNEIGH = 0x1c + RTM_NEWNEIGHTBL = 0x40 + RTM_NEWNETCONF = 0x50 + RTM_NEWPREFIX = 0x34 + RTM_NEWQDISC = 0x24 + RTM_NEWROUTE = 0x18 + RTM_NEWRULE = 0x20 + RTM_NEWTCLASS = 0x28 + RTM_NEWTFILTER = 0x2c + RTM_NR_FAMILIES = 0x12 + RTM_NR_MSGTYPES = 0x48 + RTM_SETDCB = 0x4f + RTM_SETLINK = 0x13 + RTM_SETNEIGHTBL = 0x43 + RTNH_ALIGNTO = 0x4 + RTNH_F_DEAD = 0x1 + RTNH_F_ONLINK = 0x4 + RTNH_F_PERVASIVE = 0x2 + RTN_MAX = 0xb + RTPROT_BIRD = 0xc + RTPROT_BOOT = 0x3 + RTPROT_DHCP = 0x10 + RTPROT_DNROUTED = 0xd + RTPROT_GATED = 0x8 + RTPROT_KERNEL = 0x2 + RTPROT_MROUTED = 0x11 + RTPROT_MRT = 0xa + RTPROT_NTK = 0xf + RTPROT_RA = 0x9 + RTPROT_REDIRECT = 0x1 + RTPROT_STATIC = 0x4 + RTPROT_UNSPEC = 0x0 + RTPROT_XORP = 0xe + RTPROT_ZEBRA = 0xb + RT_CLASS_DEFAULT = 0xfd + RT_CLASS_LOCAL = 0xff + RT_CLASS_MAIN = 0xfe + RT_CLASS_MAX = 0xff + RT_CLASS_UNSPEC = 0x0 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_CREDENTIALS = 0x2 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x1d + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPNS = 0x23 + SCM_WIFI_STATUS = 0x29 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDDLCI = 0x8980 + SIOCADDMULTI = 0x8931 + SIOCADDRT = 0x890b + SIOCATMARK = 0x8905 + SIOCDARP = 0x8953 + SIOCDELDLCI = 0x8981 + SIOCDELMULTI = 0x8932 + SIOCDELRT = 0x890c + SIOCDEVPRIVATE = 0x89f0 + SIOCDIFADDR = 0x8936 + SIOCDRARP = 0x8960 + SIOCGARP = 0x8954 + SIOCGIFADDR = 0x8915 + SIOCGIFBR = 0x8940 + SIOCGIFBRDADDR = 0x8919 + SIOCGIFCONF = 0x8912 + SIOCGIFCOUNT = 0x8938 + SIOCGIFDSTADDR = 0x8917 + SIOCGIFENCAP = 0x8925 + SIOCGIFFLAGS = 0x8913 + SIOCGIFHWADDR = 0x8927 + SIOCGIFINDEX = 0x8933 + SIOCGIFMAP = 0x8970 + SIOCGIFMEM = 0x891f + SIOCGIFMETRIC = 0x891d + SIOCGIFMTU = 0x8921 + SIOCGIFNAME = 0x8910 + SIOCGIFNETMASK = 0x891b + SIOCGIFPFLAGS = 0x8935 + SIOCGIFSLAVE = 0x8929 + SIOCGIFTXQLEN = 0x8942 + SIOCGPGRP = 0x8904 + SIOCGRARP = 0x8961 + SIOCGSTAMP = 0x8906 + SIOCGSTAMPNS = 0x8907 + SIOCPROTOPRIVATE = 0x89e0 + SIOCRTMSG = 0x890d + SIOCSARP = 0x8955 + SIOCSIFADDR = 0x8916 + SIOCSIFBR = 0x8941 + SIOCSIFBRDADDR = 0x891a + SIOCSIFDSTADDR = 0x8918 + SIOCSIFENCAP = 0x8926 + SIOCSIFFLAGS = 0x8914 + SIOCSIFHWADDR = 0x8924 + SIOCSIFHWBROADCAST = 0x8937 + SIOCSIFLINK = 0x8911 + SIOCSIFMAP = 0x8971 + SIOCSIFMEM = 0x8920 + SIOCSIFMETRIC = 0x891e + SIOCSIFMTU = 0x8922 + SIOCSIFNAME = 0x8923 + SIOCSIFNETMASK = 0x891c + SIOCSIFPFLAGS = 0x8934 + SIOCSIFSLAVE = 0x8930 + SIOCSIFTXQLEN = 0x8943 + SIOCSPGRP = 0x8902 + SIOCSRARP = 0x8962 + SOCK_CLOEXEC = 0x80000 + SOCK_DCCP = 0x6 + SOCK_DGRAM = 0x2 + SOCK_NONBLOCK = 0x800 + SOCK_PACKET = 0xa + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_AAL = 0x109 + SOL_ATM = 0x108 + SOL_DECNET = 0x105 + SOL_ICMPV6 = 0x3a + SOL_IP = 0x0 + SOL_IPV6 = 0x29 + SOL_IRDA = 0x10a + SOL_PACKET = 0x107 + SOL_RAW = 0xff + SOL_SOCKET = 0x1 + SOL_TCP = 0x6 + SOL_X25 = 0x106 + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x1e + SO_ATTACH_FILTER = 0x1a + SO_BINDTODEVICE = 0x19 + SO_BROADCAST = 0x6 + SO_BSDCOMPAT = 0xe + SO_BUSY_POLL = 0x2e + SO_DEBUG = 0x1 + SO_DETACH_FILTER = 0x1b + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 + SO_GET_FILTER = 0x1a + SO_KEEPALIVE = 0x9 + SO_LINGER = 0xd + SO_LOCK_FILTER = 0x2c + SO_MARK = 0x24 + SO_MAX_PACING_RATE = 0x2f + SO_NOFCS = 0x2b + SO_NO_CHECK = 0xb + SO_OOBINLINE = 0xa + SO_PASSCRED = 0x14 + SO_PASSSEC = 0x22 + SO_PEEK_OFF = 0x2a + SO_PEERCRED = 0x15 + SO_PEERNAME = 0x1c + SO_PEERSEC = 0x1f + SO_PRIORITY = 0xc + SO_PROTOCOL = 0x26 + SO_RCVBUF = 0x8 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x10 + SO_RCVTIMEO = 0x12 + SO_REUSEADDR = 0x2 + SO_REUSEPORT = 0xf + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SELECT_ERR_QUEUE = 0x2d + SO_SNDBUF = 0x7 + SO_SNDBUFFORCE = 0x20 + SO_SNDLOWAT = 0x11 + SO_SNDTIMEO = 0x13 + SO_TIMESTAMP = 0x1d + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TYPE = 0x3 + SO_WIFI_STATUS = 0x29 + S_BLKSIZE = 0x200 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TCFLSH = 0x2000741f + TCIFLUSH = 0x0 + TCIOFLUSH = 0x2 + TCOFLUSH = 0x1 + TCP_CONGESTION = 0xd + TCP_COOKIE_IN_ALWAYS = 0x1 + TCP_COOKIE_MAX = 0x10 + TCP_COOKIE_MIN = 0x8 + TCP_COOKIE_OUT_NEVER = 0x2 + TCP_COOKIE_PAIR_SIZE = 0x20 + TCP_COOKIE_TRANSACTIONS = 0xf + TCP_CORK = 0x3 + TCP_DEFER_ACCEPT = 0x9 + TCP_FASTOPEN = 0x17 + TCP_INFO = 0xb + TCP_KEEPCNT = 0x6 + TCP_KEEPIDLE = 0x4 + TCP_KEEPINTVL = 0x5 + TCP_LINGER2 = 0x8 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0xe + TCP_MD5SIG_MAXKEYLEN = 0x50 + TCP_MSS = 0x200 + TCP_MSS_DEFAULT = 0x218 + TCP_MSS_DESIRED = 0x4c4 + TCP_NODELAY = 0x1 + TCP_QUEUE_SEQ = 0x15 + TCP_QUICKACK = 0xc + TCP_REPAIR = 0x13 + TCP_REPAIR_OPTIONS = 0x16 + TCP_REPAIR_QUEUE = 0x14 + TCP_SYNCNT = 0x7 + TCP_S_DATA_IN = 0x4 + TCP_S_DATA_OUT = 0x8 + TCP_THIN_DUPACK = 0x11 + TCP_THIN_LINEAR_TIMEOUTS = 0x10 + TCP_TIMESTAMP = 0x18 + TCP_USER_TIMEOUT = 0x12 + TCP_WINDOW_CLAMP = 0xa + TCSAFLUSH = 0x2 + TIOCCBRK = 0x5428 + TIOCCONS = 0x541d + TIOCEXCL = 0x540c + TIOCGDEV = 0x40045432 + TIOCGETC = 0x40067412 + TIOCGETD = 0x5424 + TIOCGETP = 0x40067408 + TIOCGEXCL = 0x40045440 + TIOCGICOUNT = 0x545d + TIOCGLCKTRMIOS = 0x5456 + TIOCGLTC = 0x40067474 + TIOCGPGRP = 0x40047477 + TIOCGPKT = 0x40045438 + TIOCGPTLCK = 0x40045439 + TIOCGPTN = 0x40045430 + TIOCGRS485 = 0x542e + TIOCGSERIAL = 0x541e + TIOCGSID = 0x5429 + TIOCGSOFTCAR = 0x5419 + TIOCGWINSZ = 0x40087468 + TIOCINQ = 0x4004667f + TIOCLINUX = 0x541c + TIOCMBIC = 0x5417 + TIOCMBIS = 0x5416 + TIOCMGET = 0x5415 + TIOCMIWAIT = 0x545c + TIOCMSET = 0x5418 + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_LOOP = 0x8000 + TIOCM_OUT1 = 0x2000 + TIOCM_OUT2 = 0x4000 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x5422 + TIOCNXCL = 0x540d + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x5420 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x540e + TIOCSERCONFIG = 0x5453 + TIOCSERGETLSR = 0x5459 + TIOCSERGETMULTI = 0x545a + TIOCSERGSTRUCT = 0x5458 + TIOCSERGWILD = 0x5454 + TIOCSERSETMULTI = 0x545b + TIOCSERSWILD = 0x5455 + TIOCSER_TEMT = 0x1 + TIOCSETC = 0x80067411 + TIOCSETD = 0x5423 + TIOCSETN = 0x8006740a + TIOCSETP = 0x80067409 + TIOCSIG = 0x80045436 + TIOCSLCKTRMIOS = 0x5457 + TIOCSLTC = 0x80067475 + TIOCSPGRP = 0x80047476 + TIOCSPTLCK = 0x80045431 + TIOCSRS485 = 0x542f + TIOCSSERIAL = 0x541f + TIOCSSOFTCAR = 0x541a + TIOCSTART = 0x2000746e + TIOCSTI = 0x5412 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x400000 + TUNATTACHFILTER = 0x801054d5 + TUNDETACHFILTER = 0x801054d6 + TUNGETFEATURES = 0x400454cf + TUNGETFILTER = 0x401054db + TUNGETIFF = 0x400454d2 + TUNGETSNDBUF = 0x400454d3 + TUNGETVNETHDRSZ = 0x400454d7 + TUNSETDEBUG = 0x800454c9 + TUNSETGROUP = 0x800454ce + TUNSETIFF = 0x800454ca + TUNSETIFINDEX = 0x800454da + TUNSETLINK = 0x800454cd + TUNSETNOCSUM = 0x800454c8 + TUNSETOFFLOAD = 0x800454d0 + TUNSETOWNER = 0x800454cc + TUNSETPERSIST = 0x800454cb + TUNSETQUEUE = 0x800454d9 + TUNSETSNDBUF = 0x800454d4 + TUNSETTXFILTER = 0x800454d1 + TUNSETVNETHDRSZ = 0x800454d8 + VDISCARD = 0x10 + VEOF = 0x4 + VEOL = 0x6 + VEOL2 = 0x8 + VERASE = 0x2 + VINTR = 0x0 + VKILL = 0x3 + VLNEXT = 0xf + VMIN = 0x5 + VQUIT = 0x1 + VREPRINT = 0xb + VSTART = 0xd + VSTOP = 0xe + VSUSP = 0xc + VSWTC = 0x9 + VT0 = 0x0 + VT1 = 0x10000 + VTDLY = 0x10000 + VTIME = 0x7 + VWERASE = 0xa + WALL = 0x40000000 + WCLONE = 0x80000000 + WCONTINUED = 0x8 + WEXITED = 0x4 + WNOHANG = 0x1 + WNOTHREAD = 0x20000000 + WNOWAIT = 0x1000000 + WORDSIZE = 0x40 + WSTOPPED = 0x2 + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x62) + EADDRNOTAVAIL = syscall.Errno(0x63) + EADV = syscall.Errno(0x44) + EAFNOSUPPORT = syscall.Errno(0x61) + EAGAIN = syscall.Errno(0xb) + EALREADY = syscall.Errno(0x72) + EBADE = syscall.Errno(0x34) + EBADF = syscall.Errno(0x9) + EBADFD = syscall.Errno(0x4d) + EBADMSG = syscall.Errno(0x4a) + EBADR = syscall.Errno(0x35) + EBADRQC = syscall.Errno(0x38) + EBADSLT = syscall.Errno(0x39) + EBFONT = syscall.Errno(0x3b) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x7d) + ECHILD = syscall.Errno(0xa) + ECHRNG = syscall.Errno(0x2c) + ECOMM = syscall.Errno(0x46) + ECONNABORTED = syscall.Errno(0x67) + ECONNREFUSED = syscall.Errno(0x6f) + ECONNRESET = syscall.Errno(0x68) + EDEADLK = syscall.Errno(0x23) + EDEADLOCK = syscall.Errno(0x3a) + EDESTADDRREQ = syscall.Errno(0x59) + EDOM = syscall.Errno(0x21) + EDOTDOT = syscall.Errno(0x49) + EDQUOT = syscall.Errno(0x7a) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EHOSTDOWN = syscall.Errno(0x70) + EHOSTUNREACH = syscall.Errno(0x71) + EHWPOISON = syscall.Errno(0x85) + EIDRM = syscall.Errno(0x2b) + EILSEQ = syscall.Errno(0x54) + EINPROGRESS = syscall.Errno(0x73) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x6a) + EISDIR = syscall.Errno(0x15) + EISNAM = syscall.Errno(0x78) + EKEYEXPIRED = syscall.Errno(0x7f) + EKEYREJECTED = syscall.Errno(0x81) + EKEYREVOKED = syscall.Errno(0x80) + EL2HLT = syscall.Errno(0x33) + EL2NSYNC = syscall.Errno(0x2d) + EL3HLT = syscall.Errno(0x2e) + EL3RST = syscall.Errno(0x2f) + ELIBACC = syscall.Errno(0x4f) + ELIBBAD = syscall.Errno(0x50) + ELIBEXEC = syscall.Errno(0x53) + ELIBMAX = syscall.Errno(0x52) + ELIBSCN = syscall.Errno(0x51) + ELNRNG = syscall.Errno(0x30) + ELOOP = syscall.Errno(0x28) + EMEDIUMTYPE = syscall.Errno(0x7c) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x5a) + EMULTIHOP = syscall.Errno(0x48) + ENAMETOOLONG = syscall.Errno(0x24) + ENAVAIL = syscall.Errno(0x77) + ENETDOWN = syscall.Errno(0x64) + ENETRESET = syscall.Errno(0x66) + ENETUNREACH = syscall.Errno(0x65) + ENFILE = syscall.Errno(0x17) + ENOANO = syscall.Errno(0x37) + ENOBUFS = syscall.Errno(0x69) + ENOCSI = syscall.Errno(0x32) + ENODATA = syscall.Errno(0x3d) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOKEY = syscall.Errno(0x7e) + ENOLCK = syscall.Errno(0x25) + ENOLINK = syscall.Errno(0x43) + ENOMEDIUM = syscall.Errno(0x7b) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x2a) + ENONET = syscall.Errno(0x40) + ENOPKG = syscall.Errno(0x41) + ENOPROTOOPT = syscall.Errno(0x5c) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x3f) + ENOSTR = syscall.Errno(0x3c) + ENOSYS = syscall.Errno(0x26) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x6b) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x27) + ENOTNAM = syscall.Errno(0x76) + ENOTRECOVERABLE = syscall.Errno(0x83) + ENOTSOCK = syscall.Errno(0x58) + ENOTSUP = syscall.Errno(0x5f) + ENOTTY = syscall.Errno(0x19) + ENOTUNIQ = syscall.Errno(0x4c) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x5f) + EOVERFLOW = syscall.Errno(0x4b) + EOWNERDEAD = syscall.Errno(0x82) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x60) + EPIPE = syscall.Errno(0x20) + EPROTO = syscall.Errno(0x47) + EPROTONOSUPPORT = syscall.Errno(0x5d) + EPROTOTYPE = syscall.Errno(0x5b) + ERANGE = syscall.Errno(0x22) + EREMCHG = syscall.Errno(0x4e) + EREMOTE = syscall.Errno(0x42) + EREMOTEIO = syscall.Errno(0x79) + ERESTART = syscall.Errno(0x55) + ERFKILL = syscall.Errno(0x84) + EROFS = syscall.Errno(0x1e) + ESHUTDOWN = syscall.Errno(0x6c) + ESOCKTNOSUPPORT = syscall.Errno(0x5e) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESRMNT = syscall.Errno(0x45) + ESTALE = syscall.Errno(0x74) + ESTRPIPE = syscall.Errno(0x56) + ETIME = syscall.Errno(0x3e) + ETIMEDOUT = syscall.Errno(0x6e) + ETOOMANYREFS = syscall.Errno(0x6d) + ETXTBSY = syscall.Errno(0x1a) + EUCLEAN = syscall.Errno(0x75) + EUNATCH = syscall.Errno(0x31) + EUSERS = syscall.Errno(0x57) + EWOULDBLOCK = syscall.Errno(0xb) + EXDEV = syscall.Errno(0x12) + EXFULL = syscall.Errno(0x36) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0x7) + SIGCHLD = syscall.Signal(0x11) + SIGCLD = syscall.Signal(0x11) + SIGCONT = syscall.Signal(0x12) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x1d) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPOLL = syscall.Signal(0x1d) + SIGPROF = syscall.Signal(0x1b) + SIGPWR = syscall.Signal(0x1e) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTKFLT = syscall.Signal(0x10) + SIGSTOP = syscall.Signal(0x13) + SIGSYS = syscall.Signal(0x1f) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x14) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGUNUSED = syscall.Signal(0x1f) + SIGURG = syscall.Signal(0x17) + SIGUSR1 = syscall.Signal(0xa) + SIGUSR2 = syscall.Signal(0xc) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "no such device or address", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource temporarily unavailable", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device or resource busy", + 17: "file exists", + 18: "invalid cross-device link", + 19: "no such device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "numerical result out of range", + 35: "resource deadlock avoided", + 36: "file name too long", + 37: "no locks available", + 38: "function not implemented", + 39: "directory not empty", + 40: "too many levels of symbolic links", + 42: "no message of desired type", + 43: "identifier removed", + 44: "channel number out of range", + 45: "level 2 not synchronized", + 46: "level 3 halted", + 47: "level 3 reset", + 48: "link number out of range", + 49: "protocol driver not attached", + 50: "no CSI structure available", + 51: "level 2 halted", + 52: "invalid exchange", + 53: "invalid request descriptor", + 54: "exchange full", + 55: "no anode", + 56: "invalid request code", + 57: "invalid slot", + 58: "file locking deadlock error", + 59: "bad font file format", + 60: "device not a stream", + 61: "no data available", + 62: "timer expired", + 63: "out of streams resources", + 64: "machine is not on the network", + 65: "package not installed", + 66: "object is remote", + 67: "link has been severed", + 68: "advertise error", + 69: "srmount error", + 70: "communication error on send", + 71: "protocol error", + 72: "multihop attempted", + 73: "RFS specific error", + 74: "bad message", + 75: "value too large for defined data type", + 76: "name not unique on network", + 77: "file descriptor in bad state", + 78: "remote address changed", + 79: "can not access a needed shared library", + 80: "accessing a corrupted shared library", + 81: ".lib section in a.out corrupted", + 82: "attempting to link in too many shared libraries", + 83: "cannot exec a shared library directly", + 84: "invalid or incomplete multibyte or wide character", + 85: "interrupted system call should be restarted", + 86: "streams pipe error", + 87: "too many users", + 88: "socket operation on non-socket", + 89: "destination address required", + 90: "message too long", + 91: "protocol wrong type for socket", + 92: "protocol not available", + 93: "protocol not supported", + 94: "socket type not supported", + 95: "operation not supported", + 96: "protocol family not supported", + 97: "address family not supported by protocol", + 98: "address already in use", + 99: "cannot assign requested address", + 100: "network is down", + 101: "network is unreachable", + 102: "network dropped connection on reset", + 103: "software caused connection abort", + 104: "connection reset by peer", + 105: "no buffer space available", + 106: "transport endpoint is already connected", + 107: "transport endpoint is not connected", + 108: "cannot send after transport endpoint shutdown", + 109: "too many references: cannot splice", + 110: "connection timed out", + 111: "connection refused", + 112: "host is down", + 113: "no route to host", + 114: "operation already in progress", + 115: "operation now in progress", + 116: "stale file handle", + 117: "structure needs cleaning", + 118: "not a XENIX named type file", + 119: "no XENIX semaphores available", + 120: "is a named type file", + 121: "remote I/O error", + 122: "disk quota exceeded", + 123: "no medium found", + 124: "wrong medium type", + 125: "operation canceled", + 126: "required key not available", + 127: "key has expired", + 128: "key has been revoked", + 129: "key was rejected by service", + 130: "owner died", + 131: "state not recoverable", + 132: "operation not possible due to RF-kill", + 133: "memory page has hardware error", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/breakpoint trap", + 6: "aborted", + 7: "bus error", + 8: "floating point exception", + 9: "killed", + 10: "user defined signal 1", + 11: "segmentation fault", + 12: "user defined signal 2", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "stack fault", + 17: "child exited", + 18: "continued", + 19: "stopped (signal)", + 20: "stopped", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "urgent I/O condition", + 24: "CPU time limit exceeded", + 25: "file size limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window changed", + 29: "I/O possible", + 30: "power failure", + 31: "bad system call", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go new file mode 100644 index 0000000..b4338d5 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go @@ -0,0 +1,1712 @@ +// mkerrors.sh -m32 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build 386,netbsd + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m32 _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_ARP = 0x1c + AF_BLUETOOTH = 0x1f + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1a + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x20 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x18 + AF_IPX = 0x17 + AF_ISDN = 0x1a + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x23 + AF_MPLS = 0x21 + AF_NATM = 0x1b + AF_NS = 0x6 + AF_OROUTE = 0x11 + AF_OSI = 0x7 + AF_PUP = 0x4 + AF_ROUTE = 0x22 + AF_SNA = 0xb + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + ARPHRD_ARCNET = 0x7 + ARPHRD_ETHER = 0x1 + ARPHRD_FRELAY = 0xf + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + ARPHRD_STRIP = 0x17 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B460800 = 0x70800 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B921600 = 0xe1000 + B9600 = 0x2580 + BIOCFEEDBACK = 0x8004427d + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc0084277 + BIOCGETIF = 0x4090426b + BIOCGFEEDBACK = 0x4004427c + BIOCGHDRCMPLT = 0x40044274 + BIOCGRTIMEOUT = 0x400c427b + BIOCGSEESENT = 0x40044278 + BIOCGSTATS = 0x4080426f + BIOCGSTATSOLD = 0x4008426f + BIOCIMMEDIATE = 0x80044270 + BIOCPROMISC = 0x20004269 + BIOCSBLEN = 0xc0044266 + BIOCSDLT = 0x80044276 + BIOCSETF = 0x80084267 + BIOCSETIF = 0x8090426c + BIOCSFEEDBACK = 0x8004427d + BIOCSHDRCMPLT = 0x80044275 + BIOCSRTIMEOUT = 0x800c427a + BIOCSSEESENT = 0x80044279 + BIOCSTCPF = 0x80084272 + BIOCSUDPF = 0x80084273 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALIGNMENT32 = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DFLTBUFSIZE = 0x100000 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x1000000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CLONE_CSIGNAL = 0xff + CLONE_FILES = 0x400 + CLONE_FS = 0x200 + CLONE_PID = 0x1000 + CLONE_PTRACE = 0x2000 + CLONE_SIGHAND = 0x800 + CLONE_VFORK = 0x4000 + CLONE_VM = 0x100 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0xc + CTL_NET = 0x4 + CTL_QUERY = -0x2 + DIOCBSFLUSH = 0x20006478 + DLT_A429 = 0xb8 + DLT_A653_ICM = 0xb9 + DLT_AIRONET_HEADER = 0x78 + DLT_AOS = 0xde + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_AX25_KISS = 0xca + DLT_BACNET_MS_TP = 0xa5 + DLT_BLUETOOTH_HCI_H4 = 0xbb + DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 + DLT_CAN20B = 0xbe + DLT_CAN_SOCKETCAN = 0xe3 + DLT_CHAOS = 0x5 + DLT_CISCO_IOS = 0x76 + DLT_C_HDLC = 0x68 + DLT_C_HDLC_WITH_DIR = 0xcd + DLT_DECT = 0xdd + DLT_DOCSIS = 0x8f + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_ERF = 0xc5 + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FC_2 = 0xe0 + DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 + DLT_FDDI = 0xa + DLT_FLEXRAY = 0xd2 + DLT_FRELAY = 0x6b + DLT_FRELAY_WITH_DIR = 0xce + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_GSMTAP_ABIS = 0xda + DLT_GSMTAP_UM = 0xd9 + DLT_HDLC = 0x10 + DLT_HHDLC = 0x79 + DLT_HIPPI = 0xf + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IEEE802_15_4 = 0xc3 + DLT_IEEE802_15_4_LINUX = 0xbf + DLT_IEEE802_15_4_NONASK_PHY = 0xd7 + DLT_IEEE802_16_MAC_CPS = 0xbc + DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 + DLT_IPMB = 0xc7 + DLT_IPMB_LINUX = 0xd1 + DLT_IPNET = 0xe2 + DLT_IPV4 = 0xe4 + DLT_IPV6 = 0xe5 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_ISM = 0xc2 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_JUNIPER_ST = 0xc8 + DLT_JUNIPER_VP = 0xb7 + DLT_LAPB_WITH_DIR = 0xcf + DLT_LAPD = 0xcb + DLT_LIN = 0xd4 + DLT_LINUX_EVDEV = 0xd8 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MFR = 0xb6 + DLT_MOST = 0xd3 + DLT_MPLS = 0xdb + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPI = 0xc0 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0xe + DLT_PPP_ETHER = 0x33 + DLT_PPP_PPPD = 0xa6 + DLT_PPP_SERIAL = 0x32 + DLT_PPP_WITH_DIR = 0xcc + DLT_PRISM_HEADER = 0x77 + DLT_PRONET = 0x4 + DLT_RAIF1 = 0xc6 + DLT_RAW = 0xc + DLT_RAWAF_MASK = 0x2240000 + DLT_RIO = 0x7c + DLT_SCCP = 0x8e + DLT_SITA = 0xc4 + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xd + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + DLT_USB = 0xba + DLT_USB_LINUX = 0xbd + DLT_USB_LINUX_MMAPPED = 0xdc + DLT_WIHART = 0xdf + DLT_X2E_SERIAL = 0xd5 + DLT_X2E_XORAYA = 0xd6 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EMUL_LINUX = 0x1 + EMUL_LINUX32 = 0x5 + EMUL_MAXID = 0x6 + EN_SW_CTL_INF = 0x1000 + EN_SW_CTL_PREC = 0x300 + EN_SW_CTL_ROUND = 0xc00 + EN_SW_DATACHAIN = 0x80 + EN_SW_DENORM = 0x2 + EN_SW_INVOP = 0x1 + EN_SW_OVERFLOW = 0x8 + EN_SW_PRECLOSS = 0x20 + EN_SW_UNDERFLOW = 0x10 + EN_SW_ZERODIV = 0x4 + ETHERCAP_JUMBO_MTU = 0x4 + ETHERCAP_VLAN_HWTAGGING = 0x2 + ETHERCAP_VLAN_MTU = 0x1 + ETHERMIN = 0x2e + ETHERMTU = 0x5dc + ETHERMTU_JUMBO = 0x2328 + ETHERTYPE_8023 = 0x4 + ETHERTYPE_AARP = 0x80f3 + ETHERTYPE_ACCTON = 0x8390 + ETHERTYPE_AEONIC = 0x8036 + ETHERTYPE_ALPHA = 0x814a + ETHERTYPE_AMBER = 0x6008 + ETHERTYPE_AMOEBA = 0x8145 + ETHERTYPE_APOLLO = 0x80f7 + ETHERTYPE_APOLLODOMAIN = 0x8019 + ETHERTYPE_APPLETALK = 0x809b + ETHERTYPE_APPLITEK = 0x80c7 + ETHERTYPE_ARGONAUT = 0x803a + ETHERTYPE_ARP = 0x806 + ETHERTYPE_AT = 0x809b + ETHERTYPE_ATALK = 0x809b + ETHERTYPE_ATOMIC = 0x86df + ETHERTYPE_ATT = 0x8069 + ETHERTYPE_ATTSTANFORD = 0x8008 + ETHERTYPE_AUTOPHON = 0x806a + ETHERTYPE_AXIS = 0x8856 + ETHERTYPE_BCLOOP = 0x9003 + ETHERTYPE_BOFL = 0x8102 + ETHERTYPE_CABLETRON = 0x7034 + ETHERTYPE_CHAOS = 0x804 + ETHERTYPE_COMDESIGN = 0x806c + ETHERTYPE_COMPUGRAPHIC = 0x806d + ETHERTYPE_COUNTERPOINT = 0x8062 + ETHERTYPE_CRONUS = 0x8004 + ETHERTYPE_CRONUSVLN = 0x8003 + ETHERTYPE_DCA = 0x1234 + ETHERTYPE_DDE = 0x807b + ETHERTYPE_DEBNI = 0xaaaa + ETHERTYPE_DECAM = 0x8048 + ETHERTYPE_DECCUST = 0x6006 + ETHERTYPE_DECDIAG = 0x6005 + ETHERTYPE_DECDNS = 0x803c + ETHERTYPE_DECDTS = 0x803e + ETHERTYPE_DECEXPER = 0x6000 + ETHERTYPE_DECLAST = 0x8041 + ETHERTYPE_DECLTM = 0x803f + ETHERTYPE_DECMUMPS = 0x6009 + ETHERTYPE_DECNETBIOS = 0x8040 + ETHERTYPE_DELTACON = 0x86de + ETHERTYPE_DIDDLE = 0x4321 + ETHERTYPE_DLOG1 = 0x660 + ETHERTYPE_DLOG2 = 0x661 + ETHERTYPE_DN = 0x6003 + ETHERTYPE_DOGFIGHT = 0x1989 + ETHERTYPE_DSMD = 0x8039 + ETHERTYPE_ECMA = 0x803 + ETHERTYPE_ENCRYPT = 0x803d + ETHERTYPE_ES = 0x805d + ETHERTYPE_EXCELAN = 0x8010 + ETHERTYPE_EXPERDATA = 0x8049 + ETHERTYPE_FLIP = 0x8146 + ETHERTYPE_FLOWCONTROL = 0x8808 + ETHERTYPE_FRARP = 0x808 + ETHERTYPE_GENDYN = 0x8068 + ETHERTYPE_HAYES = 0x8130 + ETHERTYPE_HIPPI_FP = 0x8180 + ETHERTYPE_HITACHI = 0x8820 + ETHERTYPE_HP = 0x8005 + ETHERTYPE_IEEEPUP = 0xa00 + ETHERTYPE_IEEEPUPAT = 0xa01 + ETHERTYPE_IMLBL = 0x4c42 + ETHERTYPE_IMLBLDIAG = 0x424c + ETHERTYPE_IP = 0x800 + ETHERTYPE_IPAS = 0x876c + ETHERTYPE_IPV6 = 0x86dd + ETHERTYPE_IPX = 0x8137 + ETHERTYPE_IPXNEW = 0x8037 + ETHERTYPE_KALPANA = 0x8582 + ETHERTYPE_LANBRIDGE = 0x8038 + ETHERTYPE_LANPROBE = 0x8888 + ETHERTYPE_LAT = 0x6004 + ETHERTYPE_LBACK = 0x9000 + ETHERTYPE_LITTLE = 0x8060 + ETHERTYPE_LOGICRAFT = 0x8148 + ETHERTYPE_LOOPBACK = 0x9000 + ETHERTYPE_MATRA = 0x807a + ETHERTYPE_MAX = 0xffff + ETHERTYPE_MERIT = 0x807c + ETHERTYPE_MICP = 0x873a + ETHERTYPE_MOPDL = 0x6001 + ETHERTYPE_MOPRC = 0x6002 + ETHERTYPE_MOTOROLA = 0x818d + ETHERTYPE_MPLS = 0x8847 + ETHERTYPE_MPLS_MCAST = 0x8848 + ETHERTYPE_MUMPS = 0x813f + ETHERTYPE_NBPCC = 0x3c04 + ETHERTYPE_NBPCLAIM = 0x3c09 + ETHERTYPE_NBPCLREQ = 0x3c05 + ETHERTYPE_NBPCLRSP = 0x3c06 + ETHERTYPE_NBPCREQ = 0x3c02 + ETHERTYPE_NBPCRSP = 0x3c03 + ETHERTYPE_NBPDG = 0x3c07 + ETHERTYPE_NBPDGB = 0x3c08 + ETHERTYPE_NBPDLTE = 0x3c0a + ETHERTYPE_NBPRAR = 0x3c0c + ETHERTYPE_NBPRAS = 0x3c0b + ETHERTYPE_NBPRST = 0x3c0d + ETHERTYPE_NBPSCD = 0x3c01 + ETHERTYPE_NBPVCD = 0x3c00 + ETHERTYPE_NBS = 0x802 + ETHERTYPE_NCD = 0x8149 + ETHERTYPE_NESTAR = 0x8006 + ETHERTYPE_NETBEUI = 0x8191 + ETHERTYPE_NOVELL = 0x8138 + ETHERTYPE_NS = 0x600 + ETHERTYPE_NSAT = 0x601 + ETHERTYPE_NSCOMPAT = 0x807 + ETHERTYPE_NTRAILER = 0x10 + ETHERTYPE_OS9 = 0x7007 + ETHERTYPE_OS9NET = 0x7009 + ETHERTYPE_PACER = 0x80c6 + ETHERTYPE_PAE = 0x888e + ETHERTYPE_PCS = 0x4242 + ETHERTYPE_PLANNING = 0x8044 + ETHERTYPE_PPP = 0x880b + ETHERTYPE_PPPOE = 0x8864 + ETHERTYPE_PPPOEDISC = 0x8863 + ETHERTYPE_PRIMENTS = 0x7031 + ETHERTYPE_PUP = 0x200 + ETHERTYPE_PUPAT = 0x200 + ETHERTYPE_RACAL = 0x7030 + ETHERTYPE_RATIONAL = 0x8150 + ETHERTYPE_RAWFR = 0x6559 + ETHERTYPE_RCL = 0x1995 + ETHERTYPE_RDP = 0x8739 + ETHERTYPE_RETIX = 0x80f2 + ETHERTYPE_REVARP = 0x8035 + ETHERTYPE_SCA = 0x6007 + ETHERTYPE_SECTRA = 0x86db + ETHERTYPE_SECUREDATA = 0x876d + ETHERTYPE_SGITW = 0x817e + ETHERTYPE_SG_BOUNCE = 0x8016 + ETHERTYPE_SG_DIAG = 0x8013 + ETHERTYPE_SG_NETGAMES = 0x8014 + ETHERTYPE_SG_RESV = 0x8015 + ETHERTYPE_SIMNET = 0x5208 + ETHERTYPE_SLOWPROTOCOLS = 0x8809 + ETHERTYPE_SNA = 0x80d5 + ETHERTYPE_SNMP = 0x814c + ETHERTYPE_SONIX = 0xfaf5 + ETHERTYPE_SPIDER = 0x809f + ETHERTYPE_SPRITE = 0x500 + ETHERTYPE_STP = 0x8181 + ETHERTYPE_TALARIS = 0x812b + ETHERTYPE_TALARISMC = 0x852b + ETHERTYPE_TCPCOMP = 0x876b + ETHERTYPE_TCPSM = 0x9002 + ETHERTYPE_TEC = 0x814f + ETHERTYPE_TIGAN = 0x802f + ETHERTYPE_TRAIL = 0x1000 + ETHERTYPE_TRANSETHER = 0x6558 + ETHERTYPE_TYMSHARE = 0x802e + ETHERTYPE_UBBST = 0x7005 + ETHERTYPE_UBDEBUG = 0x900 + ETHERTYPE_UBDIAGLOOP = 0x7002 + ETHERTYPE_UBDL = 0x7000 + ETHERTYPE_UBNIU = 0x7001 + ETHERTYPE_UBNMC = 0x7003 + ETHERTYPE_VALID = 0x1600 + ETHERTYPE_VARIAN = 0x80dd + ETHERTYPE_VAXELN = 0x803b + ETHERTYPE_VEECO = 0x8067 + ETHERTYPE_VEXP = 0x805b + ETHERTYPE_VGLAB = 0x8131 + ETHERTYPE_VINES = 0xbad + ETHERTYPE_VINESECHO = 0xbaf + ETHERTYPE_VINESLOOP = 0xbae + ETHERTYPE_VITAL = 0xff00 + ETHERTYPE_VLAN = 0x8100 + ETHERTYPE_VLTLMAN = 0x8080 + ETHERTYPE_VPROD = 0x805c + ETHERTYPE_VURESERVED = 0x8147 + ETHERTYPE_WATERLOO = 0x8130 + ETHERTYPE_WELLFLEET = 0x8103 + ETHERTYPE_X25 = 0x805 + ETHERTYPE_X75 = 0x801 + ETHERTYPE_XNSSM = 0x9001 + ETHERTYPE_XTP = 0x817d + ETHER_ADDR_LEN = 0x6 + ETHER_CRC_LEN = 0x4 + ETHER_CRC_POLY_BE = 0x4c11db6 + ETHER_CRC_POLY_LE = 0xedb88320 + ETHER_HDR_LEN = 0xe + ETHER_MAX_LEN = 0x5ee + ETHER_MAX_LEN_JUMBO = 0x233a + ETHER_MIN_LEN = 0x40 + ETHER_PPPOE_ENCAP_LEN = 0x8 + ETHER_TYPE_LEN = 0x2 + ETHER_VLAN_ENCAP_LEN = 0x4 + EVFILT_AIO = 0x2 + EVFILT_PROC = 0x4 + EVFILT_READ = 0x0 + EVFILT_SIGNAL = 0x5 + EVFILT_SYSCOUNT = 0x7 + EVFILT_TIMER = 0x6 + EVFILT_VNODE = 0x3 + EVFILT_WRITE = 0x1 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x100 + FLUSHO = 0x800000 + F_CLOSEM = 0xa + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0xc + F_FSCTL = -0x80000000 + F_FSDIRMASK = 0x70000000 + F_FSIN = 0x10000000 + F_FSINOUT = 0x30000000 + F_FSOUT = 0x20000000 + F_FSPRIV = 0x8000 + F_FSVOID = 0x40000000 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0x7 + F_GETNOSIGPIPE = 0xd + F_GETOWN = 0x5 + F_MAXFD = 0xb + F_OK = 0x0 + F_PARAM_MASK = 0xfff + F_PARAM_MAX = 0xfff + F_RDLCK = 0x1 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x8 + F_SETLKW = 0x9 + F_SETNOSIGPIPE = 0xe + F_SETOWN = 0x6 + F_UNLCK = 0x2 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFAN_ARRIVAL = 0x0 + IFAN_DEPARTURE = 0x1 + IFA_ROUTE = 0x1 + IFF_ALLMULTI = 0x200 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x8f52 + IFF_DEBUG = 0x4 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_A12MPPSWITCH = 0x82 + IFT_AAL2 = 0xbb + IFT_AAL5 = 0x31 + IFT_ADSL = 0x5e + IFT_AFLANE8023 = 0x3b + IFT_AFLANE8025 = 0x3c + IFT_ARAP = 0x58 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ASYNC = 0x54 + IFT_ATM = 0x25 + IFT_ATMDXI = 0x69 + IFT_ATMFUNI = 0x6a + IFT_ATMIMA = 0x6b + IFT_ATMLOGICAL = 0x50 + IFT_ATMRADIO = 0xbd + IFT_ATMSUBINTERFACE = 0x86 + IFT_ATMVCIENDPT = 0xc2 + IFT_ATMVIRTUAL = 0x95 + IFT_BGPPOLICYACCOUNTING = 0xa2 + IFT_BRIDGE = 0xd1 + IFT_BSC = 0x53 + IFT_CARP = 0xf8 + IFT_CCTEMUL = 0x3d + IFT_CEPT = 0x13 + IFT_CES = 0x85 + IFT_CHANNEL = 0x46 + IFT_CNR = 0x55 + IFT_COFFEE = 0x84 + IFT_COMPOSITELINK = 0x9b + IFT_DCN = 0x8d + IFT_DIGITALPOWERLINE = 0x8a + IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba + IFT_DLSW = 0x4a + IFT_DOCSCABLEDOWNSTREAM = 0x80 + IFT_DOCSCABLEMACLAYER = 0x7f + IFT_DOCSCABLEUPSTREAM = 0x81 + IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd + IFT_DS0 = 0x51 + IFT_DS0BUNDLE = 0x52 + IFT_DS1FDL = 0xaa + IFT_DS3 = 0x1e + IFT_DTM = 0x8c + IFT_DVBASILN = 0xac + IFT_DVBASIOUT = 0xad + IFT_DVBRCCDOWNSTREAM = 0x93 + IFT_DVBRCCMACLAYER = 0x92 + IFT_DVBRCCUPSTREAM = 0x94 + IFT_ECONET = 0xce + IFT_EON = 0x19 + IFT_EPLRS = 0x57 + IFT_ESCON = 0x49 + IFT_ETHER = 0x6 + IFT_FAITH = 0xf2 + IFT_FAST = 0x7d + IFT_FASTETHER = 0x3e + IFT_FASTETHERFX = 0x45 + IFT_FDDI = 0xf + IFT_FIBRECHANNEL = 0x38 + IFT_FRAMERELAYINTERCONNECT = 0x3a + IFT_FRAMERELAYMPI = 0x5c + IFT_FRDLCIENDPT = 0xc1 + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_FRF16MFRBUNDLE = 0xa3 + IFT_FRFORWARD = 0x9e + IFT_G703AT2MB = 0x43 + IFT_G703AT64K = 0x42 + IFT_GIF = 0xf0 + IFT_GIGABITETHERNET = 0x75 + IFT_GR303IDT = 0xb2 + IFT_GR303RDT = 0xb1 + IFT_H323GATEKEEPER = 0xa4 + IFT_H323PROXY = 0xa5 + IFT_HDH1822 = 0x3 + IFT_HDLC = 0x76 + IFT_HDSL2 = 0xa8 + IFT_HIPERLAN2 = 0xb7 + IFT_HIPPI = 0x2f + IFT_HIPPIINTERFACE = 0x39 + IFT_HOSTPAD = 0x5a + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IBM370PARCHAN = 0x48 + IFT_IDSL = 0x9a + IFT_IEEE1394 = 0x90 + IFT_IEEE80211 = 0x47 + IFT_IEEE80212 = 0x37 + IFT_IEEE8023ADLAG = 0xa1 + IFT_IFGSN = 0x91 + IFT_IMT = 0xbe + IFT_INFINIBAND = 0xc7 + IFT_INTERLEAVE = 0x7c + IFT_IP = 0x7e + IFT_IPFORWARD = 0x8e + IFT_IPOVERATM = 0x72 + IFT_IPOVERCDLC = 0x6d + IFT_IPOVERCLAW = 0x6e + IFT_IPSWITCH = 0x4e + IFT_ISDN = 0x3f + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISDNS = 0x4b + IFT_ISDNU = 0x4c + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88025CRFPINT = 0x62 + IFT_ISO88025DTR = 0x56 + IFT_ISO88025FIBER = 0x73 + IFT_ISO88026 = 0xa + IFT_ISUP = 0xb3 + IFT_L2VLAN = 0x87 + IFT_L3IPVLAN = 0x88 + IFT_L3IPXVLAN = 0x89 + IFT_LAPB = 0x10 + IFT_LAPD = 0x4d + IFT_LAPF = 0x77 + IFT_LINEGROUP = 0xd2 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_MPC = 0x71 + IFT_MPLS = 0xa6 + IFT_MPLSTUNNEL = 0x96 + IFT_MSDSL = 0x8f + IFT_MVL = 0xbf + IFT_MYRINET = 0x63 + IFT_NFAS = 0xaf + IFT_NSIP = 0x1b + IFT_OPTICALCHANNEL = 0xc3 + IFT_OPTICALTRANSPORT = 0xc4 + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PFLOG = 0xf5 + IFT_PFSYNC = 0xf6 + IFT_PLC = 0xae + IFT_PON155 = 0xcf + IFT_PON622 = 0xd0 + IFT_POS = 0xab + IFT_PPP = 0x17 + IFT_PPPMULTILINKBUNDLE = 0x6c + IFT_PROPATM = 0xc5 + IFT_PROPBWAP2MP = 0xb8 + IFT_PROPCNLS = 0x59 + IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 + IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 + IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PROPWIRELESSP2P = 0x9d + IFT_PTPSERIAL = 0x16 + IFT_PVC = 0xf1 + IFT_Q2931 = 0xc9 + IFT_QLLC = 0x44 + IFT_RADIOMAC = 0xbc + IFT_RADSL = 0x5f + IFT_REACHDSL = 0xc0 + IFT_RFC1483 = 0x9f + IFT_RS232 = 0x21 + IFT_RSRB = 0x4f + IFT_SDLC = 0x11 + IFT_SDSL = 0x60 + IFT_SHDSL = 0xa9 + IFT_SIP = 0x1f + IFT_SIPSIG = 0xcc + IFT_SIPTG = 0xcb + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETOVERHEADCHANNEL = 0xb9 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_SRP = 0x97 + IFT_SS7SIGLINK = 0x9c + IFT_STACKTOSTACK = 0x6f + IFT_STARLAN = 0xb + IFT_STF = 0xd7 + IFT_T1 = 0x12 + IFT_TDLC = 0x74 + IFT_TELINK = 0xc8 + IFT_TERMPAD = 0x5b + IFT_TR008 = 0xb0 + IFT_TRANSPHDLC = 0x7b + IFT_TUNNEL = 0x83 + IFT_ULTRA = 0x1d + IFT_USB = 0xa0 + IFT_V11 = 0x40 + IFT_V35 = 0x2d + IFT_V36 = 0x41 + IFT_V37 = 0x78 + IFT_VDSL = 0x61 + IFT_VIRTUALIPADDRESS = 0x70 + IFT_VIRTUALTG = 0xca + IFT_VOICEDID = 0xd5 + IFT_VOICEEM = 0x64 + IFT_VOICEEMFGD = 0xd3 + IFT_VOICEENCAP = 0x67 + IFT_VOICEFGDEANA = 0xd4 + IFT_VOICEFXO = 0x65 + IFT_VOICEFXS = 0x66 + IFT_VOICEOVERATM = 0x98 + IFT_VOICEOVERCABLE = 0xc6 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25HUNTGROUP = 0x7a + IFT_X25MLP = 0x79 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LOOPBACKNET = 0x7f + IPPROTO_AH = 0x33 + IPPROTO_CARP = 0x70 + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPIP = 0x4 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IPV6_ICMP = 0x3a + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x34 + IPPROTO_MOBILE = 0x37 + IPPROTO_NONE = 0x3b + IPPROTO_PFSYNC = 0xf0 + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPPROTO_VRRP = 0x70 + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_DONTFRAG = 0x3e + IPV6_DSTOPTS = 0x32 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x78 + IPV6_HLIMDEC = 0x1 + IPV6_HOPLIMIT = 0x2f + IPV6_HOPOPTS = 0x31 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXPACKET = 0xffff + IPV6_MMTU = 0x500 + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_NEXTHOP = 0x30 + IPV6_PATHMTU = 0x2c + IPV6_PKTINFO = 0x2e + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVHOPLIMIT = 0x25 + IPV6_RECVHOPOPTS = 0x27 + IPV6_RECVPATHMTU = 0x2b + IPV6_RECVPKTINFO = 0x24 + IPV6_RECVRTHDR = 0x26 + IPV6_RECVTCLASS = 0x39 + IPV6_RTHDR = 0x33 + IPV6_RTHDRDSTOPTS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x3d + IPV6_UNICAST_HOPS = 0x4 + IPV6_USE_MIN_MTU = 0x2a + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0xd + IP_EF = 0x8000 + IP_ERRORMTU = 0x15 + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x16 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINFRAGSIZE = 0x45 + IP_MINTTL = 0x18 + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x1 + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVRETOPTS = 0x6 + IP_RECVTTL = 0x17 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_TOS = 0x3 + IP_TTL = 0x4 + ISIG = 0x80 + ISTRIP = 0x20 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x6 + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_SPACEAVAIL = 0x5 + MADV_WILLNEED = 0x3 + MAP_ALIGNMENT_16MB = 0x18000000 + MAP_ALIGNMENT_1TB = 0x28000000 + MAP_ALIGNMENT_256TB = 0x30000000 + MAP_ALIGNMENT_4GB = 0x20000000 + MAP_ALIGNMENT_64KB = 0x10000000 + MAP_ALIGNMENT_64PB = 0x38000000 + MAP_ALIGNMENT_MASK = -0x1000000 + MAP_ALIGNMENT_SHIFT = 0x18 + MAP_ANON = 0x1000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_HASSEMAPHORE = 0x200 + MAP_INHERIT = 0x80 + MAP_INHERIT_COPY = 0x1 + MAP_INHERIT_DEFAULT = 0x1 + MAP_INHERIT_DONATE_COPY = 0x3 + MAP_INHERIT_NONE = 0x2 + MAP_INHERIT_SHARE = 0x0 + MAP_NORESERVE = 0x40 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_SHARED = 0x1 + MAP_STACK = 0x2000 + MAP_TRYFIXED = 0x400 + MAP_WIRED = 0x800 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_BCAST = 0x100 + MSG_CMSG_CLOEXEC = 0x800 + MSG_CONTROLMBUF = 0x2000000 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOR = 0x8 + MSG_IOVUSRSPACE = 0x4000000 + MSG_LENUSRSPACE = 0x8000000 + MSG_MCAST = 0x200 + MSG_NAMEMBUF = 0x1000000 + MSG_NBIO = 0x1000 + MSG_NOSIGNAL = 0x400 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_TRUNC = 0x10 + MSG_USERFLAGS = 0xffffff + MSG_WAITALL = 0x40 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x2 + MS_SYNC = 0x4 + NAME_MAX = 0x1ff + NET_RT_DUMP = 0x1 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x5 + NET_RT_MAXID = 0x6 + NET_RT_OIFLIST = 0x4 + NET_RT_OOIFLIST = 0x3 + NOFLSH = 0x80000000 + NOTE_ATTRIB = 0x8 + NOTE_CHILD = 0x4 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXTEND = 0x4 + NOTE_FORK = 0x40000000 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_PCTRLMASK = 0xf0000000 + NOTE_PDATAMASK = 0xfffff + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + OFIOGETBMAP = 0xc004667a + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_ALT_IO = 0x40000 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x400000 + O_CREAT = 0x200 + O_DIRECT = 0x80000 + O_DIRECTORY = 0x200000 + O_DSYNC = 0x10000 + O_EXCL = 0x800 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x8000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_NOSIGPIPE = 0x1000000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x20000 + O_SHLOCK = 0x10 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PRI_IOFLUSH = 0x7c + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + RLIMIT_AS = 0xa + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0x9 + RTAX_NETMASK = 0x2 + RTAX_TAG = 0x8 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_NETMASK = 0x4 + RTA_TAG = 0x100 + RTF_ANNOUNCE = 0x20000 + RTF_BLACKHOLE = 0x1000 + RTF_CLONED = 0x2000 + RTF_CLONING = 0x100 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_LLINFO = 0x400 + RTF_MASK = 0x80 + RTF_MODIFIED = 0x20 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_REJECT = 0x8 + RTF_SRC = 0x10000 + RTF_STATIC = 0x800 + RTF_UP = 0x1 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_CHGADDR = 0x15 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_GET = 0x4 + RTM_IEEE80211 = 0x11 + RTM_IFANNOUNCE = 0x10 + RTM_IFINFO = 0x14 + RTM_LLINFO_UPD = 0x13 + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_OIFINFO = 0xf + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_OOIFINFO = 0xe + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_SETGATE = 0x12 + RTM_VERSION = 0x4 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + SCM_CREDS = 0x4 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x8 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80906931 + SIOCADDRT = 0x8030720a + SIOCAIFADDR = 0x8040691a + SIOCALIFADDR = 0x8118691c + SIOCATMARK = 0x40047307 + SIOCDELMULTI = 0x80906932 + SIOCDELRT = 0x8030720b + SIOCDIFADDR = 0x80906919 + SIOCDIFPHYADDR = 0x80906949 + SIOCDLIFADDR = 0x8118691e + SIOCGDRVSPEC = 0xc01c697b + SIOCGETPFSYNC = 0xc09069f8 + SIOCGETSGCNT = 0xc0147534 + SIOCGETVIFCNT = 0xc0147533 + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0906921 + SIOCGIFADDRPREF = 0xc0946920 + SIOCGIFALIAS = 0xc040691b + SIOCGIFBRDADDR = 0xc0906923 + SIOCGIFCAP = 0xc0206976 + SIOCGIFCONF = 0xc0086926 + SIOCGIFDATA = 0xc0946985 + SIOCGIFDLT = 0xc0906977 + SIOCGIFDSTADDR = 0xc0906922 + SIOCGIFFLAGS = 0xc0906911 + SIOCGIFGENERIC = 0xc090693a + SIOCGIFMEDIA = 0xc0286936 + SIOCGIFMETRIC = 0xc0906917 + SIOCGIFMTU = 0xc090697e + SIOCGIFNETMASK = 0xc0906925 + SIOCGIFPDSTADDR = 0xc0906948 + SIOCGIFPSRCADDR = 0xc0906947 + SIOCGLIFADDR = 0xc118691d + SIOCGLIFPHYADDR = 0xc118694b + SIOCGLINKSTR = 0xc01c6987 + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCGVH = 0xc0906983 + SIOCIFCREATE = 0x8090697a + SIOCIFDESTROY = 0x80906979 + SIOCIFGCLONERS = 0xc00c6978 + SIOCINITIFADDR = 0xc0446984 + SIOCSDRVSPEC = 0x801c697b + SIOCSETPFSYNC = 0x809069f7 + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8090690c + SIOCSIFADDRPREF = 0x8094691f + SIOCSIFBRDADDR = 0x80906913 + SIOCSIFCAP = 0x80206975 + SIOCSIFDSTADDR = 0x8090690e + SIOCSIFFLAGS = 0x80906910 + SIOCSIFGENERIC = 0x80906939 + SIOCSIFMEDIA = 0xc0906935 + SIOCSIFMETRIC = 0x80906918 + SIOCSIFMTU = 0x8090697f + SIOCSIFNETMASK = 0x80906916 + SIOCSIFPHYADDR = 0x80406946 + SIOCSLIFPHYADDR = 0x8118694a + SIOCSLINKSTR = 0x801c6988 + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SIOCSVH = 0xc0906982 + SIOCZIFDATA = 0xc0946986 + SOCK_CLOEXEC = 0x10000000 + SOCK_DGRAM = 0x2 + SOCK_FLAGS_MASK = 0xf0000000 + SOCK_NONBLOCK = 0x20000000 + SOCK_NOSIGPIPE = 0x40000000 + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_ACCEPTFILTER = 0x1000 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LINGER = 0x80 + SO_NOHEADER = 0x100a + SO_NOSIGPIPE = 0x800 + SO_OOBINLINE = 0x100 + SO_OVERFLOWED = 0x1009 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x100c + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x100b + SO_TIMESTAMP = 0x2000 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + SYSCTL_VERSION = 0x1000000 + SYSCTL_VERS_0 = 0x0 + SYSCTL_VERS_1 = 0x1000000 + SYSCTL_VERS_MASK = 0xff000000 + S_ARCH1 = 0x10000 + S_ARCH2 = 0x20000 + S_BLKSIZE = 0x200 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IFWHT = 0xe000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISTXT = 0x200 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + S_LOGIN_SET = 0x1 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_CONGCTL = 0x20 + TCP_KEEPCNT = 0x6 + TCP_KEEPIDLE = 0x3 + TCP_KEEPINIT = 0x7 + TCP_KEEPINTVL = 0x5 + TCP_MAXBURST = 0x4 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0x10 + TCP_MINMSS = 0xd8 + TCP_MSS = 0x218 + TCP_NODELAY = 0x1 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDCDTIMESTAMP = 0x400c7458 + TIOCDRAIN = 0x2000745e + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLAG_CDTRCTS = 0x10 + TIOCFLAG_CLOCAL = 0x2 + TIOCFLAG_CRTSCTS = 0x4 + TIOCFLAG_MDMBUF = 0x8 + TIOCFLAG_SOFTCAR = 0x1 + TIOCFLUSH = 0x80047410 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGFLAGS = 0x4004745d + TIOCGLINED = 0x40207442 + TIOCGPGRP = 0x40047477 + TIOCGQSIZE = 0x40047481 + TIOCGRANTPT = 0x20007447 + TIOCGSID = 0x40047463 + TIOCGSIZE = 0x40087468 + TIOCGWINSZ = 0x40087468 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGET = 0x4004746a + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCPTMGET = 0x40287446 + TIOCPTSNAME = 0x40287448 + TIOCRCVFRAME = 0x80047445 + TIOCREMOTE = 0x80047469 + TIOCSBRK = 0x2000747b + TIOCSCTTY = 0x20007461 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSFLAGS = 0x8004745c + TIOCSIG = 0x2000745f + TIOCSLINED = 0x80207443 + TIOCSPGRP = 0x80047476 + TIOCSQSIZE = 0x80047480 + TIOCSSIZE = 0x80087467 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x80047465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCUCNTL = 0x80047466 + TIOCXMTFRAME = 0x80047444 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VTIME = 0x11 + VWERASE = 0x4 + WALL = 0x8 + WALLSIG = 0x8 + WALTSIG = 0x4 + WCLONE = 0x4 + WCOREFLAG = 0x80 + WNOHANG = 0x1 + WNOWAIT = 0x10000 + WNOZOMBIE = 0x20000 + WOPTSCHECKED = 0x40000 + WSTOPPED = 0x7f + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADF = syscall.Errno(0x9) + EBADMSG = syscall.Errno(0x58) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x57) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDOM = syscall.Errno(0x21) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x52) + EILSEQ = syscall.Errno(0x55) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x60) + ELOOP = syscall.Errno(0x3e) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + EMULTIHOP = syscall.Errno(0x5e) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x5d) + ENOBUFS = syscall.Errno(0x37) + ENODATA = syscall.Errno(0x59) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOLINK = syscall.Errno(0x5f) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x53) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x5a) + ENOSTR = syscall.Errno(0x5b) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x56) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x2d) + EOVERFLOW = syscall.Errno(0x54) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x60) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIME = syscall.Errno(0x5c) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGPWR = syscall.Signal(0x20) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large or too small", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol option not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "connection timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "identifier removed", + 83: "no message of desired type", + 84: "value too large to be stored in data type", + 85: "illegal byte sequence", + 86: "not supported", + 87: "operation Canceled", + 88: "bad or Corrupt message", + 89: "no message available", + 90: "no STREAM resources", + 91: "not a STREAM", + 92: "STREAM ioctl timeout", + 93: "attribute not found", + 94: "multihop attempted", + 95: "link has been severed", + 96: "protocol error", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "stopped (signal)", + 18: "stopped", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", + 32: "power fail/restart", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go new file mode 100644 index 0000000..4994437 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go @@ -0,0 +1,1702 @@ +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,netbsd + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m64 _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_ARP = 0x1c + AF_BLUETOOTH = 0x1f + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1a + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x20 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x18 + AF_IPX = 0x17 + AF_ISDN = 0x1a + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x23 + AF_MPLS = 0x21 + AF_NATM = 0x1b + AF_NS = 0x6 + AF_OROUTE = 0x11 + AF_OSI = 0x7 + AF_PUP = 0x4 + AF_ROUTE = 0x22 + AF_SNA = 0xb + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + ARPHRD_ARCNET = 0x7 + ARPHRD_ETHER = 0x1 + ARPHRD_FRELAY = 0xf + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + ARPHRD_STRIP = 0x17 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B460800 = 0x70800 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B921600 = 0xe1000 + B9600 = 0x2580 + BIOCFEEDBACK = 0x8004427d + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc0104277 + BIOCGETIF = 0x4090426b + BIOCGFEEDBACK = 0x4004427c + BIOCGHDRCMPLT = 0x40044274 + BIOCGRTIMEOUT = 0x4010427b + BIOCGSEESENT = 0x40044278 + BIOCGSTATS = 0x4080426f + BIOCGSTATSOLD = 0x4008426f + BIOCIMMEDIATE = 0x80044270 + BIOCPROMISC = 0x20004269 + BIOCSBLEN = 0xc0044266 + BIOCSDLT = 0x80044276 + BIOCSETF = 0x80104267 + BIOCSETIF = 0x8090426c + BIOCSFEEDBACK = 0x8004427d + BIOCSHDRCMPLT = 0x80044275 + BIOCSRTIMEOUT = 0x8010427a + BIOCSSEESENT = 0x80044279 + BIOCSTCPF = 0x80104272 + BIOCSUDPF = 0x80104273 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x8 + BPF_ALIGNMENT32 = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DFLTBUFSIZE = 0x100000 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x1000000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CLONE_CSIGNAL = 0xff + CLONE_FILES = 0x400 + CLONE_FS = 0x200 + CLONE_PID = 0x1000 + CLONE_PTRACE = 0x2000 + CLONE_SIGHAND = 0x800 + CLONE_VFORK = 0x4000 + CLONE_VM = 0x100 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0xc + CTL_NET = 0x4 + CTL_QUERY = -0x2 + DIOCBSFLUSH = 0x20006478 + DLT_A429 = 0xb8 + DLT_A653_ICM = 0xb9 + DLT_AIRONET_HEADER = 0x78 + DLT_AOS = 0xde + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_AX25_KISS = 0xca + DLT_BACNET_MS_TP = 0xa5 + DLT_BLUETOOTH_HCI_H4 = 0xbb + DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 + DLT_CAN20B = 0xbe + DLT_CAN_SOCKETCAN = 0xe3 + DLT_CHAOS = 0x5 + DLT_CISCO_IOS = 0x76 + DLT_C_HDLC = 0x68 + DLT_C_HDLC_WITH_DIR = 0xcd + DLT_DECT = 0xdd + DLT_DOCSIS = 0x8f + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_ERF = 0xc5 + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FC_2 = 0xe0 + DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 + DLT_FDDI = 0xa + DLT_FLEXRAY = 0xd2 + DLT_FRELAY = 0x6b + DLT_FRELAY_WITH_DIR = 0xce + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_GSMTAP_ABIS = 0xda + DLT_GSMTAP_UM = 0xd9 + DLT_HDLC = 0x10 + DLT_HHDLC = 0x79 + DLT_HIPPI = 0xf + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IEEE802_15_4 = 0xc3 + DLT_IEEE802_15_4_LINUX = 0xbf + DLT_IEEE802_15_4_NONASK_PHY = 0xd7 + DLT_IEEE802_16_MAC_CPS = 0xbc + DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 + DLT_IPMB = 0xc7 + DLT_IPMB_LINUX = 0xd1 + DLT_IPNET = 0xe2 + DLT_IPV4 = 0xe4 + DLT_IPV6 = 0xe5 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_ISM = 0xc2 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_JUNIPER_ST = 0xc8 + DLT_JUNIPER_VP = 0xb7 + DLT_LAPB_WITH_DIR = 0xcf + DLT_LAPD = 0xcb + DLT_LIN = 0xd4 + DLT_LINUX_EVDEV = 0xd8 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MFR = 0xb6 + DLT_MOST = 0xd3 + DLT_MPLS = 0xdb + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPI = 0xc0 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0xe + DLT_PPP_ETHER = 0x33 + DLT_PPP_PPPD = 0xa6 + DLT_PPP_SERIAL = 0x32 + DLT_PPP_WITH_DIR = 0xcc + DLT_PRISM_HEADER = 0x77 + DLT_PRONET = 0x4 + DLT_RAIF1 = 0xc6 + DLT_RAW = 0xc + DLT_RAWAF_MASK = 0x2240000 + DLT_RIO = 0x7c + DLT_SCCP = 0x8e + DLT_SITA = 0xc4 + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xd + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + DLT_USB = 0xba + DLT_USB_LINUX = 0xbd + DLT_USB_LINUX_MMAPPED = 0xdc + DLT_WIHART = 0xdf + DLT_X2E_SERIAL = 0xd5 + DLT_X2E_XORAYA = 0xd6 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EMUL_LINUX = 0x1 + EMUL_LINUX32 = 0x5 + EMUL_MAXID = 0x6 + ETHERCAP_JUMBO_MTU = 0x4 + ETHERCAP_VLAN_HWTAGGING = 0x2 + ETHERCAP_VLAN_MTU = 0x1 + ETHERMIN = 0x2e + ETHERMTU = 0x5dc + ETHERMTU_JUMBO = 0x2328 + ETHERTYPE_8023 = 0x4 + ETHERTYPE_AARP = 0x80f3 + ETHERTYPE_ACCTON = 0x8390 + ETHERTYPE_AEONIC = 0x8036 + ETHERTYPE_ALPHA = 0x814a + ETHERTYPE_AMBER = 0x6008 + ETHERTYPE_AMOEBA = 0x8145 + ETHERTYPE_APOLLO = 0x80f7 + ETHERTYPE_APOLLODOMAIN = 0x8019 + ETHERTYPE_APPLETALK = 0x809b + ETHERTYPE_APPLITEK = 0x80c7 + ETHERTYPE_ARGONAUT = 0x803a + ETHERTYPE_ARP = 0x806 + ETHERTYPE_AT = 0x809b + ETHERTYPE_ATALK = 0x809b + ETHERTYPE_ATOMIC = 0x86df + ETHERTYPE_ATT = 0x8069 + ETHERTYPE_ATTSTANFORD = 0x8008 + ETHERTYPE_AUTOPHON = 0x806a + ETHERTYPE_AXIS = 0x8856 + ETHERTYPE_BCLOOP = 0x9003 + ETHERTYPE_BOFL = 0x8102 + ETHERTYPE_CABLETRON = 0x7034 + ETHERTYPE_CHAOS = 0x804 + ETHERTYPE_COMDESIGN = 0x806c + ETHERTYPE_COMPUGRAPHIC = 0x806d + ETHERTYPE_COUNTERPOINT = 0x8062 + ETHERTYPE_CRONUS = 0x8004 + ETHERTYPE_CRONUSVLN = 0x8003 + ETHERTYPE_DCA = 0x1234 + ETHERTYPE_DDE = 0x807b + ETHERTYPE_DEBNI = 0xaaaa + ETHERTYPE_DECAM = 0x8048 + ETHERTYPE_DECCUST = 0x6006 + ETHERTYPE_DECDIAG = 0x6005 + ETHERTYPE_DECDNS = 0x803c + ETHERTYPE_DECDTS = 0x803e + ETHERTYPE_DECEXPER = 0x6000 + ETHERTYPE_DECLAST = 0x8041 + ETHERTYPE_DECLTM = 0x803f + ETHERTYPE_DECMUMPS = 0x6009 + ETHERTYPE_DECNETBIOS = 0x8040 + ETHERTYPE_DELTACON = 0x86de + ETHERTYPE_DIDDLE = 0x4321 + ETHERTYPE_DLOG1 = 0x660 + ETHERTYPE_DLOG2 = 0x661 + ETHERTYPE_DN = 0x6003 + ETHERTYPE_DOGFIGHT = 0x1989 + ETHERTYPE_DSMD = 0x8039 + ETHERTYPE_ECMA = 0x803 + ETHERTYPE_ENCRYPT = 0x803d + ETHERTYPE_ES = 0x805d + ETHERTYPE_EXCELAN = 0x8010 + ETHERTYPE_EXPERDATA = 0x8049 + ETHERTYPE_FLIP = 0x8146 + ETHERTYPE_FLOWCONTROL = 0x8808 + ETHERTYPE_FRARP = 0x808 + ETHERTYPE_GENDYN = 0x8068 + ETHERTYPE_HAYES = 0x8130 + ETHERTYPE_HIPPI_FP = 0x8180 + ETHERTYPE_HITACHI = 0x8820 + ETHERTYPE_HP = 0x8005 + ETHERTYPE_IEEEPUP = 0xa00 + ETHERTYPE_IEEEPUPAT = 0xa01 + ETHERTYPE_IMLBL = 0x4c42 + ETHERTYPE_IMLBLDIAG = 0x424c + ETHERTYPE_IP = 0x800 + ETHERTYPE_IPAS = 0x876c + ETHERTYPE_IPV6 = 0x86dd + ETHERTYPE_IPX = 0x8137 + ETHERTYPE_IPXNEW = 0x8037 + ETHERTYPE_KALPANA = 0x8582 + ETHERTYPE_LANBRIDGE = 0x8038 + ETHERTYPE_LANPROBE = 0x8888 + ETHERTYPE_LAT = 0x6004 + ETHERTYPE_LBACK = 0x9000 + ETHERTYPE_LITTLE = 0x8060 + ETHERTYPE_LOGICRAFT = 0x8148 + ETHERTYPE_LOOPBACK = 0x9000 + ETHERTYPE_MATRA = 0x807a + ETHERTYPE_MAX = 0xffff + ETHERTYPE_MERIT = 0x807c + ETHERTYPE_MICP = 0x873a + ETHERTYPE_MOPDL = 0x6001 + ETHERTYPE_MOPRC = 0x6002 + ETHERTYPE_MOTOROLA = 0x818d + ETHERTYPE_MPLS = 0x8847 + ETHERTYPE_MPLS_MCAST = 0x8848 + ETHERTYPE_MUMPS = 0x813f + ETHERTYPE_NBPCC = 0x3c04 + ETHERTYPE_NBPCLAIM = 0x3c09 + ETHERTYPE_NBPCLREQ = 0x3c05 + ETHERTYPE_NBPCLRSP = 0x3c06 + ETHERTYPE_NBPCREQ = 0x3c02 + ETHERTYPE_NBPCRSP = 0x3c03 + ETHERTYPE_NBPDG = 0x3c07 + ETHERTYPE_NBPDGB = 0x3c08 + ETHERTYPE_NBPDLTE = 0x3c0a + ETHERTYPE_NBPRAR = 0x3c0c + ETHERTYPE_NBPRAS = 0x3c0b + ETHERTYPE_NBPRST = 0x3c0d + ETHERTYPE_NBPSCD = 0x3c01 + ETHERTYPE_NBPVCD = 0x3c00 + ETHERTYPE_NBS = 0x802 + ETHERTYPE_NCD = 0x8149 + ETHERTYPE_NESTAR = 0x8006 + ETHERTYPE_NETBEUI = 0x8191 + ETHERTYPE_NOVELL = 0x8138 + ETHERTYPE_NS = 0x600 + ETHERTYPE_NSAT = 0x601 + ETHERTYPE_NSCOMPAT = 0x807 + ETHERTYPE_NTRAILER = 0x10 + ETHERTYPE_OS9 = 0x7007 + ETHERTYPE_OS9NET = 0x7009 + ETHERTYPE_PACER = 0x80c6 + ETHERTYPE_PAE = 0x888e + ETHERTYPE_PCS = 0x4242 + ETHERTYPE_PLANNING = 0x8044 + ETHERTYPE_PPP = 0x880b + ETHERTYPE_PPPOE = 0x8864 + ETHERTYPE_PPPOEDISC = 0x8863 + ETHERTYPE_PRIMENTS = 0x7031 + ETHERTYPE_PUP = 0x200 + ETHERTYPE_PUPAT = 0x200 + ETHERTYPE_RACAL = 0x7030 + ETHERTYPE_RATIONAL = 0x8150 + ETHERTYPE_RAWFR = 0x6559 + ETHERTYPE_RCL = 0x1995 + ETHERTYPE_RDP = 0x8739 + ETHERTYPE_RETIX = 0x80f2 + ETHERTYPE_REVARP = 0x8035 + ETHERTYPE_SCA = 0x6007 + ETHERTYPE_SECTRA = 0x86db + ETHERTYPE_SECUREDATA = 0x876d + ETHERTYPE_SGITW = 0x817e + ETHERTYPE_SG_BOUNCE = 0x8016 + ETHERTYPE_SG_DIAG = 0x8013 + ETHERTYPE_SG_NETGAMES = 0x8014 + ETHERTYPE_SG_RESV = 0x8015 + ETHERTYPE_SIMNET = 0x5208 + ETHERTYPE_SLOWPROTOCOLS = 0x8809 + ETHERTYPE_SNA = 0x80d5 + ETHERTYPE_SNMP = 0x814c + ETHERTYPE_SONIX = 0xfaf5 + ETHERTYPE_SPIDER = 0x809f + ETHERTYPE_SPRITE = 0x500 + ETHERTYPE_STP = 0x8181 + ETHERTYPE_TALARIS = 0x812b + ETHERTYPE_TALARISMC = 0x852b + ETHERTYPE_TCPCOMP = 0x876b + ETHERTYPE_TCPSM = 0x9002 + ETHERTYPE_TEC = 0x814f + ETHERTYPE_TIGAN = 0x802f + ETHERTYPE_TRAIL = 0x1000 + ETHERTYPE_TRANSETHER = 0x6558 + ETHERTYPE_TYMSHARE = 0x802e + ETHERTYPE_UBBST = 0x7005 + ETHERTYPE_UBDEBUG = 0x900 + ETHERTYPE_UBDIAGLOOP = 0x7002 + ETHERTYPE_UBDL = 0x7000 + ETHERTYPE_UBNIU = 0x7001 + ETHERTYPE_UBNMC = 0x7003 + ETHERTYPE_VALID = 0x1600 + ETHERTYPE_VARIAN = 0x80dd + ETHERTYPE_VAXELN = 0x803b + ETHERTYPE_VEECO = 0x8067 + ETHERTYPE_VEXP = 0x805b + ETHERTYPE_VGLAB = 0x8131 + ETHERTYPE_VINES = 0xbad + ETHERTYPE_VINESECHO = 0xbaf + ETHERTYPE_VINESLOOP = 0xbae + ETHERTYPE_VITAL = 0xff00 + ETHERTYPE_VLAN = 0x8100 + ETHERTYPE_VLTLMAN = 0x8080 + ETHERTYPE_VPROD = 0x805c + ETHERTYPE_VURESERVED = 0x8147 + ETHERTYPE_WATERLOO = 0x8130 + ETHERTYPE_WELLFLEET = 0x8103 + ETHERTYPE_X25 = 0x805 + ETHERTYPE_X75 = 0x801 + ETHERTYPE_XNSSM = 0x9001 + ETHERTYPE_XTP = 0x817d + ETHER_ADDR_LEN = 0x6 + ETHER_CRC_LEN = 0x4 + ETHER_CRC_POLY_BE = 0x4c11db6 + ETHER_CRC_POLY_LE = 0xedb88320 + ETHER_HDR_LEN = 0xe + ETHER_MAX_LEN = 0x5ee + ETHER_MAX_LEN_JUMBO = 0x233a + ETHER_MIN_LEN = 0x40 + ETHER_PPPOE_ENCAP_LEN = 0x8 + ETHER_TYPE_LEN = 0x2 + ETHER_VLAN_ENCAP_LEN = 0x4 + EVFILT_AIO = 0x2 + EVFILT_PROC = 0x4 + EVFILT_READ = 0x0 + EVFILT_SIGNAL = 0x5 + EVFILT_SYSCOUNT = 0x7 + EVFILT_TIMER = 0x6 + EVFILT_VNODE = 0x3 + EVFILT_WRITE = 0x1 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x100 + FLUSHO = 0x800000 + F_CLOSEM = 0xa + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0xc + F_FSCTL = -0x80000000 + F_FSDIRMASK = 0x70000000 + F_FSIN = 0x10000000 + F_FSINOUT = 0x30000000 + F_FSOUT = 0x20000000 + F_FSPRIV = 0x8000 + F_FSVOID = 0x40000000 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0x7 + F_GETNOSIGPIPE = 0xd + F_GETOWN = 0x5 + F_MAXFD = 0xb + F_OK = 0x0 + F_PARAM_MASK = 0xfff + F_PARAM_MAX = 0xfff + F_RDLCK = 0x1 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x8 + F_SETLKW = 0x9 + F_SETNOSIGPIPE = 0xe + F_SETOWN = 0x6 + F_UNLCK = 0x2 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFAN_ARRIVAL = 0x0 + IFAN_DEPARTURE = 0x1 + IFA_ROUTE = 0x1 + IFF_ALLMULTI = 0x200 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x8f52 + IFF_DEBUG = 0x4 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_A12MPPSWITCH = 0x82 + IFT_AAL2 = 0xbb + IFT_AAL5 = 0x31 + IFT_ADSL = 0x5e + IFT_AFLANE8023 = 0x3b + IFT_AFLANE8025 = 0x3c + IFT_ARAP = 0x58 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ASYNC = 0x54 + IFT_ATM = 0x25 + IFT_ATMDXI = 0x69 + IFT_ATMFUNI = 0x6a + IFT_ATMIMA = 0x6b + IFT_ATMLOGICAL = 0x50 + IFT_ATMRADIO = 0xbd + IFT_ATMSUBINTERFACE = 0x86 + IFT_ATMVCIENDPT = 0xc2 + IFT_ATMVIRTUAL = 0x95 + IFT_BGPPOLICYACCOUNTING = 0xa2 + IFT_BRIDGE = 0xd1 + IFT_BSC = 0x53 + IFT_CARP = 0xf8 + IFT_CCTEMUL = 0x3d + IFT_CEPT = 0x13 + IFT_CES = 0x85 + IFT_CHANNEL = 0x46 + IFT_CNR = 0x55 + IFT_COFFEE = 0x84 + IFT_COMPOSITELINK = 0x9b + IFT_DCN = 0x8d + IFT_DIGITALPOWERLINE = 0x8a + IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba + IFT_DLSW = 0x4a + IFT_DOCSCABLEDOWNSTREAM = 0x80 + IFT_DOCSCABLEMACLAYER = 0x7f + IFT_DOCSCABLEUPSTREAM = 0x81 + IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd + IFT_DS0 = 0x51 + IFT_DS0BUNDLE = 0x52 + IFT_DS1FDL = 0xaa + IFT_DS3 = 0x1e + IFT_DTM = 0x8c + IFT_DVBASILN = 0xac + IFT_DVBASIOUT = 0xad + IFT_DVBRCCDOWNSTREAM = 0x93 + IFT_DVBRCCMACLAYER = 0x92 + IFT_DVBRCCUPSTREAM = 0x94 + IFT_ECONET = 0xce + IFT_EON = 0x19 + IFT_EPLRS = 0x57 + IFT_ESCON = 0x49 + IFT_ETHER = 0x6 + IFT_FAITH = 0xf2 + IFT_FAST = 0x7d + IFT_FASTETHER = 0x3e + IFT_FASTETHERFX = 0x45 + IFT_FDDI = 0xf + IFT_FIBRECHANNEL = 0x38 + IFT_FRAMERELAYINTERCONNECT = 0x3a + IFT_FRAMERELAYMPI = 0x5c + IFT_FRDLCIENDPT = 0xc1 + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_FRF16MFRBUNDLE = 0xa3 + IFT_FRFORWARD = 0x9e + IFT_G703AT2MB = 0x43 + IFT_G703AT64K = 0x42 + IFT_GIF = 0xf0 + IFT_GIGABITETHERNET = 0x75 + IFT_GR303IDT = 0xb2 + IFT_GR303RDT = 0xb1 + IFT_H323GATEKEEPER = 0xa4 + IFT_H323PROXY = 0xa5 + IFT_HDH1822 = 0x3 + IFT_HDLC = 0x76 + IFT_HDSL2 = 0xa8 + IFT_HIPERLAN2 = 0xb7 + IFT_HIPPI = 0x2f + IFT_HIPPIINTERFACE = 0x39 + IFT_HOSTPAD = 0x5a + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IBM370PARCHAN = 0x48 + IFT_IDSL = 0x9a + IFT_IEEE1394 = 0x90 + IFT_IEEE80211 = 0x47 + IFT_IEEE80212 = 0x37 + IFT_IEEE8023ADLAG = 0xa1 + IFT_IFGSN = 0x91 + IFT_IMT = 0xbe + IFT_INFINIBAND = 0xc7 + IFT_INTERLEAVE = 0x7c + IFT_IP = 0x7e + IFT_IPFORWARD = 0x8e + IFT_IPOVERATM = 0x72 + IFT_IPOVERCDLC = 0x6d + IFT_IPOVERCLAW = 0x6e + IFT_IPSWITCH = 0x4e + IFT_ISDN = 0x3f + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISDNS = 0x4b + IFT_ISDNU = 0x4c + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88025CRFPINT = 0x62 + IFT_ISO88025DTR = 0x56 + IFT_ISO88025FIBER = 0x73 + IFT_ISO88026 = 0xa + IFT_ISUP = 0xb3 + IFT_L2VLAN = 0x87 + IFT_L3IPVLAN = 0x88 + IFT_L3IPXVLAN = 0x89 + IFT_LAPB = 0x10 + IFT_LAPD = 0x4d + IFT_LAPF = 0x77 + IFT_LINEGROUP = 0xd2 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_MPC = 0x71 + IFT_MPLS = 0xa6 + IFT_MPLSTUNNEL = 0x96 + IFT_MSDSL = 0x8f + IFT_MVL = 0xbf + IFT_MYRINET = 0x63 + IFT_NFAS = 0xaf + IFT_NSIP = 0x1b + IFT_OPTICALCHANNEL = 0xc3 + IFT_OPTICALTRANSPORT = 0xc4 + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PFLOG = 0xf5 + IFT_PFSYNC = 0xf6 + IFT_PLC = 0xae + IFT_PON155 = 0xcf + IFT_PON622 = 0xd0 + IFT_POS = 0xab + IFT_PPP = 0x17 + IFT_PPPMULTILINKBUNDLE = 0x6c + IFT_PROPATM = 0xc5 + IFT_PROPBWAP2MP = 0xb8 + IFT_PROPCNLS = 0x59 + IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 + IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 + IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PROPWIRELESSP2P = 0x9d + IFT_PTPSERIAL = 0x16 + IFT_PVC = 0xf1 + IFT_Q2931 = 0xc9 + IFT_QLLC = 0x44 + IFT_RADIOMAC = 0xbc + IFT_RADSL = 0x5f + IFT_REACHDSL = 0xc0 + IFT_RFC1483 = 0x9f + IFT_RS232 = 0x21 + IFT_RSRB = 0x4f + IFT_SDLC = 0x11 + IFT_SDSL = 0x60 + IFT_SHDSL = 0xa9 + IFT_SIP = 0x1f + IFT_SIPSIG = 0xcc + IFT_SIPTG = 0xcb + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETOVERHEADCHANNEL = 0xb9 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_SRP = 0x97 + IFT_SS7SIGLINK = 0x9c + IFT_STACKTOSTACK = 0x6f + IFT_STARLAN = 0xb + IFT_STF = 0xd7 + IFT_T1 = 0x12 + IFT_TDLC = 0x74 + IFT_TELINK = 0xc8 + IFT_TERMPAD = 0x5b + IFT_TR008 = 0xb0 + IFT_TRANSPHDLC = 0x7b + IFT_TUNNEL = 0x83 + IFT_ULTRA = 0x1d + IFT_USB = 0xa0 + IFT_V11 = 0x40 + IFT_V35 = 0x2d + IFT_V36 = 0x41 + IFT_V37 = 0x78 + IFT_VDSL = 0x61 + IFT_VIRTUALIPADDRESS = 0x70 + IFT_VIRTUALTG = 0xca + IFT_VOICEDID = 0xd5 + IFT_VOICEEM = 0x64 + IFT_VOICEEMFGD = 0xd3 + IFT_VOICEENCAP = 0x67 + IFT_VOICEFGDEANA = 0xd4 + IFT_VOICEFXO = 0x65 + IFT_VOICEFXS = 0x66 + IFT_VOICEOVERATM = 0x98 + IFT_VOICEOVERCABLE = 0xc6 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25HUNTGROUP = 0x7a + IFT_X25MLP = 0x79 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LOOPBACKNET = 0x7f + IPPROTO_AH = 0x33 + IPPROTO_CARP = 0x70 + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPIP = 0x4 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IPV6_ICMP = 0x3a + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x34 + IPPROTO_MOBILE = 0x37 + IPPROTO_NONE = 0x3b + IPPROTO_PFSYNC = 0xf0 + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPPROTO_VRRP = 0x70 + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_DONTFRAG = 0x3e + IPV6_DSTOPTS = 0x32 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x78 + IPV6_HLIMDEC = 0x1 + IPV6_HOPLIMIT = 0x2f + IPV6_HOPOPTS = 0x31 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXPACKET = 0xffff + IPV6_MMTU = 0x500 + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_NEXTHOP = 0x30 + IPV6_PATHMTU = 0x2c + IPV6_PKTINFO = 0x2e + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVHOPLIMIT = 0x25 + IPV6_RECVHOPOPTS = 0x27 + IPV6_RECVPATHMTU = 0x2b + IPV6_RECVPKTINFO = 0x24 + IPV6_RECVRTHDR = 0x26 + IPV6_RECVTCLASS = 0x39 + IPV6_RTHDR = 0x33 + IPV6_RTHDRDSTOPTS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x3d + IPV6_UNICAST_HOPS = 0x4 + IPV6_USE_MIN_MTU = 0x2a + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0xd + IP_EF = 0x8000 + IP_ERRORMTU = 0x15 + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x16 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINFRAGSIZE = 0x45 + IP_MINTTL = 0x18 + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x1 + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVRETOPTS = 0x6 + IP_RECVTTL = 0x17 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_TOS = 0x3 + IP_TTL = 0x4 + ISIG = 0x80 + ISTRIP = 0x20 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x6 + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_SPACEAVAIL = 0x5 + MADV_WILLNEED = 0x3 + MAP_ALIGNMENT_16MB = 0x18000000 + MAP_ALIGNMENT_1TB = 0x28000000 + MAP_ALIGNMENT_256TB = 0x30000000 + MAP_ALIGNMENT_4GB = 0x20000000 + MAP_ALIGNMENT_64KB = 0x10000000 + MAP_ALIGNMENT_64PB = 0x38000000 + MAP_ALIGNMENT_MASK = -0x1000000 + MAP_ALIGNMENT_SHIFT = 0x18 + MAP_ANON = 0x1000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_HASSEMAPHORE = 0x200 + MAP_INHERIT = 0x80 + MAP_INHERIT_COPY = 0x1 + MAP_INHERIT_DEFAULT = 0x1 + MAP_INHERIT_DONATE_COPY = 0x3 + MAP_INHERIT_NONE = 0x2 + MAP_INHERIT_SHARE = 0x0 + MAP_NORESERVE = 0x40 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_SHARED = 0x1 + MAP_STACK = 0x2000 + MAP_TRYFIXED = 0x400 + MAP_WIRED = 0x800 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_BCAST = 0x100 + MSG_CMSG_CLOEXEC = 0x800 + MSG_CONTROLMBUF = 0x2000000 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOR = 0x8 + MSG_IOVUSRSPACE = 0x4000000 + MSG_LENUSRSPACE = 0x8000000 + MSG_MCAST = 0x200 + MSG_NAMEMBUF = 0x1000000 + MSG_NBIO = 0x1000 + MSG_NOSIGNAL = 0x400 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_TRUNC = 0x10 + MSG_USERFLAGS = 0xffffff + MSG_WAITALL = 0x40 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x2 + MS_SYNC = 0x4 + NAME_MAX = 0x1ff + NET_RT_DUMP = 0x1 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x5 + NET_RT_MAXID = 0x6 + NET_RT_OIFLIST = 0x4 + NET_RT_OOIFLIST = 0x3 + NOFLSH = 0x80000000 + NOTE_ATTRIB = 0x8 + NOTE_CHILD = 0x4 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXTEND = 0x4 + NOTE_FORK = 0x40000000 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_PCTRLMASK = 0xf0000000 + NOTE_PDATAMASK = 0xfffff + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + OFIOGETBMAP = 0xc004667a + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_ALT_IO = 0x40000 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x400000 + O_CREAT = 0x200 + O_DIRECT = 0x80000 + O_DIRECTORY = 0x200000 + O_DSYNC = 0x10000 + O_EXCL = 0x800 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x8000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_NOSIGPIPE = 0x1000000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x20000 + O_SHLOCK = 0x10 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PRI_IOFLUSH = 0x7c + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + RLIMIT_AS = 0xa + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0x9 + RTAX_NETMASK = 0x2 + RTAX_TAG = 0x8 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_NETMASK = 0x4 + RTA_TAG = 0x100 + RTF_ANNOUNCE = 0x20000 + RTF_BLACKHOLE = 0x1000 + RTF_CLONED = 0x2000 + RTF_CLONING = 0x100 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_LLINFO = 0x400 + RTF_MASK = 0x80 + RTF_MODIFIED = 0x20 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_REJECT = 0x8 + RTF_SRC = 0x10000 + RTF_STATIC = 0x800 + RTF_UP = 0x1 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_CHGADDR = 0x15 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_GET = 0x4 + RTM_IEEE80211 = 0x11 + RTM_IFANNOUNCE = 0x10 + RTM_IFINFO = 0x14 + RTM_LLINFO_UPD = 0x13 + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_OIFINFO = 0xf + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_OOIFINFO = 0xe + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_SETGATE = 0x12 + RTM_VERSION = 0x4 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + SCM_CREDS = 0x4 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x8 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80906931 + SIOCADDRT = 0x8038720a + SIOCAIFADDR = 0x8040691a + SIOCALIFADDR = 0x8118691c + SIOCATMARK = 0x40047307 + SIOCDELMULTI = 0x80906932 + SIOCDELRT = 0x8038720b + SIOCDIFADDR = 0x80906919 + SIOCDIFPHYADDR = 0x80906949 + SIOCDLIFADDR = 0x8118691e + SIOCGDRVSPEC = 0xc028697b + SIOCGETPFSYNC = 0xc09069f8 + SIOCGETSGCNT = 0xc0207534 + SIOCGETVIFCNT = 0xc0287533 + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0906921 + SIOCGIFADDRPREF = 0xc0986920 + SIOCGIFALIAS = 0xc040691b + SIOCGIFBRDADDR = 0xc0906923 + SIOCGIFCAP = 0xc0206976 + SIOCGIFCONF = 0xc0106926 + SIOCGIFDATA = 0xc0986985 + SIOCGIFDLT = 0xc0906977 + SIOCGIFDSTADDR = 0xc0906922 + SIOCGIFFLAGS = 0xc0906911 + SIOCGIFGENERIC = 0xc090693a + SIOCGIFMEDIA = 0xc0306936 + SIOCGIFMETRIC = 0xc0906917 + SIOCGIFMTU = 0xc090697e + SIOCGIFNETMASK = 0xc0906925 + SIOCGIFPDSTADDR = 0xc0906948 + SIOCGIFPSRCADDR = 0xc0906947 + SIOCGLIFADDR = 0xc118691d + SIOCGLIFPHYADDR = 0xc118694b + SIOCGLINKSTR = 0xc0286987 + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCGVH = 0xc0906983 + SIOCIFCREATE = 0x8090697a + SIOCIFDESTROY = 0x80906979 + SIOCIFGCLONERS = 0xc0106978 + SIOCINITIFADDR = 0xc0706984 + SIOCSDRVSPEC = 0x8028697b + SIOCSETPFSYNC = 0x809069f7 + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8090690c + SIOCSIFADDRPREF = 0x8098691f + SIOCSIFBRDADDR = 0x80906913 + SIOCSIFCAP = 0x80206975 + SIOCSIFDSTADDR = 0x8090690e + SIOCSIFFLAGS = 0x80906910 + SIOCSIFGENERIC = 0x80906939 + SIOCSIFMEDIA = 0xc0906935 + SIOCSIFMETRIC = 0x80906918 + SIOCSIFMTU = 0x8090697f + SIOCSIFNETMASK = 0x80906916 + SIOCSIFPHYADDR = 0x80406946 + SIOCSLIFPHYADDR = 0x8118694a + SIOCSLINKSTR = 0x80286988 + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SIOCSVH = 0xc0906982 + SIOCZIFDATA = 0xc0986986 + SOCK_CLOEXEC = 0x10000000 + SOCK_DGRAM = 0x2 + SOCK_FLAGS_MASK = 0xf0000000 + SOCK_NONBLOCK = 0x20000000 + SOCK_NOSIGPIPE = 0x40000000 + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_ACCEPTFILTER = 0x1000 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LINGER = 0x80 + SO_NOHEADER = 0x100a + SO_NOSIGPIPE = 0x800 + SO_OOBINLINE = 0x100 + SO_OVERFLOWED = 0x1009 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x100c + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x100b + SO_TIMESTAMP = 0x2000 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + SYSCTL_VERSION = 0x1000000 + SYSCTL_VERS_0 = 0x0 + SYSCTL_VERS_1 = 0x1000000 + SYSCTL_VERS_MASK = 0xff000000 + S_ARCH1 = 0x10000 + S_ARCH2 = 0x20000 + S_BLKSIZE = 0x200 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IFWHT = 0xe000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISTXT = 0x200 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + S_LOGIN_SET = 0x1 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_CONGCTL = 0x20 + TCP_KEEPCNT = 0x6 + TCP_KEEPIDLE = 0x3 + TCP_KEEPINIT = 0x7 + TCP_KEEPINTVL = 0x5 + TCP_MAXBURST = 0x4 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0x10 + TCP_MINMSS = 0xd8 + TCP_MSS = 0x218 + TCP_NODELAY = 0x1 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDCDTIMESTAMP = 0x40107458 + TIOCDRAIN = 0x2000745e + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLAG_CDTRCTS = 0x10 + TIOCFLAG_CLOCAL = 0x2 + TIOCFLAG_CRTSCTS = 0x4 + TIOCFLAG_MDMBUF = 0x8 + TIOCFLAG_SOFTCAR = 0x1 + TIOCFLUSH = 0x80047410 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGFLAGS = 0x4004745d + TIOCGLINED = 0x40207442 + TIOCGPGRP = 0x40047477 + TIOCGQSIZE = 0x40047481 + TIOCGRANTPT = 0x20007447 + TIOCGSID = 0x40047463 + TIOCGSIZE = 0x40087468 + TIOCGWINSZ = 0x40087468 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGET = 0x4004746a + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCPTMGET = 0x40287446 + TIOCPTSNAME = 0x40287448 + TIOCRCVFRAME = 0x80087445 + TIOCREMOTE = 0x80047469 + TIOCSBRK = 0x2000747b + TIOCSCTTY = 0x20007461 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSFLAGS = 0x8004745c + TIOCSIG = 0x2000745f + TIOCSLINED = 0x80207443 + TIOCSPGRP = 0x80047476 + TIOCSQSIZE = 0x80047480 + TIOCSSIZE = 0x80087467 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x80047465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCUCNTL = 0x80047466 + TIOCXMTFRAME = 0x80087444 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VTIME = 0x11 + VWERASE = 0x4 + WALL = 0x8 + WALLSIG = 0x8 + WALTSIG = 0x4 + WCLONE = 0x4 + WCOREFLAG = 0x80 + WNOHANG = 0x1 + WNOWAIT = 0x10000 + WNOZOMBIE = 0x20000 + WOPTSCHECKED = 0x40000 + WSTOPPED = 0x7f + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADF = syscall.Errno(0x9) + EBADMSG = syscall.Errno(0x58) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x57) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDOM = syscall.Errno(0x21) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x52) + EILSEQ = syscall.Errno(0x55) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x60) + ELOOP = syscall.Errno(0x3e) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + EMULTIHOP = syscall.Errno(0x5e) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x5d) + ENOBUFS = syscall.Errno(0x37) + ENODATA = syscall.Errno(0x59) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOLINK = syscall.Errno(0x5f) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x53) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x5a) + ENOSTR = syscall.Errno(0x5b) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x56) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x2d) + EOVERFLOW = syscall.Errno(0x54) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x60) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIME = syscall.Errno(0x5c) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGPWR = syscall.Signal(0x20) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large or too small", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol option not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "connection timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "identifier removed", + 83: "no message of desired type", + 84: "value too large to be stored in data type", + 85: "illegal byte sequence", + 86: "not supported", + 87: "operation Canceled", + 88: "bad or Corrupt message", + 89: "no message available", + 90: "no STREAM resources", + 91: "not a STREAM", + 92: "STREAM ioctl timeout", + 93: "attribute not found", + 94: "multihop attempted", + 95: "link has been severed", + 96: "protocol error", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "stopped (signal)", + 18: "stopped", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", + 32: "power fail/restart", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go new file mode 100644 index 0000000..ac85ca6 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go @@ -0,0 +1,1688 @@ +// mkerrors.sh -marm +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build arm,netbsd + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -marm _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_ARP = 0x1c + AF_BLUETOOTH = 0x1f + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1a + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x20 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x18 + AF_IPX = 0x17 + AF_ISDN = 0x1a + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x23 + AF_MPLS = 0x21 + AF_NATM = 0x1b + AF_NS = 0x6 + AF_OROUTE = 0x11 + AF_OSI = 0x7 + AF_PUP = 0x4 + AF_ROUTE = 0x22 + AF_SNA = 0xb + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + ARPHRD_ARCNET = 0x7 + ARPHRD_ETHER = 0x1 + ARPHRD_FRELAY = 0xf + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + ARPHRD_STRIP = 0x17 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B460800 = 0x70800 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B921600 = 0xe1000 + B9600 = 0x2580 + BIOCFEEDBACK = 0x8004427d + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc0084277 + BIOCGETIF = 0x4090426b + BIOCGFEEDBACK = 0x4004427c + BIOCGHDRCMPLT = 0x40044274 + BIOCGRTIMEOUT = 0x400c427b + BIOCGSEESENT = 0x40044278 + BIOCGSTATS = 0x4080426f + BIOCGSTATSOLD = 0x4008426f + BIOCIMMEDIATE = 0x80044270 + BIOCPROMISC = 0x20004269 + BIOCSBLEN = 0xc0044266 + BIOCSDLT = 0x80044276 + BIOCSETF = 0x80084267 + BIOCSETIF = 0x8090426c + BIOCSFEEDBACK = 0x8004427d + BIOCSHDRCMPLT = 0x80044275 + BIOCSRTIMEOUT = 0x800c427a + BIOCSSEESENT = 0x80044279 + BIOCSTCPF = 0x80084272 + BIOCSUDPF = 0x80084273 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALIGNMENT32 = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DFLTBUFSIZE = 0x100000 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x1000000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0xc + CTL_NET = 0x4 + CTL_QUERY = -0x2 + DIOCBSFLUSH = 0x20006478 + DLT_A429 = 0xb8 + DLT_A653_ICM = 0xb9 + DLT_AIRONET_HEADER = 0x78 + DLT_AOS = 0xde + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_AX25_KISS = 0xca + DLT_BACNET_MS_TP = 0xa5 + DLT_BLUETOOTH_HCI_H4 = 0xbb + DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 + DLT_CAN20B = 0xbe + DLT_CAN_SOCKETCAN = 0xe3 + DLT_CHAOS = 0x5 + DLT_CISCO_IOS = 0x76 + DLT_C_HDLC = 0x68 + DLT_C_HDLC_WITH_DIR = 0xcd + DLT_DECT = 0xdd + DLT_DOCSIS = 0x8f + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_ERF = 0xc5 + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FC_2 = 0xe0 + DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 + DLT_FDDI = 0xa + DLT_FLEXRAY = 0xd2 + DLT_FRELAY = 0x6b + DLT_FRELAY_WITH_DIR = 0xce + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_GSMTAP_ABIS = 0xda + DLT_GSMTAP_UM = 0xd9 + DLT_HDLC = 0x10 + DLT_HHDLC = 0x79 + DLT_HIPPI = 0xf + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IEEE802_15_4 = 0xc3 + DLT_IEEE802_15_4_LINUX = 0xbf + DLT_IEEE802_15_4_NONASK_PHY = 0xd7 + DLT_IEEE802_16_MAC_CPS = 0xbc + DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 + DLT_IPMB = 0xc7 + DLT_IPMB_LINUX = 0xd1 + DLT_IPNET = 0xe2 + DLT_IPV4 = 0xe4 + DLT_IPV6 = 0xe5 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_ISM = 0xc2 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_JUNIPER_ST = 0xc8 + DLT_JUNIPER_VP = 0xb7 + DLT_LAPB_WITH_DIR = 0xcf + DLT_LAPD = 0xcb + DLT_LIN = 0xd4 + DLT_LINUX_EVDEV = 0xd8 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MFR = 0xb6 + DLT_MOST = 0xd3 + DLT_MPLS = 0xdb + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPI = 0xc0 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0xe + DLT_PPP_ETHER = 0x33 + DLT_PPP_PPPD = 0xa6 + DLT_PPP_SERIAL = 0x32 + DLT_PPP_WITH_DIR = 0xcc + DLT_PRISM_HEADER = 0x77 + DLT_PRONET = 0x4 + DLT_RAIF1 = 0xc6 + DLT_RAW = 0xc + DLT_RAWAF_MASK = 0x2240000 + DLT_RIO = 0x7c + DLT_SCCP = 0x8e + DLT_SITA = 0xc4 + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xd + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + DLT_USB = 0xba + DLT_USB_LINUX = 0xbd + DLT_USB_LINUX_MMAPPED = 0xdc + DLT_WIHART = 0xdf + DLT_X2E_SERIAL = 0xd5 + DLT_X2E_XORAYA = 0xd6 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EMUL_LINUX = 0x1 + EMUL_LINUX32 = 0x5 + EMUL_MAXID = 0x6 + ETHERCAP_JUMBO_MTU = 0x4 + ETHERCAP_VLAN_HWTAGGING = 0x2 + ETHERCAP_VLAN_MTU = 0x1 + ETHERMIN = 0x2e + ETHERMTU = 0x5dc + ETHERMTU_JUMBO = 0x2328 + ETHERTYPE_8023 = 0x4 + ETHERTYPE_AARP = 0x80f3 + ETHERTYPE_ACCTON = 0x8390 + ETHERTYPE_AEONIC = 0x8036 + ETHERTYPE_ALPHA = 0x814a + ETHERTYPE_AMBER = 0x6008 + ETHERTYPE_AMOEBA = 0x8145 + ETHERTYPE_APOLLO = 0x80f7 + ETHERTYPE_APOLLODOMAIN = 0x8019 + ETHERTYPE_APPLETALK = 0x809b + ETHERTYPE_APPLITEK = 0x80c7 + ETHERTYPE_ARGONAUT = 0x803a + ETHERTYPE_ARP = 0x806 + ETHERTYPE_AT = 0x809b + ETHERTYPE_ATALK = 0x809b + ETHERTYPE_ATOMIC = 0x86df + ETHERTYPE_ATT = 0x8069 + ETHERTYPE_ATTSTANFORD = 0x8008 + ETHERTYPE_AUTOPHON = 0x806a + ETHERTYPE_AXIS = 0x8856 + ETHERTYPE_BCLOOP = 0x9003 + ETHERTYPE_BOFL = 0x8102 + ETHERTYPE_CABLETRON = 0x7034 + ETHERTYPE_CHAOS = 0x804 + ETHERTYPE_COMDESIGN = 0x806c + ETHERTYPE_COMPUGRAPHIC = 0x806d + ETHERTYPE_COUNTERPOINT = 0x8062 + ETHERTYPE_CRONUS = 0x8004 + ETHERTYPE_CRONUSVLN = 0x8003 + ETHERTYPE_DCA = 0x1234 + ETHERTYPE_DDE = 0x807b + ETHERTYPE_DEBNI = 0xaaaa + ETHERTYPE_DECAM = 0x8048 + ETHERTYPE_DECCUST = 0x6006 + ETHERTYPE_DECDIAG = 0x6005 + ETHERTYPE_DECDNS = 0x803c + ETHERTYPE_DECDTS = 0x803e + ETHERTYPE_DECEXPER = 0x6000 + ETHERTYPE_DECLAST = 0x8041 + ETHERTYPE_DECLTM = 0x803f + ETHERTYPE_DECMUMPS = 0x6009 + ETHERTYPE_DECNETBIOS = 0x8040 + ETHERTYPE_DELTACON = 0x86de + ETHERTYPE_DIDDLE = 0x4321 + ETHERTYPE_DLOG1 = 0x660 + ETHERTYPE_DLOG2 = 0x661 + ETHERTYPE_DN = 0x6003 + ETHERTYPE_DOGFIGHT = 0x1989 + ETHERTYPE_DSMD = 0x8039 + ETHERTYPE_ECMA = 0x803 + ETHERTYPE_ENCRYPT = 0x803d + ETHERTYPE_ES = 0x805d + ETHERTYPE_EXCELAN = 0x8010 + ETHERTYPE_EXPERDATA = 0x8049 + ETHERTYPE_FLIP = 0x8146 + ETHERTYPE_FLOWCONTROL = 0x8808 + ETHERTYPE_FRARP = 0x808 + ETHERTYPE_GENDYN = 0x8068 + ETHERTYPE_HAYES = 0x8130 + ETHERTYPE_HIPPI_FP = 0x8180 + ETHERTYPE_HITACHI = 0x8820 + ETHERTYPE_HP = 0x8005 + ETHERTYPE_IEEEPUP = 0xa00 + ETHERTYPE_IEEEPUPAT = 0xa01 + ETHERTYPE_IMLBL = 0x4c42 + ETHERTYPE_IMLBLDIAG = 0x424c + ETHERTYPE_IP = 0x800 + ETHERTYPE_IPAS = 0x876c + ETHERTYPE_IPV6 = 0x86dd + ETHERTYPE_IPX = 0x8137 + ETHERTYPE_IPXNEW = 0x8037 + ETHERTYPE_KALPANA = 0x8582 + ETHERTYPE_LANBRIDGE = 0x8038 + ETHERTYPE_LANPROBE = 0x8888 + ETHERTYPE_LAT = 0x6004 + ETHERTYPE_LBACK = 0x9000 + ETHERTYPE_LITTLE = 0x8060 + ETHERTYPE_LOGICRAFT = 0x8148 + ETHERTYPE_LOOPBACK = 0x9000 + ETHERTYPE_MATRA = 0x807a + ETHERTYPE_MAX = 0xffff + ETHERTYPE_MERIT = 0x807c + ETHERTYPE_MICP = 0x873a + ETHERTYPE_MOPDL = 0x6001 + ETHERTYPE_MOPRC = 0x6002 + ETHERTYPE_MOTOROLA = 0x818d + ETHERTYPE_MPLS = 0x8847 + ETHERTYPE_MPLS_MCAST = 0x8848 + ETHERTYPE_MUMPS = 0x813f + ETHERTYPE_NBPCC = 0x3c04 + ETHERTYPE_NBPCLAIM = 0x3c09 + ETHERTYPE_NBPCLREQ = 0x3c05 + ETHERTYPE_NBPCLRSP = 0x3c06 + ETHERTYPE_NBPCREQ = 0x3c02 + ETHERTYPE_NBPCRSP = 0x3c03 + ETHERTYPE_NBPDG = 0x3c07 + ETHERTYPE_NBPDGB = 0x3c08 + ETHERTYPE_NBPDLTE = 0x3c0a + ETHERTYPE_NBPRAR = 0x3c0c + ETHERTYPE_NBPRAS = 0x3c0b + ETHERTYPE_NBPRST = 0x3c0d + ETHERTYPE_NBPSCD = 0x3c01 + ETHERTYPE_NBPVCD = 0x3c00 + ETHERTYPE_NBS = 0x802 + ETHERTYPE_NCD = 0x8149 + ETHERTYPE_NESTAR = 0x8006 + ETHERTYPE_NETBEUI = 0x8191 + ETHERTYPE_NOVELL = 0x8138 + ETHERTYPE_NS = 0x600 + ETHERTYPE_NSAT = 0x601 + ETHERTYPE_NSCOMPAT = 0x807 + ETHERTYPE_NTRAILER = 0x10 + ETHERTYPE_OS9 = 0x7007 + ETHERTYPE_OS9NET = 0x7009 + ETHERTYPE_PACER = 0x80c6 + ETHERTYPE_PAE = 0x888e + ETHERTYPE_PCS = 0x4242 + ETHERTYPE_PLANNING = 0x8044 + ETHERTYPE_PPP = 0x880b + ETHERTYPE_PPPOE = 0x8864 + ETHERTYPE_PPPOEDISC = 0x8863 + ETHERTYPE_PRIMENTS = 0x7031 + ETHERTYPE_PUP = 0x200 + ETHERTYPE_PUPAT = 0x200 + ETHERTYPE_RACAL = 0x7030 + ETHERTYPE_RATIONAL = 0x8150 + ETHERTYPE_RAWFR = 0x6559 + ETHERTYPE_RCL = 0x1995 + ETHERTYPE_RDP = 0x8739 + ETHERTYPE_RETIX = 0x80f2 + ETHERTYPE_REVARP = 0x8035 + ETHERTYPE_SCA = 0x6007 + ETHERTYPE_SECTRA = 0x86db + ETHERTYPE_SECUREDATA = 0x876d + ETHERTYPE_SGITW = 0x817e + ETHERTYPE_SG_BOUNCE = 0x8016 + ETHERTYPE_SG_DIAG = 0x8013 + ETHERTYPE_SG_NETGAMES = 0x8014 + ETHERTYPE_SG_RESV = 0x8015 + ETHERTYPE_SIMNET = 0x5208 + ETHERTYPE_SLOWPROTOCOLS = 0x8809 + ETHERTYPE_SNA = 0x80d5 + ETHERTYPE_SNMP = 0x814c + ETHERTYPE_SONIX = 0xfaf5 + ETHERTYPE_SPIDER = 0x809f + ETHERTYPE_SPRITE = 0x500 + ETHERTYPE_STP = 0x8181 + ETHERTYPE_TALARIS = 0x812b + ETHERTYPE_TALARISMC = 0x852b + ETHERTYPE_TCPCOMP = 0x876b + ETHERTYPE_TCPSM = 0x9002 + ETHERTYPE_TEC = 0x814f + ETHERTYPE_TIGAN = 0x802f + ETHERTYPE_TRAIL = 0x1000 + ETHERTYPE_TRANSETHER = 0x6558 + ETHERTYPE_TYMSHARE = 0x802e + ETHERTYPE_UBBST = 0x7005 + ETHERTYPE_UBDEBUG = 0x900 + ETHERTYPE_UBDIAGLOOP = 0x7002 + ETHERTYPE_UBDL = 0x7000 + ETHERTYPE_UBNIU = 0x7001 + ETHERTYPE_UBNMC = 0x7003 + ETHERTYPE_VALID = 0x1600 + ETHERTYPE_VARIAN = 0x80dd + ETHERTYPE_VAXELN = 0x803b + ETHERTYPE_VEECO = 0x8067 + ETHERTYPE_VEXP = 0x805b + ETHERTYPE_VGLAB = 0x8131 + ETHERTYPE_VINES = 0xbad + ETHERTYPE_VINESECHO = 0xbaf + ETHERTYPE_VINESLOOP = 0xbae + ETHERTYPE_VITAL = 0xff00 + ETHERTYPE_VLAN = 0x8100 + ETHERTYPE_VLTLMAN = 0x8080 + ETHERTYPE_VPROD = 0x805c + ETHERTYPE_VURESERVED = 0x8147 + ETHERTYPE_WATERLOO = 0x8130 + ETHERTYPE_WELLFLEET = 0x8103 + ETHERTYPE_X25 = 0x805 + ETHERTYPE_X75 = 0x801 + ETHERTYPE_XNSSM = 0x9001 + ETHERTYPE_XTP = 0x817d + ETHER_ADDR_LEN = 0x6 + ETHER_CRC_LEN = 0x4 + ETHER_CRC_POLY_BE = 0x4c11db6 + ETHER_CRC_POLY_LE = 0xedb88320 + ETHER_HDR_LEN = 0xe + ETHER_MAX_LEN = 0x5ee + ETHER_MAX_LEN_JUMBO = 0x233a + ETHER_MIN_LEN = 0x40 + ETHER_PPPOE_ENCAP_LEN = 0x8 + ETHER_TYPE_LEN = 0x2 + ETHER_VLAN_ENCAP_LEN = 0x4 + EVFILT_AIO = 0x2 + EVFILT_PROC = 0x4 + EVFILT_READ = 0x0 + EVFILT_SIGNAL = 0x5 + EVFILT_SYSCOUNT = 0x7 + EVFILT_TIMER = 0x6 + EVFILT_VNODE = 0x3 + EVFILT_WRITE = 0x1 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x100 + FLUSHO = 0x800000 + F_CLOSEM = 0xa + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0xc + F_FSCTL = -0x80000000 + F_FSDIRMASK = 0x70000000 + F_FSIN = 0x10000000 + F_FSINOUT = 0x30000000 + F_FSOUT = 0x20000000 + F_FSPRIV = 0x8000 + F_FSVOID = 0x40000000 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0x7 + F_GETNOSIGPIPE = 0xd + F_GETOWN = 0x5 + F_MAXFD = 0xb + F_OK = 0x0 + F_PARAM_MASK = 0xfff + F_PARAM_MAX = 0xfff + F_RDLCK = 0x1 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x8 + F_SETLKW = 0x9 + F_SETNOSIGPIPE = 0xe + F_SETOWN = 0x6 + F_UNLCK = 0x2 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFAN_ARRIVAL = 0x0 + IFAN_DEPARTURE = 0x1 + IFA_ROUTE = 0x1 + IFF_ALLMULTI = 0x200 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x8f52 + IFF_DEBUG = 0x4 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_A12MPPSWITCH = 0x82 + IFT_AAL2 = 0xbb + IFT_AAL5 = 0x31 + IFT_ADSL = 0x5e + IFT_AFLANE8023 = 0x3b + IFT_AFLANE8025 = 0x3c + IFT_ARAP = 0x58 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ASYNC = 0x54 + IFT_ATM = 0x25 + IFT_ATMDXI = 0x69 + IFT_ATMFUNI = 0x6a + IFT_ATMIMA = 0x6b + IFT_ATMLOGICAL = 0x50 + IFT_ATMRADIO = 0xbd + IFT_ATMSUBINTERFACE = 0x86 + IFT_ATMVCIENDPT = 0xc2 + IFT_ATMVIRTUAL = 0x95 + IFT_BGPPOLICYACCOUNTING = 0xa2 + IFT_BRIDGE = 0xd1 + IFT_BSC = 0x53 + IFT_CARP = 0xf8 + IFT_CCTEMUL = 0x3d + IFT_CEPT = 0x13 + IFT_CES = 0x85 + IFT_CHANNEL = 0x46 + IFT_CNR = 0x55 + IFT_COFFEE = 0x84 + IFT_COMPOSITELINK = 0x9b + IFT_DCN = 0x8d + IFT_DIGITALPOWERLINE = 0x8a + IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba + IFT_DLSW = 0x4a + IFT_DOCSCABLEDOWNSTREAM = 0x80 + IFT_DOCSCABLEMACLAYER = 0x7f + IFT_DOCSCABLEUPSTREAM = 0x81 + IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd + IFT_DS0 = 0x51 + IFT_DS0BUNDLE = 0x52 + IFT_DS1FDL = 0xaa + IFT_DS3 = 0x1e + IFT_DTM = 0x8c + IFT_DVBASILN = 0xac + IFT_DVBASIOUT = 0xad + IFT_DVBRCCDOWNSTREAM = 0x93 + IFT_DVBRCCMACLAYER = 0x92 + IFT_DVBRCCUPSTREAM = 0x94 + IFT_ECONET = 0xce + IFT_EON = 0x19 + IFT_EPLRS = 0x57 + IFT_ESCON = 0x49 + IFT_ETHER = 0x6 + IFT_FAITH = 0xf2 + IFT_FAST = 0x7d + IFT_FASTETHER = 0x3e + IFT_FASTETHERFX = 0x45 + IFT_FDDI = 0xf + IFT_FIBRECHANNEL = 0x38 + IFT_FRAMERELAYINTERCONNECT = 0x3a + IFT_FRAMERELAYMPI = 0x5c + IFT_FRDLCIENDPT = 0xc1 + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_FRF16MFRBUNDLE = 0xa3 + IFT_FRFORWARD = 0x9e + IFT_G703AT2MB = 0x43 + IFT_G703AT64K = 0x42 + IFT_GIF = 0xf0 + IFT_GIGABITETHERNET = 0x75 + IFT_GR303IDT = 0xb2 + IFT_GR303RDT = 0xb1 + IFT_H323GATEKEEPER = 0xa4 + IFT_H323PROXY = 0xa5 + IFT_HDH1822 = 0x3 + IFT_HDLC = 0x76 + IFT_HDSL2 = 0xa8 + IFT_HIPERLAN2 = 0xb7 + IFT_HIPPI = 0x2f + IFT_HIPPIINTERFACE = 0x39 + IFT_HOSTPAD = 0x5a + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IBM370PARCHAN = 0x48 + IFT_IDSL = 0x9a + IFT_IEEE1394 = 0x90 + IFT_IEEE80211 = 0x47 + IFT_IEEE80212 = 0x37 + IFT_IEEE8023ADLAG = 0xa1 + IFT_IFGSN = 0x91 + IFT_IMT = 0xbe + IFT_INFINIBAND = 0xc7 + IFT_INTERLEAVE = 0x7c + IFT_IP = 0x7e + IFT_IPFORWARD = 0x8e + IFT_IPOVERATM = 0x72 + IFT_IPOVERCDLC = 0x6d + IFT_IPOVERCLAW = 0x6e + IFT_IPSWITCH = 0x4e + IFT_ISDN = 0x3f + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISDNS = 0x4b + IFT_ISDNU = 0x4c + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88025CRFPINT = 0x62 + IFT_ISO88025DTR = 0x56 + IFT_ISO88025FIBER = 0x73 + IFT_ISO88026 = 0xa + IFT_ISUP = 0xb3 + IFT_L2VLAN = 0x87 + IFT_L3IPVLAN = 0x88 + IFT_L3IPXVLAN = 0x89 + IFT_LAPB = 0x10 + IFT_LAPD = 0x4d + IFT_LAPF = 0x77 + IFT_LINEGROUP = 0xd2 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_MPC = 0x71 + IFT_MPLS = 0xa6 + IFT_MPLSTUNNEL = 0x96 + IFT_MSDSL = 0x8f + IFT_MVL = 0xbf + IFT_MYRINET = 0x63 + IFT_NFAS = 0xaf + IFT_NSIP = 0x1b + IFT_OPTICALCHANNEL = 0xc3 + IFT_OPTICALTRANSPORT = 0xc4 + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PFLOG = 0xf5 + IFT_PFSYNC = 0xf6 + IFT_PLC = 0xae + IFT_PON155 = 0xcf + IFT_PON622 = 0xd0 + IFT_POS = 0xab + IFT_PPP = 0x17 + IFT_PPPMULTILINKBUNDLE = 0x6c + IFT_PROPATM = 0xc5 + IFT_PROPBWAP2MP = 0xb8 + IFT_PROPCNLS = 0x59 + IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 + IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 + IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PROPWIRELESSP2P = 0x9d + IFT_PTPSERIAL = 0x16 + IFT_PVC = 0xf1 + IFT_Q2931 = 0xc9 + IFT_QLLC = 0x44 + IFT_RADIOMAC = 0xbc + IFT_RADSL = 0x5f + IFT_REACHDSL = 0xc0 + IFT_RFC1483 = 0x9f + IFT_RS232 = 0x21 + IFT_RSRB = 0x4f + IFT_SDLC = 0x11 + IFT_SDSL = 0x60 + IFT_SHDSL = 0xa9 + IFT_SIP = 0x1f + IFT_SIPSIG = 0xcc + IFT_SIPTG = 0xcb + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETOVERHEADCHANNEL = 0xb9 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_SRP = 0x97 + IFT_SS7SIGLINK = 0x9c + IFT_STACKTOSTACK = 0x6f + IFT_STARLAN = 0xb + IFT_STF = 0xd7 + IFT_T1 = 0x12 + IFT_TDLC = 0x74 + IFT_TELINK = 0xc8 + IFT_TERMPAD = 0x5b + IFT_TR008 = 0xb0 + IFT_TRANSPHDLC = 0x7b + IFT_TUNNEL = 0x83 + IFT_ULTRA = 0x1d + IFT_USB = 0xa0 + IFT_V11 = 0x40 + IFT_V35 = 0x2d + IFT_V36 = 0x41 + IFT_V37 = 0x78 + IFT_VDSL = 0x61 + IFT_VIRTUALIPADDRESS = 0x70 + IFT_VIRTUALTG = 0xca + IFT_VOICEDID = 0xd5 + IFT_VOICEEM = 0x64 + IFT_VOICEEMFGD = 0xd3 + IFT_VOICEENCAP = 0x67 + IFT_VOICEFGDEANA = 0xd4 + IFT_VOICEFXO = 0x65 + IFT_VOICEFXS = 0x66 + IFT_VOICEOVERATM = 0x98 + IFT_VOICEOVERCABLE = 0xc6 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25HUNTGROUP = 0x7a + IFT_X25MLP = 0x79 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LOOPBACKNET = 0x7f + IPPROTO_AH = 0x33 + IPPROTO_CARP = 0x70 + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPIP = 0x4 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IPV6_ICMP = 0x3a + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x34 + IPPROTO_MOBILE = 0x37 + IPPROTO_NONE = 0x3b + IPPROTO_PFSYNC = 0xf0 + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPPROTO_VRRP = 0x70 + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_DONTFRAG = 0x3e + IPV6_DSTOPTS = 0x32 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x78 + IPV6_HLIMDEC = 0x1 + IPV6_HOPLIMIT = 0x2f + IPV6_HOPOPTS = 0x31 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXPACKET = 0xffff + IPV6_MMTU = 0x500 + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_NEXTHOP = 0x30 + IPV6_PATHMTU = 0x2c + IPV6_PKTINFO = 0x2e + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVHOPLIMIT = 0x25 + IPV6_RECVHOPOPTS = 0x27 + IPV6_RECVPATHMTU = 0x2b + IPV6_RECVPKTINFO = 0x24 + IPV6_RECVRTHDR = 0x26 + IPV6_RECVTCLASS = 0x39 + IPV6_RTHDR = 0x33 + IPV6_RTHDRDSTOPTS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x3d + IPV6_UNICAST_HOPS = 0x4 + IPV6_USE_MIN_MTU = 0x2a + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0xd + IP_EF = 0x8000 + IP_ERRORMTU = 0x15 + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x16 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINFRAGSIZE = 0x45 + IP_MINTTL = 0x18 + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x1 + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVRETOPTS = 0x6 + IP_RECVTTL = 0x17 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_TOS = 0x3 + IP_TTL = 0x4 + ISIG = 0x80 + ISTRIP = 0x20 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x6 + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_SPACEAVAIL = 0x5 + MADV_WILLNEED = 0x3 + MAP_ALIGNMENT_16MB = 0x18000000 + MAP_ALIGNMENT_1TB = 0x28000000 + MAP_ALIGNMENT_256TB = 0x30000000 + MAP_ALIGNMENT_4GB = 0x20000000 + MAP_ALIGNMENT_64KB = 0x10000000 + MAP_ALIGNMENT_64PB = 0x38000000 + MAP_ALIGNMENT_MASK = -0x1000000 + MAP_ALIGNMENT_SHIFT = 0x18 + MAP_ANON = 0x1000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_HASSEMAPHORE = 0x200 + MAP_INHERIT = 0x80 + MAP_INHERIT_COPY = 0x1 + MAP_INHERIT_DEFAULT = 0x1 + MAP_INHERIT_DONATE_COPY = 0x3 + MAP_INHERIT_NONE = 0x2 + MAP_INHERIT_SHARE = 0x0 + MAP_NORESERVE = 0x40 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_SHARED = 0x1 + MAP_STACK = 0x2000 + MAP_TRYFIXED = 0x400 + MAP_WIRED = 0x800 + MSG_BCAST = 0x100 + MSG_CMSG_CLOEXEC = 0x800 + MSG_CONTROLMBUF = 0x2000000 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOR = 0x8 + MSG_IOVUSRSPACE = 0x4000000 + MSG_LENUSRSPACE = 0x8000000 + MSG_MCAST = 0x200 + MSG_NAMEMBUF = 0x1000000 + MSG_NBIO = 0x1000 + MSG_NOSIGNAL = 0x400 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_TRUNC = 0x10 + MSG_USERFLAGS = 0xffffff + MSG_WAITALL = 0x40 + NAME_MAX = 0x1ff + NET_RT_DUMP = 0x1 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x5 + NET_RT_MAXID = 0x6 + NET_RT_OIFLIST = 0x4 + NET_RT_OOIFLIST = 0x3 + NOFLSH = 0x80000000 + NOTE_ATTRIB = 0x8 + NOTE_CHILD = 0x4 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXTEND = 0x4 + NOTE_FORK = 0x40000000 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_PCTRLMASK = 0xf0000000 + NOTE_PDATAMASK = 0xfffff + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + OFIOGETBMAP = 0xc004667a + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_ALT_IO = 0x40000 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x400000 + O_CREAT = 0x200 + O_DIRECT = 0x80000 + O_DIRECTORY = 0x200000 + O_DSYNC = 0x10000 + O_EXCL = 0x800 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x8000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_NOSIGPIPE = 0x1000000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x20000 + O_SHLOCK = 0x10 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PRI_IOFLUSH = 0x7c + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + RLIMIT_AS = 0xa + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0x9 + RTAX_NETMASK = 0x2 + RTAX_TAG = 0x8 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_NETMASK = 0x4 + RTA_TAG = 0x100 + RTF_ANNOUNCE = 0x20000 + RTF_BLACKHOLE = 0x1000 + RTF_CLONED = 0x2000 + RTF_CLONING = 0x100 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_LLINFO = 0x400 + RTF_MASK = 0x80 + RTF_MODIFIED = 0x20 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_REJECT = 0x8 + RTF_SRC = 0x10000 + RTF_STATIC = 0x800 + RTF_UP = 0x1 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_CHGADDR = 0x15 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_GET = 0x4 + RTM_IEEE80211 = 0x11 + RTM_IFANNOUNCE = 0x10 + RTM_IFINFO = 0x14 + RTM_LLINFO_UPD = 0x13 + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_OIFINFO = 0xf + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_OOIFINFO = 0xe + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_SETGATE = 0x12 + RTM_VERSION = 0x4 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + SCM_CREDS = 0x4 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x8 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80906931 + SIOCADDRT = 0x8030720a + SIOCAIFADDR = 0x8040691a + SIOCALIFADDR = 0x8118691c + SIOCATMARK = 0x40047307 + SIOCDELMULTI = 0x80906932 + SIOCDELRT = 0x8030720b + SIOCDIFADDR = 0x80906919 + SIOCDIFPHYADDR = 0x80906949 + SIOCDLIFADDR = 0x8118691e + SIOCGDRVSPEC = 0xc01c697b + SIOCGETPFSYNC = 0xc09069f8 + SIOCGETSGCNT = 0xc0147534 + SIOCGETVIFCNT = 0xc0147533 + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0906921 + SIOCGIFADDRPREF = 0xc0946920 + SIOCGIFALIAS = 0xc040691b + SIOCGIFBRDADDR = 0xc0906923 + SIOCGIFCAP = 0xc0206976 + SIOCGIFCONF = 0xc0086926 + SIOCGIFDATA = 0xc0946985 + SIOCGIFDLT = 0xc0906977 + SIOCGIFDSTADDR = 0xc0906922 + SIOCGIFFLAGS = 0xc0906911 + SIOCGIFGENERIC = 0xc090693a + SIOCGIFMEDIA = 0xc0286936 + SIOCGIFMETRIC = 0xc0906917 + SIOCGIFMTU = 0xc090697e + SIOCGIFNETMASK = 0xc0906925 + SIOCGIFPDSTADDR = 0xc0906948 + SIOCGIFPSRCADDR = 0xc0906947 + SIOCGLIFADDR = 0xc118691d + SIOCGLIFPHYADDR = 0xc118694b + SIOCGLINKSTR = 0xc01c6987 + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCGVH = 0xc0906983 + SIOCIFCREATE = 0x8090697a + SIOCIFDESTROY = 0x80906979 + SIOCIFGCLONERS = 0xc00c6978 + SIOCINITIFADDR = 0xc0446984 + SIOCSDRVSPEC = 0x801c697b + SIOCSETPFSYNC = 0x809069f7 + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8090690c + SIOCSIFADDRPREF = 0x8094691f + SIOCSIFBRDADDR = 0x80906913 + SIOCSIFCAP = 0x80206975 + SIOCSIFDSTADDR = 0x8090690e + SIOCSIFFLAGS = 0x80906910 + SIOCSIFGENERIC = 0x80906939 + SIOCSIFMEDIA = 0xc0906935 + SIOCSIFMETRIC = 0x80906918 + SIOCSIFMTU = 0x8090697f + SIOCSIFNETMASK = 0x80906916 + SIOCSIFPHYADDR = 0x80406946 + SIOCSLIFPHYADDR = 0x8118694a + SIOCSLINKSTR = 0x801c6988 + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SIOCSVH = 0xc0906982 + SIOCZIFDATA = 0xc0946986 + SOCK_CLOEXEC = 0x10000000 + SOCK_DGRAM = 0x2 + SOCK_FLAGS_MASK = 0xf0000000 + SOCK_NONBLOCK = 0x20000000 + SOCK_NOSIGPIPE = 0x40000000 + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_ACCEPTFILTER = 0x1000 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LINGER = 0x80 + SO_NOHEADER = 0x100a + SO_NOSIGPIPE = 0x800 + SO_OOBINLINE = 0x100 + SO_OVERFLOWED = 0x1009 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x100c + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x100b + SO_TIMESTAMP = 0x2000 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + SYSCTL_VERSION = 0x1000000 + SYSCTL_VERS_0 = 0x0 + SYSCTL_VERS_1 = 0x1000000 + SYSCTL_VERS_MASK = 0xff000000 + S_ARCH1 = 0x10000 + S_ARCH2 = 0x20000 + S_BLKSIZE = 0x200 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IFWHT = 0xe000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISTXT = 0x200 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_CONGCTL = 0x20 + TCP_KEEPCNT = 0x6 + TCP_KEEPIDLE = 0x3 + TCP_KEEPINIT = 0x7 + TCP_KEEPINTVL = 0x5 + TCP_MAXBURST = 0x4 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0x10 + TCP_MINMSS = 0xd8 + TCP_MSS = 0x218 + TCP_NODELAY = 0x1 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDCDTIMESTAMP = 0x400c7458 + TIOCDRAIN = 0x2000745e + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLAG_CDTRCTS = 0x10 + TIOCFLAG_CLOCAL = 0x2 + TIOCFLAG_CRTSCTS = 0x4 + TIOCFLAG_MDMBUF = 0x8 + TIOCFLAG_SOFTCAR = 0x1 + TIOCFLUSH = 0x80047410 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGFLAGS = 0x4004745d + TIOCGLINED = 0x40207442 + TIOCGPGRP = 0x40047477 + TIOCGQSIZE = 0x40047481 + TIOCGRANTPT = 0x20007447 + TIOCGSID = 0x40047463 + TIOCGSIZE = 0x40087468 + TIOCGWINSZ = 0x40087468 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGET = 0x4004746a + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCPTMGET = 0x48087446 + TIOCPTSNAME = 0x48087448 + TIOCRCVFRAME = 0x80047445 + TIOCREMOTE = 0x80047469 + TIOCSBRK = 0x2000747b + TIOCSCTTY = 0x20007461 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSFLAGS = 0x8004745c + TIOCSIG = 0x2000745f + TIOCSLINED = 0x80207443 + TIOCSPGRP = 0x80047476 + TIOCSQSIZE = 0x80047480 + TIOCSSIZE = 0x80087467 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x80047465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCUCNTL = 0x80047466 + TIOCXMTFRAME = 0x80047444 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VTIME = 0x11 + VWERASE = 0x4 + WALL = 0x8 + WALLSIG = 0x8 + WALTSIG = 0x4 + WCLONE = 0x4 + WCOREFLAG = 0x80 + WNOHANG = 0x1 + WNOWAIT = 0x10000 + WNOZOMBIE = 0x20000 + WOPTSCHECKED = 0x40000 + WSTOPPED = 0x7f + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADF = syscall.Errno(0x9) + EBADMSG = syscall.Errno(0x58) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x57) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDOM = syscall.Errno(0x21) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x52) + EILSEQ = syscall.Errno(0x55) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x60) + ELOOP = syscall.Errno(0x3e) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + EMULTIHOP = syscall.Errno(0x5e) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x5d) + ENOBUFS = syscall.Errno(0x37) + ENODATA = syscall.Errno(0x59) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOLINK = syscall.Errno(0x5f) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x53) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x5a) + ENOSTR = syscall.Errno(0x5b) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x56) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x2d) + EOVERFLOW = syscall.Errno(0x54) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x60) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIME = syscall.Errno(0x5c) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGPWR = syscall.Signal(0x20) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large or too small", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol option not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "connection timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "identifier removed", + 83: "no message of desired type", + 84: "value too large to be stored in data type", + 85: "illegal byte sequence", + 86: "not supported", + 87: "operation Canceled", + 88: "bad or Corrupt message", + 89: "no message available", + 90: "no STREAM resources", + 91: "not a STREAM", + 92: "STREAM ioctl timeout", + 93: "attribute not found", + 94: "multihop attempted", + 95: "link has been severed", + 96: "protocol error", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "stopped (signal)", + 18: "stopped", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", + 32: "power fail/restart", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go new file mode 100644 index 0000000..3322e99 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go @@ -0,0 +1,1584 @@ +// mkerrors.sh -m32 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build 386,openbsd + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m32 _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_BLUETOOTH = 0x20 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1a + AF_ECMA = 0x8 + AF_ENCAP = 0x1c + AF_HYLINK = 0xf + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x18 + AF_IPX = 0x17 + AF_ISDN = 0x1a + AF_ISO = 0x7 + AF_KEY = 0x1e + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x24 + AF_MPLS = 0x21 + AF_NATM = 0x1b + AF_NS = 0x6 + AF_OSI = 0x7 + AF_PUP = 0x4 + AF_ROUTE = 0x11 + AF_SIP = 0x1d + AF_SNA = 0xb + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + ARPHRD_ETHER = 0x1 + ARPHRD_FRELAY = 0xf + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B9600 = 0x2580 + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDIRFILT = 0x4004427c + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc008427b + BIOCGETIF = 0x4020426b + BIOCGFILDROP = 0x40044278 + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044273 + BIOCGRTIMEOUT = 0x400c426e + BIOCGSTATS = 0x4008426f + BIOCIMMEDIATE = 0x80044270 + BIOCLOCK = 0x20004276 + BIOCPROMISC = 0x20004269 + BIOCSBLEN = 0xc0044266 + BIOCSDIRFILT = 0x8004427d + BIOCSDLT = 0x8004427a + BIOCSETF = 0x80084267 + BIOCSETIF = 0x8020426c + BIOCSETWF = 0x80084277 + BIOCSFILDROP = 0x80044279 + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044272 + BIOCSRTIMEOUT = 0x800c426d + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIRECTION_IN = 0x1 + BPF_DIRECTION_OUT = 0x2 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x200000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0xff + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0xc + CTL_NET = 0x4 + DIOCOSFPFLUSH = 0x2000444e + DLT_ARCNET = 0x7 + DLT_ATM_RFC1483 = 0xb + DLT_AX25 = 0x3 + DLT_CHAOS = 0x5 + DLT_C_HDLC = 0x68 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0xd + DLT_FDDI = 0xa + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_LOOP = 0xc + DLT_MPLS = 0xdb + DLT_NULL = 0x0 + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0x10 + DLT_PPP_ETHER = 0x33 + DLT_PPP_SERIAL = 0x32 + DLT_PRONET = 0x4 + DLT_RAW = 0xe + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EMT_TAGOVF = 0x1 + EMUL_ENABLED = 0x1 + EMUL_NATIVE = 0x2 + ENDRUNDISC = 0x9 + ETHERMIN = 0x2e + ETHERMTU = 0x5dc + ETHERTYPE_8023 = 0x4 + ETHERTYPE_AARP = 0x80f3 + ETHERTYPE_ACCTON = 0x8390 + ETHERTYPE_AEONIC = 0x8036 + ETHERTYPE_ALPHA = 0x814a + ETHERTYPE_AMBER = 0x6008 + ETHERTYPE_AMOEBA = 0x8145 + ETHERTYPE_AOE = 0x88a2 + ETHERTYPE_APOLLO = 0x80f7 + ETHERTYPE_APOLLODOMAIN = 0x8019 + ETHERTYPE_APPLETALK = 0x809b + ETHERTYPE_APPLITEK = 0x80c7 + ETHERTYPE_ARGONAUT = 0x803a + ETHERTYPE_ARP = 0x806 + ETHERTYPE_AT = 0x809b + ETHERTYPE_ATALK = 0x809b + ETHERTYPE_ATOMIC = 0x86df + ETHERTYPE_ATT = 0x8069 + ETHERTYPE_ATTSTANFORD = 0x8008 + ETHERTYPE_AUTOPHON = 0x806a + ETHERTYPE_AXIS = 0x8856 + ETHERTYPE_BCLOOP = 0x9003 + ETHERTYPE_BOFL = 0x8102 + ETHERTYPE_CABLETRON = 0x7034 + ETHERTYPE_CHAOS = 0x804 + ETHERTYPE_COMDESIGN = 0x806c + ETHERTYPE_COMPUGRAPHIC = 0x806d + ETHERTYPE_COUNTERPOINT = 0x8062 + ETHERTYPE_CRONUS = 0x8004 + ETHERTYPE_CRONUSVLN = 0x8003 + ETHERTYPE_DCA = 0x1234 + ETHERTYPE_DDE = 0x807b + ETHERTYPE_DEBNI = 0xaaaa + ETHERTYPE_DECAM = 0x8048 + ETHERTYPE_DECCUST = 0x6006 + ETHERTYPE_DECDIAG = 0x6005 + ETHERTYPE_DECDNS = 0x803c + ETHERTYPE_DECDTS = 0x803e + ETHERTYPE_DECEXPER = 0x6000 + ETHERTYPE_DECLAST = 0x8041 + ETHERTYPE_DECLTM = 0x803f + ETHERTYPE_DECMUMPS = 0x6009 + ETHERTYPE_DECNETBIOS = 0x8040 + ETHERTYPE_DELTACON = 0x86de + ETHERTYPE_DIDDLE = 0x4321 + ETHERTYPE_DLOG1 = 0x660 + ETHERTYPE_DLOG2 = 0x661 + ETHERTYPE_DN = 0x6003 + ETHERTYPE_DOGFIGHT = 0x1989 + ETHERTYPE_DSMD = 0x8039 + ETHERTYPE_ECMA = 0x803 + ETHERTYPE_ENCRYPT = 0x803d + ETHERTYPE_ES = 0x805d + ETHERTYPE_EXCELAN = 0x8010 + ETHERTYPE_EXPERDATA = 0x8049 + ETHERTYPE_FLIP = 0x8146 + ETHERTYPE_FLOWCONTROL = 0x8808 + ETHERTYPE_FRARP = 0x808 + ETHERTYPE_GENDYN = 0x8068 + ETHERTYPE_HAYES = 0x8130 + ETHERTYPE_HIPPI_FP = 0x8180 + ETHERTYPE_HITACHI = 0x8820 + ETHERTYPE_HP = 0x8005 + ETHERTYPE_IEEEPUP = 0xa00 + ETHERTYPE_IEEEPUPAT = 0xa01 + ETHERTYPE_IMLBL = 0x4c42 + ETHERTYPE_IMLBLDIAG = 0x424c + ETHERTYPE_IP = 0x800 + ETHERTYPE_IPAS = 0x876c + ETHERTYPE_IPV6 = 0x86dd + ETHERTYPE_IPX = 0x8137 + ETHERTYPE_IPXNEW = 0x8037 + ETHERTYPE_KALPANA = 0x8582 + ETHERTYPE_LANBRIDGE = 0x8038 + ETHERTYPE_LANPROBE = 0x8888 + ETHERTYPE_LAT = 0x6004 + ETHERTYPE_LBACK = 0x9000 + ETHERTYPE_LITTLE = 0x8060 + ETHERTYPE_LLDP = 0x88cc + ETHERTYPE_LOGICRAFT = 0x8148 + ETHERTYPE_LOOPBACK = 0x9000 + ETHERTYPE_MATRA = 0x807a + ETHERTYPE_MAX = 0xffff + ETHERTYPE_MERIT = 0x807c + ETHERTYPE_MICP = 0x873a + ETHERTYPE_MOPDL = 0x6001 + ETHERTYPE_MOPRC = 0x6002 + ETHERTYPE_MOTOROLA = 0x818d + ETHERTYPE_MPLS = 0x8847 + ETHERTYPE_MPLS_MCAST = 0x8848 + ETHERTYPE_MUMPS = 0x813f + ETHERTYPE_NBPCC = 0x3c04 + ETHERTYPE_NBPCLAIM = 0x3c09 + ETHERTYPE_NBPCLREQ = 0x3c05 + ETHERTYPE_NBPCLRSP = 0x3c06 + ETHERTYPE_NBPCREQ = 0x3c02 + ETHERTYPE_NBPCRSP = 0x3c03 + ETHERTYPE_NBPDG = 0x3c07 + ETHERTYPE_NBPDGB = 0x3c08 + ETHERTYPE_NBPDLTE = 0x3c0a + ETHERTYPE_NBPRAR = 0x3c0c + ETHERTYPE_NBPRAS = 0x3c0b + ETHERTYPE_NBPRST = 0x3c0d + ETHERTYPE_NBPSCD = 0x3c01 + ETHERTYPE_NBPVCD = 0x3c00 + ETHERTYPE_NBS = 0x802 + ETHERTYPE_NCD = 0x8149 + ETHERTYPE_NESTAR = 0x8006 + ETHERTYPE_NETBEUI = 0x8191 + ETHERTYPE_NOVELL = 0x8138 + ETHERTYPE_NS = 0x600 + ETHERTYPE_NSAT = 0x601 + ETHERTYPE_NSCOMPAT = 0x807 + ETHERTYPE_NTRAILER = 0x10 + ETHERTYPE_OS9 = 0x7007 + ETHERTYPE_OS9NET = 0x7009 + ETHERTYPE_PACER = 0x80c6 + ETHERTYPE_PAE = 0x888e + ETHERTYPE_PCS = 0x4242 + ETHERTYPE_PLANNING = 0x8044 + ETHERTYPE_PPP = 0x880b + ETHERTYPE_PPPOE = 0x8864 + ETHERTYPE_PPPOEDISC = 0x8863 + ETHERTYPE_PRIMENTS = 0x7031 + ETHERTYPE_PUP = 0x200 + ETHERTYPE_PUPAT = 0x200 + ETHERTYPE_QINQ = 0x88a8 + ETHERTYPE_RACAL = 0x7030 + ETHERTYPE_RATIONAL = 0x8150 + ETHERTYPE_RAWFR = 0x6559 + ETHERTYPE_RCL = 0x1995 + ETHERTYPE_RDP = 0x8739 + ETHERTYPE_RETIX = 0x80f2 + ETHERTYPE_REVARP = 0x8035 + ETHERTYPE_SCA = 0x6007 + ETHERTYPE_SECTRA = 0x86db + ETHERTYPE_SECUREDATA = 0x876d + ETHERTYPE_SGITW = 0x817e + ETHERTYPE_SG_BOUNCE = 0x8016 + ETHERTYPE_SG_DIAG = 0x8013 + ETHERTYPE_SG_NETGAMES = 0x8014 + ETHERTYPE_SG_RESV = 0x8015 + ETHERTYPE_SIMNET = 0x5208 + ETHERTYPE_SLOW = 0x8809 + ETHERTYPE_SNA = 0x80d5 + ETHERTYPE_SNMP = 0x814c + ETHERTYPE_SONIX = 0xfaf5 + ETHERTYPE_SPIDER = 0x809f + ETHERTYPE_SPRITE = 0x500 + ETHERTYPE_STP = 0x8181 + ETHERTYPE_TALARIS = 0x812b + ETHERTYPE_TALARISMC = 0x852b + ETHERTYPE_TCPCOMP = 0x876b + ETHERTYPE_TCPSM = 0x9002 + ETHERTYPE_TEC = 0x814f + ETHERTYPE_TIGAN = 0x802f + ETHERTYPE_TRAIL = 0x1000 + ETHERTYPE_TRANSETHER = 0x6558 + ETHERTYPE_TYMSHARE = 0x802e + ETHERTYPE_UBBST = 0x7005 + ETHERTYPE_UBDEBUG = 0x900 + ETHERTYPE_UBDIAGLOOP = 0x7002 + ETHERTYPE_UBDL = 0x7000 + ETHERTYPE_UBNIU = 0x7001 + ETHERTYPE_UBNMC = 0x7003 + ETHERTYPE_VALID = 0x1600 + ETHERTYPE_VARIAN = 0x80dd + ETHERTYPE_VAXELN = 0x803b + ETHERTYPE_VEECO = 0x8067 + ETHERTYPE_VEXP = 0x805b + ETHERTYPE_VGLAB = 0x8131 + ETHERTYPE_VINES = 0xbad + ETHERTYPE_VINESECHO = 0xbaf + ETHERTYPE_VINESLOOP = 0xbae + ETHERTYPE_VITAL = 0xff00 + ETHERTYPE_VLAN = 0x8100 + ETHERTYPE_VLTLMAN = 0x8080 + ETHERTYPE_VPROD = 0x805c + ETHERTYPE_VURESERVED = 0x8147 + ETHERTYPE_WATERLOO = 0x8130 + ETHERTYPE_WELLFLEET = 0x8103 + ETHERTYPE_X25 = 0x805 + ETHERTYPE_X75 = 0x801 + ETHERTYPE_XNSSM = 0x9001 + ETHERTYPE_XTP = 0x817d + ETHER_ADDR_LEN = 0x6 + ETHER_ALIGN = 0x2 + ETHER_CRC_LEN = 0x4 + ETHER_CRC_POLY_BE = 0x4c11db6 + ETHER_CRC_POLY_LE = 0xedb88320 + ETHER_HDR_LEN = 0xe + ETHER_MAX_DIX_LEN = 0x600 + ETHER_MAX_LEN = 0x5ee + ETHER_MIN_LEN = 0x40 + ETHER_TYPE_LEN = 0x2 + ETHER_VLAN_ENCAP_LEN = 0x4 + EVFILT_AIO = -0x3 + EVFILT_PROC = -0x5 + EVFILT_READ = -0x1 + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0x7 + EVFILT_TIMER = -0x7 + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0xa + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0x7 + F_GETOWN = 0x5 + F_OK = 0x0 + F_RDLCK = 0x1 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x8 + F_SETLKW = 0x9 + F_SETOWN = 0x6 + F_UNLCK = 0x2 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFAN_ARRIVAL = 0x0 + IFAN_DEPARTURE = 0x1 + IFA_ROUTE = 0x1 + IFF_ALLMULTI = 0x200 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x8e52 + IFF_DEBUG = 0x4 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_A12MPPSWITCH = 0x82 + IFT_AAL2 = 0xbb + IFT_AAL5 = 0x31 + IFT_ADSL = 0x5e + IFT_AFLANE8023 = 0x3b + IFT_AFLANE8025 = 0x3c + IFT_ARAP = 0x58 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ASYNC = 0x54 + IFT_ATM = 0x25 + IFT_ATMDXI = 0x69 + IFT_ATMFUNI = 0x6a + IFT_ATMIMA = 0x6b + IFT_ATMLOGICAL = 0x50 + IFT_ATMRADIO = 0xbd + IFT_ATMSUBINTERFACE = 0x86 + IFT_ATMVCIENDPT = 0xc2 + IFT_ATMVIRTUAL = 0x95 + IFT_BGPPOLICYACCOUNTING = 0xa2 + IFT_BLUETOOTH = 0xf8 + IFT_BRIDGE = 0xd1 + IFT_BSC = 0x53 + IFT_CARP = 0xf7 + IFT_CCTEMUL = 0x3d + IFT_CEPT = 0x13 + IFT_CES = 0x85 + IFT_CHANNEL = 0x46 + IFT_CNR = 0x55 + IFT_COFFEE = 0x84 + IFT_COMPOSITELINK = 0x9b + IFT_DCN = 0x8d + IFT_DIGITALPOWERLINE = 0x8a + IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba + IFT_DLSW = 0x4a + IFT_DOCSCABLEDOWNSTREAM = 0x80 + IFT_DOCSCABLEMACLAYER = 0x7f + IFT_DOCSCABLEUPSTREAM = 0x81 + IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd + IFT_DS0 = 0x51 + IFT_DS0BUNDLE = 0x52 + IFT_DS1FDL = 0xaa + IFT_DS3 = 0x1e + IFT_DTM = 0x8c + IFT_DUMMY = 0xf1 + IFT_DVBASILN = 0xac + IFT_DVBASIOUT = 0xad + IFT_DVBRCCDOWNSTREAM = 0x93 + IFT_DVBRCCMACLAYER = 0x92 + IFT_DVBRCCUPSTREAM = 0x94 + IFT_ECONET = 0xce + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_EPLRS = 0x57 + IFT_ESCON = 0x49 + IFT_ETHER = 0x6 + IFT_FAITH = 0xf3 + IFT_FAST = 0x7d + IFT_FASTETHER = 0x3e + IFT_FASTETHERFX = 0x45 + IFT_FDDI = 0xf + IFT_FIBRECHANNEL = 0x38 + IFT_FRAMERELAYINTERCONNECT = 0x3a + IFT_FRAMERELAYMPI = 0x5c + IFT_FRDLCIENDPT = 0xc1 + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_FRF16MFRBUNDLE = 0xa3 + IFT_FRFORWARD = 0x9e + IFT_G703AT2MB = 0x43 + IFT_G703AT64K = 0x42 + IFT_GIF = 0xf0 + IFT_GIGABITETHERNET = 0x75 + IFT_GR303IDT = 0xb2 + IFT_GR303RDT = 0xb1 + IFT_H323GATEKEEPER = 0xa4 + IFT_H323PROXY = 0xa5 + IFT_HDH1822 = 0x3 + IFT_HDLC = 0x76 + IFT_HDSL2 = 0xa8 + IFT_HIPERLAN2 = 0xb7 + IFT_HIPPI = 0x2f + IFT_HIPPIINTERFACE = 0x39 + IFT_HOSTPAD = 0x5a + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IBM370PARCHAN = 0x48 + IFT_IDSL = 0x9a + IFT_IEEE1394 = 0x90 + IFT_IEEE80211 = 0x47 + IFT_IEEE80212 = 0x37 + IFT_IEEE8023ADLAG = 0xa1 + IFT_IFGSN = 0x91 + IFT_IMT = 0xbe + IFT_INFINIBAND = 0xc7 + IFT_INTERLEAVE = 0x7c + IFT_IP = 0x7e + IFT_IPFORWARD = 0x8e + IFT_IPOVERATM = 0x72 + IFT_IPOVERCDLC = 0x6d + IFT_IPOVERCLAW = 0x6e + IFT_IPSWITCH = 0x4e + IFT_ISDN = 0x3f + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISDNS = 0x4b + IFT_ISDNU = 0x4c + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88025CRFPINT = 0x62 + IFT_ISO88025DTR = 0x56 + IFT_ISO88025FIBER = 0x73 + IFT_ISO88026 = 0xa + IFT_ISUP = 0xb3 + IFT_L2VLAN = 0x87 + IFT_L3IPVLAN = 0x88 + IFT_L3IPXVLAN = 0x89 + IFT_LAPB = 0x10 + IFT_LAPD = 0x4d + IFT_LAPF = 0x77 + IFT_LINEGROUP = 0xd2 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_MPC = 0x71 + IFT_MPLS = 0xa6 + IFT_MPLSTUNNEL = 0x96 + IFT_MSDSL = 0x8f + IFT_MVL = 0xbf + IFT_MYRINET = 0x63 + IFT_NFAS = 0xaf + IFT_NSIP = 0x1b + IFT_OPTICALCHANNEL = 0xc3 + IFT_OPTICALTRANSPORT = 0xc4 + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PFLOG = 0xf5 + IFT_PFLOW = 0xf9 + IFT_PFSYNC = 0xf6 + IFT_PLC = 0xae + IFT_PON155 = 0xcf + IFT_PON622 = 0xd0 + IFT_POS = 0xab + IFT_PPP = 0x17 + IFT_PPPMULTILINKBUNDLE = 0x6c + IFT_PROPATM = 0xc5 + IFT_PROPBWAP2MP = 0xb8 + IFT_PROPCNLS = 0x59 + IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 + IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 + IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PROPWIRELESSP2P = 0x9d + IFT_PTPSERIAL = 0x16 + IFT_PVC = 0xf2 + IFT_Q2931 = 0xc9 + IFT_QLLC = 0x44 + IFT_RADIOMAC = 0xbc + IFT_RADSL = 0x5f + IFT_REACHDSL = 0xc0 + IFT_RFC1483 = 0x9f + IFT_RS232 = 0x21 + IFT_RSRB = 0x4f + IFT_SDLC = 0x11 + IFT_SDSL = 0x60 + IFT_SHDSL = 0xa9 + IFT_SIP = 0x1f + IFT_SIPSIG = 0xcc + IFT_SIPTG = 0xcb + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETOVERHEADCHANNEL = 0xb9 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_SRP = 0x97 + IFT_SS7SIGLINK = 0x9c + IFT_STACKTOSTACK = 0x6f + IFT_STARLAN = 0xb + IFT_T1 = 0x12 + IFT_TDLC = 0x74 + IFT_TELINK = 0xc8 + IFT_TERMPAD = 0x5b + IFT_TR008 = 0xb0 + IFT_TRANSPHDLC = 0x7b + IFT_TUNNEL = 0x83 + IFT_ULTRA = 0x1d + IFT_USB = 0xa0 + IFT_V11 = 0x40 + IFT_V35 = 0x2d + IFT_V36 = 0x41 + IFT_V37 = 0x78 + IFT_VDSL = 0x61 + IFT_VIRTUALIPADDRESS = 0x70 + IFT_VIRTUALTG = 0xca + IFT_VOICEDID = 0xd5 + IFT_VOICEEM = 0x64 + IFT_VOICEEMFGD = 0xd3 + IFT_VOICEENCAP = 0x67 + IFT_VOICEFGDEANA = 0xd4 + IFT_VOICEFXO = 0x65 + IFT_VOICEFXS = 0x66 + IFT_VOICEOVERATM = 0x98 + IFT_VOICEOVERCABLE = 0xc6 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25HUNTGROUP = 0x7a + IFT_X25MLP = 0x79 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LOOPBACKNET = 0x7f + IN_RFC3021_HOST = 0x1 + IN_RFC3021_NET = 0xfffffffe + IN_RFC3021_NSHIFT = 0x1f + IPPROTO_AH = 0x33 + IPPROTO_CARP = 0x70 + IPPROTO_DIVERT = 0x102 + IPPROTO_DIVERT_INIT = 0x2 + IPPROTO_DIVERT_RESP = 0x1 + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPIP = 0x4 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x103 + IPPROTO_MOBILE = 0x37 + IPPROTO_MPLS = 0x89 + IPPROTO_NONE = 0x3b + IPPROTO_PFSYNC = 0xf0 + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPV6_AUTH_LEVEL = 0x35 + IPV6_AUTOFLOWLABEL = 0x3b + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_DONTFRAG = 0x3e + IPV6_DSTOPTS = 0x32 + IPV6_ESP_NETWORK_LEVEL = 0x37 + IPV6_ESP_TRANS_LEVEL = 0x36 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x78 + IPV6_HLIMDEC = 0x1 + IPV6_HOPLIMIT = 0x2f + IPV6_HOPOPTS = 0x31 + IPV6_IPCOMP_LEVEL = 0x3c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXPACKET = 0xffff + IPV6_MMTU = 0x500 + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_NEXTHOP = 0x30 + IPV6_OPTIONS = 0x1 + IPV6_PATHMTU = 0x2c + IPV6_PIPEX = 0x3f + IPV6_PKTINFO = 0x2e + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVDSTPORT = 0x40 + IPV6_RECVHOPLIMIT = 0x25 + IPV6_RECVHOPOPTS = 0x27 + IPV6_RECVPATHMTU = 0x2b + IPV6_RECVPKTINFO = 0x24 + IPV6_RECVRTHDR = 0x26 + IPV6_RECVTCLASS = 0x39 + IPV6_RTABLE = 0x1021 + IPV6_RTHDR = 0x33 + IPV6_RTHDRDSTOPTS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x3d + IPV6_UNICAST_HOPS = 0x4 + IPV6_USE_MIN_MTU = 0x2a + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_AUTH_LEVEL = 0x14 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DIVERTFL = 0x1022 + IP_DROP_MEMBERSHIP = 0xd + IP_ESP_NETWORK_LEVEL = 0x16 + IP_ESP_TRANS_LEVEL = 0x15 + IP_HDRINCL = 0x2 + IP_IPCOMP_LEVEL = 0x1d + IP_IPSECFLOWINFO = 0x24 + IP_IPSEC_LOCAL_AUTH = 0x1b + IP_IPSEC_LOCAL_CRED = 0x19 + IP_IPSEC_LOCAL_ID = 0x17 + IP_IPSEC_REMOTE_AUTH = 0x1c + IP_IPSEC_REMOTE_CRED = 0x1a + IP_IPSEC_REMOTE_ID = 0x18 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0xfff + IP_MF = 0x2000 + IP_MINTTL = 0x20 + IP_MIN_MEMBERSHIPS = 0xf + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x1 + IP_PIPEX = 0x22 + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVDSTPORT = 0x21 + IP_RECVIF = 0x1e + IP_RECVOPTS = 0x5 + IP_RECVRETOPTS = 0x6 + IP_RECVRTABLE = 0x23 + IP_RECVTTL = 0x1f + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RTABLE = 0x1021 + IP_TOS = 0x3 + IP_TTL = 0x4 + ISIG = 0x80 + ISTRIP = 0x20 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LCNT_OVERLOAD_FLUSH = 0x6 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x6 + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_SPACEAVAIL = 0x5 + MADV_WILLNEED = 0x3 + MAP_ANON = 0x1000 + MAP_COPY = 0x4 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_FLAGMASK = 0x1ff7 + MAP_HASSEMAPHORE = 0x200 + MAP_INHERIT = 0x80 + MAP_INHERIT_COPY = 0x1 + MAP_INHERIT_DONATE_COPY = 0x3 + MAP_INHERIT_NONE = 0x2 + MAP_INHERIT_SHARE = 0x0 + MAP_NOEXTEND = 0x100 + MAP_NORESERVE = 0x40 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_SHARED = 0x1 + MAP_TRYFIXED = 0x400 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_BCAST = 0x100 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOR = 0x8 + MSG_MCAST = 0x200 + MSG_NOSIGNAL = 0x400 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x4 + MS_SYNC = 0x2 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_MAXID = 0x6 + NET_RT_STATS = 0x4 + NET_RT_TABLE = 0x5 + NOFLSH = 0x80000000 + NOTE_ATTRIB = 0x8 + NOTE_CHILD = 0x4 + NOTE_DELETE = 0x1 + NOTE_EOF = 0x2 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXTEND = 0x4 + NOTE_FORK = 0x40000000 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_PCTRLMASK = 0xf0000000 + NOTE_PDATAMASK = 0xfffff + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_TRUNCATE = 0x80 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + ONLCR = 0x2 + ONLRET = 0x80 + ONOCR = 0x40 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x10000 + O_CREAT = 0x200 + O_DIRECTORY = 0x20000 + O_DSYNC = 0x80 + O_EXCL = 0x800 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x8000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x80 + O_SHLOCK = 0x10 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PF_FLUSH = 0x1 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PT_MASK = 0x3ff000 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_LABEL = 0xa + RTAX_MAX = 0xb + RTAX_NETMASK = 0x2 + RTAX_SRC = 0x8 + RTAX_SRCMASK = 0x9 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_LABEL = 0x400 + RTA_NETMASK = 0x4 + RTA_SRC = 0x100 + RTA_SRCMASK = 0x200 + RTF_ANNOUNCE = 0x4000 + RTF_BLACKHOLE = 0x1000 + RTF_CLONED = 0x10000 + RTF_CLONING = 0x100 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_FMASK = 0x10f808 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_LLINFO = 0x400 + RTF_MASK = 0x80 + RTF_MODIFIED = 0x20 + RTF_MPATH = 0x40000 + RTF_MPLS = 0x100000 + RTF_PERMANENT_ARP = 0x2000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x2000 + RTF_REJECT = 0x8 + RTF_SOURCE = 0x20000 + RTF_STATIC = 0x800 + RTF_TUNNEL = 0x100000 + RTF_UP = 0x1 + RTF_USETRAILERS = 0x8000 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DESYNC = 0x10 + RTM_GET = 0x4 + RTM_IFANNOUNCE = 0xf + RTM_IFINFO = 0xe + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MAXSIZE = 0x800 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x5 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RT_TABLEID_MAX = 0xff + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x4 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCAIFADDR = 0x8040691a + SIOCAIFGROUP = 0x80246987 + SIOCALIFADDR = 0x8218691c + SIOCATMARK = 0x40047307 + SIOCBRDGADD = 0x8054693c + SIOCBRDGADDS = 0x80546941 + SIOCBRDGARL = 0x806e694d + SIOCBRDGDADDR = 0x81286947 + SIOCBRDGDEL = 0x8054693d + SIOCBRDGDELS = 0x80546942 + SIOCBRDGFLUSH = 0x80546948 + SIOCBRDGFRL = 0x806e694e + SIOCBRDGGCACHE = 0xc0146941 + SIOCBRDGGFD = 0xc0146952 + SIOCBRDGGHT = 0xc0146951 + SIOCBRDGGIFFLGS = 0xc054693e + SIOCBRDGGMA = 0xc0146953 + SIOCBRDGGPARAM = 0xc03c6958 + SIOCBRDGGPRI = 0xc0146950 + SIOCBRDGGRL = 0xc028694f + SIOCBRDGGSIFS = 0xc054693c + SIOCBRDGGTO = 0xc0146946 + SIOCBRDGIFS = 0xc0546942 + SIOCBRDGRTS = 0xc0186943 + SIOCBRDGSADDR = 0xc1286944 + SIOCBRDGSCACHE = 0x80146940 + SIOCBRDGSFD = 0x80146952 + SIOCBRDGSHT = 0x80146951 + SIOCBRDGSIFCOST = 0x80546955 + SIOCBRDGSIFFLGS = 0x8054693f + SIOCBRDGSIFPRIO = 0x80546954 + SIOCBRDGSMA = 0x80146953 + SIOCBRDGSPRI = 0x80146950 + SIOCBRDGSPROTO = 0x8014695a + SIOCBRDGSTO = 0x80146945 + SIOCBRDGSTXHC = 0x80146959 + SIOCDELMULTI = 0x80206932 + SIOCDIFADDR = 0x80206919 + SIOCDIFGROUP = 0x80246989 + SIOCDIFPHYADDR = 0x80206949 + SIOCDLIFADDR = 0x8218691e + SIOCGETKALIVE = 0xc01869a4 + SIOCGETLABEL = 0x8020699a + SIOCGETPFLOW = 0xc02069fe + SIOCGETPFSYNC = 0xc02069f8 + SIOCGETSGCNT = 0xc0147534 + SIOCGETVIFCNT = 0xc0147533 + SIOCGETVLAN = 0xc0206990 + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0206921 + SIOCGIFASYNCMAP = 0xc020697c + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCONF = 0xc0086924 + SIOCGIFDATA = 0xc020691b + SIOCGIFDESCR = 0xc0206981 + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGATTR = 0xc024698b + SIOCGIFGENERIC = 0xc020693a + SIOCGIFGMEMB = 0xc024698a + SIOCGIFGROUP = 0xc0246988 + SIOCGIFHARDMTU = 0xc02069a5 + SIOCGIFMEDIA = 0xc0286936 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc020697e + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPDSTADDR = 0xc0206948 + SIOCGIFPRIORITY = 0xc020699c + SIOCGIFPSRCADDR = 0xc0206947 + SIOCGIFRDOMAIN = 0xc02069a0 + SIOCGIFRTLABEL = 0xc0206983 + SIOCGIFTIMESLOT = 0xc0206986 + SIOCGIFXFLAGS = 0xc020699e + SIOCGLIFADDR = 0xc218691d + SIOCGLIFPHYADDR = 0xc218694b + SIOCGLIFPHYRTABLE = 0xc02069a2 + SIOCGLIFPHYTTL = 0xc02069a9 + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCGSPPPPARAMS = 0xc0206994 + SIOCGVH = 0xc02069f6 + SIOCGVNETID = 0xc02069a7 + SIOCIFCREATE = 0x8020697a + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc00c6978 + SIOCSETKALIVE = 0x801869a3 + SIOCSETLABEL = 0x80206999 + SIOCSETPFLOW = 0x802069fd + SIOCSETPFSYNC = 0x802069f7 + SIOCSETVLAN = 0x8020698f + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c + SIOCSIFASYNCMAP = 0x8020697d + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFDESCR = 0x80206980 + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGATTR = 0x8024698c + SIOCSIFGENERIC = 0x80206939 + SIOCSIFLLADDR = 0x8020691f + SIOCSIFMEDIA = 0xc0206935 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x8020697f + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPHYADDR = 0x80406946 + SIOCSIFPRIORITY = 0x8020699b + SIOCSIFRDOMAIN = 0x8020699f + SIOCSIFRTLABEL = 0x80206982 + SIOCSIFTIMESLOT = 0x80206985 + SIOCSIFXFLAGS = 0x8020699d + SIOCSLIFPHYADDR = 0x8218694a + SIOCSLIFPHYRTABLE = 0x802069a1 + SIOCSLIFPHYTTL = 0x802069a8 + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SIOCSSPPPPARAMS = 0x80206993 + SIOCSVH = 0xc02069f5 + SIOCSVNETID = 0x802069a6 + SOCK_DGRAM = 0x2 + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_BINDANY = 0x1000 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LINGER = 0x80 + SO_NETPROC = 0x1020 + SO_OOBINLINE = 0x100 + SO_PEERCRED = 0x1022 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_RTABLE = 0x1021 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_SPLICE = 0x1023 + SO_TIMESTAMP = 0x800 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_MAXBURST = 0x4 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_SACK = 0x3 + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0x4 + TCP_MSS = 0x200 + TCP_NODELAY = 0x1 + TCP_NOPUSH = 0x10 + TCP_NSTATES = 0xb + TCP_SACK_ENABLE = 0x8 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDRAIN = 0x2000745e + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLAG_CLOCAL = 0x2 + TIOCFLAG_CRTSCTS = 0x4 + TIOCFLAG_MDMBUF = 0x8 + TIOCFLAG_PPS = 0x10 + TIOCFLAG_SOFTCAR = 0x1 + TIOCFLUSH = 0x80047410 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGFLAGS = 0x4004745d + TIOCGPGRP = 0x40047477 + TIOCGSID = 0x40047463 + TIOCGTSTAMP = 0x400c745b + TIOCGWINSZ = 0x40087468 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGET = 0x4004746a + TIOCMODG = 0x4004746a + TIOCMODS = 0x8004746d + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCREMOTE = 0x80047469 + TIOCSBRK = 0x2000747b + TIOCSCTTY = 0x20007461 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSFLAGS = 0x8004745c + TIOCSIG = 0x8004745f + TIOCSPGRP = 0x80047476 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x80047465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSTSTAMP = 0x8008745a + TIOCSWINSZ = 0x80087467 + TIOCUCNTL = 0x80047466 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VTIME = 0x11 + VWERASE = 0x4 + WALTSIG = 0x4 + WCONTINUED = 0x8 + WCOREFLAG = 0x80 + WNOHANG = 0x1 + WSTOPPED = 0x7f + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADF = syscall.Errno(0x9) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x58) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDOM = syscall.Errno(0x21) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x59) + EILSEQ = syscall.Errno(0x54) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EIPSEC = syscall.Errno(0x52) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x5b) + ELOOP = syscall.Errno(0x3e) + EMEDIUMTYPE = syscall.Errno(0x56) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x53) + ENOBUFS = syscall.Errno(0x37) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOMEDIUM = syscall.Errno(0x55) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x5a) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x5b) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x2d) + EOVERFLOW = syscall.Errno(0x57) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTHR = syscall.Signal(0x20) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "connection timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "IPsec processing failure", + 83: "attribute not found", + 84: "illegal byte sequence", + 85: "no medium found", + 86: "wrong medium type", + 87: "value too large to be stored in data type", + 88: "operation canceled", + 89: "identifier removed", + 90: "no message of desired type", + 91: "not supported", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "stopped (signal)", + 18: "stopped", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", + 32: "thread AST", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go new file mode 100644 index 0000000..1758ecc --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go @@ -0,0 +1,1583 @@ +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,openbsd + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m64 _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_BLUETOOTH = 0x20 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1a + AF_ECMA = 0x8 + AF_ENCAP = 0x1c + AF_HYLINK = 0xf + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x18 + AF_IPX = 0x17 + AF_ISDN = 0x1a + AF_ISO = 0x7 + AF_KEY = 0x1e + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x24 + AF_MPLS = 0x21 + AF_NATM = 0x1b + AF_NS = 0x6 + AF_OSI = 0x7 + AF_PUP = 0x4 + AF_ROUTE = 0x11 + AF_SIP = 0x1d + AF_SNA = 0xb + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + ARPHRD_ETHER = 0x1 + ARPHRD_FRELAY = 0xf + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B9600 = 0x2580 + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDIRFILT = 0x4004427c + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc010427b + BIOCGETIF = 0x4020426b + BIOCGFILDROP = 0x40044278 + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044273 + BIOCGRTIMEOUT = 0x4010426e + BIOCGSTATS = 0x4008426f + BIOCIMMEDIATE = 0x80044270 + BIOCLOCK = 0x20004276 + BIOCPROMISC = 0x20004269 + BIOCSBLEN = 0xc0044266 + BIOCSDIRFILT = 0x8004427d + BIOCSDLT = 0x8004427a + BIOCSETF = 0x80104267 + BIOCSETIF = 0x8020426c + BIOCSETWF = 0x80104277 + BIOCSFILDROP = 0x80044279 + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044272 + BIOCSRTIMEOUT = 0x8010426d + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIRECTION_IN = 0x1 + BPF_DIRECTION_OUT = 0x2 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x200000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0xff + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0xc + CTL_NET = 0x4 + DIOCOSFPFLUSH = 0x2000444e + DLT_ARCNET = 0x7 + DLT_ATM_RFC1483 = 0xb + DLT_AX25 = 0x3 + DLT_CHAOS = 0x5 + DLT_C_HDLC = 0x68 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0xd + DLT_FDDI = 0xa + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_LOOP = 0xc + DLT_MPLS = 0xdb + DLT_NULL = 0x0 + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0x10 + DLT_PPP_ETHER = 0x33 + DLT_PPP_SERIAL = 0x32 + DLT_PRONET = 0x4 + DLT_RAW = 0xe + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EMT_TAGOVF = 0x1 + EMUL_ENABLED = 0x1 + EMUL_NATIVE = 0x2 + ENDRUNDISC = 0x9 + ETHERMIN = 0x2e + ETHERMTU = 0x5dc + ETHERTYPE_8023 = 0x4 + ETHERTYPE_AARP = 0x80f3 + ETHERTYPE_ACCTON = 0x8390 + ETHERTYPE_AEONIC = 0x8036 + ETHERTYPE_ALPHA = 0x814a + ETHERTYPE_AMBER = 0x6008 + ETHERTYPE_AMOEBA = 0x8145 + ETHERTYPE_AOE = 0x88a2 + ETHERTYPE_APOLLO = 0x80f7 + ETHERTYPE_APOLLODOMAIN = 0x8019 + ETHERTYPE_APPLETALK = 0x809b + ETHERTYPE_APPLITEK = 0x80c7 + ETHERTYPE_ARGONAUT = 0x803a + ETHERTYPE_ARP = 0x806 + ETHERTYPE_AT = 0x809b + ETHERTYPE_ATALK = 0x809b + ETHERTYPE_ATOMIC = 0x86df + ETHERTYPE_ATT = 0x8069 + ETHERTYPE_ATTSTANFORD = 0x8008 + ETHERTYPE_AUTOPHON = 0x806a + ETHERTYPE_AXIS = 0x8856 + ETHERTYPE_BCLOOP = 0x9003 + ETHERTYPE_BOFL = 0x8102 + ETHERTYPE_CABLETRON = 0x7034 + ETHERTYPE_CHAOS = 0x804 + ETHERTYPE_COMDESIGN = 0x806c + ETHERTYPE_COMPUGRAPHIC = 0x806d + ETHERTYPE_COUNTERPOINT = 0x8062 + ETHERTYPE_CRONUS = 0x8004 + ETHERTYPE_CRONUSVLN = 0x8003 + ETHERTYPE_DCA = 0x1234 + ETHERTYPE_DDE = 0x807b + ETHERTYPE_DEBNI = 0xaaaa + ETHERTYPE_DECAM = 0x8048 + ETHERTYPE_DECCUST = 0x6006 + ETHERTYPE_DECDIAG = 0x6005 + ETHERTYPE_DECDNS = 0x803c + ETHERTYPE_DECDTS = 0x803e + ETHERTYPE_DECEXPER = 0x6000 + ETHERTYPE_DECLAST = 0x8041 + ETHERTYPE_DECLTM = 0x803f + ETHERTYPE_DECMUMPS = 0x6009 + ETHERTYPE_DECNETBIOS = 0x8040 + ETHERTYPE_DELTACON = 0x86de + ETHERTYPE_DIDDLE = 0x4321 + ETHERTYPE_DLOG1 = 0x660 + ETHERTYPE_DLOG2 = 0x661 + ETHERTYPE_DN = 0x6003 + ETHERTYPE_DOGFIGHT = 0x1989 + ETHERTYPE_DSMD = 0x8039 + ETHERTYPE_ECMA = 0x803 + ETHERTYPE_ENCRYPT = 0x803d + ETHERTYPE_ES = 0x805d + ETHERTYPE_EXCELAN = 0x8010 + ETHERTYPE_EXPERDATA = 0x8049 + ETHERTYPE_FLIP = 0x8146 + ETHERTYPE_FLOWCONTROL = 0x8808 + ETHERTYPE_FRARP = 0x808 + ETHERTYPE_GENDYN = 0x8068 + ETHERTYPE_HAYES = 0x8130 + ETHERTYPE_HIPPI_FP = 0x8180 + ETHERTYPE_HITACHI = 0x8820 + ETHERTYPE_HP = 0x8005 + ETHERTYPE_IEEEPUP = 0xa00 + ETHERTYPE_IEEEPUPAT = 0xa01 + ETHERTYPE_IMLBL = 0x4c42 + ETHERTYPE_IMLBLDIAG = 0x424c + ETHERTYPE_IP = 0x800 + ETHERTYPE_IPAS = 0x876c + ETHERTYPE_IPV6 = 0x86dd + ETHERTYPE_IPX = 0x8137 + ETHERTYPE_IPXNEW = 0x8037 + ETHERTYPE_KALPANA = 0x8582 + ETHERTYPE_LANBRIDGE = 0x8038 + ETHERTYPE_LANPROBE = 0x8888 + ETHERTYPE_LAT = 0x6004 + ETHERTYPE_LBACK = 0x9000 + ETHERTYPE_LITTLE = 0x8060 + ETHERTYPE_LLDP = 0x88cc + ETHERTYPE_LOGICRAFT = 0x8148 + ETHERTYPE_LOOPBACK = 0x9000 + ETHERTYPE_MATRA = 0x807a + ETHERTYPE_MAX = 0xffff + ETHERTYPE_MERIT = 0x807c + ETHERTYPE_MICP = 0x873a + ETHERTYPE_MOPDL = 0x6001 + ETHERTYPE_MOPRC = 0x6002 + ETHERTYPE_MOTOROLA = 0x818d + ETHERTYPE_MPLS = 0x8847 + ETHERTYPE_MPLS_MCAST = 0x8848 + ETHERTYPE_MUMPS = 0x813f + ETHERTYPE_NBPCC = 0x3c04 + ETHERTYPE_NBPCLAIM = 0x3c09 + ETHERTYPE_NBPCLREQ = 0x3c05 + ETHERTYPE_NBPCLRSP = 0x3c06 + ETHERTYPE_NBPCREQ = 0x3c02 + ETHERTYPE_NBPCRSP = 0x3c03 + ETHERTYPE_NBPDG = 0x3c07 + ETHERTYPE_NBPDGB = 0x3c08 + ETHERTYPE_NBPDLTE = 0x3c0a + ETHERTYPE_NBPRAR = 0x3c0c + ETHERTYPE_NBPRAS = 0x3c0b + ETHERTYPE_NBPRST = 0x3c0d + ETHERTYPE_NBPSCD = 0x3c01 + ETHERTYPE_NBPVCD = 0x3c00 + ETHERTYPE_NBS = 0x802 + ETHERTYPE_NCD = 0x8149 + ETHERTYPE_NESTAR = 0x8006 + ETHERTYPE_NETBEUI = 0x8191 + ETHERTYPE_NOVELL = 0x8138 + ETHERTYPE_NS = 0x600 + ETHERTYPE_NSAT = 0x601 + ETHERTYPE_NSCOMPAT = 0x807 + ETHERTYPE_NTRAILER = 0x10 + ETHERTYPE_OS9 = 0x7007 + ETHERTYPE_OS9NET = 0x7009 + ETHERTYPE_PACER = 0x80c6 + ETHERTYPE_PAE = 0x888e + ETHERTYPE_PCS = 0x4242 + ETHERTYPE_PLANNING = 0x8044 + ETHERTYPE_PPP = 0x880b + ETHERTYPE_PPPOE = 0x8864 + ETHERTYPE_PPPOEDISC = 0x8863 + ETHERTYPE_PRIMENTS = 0x7031 + ETHERTYPE_PUP = 0x200 + ETHERTYPE_PUPAT = 0x200 + ETHERTYPE_QINQ = 0x88a8 + ETHERTYPE_RACAL = 0x7030 + ETHERTYPE_RATIONAL = 0x8150 + ETHERTYPE_RAWFR = 0x6559 + ETHERTYPE_RCL = 0x1995 + ETHERTYPE_RDP = 0x8739 + ETHERTYPE_RETIX = 0x80f2 + ETHERTYPE_REVARP = 0x8035 + ETHERTYPE_SCA = 0x6007 + ETHERTYPE_SECTRA = 0x86db + ETHERTYPE_SECUREDATA = 0x876d + ETHERTYPE_SGITW = 0x817e + ETHERTYPE_SG_BOUNCE = 0x8016 + ETHERTYPE_SG_DIAG = 0x8013 + ETHERTYPE_SG_NETGAMES = 0x8014 + ETHERTYPE_SG_RESV = 0x8015 + ETHERTYPE_SIMNET = 0x5208 + ETHERTYPE_SLOW = 0x8809 + ETHERTYPE_SNA = 0x80d5 + ETHERTYPE_SNMP = 0x814c + ETHERTYPE_SONIX = 0xfaf5 + ETHERTYPE_SPIDER = 0x809f + ETHERTYPE_SPRITE = 0x500 + ETHERTYPE_STP = 0x8181 + ETHERTYPE_TALARIS = 0x812b + ETHERTYPE_TALARISMC = 0x852b + ETHERTYPE_TCPCOMP = 0x876b + ETHERTYPE_TCPSM = 0x9002 + ETHERTYPE_TEC = 0x814f + ETHERTYPE_TIGAN = 0x802f + ETHERTYPE_TRAIL = 0x1000 + ETHERTYPE_TRANSETHER = 0x6558 + ETHERTYPE_TYMSHARE = 0x802e + ETHERTYPE_UBBST = 0x7005 + ETHERTYPE_UBDEBUG = 0x900 + ETHERTYPE_UBDIAGLOOP = 0x7002 + ETHERTYPE_UBDL = 0x7000 + ETHERTYPE_UBNIU = 0x7001 + ETHERTYPE_UBNMC = 0x7003 + ETHERTYPE_VALID = 0x1600 + ETHERTYPE_VARIAN = 0x80dd + ETHERTYPE_VAXELN = 0x803b + ETHERTYPE_VEECO = 0x8067 + ETHERTYPE_VEXP = 0x805b + ETHERTYPE_VGLAB = 0x8131 + ETHERTYPE_VINES = 0xbad + ETHERTYPE_VINESECHO = 0xbaf + ETHERTYPE_VINESLOOP = 0xbae + ETHERTYPE_VITAL = 0xff00 + ETHERTYPE_VLAN = 0x8100 + ETHERTYPE_VLTLMAN = 0x8080 + ETHERTYPE_VPROD = 0x805c + ETHERTYPE_VURESERVED = 0x8147 + ETHERTYPE_WATERLOO = 0x8130 + ETHERTYPE_WELLFLEET = 0x8103 + ETHERTYPE_X25 = 0x805 + ETHERTYPE_X75 = 0x801 + ETHERTYPE_XNSSM = 0x9001 + ETHERTYPE_XTP = 0x817d + ETHER_ADDR_LEN = 0x6 + ETHER_ALIGN = 0x2 + ETHER_CRC_LEN = 0x4 + ETHER_CRC_POLY_BE = 0x4c11db6 + ETHER_CRC_POLY_LE = 0xedb88320 + ETHER_HDR_LEN = 0xe + ETHER_MAX_DIX_LEN = 0x600 + ETHER_MAX_LEN = 0x5ee + ETHER_MIN_LEN = 0x40 + ETHER_TYPE_LEN = 0x2 + ETHER_VLAN_ENCAP_LEN = 0x4 + EVFILT_AIO = -0x3 + EVFILT_PROC = -0x5 + EVFILT_READ = -0x1 + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0x7 + EVFILT_TIMER = -0x7 + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0xa + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0x7 + F_GETOWN = 0x5 + F_OK = 0x0 + F_RDLCK = 0x1 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x8 + F_SETLKW = 0x9 + F_SETOWN = 0x6 + F_UNLCK = 0x2 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFAN_ARRIVAL = 0x0 + IFAN_DEPARTURE = 0x1 + IFA_ROUTE = 0x1 + IFF_ALLMULTI = 0x200 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x8e52 + IFF_DEBUG = 0x4 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_A12MPPSWITCH = 0x82 + IFT_AAL2 = 0xbb + IFT_AAL5 = 0x31 + IFT_ADSL = 0x5e + IFT_AFLANE8023 = 0x3b + IFT_AFLANE8025 = 0x3c + IFT_ARAP = 0x58 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ASYNC = 0x54 + IFT_ATM = 0x25 + IFT_ATMDXI = 0x69 + IFT_ATMFUNI = 0x6a + IFT_ATMIMA = 0x6b + IFT_ATMLOGICAL = 0x50 + IFT_ATMRADIO = 0xbd + IFT_ATMSUBINTERFACE = 0x86 + IFT_ATMVCIENDPT = 0xc2 + IFT_ATMVIRTUAL = 0x95 + IFT_BGPPOLICYACCOUNTING = 0xa2 + IFT_BLUETOOTH = 0xf8 + IFT_BRIDGE = 0xd1 + IFT_BSC = 0x53 + IFT_CARP = 0xf7 + IFT_CCTEMUL = 0x3d + IFT_CEPT = 0x13 + IFT_CES = 0x85 + IFT_CHANNEL = 0x46 + IFT_CNR = 0x55 + IFT_COFFEE = 0x84 + IFT_COMPOSITELINK = 0x9b + IFT_DCN = 0x8d + IFT_DIGITALPOWERLINE = 0x8a + IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba + IFT_DLSW = 0x4a + IFT_DOCSCABLEDOWNSTREAM = 0x80 + IFT_DOCSCABLEMACLAYER = 0x7f + IFT_DOCSCABLEUPSTREAM = 0x81 + IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd + IFT_DS0 = 0x51 + IFT_DS0BUNDLE = 0x52 + IFT_DS1FDL = 0xaa + IFT_DS3 = 0x1e + IFT_DTM = 0x8c + IFT_DUMMY = 0xf1 + IFT_DVBASILN = 0xac + IFT_DVBASIOUT = 0xad + IFT_DVBRCCDOWNSTREAM = 0x93 + IFT_DVBRCCMACLAYER = 0x92 + IFT_DVBRCCUPSTREAM = 0x94 + IFT_ECONET = 0xce + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_EPLRS = 0x57 + IFT_ESCON = 0x49 + IFT_ETHER = 0x6 + IFT_FAITH = 0xf3 + IFT_FAST = 0x7d + IFT_FASTETHER = 0x3e + IFT_FASTETHERFX = 0x45 + IFT_FDDI = 0xf + IFT_FIBRECHANNEL = 0x38 + IFT_FRAMERELAYINTERCONNECT = 0x3a + IFT_FRAMERELAYMPI = 0x5c + IFT_FRDLCIENDPT = 0xc1 + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_FRF16MFRBUNDLE = 0xa3 + IFT_FRFORWARD = 0x9e + IFT_G703AT2MB = 0x43 + IFT_G703AT64K = 0x42 + IFT_GIF = 0xf0 + IFT_GIGABITETHERNET = 0x75 + IFT_GR303IDT = 0xb2 + IFT_GR303RDT = 0xb1 + IFT_H323GATEKEEPER = 0xa4 + IFT_H323PROXY = 0xa5 + IFT_HDH1822 = 0x3 + IFT_HDLC = 0x76 + IFT_HDSL2 = 0xa8 + IFT_HIPERLAN2 = 0xb7 + IFT_HIPPI = 0x2f + IFT_HIPPIINTERFACE = 0x39 + IFT_HOSTPAD = 0x5a + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IBM370PARCHAN = 0x48 + IFT_IDSL = 0x9a + IFT_IEEE1394 = 0x90 + IFT_IEEE80211 = 0x47 + IFT_IEEE80212 = 0x37 + IFT_IEEE8023ADLAG = 0xa1 + IFT_IFGSN = 0x91 + IFT_IMT = 0xbe + IFT_INFINIBAND = 0xc7 + IFT_INTERLEAVE = 0x7c + IFT_IP = 0x7e + IFT_IPFORWARD = 0x8e + IFT_IPOVERATM = 0x72 + IFT_IPOVERCDLC = 0x6d + IFT_IPOVERCLAW = 0x6e + IFT_IPSWITCH = 0x4e + IFT_ISDN = 0x3f + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISDNS = 0x4b + IFT_ISDNU = 0x4c + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88025CRFPINT = 0x62 + IFT_ISO88025DTR = 0x56 + IFT_ISO88025FIBER = 0x73 + IFT_ISO88026 = 0xa + IFT_ISUP = 0xb3 + IFT_L2VLAN = 0x87 + IFT_L3IPVLAN = 0x88 + IFT_L3IPXVLAN = 0x89 + IFT_LAPB = 0x10 + IFT_LAPD = 0x4d + IFT_LAPF = 0x77 + IFT_LINEGROUP = 0xd2 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_MPC = 0x71 + IFT_MPLS = 0xa6 + IFT_MPLSTUNNEL = 0x96 + IFT_MSDSL = 0x8f + IFT_MVL = 0xbf + IFT_MYRINET = 0x63 + IFT_NFAS = 0xaf + IFT_NSIP = 0x1b + IFT_OPTICALCHANNEL = 0xc3 + IFT_OPTICALTRANSPORT = 0xc4 + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PFLOG = 0xf5 + IFT_PFLOW = 0xf9 + IFT_PFSYNC = 0xf6 + IFT_PLC = 0xae + IFT_PON155 = 0xcf + IFT_PON622 = 0xd0 + IFT_POS = 0xab + IFT_PPP = 0x17 + IFT_PPPMULTILINKBUNDLE = 0x6c + IFT_PROPATM = 0xc5 + IFT_PROPBWAP2MP = 0xb8 + IFT_PROPCNLS = 0x59 + IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 + IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 + IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PROPWIRELESSP2P = 0x9d + IFT_PTPSERIAL = 0x16 + IFT_PVC = 0xf2 + IFT_Q2931 = 0xc9 + IFT_QLLC = 0x44 + IFT_RADIOMAC = 0xbc + IFT_RADSL = 0x5f + IFT_REACHDSL = 0xc0 + IFT_RFC1483 = 0x9f + IFT_RS232 = 0x21 + IFT_RSRB = 0x4f + IFT_SDLC = 0x11 + IFT_SDSL = 0x60 + IFT_SHDSL = 0xa9 + IFT_SIP = 0x1f + IFT_SIPSIG = 0xcc + IFT_SIPTG = 0xcb + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETOVERHEADCHANNEL = 0xb9 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_SRP = 0x97 + IFT_SS7SIGLINK = 0x9c + IFT_STACKTOSTACK = 0x6f + IFT_STARLAN = 0xb + IFT_T1 = 0x12 + IFT_TDLC = 0x74 + IFT_TELINK = 0xc8 + IFT_TERMPAD = 0x5b + IFT_TR008 = 0xb0 + IFT_TRANSPHDLC = 0x7b + IFT_TUNNEL = 0x83 + IFT_ULTRA = 0x1d + IFT_USB = 0xa0 + IFT_V11 = 0x40 + IFT_V35 = 0x2d + IFT_V36 = 0x41 + IFT_V37 = 0x78 + IFT_VDSL = 0x61 + IFT_VIRTUALIPADDRESS = 0x70 + IFT_VIRTUALTG = 0xca + IFT_VOICEDID = 0xd5 + IFT_VOICEEM = 0x64 + IFT_VOICEEMFGD = 0xd3 + IFT_VOICEENCAP = 0x67 + IFT_VOICEFGDEANA = 0xd4 + IFT_VOICEFXO = 0x65 + IFT_VOICEFXS = 0x66 + IFT_VOICEOVERATM = 0x98 + IFT_VOICEOVERCABLE = 0xc6 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25HUNTGROUP = 0x7a + IFT_X25MLP = 0x79 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LOOPBACKNET = 0x7f + IN_RFC3021_HOST = 0x1 + IN_RFC3021_NET = 0xfffffffe + IN_RFC3021_NSHIFT = 0x1f + IPPROTO_AH = 0x33 + IPPROTO_CARP = 0x70 + IPPROTO_DIVERT = 0x102 + IPPROTO_DIVERT_INIT = 0x2 + IPPROTO_DIVERT_RESP = 0x1 + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPIP = 0x4 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x103 + IPPROTO_MOBILE = 0x37 + IPPROTO_MPLS = 0x89 + IPPROTO_NONE = 0x3b + IPPROTO_PFSYNC = 0xf0 + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPV6_AUTH_LEVEL = 0x35 + IPV6_AUTOFLOWLABEL = 0x3b + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_DONTFRAG = 0x3e + IPV6_DSTOPTS = 0x32 + IPV6_ESP_NETWORK_LEVEL = 0x37 + IPV6_ESP_TRANS_LEVEL = 0x36 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x78 + IPV6_HLIMDEC = 0x1 + IPV6_HOPLIMIT = 0x2f + IPV6_HOPOPTS = 0x31 + IPV6_IPCOMP_LEVEL = 0x3c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXPACKET = 0xffff + IPV6_MMTU = 0x500 + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_NEXTHOP = 0x30 + IPV6_OPTIONS = 0x1 + IPV6_PATHMTU = 0x2c + IPV6_PIPEX = 0x3f + IPV6_PKTINFO = 0x2e + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVDSTPORT = 0x40 + IPV6_RECVHOPLIMIT = 0x25 + IPV6_RECVHOPOPTS = 0x27 + IPV6_RECVPATHMTU = 0x2b + IPV6_RECVPKTINFO = 0x24 + IPV6_RECVRTHDR = 0x26 + IPV6_RECVTCLASS = 0x39 + IPV6_RTABLE = 0x1021 + IPV6_RTHDR = 0x33 + IPV6_RTHDRDSTOPTS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x3d + IPV6_UNICAST_HOPS = 0x4 + IPV6_USE_MIN_MTU = 0x2a + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_AUTH_LEVEL = 0x14 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DIVERTFL = 0x1022 + IP_DROP_MEMBERSHIP = 0xd + IP_ESP_NETWORK_LEVEL = 0x16 + IP_ESP_TRANS_LEVEL = 0x15 + IP_HDRINCL = 0x2 + IP_IPCOMP_LEVEL = 0x1d + IP_IPSECFLOWINFO = 0x24 + IP_IPSEC_LOCAL_AUTH = 0x1b + IP_IPSEC_LOCAL_CRED = 0x19 + IP_IPSEC_LOCAL_ID = 0x17 + IP_IPSEC_REMOTE_AUTH = 0x1c + IP_IPSEC_REMOTE_CRED = 0x1a + IP_IPSEC_REMOTE_ID = 0x18 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0xfff + IP_MF = 0x2000 + IP_MINTTL = 0x20 + IP_MIN_MEMBERSHIPS = 0xf + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x1 + IP_PIPEX = 0x22 + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVDSTPORT = 0x21 + IP_RECVIF = 0x1e + IP_RECVOPTS = 0x5 + IP_RECVRETOPTS = 0x6 + IP_RECVRTABLE = 0x23 + IP_RECVTTL = 0x1f + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RTABLE = 0x1021 + IP_TOS = 0x3 + IP_TTL = 0x4 + ISIG = 0x80 + ISTRIP = 0x20 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LCNT_OVERLOAD_FLUSH = 0x6 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x6 + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_SPACEAVAIL = 0x5 + MADV_WILLNEED = 0x3 + MAP_ANON = 0x1000 + MAP_COPY = 0x4 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_FLAGMASK = 0x1ff7 + MAP_HASSEMAPHORE = 0x200 + MAP_INHERIT = 0x80 + MAP_INHERIT_COPY = 0x1 + MAP_INHERIT_DONATE_COPY = 0x3 + MAP_INHERIT_NONE = 0x2 + MAP_INHERIT_SHARE = 0x0 + MAP_NOEXTEND = 0x100 + MAP_NORESERVE = 0x40 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_SHARED = 0x1 + MAP_TRYFIXED = 0x400 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_BCAST = 0x100 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOR = 0x8 + MSG_MCAST = 0x200 + MSG_NOSIGNAL = 0x400 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x4 + MS_SYNC = 0x2 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_MAXID = 0x6 + NET_RT_STATS = 0x4 + NET_RT_TABLE = 0x5 + NOFLSH = 0x80000000 + NOTE_ATTRIB = 0x8 + NOTE_CHILD = 0x4 + NOTE_DELETE = 0x1 + NOTE_EOF = 0x2 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXTEND = 0x4 + NOTE_FORK = 0x40000000 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_PCTRLMASK = 0xf0000000 + NOTE_PDATAMASK = 0xfffff + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_TRUNCATE = 0x80 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + ONLCR = 0x2 + ONLRET = 0x80 + ONOCR = 0x40 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x10000 + O_CREAT = 0x200 + O_DIRECTORY = 0x20000 + O_DSYNC = 0x80 + O_EXCL = 0x800 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x8000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x80 + O_SHLOCK = 0x10 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PF_FLUSH = 0x1 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_LABEL = 0xa + RTAX_MAX = 0xb + RTAX_NETMASK = 0x2 + RTAX_SRC = 0x8 + RTAX_SRCMASK = 0x9 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_LABEL = 0x400 + RTA_NETMASK = 0x4 + RTA_SRC = 0x100 + RTA_SRCMASK = 0x200 + RTF_ANNOUNCE = 0x4000 + RTF_BLACKHOLE = 0x1000 + RTF_CLONED = 0x10000 + RTF_CLONING = 0x100 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_FMASK = 0x10f808 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_LLINFO = 0x400 + RTF_MASK = 0x80 + RTF_MODIFIED = 0x20 + RTF_MPATH = 0x40000 + RTF_MPLS = 0x100000 + RTF_PERMANENT_ARP = 0x2000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x2000 + RTF_REJECT = 0x8 + RTF_SOURCE = 0x20000 + RTF_STATIC = 0x800 + RTF_TUNNEL = 0x100000 + RTF_UP = 0x1 + RTF_USETRAILERS = 0x8000 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DESYNC = 0x10 + RTM_GET = 0x4 + RTM_IFANNOUNCE = 0xf + RTM_IFINFO = 0xe + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MAXSIZE = 0x800 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x5 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RT_TABLEID_MAX = 0xff + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x4 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCAIFADDR = 0x8040691a + SIOCAIFGROUP = 0x80286987 + SIOCALIFADDR = 0x8218691c + SIOCATMARK = 0x40047307 + SIOCBRDGADD = 0x8058693c + SIOCBRDGADDS = 0x80586941 + SIOCBRDGARL = 0x806e694d + SIOCBRDGDADDR = 0x81286947 + SIOCBRDGDEL = 0x8058693d + SIOCBRDGDELS = 0x80586942 + SIOCBRDGFLUSH = 0x80586948 + SIOCBRDGFRL = 0x806e694e + SIOCBRDGGCACHE = 0xc0146941 + SIOCBRDGGFD = 0xc0146952 + SIOCBRDGGHT = 0xc0146951 + SIOCBRDGGIFFLGS = 0xc058693e + SIOCBRDGGMA = 0xc0146953 + SIOCBRDGGPARAM = 0xc0406958 + SIOCBRDGGPRI = 0xc0146950 + SIOCBRDGGRL = 0xc030694f + SIOCBRDGGSIFS = 0xc058693c + SIOCBRDGGTO = 0xc0146946 + SIOCBRDGIFS = 0xc0586942 + SIOCBRDGRTS = 0xc0206943 + SIOCBRDGSADDR = 0xc1286944 + SIOCBRDGSCACHE = 0x80146940 + SIOCBRDGSFD = 0x80146952 + SIOCBRDGSHT = 0x80146951 + SIOCBRDGSIFCOST = 0x80586955 + SIOCBRDGSIFFLGS = 0x8058693f + SIOCBRDGSIFPRIO = 0x80586954 + SIOCBRDGSMA = 0x80146953 + SIOCBRDGSPRI = 0x80146950 + SIOCBRDGSPROTO = 0x8014695a + SIOCBRDGSTO = 0x80146945 + SIOCBRDGSTXHC = 0x80146959 + SIOCDELMULTI = 0x80206932 + SIOCDIFADDR = 0x80206919 + SIOCDIFGROUP = 0x80286989 + SIOCDIFPHYADDR = 0x80206949 + SIOCDLIFADDR = 0x8218691e + SIOCGETKALIVE = 0xc01869a4 + SIOCGETLABEL = 0x8020699a + SIOCGETPFLOW = 0xc02069fe + SIOCGETPFSYNC = 0xc02069f8 + SIOCGETSGCNT = 0xc0207534 + SIOCGETVIFCNT = 0xc0287533 + SIOCGETVLAN = 0xc0206990 + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0206921 + SIOCGIFASYNCMAP = 0xc020697c + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCONF = 0xc0106924 + SIOCGIFDATA = 0xc020691b + SIOCGIFDESCR = 0xc0206981 + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGATTR = 0xc028698b + SIOCGIFGENERIC = 0xc020693a + SIOCGIFGMEMB = 0xc028698a + SIOCGIFGROUP = 0xc0286988 + SIOCGIFHARDMTU = 0xc02069a5 + SIOCGIFMEDIA = 0xc0306936 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc020697e + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPDSTADDR = 0xc0206948 + SIOCGIFPRIORITY = 0xc020699c + SIOCGIFPSRCADDR = 0xc0206947 + SIOCGIFRDOMAIN = 0xc02069a0 + SIOCGIFRTLABEL = 0xc0206983 + SIOCGIFTIMESLOT = 0xc0206986 + SIOCGIFXFLAGS = 0xc020699e + SIOCGLIFADDR = 0xc218691d + SIOCGLIFPHYADDR = 0xc218694b + SIOCGLIFPHYRTABLE = 0xc02069a2 + SIOCGLIFPHYTTL = 0xc02069a9 + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCGSPPPPARAMS = 0xc0206994 + SIOCGVH = 0xc02069f6 + SIOCGVNETID = 0xc02069a7 + SIOCIFCREATE = 0x8020697a + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc0106978 + SIOCSETKALIVE = 0x801869a3 + SIOCSETLABEL = 0x80206999 + SIOCSETPFLOW = 0x802069fd + SIOCSETPFSYNC = 0x802069f7 + SIOCSETVLAN = 0x8020698f + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c + SIOCSIFASYNCMAP = 0x8020697d + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFDESCR = 0x80206980 + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGATTR = 0x8028698c + SIOCSIFGENERIC = 0x80206939 + SIOCSIFLLADDR = 0x8020691f + SIOCSIFMEDIA = 0xc0206935 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x8020697f + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPHYADDR = 0x80406946 + SIOCSIFPRIORITY = 0x8020699b + SIOCSIFRDOMAIN = 0x8020699f + SIOCSIFRTLABEL = 0x80206982 + SIOCSIFTIMESLOT = 0x80206985 + SIOCSIFXFLAGS = 0x8020699d + SIOCSLIFPHYADDR = 0x8218694a + SIOCSLIFPHYRTABLE = 0x802069a1 + SIOCSLIFPHYTTL = 0x802069a8 + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SIOCSSPPPPARAMS = 0x80206993 + SIOCSVH = 0xc02069f5 + SIOCSVNETID = 0x802069a6 + SOCK_DGRAM = 0x2 + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_BINDANY = 0x1000 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LINGER = 0x80 + SO_NETPROC = 0x1020 + SO_OOBINLINE = 0x100 + SO_PEERCRED = 0x1022 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_RTABLE = 0x1021 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_SPLICE = 0x1023 + SO_TIMESTAMP = 0x800 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_MAXBURST = 0x4 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_SACK = 0x3 + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0x4 + TCP_MSS = 0x200 + TCP_NODELAY = 0x1 + TCP_NOPUSH = 0x10 + TCP_NSTATES = 0xb + TCP_SACK_ENABLE = 0x8 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDRAIN = 0x2000745e + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLAG_CLOCAL = 0x2 + TIOCFLAG_CRTSCTS = 0x4 + TIOCFLAG_MDMBUF = 0x8 + TIOCFLAG_PPS = 0x10 + TIOCFLAG_SOFTCAR = 0x1 + TIOCFLUSH = 0x80047410 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGFLAGS = 0x4004745d + TIOCGPGRP = 0x40047477 + TIOCGSID = 0x40047463 + TIOCGTSTAMP = 0x4010745b + TIOCGWINSZ = 0x40087468 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGET = 0x4004746a + TIOCMODG = 0x4004746a + TIOCMODS = 0x8004746d + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCREMOTE = 0x80047469 + TIOCSBRK = 0x2000747b + TIOCSCTTY = 0x20007461 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSFLAGS = 0x8004745c + TIOCSIG = 0x8004745f + TIOCSPGRP = 0x80047476 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x80047465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSTSTAMP = 0x8008745a + TIOCSWINSZ = 0x80087467 + TIOCUCNTL = 0x80047466 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VTIME = 0x11 + VWERASE = 0x4 + WALTSIG = 0x4 + WCONTINUED = 0x8 + WCOREFLAG = 0x80 + WNOHANG = 0x1 + WSTOPPED = 0x7f + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADF = syscall.Errno(0x9) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x58) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDOM = syscall.Errno(0x21) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x59) + EILSEQ = syscall.Errno(0x54) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EIPSEC = syscall.Errno(0x52) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x5b) + ELOOP = syscall.Errno(0x3e) + EMEDIUMTYPE = syscall.Errno(0x56) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x53) + ENOBUFS = syscall.Errno(0x37) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOMEDIUM = syscall.Errno(0x55) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x5a) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x5b) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x2d) + EOVERFLOW = syscall.Errno(0x57) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTHR = syscall.Signal(0x20) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "connection timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "IPsec processing failure", + 83: "attribute not found", + 84: "illegal byte sequence", + 85: "no medium found", + 86: "wrong medium type", + 87: "value too large to be stored in data type", + 88: "operation canceled", + 89: "identifier removed", + 90: "no message of desired type", + 91: "not supported", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "stopped (signal)", + 18: "stopped", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", + 32: "thread AST", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go new file mode 100644 index 0000000..a08922b --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go @@ -0,0 +1,1436 @@ +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,solaris + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m64 _const.go + +package unix + +import "syscall" + +const ( + AF_802 = 0x12 + AF_APPLETALK = 0x10 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_ECMA = 0x8 + AF_FILE = 0x1 + AF_GOSIP = 0x16 + AF_HYLINK = 0xf + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x1a + AF_INET_OFFLOAD = 0x1e + AF_IPX = 0x17 + AF_KEY = 0x1b + AF_LAT = 0xe + AF_LINK = 0x19 + AF_LOCAL = 0x1 + AF_MAX = 0x20 + AF_NBS = 0x7 + AF_NCA = 0x1c + AF_NIT = 0x11 + AF_NS = 0x6 + AF_OSI = 0x13 + AF_OSINET = 0x15 + AF_PACKET = 0x20 + AF_POLICY = 0x1d + AF_PUP = 0x4 + AF_ROUTE = 0x18 + AF_SNA = 0xb + AF_TRILL = 0x1f + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_X25 = 0x14 + ARPHRD_ARCNET = 0x7 + ARPHRD_ATM = 0x10 + ARPHRD_AX25 = 0x3 + ARPHRD_CHAOS = 0x5 + ARPHRD_EETHER = 0x2 + ARPHRD_ETHER = 0x1 + ARPHRD_FC = 0x12 + ARPHRD_FRAME = 0xf + ARPHRD_HDLC = 0x11 + ARPHRD_IB = 0x20 + ARPHRD_IEEE802 = 0x6 + ARPHRD_IPATM = 0x13 + ARPHRD_METRICOM = 0x17 + ARPHRD_TUNNEL = 0x1f + B0 = 0x0 + B110 = 0x3 + B115200 = 0x12 + B1200 = 0x9 + B134 = 0x4 + B150 = 0x5 + B153600 = 0x13 + B1800 = 0xa + B19200 = 0xe + B200 = 0x6 + B230400 = 0x14 + B2400 = 0xb + B300 = 0x7 + B307200 = 0x15 + B38400 = 0xf + B460800 = 0x16 + B4800 = 0xc + B50 = 0x1 + B57600 = 0x10 + B600 = 0x8 + B75 = 0x2 + B76800 = 0x11 + B921600 = 0x17 + B9600 = 0xd + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = -0x3fefbd89 + BIOCGDLTLIST32 = -0x3ff7bd89 + BIOCGETIF = 0x4020426b + BIOCGETLIF = 0x4078426b + BIOCGHDRCMPLT = 0x40044274 + BIOCGRTIMEOUT = 0x4010427b + BIOCGRTIMEOUT32 = 0x4008427b + BIOCGSEESENT = 0x40044278 + BIOCGSTATS = 0x4080426f + BIOCGSTATSOLD = 0x4008426f + BIOCIMMEDIATE = -0x7ffbbd90 + BIOCPROMISC = 0x20004269 + BIOCSBLEN = -0x3ffbbd9a + BIOCSDLT = -0x7ffbbd8a + BIOCSETF = -0x7fefbd99 + BIOCSETF32 = -0x7ff7bd99 + BIOCSETIF = -0x7fdfbd94 + BIOCSETLIF = -0x7f87bd94 + BIOCSHDRCMPLT = -0x7ffbbd8b + BIOCSRTIMEOUT = -0x7fefbd86 + BIOCSRTIMEOUT32 = -0x7ff7bd86 + BIOCSSEESENT = -0x7ffbbd87 + BIOCSTCPF = -0x7fefbd8e + BIOCSUDPF = -0x7fefbd8d + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DFLTBUFSIZE = 0x100000 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x1000000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x800 + CLOCK_HIGHRES = 0x4 + CLOCK_LEVEL = 0xa + CLOCK_MONOTONIC = 0x4 + CLOCK_PROCESS_CPUTIME_ID = 0x5 + CLOCK_PROF = 0x2 + CLOCK_REALTIME = 0x3 + CLOCK_THREAD_CPUTIME_ID = 0x2 + CLOCK_VIRTUAL = 0x1 + CREAD = 0x80 + CS5 = 0x0 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIZE = 0x30 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x40 + CSUSP = 0x1a + CSWTCH = 0x1a + DLT_AIRONET_HEADER = 0x78 + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_BACNET_MS_TP = 0xa5 + DLT_CHAOS = 0x5 + DLT_CISCO_IOS = 0x76 + DLT_C_HDLC = 0x68 + DLT_DOCSIS = 0x8f + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FDDI = 0xa + DLT_FRELAY = 0x6b + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_HDLC = 0x10 + DLT_HHDLC = 0x79 + DLT_HIPPI = 0xf + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IPNET = 0xe2 + DLT_IPOIB = 0xa2 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0xe + DLT_PPP_PPPD = 0xa6 + DLT_PRISM_HEADER = 0x77 + DLT_PRONET = 0x4 + DLT_RAW = 0xc + DLT_RAWAF_MASK = 0x2240000 + DLT_RIO = 0x7c + DLT_SCCP = 0x8e + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xd + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + ECHO = 0x8 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 + EMPTY_SET = 0x0 + EMT_CPCOVF = 0x1 + EQUALITY_CHECK = 0x0 + EXTA = 0xe + EXTB = 0xf + FD_CLOEXEC = 0x1 + FD_NFDBITS = 0x40 + FD_SETSIZE = 0x10000 + FLUSHALL = 0x1 + FLUSHDATA = 0x0 + FLUSHO = 0x2000 + F_ALLOCSP = 0xa + F_ALLOCSP64 = 0xa + F_BADFD = 0x2e + F_BLKSIZE = 0x13 + F_BLOCKS = 0x12 + F_CHKFL = 0x8 + F_COMPAT = 0x8 + F_DUP2FD = 0x9 + F_DUP2FD_CLOEXEC = 0x24 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x25 + F_FREESP = 0xb + F_FREESP64 = 0xb + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0xe + F_GETLK64 = 0xe + F_GETOWN = 0x17 + F_GETXFL = 0x2d + F_HASREMOTELOCKS = 0x1a + F_ISSTREAM = 0xd + F_MANDDNY = 0x10 + F_MDACC = 0x20 + F_NODNY = 0x0 + F_NPRIV = 0x10 + F_PRIV = 0xf + F_QUOTACTL = 0x11 + F_RDACC = 0x1 + F_RDDNY = 0x1 + F_RDLCK = 0x1 + F_REVOKE = 0x19 + F_RMACC = 0x4 + F_RMDNY = 0x4 + F_RWACC = 0x3 + F_RWDNY = 0x3 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x6 + F_SETLK64 = 0x6 + F_SETLK64_NBMAND = 0x2a + F_SETLKW = 0x7 + F_SETLKW64 = 0x7 + F_SETLK_NBMAND = 0x2a + F_SETOWN = 0x18 + F_SHARE = 0x28 + F_SHARE_NBMAND = 0x2b + F_UNLCK = 0x3 + F_UNLKSYS = 0x4 + F_UNSHARE = 0x29 + F_WRACC = 0x2 + F_WRDNY = 0x2 + F_WRLCK = 0x2 + HUPCL = 0x400 + ICANON = 0x2 + ICRNL = 0x100 + IEXTEN = 0x8000 + IFF_ADDRCONF = 0x80000 + IFF_ALLMULTI = 0x200 + IFF_ANYCAST = 0x400000 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x7f203003b5a + IFF_COS_ENABLED = 0x200000000 + IFF_DEBUG = 0x4 + IFF_DEPRECATED = 0x40000 + IFF_DHCPRUNNING = 0x4000 + IFF_DUPLICATE = 0x4000000000 + IFF_FAILED = 0x10000000 + IFF_FIXEDMTU = 0x1000000000 + IFF_INACTIVE = 0x40000000 + IFF_INTELLIGENT = 0x400 + IFF_IPMP = 0x8000000000 + IFF_IPMP_CANTCHANGE = 0x10000000 + IFF_IPMP_INVALID = 0x1ec200080 + IFF_IPV4 = 0x1000000 + IFF_IPV6 = 0x2000000 + IFF_L3PROTECT = 0x40000000000 + IFF_LOOPBACK = 0x8 + IFF_MULTICAST = 0x800 + IFF_MULTI_BCAST = 0x1000 + IFF_NOACCEPT = 0x4000000 + IFF_NOARP = 0x80 + IFF_NOFAILOVER = 0x8000000 + IFF_NOLINKLOCAL = 0x20000000000 + IFF_NOLOCAL = 0x20000 + IFF_NONUD = 0x200000 + IFF_NORTEXCH = 0x800000 + IFF_NOTRAILERS = 0x20 + IFF_NOXMIT = 0x10000 + IFF_OFFLINE = 0x80000000 + IFF_POINTOPOINT = 0x10 + IFF_PREFERRED = 0x400000000 + IFF_PRIVATE = 0x8000 + IFF_PROMISC = 0x100 + IFF_ROUTER = 0x100000 + IFF_RUNNING = 0x40 + IFF_STANDBY = 0x20000000 + IFF_TEMPORARY = 0x800000000 + IFF_UNNUMBERED = 0x2000 + IFF_UP = 0x1 + IFF_VIRTUAL = 0x2000000000 + IFF_VRRP = 0x10000000000 + IFF_XRESOLV = 0x100000000 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_6TO4 = 0xca + IFT_AAL5 = 0x31 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ATM = 0x25 + IFT_CEPT = 0x13 + IFT_DS3 = 0x1e + IFT_EON = 0x19 + IFT_ETHER = 0x6 + IFT_FDDI = 0xf + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_HDH1822 = 0x3 + IFT_HIPPI = 0x2f + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IB = 0xc7 + IFT_IPV4 = 0xc8 + IFT_IPV6 = 0xc9 + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88026 = 0xa + IFT_LAPB = 0x10 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_NSIP = 0x1b + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PPP = 0x17 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PTPSERIAL = 0x16 + IFT_RS232 = 0x21 + IFT_SDLC = 0x11 + IFT_SIP = 0x1f + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_STARLAN = 0xb + IFT_T1 = 0x12 + IFT_ULTRA = 0x1d + IFT_V35 = 0x2d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_AUTOCONF_MASK = 0xffff0000 + IN_AUTOCONF_NET = 0xa9fe0000 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_CLASSE_NET = 0xffffffff + IN_LOOPBACKNET = 0x7f + IN_PRIVATE12_MASK = 0xfff00000 + IN_PRIVATE12_NET = 0xac100000 + IN_PRIVATE16_MASK = 0xffff0000 + IN_PRIVATE16_NET = 0xc0a80000 + IN_PRIVATE8_MASK = 0xff000000 + IN_PRIVATE8_NET = 0xa000000 + IPPROTO_AH = 0x33 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x4 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_HELLO = 0x3f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPV6 = 0x29 + IPPROTO_MAX = 0x100 + IPPROTO_ND = 0x4d + IPPROTO_NONE = 0x3b + IPPROTO_OSPF = 0x59 + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 + IPPROTO_TCP = 0x6 + IPPROTO_UDP = 0x11 + IPV6_ADD_MEMBERSHIP = 0x9 + IPV6_BOUND_IF = 0x41 + IPV6_CHECKSUM = 0x18 + IPV6_DONTFRAG = 0x21 + IPV6_DROP_MEMBERSHIP = 0xa + IPV6_DSTOPTS = 0xf + IPV6_FLOWINFO_FLOWLABEL = 0xffff0f00 + IPV6_FLOWINFO_TCLASS = 0xf00f + IPV6_HOPLIMIT = 0xc + IPV6_HOPOPTS = 0xe + IPV6_JOIN_GROUP = 0x9 + IPV6_LEAVE_GROUP = 0xa + IPV6_MULTICAST_HOPS = 0x7 + IPV6_MULTICAST_IF = 0x6 + IPV6_MULTICAST_LOOP = 0x8 + IPV6_NEXTHOP = 0xd + IPV6_PAD1_OPT = 0x0 + IPV6_PATHMTU = 0x25 + IPV6_PKTINFO = 0xb + IPV6_PREFER_SRC_CGA = 0x20 + IPV6_PREFER_SRC_CGADEFAULT = 0x10 + IPV6_PREFER_SRC_CGAMASK = 0x30 + IPV6_PREFER_SRC_COA = 0x2 + IPV6_PREFER_SRC_DEFAULT = 0x15 + IPV6_PREFER_SRC_HOME = 0x1 + IPV6_PREFER_SRC_MASK = 0x3f + IPV6_PREFER_SRC_MIPDEFAULT = 0x1 + IPV6_PREFER_SRC_MIPMASK = 0x3 + IPV6_PREFER_SRC_NONCGA = 0x10 + IPV6_PREFER_SRC_PUBLIC = 0x4 + IPV6_PREFER_SRC_TMP = 0x8 + IPV6_PREFER_SRC_TMPDEFAULT = 0x4 + IPV6_PREFER_SRC_TMPMASK = 0xc + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVHOPLIMIT = 0x13 + IPV6_RECVHOPOPTS = 0x14 + IPV6_RECVPATHMTU = 0x24 + IPV6_RECVPKTINFO = 0x12 + IPV6_RECVRTHDR = 0x16 + IPV6_RECVRTHDRDSTOPTS = 0x17 + IPV6_RECVTCLASS = 0x19 + IPV6_RTHDR = 0x10 + IPV6_RTHDRDSTOPTS = 0x11 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SEC_OPT = 0x22 + IPV6_SRC_PREFERENCES = 0x23 + IPV6_TCLASS = 0x26 + IPV6_UNICAST_HOPS = 0x5 + IPV6_UNSPEC_SRC = 0x42 + IPV6_USE_MIN_MTU = 0x20 + IPV6_V6ONLY = 0x27 + IP_ADD_MEMBERSHIP = 0x13 + IP_ADD_SOURCE_MEMBERSHIP = 0x17 + IP_BLOCK_SOURCE = 0x15 + IP_BOUND_IF = 0x41 + IP_BROADCAST = 0x106 + IP_BROADCAST_TTL = 0x43 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DHCPINIT_IF = 0x45 + IP_DONTFRAG = 0x1b + IP_DONTROUTE = 0x105 + IP_DROP_MEMBERSHIP = 0x14 + IP_DROP_SOURCE_MEMBERSHIP = 0x18 + IP_HDRINCL = 0x2 + IP_MAXPACKET = 0xffff + IP_MF = 0x2000 + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x10 + IP_MULTICAST_LOOP = 0x12 + IP_MULTICAST_TTL = 0x11 + IP_NEXTHOP = 0x19 + IP_OPTIONS = 0x1 + IP_PKTINFO = 0x1a + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x9 + IP_RECVOPTS = 0x5 + IP_RECVPKTINFO = 0x1a + IP_RECVRETOPTS = 0x6 + IP_RECVSLLA = 0xa + IP_RECVTTL = 0xb + IP_RETOPTS = 0x8 + IP_REUSEADDR = 0x104 + IP_SEC_OPT = 0x22 + IP_TOS = 0x3 + IP_TTL = 0x4 + IP_UNBLOCK_SOURCE = 0x16 + IP_UNSPEC_SRC = 0x42 + ISIG = 0x1 + ISTRIP = 0x20 + IXANY = 0x800 + IXOFF = 0x1000 + IXON = 0x400 + MADV_ACCESS_DEFAULT = 0x6 + MADV_ACCESS_LWP = 0x7 + MADV_ACCESS_MANY = 0x8 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x5 + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_WILLNEED = 0x3 + MAP_32BIT = 0x80 + MAP_ALIGN = 0x200 + MAP_ANON = 0x100 + MAP_ANONYMOUS = 0x100 + MAP_FIXED = 0x10 + MAP_INITDATA = 0x800 + MAP_NORESERVE = 0x40 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_SHARED = 0x1 + MAP_TEXT = 0x400 + MAP_TYPE = 0xf + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_CTRUNC = 0x10 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_DUPCTRL = 0x800 + MSG_EOR = 0x8 + MSG_MAXIOVLEN = 0x10 + MSG_NOTIFICATION = 0x100 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_TRUNC = 0x20 + MSG_WAITALL = 0x40 + MSG_XPG4_2 = 0x8000 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x2 + MS_OLDSYNC = 0x0 + MS_SYNC = 0x4 + M_FLUSH = 0x86 + NOFLSH = 0x80 + OCRNL = 0x8 + OFDEL = 0x80 + OFILL = 0x40 + ONLCR = 0x4 + ONLRET = 0x20 + ONOCR = 0x10 + OPENFAIL = -0x1 + OPOST = 0x1 + O_ACCMODE = 0x600003 + O_APPEND = 0x8 + O_CLOEXEC = 0x800000 + O_CREAT = 0x100 + O_DSYNC = 0x40 + O_EXCL = 0x400 + O_EXEC = 0x400000 + O_LARGEFILE = 0x2000 + O_NDELAY = 0x4 + O_NOCTTY = 0x800 + O_NOFOLLOW = 0x20000 + O_NOLINKS = 0x40000 + O_NONBLOCK = 0x80 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x8000 + O_SEARCH = 0x200000 + O_SIOCGIFCONF = -0x3ff796ec + O_SIOCGLIFCONF = -0x3fef9688 + O_SYNC = 0x10 + O_TRUNC = 0x200 + O_WRONLY = 0x1 + O_XATTR = 0x4000 + PARENB = 0x100 + PAREXT = 0x100000 + PARMRK = 0x8 + PARODD = 0x200 + PENDIN = 0x4000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + RLIMIT_AS = 0x6 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x5 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = -0x3 + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0x9 + RTAX_NETMASK = 0x2 + RTAX_SRC = 0x8 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_NETMASK = 0x4 + RTA_NUMBITS = 0x9 + RTA_SRC = 0x100 + RTF_BLACKHOLE = 0x1000 + RTF_CLONING = 0x100 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_INDIRECT = 0x40000 + RTF_KERNEL = 0x80000 + RTF_LLINFO = 0x400 + RTF_MASK = 0x80 + RTF_MODIFIED = 0x20 + RTF_MULTIRT = 0x10000 + RTF_PRIVATE = 0x2000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_REJECT = 0x8 + RTF_SETSRC = 0x20000 + RTF_STATIC = 0x800 + RTF_UP = 0x1 + RTF_XRESOLVE = 0x200 + RTF_ZONE = 0x100000 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_CHGADDR = 0xf + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_FREEADDR = 0x10 + RTM_GET = 0x4 + RTM_IFINFO = 0xe + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_VERSION = 0x3 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RT_AWARE = 0x1 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + SCM_RIGHTS = 0x1010 + SCM_TIMESTAMP = 0x1013 + SCM_UCRED = 0x1012 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIG2STR_MAX = 0x20 + SIOCADDMULTI = -0x7fdf96cf + SIOCADDRT = -0x7fcf8df6 + SIOCATMARK = 0x40047307 + SIOCDARP = -0x7fdb96e0 + SIOCDELMULTI = -0x7fdf96ce + SIOCDELRT = -0x7fcf8df5 + SIOCDXARP = -0x7fff9658 + SIOCGARP = -0x3fdb96e1 + SIOCGDSTINFO = -0x3fff965c + SIOCGENADDR = -0x3fdf96ab + SIOCGENPSTATS = -0x3fdf96c7 + SIOCGETLSGCNT = -0x3fef8deb + SIOCGETNAME = 0x40107334 + SIOCGETPEER = 0x40107335 + SIOCGETPROP = -0x3fff8f44 + SIOCGETSGCNT = -0x3feb8deb + SIOCGETSYNC = -0x3fdf96d3 + SIOCGETVIFCNT = -0x3feb8dec + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = -0x3fdf96f3 + SIOCGIFBRDADDR = -0x3fdf96e9 + SIOCGIFCONF = -0x3ff796a4 + SIOCGIFDSTADDR = -0x3fdf96f1 + SIOCGIFFLAGS = -0x3fdf96ef + SIOCGIFHWADDR = -0x3fdf9647 + SIOCGIFINDEX = -0x3fdf96a6 + SIOCGIFMEM = -0x3fdf96ed + SIOCGIFMETRIC = -0x3fdf96e5 + SIOCGIFMTU = -0x3fdf96ea + SIOCGIFMUXID = -0x3fdf96a8 + SIOCGIFNETMASK = -0x3fdf96e7 + SIOCGIFNUM = 0x40046957 + SIOCGIP6ADDRPOLICY = -0x3fff965e + SIOCGIPMSFILTER = -0x3ffb964c + SIOCGLIFADDR = -0x3f87968f + SIOCGLIFBINDING = -0x3f879666 + SIOCGLIFBRDADDR = -0x3f879685 + SIOCGLIFCONF = -0x3fef965b + SIOCGLIFDADSTATE = -0x3f879642 + SIOCGLIFDSTADDR = -0x3f87968d + SIOCGLIFFLAGS = -0x3f87968b + SIOCGLIFGROUPINFO = -0x3f4b9663 + SIOCGLIFGROUPNAME = -0x3f879664 + SIOCGLIFHWADDR = -0x3f879640 + SIOCGLIFINDEX = -0x3f87967b + SIOCGLIFLNKINFO = -0x3f879674 + SIOCGLIFMETRIC = -0x3f879681 + SIOCGLIFMTU = -0x3f879686 + SIOCGLIFMUXID = -0x3f87967d + SIOCGLIFNETMASK = -0x3f879683 + SIOCGLIFNUM = -0x3ff3967e + SIOCGLIFSRCOF = -0x3fef964f + SIOCGLIFSUBNET = -0x3f879676 + SIOCGLIFTOKEN = -0x3f879678 + SIOCGLIFUSESRC = -0x3f879651 + SIOCGLIFZONE = -0x3f879656 + SIOCGLOWAT = 0x40047303 + SIOCGMSFILTER = -0x3ffb964e + SIOCGPGRP = 0x40047309 + SIOCGSTAMP = -0x3fef9646 + SIOCGXARP = -0x3fff9659 + SIOCIFDETACH = -0x7fdf96c8 + SIOCILB = -0x3ffb9645 + SIOCLIFADDIF = -0x3f879691 + SIOCLIFDELND = -0x7f879673 + SIOCLIFGETND = -0x3f879672 + SIOCLIFREMOVEIF = -0x7f879692 + SIOCLIFSETND = -0x7f879671 + SIOCLOWER = -0x7fdf96d7 + SIOCSARP = -0x7fdb96e2 + SIOCSCTPGOPT = -0x3fef9653 + SIOCSCTPPEELOFF = -0x3ffb9652 + SIOCSCTPSOPT = -0x7fef9654 + SIOCSENABLESDP = -0x3ffb9649 + SIOCSETPROP = -0x7ffb8f43 + SIOCSETSYNC = -0x7fdf96d4 + SIOCSHIWAT = -0x7ffb8d00 + SIOCSIFADDR = -0x7fdf96f4 + SIOCSIFBRDADDR = -0x7fdf96e8 + SIOCSIFDSTADDR = -0x7fdf96f2 + SIOCSIFFLAGS = -0x7fdf96f0 + SIOCSIFINDEX = -0x7fdf96a5 + SIOCSIFMEM = -0x7fdf96ee + SIOCSIFMETRIC = -0x7fdf96e4 + SIOCSIFMTU = -0x7fdf96eb + SIOCSIFMUXID = -0x7fdf96a7 + SIOCSIFNAME = -0x7fdf96b7 + SIOCSIFNETMASK = -0x7fdf96e6 + SIOCSIP6ADDRPOLICY = -0x7fff965d + SIOCSIPMSFILTER = -0x7ffb964b + SIOCSLGETREQ = -0x3fdf96b9 + SIOCSLIFADDR = -0x7f879690 + SIOCSLIFBRDADDR = -0x7f879684 + SIOCSLIFDSTADDR = -0x7f87968e + SIOCSLIFFLAGS = -0x7f87968c + SIOCSLIFGROUPNAME = -0x7f879665 + SIOCSLIFINDEX = -0x7f87967a + SIOCSLIFLNKINFO = -0x7f879675 + SIOCSLIFMETRIC = -0x7f879680 + SIOCSLIFMTU = -0x7f879687 + SIOCSLIFMUXID = -0x7f87967c + SIOCSLIFNAME = -0x3f87967f + SIOCSLIFNETMASK = -0x7f879682 + SIOCSLIFPREFIX = -0x3f879641 + SIOCSLIFSUBNET = -0x7f879677 + SIOCSLIFTOKEN = -0x7f879679 + SIOCSLIFUSESRC = -0x7f879650 + SIOCSLIFZONE = -0x7f879655 + SIOCSLOWAT = -0x7ffb8cfe + SIOCSLSTAT = -0x7fdf96b8 + SIOCSMSFILTER = -0x7ffb964d + SIOCSPGRP = -0x7ffb8cf8 + SIOCSPROMISC = -0x7ffb96d0 + SIOCSQPTR = -0x3ffb9648 + SIOCSSDSTATS = -0x3fdf96d2 + SIOCSSESTATS = -0x3fdf96d1 + SIOCSXARP = -0x7fff965a + SIOCTMYADDR = -0x3ff79670 + SIOCTMYSITE = -0x3ff7966e + SIOCTONLINK = -0x3ff7966f + SIOCUPPER = -0x7fdf96d8 + SIOCX25RCV = -0x3fdf96c4 + SIOCX25TBL = -0x3fdf96c3 + SIOCX25XMT = -0x3fdf96c5 + SIOCXPROTO = 0x20007337 + SOCK_CLOEXEC = 0x80000 + SOCK_DGRAM = 0x1 + SOCK_NDELAY = 0x200000 + SOCK_NONBLOCK = 0x100000 + SOCK_RAW = 0x4 + SOCK_RDM = 0x5 + SOCK_SEQPACKET = 0x6 + SOCK_STREAM = 0x2 + SOCK_TYPE_MASK = 0xffff + SOL_FILTER = 0xfffc + SOL_PACKET = 0xfffd + SOL_ROUTE = 0xfffe + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_ALL = 0x3f + SO_ALLZONES = 0x1014 + SO_ANON_MLP = 0x100a + SO_ATTACH_FILTER = 0x40000001 + SO_BAND = 0x4000 + SO_BROADCAST = 0x20 + SO_COPYOPT = 0x80000 + SO_DEBUG = 0x1 + SO_DELIM = 0x8000 + SO_DETACH_FILTER = 0x40000002 + SO_DGRAM_ERRIND = 0x200 + SO_DOMAIN = 0x100c + SO_DONTLINGER = -0x81 + SO_DONTROUTE = 0x10 + SO_ERROPT = 0x40000 + SO_ERROR = 0x1007 + SO_EXCLBIND = 0x1015 + SO_HIWAT = 0x10 + SO_ISNTTY = 0x800 + SO_ISTTY = 0x400 + SO_KEEPALIVE = 0x8 + SO_LINGER = 0x80 + SO_LOWAT = 0x20 + SO_MAC_EXEMPT = 0x100b + SO_MAC_IMPLICIT = 0x1016 + SO_MAXBLK = 0x100000 + SO_MAXPSZ = 0x8 + SO_MINPSZ = 0x4 + SO_MREADOFF = 0x80 + SO_MREADON = 0x40 + SO_NDELOFF = 0x200 + SO_NDELON = 0x100 + SO_NODELIM = 0x10000 + SO_OOBINLINE = 0x100 + SO_PROTOTYPE = 0x1009 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVPSH = 0x100d + SO_RCVTIMEO = 0x1006 + SO_READOPT = 0x1 + SO_RECVUCRED = 0x400 + SO_REUSEADDR = 0x4 + SO_SECATTR = 0x1011 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_STRHOLD = 0x20000 + SO_TAIL = 0x200000 + SO_TIMESTAMP = 0x1013 + SO_TONSTOP = 0x2000 + SO_TOSTOP = 0x1000 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + SO_VRRP = 0x1017 + SO_WROFF = 0x2 + TCFLSH = 0x5407 + TCGETA = 0x5401 + TCGETS = 0x540d + TCIFLUSH = 0x0 + TCIOFLUSH = 0x2 + TCOFLUSH = 0x1 + TCP_ABORT_THRESHOLD = 0x11 + TCP_ANONPRIVBIND = 0x20 + TCP_CONN_ABORT_THRESHOLD = 0x13 + TCP_CONN_NOTIFY_THRESHOLD = 0x12 + TCP_CORK = 0x18 + TCP_EXCLBIND = 0x21 + TCP_INIT_CWND = 0x15 + TCP_KEEPALIVE = 0x8 + TCP_KEEPALIVE_ABORT_THRESHOLD = 0x17 + TCP_KEEPALIVE_THRESHOLD = 0x16 + TCP_KEEPCNT = 0x23 + TCP_KEEPIDLE = 0x22 + TCP_KEEPINTVL = 0x24 + TCP_LINGER2 = 0x1c + TCP_MAXSEG = 0x2 + TCP_MSS = 0x218 + TCP_NODELAY = 0x1 + TCP_NOTIFY_THRESHOLD = 0x10 + TCP_RECVDSTADDR = 0x14 + TCP_RTO_INITIAL = 0x19 + TCP_RTO_MAX = 0x1b + TCP_RTO_MIN = 0x1a + TCSAFLUSH = 0x5410 + TCSBRK = 0x5405 + TCSETA = 0x5402 + TCSETAF = 0x5404 + TCSETAW = 0x5403 + TCSETS = 0x540e + TCSETSF = 0x5410 + TCSETSW = 0x540f + TCXONC = 0x5406 + TIOC = 0x5400 + TIOCCBRK = 0x747a + TIOCCDTR = 0x7478 + TIOCCILOOP = 0x746c + TIOCEXCL = 0x740d + TIOCFLUSH = 0x7410 + TIOCGETC = 0x7412 + TIOCGETD = 0x7400 + TIOCGETP = 0x7408 + TIOCGLTC = 0x7474 + TIOCGPGRP = 0x7414 + TIOCGPPS = 0x547d + TIOCGPPSEV = 0x547f + TIOCGSID = 0x7416 + TIOCGSOFTCAR = 0x5469 + TIOCGWINSZ = 0x5468 + TIOCHPCL = 0x7402 + TIOCKBOF = 0x5409 + TIOCKBON = 0x5408 + TIOCLBIC = 0x747e + TIOCLBIS = 0x747f + TIOCLGET = 0x747c + TIOCLSET = 0x747d + TIOCMBIC = 0x741c + TIOCMBIS = 0x741b + TIOCMGET = 0x741d + TIOCMSET = 0x741a + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x7471 + TIOCNXCL = 0x740e + TIOCOUTQ = 0x7473 + TIOCREMOTE = 0x741e + TIOCSBRK = 0x747b + TIOCSCTTY = 0x7484 + TIOCSDTR = 0x7479 + TIOCSETC = 0x7411 + TIOCSETD = 0x7401 + TIOCSETN = 0x740a + TIOCSETP = 0x7409 + TIOCSIGNAL = 0x741f + TIOCSILOOP = 0x746d + TIOCSLTC = 0x7475 + TIOCSPGRP = 0x7415 + TIOCSPPS = 0x547e + TIOCSSOFTCAR = 0x546a + TIOCSTART = 0x746e + TIOCSTI = 0x7417 + TIOCSTOP = 0x746f + TIOCSWINSZ = 0x5467 + TOSTOP = 0x100 + VCEOF = 0x8 + VCEOL = 0x9 + VDISCARD = 0xd + VDSUSP = 0xb + VEOF = 0x4 + VEOL = 0x5 + VEOL2 = 0x6 + VERASE = 0x2 + VINTR = 0x0 + VKILL = 0x3 + VLNEXT = 0xf + VMIN = 0x4 + VQUIT = 0x1 + VREPRINT = 0xc + VSTART = 0x8 + VSTATUS = 0x10 + VSTOP = 0x9 + VSUSP = 0xa + VSWTCH = 0x7 + VT0 = 0x0 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe + WCONTFLG = 0xffff + WCONTINUED = 0x8 + WCOREFLG = 0x80 + WEXITED = 0x1 + WNOHANG = 0x40 + WNOWAIT = 0x80 + WOPTMASK = 0xcf + WRAP = 0x20000 + WSIGMASK = 0x7f + WSTOPFLG = 0x7f + WSTOPPED = 0x4 + WTRAPPED = 0x2 + WUNTRACED = 0x4 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x7d) + EADDRNOTAVAIL = syscall.Errno(0x7e) + EADV = syscall.Errno(0x44) + EAFNOSUPPORT = syscall.Errno(0x7c) + EAGAIN = syscall.Errno(0xb) + EALREADY = syscall.Errno(0x95) + EBADE = syscall.Errno(0x32) + EBADF = syscall.Errno(0x9) + EBADFD = syscall.Errno(0x51) + EBADMSG = syscall.Errno(0x4d) + EBADR = syscall.Errno(0x33) + EBADRQC = syscall.Errno(0x36) + EBADSLT = syscall.Errno(0x37) + EBFONT = syscall.Errno(0x39) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x2f) + ECHILD = syscall.Errno(0xa) + ECHRNG = syscall.Errno(0x25) + ECOMM = syscall.Errno(0x46) + ECONNABORTED = syscall.Errno(0x82) + ECONNREFUSED = syscall.Errno(0x92) + ECONNRESET = syscall.Errno(0x83) + EDEADLK = syscall.Errno(0x2d) + EDEADLOCK = syscall.Errno(0x38) + EDESTADDRREQ = syscall.Errno(0x60) + EDOM = syscall.Errno(0x21) + EDQUOT = syscall.Errno(0x31) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EHOSTDOWN = syscall.Errno(0x93) + EHOSTUNREACH = syscall.Errno(0x94) + EIDRM = syscall.Errno(0x24) + EILSEQ = syscall.Errno(0x58) + EINPROGRESS = syscall.Errno(0x96) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x85) + EISDIR = syscall.Errno(0x15) + EL2HLT = syscall.Errno(0x2c) + EL2NSYNC = syscall.Errno(0x26) + EL3HLT = syscall.Errno(0x27) + EL3RST = syscall.Errno(0x28) + ELIBACC = syscall.Errno(0x53) + ELIBBAD = syscall.Errno(0x54) + ELIBEXEC = syscall.Errno(0x57) + ELIBMAX = syscall.Errno(0x56) + ELIBSCN = syscall.Errno(0x55) + ELNRNG = syscall.Errno(0x29) + ELOCKUNMAPPED = syscall.Errno(0x48) + ELOOP = syscall.Errno(0x5a) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x61) + EMULTIHOP = syscall.Errno(0x4a) + ENAMETOOLONG = syscall.Errno(0x4e) + ENETDOWN = syscall.Errno(0x7f) + ENETRESET = syscall.Errno(0x81) + ENETUNREACH = syscall.Errno(0x80) + ENFILE = syscall.Errno(0x17) + ENOANO = syscall.Errno(0x35) + ENOBUFS = syscall.Errno(0x84) + ENOCSI = syscall.Errno(0x2b) + ENODATA = syscall.Errno(0x3d) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x2e) + ENOLINK = syscall.Errno(0x43) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x23) + ENONET = syscall.Errno(0x40) + ENOPKG = syscall.Errno(0x41) + ENOPROTOOPT = syscall.Errno(0x63) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x3f) + ENOSTR = syscall.Errno(0x3c) + ENOSYS = syscall.Errno(0x59) + ENOTACTIVE = syscall.Errno(0x49) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x86) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x5d) + ENOTRECOVERABLE = syscall.Errno(0x3b) + ENOTSOCK = syscall.Errno(0x5f) + ENOTSUP = syscall.Errno(0x30) + ENOTTY = syscall.Errno(0x19) + ENOTUNIQ = syscall.Errno(0x50) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x7a) + EOVERFLOW = syscall.Errno(0x4f) + EOWNERDEAD = syscall.Errno(0x3a) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x7b) + EPIPE = syscall.Errno(0x20) + EPROTO = syscall.Errno(0x47) + EPROTONOSUPPORT = syscall.Errno(0x78) + EPROTOTYPE = syscall.Errno(0x62) + ERANGE = syscall.Errno(0x22) + EREMCHG = syscall.Errno(0x52) + EREMOTE = syscall.Errno(0x42) + ERESTART = syscall.Errno(0x5b) + EROFS = syscall.Errno(0x1e) + ESHUTDOWN = syscall.Errno(0x8f) + ESOCKTNOSUPPORT = syscall.Errno(0x79) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESRMNT = syscall.Errno(0x45) + ESTALE = syscall.Errno(0x97) + ESTRPIPE = syscall.Errno(0x5c) + ETIME = syscall.Errno(0x3e) + ETIMEDOUT = syscall.Errno(0x91) + ETOOMANYREFS = syscall.Errno(0x90) + ETXTBSY = syscall.Errno(0x1a) + EUNATCH = syscall.Errno(0x2a) + EUSERS = syscall.Errno(0x5e) + EWOULDBLOCK = syscall.Errno(0xb) + EXDEV = syscall.Errno(0x12) + EXFULL = syscall.Errno(0x34) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCANCEL = syscall.Signal(0x24) + SIGCHLD = syscall.Signal(0x12) + SIGCLD = syscall.Signal(0x12) + SIGCONT = syscall.Signal(0x19) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGFREEZE = syscall.Signal(0x22) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x29) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x16) + SIGIOT = syscall.Signal(0x6) + SIGJVM1 = syscall.Signal(0x27) + SIGJVM2 = syscall.Signal(0x28) + SIGKILL = syscall.Signal(0x9) + SIGLOST = syscall.Signal(0x25) + SIGLWP = syscall.Signal(0x21) + SIGPIPE = syscall.Signal(0xd) + SIGPOLL = syscall.Signal(0x16) + SIGPROF = syscall.Signal(0x1d) + SIGPWR = syscall.Signal(0x13) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x17) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTHAW = syscall.Signal(0x23) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x18) + SIGTTIN = syscall.Signal(0x1a) + SIGTTOU = syscall.Signal(0x1b) + SIGURG = syscall.Signal(0x15) + SIGUSR1 = syscall.Signal(0x10) + SIGUSR2 = syscall.Signal(0x11) + SIGVTALRM = syscall.Signal(0x1c) + SIGWAITING = syscall.Signal(0x20) + SIGWINCH = syscall.Signal(0x14) + SIGXCPU = syscall.Signal(0x1e) + SIGXFSZ = syscall.Signal(0x1f) + SIGXRES = syscall.Signal(0x26) +) + +// Error table +var errors = [...]string{ + 1: "not owner", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "I/O error", + 6: "no such device or address", + 7: "arg list too long", + 8: "exec format error", + 9: "bad file number", + 10: "no child processes", + 11: "resource temporarily unavailable", + 12: "not enough space", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device busy", + 17: "file exists", + 18: "cross-device link", + 19: "no such device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "file table overflow", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "argument out of domain", + 34: "result too large", + 35: "no message of desired type", + 36: "identifier removed", + 37: "channel number out of range", + 38: "level 2 not synchronized", + 39: "level 3 halted", + 40: "level 3 reset", + 41: "link number out of range", + 42: "protocol driver not attached", + 43: "no CSI structure available", + 44: "level 2 halted", + 45: "deadlock situation detected/avoided", + 46: "no record locks available", + 47: "operation canceled", + 48: "operation not supported", + 49: "disc quota exceeded", + 50: "bad exchange descriptor", + 51: "bad request descriptor", + 52: "message tables full", + 53: "anode table overflow", + 54: "bad request code", + 55: "invalid slot", + 56: "file locking deadlock", + 57: "bad font file format", + 58: "owner of the lock died", + 59: "lock is not recoverable", + 60: "not a stream device", + 61: "no data available", + 62: "timer expired", + 63: "out of stream resources", + 64: "machine is not on the network", + 65: "package not installed", + 66: "object is remote", + 67: "link has been severed", + 68: "advertise error", + 69: "srmount error", + 70: "communication error on send", + 71: "protocol error", + 72: "locked lock was unmapped ", + 73: "facility is not active", + 74: "multihop attempted", + 77: "not a data message", + 78: "file name too long", + 79: "value too large for defined data type", + 80: "name not unique on network", + 81: "file descriptor in bad state", + 82: "remote address changed", + 83: "can not access a needed shared library", + 84: "accessing a corrupted shared library", + 85: ".lib section in a.out corrupted", + 86: "attempting to link in more shared libraries than system limit", + 87: "can not exec a shared library directly", + 88: "illegal byte sequence", + 89: "operation not applicable", + 90: "number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS", + 91: "error 91", + 92: "error 92", + 93: "directory not empty", + 94: "too many users", + 95: "socket operation on non-socket", + 96: "destination address required", + 97: "message too long", + 98: "protocol wrong type for socket", + 99: "option not supported by protocol", + 120: "protocol not supported", + 121: "socket type not supported", + 122: "operation not supported on transport endpoint", + 123: "protocol family not supported", + 124: "address family not supported by protocol family", + 125: "address already in use", + 126: "cannot assign requested address", + 127: "network is down", + 128: "network is unreachable", + 129: "network dropped connection because of reset", + 130: "software caused connection abort", + 131: "connection reset by peer", + 132: "no buffer space available", + 133: "transport endpoint is already connected", + 134: "transport endpoint is not connected", + 143: "cannot send after socket shutdown", + 144: "too many references: cannot splice", + 145: "connection timed out", + 146: "connection refused", + 147: "host is down", + 148: "no route to host", + 149: "operation already in progress", + 150: "operation now in progress", + 151: "stale NFS file handle", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal Instruction", + 5: "trace/Breakpoint Trap", + 6: "abort", + 7: "emulation Trap", + 8: "arithmetic Exception", + 9: "killed", + 10: "bus Error", + 11: "segmentation Fault", + 12: "bad System Call", + 13: "broken Pipe", + 14: "alarm Clock", + 15: "terminated", + 16: "user Signal 1", + 17: "user Signal 2", + 18: "child Status Changed", + 19: "power-Fail/Restart", + 20: "window Size Change", + 21: "urgent Socket Condition", + 22: "pollable Event", + 23: "stopped (signal)", + 24: "stopped (user)", + 25: "continued", + 26: "stopped (tty input)", + 27: "stopped (tty output)", + 28: "virtual Timer Expired", + 29: "profiling Timer Expired", + 30: "cpu Limit Exceeded", + 31: "file Size Limit Exceeded", + 32: "no runnable lwp", + 33: "inter-lwp signal", + 34: "checkpoint Freeze", + 35: "checkpoint Thaw", + 36: "thread Cancellation", + 37: "resource Lost", + 38: "resource Control Exceeded", + 39: "reserved for JVM 1", + 40: "reserved for JVM 2", + 41: "information Request", +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go new file mode 100644 index 0000000..a15aaf1 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go @@ -0,0 +1,1426 @@ +// mksyscall.pl -l32 syscall_bsd.go syscall_darwin.go syscall_darwin_386.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build 386,darwin + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe() (r int, w int, err error) { + r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) + r = int(r0) + w = int(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kill(pid int, signum int, posix int) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exchangedata(path1 string, path2 string, options int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path1) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(path2) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options)) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, stat *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdtablesize() (size int) { + r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0) + size = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0) + newoffset = int64(int64(r1)<<32 | int64(r0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setlogin(name string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setprivexec(flag int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, stat *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Undelete(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) { + r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + sec = int32(r0) + usec = int32(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go new file mode 100644 index 0000000..74606b2 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go @@ -0,0 +1,1442 @@ +// mksyscall.pl syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,darwin + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe() (r int, w int, err error) { + r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) + r = int(r0) + w = int(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kill(pid int, signum int, posix int) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exchangedata(path1 string, path2 string, options int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path1) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(path2) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options)) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, stat *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdtablesize() (size int) { + r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0) + size = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) + newoffset = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setlogin(name string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setprivexec(flag int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, stat *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Undelete(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) { + r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + sec = int64(r0) + usec = int32(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go new file mode 100644 index 0000000..640e854 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go @@ -0,0 +1,1426 @@ +// mksyscall.pl syscall_bsd.go syscall_darwin.go syscall_darwin_arm.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build arm,darwin + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe() (r int, w int, err error) { + r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) + r = int(r0) + w = int(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kill(pid int, signum int, posix int) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exchangedata(path1 string, path2 string, options int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path1) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(path2) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options)) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, stat *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdtablesize() (size int) { + r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0) + size = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) + newoffset = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setlogin(name string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setprivexec(flag int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, stat *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Undelete(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) { + r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + sec = int32(r0) + usec = int32(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go new file mode 100644 index 0000000..933f67b --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go @@ -0,0 +1,1426 @@ +// mksyscall.pl syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build arm64,darwin + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe() (r int, w int, err error) { + r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) + r = int(r0) + w = int(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kill(pid int, signum int, posix int) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exchangedata(path1 string, path2 string, options int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path1) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(path2) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options)) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, stat *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdtablesize() (size int) { + r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0) + size = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) + newoffset = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setlogin(name string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setprivexec(flag int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, stat *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Undelete(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) { + r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + sec = int64(r0) + usec = int32(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_386.go b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_386.go new file mode 100644 index 0000000..32e46af --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_386.go @@ -0,0 +1,1412 @@ +// mksyscall.pl -l32 -dragonfly syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_386.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build 386,dragonfly + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe() (r int, w int, err error) { + r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) + r = int(r0) + w = int(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func extpread(fd int, p []byte, flags int, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_EXTPREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_EXTPWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, stat *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdtablesize() (size int) { + r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0) + size = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, signum syscall.Signal) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0) + newoffset = int64(int64(r1)<<32 | int64(r0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setlogin(name string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, stat *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Undelete(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go new file mode 100644 index 0000000..3fa6ff7 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go @@ -0,0 +1,1412 @@ +// mksyscall.pl -dragonfly syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,dragonfly + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe() (r int, w int, err error) { + r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) + r = int(r0) + w = int(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func extpread(fd int, p []byte, flags int, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_EXTPREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_EXTPWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, stat *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdtablesize() (size int) { + r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0) + size = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, signum syscall.Signal) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0) + newoffset = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setlogin(name string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, stat *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Undelete(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go new file mode 100644 index 0000000..1a0e528 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go @@ -0,0 +1,1664 @@ +// mksyscall.pl -l32 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build 386,freebsd + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe() (r int, w int, err error) { + r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) + r = int(r0) + w = int(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(attrname) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0))) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) { + r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(file) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(file) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(file) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(file) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0) + use(unsafe.Pointer(_p0)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0) + use(unsafe.Pointer(_p0)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fadvise(fd int, offset int64, length int64, advice int) (err error) { + _, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, stat *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdtablesize() (size int) { + r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0) + size = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, signum syscall.Signal) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0) + newoffset = int64(int64(r1)<<32 | int64(r0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setlogin(name string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, stat *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Undelete(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) { + r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go new file mode 100644 index 0000000..6e4cf14 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go @@ -0,0 +1,1664 @@ +// mksyscall.pl syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,freebsd + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe() (r int, w int, err error) { + r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) + r = int(r0) + w = int(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(attrname) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0))) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) { + r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(file) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(file) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(file) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(file) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0) + use(unsafe.Pointer(_p0)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0) + use(unsafe.Pointer(_p0)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fadvise(fd int, offset int64, length int64, advice int) (err error) { + _, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, stat *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdtablesize() (size int) { + r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0) + size = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, signum syscall.Signal) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) + newoffset = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setlogin(name string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, stat *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Undelete(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) { + r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go new file mode 100644 index 0000000..1872d32 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go @@ -0,0 +1,1664 @@ +// mksyscall.pl -l32 -arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build arm,freebsd + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe() (r int, w int, err error) { + r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) + r = int(r0) + w = int(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(attrname) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0))) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) { + r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(file) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(file) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(file) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(file) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0) + use(unsafe.Pointer(_p0)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0) + use(unsafe.Pointer(_p0)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fadvise(fd int, offset int64, length int64, advice int) (err error) { + _, _, e1 := Syscall9(SYS_POSIX_FADVISE, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, stat *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdtablesize() (size int) { + r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0) + size = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, signum syscall.Signal) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0) + newoffset = int64(int64(r1)<<32 | int64(r0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setlogin(name string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, stat *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Undelete(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) { + r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go new file mode 100644 index 0000000..ff6c39d --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go @@ -0,0 +1,1628 @@ +// mksyscall.pl -l32 syscall_linux.go syscall_linux_386.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build 386,linux + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, times *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(arg) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(source) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(target) + if err != nil { + return + } + var _p2 *byte + _p2, err = BytePtrFromString(fstype) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + use(unsafe.Pointer(_p2)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Acct(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtimex(buf *Timex) (state int, err error) { + r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) + state = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(oldfd int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup3(oldfd int, newfd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate(size int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate1(flag int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { + _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { + var _p0 unsafe.Pointer + if len(events) > 0 { + _p0 = unsafe.Pointer(&events[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fdatasync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettid() (tid int) { + r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + tid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getxattr(path string, attr string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(dest) > 0 { + _p2 = unsafe.Pointer(&dest[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(pathname) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) + use(unsafe.Pointer(_p0)) + watchdesc = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit1(flags int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) + success = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Klogctl(typ int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listxattr(path string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(dest) > 0 { + _p1 = unsafe.Pointer(&dest[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) + use(unsafe.Pointer(_p0)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pause() (err error) { + _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func PivotRoot(newroot string, putold string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(newroot) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(putold) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { + _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Removexattr(path string, attr string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setdomainname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sethostname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setxattr(path string, attr string, data []byte, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(data) > 0 { + _p2 = unsafe.Pointer(&data[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() { + Syscall(SYS_SYNC, 0, 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sysinfo(info *Sysinfo_t) (err error) { + _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { + r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) + n = int64(int64(r1)<<32 | int64(r0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Times(tms *Tms) (ticks uintptr, err error) { + r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) + ticks = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(mask int) (oldmask int) { + r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Uname(buf *Utsname) (err error) { + _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(target string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(target) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unshare(flags int) (err error) { + _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ustat(dev int, ubuf *Ustat_t) (err error) { + _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Utime(path string, buf *Utimbuf) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func exitThread(code int) (err error) { + _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Madvise(b []byte, advice int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe(p *[2]_C_int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe2(p *[2]_C_int, flags int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(oldfd int, newfd int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fadvise(fd int, offset int64, length int64, advice int) (err error) { + _, _, e1 := Syscall6(SYS_FADVISE64_64, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length), uintptr(length>>32)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID32, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (euid int) { + r0, _, _ := RawSyscall(SYS_GETEUID32, 0, 0, 0) + euid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID32, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID32, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit() (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ioperm(from int, num int, on int) (err error) { + _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Iopl(level int) (err error) { + _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) + written = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsgid(gid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsuid(uid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { + r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func SyncFileRange(fd int, off int64, n int64, flags int) (err error) { + _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(n int, list *_Gid_t) (nn int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + nn = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(n int, list *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { + r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset)) + xaddr = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getrlimit(resource int, rlim *rlimit32) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setrlimit(resource int, rlim *rlimit32) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Time(t *Time_t) (tt Time_t, err error) { + r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0) + tt = Time_t(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go new file mode 100644 index 0000000..c243852 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go @@ -0,0 +1,1822 @@ +// mksyscall.pl syscall_linux.go syscall_linux_amd64.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,linux + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, times *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(arg) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(source) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(target) + if err != nil { + return + } + var _p2 *byte + _p2, err = BytePtrFromString(fstype) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + use(unsafe.Pointer(_p2)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Acct(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtimex(buf *Timex) (state int, err error) { + r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) + state = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(oldfd int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup3(oldfd int, newfd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate(size int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate1(flag int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { + _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { + var _p0 unsafe.Pointer + if len(events) > 0 { + _p0 = unsafe.Pointer(&events[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fdatasync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettid() (tid int) { + r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + tid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getxattr(path string, attr string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(dest) > 0 { + _p2 = unsafe.Pointer(&dest[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(pathname) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) + use(unsafe.Pointer(_p0)) + watchdesc = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit1(flags int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) + success = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Klogctl(typ int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listxattr(path string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(dest) > 0 { + _p1 = unsafe.Pointer(&dest[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) + use(unsafe.Pointer(_p0)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pause() (err error) { + _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func PivotRoot(newroot string, putold string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(newroot) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(putold) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { + _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Removexattr(path string, attr string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setdomainname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sethostname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setxattr(path string, attr string, data []byte, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(data) > 0 { + _p2 = unsafe.Pointer(&data[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() { + Syscall(SYS_SYNC, 0, 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sysinfo(info *Sysinfo_t) (err error) { + _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { + r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) + n = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Times(tms *Tms) (ticks uintptr, err error) { + r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) + ticks = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(mask int) (oldmask int) { + r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Uname(buf *Utsname) (err error) { + _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(target string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(target) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unshare(flags int) (err error) { + _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ustat(dev int, ubuf *Ustat_t) (err error) { + _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Utime(path string, buf *Utimbuf) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func exitThread(code int) (err error) { + _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Madvise(b []byte, advice int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(oldfd int, newfd int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fadvise(fd int, offset int64, length int64, advice int) (err error) { + _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, buf *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (euid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + euid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(resource int, rlim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit() (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ioperm(from int, num int, on int) (err error) { + _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Iopl(level int) (err error) { + _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, n int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (off int64, err error) { + r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) + off = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { + r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) + written = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsgid(gid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsuid(uid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(resource int, rlim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { + r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, buf *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func SyncFileRange(fd int, off int64, n int64, flags int) (err error) { + _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { + r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(n int, list *_Gid_t) (nn int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + nn = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(n int, list *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) + xaddr = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe(p *[2]_C_int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe2(p *[2]_C_int, flags int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go new file mode 100644 index 0000000..dd66c97 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go @@ -0,0 +1,1756 @@ +// mksyscall.pl -l32 -arm syscall_linux.go syscall_linux_arm.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build arm,linux + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, times *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(arg) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(source) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(target) + if err != nil { + return + } + var _p2 *byte + _p2, err = BytePtrFromString(fstype) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + use(unsafe.Pointer(_p2)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Acct(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtimex(buf *Timex) (state int, err error) { + r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) + state = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(oldfd int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup3(oldfd int, newfd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate(size int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate1(flag int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { + _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { + var _p0 unsafe.Pointer + if len(events) > 0 { + _p0 = unsafe.Pointer(&events[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fdatasync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettid() (tid int) { + r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + tid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getxattr(path string, attr string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(dest) > 0 { + _p2 = unsafe.Pointer(&dest[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(pathname) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) + use(unsafe.Pointer(_p0)) + watchdesc = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit1(flags int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) + success = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Klogctl(typ int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listxattr(path string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(dest) > 0 { + _p1 = unsafe.Pointer(&dest[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) + use(unsafe.Pointer(_p0)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pause() (err error) { + _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func PivotRoot(newroot string, putold string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(newroot) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(putold) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { + _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Removexattr(path string, attr string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setdomainname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sethostname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setxattr(path string, attr string, data []byte, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(data) > 0 { + _p2 = unsafe.Pointer(&data[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() { + Syscall(SYS_SYNC, 0, 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sysinfo(info *Sysinfo_t) (err error) { + _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { + r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) + n = int64(int64(r1)<<32 | int64(r0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Times(tms *Tms) (ticks uintptr, err error) { + r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) + ticks = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(mask int) (oldmask int) { + r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Uname(buf *Utsname) (err error) { + _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(target string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(target) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unshare(flags int) (err error) { + _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ustat(dev int, ubuf *Ustat_t) (err error) { + _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Utime(path string, buf *Utimbuf) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func exitThread(code int) (err error) { + _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Madvise(b []byte, advice int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe2(p *[2]_C_int, flags int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { + r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(n int, list *_Gid_t) (nn int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + nn = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(n int, list *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, flags int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(oldfd int, newfd int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID32, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (euid int) { + r0, _, _ := RawSyscall(SYS_GETEUID32, 0, 0, 0) + euid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID32, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID32, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit() (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, n int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) + written = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { + r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsgid(gid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsuid(uid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { + r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Time(t *Time_t) (tt Time_t, err error) { + r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0) + tt = Time_t(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall6(SYS_FTRUNCATE64, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset)) + xaddr = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getrlimit(resource int, rlim *rlimit32) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setrlimit(resource int, rlim *rlimit32) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go new file mode 100644 index 0000000..d0a6ed8 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go @@ -0,0 +1,1750 @@ +// mksyscall.pl syscall_linux.go syscall_linux_arm64.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build arm64,linux + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, times *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(arg) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(source) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(target) + if err != nil { + return + } + var _p2 *byte + _p2, err = BytePtrFromString(fstype) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + use(unsafe.Pointer(_p2)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Acct(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtimex(buf *Timex) (state int, err error) { + r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) + state = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(oldfd int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup3(oldfd int, newfd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate(size int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate1(flag int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { + _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { + var _p0 unsafe.Pointer + if len(events) > 0 { + _p0 = unsafe.Pointer(&events[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fdatasync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettid() (tid int) { + r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + tid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getxattr(path string, attr string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(dest) > 0 { + _p2 = unsafe.Pointer(&dest[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(pathname) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) + use(unsafe.Pointer(_p0)) + watchdesc = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit1(flags int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) + success = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Klogctl(typ int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listxattr(path string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(dest) > 0 { + _p1 = unsafe.Pointer(&dest[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) + use(unsafe.Pointer(_p0)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pause() (err error) { + _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func PivotRoot(newroot string, putold string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(newroot) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(putold) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { + _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Removexattr(path string, attr string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setdomainname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sethostname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setxattr(path string, attr string, data []byte, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(data) > 0 { + _p2 = unsafe.Pointer(&data[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() { + Syscall(SYS_SYNC, 0, 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sysinfo(info *Sysinfo_t) (err error) { + _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { + r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) + n = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Times(tms *Tms) (ticks uintptr, err error) { + r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) + ticks = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(mask int) (oldmask int) { + r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Uname(buf *Utsname) (err error) { + _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(target string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(target) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unshare(flags int) (err error) { + _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ustat(dev int, ubuf *Ustat_t) (err error) { + _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Utime(path string, buf *Utimbuf) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func exitThread(code int) (err error) { + _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Madvise(b []byte, advice int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, buf *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (euid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + euid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(resource int, rlim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, n int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (off int64, err error) { + r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) + off = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { + r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) + written = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsgid(gid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsuid(uid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(resource int, rlim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { + r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, buf *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func SyncFileRange(fd int, off int64, n int64, flags int) (err error) { + _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { + r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(n int, list *_Gid_t) (nn int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + nn = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(n int, list *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) + xaddr = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Time(t *Time_t) (tt Time_t, err error) { + r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0) + tt = Time_t(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe2(p *[2]_C_int, flags int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go new file mode 100644 index 0000000..f58a3ff --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go @@ -0,0 +1,1792 @@ +// mksyscall.pl syscall_linux.go syscall_linux_ppc64x.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build ppc64,linux + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, times *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(arg) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(source) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(target) + if err != nil { + return + } + var _p2 *byte + _p2, err = BytePtrFromString(fstype) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + use(unsafe.Pointer(_p2)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Acct(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtimex(buf *Timex) (state int, err error) { + r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) + state = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(oldfd int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup3(oldfd int, newfd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate(size int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate1(flag int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { + _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { + var _p0 unsafe.Pointer + if len(events) > 0 { + _p0 = unsafe.Pointer(&events[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fdatasync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettid() (tid int) { + r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + tid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getxattr(path string, attr string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(dest) > 0 { + _p2 = unsafe.Pointer(&dest[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(pathname) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) + use(unsafe.Pointer(_p0)) + watchdesc = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit1(flags int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) + success = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Klogctl(typ int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listxattr(path string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(dest) > 0 { + _p1 = unsafe.Pointer(&dest[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) + use(unsafe.Pointer(_p0)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pause() (err error) { + _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func PivotRoot(newroot string, putold string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(newroot) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(putold) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { + _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Removexattr(path string, attr string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setdomainname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sethostname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setxattr(path string, attr string, data []byte, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(data) > 0 { + _p2 = unsafe.Pointer(&data[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() { + Syscall(SYS_SYNC, 0, 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sysinfo(info *Sysinfo_t) (err error) { + _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { + r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) + n = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Times(tms *Tms) (ticks uintptr, err error) { + r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) + ticks = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(mask int) (oldmask int) { + r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Uname(buf *Utsname) (err error) { + _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(target string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(target) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unshare(flags int) (err error) { + _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ustat(dev int, ubuf *Ustat_t) (err error) { + _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Utime(path string, buf *Utimbuf) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func exitThread(code int) (err error) { + _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Madvise(b []byte, advice int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, buf *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (euid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + euid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(resource int, rlim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ioperm(from int, num int, on int) (err error) { + _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Iopl(level int) (err error) { + _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, n int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (off int64, err error) { + r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) + off = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { + r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) + written = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsgid(gid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsuid(uid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(resource int, rlim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { + r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, buf *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func SyncFileRange(fd int, off int64, n int64, flags int) (err error) { + _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { + r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(n int, list *_Gid_t) (nn int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + nn = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(n int, list *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) + xaddr = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Time(t *Time_t) (tt Time_t, err error) { + r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0) + tt = Time_t(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go new file mode 100644 index 0000000..22fc7a4 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go @@ -0,0 +1,1792 @@ +// mksyscall.pl syscall_linux.go syscall_linux_ppc64x.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build ppc64le,linux + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, times *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(arg) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(source) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(target) + if err != nil { + return + } + var _p2 *byte + _p2, err = BytePtrFromString(fstype) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + use(unsafe.Pointer(_p2)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Acct(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtimex(buf *Timex) (state int, err error) { + r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) + state = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(oldfd int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup3(oldfd int, newfd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate(size int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate1(flag int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { + _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { + var _p0 unsafe.Pointer + if len(events) > 0 { + _p0 = unsafe.Pointer(&events[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fdatasync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettid() (tid int) { + r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + tid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getxattr(path string, attr string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(dest) > 0 { + _p2 = unsafe.Pointer(&dest[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(pathname) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) + use(unsafe.Pointer(_p0)) + watchdesc = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit1(flags int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) + success = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Klogctl(typ int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listxattr(path string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(dest) > 0 { + _p1 = unsafe.Pointer(&dest[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) + use(unsafe.Pointer(_p0)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pause() (err error) { + _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func PivotRoot(newroot string, putold string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(newroot) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(putold) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { + _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Removexattr(path string, attr string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setdomainname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sethostname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setxattr(path string, attr string, data []byte, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(data) > 0 { + _p2 = unsafe.Pointer(&data[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() { + Syscall(SYS_SYNC, 0, 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sysinfo(info *Sysinfo_t) (err error) { + _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { + r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) + n = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Times(tms *Tms) (ticks uintptr, err error) { + r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) + ticks = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(mask int) (oldmask int) { + r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Uname(buf *Utsname) (err error) { + _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(target string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(target) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unshare(flags int) (err error) { + _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ustat(dev int, ubuf *Ustat_t) (err error) { + _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Utime(path string, buf *Utimbuf) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func exitThread(code int) (err error) { + _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Madvise(b []byte, advice int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, buf *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (euid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + euid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(resource int, rlim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ioperm(from int, num int, on int) (err error) { + _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Iopl(level int) (err error) { + _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, n int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (off int64, err error) { + r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) + off = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { + r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) + written = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsgid(gid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsuid(uid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(resource int, rlim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { + r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, buf *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func SyncFileRange(fd int, off int64, n int64, flags int) (err error) { + _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { + r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(n int, list *_Gid_t) (nn int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + nn = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(n int, list *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) + xaddr = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Time(t *Time_t) (tt Time_t, err error) { + r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0) + tt = Time_t(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go new file mode 100644 index 0000000..00ca1f9 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go @@ -0,0 +1,1326 @@ +// mksyscall.pl -l32 -netbsd syscall_bsd.go syscall_netbsd.go syscall_netbsd_386.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build 386,netbsd + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe() (fd1 int, fd2 int, err error) { + r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) + fd1 = int(r0) + fd2 = int(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, signum syscall.Signal) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0) + newoffset = int64(int64(r1)<<32 | int64(r0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go new file mode 100644 index 0000000..03f31b9 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go @@ -0,0 +1,1326 @@ +// mksyscall.pl -netbsd syscall_bsd.go syscall_netbsd.go syscall_netbsd_amd64.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,netbsd + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe() (fd1 int, fd2 int, err error) { + r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) + fd1 = int(r0) + fd2 = int(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, signum syscall.Signal) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0) + newoffset = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go new file mode 100644 index 0000000..84dc61c --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go @@ -0,0 +1,1326 @@ +// mksyscall.pl -l32 -arm syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build arm,netbsd + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe() (fd1 int, fd2 int, err error) { + r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) + fd1 = int(r0) + fd2 = int(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, signum syscall.Signal) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0) + newoffset = int64(int64(r1)<<32 | int64(r0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go new file mode 100644 index 0000000..02b3528 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go @@ -0,0 +1,1386 @@ +// mksyscall.pl -l32 -openbsd syscall_bsd.go syscall_openbsd.go syscall_openbsd_386.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build 386,openbsd + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe(p *[2]_C_int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, stat *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, signum syscall.Signal) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0) + newoffset = int64(int64(r1)<<32 | int64(r0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setlogin(name string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, stat *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go new file mode 100644 index 0000000..7dc2b7e --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go @@ -0,0 +1,1386 @@ +// mksyscall.pl -openbsd syscall_bsd.go syscall_openbsd.go syscall_openbsd_amd64.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,openbsd + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe(p *[2]_C_int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, stat *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, signum syscall.Signal) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0) + newoffset = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setlogin(name string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, stat *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go new file mode 100644 index 0000000..8d2a836 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go @@ -0,0 +1,1559 @@ +// mksyscall_solaris.pl syscall_solaris.go syscall_solaris_amd64.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,solaris + +package unix + +import ( + "syscall" + "unsafe" +) + +//go:cgo_import_dynamic libc_getsockname getsockname "libsocket.so" +//go:cgo_import_dynamic libc_getcwd getcwd "libc.so" +//go:cgo_import_dynamic libc_getgroups getgroups "libc.so" +//go:cgo_import_dynamic libc_setgroups setgroups "libc.so" +//go:cgo_import_dynamic libc_utimes utimes "libc.so" +//go:cgo_import_dynamic libc_utimensat utimensat "libc.so" +//go:cgo_import_dynamic libc_fcntl fcntl "libc.so" +//go:cgo_import_dynamic libc_futimesat futimesat "libc.so" +//go:cgo_import_dynamic libc_accept accept "libsocket.so" +//go:cgo_import_dynamic libc_recvmsg recvmsg "libsocket.so" +//go:cgo_import_dynamic libc_sendmsg sendmsg "libsocket.so" +//go:cgo_import_dynamic libc_acct acct "libc.so" +//go:cgo_import_dynamic libc_ioctl ioctl "libc.so" +//go:cgo_import_dynamic libc_access access "libc.so" +//go:cgo_import_dynamic libc_adjtime adjtime "libc.so" +//go:cgo_import_dynamic libc_chdir chdir "libc.so" +//go:cgo_import_dynamic libc_chmod chmod "libc.so" +//go:cgo_import_dynamic libc_chown chown "libc.so" +//go:cgo_import_dynamic libc_chroot chroot "libc.so" +//go:cgo_import_dynamic libc_close close "libc.so" +//go:cgo_import_dynamic libc_creat creat "libc.so" +//go:cgo_import_dynamic libc_dup dup "libc.so" +//go:cgo_import_dynamic libc_dup2 dup2 "libc.so" +//go:cgo_import_dynamic libc_exit exit "libc.so" +//go:cgo_import_dynamic libc_fchdir fchdir "libc.so" +//go:cgo_import_dynamic libc_fchmod fchmod "libc.so" +//go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so" +//go:cgo_import_dynamic libc_fchown fchown "libc.so" +//go:cgo_import_dynamic libc_fchownat fchownat "libc.so" +//go:cgo_import_dynamic libc_fdatasync fdatasync "libc.so" +//go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so" +//go:cgo_import_dynamic libc_fstat fstat "libc.so" +//go:cgo_import_dynamic libc_getdents getdents "libc.so" +//go:cgo_import_dynamic libc_getgid getgid "libc.so" +//go:cgo_import_dynamic libc_getpid getpid "libc.so" +//go:cgo_import_dynamic libc_getpgid getpgid "libc.so" +//go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so" +//go:cgo_import_dynamic libc_geteuid geteuid "libc.so" +//go:cgo_import_dynamic libc_getegid getegid "libc.so" +//go:cgo_import_dynamic libc_getppid getppid "libc.so" +//go:cgo_import_dynamic libc_getpriority getpriority "libc.so" +//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so" +//go:cgo_import_dynamic libc_getrusage getrusage "libc.so" +//go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so" +//go:cgo_import_dynamic libc_getuid getuid "libc.so" +//go:cgo_import_dynamic libc_kill kill "libc.so" +//go:cgo_import_dynamic libc_lchown lchown "libc.so" +//go:cgo_import_dynamic libc_link link "libc.so" +//go:cgo_import_dynamic libc_listen listen "libsocket.so" +//go:cgo_import_dynamic libc_lstat lstat "libc.so" +//go:cgo_import_dynamic libc_madvise madvise "libc.so" +//go:cgo_import_dynamic libc_mkdir mkdir "libc.so" +//go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so" +//go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so" +//go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so" +//go:cgo_import_dynamic libc_mknod mknod "libc.so" +//go:cgo_import_dynamic libc_mknodat mknodat "libc.so" +//go:cgo_import_dynamic libc_mlock mlock "libc.so" +//go:cgo_import_dynamic libc_mlockall mlockall "libc.so" +//go:cgo_import_dynamic libc_mprotect mprotect "libc.so" +//go:cgo_import_dynamic libc_munlock munlock "libc.so" +//go:cgo_import_dynamic libc_munlockall munlockall "libc.so" +//go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so" +//go:cgo_import_dynamic libc_open open "libc.so" +//go:cgo_import_dynamic libc_openat openat "libc.so" +//go:cgo_import_dynamic libc_pathconf pathconf "libc.so" +//go:cgo_import_dynamic libc_pause pause "libc.so" +//go:cgo_import_dynamic libc_pread pread "libc.so" +//go:cgo_import_dynamic libc_pwrite pwrite "libc.so" +//go:cgo_import_dynamic libc_read read "libc.so" +//go:cgo_import_dynamic libc_readlink readlink "libc.so" +//go:cgo_import_dynamic libc_rename rename "libc.so" +//go:cgo_import_dynamic libc_renameat renameat "libc.so" +//go:cgo_import_dynamic libc_rmdir rmdir "libc.so" +//go:cgo_import_dynamic libc_lseek lseek "libc.so" +//go:cgo_import_dynamic libc_setegid setegid "libc.so" +//go:cgo_import_dynamic libc_seteuid seteuid "libc.so" +//go:cgo_import_dynamic libc_setgid setgid "libc.so" +//go:cgo_import_dynamic libc_sethostname sethostname "libc.so" +//go:cgo_import_dynamic libc_setpgid setpgid "libc.so" +//go:cgo_import_dynamic libc_setpriority setpriority "libc.so" +//go:cgo_import_dynamic libc_setregid setregid "libc.so" +//go:cgo_import_dynamic libc_setreuid setreuid "libc.so" +//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so" +//go:cgo_import_dynamic libc_setsid setsid "libc.so" +//go:cgo_import_dynamic libc_setuid setuid "libc.so" +//go:cgo_import_dynamic libc_shutdown shutdown "libsocket.so" +//go:cgo_import_dynamic libc_stat stat "libc.so" +//go:cgo_import_dynamic libc_symlink symlink "libc.so" +//go:cgo_import_dynamic libc_sync sync "libc.so" +//go:cgo_import_dynamic libc_times times "libc.so" +//go:cgo_import_dynamic libc_truncate truncate "libc.so" +//go:cgo_import_dynamic libc_fsync fsync "libc.so" +//go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so" +//go:cgo_import_dynamic libc_umask umask "libc.so" +//go:cgo_import_dynamic libc_uname uname "libc.so" +//go:cgo_import_dynamic libc_umount umount "libc.so" +//go:cgo_import_dynamic libc_unlink unlink "libc.so" +//go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so" +//go:cgo_import_dynamic libc_ustat ustat "libc.so" +//go:cgo_import_dynamic libc_utime utime "libc.so" +//go:cgo_import_dynamic libc_bind bind "libsocket.so" +//go:cgo_import_dynamic libc_connect connect "libsocket.so" +//go:cgo_import_dynamic libc_mmap mmap "libc.so" +//go:cgo_import_dynamic libc_munmap munmap "libc.so" +//go:cgo_import_dynamic libc_sendto sendto "libsocket.so" +//go:cgo_import_dynamic libc_socket socket "libsocket.so" +//go:cgo_import_dynamic libc_socketpair socketpair "libsocket.so" +//go:cgo_import_dynamic libc_write write "libc.so" +//go:cgo_import_dynamic libc_getsockopt getsockopt "libsocket.so" +//go:cgo_import_dynamic libc_getpeername getpeername "libsocket.so" +//go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so" +//go:cgo_import_dynamic libc_recvfrom recvfrom "libsocket.so" +//go:cgo_import_dynamic libc_sysconf sysconf "libc.so" + +//go:linkname procgetsockname libc_getsockname +//go:linkname procGetcwd libc_getcwd +//go:linkname procgetgroups libc_getgroups +//go:linkname procsetgroups libc_setgroups +//go:linkname procutimes libc_utimes +//go:linkname procutimensat libc_utimensat +//go:linkname procfcntl libc_fcntl +//go:linkname procfutimesat libc_futimesat +//go:linkname procaccept libc_accept +//go:linkname procrecvmsg libc_recvmsg +//go:linkname procsendmsg libc_sendmsg +//go:linkname procacct libc_acct +//go:linkname procioctl libc_ioctl +//go:linkname procAccess libc_access +//go:linkname procAdjtime libc_adjtime +//go:linkname procChdir libc_chdir +//go:linkname procChmod libc_chmod +//go:linkname procChown libc_chown +//go:linkname procChroot libc_chroot +//go:linkname procClose libc_close +//go:linkname procCreat libc_creat +//go:linkname procDup libc_dup +//go:linkname procDup2 libc_dup2 +//go:linkname procExit libc_exit +//go:linkname procFchdir libc_fchdir +//go:linkname procFchmod libc_fchmod +//go:linkname procFchmodat libc_fchmodat +//go:linkname procFchown libc_fchown +//go:linkname procFchownat libc_fchownat +//go:linkname procFdatasync libc_fdatasync +//go:linkname procFpathconf libc_fpathconf +//go:linkname procFstat libc_fstat +//go:linkname procGetdents libc_getdents +//go:linkname procGetgid libc_getgid +//go:linkname procGetpid libc_getpid +//go:linkname procGetpgid libc_getpgid +//go:linkname procGetpgrp libc_getpgrp +//go:linkname procGeteuid libc_geteuid +//go:linkname procGetegid libc_getegid +//go:linkname procGetppid libc_getppid +//go:linkname procGetpriority libc_getpriority +//go:linkname procGetrlimit libc_getrlimit +//go:linkname procGetrusage libc_getrusage +//go:linkname procGettimeofday libc_gettimeofday +//go:linkname procGetuid libc_getuid +//go:linkname procKill libc_kill +//go:linkname procLchown libc_lchown +//go:linkname procLink libc_link +//go:linkname proclisten libc_listen +//go:linkname procLstat libc_lstat +//go:linkname procMadvise libc_madvise +//go:linkname procMkdir libc_mkdir +//go:linkname procMkdirat libc_mkdirat +//go:linkname procMkfifo libc_mkfifo +//go:linkname procMkfifoat libc_mkfifoat +//go:linkname procMknod libc_mknod +//go:linkname procMknodat libc_mknodat +//go:linkname procMlock libc_mlock +//go:linkname procMlockall libc_mlockall +//go:linkname procMprotect libc_mprotect +//go:linkname procMunlock libc_munlock +//go:linkname procMunlockall libc_munlockall +//go:linkname procNanosleep libc_nanosleep +//go:linkname procOpen libc_open +//go:linkname procOpenat libc_openat +//go:linkname procPathconf libc_pathconf +//go:linkname procPause libc_pause +//go:linkname procPread libc_pread +//go:linkname procPwrite libc_pwrite +//go:linkname procread libc_read +//go:linkname procReadlink libc_readlink +//go:linkname procRename libc_rename +//go:linkname procRenameat libc_renameat +//go:linkname procRmdir libc_rmdir +//go:linkname proclseek libc_lseek +//go:linkname procSetegid libc_setegid +//go:linkname procSeteuid libc_seteuid +//go:linkname procSetgid libc_setgid +//go:linkname procSethostname libc_sethostname +//go:linkname procSetpgid libc_setpgid +//go:linkname procSetpriority libc_setpriority +//go:linkname procSetregid libc_setregid +//go:linkname procSetreuid libc_setreuid +//go:linkname procSetrlimit libc_setrlimit +//go:linkname procSetsid libc_setsid +//go:linkname procSetuid libc_setuid +//go:linkname procshutdown libc_shutdown +//go:linkname procStat libc_stat +//go:linkname procSymlink libc_symlink +//go:linkname procSync libc_sync +//go:linkname procTimes libc_times +//go:linkname procTruncate libc_truncate +//go:linkname procFsync libc_fsync +//go:linkname procFtruncate libc_ftruncate +//go:linkname procUmask libc_umask +//go:linkname procUname libc_uname +//go:linkname procumount libc_umount +//go:linkname procUnlink libc_unlink +//go:linkname procUnlinkat libc_unlinkat +//go:linkname procUstat libc_ustat +//go:linkname procUtime libc_utime +//go:linkname procbind libc_bind +//go:linkname procconnect libc_connect +//go:linkname procmmap libc_mmap +//go:linkname procmunmap libc_munmap +//go:linkname procsendto libc_sendto +//go:linkname procsocket libc_socket +//go:linkname procsocketpair libc_socketpair +//go:linkname procwrite libc_write +//go:linkname procgetsockopt libc_getsockopt +//go:linkname procgetpeername libc_getpeername +//go:linkname procsetsockopt libc_setsockopt +//go:linkname procrecvfrom libc_recvfrom +//go:linkname procsysconf libc_sysconf + +var ( + procgetsockname, + procGetcwd, + procgetgroups, + procsetgroups, + procutimes, + procutimensat, + procfcntl, + procfutimesat, + procaccept, + procrecvmsg, + procsendmsg, + procacct, + procioctl, + procAccess, + procAdjtime, + procChdir, + procChmod, + procChown, + procChroot, + procClose, + procCreat, + procDup, + procDup2, + procExit, + procFchdir, + procFchmod, + procFchmodat, + procFchown, + procFchownat, + procFdatasync, + procFpathconf, + procFstat, + procGetdents, + procGetgid, + procGetpid, + procGetpgid, + procGetpgrp, + procGeteuid, + procGetegid, + procGetppid, + procGetpriority, + procGetrlimit, + procGetrusage, + procGettimeofday, + procGetuid, + procKill, + procLchown, + procLink, + proclisten, + procLstat, + procMadvise, + procMkdir, + procMkdirat, + procMkfifo, + procMkfifoat, + procMknod, + procMknodat, + procMlock, + procMlockall, + procMprotect, + procMunlock, + procMunlockall, + procNanosleep, + procOpen, + procOpenat, + procPathconf, + procPause, + procPread, + procPwrite, + procread, + procReadlink, + procRename, + procRenameat, + procRmdir, + proclseek, + procSetegid, + procSeteuid, + procSetgid, + procSethostname, + procSetpgid, + procSetpriority, + procSetregid, + procSetreuid, + procSetrlimit, + procSetsid, + procSetuid, + procshutdown, + procStat, + procSymlink, + procSync, + procTimes, + procTruncate, + procFsync, + procFtruncate, + procUmask, + procUname, + procumount, + procUnlink, + procUnlinkat, + procUstat, + procUtime, + procbind, + procconnect, + procmmap, + procmunmap, + procsendto, + procsocket, + procsocketpair, + procwrite, + procgetsockopt, + procgetpeername, + procsetsockopt, + procrecvfrom, + procsysconf syscallFunc +) + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetsockname)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Getcwd(buf []byte) (n int, err error) { + var _p0 *byte + if len(buf) > 0 { + _p0 = &buf[0] + } + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetcwd)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0, 0, 0, 0) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procgetgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procsetgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func utimes(path string, times *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procutimes)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func utimensat(fd int, path string, times *[2]Timespec, flag int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procutimensat)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flag), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0) + val = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func futimesat(fildes int, path *byte, times *[2]Timeval) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfutimesat)), 3, uintptr(fildes), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)), 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procaccept)), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procrecvmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsendmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func acct(path *byte) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procacct)), 1, uintptr(unsafe.Pointer(path)), 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func ioctl(fd int, req int, arg uintptr) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procAccess)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procAdjtime)), 2, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChmod)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChroot)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Close(fd int) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procClose)), 1, uintptr(fd), 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Creat(path string, mode uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procCreat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procDup)), 1, uintptr(fd), 0, 0, 0, 0, 0) + nfd = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Dup2(oldfd int, newfd int) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procDup2)), 2, uintptr(oldfd), uintptr(newfd), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Exit(code int) { + sysvicall6(uintptr(unsafe.Pointer(&procExit)), 1, uintptr(code), 0, 0, 0, 0, 0) + return +} + +func Fchdir(fd int) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchdir)), 1, uintptr(fd), 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchmod)), 2, uintptr(fd), uintptr(mode), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchmodat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchown)), 3, uintptr(fd), uintptr(uid), uintptr(gid), 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchownat)), 5, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Fdatasync(fd int) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFdatasync)), 1, uintptr(fd), 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFpathconf)), 2, uintptr(fd), uintptr(name), 0, 0, 0, 0) + val = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstat)), 2, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Getdents(fd int, buf []byte, basep *uintptr) (n int, err error) { + var _p0 *byte + if len(buf) > 0 { + _p0 = &buf[0] + } + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetdents)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Getgid() (gid int) { + r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetgid)), 0, 0, 0, 0, 0, 0, 0) + gid = int(r0) + return +} + +func Getpid() (pid int) { + r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpid)), 0, 0, 0, 0, 0, 0, 0) + pid = int(r0) + return +} + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpgid)), 1, uintptr(pid), 0, 0, 0, 0, 0) + pgid = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Getpgrp() (pgid int, err error) { + r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpgrp)), 0, 0, 0, 0, 0, 0, 0) + pgid = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Geteuid() (euid int) { + r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGeteuid)), 0, 0, 0, 0, 0, 0, 0) + euid = int(r0) + return +} + +func Getegid() (egid int) { + r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGetegid)), 0, 0, 0, 0, 0, 0, 0) + egid = int(r0) + return +} + +func Getppid() (ppid int) { + r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGetppid)), 0, 0, 0, 0, 0, 0, 0) + ppid = int(r0) + return +} + +func Getpriority(which int, who int) (n int, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetpriority)), 2, uintptr(which), uintptr(who), 0, 0, 0, 0) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetrusage)), 2, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGettimeofday)), 1, uintptr(unsafe.Pointer(tv)), 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Getuid() (uid int) { + r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetuid)), 0, 0, 0, 0, 0, 0, 0) + uid = int(r0) + return +} + +func Kill(pid int, signum syscall.Signal) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procKill)), 2, uintptr(pid), uintptr(signum), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLchown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = e1 + } + return +} + +func Listen(s int, backlog int) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proclisten)), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLstat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Madvise(b []byte, advice int) (err error) { + var _p0 *byte + if len(b) > 0 { + _p0 = &b[0] + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMadvise)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(advice), 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkdir)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkdirat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkfifo)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Mkfifoat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkfifoat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMknod)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMknodat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Mlock(b []byte) (err error) { + var _p0 *byte + if len(b) > 0 { + _p0 = &b[0] + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMlock)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Mlockall(flags int) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMlockall)), 1, uintptr(flags), 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Mprotect(b []byte, prot int) (err error) { + var _p0 *byte + if len(b) > 0 { + _p0 = &b[0] + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMprotect)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(prot), 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Munlock(b []byte) (err error) { + var _p0 *byte + if len(b) > 0 { + _p0 = &b[0] + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMunlock)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Munlockall() (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMunlockall)), 0, 0, 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procNanosleep)), 2, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procOpen)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0, 0) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procOpenat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPathconf)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Pause() (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPause)), 0, 0, 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 *byte + if len(p) > 0 { + _p0 = &p[0] + } + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPread)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 *byte + if len(p) > 0 { + _p0 = &p[0] + } + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPwrite)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func read(fd int, p []byte) (n int, err error) { + var _p0 *byte + if len(p) > 0 { + _p0 = &p[0] + } + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procread)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + if len(buf) > 0 { + _p1 = &buf[0] + } + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procReadlink)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(len(buf)), 0, 0, 0) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRename)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = e1 + } + return +} + +func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRenameat)), 4, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = e1 + } + return +} + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRmdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proclseek)), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 0, 0) + newoffset = int64(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Setegid(egid int) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetegid)), 1, uintptr(egid), 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Seteuid(euid int) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSeteuid)), 1, uintptr(euid), 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Setgid(gid int) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetgid)), 1, uintptr(gid), 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Sethostname(p []byte) (err error) { + var _p0 *byte + if len(p) > 0 { + _p0 = &p[0] + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSethostname)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetpgid)), 2, uintptr(pid), uintptr(pgid), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSetpriority)), 3, uintptr(which), uintptr(who), uintptr(prio), 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetregid)), 2, uintptr(rgid), uintptr(egid), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetreuid)), 2, uintptr(ruid), uintptr(euid), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Setsid() (pid int, err error) { + r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetsid)), 0, 0, 0, 0, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Setuid(uid int) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetuid)), 1, uintptr(uid), 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Shutdown(s int, how int) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procshutdown)), 2, uintptr(s), uintptr(how), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procStat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSymlink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = e1 + } + return +} + +func Sync() (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSync)), 0, 0, 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Times(tms *Tms) (ticks uintptr, err error) { + r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procTimes)), 1, uintptr(unsafe.Pointer(tms)), 0, 0, 0, 0, 0) + ticks = uintptr(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procTruncate)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Fsync(fd int) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFsync)), 1, uintptr(fd), 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFtruncate)), 2, uintptr(fd), uintptr(length), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Umask(mask int) (oldmask int) { + r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procUmask)), 1, uintptr(mask), 0, 0, 0, 0, 0) + oldmask = int(r0) + return +} + +func Uname(buf *Utsname) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procUname)), 1, uintptr(unsafe.Pointer(buf)), 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Unmount(target string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(target) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procumount)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUnlink)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Unlinkat(dirfd int, path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUnlinkat)), 2, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Ustat(dev int, ubuf *Ustat_t) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUstat)), 2, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Utime(path string, buf *Utimbuf) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUtime)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procbind)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procconnect)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procmmap)), 6, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) + ret = uintptr(r0) + if e1 != 0 { + err = e1 + } + return +} + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procmunmap)), 2, uintptr(addr), uintptr(length), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 *byte + if len(buf) > 0 { + _p0 = &buf[0] + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsendto)), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = e1 + } + return +} + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsocket)), 3, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procsocketpair)), 4, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func write(fd int, p []byte) (n int, err error) { + var _p0 *byte + if len(p) > 0 { + _p0 = &p[0] + } + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwrite)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = e1 + } + return +} + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procgetpeername)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsetsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = e1 + } + return +} + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 *byte + if len(p) > 0 { + _p0 = &p[0] + } + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procrecvfrom)), 6, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func sysconf(name int) (n int64, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsysconf)), 1, uintptr(name), 0, 0, 0, 0, 0) + n = int64(r0) + if e1 != 0 { + err = e1 + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd.go new file mode 100644 index 0000000..83bb935 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd.go @@ -0,0 +1,270 @@ +// mksysctl_openbsd.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +package unix + +type mibentry struct { + ctlname string + ctloid []_C_int +} + +var sysctlMib = []mibentry{ + {"ddb.console", []_C_int{9, 6}}, + {"ddb.log", []_C_int{9, 7}}, + {"ddb.max_line", []_C_int{9, 3}}, + {"ddb.max_width", []_C_int{9, 2}}, + {"ddb.panic", []_C_int{9, 5}}, + {"ddb.radix", []_C_int{9, 1}}, + {"ddb.tab_stop_width", []_C_int{9, 4}}, + {"ddb.trigger", []_C_int{9, 8}}, + {"fs.posix.setuid", []_C_int{3, 1, 1}}, + {"hw.allowpowerdown", []_C_int{6, 22}}, + {"hw.byteorder", []_C_int{6, 4}}, + {"hw.cpuspeed", []_C_int{6, 12}}, + {"hw.diskcount", []_C_int{6, 10}}, + {"hw.disknames", []_C_int{6, 8}}, + {"hw.diskstats", []_C_int{6, 9}}, + {"hw.machine", []_C_int{6, 1}}, + {"hw.model", []_C_int{6, 2}}, + {"hw.ncpu", []_C_int{6, 3}}, + {"hw.ncpufound", []_C_int{6, 21}}, + {"hw.pagesize", []_C_int{6, 7}}, + {"hw.physmem", []_C_int{6, 19}}, + {"hw.product", []_C_int{6, 15}}, + {"hw.serialno", []_C_int{6, 17}}, + {"hw.setperf", []_C_int{6, 13}}, + {"hw.usermem", []_C_int{6, 20}}, + {"hw.uuid", []_C_int{6, 18}}, + {"hw.vendor", []_C_int{6, 14}}, + {"hw.version", []_C_int{6, 16}}, + {"kern.arandom", []_C_int{1, 37}}, + {"kern.argmax", []_C_int{1, 8}}, + {"kern.boottime", []_C_int{1, 21}}, + {"kern.bufcachepercent", []_C_int{1, 72}}, + {"kern.ccpu", []_C_int{1, 45}}, + {"kern.clockrate", []_C_int{1, 12}}, + {"kern.consdev", []_C_int{1, 75}}, + {"kern.cp_time", []_C_int{1, 40}}, + {"kern.cp_time2", []_C_int{1, 71}}, + {"kern.cryptodevallowsoft", []_C_int{1, 53}}, + {"kern.domainname", []_C_int{1, 22}}, + {"kern.file", []_C_int{1, 73}}, + {"kern.forkstat", []_C_int{1, 42}}, + {"kern.fscale", []_C_int{1, 46}}, + {"kern.fsync", []_C_int{1, 33}}, + {"kern.hostid", []_C_int{1, 11}}, + {"kern.hostname", []_C_int{1, 10}}, + {"kern.intrcnt.nintrcnt", []_C_int{1, 63, 1}}, + {"kern.job_control", []_C_int{1, 19}}, + {"kern.malloc.buckets", []_C_int{1, 39, 1}}, + {"kern.malloc.kmemnames", []_C_int{1, 39, 3}}, + {"kern.maxclusters", []_C_int{1, 67}}, + {"kern.maxfiles", []_C_int{1, 7}}, + {"kern.maxlocksperuid", []_C_int{1, 70}}, + {"kern.maxpartitions", []_C_int{1, 23}}, + {"kern.maxproc", []_C_int{1, 6}}, + {"kern.maxthread", []_C_int{1, 25}}, + {"kern.maxvnodes", []_C_int{1, 5}}, + {"kern.mbstat", []_C_int{1, 59}}, + {"kern.msgbuf", []_C_int{1, 48}}, + {"kern.msgbufsize", []_C_int{1, 38}}, + {"kern.nchstats", []_C_int{1, 41}}, + {"kern.netlivelocks", []_C_int{1, 76}}, + {"kern.nfiles", []_C_int{1, 56}}, + {"kern.ngroups", []_C_int{1, 18}}, + {"kern.nosuidcoredump", []_C_int{1, 32}}, + {"kern.nprocs", []_C_int{1, 47}}, + {"kern.nselcoll", []_C_int{1, 43}}, + {"kern.nthreads", []_C_int{1, 26}}, + {"kern.numvnodes", []_C_int{1, 58}}, + {"kern.osrelease", []_C_int{1, 2}}, + {"kern.osrevision", []_C_int{1, 3}}, + {"kern.ostype", []_C_int{1, 1}}, + {"kern.osversion", []_C_int{1, 27}}, + {"kern.pool_debug", []_C_int{1, 77}}, + {"kern.posix1version", []_C_int{1, 17}}, + {"kern.proc", []_C_int{1, 66}}, + {"kern.random", []_C_int{1, 31}}, + {"kern.rawpartition", []_C_int{1, 24}}, + {"kern.saved_ids", []_C_int{1, 20}}, + {"kern.securelevel", []_C_int{1, 9}}, + {"kern.seminfo", []_C_int{1, 61}}, + {"kern.shminfo", []_C_int{1, 62}}, + {"kern.somaxconn", []_C_int{1, 28}}, + {"kern.sominconn", []_C_int{1, 29}}, + {"kern.splassert", []_C_int{1, 54}}, + {"kern.stackgap_random", []_C_int{1, 50}}, + {"kern.sysvipc_info", []_C_int{1, 51}}, + {"kern.sysvmsg", []_C_int{1, 34}}, + {"kern.sysvsem", []_C_int{1, 35}}, + {"kern.sysvshm", []_C_int{1, 36}}, + {"kern.timecounter.choice", []_C_int{1, 69, 4}}, + {"kern.timecounter.hardware", []_C_int{1, 69, 3}}, + {"kern.timecounter.tick", []_C_int{1, 69, 1}}, + {"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}}, + {"kern.tty.maxptys", []_C_int{1, 44, 6}}, + {"kern.tty.nptys", []_C_int{1, 44, 7}}, + {"kern.tty.tk_cancc", []_C_int{1, 44, 4}}, + {"kern.tty.tk_nin", []_C_int{1, 44, 1}}, + {"kern.tty.tk_nout", []_C_int{1, 44, 2}}, + {"kern.tty.tk_rawcc", []_C_int{1, 44, 3}}, + {"kern.tty.ttyinfo", []_C_int{1, 44, 5}}, + {"kern.ttycount", []_C_int{1, 57}}, + {"kern.userasymcrypto", []_C_int{1, 60}}, + {"kern.usercrypto", []_C_int{1, 52}}, + {"kern.usermount", []_C_int{1, 30}}, + {"kern.version", []_C_int{1, 4}}, + {"kern.vnode", []_C_int{1, 13}}, + {"kern.watchdog.auto", []_C_int{1, 64, 2}}, + {"kern.watchdog.period", []_C_int{1, 64, 1}}, + {"net.bpf.bufsize", []_C_int{4, 31, 1}}, + {"net.bpf.maxbufsize", []_C_int{4, 31, 2}}, + {"net.inet.ah.enable", []_C_int{4, 2, 51, 1}}, + {"net.inet.ah.stats", []_C_int{4, 2, 51, 2}}, + {"net.inet.carp.allow", []_C_int{4, 2, 112, 1}}, + {"net.inet.carp.log", []_C_int{4, 2, 112, 3}}, + {"net.inet.carp.preempt", []_C_int{4, 2, 112, 2}}, + {"net.inet.carp.stats", []_C_int{4, 2, 112, 4}}, + {"net.inet.divert.recvspace", []_C_int{4, 2, 258, 1}}, + {"net.inet.divert.sendspace", []_C_int{4, 2, 258, 2}}, + {"net.inet.divert.stats", []_C_int{4, 2, 258, 3}}, + {"net.inet.esp.enable", []_C_int{4, 2, 50, 1}}, + {"net.inet.esp.stats", []_C_int{4, 2, 50, 4}}, + {"net.inet.esp.udpencap", []_C_int{4, 2, 50, 2}}, + {"net.inet.esp.udpencap_port", []_C_int{4, 2, 50, 3}}, + {"net.inet.etherip.allow", []_C_int{4, 2, 97, 1}}, + {"net.inet.etherip.stats", []_C_int{4, 2, 97, 2}}, + {"net.inet.gre.allow", []_C_int{4, 2, 47, 1}}, + {"net.inet.gre.wccp", []_C_int{4, 2, 47, 2}}, + {"net.inet.icmp.bmcastecho", []_C_int{4, 2, 1, 2}}, + {"net.inet.icmp.errppslimit", []_C_int{4, 2, 1, 3}}, + {"net.inet.icmp.maskrepl", []_C_int{4, 2, 1, 1}}, + {"net.inet.icmp.rediraccept", []_C_int{4, 2, 1, 4}}, + {"net.inet.icmp.redirtimeout", []_C_int{4, 2, 1, 5}}, + {"net.inet.icmp.stats", []_C_int{4, 2, 1, 7}}, + {"net.inet.icmp.tstamprepl", []_C_int{4, 2, 1, 6}}, + {"net.inet.igmp.stats", []_C_int{4, 2, 2, 1}}, + {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}}, + {"net.inet.ip.encdebug", []_C_int{4, 2, 0, 12}}, + {"net.inet.ip.forwarding", []_C_int{4, 2, 0, 1}}, + {"net.inet.ip.ifq.congestion", []_C_int{4, 2, 0, 30, 4}}, + {"net.inet.ip.ifq.drops", []_C_int{4, 2, 0, 30, 3}}, + {"net.inet.ip.ifq.len", []_C_int{4, 2, 0, 30, 1}}, + {"net.inet.ip.ifq.maxlen", []_C_int{4, 2, 0, 30, 2}}, + {"net.inet.ip.maxqueue", []_C_int{4, 2, 0, 11}}, + {"net.inet.ip.mforwarding", []_C_int{4, 2, 0, 31}}, + {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}}, + {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}}, + {"net.inet.ip.mtu", []_C_int{4, 2, 0, 4}}, + {"net.inet.ip.mtudisc", []_C_int{4, 2, 0, 27}}, + {"net.inet.ip.mtudisctimeout", []_C_int{4, 2, 0, 28}}, + {"net.inet.ip.multipath", []_C_int{4, 2, 0, 32}}, + {"net.inet.ip.portfirst", []_C_int{4, 2, 0, 7}}, + {"net.inet.ip.porthifirst", []_C_int{4, 2, 0, 9}}, + {"net.inet.ip.porthilast", []_C_int{4, 2, 0, 10}}, + {"net.inet.ip.portlast", []_C_int{4, 2, 0, 8}}, + {"net.inet.ip.redirect", []_C_int{4, 2, 0, 2}}, + {"net.inet.ip.sourceroute", []_C_int{4, 2, 0, 5}}, + {"net.inet.ip.stats", []_C_int{4, 2, 0, 33}}, + {"net.inet.ip.ttl", []_C_int{4, 2, 0, 3}}, + {"net.inet.ipcomp.enable", []_C_int{4, 2, 108, 1}}, + {"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}}, + {"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}}, + {"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}}, + {"net.inet.mobileip.allow", []_C_int{4, 2, 55, 1}}, + {"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}}, + {"net.inet.pim.stats", []_C_int{4, 2, 103, 1}}, + {"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}}, + {"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}}, + {"net.inet.tcp.baddynamic", []_C_int{4, 2, 6, 6}}, + {"net.inet.tcp.drop", []_C_int{4, 2, 6, 19}}, + {"net.inet.tcp.ecn", []_C_int{4, 2, 6, 14}}, + {"net.inet.tcp.ident", []_C_int{4, 2, 6, 9}}, + {"net.inet.tcp.keepidle", []_C_int{4, 2, 6, 3}}, + {"net.inet.tcp.keepinittime", []_C_int{4, 2, 6, 2}}, + {"net.inet.tcp.keepintvl", []_C_int{4, 2, 6, 4}}, + {"net.inet.tcp.mssdflt", []_C_int{4, 2, 6, 11}}, + {"net.inet.tcp.reasslimit", []_C_int{4, 2, 6, 18}}, + {"net.inet.tcp.rfc1323", []_C_int{4, 2, 6, 1}}, + {"net.inet.tcp.rfc3390", []_C_int{4, 2, 6, 17}}, + {"net.inet.tcp.rstppslimit", []_C_int{4, 2, 6, 12}}, + {"net.inet.tcp.sack", []_C_int{4, 2, 6, 10}}, + {"net.inet.tcp.sackholelimit", []_C_int{4, 2, 6, 20}}, + {"net.inet.tcp.slowhz", []_C_int{4, 2, 6, 5}}, + {"net.inet.tcp.stats", []_C_int{4, 2, 6, 21}}, + {"net.inet.tcp.synbucketlimit", []_C_int{4, 2, 6, 16}}, + {"net.inet.tcp.syncachelimit", []_C_int{4, 2, 6, 15}}, + {"net.inet.udp.baddynamic", []_C_int{4, 2, 17, 2}}, + {"net.inet.udp.checksum", []_C_int{4, 2, 17, 1}}, + {"net.inet.udp.recvspace", []_C_int{4, 2, 17, 3}}, + {"net.inet.udp.sendspace", []_C_int{4, 2, 17, 4}}, + {"net.inet.udp.stats", []_C_int{4, 2, 17, 5}}, + {"net.inet6.divert.recvspace", []_C_int{4, 24, 86, 1}}, + {"net.inet6.divert.sendspace", []_C_int{4, 24, 86, 2}}, + {"net.inet6.divert.stats", []_C_int{4, 24, 86, 3}}, + {"net.inet6.icmp6.errppslimit", []_C_int{4, 24, 30, 14}}, + {"net.inet6.icmp6.mtudisc_hiwat", []_C_int{4, 24, 30, 16}}, + {"net.inet6.icmp6.mtudisc_lowat", []_C_int{4, 24, 30, 17}}, + {"net.inet6.icmp6.nd6_debug", []_C_int{4, 24, 30, 18}}, + {"net.inet6.icmp6.nd6_delay", []_C_int{4, 24, 30, 8}}, + {"net.inet6.icmp6.nd6_maxnudhint", []_C_int{4, 24, 30, 15}}, + {"net.inet6.icmp6.nd6_mmaxtries", []_C_int{4, 24, 30, 10}}, + {"net.inet6.icmp6.nd6_prune", []_C_int{4, 24, 30, 6}}, + {"net.inet6.icmp6.nd6_umaxtries", []_C_int{4, 24, 30, 9}}, + {"net.inet6.icmp6.nd6_useloopback", []_C_int{4, 24, 30, 11}}, + {"net.inet6.icmp6.nodeinfo", []_C_int{4, 24, 30, 13}}, + {"net.inet6.icmp6.rediraccept", []_C_int{4, 24, 30, 2}}, + {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}}, + {"net.inet6.ip6.accept_rtadv", []_C_int{4, 24, 17, 12}}, + {"net.inet6.ip6.auto_flowlabel", []_C_int{4, 24, 17, 17}}, + {"net.inet6.ip6.dad_count", []_C_int{4, 24, 17, 16}}, + {"net.inet6.ip6.dad_pending", []_C_int{4, 24, 17, 49}}, + {"net.inet6.ip6.defmcasthlim", []_C_int{4, 24, 17, 18}}, + {"net.inet6.ip6.forwarding", []_C_int{4, 24, 17, 1}}, + {"net.inet6.ip6.forwsrcrt", []_C_int{4, 24, 17, 5}}, + {"net.inet6.ip6.hdrnestlimit", []_C_int{4, 24, 17, 15}}, + {"net.inet6.ip6.hlim", []_C_int{4, 24, 17, 3}}, + {"net.inet6.ip6.log_interval", []_C_int{4, 24, 17, 14}}, + {"net.inet6.ip6.maxdynroutes", []_C_int{4, 24, 17, 48}}, + {"net.inet6.ip6.maxfragpackets", []_C_int{4, 24, 17, 9}}, + {"net.inet6.ip6.maxfrags", []_C_int{4, 24, 17, 41}}, + {"net.inet6.ip6.maxifdefrouters", []_C_int{4, 24, 17, 47}}, + {"net.inet6.ip6.maxifprefixes", []_C_int{4, 24, 17, 46}}, + {"net.inet6.ip6.mforwarding", []_C_int{4, 24, 17, 42}}, + {"net.inet6.ip6.mrtproto", []_C_int{4, 24, 17, 8}}, + {"net.inet6.ip6.mtudisctimeout", []_C_int{4, 24, 17, 50}}, + {"net.inet6.ip6.multicast_mtudisc", []_C_int{4, 24, 17, 44}}, + {"net.inet6.ip6.multipath", []_C_int{4, 24, 17, 43}}, + {"net.inet6.ip6.neighborgcthresh", []_C_int{4, 24, 17, 45}}, + {"net.inet6.ip6.redirect", []_C_int{4, 24, 17, 2}}, + {"net.inet6.ip6.rr_prune", []_C_int{4, 24, 17, 22}}, + {"net.inet6.ip6.sourcecheck", []_C_int{4, 24, 17, 10}}, + {"net.inet6.ip6.sourcecheck_logint", []_C_int{4, 24, 17, 11}}, + {"net.inet6.ip6.use_deprecated", []_C_int{4, 24, 17, 21}}, + {"net.inet6.ip6.v6only", []_C_int{4, 24, 17, 24}}, + {"net.key.sadb_dump", []_C_int{4, 30, 1}}, + {"net.key.spd_dump", []_C_int{4, 30, 2}}, + {"net.mpls.ifq.congestion", []_C_int{4, 33, 3, 4}}, + {"net.mpls.ifq.drops", []_C_int{4, 33, 3, 3}}, + {"net.mpls.ifq.len", []_C_int{4, 33, 3, 1}}, + {"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}}, + {"net.mpls.mapttl_ip", []_C_int{4, 33, 5}}, + {"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}}, + {"net.mpls.maxloop_inkernel", []_C_int{4, 33, 4}}, + {"net.mpls.ttl", []_C_int{4, 33, 2}}, + {"net.pflow.stats", []_C_int{4, 34, 1}}, + {"net.pipex.enable", []_C_int{4, 35, 1}}, + {"vm.anonmin", []_C_int{2, 7}}, + {"vm.loadavg", []_C_int{2, 2}}, + {"vm.maxslp", []_C_int{2, 10}}, + {"vm.nkmempages", []_C_int{2, 6}}, + {"vm.psstrings", []_C_int{2, 3}}, + {"vm.swapencrypt.enable", []_C_int{2, 5, 0}}, + {"vm.swapencrypt.keyscreated", []_C_int{2, 5, 1}}, + {"vm.swapencrypt.keysdeleted", []_C_int{2, 5, 2}}, + {"vm.uspace", []_C_int{2, 11}}, + {"vm.uvmexp", []_C_int{2, 4}}, + {"vm.vmmeter", []_C_int{2, 1}}, + {"vm.vnodemin", []_C_int{2, 9}}, + {"vm.vtextmin", []_C_int{2, 8}}, +} diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go new file mode 100644 index 0000000..2786773 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go @@ -0,0 +1,398 @@ +// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/syscall.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build 386,darwin + +package unix + +const ( + SYS_SYSCALL = 0 + SYS_EXIT = 1 + SYS_FORK = 2 + SYS_READ = 3 + SYS_WRITE = 4 + SYS_OPEN = 5 + SYS_CLOSE = 6 + SYS_WAIT4 = 7 + SYS_LINK = 9 + SYS_UNLINK = 10 + SYS_CHDIR = 12 + SYS_FCHDIR = 13 + SYS_MKNOD = 14 + SYS_CHMOD = 15 + SYS_CHOWN = 16 + SYS_GETFSSTAT = 18 + SYS_GETPID = 20 + SYS_SETUID = 23 + SYS_GETUID = 24 + SYS_GETEUID = 25 + SYS_PTRACE = 26 + SYS_RECVMSG = 27 + SYS_SENDMSG = 28 + SYS_RECVFROM = 29 + SYS_ACCEPT = 30 + SYS_GETPEERNAME = 31 + SYS_GETSOCKNAME = 32 + SYS_ACCESS = 33 + SYS_CHFLAGS = 34 + SYS_FCHFLAGS = 35 + SYS_SYNC = 36 + SYS_KILL = 37 + SYS_GETPPID = 39 + SYS_DUP = 41 + SYS_PIPE = 42 + SYS_GETEGID = 43 + SYS_SIGACTION = 46 + SYS_GETGID = 47 + SYS_SIGPROCMASK = 48 + SYS_GETLOGIN = 49 + SYS_SETLOGIN = 50 + SYS_ACCT = 51 + SYS_SIGPENDING = 52 + SYS_SIGALTSTACK = 53 + SYS_IOCTL = 54 + SYS_REBOOT = 55 + SYS_REVOKE = 56 + SYS_SYMLINK = 57 + SYS_READLINK = 58 + SYS_EXECVE = 59 + SYS_UMASK = 60 + SYS_CHROOT = 61 + SYS_MSYNC = 65 + SYS_VFORK = 66 + SYS_MUNMAP = 73 + SYS_MPROTECT = 74 + SYS_MADVISE = 75 + SYS_MINCORE = 78 + SYS_GETGROUPS = 79 + SYS_SETGROUPS = 80 + SYS_GETPGRP = 81 + SYS_SETPGID = 82 + SYS_SETITIMER = 83 + SYS_SWAPON = 85 + SYS_GETITIMER = 86 + SYS_GETDTABLESIZE = 89 + SYS_DUP2 = 90 + SYS_FCNTL = 92 + SYS_SELECT = 93 + SYS_FSYNC = 95 + SYS_SETPRIORITY = 96 + SYS_SOCKET = 97 + SYS_CONNECT = 98 + SYS_GETPRIORITY = 100 + SYS_BIND = 104 + SYS_SETSOCKOPT = 105 + SYS_LISTEN = 106 + SYS_SIGSUSPEND = 111 + SYS_GETTIMEOFDAY = 116 + SYS_GETRUSAGE = 117 + SYS_GETSOCKOPT = 118 + SYS_READV = 120 + SYS_WRITEV = 121 + SYS_SETTIMEOFDAY = 122 + SYS_FCHOWN = 123 + SYS_FCHMOD = 124 + SYS_SETREUID = 126 + SYS_SETREGID = 127 + SYS_RENAME = 128 + SYS_FLOCK = 131 + SYS_MKFIFO = 132 + SYS_SENDTO = 133 + SYS_SHUTDOWN = 134 + SYS_SOCKETPAIR = 135 + SYS_MKDIR = 136 + SYS_RMDIR = 137 + SYS_UTIMES = 138 + SYS_FUTIMES = 139 + SYS_ADJTIME = 140 + SYS_GETHOSTUUID = 142 + SYS_SETSID = 147 + SYS_GETPGID = 151 + SYS_SETPRIVEXEC = 152 + SYS_PREAD = 153 + SYS_PWRITE = 154 + SYS_NFSSVC = 155 + SYS_STATFS = 157 + SYS_FSTATFS = 158 + SYS_UNMOUNT = 159 + SYS_GETFH = 161 + SYS_QUOTACTL = 165 + SYS_MOUNT = 167 + SYS_CSOPS = 169 + SYS_CSOPS_AUDITTOKEN = 170 + SYS_WAITID = 173 + SYS_KDEBUG_TRACE64 = 179 + SYS_KDEBUG_TRACE = 180 + SYS_SETGID = 181 + SYS_SETEGID = 182 + SYS_SETEUID = 183 + SYS_SIGRETURN = 184 + SYS_CHUD = 185 + SYS_FDATASYNC = 187 + SYS_STAT = 188 + SYS_FSTAT = 189 + SYS_LSTAT = 190 + SYS_PATHCONF = 191 + SYS_FPATHCONF = 192 + SYS_GETRLIMIT = 194 + SYS_SETRLIMIT = 195 + SYS_GETDIRENTRIES = 196 + SYS_MMAP = 197 + SYS_LSEEK = 199 + SYS_TRUNCATE = 200 + SYS_FTRUNCATE = 201 + SYS_SYSCTL = 202 + SYS_MLOCK = 203 + SYS_MUNLOCK = 204 + SYS_UNDELETE = 205 + SYS_OPEN_DPROTECTED_NP = 216 + SYS_GETATTRLIST = 220 + SYS_SETATTRLIST = 221 + SYS_GETDIRENTRIESATTR = 222 + SYS_EXCHANGEDATA = 223 + SYS_SEARCHFS = 225 + SYS_DELETE = 226 + SYS_COPYFILE = 227 + SYS_FGETATTRLIST = 228 + SYS_FSETATTRLIST = 229 + SYS_POLL = 230 + SYS_WATCHEVENT = 231 + SYS_WAITEVENT = 232 + SYS_MODWATCH = 233 + SYS_GETXATTR = 234 + SYS_FGETXATTR = 235 + SYS_SETXATTR = 236 + SYS_FSETXATTR = 237 + SYS_REMOVEXATTR = 238 + SYS_FREMOVEXATTR = 239 + SYS_LISTXATTR = 240 + SYS_FLISTXATTR = 241 + SYS_FSCTL = 242 + SYS_INITGROUPS = 243 + SYS_POSIX_SPAWN = 244 + SYS_FFSCTL = 245 + SYS_NFSCLNT = 247 + SYS_FHOPEN = 248 + SYS_MINHERIT = 250 + SYS_SEMSYS = 251 + SYS_MSGSYS = 252 + SYS_SHMSYS = 253 + SYS_SEMCTL = 254 + SYS_SEMGET = 255 + SYS_SEMOP = 256 + SYS_MSGCTL = 258 + SYS_MSGGET = 259 + SYS_MSGSND = 260 + SYS_MSGRCV = 261 + SYS_SHMAT = 262 + SYS_SHMCTL = 263 + SYS_SHMDT = 264 + SYS_SHMGET = 265 + SYS_SHM_OPEN = 266 + SYS_SHM_UNLINK = 267 + SYS_SEM_OPEN = 268 + SYS_SEM_CLOSE = 269 + SYS_SEM_UNLINK = 270 + SYS_SEM_WAIT = 271 + SYS_SEM_TRYWAIT = 272 + SYS_SEM_POST = 273 + SYS_SYSCTLBYNAME = 274 + SYS_OPEN_EXTENDED = 277 + SYS_UMASK_EXTENDED = 278 + SYS_STAT_EXTENDED = 279 + SYS_LSTAT_EXTENDED = 280 + SYS_FSTAT_EXTENDED = 281 + SYS_CHMOD_EXTENDED = 282 + SYS_FCHMOD_EXTENDED = 283 + SYS_ACCESS_EXTENDED = 284 + SYS_SETTID = 285 + SYS_GETTID = 286 + SYS_SETSGROUPS = 287 + SYS_GETSGROUPS = 288 + SYS_SETWGROUPS = 289 + SYS_GETWGROUPS = 290 + SYS_MKFIFO_EXTENDED = 291 + SYS_MKDIR_EXTENDED = 292 + SYS_IDENTITYSVC = 293 + SYS_SHARED_REGION_CHECK_NP = 294 + SYS_VM_PRESSURE_MONITOR = 296 + SYS_PSYNCH_RW_LONGRDLOCK = 297 + SYS_PSYNCH_RW_YIELDWRLOCK = 298 + SYS_PSYNCH_RW_DOWNGRADE = 299 + SYS_PSYNCH_RW_UPGRADE = 300 + SYS_PSYNCH_MUTEXWAIT = 301 + SYS_PSYNCH_MUTEXDROP = 302 + SYS_PSYNCH_CVBROAD = 303 + SYS_PSYNCH_CVSIGNAL = 304 + SYS_PSYNCH_CVWAIT = 305 + SYS_PSYNCH_RW_RDLOCK = 306 + SYS_PSYNCH_RW_WRLOCK = 307 + SYS_PSYNCH_RW_UNLOCK = 308 + SYS_PSYNCH_RW_UNLOCK2 = 309 + SYS_GETSID = 310 + SYS_SETTID_WITH_PID = 311 + SYS_PSYNCH_CVCLRPREPOST = 312 + SYS_AIO_FSYNC = 313 + SYS_AIO_RETURN = 314 + SYS_AIO_SUSPEND = 315 + SYS_AIO_CANCEL = 316 + SYS_AIO_ERROR = 317 + SYS_AIO_READ = 318 + SYS_AIO_WRITE = 319 + SYS_LIO_LISTIO = 320 + SYS_IOPOLICYSYS = 322 + SYS_PROCESS_POLICY = 323 + SYS_MLOCKALL = 324 + SYS_MUNLOCKALL = 325 + SYS_ISSETUGID = 327 + SYS___PTHREAD_KILL = 328 + SYS___PTHREAD_SIGMASK = 329 + SYS___SIGWAIT = 330 + SYS___DISABLE_THREADSIGNAL = 331 + SYS___PTHREAD_MARKCANCEL = 332 + SYS___PTHREAD_CANCELED = 333 + SYS___SEMWAIT_SIGNAL = 334 + SYS_PROC_INFO = 336 + SYS_SENDFILE = 337 + SYS_STAT64 = 338 + SYS_FSTAT64 = 339 + SYS_LSTAT64 = 340 + SYS_STAT64_EXTENDED = 341 + SYS_LSTAT64_EXTENDED = 342 + SYS_FSTAT64_EXTENDED = 343 + SYS_GETDIRENTRIES64 = 344 + SYS_STATFS64 = 345 + SYS_FSTATFS64 = 346 + SYS_GETFSSTAT64 = 347 + SYS___PTHREAD_CHDIR = 348 + SYS___PTHREAD_FCHDIR = 349 + SYS_AUDIT = 350 + SYS_AUDITON = 351 + SYS_GETAUID = 353 + SYS_SETAUID = 354 + SYS_GETAUDIT_ADDR = 357 + SYS_SETAUDIT_ADDR = 358 + SYS_AUDITCTL = 359 + SYS_BSDTHREAD_CREATE = 360 + SYS_BSDTHREAD_TERMINATE = 361 + SYS_KQUEUE = 362 + SYS_KEVENT = 363 + SYS_LCHOWN = 364 + SYS_STACK_SNAPSHOT = 365 + SYS_BSDTHREAD_REGISTER = 366 + SYS_WORKQ_OPEN = 367 + SYS_WORKQ_KERNRETURN = 368 + SYS_KEVENT64 = 369 + SYS___OLD_SEMWAIT_SIGNAL = 370 + SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371 + SYS_THREAD_SELFID = 372 + SYS_LEDGER = 373 + SYS___MAC_EXECVE = 380 + SYS___MAC_SYSCALL = 381 + SYS___MAC_GET_FILE = 382 + SYS___MAC_SET_FILE = 383 + SYS___MAC_GET_LINK = 384 + SYS___MAC_SET_LINK = 385 + SYS___MAC_GET_PROC = 386 + SYS___MAC_SET_PROC = 387 + SYS___MAC_GET_FD = 388 + SYS___MAC_SET_FD = 389 + SYS___MAC_GET_PID = 390 + SYS___MAC_GET_LCID = 391 + SYS___MAC_GET_LCTX = 392 + SYS___MAC_SET_LCTX = 393 + SYS_SETLCID = 394 + SYS_GETLCID = 395 + SYS_READ_NOCANCEL = 396 + SYS_WRITE_NOCANCEL = 397 + SYS_OPEN_NOCANCEL = 398 + SYS_CLOSE_NOCANCEL = 399 + SYS_WAIT4_NOCANCEL = 400 + SYS_RECVMSG_NOCANCEL = 401 + SYS_SENDMSG_NOCANCEL = 402 + SYS_RECVFROM_NOCANCEL = 403 + SYS_ACCEPT_NOCANCEL = 404 + SYS_MSYNC_NOCANCEL = 405 + SYS_FCNTL_NOCANCEL = 406 + SYS_SELECT_NOCANCEL = 407 + SYS_FSYNC_NOCANCEL = 408 + SYS_CONNECT_NOCANCEL = 409 + SYS_SIGSUSPEND_NOCANCEL = 410 + SYS_READV_NOCANCEL = 411 + SYS_WRITEV_NOCANCEL = 412 + SYS_SENDTO_NOCANCEL = 413 + SYS_PREAD_NOCANCEL = 414 + SYS_PWRITE_NOCANCEL = 415 + SYS_WAITID_NOCANCEL = 416 + SYS_POLL_NOCANCEL = 417 + SYS_MSGSND_NOCANCEL = 418 + SYS_MSGRCV_NOCANCEL = 419 + SYS_SEM_WAIT_NOCANCEL = 420 + SYS_AIO_SUSPEND_NOCANCEL = 421 + SYS___SIGWAIT_NOCANCEL = 422 + SYS___SEMWAIT_SIGNAL_NOCANCEL = 423 + SYS___MAC_MOUNT = 424 + SYS___MAC_GET_MOUNT = 425 + SYS___MAC_GETFSSTAT = 426 + SYS_FSGETPATH = 427 + SYS_AUDIT_SESSION_SELF = 428 + SYS_AUDIT_SESSION_JOIN = 429 + SYS_FILEPORT_MAKEPORT = 430 + SYS_FILEPORT_MAKEFD = 431 + SYS_AUDIT_SESSION_PORT = 432 + SYS_PID_SUSPEND = 433 + SYS_PID_RESUME = 434 + SYS_PID_HIBERNATE = 435 + SYS_PID_SHUTDOWN_SOCKETS = 436 + SYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438 + SYS_KAS_INFO = 439 + SYS_MEMORYSTATUS_CONTROL = 440 + SYS_GUARDED_OPEN_NP = 441 + SYS_GUARDED_CLOSE_NP = 442 + SYS_GUARDED_KQUEUE_NP = 443 + SYS_CHANGE_FDGUARD_NP = 444 + SYS_PROC_RLIMIT_CONTROL = 446 + SYS_CONNECTX = 447 + SYS_DISCONNECTX = 448 + SYS_PEELOFF = 449 + SYS_SOCKET_DELEGATE = 450 + SYS_TELEMETRY = 451 + SYS_PROC_UUID_POLICY = 452 + SYS_MEMORYSTATUS_GET_LEVEL = 453 + SYS_SYSTEM_OVERRIDE = 454 + SYS_VFS_PURGE = 455 + SYS_SFI_CTL = 456 + SYS_SFI_PIDCTL = 457 + SYS_COALITION = 458 + SYS_COALITION_INFO = 459 + SYS_NECP_MATCH_POLICY = 460 + SYS_GETATTRLISTBULK = 461 + SYS_OPENAT = 463 + SYS_OPENAT_NOCANCEL = 464 + SYS_RENAMEAT = 465 + SYS_FACCESSAT = 466 + SYS_FCHMODAT = 467 + SYS_FCHOWNAT = 468 + SYS_FSTATAT = 469 + SYS_FSTATAT64 = 470 + SYS_LINKAT = 471 + SYS_UNLINKAT = 472 + SYS_READLINKAT = 473 + SYS_SYMLINKAT = 474 + SYS_MKDIRAT = 475 + SYS_GETATTRLISTAT = 476 + SYS_PROC_TRACE_LOG = 477 + SYS_BSDTHREAD_CTL = 478 + SYS_OPENBYID_NP = 479 + SYS_RECVMSG_X = 480 + SYS_SENDMSG_X = 481 + SYS_THREAD_SELFUSAGE = 482 + SYS_CSRCTL = 483 + SYS_GUARDED_OPEN_DPROTECTED_NP = 484 + SYS_GUARDED_WRITE_NP = 485 + SYS_GUARDED_PWRITE_NP = 486 + SYS_GUARDED_WRITEV_NP = 487 + SYS_RENAME_EXT = 488 + SYS_MREMAP_ENCRYPTED = 489 + SYS_MAXSYSCALL = 490 +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go new file mode 100644 index 0000000..09de240 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go @@ -0,0 +1,398 @@ +// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/syscall.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build amd64,darwin + +package unix + +const ( + SYS_SYSCALL = 0 + SYS_EXIT = 1 + SYS_FORK = 2 + SYS_READ = 3 + SYS_WRITE = 4 + SYS_OPEN = 5 + SYS_CLOSE = 6 + SYS_WAIT4 = 7 + SYS_LINK = 9 + SYS_UNLINK = 10 + SYS_CHDIR = 12 + SYS_FCHDIR = 13 + SYS_MKNOD = 14 + SYS_CHMOD = 15 + SYS_CHOWN = 16 + SYS_GETFSSTAT = 18 + SYS_GETPID = 20 + SYS_SETUID = 23 + SYS_GETUID = 24 + SYS_GETEUID = 25 + SYS_PTRACE = 26 + SYS_RECVMSG = 27 + SYS_SENDMSG = 28 + SYS_RECVFROM = 29 + SYS_ACCEPT = 30 + SYS_GETPEERNAME = 31 + SYS_GETSOCKNAME = 32 + SYS_ACCESS = 33 + SYS_CHFLAGS = 34 + SYS_FCHFLAGS = 35 + SYS_SYNC = 36 + SYS_KILL = 37 + SYS_GETPPID = 39 + SYS_DUP = 41 + SYS_PIPE = 42 + SYS_GETEGID = 43 + SYS_SIGACTION = 46 + SYS_GETGID = 47 + SYS_SIGPROCMASK = 48 + SYS_GETLOGIN = 49 + SYS_SETLOGIN = 50 + SYS_ACCT = 51 + SYS_SIGPENDING = 52 + SYS_SIGALTSTACK = 53 + SYS_IOCTL = 54 + SYS_REBOOT = 55 + SYS_REVOKE = 56 + SYS_SYMLINK = 57 + SYS_READLINK = 58 + SYS_EXECVE = 59 + SYS_UMASK = 60 + SYS_CHROOT = 61 + SYS_MSYNC = 65 + SYS_VFORK = 66 + SYS_MUNMAP = 73 + SYS_MPROTECT = 74 + SYS_MADVISE = 75 + SYS_MINCORE = 78 + SYS_GETGROUPS = 79 + SYS_SETGROUPS = 80 + SYS_GETPGRP = 81 + SYS_SETPGID = 82 + SYS_SETITIMER = 83 + SYS_SWAPON = 85 + SYS_GETITIMER = 86 + SYS_GETDTABLESIZE = 89 + SYS_DUP2 = 90 + SYS_FCNTL = 92 + SYS_SELECT = 93 + SYS_FSYNC = 95 + SYS_SETPRIORITY = 96 + SYS_SOCKET = 97 + SYS_CONNECT = 98 + SYS_GETPRIORITY = 100 + SYS_BIND = 104 + SYS_SETSOCKOPT = 105 + SYS_LISTEN = 106 + SYS_SIGSUSPEND = 111 + SYS_GETTIMEOFDAY = 116 + SYS_GETRUSAGE = 117 + SYS_GETSOCKOPT = 118 + SYS_READV = 120 + SYS_WRITEV = 121 + SYS_SETTIMEOFDAY = 122 + SYS_FCHOWN = 123 + SYS_FCHMOD = 124 + SYS_SETREUID = 126 + SYS_SETREGID = 127 + SYS_RENAME = 128 + SYS_FLOCK = 131 + SYS_MKFIFO = 132 + SYS_SENDTO = 133 + SYS_SHUTDOWN = 134 + SYS_SOCKETPAIR = 135 + SYS_MKDIR = 136 + SYS_RMDIR = 137 + SYS_UTIMES = 138 + SYS_FUTIMES = 139 + SYS_ADJTIME = 140 + SYS_GETHOSTUUID = 142 + SYS_SETSID = 147 + SYS_GETPGID = 151 + SYS_SETPRIVEXEC = 152 + SYS_PREAD = 153 + SYS_PWRITE = 154 + SYS_NFSSVC = 155 + SYS_STATFS = 157 + SYS_FSTATFS = 158 + SYS_UNMOUNT = 159 + SYS_GETFH = 161 + SYS_QUOTACTL = 165 + SYS_MOUNT = 167 + SYS_CSOPS = 169 + SYS_CSOPS_AUDITTOKEN = 170 + SYS_WAITID = 173 + SYS_KDEBUG_TRACE64 = 179 + SYS_KDEBUG_TRACE = 180 + SYS_SETGID = 181 + SYS_SETEGID = 182 + SYS_SETEUID = 183 + SYS_SIGRETURN = 184 + SYS_CHUD = 185 + SYS_FDATASYNC = 187 + SYS_STAT = 188 + SYS_FSTAT = 189 + SYS_LSTAT = 190 + SYS_PATHCONF = 191 + SYS_FPATHCONF = 192 + SYS_GETRLIMIT = 194 + SYS_SETRLIMIT = 195 + SYS_GETDIRENTRIES = 196 + SYS_MMAP = 197 + SYS_LSEEK = 199 + SYS_TRUNCATE = 200 + SYS_FTRUNCATE = 201 + SYS_SYSCTL = 202 + SYS_MLOCK = 203 + SYS_MUNLOCK = 204 + SYS_UNDELETE = 205 + SYS_OPEN_DPROTECTED_NP = 216 + SYS_GETATTRLIST = 220 + SYS_SETATTRLIST = 221 + SYS_GETDIRENTRIESATTR = 222 + SYS_EXCHANGEDATA = 223 + SYS_SEARCHFS = 225 + SYS_DELETE = 226 + SYS_COPYFILE = 227 + SYS_FGETATTRLIST = 228 + SYS_FSETATTRLIST = 229 + SYS_POLL = 230 + SYS_WATCHEVENT = 231 + SYS_WAITEVENT = 232 + SYS_MODWATCH = 233 + SYS_GETXATTR = 234 + SYS_FGETXATTR = 235 + SYS_SETXATTR = 236 + SYS_FSETXATTR = 237 + SYS_REMOVEXATTR = 238 + SYS_FREMOVEXATTR = 239 + SYS_LISTXATTR = 240 + SYS_FLISTXATTR = 241 + SYS_FSCTL = 242 + SYS_INITGROUPS = 243 + SYS_POSIX_SPAWN = 244 + SYS_FFSCTL = 245 + SYS_NFSCLNT = 247 + SYS_FHOPEN = 248 + SYS_MINHERIT = 250 + SYS_SEMSYS = 251 + SYS_MSGSYS = 252 + SYS_SHMSYS = 253 + SYS_SEMCTL = 254 + SYS_SEMGET = 255 + SYS_SEMOP = 256 + SYS_MSGCTL = 258 + SYS_MSGGET = 259 + SYS_MSGSND = 260 + SYS_MSGRCV = 261 + SYS_SHMAT = 262 + SYS_SHMCTL = 263 + SYS_SHMDT = 264 + SYS_SHMGET = 265 + SYS_SHM_OPEN = 266 + SYS_SHM_UNLINK = 267 + SYS_SEM_OPEN = 268 + SYS_SEM_CLOSE = 269 + SYS_SEM_UNLINK = 270 + SYS_SEM_WAIT = 271 + SYS_SEM_TRYWAIT = 272 + SYS_SEM_POST = 273 + SYS_SYSCTLBYNAME = 274 + SYS_OPEN_EXTENDED = 277 + SYS_UMASK_EXTENDED = 278 + SYS_STAT_EXTENDED = 279 + SYS_LSTAT_EXTENDED = 280 + SYS_FSTAT_EXTENDED = 281 + SYS_CHMOD_EXTENDED = 282 + SYS_FCHMOD_EXTENDED = 283 + SYS_ACCESS_EXTENDED = 284 + SYS_SETTID = 285 + SYS_GETTID = 286 + SYS_SETSGROUPS = 287 + SYS_GETSGROUPS = 288 + SYS_SETWGROUPS = 289 + SYS_GETWGROUPS = 290 + SYS_MKFIFO_EXTENDED = 291 + SYS_MKDIR_EXTENDED = 292 + SYS_IDENTITYSVC = 293 + SYS_SHARED_REGION_CHECK_NP = 294 + SYS_VM_PRESSURE_MONITOR = 296 + SYS_PSYNCH_RW_LONGRDLOCK = 297 + SYS_PSYNCH_RW_YIELDWRLOCK = 298 + SYS_PSYNCH_RW_DOWNGRADE = 299 + SYS_PSYNCH_RW_UPGRADE = 300 + SYS_PSYNCH_MUTEXWAIT = 301 + SYS_PSYNCH_MUTEXDROP = 302 + SYS_PSYNCH_CVBROAD = 303 + SYS_PSYNCH_CVSIGNAL = 304 + SYS_PSYNCH_CVWAIT = 305 + SYS_PSYNCH_RW_RDLOCK = 306 + SYS_PSYNCH_RW_WRLOCK = 307 + SYS_PSYNCH_RW_UNLOCK = 308 + SYS_PSYNCH_RW_UNLOCK2 = 309 + SYS_GETSID = 310 + SYS_SETTID_WITH_PID = 311 + SYS_PSYNCH_CVCLRPREPOST = 312 + SYS_AIO_FSYNC = 313 + SYS_AIO_RETURN = 314 + SYS_AIO_SUSPEND = 315 + SYS_AIO_CANCEL = 316 + SYS_AIO_ERROR = 317 + SYS_AIO_READ = 318 + SYS_AIO_WRITE = 319 + SYS_LIO_LISTIO = 320 + SYS_IOPOLICYSYS = 322 + SYS_PROCESS_POLICY = 323 + SYS_MLOCKALL = 324 + SYS_MUNLOCKALL = 325 + SYS_ISSETUGID = 327 + SYS___PTHREAD_KILL = 328 + SYS___PTHREAD_SIGMASK = 329 + SYS___SIGWAIT = 330 + SYS___DISABLE_THREADSIGNAL = 331 + SYS___PTHREAD_MARKCANCEL = 332 + SYS___PTHREAD_CANCELED = 333 + SYS___SEMWAIT_SIGNAL = 334 + SYS_PROC_INFO = 336 + SYS_SENDFILE = 337 + SYS_STAT64 = 338 + SYS_FSTAT64 = 339 + SYS_LSTAT64 = 340 + SYS_STAT64_EXTENDED = 341 + SYS_LSTAT64_EXTENDED = 342 + SYS_FSTAT64_EXTENDED = 343 + SYS_GETDIRENTRIES64 = 344 + SYS_STATFS64 = 345 + SYS_FSTATFS64 = 346 + SYS_GETFSSTAT64 = 347 + SYS___PTHREAD_CHDIR = 348 + SYS___PTHREAD_FCHDIR = 349 + SYS_AUDIT = 350 + SYS_AUDITON = 351 + SYS_GETAUID = 353 + SYS_SETAUID = 354 + SYS_GETAUDIT_ADDR = 357 + SYS_SETAUDIT_ADDR = 358 + SYS_AUDITCTL = 359 + SYS_BSDTHREAD_CREATE = 360 + SYS_BSDTHREAD_TERMINATE = 361 + SYS_KQUEUE = 362 + SYS_KEVENT = 363 + SYS_LCHOWN = 364 + SYS_STACK_SNAPSHOT = 365 + SYS_BSDTHREAD_REGISTER = 366 + SYS_WORKQ_OPEN = 367 + SYS_WORKQ_KERNRETURN = 368 + SYS_KEVENT64 = 369 + SYS___OLD_SEMWAIT_SIGNAL = 370 + SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371 + SYS_THREAD_SELFID = 372 + SYS_LEDGER = 373 + SYS___MAC_EXECVE = 380 + SYS___MAC_SYSCALL = 381 + SYS___MAC_GET_FILE = 382 + SYS___MAC_SET_FILE = 383 + SYS___MAC_GET_LINK = 384 + SYS___MAC_SET_LINK = 385 + SYS___MAC_GET_PROC = 386 + SYS___MAC_SET_PROC = 387 + SYS___MAC_GET_FD = 388 + SYS___MAC_SET_FD = 389 + SYS___MAC_GET_PID = 390 + SYS___MAC_GET_LCID = 391 + SYS___MAC_GET_LCTX = 392 + SYS___MAC_SET_LCTX = 393 + SYS_SETLCID = 394 + SYS_GETLCID = 395 + SYS_READ_NOCANCEL = 396 + SYS_WRITE_NOCANCEL = 397 + SYS_OPEN_NOCANCEL = 398 + SYS_CLOSE_NOCANCEL = 399 + SYS_WAIT4_NOCANCEL = 400 + SYS_RECVMSG_NOCANCEL = 401 + SYS_SENDMSG_NOCANCEL = 402 + SYS_RECVFROM_NOCANCEL = 403 + SYS_ACCEPT_NOCANCEL = 404 + SYS_MSYNC_NOCANCEL = 405 + SYS_FCNTL_NOCANCEL = 406 + SYS_SELECT_NOCANCEL = 407 + SYS_FSYNC_NOCANCEL = 408 + SYS_CONNECT_NOCANCEL = 409 + SYS_SIGSUSPEND_NOCANCEL = 410 + SYS_READV_NOCANCEL = 411 + SYS_WRITEV_NOCANCEL = 412 + SYS_SENDTO_NOCANCEL = 413 + SYS_PREAD_NOCANCEL = 414 + SYS_PWRITE_NOCANCEL = 415 + SYS_WAITID_NOCANCEL = 416 + SYS_POLL_NOCANCEL = 417 + SYS_MSGSND_NOCANCEL = 418 + SYS_MSGRCV_NOCANCEL = 419 + SYS_SEM_WAIT_NOCANCEL = 420 + SYS_AIO_SUSPEND_NOCANCEL = 421 + SYS___SIGWAIT_NOCANCEL = 422 + SYS___SEMWAIT_SIGNAL_NOCANCEL = 423 + SYS___MAC_MOUNT = 424 + SYS___MAC_GET_MOUNT = 425 + SYS___MAC_GETFSSTAT = 426 + SYS_FSGETPATH = 427 + SYS_AUDIT_SESSION_SELF = 428 + SYS_AUDIT_SESSION_JOIN = 429 + SYS_FILEPORT_MAKEPORT = 430 + SYS_FILEPORT_MAKEFD = 431 + SYS_AUDIT_SESSION_PORT = 432 + SYS_PID_SUSPEND = 433 + SYS_PID_RESUME = 434 + SYS_PID_HIBERNATE = 435 + SYS_PID_SHUTDOWN_SOCKETS = 436 + SYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438 + SYS_KAS_INFO = 439 + SYS_MEMORYSTATUS_CONTROL = 440 + SYS_GUARDED_OPEN_NP = 441 + SYS_GUARDED_CLOSE_NP = 442 + SYS_GUARDED_KQUEUE_NP = 443 + SYS_CHANGE_FDGUARD_NP = 444 + SYS_PROC_RLIMIT_CONTROL = 446 + SYS_CONNECTX = 447 + SYS_DISCONNECTX = 448 + SYS_PEELOFF = 449 + SYS_SOCKET_DELEGATE = 450 + SYS_TELEMETRY = 451 + SYS_PROC_UUID_POLICY = 452 + SYS_MEMORYSTATUS_GET_LEVEL = 453 + SYS_SYSTEM_OVERRIDE = 454 + SYS_VFS_PURGE = 455 + SYS_SFI_CTL = 456 + SYS_SFI_PIDCTL = 457 + SYS_COALITION = 458 + SYS_COALITION_INFO = 459 + SYS_NECP_MATCH_POLICY = 460 + SYS_GETATTRLISTBULK = 461 + SYS_OPENAT = 463 + SYS_OPENAT_NOCANCEL = 464 + SYS_RENAMEAT = 465 + SYS_FACCESSAT = 466 + SYS_FCHMODAT = 467 + SYS_FCHOWNAT = 468 + SYS_FSTATAT = 469 + SYS_FSTATAT64 = 470 + SYS_LINKAT = 471 + SYS_UNLINKAT = 472 + SYS_READLINKAT = 473 + SYS_SYMLINKAT = 474 + SYS_MKDIRAT = 475 + SYS_GETATTRLISTAT = 476 + SYS_PROC_TRACE_LOG = 477 + SYS_BSDTHREAD_CTL = 478 + SYS_OPENBYID_NP = 479 + SYS_RECVMSG_X = 480 + SYS_SENDMSG_X = 481 + SYS_THREAD_SELFUSAGE = 482 + SYS_CSRCTL = 483 + SYS_GUARDED_OPEN_DPROTECTED_NP = 484 + SYS_GUARDED_WRITE_NP = 485 + SYS_GUARDED_PWRITE_NP = 486 + SYS_GUARDED_WRITEV_NP = 487 + SYS_RENAME_EXT = 488 + SYS_MREMAP_ENCRYPTED = 489 + SYS_MAXSYSCALL = 490 +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go new file mode 100644 index 0000000..b8c9aea --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go @@ -0,0 +1,358 @@ +// mksysnum_darwin.pl /usr/include/sys/syscall.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build arm,darwin + +package unix + +const ( + SYS_SYSCALL = 0 + SYS_EXIT = 1 + SYS_FORK = 2 + SYS_READ = 3 + SYS_WRITE = 4 + SYS_OPEN = 5 + SYS_CLOSE = 6 + SYS_WAIT4 = 7 + SYS_LINK = 9 + SYS_UNLINK = 10 + SYS_CHDIR = 12 + SYS_FCHDIR = 13 + SYS_MKNOD = 14 + SYS_CHMOD = 15 + SYS_CHOWN = 16 + SYS_GETFSSTAT = 18 + SYS_GETPID = 20 + SYS_SETUID = 23 + SYS_GETUID = 24 + SYS_GETEUID = 25 + SYS_PTRACE = 26 + SYS_RECVMSG = 27 + SYS_SENDMSG = 28 + SYS_RECVFROM = 29 + SYS_ACCEPT = 30 + SYS_GETPEERNAME = 31 + SYS_GETSOCKNAME = 32 + SYS_ACCESS = 33 + SYS_CHFLAGS = 34 + SYS_FCHFLAGS = 35 + SYS_SYNC = 36 + SYS_KILL = 37 + SYS_GETPPID = 39 + SYS_DUP = 41 + SYS_PIPE = 42 + SYS_GETEGID = 43 + SYS_SIGACTION = 46 + SYS_GETGID = 47 + SYS_SIGPROCMASK = 48 + SYS_GETLOGIN = 49 + SYS_SETLOGIN = 50 + SYS_ACCT = 51 + SYS_SIGPENDING = 52 + SYS_SIGALTSTACK = 53 + SYS_IOCTL = 54 + SYS_REBOOT = 55 + SYS_REVOKE = 56 + SYS_SYMLINK = 57 + SYS_READLINK = 58 + SYS_EXECVE = 59 + SYS_UMASK = 60 + SYS_CHROOT = 61 + SYS_MSYNC = 65 + SYS_VFORK = 66 + SYS_MUNMAP = 73 + SYS_MPROTECT = 74 + SYS_MADVISE = 75 + SYS_MINCORE = 78 + SYS_GETGROUPS = 79 + SYS_SETGROUPS = 80 + SYS_GETPGRP = 81 + SYS_SETPGID = 82 + SYS_SETITIMER = 83 + SYS_SWAPON = 85 + SYS_GETITIMER = 86 + SYS_GETDTABLESIZE = 89 + SYS_DUP2 = 90 + SYS_FCNTL = 92 + SYS_SELECT = 93 + SYS_FSYNC = 95 + SYS_SETPRIORITY = 96 + SYS_SOCKET = 97 + SYS_CONNECT = 98 + SYS_GETPRIORITY = 100 + SYS_BIND = 104 + SYS_SETSOCKOPT = 105 + SYS_LISTEN = 106 + SYS_SIGSUSPEND = 111 + SYS_GETTIMEOFDAY = 116 + SYS_GETRUSAGE = 117 + SYS_GETSOCKOPT = 118 + SYS_READV = 120 + SYS_WRITEV = 121 + SYS_SETTIMEOFDAY = 122 + SYS_FCHOWN = 123 + SYS_FCHMOD = 124 + SYS_SETREUID = 126 + SYS_SETREGID = 127 + SYS_RENAME = 128 + SYS_FLOCK = 131 + SYS_MKFIFO = 132 + SYS_SENDTO = 133 + SYS_SHUTDOWN = 134 + SYS_SOCKETPAIR = 135 + SYS_MKDIR = 136 + SYS_RMDIR = 137 + SYS_UTIMES = 138 + SYS_FUTIMES = 139 + SYS_ADJTIME = 140 + SYS_GETHOSTUUID = 142 + SYS_SETSID = 147 + SYS_GETPGID = 151 + SYS_SETPRIVEXEC = 152 + SYS_PREAD = 153 + SYS_PWRITE = 154 + SYS_NFSSVC = 155 + SYS_STATFS = 157 + SYS_FSTATFS = 158 + SYS_UNMOUNT = 159 + SYS_GETFH = 161 + SYS_QUOTACTL = 165 + SYS_MOUNT = 167 + SYS_CSOPS = 169 + SYS_CSOPS_AUDITTOKEN = 170 + SYS_WAITID = 173 + SYS_KDEBUG_TRACE = 180 + SYS_SETGID = 181 + SYS_SETEGID = 182 + SYS_SETEUID = 183 + SYS_SIGRETURN = 184 + SYS_CHUD = 185 + SYS_FDATASYNC = 187 + SYS_STAT = 188 + SYS_FSTAT = 189 + SYS_LSTAT = 190 + SYS_PATHCONF = 191 + SYS_FPATHCONF = 192 + SYS_GETRLIMIT = 194 + SYS_SETRLIMIT = 195 + SYS_GETDIRENTRIES = 196 + SYS_MMAP = 197 + SYS_LSEEK = 199 + SYS_TRUNCATE = 200 + SYS_FTRUNCATE = 201 + SYS___SYSCTL = 202 + SYS_MLOCK = 203 + SYS_MUNLOCK = 204 + SYS_UNDELETE = 205 + SYS_ATSOCKET = 206 + SYS_ATGETMSG = 207 + SYS_ATPUTMSG = 208 + SYS_ATPSNDREQ = 209 + SYS_ATPSNDRSP = 210 + SYS_ATPGETREQ = 211 + SYS_ATPGETRSP = 212 + SYS_OPEN_DPROTECTED_NP = 216 + SYS_GETATTRLIST = 220 + SYS_SETATTRLIST = 221 + SYS_GETDIRENTRIESATTR = 222 + SYS_EXCHANGEDATA = 223 + SYS_SEARCHFS = 225 + SYS_DELETE = 226 + SYS_COPYFILE = 227 + SYS_FGETATTRLIST = 228 + SYS_FSETATTRLIST = 229 + SYS_POLL = 230 + SYS_WATCHEVENT = 231 + SYS_WAITEVENT = 232 + SYS_MODWATCH = 233 + SYS_GETXATTR = 234 + SYS_FGETXATTR = 235 + SYS_SETXATTR = 236 + SYS_FSETXATTR = 237 + SYS_REMOVEXATTR = 238 + SYS_FREMOVEXATTR = 239 + SYS_LISTXATTR = 240 + SYS_FLISTXATTR = 241 + SYS_FSCTL = 242 + SYS_INITGROUPS = 243 + SYS_POSIX_SPAWN = 244 + SYS_FFSCTL = 245 + SYS_NFSCLNT = 247 + SYS_FHOPEN = 248 + SYS_MINHERIT = 250 + SYS_SEMSYS = 251 + SYS_MSGSYS = 252 + SYS_SHMSYS = 253 + SYS_SEMCTL = 254 + SYS_SEMGET = 255 + SYS_SEMOP = 256 + SYS_MSGCTL = 258 + SYS_MSGGET = 259 + SYS_MSGSND = 260 + SYS_MSGRCV = 261 + SYS_SHMAT = 262 + SYS_SHMCTL = 263 + SYS_SHMDT = 264 + SYS_SHMGET = 265 + SYS_SHM_OPEN = 266 + SYS_SHM_UNLINK = 267 + SYS_SEM_OPEN = 268 + SYS_SEM_CLOSE = 269 + SYS_SEM_UNLINK = 270 + SYS_SEM_WAIT = 271 + SYS_SEM_TRYWAIT = 272 + SYS_SEM_POST = 273 + SYS_SEM_GETVALUE = 274 + SYS_SEM_INIT = 275 + SYS_SEM_DESTROY = 276 + SYS_OPEN_EXTENDED = 277 + SYS_UMASK_EXTENDED = 278 + SYS_STAT_EXTENDED = 279 + SYS_LSTAT_EXTENDED = 280 + SYS_FSTAT_EXTENDED = 281 + SYS_CHMOD_EXTENDED = 282 + SYS_FCHMOD_EXTENDED = 283 + SYS_ACCESS_EXTENDED = 284 + SYS_SETTID = 285 + SYS_GETTID = 286 + SYS_SETSGROUPS = 287 + SYS_GETSGROUPS = 288 + SYS_SETWGROUPS = 289 + SYS_GETWGROUPS = 290 + SYS_MKFIFO_EXTENDED = 291 + SYS_MKDIR_EXTENDED = 292 + SYS_IDENTITYSVC = 293 + SYS_SHARED_REGION_CHECK_NP = 294 + SYS_VM_PRESSURE_MONITOR = 296 + SYS_PSYNCH_RW_LONGRDLOCK = 297 + SYS_PSYNCH_RW_YIELDWRLOCK = 298 + SYS_PSYNCH_RW_DOWNGRADE = 299 + SYS_PSYNCH_RW_UPGRADE = 300 + SYS_PSYNCH_MUTEXWAIT = 301 + SYS_PSYNCH_MUTEXDROP = 302 + SYS_PSYNCH_CVBROAD = 303 + SYS_PSYNCH_CVSIGNAL = 304 + SYS_PSYNCH_CVWAIT = 305 + SYS_PSYNCH_RW_RDLOCK = 306 + SYS_PSYNCH_RW_WRLOCK = 307 + SYS_PSYNCH_RW_UNLOCK = 308 + SYS_PSYNCH_RW_UNLOCK2 = 309 + SYS_GETSID = 310 + SYS_SETTID_WITH_PID = 311 + SYS_PSYNCH_CVCLRPREPOST = 312 + SYS_AIO_FSYNC = 313 + SYS_AIO_RETURN = 314 + SYS_AIO_SUSPEND = 315 + SYS_AIO_CANCEL = 316 + SYS_AIO_ERROR = 317 + SYS_AIO_READ = 318 + SYS_AIO_WRITE = 319 + SYS_LIO_LISTIO = 320 + SYS_IOPOLICYSYS = 322 + SYS_PROCESS_POLICY = 323 + SYS_MLOCKALL = 324 + SYS_MUNLOCKALL = 325 + SYS_ISSETUGID = 327 + SYS___PTHREAD_KILL = 328 + SYS___PTHREAD_SIGMASK = 329 + SYS___SIGWAIT = 330 + SYS___DISABLE_THREADSIGNAL = 331 + SYS___PTHREAD_MARKCANCEL = 332 + SYS___PTHREAD_CANCELED = 333 + SYS___SEMWAIT_SIGNAL = 334 + SYS_PROC_INFO = 336 + SYS_SENDFILE = 337 + SYS_STAT64 = 338 + SYS_FSTAT64 = 339 + SYS_LSTAT64 = 340 + SYS_STAT64_EXTENDED = 341 + SYS_LSTAT64_EXTENDED = 342 + SYS_FSTAT64_EXTENDED = 343 + SYS_GETDIRENTRIES64 = 344 + SYS_STATFS64 = 345 + SYS_FSTATFS64 = 346 + SYS_GETFSSTAT64 = 347 + SYS___PTHREAD_CHDIR = 348 + SYS___PTHREAD_FCHDIR = 349 + SYS_AUDIT = 350 + SYS_AUDITON = 351 + SYS_GETAUID = 353 + SYS_SETAUID = 354 + SYS_GETAUDIT_ADDR = 357 + SYS_SETAUDIT_ADDR = 358 + SYS_AUDITCTL = 359 + SYS_BSDTHREAD_CREATE = 360 + SYS_BSDTHREAD_TERMINATE = 361 + SYS_KQUEUE = 362 + SYS_KEVENT = 363 + SYS_LCHOWN = 364 + SYS_STACK_SNAPSHOT = 365 + SYS_BSDTHREAD_REGISTER = 366 + SYS_WORKQ_OPEN = 367 + SYS_WORKQ_KERNRETURN = 368 + SYS_KEVENT64 = 369 + SYS___OLD_SEMWAIT_SIGNAL = 370 + SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371 + SYS_THREAD_SELFID = 372 + SYS_LEDGER = 373 + SYS___MAC_EXECVE = 380 + SYS___MAC_SYSCALL = 381 + SYS___MAC_GET_FILE = 382 + SYS___MAC_SET_FILE = 383 + SYS___MAC_GET_LINK = 384 + SYS___MAC_SET_LINK = 385 + SYS___MAC_GET_PROC = 386 + SYS___MAC_SET_PROC = 387 + SYS___MAC_GET_FD = 388 + SYS___MAC_SET_FD = 389 + SYS___MAC_GET_PID = 390 + SYS___MAC_GET_LCID = 391 + SYS___MAC_GET_LCTX = 392 + SYS___MAC_SET_LCTX = 393 + SYS_SETLCID = 394 + SYS_GETLCID = 395 + SYS_READ_NOCANCEL = 396 + SYS_WRITE_NOCANCEL = 397 + SYS_OPEN_NOCANCEL = 398 + SYS_CLOSE_NOCANCEL = 399 + SYS_WAIT4_NOCANCEL = 400 + SYS_RECVMSG_NOCANCEL = 401 + SYS_SENDMSG_NOCANCEL = 402 + SYS_RECVFROM_NOCANCEL = 403 + SYS_ACCEPT_NOCANCEL = 404 + SYS_MSYNC_NOCANCEL = 405 + SYS_FCNTL_NOCANCEL = 406 + SYS_SELECT_NOCANCEL = 407 + SYS_FSYNC_NOCANCEL = 408 + SYS_CONNECT_NOCANCEL = 409 + SYS_SIGSUSPEND_NOCANCEL = 410 + SYS_READV_NOCANCEL = 411 + SYS_WRITEV_NOCANCEL = 412 + SYS_SENDTO_NOCANCEL = 413 + SYS_PREAD_NOCANCEL = 414 + SYS_PWRITE_NOCANCEL = 415 + SYS_WAITID_NOCANCEL = 416 + SYS_POLL_NOCANCEL = 417 + SYS_MSGSND_NOCANCEL = 418 + SYS_MSGRCV_NOCANCEL = 419 + SYS_SEM_WAIT_NOCANCEL = 420 + SYS_AIO_SUSPEND_NOCANCEL = 421 + SYS___SIGWAIT_NOCANCEL = 422 + SYS___SEMWAIT_SIGNAL_NOCANCEL = 423 + SYS___MAC_MOUNT = 424 + SYS___MAC_GET_MOUNT = 425 + SYS___MAC_GETFSSTAT = 426 + SYS_FSGETPATH = 427 + SYS_AUDIT_SESSION_SELF = 428 + SYS_AUDIT_SESSION_JOIN = 429 + SYS_FILEPORT_MAKEPORT = 430 + SYS_FILEPORT_MAKEFD = 431 + SYS_AUDIT_SESSION_PORT = 432 + SYS_PID_SUSPEND = 433 + SYS_PID_RESUME = 434 + SYS_PID_HIBERNATE = 435 + SYS_PID_SHUTDOWN_SOCKETS = 436 + SYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438 + SYS_KAS_INFO = 439 + SYS_MAXSYSCALL = 440 +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go new file mode 100644 index 0000000..26677eb --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go @@ -0,0 +1,398 @@ +// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/usr/include/sys/syscall.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build arm64,darwin + +package unix + +const ( + SYS_SYSCALL = 0 + SYS_EXIT = 1 + SYS_FORK = 2 + SYS_READ = 3 + SYS_WRITE = 4 + SYS_OPEN = 5 + SYS_CLOSE = 6 + SYS_WAIT4 = 7 + SYS_LINK = 9 + SYS_UNLINK = 10 + SYS_CHDIR = 12 + SYS_FCHDIR = 13 + SYS_MKNOD = 14 + SYS_CHMOD = 15 + SYS_CHOWN = 16 + SYS_GETFSSTAT = 18 + SYS_GETPID = 20 + SYS_SETUID = 23 + SYS_GETUID = 24 + SYS_GETEUID = 25 + SYS_PTRACE = 26 + SYS_RECVMSG = 27 + SYS_SENDMSG = 28 + SYS_RECVFROM = 29 + SYS_ACCEPT = 30 + SYS_GETPEERNAME = 31 + SYS_GETSOCKNAME = 32 + SYS_ACCESS = 33 + SYS_CHFLAGS = 34 + SYS_FCHFLAGS = 35 + SYS_SYNC = 36 + SYS_KILL = 37 + SYS_GETPPID = 39 + SYS_DUP = 41 + SYS_PIPE = 42 + SYS_GETEGID = 43 + SYS_SIGACTION = 46 + SYS_GETGID = 47 + SYS_SIGPROCMASK = 48 + SYS_GETLOGIN = 49 + SYS_SETLOGIN = 50 + SYS_ACCT = 51 + SYS_SIGPENDING = 52 + SYS_SIGALTSTACK = 53 + SYS_IOCTL = 54 + SYS_REBOOT = 55 + SYS_REVOKE = 56 + SYS_SYMLINK = 57 + SYS_READLINK = 58 + SYS_EXECVE = 59 + SYS_UMASK = 60 + SYS_CHROOT = 61 + SYS_MSYNC = 65 + SYS_VFORK = 66 + SYS_MUNMAP = 73 + SYS_MPROTECT = 74 + SYS_MADVISE = 75 + SYS_MINCORE = 78 + SYS_GETGROUPS = 79 + SYS_SETGROUPS = 80 + SYS_GETPGRP = 81 + SYS_SETPGID = 82 + SYS_SETITIMER = 83 + SYS_SWAPON = 85 + SYS_GETITIMER = 86 + SYS_GETDTABLESIZE = 89 + SYS_DUP2 = 90 + SYS_FCNTL = 92 + SYS_SELECT = 93 + SYS_FSYNC = 95 + SYS_SETPRIORITY = 96 + SYS_SOCKET = 97 + SYS_CONNECT = 98 + SYS_GETPRIORITY = 100 + SYS_BIND = 104 + SYS_SETSOCKOPT = 105 + SYS_LISTEN = 106 + SYS_SIGSUSPEND = 111 + SYS_GETTIMEOFDAY = 116 + SYS_GETRUSAGE = 117 + SYS_GETSOCKOPT = 118 + SYS_READV = 120 + SYS_WRITEV = 121 + SYS_SETTIMEOFDAY = 122 + SYS_FCHOWN = 123 + SYS_FCHMOD = 124 + SYS_SETREUID = 126 + SYS_SETREGID = 127 + SYS_RENAME = 128 + SYS_FLOCK = 131 + SYS_MKFIFO = 132 + SYS_SENDTO = 133 + SYS_SHUTDOWN = 134 + SYS_SOCKETPAIR = 135 + SYS_MKDIR = 136 + SYS_RMDIR = 137 + SYS_UTIMES = 138 + SYS_FUTIMES = 139 + SYS_ADJTIME = 140 + SYS_GETHOSTUUID = 142 + SYS_SETSID = 147 + SYS_GETPGID = 151 + SYS_SETPRIVEXEC = 152 + SYS_PREAD = 153 + SYS_PWRITE = 154 + SYS_NFSSVC = 155 + SYS_STATFS = 157 + SYS_FSTATFS = 158 + SYS_UNMOUNT = 159 + SYS_GETFH = 161 + SYS_QUOTACTL = 165 + SYS_MOUNT = 167 + SYS_CSOPS = 169 + SYS_CSOPS_AUDITTOKEN = 170 + SYS_WAITID = 173 + SYS_KDEBUG_TRACE64 = 179 + SYS_KDEBUG_TRACE = 180 + SYS_SETGID = 181 + SYS_SETEGID = 182 + SYS_SETEUID = 183 + SYS_SIGRETURN = 184 + SYS_CHUD = 185 + SYS_FDATASYNC = 187 + SYS_STAT = 188 + SYS_FSTAT = 189 + SYS_LSTAT = 190 + SYS_PATHCONF = 191 + SYS_FPATHCONF = 192 + SYS_GETRLIMIT = 194 + SYS_SETRLIMIT = 195 + SYS_GETDIRENTRIES = 196 + SYS_MMAP = 197 + SYS_LSEEK = 199 + SYS_TRUNCATE = 200 + SYS_FTRUNCATE = 201 + SYS_SYSCTL = 202 + SYS_MLOCK = 203 + SYS_MUNLOCK = 204 + SYS_UNDELETE = 205 + SYS_OPEN_DPROTECTED_NP = 216 + SYS_GETATTRLIST = 220 + SYS_SETATTRLIST = 221 + SYS_GETDIRENTRIESATTR = 222 + SYS_EXCHANGEDATA = 223 + SYS_SEARCHFS = 225 + SYS_DELETE = 226 + SYS_COPYFILE = 227 + SYS_FGETATTRLIST = 228 + SYS_FSETATTRLIST = 229 + SYS_POLL = 230 + SYS_WATCHEVENT = 231 + SYS_WAITEVENT = 232 + SYS_MODWATCH = 233 + SYS_GETXATTR = 234 + SYS_FGETXATTR = 235 + SYS_SETXATTR = 236 + SYS_FSETXATTR = 237 + SYS_REMOVEXATTR = 238 + SYS_FREMOVEXATTR = 239 + SYS_LISTXATTR = 240 + SYS_FLISTXATTR = 241 + SYS_FSCTL = 242 + SYS_INITGROUPS = 243 + SYS_POSIX_SPAWN = 244 + SYS_FFSCTL = 245 + SYS_NFSCLNT = 247 + SYS_FHOPEN = 248 + SYS_MINHERIT = 250 + SYS_SEMSYS = 251 + SYS_MSGSYS = 252 + SYS_SHMSYS = 253 + SYS_SEMCTL = 254 + SYS_SEMGET = 255 + SYS_SEMOP = 256 + SYS_MSGCTL = 258 + SYS_MSGGET = 259 + SYS_MSGSND = 260 + SYS_MSGRCV = 261 + SYS_SHMAT = 262 + SYS_SHMCTL = 263 + SYS_SHMDT = 264 + SYS_SHMGET = 265 + SYS_SHM_OPEN = 266 + SYS_SHM_UNLINK = 267 + SYS_SEM_OPEN = 268 + SYS_SEM_CLOSE = 269 + SYS_SEM_UNLINK = 270 + SYS_SEM_WAIT = 271 + SYS_SEM_TRYWAIT = 272 + SYS_SEM_POST = 273 + SYS_SYSCTLBYNAME = 274 + SYS_OPEN_EXTENDED = 277 + SYS_UMASK_EXTENDED = 278 + SYS_STAT_EXTENDED = 279 + SYS_LSTAT_EXTENDED = 280 + SYS_FSTAT_EXTENDED = 281 + SYS_CHMOD_EXTENDED = 282 + SYS_FCHMOD_EXTENDED = 283 + SYS_ACCESS_EXTENDED = 284 + SYS_SETTID = 285 + SYS_GETTID = 286 + SYS_SETSGROUPS = 287 + SYS_GETSGROUPS = 288 + SYS_SETWGROUPS = 289 + SYS_GETWGROUPS = 290 + SYS_MKFIFO_EXTENDED = 291 + SYS_MKDIR_EXTENDED = 292 + SYS_IDENTITYSVC = 293 + SYS_SHARED_REGION_CHECK_NP = 294 + SYS_VM_PRESSURE_MONITOR = 296 + SYS_PSYNCH_RW_LONGRDLOCK = 297 + SYS_PSYNCH_RW_YIELDWRLOCK = 298 + SYS_PSYNCH_RW_DOWNGRADE = 299 + SYS_PSYNCH_RW_UPGRADE = 300 + SYS_PSYNCH_MUTEXWAIT = 301 + SYS_PSYNCH_MUTEXDROP = 302 + SYS_PSYNCH_CVBROAD = 303 + SYS_PSYNCH_CVSIGNAL = 304 + SYS_PSYNCH_CVWAIT = 305 + SYS_PSYNCH_RW_RDLOCK = 306 + SYS_PSYNCH_RW_WRLOCK = 307 + SYS_PSYNCH_RW_UNLOCK = 308 + SYS_PSYNCH_RW_UNLOCK2 = 309 + SYS_GETSID = 310 + SYS_SETTID_WITH_PID = 311 + SYS_PSYNCH_CVCLRPREPOST = 312 + SYS_AIO_FSYNC = 313 + SYS_AIO_RETURN = 314 + SYS_AIO_SUSPEND = 315 + SYS_AIO_CANCEL = 316 + SYS_AIO_ERROR = 317 + SYS_AIO_READ = 318 + SYS_AIO_WRITE = 319 + SYS_LIO_LISTIO = 320 + SYS_IOPOLICYSYS = 322 + SYS_PROCESS_POLICY = 323 + SYS_MLOCKALL = 324 + SYS_MUNLOCKALL = 325 + SYS_ISSETUGID = 327 + SYS___PTHREAD_KILL = 328 + SYS___PTHREAD_SIGMASK = 329 + SYS___SIGWAIT = 330 + SYS___DISABLE_THREADSIGNAL = 331 + SYS___PTHREAD_MARKCANCEL = 332 + SYS___PTHREAD_CANCELED = 333 + SYS___SEMWAIT_SIGNAL = 334 + SYS_PROC_INFO = 336 + SYS_SENDFILE = 337 + SYS_STAT64 = 338 + SYS_FSTAT64 = 339 + SYS_LSTAT64 = 340 + SYS_STAT64_EXTENDED = 341 + SYS_LSTAT64_EXTENDED = 342 + SYS_FSTAT64_EXTENDED = 343 + SYS_GETDIRENTRIES64 = 344 + SYS_STATFS64 = 345 + SYS_FSTATFS64 = 346 + SYS_GETFSSTAT64 = 347 + SYS___PTHREAD_CHDIR = 348 + SYS___PTHREAD_FCHDIR = 349 + SYS_AUDIT = 350 + SYS_AUDITON = 351 + SYS_GETAUID = 353 + SYS_SETAUID = 354 + SYS_GETAUDIT_ADDR = 357 + SYS_SETAUDIT_ADDR = 358 + SYS_AUDITCTL = 359 + SYS_BSDTHREAD_CREATE = 360 + SYS_BSDTHREAD_TERMINATE = 361 + SYS_KQUEUE = 362 + SYS_KEVENT = 363 + SYS_LCHOWN = 364 + SYS_STACK_SNAPSHOT = 365 + SYS_BSDTHREAD_REGISTER = 366 + SYS_WORKQ_OPEN = 367 + SYS_WORKQ_KERNRETURN = 368 + SYS_KEVENT64 = 369 + SYS___OLD_SEMWAIT_SIGNAL = 370 + SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371 + SYS_THREAD_SELFID = 372 + SYS_LEDGER = 373 + SYS___MAC_EXECVE = 380 + SYS___MAC_SYSCALL = 381 + SYS___MAC_GET_FILE = 382 + SYS___MAC_SET_FILE = 383 + SYS___MAC_GET_LINK = 384 + SYS___MAC_SET_LINK = 385 + SYS___MAC_GET_PROC = 386 + SYS___MAC_SET_PROC = 387 + SYS___MAC_GET_FD = 388 + SYS___MAC_SET_FD = 389 + SYS___MAC_GET_PID = 390 + SYS___MAC_GET_LCID = 391 + SYS___MAC_GET_LCTX = 392 + SYS___MAC_SET_LCTX = 393 + SYS_SETLCID = 394 + SYS_GETLCID = 395 + SYS_READ_NOCANCEL = 396 + SYS_WRITE_NOCANCEL = 397 + SYS_OPEN_NOCANCEL = 398 + SYS_CLOSE_NOCANCEL = 399 + SYS_WAIT4_NOCANCEL = 400 + SYS_RECVMSG_NOCANCEL = 401 + SYS_SENDMSG_NOCANCEL = 402 + SYS_RECVFROM_NOCANCEL = 403 + SYS_ACCEPT_NOCANCEL = 404 + SYS_MSYNC_NOCANCEL = 405 + SYS_FCNTL_NOCANCEL = 406 + SYS_SELECT_NOCANCEL = 407 + SYS_FSYNC_NOCANCEL = 408 + SYS_CONNECT_NOCANCEL = 409 + SYS_SIGSUSPEND_NOCANCEL = 410 + SYS_READV_NOCANCEL = 411 + SYS_WRITEV_NOCANCEL = 412 + SYS_SENDTO_NOCANCEL = 413 + SYS_PREAD_NOCANCEL = 414 + SYS_PWRITE_NOCANCEL = 415 + SYS_WAITID_NOCANCEL = 416 + SYS_POLL_NOCANCEL = 417 + SYS_MSGSND_NOCANCEL = 418 + SYS_MSGRCV_NOCANCEL = 419 + SYS_SEM_WAIT_NOCANCEL = 420 + SYS_AIO_SUSPEND_NOCANCEL = 421 + SYS___SIGWAIT_NOCANCEL = 422 + SYS___SEMWAIT_SIGNAL_NOCANCEL = 423 + SYS___MAC_MOUNT = 424 + SYS___MAC_GET_MOUNT = 425 + SYS___MAC_GETFSSTAT = 426 + SYS_FSGETPATH = 427 + SYS_AUDIT_SESSION_SELF = 428 + SYS_AUDIT_SESSION_JOIN = 429 + SYS_FILEPORT_MAKEPORT = 430 + SYS_FILEPORT_MAKEFD = 431 + SYS_AUDIT_SESSION_PORT = 432 + SYS_PID_SUSPEND = 433 + SYS_PID_RESUME = 434 + SYS_PID_HIBERNATE = 435 + SYS_PID_SHUTDOWN_SOCKETS = 436 + SYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438 + SYS_KAS_INFO = 439 + SYS_MEMORYSTATUS_CONTROL = 440 + SYS_GUARDED_OPEN_NP = 441 + SYS_GUARDED_CLOSE_NP = 442 + SYS_GUARDED_KQUEUE_NP = 443 + SYS_CHANGE_FDGUARD_NP = 444 + SYS_PROC_RLIMIT_CONTROL = 446 + SYS_CONNECTX = 447 + SYS_DISCONNECTX = 448 + SYS_PEELOFF = 449 + SYS_SOCKET_DELEGATE = 450 + SYS_TELEMETRY = 451 + SYS_PROC_UUID_POLICY = 452 + SYS_MEMORYSTATUS_GET_LEVEL = 453 + SYS_SYSTEM_OVERRIDE = 454 + SYS_VFS_PURGE = 455 + SYS_SFI_CTL = 456 + SYS_SFI_PIDCTL = 457 + SYS_COALITION = 458 + SYS_COALITION_INFO = 459 + SYS_NECP_MATCH_POLICY = 460 + SYS_GETATTRLISTBULK = 461 + SYS_OPENAT = 463 + SYS_OPENAT_NOCANCEL = 464 + SYS_RENAMEAT = 465 + SYS_FACCESSAT = 466 + SYS_FCHMODAT = 467 + SYS_FCHOWNAT = 468 + SYS_FSTATAT = 469 + SYS_FSTATAT64 = 470 + SYS_LINKAT = 471 + SYS_UNLINKAT = 472 + SYS_READLINKAT = 473 + SYS_SYMLINKAT = 474 + SYS_MKDIRAT = 475 + SYS_GETATTRLISTAT = 476 + SYS_PROC_TRACE_LOG = 477 + SYS_BSDTHREAD_CTL = 478 + SYS_OPENBYID_NP = 479 + SYS_RECVMSG_X = 480 + SYS_SENDMSG_X = 481 + SYS_THREAD_SELFUSAGE = 482 + SYS_CSRCTL = 483 + SYS_GUARDED_OPEN_DPROTECTED_NP = 484 + SYS_GUARDED_WRITE_NP = 485 + SYS_GUARDED_PWRITE_NP = 486 + SYS_GUARDED_WRITEV_NP = 487 + SYS_RENAME_EXT = 488 + SYS_MREMAP_ENCRYPTED = 489 + SYS_MAXSYSCALL = 490 +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_386.go b/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_386.go new file mode 100644 index 0000000..785240a --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_386.go @@ -0,0 +1,304 @@ +// mksysnum_dragonfly.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build 386,dragonfly + +package unix + +const ( + // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int + SYS_EXIT = 1 // { void exit(int rval); } + SYS_FORK = 2 // { int fork(void); } + SYS_READ = 3 // { ssize_t read(int fd, void *buf, size_t nbyte); } + SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, size_t nbyte); } + SYS_OPEN = 5 // { int open(char *path, int flags, int mode); } + SYS_CLOSE = 6 // { int close(int fd); } + SYS_WAIT4 = 7 // { int wait4(int pid, int *status, int options, \ + SYS_LINK = 9 // { int link(char *path, char *link); } + SYS_UNLINK = 10 // { int unlink(char *path); } + SYS_CHDIR = 12 // { int chdir(char *path); } + SYS_FCHDIR = 13 // { int fchdir(int fd); } + SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); } + SYS_CHMOD = 15 // { int chmod(char *path, int mode); } + SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); } + SYS_OBREAK = 17 // { int obreak(char *nsize); } break obreak_args int + SYS_GETFSSTAT = 18 // { int getfsstat(struct statfs *buf, long bufsize, \ + SYS_GETPID = 20 // { pid_t getpid(void); } + SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, \ + SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); } + SYS_SETUID = 23 // { int setuid(uid_t uid); } + SYS_GETUID = 24 // { uid_t getuid(void); } + SYS_GETEUID = 25 // { uid_t geteuid(void); } + SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, caddr_t addr, \ + SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, int flags); } + SYS_SENDMSG = 28 // { int sendmsg(int s, caddr_t msg, int flags); } + SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, size_t len, \ + SYS_ACCEPT = 30 // { int accept(int s, caddr_t name, int *anamelen); } + SYS_GETPEERNAME = 31 // { int getpeername(int fdes, caddr_t asa, int *alen); } + SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, caddr_t asa, int *alen); } + SYS_ACCESS = 33 // { int access(char *path, int flags); } + SYS_CHFLAGS = 34 // { int chflags(char *path, int flags); } + SYS_FCHFLAGS = 35 // { int fchflags(int fd, int flags); } + SYS_SYNC = 36 // { int sync(void); } + SYS_KILL = 37 // { int kill(int pid, int signum); } + SYS_GETPPID = 39 // { pid_t getppid(void); } + SYS_DUP = 41 // { int dup(u_int fd); } + SYS_PIPE = 42 // { int pipe(void); } + SYS_GETEGID = 43 // { gid_t getegid(void); } + SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \ + SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, \ + SYS_GETGID = 47 // { gid_t getgid(void); } + SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int namelen); } + SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); } + SYS_ACCT = 51 // { int acct(char *path); } + SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, stack_t *oss); } + SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, caddr_t data); } + SYS_REBOOT = 55 // { int reboot(int opt); } + SYS_REVOKE = 56 // { int revoke(char *path); } + SYS_SYMLINK = 57 // { int symlink(char *path, char *link); } + SYS_READLINK = 58 // { int readlink(char *path, char *buf, int count); } + SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); } + SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args int + SYS_CHROOT = 61 // { int chroot(char *path); } + SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); } + SYS_VFORK = 66 // { pid_t vfork(void); } + SYS_SBRK = 69 // { int sbrk(int incr); } + SYS_SSTK = 70 // { int sstk(int incr); } + SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); } + SYS_MPROTECT = 74 // { int mprotect(void *addr, size_t len, int prot); } + SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, int behav); } + SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \ + SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, gid_t *gidset); } + SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, gid_t *gidset); } + SYS_GETPGRP = 81 // { int getpgrp(void); } + SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); } + SYS_SETITIMER = 83 // { int setitimer(u_int which, struct itimerval *itv, \ + SYS_SWAPON = 85 // { int swapon(char *name); } + SYS_GETITIMER = 86 // { int getitimer(u_int which, struct itimerval *itv); } + SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); } + SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); } + SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); } + SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \ + SYS_FSYNC = 95 // { int fsync(int fd); } + SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, int prio); } + SYS_SOCKET = 97 // { int socket(int domain, int type, int protocol); } + SYS_CONNECT = 98 // { int connect(int s, caddr_t name, int namelen); } + SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); } + SYS_BIND = 104 // { int bind(int s, caddr_t name, int namelen); } + SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \ + SYS_LISTEN = 106 // { int listen(int s, int backlog); } + SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \ + SYS_GETRUSAGE = 117 // { int getrusage(int who, struct rusage *rusage); } + SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \ + SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); } + SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \ + SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \ + SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); } + SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); } + SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); } + SYS_SETREGID = 127 // { int setregid(int rgid, int egid); } + SYS_RENAME = 128 // { int rename(char *from, char *to); } + SYS_FLOCK = 131 // { int flock(int fd, int how); } + SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); } + SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \ + SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); } + SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, \ + SYS_MKDIR = 136 // { int mkdir(char *path, int mode); } + SYS_RMDIR = 137 // { int rmdir(char *path); } + SYS_UTIMES = 138 // { int utimes(char *path, struct timeval *tptr); } + SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \ + SYS_SETSID = 147 // { int setsid(void); } + SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \ + SYS_STATFS = 157 // { int statfs(char *path, struct statfs *buf); } + SYS_FSTATFS = 158 // { int fstatfs(int fd, struct statfs *buf); } + SYS_GETFH = 161 // { int getfh(char *fname, struct fhandle *fhp); } + SYS_GETDOMAINNAME = 162 // { int getdomainname(char *domainname, int len); } + SYS_SETDOMAINNAME = 163 // { int setdomainname(char *domainname, int len); } + SYS_UNAME = 164 // { int uname(struct utsname *name); } + SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); } + SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \ + SYS_EXTPREAD = 173 // { ssize_t extpread(int fd, void *buf, \ + SYS_EXTPWRITE = 174 // { ssize_t extpwrite(int fd, const void *buf, \ + SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); } + SYS_SETGID = 181 // { int setgid(gid_t gid); } + SYS_SETEGID = 182 // { int setegid(gid_t egid); } + SYS_SETEUID = 183 // { int seteuid(uid_t euid); } + SYS_PATHCONF = 191 // { int pathconf(char *path, int name); } + SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); } + SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \ + SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \ + SYS_MMAP = 197 // { caddr_t mmap(caddr_t addr, size_t len, int prot, \ + // SYS_NOSYS = 198; // { int nosys(void); } __syscall __syscall_args int + SYS_LSEEK = 199 // { off_t lseek(int fd, int pad, off_t offset, \ + SYS_TRUNCATE = 200 // { int truncate(char *path, int pad, off_t length); } + SYS_FTRUNCATE = 201 // { int ftruncate(int fd, int pad, off_t length); } + SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, void *old, \ + SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); } + SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); } + SYS_UNDELETE = 205 // { int undelete(char *path); } + SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); } + SYS_GETPGID = 207 // { int getpgid(pid_t pid); } + SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \ + SYS___SEMCTL = 220 // { int __semctl(int semid, int semnum, int cmd, \ + SYS_SEMGET = 221 // { int semget(key_t key, int nsems, int semflg); } + SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, \ + SYS_MSGCTL = 224 // { int msgctl(int msqid, int cmd, \ + SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); } + SYS_MSGSND = 226 // { int msgsnd(int msqid, void *msgp, size_t msgsz, \ + SYS_MSGRCV = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, \ + SYS_SHMAT = 228 // { caddr_t shmat(int shmid, const void *shmaddr, \ + SYS_SHMCTL = 229 // { int shmctl(int shmid, int cmd, \ + SYS_SHMDT = 230 // { int shmdt(const void *shmaddr); } + SYS_SHMGET = 231 // { int shmget(key_t key, size_t size, int shmflg); } + SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \ + SYS_CLOCK_SETTIME = 233 // { int clock_settime(clockid_t clock_id, \ + SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \ + SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \ + SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, int inherit); } + SYS_RFORK = 251 // { int rfork(int flags); } + SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, u_int nfds, \ + SYS_ISSETUGID = 253 // { int issetugid(void); } + SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); } + SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); } + SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); } + SYS_EXTPREADV = 289 // { ssize_t extpreadv(int fd, struct iovec *iovp, \ + SYS_EXTPWRITEV = 290 // { ssize_t extpwritev(int fd, struct iovec *iovp,\ + SYS_FHSTATFS = 297 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); } + SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); } + SYS_MODNEXT = 300 // { int modnext(int modid); } + SYS_MODSTAT = 301 // { int modstat(int modid, struct module_stat* stat); } + SYS_MODFNEXT = 302 // { int modfnext(int modid); } + SYS_MODFIND = 303 // { int modfind(const char *name); } + SYS_KLDLOAD = 304 // { int kldload(const char *file); } + SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); } + SYS_KLDFIND = 306 // { int kldfind(const char *file); } + SYS_KLDNEXT = 307 // { int kldnext(int fileid); } + SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct kld_file_stat* stat); } + SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); } + SYS_GETSID = 310 // { int getsid(pid_t pid); } + SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); } + SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); } + SYS_AIO_RETURN = 314 // { int aio_return(struct aiocb *aiocbp); } + SYS_AIO_SUSPEND = 315 // { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); } + SYS_AIO_CANCEL = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); } + SYS_AIO_ERROR = 317 // { int aio_error(struct aiocb *aiocbp); } + SYS_AIO_READ = 318 // { int aio_read(struct aiocb *aiocbp); } + SYS_AIO_WRITE = 319 // { int aio_write(struct aiocb *aiocbp); } + SYS_LIO_LISTIO = 320 // { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); } + SYS_YIELD = 321 // { int yield(void); } + SYS_MLOCKALL = 324 // { int mlockall(int how); } + SYS_MUNLOCKALL = 325 // { int munlockall(void); } + SYS___GETCWD = 326 // { int __getcwd(u_char *buf, u_int buflen); } + SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); } + SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); } + SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); } + SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); } + SYS_SCHED_YIELD = 331 // { int sched_yield (void); } + SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); } + SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); } + SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, struct timespec *interval); } + SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); } + SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, void *data); } + SYS_JAIL = 338 // { int jail(struct jail *jail); } + SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, const sigset_t *set, \ + SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); } + SYS_SIGACTION = 342 // { int sigaction(int sig, const struct sigaction *act, \ + SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); } + SYS_SIGRETURN = 344 // { int sigreturn(ucontext_t *sigcntxp); } + SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set,\ + SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set,\ + SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \ + SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \ + SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, acl_type_t type, \ + SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, acl_type_t type, \ + SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \ + SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, acl_type_t type); } + SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \ + SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, \ + SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \ + SYS_EXTATTR_SET_FILE = 356 // { int extattr_set_file(const char *path, \ + SYS_EXTATTR_GET_FILE = 357 // { int extattr_get_file(const char *path, \ + SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \ + SYS_AIO_WAITCOMPLETE = 359 // { int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); } + SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); } + SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); } + SYS_KQUEUE = 362 // { int kqueue(void); } + SYS_KEVENT = 363 // { int kevent(int fd, \ + SYS_SCTP_PEELOFF = 364 // { int sctp_peeloff(int sd, caddr_t name ); } + SYS_LCHFLAGS = 391 // { int lchflags(char *path, int flags); } + SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, int count); } + SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, \ + SYS_VARSYM_SET = 450 // { int varsym_set(int level, const char *name, const char *data); } + SYS_VARSYM_GET = 451 // { int varsym_get(int mask, const char *wild, char *buf, int bufsize); } + SYS_VARSYM_LIST = 452 // { int varsym_list(int level, char *buf, int maxsize, int *marker); } + SYS_EXEC_SYS_REGISTER = 465 // { int exec_sys_register(void *entry); } + SYS_EXEC_SYS_UNREGISTER = 466 // { int exec_sys_unregister(int id); } + SYS_SYS_CHECKPOINT = 467 // { int sys_checkpoint(int type, int fd, pid_t pid, int retval); } + SYS_MOUNTCTL = 468 // { int mountctl(const char *path, int op, int fd, const void *ctl, int ctllen, void *buf, int buflen); } + SYS_UMTX_SLEEP = 469 // { int umtx_sleep(volatile const int *ptr, int value, int timeout); } + SYS_UMTX_WAKEUP = 470 // { int umtx_wakeup(volatile const int *ptr, int count); } + SYS_JAIL_ATTACH = 471 // { int jail_attach(int jid); } + SYS_SET_TLS_AREA = 472 // { int set_tls_area(int which, struct tls_info *info, size_t infosize); } + SYS_GET_TLS_AREA = 473 // { int get_tls_area(int which, struct tls_info *info, size_t infosize); } + SYS_CLOSEFROM = 474 // { int closefrom(int fd); } + SYS_STAT = 475 // { int stat(const char *path, struct stat *ub); } + SYS_FSTAT = 476 // { int fstat(int fd, struct stat *sb); } + SYS_LSTAT = 477 // { int lstat(const char *path, struct stat *ub); } + SYS_FHSTAT = 478 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); } + SYS_GETDIRENTRIES = 479 // { int getdirentries(int fd, char *buf, u_int count, \ + SYS_GETDENTS = 480 // { int getdents(int fd, char *buf, size_t count); } + SYS_USCHED_SET = 481 // { int usched_set(pid_t pid, int cmd, void *data, \ + SYS_EXTACCEPT = 482 // { int extaccept(int s, int flags, caddr_t name, int *anamelen); } + SYS_EXTCONNECT = 483 // { int extconnect(int s, int flags, caddr_t name, int namelen); } + SYS_MCONTROL = 485 // { int mcontrol(void *addr, size_t len, int behav, off_t value); } + SYS_VMSPACE_CREATE = 486 // { int vmspace_create(void *id, int type, void *data); } + SYS_VMSPACE_DESTROY = 487 // { int vmspace_destroy(void *id); } + SYS_VMSPACE_CTL = 488 // { int vmspace_ctl(void *id, int cmd, \ + SYS_VMSPACE_MMAP = 489 // { int vmspace_mmap(void *id, void *addr, size_t len, \ + SYS_VMSPACE_MUNMAP = 490 // { int vmspace_munmap(void *id, void *addr, \ + SYS_VMSPACE_MCONTROL = 491 // { int vmspace_mcontrol(void *id, void *addr, \ + SYS_VMSPACE_PREAD = 492 // { ssize_t vmspace_pread(void *id, void *buf, \ + SYS_VMSPACE_PWRITE = 493 // { ssize_t vmspace_pwrite(void *id, const void *buf, \ + SYS_EXTEXIT = 494 // { void extexit(int how, int status, void *addr); } + SYS_LWP_CREATE = 495 // { int lwp_create(struct lwp_params *params); } + SYS_LWP_GETTID = 496 // { lwpid_t lwp_gettid(void); } + SYS_LWP_KILL = 497 // { int lwp_kill(pid_t pid, lwpid_t tid, int signum); } + SYS_LWP_RTPRIO = 498 // { int lwp_rtprio(int function, pid_t pid, lwpid_t tid, struct rtprio *rtp); } + SYS_PSELECT = 499 // { int pselect(int nd, fd_set *in, fd_set *ou, \ + SYS_STATVFS = 500 // { int statvfs(const char *path, struct statvfs *buf); } + SYS_FSTATVFS = 501 // { int fstatvfs(int fd, struct statvfs *buf); } + SYS_FHSTATVFS = 502 // { int fhstatvfs(const struct fhandle *u_fhp, struct statvfs *buf); } + SYS_GETVFSSTAT = 503 // { int getvfsstat(struct statfs *buf, \ + SYS_OPENAT = 504 // { int openat(int fd, char *path, int flags, int mode); } + SYS_FSTATAT = 505 // { int fstatat(int fd, char *path, \ + SYS_FCHMODAT = 506 // { int fchmodat(int fd, char *path, int mode, \ + SYS_FCHOWNAT = 507 // { int fchownat(int fd, char *path, int uid, int gid, \ + SYS_UNLINKAT = 508 // { int unlinkat(int fd, char *path, int flags); } + SYS_FACCESSAT = 509 // { int faccessat(int fd, char *path, int amode, \ + SYS_MQ_OPEN = 510 // { mqd_t mq_open(const char * name, int oflag, \ + SYS_MQ_CLOSE = 511 // { int mq_close(mqd_t mqdes); } + SYS_MQ_UNLINK = 512 // { int mq_unlink(const char *name); } + SYS_MQ_GETATTR = 513 // { int mq_getattr(mqd_t mqdes, \ + SYS_MQ_SETATTR = 514 // { int mq_setattr(mqd_t mqdes, \ + SYS_MQ_NOTIFY = 515 // { int mq_notify(mqd_t mqdes, \ + SYS_MQ_SEND = 516 // { int mq_send(mqd_t mqdes, const char *msg_ptr, \ + SYS_MQ_RECEIVE = 517 // { ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, \ + SYS_MQ_TIMEDSEND = 518 // { int mq_timedsend(mqd_t mqdes, \ + SYS_MQ_TIMEDRECEIVE = 519 // { ssize_t mq_timedreceive(mqd_t mqdes, \ + SYS_IOPRIO_SET = 520 // { int ioprio_set(int which, int who, int prio); } + SYS_IOPRIO_GET = 521 // { int ioprio_get(int which, int who); } + SYS_CHROOT_KERNEL = 522 // { int chroot_kernel(char *path); } + SYS_RENAMEAT = 523 // { int renameat(int oldfd, char *old, int newfd, \ + SYS_MKDIRAT = 524 // { int mkdirat(int fd, char *path, mode_t mode); } + SYS_MKFIFOAT = 525 // { int mkfifoat(int fd, char *path, mode_t mode); } + SYS_MKNODAT = 526 // { int mknodat(int fd, char *path, mode_t mode, \ + SYS_READLINKAT = 527 // { int readlinkat(int fd, char *path, char *buf, \ + SYS_SYMLINKAT = 528 // { int symlinkat(char *path1, int fd, char *path2); } + SYS_SWAPOFF = 529 // { int swapoff(char *name); } + SYS_VQUOTACTL = 530 // { int vquotactl(const char *path, \ + SYS_LINKAT = 531 // { int linkat(int fd1, char *path1, int fd2, \ + SYS_EACCESS = 532 // { int eaccess(char *path, int flags); } + SYS_LPATHCONF = 533 // { int lpathconf(char *path, int name); } + SYS_VMM_GUEST_CTL = 534 // { int vmm_guest_ctl(int op, struct vmm_guest_options *options); } + SYS_VMM_GUEST_SYNC_ADDR = 535 // { int vmm_guest_sync_addr(long *dstaddr, long *srcaddr); } +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go new file mode 100644 index 0000000..d6038fa --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go @@ -0,0 +1,304 @@ +// mksysnum_dragonfly.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build amd64,dragonfly + +package unix + +const ( + // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int + SYS_EXIT = 1 // { void exit(int rval); } + SYS_FORK = 2 // { int fork(void); } + SYS_READ = 3 // { ssize_t read(int fd, void *buf, size_t nbyte); } + SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, size_t nbyte); } + SYS_OPEN = 5 // { int open(char *path, int flags, int mode); } + SYS_CLOSE = 6 // { int close(int fd); } + SYS_WAIT4 = 7 // { int wait4(int pid, int *status, int options, \ + SYS_LINK = 9 // { int link(char *path, char *link); } + SYS_UNLINK = 10 // { int unlink(char *path); } + SYS_CHDIR = 12 // { int chdir(char *path); } + SYS_FCHDIR = 13 // { int fchdir(int fd); } + SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); } + SYS_CHMOD = 15 // { int chmod(char *path, int mode); } + SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); } + SYS_OBREAK = 17 // { int obreak(char *nsize); } break obreak_args int + SYS_GETFSSTAT = 18 // { int getfsstat(struct statfs *buf, long bufsize, \ + SYS_GETPID = 20 // { pid_t getpid(void); } + SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, \ + SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); } + SYS_SETUID = 23 // { int setuid(uid_t uid); } + SYS_GETUID = 24 // { uid_t getuid(void); } + SYS_GETEUID = 25 // { uid_t geteuid(void); } + SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, caddr_t addr, \ + SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, int flags); } + SYS_SENDMSG = 28 // { int sendmsg(int s, caddr_t msg, int flags); } + SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, size_t len, \ + SYS_ACCEPT = 30 // { int accept(int s, caddr_t name, int *anamelen); } + SYS_GETPEERNAME = 31 // { int getpeername(int fdes, caddr_t asa, int *alen); } + SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, caddr_t asa, int *alen); } + SYS_ACCESS = 33 // { int access(char *path, int flags); } + SYS_CHFLAGS = 34 // { int chflags(char *path, int flags); } + SYS_FCHFLAGS = 35 // { int fchflags(int fd, int flags); } + SYS_SYNC = 36 // { int sync(void); } + SYS_KILL = 37 // { int kill(int pid, int signum); } + SYS_GETPPID = 39 // { pid_t getppid(void); } + SYS_DUP = 41 // { int dup(u_int fd); } + SYS_PIPE = 42 // { int pipe(void); } + SYS_GETEGID = 43 // { gid_t getegid(void); } + SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \ + SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, \ + SYS_GETGID = 47 // { gid_t getgid(void); } + SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int namelen); } + SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); } + SYS_ACCT = 51 // { int acct(char *path); } + SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, stack_t *oss); } + SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, caddr_t data); } + SYS_REBOOT = 55 // { int reboot(int opt); } + SYS_REVOKE = 56 // { int revoke(char *path); } + SYS_SYMLINK = 57 // { int symlink(char *path, char *link); } + SYS_READLINK = 58 // { int readlink(char *path, char *buf, int count); } + SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); } + SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args int + SYS_CHROOT = 61 // { int chroot(char *path); } + SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); } + SYS_VFORK = 66 // { pid_t vfork(void); } + SYS_SBRK = 69 // { int sbrk(int incr); } + SYS_SSTK = 70 // { int sstk(int incr); } + SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); } + SYS_MPROTECT = 74 // { int mprotect(void *addr, size_t len, int prot); } + SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, int behav); } + SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \ + SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, gid_t *gidset); } + SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, gid_t *gidset); } + SYS_GETPGRP = 81 // { int getpgrp(void); } + SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); } + SYS_SETITIMER = 83 // { int setitimer(u_int which, struct itimerval *itv, \ + SYS_SWAPON = 85 // { int swapon(char *name); } + SYS_GETITIMER = 86 // { int getitimer(u_int which, struct itimerval *itv); } + SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); } + SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); } + SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); } + SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \ + SYS_FSYNC = 95 // { int fsync(int fd); } + SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, int prio); } + SYS_SOCKET = 97 // { int socket(int domain, int type, int protocol); } + SYS_CONNECT = 98 // { int connect(int s, caddr_t name, int namelen); } + SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); } + SYS_BIND = 104 // { int bind(int s, caddr_t name, int namelen); } + SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \ + SYS_LISTEN = 106 // { int listen(int s, int backlog); } + SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \ + SYS_GETRUSAGE = 117 // { int getrusage(int who, struct rusage *rusage); } + SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \ + SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); } + SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \ + SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \ + SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); } + SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); } + SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); } + SYS_SETREGID = 127 // { int setregid(int rgid, int egid); } + SYS_RENAME = 128 // { int rename(char *from, char *to); } + SYS_FLOCK = 131 // { int flock(int fd, int how); } + SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); } + SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \ + SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); } + SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, \ + SYS_MKDIR = 136 // { int mkdir(char *path, int mode); } + SYS_RMDIR = 137 // { int rmdir(char *path); } + SYS_UTIMES = 138 // { int utimes(char *path, struct timeval *tptr); } + SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \ + SYS_SETSID = 147 // { int setsid(void); } + SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \ + SYS_STATFS = 157 // { int statfs(char *path, struct statfs *buf); } + SYS_FSTATFS = 158 // { int fstatfs(int fd, struct statfs *buf); } + SYS_GETFH = 161 // { int getfh(char *fname, struct fhandle *fhp); } + SYS_GETDOMAINNAME = 162 // { int getdomainname(char *domainname, int len); } + SYS_SETDOMAINNAME = 163 // { int setdomainname(char *domainname, int len); } + SYS_UNAME = 164 // { int uname(struct utsname *name); } + SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); } + SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \ + SYS_EXTPREAD = 173 // { ssize_t extpread(int fd, void *buf, \ + SYS_EXTPWRITE = 174 // { ssize_t extpwrite(int fd, const void *buf, \ + SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); } + SYS_SETGID = 181 // { int setgid(gid_t gid); } + SYS_SETEGID = 182 // { int setegid(gid_t egid); } + SYS_SETEUID = 183 // { int seteuid(uid_t euid); } + SYS_PATHCONF = 191 // { int pathconf(char *path, int name); } + SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); } + SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \ + SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \ + SYS_MMAP = 197 // { caddr_t mmap(caddr_t addr, size_t len, int prot, \ + // SYS_NOSYS = 198; // { int nosys(void); } __syscall __syscall_args int + SYS_LSEEK = 199 // { off_t lseek(int fd, int pad, off_t offset, \ + SYS_TRUNCATE = 200 // { int truncate(char *path, int pad, off_t length); } + SYS_FTRUNCATE = 201 // { int ftruncate(int fd, int pad, off_t length); } + SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, void *old, \ + SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); } + SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); } + SYS_UNDELETE = 205 // { int undelete(char *path); } + SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); } + SYS_GETPGID = 207 // { int getpgid(pid_t pid); } + SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \ + SYS___SEMCTL = 220 // { int __semctl(int semid, int semnum, int cmd, \ + SYS_SEMGET = 221 // { int semget(key_t key, int nsems, int semflg); } + SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, \ + SYS_MSGCTL = 224 // { int msgctl(int msqid, int cmd, \ + SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); } + SYS_MSGSND = 226 // { int msgsnd(int msqid, void *msgp, size_t msgsz, \ + SYS_MSGRCV = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, \ + SYS_SHMAT = 228 // { caddr_t shmat(int shmid, const void *shmaddr, \ + SYS_SHMCTL = 229 // { int shmctl(int shmid, int cmd, \ + SYS_SHMDT = 230 // { int shmdt(const void *shmaddr); } + SYS_SHMGET = 231 // { int shmget(key_t key, size_t size, int shmflg); } + SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \ + SYS_CLOCK_SETTIME = 233 // { int clock_settime(clockid_t clock_id, \ + SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \ + SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \ + SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, int inherit); } + SYS_RFORK = 251 // { int rfork(int flags); } + SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, u_int nfds, \ + SYS_ISSETUGID = 253 // { int issetugid(void); } + SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); } + SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); } + SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); } + SYS_EXTPREADV = 289 // { ssize_t extpreadv(int fd, struct iovec *iovp, \ + SYS_EXTPWRITEV = 290 // { ssize_t extpwritev(int fd, struct iovec *iovp,\ + SYS_FHSTATFS = 297 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); } + SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); } + SYS_MODNEXT = 300 // { int modnext(int modid); } + SYS_MODSTAT = 301 // { int modstat(int modid, struct module_stat* stat); } + SYS_MODFNEXT = 302 // { int modfnext(int modid); } + SYS_MODFIND = 303 // { int modfind(const char *name); } + SYS_KLDLOAD = 304 // { int kldload(const char *file); } + SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); } + SYS_KLDFIND = 306 // { int kldfind(const char *file); } + SYS_KLDNEXT = 307 // { int kldnext(int fileid); } + SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct kld_file_stat* stat); } + SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); } + SYS_GETSID = 310 // { int getsid(pid_t pid); } + SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); } + SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); } + SYS_AIO_RETURN = 314 // { int aio_return(struct aiocb *aiocbp); } + SYS_AIO_SUSPEND = 315 // { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); } + SYS_AIO_CANCEL = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); } + SYS_AIO_ERROR = 317 // { int aio_error(struct aiocb *aiocbp); } + SYS_AIO_READ = 318 // { int aio_read(struct aiocb *aiocbp); } + SYS_AIO_WRITE = 319 // { int aio_write(struct aiocb *aiocbp); } + SYS_LIO_LISTIO = 320 // { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); } + SYS_YIELD = 321 // { int yield(void); } + SYS_MLOCKALL = 324 // { int mlockall(int how); } + SYS_MUNLOCKALL = 325 // { int munlockall(void); } + SYS___GETCWD = 326 // { int __getcwd(u_char *buf, u_int buflen); } + SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); } + SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); } + SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); } + SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); } + SYS_SCHED_YIELD = 331 // { int sched_yield (void); } + SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); } + SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); } + SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, struct timespec *interval); } + SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); } + SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, void *data); } + SYS_JAIL = 338 // { int jail(struct jail *jail); } + SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, const sigset_t *set, \ + SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); } + SYS_SIGACTION = 342 // { int sigaction(int sig, const struct sigaction *act, \ + SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); } + SYS_SIGRETURN = 344 // { int sigreturn(ucontext_t *sigcntxp); } + SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set,\ + SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set,\ + SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \ + SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \ + SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, acl_type_t type, \ + SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, acl_type_t type, \ + SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \ + SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, acl_type_t type); } + SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \ + SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, \ + SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \ + SYS_EXTATTR_SET_FILE = 356 // { int extattr_set_file(const char *path, \ + SYS_EXTATTR_GET_FILE = 357 // { int extattr_get_file(const char *path, \ + SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \ + SYS_AIO_WAITCOMPLETE = 359 // { int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); } + SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); } + SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); } + SYS_KQUEUE = 362 // { int kqueue(void); } + SYS_KEVENT = 363 // { int kevent(int fd, \ + SYS_SCTP_PEELOFF = 364 // { int sctp_peeloff(int sd, caddr_t name ); } + SYS_LCHFLAGS = 391 // { int lchflags(char *path, int flags); } + SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, int count); } + SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, \ + SYS_VARSYM_SET = 450 // { int varsym_set(int level, const char *name, const char *data); } + SYS_VARSYM_GET = 451 // { int varsym_get(int mask, const char *wild, char *buf, int bufsize); } + SYS_VARSYM_LIST = 452 // { int varsym_list(int level, char *buf, int maxsize, int *marker); } + SYS_EXEC_SYS_REGISTER = 465 // { int exec_sys_register(void *entry); } + SYS_EXEC_SYS_UNREGISTER = 466 // { int exec_sys_unregister(int id); } + SYS_SYS_CHECKPOINT = 467 // { int sys_checkpoint(int type, int fd, pid_t pid, int retval); } + SYS_MOUNTCTL = 468 // { int mountctl(const char *path, int op, int fd, const void *ctl, int ctllen, void *buf, int buflen); } + SYS_UMTX_SLEEP = 469 // { int umtx_sleep(volatile const int *ptr, int value, int timeout); } + SYS_UMTX_WAKEUP = 470 // { int umtx_wakeup(volatile const int *ptr, int count); } + SYS_JAIL_ATTACH = 471 // { int jail_attach(int jid); } + SYS_SET_TLS_AREA = 472 // { int set_tls_area(int which, struct tls_info *info, size_t infosize); } + SYS_GET_TLS_AREA = 473 // { int get_tls_area(int which, struct tls_info *info, size_t infosize); } + SYS_CLOSEFROM = 474 // { int closefrom(int fd); } + SYS_STAT = 475 // { int stat(const char *path, struct stat *ub); } + SYS_FSTAT = 476 // { int fstat(int fd, struct stat *sb); } + SYS_LSTAT = 477 // { int lstat(const char *path, struct stat *ub); } + SYS_FHSTAT = 478 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); } + SYS_GETDIRENTRIES = 479 // { int getdirentries(int fd, char *buf, u_int count, \ + SYS_GETDENTS = 480 // { int getdents(int fd, char *buf, size_t count); } + SYS_USCHED_SET = 481 // { int usched_set(pid_t pid, int cmd, void *data, \ + SYS_EXTACCEPT = 482 // { int extaccept(int s, int flags, caddr_t name, int *anamelen); } + SYS_EXTCONNECT = 483 // { int extconnect(int s, int flags, caddr_t name, int namelen); } + SYS_MCONTROL = 485 // { int mcontrol(void *addr, size_t len, int behav, off_t value); } + SYS_VMSPACE_CREATE = 486 // { int vmspace_create(void *id, int type, void *data); } + SYS_VMSPACE_DESTROY = 487 // { int vmspace_destroy(void *id); } + SYS_VMSPACE_CTL = 488 // { int vmspace_ctl(void *id, int cmd, \ + SYS_VMSPACE_MMAP = 489 // { int vmspace_mmap(void *id, void *addr, size_t len, \ + SYS_VMSPACE_MUNMAP = 490 // { int vmspace_munmap(void *id, void *addr, \ + SYS_VMSPACE_MCONTROL = 491 // { int vmspace_mcontrol(void *id, void *addr, \ + SYS_VMSPACE_PREAD = 492 // { ssize_t vmspace_pread(void *id, void *buf, \ + SYS_VMSPACE_PWRITE = 493 // { ssize_t vmspace_pwrite(void *id, const void *buf, \ + SYS_EXTEXIT = 494 // { void extexit(int how, int status, void *addr); } + SYS_LWP_CREATE = 495 // { int lwp_create(struct lwp_params *params); } + SYS_LWP_GETTID = 496 // { lwpid_t lwp_gettid(void); } + SYS_LWP_KILL = 497 // { int lwp_kill(pid_t pid, lwpid_t tid, int signum); } + SYS_LWP_RTPRIO = 498 // { int lwp_rtprio(int function, pid_t pid, lwpid_t tid, struct rtprio *rtp); } + SYS_PSELECT = 499 // { int pselect(int nd, fd_set *in, fd_set *ou, \ + SYS_STATVFS = 500 // { int statvfs(const char *path, struct statvfs *buf); } + SYS_FSTATVFS = 501 // { int fstatvfs(int fd, struct statvfs *buf); } + SYS_FHSTATVFS = 502 // { int fhstatvfs(const struct fhandle *u_fhp, struct statvfs *buf); } + SYS_GETVFSSTAT = 503 // { int getvfsstat(struct statfs *buf, \ + SYS_OPENAT = 504 // { int openat(int fd, char *path, int flags, int mode); } + SYS_FSTATAT = 505 // { int fstatat(int fd, char *path, \ + SYS_FCHMODAT = 506 // { int fchmodat(int fd, char *path, int mode, \ + SYS_FCHOWNAT = 507 // { int fchownat(int fd, char *path, int uid, int gid, \ + SYS_UNLINKAT = 508 // { int unlinkat(int fd, char *path, int flags); } + SYS_FACCESSAT = 509 // { int faccessat(int fd, char *path, int amode, \ + SYS_MQ_OPEN = 510 // { mqd_t mq_open(const char * name, int oflag, \ + SYS_MQ_CLOSE = 511 // { int mq_close(mqd_t mqdes); } + SYS_MQ_UNLINK = 512 // { int mq_unlink(const char *name); } + SYS_MQ_GETATTR = 513 // { int mq_getattr(mqd_t mqdes, \ + SYS_MQ_SETATTR = 514 // { int mq_setattr(mqd_t mqdes, \ + SYS_MQ_NOTIFY = 515 // { int mq_notify(mqd_t mqdes, \ + SYS_MQ_SEND = 516 // { int mq_send(mqd_t mqdes, const char *msg_ptr, \ + SYS_MQ_RECEIVE = 517 // { ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, \ + SYS_MQ_TIMEDSEND = 518 // { int mq_timedsend(mqd_t mqdes, \ + SYS_MQ_TIMEDRECEIVE = 519 // { ssize_t mq_timedreceive(mqd_t mqdes, \ + SYS_IOPRIO_SET = 520 // { int ioprio_set(int which, int who, int prio); } + SYS_IOPRIO_GET = 521 // { int ioprio_get(int which, int who); } + SYS_CHROOT_KERNEL = 522 // { int chroot_kernel(char *path); } + SYS_RENAMEAT = 523 // { int renameat(int oldfd, char *old, int newfd, \ + SYS_MKDIRAT = 524 // { int mkdirat(int fd, char *path, mode_t mode); } + SYS_MKFIFOAT = 525 // { int mkfifoat(int fd, char *path, mode_t mode); } + SYS_MKNODAT = 526 // { int mknodat(int fd, char *path, mode_t mode, \ + SYS_READLINKAT = 527 // { int readlinkat(int fd, char *path, char *buf, \ + SYS_SYMLINKAT = 528 // { int symlinkat(char *path1, int fd, char *path2); } + SYS_SWAPOFF = 529 // { int swapoff(char *name); } + SYS_VQUOTACTL = 530 // { int vquotactl(const char *path, \ + SYS_LINKAT = 531 // { int linkat(int fd1, char *path1, int fd2, \ + SYS_EACCESS = 532 // { int eaccess(char *path, int flags); } + SYS_LPATHCONF = 533 // { int lpathconf(char *path, int name); } + SYS_VMM_GUEST_CTL = 534 // { int vmm_guest_ctl(int op, struct vmm_guest_options *options); } + SYS_VMM_GUEST_SYNC_ADDR = 535 // { int vmm_guest_sync_addr(long *dstaddr, long *srcaddr); } +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go new file mode 100644 index 0000000..262a845 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go @@ -0,0 +1,351 @@ +// mksysnum_freebsd.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build 386,freebsd + +package unix + +const ( + // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int + SYS_EXIT = 1 // { void sys_exit(int rval); } exit \ + SYS_FORK = 2 // { int fork(void); } + SYS_READ = 3 // { ssize_t read(int fd, void *buf, \ + SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \ + SYS_OPEN = 5 // { int open(char *path, int flags, int mode); } + SYS_CLOSE = 6 // { int close(int fd); } + SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \ + SYS_LINK = 9 // { int link(char *path, char *link); } + SYS_UNLINK = 10 // { int unlink(char *path); } + SYS_CHDIR = 12 // { int chdir(char *path); } + SYS_FCHDIR = 13 // { int fchdir(int fd); } + SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); } + SYS_CHMOD = 15 // { int chmod(char *path, int mode); } + SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); } + SYS_OBREAK = 17 // { int obreak(char *nsize); } break \ + SYS_GETPID = 20 // { pid_t getpid(void); } + SYS_MOUNT = 21 // { int mount(char *type, char *path, \ + SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); } + SYS_SETUID = 23 // { int setuid(uid_t uid); } + SYS_GETUID = 24 // { uid_t getuid(void); } + SYS_GETEUID = 25 // { uid_t geteuid(void); } + SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \ + SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \ + SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \ + SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \ + SYS_ACCEPT = 30 // { int accept(int s, \ + SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \ + SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \ + SYS_ACCESS = 33 // { int access(char *path, int amode); } + SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); } + SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); } + SYS_SYNC = 36 // { int sync(void); } + SYS_KILL = 37 // { int kill(int pid, int signum); } + SYS_GETPPID = 39 // { pid_t getppid(void); } + SYS_DUP = 41 // { int dup(u_int fd); } + SYS_PIPE = 42 // { int pipe(void); } + SYS_GETEGID = 43 // { gid_t getegid(void); } + SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \ + SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \ + SYS_GETGID = 47 // { gid_t getgid(void); } + SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \ + SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); } + SYS_ACCT = 51 // { int acct(char *path); } + SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \ + SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \ + SYS_REBOOT = 55 // { int reboot(int opt); } + SYS_REVOKE = 56 // { int revoke(char *path); } + SYS_SYMLINK = 57 // { int symlink(char *path, char *link); } + SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \ + SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \ + SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \ + SYS_CHROOT = 61 // { int chroot(char *path); } + SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \ + SYS_VFORK = 66 // { int vfork(void); } + SYS_SBRK = 69 // { int sbrk(int incr); } + SYS_SSTK = 70 // { int sstk(int incr); } + SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \ + SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); } + SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \ + SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \ + SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \ + SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \ + SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \ + SYS_GETPGRP = 81 // { int getpgrp(void); } + SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); } + SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \ + SYS_SWAPON = 85 // { int swapon(char *name); } + SYS_GETITIMER = 86 // { int getitimer(u_int which, \ + SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); } + SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); } + SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); } + SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \ + SYS_FSYNC = 95 // { int fsync(int fd); } + SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \ + SYS_SOCKET = 97 // { int socket(int domain, int type, \ + SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \ + SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); } + SYS_BIND = 104 // { int bind(int s, caddr_t name, \ + SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \ + SYS_LISTEN = 106 // { int listen(int s, int backlog); } + SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \ + SYS_GETRUSAGE = 117 // { int getrusage(int who, \ + SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \ + SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \ + SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \ + SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \ + SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); } + SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); } + SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); } + SYS_SETREGID = 127 // { int setregid(int rgid, int egid); } + SYS_RENAME = 128 // { int rename(char *from, char *to); } + SYS_FLOCK = 131 // { int flock(int fd, int how); } + SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); } + SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \ + SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); } + SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \ + SYS_MKDIR = 136 // { int mkdir(char *path, int mode); } + SYS_RMDIR = 137 // { int rmdir(char *path); } + SYS_UTIMES = 138 // { int utimes(char *path, \ + SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \ + SYS_SETSID = 147 // { int setsid(void); } + SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \ + SYS_LGETFH = 160 // { int lgetfh(char *fname, \ + SYS_GETFH = 161 // { int getfh(char *fname, \ + SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); } + SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \ + SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \ + SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \ + SYS_SETFIB = 175 // { int setfib(int fibnum); } + SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); } + SYS_SETGID = 181 // { int setgid(gid_t gid); } + SYS_SETEGID = 182 // { int setegid(gid_t egid); } + SYS_SETEUID = 183 // { int seteuid(uid_t euid); } + SYS_STAT = 188 // { int stat(char *path, struct stat *ub); } + SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); } + SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); } + SYS_PATHCONF = 191 // { int pathconf(char *path, int name); } + SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); } + SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \ + SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \ + SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \ + SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \ + SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \ + SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \ + SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \ + SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \ + SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); } + SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); } + SYS_UNDELETE = 205 // { int undelete(char *path); } + SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); } + SYS_GETPGID = 207 // { int getpgid(pid_t pid); } + SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \ + SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \ + SYS_CLOCK_SETTIME = 233 // { int clock_settime( \ + SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \ + SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \ + SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); } + SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \ + SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \ + SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); } + SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \ + SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); } + SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \ + SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \ + SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\ + SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); } + SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \ + SYS_RFORK = 251 // { int rfork(int flags); } + SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \ + SYS_ISSETUGID = 253 // { int issetugid(void); } + SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); } + SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \ + SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); } + SYS_LUTIMES = 276 // { int lutimes(char *path, \ + SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); } + SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); } + SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); } + SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \ + SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \ + SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \ + SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \ + SYS_MODNEXT = 300 // { int modnext(int modid); } + SYS_MODSTAT = 301 // { int modstat(int modid, \ + SYS_MODFNEXT = 302 // { int modfnext(int modid); } + SYS_MODFIND = 303 // { int modfind(const char *name); } + SYS_KLDLOAD = 304 // { int kldload(const char *file); } + SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); } + SYS_KLDFIND = 306 // { int kldfind(const char *file); } + SYS_KLDNEXT = 307 // { int kldnext(int fileid); } + SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \ + SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); } + SYS_GETSID = 310 // { int getsid(pid_t pid); } + SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \ + SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \ + SYS_YIELD = 321 // { int yield(void); } + SYS_MLOCKALL = 324 // { int mlockall(int how); } + SYS_MUNLOCKALL = 325 // { int munlockall(void); } + SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); } + SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \ + SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \ + SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \ + SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); } + SYS_SCHED_YIELD = 331 // { int sched_yield (void); } + SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); } + SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); } + SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \ + SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); } + SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \ + SYS_JAIL = 338 // { int jail(struct jail *jail); } + SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \ + SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); } + SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); } + SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \ + SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \ + SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \ + SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \ + SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \ + SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \ + SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \ + SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \ + SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \ + SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \ + SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \ + SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \ + SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \ + SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \ + SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \ + SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \ + SYS_KQUEUE = 362 // { int kqueue(void); } + SYS_KEVENT = 363 // { int kevent(int fd, \ + SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \ + SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \ + SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \ + SYS___SETUGID = 374 // { int __setugid(int flag); } + SYS_EACCESS = 376 // { int eaccess(char *path, int amode); } + SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \ + SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); } + SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); } + SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \ + SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \ + SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \ + SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \ + SYS_KENV = 390 // { int kenv(int what, const char *name, \ + SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \ + SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \ + SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \ + SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \ + SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \ + SYS_STATFS = 396 // { int statfs(char *path, \ + SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); } + SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \ + SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \ + SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \ + SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \ + SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \ + SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \ + SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \ + SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \ + SYS_SIGACTION = 416 // { int sigaction(int sig, \ + SYS_SIGRETURN = 417 // { int sigreturn( \ + SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); } + SYS_SETCONTEXT = 422 // { int setcontext( \ + SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \ + SYS_SWAPOFF = 424 // { int swapoff(const char *name); } + SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \ + SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \ + SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \ + SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \ + SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \ + SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \ + SYS_THR_EXIT = 431 // { void thr_exit(long *state); } + SYS_THR_SELF = 432 // { int thr_self(long *id); } + SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); } + SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); } + SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); } + SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); } + SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \ + SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \ + SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \ + SYS_THR_SUSPEND = 442 // { int thr_suspend( \ + SYS_THR_WAKE = 443 // { int thr_wake(long id); } + SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); } + SYS_AUDIT = 445 // { int audit(const void *record, \ + SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \ + SYS_GETAUID = 447 // { int getauid(uid_t *auid); } + SYS_SETAUID = 448 // { int setauid(uid_t *auid); } + SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); } + SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); } + SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \ + SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \ + SYS_AUDITCTL = 453 // { int auditctl(char *path); } + SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \ + SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \ + SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); } + SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); } + SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); } + SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \ + SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); } + SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \ + SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \ + SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \ + SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \ + SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \ + SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \ + SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \ + SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); } + SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); } + SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); } + SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \ + SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); } + SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); } + SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \ + SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \ + SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \ + SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \ + SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \ + SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \ + SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \ + SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \ + SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \ + SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \ + SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \ + SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); } + SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); } + SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \ + SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \ + SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \ + SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \ + SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \ + SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); } + SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); } + SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \ + SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \ + SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); } + SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); } + SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); } + SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); } + SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \ + SYS_CAP_ENTER = 516 // { int cap_enter(void); } + SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); } + SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); } + SYS_PDKILL = 519 // { int pdkill(int fd, int signum); } + SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); } + SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \ + SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \ + SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); } + SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \ + SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \ + SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \ + SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \ + SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \ + SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \ + SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \ + SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \ + SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \ + SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \ + SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \ + SYS_ACCEPT4 = 541 // { int accept4(int s, \ + SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); } + SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \ + SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, \ +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go new file mode 100644 index 0000000..57a60ea --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go @@ -0,0 +1,351 @@ +// mksysnum_freebsd.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build amd64,freebsd + +package unix + +const ( + // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int + SYS_EXIT = 1 // { void sys_exit(int rval); } exit \ + SYS_FORK = 2 // { int fork(void); } + SYS_READ = 3 // { ssize_t read(int fd, void *buf, \ + SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \ + SYS_OPEN = 5 // { int open(char *path, int flags, int mode); } + SYS_CLOSE = 6 // { int close(int fd); } + SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \ + SYS_LINK = 9 // { int link(char *path, char *link); } + SYS_UNLINK = 10 // { int unlink(char *path); } + SYS_CHDIR = 12 // { int chdir(char *path); } + SYS_FCHDIR = 13 // { int fchdir(int fd); } + SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); } + SYS_CHMOD = 15 // { int chmod(char *path, int mode); } + SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); } + SYS_OBREAK = 17 // { int obreak(char *nsize); } break \ + SYS_GETPID = 20 // { pid_t getpid(void); } + SYS_MOUNT = 21 // { int mount(char *type, char *path, \ + SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); } + SYS_SETUID = 23 // { int setuid(uid_t uid); } + SYS_GETUID = 24 // { uid_t getuid(void); } + SYS_GETEUID = 25 // { uid_t geteuid(void); } + SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \ + SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \ + SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \ + SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \ + SYS_ACCEPT = 30 // { int accept(int s, \ + SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \ + SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \ + SYS_ACCESS = 33 // { int access(char *path, int amode); } + SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); } + SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); } + SYS_SYNC = 36 // { int sync(void); } + SYS_KILL = 37 // { int kill(int pid, int signum); } + SYS_GETPPID = 39 // { pid_t getppid(void); } + SYS_DUP = 41 // { int dup(u_int fd); } + SYS_PIPE = 42 // { int pipe(void); } + SYS_GETEGID = 43 // { gid_t getegid(void); } + SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \ + SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \ + SYS_GETGID = 47 // { gid_t getgid(void); } + SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \ + SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); } + SYS_ACCT = 51 // { int acct(char *path); } + SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \ + SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \ + SYS_REBOOT = 55 // { int reboot(int opt); } + SYS_REVOKE = 56 // { int revoke(char *path); } + SYS_SYMLINK = 57 // { int symlink(char *path, char *link); } + SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \ + SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \ + SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \ + SYS_CHROOT = 61 // { int chroot(char *path); } + SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \ + SYS_VFORK = 66 // { int vfork(void); } + SYS_SBRK = 69 // { int sbrk(int incr); } + SYS_SSTK = 70 // { int sstk(int incr); } + SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \ + SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); } + SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \ + SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \ + SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \ + SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \ + SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \ + SYS_GETPGRP = 81 // { int getpgrp(void); } + SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); } + SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \ + SYS_SWAPON = 85 // { int swapon(char *name); } + SYS_GETITIMER = 86 // { int getitimer(u_int which, \ + SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); } + SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); } + SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); } + SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \ + SYS_FSYNC = 95 // { int fsync(int fd); } + SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \ + SYS_SOCKET = 97 // { int socket(int domain, int type, \ + SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \ + SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); } + SYS_BIND = 104 // { int bind(int s, caddr_t name, \ + SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \ + SYS_LISTEN = 106 // { int listen(int s, int backlog); } + SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \ + SYS_GETRUSAGE = 117 // { int getrusage(int who, \ + SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \ + SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \ + SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \ + SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \ + SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); } + SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); } + SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); } + SYS_SETREGID = 127 // { int setregid(int rgid, int egid); } + SYS_RENAME = 128 // { int rename(char *from, char *to); } + SYS_FLOCK = 131 // { int flock(int fd, int how); } + SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); } + SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \ + SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); } + SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \ + SYS_MKDIR = 136 // { int mkdir(char *path, int mode); } + SYS_RMDIR = 137 // { int rmdir(char *path); } + SYS_UTIMES = 138 // { int utimes(char *path, \ + SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \ + SYS_SETSID = 147 // { int setsid(void); } + SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \ + SYS_LGETFH = 160 // { int lgetfh(char *fname, \ + SYS_GETFH = 161 // { int getfh(char *fname, \ + SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); } + SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \ + SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \ + SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \ + SYS_SETFIB = 175 // { int setfib(int fibnum); } + SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); } + SYS_SETGID = 181 // { int setgid(gid_t gid); } + SYS_SETEGID = 182 // { int setegid(gid_t egid); } + SYS_SETEUID = 183 // { int seteuid(uid_t euid); } + SYS_STAT = 188 // { int stat(char *path, struct stat *ub); } + SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); } + SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); } + SYS_PATHCONF = 191 // { int pathconf(char *path, int name); } + SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); } + SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \ + SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \ + SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \ + SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \ + SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \ + SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \ + SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \ + SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \ + SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); } + SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); } + SYS_UNDELETE = 205 // { int undelete(char *path); } + SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); } + SYS_GETPGID = 207 // { int getpgid(pid_t pid); } + SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \ + SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \ + SYS_CLOCK_SETTIME = 233 // { int clock_settime( \ + SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \ + SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \ + SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); } + SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \ + SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \ + SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); } + SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \ + SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); } + SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \ + SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \ + SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\ + SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); } + SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \ + SYS_RFORK = 251 // { int rfork(int flags); } + SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \ + SYS_ISSETUGID = 253 // { int issetugid(void); } + SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); } + SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \ + SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); } + SYS_LUTIMES = 276 // { int lutimes(char *path, \ + SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); } + SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); } + SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); } + SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \ + SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \ + SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \ + SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \ + SYS_MODNEXT = 300 // { int modnext(int modid); } + SYS_MODSTAT = 301 // { int modstat(int modid, \ + SYS_MODFNEXT = 302 // { int modfnext(int modid); } + SYS_MODFIND = 303 // { int modfind(const char *name); } + SYS_KLDLOAD = 304 // { int kldload(const char *file); } + SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); } + SYS_KLDFIND = 306 // { int kldfind(const char *file); } + SYS_KLDNEXT = 307 // { int kldnext(int fileid); } + SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \ + SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); } + SYS_GETSID = 310 // { int getsid(pid_t pid); } + SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \ + SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \ + SYS_YIELD = 321 // { int yield(void); } + SYS_MLOCKALL = 324 // { int mlockall(int how); } + SYS_MUNLOCKALL = 325 // { int munlockall(void); } + SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); } + SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \ + SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \ + SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \ + SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); } + SYS_SCHED_YIELD = 331 // { int sched_yield (void); } + SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); } + SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); } + SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \ + SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); } + SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \ + SYS_JAIL = 338 // { int jail(struct jail *jail); } + SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \ + SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); } + SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); } + SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \ + SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \ + SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \ + SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \ + SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \ + SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \ + SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \ + SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \ + SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \ + SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \ + SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \ + SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \ + SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \ + SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \ + SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \ + SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \ + SYS_KQUEUE = 362 // { int kqueue(void); } + SYS_KEVENT = 363 // { int kevent(int fd, \ + SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \ + SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \ + SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \ + SYS___SETUGID = 374 // { int __setugid(int flag); } + SYS_EACCESS = 376 // { int eaccess(char *path, int amode); } + SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \ + SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); } + SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); } + SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \ + SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \ + SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \ + SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \ + SYS_KENV = 390 // { int kenv(int what, const char *name, \ + SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \ + SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \ + SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \ + SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \ + SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \ + SYS_STATFS = 396 // { int statfs(char *path, \ + SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); } + SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \ + SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \ + SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \ + SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \ + SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \ + SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \ + SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \ + SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \ + SYS_SIGACTION = 416 // { int sigaction(int sig, \ + SYS_SIGRETURN = 417 // { int sigreturn( \ + SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); } + SYS_SETCONTEXT = 422 // { int setcontext( \ + SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \ + SYS_SWAPOFF = 424 // { int swapoff(const char *name); } + SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \ + SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \ + SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \ + SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \ + SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \ + SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \ + SYS_THR_EXIT = 431 // { void thr_exit(long *state); } + SYS_THR_SELF = 432 // { int thr_self(long *id); } + SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); } + SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); } + SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); } + SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); } + SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \ + SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \ + SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \ + SYS_THR_SUSPEND = 442 // { int thr_suspend( \ + SYS_THR_WAKE = 443 // { int thr_wake(long id); } + SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); } + SYS_AUDIT = 445 // { int audit(const void *record, \ + SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \ + SYS_GETAUID = 447 // { int getauid(uid_t *auid); } + SYS_SETAUID = 448 // { int setauid(uid_t *auid); } + SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); } + SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); } + SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \ + SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \ + SYS_AUDITCTL = 453 // { int auditctl(char *path); } + SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \ + SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \ + SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); } + SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); } + SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); } + SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \ + SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); } + SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \ + SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \ + SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \ + SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \ + SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \ + SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \ + SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \ + SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); } + SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); } + SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); } + SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \ + SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); } + SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); } + SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \ + SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \ + SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \ + SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \ + SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \ + SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \ + SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \ + SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \ + SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \ + SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \ + SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \ + SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); } + SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); } + SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \ + SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \ + SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \ + SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \ + SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \ + SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); } + SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); } + SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \ + SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \ + SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); } + SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); } + SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); } + SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); } + SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \ + SYS_CAP_ENTER = 516 // { int cap_enter(void); } + SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); } + SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); } + SYS_PDKILL = 519 // { int pdkill(int fd, int signum); } + SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); } + SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \ + SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \ + SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); } + SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \ + SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \ + SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \ + SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \ + SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \ + SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \ + SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \ + SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \ + SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \ + SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \ + SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \ + SYS_ACCEPT4 = 541 // { int accept4(int s, \ + SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); } + SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \ + SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, \ +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go new file mode 100644 index 0000000..206b9f6 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go @@ -0,0 +1,351 @@ +// mksysnum_freebsd.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build arm,freebsd + +package unix + +const ( + // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int + SYS_EXIT = 1 // { void sys_exit(int rval); } exit \ + SYS_FORK = 2 // { int fork(void); } + SYS_READ = 3 // { ssize_t read(int fd, void *buf, \ + SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \ + SYS_OPEN = 5 // { int open(char *path, int flags, int mode); } + SYS_CLOSE = 6 // { int close(int fd); } + SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \ + SYS_LINK = 9 // { int link(char *path, char *link); } + SYS_UNLINK = 10 // { int unlink(char *path); } + SYS_CHDIR = 12 // { int chdir(char *path); } + SYS_FCHDIR = 13 // { int fchdir(int fd); } + SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); } + SYS_CHMOD = 15 // { int chmod(char *path, int mode); } + SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); } + SYS_OBREAK = 17 // { int obreak(char *nsize); } break \ + SYS_GETPID = 20 // { pid_t getpid(void); } + SYS_MOUNT = 21 // { int mount(char *type, char *path, \ + SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); } + SYS_SETUID = 23 // { int setuid(uid_t uid); } + SYS_GETUID = 24 // { uid_t getuid(void); } + SYS_GETEUID = 25 // { uid_t geteuid(void); } + SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \ + SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \ + SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \ + SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \ + SYS_ACCEPT = 30 // { int accept(int s, \ + SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \ + SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \ + SYS_ACCESS = 33 // { int access(char *path, int amode); } + SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); } + SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); } + SYS_SYNC = 36 // { int sync(void); } + SYS_KILL = 37 // { int kill(int pid, int signum); } + SYS_GETPPID = 39 // { pid_t getppid(void); } + SYS_DUP = 41 // { int dup(u_int fd); } + SYS_PIPE = 42 // { int pipe(void); } + SYS_GETEGID = 43 // { gid_t getegid(void); } + SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \ + SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \ + SYS_GETGID = 47 // { gid_t getgid(void); } + SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \ + SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); } + SYS_ACCT = 51 // { int acct(char *path); } + SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \ + SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \ + SYS_REBOOT = 55 // { int reboot(int opt); } + SYS_REVOKE = 56 // { int revoke(char *path); } + SYS_SYMLINK = 57 // { int symlink(char *path, char *link); } + SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \ + SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \ + SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \ + SYS_CHROOT = 61 // { int chroot(char *path); } + SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \ + SYS_VFORK = 66 // { int vfork(void); } + SYS_SBRK = 69 // { int sbrk(int incr); } + SYS_SSTK = 70 // { int sstk(int incr); } + SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \ + SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); } + SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \ + SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \ + SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \ + SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \ + SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \ + SYS_GETPGRP = 81 // { int getpgrp(void); } + SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); } + SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \ + SYS_SWAPON = 85 // { int swapon(char *name); } + SYS_GETITIMER = 86 // { int getitimer(u_int which, \ + SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); } + SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); } + SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); } + SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \ + SYS_FSYNC = 95 // { int fsync(int fd); } + SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \ + SYS_SOCKET = 97 // { int socket(int domain, int type, \ + SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \ + SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); } + SYS_BIND = 104 // { int bind(int s, caddr_t name, \ + SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \ + SYS_LISTEN = 106 // { int listen(int s, int backlog); } + SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \ + SYS_GETRUSAGE = 117 // { int getrusage(int who, \ + SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \ + SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \ + SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \ + SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \ + SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); } + SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); } + SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); } + SYS_SETREGID = 127 // { int setregid(int rgid, int egid); } + SYS_RENAME = 128 // { int rename(char *from, char *to); } + SYS_FLOCK = 131 // { int flock(int fd, int how); } + SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); } + SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \ + SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); } + SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \ + SYS_MKDIR = 136 // { int mkdir(char *path, int mode); } + SYS_RMDIR = 137 // { int rmdir(char *path); } + SYS_UTIMES = 138 // { int utimes(char *path, \ + SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \ + SYS_SETSID = 147 // { int setsid(void); } + SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \ + SYS_LGETFH = 160 // { int lgetfh(char *fname, \ + SYS_GETFH = 161 // { int getfh(char *fname, \ + SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); } + SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \ + SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \ + SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \ + SYS_SETFIB = 175 // { int setfib(int fibnum); } + SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); } + SYS_SETGID = 181 // { int setgid(gid_t gid); } + SYS_SETEGID = 182 // { int setegid(gid_t egid); } + SYS_SETEUID = 183 // { int seteuid(uid_t euid); } + SYS_STAT = 188 // { int stat(char *path, struct stat *ub); } + SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); } + SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); } + SYS_PATHCONF = 191 // { int pathconf(char *path, int name); } + SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); } + SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \ + SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \ + SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \ + SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \ + SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \ + SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \ + SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \ + SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \ + SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); } + SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); } + SYS_UNDELETE = 205 // { int undelete(char *path); } + SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); } + SYS_GETPGID = 207 // { int getpgid(pid_t pid); } + SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \ + SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \ + SYS_CLOCK_SETTIME = 233 // { int clock_settime( \ + SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \ + SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \ + SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); } + SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \ + SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \ + SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); } + SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \ + SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); } + SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \ + SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \ + SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\ + SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); } + SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \ + SYS_RFORK = 251 // { int rfork(int flags); } + SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \ + SYS_ISSETUGID = 253 // { int issetugid(void); } + SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); } + SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \ + SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); } + SYS_LUTIMES = 276 // { int lutimes(char *path, \ + SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); } + SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); } + SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); } + SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \ + SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \ + SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \ + SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \ + SYS_MODNEXT = 300 // { int modnext(int modid); } + SYS_MODSTAT = 301 // { int modstat(int modid, \ + SYS_MODFNEXT = 302 // { int modfnext(int modid); } + SYS_MODFIND = 303 // { int modfind(const char *name); } + SYS_KLDLOAD = 304 // { int kldload(const char *file); } + SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); } + SYS_KLDFIND = 306 // { int kldfind(const char *file); } + SYS_KLDNEXT = 307 // { int kldnext(int fileid); } + SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \ + SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); } + SYS_GETSID = 310 // { int getsid(pid_t pid); } + SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \ + SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \ + SYS_YIELD = 321 // { int yield(void); } + SYS_MLOCKALL = 324 // { int mlockall(int how); } + SYS_MUNLOCKALL = 325 // { int munlockall(void); } + SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); } + SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \ + SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \ + SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \ + SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); } + SYS_SCHED_YIELD = 331 // { int sched_yield (void); } + SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); } + SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); } + SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \ + SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); } + SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \ + SYS_JAIL = 338 // { int jail(struct jail *jail); } + SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \ + SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); } + SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); } + SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \ + SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \ + SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \ + SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \ + SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \ + SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \ + SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \ + SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \ + SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \ + SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \ + SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \ + SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \ + SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \ + SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \ + SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \ + SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \ + SYS_KQUEUE = 362 // { int kqueue(void); } + SYS_KEVENT = 363 // { int kevent(int fd, \ + SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \ + SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \ + SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \ + SYS___SETUGID = 374 // { int __setugid(int flag); } + SYS_EACCESS = 376 // { int eaccess(char *path, int amode); } + SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \ + SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); } + SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); } + SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \ + SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \ + SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \ + SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \ + SYS_KENV = 390 // { int kenv(int what, const char *name, \ + SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \ + SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \ + SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \ + SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \ + SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \ + SYS_STATFS = 396 // { int statfs(char *path, \ + SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); } + SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \ + SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \ + SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \ + SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \ + SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \ + SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \ + SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \ + SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \ + SYS_SIGACTION = 416 // { int sigaction(int sig, \ + SYS_SIGRETURN = 417 // { int sigreturn( \ + SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); } + SYS_SETCONTEXT = 422 // { int setcontext( \ + SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \ + SYS_SWAPOFF = 424 // { int swapoff(const char *name); } + SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \ + SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \ + SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \ + SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \ + SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \ + SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \ + SYS_THR_EXIT = 431 // { void thr_exit(long *state); } + SYS_THR_SELF = 432 // { int thr_self(long *id); } + SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); } + SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); } + SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); } + SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); } + SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \ + SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \ + SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \ + SYS_THR_SUSPEND = 442 // { int thr_suspend( \ + SYS_THR_WAKE = 443 // { int thr_wake(long id); } + SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); } + SYS_AUDIT = 445 // { int audit(const void *record, \ + SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \ + SYS_GETAUID = 447 // { int getauid(uid_t *auid); } + SYS_SETAUID = 448 // { int setauid(uid_t *auid); } + SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); } + SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); } + SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \ + SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \ + SYS_AUDITCTL = 453 // { int auditctl(char *path); } + SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \ + SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \ + SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); } + SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); } + SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); } + SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \ + SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); } + SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \ + SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \ + SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \ + SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \ + SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \ + SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \ + SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \ + SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); } + SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); } + SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); } + SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \ + SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); } + SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); } + SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \ + SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \ + SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \ + SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \ + SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \ + SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \ + SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \ + SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \ + SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \ + SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \ + SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \ + SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); } + SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); } + SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \ + SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \ + SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \ + SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \ + SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \ + SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); } + SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); } + SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \ + SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \ + SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); } + SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); } + SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); } + SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); } + SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \ + SYS_CAP_ENTER = 516 // { int cap_enter(void); } + SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); } + SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); } + SYS_PDKILL = 519 // { int pdkill(int fd, int signum); } + SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); } + SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \ + SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \ + SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); } + SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \ + SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \ + SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \ + SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \ + SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \ + SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \ + SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \ + SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \ + SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \ + SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \ + SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \ + SYS_ACCEPT4 = 541 // { int accept4(int s, \ + SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); } + SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \ + SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, \ +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go new file mode 100644 index 0000000..ba952c6 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go @@ -0,0 +1,355 @@ +// mksysnum_linux.pl /usr/include/asm/unistd_32.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build 386,linux + +package unix + +const ( + SYS_RESTART_SYSCALL = 0 + SYS_EXIT = 1 + SYS_FORK = 2 + SYS_READ = 3 + SYS_WRITE = 4 + SYS_OPEN = 5 + SYS_CLOSE = 6 + SYS_WAITPID = 7 + SYS_CREAT = 8 + SYS_LINK = 9 + SYS_UNLINK = 10 + SYS_EXECVE = 11 + SYS_CHDIR = 12 + SYS_TIME = 13 + SYS_MKNOD = 14 + SYS_CHMOD = 15 + SYS_LCHOWN = 16 + SYS_BREAK = 17 + SYS_OLDSTAT = 18 + SYS_LSEEK = 19 + SYS_GETPID = 20 + SYS_MOUNT = 21 + SYS_UMOUNT = 22 + SYS_SETUID = 23 + SYS_GETUID = 24 + SYS_STIME = 25 + SYS_PTRACE = 26 + SYS_ALARM = 27 + SYS_OLDFSTAT = 28 + SYS_PAUSE = 29 + SYS_UTIME = 30 + SYS_STTY = 31 + SYS_GTTY = 32 + SYS_ACCESS = 33 + SYS_NICE = 34 + SYS_FTIME = 35 + SYS_SYNC = 36 + SYS_KILL = 37 + SYS_RENAME = 38 + SYS_MKDIR = 39 + SYS_RMDIR = 40 + SYS_DUP = 41 + SYS_PIPE = 42 + SYS_TIMES = 43 + SYS_PROF = 44 + SYS_BRK = 45 + SYS_SETGID = 46 + SYS_GETGID = 47 + SYS_SIGNAL = 48 + SYS_GETEUID = 49 + SYS_GETEGID = 50 + SYS_ACCT = 51 + SYS_UMOUNT2 = 52 + SYS_LOCK = 53 + SYS_IOCTL = 54 + SYS_FCNTL = 55 + SYS_MPX = 56 + SYS_SETPGID = 57 + SYS_ULIMIT = 58 + SYS_OLDOLDUNAME = 59 + SYS_UMASK = 60 + SYS_CHROOT = 61 + SYS_USTAT = 62 + SYS_DUP2 = 63 + SYS_GETPPID = 64 + SYS_GETPGRP = 65 + SYS_SETSID = 66 + SYS_SIGACTION = 67 + SYS_SGETMASK = 68 + SYS_SSETMASK = 69 + SYS_SETREUID = 70 + SYS_SETREGID = 71 + SYS_SIGSUSPEND = 72 + SYS_SIGPENDING = 73 + SYS_SETHOSTNAME = 74 + SYS_SETRLIMIT = 75 + SYS_GETRLIMIT = 76 + SYS_GETRUSAGE = 77 + SYS_GETTIMEOFDAY = 78 + SYS_SETTIMEOFDAY = 79 + SYS_GETGROUPS = 80 + SYS_SETGROUPS = 81 + SYS_SELECT = 82 + SYS_SYMLINK = 83 + SYS_OLDLSTAT = 84 + SYS_READLINK = 85 + SYS_USELIB = 86 + SYS_SWAPON = 87 + SYS_REBOOT = 88 + SYS_READDIR = 89 + SYS_MMAP = 90 + SYS_MUNMAP = 91 + SYS_TRUNCATE = 92 + SYS_FTRUNCATE = 93 + SYS_FCHMOD = 94 + SYS_FCHOWN = 95 + SYS_GETPRIORITY = 96 + SYS_SETPRIORITY = 97 + SYS_PROFIL = 98 + SYS_STATFS = 99 + SYS_FSTATFS = 100 + SYS_IOPERM = 101 + SYS_SOCKETCALL = 102 + SYS_SYSLOG = 103 + SYS_SETITIMER = 104 + SYS_GETITIMER = 105 + SYS_STAT = 106 + SYS_LSTAT = 107 + SYS_FSTAT = 108 + SYS_OLDUNAME = 109 + SYS_IOPL = 110 + SYS_VHANGUP = 111 + SYS_IDLE = 112 + SYS_VM86OLD = 113 + SYS_WAIT4 = 114 + SYS_SWAPOFF = 115 + SYS_SYSINFO = 116 + SYS_IPC = 117 + SYS_FSYNC = 118 + SYS_SIGRETURN = 119 + SYS_CLONE = 120 + SYS_SETDOMAINNAME = 121 + SYS_UNAME = 122 + SYS_MODIFY_LDT = 123 + SYS_ADJTIMEX = 124 + SYS_MPROTECT = 125 + SYS_SIGPROCMASK = 126 + SYS_CREATE_MODULE = 127 + SYS_INIT_MODULE = 128 + SYS_DELETE_MODULE = 129 + SYS_GET_KERNEL_SYMS = 130 + SYS_QUOTACTL = 131 + SYS_GETPGID = 132 + SYS_FCHDIR = 133 + SYS_BDFLUSH = 134 + SYS_SYSFS = 135 + SYS_PERSONALITY = 136 + SYS_AFS_SYSCALL = 137 + SYS_SETFSUID = 138 + SYS_SETFSGID = 139 + SYS__LLSEEK = 140 + SYS_GETDENTS = 141 + SYS__NEWSELECT = 142 + SYS_FLOCK = 143 + SYS_MSYNC = 144 + SYS_READV = 145 + SYS_WRITEV = 146 + SYS_GETSID = 147 + SYS_FDATASYNC = 148 + SYS__SYSCTL = 149 + SYS_MLOCK = 150 + SYS_MUNLOCK = 151 + SYS_MLOCKALL = 152 + SYS_MUNLOCKALL = 153 + SYS_SCHED_SETPARAM = 154 + SYS_SCHED_GETPARAM = 155 + SYS_SCHED_SETSCHEDULER = 156 + SYS_SCHED_GETSCHEDULER = 157 + SYS_SCHED_YIELD = 158 + SYS_SCHED_GET_PRIORITY_MAX = 159 + SYS_SCHED_GET_PRIORITY_MIN = 160 + SYS_SCHED_RR_GET_INTERVAL = 161 + SYS_NANOSLEEP = 162 + SYS_MREMAP = 163 + SYS_SETRESUID = 164 + SYS_GETRESUID = 165 + SYS_VM86 = 166 + SYS_QUERY_MODULE = 167 + SYS_POLL = 168 + SYS_NFSSERVCTL = 169 + SYS_SETRESGID = 170 + SYS_GETRESGID = 171 + SYS_PRCTL = 172 + SYS_RT_SIGRETURN = 173 + SYS_RT_SIGACTION = 174 + SYS_RT_SIGPROCMASK = 175 + SYS_RT_SIGPENDING = 176 + SYS_RT_SIGTIMEDWAIT = 177 + SYS_RT_SIGQUEUEINFO = 178 + SYS_RT_SIGSUSPEND = 179 + SYS_PREAD64 = 180 + SYS_PWRITE64 = 181 + SYS_CHOWN = 182 + SYS_GETCWD = 183 + SYS_CAPGET = 184 + SYS_CAPSET = 185 + SYS_SIGALTSTACK = 186 + SYS_SENDFILE = 187 + SYS_GETPMSG = 188 + SYS_PUTPMSG = 189 + SYS_VFORK = 190 + SYS_UGETRLIMIT = 191 + SYS_MMAP2 = 192 + SYS_TRUNCATE64 = 193 + SYS_FTRUNCATE64 = 194 + SYS_STAT64 = 195 + SYS_LSTAT64 = 196 + SYS_FSTAT64 = 197 + SYS_LCHOWN32 = 198 + SYS_GETUID32 = 199 + SYS_GETGID32 = 200 + SYS_GETEUID32 = 201 + SYS_GETEGID32 = 202 + SYS_SETREUID32 = 203 + SYS_SETREGID32 = 204 + SYS_GETGROUPS32 = 205 + SYS_SETGROUPS32 = 206 + SYS_FCHOWN32 = 207 + SYS_SETRESUID32 = 208 + SYS_GETRESUID32 = 209 + SYS_SETRESGID32 = 210 + SYS_GETRESGID32 = 211 + SYS_CHOWN32 = 212 + SYS_SETUID32 = 213 + SYS_SETGID32 = 214 + SYS_SETFSUID32 = 215 + SYS_SETFSGID32 = 216 + SYS_PIVOT_ROOT = 217 + SYS_MINCORE = 218 + SYS_MADVISE = 219 + SYS_MADVISE1 = 219 + SYS_GETDENTS64 = 220 + SYS_FCNTL64 = 221 + SYS_GETTID = 224 + SYS_READAHEAD = 225 + SYS_SETXATTR = 226 + SYS_LSETXATTR = 227 + SYS_FSETXATTR = 228 + SYS_GETXATTR = 229 + SYS_LGETXATTR = 230 + SYS_FGETXATTR = 231 + SYS_LISTXATTR = 232 + SYS_LLISTXATTR = 233 + SYS_FLISTXATTR = 234 + SYS_REMOVEXATTR = 235 + SYS_LREMOVEXATTR = 236 + SYS_FREMOVEXATTR = 237 + SYS_TKILL = 238 + SYS_SENDFILE64 = 239 + SYS_FUTEX = 240 + SYS_SCHED_SETAFFINITY = 241 + SYS_SCHED_GETAFFINITY = 242 + SYS_SET_THREAD_AREA = 243 + SYS_GET_THREAD_AREA = 244 + SYS_IO_SETUP = 245 + SYS_IO_DESTROY = 246 + SYS_IO_GETEVENTS = 247 + SYS_IO_SUBMIT = 248 + SYS_IO_CANCEL = 249 + SYS_FADVISE64 = 250 + SYS_EXIT_GROUP = 252 + SYS_LOOKUP_DCOOKIE = 253 + SYS_EPOLL_CREATE = 254 + SYS_EPOLL_CTL = 255 + SYS_EPOLL_WAIT = 256 + SYS_REMAP_FILE_PAGES = 257 + SYS_SET_TID_ADDRESS = 258 + SYS_TIMER_CREATE = 259 + SYS_TIMER_SETTIME = 260 + SYS_TIMER_GETTIME = 261 + SYS_TIMER_GETOVERRUN = 262 + SYS_TIMER_DELETE = 263 + SYS_CLOCK_SETTIME = 264 + SYS_CLOCK_GETTIME = 265 + SYS_CLOCK_GETRES = 266 + SYS_CLOCK_NANOSLEEP = 267 + SYS_STATFS64 = 268 + SYS_FSTATFS64 = 269 + SYS_TGKILL = 270 + SYS_UTIMES = 271 + SYS_FADVISE64_64 = 272 + SYS_VSERVER = 273 + SYS_MBIND = 274 + SYS_GET_MEMPOLICY = 275 + SYS_SET_MEMPOLICY = 276 + SYS_MQ_OPEN = 277 + SYS_MQ_UNLINK = 278 + SYS_MQ_TIMEDSEND = 279 + SYS_MQ_TIMEDRECEIVE = 280 + SYS_MQ_NOTIFY = 281 + SYS_MQ_GETSETATTR = 282 + SYS_KEXEC_LOAD = 283 + SYS_WAITID = 284 + SYS_ADD_KEY = 286 + SYS_REQUEST_KEY = 287 + SYS_KEYCTL = 288 + SYS_IOPRIO_SET = 289 + SYS_IOPRIO_GET = 290 + SYS_INOTIFY_INIT = 291 + SYS_INOTIFY_ADD_WATCH = 292 + SYS_INOTIFY_RM_WATCH = 293 + SYS_MIGRATE_PAGES = 294 + SYS_OPENAT = 295 + SYS_MKDIRAT = 296 + SYS_MKNODAT = 297 + SYS_FCHOWNAT = 298 + SYS_FUTIMESAT = 299 + SYS_FSTATAT64 = 300 + SYS_UNLINKAT = 301 + SYS_RENAMEAT = 302 + SYS_LINKAT = 303 + SYS_SYMLINKAT = 304 + SYS_READLINKAT = 305 + SYS_FCHMODAT = 306 + SYS_FACCESSAT = 307 + SYS_PSELECT6 = 308 + SYS_PPOLL = 309 + SYS_UNSHARE = 310 + SYS_SET_ROBUST_LIST = 311 + SYS_GET_ROBUST_LIST = 312 + SYS_SPLICE = 313 + SYS_SYNC_FILE_RANGE = 314 + SYS_TEE = 315 + SYS_VMSPLICE = 316 + SYS_MOVE_PAGES = 317 + SYS_GETCPU = 318 + SYS_EPOLL_PWAIT = 319 + SYS_UTIMENSAT = 320 + SYS_SIGNALFD = 321 + SYS_TIMERFD_CREATE = 322 + SYS_EVENTFD = 323 + SYS_FALLOCATE = 324 + SYS_TIMERFD_SETTIME = 325 + SYS_TIMERFD_GETTIME = 326 + SYS_SIGNALFD4 = 327 + SYS_EVENTFD2 = 328 + SYS_EPOLL_CREATE1 = 329 + SYS_DUP3 = 330 + SYS_PIPE2 = 331 + SYS_INOTIFY_INIT1 = 332 + SYS_PREADV = 333 + SYS_PWRITEV = 334 + SYS_RT_TGSIGQUEUEINFO = 335 + SYS_PERF_EVENT_OPEN = 336 + SYS_RECVMMSG = 337 + SYS_FANOTIFY_INIT = 338 + SYS_FANOTIFY_MARK = 339 + SYS_PRLIMIT64 = 340 + SYS_NAME_TO_HANDLE_AT = 341 + SYS_OPEN_BY_HANDLE_AT = 342 + SYS_CLOCK_ADJTIME = 343 + SYS_SYNCFS = 344 + SYS_SENDMMSG = 345 + SYS_SETNS = 346 + SYS_PROCESS_VM_READV = 347 + SYS_PROCESS_VM_WRITEV = 348 +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go new file mode 100644 index 0000000..ddac31f --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go @@ -0,0 +1,321 @@ +// mksysnum_linux.pl /usr/include/asm/unistd_64.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build amd64,linux + +package unix + +const ( + SYS_READ = 0 + SYS_WRITE = 1 + SYS_OPEN = 2 + SYS_CLOSE = 3 + SYS_STAT = 4 + SYS_FSTAT = 5 + SYS_LSTAT = 6 + SYS_POLL = 7 + SYS_LSEEK = 8 + SYS_MMAP = 9 + SYS_MPROTECT = 10 + SYS_MUNMAP = 11 + SYS_BRK = 12 + SYS_RT_SIGACTION = 13 + SYS_RT_SIGPROCMASK = 14 + SYS_RT_SIGRETURN = 15 + SYS_IOCTL = 16 + SYS_PREAD64 = 17 + SYS_PWRITE64 = 18 + SYS_READV = 19 + SYS_WRITEV = 20 + SYS_ACCESS = 21 + SYS_PIPE = 22 + SYS_SELECT = 23 + SYS_SCHED_YIELD = 24 + SYS_MREMAP = 25 + SYS_MSYNC = 26 + SYS_MINCORE = 27 + SYS_MADVISE = 28 + SYS_SHMGET = 29 + SYS_SHMAT = 30 + SYS_SHMCTL = 31 + SYS_DUP = 32 + SYS_DUP2 = 33 + SYS_PAUSE = 34 + SYS_NANOSLEEP = 35 + SYS_GETITIMER = 36 + SYS_ALARM = 37 + SYS_SETITIMER = 38 + SYS_GETPID = 39 + SYS_SENDFILE = 40 + SYS_SOCKET = 41 + SYS_CONNECT = 42 + SYS_ACCEPT = 43 + SYS_SENDTO = 44 + SYS_RECVFROM = 45 + SYS_SENDMSG = 46 + SYS_RECVMSG = 47 + SYS_SHUTDOWN = 48 + SYS_BIND = 49 + SYS_LISTEN = 50 + SYS_GETSOCKNAME = 51 + SYS_GETPEERNAME = 52 + SYS_SOCKETPAIR = 53 + SYS_SETSOCKOPT = 54 + SYS_GETSOCKOPT = 55 + SYS_CLONE = 56 + SYS_FORK = 57 + SYS_VFORK = 58 + SYS_EXECVE = 59 + SYS_EXIT = 60 + SYS_WAIT4 = 61 + SYS_KILL = 62 + SYS_UNAME = 63 + SYS_SEMGET = 64 + SYS_SEMOP = 65 + SYS_SEMCTL = 66 + SYS_SHMDT = 67 + SYS_MSGGET = 68 + SYS_MSGSND = 69 + SYS_MSGRCV = 70 + SYS_MSGCTL = 71 + SYS_FCNTL = 72 + SYS_FLOCK = 73 + SYS_FSYNC = 74 + SYS_FDATASYNC = 75 + SYS_TRUNCATE = 76 + SYS_FTRUNCATE = 77 + SYS_GETDENTS = 78 + SYS_GETCWD = 79 + SYS_CHDIR = 80 + SYS_FCHDIR = 81 + SYS_RENAME = 82 + SYS_MKDIR = 83 + SYS_RMDIR = 84 + SYS_CREAT = 85 + SYS_LINK = 86 + SYS_UNLINK = 87 + SYS_SYMLINK = 88 + SYS_READLINK = 89 + SYS_CHMOD = 90 + SYS_FCHMOD = 91 + SYS_CHOWN = 92 + SYS_FCHOWN = 93 + SYS_LCHOWN = 94 + SYS_UMASK = 95 + SYS_GETTIMEOFDAY = 96 + SYS_GETRLIMIT = 97 + SYS_GETRUSAGE = 98 + SYS_SYSINFO = 99 + SYS_TIMES = 100 + SYS_PTRACE = 101 + SYS_GETUID = 102 + SYS_SYSLOG = 103 + SYS_GETGID = 104 + SYS_SETUID = 105 + SYS_SETGID = 106 + SYS_GETEUID = 107 + SYS_GETEGID = 108 + SYS_SETPGID = 109 + SYS_GETPPID = 110 + SYS_GETPGRP = 111 + SYS_SETSID = 112 + SYS_SETREUID = 113 + SYS_SETREGID = 114 + SYS_GETGROUPS = 115 + SYS_SETGROUPS = 116 + SYS_SETRESUID = 117 + SYS_GETRESUID = 118 + SYS_SETRESGID = 119 + SYS_GETRESGID = 120 + SYS_GETPGID = 121 + SYS_SETFSUID = 122 + SYS_SETFSGID = 123 + SYS_GETSID = 124 + SYS_CAPGET = 125 + SYS_CAPSET = 126 + SYS_RT_SIGPENDING = 127 + SYS_RT_SIGTIMEDWAIT = 128 + SYS_RT_SIGQUEUEINFO = 129 + SYS_RT_SIGSUSPEND = 130 + SYS_SIGALTSTACK = 131 + SYS_UTIME = 132 + SYS_MKNOD = 133 + SYS_USELIB = 134 + SYS_PERSONALITY = 135 + SYS_USTAT = 136 + SYS_STATFS = 137 + SYS_FSTATFS = 138 + SYS_SYSFS = 139 + SYS_GETPRIORITY = 140 + SYS_SETPRIORITY = 141 + SYS_SCHED_SETPARAM = 142 + SYS_SCHED_GETPARAM = 143 + SYS_SCHED_SETSCHEDULER = 144 + SYS_SCHED_GETSCHEDULER = 145 + SYS_SCHED_GET_PRIORITY_MAX = 146 + SYS_SCHED_GET_PRIORITY_MIN = 147 + SYS_SCHED_RR_GET_INTERVAL = 148 + SYS_MLOCK = 149 + SYS_MUNLOCK = 150 + SYS_MLOCKALL = 151 + SYS_MUNLOCKALL = 152 + SYS_VHANGUP = 153 + SYS_MODIFY_LDT = 154 + SYS_PIVOT_ROOT = 155 + SYS__SYSCTL = 156 + SYS_PRCTL = 157 + SYS_ARCH_PRCTL = 158 + SYS_ADJTIMEX = 159 + SYS_SETRLIMIT = 160 + SYS_CHROOT = 161 + SYS_SYNC = 162 + SYS_ACCT = 163 + SYS_SETTIMEOFDAY = 164 + SYS_MOUNT = 165 + SYS_UMOUNT2 = 166 + SYS_SWAPON = 167 + SYS_SWAPOFF = 168 + SYS_REBOOT = 169 + SYS_SETHOSTNAME = 170 + SYS_SETDOMAINNAME = 171 + SYS_IOPL = 172 + SYS_IOPERM = 173 + SYS_CREATE_MODULE = 174 + SYS_INIT_MODULE = 175 + SYS_DELETE_MODULE = 176 + SYS_GET_KERNEL_SYMS = 177 + SYS_QUERY_MODULE = 178 + SYS_QUOTACTL = 179 + SYS_NFSSERVCTL = 180 + SYS_GETPMSG = 181 + SYS_PUTPMSG = 182 + SYS_AFS_SYSCALL = 183 + SYS_TUXCALL = 184 + SYS_SECURITY = 185 + SYS_GETTID = 186 + SYS_READAHEAD = 187 + SYS_SETXATTR = 188 + SYS_LSETXATTR = 189 + SYS_FSETXATTR = 190 + SYS_GETXATTR = 191 + SYS_LGETXATTR = 192 + SYS_FGETXATTR = 193 + SYS_LISTXATTR = 194 + SYS_LLISTXATTR = 195 + SYS_FLISTXATTR = 196 + SYS_REMOVEXATTR = 197 + SYS_LREMOVEXATTR = 198 + SYS_FREMOVEXATTR = 199 + SYS_TKILL = 200 + SYS_TIME = 201 + SYS_FUTEX = 202 + SYS_SCHED_SETAFFINITY = 203 + SYS_SCHED_GETAFFINITY = 204 + SYS_SET_THREAD_AREA = 205 + SYS_IO_SETUP = 206 + SYS_IO_DESTROY = 207 + SYS_IO_GETEVENTS = 208 + SYS_IO_SUBMIT = 209 + SYS_IO_CANCEL = 210 + SYS_GET_THREAD_AREA = 211 + SYS_LOOKUP_DCOOKIE = 212 + SYS_EPOLL_CREATE = 213 + SYS_EPOLL_CTL_OLD = 214 + SYS_EPOLL_WAIT_OLD = 215 + SYS_REMAP_FILE_PAGES = 216 + SYS_GETDENTS64 = 217 + SYS_SET_TID_ADDRESS = 218 + SYS_RESTART_SYSCALL = 219 + SYS_SEMTIMEDOP = 220 + SYS_FADVISE64 = 221 + SYS_TIMER_CREATE = 222 + SYS_TIMER_SETTIME = 223 + SYS_TIMER_GETTIME = 224 + SYS_TIMER_GETOVERRUN = 225 + SYS_TIMER_DELETE = 226 + SYS_CLOCK_SETTIME = 227 + SYS_CLOCK_GETTIME = 228 + SYS_CLOCK_GETRES = 229 + SYS_CLOCK_NANOSLEEP = 230 + SYS_EXIT_GROUP = 231 + SYS_EPOLL_WAIT = 232 + SYS_EPOLL_CTL = 233 + SYS_TGKILL = 234 + SYS_UTIMES = 235 + SYS_VSERVER = 236 + SYS_MBIND = 237 + SYS_SET_MEMPOLICY = 238 + SYS_GET_MEMPOLICY = 239 + SYS_MQ_OPEN = 240 + SYS_MQ_UNLINK = 241 + SYS_MQ_TIMEDSEND = 242 + SYS_MQ_TIMEDRECEIVE = 243 + SYS_MQ_NOTIFY = 244 + SYS_MQ_GETSETATTR = 245 + SYS_KEXEC_LOAD = 246 + SYS_WAITID = 247 + SYS_ADD_KEY = 248 + SYS_REQUEST_KEY = 249 + SYS_KEYCTL = 250 + SYS_IOPRIO_SET = 251 + SYS_IOPRIO_GET = 252 + SYS_INOTIFY_INIT = 253 + SYS_INOTIFY_ADD_WATCH = 254 + SYS_INOTIFY_RM_WATCH = 255 + SYS_MIGRATE_PAGES = 256 + SYS_OPENAT = 257 + SYS_MKDIRAT = 258 + SYS_MKNODAT = 259 + SYS_FCHOWNAT = 260 + SYS_FUTIMESAT = 261 + SYS_NEWFSTATAT = 262 + SYS_UNLINKAT = 263 + SYS_RENAMEAT = 264 + SYS_LINKAT = 265 + SYS_SYMLINKAT = 266 + SYS_READLINKAT = 267 + SYS_FCHMODAT = 268 + SYS_FACCESSAT = 269 + SYS_PSELECT6 = 270 + SYS_PPOLL = 271 + SYS_UNSHARE = 272 + SYS_SET_ROBUST_LIST = 273 + SYS_GET_ROBUST_LIST = 274 + SYS_SPLICE = 275 + SYS_TEE = 276 + SYS_SYNC_FILE_RANGE = 277 + SYS_VMSPLICE = 278 + SYS_MOVE_PAGES = 279 + SYS_UTIMENSAT = 280 + SYS_EPOLL_PWAIT = 281 + SYS_SIGNALFD = 282 + SYS_TIMERFD_CREATE = 283 + SYS_EVENTFD = 284 + SYS_FALLOCATE = 285 + SYS_TIMERFD_SETTIME = 286 + SYS_TIMERFD_GETTIME = 287 + SYS_ACCEPT4 = 288 + SYS_SIGNALFD4 = 289 + SYS_EVENTFD2 = 290 + SYS_EPOLL_CREATE1 = 291 + SYS_DUP3 = 292 + SYS_PIPE2 = 293 + SYS_INOTIFY_INIT1 = 294 + SYS_PREADV = 295 + SYS_PWRITEV = 296 + SYS_RT_TGSIGQUEUEINFO = 297 + SYS_PERF_EVENT_OPEN = 298 + SYS_RECVMMSG = 299 + SYS_FANOTIFY_INIT = 300 + SYS_FANOTIFY_MARK = 301 + SYS_PRLIMIT64 = 302 + SYS_NAME_TO_HANDLE_AT = 303 + SYS_OPEN_BY_HANDLE_AT = 304 + SYS_CLOCK_ADJTIME = 305 + SYS_SYNCFS = 306 + SYS_SENDMMSG = 307 + SYS_SETNS = 308 + SYS_GETCPU = 309 + SYS_PROCESS_VM_READV = 310 + SYS_PROCESS_VM_WRITEV = 311 +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go new file mode 100644 index 0000000..45ced17 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go @@ -0,0 +1,356 @@ +// mksysnum_linux.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build arm,linux + +package unix + +const ( + SYS_OABI_SYSCALL_BASE = 0 + SYS_SYSCALL_BASE = 0 + SYS_RESTART_SYSCALL = 0 + SYS_EXIT = 1 + SYS_FORK = 2 + SYS_READ = 3 + SYS_WRITE = 4 + SYS_OPEN = 5 + SYS_CLOSE = 6 + SYS_CREAT = 8 + SYS_LINK = 9 + SYS_UNLINK = 10 + SYS_EXECVE = 11 + SYS_CHDIR = 12 + SYS_TIME = 13 + SYS_MKNOD = 14 + SYS_CHMOD = 15 + SYS_LCHOWN = 16 + SYS_LSEEK = 19 + SYS_GETPID = 20 + SYS_MOUNT = 21 + SYS_UMOUNT = 22 + SYS_SETUID = 23 + SYS_GETUID = 24 + SYS_STIME = 25 + SYS_PTRACE = 26 + SYS_ALARM = 27 + SYS_PAUSE = 29 + SYS_UTIME = 30 + SYS_ACCESS = 33 + SYS_NICE = 34 + SYS_SYNC = 36 + SYS_KILL = 37 + SYS_RENAME = 38 + SYS_MKDIR = 39 + SYS_RMDIR = 40 + SYS_DUP = 41 + SYS_PIPE = 42 + SYS_TIMES = 43 + SYS_BRK = 45 + SYS_SETGID = 46 + SYS_GETGID = 47 + SYS_GETEUID = 49 + SYS_GETEGID = 50 + SYS_ACCT = 51 + SYS_UMOUNT2 = 52 + SYS_IOCTL = 54 + SYS_FCNTL = 55 + SYS_SETPGID = 57 + SYS_UMASK = 60 + SYS_CHROOT = 61 + SYS_USTAT = 62 + SYS_DUP2 = 63 + SYS_GETPPID = 64 + SYS_GETPGRP = 65 + SYS_SETSID = 66 + SYS_SIGACTION = 67 + SYS_SETREUID = 70 + SYS_SETREGID = 71 + SYS_SIGSUSPEND = 72 + SYS_SIGPENDING = 73 + SYS_SETHOSTNAME = 74 + SYS_SETRLIMIT = 75 + SYS_GETRLIMIT = 76 + SYS_GETRUSAGE = 77 + SYS_GETTIMEOFDAY = 78 + SYS_SETTIMEOFDAY = 79 + SYS_GETGROUPS = 80 + SYS_SETGROUPS = 81 + SYS_SELECT = 82 + SYS_SYMLINK = 83 + SYS_READLINK = 85 + SYS_USELIB = 86 + SYS_SWAPON = 87 + SYS_REBOOT = 88 + SYS_READDIR = 89 + SYS_MMAP = 90 + SYS_MUNMAP = 91 + SYS_TRUNCATE = 92 + SYS_FTRUNCATE = 93 + SYS_FCHMOD = 94 + SYS_FCHOWN = 95 + SYS_GETPRIORITY = 96 + SYS_SETPRIORITY = 97 + SYS_STATFS = 99 + SYS_FSTATFS = 100 + SYS_SOCKETCALL = 102 + SYS_SYSLOG = 103 + SYS_SETITIMER = 104 + SYS_GETITIMER = 105 + SYS_STAT = 106 + SYS_LSTAT = 107 + SYS_FSTAT = 108 + SYS_VHANGUP = 111 + SYS_SYSCALL = 113 + SYS_WAIT4 = 114 + SYS_SWAPOFF = 115 + SYS_SYSINFO = 116 + SYS_IPC = 117 + SYS_FSYNC = 118 + SYS_SIGRETURN = 119 + SYS_CLONE = 120 + SYS_SETDOMAINNAME = 121 + SYS_UNAME = 122 + SYS_ADJTIMEX = 124 + SYS_MPROTECT = 125 + SYS_SIGPROCMASK = 126 + SYS_INIT_MODULE = 128 + SYS_DELETE_MODULE = 129 + SYS_QUOTACTL = 131 + SYS_GETPGID = 132 + SYS_FCHDIR = 133 + SYS_BDFLUSH = 134 + SYS_SYSFS = 135 + SYS_PERSONALITY = 136 + SYS_SETFSUID = 138 + SYS_SETFSGID = 139 + SYS__LLSEEK = 140 + SYS_GETDENTS = 141 + SYS__NEWSELECT = 142 + SYS_FLOCK = 143 + SYS_MSYNC = 144 + SYS_READV = 145 + SYS_WRITEV = 146 + SYS_GETSID = 147 + SYS_FDATASYNC = 148 + SYS__SYSCTL = 149 + SYS_MLOCK = 150 + SYS_MUNLOCK = 151 + SYS_MLOCKALL = 152 + SYS_MUNLOCKALL = 153 + SYS_SCHED_SETPARAM = 154 + SYS_SCHED_GETPARAM = 155 + SYS_SCHED_SETSCHEDULER = 156 + SYS_SCHED_GETSCHEDULER = 157 + SYS_SCHED_YIELD = 158 + SYS_SCHED_GET_PRIORITY_MAX = 159 + SYS_SCHED_GET_PRIORITY_MIN = 160 + SYS_SCHED_RR_GET_INTERVAL = 161 + SYS_NANOSLEEP = 162 + SYS_MREMAP = 163 + SYS_SETRESUID = 164 + SYS_GETRESUID = 165 + SYS_POLL = 168 + SYS_NFSSERVCTL = 169 + SYS_SETRESGID = 170 + SYS_GETRESGID = 171 + SYS_PRCTL = 172 + SYS_RT_SIGRETURN = 173 + SYS_RT_SIGACTION = 174 + SYS_RT_SIGPROCMASK = 175 + SYS_RT_SIGPENDING = 176 + SYS_RT_SIGTIMEDWAIT = 177 + SYS_RT_SIGQUEUEINFO = 178 + SYS_RT_SIGSUSPEND = 179 + SYS_PREAD64 = 180 + SYS_PWRITE64 = 181 + SYS_CHOWN = 182 + SYS_GETCWD = 183 + SYS_CAPGET = 184 + SYS_CAPSET = 185 + SYS_SIGALTSTACK = 186 + SYS_SENDFILE = 187 + SYS_VFORK = 190 + SYS_UGETRLIMIT = 191 + SYS_MMAP2 = 192 + SYS_TRUNCATE64 = 193 + SYS_FTRUNCATE64 = 194 + SYS_STAT64 = 195 + SYS_LSTAT64 = 196 + SYS_FSTAT64 = 197 + SYS_LCHOWN32 = 198 + SYS_GETUID32 = 199 + SYS_GETGID32 = 200 + SYS_GETEUID32 = 201 + SYS_GETEGID32 = 202 + SYS_SETREUID32 = 203 + SYS_SETREGID32 = 204 + SYS_GETGROUPS32 = 205 + SYS_SETGROUPS32 = 206 + SYS_FCHOWN32 = 207 + SYS_SETRESUID32 = 208 + SYS_GETRESUID32 = 209 + SYS_SETRESGID32 = 210 + SYS_GETRESGID32 = 211 + SYS_CHOWN32 = 212 + SYS_SETUID32 = 213 + SYS_SETGID32 = 214 + SYS_SETFSUID32 = 215 + SYS_SETFSGID32 = 216 + SYS_GETDENTS64 = 217 + SYS_PIVOT_ROOT = 218 + SYS_MINCORE = 219 + SYS_MADVISE = 220 + SYS_FCNTL64 = 221 + SYS_GETTID = 224 + SYS_READAHEAD = 225 + SYS_SETXATTR = 226 + SYS_LSETXATTR = 227 + SYS_FSETXATTR = 228 + SYS_GETXATTR = 229 + SYS_LGETXATTR = 230 + SYS_FGETXATTR = 231 + SYS_LISTXATTR = 232 + SYS_LLISTXATTR = 233 + SYS_FLISTXATTR = 234 + SYS_REMOVEXATTR = 235 + SYS_LREMOVEXATTR = 236 + SYS_FREMOVEXATTR = 237 + SYS_TKILL = 238 + SYS_SENDFILE64 = 239 + SYS_FUTEX = 240 + SYS_SCHED_SETAFFINITY = 241 + SYS_SCHED_GETAFFINITY = 242 + SYS_IO_SETUP = 243 + SYS_IO_DESTROY = 244 + SYS_IO_GETEVENTS = 245 + SYS_IO_SUBMIT = 246 + SYS_IO_CANCEL = 247 + SYS_EXIT_GROUP = 248 + SYS_LOOKUP_DCOOKIE = 249 + SYS_EPOLL_CREATE = 250 + SYS_EPOLL_CTL = 251 + SYS_EPOLL_WAIT = 252 + SYS_REMAP_FILE_PAGES = 253 + SYS_SET_TID_ADDRESS = 256 + SYS_TIMER_CREATE = 257 + SYS_TIMER_SETTIME = 258 + SYS_TIMER_GETTIME = 259 + SYS_TIMER_GETOVERRUN = 260 + SYS_TIMER_DELETE = 261 + SYS_CLOCK_SETTIME = 262 + SYS_CLOCK_GETTIME = 263 + SYS_CLOCK_GETRES = 264 + SYS_CLOCK_NANOSLEEP = 265 + SYS_STATFS64 = 266 + SYS_FSTATFS64 = 267 + SYS_TGKILL = 268 + SYS_UTIMES = 269 + SYS_ARM_FADVISE64_64 = 270 + SYS_PCICONFIG_IOBASE = 271 + SYS_PCICONFIG_READ = 272 + SYS_PCICONFIG_WRITE = 273 + SYS_MQ_OPEN = 274 + SYS_MQ_UNLINK = 275 + SYS_MQ_TIMEDSEND = 276 + SYS_MQ_TIMEDRECEIVE = 277 + SYS_MQ_NOTIFY = 278 + SYS_MQ_GETSETATTR = 279 + SYS_WAITID = 280 + SYS_SOCKET = 281 + SYS_BIND = 282 + SYS_CONNECT = 283 + SYS_LISTEN = 284 + SYS_ACCEPT = 285 + SYS_GETSOCKNAME = 286 + SYS_GETPEERNAME = 287 + SYS_SOCKETPAIR = 288 + SYS_SEND = 289 + SYS_SENDTO = 290 + SYS_RECV = 291 + SYS_RECVFROM = 292 + SYS_SHUTDOWN = 293 + SYS_SETSOCKOPT = 294 + SYS_GETSOCKOPT = 295 + SYS_SENDMSG = 296 + SYS_RECVMSG = 297 + SYS_SEMOP = 298 + SYS_SEMGET = 299 + SYS_SEMCTL = 300 + SYS_MSGSND = 301 + SYS_MSGRCV = 302 + SYS_MSGGET = 303 + SYS_MSGCTL = 304 + SYS_SHMAT = 305 + SYS_SHMDT = 306 + SYS_SHMGET = 307 + SYS_SHMCTL = 308 + SYS_ADD_KEY = 309 + SYS_REQUEST_KEY = 310 + SYS_KEYCTL = 311 + SYS_SEMTIMEDOP = 312 + SYS_VSERVER = 313 + SYS_IOPRIO_SET = 314 + SYS_IOPRIO_GET = 315 + SYS_INOTIFY_INIT = 316 + SYS_INOTIFY_ADD_WATCH = 317 + SYS_INOTIFY_RM_WATCH = 318 + SYS_MBIND = 319 + SYS_GET_MEMPOLICY = 320 + SYS_SET_MEMPOLICY = 321 + SYS_OPENAT = 322 + SYS_MKDIRAT = 323 + SYS_MKNODAT = 324 + SYS_FCHOWNAT = 325 + SYS_FUTIMESAT = 326 + SYS_FSTATAT64 = 327 + SYS_UNLINKAT = 328 + SYS_RENAMEAT = 329 + SYS_LINKAT = 330 + SYS_SYMLINKAT = 331 + SYS_READLINKAT = 332 + SYS_FCHMODAT = 333 + SYS_FACCESSAT = 334 + SYS_PSELECT6 = 335 + SYS_PPOLL = 336 + SYS_UNSHARE = 337 + SYS_SET_ROBUST_LIST = 338 + SYS_GET_ROBUST_LIST = 339 + SYS_SPLICE = 340 + SYS_ARM_SYNC_FILE_RANGE = 341 + SYS_TEE = 342 + SYS_VMSPLICE = 343 + SYS_MOVE_PAGES = 344 + SYS_GETCPU = 345 + SYS_EPOLL_PWAIT = 346 + SYS_KEXEC_LOAD = 347 + SYS_UTIMENSAT = 348 + SYS_SIGNALFD = 349 + SYS_TIMERFD_CREATE = 350 + SYS_EVENTFD = 351 + SYS_FALLOCATE = 352 + SYS_TIMERFD_SETTIME = 353 + SYS_TIMERFD_GETTIME = 354 + SYS_SIGNALFD4 = 355 + SYS_EVENTFD2 = 356 + SYS_EPOLL_CREATE1 = 357 + SYS_DUP3 = 358 + SYS_PIPE2 = 359 + SYS_INOTIFY_INIT1 = 360 + SYS_PREADV = 361 + SYS_PWRITEV = 362 + SYS_RT_TGSIGQUEUEINFO = 363 + SYS_PERF_EVENT_OPEN = 364 + SYS_RECVMMSG = 365 + SYS_ACCEPT4 = 366 + SYS_FANOTIFY_INIT = 367 + SYS_FANOTIFY_MARK = 368 + SYS_PRLIMIT64 = 369 + SYS_NAME_TO_HANDLE_AT = 370 + SYS_OPEN_BY_HANDLE_AT = 371 + SYS_CLOCK_ADJTIME = 372 + SYS_SYNCFS = 373 + SYS_SENDMMSG = 374 + SYS_SETNS = 375 + SYS_PROCESS_VM_READV = 376 + SYS_PROCESS_VM_WRITEV = 377 +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go new file mode 100644 index 0000000..2e9514f --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go @@ -0,0 +1,272 @@ +// mksysnum_linux.pl /usr/include/asm-generic/unistd.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build arm64,linux + +package unix + +const ( + SYS_IO_SETUP = 0 + SYS_IO_DESTROY = 1 + SYS_IO_SUBMIT = 2 + SYS_IO_CANCEL = 3 + SYS_IO_GETEVENTS = 4 + SYS_SETXATTR = 5 + SYS_LSETXATTR = 6 + SYS_FSETXATTR = 7 + SYS_GETXATTR = 8 + SYS_LGETXATTR = 9 + SYS_FGETXATTR = 10 + SYS_LISTXATTR = 11 + SYS_LLISTXATTR = 12 + SYS_FLISTXATTR = 13 + SYS_REMOVEXATTR = 14 + SYS_LREMOVEXATTR = 15 + SYS_FREMOVEXATTR = 16 + SYS_GETCWD = 17 + SYS_LOOKUP_DCOOKIE = 18 + SYS_EVENTFD2 = 19 + SYS_EPOLL_CREATE1 = 20 + SYS_EPOLL_CTL = 21 + SYS_EPOLL_PWAIT = 22 + SYS_DUP = 23 + SYS_DUP3 = 24 + SYS_FCNTL = 25 + SYS_INOTIFY_INIT1 = 26 + SYS_INOTIFY_ADD_WATCH = 27 + SYS_INOTIFY_RM_WATCH = 28 + SYS_IOCTL = 29 + SYS_IOPRIO_SET = 30 + SYS_IOPRIO_GET = 31 + SYS_FLOCK = 32 + SYS_MKNODAT = 33 + SYS_MKDIRAT = 34 + SYS_UNLINKAT = 35 + SYS_SYMLINKAT = 36 + SYS_LINKAT = 37 + SYS_RENAMEAT = 38 + SYS_UMOUNT2 = 39 + SYS_MOUNT = 40 + SYS_PIVOT_ROOT = 41 + SYS_NFSSERVCTL = 42 + SYS_STATFS = 43 + SYS_FSTATFS = 44 + SYS_TRUNCATE = 45 + SYS_FTRUNCATE = 46 + SYS_FALLOCATE = 47 + SYS_FACCESSAT = 48 + SYS_CHDIR = 49 + SYS_FCHDIR = 50 + SYS_CHROOT = 51 + SYS_FCHMOD = 52 + SYS_FCHMODAT = 53 + SYS_FCHOWNAT = 54 + SYS_FCHOWN = 55 + SYS_OPENAT = 56 + SYS_CLOSE = 57 + SYS_VHANGUP = 58 + SYS_PIPE2 = 59 + SYS_QUOTACTL = 60 + SYS_GETDENTS64 = 61 + SYS_LSEEK = 62 + SYS_READ = 63 + SYS_WRITE = 64 + SYS_READV = 65 + SYS_WRITEV = 66 + SYS_PREAD64 = 67 + SYS_PWRITE64 = 68 + SYS_PREADV = 69 + SYS_PWRITEV = 70 + SYS_SENDFILE = 71 + SYS_PSELECT6 = 72 + SYS_PPOLL = 73 + SYS_SIGNALFD4 = 74 + SYS_VMSPLICE = 75 + SYS_SPLICE = 76 + SYS_TEE = 77 + SYS_READLINKAT = 78 + SYS_FSTATAT = 79 + SYS_FSTAT = 80 + SYS_SYNC = 81 + SYS_FSYNC = 82 + SYS_FDATASYNC = 83 + SYS_SYNC_FILE_RANGE = 84 + SYS_TIMERFD_CREATE = 85 + SYS_TIMERFD_SETTIME = 86 + SYS_TIMERFD_GETTIME = 87 + SYS_UTIMENSAT = 88 + SYS_ACCT = 89 + SYS_CAPGET = 90 + SYS_CAPSET = 91 + SYS_PERSONALITY = 92 + SYS_EXIT = 93 + SYS_EXIT_GROUP = 94 + SYS_WAITID = 95 + SYS_SET_TID_ADDRESS = 96 + SYS_UNSHARE = 97 + SYS_FUTEX = 98 + SYS_SET_ROBUST_LIST = 99 + SYS_GET_ROBUST_LIST = 100 + SYS_NANOSLEEP = 101 + SYS_GETITIMER = 102 + SYS_SETITIMER = 103 + SYS_KEXEC_LOAD = 104 + SYS_INIT_MODULE = 105 + SYS_DELETE_MODULE = 106 + SYS_TIMER_CREATE = 107 + SYS_TIMER_GETTIME = 108 + SYS_TIMER_GETOVERRUN = 109 + SYS_TIMER_SETTIME = 110 + SYS_TIMER_DELETE = 111 + SYS_CLOCK_SETTIME = 112 + SYS_CLOCK_GETTIME = 113 + SYS_CLOCK_GETRES = 114 + SYS_CLOCK_NANOSLEEP = 115 + SYS_SYSLOG = 116 + SYS_PTRACE = 117 + SYS_SCHED_SETPARAM = 118 + SYS_SCHED_SETSCHEDULER = 119 + SYS_SCHED_GETSCHEDULER = 120 + SYS_SCHED_GETPARAM = 121 + SYS_SCHED_SETAFFINITY = 122 + SYS_SCHED_GETAFFINITY = 123 + SYS_SCHED_YIELD = 124 + SYS_SCHED_GET_PRIORITY_MAX = 125 + SYS_SCHED_GET_PRIORITY_MIN = 126 + SYS_SCHED_RR_GET_INTERVAL = 127 + SYS_RESTART_SYSCALL = 128 + SYS_KILL = 129 + SYS_TKILL = 130 + SYS_TGKILL = 131 + SYS_SIGALTSTACK = 132 + SYS_RT_SIGSUSPEND = 133 + SYS_RT_SIGACTION = 134 + SYS_RT_SIGPROCMASK = 135 + SYS_RT_SIGPENDING = 136 + SYS_RT_SIGTIMEDWAIT = 137 + SYS_RT_SIGQUEUEINFO = 138 + SYS_RT_SIGRETURN = 139 + SYS_SETPRIORITY = 140 + SYS_GETPRIORITY = 141 + SYS_REBOOT = 142 + SYS_SETREGID = 143 + SYS_SETGID = 144 + SYS_SETREUID = 145 + SYS_SETUID = 146 + SYS_SETRESUID = 147 + SYS_GETRESUID = 148 + SYS_SETRESGID = 149 + SYS_GETRESGID = 150 + SYS_SETFSUID = 151 + SYS_SETFSGID = 152 + SYS_TIMES = 153 + SYS_SETPGID = 154 + SYS_GETPGID = 155 + SYS_GETSID = 156 + SYS_SETSID = 157 + SYS_GETGROUPS = 158 + SYS_SETGROUPS = 159 + SYS_UNAME = 160 + SYS_SETHOSTNAME = 161 + SYS_SETDOMAINNAME = 162 + SYS_GETRLIMIT = 163 + SYS_SETRLIMIT = 164 + SYS_GETRUSAGE = 165 + SYS_UMASK = 166 + SYS_PRCTL = 167 + SYS_GETCPU = 168 + SYS_GETTIMEOFDAY = 169 + SYS_SETTIMEOFDAY = 170 + SYS_ADJTIMEX = 171 + SYS_GETPID = 172 + SYS_GETPPID = 173 + SYS_GETUID = 174 + SYS_GETEUID = 175 + SYS_GETGID = 176 + SYS_GETEGID = 177 + SYS_GETTID = 178 + SYS_SYSINFO = 179 + SYS_MQ_OPEN = 180 + SYS_MQ_UNLINK = 181 + SYS_MQ_TIMEDSEND = 182 + SYS_MQ_TIMEDRECEIVE = 183 + SYS_MQ_NOTIFY = 184 + SYS_MQ_GETSETATTR = 185 + SYS_MSGGET = 186 + SYS_MSGCTL = 187 + SYS_MSGRCV = 188 + SYS_MSGSND = 189 + SYS_SEMGET = 190 + SYS_SEMCTL = 191 + SYS_SEMTIMEDOP = 192 + SYS_SEMOP = 193 + SYS_SHMGET = 194 + SYS_SHMCTL = 195 + SYS_SHMAT = 196 + SYS_SHMDT = 197 + SYS_SOCKET = 198 + SYS_SOCKETPAIR = 199 + SYS_BIND = 200 + SYS_LISTEN = 201 + SYS_ACCEPT = 202 + SYS_CONNECT = 203 + SYS_GETSOCKNAME = 204 + SYS_GETPEERNAME = 205 + SYS_SENDTO = 206 + SYS_RECVFROM = 207 + SYS_SETSOCKOPT = 208 + SYS_GETSOCKOPT = 209 + SYS_SHUTDOWN = 210 + SYS_SENDMSG = 211 + SYS_RECVMSG = 212 + SYS_READAHEAD = 213 + SYS_BRK = 214 + SYS_MUNMAP = 215 + SYS_MREMAP = 216 + SYS_ADD_KEY = 217 + SYS_REQUEST_KEY = 218 + SYS_KEYCTL = 219 + SYS_CLONE = 220 + SYS_EXECVE = 221 + SYS_MMAP = 222 + SYS_FADVISE64 = 223 + SYS_SWAPON = 224 + SYS_SWAPOFF = 225 + SYS_MPROTECT = 226 + SYS_MSYNC = 227 + SYS_MLOCK = 228 + SYS_MUNLOCK = 229 + SYS_MLOCKALL = 230 + SYS_MUNLOCKALL = 231 + SYS_MINCORE = 232 + SYS_MADVISE = 233 + SYS_REMAP_FILE_PAGES = 234 + SYS_MBIND = 235 + SYS_GET_MEMPOLICY = 236 + SYS_SET_MEMPOLICY = 237 + SYS_MIGRATE_PAGES = 238 + SYS_MOVE_PAGES = 239 + SYS_RT_TGSIGQUEUEINFO = 240 + SYS_PERF_EVENT_OPEN = 241 + SYS_ACCEPT4 = 242 + SYS_RECVMMSG = 243 + SYS_ARCH_SPECIFIC_SYSCALL = 244 + SYS_WAIT4 = 260 + SYS_PRLIMIT64 = 261 + SYS_FANOTIFY_INIT = 262 + SYS_FANOTIFY_MARK = 263 + SYS_NAME_TO_HANDLE_AT = 264 + SYS_OPEN_BY_HANDLE_AT = 265 + SYS_CLOCK_ADJTIME = 266 + SYS_SYNCFS = 267 + SYS_SETNS = 268 + SYS_SENDMMSG = 269 + SYS_PROCESS_VM_READV = 270 + SYS_PROCESS_VM_WRITEV = 271 + SYS_KCMP = 272 + SYS_FINIT_MODULE = 273 + SYS_SCHED_SETATTR = 274 + SYS_SCHED_GETATTR = 275 + SYS_RENAMEAT2 = 276 + SYS_SECCOMP = 277 +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go new file mode 100644 index 0000000..e1b08f0 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go @@ -0,0 +1,360 @@ +// mksysnum_linux.pl /usr/include/asm/unistd.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build ppc64,linux + +package unix + +const ( + SYS_RESTART_SYSCALL = 0 + SYS_EXIT = 1 + SYS_FORK = 2 + SYS_READ = 3 + SYS_WRITE = 4 + SYS_OPEN = 5 + SYS_CLOSE = 6 + SYS_WAITPID = 7 + SYS_CREAT = 8 + SYS_LINK = 9 + SYS_UNLINK = 10 + SYS_EXECVE = 11 + SYS_CHDIR = 12 + SYS_TIME = 13 + SYS_MKNOD = 14 + SYS_CHMOD = 15 + SYS_LCHOWN = 16 + SYS_BREAK = 17 + SYS_OLDSTAT = 18 + SYS_LSEEK = 19 + SYS_GETPID = 20 + SYS_MOUNT = 21 + SYS_UMOUNT = 22 + SYS_SETUID = 23 + SYS_GETUID = 24 + SYS_STIME = 25 + SYS_PTRACE = 26 + SYS_ALARM = 27 + SYS_OLDFSTAT = 28 + SYS_PAUSE = 29 + SYS_UTIME = 30 + SYS_STTY = 31 + SYS_GTTY = 32 + SYS_ACCESS = 33 + SYS_NICE = 34 + SYS_FTIME = 35 + SYS_SYNC = 36 + SYS_KILL = 37 + SYS_RENAME = 38 + SYS_MKDIR = 39 + SYS_RMDIR = 40 + SYS_DUP = 41 + SYS_PIPE = 42 + SYS_TIMES = 43 + SYS_PROF = 44 + SYS_BRK = 45 + SYS_SETGID = 46 + SYS_GETGID = 47 + SYS_SIGNAL = 48 + SYS_GETEUID = 49 + SYS_GETEGID = 50 + SYS_ACCT = 51 + SYS_UMOUNT2 = 52 + SYS_LOCK = 53 + SYS_IOCTL = 54 + SYS_FCNTL = 55 + SYS_MPX = 56 + SYS_SETPGID = 57 + SYS_ULIMIT = 58 + SYS_OLDOLDUNAME = 59 + SYS_UMASK = 60 + SYS_CHROOT = 61 + SYS_USTAT = 62 + SYS_DUP2 = 63 + SYS_GETPPID = 64 + SYS_GETPGRP = 65 + SYS_SETSID = 66 + SYS_SIGACTION = 67 + SYS_SGETMASK = 68 + SYS_SSETMASK = 69 + SYS_SETREUID = 70 + SYS_SETREGID = 71 + SYS_SIGSUSPEND = 72 + SYS_SIGPENDING = 73 + SYS_SETHOSTNAME = 74 + SYS_SETRLIMIT = 75 + SYS_GETRLIMIT = 76 + SYS_GETRUSAGE = 77 + SYS_GETTIMEOFDAY = 78 + SYS_SETTIMEOFDAY = 79 + SYS_GETGROUPS = 80 + SYS_SETGROUPS = 81 + SYS_SELECT = 82 + SYS_SYMLINK = 83 + SYS_OLDLSTAT = 84 + SYS_READLINK = 85 + SYS_USELIB = 86 + SYS_SWAPON = 87 + SYS_REBOOT = 88 + SYS_READDIR = 89 + SYS_MMAP = 90 + SYS_MUNMAP = 91 + SYS_TRUNCATE = 92 + SYS_FTRUNCATE = 93 + SYS_FCHMOD = 94 + SYS_FCHOWN = 95 + SYS_GETPRIORITY = 96 + SYS_SETPRIORITY = 97 + SYS_PROFIL = 98 + SYS_STATFS = 99 + SYS_FSTATFS = 100 + SYS_IOPERM = 101 + SYS_SOCKETCALL = 102 + SYS_SYSLOG = 103 + SYS_SETITIMER = 104 + SYS_GETITIMER = 105 + SYS_STAT = 106 + SYS_LSTAT = 107 + SYS_FSTAT = 108 + SYS_OLDUNAME = 109 + SYS_IOPL = 110 + SYS_VHANGUP = 111 + SYS_IDLE = 112 + SYS_VM86 = 113 + SYS_WAIT4 = 114 + SYS_SWAPOFF = 115 + SYS_SYSINFO = 116 + SYS_IPC = 117 + SYS_FSYNC = 118 + SYS_SIGRETURN = 119 + SYS_CLONE = 120 + SYS_SETDOMAINNAME = 121 + SYS_UNAME = 122 + SYS_MODIFY_LDT = 123 + SYS_ADJTIMEX = 124 + SYS_MPROTECT = 125 + SYS_SIGPROCMASK = 126 + SYS_CREATE_MODULE = 127 + SYS_INIT_MODULE = 128 + SYS_DELETE_MODULE = 129 + SYS_GET_KERNEL_SYMS = 130 + SYS_QUOTACTL = 131 + SYS_GETPGID = 132 + SYS_FCHDIR = 133 + SYS_BDFLUSH = 134 + SYS_SYSFS = 135 + SYS_PERSONALITY = 136 + SYS_AFS_SYSCALL = 137 + SYS_SETFSUID = 138 + SYS_SETFSGID = 139 + SYS__LLSEEK = 140 + SYS_GETDENTS = 141 + SYS__NEWSELECT = 142 + SYS_FLOCK = 143 + SYS_MSYNC = 144 + SYS_READV = 145 + SYS_WRITEV = 146 + SYS_GETSID = 147 + SYS_FDATASYNC = 148 + SYS__SYSCTL = 149 + SYS_MLOCK = 150 + SYS_MUNLOCK = 151 + SYS_MLOCKALL = 152 + SYS_MUNLOCKALL = 153 + SYS_SCHED_SETPARAM = 154 + SYS_SCHED_GETPARAM = 155 + SYS_SCHED_SETSCHEDULER = 156 + SYS_SCHED_GETSCHEDULER = 157 + SYS_SCHED_YIELD = 158 + SYS_SCHED_GET_PRIORITY_MAX = 159 + SYS_SCHED_GET_PRIORITY_MIN = 160 + SYS_SCHED_RR_GET_INTERVAL = 161 + SYS_NANOSLEEP = 162 + SYS_MREMAP = 163 + SYS_SETRESUID = 164 + SYS_GETRESUID = 165 + SYS_QUERY_MODULE = 166 + SYS_POLL = 167 + SYS_NFSSERVCTL = 168 + SYS_SETRESGID = 169 + SYS_GETRESGID = 170 + SYS_PRCTL = 171 + SYS_RT_SIGRETURN = 172 + SYS_RT_SIGACTION = 173 + SYS_RT_SIGPROCMASK = 174 + SYS_RT_SIGPENDING = 175 + SYS_RT_SIGTIMEDWAIT = 176 + SYS_RT_SIGQUEUEINFO = 177 + SYS_RT_SIGSUSPEND = 178 + SYS_PREAD64 = 179 + SYS_PWRITE64 = 180 + SYS_CHOWN = 181 + SYS_GETCWD = 182 + SYS_CAPGET = 183 + SYS_CAPSET = 184 + SYS_SIGALTSTACK = 185 + SYS_SENDFILE = 186 + SYS_GETPMSG = 187 + SYS_PUTPMSG = 188 + SYS_VFORK = 189 + SYS_UGETRLIMIT = 190 + SYS_READAHEAD = 191 + SYS_PCICONFIG_READ = 198 + SYS_PCICONFIG_WRITE = 199 + SYS_PCICONFIG_IOBASE = 200 + SYS_MULTIPLEXER = 201 + SYS_GETDENTS64 = 202 + SYS_PIVOT_ROOT = 203 + SYS_MADVISE = 205 + SYS_MINCORE = 206 + SYS_GETTID = 207 + SYS_TKILL = 208 + SYS_SETXATTR = 209 + SYS_LSETXATTR = 210 + SYS_FSETXATTR = 211 + SYS_GETXATTR = 212 + SYS_LGETXATTR = 213 + SYS_FGETXATTR = 214 + SYS_LISTXATTR = 215 + SYS_LLISTXATTR = 216 + SYS_FLISTXATTR = 217 + SYS_REMOVEXATTR = 218 + SYS_LREMOVEXATTR = 219 + SYS_FREMOVEXATTR = 220 + SYS_FUTEX = 221 + SYS_SCHED_SETAFFINITY = 222 + SYS_SCHED_GETAFFINITY = 223 + SYS_TUXCALL = 225 + SYS_IO_SETUP = 227 + SYS_IO_DESTROY = 228 + SYS_IO_GETEVENTS = 229 + SYS_IO_SUBMIT = 230 + SYS_IO_CANCEL = 231 + SYS_SET_TID_ADDRESS = 232 + SYS_FADVISE64 = 233 + SYS_EXIT_GROUP = 234 + SYS_LOOKUP_DCOOKIE = 235 + SYS_EPOLL_CREATE = 236 + SYS_EPOLL_CTL = 237 + SYS_EPOLL_WAIT = 238 + SYS_REMAP_FILE_PAGES = 239 + SYS_TIMER_CREATE = 240 + SYS_TIMER_SETTIME = 241 + SYS_TIMER_GETTIME = 242 + SYS_TIMER_GETOVERRUN = 243 + SYS_TIMER_DELETE = 244 + SYS_CLOCK_SETTIME = 245 + SYS_CLOCK_GETTIME = 246 + SYS_CLOCK_GETRES = 247 + SYS_CLOCK_NANOSLEEP = 248 + SYS_SWAPCONTEXT = 249 + SYS_TGKILL = 250 + SYS_UTIMES = 251 + SYS_STATFS64 = 252 + SYS_FSTATFS64 = 253 + SYS_RTAS = 255 + SYS_SYS_DEBUG_SETCONTEXT = 256 + SYS_MIGRATE_PAGES = 258 + SYS_MBIND = 259 + SYS_GET_MEMPOLICY = 260 + SYS_SET_MEMPOLICY = 261 + SYS_MQ_OPEN = 262 + SYS_MQ_UNLINK = 263 + SYS_MQ_TIMEDSEND = 264 + SYS_MQ_TIMEDRECEIVE = 265 + SYS_MQ_NOTIFY = 266 + SYS_MQ_GETSETATTR = 267 + SYS_KEXEC_LOAD = 268 + SYS_ADD_KEY = 269 + SYS_REQUEST_KEY = 270 + SYS_KEYCTL = 271 + SYS_WAITID = 272 + SYS_IOPRIO_SET = 273 + SYS_IOPRIO_GET = 274 + SYS_INOTIFY_INIT = 275 + SYS_INOTIFY_ADD_WATCH = 276 + SYS_INOTIFY_RM_WATCH = 277 + SYS_SPU_RUN = 278 + SYS_SPU_CREATE = 279 + SYS_PSELECT6 = 280 + SYS_PPOLL = 281 + SYS_UNSHARE = 282 + SYS_SPLICE = 283 + SYS_TEE = 284 + SYS_VMSPLICE = 285 + SYS_OPENAT = 286 + SYS_MKDIRAT = 287 + SYS_MKNODAT = 288 + SYS_FCHOWNAT = 289 + SYS_FUTIMESAT = 290 + SYS_NEWFSTATAT = 291 + SYS_UNLINKAT = 292 + SYS_RENAMEAT = 293 + SYS_LINKAT = 294 + SYS_SYMLINKAT = 295 + SYS_READLINKAT = 296 + SYS_FCHMODAT = 297 + SYS_FACCESSAT = 298 + SYS_GET_ROBUST_LIST = 299 + SYS_SET_ROBUST_LIST = 300 + SYS_MOVE_PAGES = 301 + SYS_GETCPU = 302 + SYS_EPOLL_PWAIT = 303 + SYS_UTIMENSAT = 304 + SYS_SIGNALFD = 305 + SYS_TIMERFD_CREATE = 306 + SYS_EVENTFD = 307 + SYS_SYNC_FILE_RANGE2 = 308 + SYS_FALLOCATE = 309 + SYS_SUBPAGE_PROT = 310 + SYS_TIMERFD_SETTIME = 311 + SYS_TIMERFD_GETTIME = 312 + SYS_SIGNALFD4 = 313 + SYS_EVENTFD2 = 314 + SYS_EPOLL_CREATE1 = 315 + SYS_DUP3 = 316 + SYS_PIPE2 = 317 + SYS_INOTIFY_INIT1 = 318 + SYS_PERF_EVENT_OPEN = 319 + SYS_PREADV = 320 + SYS_PWRITEV = 321 + SYS_RT_TGSIGQUEUEINFO = 322 + SYS_FANOTIFY_INIT = 323 + SYS_FANOTIFY_MARK = 324 + SYS_PRLIMIT64 = 325 + SYS_SOCKET = 326 + SYS_BIND = 327 + SYS_CONNECT = 328 + SYS_LISTEN = 329 + SYS_ACCEPT = 330 + SYS_GETSOCKNAME = 331 + SYS_GETPEERNAME = 332 + SYS_SOCKETPAIR = 333 + SYS_SEND = 334 + SYS_SENDTO = 335 + SYS_RECV = 336 + SYS_RECVFROM = 337 + SYS_SHUTDOWN = 338 + SYS_SETSOCKOPT = 339 + SYS_GETSOCKOPT = 340 + SYS_SENDMSG = 341 + SYS_RECVMSG = 342 + SYS_RECVMMSG = 343 + SYS_ACCEPT4 = 344 + SYS_NAME_TO_HANDLE_AT = 345 + SYS_OPEN_BY_HANDLE_AT = 346 + SYS_CLOCK_ADJTIME = 347 + SYS_SYNCFS = 348 + SYS_SENDMMSG = 349 + SYS_SETNS = 350 + SYS_PROCESS_VM_READV = 351 + SYS_PROCESS_VM_WRITEV = 352 + SYS_FINIT_MODULE = 353 + SYS_KCMP = 354 + SYS_SCHED_SETATTR = 355 + SYS_SCHED_GETATTR = 356 + SYS_RENAMEAT2 = 357 + SYS_SECCOMP = 358 + SYS_GETRANDOM = 359 + SYS_MEMFD_CREATE = 360 + SYS_BPF = 361 +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go new file mode 100644 index 0000000..45e63f5 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go @@ -0,0 +1,353 @@ +// mksysnum_linux.pl /usr/include/powerpc64le-linux-gnu/asm/unistd.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build ppc64le,linux + +package unix + +const ( + SYS_RESTART_SYSCALL = 0 + SYS_EXIT = 1 + SYS_FORK = 2 + SYS_READ = 3 + SYS_WRITE = 4 + SYS_OPEN = 5 + SYS_CLOSE = 6 + SYS_WAITPID = 7 + SYS_CREAT = 8 + SYS_LINK = 9 + SYS_UNLINK = 10 + SYS_EXECVE = 11 + SYS_CHDIR = 12 + SYS_TIME = 13 + SYS_MKNOD = 14 + SYS_CHMOD = 15 + SYS_LCHOWN = 16 + SYS_BREAK = 17 + SYS_OLDSTAT = 18 + SYS_LSEEK = 19 + SYS_GETPID = 20 + SYS_MOUNT = 21 + SYS_UMOUNT = 22 + SYS_SETUID = 23 + SYS_GETUID = 24 + SYS_STIME = 25 + SYS_PTRACE = 26 + SYS_ALARM = 27 + SYS_OLDFSTAT = 28 + SYS_PAUSE = 29 + SYS_UTIME = 30 + SYS_STTY = 31 + SYS_GTTY = 32 + SYS_ACCESS = 33 + SYS_NICE = 34 + SYS_FTIME = 35 + SYS_SYNC = 36 + SYS_KILL = 37 + SYS_RENAME = 38 + SYS_MKDIR = 39 + SYS_RMDIR = 40 + SYS_DUP = 41 + SYS_PIPE = 42 + SYS_TIMES = 43 + SYS_PROF = 44 + SYS_BRK = 45 + SYS_SETGID = 46 + SYS_GETGID = 47 + SYS_SIGNAL = 48 + SYS_GETEUID = 49 + SYS_GETEGID = 50 + SYS_ACCT = 51 + SYS_UMOUNT2 = 52 + SYS_LOCK = 53 + SYS_IOCTL = 54 + SYS_FCNTL = 55 + SYS_MPX = 56 + SYS_SETPGID = 57 + SYS_ULIMIT = 58 + SYS_OLDOLDUNAME = 59 + SYS_UMASK = 60 + SYS_CHROOT = 61 + SYS_USTAT = 62 + SYS_DUP2 = 63 + SYS_GETPPID = 64 + SYS_GETPGRP = 65 + SYS_SETSID = 66 + SYS_SIGACTION = 67 + SYS_SGETMASK = 68 + SYS_SSETMASK = 69 + SYS_SETREUID = 70 + SYS_SETREGID = 71 + SYS_SIGSUSPEND = 72 + SYS_SIGPENDING = 73 + SYS_SETHOSTNAME = 74 + SYS_SETRLIMIT = 75 + SYS_GETRLIMIT = 76 + SYS_GETRUSAGE = 77 + SYS_GETTIMEOFDAY = 78 + SYS_SETTIMEOFDAY = 79 + SYS_GETGROUPS = 80 + SYS_SETGROUPS = 81 + SYS_SELECT = 82 + SYS_SYMLINK = 83 + SYS_OLDLSTAT = 84 + SYS_READLINK = 85 + SYS_USELIB = 86 + SYS_SWAPON = 87 + SYS_REBOOT = 88 + SYS_READDIR = 89 + SYS_MMAP = 90 + SYS_MUNMAP = 91 + SYS_TRUNCATE = 92 + SYS_FTRUNCATE = 93 + SYS_FCHMOD = 94 + SYS_FCHOWN = 95 + SYS_GETPRIORITY = 96 + SYS_SETPRIORITY = 97 + SYS_PROFIL = 98 + SYS_STATFS = 99 + SYS_FSTATFS = 100 + SYS_IOPERM = 101 + SYS_SOCKETCALL = 102 + SYS_SYSLOG = 103 + SYS_SETITIMER = 104 + SYS_GETITIMER = 105 + SYS_STAT = 106 + SYS_LSTAT = 107 + SYS_FSTAT = 108 + SYS_OLDUNAME = 109 + SYS_IOPL = 110 + SYS_VHANGUP = 111 + SYS_IDLE = 112 + SYS_VM86 = 113 + SYS_WAIT4 = 114 + SYS_SWAPOFF = 115 + SYS_SYSINFO = 116 + SYS_IPC = 117 + SYS_FSYNC = 118 + SYS_SIGRETURN = 119 + SYS_CLONE = 120 + SYS_SETDOMAINNAME = 121 + SYS_UNAME = 122 + SYS_MODIFY_LDT = 123 + SYS_ADJTIMEX = 124 + SYS_MPROTECT = 125 + SYS_SIGPROCMASK = 126 + SYS_CREATE_MODULE = 127 + SYS_INIT_MODULE = 128 + SYS_DELETE_MODULE = 129 + SYS_GET_KERNEL_SYMS = 130 + SYS_QUOTACTL = 131 + SYS_GETPGID = 132 + SYS_FCHDIR = 133 + SYS_BDFLUSH = 134 + SYS_SYSFS = 135 + SYS_PERSONALITY = 136 + SYS_AFS_SYSCALL = 137 + SYS_SETFSUID = 138 + SYS_SETFSGID = 139 + SYS__LLSEEK = 140 + SYS_GETDENTS = 141 + SYS__NEWSELECT = 142 + SYS_FLOCK = 143 + SYS_MSYNC = 144 + SYS_READV = 145 + SYS_WRITEV = 146 + SYS_GETSID = 147 + SYS_FDATASYNC = 148 + SYS__SYSCTL = 149 + SYS_MLOCK = 150 + SYS_MUNLOCK = 151 + SYS_MLOCKALL = 152 + SYS_MUNLOCKALL = 153 + SYS_SCHED_SETPARAM = 154 + SYS_SCHED_GETPARAM = 155 + SYS_SCHED_SETSCHEDULER = 156 + SYS_SCHED_GETSCHEDULER = 157 + SYS_SCHED_YIELD = 158 + SYS_SCHED_GET_PRIORITY_MAX = 159 + SYS_SCHED_GET_PRIORITY_MIN = 160 + SYS_SCHED_RR_GET_INTERVAL = 161 + SYS_NANOSLEEP = 162 + SYS_MREMAP = 163 + SYS_SETRESUID = 164 + SYS_GETRESUID = 165 + SYS_QUERY_MODULE = 166 + SYS_POLL = 167 + SYS_NFSSERVCTL = 168 + SYS_SETRESGID = 169 + SYS_GETRESGID = 170 + SYS_PRCTL = 171 + SYS_RT_SIGRETURN = 172 + SYS_RT_SIGACTION = 173 + SYS_RT_SIGPROCMASK = 174 + SYS_RT_SIGPENDING = 175 + SYS_RT_SIGTIMEDWAIT = 176 + SYS_RT_SIGQUEUEINFO = 177 + SYS_RT_SIGSUSPEND = 178 + SYS_PREAD64 = 179 + SYS_PWRITE64 = 180 + SYS_CHOWN = 181 + SYS_GETCWD = 182 + SYS_CAPGET = 183 + SYS_CAPSET = 184 + SYS_SIGALTSTACK = 185 + SYS_SENDFILE = 186 + SYS_GETPMSG = 187 + SYS_PUTPMSG = 188 + SYS_VFORK = 189 + SYS_UGETRLIMIT = 190 + SYS_READAHEAD = 191 + SYS_PCICONFIG_READ = 198 + SYS_PCICONFIG_WRITE = 199 + SYS_PCICONFIG_IOBASE = 200 + SYS_MULTIPLEXER = 201 + SYS_GETDENTS64 = 202 + SYS_PIVOT_ROOT = 203 + SYS_MADVISE = 205 + SYS_MINCORE = 206 + SYS_GETTID = 207 + SYS_TKILL = 208 + SYS_SETXATTR = 209 + SYS_LSETXATTR = 210 + SYS_FSETXATTR = 211 + SYS_GETXATTR = 212 + SYS_LGETXATTR = 213 + SYS_FGETXATTR = 214 + SYS_LISTXATTR = 215 + SYS_LLISTXATTR = 216 + SYS_FLISTXATTR = 217 + SYS_REMOVEXATTR = 218 + SYS_LREMOVEXATTR = 219 + SYS_FREMOVEXATTR = 220 + SYS_FUTEX = 221 + SYS_SCHED_SETAFFINITY = 222 + SYS_SCHED_GETAFFINITY = 223 + SYS_TUXCALL = 225 + SYS_IO_SETUP = 227 + SYS_IO_DESTROY = 228 + SYS_IO_GETEVENTS = 229 + SYS_IO_SUBMIT = 230 + SYS_IO_CANCEL = 231 + SYS_SET_TID_ADDRESS = 232 + SYS_FADVISE64 = 233 + SYS_EXIT_GROUP = 234 + SYS_LOOKUP_DCOOKIE = 235 + SYS_EPOLL_CREATE = 236 + SYS_EPOLL_CTL = 237 + SYS_EPOLL_WAIT = 238 + SYS_REMAP_FILE_PAGES = 239 + SYS_TIMER_CREATE = 240 + SYS_TIMER_SETTIME = 241 + SYS_TIMER_GETTIME = 242 + SYS_TIMER_GETOVERRUN = 243 + SYS_TIMER_DELETE = 244 + SYS_CLOCK_SETTIME = 245 + SYS_CLOCK_GETTIME = 246 + SYS_CLOCK_GETRES = 247 + SYS_CLOCK_NANOSLEEP = 248 + SYS_SWAPCONTEXT = 249 + SYS_TGKILL = 250 + SYS_UTIMES = 251 + SYS_STATFS64 = 252 + SYS_FSTATFS64 = 253 + SYS_RTAS = 255 + SYS_SYS_DEBUG_SETCONTEXT = 256 + SYS_MIGRATE_PAGES = 258 + SYS_MBIND = 259 + SYS_GET_MEMPOLICY = 260 + SYS_SET_MEMPOLICY = 261 + SYS_MQ_OPEN = 262 + SYS_MQ_UNLINK = 263 + SYS_MQ_TIMEDSEND = 264 + SYS_MQ_TIMEDRECEIVE = 265 + SYS_MQ_NOTIFY = 266 + SYS_MQ_GETSETATTR = 267 + SYS_KEXEC_LOAD = 268 + SYS_ADD_KEY = 269 + SYS_REQUEST_KEY = 270 + SYS_KEYCTL = 271 + SYS_WAITID = 272 + SYS_IOPRIO_SET = 273 + SYS_IOPRIO_GET = 274 + SYS_INOTIFY_INIT = 275 + SYS_INOTIFY_ADD_WATCH = 276 + SYS_INOTIFY_RM_WATCH = 277 + SYS_SPU_RUN = 278 + SYS_SPU_CREATE = 279 + SYS_PSELECT6 = 280 + SYS_PPOLL = 281 + SYS_UNSHARE = 282 + SYS_SPLICE = 283 + SYS_TEE = 284 + SYS_VMSPLICE = 285 + SYS_OPENAT = 286 + SYS_MKDIRAT = 287 + SYS_MKNODAT = 288 + SYS_FCHOWNAT = 289 + SYS_FUTIMESAT = 290 + SYS_NEWFSTATAT = 291 + SYS_UNLINKAT = 292 + SYS_RENAMEAT = 293 + SYS_LINKAT = 294 + SYS_SYMLINKAT = 295 + SYS_READLINKAT = 296 + SYS_FCHMODAT = 297 + SYS_FACCESSAT = 298 + SYS_GET_ROBUST_LIST = 299 + SYS_SET_ROBUST_LIST = 300 + SYS_MOVE_PAGES = 301 + SYS_GETCPU = 302 + SYS_EPOLL_PWAIT = 303 + SYS_UTIMENSAT = 304 + SYS_SIGNALFD = 305 + SYS_TIMERFD_CREATE = 306 + SYS_EVENTFD = 307 + SYS_SYNC_FILE_RANGE2 = 308 + SYS_FALLOCATE = 309 + SYS_SUBPAGE_PROT = 310 + SYS_TIMERFD_SETTIME = 311 + SYS_TIMERFD_GETTIME = 312 + SYS_SIGNALFD4 = 313 + SYS_EVENTFD2 = 314 + SYS_EPOLL_CREATE1 = 315 + SYS_DUP3 = 316 + SYS_PIPE2 = 317 + SYS_INOTIFY_INIT1 = 318 + SYS_PERF_EVENT_OPEN = 319 + SYS_PREADV = 320 + SYS_PWRITEV = 321 + SYS_RT_TGSIGQUEUEINFO = 322 + SYS_FANOTIFY_INIT = 323 + SYS_FANOTIFY_MARK = 324 + SYS_PRLIMIT64 = 325 + SYS_SOCKET = 326 + SYS_BIND = 327 + SYS_CONNECT = 328 + SYS_LISTEN = 329 + SYS_ACCEPT = 330 + SYS_GETSOCKNAME = 331 + SYS_GETPEERNAME = 332 + SYS_SOCKETPAIR = 333 + SYS_SEND = 334 + SYS_SENDTO = 335 + SYS_RECV = 336 + SYS_RECVFROM = 337 + SYS_SHUTDOWN = 338 + SYS_SETSOCKOPT = 339 + SYS_GETSOCKOPT = 340 + SYS_SENDMSG = 341 + SYS_RECVMSG = 342 + SYS_RECVMMSG = 343 + SYS_ACCEPT4 = 344 + SYS_NAME_TO_HANDLE_AT = 345 + SYS_OPEN_BY_HANDLE_AT = 346 + SYS_CLOCK_ADJTIME = 347 + SYS_SYNCFS = 348 + SYS_SENDMMSG = 349 + SYS_SETNS = 350 + SYS_PROCESS_VM_READV = 351 + SYS_PROCESS_VM_WRITEV = 352 + SYS_FINIT_MODULE = 353 + SYS_KCMP = 354 +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go new file mode 100644 index 0000000..f60d8f9 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go @@ -0,0 +1,273 @@ +// mksysnum_netbsd.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build 386,netbsd + +package unix + +const ( + SYS_EXIT = 1 // { void|sys||exit(int rval); } + SYS_FORK = 2 // { int|sys||fork(void); } + SYS_READ = 3 // { ssize_t|sys||read(int fd, void *buf, size_t nbyte); } + SYS_WRITE = 4 // { ssize_t|sys||write(int fd, const void *buf, size_t nbyte); } + SYS_OPEN = 5 // { int|sys||open(const char *path, int flags, ... mode_t mode); } + SYS_CLOSE = 6 // { int|sys||close(int fd); } + SYS_LINK = 9 // { int|sys||link(const char *path, const char *link); } + SYS_UNLINK = 10 // { int|sys||unlink(const char *path); } + SYS_CHDIR = 12 // { int|sys||chdir(const char *path); } + SYS_FCHDIR = 13 // { int|sys||fchdir(int fd); } + SYS_CHMOD = 15 // { int|sys||chmod(const char *path, mode_t mode); } + SYS_CHOWN = 16 // { int|sys||chown(const char *path, uid_t uid, gid_t gid); } + SYS_BREAK = 17 // { int|sys||obreak(char *nsize); } + SYS_GETPID = 20 // { pid_t|sys||getpid_with_ppid(void); } + SYS_UNMOUNT = 22 // { int|sys||unmount(const char *path, int flags); } + SYS_SETUID = 23 // { int|sys||setuid(uid_t uid); } + SYS_GETUID = 24 // { uid_t|sys||getuid_with_euid(void); } + SYS_GETEUID = 25 // { uid_t|sys||geteuid(void); } + SYS_PTRACE = 26 // { int|sys||ptrace(int req, pid_t pid, void *addr, int data); } + SYS_RECVMSG = 27 // { ssize_t|sys||recvmsg(int s, struct msghdr *msg, int flags); } + SYS_SENDMSG = 28 // { ssize_t|sys||sendmsg(int s, const struct msghdr *msg, int flags); } + SYS_RECVFROM = 29 // { ssize_t|sys||recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); } + SYS_ACCEPT = 30 // { int|sys||accept(int s, struct sockaddr *name, socklen_t *anamelen); } + SYS_GETPEERNAME = 31 // { int|sys||getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); } + SYS_GETSOCKNAME = 32 // { int|sys||getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); } + SYS_ACCESS = 33 // { int|sys||access(const char *path, int flags); } + SYS_CHFLAGS = 34 // { int|sys||chflags(const char *path, u_long flags); } + SYS_FCHFLAGS = 35 // { int|sys||fchflags(int fd, u_long flags); } + SYS_SYNC = 36 // { void|sys||sync(void); } + SYS_KILL = 37 // { int|sys||kill(pid_t pid, int signum); } + SYS_GETPPID = 39 // { pid_t|sys||getppid(void); } + SYS_DUP = 41 // { int|sys||dup(int fd); } + SYS_PIPE = 42 // { int|sys||pipe(void); } + SYS_GETEGID = 43 // { gid_t|sys||getegid(void); } + SYS_PROFIL = 44 // { int|sys||profil(char *samples, size_t size, u_long offset, u_int scale); } + SYS_KTRACE = 45 // { int|sys||ktrace(const char *fname, int ops, int facs, pid_t pid); } + SYS_GETGID = 47 // { gid_t|sys||getgid_with_egid(void); } + SYS___GETLOGIN = 49 // { int|sys||__getlogin(char *namebuf, size_t namelen); } + SYS___SETLOGIN = 50 // { int|sys||__setlogin(const char *namebuf); } + SYS_ACCT = 51 // { int|sys||acct(const char *path); } + SYS_IOCTL = 54 // { int|sys||ioctl(int fd, u_long com, ... void *data); } + SYS_REVOKE = 56 // { int|sys||revoke(const char *path); } + SYS_SYMLINK = 57 // { int|sys||symlink(const char *path, const char *link); } + SYS_READLINK = 58 // { ssize_t|sys||readlink(const char *path, char *buf, size_t count); } + SYS_EXECVE = 59 // { int|sys||execve(const char *path, char * const *argp, char * const *envp); } + SYS_UMASK = 60 // { mode_t|sys||umask(mode_t newmask); } + SYS_CHROOT = 61 // { int|sys||chroot(const char *path); } + SYS_VFORK = 66 // { int|sys||vfork(void); } + SYS_SBRK = 69 // { int|sys||sbrk(intptr_t incr); } + SYS_SSTK = 70 // { int|sys||sstk(int incr); } + SYS_VADVISE = 72 // { int|sys||ovadvise(int anom); } + SYS_MUNMAP = 73 // { int|sys||munmap(void *addr, size_t len); } + SYS_MPROTECT = 74 // { int|sys||mprotect(void *addr, size_t len, int prot); } + SYS_MADVISE = 75 // { int|sys||madvise(void *addr, size_t len, int behav); } + SYS_MINCORE = 78 // { int|sys||mincore(void *addr, size_t len, char *vec); } + SYS_GETGROUPS = 79 // { int|sys||getgroups(int gidsetsize, gid_t *gidset); } + SYS_SETGROUPS = 80 // { int|sys||setgroups(int gidsetsize, const gid_t *gidset); } + SYS_GETPGRP = 81 // { int|sys||getpgrp(void); } + SYS_SETPGID = 82 // { int|sys||setpgid(pid_t pid, pid_t pgid); } + SYS_DUP2 = 90 // { int|sys||dup2(int from, int to); } + SYS_FCNTL = 92 // { int|sys||fcntl(int fd, int cmd, ... void *arg); } + SYS_FSYNC = 95 // { int|sys||fsync(int fd); } + SYS_SETPRIORITY = 96 // { int|sys||setpriority(int which, id_t who, int prio); } + SYS_CONNECT = 98 // { int|sys||connect(int s, const struct sockaddr *name, socklen_t namelen); } + SYS_GETPRIORITY = 100 // { int|sys||getpriority(int which, id_t who); } + SYS_BIND = 104 // { int|sys||bind(int s, const struct sockaddr *name, socklen_t namelen); } + SYS_SETSOCKOPT = 105 // { int|sys||setsockopt(int s, int level, int name, const void *val, socklen_t valsize); } + SYS_LISTEN = 106 // { int|sys||listen(int s, int backlog); } + SYS_GETSOCKOPT = 118 // { int|sys||getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); } + SYS_READV = 120 // { ssize_t|sys||readv(int fd, const struct iovec *iovp, int iovcnt); } + SYS_WRITEV = 121 // { ssize_t|sys||writev(int fd, const struct iovec *iovp, int iovcnt); } + SYS_FCHOWN = 123 // { int|sys||fchown(int fd, uid_t uid, gid_t gid); } + SYS_FCHMOD = 124 // { int|sys||fchmod(int fd, mode_t mode); } + SYS_SETREUID = 126 // { int|sys||setreuid(uid_t ruid, uid_t euid); } + SYS_SETREGID = 127 // { int|sys||setregid(gid_t rgid, gid_t egid); } + SYS_RENAME = 128 // { int|sys||rename(const char *from, const char *to); } + SYS_FLOCK = 131 // { int|sys||flock(int fd, int how); } + SYS_MKFIFO = 132 // { int|sys||mkfifo(const char *path, mode_t mode); } + SYS_SENDTO = 133 // { ssize_t|sys||sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); } + SYS_SHUTDOWN = 134 // { int|sys||shutdown(int s, int how); } + SYS_SOCKETPAIR = 135 // { int|sys||socketpair(int domain, int type, int protocol, int *rsv); } + SYS_MKDIR = 136 // { int|sys||mkdir(const char *path, mode_t mode); } + SYS_RMDIR = 137 // { int|sys||rmdir(const char *path); } + SYS_SETSID = 147 // { int|sys||setsid(void); } + SYS_SYSARCH = 165 // { int|sys||sysarch(int op, void *parms); } + SYS_PREAD = 173 // { ssize_t|sys||pread(int fd, void *buf, size_t nbyte, int PAD, off_t offset); } + SYS_PWRITE = 174 // { ssize_t|sys||pwrite(int fd, const void *buf, size_t nbyte, int PAD, off_t offset); } + SYS_NTP_ADJTIME = 176 // { int|sys||ntp_adjtime(struct timex *tp); } + SYS_SETGID = 181 // { int|sys||setgid(gid_t gid); } + SYS_SETEGID = 182 // { int|sys||setegid(gid_t egid); } + SYS_SETEUID = 183 // { int|sys||seteuid(uid_t euid); } + SYS_PATHCONF = 191 // { long|sys||pathconf(const char *path, int name); } + SYS_FPATHCONF = 192 // { long|sys||fpathconf(int fd, int name); } + SYS_GETRLIMIT = 194 // { int|sys||getrlimit(int which, struct rlimit *rlp); } + SYS_SETRLIMIT = 195 // { int|sys||setrlimit(int which, const struct rlimit *rlp); } + SYS_MMAP = 197 // { void *|sys||mmap(void *addr, size_t len, int prot, int flags, int fd, long PAD, off_t pos); } + SYS_LSEEK = 199 // { off_t|sys||lseek(int fd, int PAD, off_t offset, int whence); } + SYS_TRUNCATE = 200 // { int|sys||truncate(const char *path, int PAD, off_t length); } + SYS_FTRUNCATE = 201 // { int|sys||ftruncate(int fd, int PAD, off_t length); } + SYS___SYSCTL = 202 // { int|sys||__sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, const void *new, size_t newlen); } + SYS_MLOCK = 203 // { int|sys||mlock(const void *addr, size_t len); } + SYS_MUNLOCK = 204 // { int|sys||munlock(const void *addr, size_t len); } + SYS_UNDELETE = 205 // { int|sys||undelete(const char *path); } + SYS_GETPGID = 207 // { pid_t|sys||getpgid(pid_t pid); } + SYS_REBOOT = 208 // { int|sys||reboot(int opt, char *bootstr); } + SYS_POLL = 209 // { int|sys||poll(struct pollfd *fds, u_int nfds, int timeout); } + SYS_SEMGET = 221 // { int|sys||semget(key_t key, int nsems, int semflg); } + SYS_SEMOP = 222 // { int|sys||semop(int semid, struct sembuf *sops, size_t nsops); } + SYS_SEMCONFIG = 223 // { int|sys||semconfig(int flag); } + SYS_MSGGET = 225 // { int|sys||msgget(key_t key, int msgflg); } + SYS_MSGSND = 226 // { int|sys||msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); } + SYS_MSGRCV = 227 // { ssize_t|sys||msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); } + SYS_SHMAT = 228 // { void *|sys||shmat(int shmid, const void *shmaddr, int shmflg); } + SYS_SHMDT = 230 // { int|sys||shmdt(const void *shmaddr); } + SYS_SHMGET = 231 // { int|sys||shmget(key_t key, size_t size, int shmflg); } + SYS_TIMER_CREATE = 235 // { int|sys||timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid); } + SYS_TIMER_DELETE = 236 // { int|sys||timer_delete(timer_t timerid); } + SYS_TIMER_GETOVERRUN = 239 // { int|sys||timer_getoverrun(timer_t timerid); } + SYS_FDATASYNC = 241 // { int|sys||fdatasync(int fd); } + SYS_MLOCKALL = 242 // { int|sys||mlockall(int flags); } + SYS_MUNLOCKALL = 243 // { int|sys||munlockall(void); } + SYS_SIGQUEUEINFO = 245 // { int|sys||sigqueueinfo(pid_t pid, const siginfo_t *info); } + SYS_MODCTL = 246 // { int|sys||modctl(int cmd, void *arg); } + SYS___POSIX_RENAME = 270 // { int|sys||__posix_rename(const char *from, const char *to); } + SYS_SWAPCTL = 271 // { int|sys||swapctl(int cmd, void *arg, int misc); } + SYS_MINHERIT = 273 // { int|sys||minherit(void *addr, size_t len, int inherit); } + SYS_LCHMOD = 274 // { int|sys||lchmod(const char *path, mode_t mode); } + SYS_LCHOWN = 275 // { int|sys||lchown(const char *path, uid_t uid, gid_t gid); } + SYS___POSIX_CHOWN = 283 // { int|sys||__posix_chown(const char *path, uid_t uid, gid_t gid); } + SYS___POSIX_FCHOWN = 284 // { int|sys||__posix_fchown(int fd, uid_t uid, gid_t gid); } + SYS___POSIX_LCHOWN = 285 // { int|sys||__posix_lchown(const char *path, uid_t uid, gid_t gid); } + SYS_GETSID = 286 // { pid_t|sys||getsid(pid_t pid); } + SYS___CLONE = 287 // { pid_t|sys||__clone(int flags, void *stack); } + SYS_FKTRACE = 288 // { int|sys||fktrace(int fd, int ops, int facs, pid_t pid); } + SYS_PREADV = 289 // { ssize_t|sys||preadv(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); } + SYS_PWRITEV = 290 // { ssize_t|sys||pwritev(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); } + SYS___GETCWD = 296 // { int|sys||__getcwd(char *bufp, size_t length); } + SYS_FCHROOT = 297 // { int|sys||fchroot(int fd); } + SYS_LCHFLAGS = 304 // { int|sys||lchflags(const char *path, u_long flags); } + SYS_ISSETUGID = 305 // { int|sys||issetugid(void); } + SYS_UTRACE = 306 // { int|sys||utrace(const char *label, void *addr, size_t len); } + SYS_GETCONTEXT = 307 // { int|sys||getcontext(struct __ucontext *ucp); } + SYS_SETCONTEXT = 308 // { int|sys||setcontext(const struct __ucontext *ucp); } + SYS__LWP_CREATE = 309 // { int|sys||_lwp_create(const struct __ucontext *ucp, u_long flags, lwpid_t *new_lwp); } + SYS__LWP_EXIT = 310 // { int|sys||_lwp_exit(void); } + SYS__LWP_SELF = 311 // { lwpid_t|sys||_lwp_self(void); } + SYS__LWP_WAIT = 312 // { int|sys||_lwp_wait(lwpid_t wait_for, lwpid_t *departed); } + SYS__LWP_SUSPEND = 313 // { int|sys||_lwp_suspend(lwpid_t target); } + SYS__LWP_CONTINUE = 314 // { int|sys||_lwp_continue(lwpid_t target); } + SYS__LWP_WAKEUP = 315 // { int|sys||_lwp_wakeup(lwpid_t target); } + SYS__LWP_GETPRIVATE = 316 // { void *|sys||_lwp_getprivate(void); } + SYS__LWP_SETPRIVATE = 317 // { void|sys||_lwp_setprivate(void *ptr); } + SYS__LWP_KILL = 318 // { int|sys||_lwp_kill(lwpid_t target, int signo); } + SYS__LWP_DETACH = 319 // { int|sys||_lwp_detach(lwpid_t target); } + SYS__LWP_UNPARK = 321 // { int|sys||_lwp_unpark(lwpid_t target, const void *hint); } + SYS__LWP_UNPARK_ALL = 322 // { ssize_t|sys||_lwp_unpark_all(const lwpid_t *targets, size_t ntargets, const void *hint); } + SYS__LWP_SETNAME = 323 // { int|sys||_lwp_setname(lwpid_t target, const char *name); } + SYS__LWP_GETNAME = 324 // { int|sys||_lwp_getname(lwpid_t target, char *name, size_t len); } + SYS__LWP_CTL = 325 // { int|sys||_lwp_ctl(int features, struct lwpctl **address); } + SYS___SIGACTION_SIGTRAMP = 340 // { int|sys||__sigaction_sigtramp(int signum, const struct sigaction *nsa, struct sigaction *osa, const void *tramp, int vers); } + SYS_PMC_GET_INFO = 341 // { int|sys||pmc_get_info(int ctr, int op, void *args); } + SYS_PMC_CONTROL = 342 // { int|sys||pmc_control(int ctr, int op, void *args); } + SYS_RASCTL = 343 // { int|sys||rasctl(void *addr, size_t len, int op); } + SYS_KQUEUE = 344 // { int|sys||kqueue(void); } + SYS__SCHED_SETPARAM = 346 // { int|sys||_sched_setparam(pid_t pid, lwpid_t lid, int policy, const struct sched_param *params); } + SYS__SCHED_GETPARAM = 347 // { int|sys||_sched_getparam(pid_t pid, lwpid_t lid, int *policy, struct sched_param *params); } + SYS__SCHED_SETAFFINITY = 348 // { int|sys||_sched_setaffinity(pid_t pid, lwpid_t lid, size_t size, const cpuset_t *cpuset); } + SYS__SCHED_GETAFFINITY = 349 // { int|sys||_sched_getaffinity(pid_t pid, lwpid_t lid, size_t size, cpuset_t *cpuset); } + SYS_SCHED_YIELD = 350 // { int|sys||sched_yield(void); } + SYS_FSYNC_RANGE = 354 // { int|sys||fsync_range(int fd, int flags, off_t start, off_t length); } + SYS_UUIDGEN = 355 // { int|sys||uuidgen(struct uuid *store, int count); } + SYS_GETVFSSTAT = 356 // { int|sys||getvfsstat(struct statvfs *buf, size_t bufsize, int flags); } + SYS_STATVFS1 = 357 // { int|sys||statvfs1(const char *path, struct statvfs *buf, int flags); } + SYS_FSTATVFS1 = 358 // { int|sys||fstatvfs1(int fd, struct statvfs *buf, int flags); } + SYS_EXTATTRCTL = 360 // { int|sys||extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); } + SYS_EXTATTR_SET_FILE = 361 // { int|sys||extattr_set_file(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); } + SYS_EXTATTR_GET_FILE = 362 // { ssize_t|sys||extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } + SYS_EXTATTR_DELETE_FILE = 363 // { int|sys||extattr_delete_file(const char *path, int attrnamespace, const char *attrname); } + SYS_EXTATTR_SET_FD = 364 // { int|sys||extattr_set_fd(int fd, int attrnamespace, const char *attrname, const void *data, size_t nbytes); } + SYS_EXTATTR_GET_FD = 365 // { ssize_t|sys||extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); } + SYS_EXTATTR_DELETE_FD = 366 // { int|sys||extattr_delete_fd(int fd, int attrnamespace, const char *attrname); } + SYS_EXTATTR_SET_LINK = 367 // { int|sys||extattr_set_link(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); } + SYS_EXTATTR_GET_LINK = 368 // { ssize_t|sys||extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } + SYS_EXTATTR_DELETE_LINK = 369 // { int|sys||extattr_delete_link(const char *path, int attrnamespace, const char *attrname); } + SYS_EXTATTR_LIST_FD = 370 // { ssize_t|sys||extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); } + SYS_EXTATTR_LIST_FILE = 371 // { ssize_t|sys||extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); } + SYS_EXTATTR_LIST_LINK = 372 // { ssize_t|sys||extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); } + SYS_SETXATTR = 375 // { int|sys||setxattr(const char *path, const char *name, const void *value, size_t size, int flags); } + SYS_LSETXATTR = 376 // { int|sys||lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags); } + SYS_FSETXATTR = 377 // { int|sys||fsetxattr(int fd, const char *name, const void *value, size_t size, int flags); } + SYS_GETXATTR = 378 // { int|sys||getxattr(const char *path, const char *name, void *value, size_t size); } + SYS_LGETXATTR = 379 // { int|sys||lgetxattr(const char *path, const char *name, void *value, size_t size); } + SYS_FGETXATTR = 380 // { int|sys||fgetxattr(int fd, const char *name, void *value, size_t size); } + SYS_LISTXATTR = 381 // { int|sys||listxattr(const char *path, char *list, size_t size); } + SYS_LLISTXATTR = 382 // { int|sys||llistxattr(const char *path, char *list, size_t size); } + SYS_FLISTXATTR = 383 // { int|sys||flistxattr(int fd, char *list, size_t size); } + SYS_REMOVEXATTR = 384 // { int|sys||removexattr(const char *path, const char *name); } + SYS_LREMOVEXATTR = 385 // { int|sys||lremovexattr(const char *path, const char *name); } + SYS_FREMOVEXATTR = 386 // { int|sys||fremovexattr(int fd, const char *name); } + SYS_GETDENTS = 390 // { int|sys|30|getdents(int fd, char *buf, size_t count); } + SYS_SOCKET = 394 // { int|sys|30|socket(int domain, int type, int protocol); } + SYS_GETFH = 395 // { int|sys|30|getfh(const char *fname, void *fhp, size_t *fh_size); } + SYS_MOUNT = 410 // { int|sys|50|mount(const char *type, const char *path, int flags, void *data, size_t data_len); } + SYS_MREMAP = 411 // { void *|sys||mremap(void *old_address, size_t old_size, void *new_address, size_t new_size, int flags); } + SYS_PSET_CREATE = 412 // { int|sys||pset_create(psetid_t *psid); } + SYS_PSET_DESTROY = 413 // { int|sys||pset_destroy(psetid_t psid); } + SYS_PSET_ASSIGN = 414 // { int|sys||pset_assign(psetid_t psid, cpuid_t cpuid, psetid_t *opsid); } + SYS__PSET_BIND = 415 // { int|sys||_pset_bind(idtype_t idtype, id_t first_id, id_t second_id, psetid_t psid, psetid_t *opsid); } + SYS_POSIX_FADVISE = 416 // { int|sys|50|posix_fadvise(int fd, int PAD, off_t offset, off_t len, int advice); } + SYS_SELECT = 417 // { int|sys|50|select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); } + SYS_GETTIMEOFDAY = 418 // { int|sys|50|gettimeofday(struct timeval *tp, void *tzp); } + SYS_SETTIMEOFDAY = 419 // { int|sys|50|settimeofday(const struct timeval *tv, const void *tzp); } + SYS_UTIMES = 420 // { int|sys|50|utimes(const char *path, const struct timeval *tptr); } + SYS_ADJTIME = 421 // { int|sys|50|adjtime(const struct timeval *delta, struct timeval *olddelta); } + SYS_FUTIMES = 423 // { int|sys|50|futimes(int fd, const struct timeval *tptr); } + SYS_LUTIMES = 424 // { int|sys|50|lutimes(const char *path, const struct timeval *tptr); } + SYS_SETITIMER = 425 // { int|sys|50|setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); } + SYS_GETITIMER = 426 // { int|sys|50|getitimer(int which, struct itimerval *itv); } + SYS_CLOCK_GETTIME = 427 // { int|sys|50|clock_gettime(clockid_t clock_id, struct timespec *tp); } + SYS_CLOCK_SETTIME = 428 // { int|sys|50|clock_settime(clockid_t clock_id, const struct timespec *tp); } + SYS_CLOCK_GETRES = 429 // { int|sys|50|clock_getres(clockid_t clock_id, struct timespec *tp); } + SYS_NANOSLEEP = 430 // { int|sys|50|nanosleep(const struct timespec *rqtp, struct timespec *rmtp); } + SYS___SIGTIMEDWAIT = 431 // { int|sys|50|__sigtimedwait(const sigset_t *set, siginfo_t *info, struct timespec *timeout); } + SYS__LWP_PARK = 434 // { int|sys|50|_lwp_park(const struct timespec *ts, lwpid_t unpark, const void *hint, const void *unparkhint); } + SYS_KEVENT = 435 // { int|sys|50|kevent(int fd, const struct kevent *changelist, size_t nchanges, struct kevent *eventlist, size_t nevents, const struct timespec *timeout); } + SYS_PSELECT = 436 // { int|sys|50|pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); } + SYS_POLLTS = 437 // { int|sys|50|pollts(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); } + SYS_STAT = 439 // { int|sys|50|stat(const char *path, struct stat *ub); } + SYS_FSTAT = 440 // { int|sys|50|fstat(int fd, struct stat *sb); } + SYS_LSTAT = 441 // { int|sys|50|lstat(const char *path, struct stat *ub); } + SYS___SEMCTL = 442 // { int|sys|50|__semctl(int semid, int semnum, int cmd, ... union __semun *arg); } + SYS_SHMCTL = 443 // { int|sys|50|shmctl(int shmid, int cmd, struct shmid_ds *buf); } + SYS_MSGCTL = 444 // { int|sys|50|msgctl(int msqid, int cmd, struct msqid_ds *buf); } + SYS_GETRUSAGE = 445 // { int|sys|50|getrusage(int who, struct rusage *rusage); } + SYS_TIMER_SETTIME = 446 // { int|sys|50|timer_settime(timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); } + SYS_TIMER_GETTIME = 447 // { int|sys|50|timer_gettime(timer_t timerid, struct itimerspec *value); } + SYS_NTP_GETTIME = 448 // { int|sys|50|ntp_gettime(struct ntptimeval *ntvp); } + SYS_WAIT4 = 449 // { int|sys|50|wait4(pid_t pid, int *status, int options, struct rusage *rusage); } + SYS_MKNOD = 450 // { int|sys|50|mknod(const char *path, mode_t mode, dev_t dev); } + SYS_FHSTAT = 451 // { int|sys|50|fhstat(const void *fhp, size_t fh_size, struct stat *sb); } + SYS_PIPE2 = 453 // { int|sys||pipe2(int *fildes, int flags); } + SYS_DUP3 = 454 // { int|sys||dup3(int from, int to, int flags); } + SYS_KQUEUE1 = 455 // { int|sys||kqueue1(int flags); } + SYS_PACCEPT = 456 // { int|sys||paccept(int s, struct sockaddr *name, socklen_t *anamelen, const sigset_t *mask, int flags); } + SYS_LINKAT = 457 // { int|sys||linkat(int fd1, const char *name1, int fd2, const char *name2, int flags); } + SYS_RENAMEAT = 458 // { int|sys||renameat(int fromfd, const char *from, int tofd, const char *to); } + SYS_MKFIFOAT = 459 // { int|sys||mkfifoat(int fd, const char *path, mode_t mode); } + SYS_MKNODAT = 460 // { int|sys||mknodat(int fd, const char *path, mode_t mode, uint32_t dev); } + SYS_MKDIRAT = 461 // { int|sys||mkdirat(int fd, const char *path, mode_t mode); } + SYS_FACCESSAT = 462 // { int|sys||faccessat(int fd, const char *path, int amode, int flag); } + SYS_FCHMODAT = 463 // { int|sys||fchmodat(int fd, const char *path, mode_t mode, int flag); } + SYS_FCHOWNAT = 464 // { int|sys||fchownat(int fd, const char *path, uid_t owner, gid_t group, int flag); } + SYS_FEXECVE = 465 // { int|sys||fexecve(int fd, char * const *argp, char * const *envp); } + SYS_FSTATAT = 466 // { int|sys||fstatat(int fd, const char *path, struct stat *buf, int flag); } + SYS_UTIMENSAT = 467 // { int|sys||utimensat(int fd, const char *path, const struct timespec *tptr, int flag); } + SYS_OPENAT = 468 // { int|sys||openat(int fd, const char *path, int oflags, ... mode_t mode); } + SYS_READLINKAT = 469 // { int|sys||readlinkat(int fd, const char *path, char *buf, size_t bufsize); } + SYS_SYMLINKAT = 470 // { int|sys||symlinkat(const char *path1, int fd, const char *path2); } + SYS_UNLINKAT = 471 // { int|sys||unlinkat(int fd, const char *path, int flag); } + SYS_FUTIMENS = 472 // { int|sys||futimens(int fd, const struct timespec *tptr); } + SYS___QUOTACTL = 473 // { int|sys||__quotactl(const char *path, struct quotactl_args *args); } + SYS_POSIX_SPAWN = 474 // { int|sys||posix_spawn(pid_t *pid, const char *path, const struct posix_spawn_file_actions *file_actions, const struct posix_spawnattr *attrp, char *const *argv, char *const *envp); } + SYS_RECVMMSG = 475 // { int|sys||recvmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags, struct timespec *timeout); } + SYS_SENDMMSG = 476 // { int|sys||sendmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags); } +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go new file mode 100644 index 0000000..48a91d4 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go @@ -0,0 +1,273 @@ +// mksysnum_netbsd.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build amd64,netbsd + +package unix + +const ( + SYS_EXIT = 1 // { void|sys||exit(int rval); } + SYS_FORK = 2 // { int|sys||fork(void); } + SYS_READ = 3 // { ssize_t|sys||read(int fd, void *buf, size_t nbyte); } + SYS_WRITE = 4 // { ssize_t|sys||write(int fd, const void *buf, size_t nbyte); } + SYS_OPEN = 5 // { int|sys||open(const char *path, int flags, ... mode_t mode); } + SYS_CLOSE = 6 // { int|sys||close(int fd); } + SYS_LINK = 9 // { int|sys||link(const char *path, const char *link); } + SYS_UNLINK = 10 // { int|sys||unlink(const char *path); } + SYS_CHDIR = 12 // { int|sys||chdir(const char *path); } + SYS_FCHDIR = 13 // { int|sys||fchdir(int fd); } + SYS_CHMOD = 15 // { int|sys||chmod(const char *path, mode_t mode); } + SYS_CHOWN = 16 // { int|sys||chown(const char *path, uid_t uid, gid_t gid); } + SYS_BREAK = 17 // { int|sys||obreak(char *nsize); } + SYS_GETPID = 20 // { pid_t|sys||getpid_with_ppid(void); } + SYS_UNMOUNT = 22 // { int|sys||unmount(const char *path, int flags); } + SYS_SETUID = 23 // { int|sys||setuid(uid_t uid); } + SYS_GETUID = 24 // { uid_t|sys||getuid_with_euid(void); } + SYS_GETEUID = 25 // { uid_t|sys||geteuid(void); } + SYS_PTRACE = 26 // { int|sys||ptrace(int req, pid_t pid, void *addr, int data); } + SYS_RECVMSG = 27 // { ssize_t|sys||recvmsg(int s, struct msghdr *msg, int flags); } + SYS_SENDMSG = 28 // { ssize_t|sys||sendmsg(int s, const struct msghdr *msg, int flags); } + SYS_RECVFROM = 29 // { ssize_t|sys||recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); } + SYS_ACCEPT = 30 // { int|sys||accept(int s, struct sockaddr *name, socklen_t *anamelen); } + SYS_GETPEERNAME = 31 // { int|sys||getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); } + SYS_GETSOCKNAME = 32 // { int|sys||getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); } + SYS_ACCESS = 33 // { int|sys||access(const char *path, int flags); } + SYS_CHFLAGS = 34 // { int|sys||chflags(const char *path, u_long flags); } + SYS_FCHFLAGS = 35 // { int|sys||fchflags(int fd, u_long flags); } + SYS_SYNC = 36 // { void|sys||sync(void); } + SYS_KILL = 37 // { int|sys||kill(pid_t pid, int signum); } + SYS_GETPPID = 39 // { pid_t|sys||getppid(void); } + SYS_DUP = 41 // { int|sys||dup(int fd); } + SYS_PIPE = 42 // { int|sys||pipe(void); } + SYS_GETEGID = 43 // { gid_t|sys||getegid(void); } + SYS_PROFIL = 44 // { int|sys||profil(char *samples, size_t size, u_long offset, u_int scale); } + SYS_KTRACE = 45 // { int|sys||ktrace(const char *fname, int ops, int facs, pid_t pid); } + SYS_GETGID = 47 // { gid_t|sys||getgid_with_egid(void); } + SYS___GETLOGIN = 49 // { int|sys||__getlogin(char *namebuf, size_t namelen); } + SYS___SETLOGIN = 50 // { int|sys||__setlogin(const char *namebuf); } + SYS_ACCT = 51 // { int|sys||acct(const char *path); } + SYS_IOCTL = 54 // { int|sys||ioctl(int fd, u_long com, ... void *data); } + SYS_REVOKE = 56 // { int|sys||revoke(const char *path); } + SYS_SYMLINK = 57 // { int|sys||symlink(const char *path, const char *link); } + SYS_READLINK = 58 // { ssize_t|sys||readlink(const char *path, char *buf, size_t count); } + SYS_EXECVE = 59 // { int|sys||execve(const char *path, char * const *argp, char * const *envp); } + SYS_UMASK = 60 // { mode_t|sys||umask(mode_t newmask); } + SYS_CHROOT = 61 // { int|sys||chroot(const char *path); } + SYS_VFORK = 66 // { int|sys||vfork(void); } + SYS_SBRK = 69 // { int|sys||sbrk(intptr_t incr); } + SYS_SSTK = 70 // { int|sys||sstk(int incr); } + SYS_VADVISE = 72 // { int|sys||ovadvise(int anom); } + SYS_MUNMAP = 73 // { int|sys||munmap(void *addr, size_t len); } + SYS_MPROTECT = 74 // { int|sys||mprotect(void *addr, size_t len, int prot); } + SYS_MADVISE = 75 // { int|sys||madvise(void *addr, size_t len, int behav); } + SYS_MINCORE = 78 // { int|sys||mincore(void *addr, size_t len, char *vec); } + SYS_GETGROUPS = 79 // { int|sys||getgroups(int gidsetsize, gid_t *gidset); } + SYS_SETGROUPS = 80 // { int|sys||setgroups(int gidsetsize, const gid_t *gidset); } + SYS_GETPGRP = 81 // { int|sys||getpgrp(void); } + SYS_SETPGID = 82 // { int|sys||setpgid(pid_t pid, pid_t pgid); } + SYS_DUP2 = 90 // { int|sys||dup2(int from, int to); } + SYS_FCNTL = 92 // { int|sys||fcntl(int fd, int cmd, ... void *arg); } + SYS_FSYNC = 95 // { int|sys||fsync(int fd); } + SYS_SETPRIORITY = 96 // { int|sys||setpriority(int which, id_t who, int prio); } + SYS_CONNECT = 98 // { int|sys||connect(int s, const struct sockaddr *name, socklen_t namelen); } + SYS_GETPRIORITY = 100 // { int|sys||getpriority(int which, id_t who); } + SYS_BIND = 104 // { int|sys||bind(int s, const struct sockaddr *name, socklen_t namelen); } + SYS_SETSOCKOPT = 105 // { int|sys||setsockopt(int s, int level, int name, const void *val, socklen_t valsize); } + SYS_LISTEN = 106 // { int|sys||listen(int s, int backlog); } + SYS_GETSOCKOPT = 118 // { int|sys||getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); } + SYS_READV = 120 // { ssize_t|sys||readv(int fd, const struct iovec *iovp, int iovcnt); } + SYS_WRITEV = 121 // { ssize_t|sys||writev(int fd, const struct iovec *iovp, int iovcnt); } + SYS_FCHOWN = 123 // { int|sys||fchown(int fd, uid_t uid, gid_t gid); } + SYS_FCHMOD = 124 // { int|sys||fchmod(int fd, mode_t mode); } + SYS_SETREUID = 126 // { int|sys||setreuid(uid_t ruid, uid_t euid); } + SYS_SETREGID = 127 // { int|sys||setregid(gid_t rgid, gid_t egid); } + SYS_RENAME = 128 // { int|sys||rename(const char *from, const char *to); } + SYS_FLOCK = 131 // { int|sys||flock(int fd, int how); } + SYS_MKFIFO = 132 // { int|sys||mkfifo(const char *path, mode_t mode); } + SYS_SENDTO = 133 // { ssize_t|sys||sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); } + SYS_SHUTDOWN = 134 // { int|sys||shutdown(int s, int how); } + SYS_SOCKETPAIR = 135 // { int|sys||socketpair(int domain, int type, int protocol, int *rsv); } + SYS_MKDIR = 136 // { int|sys||mkdir(const char *path, mode_t mode); } + SYS_RMDIR = 137 // { int|sys||rmdir(const char *path); } + SYS_SETSID = 147 // { int|sys||setsid(void); } + SYS_SYSARCH = 165 // { int|sys||sysarch(int op, void *parms); } + SYS_PREAD = 173 // { ssize_t|sys||pread(int fd, void *buf, size_t nbyte, int PAD, off_t offset); } + SYS_PWRITE = 174 // { ssize_t|sys||pwrite(int fd, const void *buf, size_t nbyte, int PAD, off_t offset); } + SYS_NTP_ADJTIME = 176 // { int|sys||ntp_adjtime(struct timex *tp); } + SYS_SETGID = 181 // { int|sys||setgid(gid_t gid); } + SYS_SETEGID = 182 // { int|sys||setegid(gid_t egid); } + SYS_SETEUID = 183 // { int|sys||seteuid(uid_t euid); } + SYS_PATHCONF = 191 // { long|sys||pathconf(const char *path, int name); } + SYS_FPATHCONF = 192 // { long|sys||fpathconf(int fd, int name); } + SYS_GETRLIMIT = 194 // { int|sys||getrlimit(int which, struct rlimit *rlp); } + SYS_SETRLIMIT = 195 // { int|sys||setrlimit(int which, const struct rlimit *rlp); } + SYS_MMAP = 197 // { void *|sys||mmap(void *addr, size_t len, int prot, int flags, int fd, long PAD, off_t pos); } + SYS_LSEEK = 199 // { off_t|sys||lseek(int fd, int PAD, off_t offset, int whence); } + SYS_TRUNCATE = 200 // { int|sys||truncate(const char *path, int PAD, off_t length); } + SYS_FTRUNCATE = 201 // { int|sys||ftruncate(int fd, int PAD, off_t length); } + SYS___SYSCTL = 202 // { int|sys||__sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, const void *new, size_t newlen); } + SYS_MLOCK = 203 // { int|sys||mlock(const void *addr, size_t len); } + SYS_MUNLOCK = 204 // { int|sys||munlock(const void *addr, size_t len); } + SYS_UNDELETE = 205 // { int|sys||undelete(const char *path); } + SYS_GETPGID = 207 // { pid_t|sys||getpgid(pid_t pid); } + SYS_REBOOT = 208 // { int|sys||reboot(int opt, char *bootstr); } + SYS_POLL = 209 // { int|sys||poll(struct pollfd *fds, u_int nfds, int timeout); } + SYS_SEMGET = 221 // { int|sys||semget(key_t key, int nsems, int semflg); } + SYS_SEMOP = 222 // { int|sys||semop(int semid, struct sembuf *sops, size_t nsops); } + SYS_SEMCONFIG = 223 // { int|sys||semconfig(int flag); } + SYS_MSGGET = 225 // { int|sys||msgget(key_t key, int msgflg); } + SYS_MSGSND = 226 // { int|sys||msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); } + SYS_MSGRCV = 227 // { ssize_t|sys||msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); } + SYS_SHMAT = 228 // { void *|sys||shmat(int shmid, const void *shmaddr, int shmflg); } + SYS_SHMDT = 230 // { int|sys||shmdt(const void *shmaddr); } + SYS_SHMGET = 231 // { int|sys||shmget(key_t key, size_t size, int shmflg); } + SYS_TIMER_CREATE = 235 // { int|sys||timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid); } + SYS_TIMER_DELETE = 236 // { int|sys||timer_delete(timer_t timerid); } + SYS_TIMER_GETOVERRUN = 239 // { int|sys||timer_getoverrun(timer_t timerid); } + SYS_FDATASYNC = 241 // { int|sys||fdatasync(int fd); } + SYS_MLOCKALL = 242 // { int|sys||mlockall(int flags); } + SYS_MUNLOCKALL = 243 // { int|sys||munlockall(void); } + SYS_SIGQUEUEINFO = 245 // { int|sys||sigqueueinfo(pid_t pid, const siginfo_t *info); } + SYS_MODCTL = 246 // { int|sys||modctl(int cmd, void *arg); } + SYS___POSIX_RENAME = 270 // { int|sys||__posix_rename(const char *from, const char *to); } + SYS_SWAPCTL = 271 // { int|sys||swapctl(int cmd, void *arg, int misc); } + SYS_MINHERIT = 273 // { int|sys||minherit(void *addr, size_t len, int inherit); } + SYS_LCHMOD = 274 // { int|sys||lchmod(const char *path, mode_t mode); } + SYS_LCHOWN = 275 // { int|sys||lchown(const char *path, uid_t uid, gid_t gid); } + SYS___POSIX_CHOWN = 283 // { int|sys||__posix_chown(const char *path, uid_t uid, gid_t gid); } + SYS___POSIX_FCHOWN = 284 // { int|sys||__posix_fchown(int fd, uid_t uid, gid_t gid); } + SYS___POSIX_LCHOWN = 285 // { int|sys||__posix_lchown(const char *path, uid_t uid, gid_t gid); } + SYS_GETSID = 286 // { pid_t|sys||getsid(pid_t pid); } + SYS___CLONE = 287 // { pid_t|sys||__clone(int flags, void *stack); } + SYS_FKTRACE = 288 // { int|sys||fktrace(int fd, int ops, int facs, pid_t pid); } + SYS_PREADV = 289 // { ssize_t|sys||preadv(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); } + SYS_PWRITEV = 290 // { ssize_t|sys||pwritev(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); } + SYS___GETCWD = 296 // { int|sys||__getcwd(char *bufp, size_t length); } + SYS_FCHROOT = 297 // { int|sys||fchroot(int fd); } + SYS_LCHFLAGS = 304 // { int|sys||lchflags(const char *path, u_long flags); } + SYS_ISSETUGID = 305 // { int|sys||issetugid(void); } + SYS_UTRACE = 306 // { int|sys||utrace(const char *label, void *addr, size_t len); } + SYS_GETCONTEXT = 307 // { int|sys||getcontext(struct __ucontext *ucp); } + SYS_SETCONTEXT = 308 // { int|sys||setcontext(const struct __ucontext *ucp); } + SYS__LWP_CREATE = 309 // { int|sys||_lwp_create(const struct __ucontext *ucp, u_long flags, lwpid_t *new_lwp); } + SYS__LWP_EXIT = 310 // { int|sys||_lwp_exit(void); } + SYS__LWP_SELF = 311 // { lwpid_t|sys||_lwp_self(void); } + SYS__LWP_WAIT = 312 // { int|sys||_lwp_wait(lwpid_t wait_for, lwpid_t *departed); } + SYS__LWP_SUSPEND = 313 // { int|sys||_lwp_suspend(lwpid_t target); } + SYS__LWP_CONTINUE = 314 // { int|sys||_lwp_continue(lwpid_t target); } + SYS__LWP_WAKEUP = 315 // { int|sys||_lwp_wakeup(lwpid_t target); } + SYS__LWP_GETPRIVATE = 316 // { void *|sys||_lwp_getprivate(void); } + SYS__LWP_SETPRIVATE = 317 // { void|sys||_lwp_setprivate(void *ptr); } + SYS__LWP_KILL = 318 // { int|sys||_lwp_kill(lwpid_t target, int signo); } + SYS__LWP_DETACH = 319 // { int|sys||_lwp_detach(lwpid_t target); } + SYS__LWP_UNPARK = 321 // { int|sys||_lwp_unpark(lwpid_t target, const void *hint); } + SYS__LWP_UNPARK_ALL = 322 // { ssize_t|sys||_lwp_unpark_all(const lwpid_t *targets, size_t ntargets, const void *hint); } + SYS__LWP_SETNAME = 323 // { int|sys||_lwp_setname(lwpid_t target, const char *name); } + SYS__LWP_GETNAME = 324 // { int|sys||_lwp_getname(lwpid_t target, char *name, size_t len); } + SYS__LWP_CTL = 325 // { int|sys||_lwp_ctl(int features, struct lwpctl **address); } + SYS___SIGACTION_SIGTRAMP = 340 // { int|sys||__sigaction_sigtramp(int signum, const struct sigaction *nsa, struct sigaction *osa, const void *tramp, int vers); } + SYS_PMC_GET_INFO = 341 // { int|sys||pmc_get_info(int ctr, int op, void *args); } + SYS_PMC_CONTROL = 342 // { int|sys||pmc_control(int ctr, int op, void *args); } + SYS_RASCTL = 343 // { int|sys||rasctl(void *addr, size_t len, int op); } + SYS_KQUEUE = 344 // { int|sys||kqueue(void); } + SYS__SCHED_SETPARAM = 346 // { int|sys||_sched_setparam(pid_t pid, lwpid_t lid, int policy, const struct sched_param *params); } + SYS__SCHED_GETPARAM = 347 // { int|sys||_sched_getparam(pid_t pid, lwpid_t lid, int *policy, struct sched_param *params); } + SYS__SCHED_SETAFFINITY = 348 // { int|sys||_sched_setaffinity(pid_t pid, lwpid_t lid, size_t size, const cpuset_t *cpuset); } + SYS__SCHED_GETAFFINITY = 349 // { int|sys||_sched_getaffinity(pid_t pid, lwpid_t lid, size_t size, cpuset_t *cpuset); } + SYS_SCHED_YIELD = 350 // { int|sys||sched_yield(void); } + SYS_FSYNC_RANGE = 354 // { int|sys||fsync_range(int fd, int flags, off_t start, off_t length); } + SYS_UUIDGEN = 355 // { int|sys||uuidgen(struct uuid *store, int count); } + SYS_GETVFSSTAT = 356 // { int|sys||getvfsstat(struct statvfs *buf, size_t bufsize, int flags); } + SYS_STATVFS1 = 357 // { int|sys||statvfs1(const char *path, struct statvfs *buf, int flags); } + SYS_FSTATVFS1 = 358 // { int|sys||fstatvfs1(int fd, struct statvfs *buf, int flags); } + SYS_EXTATTRCTL = 360 // { int|sys||extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); } + SYS_EXTATTR_SET_FILE = 361 // { int|sys||extattr_set_file(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); } + SYS_EXTATTR_GET_FILE = 362 // { ssize_t|sys||extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } + SYS_EXTATTR_DELETE_FILE = 363 // { int|sys||extattr_delete_file(const char *path, int attrnamespace, const char *attrname); } + SYS_EXTATTR_SET_FD = 364 // { int|sys||extattr_set_fd(int fd, int attrnamespace, const char *attrname, const void *data, size_t nbytes); } + SYS_EXTATTR_GET_FD = 365 // { ssize_t|sys||extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); } + SYS_EXTATTR_DELETE_FD = 366 // { int|sys||extattr_delete_fd(int fd, int attrnamespace, const char *attrname); } + SYS_EXTATTR_SET_LINK = 367 // { int|sys||extattr_set_link(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); } + SYS_EXTATTR_GET_LINK = 368 // { ssize_t|sys||extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } + SYS_EXTATTR_DELETE_LINK = 369 // { int|sys||extattr_delete_link(const char *path, int attrnamespace, const char *attrname); } + SYS_EXTATTR_LIST_FD = 370 // { ssize_t|sys||extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); } + SYS_EXTATTR_LIST_FILE = 371 // { ssize_t|sys||extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); } + SYS_EXTATTR_LIST_LINK = 372 // { ssize_t|sys||extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); } + SYS_SETXATTR = 375 // { int|sys||setxattr(const char *path, const char *name, const void *value, size_t size, int flags); } + SYS_LSETXATTR = 376 // { int|sys||lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags); } + SYS_FSETXATTR = 377 // { int|sys||fsetxattr(int fd, const char *name, const void *value, size_t size, int flags); } + SYS_GETXATTR = 378 // { int|sys||getxattr(const char *path, const char *name, void *value, size_t size); } + SYS_LGETXATTR = 379 // { int|sys||lgetxattr(const char *path, const char *name, void *value, size_t size); } + SYS_FGETXATTR = 380 // { int|sys||fgetxattr(int fd, const char *name, void *value, size_t size); } + SYS_LISTXATTR = 381 // { int|sys||listxattr(const char *path, char *list, size_t size); } + SYS_LLISTXATTR = 382 // { int|sys||llistxattr(const char *path, char *list, size_t size); } + SYS_FLISTXATTR = 383 // { int|sys||flistxattr(int fd, char *list, size_t size); } + SYS_REMOVEXATTR = 384 // { int|sys||removexattr(const char *path, const char *name); } + SYS_LREMOVEXATTR = 385 // { int|sys||lremovexattr(const char *path, const char *name); } + SYS_FREMOVEXATTR = 386 // { int|sys||fremovexattr(int fd, const char *name); } + SYS_GETDENTS = 390 // { int|sys|30|getdents(int fd, char *buf, size_t count); } + SYS_SOCKET = 394 // { int|sys|30|socket(int domain, int type, int protocol); } + SYS_GETFH = 395 // { int|sys|30|getfh(const char *fname, void *fhp, size_t *fh_size); } + SYS_MOUNT = 410 // { int|sys|50|mount(const char *type, const char *path, int flags, void *data, size_t data_len); } + SYS_MREMAP = 411 // { void *|sys||mremap(void *old_address, size_t old_size, void *new_address, size_t new_size, int flags); } + SYS_PSET_CREATE = 412 // { int|sys||pset_create(psetid_t *psid); } + SYS_PSET_DESTROY = 413 // { int|sys||pset_destroy(psetid_t psid); } + SYS_PSET_ASSIGN = 414 // { int|sys||pset_assign(psetid_t psid, cpuid_t cpuid, psetid_t *opsid); } + SYS__PSET_BIND = 415 // { int|sys||_pset_bind(idtype_t idtype, id_t first_id, id_t second_id, psetid_t psid, psetid_t *opsid); } + SYS_POSIX_FADVISE = 416 // { int|sys|50|posix_fadvise(int fd, int PAD, off_t offset, off_t len, int advice); } + SYS_SELECT = 417 // { int|sys|50|select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); } + SYS_GETTIMEOFDAY = 418 // { int|sys|50|gettimeofday(struct timeval *tp, void *tzp); } + SYS_SETTIMEOFDAY = 419 // { int|sys|50|settimeofday(const struct timeval *tv, const void *tzp); } + SYS_UTIMES = 420 // { int|sys|50|utimes(const char *path, const struct timeval *tptr); } + SYS_ADJTIME = 421 // { int|sys|50|adjtime(const struct timeval *delta, struct timeval *olddelta); } + SYS_FUTIMES = 423 // { int|sys|50|futimes(int fd, const struct timeval *tptr); } + SYS_LUTIMES = 424 // { int|sys|50|lutimes(const char *path, const struct timeval *tptr); } + SYS_SETITIMER = 425 // { int|sys|50|setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); } + SYS_GETITIMER = 426 // { int|sys|50|getitimer(int which, struct itimerval *itv); } + SYS_CLOCK_GETTIME = 427 // { int|sys|50|clock_gettime(clockid_t clock_id, struct timespec *tp); } + SYS_CLOCK_SETTIME = 428 // { int|sys|50|clock_settime(clockid_t clock_id, const struct timespec *tp); } + SYS_CLOCK_GETRES = 429 // { int|sys|50|clock_getres(clockid_t clock_id, struct timespec *tp); } + SYS_NANOSLEEP = 430 // { int|sys|50|nanosleep(const struct timespec *rqtp, struct timespec *rmtp); } + SYS___SIGTIMEDWAIT = 431 // { int|sys|50|__sigtimedwait(const sigset_t *set, siginfo_t *info, struct timespec *timeout); } + SYS__LWP_PARK = 434 // { int|sys|50|_lwp_park(const struct timespec *ts, lwpid_t unpark, const void *hint, const void *unparkhint); } + SYS_KEVENT = 435 // { int|sys|50|kevent(int fd, const struct kevent *changelist, size_t nchanges, struct kevent *eventlist, size_t nevents, const struct timespec *timeout); } + SYS_PSELECT = 436 // { int|sys|50|pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); } + SYS_POLLTS = 437 // { int|sys|50|pollts(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); } + SYS_STAT = 439 // { int|sys|50|stat(const char *path, struct stat *ub); } + SYS_FSTAT = 440 // { int|sys|50|fstat(int fd, struct stat *sb); } + SYS_LSTAT = 441 // { int|sys|50|lstat(const char *path, struct stat *ub); } + SYS___SEMCTL = 442 // { int|sys|50|__semctl(int semid, int semnum, int cmd, ... union __semun *arg); } + SYS_SHMCTL = 443 // { int|sys|50|shmctl(int shmid, int cmd, struct shmid_ds *buf); } + SYS_MSGCTL = 444 // { int|sys|50|msgctl(int msqid, int cmd, struct msqid_ds *buf); } + SYS_GETRUSAGE = 445 // { int|sys|50|getrusage(int who, struct rusage *rusage); } + SYS_TIMER_SETTIME = 446 // { int|sys|50|timer_settime(timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); } + SYS_TIMER_GETTIME = 447 // { int|sys|50|timer_gettime(timer_t timerid, struct itimerspec *value); } + SYS_NTP_GETTIME = 448 // { int|sys|50|ntp_gettime(struct ntptimeval *ntvp); } + SYS_WAIT4 = 449 // { int|sys|50|wait4(pid_t pid, int *status, int options, struct rusage *rusage); } + SYS_MKNOD = 450 // { int|sys|50|mknod(const char *path, mode_t mode, dev_t dev); } + SYS_FHSTAT = 451 // { int|sys|50|fhstat(const void *fhp, size_t fh_size, struct stat *sb); } + SYS_PIPE2 = 453 // { int|sys||pipe2(int *fildes, int flags); } + SYS_DUP3 = 454 // { int|sys||dup3(int from, int to, int flags); } + SYS_KQUEUE1 = 455 // { int|sys||kqueue1(int flags); } + SYS_PACCEPT = 456 // { int|sys||paccept(int s, struct sockaddr *name, socklen_t *anamelen, const sigset_t *mask, int flags); } + SYS_LINKAT = 457 // { int|sys||linkat(int fd1, const char *name1, int fd2, const char *name2, int flags); } + SYS_RENAMEAT = 458 // { int|sys||renameat(int fromfd, const char *from, int tofd, const char *to); } + SYS_MKFIFOAT = 459 // { int|sys||mkfifoat(int fd, const char *path, mode_t mode); } + SYS_MKNODAT = 460 // { int|sys||mknodat(int fd, const char *path, mode_t mode, uint32_t dev); } + SYS_MKDIRAT = 461 // { int|sys||mkdirat(int fd, const char *path, mode_t mode); } + SYS_FACCESSAT = 462 // { int|sys||faccessat(int fd, const char *path, int amode, int flag); } + SYS_FCHMODAT = 463 // { int|sys||fchmodat(int fd, const char *path, mode_t mode, int flag); } + SYS_FCHOWNAT = 464 // { int|sys||fchownat(int fd, const char *path, uid_t owner, gid_t group, int flag); } + SYS_FEXECVE = 465 // { int|sys||fexecve(int fd, char * const *argp, char * const *envp); } + SYS_FSTATAT = 466 // { int|sys||fstatat(int fd, const char *path, struct stat *buf, int flag); } + SYS_UTIMENSAT = 467 // { int|sys||utimensat(int fd, const char *path, const struct timespec *tptr, int flag); } + SYS_OPENAT = 468 // { int|sys||openat(int fd, const char *path, int oflags, ... mode_t mode); } + SYS_READLINKAT = 469 // { int|sys||readlinkat(int fd, const char *path, char *buf, size_t bufsize); } + SYS_SYMLINKAT = 470 // { int|sys||symlinkat(const char *path1, int fd, const char *path2); } + SYS_UNLINKAT = 471 // { int|sys||unlinkat(int fd, const char *path, int flag); } + SYS_FUTIMENS = 472 // { int|sys||futimens(int fd, const struct timespec *tptr); } + SYS___QUOTACTL = 473 // { int|sys||__quotactl(const char *path, struct quotactl_args *args); } + SYS_POSIX_SPAWN = 474 // { int|sys||posix_spawn(pid_t *pid, const char *path, const struct posix_spawn_file_actions *file_actions, const struct posix_spawnattr *attrp, char *const *argv, char *const *envp); } + SYS_RECVMMSG = 475 // { int|sys||recvmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags, struct timespec *timeout); } + SYS_SENDMMSG = 476 // { int|sys||sendmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags); } +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go new file mode 100644 index 0000000..612ba66 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go @@ -0,0 +1,273 @@ +// mksysnum_netbsd.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build arm,netbsd + +package unix + +const ( + SYS_EXIT = 1 // { void|sys||exit(int rval); } + SYS_FORK = 2 // { int|sys||fork(void); } + SYS_READ = 3 // { ssize_t|sys||read(int fd, void *buf, size_t nbyte); } + SYS_WRITE = 4 // { ssize_t|sys||write(int fd, const void *buf, size_t nbyte); } + SYS_OPEN = 5 // { int|sys||open(const char *path, int flags, ... mode_t mode); } + SYS_CLOSE = 6 // { int|sys||close(int fd); } + SYS_LINK = 9 // { int|sys||link(const char *path, const char *link); } + SYS_UNLINK = 10 // { int|sys||unlink(const char *path); } + SYS_CHDIR = 12 // { int|sys||chdir(const char *path); } + SYS_FCHDIR = 13 // { int|sys||fchdir(int fd); } + SYS_CHMOD = 15 // { int|sys||chmod(const char *path, mode_t mode); } + SYS_CHOWN = 16 // { int|sys||chown(const char *path, uid_t uid, gid_t gid); } + SYS_BREAK = 17 // { int|sys||obreak(char *nsize); } + SYS_GETPID = 20 // { pid_t|sys||getpid_with_ppid(void); } + SYS_UNMOUNT = 22 // { int|sys||unmount(const char *path, int flags); } + SYS_SETUID = 23 // { int|sys||setuid(uid_t uid); } + SYS_GETUID = 24 // { uid_t|sys||getuid_with_euid(void); } + SYS_GETEUID = 25 // { uid_t|sys||geteuid(void); } + SYS_PTRACE = 26 // { int|sys||ptrace(int req, pid_t pid, void *addr, int data); } + SYS_RECVMSG = 27 // { ssize_t|sys||recvmsg(int s, struct msghdr *msg, int flags); } + SYS_SENDMSG = 28 // { ssize_t|sys||sendmsg(int s, const struct msghdr *msg, int flags); } + SYS_RECVFROM = 29 // { ssize_t|sys||recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); } + SYS_ACCEPT = 30 // { int|sys||accept(int s, struct sockaddr *name, socklen_t *anamelen); } + SYS_GETPEERNAME = 31 // { int|sys||getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); } + SYS_GETSOCKNAME = 32 // { int|sys||getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); } + SYS_ACCESS = 33 // { int|sys||access(const char *path, int flags); } + SYS_CHFLAGS = 34 // { int|sys||chflags(const char *path, u_long flags); } + SYS_FCHFLAGS = 35 // { int|sys||fchflags(int fd, u_long flags); } + SYS_SYNC = 36 // { void|sys||sync(void); } + SYS_KILL = 37 // { int|sys||kill(pid_t pid, int signum); } + SYS_GETPPID = 39 // { pid_t|sys||getppid(void); } + SYS_DUP = 41 // { int|sys||dup(int fd); } + SYS_PIPE = 42 // { int|sys||pipe(void); } + SYS_GETEGID = 43 // { gid_t|sys||getegid(void); } + SYS_PROFIL = 44 // { int|sys||profil(char *samples, size_t size, u_long offset, u_int scale); } + SYS_KTRACE = 45 // { int|sys||ktrace(const char *fname, int ops, int facs, pid_t pid); } + SYS_GETGID = 47 // { gid_t|sys||getgid_with_egid(void); } + SYS___GETLOGIN = 49 // { int|sys||__getlogin(char *namebuf, size_t namelen); } + SYS___SETLOGIN = 50 // { int|sys||__setlogin(const char *namebuf); } + SYS_ACCT = 51 // { int|sys||acct(const char *path); } + SYS_IOCTL = 54 // { int|sys||ioctl(int fd, u_long com, ... void *data); } + SYS_REVOKE = 56 // { int|sys||revoke(const char *path); } + SYS_SYMLINK = 57 // { int|sys||symlink(const char *path, const char *link); } + SYS_READLINK = 58 // { ssize_t|sys||readlink(const char *path, char *buf, size_t count); } + SYS_EXECVE = 59 // { int|sys||execve(const char *path, char * const *argp, char * const *envp); } + SYS_UMASK = 60 // { mode_t|sys||umask(mode_t newmask); } + SYS_CHROOT = 61 // { int|sys||chroot(const char *path); } + SYS_VFORK = 66 // { int|sys||vfork(void); } + SYS_SBRK = 69 // { int|sys||sbrk(intptr_t incr); } + SYS_SSTK = 70 // { int|sys||sstk(int incr); } + SYS_VADVISE = 72 // { int|sys||ovadvise(int anom); } + SYS_MUNMAP = 73 // { int|sys||munmap(void *addr, size_t len); } + SYS_MPROTECT = 74 // { int|sys||mprotect(void *addr, size_t len, int prot); } + SYS_MADVISE = 75 // { int|sys||madvise(void *addr, size_t len, int behav); } + SYS_MINCORE = 78 // { int|sys||mincore(void *addr, size_t len, char *vec); } + SYS_GETGROUPS = 79 // { int|sys||getgroups(int gidsetsize, gid_t *gidset); } + SYS_SETGROUPS = 80 // { int|sys||setgroups(int gidsetsize, const gid_t *gidset); } + SYS_GETPGRP = 81 // { int|sys||getpgrp(void); } + SYS_SETPGID = 82 // { int|sys||setpgid(pid_t pid, pid_t pgid); } + SYS_DUP2 = 90 // { int|sys||dup2(int from, int to); } + SYS_FCNTL = 92 // { int|sys||fcntl(int fd, int cmd, ... void *arg); } + SYS_FSYNC = 95 // { int|sys||fsync(int fd); } + SYS_SETPRIORITY = 96 // { int|sys||setpriority(int which, id_t who, int prio); } + SYS_CONNECT = 98 // { int|sys||connect(int s, const struct sockaddr *name, socklen_t namelen); } + SYS_GETPRIORITY = 100 // { int|sys||getpriority(int which, id_t who); } + SYS_BIND = 104 // { int|sys||bind(int s, const struct sockaddr *name, socklen_t namelen); } + SYS_SETSOCKOPT = 105 // { int|sys||setsockopt(int s, int level, int name, const void *val, socklen_t valsize); } + SYS_LISTEN = 106 // { int|sys||listen(int s, int backlog); } + SYS_GETSOCKOPT = 118 // { int|sys||getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); } + SYS_READV = 120 // { ssize_t|sys||readv(int fd, const struct iovec *iovp, int iovcnt); } + SYS_WRITEV = 121 // { ssize_t|sys||writev(int fd, const struct iovec *iovp, int iovcnt); } + SYS_FCHOWN = 123 // { int|sys||fchown(int fd, uid_t uid, gid_t gid); } + SYS_FCHMOD = 124 // { int|sys||fchmod(int fd, mode_t mode); } + SYS_SETREUID = 126 // { int|sys||setreuid(uid_t ruid, uid_t euid); } + SYS_SETREGID = 127 // { int|sys||setregid(gid_t rgid, gid_t egid); } + SYS_RENAME = 128 // { int|sys||rename(const char *from, const char *to); } + SYS_FLOCK = 131 // { int|sys||flock(int fd, int how); } + SYS_MKFIFO = 132 // { int|sys||mkfifo(const char *path, mode_t mode); } + SYS_SENDTO = 133 // { ssize_t|sys||sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); } + SYS_SHUTDOWN = 134 // { int|sys||shutdown(int s, int how); } + SYS_SOCKETPAIR = 135 // { int|sys||socketpair(int domain, int type, int protocol, int *rsv); } + SYS_MKDIR = 136 // { int|sys||mkdir(const char *path, mode_t mode); } + SYS_RMDIR = 137 // { int|sys||rmdir(const char *path); } + SYS_SETSID = 147 // { int|sys||setsid(void); } + SYS_SYSARCH = 165 // { int|sys||sysarch(int op, void *parms); } + SYS_PREAD = 173 // { ssize_t|sys||pread(int fd, void *buf, size_t nbyte, int PAD, off_t offset); } + SYS_PWRITE = 174 // { ssize_t|sys||pwrite(int fd, const void *buf, size_t nbyte, int PAD, off_t offset); } + SYS_NTP_ADJTIME = 176 // { int|sys||ntp_adjtime(struct timex *tp); } + SYS_SETGID = 181 // { int|sys||setgid(gid_t gid); } + SYS_SETEGID = 182 // { int|sys||setegid(gid_t egid); } + SYS_SETEUID = 183 // { int|sys||seteuid(uid_t euid); } + SYS_PATHCONF = 191 // { long|sys||pathconf(const char *path, int name); } + SYS_FPATHCONF = 192 // { long|sys||fpathconf(int fd, int name); } + SYS_GETRLIMIT = 194 // { int|sys||getrlimit(int which, struct rlimit *rlp); } + SYS_SETRLIMIT = 195 // { int|sys||setrlimit(int which, const struct rlimit *rlp); } + SYS_MMAP = 197 // { void *|sys||mmap(void *addr, size_t len, int prot, int flags, int fd, long PAD, off_t pos); } + SYS_LSEEK = 199 // { off_t|sys||lseek(int fd, int PAD, off_t offset, int whence); } + SYS_TRUNCATE = 200 // { int|sys||truncate(const char *path, int PAD, off_t length); } + SYS_FTRUNCATE = 201 // { int|sys||ftruncate(int fd, int PAD, off_t length); } + SYS___SYSCTL = 202 // { int|sys||__sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, const void *new, size_t newlen); } + SYS_MLOCK = 203 // { int|sys||mlock(const void *addr, size_t len); } + SYS_MUNLOCK = 204 // { int|sys||munlock(const void *addr, size_t len); } + SYS_UNDELETE = 205 // { int|sys||undelete(const char *path); } + SYS_GETPGID = 207 // { pid_t|sys||getpgid(pid_t pid); } + SYS_REBOOT = 208 // { int|sys||reboot(int opt, char *bootstr); } + SYS_POLL = 209 // { int|sys||poll(struct pollfd *fds, u_int nfds, int timeout); } + SYS_SEMGET = 221 // { int|sys||semget(key_t key, int nsems, int semflg); } + SYS_SEMOP = 222 // { int|sys||semop(int semid, struct sembuf *sops, size_t nsops); } + SYS_SEMCONFIG = 223 // { int|sys||semconfig(int flag); } + SYS_MSGGET = 225 // { int|sys||msgget(key_t key, int msgflg); } + SYS_MSGSND = 226 // { int|sys||msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); } + SYS_MSGRCV = 227 // { ssize_t|sys||msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); } + SYS_SHMAT = 228 // { void *|sys||shmat(int shmid, const void *shmaddr, int shmflg); } + SYS_SHMDT = 230 // { int|sys||shmdt(const void *shmaddr); } + SYS_SHMGET = 231 // { int|sys||shmget(key_t key, size_t size, int shmflg); } + SYS_TIMER_CREATE = 235 // { int|sys||timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid); } + SYS_TIMER_DELETE = 236 // { int|sys||timer_delete(timer_t timerid); } + SYS_TIMER_GETOVERRUN = 239 // { int|sys||timer_getoverrun(timer_t timerid); } + SYS_FDATASYNC = 241 // { int|sys||fdatasync(int fd); } + SYS_MLOCKALL = 242 // { int|sys||mlockall(int flags); } + SYS_MUNLOCKALL = 243 // { int|sys||munlockall(void); } + SYS_SIGQUEUEINFO = 245 // { int|sys||sigqueueinfo(pid_t pid, const siginfo_t *info); } + SYS_MODCTL = 246 // { int|sys||modctl(int cmd, void *arg); } + SYS___POSIX_RENAME = 270 // { int|sys||__posix_rename(const char *from, const char *to); } + SYS_SWAPCTL = 271 // { int|sys||swapctl(int cmd, void *arg, int misc); } + SYS_MINHERIT = 273 // { int|sys||minherit(void *addr, size_t len, int inherit); } + SYS_LCHMOD = 274 // { int|sys||lchmod(const char *path, mode_t mode); } + SYS_LCHOWN = 275 // { int|sys||lchown(const char *path, uid_t uid, gid_t gid); } + SYS___POSIX_CHOWN = 283 // { int|sys||__posix_chown(const char *path, uid_t uid, gid_t gid); } + SYS___POSIX_FCHOWN = 284 // { int|sys||__posix_fchown(int fd, uid_t uid, gid_t gid); } + SYS___POSIX_LCHOWN = 285 // { int|sys||__posix_lchown(const char *path, uid_t uid, gid_t gid); } + SYS_GETSID = 286 // { pid_t|sys||getsid(pid_t pid); } + SYS___CLONE = 287 // { pid_t|sys||__clone(int flags, void *stack); } + SYS_FKTRACE = 288 // { int|sys||fktrace(int fd, int ops, int facs, pid_t pid); } + SYS_PREADV = 289 // { ssize_t|sys||preadv(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); } + SYS_PWRITEV = 290 // { ssize_t|sys||pwritev(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); } + SYS___GETCWD = 296 // { int|sys||__getcwd(char *bufp, size_t length); } + SYS_FCHROOT = 297 // { int|sys||fchroot(int fd); } + SYS_LCHFLAGS = 304 // { int|sys||lchflags(const char *path, u_long flags); } + SYS_ISSETUGID = 305 // { int|sys||issetugid(void); } + SYS_UTRACE = 306 // { int|sys||utrace(const char *label, void *addr, size_t len); } + SYS_GETCONTEXT = 307 // { int|sys||getcontext(struct __ucontext *ucp); } + SYS_SETCONTEXT = 308 // { int|sys||setcontext(const struct __ucontext *ucp); } + SYS__LWP_CREATE = 309 // { int|sys||_lwp_create(const struct __ucontext *ucp, u_long flags, lwpid_t *new_lwp); } + SYS__LWP_EXIT = 310 // { int|sys||_lwp_exit(void); } + SYS__LWP_SELF = 311 // { lwpid_t|sys||_lwp_self(void); } + SYS__LWP_WAIT = 312 // { int|sys||_lwp_wait(lwpid_t wait_for, lwpid_t *departed); } + SYS__LWP_SUSPEND = 313 // { int|sys||_lwp_suspend(lwpid_t target); } + SYS__LWP_CONTINUE = 314 // { int|sys||_lwp_continue(lwpid_t target); } + SYS__LWP_WAKEUP = 315 // { int|sys||_lwp_wakeup(lwpid_t target); } + SYS__LWP_GETPRIVATE = 316 // { void *|sys||_lwp_getprivate(void); } + SYS__LWP_SETPRIVATE = 317 // { void|sys||_lwp_setprivate(void *ptr); } + SYS__LWP_KILL = 318 // { int|sys||_lwp_kill(lwpid_t target, int signo); } + SYS__LWP_DETACH = 319 // { int|sys||_lwp_detach(lwpid_t target); } + SYS__LWP_UNPARK = 321 // { int|sys||_lwp_unpark(lwpid_t target, const void *hint); } + SYS__LWP_UNPARK_ALL = 322 // { ssize_t|sys||_lwp_unpark_all(const lwpid_t *targets, size_t ntargets, const void *hint); } + SYS__LWP_SETNAME = 323 // { int|sys||_lwp_setname(lwpid_t target, const char *name); } + SYS__LWP_GETNAME = 324 // { int|sys||_lwp_getname(lwpid_t target, char *name, size_t len); } + SYS__LWP_CTL = 325 // { int|sys||_lwp_ctl(int features, struct lwpctl **address); } + SYS___SIGACTION_SIGTRAMP = 340 // { int|sys||__sigaction_sigtramp(int signum, const struct sigaction *nsa, struct sigaction *osa, const void *tramp, int vers); } + SYS_PMC_GET_INFO = 341 // { int|sys||pmc_get_info(int ctr, int op, void *args); } + SYS_PMC_CONTROL = 342 // { int|sys||pmc_control(int ctr, int op, void *args); } + SYS_RASCTL = 343 // { int|sys||rasctl(void *addr, size_t len, int op); } + SYS_KQUEUE = 344 // { int|sys||kqueue(void); } + SYS__SCHED_SETPARAM = 346 // { int|sys||_sched_setparam(pid_t pid, lwpid_t lid, int policy, const struct sched_param *params); } + SYS__SCHED_GETPARAM = 347 // { int|sys||_sched_getparam(pid_t pid, lwpid_t lid, int *policy, struct sched_param *params); } + SYS__SCHED_SETAFFINITY = 348 // { int|sys||_sched_setaffinity(pid_t pid, lwpid_t lid, size_t size, const cpuset_t *cpuset); } + SYS__SCHED_GETAFFINITY = 349 // { int|sys||_sched_getaffinity(pid_t pid, lwpid_t lid, size_t size, cpuset_t *cpuset); } + SYS_SCHED_YIELD = 350 // { int|sys||sched_yield(void); } + SYS_FSYNC_RANGE = 354 // { int|sys||fsync_range(int fd, int flags, off_t start, off_t length); } + SYS_UUIDGEN = 355 // { int|sys||uuidgen(struct uuid *store, int count); } + SYS_GETVFSSTAT = 356 // { int|sys||getvfsstat(struct statvfs *buf, size_t bufsize, int flags); } + SYS_STATVFS1 = 357 // { int|sys||statvfs1(const char *path, struct statvfs *buf, int flags); } + SYS_FSTATVFS1 = 358 // { int|sys||fstatvfs1(int fd, struct statvfs *buf, int flags); } + SYS_EXTATTRCTL = 360 // { int|sys||extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); } + SYS_EXTATTR_SET_FILE = 361 // { int|sys||extattr_set_file(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); } + SYS_EXTATTR_GET_FILE = 362 // { ssize_t|sys||extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } + SYS_EXTATTR_DELETE_FILE = 363 // { int|sys||extattr_delete_file(const char *path, int attrnamespace, const char *attrname); } + SYS_EXTATTR_SET_FD = 364 // { int|sys||extattr_set_fd(int fd, int attrnamespace, const char *attrname, const void *data, size_t nbytes); } + SYS_EXTATTR_GET_FD = 365 // { ssize_t|sys||extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); } + SYS_EXTATTR_DELETE_FD = 366 // { int|sys||extattr_delete_fd(int fd, int attrnamespace, const char *attrname); } + SYS_EXTATTR_SET_LINK = 367 // { int|sys||extattr_set_link(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); } + SYS_EXTATTR_GET_LINK = 368 // { ssize_t|sys||extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } + SYS_EXTATTR_DELETE_LINK = 369 // { int|sys||extattr_delete_link(const char *path, int attrnamespace, const char *attrname); } + SYS_EXTATTR_LIST_FD = 370 // { ssize_t|sys||extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); } + SYS_EXTATTR_LIST_FILE = 371 // { ssize_t|sys||extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); } + SYS_EXTATTR_LIST_LINK = 372 // { ssize_t|sys||extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); } + SYS_SETXATTR = 375 // { int|sys||setxattr(const char *path, const char *name, const void *value, size_t size, int flags); } + SYS_LSETXATTR = 376 // { int|sys||lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags); } + SYS_FSETXATTR = 377 // { int|sys||fsetxattr(int fd, const char *name, const void *value, size_t size, int flags); } + SYS_GETXATTR = 378 // { int|sys||getxattr(const char *path, const char *name, void *value, size_t size); } + SYS_LGETXATTR = 379 // { int|sys||lgetxattr(const char *path, const char *name, void *value, size_t size); } + SYS_FGETXATTR = 380 // { int|sys||fgetxattr(int fd, const char *name, void *value, size_t size); } + SYS_LISTXATTR = 381 // { int|sys||listxattr(const char *path, char *list, size_t size); } + SYS_LLISTXATTR = 382 // { int|sys||llistxattr(const char *path, char *list, size_t size); } + SYS_FLISTXATTR = 383 // { int|sys||flistxattr(int fd, char *list, size_t size); } + SYS_REMOVEXATTR = 384 // { int|sys||removexattr(const char *path, const char *name); } + SYS_LREMOVEXATTR = 385 // { int|sys||lremovexattr(const char *path, const char *name); } + SYS_FREMOVEXATTR = 386 // { int|sys||fremovexattr(int fd, const char *name); } + SYS_GETDENTS = 390 // { int|sys|30|getdents(int fd, char *buf, size_t count); } + SYS_SOCKET = 394 // { int|sys|30|socket(int domain, int type, int protocol); } + SYS_GETFH = 395 // { int|sys|30|getfh(const char *fname, void *fhp, size_t *fh_size); } + SYS_MOUNT = 410 // { int|sys|50|mount(const char *type, const char *path, int flags, void *data, size_t data_len); } + SYS_MREMAP = 411 // { void *|sys||mremap(void *old_address, size_t old_size, void *new_address, size_t new_size, int flags); } + SYS_PSET_CREATE = 412 // { int|sys||pset_create(psetid_t *psid); } + SYS_PSET_DESTROY = 413 // { int|sys||pset_destroy(psetid_t psid); } + SYS_PSET_ASSIGN = 414 // { int|sys||pset_assign(psetid_t psid, cpuid_t cpuid, psetid_t *opsid); } + SYS__PSET_BIND = 415 // { int|sys||_pset_bind(idtype_t idtype, id_t first_id, id_t second_id, psetid_t psid, psetid_t *opsid); } + SYS_POSIX_FADVISE = 416 // { int|sys|50|posix_fadvise(int fd, int PAD, off_t offset, off_t len, int advice); } + SYS_SELECT = 417 // { int|sys|50|select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); } + SYS_GETTIMEOFDAY = 418 // { int|sys|50|gettimeofday(struct timeval *tp, void *tzp); } + SYS_SETTIMEOFDAY = 419 // { int|sys|50|settimeofday(const struct timeval *tv, const void *tzp); } + SYS_UTIMES = 420 // { int|sys|50|utimes(const char *path, const struct timeval *tptr); } + SYS_ADJTIME = 421 // { int|sys|50|adjtime(const struct timeval *delta, struct timeval *olddelta); } + SYS_FUTIMES = 423 // { int|sys|50|futimes(int fd, const struct timeval *tptr); } + SYS_LUTIMES = 424 // { int|sys|50|lutimes(const char *path, const struct timeval *tptr); } + SYS_SETITIMER = 425 // { int|sys|50|setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); } + SYS_GETITIMER = 426 // { int|sys|50|getitimer(int which, struct itimerval *itv); } + SYS_CLOCK_GETTIME = 427 // { int|sys|50|clock_gettime(clockid_t clock_id, struct timespec *tp); } + SYS_CLOCK_SETTIME = 428 // { int|sys|50|clock_settime(clockid_t clock_id, const struct timespec *tp); } + SYS_CLOCK_GETRES = 429 // { int|sys|50|clock_getres(clockid_t clock_id, struct timespec *tp); } + SYS_NANOSLEEP = 430 // { int|sys|50|nanosleep(const struct timespec *rqtp, struct timespec *rmtp); } + SYS___SIGTIMEDWAIT = 431 // { int|sys|50|__sigtimedwait(const sigset_t *set, siginfo_t *info, struct timespec *timeout); } + SYS__LWP_PARK = 434 // { int|sys|50|_lwp_park(const struct timespec *ts, lwpid_t unpark, const void *hint, const void *unparkhint); } + SYS_KEVENT = 435 // { int|sys|50|kevent(int fd, const struct kevent *changelist, size_t nchanges, struct kevent *eventlist, size_t nevents, const struct timespec *timeout); } + SYS_PSELECT = 436 // { int|sys|50|pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); } + SYS_POLLTS = 437 // { int|sys|50|pollts(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); } + SYS_STAT = 439 // { int|sys|50|stat(const char *path, struct stat *ub); } + SYS_FSTAT = 440 // { int|sys|50|fstat(int fd, struct stat *sb); } + SYS_LSTAT = 441 // { int|sys|50|lstat(const char *path, struct stat *ub); } + SYS___SEMCTL = 442 // { int|sys|50|__semctl(int semid, int semnum, int cmd, ... union __semun *arg); } + SYS_SHMCTL = 443 // { int|sys|50|shmctl(int shmid, int cmd, struct shmid_ds *buf); } + SYS_MSGCTL = 444 // { int|sys|50|msgctl(int msqid, int cmd, struct msqid_ds *buf); } + SYS_GETRUSAGE = 445 // { int|sys|50|getrusage(int who, struct rusage *rusage); } + SYS_TIMER_SETTIME = 446 // { int|sys|50|timer_settime(timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); } + SYS_TIMER_GETTIME = 447 // { int|sys|50|timer_gettime(timer_t timerid, struct itimerspec *value); } + SYS_NTP_GETTIME = 448 // { int|sys|50|ntp_gettime(struct ntptimeval *ntvp); } + SYS_WAIT4 = 449 // { int|sys|50|wait4(pid_t pid, int *status, int options, struct rusage *rusage); } + SYS_MKNOD = 450 // { int|sys|50|mknod(const char *path, mode_t mode, dev_t dev); } + SYS_FHSTAT = 451 // { int|sys|50|fhstat(const void *fhp, size_t fh_size, struct stat *sb); } + SYS_PIPE2 = 453 // { int|sys||pipe2(int *fildes, int flags); } + SYS_DUP3 = 454 // { int|sys||dup3(int from, int to, int flags); } + SYS_KQUEUE1 = 455 // { int|sys||kqueue1(int flags); } + SYS_PACCEPT = 456 // { int|sys||paccept(int s, struct sockaddr *name, socklen_t *anamelen, const sigset_t *mask, int flags); } + SYS_LINKAT = 457 // { int|sys||linkat(int fd1, const char *name1, int fd2, const char *name2, int flags); } + SYS_RENAMEAT = 458 // { int|sys||renameat(int fromfd, const char *from, int tofd, const char *to); } + SYS_MKFIFOAT = 459 // { int|sys||mkfifoat(int fd, const char *path, mode_t mode); } + SYS_MKNODAT = 460 // { int|sys||mknodat(int fd, const char *path, mode_t mode, uint32_t dev); } + SYS_MKDIRAT = 461 // { int|sys||mkdirat(int fd, const char *path, mode_t mode); } + SYS_FACCESSAT = 462 // { int|sys||faccessat(int fd, const char *path, int amode, int flag); } + SYS_FCHMODAT = 463 // { int|sys||fchmodat(int fd, const char *path, mode_t mode, int flag); } + SYS_FCHOWNAT = 464 // { int|sys||fchownat(int fd, const char *path, uid_t owner, gid_t group, int flag); } + SYS_FEXECVE = 465 // { int|sys||fexecve(int fd, char * const *argp, char * const *envp); } + SYS_FSTATAT = 466 // { int|sys||fstatat(int fd, const char *path, struct stat *buf, int flag); } + SYS_UTIMENSAT = 467 // { int|sys||utimensat(int fd, const char *path, const struct timespec *tptr, int flag); } + SYS_OPENAT = 468 // { int|sys||openat(int fd, const char *path, int oflags, ... mode_t mode); } + SYS_READLINKAT = 469 // { int|sys||readlinkat(int fd, const char *path, char *buf, size_t bufsize); } + SYS_SYMLINKAT = 470 // { int|sys||symlinkat(const char *path1, int fd, const char *path2); } + SYS_UNLINKAT = 471 // { int|sys||unlinkat(int fd, const char *path, int flag); } + SYS_FUTIMENS = 472 // { int|sys||futimens(int fd, const struct timespec *tptr); } + SYS___QUOTACTL = 473 // { int|sys||__quotactl(const char *path, struct quotactl_args *args); } + SYS_POSIX_SPAWN = 474 // { int|sys||posix_spawn(pid_t *pid, const char *path, const struct posix_spawn_file_actions *file_actions, const struct posix_spawnattr *attrp, char *const *argv, char *const *envp); } + SYS_RECVMMSG = 475 // { int|sys||recvmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags, struct timespec *timeout); } + SYS_SENDMMSG = 476 // { int|sys||sendmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags); } +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go new file mode 100644 index 0000000..3e8ce2a --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go @@ -0,0 +1,207 @@ +// mksysnum_openbsd.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build 386,openbsd + +package unix + +const ( + SYS_EXIT = 1 // { void sys_exit(int rval); } + SYS_FORK = 2 // { int sys_fork(void); } + SYS_READ = 3 // { ssize_t sys_read(int fd, void *buf, size_t nbyte); } + SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, \ + SYS_OPEN = 5 // { int sys_open(const char *path, \ + SYS_CLOSE = 6 // { int sys_close(int fd); } + SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, \ + SYS_LINK = 9 // { int sys_link(const char *path, const char *link); } + SYS_UNLINK = 10 // { int sys_unlink(const char *path); } + SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, \ + SYS_CHDIR = 12 // { int sys_chdir(const char *path); } + SYS_FCHDIR = 13 // { int sys_fchdir(int fd); } + SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, \ + SYS_CHMOD = 15 // { int sys_chmod(const char *path, mode_t mode); } + SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, \ + SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break + SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); } + SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, \ + SYS_GETPID = 20 // { pid_t sys_getpid(void); } + SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, \ + SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); } + SYS_SETUID = 23 // { int sys_setuid(uid_t uid); } + SYS_GETUID = 24 // { uid_t sys_getuid(void); } + SYS_GETEUID = 25 // { uid_t sys_geteuid(void); } + SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, \ + SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, \ + SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, \ + SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, \ + SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, \ + SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, \ + SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, \ + SYS_ACCESS = 33 // { int sys_access(const char *path, int flags); } + SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); } + SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); } + SYS_SYNC = 36 // { void sys_sync(void); } + SYS_KILL = 37 // { int sys_kill(int pid, int signum); } + SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); } + SYS_GETPPID = 39 // { pid_t sys_getppid(void); } + SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); } + SYS_DUP = 41 // { int sys_dup(int fd); } + SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, \ + SYS_GETEGID = 43 // { gid_t sys_getegid(void); } + SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, \ + SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, \ + SYS_SIGACTION = 46 // { int sys_sigaction(int signum, \ + SYS_GETGID = 47 // { gid_t sys_getgid(void); } + SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); } + SYS_GETLOGIN = 49 // { int sys_getlogin(char *namebuf, u_int namelen); } + SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); } + SYS_ACCT = 51 // { int sys_acct(const char *path); } + SYS_SIGPENDING = 52 // { int sys_sigpending(void); } + SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); } + SYS_IOCTL = 54 // { int sys_ioctl(int fd, \ + SYS_REBOOT = 55 // { int sys_reboot(int opt); } + SYS_REVOKE = 56 // { int sys_revoke(const char *path); } + SYS_SYMLINK = 57 // { int sys_symlink(const char *path, \ + SYS_READLINK = 58 // { int sys_readlink(const char *path, char *buf, \ + SYS_EXECVE = 59 // { int sys_execve(const char *path, \ + SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); } + SYS_CHROOT = 61 // { int sys_chroot(const char *path); } + SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, \ + SYS_STATFS = 63 // { int sys_statfs(const char *path, \ + SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); } + SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, \ + SYS_VFORK = 66 // { int sys_vfork(void); } + SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, \ + SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, \ + SYS_SETITIMER = 69 // { int sys_setitimer(int which, \ + SYS_GETITIMER = 70 // { int sys_getitimer(int which, \ + SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, \ + SYS_KEVENT = 72 // { int sys_kevent(int fd, \ + SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); } + SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, \ + SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, \ + SYS_UTIMES = 76 // { int sys_utimes(const char *path, \ + SYS_FUTIMES = 77 // { int sys_futimes(int fd, \ + SYS_MINCORE = 78 // { int sys_mincore(void *addr, size_t len, \ + SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, \ + SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, \ + SYS_GETPGRP = 81 // { int sys_getpgrp(void); } + SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, int pgid); } + SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, \ + SYS_FUTIMENS = 85 // { int sys_futimens(int fd, \ + SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, \ + SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, \ + SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, \ + SYS_DUP2 = 90 // { int sys_dup2(int from, int to); } + SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, \ + SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); } + SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, \ + SYS_FSYNC = 95 // { int sys_fsync(int fd); } + SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); } + SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); } + SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, \ + SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); } + SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); } + SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); } + SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, \ + SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, \ + SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); } + SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, \ + SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, \ + SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); } + SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, \ + SYS_READV = 120 // { ssize_t sys_readv(int fd, \ + SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, \ + SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); } + SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); } + SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); } + SYS_SETREGID = 127 // { int sys_setregid(gid_t rgid, gid_t egid); } + SYS_RENAME = 128 // { int sys_rename(const char *from, const char *to); } + SYS_FLOCK = 131 // { int sys_flock(int fd, int how); } + SYS_MKFIFO = 132 // { int sys_mkfifo(const char *path, mode_t mode); } + SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, \ + SYS_SHUTDOWN = 134 // { int sys_shutdown(int s, int how); } + SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, \ + SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); } + SYS_RMDIR = 137 // { int sys_rmdir(const char *path); } + SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, \ + SYS_SETSID = 147 // { int sys_setsid(void); } + SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, \ + SYS_NFSSVC = 155 // { int sys_nfssvc(int flag, void *argp); } + SYS_GETFH = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); } + SYS_SYSARCH = 165 // { int sys_sysarch(int op, void *parms); } + SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, \ + SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, \ + SYS_SETGID = 181 // { int sys_setgid(gid_t gid); } + SYS_SETEGID = 182 // { int sys_setegid(gid_t egid); } + SYS_SETEUID = 183 // { int sys_seteuid(uid_t euid); } + SYS_PATHCONF = 191 // { long sys_pathconf(const char *path, int name); } + SYS_FPATHCONF = 192 // { long sys_fpathconf(int fd, int name); } + SYS_SWAPCTL = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); } + SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, \ + SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, \ + SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, \ + SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, \ + SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, \ + SYS_FTRUNCATE = 201 // { int sys_ftruncate(int fd, int pad, off_t length); } + SYS___SYSCTL = 202 // { int sys___sysctl(const int *name, u_int namelen, \ + SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); } + SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); } + SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); } + SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, \ + SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); } + SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); } + SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, \ + SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \ + SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, \ + SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); } + SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, \ + SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, \ + SYS_ISSETUGID = 253 // { int sys_issetugid(void); } + SYS_LCHOWN = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); } + SYS_GETSID = 255 // { pid_t sys_getsid(pid_t pid); } + SYS_MSYNC = 256 // { int sys_msync(void *addr, size_t len, int flags); } + SYS_PIPE = 263 // { int sys_pipe(int *fdp); } + SYS_FHOPEN = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); } + SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, \ + SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, \ + SYS_KQUEUE = 269 // { int sys_kqueue(void); } + SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); } + SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); } + SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, \ + SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, \ + SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, \ + SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, \ + SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, \ + SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); } + SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, \ + SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); } + SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, \ + SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, \ + SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, \ + SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, \ + SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, \ + SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); } + SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); } + SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, \ + SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); } + SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, \ + SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); } + SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, \ + SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); } + SYS_GETRTABLE = 311 // { int sys_getrtable(void); } + SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, \ + SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, \ + SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, \ + SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, \ + SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, \ + SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, \ + SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, \ + SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, \ + SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, \ + SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, \ + SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, \ + SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, \ + SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); } + SYS___GET_TCB = 330 // { void *sys___get_tcb(void); } +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go new file mode 100644 index 0000000..bd28146 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go @@ -0,0 +1,207 @@ +// mksysnum_openbsd.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build amd64,openbsd + +package unix + +const ( + SYS_EXIT = 1 // { void sys_exit(int rval); } + SYS_FORK = 2 // { int sys_fork(void); } + SYS_READ = 3 // { ssize_t sys_read(int fd, void *buf, size_t nbyte); } + SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, \ + SYS_OPEN = 5 // { int sys_open(const char *path, \ + SYS_CLOSE = 6 // { int sys_close(int fd); } + SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, \ + SYS_LINK = 9 // { int sys_link(const char *path, const char *link); } + SYS_UNLINK = 10 // { int sys_unlink(const char *path); } + SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, \ + SYS_CHDIR = 12 // { int sys_chdir(const char *path); } + SYS_FCHDIR = 13 // { int sys_fchdir(int fd); } + SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, \ + SYS_CHMOD = 15 // { int sys_chmod(const char *path, mode_t mode); } + SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, \ + SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break + SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); } + SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, \ + SYS_GETPID = 20 // { pid_t sys_getpid(void); } + SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, \ + SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); } + SYS_SETUID = 23 // { int sys_setuid(uid_t uid); } + SYS_GETUID = 24 // { uid_t sys_getuid(void); } + SYS_GETEUID = 25 // { uid_t sys_geteuid(void); } + SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, \ + SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, \ + SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, \ + SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, \ + SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, \ + SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, \ + SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, \ + SYS_ACCESS = 33 // { int sys_access(const char *path, int flags); } + SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); } + SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); } + SYS_SYNC = 36 // { void sys_sync(void); } + SYS_KILL = 37 // { int sys_kill(int pid, int signum); } + SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); } + SYS_GETPPID = 39 // { pid_t sys_getppid(void); } + SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); } + SYS_DUP = 41 // { int sys_dup(int fd); } + SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, \ + SYS_GETEGID = 43 // { gid_t sys_getegid(void); } + SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, \ + SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, \ + SYS_SIGACTION = 46 // { int sys_sigaction(int signum, \ + SYS_GETGID = 47 // { gid_t sys_getgid(void); } + SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); } + SYS_GETLOGIN = 49 // { int sys_getlogin(char *namebuf, u_int namelen); } + SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); } + SYS_ACCT = 51 // { int sys_acct(const char *path); } + SYS_SIGPENDING = 52 // { int sys_sigpending(void); } + SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); } + SYS_IOCTL = 54 // { int sys_ioctl(int fd, \ + SYS_REBOOT = 55 // { int sys_reboot(int opt); } + SYS_REVOKE = 56 // { int sys_revoke(const char *path); } + SYS_SYMLINK = 57 // { int sys_symlink(const char *path, \ + SYS_READLINK = 58 // { int sys_readlink(const char *path, char *buf, \ + SYS_EXECVE = 59 // { int sys_execve(const char *path, \ + SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); } + SYS_CHROOT = 61 // { int sys_chroot(const char *path); } + SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, \ + SYS_STATFS = 63 // { int sys_statfs(const char *path, \ + SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); } + SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, \ + SYS_VFORK = 66 // { int sys_vfork(void); } + SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, \ + SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, \ + SYS_SETITIMER = 69 // { int sys_setitimer(int which, \ + SYS_GETITIMER = 70 // { int sys_getitimer(int which, \ + SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, \ + SYS_KEVENT = 72 // { int sys_kevent(int fd, \ + SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); } + SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, \ + SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, \ + SYS_UTIMES = 76 // { int sys_utimes(const char *path, \ + SYS_FUTIMES = 77 // { int sys_futimes(int fd, \ + SYS_MINCORE = 78 // { int sys_mincore(void *addr, size_t len, \ + SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, \ + SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, \ + SYS_GETPGRP = 81 // { int sys_getpgrp(void); } + SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, int pgid); } + SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, \ + SYS_FUTIMENS = 85 // { int sys_futimens(int fd, \ + SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, \ + SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, \ + SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, \ + SYS_DUP2 = 90 // { int sys_dup2(int from, int to); } + SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, \ + SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); } + SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, \ + SYS_FSYNC = 95 // { int sys_fsync(int fd); } + SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); } + SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); } + SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, \ + SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); } + SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); } + SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); } + SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, \ + SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, \ + SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); } + SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, \ + SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, \ + SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); } + SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, \ + SYS_READV = 120 // { ssize_t sys_readv(int fd, \ + SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, \ + SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); } + SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); } + SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); } + SYS_SETREGID = 127 // { int sys_setregid(gid_t rgid, gid_t egid); } + SYS_RENAME = 128 // { int sys_rename(const char *from, const char *to); } + SYS_FLOCK = 131 // { int sys_flock(int fd, int how); } + SYS_MKFIFO = 132 // { int sys_mkfifo(const char *path, mode_t mode); } + SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, \ + SYS_SHUTDOWN = 134 // { int sys_shutdown(int s, int how); } + SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, \ + SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); } + SYS_RMDIR = 137 // { int sys_rmdir(const char *path); } + SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, \ + SYS_SETSID = 147 // { int sys_setsid(void); } + SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, \ + SYS_NFSSVC = 155 // { int sys_nfssvc(int flag, void *argp); } + SYS_GETFH = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); } + SYS_SYSARCH = 165 // { int sys_sysarch(int op, void *parms); } + SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, \ + SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, \ + SYS_SETGID = 181 // { int sys_setgid(gid_t gid); } + SYS_SETEGID = 182 // { int sys_setegid(gid_t egid); } + SYS_SETEUID = 183 // { int sys_seteuid(uid_t euid); } + SYS_PATHCONF = 191 // { long sys_pathconf(const char *path, int name); } + SYS_FPATHCONF = 192 // { long sys_fpathconf(int fd, int name); } + SYS_SWAPCTL = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); } + SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, \ + SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, \ + SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, \ + SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, \ + SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, \ + SYS_FTRUNCATE = 201 // { int sys_ftruncate(int fd, int pad, off_t length); } + SYS___SYSCTL = 202 // { int sys___sysctl(const int *name, u_int namelen, \ + SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); } + SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); } + SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); } + SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, \ + SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); } + SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); } + SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, \ + SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \ + SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, \ + SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); } + SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, \ + SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, \ + SYS_ISSETUGID = 253 // { int sys_issetugid(void); } + SYS_LCHOWN = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); } + SYS_GETSID = 255 // { pid_t sys_getsid(pid_t pid); } + SYS_MSYNC = 256 // { int sys_msync(void *addr, size_t len, int flags); } + SYS_PIPE = 263 // { int sys_pipe(int *fdp); } + SYS_FHOPEN = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); } + SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, \ + SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, \ + SYS_KQUEUE = 269 // { int sys_kqueue(void); } + SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); } + SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); } + SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, \ + SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, \ + SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, \ + SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, \ + SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, \ + SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); } + SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, \ + SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); } + SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, \ + SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, \ + SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, \ + SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, \ + SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, \ + SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); } + SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); } + SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, \ + SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); } + SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, \ + SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); } + SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, \ + SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); } + SYS_GETRTABLE = 311 // { int sys_getrtable(void); } + SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, \ + SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, \ + SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, \ + SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, \ + SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, \ + SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, \ + SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, \ + SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, \ + SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, \ + SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, \ + SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, \ + SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, \ + SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); } + SYS___GET_TCB = 330 // { void *sys___get_tcb(void); } +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go new file mode 100644 index 0000000..c708659 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go @@ -0,0 +1,13 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build amd64,solaris + +package unix + +// TODO(aram): remove these before Go 1.3. +const ( + SYS_EXECVE = 59 + SYS_FCNTL = 62 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go new file mode 100644 index 0000000..2de1d44 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go @@ -0,0 +1,447 @@ +// +build 386,darwin +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_darwin.go + +package unix + +const ( + sizeofPtr = 0x4 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x4 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int32 + _C_long_long int64 +) + +type Timespec struct { + Sec int32 + Nsec int32 +} + +type Timeval struct { + Sec int32 + Usec int32 +} + +type Timeval32 struct{} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int32 + Ixrss int32 + Idrss int32 + Isrss int32 + Minflt int32 + Majflt int32 + Nswap int32 + Inblock int32 + Oublock int32 + Msgsnd int32 + Msgrcv int32 + Nsignals int32 + Nvcsw int32 + Nivcsw int32 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev int32 + Mode uint16 + Nlink uint16 + Ino uint64 + Uid uint32 + Gid uint32 + Rdev int32 + Atimespec Timespec + Mtimespec Timespec + Ctimespec Timespec + Birthtimespec Timespec + Size int64 + Blocks int64 + Blksize int32 + Flags uint32 + Gen uint32 + Lspare int32 + Qspare [2]int64 +} + +type Statfs_t struct { + Bsize uint32 + Iosize int32 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Files uint64 + Ffree uint64 + Fsid Fsid + Owner uint32 + Type uint32 + Flags uint32 + Fssubtype uint32 + Fstypename [16]int8 + Mntonname [1024]int8 + Mntfromname [1024]int8 + Reserved [8]uint32 +} + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 +} + +type Fstore_t struct { + Flags uint32 + Posmode int32 + Offset int64 + Length int64 + Bytesalloc int64 +} + +type Radvisory_t struct { + Offset int64 + Count int32 +} + +type Fbootstraptransfer_t struct { + Offset int64 + Length uint32 + Buffer *byte +} + +type Log2phys_t struct { + Flags uint32 + Contigbytes int64 + Devoffset int64 +} + +type Fsid struct { + Val [2]int32 +} + +type Dirent struct { + Ino uint64 + Seekoff uint64 + Reclen uint16 + Namlen uint16 + Type uint8 + Name [1024]int8 + Pad_cgo_0 [3]byte +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [12]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint32 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Iov *Iovec + Iovlen int32 + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet4Pktinfo struct { + Ifindex uint32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x14 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x1c + SizeofCmsghdr = 0xc + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint32 + Filter int16 + Flags uint16 + Fflags uint32 + Data int32 + Udata *byte +} + +type FdSet struct { + Bits [32]int32 +} + +const ( + SizeofIfMsghdr = 0x70 + SizeofIfData = 0x60 + SizeofIfaMsghdr = 0x14 + SizeofIfmaMsghdr = 0x10 + SizeofIfmaMsghdr2 = 0x14 + SizeofRtMsghdr = 0x5c + SizeofRtMetrics = 0x38 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData +} + +type IfData struct { + Type uint8 + Typelen uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Recvquota uint8 + Xmitquota uint8 + Unused1 uint8 + Mtu uint32 + Metric uint32 + Baudrate uint32 + Ipackets uint32 + Ierrors uint32 + Opackets uint32 + Oerrors uint32 + Collisions uint32 + Ibytes uint32 + Obytes uint32 + Imcasts uint32 + Omcasts uint32 + Iqdrops uint32 + Noproto uint32 + Recvtiming uint32 + Xmittiming uint32 + Lastchange Timeval + Unused2 uint32 + Hwassist uint32 + Reserved1 uint32 + Reserved2 uint32 +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Metric int32 +} + +type IfmaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte +} + +type IfmaMsghdr2 struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Refcount int32 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Use int32 + Inits uint32 + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint32 + Mtu uint32 + Hopcount uint32 + Expire int32 + Recvpipe uint32 + Sendpipe uint32 + Ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Pksent uint32 + Filler [4]uint32 +} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x8 + SizeofBpfProgram = 0x8 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x14 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint32 + Drop uint32 +} + +type BpfProgram struct { + Len uint32 + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp Timeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [2]byte +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go new file mode 100644 index 0000000..0446578 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go @@ -0,0 +1,462 @@ +// +build amd64,darwin +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_darwin.go + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int32 + Pad_cgo_0 [4]byte +} + +type Timeval32 struct { + Sec int32 + Usec int32 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev int32 + Mode uint16 + Nlink uint16 + Ino uint64 + Uid uint32 + Gid uint32 + Rdev int32 + Pad_cgo_0 [4]byte + Atimespec Timespec + Mtimespec Timespec + Ctimespec Timespec + Birthtimespec Timespec + Size int64 + Blocks int64 + Blksize int32 + Flags uint32 + Gen uint32 + Lspare int32 + Qspare [2]int64 +} + +type Statfs_t struct { + Bsize uint32 + Iosize int32 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Files uint64 + Ffree uint64 + Fsid Fsid + Owner uint32 + Type uint32 + Flags uint32 + Fssubtype uint32 + Fstypename [16]int8 + Mntonname [1024]int8 + Mntfromname [1024]int8 + Reserved [8]uint32 +} + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 +} + +type Fstore_t struct { + Flags uint32 + Posmode int32 + Offset int64 + Length int64 + Bytesalloc int64 +} + +type Radvisory_t struct { + Offset int64 + Count int32 + Pad_cgo_0 [4]byte +} + +type Fbootstraptransfer_t struct { + Offset int64 + Length uint64 + Buffer *byte +} + +type Log2phys_t struct { + Flags uint32 + Pad_cgo_0 [8]byte + Pad_cgo_1 [8]byte +} + +type Fsid struct { + Val [2]int32 +} + +type Dirent struct { + Ino uint64 + Seekoff uint64 + Reclen uint16 + Namlen uint16 + Type uint8 + Name [1024]int8 + Pad_cgo_0 [3]byte +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [12]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *Iovec + Iovlen int32 + Pad_cgo_1 [4]byte + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet4Pktinfo struct { + Ifindex uint32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x14 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x30 + SizeofCmsghdr = 0xc + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint64 + Filter int16 + Flags uint16 + Fflags uint32 + Data int64 + Udata *byte +} + +type FdSet struct { + Bits [32]int32 +} + +const ( + SizeofIfMsghdr = 0x70 + SizeofIfData = 0x60 + SizeofIfaMsghdr = 0x14 + SizeofIfmaMsghdr = 0x10 + SizeofIfmaMsghdr2 = 0x14 + SizeofRtMsghdr = 0x5c + SizeofRtMetrics = 0x38 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData +} + +type IfData struct { + Type uint8 + Typelen uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Recvquota uint8 + Xmitquota uint8 + Unused1 uint8 + Mtu uint32 + Metric uint32 + Baudrate uint32 + Ipackets uint32 + Ierrors uint32 + Opackets uint32 + Oerrors uint32 + Collisions uint32 + Ibytes uint32 + Obytes uint32 + Imcasts uint32 + Omcasts uint32 + Iqdrops uint32 + Noproto uint32 + Recvtiming uint32 + Xmittiming uint32 + Lastchange Timeval32 + Unused2 uint32 + Hwassist uint32 + Reserved1 uint32 + Reserved2 uint32 +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Metric int32 +} + +type IfmaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte +} + +type IfmaMsghdr2 struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Refcount int32 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Use int32 + Inits uint32 + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint32 + Mtu uint32 + Hopcount uint32 + Expire int32 + Recvpipe uint32 + Sendpipe uint32 + Ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Pksent uint32 + Filler [4]uint32 +} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x8 + SizeofBpfProgram = 0x10 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x14 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint32 + Drop uint32 +} + +type BpfProgram struct { + Len uint32 + Pad_cgo_0 [4]byte + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp Timeval32 + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [2]byte +} + +type Termios struct { + Iflag uint64 + Oflag uint64 + Cflag uint64 + Lflag uint64 + Cc [20]uint8 + Pad_cgo_0 [4]byte + Ispeed uint64 + Ospeed uint64 +} + +const ( + AT_FDCWD = -0x2 + AT_SYMLINK_NOFOLLOW = 0x20 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go new file mode 100644 index 0000000..66df363 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go @@ -0,0 +1,449 @@ +// NOTE: cgo can't generate struct Stat_t and struct Statfs_t yet +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_darwin.go + +// +build arm,darwin + +package unix + +const ( + sizeofPtr = 0x4 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x4 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int32 + _C_long_long int64 +) + +type Timespec struct { + Sec int32 + Nsec int32 +} + +type Timeval struct { + Sec int32 + Usec int32 +} + +type Timeval32 [0]byte + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int32 + Ixrss int32 + Idrss int32 + Isrss int32 + Minflt int32 + Majflt int32 + Nswap int32 + Inblock int32 + Oublock int32 + Msgsnd int32 + Msgrcv int32 + Nsignals int32 + Nvcsw int32 + Nivcsw int32 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev int32 + Mode uint16 + Nlink uint16 + Ino uint64 + Uid uint32 + Gid uint32 + Rdev int32 + Atimespec Timespec + Mtimespec Timespec + Ctimespec Timespec + Birthtimespec Timespec + Size int64 + Blocks int64 + Blksize int32 + Flags uint32 + Gen uint32 + Lspare int32 + Qspare [2]int64 +} + +type Statfs_t struct { + Bsize uint32 + Iosize int32 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Files uint64 + Ffree uint64 + Fsid Fsid + Owner uint32 + Type uint32 + Flags uint32 + Fssubtype uint32 + Fstypename [16]int8 + Mntonname [1024]int8 + Mntfromname [1024]int8 + Reserved [8]uint32 +} + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 +} + +type Fstore_t struct { + Flags uint32 + Posmode int32 + Offset int64 + Length int64 + Bytesalloc int64 +} + +type Radvisory_t struct { + Offset int64 + Count int32 +} + +type Fbootstraptransfer_t struct { + Offset int64 + Length uint32 + Buffer *byte +} + +type Log2phys_t struct { + Flags uint32 + Contigbytes int64 + Devoffset int64 +} + +type Fsid struct { + Val [2]int32 +} + +type Dirent struct { + Ino uint64 + Seekoff uint64 + Reclen uint16 + Namlen uint16 + Type uint8 + Name [1024]int8 + Pad_cgo_0 [3]byte +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [12]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint32 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Iov *Iovec + Iovlen int32 + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet4Pktinfo struct { + Ifindex uint32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x14 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x1c + SizeofCmsghdr = 0xc + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint32 + Filter int16 + Flags uint16 + Fflags uint32 + Data int32 + Udata *byte +} + +type FdSet struct { + Bits [32]int32 +} + +const ( + SizeofIfMsghdr = 0x70 + SizeofIfData = 0x60 + SizeofIfaMsghdr = 0x14 + SizeofIfmaMsghdr = 0x10 + SizeofIfmaMsghdr2 = 0x14 + SizeofRtMsghdr = 0x5c + SizeofRtMetrics = 0x38 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData +} + +type IfData struct { + Type uint8 + Typelen uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Recvquota uint8 + Xmitquota uint8 + Unused1 uint8 + Mtu uint32 + Metric uint32 + Baudrate uint32 + Ipackets uint32 + Ierrors uint32 + Opackets uint32 + Oerrors uint32 + Collisions uint32 + Ibytes uint32 + Obytes uint32 + Imcasts uint32 + Omcasts uint32 + Iqdrops uint32 + Noproto uint32 + Recvtiming uint32 + Xmittiming uint32 + Lastchange Timeval + Unused2 uint32 + Hwassist uint32 + Reserved1 uint32 + Reserved2 uint32 +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Metric int32 +} + +type IfmaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte +} + +type IfmaMsghdr2 struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Refcount int32 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Use int32 + Inits uint32 + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint32 + Mtu uint32 + Hopcount uint32 + Expire int32 + Recvpipe uint32 + Sendpipe uint32 + Ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Pksent uint32 + Filler [4]uint32 +} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x8 + SizeofBpfProgram = 0x8 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x14 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint32 + Drop uint32 +} + +type BpfProgram struct { + Len uint32 + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp Timeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [2]byte +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go new file mode 100644 index 0000000..85d56ea --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go @@ -0,0 +1,457 @@ +// +build arm64,darwin +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_darwin.go + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int32 + Pad_cgo_0 [4]byte +} + +type Timeval32 struct { + Sec int32 + Usec int32 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev int32 + Mode uint16 + Nlink uint16 + Ino uint64 + Uid uint32 + Gid uint32 + Rdev int32 + Pad_cgo_0 [4]byte + Atimespec Timespec + Mtimespec Timespec + Ctimespec Timespec + Birthtimespec Timespec + Size int64 + Blocks int64 + Blksize int32 + Flags uint32 + Gen uint32 + Lspare int32 + Qspare [2]int64 +} + +type Statfs_t struct { + Bsize uint32 + Iosize int32 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Files uint64 + Ffree uint64 + Fsid Fsid + Owner uint32 + Type uint32 + Flags uint32 + Fssubtype uint32 + Fstypename [16]int8 + Mntonname [1024]int8 + Mntfromname [1024]int8 + Reserved [8]uint32 +} + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 +} + +type Fstore_t struct { + Flags uint32 + Posmode int32 + Offset int64 + Length int64 + Bytesalloc int64 +} + +type Radvisory_t struct { + Offset int64 + Count int32 + Pad_cgo_0 [4]byte +} + +type Fbootstraptransfer_t struct { + Offset int64 + Length uint64 + Buffer *byte +} + +type Log2phys_t struct { + Flags uint32 + Pad_cgo_0 [8]byte + Pad_cgo_1 [8]byte +} + +type Fsid struct { + Val [2]int32 +} + +type Dirent struct { + Ino uint64 + Seekoff uint64 + Reclen uint16 + Namlen uint16 + Type uint8 + Name [1024]int8 + Pad_cgo_0 [3]byte +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [12]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *Iovec + Iovlen int32 + Pad_cgo_1 [4]byte + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet4Pktinfo struct { + Ifindex uint32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x14 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x30 + SizeofCmsghdr = 0xc + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint64 + Filter int16 + Flags uint16 + Fflags uint32 + Data int64 + Udata *byte +} + +type FdSet struct { + Bits [32]int32 +} + +const ( + SizeofIfMsghdr = 0x70 + SizeofIfData = 0x60 + SizeofIfaMsghdr = 0x14 + SizeofIfmaMsghdr = 0x10 + SizeofIfmaMsghdr2 = 0x14 + SizeofRtMsghdr = 0x5c + SizeofRtMetrics = 0x38 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData +} + +type IfData struct { + Type uint8 + Typelen uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Recvquota uint8 + Xmitquota uint8 + Unused1 uint8 + Mtu uint32 + Metric uint32 + Baudrate uint32 + Ipackets uint32 + Ierrors uint32 + Opackets uint32 + Oerrors uint32 + Collisions uint32 + Ibytes uint32 + Obytes uint32 + Imcasts uint32 + Omcasts uint32 + Iqdrops uint32 + Noproto uint32 + Recvtiming uint32 + Xmittiming uint32 + Lastchange Timeval32 + Unused2 uint32 + Hwassist uint32 + Reserved1 uint32 + Reserved2 uint32 +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Metric int32 +} + +type IfmaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte +} + +type IfmaMsghdr2 struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Refcount int32 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Use int32 + Inits uint32 + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint32 + Mtu uint32 + Hopcount uint32 + Expire int32 + Recvpipe uint32 + Sendpipe uint32 + Ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Pksent uint32 + Filler [4]uint32 +} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x8 + SizeofBpfProgram = 0x10 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x14 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint32 + Drop uint32 +} + +type BpfProgram struct { + Len uint32 + Pad_cgo_0 [4]byte + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp Timeval32 + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [2]byte +} + +type Termios struct { + Iflag uint64 + Oflag uint64 + Cflag uint64 + Lflag uint64 + Cc [20]uint8 + Pad_cgo_0 [4]byte + Ispeed uint64 + Ospeed uint64 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_dragonfly_386.go b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_386.go new file mode 100644 index 0000000..b7e7ff0 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_386.go @@ -0,0 +1,437 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_dragonfly.go + +// +build 386,dragonfly + +package unix + +const ( + sizeofPtr = 0x4 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x4 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int32 + _C_long_long int64 +) + +type Timespec struct { + Sec int32 + Nsec int32 +} + +type Timeval struct { + Sec int32 + Usec int32 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int32 + Ixrss int32 + Idrss int32 + Isrss int32 + Minflt int32 + Majflt int32 + Nswap int32 + Inblock int32 + Oublock int32 + Msgsnd int32 + Msgrcv int32 + Nsignals int32 + Nvcsw int32 + Nivcsw int32 +} + +type Rlimit struct { + Cur int64 + Max int64 +} + +type _Gid_t uint32 + +const ( + S_IFMT = 0xf000 + S_IFIFO = 0x1000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFBLK = 0x6000 + S_IFREG = 0x8000 + S_IFLNK = 0xa000 + S_IFSOCK = 0xc000 + S_ISUID = 0x800 + S_ISGID = 0x400 + S_ISVTX = 0x200 + S_IRUSR = 0x100 + S_IWUSR = 0x80 + S_IXUSR = 0x40 +) + +type Stat_t struct { + Ino uint64 + Nlink uint32 + Dev uint32 + Mode uint16 + Padding1 uint16 + Uid uint32 + Gid uint32 + Rdev uint32 + Atim Timespec + Mtim Timespec + Ctim Timespec + Size int64 + Blocks int64 + Blksize uint32 + Flags uint32 + Gen uint32 + Lspare int32 + Qspare1 int64 + Qspare2 int64 +} + +type Statfs_t struct { + Spare2 int32 + Bsize int32 + Iosize int32 + Blocks int32 + Bfree int32 + Bavail int32 + Files int32 + Ffree int32 + Fsid Fsid + Owner uint32 + Type int32 + Flags int32 + Syncwrites int32 + Asyncwrites int32 + Fstypename [16]int8 + Mntonname [80]int8 + Syncreads int32 + Asyncreads int32 + Spares1 int16 + Mntfromname [80]int8 + Spares2 int16 + Spare [2]int32 +} + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 +} + +type Dirent struct { + Fileno uint64 + Namlen uint16 + Type uint8 + Unused1 uint8 + Unused2 uint32 + Name [256]int8 +} + +type Fsid struct { + Val [2]int32 +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [12]int8 + Rcf uint16 + Route [16]uint16 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint32 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Iov *Iovec + Iovlen int32 + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x36 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x1c + SizeofCmsghdr = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint32 + Filter int16 + Flags uint16 + Fflags uint32 + Data int32 + Udata *byte +} + +type FdSet struct { + Bits [32]uint32 +} + +const ( + SizeofIfMsghdr = 0x68 + SizeofIfData = 0x58 + SizeofIfaMsghdr = 0x14 + SizeofIfmaMsghdr = 0x10 + SizeofIfAnnounceMsghdr = 0x18 + SizeofRtMsghdr = 0x5c + SizeofRtMetrics = 0x38 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData +} + +type IfData struct { + Type uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Recvquota uint8 + Xmitquota uint8 + Pad_cgo_0 [2]byte + Mtu uint32 + Metric uint32 + Link_state uint32 + Baudrate uint64 + Ipackets uint32 + Ierrors uint32 + Opackets uint32 + Oerrors uint32 + Collisions uint32 + Ibytes uint32 + Obytes uint32 + Imcasts uint32 + Omcasts uint32 + Iqdrops uint32 + Noproto uint32 + Hwassist uint32 + Unused uint32 + Lastchange Timeval +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Metric int32 +} + +type IfmaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte +} + +type IfAnnounceMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Name [16]int8 + What uint16 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Use int32 + Inits uint32 + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint32 + Mtu uint32 + Pksent uint32 + Expire uint32 + Sendpipe uint32 + Ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Recvpipe uint32 + Hopcount uint32 + Mssopt uint16 + Pad uint16 + Msl uint32 + Iwmaxsegs uint32 + Iwcapsegs uint32 +} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x8 + SizeofBpfProgram = 0x8 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x14 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint32 + Drop uint32 +} + +type BpfProgram struct { + Len uint32 + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp Timeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [2]byte +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go new file mode 100644 index 0000000..8a6f4e1 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go @@ -0,0 +1,443 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_dragonfly.go + +// +build amd64,dragonfly + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int64 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur int64 + Max int64 +} + +type _Gid_t uint32 + +const ( + S_IFMT = 0xf000 + S_IFIFO = 0x1000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFBLK = 0x6000 + S_IFREG = 0x8000 + S_IFLNK = 0xa000 + S_IFSOCK = 0xc000 + S_ISUID = 0x800 + S_ISGID = 0x400 + S_ISVTX = 0x200 + S_IRUSR = 0x100 + S_IWUSR = 0x80 + S_IXUSR = 0x40 +) + +type Stat_t struct { + Ino uint64 + Nlink uint32 + Dev uint32 + Mode uint16 + Padding1 uint16 + Uid uint32 + Gid uint32 + Rdev uint32 + Atim Timespec + Mtim Timespec + Ctim Timespec + Size int64 + Blocks int64 + Blksize uint32 + Flags uint32 + Gen uint32 + Lspare int32 + Qspare1 int64 + Qspare2 int64 +} + +type Statfs_t struct { + Spare2 int64 + Bsize int64 + Iosize int64 + Blocks int64 + Bfree int64 + Bavail int64 + Files int64 + Ffree int64 + Fsid Fsid + Owner uint32 + Type int32 + Flags int32 + Pad_cgo_0 [4]byte + Syncwrites int64 + Asyncwrites int64 + Fstypename [16]int8 + Mntonname [80]int8 + Syncreads int64 + Asyncreads int64 + Spares1 int16 + Mntfromname [80]int8 + Spares2 int16 + Pad_cgo_1 [4]byte + Spare [2]int64 +} + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 +} + +type Dirent struct { + Fileno uint64 + Namlen uint16 + Type uint8 + Unused1 uint8 + Unused2 uint32 + Name [256]int8 +} + +type Fsid struct { + Val [2]int32 +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [12]int8 + Rcf uint16 + Route [16]uint16 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *Iovec + Iovlen int32 + Pad_cgo_1 [4]byte + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x36 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x30 + SizeofCmsghdr = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint64 + Filter int16 + Flags uint16 + Fflags uint32 + Data int64 + Udata *byte +} + +type FdSet struct { + Bits [16]uint64 +} + +const ( + SizeofIfMsghdr = 0xb0 + SizeofIfData = 0xa0 + SizeofIfaMsghdr = 0x14 + SizeofIfmaMsghdr = 0x10 + SizeofIfAnnounceMsghdr = 0x18 + SizeofRtMsghdr = 0x98 + SizeofRtMetrics = 0x70 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData +} + +type IfData struct { + Type uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Recvquota uint8 + Xmitquota uint8 + Pad_cgo_0 [2]byte + Mtu uint64 + Metric uint64 + Link_state uint64 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Noproto uint64 + Hwassist uint64 + Unused uint64 + Lastchange Timeval +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Metric int32 +} + +type IfmaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte +} + +type IfAnnounceMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Name [16]int8 + What uint16 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Use int32 + Inits uint64 + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint64 + Mtu uint64 + Pksent uint64 + Expire uint64 + Sendpipe uint64 + Ssthresh uint64 + Rtt uint64 + Rttvar uint64 + Recvpipe uint64 + Hopcount uint64 + Mssopt uint16 + Pad uint16 + Pad_cgo_0 [4]byte + Msl uint64 + Iwmaxsegs uint64 + Iwcapsegs uint64 +} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x8 + SizeofBpfProgram = 0x10 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x20 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint32 + Drop uint32 +} + +type BpfProgram struct { + Len uint32 + Pad_cgo_0 [4]byte + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp Timeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [6]byte +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go new file mode 100644 index 0000000..8cf3094 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go @@ -0,0 +1,502 @@ +// +build 386,freebsd +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_freebsd.go + +package unix + +const ( + sizeofPtr = 0x4 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x4 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int32 + _C_long_long int64 +) + +type Timespec struct { + Sec int32 + Nsec int32 +} + +type Timeval struct { + Sec int32 + Usec int32 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int32 + Ixrss int32 + Idrss int32 + Isrss int32 + Minflt int32 + Majflt int32 + Nswap int32 + Inblock int32 + Oublock int32 + Msgsnd int32 + Msgrcv int32 + Nsignals int32 + Nvcsw int32 + Nivcsw int32 +} + +type Rlimit struct { + Cur int64 + Max int64 +} + +type _Gid_t uint32 + +const ( + S_IFMT = 0xf000 + S_IFIFO = 0x1000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFBLK = 0x6000 + S_IFREG = 0x8000 + S_IFLNK = 0xa000 + S_IFSOCK = 0xc000 + S_ISUID = 0x800 + S_ISGID = 0x400 + S_ISVTX = 0x200 + S_IRUSR = 0x100 + S_IWUSR = 0x80 + S_IXUSR = 0x40 +) + +type Stat_t struct { + Dev uint32 + Ino uint32 + Mode uint16 + Nlink uint16 + Uid uint32 + Gid uint32 + Rdev uint32 + Atimespec Timespec + Mtimespec Timespec + Ctimespec Timespec + Size int64 + Blocks int64 + Blksize uint32 + Flags uint32 + Gen uint32 + Lspare int32 + Birthtimespec Timespec + Pad_cgo_0 [8]byte +} + +type Statfs_t struct { + Version uint32 + Type uint32 + Flags uint64 + Bsize uint64 + Iosize uint64 + Blocks uint64 + Bfree uint64 + Bavail int64 + Files uint64 + Ffree int64 + Syncwrites uint64 + Asyncwrites uint64 + Syncreads uint64 + Asyncreads uint64 + Spare [10]uint64 + Namemax uint32 + Owner uint32 + Fsid Fsid + Charspare [80]int8 + Fstypename [16]int8 + Mntfromname [88]int8 + Mntonname [88]int8 +} + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 + Sysid int32 +} + +type Dirent struct { + Fileno uint32 + Reclen uint16 + Type uint8 + Namlen uint8 + Name [256]int8 +} + +type Fsid struct { + Val [2]int32 +} + +const ( + FADV_NORMAL = 0x0 + FADV_RANDOM = 0x1 + FADV_SEQUENTIAL = 0x2 + FADV_WILLNEED = 0x3 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 +) + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [46]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint32 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Iov *Iovec + Iovlen int32 + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x36 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPMreqn = 0xc + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x1c + SizeofCmsghdr = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint32 + Filter int16 + Flags uint16 + Fflags uint32 + Data int32 + Udata *byte +} + +type FdSet struct { + X__fds_bits [32]uint32 +} + +const ( + sizeofIfMsghdr = 0x64 + SizeofIfMsghdr = 0x60 + sizeofIfData = 0x54 + SizeofIfData = 0x50 + SizeofIfaMsghdr = 0x14 + SizeofIfmaMsghdr = 0x10 + SizeofIfAnnounceMsghdr = 0x18 + SizeofRtMsghdr = 0x5c + SizeofRtMetrics = 0x38 +) + +type ifMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data ifData +} + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData +} + +type ifData struct { + Type uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Link_state uint8 + Vhid uint8 + Baudrate_pf uint8 + Datalen uint8 + Mtu uint32 + Metric uint32 + Baudrate uint32 + Ipackets uint32 + Ierrors uint32 + Opackets uint32 + Oerrors uint32 + Collisions uint32 + Ibytes uint32 + Obytes uint32 + Imcasts uint32 + Omcasts uint32 + Iqdrops uint32 + Noproto uint32 + Hwassist uint64 + Epoch int32 + Lastchange Timeval +} + +type IfData struct { + Type uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Link_state uint8 + Spare_char1 uint8 + Spare_char2 uint8 + Datalen uint8 + Mtu uint32 + Metric uint32 + Baudrate uint32 + Ipackets uint32 + Ierrors uint32 + Opackets uint32 + Oerrors uint32 + Collisions uint32 + Ibytes uint32 + Obytes uint32 + Imcasts uint32 + Omcasts uint32 + Iqdrops uint32 + Noproto uint32 + Hwassist uint32 + Epoch int32 + Lastchange Timeval +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Metric int32 +} + +type IfmaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte +} + +type IfAnnounceMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Name [16]int8 + What uint16 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Fmask int32 + Inits uint32 + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint32 + Mtu uint32 + Hopcount uint32 + Expire uint32 + Recvpipe uint32 + Sendpipe uint32 + Ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Pksent uint32 + Weight uint32 + Filler [3]uint32 +} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x8 + SizeofBpfZbuf = 0xc + SizeofBpfProgram = 0x8 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x14 + SizeofBpfZbufHeader = 0x20 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint32 + Drop uint32 +} + +type BpfZbuf struct { + Bufa *byte + Bufb *byte + Buflen uint32 +} + +type BpfProgram struct { + Len uint32 + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp Timeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [2]byte +} + +type BpfZbufHeader struct { + Kernel_gen uint32 + Kernel_len uint32 + User_gen uint32 + X_bzh_pad [5]uint32 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go new file mode 100644 index 0000000..e5feb20 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go @@ -0,0 +1,505 @@ +// +build amd64,freebsd +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_freebsd.go + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int64 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur int64 + Max int64 +} + +type _Gid_t uint32 + +const ( + S_IFMT = 0xf000 + S_IFIFO = 0x1000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFBLK = 0x6000 + S_IFREG = 0x8000 + S_IFLNK = 0xa000 + S_IFSOCK = 0xc000 + S_ISUID = 0x800 + S_ISGID = 0x400 + S_ISVTX = 0x200 + S_IRUSR = 0x100 + S_IWUSR = 0x80 + S_IXUSR = 0x40 +) + +type Stat_t struct { + Dev uint32 + Ino uint32 + Mode uint16 + Nlink uint16 + Uid uint32 + Gid uint32 + Rdev uint32 + Atimespec Timespec + Mtimespec Timespec + Ctimespec Timespec + Size int64 + Blocks int64 + Blksize uint32 + Flags uint32 + Gen uint32 + Lspare int32 + Birthtimespec Timespec +} + +type Statfs_t struct { + Version uint32 + Type uint32 + Flags uint64 + Bsize uint64 + Iosize uint64 + Blocks uint64 + Bfree uint64 + Bavail int64 + Files uint64 + Ffree int64 + Syncwrites uint64 + Asyncwrites uint64 + Syncreads uint64 + Asyncreads uint64 + Spare [10]uint64 + Namemax uint32 + Owner uint32 + Fsid Fsid + Charspare [80]int8 + Fstypename [16]int8 + Mntfromname [88]int8 + Mntonname [88]int8 +} + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 + Sysid int32 + Pad_cgo_0 [4]byte +} + +type Dirent struct { + Fileno uint32 + Reclen uint16 + Type uint8 + Namlen uint8 + Name [256]int8 +} + +type Fsid struct { + Val [2]int32 +} + +const ( + FADV_NORMAL = 0x0 + FADV_RANDOM = 0x1 + FADV_SEQUENTIAL = 0x2 + FADV_WILLNEED = 0x3 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 +) + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [46]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *Iovec + Iovlen int32 + Pad_cgo_1 [4]byte + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x36 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPMreqn = 0xc + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x30 + SizeofCmsghdr = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint64 + Filter int16 + Flags uint16 + Fflags uint32 + Data int64 + Udata *byte +} + +type FdSet struct { + X__fds_bits [16]uint64 +} + +const ( + sizeofIfMsghdr = 0xa8 + SizeofIfMsghdr = 0xa8 + sizeofIfData = 0x98 + SizeofIfData = 0x98 + SizeofIfaMsghdr = 0x14 + SizeofIfmaMsghdr = 0x10 + SizeofIfAnnounceMsghdr = 0x18 + SizeofRtMsghdr = 0x98 + SizeofRtMetrics = 0x70 +) + +type ifMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data ifData +} + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData +} + +type ifData struct { + Type uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Link_state uint8 + Vhid uint8 + Baudrate_pf uint8 + Datalen uint8 + Mtu uint64 + Metric uint64 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Noproto uint64 + Hwassist uint64 + Epoch int64 + Lastchange Timeval +} + +type IfData struct { + Type uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Link_state uint8 + Spare_char1 uint8 + Spare_char2 uint8 + Datalen uint8 + Mtu uint64 + Metric uint64 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Noproto uint64 + Hwassist uint64 + Epoch int64 + Lastchange Timeval +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Metric int32 +} + +type IfmaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte +} + +type IfAnnounceMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Name [16]int8 + What uint16 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Fmask int32 + Inits uint64 + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint64 + Mtu uint64 + Hopcount uint64 + Expire uint64 + Recvpipe uint64 + Sendpipe uint64 + Ssthresh uint64 + Rtt uint64 + Rttvar uint64 + Pksent uint64 + Weight uint64 + Filler [3]uint64 +} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x8 + SizeofBpfZbuf = 0x18 + SizeofBpfProgram = 0x10 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x20 + SizeofBpfZbufHeader = 0x20 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint32 + Drop uint32 +} + +type BpfZbuf struct { + Bufa *byte + Bufb *byte + Buflen uint64 +} + +type BpfProgram struct { + Len uint32 + Pad_cgo_0 [4]byte + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp Timeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [6]byte +} + +type BpfZbufHeader struct { + Kernel_gen uint32 + Kernel_len uint32 + User_gen uint32 + X_bzh_pad [5]uint32 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go new file mode 100644 index 0000000..5472b54 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go @@ -0,0 +1,497 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -fsigned-char types_freebsd.go + +// +build arm,freebsd + +package unix + +const ( + sizeofPtr = 0x4 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x4 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int32 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int32 + Pad_cgo_0 [4]byte +} + +type Timeval struct { + Sec int64 + Usec int32 + Pad_cgo_0 [4]byte +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int32 + Ixrss int32 + Idrss int32 + Isrss int32 + Minflt int32 + Majflt int32 + Nswap int32 + Inblock int32 + Oublock int32 + Msgsnd int32 + Msgrcv int32 + Nsignals int32 + Nvcsw int32 + Nivcsw int32 +} + +type Rlimit struct { + Cur int64 + Max int64 +} + +type _Gid_t uint32 + +const ( + S_IFMT = 0xf000 + S_IFIFO = 0x1000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFBLK = 0x6000 + S_IFREG = 0x8000 + S_IFLNK = 0xa000 + S_IFSOCK = 0xc000 + S_ISUID = 0x800 + S_ISGID = 0x400 + S_ISVTX = 0x200 + S_IRUSR = 0x100 + S_IWUSR = 0x80 + S_IXUSR = 0x40 +) + +type Stat_t struct { + Dev uint32 + Ino uint32 + Mode uint16 + Nlink uint16 + Uid uint32 + Gid uint32 + Rdev uint32 + Atimespec Timespec + Mtimespec Timespec + Ctimespec Timespec + Size int64 + Blocks int64 + Blksize uint32 + Flags uint32 + Gen uint32 + Lspare int32 + Birthtimespec Timespec +} + +type Statfs_t struct { + Version uint32 + Type uint32 + Flags uint64 + Bsize uint64 + Iosize uint64 + Blocks uint64 + Bfree uint64 + Bavail int64 + Files uint64 + Ffree int64 + Syncwrites uint64 + Asyncwrites uint64 + Syncreads uint64 + Asyncreads uint64 + Spare [10]uint64 + Namemax uint32 + Owner uint32 + Fsid Fsid + Charspare [80]int8 + Fstypename [16]int8 + Mntfromname [88]int8 + Mntonname [88]int8 +} + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 + Sysid int32 + Pad_cgo_0 [4]byte +} + +type Dirent struct { + Fileno uint32 + Reclen uint16 + Type uint8 + Namlen uint8 + Name [256]int8 +} + +type Fsid struct { + Val [2]int32 +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [46]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint32 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Iov *Iovec + Iovlen int32 + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x36 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPMreqn = 0xc + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x1c + SizeofCmsghdr = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint32 + Filter int16 + Flags uint16 + Fflags uint32 + Data int32 + Udata *byte +} + +type FdSet struct { + X__fds_bits [32]uint32 +} + +const ( + sizeofIfMsghdr = 0x70 + SizeofIfMsghdr = 0x70 + sizeofIfData = 0x60 + SizeofIfData = 0x60 + SizeofIfaMsghdr = 0x14 + SizeofIfmaMsghdr = 0x10 + SizeofIfAnnounceMsghdr = 0x18 + SizeofRtMsghdr = 0x5c + SizeofRtMetrics = 0x38 +) + +type ifMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data ifData +} + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData +} + +type ifData struct { + Type uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Link_state uint8 + Vhid uint8 + Baudrate_pf uint8 + Datalen uint8 + Mtu uint32 + Metric uint32 + Baudrate uint32 + Ipackets uint32 + Ierrors uint32 + Opackets uint32 + Oerrors uint32 + Collisions uint32 + Ibytes uint32 + Obytes uint32 + Imcasts uint32 + Omcasts uint32 + Iqdrops uint32 + Noproto uint32 + Hwassist uint64 + Epoch int64 + Lastchange Timeval +} + +type IfData struct { + Type uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Link_state uint8 + Spare_char1 uint8 + Spare_char2 uint8 + Datalen uint8 + Mtu uint32 + Metric uint32 + Baudrate uint32 + Ipackets uint32 + Ierrors uint32 + Opackets uint32 + Oerrors uint32 + Collisions uint32 + Ibytes uint32 + Obytes uint32 + Imcasts uint32 + Omcasts uint32 + Iqdrops uint32 + Noproto uint32 + Hwassist uint32 + Pad_cgo_0 [4]byte + Epoch int64 + Lastchange Timeval +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Metric int32 +} + +type IfmaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte +} + +type IfAnnounceMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Name [16]int8 + What uint16 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Fmask int32 + Inits uint32 + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint32 + Mtu uint32 + Hopcount uint32 + Expire uint32 + Recvpipe uint32 + Sendpipe uint32 + Ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Pksent uint32 + Weight uint32 + Filler [3]uint32 +} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x8 + SizeofBpfZbuf = 0xc + SizeofBpfProgram = 0x8 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x20 + SizeofBpfZbufHeader = 0x20 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint32 + Drop uint32 +} + +type BpfZbuf struct { + Bufa *byte + Bufb *byte + Buflen uint32 +} + +type BpfProgram struct { + Len uint32 + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp Timeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [6]byte +} + +type BpfZbufHeader struct { + Kernel_gen uint32 + Kernel_len uint32 + User_gen uint32 + X_bzh_pad [5]uint32 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go new file mode 100644 index 0000000..9a58381 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go @@ -0,0 +1,592 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_linux.go + +// +build 386,linux + +package unix + +const ( + sizeofPtr = 0x4 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x4 + sizeofLongLong = 0x8 + PathMax = 0x1000 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int32 + _C_long_long int64 +) + +type Timespec struct { + Sec int32 + Nsec int32 +} + +type Timeval struct { + Sec int32 + Usec int32 +} + +type Timex struct { + Modes uint32 + Offset int32 + Freq int32 + Maxerror int32 + Esterror int32 + Status int32 + Constant int32 + Precision int32 + Tolerance int32 + Time Timeval + Tick int32 + Ppsfreq int32 + Jitter int32 + Shift int32 + Stabil int32 + Jitcnt int32 + Calcnt int32 + Errcnt int32 + Stbcnt int32 + Tai int32 + Pad_cgo_0 [44]byte +} + +type Time_t int32 + +type Tms struct { + Utime int32 + Stime int32 + Cutime int32 + Cstime int32 +} + +type Utimbuf struct { + Actime int32 + Modtime int32 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int32 + Ixrss int32 + Idrss int32 + Isrss int32 + Minflt int32 + Majflt int32 + Nswap int32 + Inblock int32 + Oublock int32 + Msgsnd int32 + Msgrcv int32 + Nsignals int32 + Nvcsw int32 + Nivcsw int32 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev uint64 + X__pad1 uint16 + Pad_cgo_0 [2]byte + X__st_ino uint32 + Mode uint32 + Nlink uint32 + Uid uint32 + Gid uint32 + Rdev uint64 + X__pad2 uint16 + Pad_cgo_1 [2]byte + Size int64 + Blksize int32 + Blocks int64 + Atim Timespec + Mtim Timespec + Ctim Timespec + Ino uint64 +} + +type Statfs_t struct { + Type int32 + Bsize int32 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Files uint64 + Ffree uint64 + Fsid Fsid + Namelen int32 + Frsize int32 + Flags int32 + Spare [4]int32 +} + +type Dirent struct { + Ino uint64 + Off int64 + Reclen uint16 + Type uint8 + Name [256]int8 + Pad_cgo_0 [1]byte +} + +type Fsid struct { + X__val [2]int32 +} + +type Flock_t struct { + Type int16 + Whence int16 + Start int64 + Len int64 + Pid int32 +} + +type RawSockaddrInet4 struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]uint8 +} + +type RawSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Family uint16 + Path [108]int8 +} + +type RawSockaddrLinklayer struct { + Family uint16 + Protocol uint16 + Ifindex int32 + Hatype uint16 + Pkttype uint8 + Halen uint8 + Addr [8]uint8 +} + +type RawSockaddrNetlink struct { + Family uint16 + Pad uint16 + Pid uint32 + Groups uint32 +} + +type RawSockaddr struct { + Family uint16 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [96]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint32 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Iov *Iovec + Iovlen uint32 + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 + X__cmsg_data [0]uint8 +} + +type Inet4Pktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Data [8]uint32 +} + +type Ucred struct { + Pid int32 + Uid uint32 + Gid uint32 +} + +type TCPInfo struct { + State uint8 + Ca_state uint8 + Retransmits uint8 + Probes uint8 + Backoff uint8 + Options uint8 + Pad_cgo_0 [2]byte + Rto uint32 + Ato uint32 + Snd_mss uint32 + Rcv_mss uint32 + Unacked uint32 + Sacked uint32 + Lost uint32 + Retrans uint32 + Fackets uint32 + Last_data_sent uint32 + Last_ack_sent uint32 + Last_data_recv uint32 + Last_ack_recv uint32 + Pmtu uint32 + Rcv_ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Snd_ssthresh uint32 + Snd_cwnd uint32 + Advmss uint32 + Reordering uint32 + Rcv_rtt uint32 + Rcv_space uint32 + Total_retrans uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x70 + SizeofSockaddrUnix = 0x6e + SizeofSockaddrLinklayer = 0x14 + SizeofSockaddrNetlink = 0xc + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPMreqn = 0xc + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x1c + SizeofCmsghdr = 0xc + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 + SizeofUcred = 0xc + SizeofTCPInfo = 0x68 +) + +const ( + IFA_UNSPEC = 0x0 + IFA_ADDRESS = 0x1 + IFA_LOCAL = 0x2 + IFA_LABEL = 0x3 + IFA_BROADCAST = 0x4 + IFA_ANYCAST = 0x5 + IFA_CACHEINFO = 0x6 + IFA_MULTICAST = 0x7 + IFLA_UNSPEC = 0x0 + IFLA_ADDRESS = 0x1 + IFLA_BROADCAST = 0x2 + IFLA_IFNAME = 0x3 + IFLA_MTU = 0x4 + IFLA_LINK = 0x5 + IFLA_QDISC = 0x6 + IFLA_STATS = 0x7 + IFLA_COST = 0x8 + IFLA_PRIORITY = 0x9 + IFLA_MASTER = 0xa + IFLA_WIRELESS = 0xb + IFLA_PROTINFO = 0xc + IFLA_TXQLEN = 0xd + IFLA_MAP = 0xe + IFLA_WEIGHT = 0xf + IFLA_OPERSTATE = 0x10 + IFLA_LINKMODE = 0x11 + IFLA_LINKINFO = 0x12 + IFLA_NET_NS_PID = 0x13 + IFLA_IFALIAS = 0x14 + IFLA_MAX = 0x1d + RT_SCOPE_UNIVERSE = 0x0 + RT_SCOPE_SITE = 0xc8 + RT_SCOPE_LINK = 0xfd + RT_SCOPE_HOST = 0xfe + RT_SCOPE_NOWHERE = 0xff + RT_TABLE_UNSPEC = 0x0 + RT_TABLE_COMPAT = 0xfc + RT_TABLE_DEFAULT = 0xfd + RT_TABLE_MAIN = 0xfe + RT_TABLE_LOCAL = 0xff + RT_TABLE_MAX = 0xffffffff + RTA_UNSPEC = 0x0 + RTA_DST = 0x1 + RTA_SRC = 0x2 + RTA_IIF = 0x3 + RTA_OIF = 0x4 + RTA_GATEWAY = 0x5 + RTA_PRIORITY = 0x6 + RTA_PREFSRC = 0x7 + RTA_METRICS = 0x8 + RTA_MULTIPATH = 0x9 + RTA_FLOW = 0xb + RTA_CACHEINFO = 0xc + RTA_TABLE = 0xf + RTN_UNSPEC = 0x0 + RTN_UNICAST = 0x1 + RTN_LOCAL = 0x2 + RTN_BROADCAST = 0x3 + RTN_ANYCAST = 0x4 + RTN_MULTICAST = 0x5 + RTN_BLACKHOLE = 0x6 + RTN_UNREACHABLE = 0x7 + RTN_PROHIBIT = 0x8 + RTN_THROW = 0x9 + RTN_NAT = 0xa + RTN_XRESOLVE = 0xb + RTNLGRP_NONE = 0x0 + RTNLGRP_LINK = 0x1 + RTNLGRP_NOTIFY = 0x2 + RTNLGRP_NEIGH = 0x3 + RTNLGRP_TC = 0x4 + RTNLGRP_IPV4_IFADDR = 0x5 + RTNLGRP_IPV4_MROUTE = 0x6 + RTNLGRP_IPV4_ROUTE = 0x7 + RTNLGRP_IPV4_RULE = 0x8 + RTNLGRP_IPV6_IFADDR = 0x9 + RTNLGRP_IPV6_MROUTE = 0xa + RTNLGRP_IPV6_ROUTE = 0xb + RTNLGRP_IPV6_IFINFO = 0xc + RTNLGRP_IPV6_PREFIX = 0x12 + RTNLGRP_IPV6_RULE = 0x13 + RTNLGRP_ND_USEROPT = 0x14 + SizeofNlMsghdr = 0x10 + SizeofNlMsgerr = 0x14 + SizeofRtGenmsg = 0x1 + SizeofNlAttr = 0x4 + SizeofRtAttr = 0x4 + SizeofIfInfomsg = 0x10 + SizeofIfAddrmsg = 0x8 + SizeofRtMsg = 0xc + SizeofRtNexthop = 0x8 +) + +type NlMsghdr struct { + Len uint32 + Type uint16 + Flags uint16 + Seq uint32 + Pid uint32 +} + +type NlMsgerr struct { + Error int32 + Msg NlMsghdr +} + +type RtGenmsg struct { + Family uint8 +} + +type NlAttr struct { + Len uint16 + Type uint16 +} + +type RtAttr struct { + Len uint16 + Type uint16 +} + +type IfInfomsg struct { + Family uint8 + X__ifi_pad uint8 + Type uint16 + Index int32 + Flags uint32 + Change uint32 +} + +type IfAddrmsg struct { + Family uint8 + Prefixlen uint8 + Flags uint8 + Scope uint8 + Index uint32 +} + +type RtMsg struct { + Family uint8 + Dst_len uint8 + Src_len uint8 + Tos uint8 + Table uint8 + Protocol uint8 + Scope uint8 + Type uint8 + Flags uint32 +} + +type RtNexthop struct { + Len uint16 + Flags uint8 + Hops uint8 + Ifindex int32 +} + +const ( + SizeofSockFilter = 0x8 + SizeofSockFprog = 0x8 +) + +type SockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type SockFprog struct { + Len uint16 + Pad_cgo_0 [2]byte + Filter *SockFilter +} + +type InotifyEvent struct { + Wd int32 + Mask uint32 + Cookie uint32 + Len uint32 + Name [0]int8 +} + +const SizeofInotifyEvent = 0x10 + +type PtraceRegs struct { + Ebx int32 + Ecx int32 + Edx int32 + Esi int32 + Edi int32 + Ebp int32 + Eax int32 + Xds int32 + Xes int32 + Xfs int32 + Xgs int32 + Orig_eax int32 + Eip int32 + Xcs int32 + Eflags int32 + Esp int32 + Xss int32 +} + +type FdSet struct { + Bits [32]int32 +} + +type Sysinfo_t struct { + Uptime int32 + Loads [3]uint32 + Totalram uint32 + Freeram uint32 + Sharedram uint32 + Bufferram uint32 + Totalswap uint32 + Freeswap uint32 + Procs uint16 + Pad uint16 + Totalhigh uint32 + Freehigh uint32 + Unit uint32 + X_f [8]int8 +} + +type Utsname struct { + Sysname [65]int8 + Nodename [65]int8 + Release [65]int8 + Version [65]int8 + Machine [65]int8 + Domainname [65]int8 +} + +type Ustat_t struct { + Tfree int32 + Tinode uint32 + Fname [6]int8 + Fpack [6]int8 +} + +type EpollEvent struct { + Events uint32 + Fd int32 + Pad int32 +} + +const ( + AT_FDCWD = -0x64 + AT_SYMLINK_NOFOLLOW = 0x100 + AT_REMOVEDIR = 0x200 +) + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Line uint8 + Cc [32]uint8 + Pad_cgo_0 [3]byte + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go new file mode 100644 index 0000000..f1937a6 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go @@ -0,0 +1,610 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_linux.go + +// +build amd64,linux + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 + PathMax = 0x1000 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int64 +} + +type Timex struct { + Modes uint32 + Pad_cgo_0 [4]byte + Offset int64 + Freq int64 + Maxerror int64 + Esterror int64 + Status int32 + Pad_cgo_1 [4]byte + Constant int64 + Precision int64 + Tolerance int64 + Time Timeval + Tick int64 + Ppsfreq int64 + Jitter int64 + Shift int32 + Pad_cgo_2 [4]byte + Stabil int64 + Jitcnt int64 + Calcnt int64 + Errcnt int64 + Stbcnt int64 + Tai int32 + Pad_cgo_3 [44]byte +} + +type Time_t int64 + +type Tms struct { + Utime int64 + Stime int64 + Cutime int64 + Cstime int64 +} + +type Utimbuf struct { + Actime int64 + Modtime int64 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev uint64 + Ino uint64 + Nlink uint64 + Mode uint32 + Uid uint32 + Gid uint32 + X__pad0 int32 + Rdev uint64 + Size int64 + Blksize int64 + Blocks int64 + Atim Timespec + Mtim Timespec + Ctim Timespec + X__unused [3]int64 +} + +type Statfs_t struct { + Type int64 + Bsize int64 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Files uint64 + Ffree uint64 + Fsid Fsid + Namelen int64 + Frsize int64 + Flags int64 + Spare [4]int64 +} + +type Dirent struct { + Ino uint64 + Off int64 + Reclen uint16 + Type uint8 + Name [256]int8 + Pad_cgo_0 [5]byte +} + +type Fsid struct { + X__val [2]int32 +} + +type Flock_t struct { + Type int16 + Whence int16 + Pad_cgo_0 [4]byte + Start int64 + Len int64 + Pid int32 + Pad_cgo_1 [4]byte +} + +type RawSockaddrInet4 struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]uint8 +} + +type RawSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Family uint16 + Path [108]int8 +} + +type RawSockaddrLinklayer struct { + Family uint16 + Protocol uint16 + Ifindex int32 + Hatype uint16 + Pkttype uint8 + Halen uint8 + Addr [8]uint8 +} + +type RawSockaddrNetlink struct { + Family uint16 + Pad uint16 + Pid uint32 + Groups uint32 +} + +type RawSockaddr struct { + Family uint16 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [96]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *Iovec + Iovlen uint64 + Control *byte + Controllen uint64 + Flags int32 + Pad_cgo_1 [4]byte +} + +type Cmsghdr struct { + Len uint64 + Level int32 + Type int32 + X__cmsg_data [0]uint8 +} + +type Inet4Pktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Data [8]uint32 +} + +type Ucred struct { + Pid int32 + Uid uint32 + Gid uint32 +} + +type TCPInfo struct { + State uint8 + Ca_state uint8 + Retransmits uint8 + Probes uint8 + Backoff uint8 + Options uint8 + Pad_cgo_0 [2]byte + Rto uint32 + Ato uint32 + Snd_mss uint32 + Rcv_mss uint32 + Unacked uint32 + Sacked uint32 + Lost uint32 + Retrans uint32 + Fackets uint32 + Last_data_sent uint32 + Last_ack_sent uint32 + Last_data_recv uint32 + Last_ack_recv uint32 + Pmtu uint32 + Rcv_ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Snd_ssthresh uint32 + Snd_cwnd uint32 + Advmss uint32 + Reordering uint32 + Rcv_rtt uint32 + Rcv_space uint32 + Total_retrans uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x70 + SizeofSockaddrUnix = 0x6e + SizeofSockaddrLinklayer = 0x14 + SizeofSockaddrNetlink = 0xc + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPMreqn = 0xc + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x38 + SizeofCmsghdr = 0x10 + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 + SizeofUcred = 0xc + SizeofTCPInfo = 0x68 +) + +const ( + IFA_UNSPEC = 0x0 + IFA_ADDRESS = 0x1 + IFA_LOCAL = 0x2 + IFA_LABEL = 0x3 + IFA_BROADCAST = 0x4 + IFA_ANYCAST = 0x5 + IFA_CACHEINFO = 0x6 + IFA_MULTICAST = 0x7 + IFLA_UNSPEC = 0x0 + IFLA_ADDRESS = 0x1 + IFLA_BROADCAST = 0x2 + IFLA_IFNAME = 0x3 + IFLA_MTU = 0x4 + IFLA_LINK = 0x5 + IFLA_QDISC = 0x6 + IFLA_STATS = 0x7 + IFLA_COST = 0x8 + IFLA_PRIORITY = 0x9 + IFLA_MASTER = 0xa + IFLA_WIRELESS = 0xb + IFLA_PROTINFO = 0xc + IFLA_TXQLEN = 0xd + IFLA_MAP = 0xe + IFLA_WEIGHT = 0xf + IFLA_OPERSTATE = 0x10 + IFLA_LINKMODE = 0x11 + IFLA_LINKINFO = 0x12 + IFLA_NET_NS_PID = 0x13 + IFLA_IFALIAS = 0x14 + IFLA_MAX = 0x1d + RT_SCOPE_UNIVERSE = 0x0 + RT_SCOPE_SITE = 0xc8 + RT_SCOPE_LINK = 0xfd + RT_SCOPE_HOST = 0xfe + RT_SCOPE_NOWHERE = 0xff + RT_TABLE_UNSPEC = 0x0 + RT_TABLE_COMPAT = 0xfc + RT_TABLE_DEFAULT = 0xfd + RT_TABLE_MAIN = 0xfe + RT_TABLE_LOCAL = 0xff + RT_TABLE_MAX = 0xffffffff + RTA_UNSPEC = 0x0 + RTA_DST = 0x1 + RTA_SRC = 0x2 + RTA_IIF = 0x3 + RTA_OIF = 0x4 + RTA_GATEWAY = 0x5 + RTA_PRIORITY = 0x6 + RTA_PREFSRC = 0x7 + RTA_METRICS = 0x8 + RTA_MULTIPATH = 0x9 + RTA_FLOW = 0xb + RTA_CACHEINFO = 0xc + RTA_TABLE = 0xf + RTN_UNSPEC = 0x0 + RTN_UNICAST = 0x1 + RTN_LOCAL = 0x2 + RTN_BROADCAST = 0x3 + RTN_ANYCAST = 0x4 + RTN_MULTICAST = 0x5 + RTN_BLACKHOLE = 0x6 + RTN_UNREACHABLE = 0x7 + RTN_PROHIBIT = 0x8 + RTN_THROW = 0x9 + RTN_NAT = 0xa + RTN_XRESOLVE = 0xb + RTNLGRP_NONE = 0x0 + RTNLGRP_LINK = 0x1 + RTNLGRP_NOTIFY = 0x2 + RTNLGRP_NEIGH = 0x3 + RTNLGRP_TC = 0x4 + RTNLGRP_IPV4_IFADDR = 0x5 + RTNLGRP_IPV4_MROUTE = 0x6 + RTNLGRP_IPV4_ROUTE = 0x7 + RTNLGRP_IPV4_RULE = 0x8 + RTNLGRP_IPV6_IFADDR = 0x9 + RTNLGRP_IPV6_MROUTE = 0xa + RTNLGRP_IPV6_ROUTE = 0xb + RTNLGRP_IPV6_IFINFO = 0xc + RTNLGRP_IPV6_PREFIX = 0x12 + RTNLGRP_IPV6_RULE = 0x13 + RTNLGRP_ND_USEROPT = 0x14 + SizeofNlMsghdr = 0x10 + SizeofNlMsgerr = 0x14 + SizeofRtGenmsg = 0x1 + SizeofNlAttr = 0x4 + SizeofRtAttr = 0x4 + SizeofIfInfomsg = 0x10 + SizeofIfAddrmsg = 0x8 + SizeofRtMsg = 0xc + SizeofRtNexthop = 0x8 +) + +type NlMsghdr struct { + Len uint32 + Type uint16 + Flags uint16 + Seq uint32 + Pid uint32 +} + +type NlMsgerr struct { + Error int32 + Msg NlMsghdr +} + +type RtGenmsg struct { + Family uint8 +} + +type NlAttr struct { + Len uint16 + Type uint16 +} + +type RtAttr struct { + Len uint16 + Type uint16 +} + +type IfInfomsg struct { + Family uint8 + X__ifi_pad uint8 + Type uint16 + Index int32 + Flags uint32 + Change uint32 +} + +type IfAddrmsg struct { + Family uint8 + Prefixlen uint8 + Flags uint8 + Scope uint8 + Index uint32 +} + +type RtMsg struct { + Family uint8 + Dst_len uint8 + Src_len uint8 + Tos uint8 + Table uint8 + Protocol uint8 + Scope uint8 + Type uint8 + Flags uint32 +} + +type RtNexthop struct { + Len uint16 + Flags uint8 + Hops uint8 + Ifindex int32 +} + +const ( + SizeofSockFilter = 0x8 + SizeofSockFprog = 0x10 +) + +type SockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type SockFprog struct { + Len uint16 + Pad_cgo_0 [6]byte + Filter *SockFilter +} + +type InotifyEvent struct { + Wd int32 + Mask uint32 + Cookie uint32 + Len uint32 + Name [0]int8 +} + +const SizeofInotifyEvent = 0x10 + +type PtraceRegs struct { + R15 uint64 + R14 uint64 + R13 uint64 + R12 uint64 + Rbp uint64 + Rbx uint64 + R11 uint64 + R10 uint64 + R9 uint64 + R8 uint64 + Rax uint64 + Rcx uint64 + Rdx uint64 + Rsi uint64 + Rdi uint64 + Orig_rax uint64 + Rip uint64 + Cs uint64 + Eflags uint64 + Rsp uint64 + Ss uint64 + Fs_base uint64 + Gs_base uint64 + Ds uint64 + Es uint64 + Fs uint64 + Gs uint64 +} + +type FdSet struct { + Bits [16]int64 +} + +type Sysinfo_t struct { + Uptime int64 + Loads [3]uint64 + Totalram uint64 + Freeram uint64 + Sharedram uint64 + Bufferram uint64 + Totalswap uint64 + Freeswap uint64 + Procs uint16 + Pad uint16 + Pad_cgo_0 [4]byte + Totalhigh uint64 + Freehigh uint64 + Unit uint32 + X_f [0]int8 + Pad_cgo_1 [4]byte +} + +type Utsname struct { + Sysname [65]int8 + Nodename [65]int8 + Release [65]int8 + Version [65]int8 + Machine [65]int8 + Domainname [65]int8 +} + +type Ustat_t struct { + Tfree int32 + Pad_cgo_0 [4]byte + Tinode uint64 + Fname [6]int8 + Fpack [6]int8 + Pad_cgo_1 [4]byte +} + +type EpollEvent struct { + Events uint32 + Fd int32 + Pad int32 +} + +const ( + AT_FDCWD = -0x64 + AT_SYMLINK_NOFOLLOW = 0x100 + AT_REMOVEDIR = 0x200 +) + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Line uint8 + Cc [32]uint8 + Pad_cgo_0 [3]byte + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go new file mode 100644 index 0000000..c8a0de4 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go @@ -0,0 +1,683 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_linux.go + +// +build arm,linux + +package unix + +const ( + sizeofPtr = 0x4 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x4 + sizeofLongLong = 0x8 + PathMax = 0x1000 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int32 + _C_long_long int64 +) + +type Timespec struct { + Sec int32 + Nsec int32 +} + +type Timeval struct { + Sec int32 + Usec int32 +} + +type Timex struct { + Modes uint32 + Offset int32 + Freq int32 + Maxerror int32 + Esterror int32 + Status int32 + Constant int32 + Precision int32 + Tolerance int32 + Time Timeval + Tick int32 + Ppsfreq int32 + Jitter int32 + Shift int32 + Stabil int32 + Jitcnt int32 + Calcnt int32 + Errcnt int32 + Stbcnt int32 + Tai int32 + Pad_cgo_0 [44]byte +} + +type Time_t int32 + +type Tms struct { + Utime int32 + Stime int32 + Cutime int32 + Cstime int32 +} + +type Utimbuf struct { + Actime int32 + Modtime int32 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int32 + Ixrss int32 + Idrss int32 + Isrss int32 + Minflt int32 + Majflt int32 + Nswap int32 + Inblock int32 + Oublock int32 + Msgsnd int32 + Msgrcv int32 + Nsignals int32 + Nvcsw int32 + Nivcsw int32 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev uint64 + X__pad1 uint16 + Pad_cgo_0 [2]byte + X__st_ino uint32 + Mode uint32 + Nlink uint32 + Uid uint32 + Gid uint32 + Rdev uint64 + X__pad2 uint16 + Pad_cgo_1 [6]byte + Size int64 + Blksize int32 + Pad_cgo_2 [4]byte + Blocks int64 + Atim Timespec + Mtim Timespec + Ctim Timespec + Ino uint64 +} + +type Statfs_t struct { + Type int32 + Bsize int32 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Files uint64 + Ffree uint64 + Fsid Fsid + Namelen int32 + Frsize int32 + Flags int32 + Spare [4]int32 + Pad_cgo_0 [4]byte +} + +type Dirent struct { + Ino uint64 + Off int64 + Reclen uint16 + Type uint8 + Name [256]uint8 + Pad_cgo_0 [5]byte +} + +type Fsid struct { + X__val [2]int32 +} + +type Flock_t struct { + Type int16 + Whence int16 + Pad_cgo_0 [4]byte + Start int64 + Len int64 + Pid int32 + Pad_cgo_1 [4]byte +} + +type RawSockaddrInet4 struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]uint8 +} + +type RawSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Family uint16 + Path [108]int8 +} + +type RawSockaddrLinklayer struct { + Family uint16 + Protocol uint16 + Ifindex int32 + Hatype uint16 + Pkttype uint8 + Halen uint8 + Addr [8]uint8 +} + +type RawSockaddrNetlink struct { + Family uint16 + Pad uint16 + Pid uint32 + Groups uint32 +} + +type RawSockaddr struct { + Family uint16 + Data [14]uint8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [96]uint8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint32 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Iov *Iovec + Iovlen uint32 + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 + X__cmsg_data [0]uint8 +} + +type Inet4Pktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Data [8]uint32 +} + +type Ucred struct { + Pid int32 + Uid uint32 + Gid uint32 +} + +type TCPInfo struct { + State uint8 + Ca_state uint8 + Retransmits uint8 + Probes uint8 + Backoff uint8 + Options uint8 + Pad_cgo_0 [2]byte + Rto uint32 + Ato uint32 + Snd_mss uint32 + Rcv_mss uint32 + Unacked uint32 + Sacked uint32 + Lost uint32 + Retrans uint32 + Fackets uint32 + Last_data_sent uint32 + Last_ack_sent uint32 + Last_data_recv uint32 + Last_ack_recv uint32 + Pmtu uint32 + Rcv_ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Snd_ssthresh uint32 + Snd_cwnd uint32 + Advmss uint32 + Reordering uint32 + Rcv_rtt uint32 + Rcv_space uint32 + Total_retrans uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x70 + SizeofSockaddrUnix = 0x6e + SizeofSockaddrLinklayer = 0x14 + SizeofSockaddrNetlink = 0xc + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPMreqn = 0xc + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x1c + SizeofCmsghdr = 0xc + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 + SizeofUcred = 0xc + SizeofTCPInfo = 0x68 +) + +const ( + IFA_UNSPEC = 0x0 + IFA_ADDRESS = 0x1 + IFA_LOCAL = 0x2 + IFA_LABEL = 0x3 + IFA_BROADCAST = 0x4 + IFA_ANYCAST = 0x5 + IFA_CACHEINFO = 0x6 + IFA_MULTICAST = 0x7 + IFLA_UNSPEC = 0x0 + IFLA_ADDRESS = 0x1 + IFLA_BROADCAST = 0x2 + IFLA_IFNAME = 0x3 + IFLA_MTU = 0x4 + IFLA_LINK = 0x5 + IFLA_QDISC = 0x6 + IFLA_STATS = 0x7 + IFLA_COST = 0x8 + IFLA_PRIORITY = 0x9 + IFLA_MASTER = 0xa + IFLA_WIRELESS = 0xb + IFLA_PROTINFO = 0xc + IFLA_TXQLEN = 0xd + IFLA_MAP = 0xe + IFLA_WEIGHT = 0xf + IFLA_OPERSTATE = 0x10 + IFLA_LINKMODE = 0x11 + IFLA_LINKINFO = 0x12 + IFLA_NET_NS_PID = 0x13 + IFLA_IFALIAS = 0x14 + IFLA_MAX = 0x1d + RT_SCOPE_UNIVERSE = 0x0 + RT_SCOPE_SITE = 0xc8 + RT_SCOPE_LINK = 0xfd + RT_SCOPE_HOST = 0xfe + RT_SCOPE_NOWHERE = 0xff + RT_TABLE_UNSPEC = 0x0 + RT_TABLE_COMPAT = 0xfc + RT_TABLE_DEFAULT = 0xfd + RT_TABLE_MAIN = 0xfe + RT_TABLE_LOCAL = 0xff + RT_TABLE_MAX = 0xffffffff + RTA_UNSPEC = 0x0 + RTA_DST = 0x1 + RTA_SRC = 0x2 + RTA_IIF = 0x3 + RTA_OIF = 0x4 + RTA_GATEWAY = 0x5 + RTA_PRIORITY = 0x6 + RTA_PREFSRC = 0x7 + RTA_METRICS = 0x8 + RTA_MULTIPATH = 0x9 + RTA_FLOW = 0xb + RTA_CACHEINFO = 0xc + RTA_TABLE = 0xf + RTN_UNSPEC = 0x0 + RTN_UNICAST = 0x1 + RTN_LOCAL = 0x2 + RTN_BROADCAST = 0x3 + RTN_ANYCAST = 0x4 + RTN_MULTICAST = 0x5 + RTN_BLACKHOLE = 0x6 + RTN_UNREACHABLE = 0x7 + RTN_PROHIBIT = 0x8 + RTN_THROW = 0x9 + RTN_NAT = 0xa + RTN_XRESOLVE = 0xb + RTNLGRP_NONE = 0x0 + RTNLGRP_LINK = 0x1 + RTNLGRP_NOTIFY = 0x2 + RTNLGRP_NEIGH = 0x3 + RTNLGRP_TC = 0x4 + RTNLGRP_IPV4_IFADDR = 0x5 + RTNLGRP_IPV4_MROUTE = 0x6 + RTNLGRP_IPV4_ROUTE = 0x7 + RTNLGRP_IPV4_RULE = 0x8 + RTNLGRP_IPV6_IFADDR = 0x9 + RTNLGRP_IPV6_MROUTE = 0xa + RTNLGRP_IPV6_ROUTE = 0xb + RTNLGRP_IPV6_IFINFO = 0xc + RTNLGRP_IPV6_PREFIX = 0x12 + RTNLGRP_IPV6_RULE = 0x13 + RTNLGRP_ND_USEROPT = 0x14 + SizeofNlMsghdr = 0x10 + SizeofNlMsgerr = 0x14 + SizeofRtGenmsg = 0x1 + SizeofNlAttr = 0x4 + SizeofRtAttr = 0x4 + SizeofIfInfomsg = 0x10 + SizeofIfAddrmsg = 0x8 + SizeofRtMsg = 0xc + SizeofRtNexthop = 0x8 +) + +type NlMsghdr struct { + Len uint32 + Type uint16 + Flags uint16 + Seq uint32 + Pid uint32 +} + +type NlMsgerr struct { + Error int32 + Msg NlMsghdr +} + +type RtGenmsg struct { + Family uint8 +} + +type NlAttr struct { + Len uint16 + Type uint16 +} + +type RtAttr struct { + Len uint16 + Type uint16 +} + +type IfInfomsg struct { + Family uint8 + X__ifi_pad uint8 + Type uint16 + Index int32 + Flags uint32 + Change uint32 +} + +type IfAddrmsg struct { + Family uint8 + Prefixlen uint8 + Flags uint8 + Scope uint8 + Index uint32 +} + +type RtMsg struct { + Family uint8 + Dst_len uint8 + Src_len uint8 + Tos uint8 + Table uint8 + Protocol uint8 + Scope uint8 + Type uint8 + Flags uint32 +} + +type RtNexthop struct { + Len uint16 + Flags uint8 + Hops uint8 + Ifindex int32 +} + +const ( + SizeofSockFilter = 0x8 + SizeofSockFprog = 0x8 +) + +type SockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type SockFprog struct { + Len uint16 + Pad_cgo_0 [2]byte + Filter *SockFilter +} + +type InotifyEvent struct { + Wd int32 + Mask uint32 + Cookie uint32 + Len uint32 + Name [0]uint8 +} + +const SizeofInotifyEvent = 0x10 + +type PtraceRegs struct { + Uregs [18]uint32 +} + +type FdSet struct { + Bits [32]int32 +} + +type Sysinfo_t struct { + Uptime int32 + Loads [3]uint32 + Totalram uint32 + Freeram uint32 + Sharedram uint32 + Bufferram uint32 + Totalswap uint32 + Freeswap uint32 + Procs uint16 + Pad uint16 + Totalhigh uint32 + Freehigh uint32 + Unit uint32 + X_f [8]uint8 +} + +type Utsname struct { + Sysname [65]uint8 + Nodename [65]uint8 + Release [65]uint8 + Version [65]uint8 + Machine [65]uint8 + Domainname [65]uint8 +} + +type Ustat_t struct { + Tfree int32 + Tinode uint32 + Fname [6]uint8 + Fpack [6]uint8 +} + +type EpollEvent struct { + Events uint32 + PadFd int32 + Fd int32 + Pad int32 +} + +const ( + AT_FDCWD = -0x64 + AT_SYMLINK_NOFOLLOW = 0x100 + AT_REMOVEDIR = 0x200 +) + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Line uint8 + Cc [32]uint8 + Pad_cgo_0 [3]byte + Ispeed uint32 + Ospeed uint32 +} + +const ( + VINTR = 0x0 + VQUIT = 0x1 + VERASE = 0x2 + VKILL = 0x3 + VEOF = 0x4 + VTIME = 0x5 + VMIN = 0x6 + VSWTC = 0x7 + VSTART = 0x8 + VSTOP = 0x9 + VSUSP = 0xa + VEOL = 0xb + VREPRINT = 0xc + VDISCARD = 0xd + VWERASE = 0xe + VLNEXT = 0xf + VEOL2 = 0x10 + IGNBRK = 0x1 + BRKINT = 0x2 + IGNPAR = 0x4 + PARMRK = 0x8 + INPCK = 0x10 + ISTRIP = 0x20 + INLCR = 0x40 + IGNCR = 0x80 + ICRNL = 0x100 + IUCLC = 0x200 + IXON = 0x400 + IXANY = 0x800 + IXOFF = 0x1000 + IMAXBEL = 0x2000 + IUTF8 = 0x4000 + OPOST = 0x1 + OLCUC = 0x2 + ONLCR = 0x4 + OCRNL = 0x8 + ONOCR = 0x10 + ONLRET = 0x20 + OFILL = 0x40 + OFDEL = 0x80 + B0 = 0x0 + B50 = 0x1 + B75 = 0x2 + B110 = 0x3 + B134 = 0x4 + B150 = 0x5 + B200 = 0x6 + B300 = 0x7 + B600 = 0x8 + B1200 = 0x9 + B1800 = 0xa + B2400 = 0xb + B4800 = 0xc + B9600 = 0xd + B19200 = 0xe + B38400 = 0xf + CSIZE = 0x30 + CS5 = 0x0 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSTOPB = 0x40 + CREAD = 0x80 + PARENB = 0x100 + PARODD = 0x200 + HUPCL = 0x400 + CLOCAL = 0x800 + B57600 = 0x1001 + B115200 = 0x1002 + B230400 = 0x1003 + B460800 = 0x1004 + B500000 = 0x1005 + B576000 = 0x1006 + B921600 = 0x1007 + B1000000 = 0x1008 + B1152000 = 0x1009 + B1500000 = 0x100a + B2000000 = 0x100b + B2500000 = 0x100c + B3000000 = 0x100d + B3500000 = 0x100e + B4000000 = 0x100f + ISIG = 0x1 + ICANON = 0x2 + XCASE = 0x4 + ECHO = 0x8 + ECHOE = 0x10 + ECHOK = 0x20 + ECHONL = 0x40 + NOFLSH = 0x80 + TOSTOP = 0x100 + ECHOCTL = 0x200 + ECHOPRT = 0x400 + ECHOKE = 0x800 + FLUSHO = 0x1000 + PENDIN = 0x4000 + IEXTEN = 0x8000 + TCGETS = 0x5401 + TCSETS = 0x5402 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go new file mode 100644 index 0000000..f989a36 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go @@ -0,0 +1,597 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -fsigned-char types_linux.go + +// +build arm64,linux + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 + PathMax = 0x1000 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int64 +} + +type Timex struct { + Modes uint32 + Pad_cgo_0 [4]byte + Offset int64 + Freq int64 + Maxerror int64 + Esterror int64 + Status int32 + Pad_cgo_1 [4]byte + Constant int64 + Precision int64 + Tolerance int64 + Time Timeval + Tick int64 + Ppsfreq int64 + Jitter int64 + Shift int32 + Pad_cgo_2 [4]byte + Stabil int64 + Jitcnt int64 + Calcnt int64 + Errcnt int64 + Stbcnt int64 + Tai int32 + Pad_cgo_3 [44]byte +} + +type Time_t int64 + +type Tms struct { + Utime int64 + Stime int64 + Cutime int64 + Cstime int64 +} + +type Utimbuf struct { + Actime int64 + Modtime int64 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev uint64 + Ino uint64 + Mode uint32 + Nlink uint32 + Uid uint32 + Gid uint32 + Rdev uint64 + X__pad1 uint64 + Size int64 + Blksize int32 + X__pad2 int32 + Blocks int64 + Atim Timespec + Mtim Timespec + Ctim Timespec + X__glibc_reserved [2]int32 +} + +type Statfs_t struct { + Type int64 + Bsize int64 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Files uint64 + Ffree uint64 + Fsid Fsid + Namelen int64 + Frsize int64 + Flags int64 + Spare [4]int64 +} + +type Dirent struct { + Ino uint64 + Off int64 + Reclen uint16 + Type uint8 + Name [256]int8 + Pad_cgo_0 [5]byte +} + +type Fsid struct { + X__val [2]int32 +} + +type Flock_t struct { + Type int16 + Whence int16 + Pad_cgo_0 [4]byte + Start int64 + Len int64 + Pid int32 + Pad_cgo_1 [4]byte +} + +const ( + FADV_NORMAL = 0x0 + FADV_RANDOM = 0x1 + FADV_SEQUENTIAL = 0x2 + FADV_WILLNEED = 0x3 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 +) + +type RawSockaddrInet4 struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]uint8 +} + +type RawSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Family uint16 + Path [108]int8 +} + +type RawSockaddrLinklayer struct { + Family uint16 + Protocol uint16 + Ifindex int32 + Hatype uint16 + Pkttype uint8 + Halen uint8 + Addr [8]uint8 +} + +type RawSockaddrNetlink struct { + Family uint16 + Pad uint16 + Pid uint32 + Groups uint32 +} + +type RawSockaddr struct { + Family uint16 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [96]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *Iovec + Iovlen uint64 + Control *byte + Controllen uint64 + Flags int32 + Pad_cgo_1 [4]byte +} + +type Cmsghdr struct { + Len uint64 + Level int32 + Type int32 + X__cmsg_data [0]uint8 +} + +type Inet4Pktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Data [8]uint32 +} + +type Ucred struct { + Pid int32 + Uid uint32 + Gid uint32 +} + +type TCPInfo struct { + State uint8 + Ca_state uint8 + Retransmits uint8 + Probes uint8 + Backoff uint8 + Options uint8 + Pad_cgo_0 [2]byte + Rto uint32 + Ato uint32 + Snd_mss uint32 + Rcv_mss uint32 + Unacked uint32 + Sacked uint32 + Lost uint32 + Retrans uint32 + Fackets uint32 + Last_data_sent uint32 + Last_ack_sent uint32 + Last_data_recv uint32 + Last_ack_recv uint32 + Pmtu uint32 + Rcv_ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Snd_ssthresh uint32 + Snd_cwnd uint32 + Advmss uint32 + Reordering uint32 + Rcv_rtt uint32 + Rcv_space uint32 + Total_retrans uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x70 + SizeofSockaddrUnix = 0x6e + SizeofSockaddrLinklayer = 0x14 + SizeofSockaddrNetlink = 0xc + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPMreqn = 0xc + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x38 + SizeofCmsghdr = 0x10 + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 + SizeofUcred = 0xc + SizeofTCPInfo = 0x68 +) + +const ( + IFA_UNSPEC = 0x0 + IFA_ADDRESS = 0x1 + IFA_LOCAL = 0x2 + IFA_LABEL = 0x3 + IFA_BROADCAST = 0x4 + IFA_ANYCAST = 0x5 + IFA_CACHEINFO = 0x6 + IFA_MULTICAST = 0x7 + IFLA_UNSPEC = 0x0 + IFLA_ADDRESS = 0x1 + IFLA_BROADCAST = 0x2 + IFLA_IFNAME = 0x3 + IFLA_MTU = 0x4 + IFLA_LINK = 0x5 + IFLA_QDISC = 0x6 + IFLA_STATS = 0x7 + IFLA_COST = 0x8 + IFLA_PRIORITY = 0x9 + IFLA_MASTER = 0xa + IFLA_WIRELESS = 0xb + IFLA_PROTINFO = 0xc + IFLA_TXQLEN = 0xd + IFLA_MAP = 0xe + IFLA_WEIGHT = 0xf + IFLA_OPERSTATE = 0x10 + IFLA_LINKMODE = 0x11 + IFLA_LINKINFO = 0x12 + IFLA_NET_NS_PID = 0x13 + IFLA_IFALIAS = 0x14 + IFLA_MAX = 0x22 + RT_SCOPE_UNIVERSE = 0x0 + RT_SCOPE_SITE = 0xc8 + RT_SCOPE_LINK = 0xfd + RT_SCOPE_HOST = 0xfe + RT_SCOPE_NOWHERE = 0xff + RT_TABLE_UNSPEC = 0x0 + RT_TABLE_COMPAT = 0xfc + RT_TABLE_DEFAULT = 0xfd + RT_TABLE_MAIN = 0xfe + RT_TABLE_LOCAL = 0xff + RT_TABLE_MAX = 0xffffffff + RTA_UNSPEC = 0x0 + RTA_DST = 0x1 + RTA_SRC = 0x2 + RTA_IIF = 0x3 + RTA_OIF = 0x4 + RTA_GATEWAY = 0x5 + RTA_PRIORITY = 0x6 + RTA_PREFSRC = 0x7 + RTA_METRICS = 0x8 + RTA_MULTIPATH = 0x9 + RTA_FLOW = 0xb + RTA_CACHEINFO = 0xc + RTA_TABLE = 0xf + RTN_UNSPEC = 0x0 + RTN_UNICAST = 0x1 + RTN_LOCAL = 0x2 + RTN_BROADCAST = 0x3 + RTN_ANYCAST = 0x4 + RTN_MULTICAST = 0x5 + RTN_BLACKHOLE = 0x6 + RTN_UNREACHABLE = 0x7 + RTN_PROHIBIT = 0x8 + RTN_THROW = 0x9 + RTN_NAT = 0xa + RTN_XRESOLVE = 0xb + RTNLGRP_NONE = 0x0 + RTNLGRP_LINK = 0x1 + RTNLGRP_NOTIFY = 0x2 + RTNLGRP_NEIGH = 0x3 + RTNLGRP_TC = 0x4 + RTNLGRP_IPV4_IFADDR = 0x5 + RTNLGRP_IPV4_MROUTE = 0x6 + RTNLGRP_IPV4_ROUTE = 0x7 + RTNLGRP_IPV4_RULE = 0x8 + RTNLGRP_IPV6_IFADDR = 0x9 + RTNLGRP_IPV6_MROUTE = 0xa + RTNLGRP_IPV6_ROUTE = 0xb + RTNLGRP_IPV6_IFINFO = 0xc + RTNLGRP_IPV6_PREFIX = 0x12 + RTNLGRP_IPV6_RULE = 0x13 + RTNLGRP_ND_USEROPT = 0x14 + SizeofNlMsghdr = 0x10 + SizeofNlMsgerr = 0x14 + SizeofRtGenmsg = 0x1 + SizeofNlAttr = 0x4 + SizeofRtAttr = 0x4 + SizeofIfInfomsg = 0x10 + SizeofIfAddrmsg = 0x8 + SizeofRtMsg = 0xc + SizeofRtNexthop = 0x8 +) + +type NlMsghdr struct { + Len uint32 + Type uint16 + Flags uint16 + Seq uint32 + Pid uint32 +} + +type NlMsgerr struct { + Error int32 + Msg NlMsghdr +} + +type RtGenmsg struct { + Family uint8 +} + +type NlAttr struct { + Len uint16 + Type uint16 +} + +type RtAttr struct { + Len uint16 + Type uint16 +} + +type IfInfomsg struct { + Family uint8 + X__ifi_pad uint8 + Type uint16 + Index int32 + Flags uint32 + Change uint32 +} + +type IfAddrmsg struct { + Family uint8 + Prefixlen uint8 + Flags uint8 + Scope uint8 + Index uint32 +} + +type RtMsg struct { + Family uint8 + Dst_len uint8 + Src_len uint8 + Tos uint8 + Table uint8 + Protocol uint8 + Scope uint8 + Type uint8 + Flags uint32 +} + +type RtNexthop struct { + Len uint16 + Flags uint8 + Hops uint8 + Ifindex int32 +} + +const ( + SizeofSockFilter = 0x8 + SizeofSockFprog = 0x10 +) + +type SockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type SockFprog struct { + Len uint16 + Pad_cgo_0 [6]byte + Filter *SockFilter +} + +type InotifyEvent struct { + Wd int32 + Mask uint32 + Cookie uint32 + Len uint32 + Name [0]int8 +} + +const SizeofInotifyEvent = 0x10 + +type PtraceRegs struct { + Regs [31]uint64 + Sp uint64 + Pc uint64 + Pstate uint64 +} + +type FdSet struct { + Bits [16]int64 +} + +type Sysinfo_t struct { + Uptime int64 + Loads [3]uint64 + Totalram uint64 + Freeram uint64 + Sharedram uint64 + Bufferram uint64 + Totalswap uint64 + Freeswap uint64 + Procs uint16 + Pad uint16 + Pad_cgo_0 [4]byte + Totalhigh uint64 + Freehigh uint64 + Unit uint32 + X_f [0]int8 + Pad_cgo_1 [4]byte +} + +type Utsname struct { + Sysname [65]int8 + Nodename [65]int8 + Release [65]int8 + Version [65]int8 + Machine [65]int8 + Domainname [65]int8 +} + +type Ustat_t struct { + Tfree int32 + Pad_cgo_0 [4]byte + Tinode uint64 + Fname [6]int8 + Fpack [6]int8 + Pad_cgo_1 [4]byte +} + +type EpollEvent struct { + Events uint32 + Fd int32 + Pad int32 +} + +const ( + AT_FDCWD = -0x64 + AT_REMOVEDIR = 0x200 + AT_SYMLINK_NOFOLLOW = 0x100 +) + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Line uint8 + Cc [32]uint8 + Pad_cgo_0 [3]byte + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go new file mode 100644 index 0000000..808203d --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go @@ -0,0 +1,607 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_linux.go + +// +build ppc64,linux + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 + PathMax = 0x1000 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int64 +} + +type Timex struct { + Modes uint32 + Pad_cgo_0 [4]byte + Offset int64 + Freq int64 + Maxerror int64 + Esterror int64 + Status int32 + Pad_cgo_1 [4]byte + Constant int64 + Precision int64 + Tolerance int64 + Time Timeval + Tick int64 + Ppsfreq int64 + Jitter int64 + Shift int32 + Pad_cgo_2 [4]byte + Stabil int64 + Jitcnt int64 + Calcnt int64 + Errcnt int64 + Stbcnt int64 + Tai int32 + Pad_cgo_3 [44]byte +} + +type Time_t int64 + +type Tms struct { + Utime int64 + Stime int64 + Cutime int64 + Cstime int64 +} + +type Utimbuf struct { + Actime int64 + Modtime int64 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev uint64 + Ino uint64 + Nlink uint64 + Mode uint32 + Uid uint32 + Gid uint32 + X__pad2 int32 + Rdev uint64 + Size int64 + Blksize int64 + Blocks int64 + Atim Timespec + Mtim Timespec + Ctim Timespec + X__glibc_reserved4 uint64 + X__glibc_reserved5 uint64 + X__glibc_reserved6 uint64 +} + +type Statfs_t struct { + Type int64 + Bsize int64 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Files uint64 + Ffree uint64 + Fsid Fsid + Namelen int64 + Frsize int64 + Flags int64 + Spare [4]int64 +} + +type Dirent struct { + Ino uint64 + Off int64 + Reclen uint16 + Type uint8 + Name [256]uint8 + Pad_cgo_0 [5]byte +} + +type Fsid struct { + X__val [2]int32 +} + +type Flock_t struct { + Type int16 + Whence int16 + Pad_cgo_0 [4]byte + Start int64 + Len int64 + Pid int32 + Pad_cgo_1 [4]byte +} + +const ( + FADV_NORMAL = 0x0 + FADV_RANDOM = 0x1 + FADV_SEQUENTIAL = 0x2 + FADV_WILLNEED = 0x3 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 +) + +type RawSockaddrInet4 struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]uint8 +} + +type RawSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Family uint16 + Path [108]int8 +} + +type RawSockaddrLinklayer struct { + Family uint16 + Protocol uint16 + Ifindex int32 + Hatype uint16 + Pkttype uint8 + Halen uint8 + Addr [8]uint8 +} + +type RawSockaddrNetlink struct { + Family uint16 + Pad uint16 + Pid uint32 + Groups uint32 +} + +type RawSockaddr struct { + Family uint16 + Data [14]uint8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [96]uint8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *Iovec + Iovlen uint64 + Control *byte + Controllen uint64 + Flags int32 + Pad_cgo_1 [4]byte +} + +type Cmsghdr struct { + Len uint64 + Level int32 + Type int32 + X__cmsg_data [0]uint8 +} + +type Inet4Pktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Data [8]uint32 +} + +type Ucred struct { + Pid int32 + Uid uint32 + Gid uint32 +} + +type TCPInfo struct { + State uint8 + Ca_state uint8 + Retransmits uint8 + Probes uint8 + Backoff uint8 + Options uint8 + Pad_cgo_0 [2]byte + Rto uint32 + Ato uint32 + Snd_mss uint32 + Rcv_mss uint32 + Unacked uint32 + Sacked uint32 + Lost uint32 + Retrans uint32 + Fackets uint32 + Last_data_sent uint32 + Last_ack_sent uint32 + Last_data_recv uint32 + Last_ack_recv uint32 + Pmtu uint32 + Rcv_ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Snd_ssthresh uint32 + Snd_cwnd uint32 + Advmss uint32 + Reordering uint32 + Rcv_rtt uint32 + Rcv_space uint32 + Total_retrans uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x70 + SizeofSockaddrUnix = 0x6e + SizeofSockaddrLinklayer = 0x14 + SizeofSockaddrNetlink = 0xc + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPMreqn = 0xc + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x38 + SizeofCmsghdr = 0x10 + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 + SizeofUcred = 0xc + SizeofTCPInfo = 0x68 +) + +const ( + IFA_UNSPEC = 0x0 + IFA_ADDRESS = 0x1 + IFA_LOCAL = 0x2 + IFA_LABEL = 0x3 + IFA_BROADCAST = 0x4 + IFA_ANYCAST = 0x5 + IFA_CACHEINFO = 0x6 + IFA_MULTICAST = 0x7 + IFLA_UNSPEC = 0x0 + IFLA_ADDRESS = 0x1 + IFLA_BROADCAST = 0x2 + IFLA_IFNAME = 0x3 + IFLA_MTU = 0x4 + IFLA_LINK = 0x5 + IFLA_QDISC = 0x6 + IFLA_STATS = 0x7 + IFLA_COST = 0x8 + IFLA_PRIORITY = 0x9 + IFLA_MASTER = 0xa + IFLA_WIRELESS = 0xb + IFLA_PROTINFO = 0xc + IFLA_TXQLEN = 0xd + IFLA_MAP = 0xe + IFLA_WEIGHT = 0xf + IFLA_OPERSTATE = 0x10 + IFLA_LINKMODE = 0x11 + IFLA_LINKINFO = 0x12 + IFLA_NET_NS_PID = 0x13 + IFLA_IFALIAS = 0x14 + IFLA_MAX = 0x23 + RT_SCOPE_UNIVERSE = 0x0 + RT_SCOPE_SITE = 0xc8 + RT_SCOPE_LINK = 0xfd + RT_SCOPE_HOST = 0xfe + RT_SCOPE_NOWHERE = 0xff + RT_TABLE_UNSPEC = 0x0 + RT_TABLE_COMPAT = 0xfc + RT_TABLE_DEFAULT = 0xfd + RT_TABLE_MAIN = 0xfe + RT_TABLE_LOCAL = 0xff + RT_TABLE_MAX = 0xffffffff + RTA_UNSPEC = 0x0 + RTA_DST = 0x1 + RTA_SRC = 0x2 + RTA_IIF = 0x3 + RTA_OIF = 0x4 + RTA_GATEWAY = 0x5 + RTA_PRIORITY = 0x6 + RTA_PREFSRC = 0x7 + RTA_METRICS = 0x8 + RTA_MULTIPATH = 0x9 + RTA_FLOW = 0xb + RTA_CACHEINFO = 0xc + RTA_TABLE = 0xf + RTN_UNSPEC = 0x0 + RTN_UNICAST = 0x1 + RTN_LOCAL = 0x2 + RTN_BROADCAST = 0x3 + RTN_ANYCAST = 0x4 + RTN_MULTICAST = 0x5 + RTN_BLACKHOLE = 0x6 + RTN_UNREACHABLE = 0x7 + RTN_PROHIBIT = 0x8 + RTN_THROW = 0x9 + RTN_NAT = 0xa + RTN_XRESOLVE = 0xb + RTNLGRP_NONE = 0x0 + RTNLGRP_LINK = 0x1 + RTNLGRP_NOTIFY = 0x2 + RTNLGRP_NEIGH = 0x3 + RTNLGRP_TC = 0x4 + RTNLGRP_IPV4_IFADDR = 0x5 + RTNLGRP_IPV4_MROUTE = 0x6 + RTNLGRP_IPV4_ROUTE = 0x7 + RTNLGRP_IPV4_RULE = 0x8 + RTNLGRP_IPV6_IFADDR = 0x9 + RTNLGRP_IPV6_MROUTE = 0xa + RTNLGRP_IPV6_ROUTE = 0xb + RTNLGRP_IPV6_IFINFO = 0xc + RTNLGRP_IPV6_PREFIX = 0x12 + RTNLGRP_IPV6_RULE = 0x13 + RTNLGRP_ND_USEROPT = 0x14 + SizeofNlMsghdr = 0x10 + SizeofNlMsgerr = 0x14 + SizeofRtGenmsg = 0x1 + SizeofNlAttr = 0x4 + SizeofRtAttr = 0x4 + SizeofIfInfomsg = 0x10 + SizeofIfAddrmsg = 0x8 + SizeofRtMsg = 0xc + SizeofRtNexthop = 0x8 +) + +type NlMsghdr struct { + Len uint32 + Type uint16 + Flags uint16 + Seq uint32 + Pid uint32 +} + +type NlMsgerr struct { + Error int32 + Msg NlMsghdr +} + +type RtGenmsg struct { + Family uint8 +} + +type NlAttr struct { + Len uint16 + Type uint16 +} + +type RtAttr struct { + Len uint16 + Type uint16 +} + +type IfInfomsg struct { + Family uint8 + X__ifi_pad uint8 + Type uint16 + Index int32 + Flags uint32 + Change uint32 +} + +type IfAddrmsg struct { + Family uint8 + Prefixlen uint8 + Flags uint8 + Scope uint8 + Index uint32 +} + +type RtMsg struct { + Family uint8 + Dst_len uint8 + Src_len uint8 + Tos uint8 + Table uint8 + Protocol uint8 + Scope uint8 + Type uint8 + Flags uint32 +} + +type RtNexthop struct { + Len uint16 + Flags uint8 + Hops uint8 + Ifindex int32 +} + +const ( + SizeofSockFilter = 0x8 + SizeofSockFprog = 0x10 +) + +type SockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type SockFprog struct { + Len uint16 + Pad_cgo_0 [6]byte + Filter *SockFilter +} + +type InotifyEvent struct { + Wd int32 + Mask uint32 + Cookie uint32 + Len uint32 + Name [0]uint8 +} + +const SizeofInotifyEvent = 0x10 + +type PtraceRegs struct { + Gpr [32]uint64 + Nip uint64 + Msr uint64 + Orig_gpr3 uint64 + Ctr uint64 + Link uint64 + Xer uint64 + Ccr uint64 + Softe uint64 + Trap uint64 + Dar uint64 + Dsisr uint64 + Result uint64 +} + +type FdSet struct { + Bits [16]int64 +} + +type Sysinfo_t struct { + Uptime int64 + Loads [3]uint64 + Totalram uint64 + Freeram uint64 + Sharedram uint64 + Bufferram uint64 + Totalswap uint64 + Freeswap uint64 + Procs uint16 + Pad uint16 + Pad_cgo_0 [4]byte + Totalhigh uint64 + Freehigh uint64 + Unit uint32 + X_f [0]uint8 + Pad_cgo_1 [4]byte +} + +type Utsname struct { + Sysname [65]uint8 + Nodename [65]uint8 + Release [65]uint8 + Version [65]uint8 + Machine [65]uint8 + Domainname [65]uint8 +} + +type Ustat_t struct { + Tfree int32 + Pad_cgo_0 [4]byte + Tinode uint64 + Fname [6]uint8 + Fpack [6]uint8 + Pad_cgo_1 [4]byte +} + +type EpollEvent struct { + Events uint32 + Fd int32 + Pad int32 +} + +const ( + AT_FDCWD = -0x64 + AT_REMOVEDIR = 0x200 + AT_SYMLINK_NOFOLLOW = 0x100 +) + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Line uint8 + Cc [32]uint8 + Pad_cgo_0 [3]byte + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go new file mode 100644 index 0000000..d4a689f --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go @@ -0,0 +1,607 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_linux.go + +// +build ppc64le,linux + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 + PathMax = 0x1000 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int64 +} + +type Timex struct { + Modes uint32 + Pad_cgo_0 [4]byte + Offset int64 + Freq int64 + Maxerror int64 + Esterror int64 + Status int32 + Pad_cgo_1 [4]byte + Constant int64 + Precision int64 + Tolerance int64 + Time Timeval + Tick int64 + Ppsfreq int64 + Jitter int64 + Shift int32 + Pad_cgo_2 [4]byte + Stabil int64 + Jitcnt int64 + Calcnt int64 + Errcnt int64 + Stbcnt int64 + Tai int32 + Pad_cgo_3 [44]byte +} + +type Time_t int64 + +type Tms struct { + Utime int64 + Stime int64 + Cutime int64 + Cstime int64 +} + +type Utimbuf struct { + Actime int64 + Modtime int64 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev uint64 + Ino uint64 + Nlink uint64 + Mode uint32 + Uid uint32 + Gid uint32 + X__pad2 int32 + Rdev uint64 + Size int64 + Blksize int64 + Blocks int64 + Atim Timespec + Mtim Timespec + Ctim Timespec + X__glibc_reserved4 uint64 + X__glibc_reserved5 uint64 + X__glibc_reserved6 uint64 +} + +type Statfs_t struct { + Type int64 + Bsize int64 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Files uint64 + Ffree uint64 + Fsid Fsid + Namelen int64 + Frsize int64 + Flags int64 + Spare [4]int64 +} + +type Dirent struct { + Ino uint64 + Off int64 + Reclen uint16 + Type uint8 + Name [256]uint8 + Pad_cgo_0 [5]byte +} + +type Fsid struct { + X__val [2]int32 +} + +type Flock_t struct { + Type int16 + Whence int16 + Pad_cgo_0 [4]byte + Start int64 + Len int64 + Pid int32 + Pad_cgo_1 [4]byte +} + +const ( + FADV_NORMAL = 0x0 + FADV_RANDOM = 0x1 + FADV_SEQUENTIAL = 0x2 + FADV_WILLNEED = 0x3 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 +) + +type RawSockaddrInet4 struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]uint8 +} + +type RawSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Family uint16 + Path [108]int8 +} + +type RawSockaddrLinklayer struct { + Family uint16 + Protocol uint16 + Ifindex int32 + Hatype uint16 + Pkttype uint8 + Halen uint8 + Addr [8]uint8 +} + +type RawSockaddrNetlink struct { + Family uint16 + Pad uint16 + Pid uint32 + Groups uint32 +} + +type RawSockaddr struct { + Family uint16 + Data [14]uint8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [96]uint8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *Iovec + Iovlen uint64 + Control *byte + Controllen uint64 + Flags int32 + Pad_cgo_1 [4]byte +} + +type Cmsghdr struct { + Len uint64 + Level int32 + Type int32 + X__cmsg_data [0]uint8 +} + +type Inet4Pktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Data [8]uint32 +} + +type Ucred struct { + Pid int32 + Uid uint32 + Gid uint32 +} + +type TCPInfo struct { + State uint8 + Ca_state uint8 + Retransmits uint8 + Probes uint8 + Backoff uint8 + Options uint8 + Pad_cgo_0 [2]byte + Rto uint32 + Ato uint32 + Snd_mss uint32 + Rcv_mss uint32 + Unacked uint32 + Sacked uint32 + Lost uint32 + Retrans uint32 + Fackets uint32 + Last_data_sent uint32 + Last_ack_sent uint32 + Last_data_recv uint32 + Last_ack_recv uint32 + Pmtu uint32 + Rcv_ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Snd_ssthresh uint32 + Snd_cwnd uint32 + Advmss uint32 + Reordering uint32 + Rcv_rtt uint32 + Rcv_space uint32 + Total_retrans uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x70 + SizeofSockaddrUnix = 0x6e + SizeofSockaddrLinklayer = 0x14 + SizeofSockaddrNetlink = 0xc + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPMreqn = 0xc + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x38 + SizeofCmsghdr = 0x10 + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 + SizeofUcred = 0xc + SizeofTCPInfo = 0x68 +) + +const ( + IFA_UNSPEC = 0x0 + IFA_ADDRESS = 0x1 + IFA_LOCAL = 0x2 + IFA_LABEL = 0x3 + IFA_BROADCAST = 0x4 + IFA_ANYCAST = 0x5 + IFA_CACHEINFO = 0x6 + IFA_MULTICAST = 0x7 + IFLA_UNSPEC = 0x0 + IFLA_ADDRESS = 0x1 + IFLA_BROADCAST = 0x2 + IFLA_IFNAME = 0x3 + IFLA_MTU = 0x4 + IFLA_LINK = 0x5 + IFLA_QDISC = 0x6 + IFLA_STATS = 0x7 + IFLA_COST = 0x8 + IFLA_PRIORITY = 0x9 + IFLA_MASTER = 0xa + IFLA_WIRELESS = 0xb + IFLA_PROTINFO = 0xc + IFLA_TXQLEN = 0xd + IFLA_MAP = 0xe + IFLA_WEIGHT = 0xf + IFLA_OPERSTATE = 0x10 + IFLA_LINKMODE = 0x11 + IFLA_LINKINFO = 0x12 + IFLA_NET_NS_PID = 0x13 + IFLA_IFALIAS = 0x14 + IFLA_MAX = 0x22 + RT_SCOPE_UNIVERSE = 0x0 + RT_SCOPE_SITE = 0xc8 + RT_SCOPE_LINK = 0xfd + RT_SCOPE_HOST = 0xfe + RT_SCOPE_NOWHERE = 0xff + RT_TABLE_UNSPEC = 0x0 + RT_TABLE_COMPAT = 0xfc + RT_TABLE_DEFAULT = 0xfd + RT_TABLE_MAIN = 0xfe + RT_TABLE_LOCAL = 0xff + RT_TABLE_MAX = 0xffffffff + RTA_UNSPEC = 0x0 + RTA_DST = 0x1 + RTA_SRC = 0x2 + RTA_IIF = 0x3 + RTA_OIF = 0x4 + RTA_GATEWAY = 0x5 + RTA_PRIORITY = 0x6 + RTA_PREFSRC = 0x7 + RTA_METRICS = 0x8 + RTA_MULTIPATH = 0x9 + RTA_FLOW = 0xb + RTA_CACHEINFO = 0xc + RTA_TABLE = 0xf + RTN_UNSPEC = 0x0 + RTN_UNICAST = 0x1 + RTN_LOCAL = 0x2 + RTN_BROADCAST = 0x3 + RTN_ANYCAST = 0x4 + RTN_MULTICAST = 0x5 + RTN_BLACKHOLE = 0x6 + RTN_UNREACHABLE = 0x7 + RTN_PROHIBIT = 0x8 + RTN_THROW = 0x9 + RTN_NAT = 0xa + RTN_XRESOLVE = 0xb + RTNLGRP_NONE = 0x0 + RTNLGRP_LINK = 0x1 + RTNLGRP_NOTIFY = 0x2 + RTNLGRP_NEIGH = 0x3 + RTNLGRP_TC = 0x4 + RTNLGRP_IPV4_IFADDR = 0x5 + RTNLGRP_IPV4_MROUTE = 0x6 + RTNLGRP_IPV4_ROUTE = 0x7 + RTNLGRP_IPV4_RULE = 0x8 + RTNLGRP_IPV6_IFADDR = 0x9 + RTNLGRP_IPV6_MROUTE = 0xa + RTNLGRP_IPV6_ROUTE = 0xb + RTNLGRP_IPV6_IFINFO = 0xc + RTNLGRP_IPV6_PREFIX = 0x12 + RTNLGRP_IPV6_RULE = 0x13 + RTNLGRP_ND_USEROPT = 0x14 + SizeofNlMsghdr = 0x10 + SizeofNlMsgerr = 0x14 + SizeofRtGenmsg = 0x1 + SizeofNlAttr = 0x4 + SizeofRtAttr = 0x4 + SizeofIfInfomsg = 0x10 + SizeofIfAddrmsg = 0x8 + SizeofRtMsg = 0xc + SizeofRtNexthop = 0x8 +) + +type NlMsghdr struct { + Len uint32 + Type uint16 + Flags uint16 + Seq uint32 + Pid uint32 +} + +type NlMsgerr struct { + Error int32 + Msg NlMsghdr +} + +type RtGenmsg struct { + Family uint8 +} + +type NlAttr struct { + Len uint16 + Type uint16 +} + +type RtAttr struct { + Len uint16 + Type uint16 +} + +type IfInfomsg struct { + Family uint8 + X__ifi_pad uint8 + Type uint16 + Index int32 + Flags uint32 + Change uint32 +} + +type IfAddrmsg struct { + Family uint8 + Prefixlen uint8 + Flags uint8 + Scope uint8 + Index uint32 +} + +type RtMsg struct { + Family uint8 + Dst_len uint8 + Src_len uint8 + Tos uint8 + Table uint8 + Protocol uint8 + Scope uint8 + Type uint8 + Flags uint32 +} + +type RtNexthop struct { + Len uint16 + Flags uint8 + Hops uint8 + Ifindex int32 +} + +const ( + SizeofSockFilter = 0x8 + SizeofSockFprog = 0x10 +) + +type SockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type SockFprog struct { + Len uint16 + Pad_cgo_0 [6]byte + Filter *SockFilter +} + +type InotifyEvent struct { + Wd int32 + Mask uint32 + Cookie uint32 + Len uint32 + Name [0]uint8 +} + +const SizeofInotifyEvent = 0x10 + +type PtraceRegs struct { + Gpr [32]uint64 + Nip uint64 + Msr uint64 + Orig_gpr3 uint64 + Ctr uint64 + Link uint64 + Xer uint64 + Ccr uint64 + Softe uint64 + Trap uint64 + Dar uint64 + Dsisr uint64 + Result uint64 +} + +type FdSet struct { + Bits [16]int64 +} + +type Sysinfo_t struct { + Uptime int64 + Loads [3]uint64 + Totalram uint64 + Freeram uint64 + Sharedram uint64 + Bufferram uint64 + Totalswap uint64 + Freeswap uint64 + Procs uint16 + Pad uint16 + Pad_cgo_0 [4]byte + Totalhigh uint64 + Freehigh uint64 + Unit uint32 + X_f [0]uint8 + Pad_cgo_1 [4]byte +} + +type Utsname struct { + Sysname [65]uint8 + Nodename [65]uint8 + Release [65]uint8 + Version [65]uint8 + Machine [65]uint8 + Domainname [65]uint8 +} + +type Ustat_t struct { + Tfree int32 + Pad_cgo_0 [4]byte + Tinode uint64 + Fname [6]uint8 + Fpack [6]uint8 + Pad_cgo_1 [4]byte +} + +type EpollEvent struct { + Events uint32 + Fd int32 + Pad int32 +} + +const ( + AT_FDCWD = -0x64 + AT_REMOVEDIR = 0x200 + AT_SYMLINK_NOFOLLOW = 0x100 +) + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Line uint8 + Cc [32]uint8 + Pad_cgo_0 [3]byte + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go new file mode 100644 index 0000000..caf755f --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go @@ -0,0 +1,396 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_netbsd.go + +// +build 386,netbsd + +package unix + +const ( + sizeofPtr = 0x4 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x4 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int32 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int32 +} + +type Timeval struct { + Sec int64 + Usec int32 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int32 + Ixrss int32 + Idrss int32 + Isrss int32 + Minflt int32 + Majflt int32 + Nswap int32 + Inblock int32 + Oublock int32 + Msgsnd int32 + Msgrcv int32 + Nsignals int32 + Nvcsw int32 + Nivcsw int32 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev uint64 + Mode uint32 + Ino uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Rdev uint64 + Atimespec Timespec + Mtimespec Timespec + Ctimespec Timespec + Birthtimespec Timespec + Size int64 + Blocks int64 + Blksize uint32 + Flags uint32 + Gen uint32 + Spare [2]uint32 +} + +type Statfs_t [0]byte + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 +} + +type Dirent struct { + Fileno uint64 + Reclen uint16 + Namlen uint16 + Type uint8 + Name [512]int8 + Pad_cgo_0 [3]byte +} + +type Fsid struct { + X__fsid_val [2]int32 +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [12]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint32 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Iov *Iovec + Iovlen int32 + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x14 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x1c + SizeofCmsghdr = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint32 + Filter uint32 + Flags uint32 + Fflags uint32 + Data int64 + Udata int32 +} + +type FdSet struct { + Bits [8]uint32 +} + +const ( + SizeofIfMsghdr = 0x98 + SizeofIfData = 0x84 + SizeofIfaMsghdr = 0x18 + SizeofIfAnnounceMsghdr = 0x18 + SizeofRtMsghdr = 0x78 + SizeofRtMetrics = 0x50 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData + Pad_cgo_1 [4]byte +} + +type IfData struct { + Type uint8 + Addrlen uint8 + Hdrlen uint8 + Pad_cgo_0 [1]byte + Link_state int32 + Mtu uint64 + Metric uint64 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Noproto uint64 + Lastchange Timespec +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Metric int32 + Index uint16 + Pad_cgo_0 [6]byte +} + +type IfAnnounceMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Name [16]int8 + What uint16 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Use int32 + Inits int32 + Pad_cgo_1 [4]byte + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint64 + Mtu uint64 + Hopcount uint64 + Recvpipe uint64 + Sendpipe uint64 + Ssthresh uint64 + Rtt uint64 + Rttvar uint64 + Expire int64 + Pksent int64 +} + +type Mclpool [0]byte + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x80 + SizeofBpfProgram = 0x8 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x14 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint64 + Drop uint64 + Capt uint64 + Padding [13]uint64 +} + +type BpfProgram struct { + Len uint32 + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp BpfTimeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [2]byte +} + +type BpfTimeval struct { + Sec int32 + Usec int32 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed int32 + Ospeed int32 +} + +type Sysctlnode struct { + Flags uint32 + Num int32 + Name [32]int8 + Ver uint32 + X__rsvd uint32 + Un [16]byte + X_sysctl_size [8]byte + X_sysctl_func [8]byte + X_sysctl_parent [8]byte + X_sysctl_desc [8]byte +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go new file mode 100644 index 0000000..91b4a53 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go @@ -0,0 +1,403 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_netbsd.go + +// +build amd64,netbsd + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int32 + Pad_cgo_0 [4]byte +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev uint64 + Mode uint32 + Pad_cgo_0 [4]byte + Ino uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Pad_cgo_1 [4]byte + Rdev uint64 + Atimespec Timespec + Mtimespec Timespec + Ctimespec Timespec + Birthtimespec Timespec + Size int64 + Blocks int64 + Blksize uint32 + Flags uint32 + Gen uint32 + Spare [2]uint32 + Pad_cgo_2 [4]byte +} + +type Statfs_t [0]byte + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 +} + +type Dirent struct { + Fileno uint64 + Reclen uint16 + Namlen uint16 + Type uint8 + Name [512]int8 + Pad_cgo_0 [3]byte +} + +type Fsid struct { + X__fsid_val [2]int32 +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [12]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *Iovec + Iovlen int32 + Pad_cgo_1 [4]byte + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x14 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x30 + SizeofCmsghdr = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint64 + Filter uint32 + Flags uint32 + Fflags uint32 + Pad_cgo_0 [4]byte + Data int64 + Udata int64 +} + +type FdSet struct { + Bits [8]uint32 +} + +const ( + SizeofIfMsghdr = 0x98 + SizeofIfData = 0x88 + SizeofIfaMsghdr = 0x18 + SizeofIfAnnounceMsghdr = 0x18 + SizeofRtMsghdr = 0x78 + SizeofRtMetrics = 0x50 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData +} + +type IfData struct { + Type uint8 + Addrlen uint8 + Hdrlen uint8 + Pad_cgo_0 [1]byte + Link_state int32 + Mtu uint64 + Metric uint64 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Noproto uint64 + Lastchange Timespec +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Metric int32 + Index uint16 + Pad_cgo_0 [6]byte +} + +type IfAnnounceMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Name [16]int8 + What uint16 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Use int32 + Inits int32 + Pad_cgo_1 [4]byte + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint64 + Mtu uint64 + Hopcount uint64 + Recvpipe uint64 + Sendpipe uint64 + Ssthresh uint64 + Rtt uint64 + Rttvar uint64 + Expire int64 + Pksent int64 +} + +type Mclpool [0]byte + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x80 + SizeofBpfProgram = 0x10 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x20 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint64 + Drop uint64 + Capt uint64 + Padding [13]uint64 +} + +type BpfProgram struct { + Len uint32 + Pad_cgo_0 [4]byte + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp BpfTimeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [6]byte +} + +type BpfTimeval struct { + Sec int64 + Usec int64 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed int32 + Ospeed int32 +} + +type Sysctlnode struct { + Flags uint32 + Num int32 + Name [32]int8 + Ver uint32 + X__rsvd uint32 + Un [16]byte + X_sysctl_size [8]byte + X_sysctl_func [8]byte + X_sysctl_parent [8]byte + X_sysctl_desc [8]byte +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go new file mode 100644 index 0000000..c0758f9 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go @@ -0,0 +1,401 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_netbsd.go + +// +build arm,netbsd + +package unix + +const ( + sizeofPtr = 0x4 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x4 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int32 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int32 + Pad_cgo_0 [4]byte +} + +type Timeval struct { + Sec int64 + Usec int32 + Pad_cgo_0 [4]byte +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int32 + Ixrss int32 + Idrss int32 + Isrss int32 + Minflt int32 + Majflt int32 + Nswap int32 + Inblock int32 + Oublock int32 + Msgsnd int32 + Msgrcv int32 + Nsignals int32 + Nvcsw int32 + Nivcsw int32 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev uint64 + Mode uint32 + Pad_cgo_0 [4]byte + Ino uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Pad_cgo_1 [4]byte + Rdev uint64 + Atimespec Timespec + Mtimespec Timespec + Ctimespec Timespec + Birthtimespec Timespec + Size int64 + Blocks int64 + Blksize uint32 + Flags uint32 + Gen uint32 + Spare [2]uint32 + Pad_cgo_2 [4]byte +} + +type Statfs_t [0]byte + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 +} + +type Dirent struct { + Fileno uint64 + Reclen uint16 + Namlen uint16 + Type uint8 + Name [512]int8 + Pad_cgo_0 [3]byte +} + +type Fsid struct { + X__fsid_val [2]int32 +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [12]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint32 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Iov *Iovec + Iovlen int32 + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x14 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x1c + SizeofCmsghdr = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint32 + Filter uint32 + Flags uint32 + Fflags uint32 + Data int64 + Udata int32 + Pad_cgo_0 [4]byte +} + +type FdSet struct { + Bits [8]uint32 +} + +const ( + SizeofIfMsghdr = 0x98 + SizeofIfData = 0x88 + SizeofIfaMsghdr = 0x18 + SizeofIfAnnounceMsghdr = 0x18 + SizeofRtMsghdr = 0x78 + SizeofRtMetrics = 0x50 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData +} + +type IfData struct { + Type uint8 + Addrlen uint8 + Hdrlen uint8 + Pad_cgo_0 [1]byte + Link_state int32 + Mtu uint64 + Metric uint64 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Noproto uint64 + Lastchange Timespec +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Metric int32 + Index uint16 + Pad_cgo_0 [6]byte +} + +type IfAnnounceMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Name [16]int8 + What uint16 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Use int32 + Inits int32 + Pad_cgo_1 [4]byte + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint64 + Mtu uint64 + Hopcount uint64 + Recvpipe uint64 + Sendpipe uint64 + Ssthresh uint64 + Rtt uint64 + Rttvar uint64 + Expire int64 + Pksent int64 +} + +type Mclpool [0]byte + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x80 + SizeofBpfProgram = 0x8 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x14 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint64 + Drop uint64 + Capt uint64 + Padding [13]uint64 +} + +type BpfProgram struct { + Len uint32 + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp BpfTimeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [2]byte +} + +type BpfTimeval struct { + Sec int32 + Usec int32 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed int32 + Ospeed int32 +} + +type Sysctlnode struct { + Flags uint32 + Num int32 + Name [32]int8 + Ver uint32 + X__rsvd uint32 + Un [16]byte + X_sysctl_size [8]byte + X_sysctl_func [8]byte + X_sysctl_parent [8]byte + X_sysctl_desc [8]byte +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go new file mode 100644 index 0000000..860a469 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go @@ -0,0 +1,441 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_openbsd.go + +// +build 386,openbsd + +package unix + +const ( + sizeofPtr = 0x4 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x4 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int32 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int32 +} + +type Timeval struct { + Sec int64 + Usec int32 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int32 + Ixrss int32 + Idrss int32 + Isrss int32 + Minflt int32 + Majflt int32 + Nswap int32 + Inblock int32 + Oublock int32 + Msgsnd int32 + Msgrcv int32 + Nsignals int32 + Nvcsw int32 + Nivcsw int32 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +const ( + S_IFMT = 0xf000 + S_IFIFO = 0x1000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFBLK = 0x6000 + S_IFREG = 0x8000 + S_IFLNK = 0xa000 + S_IFSOCK = 0xc000 + S_ISUID = 0x800 + S_ISGID = 0x400 + S_ISVTX = 0x200 + S_IRUSR = 0x100 + S_IWUSR = 0x80 + S_IXUSR = 0x40 +) + +type Stat_t struct { + Mode uint32 + Dev int32 + Ino uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Rdev int32 + Atim Timespec + Mtim Timespec + Ctim Timespec + Size int64 + Blocks int64 + Blksize uint32 + Flags uint32 + Gen uint32 + X__st_birthtim Timespec +} + +type Statfs_t struct { + F_flags uint32 + F_bsize uint32 + F_iosize uint32 + F_blocks uint64 + F_bfree uint64 + F_bavail int64 + F_files uint64 + F_ffree uint64 + F_favail int64 + F_syncwrites uint64 + F_syncreads uint64 + F_asyncwrites uint64 + F_asyncreads uint64 + F_fsid Fsid + F_namemax uint32 + F_owner uint32 + F_ctime uint64 + F_fstypename [16]int8 + F_mntonname [90]int8 + F_mntfromname [90]int8 + F_mntfromspec [90]int8 + Pad_cgo_0 [2]byte + Mount_info [160]byte +} + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 +} + +type Dirent struct { + Fileno uint64 + Off int64 + Reclen uint16 + Type uint8 + Namlen uint8 + X__d_padding [4]uint8 + Name [256]int8 +} + +type Fsid struct { + Val [2]int32 +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [24]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint32 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Iov *Iovec + Iovlen uint32 + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x20 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x1c + SizeofCmsghdr = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint32 + Filter int16 + Flags uint16 + Fflags uint32 + Data int64 + Udata *byte +} + +type FdSet struct { + Bits [32]uint32 +} + +const ( + SizeofIfMsghdr = 0xec + SizeofIfData = 0xd4 + SizeofIfaMsghdr = 0x18 + SizeofIfAnnounceMsghdr = 0x1a + SizeofRtMsghdr = 0x60 + SizeofRtMetrics = 0x38 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Hdrlen uint16 + Index uint16 + Tableid uint16 + Pad1 uint8 + Pad2 uint8 + Addrs int32 + Flags int32 + Xflags int32 + Data IfData +} + +type IfData struct { + Type uint8 + Addrlen uint8 + Hdrlen uint8 + Link_state uint8 + Mtu uint32 + Metric uint32 + Pad uint32 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Noproto uint64 + Capabilities uint32 + Lastchange Timeval + Mclpool [7]Mclpool +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Hdrlen uint16 + Index uint16 + Tableid uint16 + Pad1 uint8 + Pad2 uint8 + Addrs int32 + Flags int32 + Metric int32 +} + +type IfAnnounceMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Hdrlen uint16 + Index uint16 + What uint16 + Name [16]int8 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Hdrlen uint16 + Index uint16 + Tableid uint16 + Priority uint8 + Mpls uint8 + Addrs int32 + Flags int32 + Fmask int32 + Pid int32 + Seq int32 + Errno int32 + Inits uint32 + Rmx RtMetrics +} + +type RtMetrics struct { + Pksent uint64 + Expire int64 + Locks uint32 + Mtu uint32 + Refcnt uint32 + Hopcount uint32 + Recvpipe uint32 + Sendpipe uint32 + Ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Pad uint32 +} + +type Mclpool struct { + Grown int32 + Alive uint16 + Hwm uint16 + Cwm uint16 + Lwm uint16 +} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x8 + SizeofBpfProgram = 0x8 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x14 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint32 + Drop uint32 +} + +type BpfProgram struct { + Len uint32 + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp BpfTimeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [2]byte +} + +type BpfTimeval struct { + Sec uint32 + Usec uint32 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed int32 + Ospeed int32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go new file mode 100644 index 0000000..23c5272 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go @@ -0,0 +1,448 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_openbsd.go + +// +build amd64,openbsd + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int64 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +const ( + S_IFMT = 0xf000 + S_IFIFO = 0x1000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFBLK = 0x6000 + S_IFREG = 0x8000 + S_IFLNK = 0xa000 + S_IFSOCK = 0xc000 + S_ISUID = 0x800 + S_ISGID = 0x400 + S_ISVTX = 0x200 + S_IRUSR = 0x100 + S_IWUSR = 0x80 + S_IXUSR = 0x40 +) + +type Stat_t struct { + Mode uint32 + Dev int32 + Ino uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Rdev int32 + Atim Timespec + Mtim Timespec + Ctim Timespec + Size int64 + Blocks int64 + Blksize uint32 + Flags uint32 + Gen uint32 + Pad_cgo_0 [4]byte + X__st_birthtim Timespec +} + +type Statfs_t struct { + F_flags uint32 + F_bsize uint32 + F_iosize uint32 + Pad_cgo_0 [4]byte + F_blocks uint64 + F_bfree uint64 + F_bavail int64 + F_files uint64 + F_ffree uint64 + F_favail int64 + F_syncwrites uint64 + F_syncreads uint64 + F_asyncwrites uint64 + F_asyncreads uint64 + F_fsid Fsid + F_namemax uint32 + F_owner uint32 + F_ctime uint64 + F_fstypename [16]int8 + F_mntonname [90]int8 + F_mntfromname [90]int8 + F_mntfromspec [90]int8 + Pad_cgo_1 [2]byte + Mount_info [160]byte +} + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 +} + +type Dirent struct { + Fileno uint64 + Off int64 + Reclen uint16 + Type uint8 + Namlen uint8 + X__d_padding [4]uint8 + Name [256]int8 +} + +type Fsid struct { + Val [2]int32 +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [24]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *Iovec + Iovlen uint32 + Pad_cgo_1 [4]byte + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x20 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x30 + SizeofCmsghdr = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint64 + Filter int16 + Flags uint16 + Fflags uint32 + Data int64 + Udata *byte +} + +type FdSet struct { + Bits [32]uint32 +} + +const ( + SizeofIfMsghdr = 0xf8 + SizeofIfData = 0xe0 + SizeofIfaMsghdr = 0x18 + SizeofIfAnnounceMsghdr = 0x1a + SizeofRtMsghdr = 0x60 + SizeofRtMetrics = 0x38 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Hdrlen uint16 + Index uint16 + Tableid uint16 + Pad1 uint8 + Pad2 uint8 + Addrs int32 + Flags int32 + Xflags int32 + Data IfData +} + +type IfData struct { + Type uint8 + Addrlen uint8 + Hdrlen uint8 + Link_state uint8 + Mtu uint32 + Metric uint32 + Pad uint32 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Noproto uint64 + Capabilities uint32 + Pad_cgo_0 [4]byte + Lastchange Timeval + Mclpool [7]Mclpool + Pad_cgo_1 [4]byte +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Hdrlen uint16 + Index uint16 + Tableid uint16 + Pad1 uint8 + Pad2 uint8 + Addrs int32 + Flags int32 + Metric int32 +} + +type IfAnnounceMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Hdrlen uint16 + Index uint16 + What uint16 + Name [16]int8 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Hdrlen uint16 + Index uint16 + Tableid uint16 + Priority uint8 + Mpls uint8 + Addrs int32 + Flags int32 + Fmask int32 + Pid int32 + Seq int32 + Errno int32 + Inits uint32 + Rmx RtMetrics +} + +type RtMetrics struct { + Pksent uint64 + Expire int64 + Locks uint32 + Mtu uint32 + Refcnt uint32 + Hopcount uint32 + Recvpipe uint32 + Sendpipe uint32 + Ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Pad uint32 +} + +type Mclpool struct { + Grown int32 + Alive uint16 + Hwm uint16 + Cwm uint16 + Lwm uint16 +} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x8 + SizeofBpfProgram = 0x10 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x14 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint32 + Drop uint32 +} + +type BpfProgram struct { + Len uint32 + Pad_cgo_0 [4]byte + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp BpfTimeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [2]byte +} + +type BpfTimeval struct { + Sec uint32 + Usec uint32 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed int32 + Ospeed int32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go new file mode 100644 index 0000000..b3b928a --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go @@ -0,0 +1,422 @@ +// +build amd64,solaris +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_solaris.go + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 + PathMax = 0x400 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int64 +} + +type Timeval32 struct { + Sec int32 + Usec int32 +} + +type Tms struct { + Utime int64 + Stime int64 + Cutime int64 + Cstime int64 +} + +type Utimbuf struct { + Actime int64 + Modtime int64 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +const ( + S_IFMT = 0xf000 + S_IFIFO = 0x1000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFBLK = 0x6000 + S_IFREG = 0x8000 + S_IFLNK = 0xa000 + S_IFSOCK = 0xc000 + S_ISUID = 0x800 + S_ISGID = 0x400 + S_ISVTX = 0x200 + S_IRUSR = 0x100 + S_IWUSR = 0x80 + S_IXUSR = 0x40 +) + +type Stat_t struct { + Dev uint64 + Ino uint64 + Mode uint32 + Nlink uint32 + Uid uint32 + Gid uint32 + Rdev uint64 + Size int64 + Atim Timespec + Mtim Timespec + Ctim Timespec + Blksize int32 + Pad_cgo_0 [4]byte + Blocks int64 + Fstype [16]int8 +} + +type Flock_t struct { + Type int16 + Whence int16 + Pad_cgo_0 [4]byte + Start int64 + Len int64 + Sysid int32 + Pid int32 + Pad [4]int64 +} + +type Dirent struct { + Ino uint64 + Off int64 + Reclen uint16 + Name [1]int8 + Pad_cgo_0 [5]byte +} + +type RawSockaddrInet4 struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 + X__sin6_src_id uint32 +} + +type RawSockaddrUnix struct { + Family uint16 + Path [108]int8 +} + +type RawSockaddrDatalink struct { + Family uint16 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [244]int8 +} + +type RawSockaddr struct { + Family uint16 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [236]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *int8 + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *Iovec + Iovlen int32 + Pad_cgo_1 [4]byte + Accrights *int8 + Accrightslen int32 + Pad_cgo_2 [4]byte +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + X__icmp6_filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x20 + SizeofSockaddrAny = 0xfc + SizeofSockaddrUnix = 0x6e + SizeofSockaddrDatalink = 0xfc + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x30 + SizeofCmsghdr = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x24 + SizeofICMPv6Filter = 0x20 +) + +type FdSet struct { + Bits [1024]int64 +} + +type Utsname struct { + Sysname [257]int8 + Nodename [257]int8 + Release [257]int8 + Version [257]int8 + Machine [257]int8 +} + +type Ustat_t struct { + Tfree int64 + Tinode uint64 + Fname [6]int8 + Fpack [6]int8 + Pad_cgo_0 [4]byte +} + +const ( + AT_FDCWD = 0xffd19553 + AT_SYMLINK_NOFOLLOW = 0x1000 + AT_SYMLINK_FOLLOW = 0x2000 + AT_REMOVEDIR = 0x1 + AT_EACCESS = 0x4 +) + +const ( + SizeofIfMsghdr = 0x54 + SizeofIfData = 0x44 + SizeofIfaMsghdr = 0x14 + SizeofRtMsghdr = 0x4c + SizeofRtMetrics = 0x28 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData +} + +type IfData struct { + Type uint8 + Addrlen uint8 + Hdrlen uint8 + Pad_cgo_0 [1]byte + Mtu uint32 + Metric uint32 + Baudrate uint32 + Ipackets uint32 + Ierrors uint32 + Opackets uint32 + Oerrors uint32 + Collisions uint32 + Ibytes uint32 + Obytes uint32 + Imcasts uint32 + Omcasts uint32 + Iqdrops uint32 + Noproto uint32 + Lastchange Timeval32 +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Metric int32 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Use int32 + Inits uint32 + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint32 + Mtu uint32 + Hopcount uint32 + Expire uint32 + Recvpipe uint32 + Sendpipe uint32 + Ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Pksent uint32 +} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x80 + SizeofBpfProgram = 0x10 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x14 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint64 + Drop uint64 + Capt uint64 + Padding [13]uint64 +} + +type BpfProgram struct { + Len uint32 + Pad_cgo_0 [4]byte + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfTimeval struct { + Sec int32 + Usec int32 +} + +type BpfHdr struct { + Tstamp BpfTimeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [2]byte +} + +const _SC_PAGESIZE = 0xb + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [19]uint8 + Pad_cgo_0 [1]byte +} + +type Termio struct { + Iflag uint16 + Oflag uint16 + Cflag uint16 + Lflag uint16 + Line int8 + Cc [8]uint8 + Pad_cgo_0 [1]byte +} + +type Winsize struct { + Row uint16 + Col uint16 + Xpixel uint16 + Ypixel uint16 +} diff --git a/vendor/golang.org/x/sys/windows/asm.s b/vendor/golang.org/x/sys/windows/asm.s new file mode 100644 index 0000000..d4ca868 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/asm.s @@ -0,0 +1,8 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +#include "textflag.h" + +TEXT ·use(SB),NOSPLIT,$0 + RET diff --git a/vendor/golang.org/x/sys/windows/asm_windows_386.s b/vendor/golang.org/x/sys/windows/asm_windows_386.s new file mode 100644 index 0000000..1c20dd2 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/asm_windows_386.s @@ -0,0 +1,13 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +// System calls for 386, Windows are implemented in runtime/syscall_windows.goc +// + +TEXT ·getprocaddress(SB), 7, $0-8 + JMP syscall·getprocaddress(SB) + +TEXT ·loadlibrary(SB), 7, $0-4 + JMP syscall·loadlibrary(SB) diff --git a/vendor/golang.org/x/sys/windows/asm_windows_amd64.s b/vendor/golang.org/x/sys/windows/asm_windows_amd64.s new file mode 100644 index 0000000..4d025ab --- /dev/null +++ b/vendor/golang.org/x/sys/windows/asm_windows_amd64.s @@ -0,0 +1,13 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +// System calls for amd64, Windows are implemented in runtime/syscall_windows.goc +// + +TEXT ·getprocaddress(SB), 7, $0-32 + JMP syscall·getprocaddress(SB) + +TEXT ·loadlibrary(SB), 7, $0-8 + JMP syscall·loadlibrary(SB) diff --git a/vendor/golang.org/x/sys/windows/dll_windows.go b/vendor/golang.org/x/sys/windows/dll_windows.go new file mode 100644 index 0000000..7f9f05f --- /dev/null +++ b/vendor/golang.org/x/sys/windows/dll_windows.go @@ -0,0 +1,275 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package windows + +import ( + "sync" + "sync/atomic" + "syscall" + "unsafe" +) + +// DLLError describes reasons for DLL load failures. +type DLLError struct { + Err error + ObjName string + Msg string +} + +func (e *DLLError) Error() string { return e.Msg } + +// Implemented in runtime/syscall_windows.goc; we provide jumps to them in our assembly file. +func loadlibrary(filename *uint16) (handle uintptr, err syscall.Errno) +func getprocaddress(handle uintptr, procname *uint8) (proc uintptr, err syscall.Errno) + +// A DLL implements access to a single DLL. +type DLL struct { + Name string + Handle Handle +} + +// LoadDLL loads DLL file into memory. +func LoadDLL(name string) (dll *DLL, err error) { + namep, err := UTF16PtrFromString(name) + if err != nil { + return nil, err + } + h, e := loadlibrary(namep) + if e != 0 { + return nil, &DLLError{ + Err: e, + ObjName: name, + Msg: "Failed to load " + name + ": " + e.Error(), + } + } + d := &DLL{ + Name: name, + Handle: Handle(h), + } + return d, nil +} + +// MustLoadDLL is like LoadDLL but panics if load operation failes. +func MustLoadDLL(name string) *DLL { + d, e := LoadDLL(name) + if e != nil { + panic(e) + } + return d +} + +// FindProc searches DLL d for procedure named name and returns *Proc +// if found. It returns an error if search fails. +func (d *DLL) FindProc(name string) (proc *Proc, err error) { + namep, err := BytePtrFromString(name) + if err != nil { + return nil, err + } + a, e := getprocaddress(uintptr(d.Handle), namep) + if e != 0 { + return nil, &DLLError{ + Err: e, + ObjName: name, + Msg: "Failed to find " + name + " procedure in " + d.Name + ": " + e.Error(), + } + } + p := &Proc{ + Dll: d, + Name: name, + addr: a, + } + return p, nil +} + +// MustFindProc is like FindProc but panics if search fails. +func (d *DLL) MustFindProc(name string) *Proc { + p, e := d.FindProc(name) + if e != nil { + panic(e) + } + return p +} + +// Release unloads DLL d from memory. +func (d *DLL) Release() (err error) { + return FreeLibrary(d.Handle) +} + +// A Proc implements access to a procedure inside a DLL. +type Proc struct { + Dll *DLL + Name string + addr uintptr +} + +// Addr returns the address of the procedure represented by p. +// The return value can be passed to Syscall to run the procedure. +func (p *Proc) Addr() uintptr { + return p.addr +} + +// Call executes procedure p with arguments a. It will panic, if more then 15 arguments +// are supplied. +// +// The returned error is always non-nil, constructed from the result of GetLastError. +// Callers must inspect the primary return value to decide whether an error occurred +// (according to the semantics of the specific function being called) before consulting +// the error. The error will be guaranteed to contain windows.Errno. +func (p *Proc) Call(a ...uintptr) (r1, r2 uintptr, lastErr error) { + switch len(a) { + case 0: + return syscall.Syscall(p.Addr(), uintptr(len(a)), 0, 0, 0) + case 1: + return syscall.Syscall(p.Addr(), uintptr(len(a)), a[0], 0, 0) + case 2: + return syscall.Syscall(p.Addr(), uintptr(len(a)), a[0], a[1], 0) + case 3: + return syscall.Syscall(p.Addr(), uintptr(len(a)), a[0], a[1], a[2]) + case 4: + return syscall.Syscall6(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], 0, 0) + case 5: + return syscall.Syscall6(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], 0) + case 6: + return syscall.Syscall6(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5]) + case 7: + return syscall.Syscall9(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], 0, 0) + case 8: + return syscall.Syscall9(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], 0) + case 9: + return syscall.Syscall9(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]) + case 10: + return syscall.Syscall12(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], 0, 0) + case 11: + return syscall.Syscall12(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], 0) + case 12: + return syscall.Syscall12(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11]) + case 13: + return syscall.Syscall15(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], 0, 0) + case 14: + return syscall.Syscall15(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], 0) + case 15: + return syscall.Syscall15(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14]) + default: + panic("Call " + p.Name + " with too many arguments " + itoa(len(a)) + ".") + } + return +} + +// A LazyDLL implements access to a single DLL. +// It will delay the load of the DLL until the first +// call to its Handle method or to one of its +// LazyProc's Addr method. +type LazyDLL struct { + mu sync.Mutex + dll *DLL // non nil once DLL is loaded + Name string +} + +// Load loads DLL file d.Name into memory. It returns an error if fails. +// Load will not try to load DLL, if it is already loaded into memory. +func (d *LazyDLL) Load() error { + // Non-racy version of: + // if d.dll == nil { + if atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(&d.dll))) == nil { + d.mu.Lock() + defer d.mu.Unlock() + if d.dll == nil { + dll, e := LoadDLL(d.Name) + if e != nil { + return e + } + // Non-racy version of: + // d.dll = dll + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(&d.dll)), unsafe.Pointer(dll)) + } + } + return nil +} + +// mustLoad is like Load but panics if search fails. +func (d *LazyDLL) mustLoad() { + e := d.Load() + if e != nil { + panic(e) + } +} + +// Handle returns d's module handle. +func (d *LazyDLL) Handle() uintptr { + d.mustLoad() + return uintptr(d.dll.Handle) +} + +// NewProc returns a LazyProc for accessing the named procedure in the DLL d. +func (d *LazyDLL) NewProc(name string) *LazyProc { + return &LazyProc{l: d, Name: name} +} + +// NewLazyDLL creates new LazyDLL associated with DLL file. +func NewLazyDLL(name string) *LazyDLL { + return &LazyDLL{Name: name} +} + +// A LazyProc implements access to a procedure inside a LazyDLL. +// It delays the lookup until the Addr method is called. +type LazyProc struct { + mu sync.Mutex + Name string + l *LazyDLL + proc *Proc +} + +// Find searches DLL for procedure named p.Name. It returns +// an error if search fails. Find will not search procedure, +// if it is already found and loaded into memory. +func (p *LazyProc) Find() error { + // Non-racy version of: + // if p.proc == nil { + if atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(&p.proc))) == nil { + p.mu.Lock() + defer p.mu.Unlock() + if p.proc == nil { + e := p.l.Load() + if e != nil { + return e + } + proc, e := p.l.dll.FindProc(p.Name) + if e != nil { + return e + } + // Non-racy version of: + // p.proc = proc + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(&p.proc)), unsafe.Pointer(proc)) + } + } + return nil +} + +// mustFind is like Find but panics if search fails. +func (p *LazyProc) mustFind() { + e := p.Find() + if e != nil { + panic(e) + } +} + +// Addr returns the address of the procedure represented by p. +// The return value can be passed to Syscall to run the procedure. +func (p *LazyProc) Addr() uintptr { + p.mustFind() + return p.proc.Addr() +} + +// Call executes procedure p with arguments a. It will panic, if more then 15 arguments +// are supplied. +// +// The returned error is always non-nil, constructed from the result of GetLastError. +// Callers must inspect the primary return value to decide whether an error occurred +// (according to the semantics of the specific function being called) before consulting +// the error. The error will be guaranteed to contain windows.Errno. +func (p *LazyProc) Call(a ...uintptr) (r1, r2 uintptr, lastErr error) { + p.mustFind() + return p.proc.Call(a...) +} diff --git a/vendor/golang.org/x/sys/windows/env_unset.go b/vendor/golang.org/x/sys/windows/env_unset.go new file mode 100644 index 0000000..999ffac --- /dev/null +++ b/vendor/golang.org/x/sys/windows/env_unset.go @@ -0,0 +1,14 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.4 + +package windows + +import "syscall" + +func Unsetenv(key string) error { + // This was added in Go 1.4. + return syscall.Unsetenv(key) +} diff --git a/vendor/golang.org/x/sys/windows/env_windows.go b/vendor/golang.org/x/sys/windows/env_windows.go new file mode 100644 index 0000000..a9d8ef4 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/env_windows.go @@ -0,0 +1,25 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Windows environment variables. + +package windows + +import "syscall" + +func Getenv(key string) (value string, found bool) { + return syscall.Getenv(key) +} + +func Setenv(key, value string) error { + return syscall.Setenv(key, value) +} + +func Clearenv() { + syscall.Clearenv() +} + +func Environ() []string { + return syscall.Environ() +} diff --git a/vendor/golang.org/x/sys/windows/eventlog.go b/vendor/golang.org/x/sys/windows/eventlog.go new file mode 100644 index 0000000..40af946 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/eventlog.go @@ -0,0 +1,20 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package windows + +const ( + EVENTLOG_SUCCESS = 0 + EVENTLOG_ERROR_TYPE = 1 + EVENTLOG_WARNING_TYPE = 2 + EVENTLOG_INFORMATION_TYPE = 4 + EVENTLOG_AUDIT_SUCCESS = 8 + EVENTLOG_AUDIT_FAILURE = 16 +) + +//sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW +//sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource +//sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW diff --git a/vendor/golang.org/x/sys/windows/exec_windows.go b/vendor/golang.org/x/sys/windows/exec_windows.go new file mode 100644 index 0000000..3606c3a --- /dev/null +++ b/vendor/golang.org/x/sys/windows/exec_windows.go @@ -0,0 +1,97 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Fork, exec, wait, etc. + +package windows + +// EscapeArg rewrites command line argument s as prescribed +// in http://msdn.microsoft.com/en-us/library/ms880421. +// This function returns "" (2 double quotes) if s is empty. +// Alternatively, these transformations are done: +// - every back slash (\) is doubled, but only if immediately +// followed by double quote ("); +// - every double quote (") is escaped by back slash (\); +// - finally, s is wrapped with double quotes (arg -> "arg"), +// but only if there is space or tab inside s. +func EscapeArg(s string) string { + if len(s) == 0 { + return "\"\"" + } + n := len(s) + hasSpace := false + for i := 0; i < len(s); i++ { + switch s[i] { + case '"', '\\': + n++ + case ' ', '\t': + hasSpace = true + } + } + if hasSpace { + n += 2 + } + if n == len(s) { + return s + } + + qs := make([]byte, n) + j := 0 + if hasSpace { + qs[j] = '"' + j++ + } + slashes := 0 + for i := 0; i < len(s); i++ { + switch s[i] { + default: + slashes = 0 + qs[j] = s[i] + case '\\': + slashes++ + qs[j] = s[i] + case '"': + for ; slashes > 0; slashes-- { + qs[j] = '\\' + j++ + } + qs[j] = '\\' + j++ + qs[j] = s[i] + } + j++ + } + if hasSpace { + for ; slashes > 0; slashes-- { + qs[j] = '\\' + j++ + } + qs[j] = '"' + j++ + } + return string(qs[:j]) +} + +func CloseOnExec(fd Handle) { + SetHandleInformation(Handle(fd), HANDLE_FLAG_INHERIT, 0) +} + +// FullPath retrieves the full path of the specified file. +func FullPath(name string) (path string, err error) { + p, err := UTF16PtrFromString(name) + if err != nil { + return "", err + } + n := uint32(100) + for { + buf := make([]uint16, n) + n, err = GetFullPathName(p, uint32(len(buf)), &buf[0], nil) + if err != nil { + return "", err + } + if n <= uint32(len(buf)) { + return UTF16ToString(buf[:n]), nil + } + } +} diff --git a/vendor/golang.org/x/sys/windows/race.go b/vendor/golang.org/x/sys/windows/race.go new file mode 100644 index 0000000..343e18a --- /dev/null +++ b/vendor/golang.org/x/sys/windows/race.go @@ -0,0 +1,30 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows,race + +package windows + +import ( + "runtime" + "unsafe" +) + +const raceenabled = true + +func raceAcquire(addr unsafe.Pointer) { + runtime.RaceAcquire(addr) +} + +func raceReleaseMerge(addr unsafe.Pointer) { + runtime.RaceReleaseMerge(addr) +} + +func raceReadRange(addr unsafe.Pointer, len int) { + runtime.RaceReadRange(addr, len) +} + +func raceWriteRange(addr unsafe.Pointer, len int) { + runtime.RaceWriteRange(addr, len) +} diff --git a/vendor/golang.org/x/sys/windows/race0.go b/vendor/golang.org/x/sys/windows/race0.go new file mode 100644 index 0000000..17af843 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/race0.go @@ -0,0 +1,25 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows,!race + +package windows + +import ( + "unsafe" +) + +const raceenabled = false + +func raceAcquire(addr unsafe.Pointer) { +} + +func raceReleaseMerge(addr unsafe.Pointer) { +} + +func raceReadRange(addr unsafe.Pointer, len int) { +} + +func raceWriteRange(addr unsafe.Pointer, len int) { +} diff --git a/vendor/golang.org/x/sys/windows/registry/export_test.go b/vendor/golang.org/x/sys/windows/registry/export_test.go new file mode 100644 index 0000000..8badf6f --- /dev/null +++ b/vendor/golang.org/x/sys/windows/registry/export_test.go @@ -0,0 +1,11 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package registry + +func (k Key) SetValue(name string, valtype uint32, data []byte) error { + return k.setValue(name, valtype, data) +} diff --git a/vendor/golang.org/x/sys/windows/registry/key.go b/vendor/golang.org/x/sys/windows/registry/key.go new file mode 100644 index 0000000..f087ce5 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/registry/key.go @@ -0,0 +1,178 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +// Package registry provides access to the Windows registry. +// +// Here is a simple example, opening a registry key and reading a string value from it. +// +// k, err := registry.OpenKey(registry.LOCAL_MACHINE, `SOFTWARE\Microsoft\Windows NT\CurrentVersion`, registry.QUERY_VALUE) +// if err != nil { +// log.Fatal(err) +// } +// defer k.Close() +// +// s, _, err := k.GetStringValue("SystemRoot") +// if err != nil { +// log.Fatal(err) +// } +// fmt.Printf("Windows system root is %q\n", s) +// +package registry + +import ( + "io" + "syscall" + "time" +) + +const ( + // Registry key security and access rights. + // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms724878.aspx + // for details. + ALL_ACCESS = 0xf003f + CREATE_LINK = 0x00020 + CREATE_SUB_KEY = 0x00004 + ENUMERATE_SUB_KEYS = 0x00008 + EXECUTE = 0x20019 + NOTIFY = 0x00010 + QUERY_VALUE = 0x00001 + READ = 0x20019 + SET_VALUE = 0x00002 + WOW64_32KEY = 0x00200 + WOW64_64KEY = 0x00100 + WRITE = 0x20006 +) + +// Key is a handle to an open Windows registry key. +// Keys can be obtained by calling OpenKey; there are +// also some predefined root keys such as CURRENT_USER. +// Keys can be used directly in the Windows API. +type Key syscall.Handle + +const ( + // Windows defines some predefined root keys that are always open. + // An application can use these keys as entry points to the registry. + // Normally these keys are used in OpenKey to open new keys, + // but they can also be used anywhere a Key is required. + CLASSES_ROOT = Key(syscall.HKEY_CLASSES_ROOT) + CURRENT_USER = Key(syscall.HKEY_CURRENT_USER) + LOCAL_MACHINE = Key(syscall.HKEY_LOCAL_MACHINE) + USERS = Key(syscall.HKEY_USERS) + CURRENT_CONFIG = Key(syscall.HKEY_CURRENT_CONFIG) +) + +// Close closes open key k. +func (k Key) Close() error { + return syscall.RegCloseKey(syscall.Handle(k)) +} + +// OpenKey opens a new key with path name relative to key k. +// It accepts any open key, including CURRENT_USER and others, +// and returns the new key and an error. +// The access parameter specifies desired access rights to the +// key to be opened. +func OpenKey(k Key, path string, access uint32) (Key, error) { + p, err := syscall.UTF16PtrFromString(path) + if err != nil { + return 0, err + } + var subkey syscall.Handle + err = syscall.RegOpenKeyEx(syscall.Handle(k), p, 0, access, &subkey) + if err != nil { + return 0, err + } + return Key(subkey), nil +} + +// ReadSubKeyNames returns the names of subkeys of key k. +// The parameter n controls the number of returned names, +// analogous to the way os.File.Readdirnames works. +func (k Key) ReadSubKeyNames(n int) ([]string, error) { + ki, err := k.Stat() + if err != nil { + return nil, err + } + names := make([]string, 0, ki.SubKeyCount) + buf := make([]uint16, ki.MaxSubKeyLen+1) // extra room for terminating zero byte +loopItems: + for i := uint32(0); ; i++ { + if n > 0 { + if len(names) == n { + return names, nil + } + } + l := uint32(len(buf)) + for { + err := syscall.RegEnumKeyEx(syscall.Handle(k), i, &buf[0], &l, nil, nil, nil, nil) + if err == nil { + break + } + if err == syscall.ERROR_MORE_DATA { + // Double buffer size and try again. + l = uint32(2 * len(buf)) + buf = make([]uint16, l) + continue + } + if err == _ERROR_NO_MORE_ITEMS { + break loopItems + } + return names, err + } + names = append(names, syscall.UTF16ToString(buf[:l])) + } + if n > len(names) { + return names, io.EOF + } + return names, nil +} + +// CreateKey creates a key named path under open key k. +// CreateKey returns the new key and a boolean flag that reports +// whether the key already existed. +// The access parameter specifies the access rights for the key +// to be created. +func CreateKey(k Key, path string, access uint32) (newk Key, openedExisting bool, err error) { + var h syscall.Handle + var d uint32 + err = regCreateKeyEx(syscall.Handle(k), syscall.StringToUTF16Ptr(path), + 0, nil, _REG_OPTION_NON_VOLATILE, access, nil, &h, &d) + if err != nil { + return 0, false, err + } + return Key(h), d == _REG_OPENED_EXISTING_KEY, nil +} + +// DeleteKey deletes the subkey path of key k and its values. +func DeleteKey(k Key, path string) error { + return regDeleteKey(syscall.Handle(k), syscall.StringToUTF16Ptr(path)) +} + +// A KeyInfo describes the statistics of a key. It is returned by Stat. +type KeyInfo struct { + SubKeyCount uint32 + MaxSubKeyLen uint32 // size of the key's subkey with the longest name, in Unicode characters, not including the terminating zero byte + ValueCount uint32 + MaxValueNameLen uint32 // size of the key's longest value name, in Unicode characters, not including the terminating zero byte + MaxValueLen uint32 // longest data component among the key's values, in bytes + lastWriteTime syscall.Filetime +} + +// ModTime returns the key's last write time. +func (ki *KeyInfo) ModTime() time.Time { + return time.Unix(0, ki.lastWriteTime.Nanoseconds()) +} + +// Stat retrieves information about the open key k. +func (k Key) Stat() (*KeyInfo, error) { + var ki KeyInfo + err := syscall.RegQueryInfoKey(syscall.Handle(k), nil, nil, nil, + &ki.SubKeyCount, &ki.MaxSubKeyLen, nil, &ki.ValueCount, + &ki.MaxValueNameLen, &ki.MaxValueLen, nil, &ki.lastWriteTime) + if err != nil { + return nil, err + } + return &ki, nil +} diff --git a/vendor/golang.org/x/sys/windows/registry/registry_test.go b/vendor/golang.org/x/sys/windows/registry/registry_test.go new file mode 100644 index 0000000..6547a45 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/registry/registry_test.go @@ -0,0 +1,754 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package registry_test + +import ( + "bytes" + "crypto/rand" + "os" + "syscall" + "testing" + "time" + "unsafe" + + "golang.org/x/sys/windows/registry" +) + +func randKeyName(prefix string) string { + const numbers = "0123456789" + buf := make([]byte, 10) + rand.Read(buf) + for i, b := range buf { + buf[i] = numbers[b%byte(len(numbers))] + } + return prefix + string(buf) +} + +func TestReadSubKeyNames(t *testing.T) { + k, err := registry.OpenKey(registry.CLASSES_ROOT, "TypeLib", registry.ENUMERATE_SUB_KEYS|registry.QUERY_VALUE) + if err != nil { + t.Fatal(err) + } + defer k.Close() + + names, err := k.ReadSubKeyNames(-1) + if err != nil { + t.Fatal(err) + } + var foundStdOle bool + for _, name := range names { + // Every PC has "stdole 2.0 OLE Automation" library installed. + if name == "{00020430-0000-0000-C000-000000000046}" { + foundStdOle = true + } + } + if !foundStdOle { + t.Fatal("could not find stdole 2.0 OLE Automation") + } +} + +func TestCreateOpenDeleteKey(t *testing.T) { + k, err := registry.OpenKey(registry.CURRENT_USER, "Software", registry.QUERY_VALUE) + if err != nil { + t.Fatal(err) + } + defer k.Close() + + testKName := randKeyName("TestCreateOpenDeleteKey_") + + testK, exist, err := registry.CreateKey(k, testKName, registry.CREATE_SUB_KEY) + if err != nil { + t.Fatal(err) + } + defer testK.Close() + + if exist { + t.Fatalf("key %q already exists", testKName) + } + + testKAgain, exist, err := registry.CreateKey(k, testKName, registry.CREATE_SUB_KEY) + if err != nil { + t.Fatal(err) + } + defer testKAgain.Close() + + if !exist { + t.Fatalf("key %q should already exist", testKName) + } + + testKOpened, err := registry.OpenKey(k, testKName, registry.ENUMERATE_SUB_KEYS) + if err != nil { + t.Fatal(err) + } + defer testKOpened.Close() + + err = registry.DeleteKey(k, testKName) + if err != nil { + t.Fatal(err) + } + + testKOpenedAgain, err := registry.OpenKey(k, testKName, registry.ENUMERATE_SUB_KEYS) + if err == nil { + defer testKOpenedAgain.Close() + t.Fatalf("key %q should already been deleted", testKName) + } + if err != registry.ErrNotExist { + t.Fatalf(`unexpected error ("not exist" expected): %v`, err) + } +} + +func equalStringSlice(a, b []string) bool { + if len(a) != len(b) { + return false + } + if a == nil { + return true + } + for i := range a { + if a[i] != b[i] { + return false + } + } + return true +} + +type ValueTest struct { + Type uint32 + Name string + Value interface{} + WillFail bool +} + +var ValueTests = []ValueTest{ + {Type: registry.SZ, Name: "String1", Value: ""}, + {Type: registry.SZ, Name: "String2", Value: "\000", WillFail: true}, + {Type: registry.SZ, Name: "String3", Value: "Hello World"}, + {Type: registry.SZ, Name: "String4", Value: "Hello World\000", WillFail: true}, + {Type: registry.EXPAND_SZ, Name: "ExpString1", Value: ""}, + {Type: registry.EXPAND_SZ, Name: "ExpString2", Value: "\000", WillFail: true}, + {Type: registry.EXPAND_SZ, Name: "ExpString3", Value: "Hello World"}, + {Type: registry.EXPAND_SZ, Name: "ExpString4", Value: "Hello\000World", WillFail: true}, + {Type: registry.EXPAND_SZ, Name: "ExpString5", Value: "%PATH%"}, + {Type: registry.EXPAND_SZ, Name: "ExpString6", Value: "%NO_SUCH_VARIABLE%"}, + {Type: registry.EXPAND_SZ, Name: "ExpString7", Value: "%PATH%;."}, + {Type: registry.BINARY, Name: "Binary1", Value: []byte{}}, + {Type: registry.BINARY, Name: "Binary2", Value: []byte{1, 2, 3}}, + {Type: registry.BINARY, Name: "Binary3", Value: []byte{3, 2, 1, 0, 1, 2, 3}}, + {Type: registry.DWORD, Name: "Dword1", Value: uint64(0)}, + {Type: registry.DWORD, Name: "Dword2", Value: uint64(1)}, + {Type: registry.DWORD, Name: "Dword3", Value: uint64(0xff)}, + {Type: registry.DWORD, Name: "Dword4", Value: uint64(0xffff)}, + {Type: registry.QWORD, Name: "Qword1", Value: uint64(0)}, + {Type: registry.QWORD, Name: "Qword2", Value: uint64(1)}, + {Type: registry.QWORD, Name: "Qword3", Value: uint64(0xff)}, + {Type: registry.QWORD, Name: "Qword4", Value: uint64(0xffff)}, + {Type: registry.QWORD, Name: "Qword5", Value: uint64(0xffffff)}, + {Type: registry.QWORD, Name: "Qword6", Value: uint64(0xffffffff)}, + {Type: registry.MULTI_SZ, Name: "MultiString1", Value: []string{"a", "b", "c"}}, + {Type: registry.MULTI_SZ, Name: "MultiString2", Value: []string{"abc", "", "cba"}}, + {Type: registry.MULTI_SZ, Name: "MultiString3", Value: []string{""}}, + {Type: registry.MULTI_SZ, Name: "MultiString4", Value: []string{"abcdef"}}, + {Type: registry.MULTI_SZ, Name: "MultiString5", Value: []string{"\000"}, WillFail: true}, + {Type: registry.MULTI_SZ, Name: "MultiString6", Value: []string{"a\000b"}, WillFail: true}, + {Type: registry.MULTI_SZ, Name: "MultiString7", Value: []string{"ab", "\000", "cd"}, WillFail: true}, + {Type: registry.MULTI_SZ, Name: "MultiString8", Value: []string{"\000", "cd"}, WillFail: true}, + {Type: registry.MULTI_SZ, Name: "MultiString9", Value: []string{"ab", "\000"}, WillFail: true}, +} + +func setValues(t *testing.T, k registry.Key) { + for _, test := range ValueTests { + var err error + switch test.Type { + case registry.SZ: + err = k.SetStringValue(test.Name, test.Value.(string)) + case registry.EXPAND_SZ: + err = k.SetExpandStringValue(test.Name, test.Value.(string)) + case registry.MULTI_SZ: + err = k.SetStringsValue(test.Name, test.Value.([]string)) + case registry.BINARY: + err = k.SetBinaryValue(test.Name, test.Value.([]byte)) + case registry.DWORD: + err = k.SetDWordValue(test.Name, uint32(test.Value.(uint64))) + case registry.QWORD: + err = k.SetQWordValue(test.Name, test.Value.(uint64)) + default: + t.Fatalf("unsupported type %d for %s value", test.Type, test.Name) + } + if test.WillFail { + if err == nil { + t.Fatalf("setting %s value %q should fail, but succeeded", test.Name, test.Value) + } + } else { + if err != nil { + t.Fatal(err) + } + } + } +} + +func enumerateValues(t *testing.T, k registry.Key) { + names, err := k.ReadValueNames(-1) + if err != nil { + t.Error(err) + return + } + haveNames := make(map[string]bool) + for _, n := range names { + haveNames[n] = false + } + for _, test := range ValueTests { + wantFound := !test.WillFail + _, haveFound := haveNames[test.Name] + if wantFound && !haveFound { + t.Errorf("value %s is not found while enumerating", test.Name) + } + if haveFound && !wantFound { + t.Errorf("value %s is found while enumerating, but expected to fail", test.Name) + } + if haveFound { + delete(haveNames, test.Name) + } + } + for n, v := range haveNames { + t.Errorf("value %s (%v) is found while enumerating, but has not been cretaed", n, v) + } +} + +func testErrNotExist(t *testing.T, name string, err error) { + if err == nil { + t.Errorf("%s value should not exist", name) + return + } + if err != registry.ErrNotExist { + t.Errorf("reading %s value should return 'not exist' error, but got: %s", name, err) + return + } +} + +func testErrUnexpectedType(t *testing.T, test ValueTest, gottype uint32, err error) { + if err == nil { + t.Errorf("GetXValue(%q) should not succeed", test.Name) + return + } + if err != registry.ErrUnexpectedType { + t.Errorf("reading %s value should return 'unexpected key value type' error, but got: %s", test.Name, err) + return + } + if gottype != test.Type { + t.Errorf("want %s value type %v, got %v", test.Name, test.Type, gottype) + return + } +} + +func testGetStringValue(t *testing.T, k registry.Key, test ValueTest) { + got, gottype, err := k.GetStringValue(test.Name) + if err != nil { + t.Errorf("GetStringValue(%s) failed: %v", test.Name, err) + return + } + if got != test.Value { + t.Errorf("want %s value %q, got %q", test.Name, test.Value, got) + return + } + if gottype != test.Type { + t.Errorf("want %s value type %v, got %v", test.Name, test.Type, gottype) + return + } + if gottype == registry.EXPAND_SZ { + _, err = registry.ExpandString(got) + if err != nil { + t.Errorf("ExpandString(%s) failed: %v", got, err) + return + } + } +} + +func testGetIntegerValue(t *testing.T, k registry.Key, test ValueTest) { + got, gottype, err := k.GetIntegerValue(test.Name) + if err != nil { + t.Errorf("GetIntegerValue(%s) failed: %v", test.Name, err) + return + } + if got != test.Value.(uint64) { + t.Errorf("want %s value %v, got %v", test.Name, test.Value, got) + return + } + if gottype != test.Type { + t.Errorf("want %s value type %v, got %v", test.Name, test.Type, gottype) + return + } +} + +func testGetBinaryValue(t *testing.T, k registry.Key, test ValueTest) { + got, gottype, err := k.GetBinaryValue(test.Name) + if err != nil { + t.Errorf("GetBinaryValue(%s) failed: %v", test.Name, err) + return + } + if !bytes.Equal(got, test.Value.([]byte)) { + t.Errorf("want %s value %v, got %v", test.Name, test.Value, got) + return + } + if gottype != test.Type { + t.Errorf("want %s value type %v, got %v", test.Name, test.Type, gottype) + return + } +} + +func testGetStringsValue(t *testing.T, k registry.Key, test ValueTest) { + got, gottype, err := k.GetStringsValue(test.Name) + if err != nil { + t.Errorf("GetStringsValue(%s) failed: %v", test.Name, err) + return + } + if !equalStringSlice(got, test.Value.([]string)) { + t.Errorf("want %s value %#v, got %#v", test.Name, test.Value, got) + return + } + if gottype != test.Type { + t.Errorf("want %s value type %v, got %v", test.Name, test.Type, gottype) + return + } +} + +func testGetValue(t *testing.T, k registry.Key, test ValueTest, size int) { + if size <= 0 { + return + } + // read data with no buffer + gotsize, gottype, err := k.GetValue(test.Name, nil) + if err != nil { + t.Errorf("GetValue(%s, [%d]byte) failed: %v", test.Name, size, err) + return + } + if gotsize != size { + t.Errorf("want %s value size of %d, got %v", test.Name, size, gotsize) + return + } + if gottype != test.Type { + t.Errorf("want %s value type %v, got %v", test.Name, test.Type, gottype) + return + } + // read data with short buffer + gotsize, gottype, err = k.GetValue(test.Name, make([]byte, size-1)) + if err == nil { + t.Errorf("GetValue(%s, [%d]byte) should fail, but suceeded", test.Name, size-1) + return + } + if err != registry.ErrShortBuffer { + t.Errorf("reading %s value should return 'short buffer' error, but got: %s", test.Name, err) + return + } + if gotsize != size { + t.Errorf("want %s value size of %d, got %v", test.Name, size, gotsize) + return + } + if gottype != test.Type { + t.Errorf("want %s value type %v, got %v", test.Name, test.Type, gottype) + return + } + // read full data + gotsize, gottype, err = k.GetValue(test.Name, make([]byte, size)) + if err != nil { + t.Errorf("GetValue(%s, [%d]byte) failed: %v", test.Name, size, err) + return + } + if gotsize != size { + t.Errorf("want %s value size of %d, got %v", test.Name, size, gotsize) + return + } + if gottype != test.Type { + t.Errorf("want %s value type %v, got %v", test.Name, test.Type, gottype) + return + } + // check GetValue returns ErrNotExist as required + _, _, err = k.GetValue(test.Name+"_not_there", make([]byte, size)) + if err == nil { + t.Errorf("GetValue(%q) should not succeed", test.Name) + return + } + if err != registry.ErrNotExist { + t.Errorf("GetValue(%q) should return 'not exist' error, but got: %s", test.Name, err) + return + } +} + +func testValues(t *testing.T, k registry.Key) { + for _, test := range ValueTests { + switch test.Type { + case registry.SZ, registry.EXPAND_SZ: + if test.WillFail { + _, _, err := k.GetStringValue(test.Name) + testErrNotExist(t, test.Name, err) + } else { + testGetStringValue(t, k, test) + _, gottype, err := k.GetIntegerValue(test.Name) + testErrUnexpectedType(t, test, gottype, err) + // Size of utf16 string in bytes is not perfect, + // but correct for current test values. + // Size also includes terminating 0. + testGetValue(t, k, test, (len(test.Value.(string))+1)*2) + } + _, _, err := k.GetStringValue(test.Name + "_string_not_created") + testErrNotExist(t, test.Name+"_string_not_created", err) + case registry.DWORD, registry.QWORD: + testGetIntegerValue(t, k, test) + _, gottype, err := k.GetBinaryValue(test.Name) + testErrUnexpectedType(t, test, gottype, err) + _, _, err = k.GetIntegerValue(test.Name + "_int_not_created") + testErrNotExist(t, test.Name+"_int_not_created", err) + size := 8 + if test.Type == registry.DWORD { + size = 4 + } + testGetValue(t, k, test, size) + case registry.BINARY: + testGetBinaryValue(t, k, test) + _, gottype, err := k.GetStringsValue(test.Name) + testErrUnexpectedType(t, test, gottype, err) + _, _, err = k.GetBinaryValue(test.Name + "_byte_not_created") + testErrNotExist(t, test.Name+"_byte_not_created", err) + testGetValue(t, k, test, len(test.Value.([]byte))) + case registry.MULTI_SZ: + if test.WillFail { + _, _, err := k.GetStringsValue(test.Name) + testErrNotExist(t, test.Name, err) + } else { + testGetStringsValue(t, k, test) + _, gottype, err := k.GetStringValue(test.Name) + testErrUnexpectedType(t, test, gottype, err) + size := 0 + for _, s := range test.Value.([]string) { + size += len(s) + 1 // nil terminated + } + size += 1 // extra nil at the end + size *= 2 // count bytes, not uint16 + testGetValue(t, k, test, size) + } + _, _, err := k.GetStringsValue(test.Name + "_strings_not_created") + testErrNotExist(t, test.Name+"_strings_not_created", err) + default: + t.Errorf("unsupported type %d for %s value", test.Type, test.Name) + continue + } + } +} + +func testStat(t *testing.T, k registry.Key) { + subk, _, err := registry.CreateKey(k, "subkey", registry.CREATE_SUB_KEY) + if err != nil { + t.Error(err) + return + } + defer subk.Close() + + defer registry.DeleteKey(k, "subkey") + + ki, err := k.Stat() + if err != nil { + t.Error(err) + return + } + if ki.SubKeyCount != 1 { + t.Error("key must have 1 subkey") + } + if ki.MaxSubKeyLen != 6 { + t.Error("key max subkey name length must be 6") + } + if ki.ValueCount != 24 { + t.Errorf("key must have 24 values, but is %d", ki.ValueCount) + } + if ki.MaxValueNameLen != 12 { + t.Errorf("key max value name length must be 10, but is %d", ki.MaxValueNameLen) + } + if ki.MaxValueLen != 38 { + t.Errorf("key max value length must be 38, but is %d", ki.MaxValueLen) + } + if mt, ct := ki.ModTime(), time.Now(); ct.Sub(mt) > 100*time.Millisecond { + t.Errorf("key mod time is not close to current time: mtime=%v current=%v delta=%v", mt, ct, ct.Sub(mt)) + } +} + +func deleteValues(t *testing.T, k registry.Key) { + for _, test := range ValueTests { + if test.WillFail { + continue + } + err := k.DeleteValue(test.Name) + if err != nil { + t.Error(err) + continue + } + } + names, err := k.ReadValueNames(-1) + if err != nil { + t.Error(err) + return + } + if len(names) != 0 { + t.Errorf("some values remain after deletion: %v", names) + } +} + +func TestValues(t *testing.T) { + softwareK, err := registry.OpenKey(registry.CURRENT_USER, "Software", registry.QUERY_VALUE) + if err != nil { + t.Fatal(err) + } + defer softwareK.Close() + + testKName := randKeyName("TestValues_") + + k, exist, err := registry.CreateKey(softwareK, testKName, registry.CREATE_SUB_KEY|registry.QUERY_VALUE|registry.SET_VALUE) + if err != nil { + t.Fatal(err) + } + defer k.Close() + + if exist { + t.Fatalf("key %q already exists", testKName) + } + + defer registry.DeleteKey(softwareK, testKName) + + setValues(t, k) + + enumerateValues(t, k) + + testValues(t, k) + + testStat(t, k) + + deleteValues(t, k) +} + +func walkKey(t *testing.T, k registry.Key, kname string) { + names, err := k.ReadValueNames(-1) + if err != nil { + t.Fatalf("reading value names of %s failed: %v", kname, err) + } + for _, name := range names { + _, valtype, err := k.GetValue(name, nil) + if err != nil { + t.Fatalf("reading value type of %s of %s failed: %v", name, kname, err) + } + switch valtype { + case registry.NONE: + case registry.SZ: + _, _, err := k.GetStringValue(name) + if err != nil { + t.Error(err) + } + case registry.EXPAND_SZ: + s, _, err := k.GetStringValue(name) + if err != nil { + t.Error(err) + } + _, err = registry.ExpandString(s) + if err != nil { + t.Error(err) + } + case registry.DWORD, registry.QWORD: + _, _, err := k.GetIntegerValue(name) + if err != nil { + t.Error(err) + } + case registry.BINARY: + _, _, err := k.GetBinaryValue(name) + if err != nil { + t.Error(err) + } + case registry.MULTI_SZ: + _, _, err := k.GetStringsValue(name) + if err != nil { + t.Error(err) + } + case registry.FULL_RESOURCE_DESCRIPTOR, registry.RESOURCE_LIST, registry.RESOURCE_REQUIREMENTS_LIST: + // TODO: not implemented + default: + t.Fatalf("value type %d of %s of %s failed: %v", valtype, name, kname, err) + } + } + + names, err = k.ReadSubKeyNames(-1) + if err != nil { + t.Fatalf("reading sub-keys of %s failed: %v", kname, err) + } + for _, name := range names { + func() { + subk, err := registry.OpenKey(k, name, registry.ENUMERATE_SUB_KEYS|registry.QUERY_VALUE) + if err != nil { + if err == syscall.ERROR_ACCESS_DENIED { + // ignore error, if we are not allowed to access this key + return + } + t.Fatalf("opening sub-keys %s of %s failed: %v", name, kname, err) + } + defer subk.Close() + + walkKey(t, subk, kname+`\`+name) + }() + } +} + +func TestWalkFullRegistry(t *testing.T) { + if testing.Short() { + t.Skip("skipping long running test in short mode") + } + walkKey(t, registry.CLASSES_ROOT, "CLASSES_ROOT") + walkKey(t, registry.CURRENT_USER, "CURRENT_USER") + walkKey(t, registry.LOCAL_MACHINE, "LOCAL_MACHINE") + walkKey(t, registry.USERS, "USERS") + walkKey(t, registry.CURRENT_CONFIG, "CURRENT_CONFIG") +} + +func TestExpandString(t *testing.T) { + got, err := registry.ExpandString("%PATH%") + if err != nil { + t.Fatal(err) + } + want := os.Getenv("PATH") + if got != want { + t.Errorf("want %q string expanded, got %q", want, got) + } +} + +func TestInvalidValues(t *testing.T) { + softwareK, err := registry.OpenKey(registry.CURRENT_USER, "Software", registry.QUERY_VALUE) + if err != nil { + t.Fatal(err) + } + defer softwareK.Close() + + testKName := randKeyName("TestInvalidValues_") + + k, exist, err := registry.CreateKey(softwareK, testKName, registry.CREATE_SUB_KEY|registry.QUERY_VALUE|registry.SET_VALUE) + if err != nil { + t.Fatal(err) + } + defer k.Close() + + if exist { + t.Fatalf("key %q already exists", testKName) + } + + defer registry.DeleteKey(softwareK, testKName) + + var tests = []struct { + Type uint32 + Name string + Data []byte + }{ + {registry.DWORD, "Dword1", nil}, + {registry.DWORD, "Dword2", []byte{1, 2, 3}}, + {registry.QWORD, "Qword1", nil}, + {registry.QWORD, "Qword2", []byte{1, 2, 3}}, + {registry.QWORD, "Qword3", []byte{1, 2, 3, 4, 5, 6, 7}}, + {registry.MULTI_SZ, "MultiString1", nil}, + {registry.MULTI_SZ, "MultiString2", []byte{0}}, + {registry.MULTI_SZ, "MultiString3", []byte{'a', 'b', 0}}, + {registry.MULTI_SZ, "MultiString4", []byte{'a', 0, 0, 'b', 0}}, + {registry.MULTI_SZ, "MultiString5", []byte{'a', 0, 0}}, + } + + for _, test := range tests { + err := k.SetValue(test.Name, test.Type, test.Data) + if err != nil { + t.Fatalf("SetValue for %q failed: %v", test.Name, err) + } + } + + for _, test := range tests { + switch test.Type { + case registry.DWORD, registry.QWORD: + value, valType, err := k.GetIntegerValue(test.Name) + if err == nil { + t.Errorf("GetIntegerValue(%q) succeeded. Returns type=%d value=%v", test.Name, valType, value) + } + case registry.MULTI_SZ: + value, valType, err := k.GetStringsValue(test.Name) + if err == nil { + if len(value) != 0 { + t.Errorf("GetStringsValue(%q) succeeded. Returns type=%d value=%v", test.Name, valType, value) + } + } + default: + t.Errorf("unsupported type %d for %s value", test.Type, test.Name) + } + } +} + +func TestGetMUIStringValue(t *testing.T) { + if err := registry.LoadRegLoadMUIString(); err != nil { + t.Skip("regLoadMUIString not supported; skipping") + } + if err := procGetDynamicTimeZoneInformation.Find(); err != nil { + t.Skipf("%s not supported; skipping", procGetDynamicTimeZoneInformation.Name) + } + var dtzi DynamicTimezoneinformation + if _, err := GetDynamicTimeZoneInformation(&dtzi); err != nil { + t.Fatal(err) + } + tzKeyName := syscall.UTF16ToString(dtzi.TimeZoneKeyName[:]) + timezoneK, err := registry.OpenKey(registry.LOCAL_MACHINE, + `SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\`+tzKeyName, registry.READ) + if err != nil { + t.Fatal(err) + } + defer timezoneK.Close() + + var tests = []struct { + key registry.Key + name string + want string + }{ + {timezoneK, "MUI_Std", syscall.UTF16ToString(dtzi.StandardName[:])}, + {timezoneK, "MUI_Dlt", syscall.UTF16ToString(dtzi.DaylightName[:])}, + } + + for _, test := range tests { + got, err := test.key.GetMUIStringValue(test.name) + if err != nil { + t.Error("GetMUIStringValue:", err) + } + + if got != test.want { + t.Errorf("GetMUIStringValue: %s: Got %q, want %q", test.name, got, test.want) + } + } +} + +type DynamicTimezoneinformation struct { + Bias int32 + StandardName [32]uint16 + StandardDate syscall.Systemtime + StandardBias int32 + DaylightName [32]uint16 + DaylightDate syscall.Systemtime + DaylightBias int32 + TimeZoneKeyName [128]uint16 + DynamicDaylightTimeDisabled uint8 +} + +var ( + kernel32DLL = syscall.NewLazyDLL("kernel32") + + procGetDynamicTimeZoneInformation = kernel32DLL.NewProc("GetDynamicTimeZoneInformation") +) + +func GetDynamicTimeZoneInformation(dtzi *DynamicTimezoneinformation) (rc uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetDynamicTimeZoneInformation.Addr(), 1, uintptr(unsafe.Pointer(dtzi)), 0, 0) + rc = uint32(r0) + if rc == 0xffffffff { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} diff --git a/vendor/golang.org/x/sys/windows/registry/syscall.go b/vendor/golang.org/x/sys/windows/registry/syscall.go new file mode 100644 index 0000000..5426cae --- /dev/null +++ b/vendor/golang.org/x/sys/windows/registry/syscall.go @@ -0,0 +1,33 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package registry + +import "syscall" + +//go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go syscall.go + +const ( + _REG_OPTION_NON_VOLATILE = 0 + + _REG_CREATED_NEW_KEY = 1 + _REG_OPENED_EXISTING_KEY = 2 + + _ERROR_NO_MORE_ITEMS syscall.Errno = 259 +) + +func LoadRegLoadMUIString() error { + return procRegLoadMUIStringW.Find() +} + +//sys regCreateKeyEx(key syscall.Handle, subkey *uint16, reserved uint32, class *uint16, options uint32, desired uint32, sa *syscall.SecurityAttributes, result *syscall.Handle, disposition *uint32) (regerrno error) = advapi32.RegCreateKeyExW +//sys regDeleteKey(key syscall.Handle, subkey *uint16) (regerrno error) = advapi32.RegDeleteKeyW +//sys regSetValueEx(key syscall.Handle, valueName *uint16, reserved uint32, vtype uint32, buf *byte, bufsize uint32) (regerrno error) = advapi32.RegSetValueExW +//sys regEnumValue(key syscall.Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) = advapi32.RegEnumValueW +//sys regDeleteValue(key syscall.Handle, name *uint16) (regerrno error) = advapi32.RegDeleteValueW +//sys regLoadMUIString(key syscall.Handle, name *uint16, buf *uint16, buflen uint32, buflenCopied *uint32, flags uint32, dir *uint16) (regerrno error) = advapi32.RegLoadMUIStringW + +//sys expandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32, err error) = kernel32.ExpandEnvironmentStringsW diff --git a/vendor/golang.org/x/sys/windows/registry/value.go b/vendor/golang.org/x/sys/windows/registry/value.go new file mode 100644 index 0000000..71d4e15 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/registry/value.go @@ -0,0 +1,384 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package registry + +import ( + "errors" + "io" + "syscall" + "unicode/utf16" + "unsafe" +) + +const ( + // Registry value types. + NONE = 0 + SZ = 1 + EXPAND_SZ = 2 + BINARY = 3 + DWORD = 4 + DWORD_BIG_ENDIAN = 5 + LINK = 6 + MULTI_SZ = 7 + RESOURCE_LIST = 8 + FULL_RESOURCE_DESCRIPTOR = 9 + RESOURCE_REQUIREMENTS_LIST = 10 + QWORD = 11 +) + +var ( + // ErrShortBuffer is returned when the buffer was too short for the operation. + ErrShortBuffer = syscall.ERROR_MORE_DATA + + // ErrNotExist is returned when a registry key or value does not exist. + ErrNotExist = syscall.ERROR_FILE_NOT_FOUND + + // ErrUnexpectedType is returned by Get*Value when the value's type was unexpected. + ErrUnexpectedType = errors.New("unexpected key value type") +) + +// GetValue retrieves the type and data for the specified value associated +// with an open key k. It fills up buffer buf and returns the retrieved +// byte count n. If buf is too small to fit the stored value it returns +// ErrShortBuffer error along with the required buffer size n. +// If no buffer is provided, it returns true and actual buffer size n. +// If no buffer is provided, GetValue returns the value's type only. +// If the value does not exist, the error returned is ErrNotExist. +// +// GetValue is a low level function. If value's type is known, use the appropriate +// Get*Value function instead. +func (k Key) GetValue(name string, buf []byte) (n int, valtype uint32, err error) { + pname, err := syscall.UTF16PtrFromString(name) + if err != nil { + return 0, 0, err + } + var pbuf *byte + if len(buf) > 0 { + pbuf = (*byte)(unsafe.Pointer(&buf[0])) + } + l := uint32(len(buf)) + err = syscall.RegQueryValueEx(syscall.Handle(k), pname, nil, &valtype, pbuf, &l) + if err != nil { + return int(l), valtype, err + } + return int(l), valtype, nil +} + +func (k Key) getValue(name string, buf []byte) (date []byte, valtype uint32, err error) { + p, err := syscall.UTF16PtrFromString(name) + if err != nil { + return nil, 0, err + } + var t uint32 + n := uint32(len(buf)) + for { + err = syscall.RegQueryValueEx(syscall.Handle(k), p, nil, &t, (*byte)(unsafe.Pointer(&buf[0])), &n) + if err == nil { + return buf[:n], t, nil + } + if err != syscall.ERROR_MORE_DATA { + return nil, 0, err + } + if n <= uint32(len(buf)) { + return nil, 0, err + } + buf = make([]byte, n) + } +} + +// GetStringValue retrieves the string value for the specified +// value name associated with an open key k. It also returns the value's type. +// If value does not exist, GetStringValue returns ErrNotExist. +// If value is not SZ or EXPAND_SZ, it will return the correct value +// type and ErrUnexpectedType. +func (k Key) GetStringValue(name string) (val string, valtype uint32, err error) { + data, typ, err2 := k.getValue(name, make([]byte, 64)) + if err2 != nil { + return "", typ, err2 + } + switch typ { + case SZ, EXPAND_SZ: + default: + return "", typ, ErrUnexpectedType + } + if len(data) == 0 { + return "", typ, nil + } + u := (*[1 << 29]uint16)(unsafe.Pointer(&data[0]))[:] + return syscall.UTF16ToString(u), typ, nil +} + +// GetMUIStringValue retrieves the localized string value for +// the specified value name associated with an open key k. +// If the value name doesn't exist or the localized string value +// can't be resolved, GetMUIStringValue returns ErrNotExist. +// GetMUIStringValue panics if the system doesn't support +// regLoadMUIString; use LoadRegLoadMUIString to check if +// regLoadMUIString is supported before calling this function. +func (k Key) GetMUIStringValue(name string) (string, error) { + pname, err := syscall.UTF16PtrFromString(name) + if err != nil { + return "", err + } + + buf := make([]uint16, 1024) + var buflen uint32 + var pdir *uint16 + + err = regLoadMUIString(syscall.Handle(k), pname, &buf[0], uint32(len(buf)), &buflen, 0, pdir) + if err == syscall.ERROR_FILE_NOT_FOUND { // Try fallback path + + // Try to resolve the string value using the system directory as + // a DLL search path; this assumes the string value is of the form + // @[path]\dllname,-strID but with no path given, e.g. @tzres.dll,-320. + + // This approach works with tzres.dll but may have to be revised + // in the future to allow callers to provide custom search paths. + + var s string + s, err = ExpandString("%SystemRoot%\\system32\\") + if err != nil { + return "", err + } + pdir, err = syscall.UTF16PtrFromString(s) + if err != nil { + return "", err + } + + err = regLoadMUIString(syscall.Handle(k), pname, &buf[0], uint32(len(buf)), &buflen, 0, pdir) + } + + for err == syscall.ERROR_MORE_DATA { // Grow buffer if needed + if buflen <= uint32(len(buf)) { + break // Buffer not growing, assume race; break + } + buf = make([]uint16, buflen) + err = regLoadMUIString(syscall.Handle(k), pname, &buf[0], uint32(len(buf)), &buflen, 0, pdir) + } + + if err != nil { + return "", err + } + + return syscall.UTF16ToString(buf), nil +} + +// ExpandString expands environment-variable strings and replaces +// them with the values defined for the current user. +// Use ExpandString to expand EXPAND_SZ strings. +func ExpandString(value string) (string, error) { + if value == "" { + return "", nil + } + p, err := syscall.UTF16PtrFromString(value) + if err != nil { + return "", err + } + r := make([]uint16, 100) + for { + n, err := expandEnvironmentStrings(p, &r[0], uint32(len(r))) + if err != nil { + return "", err + } + if n <= uint32(len(r)) { + u := (*[1 << 29]uint16)(unsafe.Pointer(&r[0]))[:] + return syscall.UTF16ToString(u), nil + } + r = make([]uint16, n) + } +} + +// GetStringsValue retrieves the []string value for the specified +// value name associated with an open key k. It also returns the value's type. +// If value does not exist, GetStringsValue returns ErrNotExist. +// If value is not MULTI_SZ, it will return the correct value +// type and ErrUnexpectedType. +func (k Key) GetStringsValue(name string) (val []string, valtype uint32, err error) { + data, typ, err2 := k.getValue(name, make([]byte, 64)) + if err2 != nil { + return nil, typ, err2 + } + if typ != MULTI_SZ { + return nil, typ, ErrUnexpectedType + } + if len(data) == 0 { + return nil, typ, nil + } + p := (*[1 << 29]uint16)(unsafe.Pointer(&data[0]))[:len(data)/2] + if len(p) == 0 { + return nil, typ, nil + } + if p[len(p)-1] == 0 { + p = p[:len(p)-1] // remove terminating null + } + val = make([]string, 0, 5) + from := 0 + for i, c := range p { + if c == 0 { + val = append(val, string(utf16.Decode(p[from:i]))) + from = i + 1 + } + } + return val, typ, nil +} + +// GetIntegerValue retrieves the integer value for the specified +// value name associated with an open key k. It also returns the value's type. +// If value does not exist, GetIntegerValue returns ErrNotExist. +// If value is not DWORD or QWORD, it will return the correct value +// type and ErrUnexpectedType. +func (k Key) GetIntegerValue(name string) (val uint64, valtype uint32, err error) { + data, typ, err2 := k.getValue(name, make([]byte, 8)) + if err2 != nil { + return 0, typ, err2 + } + switch typ { + case DWORD: + if len(data) != 4 { + return 0, typ, errors.New("DWORD value is not 4 bytes long") + } + return uint64(*(*uint32)(unsafe.Pointer(&data[0]))), DWORD, nil + case QWORD: + if len(data) != 8 { + return 0, typ, errors.New("QWORD value is not 8 bytes long") + } + return uint64(*(*uint64)(unsafe.Pointer(&data[0]))), QWORD, nil + default: + return 0, typ, ErrUnexpectedType + } +} + +// GetBinaryValue retrieves the binary value for the specified +// value name associated with an open key k. It also returns the value's type. +// If value does not exist, GetBinaryValue returns ErrNotExist. +// If value is not BINARY, it will return the correct value +// type and ErrUnexpectedType. +func (k Key) GetBinaryValue(name string) (val []byte, valtype uint32, err error) { + data, typ, err2 := k.getValue(name, make([]byte, 64)) + if err2 != nil { + return nil, typ, err2 + } + if typ != BINARY { + return nil, typ, ErrUnexpectedType + } + return data, typ, nil +} + +func (k Key) setValue(name string, valtype uint32, data []byte) error { + p, err := syscall.UTF16PtrFromString(name) + if err != nil { + return err + } + if len(data) == 0 { + return regSetValueEx(syscall.Handle(k), p, 0, valtype, nil, 0) + } + return regSetValueEx(syscall.Handle(k), p, 0, valtype, &data[0], uint32(len(data))) +} + +// SetDWordValue sets the data and type of a name value +// under key k to value and DWORD. +func (k Key) SetDWordValue(name string, value uint32) error { + return k.setValue(name, DWORD, (*[4]byte)(unsafe.Pointer(&value))[:]) +} + +// SetQWordValue sets the data and type of a name value +// under key k to value and QWORD. +func (k Key) SetQWordValue(name string, value uint64) error { + return k.setValue(name, QWORD, (*[8]byte)(unsafe.Pointer(&value))[:]) +} + +func (k Key) setStringValue(name string, valtype uint32, value string) error { + v, err := syscall.UTF16FromString(value) + if err != nil { + return err + } + buf := (*[1 << 29]byte)(unsafe.Pointer(&v[0]))[:len(v)*2] + return k.setValue(name, valtype, buf) +} + +// SetStringValue sets the data and type of a name value +// under key k to value and SZ. The value must not contain a zero byte. +func (k Key) SetStringValue(name, value string) error { + return k.setStringValue(name, SZ, value) +} + +// SetExpandStringValue sets the data and type of a name value +// under key k to value and EXPAND_SZ. The value must not contain a zero byte. +func (k Key) SetExpandStringValue(name, value string) error { + return k.setStringValue(name, EXPAND_SZ, value) +} + +// SetStringsValue sets the data and type of a name value +// under key k to value and MULTI_SZ. The value strings +// must not contain a zero byte. +func (k Key) SetStringsValue(name string, value []string) error { + ss := "" + for _, s := range value { + for i := 0; i < len(s); i++ { + if s[i] == 0 { + return errors.New("string cannot have 0 inside") + } + } + ss += s + "\x00" + } + v := utf16.Encode([]rune(ss + "\x00")) + buf := (*[1 << 29]byte)(unsafe.Pointer(&v[0]))[:len(v)*2] + return k.setValue(name, MULTI_SZ, buf) +} + +// SetBinaryValue sets the data and type of a name value +// under key k to value and BINARY. +func (k Key) SetBinaryValue(name string, value []byte) error { + return k.setValue(name, BINARY, value) +} + +// DeleteValue removes a named value from the key k. +func (k Key) DeleteValue(name string) error { + return regDeleteValue(syscall.Handle(k), syscall.StringToUTF16Ptr(name)) +} + +// ReadValueNames returns the value names of key k. +// The parameter n controls the number of returned names, +// analogous to the way os.File.Readdirnames works. +func (k Key) ReadValueNames(n int) ([]string, error) { + ki, err := k.Stat() + if err != nil { + return nil, err + } + names := make([]string, 0, ki.ValueCount) + buf := make([]uint16, ki.MaxValueNameLen+1) // extra room for terminating null character +loopItems: + for i := uint32(0); ; i++ { + if n > 0 { + if len(names) == n { + return names, nil + } + } + l := uint32(len(buf)) + for { + err := regEnumValue(syscall.Handle(k), i, &buf[0], &l, nil, nil, nil, nil) + if err == nil { + break + } + if err == syscall.ERROR_MORE_DATA { + // Double buffer size and try again. + l = uint32(2 * len(buf)) + buf = make([]uint16, l) + continue + } + if err == _ERROR_NO_MORE_ITEMS { + break loopItems + } + return names, err + } + names = append(names, syscall.UTF16ToString(buf[:l])) + } + if n > len(names) { + return names, io.EOF + } + return names, nil +} diff --git a/vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go new file mode 100644 index 0000000..9c17675 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go @@ -0,0 +1,82 @@ +// MACHINE GENERATED BY 'go generate' COMMAND; DO NOT EDIT + +package registry + +import "unsafe" +import "syscall" + +var _ unsafe.Pointer + +var ( + modadvapi32 = syscall.NewLazyDLL("advapi32.dll") + modkernel32 = syscall.NewLazyDLL("kernel32.dll") + + procRegCreateKeyExW = modadvapi32.NewProc("RegCreateKeyExW") + procRegDeleteKeyW = modadvapi32.NewProc("RegDeleteKeyW") + procRegSetValueExW = modadvapi32.NewProc("RegSetValueExW") + procRegEnumValueW = modadvapi32.NewProc("RegEnumValueW") + procRegDeleteValueW = modadvapi32.NewProc("RegDeleteValueW") + procRegLoadMUIStringW = modadvapi32.NewProc("RegLoadMUIStringW") + procExpandEnvironmentStringsW = modkernel32.NewProc("ExpandEnvironmentStringsW") +) + +func regCreateKeyEx(key syscall.Handle, subkey *uint16, reserved uint32, class *uint16, options uint32, desired uint32, sa *syscall.SecurityAttributes, result *syscall.Handle, disposition *uint32) (regerrno error) { + r0, _, _ := syscall.Syscall9(procRegCreateKeyExW.Addr(), 9, uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(reserved), uintptr(unsafe.Pointer(class)), uintptr(options), uintptr(desired), uintptr(unsafe.Pointer(sa)), uintptr(unsafe.Pointer(result)), uintptr(unsafe.Pointer(disposition))) + if r0 != 0 { + regerrno = syscall.Errno(r0) + } + return +} + +func regDeleteKey(key syscall.Handle, subkey *uint16) (regerrno error) { + r0, _, _ := syscall.Syscall(procRegDeleteKeyW.Addr(), 2, uintptr(key), uintptr(unsafe.Pointer(subkey)), 0) + if r0 != 0 { + regerrno = syscall.Errno(r0) + } + return +} + +func regSetValueEx(key syscall.Handle, valueName *uint16, reserved uint32, vtype uint32, buf *byte, bufsize uint32) (regerrno error) { + r0, _, _ := syscall.Syscall6(procRegSetValueExW.Addr(), 6, uintptr(key), uintptr(unsafe.Pointer(valueName)), uintptr(reserved), uintptr(vtype), uintptr(unsafe.Pointer(buf)), uintptr(bufsize)) + if r0 != 0 { + regerrno = syscall.Errno(r0) + } + return +} + +func regEnumValue(key syscall.Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) { + r0, _, _ := syscall.Syscall9(procRegEnumValueW.Addr(), 8, uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen)), 0) + if r0 != 0 { + regerrno = syscall.Errno(r0) + } + return +} + +func regDeleteValue(key syscall.Handle, name *uint16) (regerrno error) { + r0, _, _ := syscall.Syscall(procRegDeleteValueW.Addr(), 2, uintptr(key), uintptr(unsafe.Pointer(name)), 0) + if r0 != 0 { + regerrno = syscall.Errno(r0) + } + return +} + +func regLoadMUIString(key syscall.Handle, name *uint16, buf *uint16, buflen uint32, buflenCopied *uint32, flags uint32, dir *uint16) (regerrno error) { + r0, _, _ := syscall.Syscall9(procRegLoadMUIStringW.Addr(), 7, uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(unsafe.Pointer(buflenCopied)), uintptr(flags), uintptr(unsafe.Pointer(dir)), 0, 0) + if r0 != 0 { + regerrno = syscall.Errno(r0) + } + return +} + +func expandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32, err error) { + r0, _, e1 := syscall.Syscall(procExpandEnvironmentStringsW.Addr(), 3, uintptr(unsafe.Pointer(src)), uintptr(unsafe.Pointer(dst)), uintptr(size)) + n = uint32(r0) + if n == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} diff --git a/vendor/golang.org/x/sys/windows/security_windows.go b/vendor/golang.org/x/sys/windows/security_windows.go new file mode 100644 index 0000000..ca09bdd --- /dev/null +++ b/vendor/golang.org/x/sys/windows/security_windows.go @@ -0,0 +1,435 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package windows + +import ( + "syscall" + "unsafe" +) + +const ( + STANDARD_RIGHTS_REQUIRED = 0xf0000 + STANDARD_RIGHTS_READ = 0x20000 + STANDARD_RIGHTS_WRITE = 0x20000 + STANDARD_RIGHTS_EXECUTE = 0x20000 + STANDARD_RIGHTS_ALL = 0x1F0000 +) + +const ( + NameUnknown = 0 + NameFullyQualifiedDN = 1 + NameSamCompatible = 2 + NameDisplay = 3 + NameUniqueId = 6 + NameCanonical = 7 + NameUserPrincipal = 8 + NameCanonicalEx = 9 + NameServicePrincipal = 10 + NameDnsDomain = 12 +) + +// This function returns 1 byte BOOLEAN rather than the 4 byte BOOL. +// http://blogs.msdn.com/b/drnick/archive/2007/12/19/windows-and-upn-format-credentials.aspx +//sys TranslateName(accName *uint16, accNameFormat uint32, desiredNameFormat uint32, translatedName *uint16, nSize *uint32) (err error) [failretval&0xff==0] = secur32.TranslateNameW +//sys GetUserNameEx(nameFormat uint32, nameBuffre *uint16, nSize *uint32) (err error) [failretval&0xff==0] = secur32.GetUserNameExW + +// TranslateAccountName converts a directory service +// object name from one format to another. +func TranslateAccountName(username string, from, to uint32, initSize int) (string, error) { + u, e := UTF16PtrFromString(username) + if e != nil { + return "", e + } + n := uint32(50) + for { + b := make([]uint16, n) + e = TranslateName(u, from, to, &b[0], &n) + if e == nil { + return UTF16ToString(b[:n]), nil + } + if e != ERROR_INSUFFICIENT_BUFFER { + return "", e + } + if n <= uint32(len(b)) { + return "", e + } + } +} + +const ( + // do not reorder + NetSetupUnknownStatus = iota + NetSetupUnjoined + NetSetupWorkgroupName + NetSetupDomainName +) + +type UserInfo10 struct { + Name *uint16 + Comment *uint16 + UsrComment *uint16 + FullName *uint16 +} + +//sys NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) = netapi32.NetUserGetInfo +//sys NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (neterr error) = netapi32.NetGetJoinInformation +//sys NetApiBufferFree(buf *byte) (neterr error) = netapi32.NetApiBufferFree + +const ( + // do not reorder + SidTypeUser = 1 + iota + SidTypeGroup + SidTypeDomain + SidTypeAlias + SidTypeWellKnownGroup + SidTypeDeletedAccount + SidTypeInvalid + SidTypeUnknown + SidTypeComputer + SidTypeLabel +) + +type SidIdentifierAuthority struct { + Value [6]byte +} + +var ( + SECURITY_NULL_SID_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 0}} + SECURITY_WORLD_SID_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 1}} + SECURITY_LOCAL_SID_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 2}} + SECURITY_CREATOR_SID_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 3}} + SECURITY_NON_UNIQUE_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 4}} + SECURITY_NT_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 5}} + SECURITY_MANDATORY_LABEL_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 16}} +) + +const ( + SECURITY_NULL_RID = 0 + SECURITY_WORLD_RID = 0 + SECURITY_LOCAL_RID = 0 + SECURITY_CREATOR_OWNER_RID = 0 + SECURITY_CREATOR_GROUP_RID = 1 + SECURITY_DIALUP_RID = 1 + SECURITY_NETWORK_RID = 2 + SECURITY_BATCH_RID = 3 + SECURITY_INTERACTIVE_RID = 4 + SECURITY_LOGON_IDS_RID = 5 + SECURITY_SERVICE_RID = 6 + SECURITY_LOCAL_SYSTEM_RID = 18 + SECURITY_BUILTIN_DOMAIN_RID = 32 + SECURITY_PRINCIPAL_SELF_RID = 10 + SECURITY_CREATOR_OWNER_SERVER_RID = 0x2 + SECURITY_CREATOR_GROUP_SERVER_RID = 0x3 + SECURITY_LOGON_IDS_RID_COUNT = 0x3 + SECURITY_ANONYMOUS_LOGON_RID = 0x7 + SECURITY_PROXY_RID = 0x8 + SECURITY_ENTERPRISE_CONTROLLERS_RID = 0x9 + SECURITY_SERVER_LOGON_RID = SECURITY_ENTERPRISE_CONTROLLERS_RID + SECURITY_AUTHENTICATED_USER_RID = 0xb + SECURITY_RESTRICTED_CODE_RID = 0xc + SECURITY_NT_NON_UNIQUE_RID = 0x15 +) + +//sys LookupAccountSid(systemName *uint16, sid *SID, name *uint16, nameLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) = advapi32.LookupAccountSidW +//sys LookupAccountName(systemName *uint16, accountName *uint16, sid *SID, sidLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) = advapi32.LookupAccountNameW +//sys ConvertSidToStringSid(sid *SID, stringSid **uint16) (err error) = advapi32.ConvertSidToStringSidW +//sys ConvertStringSidToSid(stringSid *uint16, sid **SID) (err error) = advapi32.ConvertStringSidToSidW +//sys GetLengthSid(sid *SID) (len uint32) = advapi32.GetLengthSid +//sys CopySid(destSidLen uint32, destSid *SID, srcSid *SID) (err error) = advapi32.CopySid +//sys AllocateAndInitializeSid(identAuth *SidIdentifierAuthority, subAuth byte, subAuth0 uint32, subAuth1 uint32, subAuth2 uint32, subAuth3 uint32, subAuth4 uint32, subAuth5 uint32, subAuth6 uint32, subAuth7 uint32, sid **SID) (err error) = advapi32.AllocateAndInitializeSid +//sys FreeSid(sid *SID) (err error) [failretval!=0] = advapi32.FreeSid +//sys EqualSid(sid1 *SID, sid2 *SID) (isEqual bool) = advapi32.EqualSid + +// The security identifier (SID) structure is a variable-length +// structure used to uniquely identify users or groups. +type SID struct{} + +// StringToSid converts a string-format security identifier +// sid into a valid, functional sid. +func StringToSid(s string) (*SID, error) { + var sid *SID + p, e := UTF16PtrFromString(s) + if e != nil { + return nil, e + } + e = ConvertStringSidToSid(p, &sid) + if e != nil { + return nil, e + } + defer LocalFree((Handle)(unsafe.Pointer(sid))) + return sid.Copy() +} + +// LookupSID retrieves a security identifier sid for the account +// and the name of the domain on which the account was found. +// System specify target computer to search. +func LookupSID(system, account string) (sid *SID, domain string, accType uint32, err error) { + if len(account) == 0 { + return nil, "", 0, syscall.EINVAL + } + acc, e := UTF16PtrFromString(account) + if e != nil { + return nil, "", 0, e + } + var sys *uint16 + if len(system) > 0 { + sys, e = UTF16PtrFromString(system) + if e != nil { + return nil, "", 0, e + } + } + n := uint32(50) + dn := uint32(50) + for { + b := make([]byte, n) + db := make([]uint16, dn) + sid = (*SID)(unsafe.Pointer(&b[0])) + e = LookupAccountName(sys, acc, sid, &n, &db[0], &dn, &accType) + if e == nil { + return sid, UTF16ToString(db), accType, nil + } + if e != ERROR_INSUFFICIENT_BUFFER { + return nil, "", 0, e + } + if n <= uint32(len(b)) { + return nil, "", 0, e + } + } +} + +// String converts sid to a string format +// suitable for display, storage, or transmission. +func (sid *SID) String() (string, error) { + var s *uint16 + e := ConvertSidToStringSid(sid, &s) + if e != nil { + return "", e + } + defer LocalFree((Handle)(unsafe.Pointer(s))) + return UTF16ToString((*[256]uint16)(unsafe.Pointer(s))[:]), nil +} + +// Len returns the length, in bytes, of a valid security identifier sid. +func (sid *SID) Len() int { + return int(GetLengthSid(sid)) +} + +// Copy creates a duplicate of security identifier sid. +func (sid *SID) Copy() (*SID, error) { + b := make([]byte, sid.Len()) + sid2 := (*SID)(unsafe.Pointer(&b[0])) + e := CopySid(uint32(len(b)), sid2, sid) + if e != nil { + return nil, e + } + return sid2, nil +} + +// LookupAccount retrieves the name of the account for this sid +// and the name of the first domain on which this sid is found. +// System specify target computer to search for. +func (sid *SID) LookupAccount(system string) (account, domain string, accType uint32, err error) { + var sys *uint16 + if len(system) > 0 { + sys, err = UTF16PtrFromString(system) + if err != nil { + return "", "", 0, err + } + } + n := uint32(50) + dn := uint32(50) + for { + b := make([]uint16, n) + db := make([]uint16, dn) + e := LookupAccountSid(sys, sid, &b[0], &n, &db[0], &dn, &accType) + if e == nil { + return UTF16ToString(b), UTF16ToString(db), accType, nil + } + if e != ERROR_INSUFFICIENT_BUFFER { + return "", "", 0, e + } + if n <= uint32(len(b)) { + return "", "", 0, e + } + } +} + +const ( + // do not reorder + TOKEN_ASSIGN_PRIMARY = 1 << iota + TOKEN_DUPLICATE + TOKEN_IMPERSONATE + TOKEN_QUERY + TOKEN_QUERY_SOURCE + TOKEN_ADJUST_PRIVILEGES + TOKEN_ADJUST_GROUPS + TOKEN_ADJUST_DEFAULT + + TOKEN_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | + TOKEN_ASSIGN_PRIMARY | + TOKEN_DUPLICATE | + TOKEN_IMPERSONATE | + TOKEN_QUERY | + TOKEN_QUERY_SOURCE | + TOKEN_ADJUST_PRIVILEGES | + TOKEN_ADJUST_GROUPS | + TOKEN_ADJUST_DEFAULT + TOKEN_READ = STANDARD_RIGHTS_READ | TOKEN_QUERY + TOKEN_WRITE = STANDARD_RIGHTS_WRITE | + TOKEN_ADJUST_PRIVILEGES | + TOKEN_ADJUST_GROUPS | + TOKEN_ADJUST_DEFAULT + TOKEN_EXECUTE = STANDARD_RIGHTS_EXECUTE +) + +const ( + // do not reorder + TokenUser = 1 + iota + TokenGroups + TokenPrivileges + TokenOwner + TokenPrimaryGroup + TokenDefaultDacl + TokenSource + TokenType + TokenImpersonationLevel + TokenStatistics + TokenRestrictedSids + TokenSessionId + TokenGroupsAndPrivileges + TokenSessionReference + TokenSandBoxInert + TokenAuditPolicy + TokenOrigin + TokenElevationType + TokenLinkedToken + TokenElevation + TokenHasRestrictions + TokenAccessInformation + TokenVirtualizationAllowed + TokenVirtualizationEnabled + TokenIntegrityLevel + TokenUIAccess + TokenMandatoryPolicy + TokenLogonSid + MaxTokenInfoClass +) + +type SIDAndAttributes struct { + Sid *SID + Attributes uint32 +} + +type Tokenuser struct { + User SIDAndAttributes +} + +type Tokenprimarygroup struct { + PrimaryGroup *SID +} + +type Tokengroups struct { + GroupCount uint32 + Groups [1]SIDAndAttributes +} + +//sys OpenProcessToken(h Handle, access uint32, token *Token) (err error) = advapi32.OpenProcessToken +//sys GetTokenInformation(t Token, infoClass uint32, info *byte, infoLen uint32, returnedLen *uint32) (err error) = advapi32.GetTokenInformation +//sys GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) = userenv.GetUserProfileDirectoryW + +// An access token contains the security information for a logon session. +// The system creates an access token when a user logs on, and every +// process executed on behalf of the user has a copy of the token. +// The token identifies the user, the user's groups, and the user's +// privileges. The system uses the token to control access to securable +// objects and to control the ability of the user to perform various +// system-related operations on the local computer. +type Token Handle + +// OpenCurrentProcessToken opens the access token +// associated with current process. +func OpenCurrentProcessToken() (Token, error) { + p, e := GetCurrentProcess() + if e != nil { + return 0, e + } + var t Token + e = OpenProcessToken(p, TOKEN_QUERY, &t) + if e != nil { + return 0, e + } + return t, nil +} + +// Close releases access to access token. +func (t Token) Close() error { + return CloseHandle(Handle(t)) +} + +// getInfo retrieves a specified type of information about an access token. +func (t Token) getInfo(class uint32, initSize int) (unsafe.Pointer, error) { + n := uint32(initSize) + for { + b := make([]byte, n) + e := GetTokenInformation(t, class, &b[0], uint32(len(b)), &n) + if e == nil { + return unsafe.Pointer(&b[0]), nil + } + if e != ERROR_INSUFFICIENT_BUFFER { + return nil, e + } + if n <= uint32(len(b)) { + return nil, e + } + } +} + +// GetTokenUser retrieves access token t user account information. +func (t Token) GetTokenUser() (*Tokenuser, error) { + i, e := t.getInfo(TokenUser, 50) + if e != nil { + return nil, e + } + return (*Tokenuser)(i), nil +} + +// GetTokenGroups retrieves group accounts associated with access token t. +func (t Token) GetTokenGroups() (*Tokengroups, error) { + i, e := t.getInfo(TokenGroups, 50) + if e != nil { + return nil, e + } + return (*Tokengroups)(i), nil +} + +// GetTokenPrimaryGroup retrieves access token t primary group information. +// A pointer to a SID structure representing a group that will become +// the primary group of any objects created by a process using this access token. +func (t Token) GetTokenPrimaryGroup() (*Tokenprimarygroup, error) { + i, e := t.getInfo(TokenPrimaryGroup, 50) + if e != nil { + return nil, e + } + return (*Tokenprimarygroup)(i), nil +} + +// GetUserProfileDirectory retrieves path to the +// root directory of the access token t user's profile. +func (t Token) GetUserProfileDirectory() (string, error) { + n := uint32(100) + for { + b := make([]uint16, n) + e := GetUserProfileDirectory(t, &b[0], &n) + if e == nil { + return UTF16ToString(b), nil + } + if e != ERROR_INSUFFICIENT_BUFFER { + return "", e + } + if n <= uint32(len(b)) { + return "", e + } + } +} diff --git a/vendor/golang.org/x/sys/windows/service.go b/vendor/golang.org/x/sys/windows/service.go new file mode 100644 index 0000000..1c11d39 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/service.go @@ -0,0 +1,143 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package windows + +const ( + SC_MANAGER_CONNECT = 1 + SC_MANAGER_CREATE_SERVICE = 2 + SC_MANAGER_ENUMERATE_SERVICE = 4 + SC_MANAGER_LOCK = 8 + SC_MANAGER_QUERY_LOCK_STATUS = 16 + SC_MANAGER_MODIFY_BOOT_CONFIG = 32 + SC_MANAGER_ALL_ACCESS = 0xf003f +) + +//sys OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenSCManagerW + +const ( + SERVICE_KERNEL_DRIVER = 1 + SERVICE_FILE_SYSTEM_DRIVER = 2 + SERVICE_ADAPTER = 4 + SERVICE_RECOGNIZER_DRIVER = 8 + SERVICE_WIN32_OWN_PROCESS = 16 + SERVICE_WIN32_SHARE_PROCESS = 32 + SERVICE_WIN32 = SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS + SERVICE_INTERACTIVE_PROCESS = 256 + SERVICE_DRIVER = SERVICE_KERNEL_DRIVER | SERVICE_FILE_SYSTEM_DRIVER | SERVICE_RECOGNIZER_DRIVER + SERVICE_TYPE_ALL = SERVICE_WIN32 | SERVICE_ADAPTER | SERVICE_DRIVER | SERVICE_INTERACTIVE_PROCESS + + SERVICE_BOOT_START = 0 + SERVICE_SYSTEM_START = 1 + SERVICE_AUTO_START = 2 + SERVICE_DEMAND_START = 3 + SERVICE_DISABLED = 4 + + SERVICE_ERROR_IGNORE = 0 + SERVICE_ERROR_NORMAL = 1 + SERVICE_ERROR_SEVERE = 2 + SERVICE_ERROR_CRITICAL = 3 + + SC_STATUS_PROCESS_INFO = 0 + + SERVICE_STOPPED = 1 + SERVICE_START_PENDING = 2 + SERVICE_STOP_PENDING = 3 + SERVICE_RUNNING = 4 + SERVICE_CONTINUE_PENDING = 5 + SERVICE_PAUSE_PENDING = 6 + SERVICE_PAUSED = 7 + SERVICE_NO_CHANGE = 0xffffffff + + SERVICE_ACCEPT_STOP = 1 + SERVICE_ACCEPT_PAUSE_CONTINUE = 2 + SERVICE_ACCEPT_SHUTDOWN = 4 + SERVICE_ACCEPT_PARAMCHANGE = 8 + SERVICE_ACCEPT_NETBINDCHANGE = 16 + SERVICE_ACCEPT_HARDWAREPROFILECHANGE = 32 + SERVICE_ACCEPT_POWEREVENT = 64 + SERVICE_ACCEPT_SESSIONCHANGE = 128 + + SERVICE_CONTROL_STOP = 1 + SERVICE_CONTROL_PAUSE = 2 + SERVICE_CONTROL_CONTINUE = 3 + SERVICE_CONTROL_INTERROGATE = 4 + SERVICE_CONTROL_SHUTDOWN = 5 + SERVICE_CONTROL_PARAMCHANGE = 6 + SERVICE_CONTROL_NETBINDADD = 7 + SERVICE_CONTROL_NETBINDREMOVE = 8 + SERVICE_CONTROL_NETBINDENABLE = 9 + SERVICE_CONTROL_NETBINDDISABLE = 10 + SERVICE_CONTROL_DEVICEEVENT = 11 + SERVICE_CONTROL_HARDWAREPROFILECHANGE = 12 + SERVICE_CONTROL_POWEREVENT = 13 + SERVICE_CONTROL_SESSIONCHANGE = 14 + + SERVICE_ACTIVE = 1 + SERVICE_INACTIVE = 2 + SERVICE_STATE_ALL = 3 + + SERVICE_QUERY_CONFIG = 1 + SERVICE_CHANGE_CONFIG = 2 + SERVICE_QUERY_STATUS = 4 + SERVICE_ENUMERATE_DEPENDENTS = 8 + SERVICE_START = 16 + SERVICE_STOP = 32 + SERVICE_PAUSE_CONTINUE = 64 + SERVICE_INTERROGATE = 128 + SERVICE_USER_DEFINED_CONTROL = 256 + SERVICE_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SERVICE_QUERY_CONFIG | SERVICE_CHANGE_CONFIG | SERVICE_QUERY_STATUS | SERVICE_ENUMERATE_DEPENDENTS | SERVICE_START | SERVICE_STOP | SERVICE_PAUSE_CONTINUE | SERVICE_INTERROGATE | SERVICE_USER_DEFINED_CONTROL + SERVICE_RUNS_IN_SYSTEM_PROCESS = 1 + SERVICE_CONFIG_DESCRIPTION = 1 + SERVICE_CONFIG_FAILURE_ACTIONS = 2 + + NO_ERROR = 0 +) + +type SERVICE_STATUS struct { + ServiceType uint32 + CurrentState uint32 + ControlsAccepted uint32 + Win32ExitCode uint32 + ServiceSpecificExitCode uint32 + CheckPoint uint32 + WaitHint uint32 +} + +type SERVICE_TABLE_ENTRY struct { + ServiceName *uint16 + ServiceProc uintptr +} + +type QUERY_SERVICE_CONFIG struct { + ServiceType uint32 + StartType uint32 + ErrorControl uint32 + BinaryPathName *uint16 + LoadOrderGroup *uint16 + TagId uint32 + Dependencies *uint16 + ServiceStartName *uint16 + DisplayName *uint16 +} + +type SERVICE_DESCRIPTION struct { + Description *uint16 +} + +//sys CloseServiceHandle(handle Handle) (err error) = advapi32.CloseServiceHandle +//sys CreateService(mgr Handle, serviceName *uint16, displayName *uint16, access uint32, srvType uint32, startType uint32, errCtl uint32, pathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16) (handle Handle, err error) [failretval==0] = advapi32.CreateServiceW +//sys OpenService(mgr Handle, serviceName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenServiceW +//sys DeleteService(service Handle) (err error) = advapi32.DeleteService +//sys StartService(service Handle, numArgs uint32, argVectors **uint16) (err error) = advapi32.StartServiceW +//sys QueryServiceStatus(service Handle, status *SERVICE_STATUS) (err error) = advapi32.QueryServiceStatus +//sys ControlService(service Handle, control uint32, status *SERVICE_STATUS) (err error) = advapi32.ControlService +//sys StartServiceCtrlDispatcher(serviceTable *SERVICE_TABLE_ENTRY) (err error) = advapi32.StartServiceCtrlDispatcherW +//sys SetServiceStatus(service Handle, serviceStatus *SERVICE_STATUS) (err error) = advapi32.SetServiceStatus +//sys ChangeServiceConfig(service Handle, serviceType uint32, startType uint32, errorControl uint32, binaryPathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16, displayName *uint16) (err error) = advapi32.ChangeServiceConfigW +//sys QueryServiceConfig(service Handle, serviceConfig *QUERY_SERVICE_CONFIG, bufSize uint32, bytesNeeded *uint32) (err error) = advapi32.QueryServiceConfigW +//sys ChangeServiceConfig2(service Handle, infoLevel uint32, info *byte) (err error) = advapi32.ChangeServiceConfig2W +//sys QueryServiceConfig2(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) = advapi32.QueryServiceConfig2W diff --git a/vendor/golang.org/x/sys/windows/str.go b/vendor/golang.org/x/sys/windows/str.go new file mode 100644 index 0000000..917cc2a --- /dev/null +++ b/vendor/golang.org/x/sys/windows/str.go @@ -0,0 +1,22 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package windows + +func itoa(val int) string { // do it here rather than with fmt to avoid dependency + if val < 0 { + return "-" + itoa(-val) + } + var buf [32]byte // big enough for int64 + i := len(buf) - 1 + for val >= 10 { + buf[i] = byte(val%10 + '0') + i-- + val /= 10 + } + buf[i] = byte(val + '0') + return string(buf[i:]) +} diff --git a/vendor/golang.org/x/sys/windows/svc/debug/log.go b/vendor/golang.org/x/sys/windows/svc/debug/log.go new file mode 100644 index 0000000..e51ab42 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/debug/log.go @@ -0,0 +1,56 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package debug + +import ( + "os" + "strconv" +) + +// Log interface allows different log implementations to be used. +type Log interface { + Close() error + Info(eid uint32, msg string) error + Warning(eid uint32, msg string) error + Error(eid uint32, msg string) error +} + +// ConsoleLog provides access to the console. +type ConsoleLog struct { + Name string +} + +// New creates new ConsoleLog. +func New(source string) *ConsoleLog { + return &ConsoleLog{Name: source} +} + +// Close closes console log l. +func (l *ConsoleLog) Close() error { + return nil +} + +func (l *ConsoleLog) report(kind string, eid uint32, msg string) error { + s := l.Name + "." + kind + "(" + strconv.Itoa(int(eid)) + "): " + msg + "\n" + _, err := os.Stdout.Write([]byte(s)) + return err +} + +// Info writes an information event msg with event id eid to the console l. +func (l *ConsoleLog) Info(eid uint32, msg string) error { + return l.report("info", eid, msg) +} + +// Warning writes an warning event msg with event id eid to the console l. +func (l *ConsoleLog) Warning(eid uint32, msg string) error { + return l.report("warn", eid, msg) +} + +// Error writes an error event msg with event id eid to the console l. +func (l *ConsoleLog) Error(eid uint32, msg string) error { + return l.report("error", eid, msg) +} diff --git a/vendor/golang.org/x/sys/windows/svc/debug/service.go b/vendor/golang.org/x/sys/windows/svc/debug/service.go new file mode 100644 index 0000000..d5ab94b --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/debug/service.go @@ -0,0 +1,45 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +// Package debug provides facilities to execute svc.Handler on console. +// +package debug + +import ( + "os" + "os/signal" + "syscall" + + "golang.org/x/sys/windows/svc" +) + +// Run executes service name by calling appropriate handler function. +// The process is running on console, unlike real service. Use Ctrl+C to +// send "Stop" command to your service. +func Run(name string, handler svc.Handler) error { + cmds := make(chan svc.ChangeRequest) + changes := make(chan svc.Status) + + sig := make(chan os.Signal) + signal.Notify(sig) + + go func() { + status := svc.Status{State: svc.Stopped} + for { + select { + case <-sig: + cmds <- svc.ChangeRequest{svc.Stop, status} + case status = <-changes: + } + } + }() + + _, errno := handler.Execute([]string{name}, cmds, changes) + if errno != 0 { + return syscall.Errno(errno) + } + return nil +} diff --git a/vendor/golang.org/x/sys/windows/svc/event.go b/vendor/golang.org/x/sys/windows/svc/event.go new file mode 100644 index 0000000..0508e22 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/event.go @@ -0,0 +1,48 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package svc + +import ( + "errors" + + "golang.org/x/sys/windows" +) + +// event represents auto-reset, initially non-signaled Windows event. +// It is used to communicate between go and asm parts of this package. +type event struct { + h windows.Handle +} + +func newEvent() (*event, error) { + h, err := windows.CreateEvent(nil, 0, 0, nil) + if err != nil { + return nil, err + } + return &event{h: h}, nil +} + +func (e *event) Close() error { + return windows.CloseHandle(e.h) +} + +func (e *event) Set() error { + return windows.SetEvent(e.h) +} + +func (e *event) Wait() error { + s, err := windows.WaitForSingleObject(e.h, windows.INFINITE) + switch s { + case windows.WAIT_OBJECT_0: + break + case windows.WAIT_FAILED: + return err + default: + return errors.New("unexpected result from WaitForSingleObject") + } + return nil +} diff --git a/vendor/golang.org/x/sys/windows/svc/eventlog/install.go b/vendor/golang.org/x/sys/windows/svc/eventlog/install.go new file mode 100644 index 0000000..c76a376 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/eventlog/install.go @@ -0,0 +1,80 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package eventlog + +import ( + "errors" + + "golang.org/x/sys/windows" + "golang.org/x/sys/windows/registry" +) + +const ( + // Log levels. + Info = windows.EVENTLOG_INFORMATION_TYPE + Warning = windows.EVENTLOG_WARNING_TYPE + Error = windows.EVENTLOG_ERROR_TYPE +) + +const addKeyName = `SYSTEM\CurrentControlSet\Services\EventLog\Application` + +// Install modifies PC registry to allow logging with an event source src. +// It adds all required keys and values to the event log registry key. +// Install uses msgFile as the event message file. If useExpandKey is true, +// the event message file is installed as REG_EXPAND_SZ value, +// otherwise as REG_SZ. Use bitwise of log.Error, log.Warning and +// log.Info to specify events supported by the new event source. +func Install(src, msgFile string, useExpandKey bool, eventsSupported uint32) error { + appkey, err := registry.OpenKey(registry.LOCAL_MACHINE, addKeyName, registry.CREATE_SUB_KEY) + if err != nil { + return err + } + defer appkey.Close() + + sk, alreadyExist, err := registry.CreateKey(appkey, src, registry.SET_VALUE) + if err != nil { + return err + } + defer sk.Close() + if alreadyExist { + return errors.New(addKeyName + `\` + src + " registry key already exists") + } + + err = sk.SetDWordValue("CustomSource", 1) + if err != nil { + return err + } + if useExpandKey { + err = sk.SetExpandStringValue("EventMessageFile", msgFile) + } else { + err = sk.SetStringValue("EventMessageFile", msgFile) + } + if err != nil { + return err + } + err = sk.SetDWordValue("TypesSupported", eventsSupported) + if err != nil { + return err + } + return nil +} + +// InstallAsEventCreate is the same as Install, but uses +// %SystemRoot%\System32\EventCreate.exe as the event message file. +func InstallAsEventCreate(src string, eventsSupported uint32) error { + return Install(src, "%SystemRoot%\\System32\\EventCreate.exe", true, eventsSupported) +} + +// Remove deletes all registry elements installed by the correspondent Install. +func Remove(src string) error { + appkey, err := registry.OpenKey(registry.LOCAL_MACHINE, addKeyName, registry.SET_VALUE) + if err != nil { + return err + } + defer appkey.Close() + return registry.DeleteKey(appkey, src) +} diff --git a/vendor/golang.org/x/sys/windows/svc/eventlog/log.go b/vendor/golang.org/x/sys/windows/svc/eventlog/log.go new file mode 100644 index 0000000..46e5153 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/eventlog/log.go @@ -0,0 +1,70 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +// Package eventlog implements access to Windows event log. +// +package eventlog + +import ( + "errors" + "syscall" + + "golang.org/x/sys/windows" +) + +// Log provides access to the system log. +type Log struct { + Handle windows.Handle +} + +// Open retrieves a handle to the specified event log. +func Open(source string) (*Log, error) { + return OpenRemote("", source) +} + +// OpenRemote does the same as Open, but on different computer host. +func OpenRemote(host, source string) (*Log, error) { + if source == "" { + return nil, errors.New("Specify event log source") + } + var s *uint16 + if host != "" { + s = syscall.StringToUTF16Ptr(host) + } + h, err := windows.RegisterEventSource(s, syscall.StringToUTF16Ptr(source)) + if err != nil { + return nil, err + } + return &Log{Handle: h}, nil +} + +// Close closes event log l. +func (l *Log) Close() error { + return windows.DeregisterEventSource(l.Handle) +} + +func (l *Log) report(etype uint16, eid uint32, msg string) error { + ss := []*uint16{syscall.StringToUTF16Ptr(msg)} + return windows.ReportEvent(l.Handle, etype, 0, eid, 0, 1, 0, &ss[0], nil) +} + +// Info writes an information event msg with event id eid to the end of event log l. +// When EventCreate.exe is used, eid must be between 1 and 1000. +func (l *Log) Info(eid uint32, msg string) error { + return l.report(windows.EVENTLOG_INFORMATION_TYPE, eid, msg) +} + +// Warning writes an warning event msg with event id eid to the end of event log l. +// When EventCreate.exe is used, eid must be between 1 and 1000. +func (l *Log) Warning(eid uint32, msg string) error { + return l.report(windows.EVENTLOG_WARNING_TYPE, eid, msg) +} + +// Error writes an error event msg with event id eid to the end of event log l. +// When EventCreate.exe is used, eid must be between 1 and 1000. +func (l *Log) Error(eid uint32, msg string) error { + return l.report(windows.EVENTLOG_ERROR_TYPE, eid, msg) +} diff --git a/vendor/golang.org/x/sys/windows/svc/eventlog/log_test.go b/vendor/golang.org/x/sys/windows/svc/eventlog/log_test.go new file mode 100644 index 0000000..4dd8ad9 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/eventlog/log_test.go @@ -0,0 +1,51 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package eventlog_test + +import ( + "testing" + + "golang.org/x/sys/windows/svc/eventlog" +) + +func TestLog(t *testing.T) { + if testing.Short() { + t.Skip("skipping test in short mode - it modifies system logs") + } + + const name = "mylog" + const supports = eventlog.Error | eventlog.Warning | eventlog.Info + err := eventlog.InstallAsEventCreate(name, supports) + if err != nil { + t.Fatalf("Install failed: %s", err) + } + defer func() { + err = eventlog.Remove(name) + if err != nil { + t.Fatalf("Remove failed: %s", err) + } + }() + + l, err := eventlog.Open(name) + if err != nil { + t.Fatalf("Open failed: %s", err) + } + defer l.Close() + + err = l.Info(1, "info") + if err != nil { + t.Fatalf("Info failed: %s", err) + } + err = l.Warning(2, "warning") + if err != nil { + t.Fatalf("Warning failed: %s", err) + } + err = l.Error(3, "error") + if err != nil { + t.Fatalf("Error failed: %s", err) + } +} diff --git a/vendor/golang.org/x/sys/windows/svc/example/beep.go b/vendor/golang.org/x/sys/windows/svc/example/beep.go new file mode 100644 index 0000000..dcf2340 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/example/beep.go @@ -0,0 +1,22 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package main + +import ( + "syscall" +) + +// BUG(brainman): MessageBeep Windows api is broken on Windows 7, +// so this example does not beep when runs as service on Windows 7. + +var ( + beepFunc = syscall.MustLoadDLL("user32.dll").MustFindProc("MessageBeep") +) + +func beep() { + beepFunc.Call(0xffffffff) +} diff --git a/vendor/golang.org/x/sys/windows/svc/example/install.go b/vendor/golang.org/x/sys/windows/svc/example/install.go new file mode 100644 index 0000000..39cb00d --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/example/install.go @@ -0,0 +1,92 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package main + +import ( + "fmt" + "os" + "path/filepath" + + "golang.org/x/sys/windows/svc/eventlog" + "golang.org/x/sys/windows/svc/mgr" +) + +func exePath() (string, error) { + prog := os.Args[0] + p, err := filepath.Abs(prog) + if err != nil { + return "", err + } + fi, err := os.Stat(p) + if err == nil { + if !fi.Mode().IsDir() { + return p, nil + } + err = fmt.Errorf("%s is directory", p) + } + if filepath.Ext(p) == "" { + p += ".exe" + fi, err := os.Stat(p) + if err == nil { + if !fi.Mode().IsDir() { + return p, nil + } + err = fmt.Errorf("%s is directory", p) + } + } + return "", err +} + +func installService(name, desc string) error { + exepath, err := exePath() + if err != nil { + return err + } + m, err := mgr.Connect() + if err != nil { + return err + } + defer m.Disconnect() + s, err := m.OpenService(name) + if err == nil { + s.Close() + return fmt.Errorf("service %s already exists", name) + } + s, err = m.CreateService(name, exepath, mgr.Config{DisplayName: desc}, "is", "auto-started") + if err != nil { + return err + } + defer s.Close() + err = eventlog.InstallAsEventCreate(name, eventlog.Error|eventlog.Warning|eventlog.Info) + if err != nil { + s.Delete() + return fmt.Errorf("SetupEventLogSource() failed: %s", err) + } + return nil +} + +func removeService(name string) error { + m, err := mgr.Connect() + if err != nil { + return err + } + defer m.Disconnect() + s, err := m.OpenService(name) + if err != nil { + return fmt.Errorf("service %s is not installed", name) + } + defer s.Close() + err = s.Delete() + if err != nil { + return err + } + err = eventlog.Remove(name) + if err != nil { + return fmt.Errorf("RemoveEventLogSource() failed: %s", err) + } + return nil +} diff --git a/vendor/golang.org/x/sys/windows/svc/example/main.go b/vendor/golang.org/x/sys/windows/svc/example/main.go new file mode 100644 index 0000000..dc96c08 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/example/main.go @@ -0,0 +1,76 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +// Example service program that beeps. +// +// The program demonstrates how to create Windows service and +// install / remove it on a computer. It also shows how to +// stop / start / pause / continue any service, and how to +// write to event log. It also shows how to use debug +// facilities available in debug package. +// +package main + +import ( + "fmt" + "log" + "os" + "strings" + + "golang.org/x/sys/windows/svc" +) + +func usage(errmsg string) { + fmt.Fprintf(os.Stderr, + "%s\n\n"+ + "usage: %s \n"+ + " where is one of\n"+ + " install, remove, debug, start, stop, pause or continue.\n", + errmsg, os.Args[0]) + os.Exit(2) +} + +func main() { + const svcName = "myservice" + + isIntSess, err := svc.IsAnInteractiveSession() + if err != nil { + log.Fatalf("failed to determine if we are running in an interactive session: %v", err) + } + if !isIntSess { + runService(svcName, false) + return + } + + if len(os.Args) < 2 { + usage("no command specified") + } + + cmd := strings.ToLower(os.Args[1]) + switch cmd { + case "debug": + runService(svcName, true) + return + case "install": + err = installService(svcName, "my service") + case "remove": + err = removeService(svcName) + case "start": + err = startService(svcName) + case "stop": + err = controlService(svcName, svc.Stop, svc.Stopped) + case "pause": + err = controlService(svcName, svc.Pause, svc.Paused) + case "continue": + err = controlService(svcName, svc.Continue, svc.Running) + default: + usage(fmt.Sprintf("invalid command %s", cmd)) + } + if err != nil { + log.Fatalf("failed to %s %s: %v", cmd, svcName, err) + } + return +} diff --git a/vendor/golang.org/x/sys/windows/svc/example/manage.go b/vendor/golang.org/x/sys/windows/svc/example/manage.go new file mode 100644 index 0000000..782dbd9 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/example/manage.go @@ -0,0 +1,62 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package main + +import ( + "fmt" + "time" + + "golang.org/x/sys/windows/svc" + "golang.org/x/sys/windows/svc/mgr" +) + +func startService(name string) error { + m, err := mgr.Connect() + if err != nil { + return err + } + defer m.Disconnect() + s, err := m.OpenService(name) + if err != nil { + return fmt.Errorf("could not access service: %v", err) + } + defer s.Close() + err = s.Start("is", "manual-started") + if err != nil { + return fmt.Errorf("could not start service: %v", err) + } + return nil +} + +func controlService(name string, c svc.Cmd, to svc.State) error { + m, err := mgr.Connect() + if err != nil { + return err + } + defer m.Disconnect() + s, err := m.OpenService(name) + if err != nil { + return fmt.Errorf("could not access service: %v", err) + } + defer s.Close() + status, err := s.Control(c) + if err != nil { + return fmt.Errorf("could not send control=%d: %v", c, err) + } + timeout := time.Now().Add(10 * time.Second) + for status.State != to { + if timeout.Before(time.Now()) { + return fmt.Errorf("timeout waiting for service to go to state=%d", to) + } + time.Sleep(300 * time.Millisecond) + status, err = s.Query() + if err != nil { + return fmt.Errorf("could not retrieve service status: %v", err) + } + } + return nil +} diff --git a/vendor/golang.org/x/sys/windows/svc/example/service.go b/vendor/golang.org/x/sys/windows/svc/example/service.go new file mode 100644 index 0000000..237e809 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/example/service.go @@ -0,0 +1,82 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package main + +import ( + "fmt" + "time" + + "golang.org/x/sys/windows/svc" + "golang.org/x/sys/windows/svc/debug" + "golang.org/x/sys/windows/svc/eventlog" +) + +var elog debug.Log + +type myservice struct{} + +func (m *myservice) Execute(args []string, r <-chan svc.ChangeRequest, changes chan<- svc.Status) (ssec bool, errno uint32) { + const cmdsAccepted = svc.AcceptStop | svc.AcceptShutdown | svc.AcceptPauseAndContinue + changes <- svc.Status{State: svc.StartPending} + fasttick := time.Tick(500 * time.Millisecond) + slowtick := time.Tick(2 * time.Second) + tick := fasttick + changes <- svc.Status{State: svc.Running, Accepts: cmdsAccepted} +loop: + for { + select { + case <-tick: + beep() + elog.Info(1, "beep") + case c := <-r: + switch c.Cmd { + case svc.Interrogate: + changes <- c.CurrentStatus + // Testing deadlock from https://code.google.com/p/winsvc/issues/detail?id=4 + time.Sleep(100 * time.Millisecond) + changes <- c.CurrentStatus + case svc.Stop, svc.Shutdown: + break loop + case svc.Pause: + changes <- svc.Status{State: svc.Paused, Accepts: cmdsAccepted} + tick = slowtick + case svc.Continue: + changes <- svc.Status{State: svc.Running, Accepts: cmdsAccepted} + tick = fasttick + default: + elog.Error(1, fmt.Sprintf("unexpected control request #%d", c)) + } + } + } + changes <- svc.Status{State: svc.StopPending} + return +} + +func runService(name string, isDebug bool) { + var err error + if isDebug { + elog = debug.New(name) + } else { + elog, err = eventlog.Open(name) + if err != nil { + return + } + } + defer elog.Close() + + elog.Info(1, fmt.Sprintf("starting %s service", name)) + run := svc.Run + if isDebug { + run = debug.Run + } + err = run(name, &myservice{}) + if err != nil { + elog.Error(1, fmt.Sprintf("%s service failed: %v", name, err)) + return + } + elog.Info(1, fmt.Sprintf("%s service stopped", name)) +} diff --git a/vendor/golang.org/x/sys/windows/svc/go12.c b/vendor/golang.org/x/sys/windows/svc/go12.c new file mode 100644 index 0000000..6f1be1f --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/go12.c @@ -0,0 +1,24 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows +// +build !go1.3 + +// copied from pkg/runtime +typedef unsigned int uint32; +typedef unsigned long long int uint64; +#ifdef _64BIT +typedef uint64 uintptr; +#else +typedef uint32 uintptr; +#endif + +// from sys_386.s or sys_amd64.s +void ·servicemain(void); + +void +·getServiceMain(uintptr *r) +{ + *r = (uintptr)·servicemain; +} diff --git a/vendor/golang.org/x/sys/windows/svc/go12.go b/vendor/golang.org/x/sys/windows/svc/go12.go new file mode 100644 index 0000000..6f0a924 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/go12.go @@ -0,0 +1,11 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows +// +build !go1.3 + +package svc + +// from go12.c +func getServiceMain(r *uintptr) diff --git a/vendor/golang.org/x/sys/windows/svc/go13.go b/vendor/golang.org/x/sys/windows/svc/go13.go new file mode 100644 index 0000000..432a9e7 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/go13.go @@ -0,0 +1,31 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows +// +build go1.3 + +package svc + +import "unsafe" + +const ptrSize = 4 << (^uintptr(0) >> 63) // unsafe.Sizeof(uintptr(0)) but an ideal const + +// Should be a built-in for unsafe.Pointer? +func add(p unsafe.Pointer, x uintptr) unsafe.Pointer { + return unsafe.Pointer(uintptr(p) + x) +} + +// funcPC returns the entry PC of the function f. +// It assumes that f is a func value. Otherwise the behavior is undefined. +func funcPC(f interface{}) uintptr { + return **(**uintptr)(add(unsafe.Pointer(&f), ptrSize)) +} + +// from sys_386.s and sys_amd64.s +func servicectlhandler(ctl uint32) uintptr +func servicemain(argc uint32, argv **uint16) + +func getServiceMain(r *uintptr) { + *r = funcPC(servicemain) +} diff --git a/vendor/golang.org/x/sys/windows/svc/mgr/config.go b/vendor/golang.org/x/sys/windows/svc/mgr/config.go new file mode 100644 index 0000000..0a6edba --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/mgr/config.go @@ -0,0 +1,139 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package mgr + +import ( + "syscall" + "unicode/utf16" + "unsafe" + + "golang.org/x/sys/windows" +) + +const ( + // Service start types. + StartManual = windows.SERVICE_DEMAND_START // the service must be started manually + StartAutomatic = windows.SERVICE_AUTO_START // the service will start by itself whenever the computer reboots + StartDisabled = windows.SERVICE_DISABLED // the service cannot be started + + // The severity of the error, and action taken, + // if this service fails to start. + ErrorCritical = windows.SERVICE_ERROR_CRITICAL + ErrorIgnore = windows.SERVICE_ERROR_IGNORE + ErrorNormal = windows.SERVICE_ERROR_NORMAL + ErrorSevere = windows.SERVICE_ERROR_SEVERE +) + +// TODO(brainman): Password is not returned by windows.QueryServiceConfig, not sure how to get it. + +type Config struct { + ServiceType uint32 + StartType uint32 + ErrorControl uint32 + BinaryPathName string // fully qualified path to the service binary file, can also include arguments for an auto-start service + LoadOrderGroup string + TagId uint32 + Dependencies []string + ServiceStartName string // name of the account under which the service should run + DisplayName string + Password string + Description string +} + +func toString(p *uint16) string { + if p == nil { + return "" + } + return syscall.UTF16ToString((*[4096]uint16)(unsafe.Pointer(p))[:]) +} + +func toStringSlice(ps *uint16) []string { + if ps == nil { + return nil + } + r := make([]string, 0) + for from, i, p := 0, 0, (*[1 << 24]uint16)(unsafe.Pointer(ps)); true; i++ { + if p[i] == 0 { + // empty string marks the end + if i <= from { + break + } + r = append(r, string(utf16.Decode(p[from:i]))) + from = i + 1 + } + } + return r +} + +// Config retrieves service s configuration paramteres. +func (s *Service) Config() (Config, error) { + var p *windows.QUERY_SERVICE_CONFIG + n := uint32(1024) + for { + b := make([]byte, n) + p = (*windows.QUERY_SERVICE_CONFIG)(unsafe.Pointer(&b[0])) + err := windows.QueryServiceConfig(s.Handle, p, n, &n) + if err == nil { + break + } + if err.(syscall.Errno) != syscall.ERROR_INSUFFICIENT_BUFFER { + return Config{}, err + } + if n <= uint32(len(b)) { + return Config{}, err + } + } + + var p2 *windows.SERVICE_DESCRIPTION + n = uint32(1024) + for { + b := make([]byte, n) + p2 = (*windows.SERVICE_DESCRIPTION)(unsafe.Pointer(&b[0])) + err := windows.QueryServiceConfig2(s.Handle, + windows.SERVICE_CONFIG_DESCRIPTION, &b[0], n, &n) + if err == nil { + break + } + if err.(syscall.Errno) != syscall.ERROR_INSUFFICIENT_BUFFER { + return Config{}, err + } + if n <= uint32(len(b)) { + return Config{}, err + } + } + + return Config{ + ServiceType: p.ServiceType, + StartType: p.StartType, + ErrorControl: p.ErrorControl, + BinaryPathName: toString(p.BinaryPathName), + LoadOrderGroup: toString(p.LoadOrderGroup), + TagId: p.TagId, + Dependencies: toStringSlice(p.Dependencies), + ServiceStartName: toString(p.ServiceStartName), + DisplayName: toString(p.DisplayName), + Description: toString(p2.Description), + }, nil +} + +func updateDescription(handle windows.Handle, desc string) error { + d := windows.SERVICE_DESCRIPTION{toPtr(desc)} + return windows.ChangeServiceConfig2(handle, + windows.SERVICE_CONFIG_DESCRIPTION, (*byte)(unsafe.Pointer(&d))) +} + +// UpdateConfig updates service s configuration parameters. +func (s *Service) UpdateConfig(c Config) error { + err := windows.ChangeServiceConfig(s.Handle, c.ServiceType, c.StartType, + c.ErrorControl, toPtr(c.BinaryPathName), toPtr(c.LoadOrderGroup), + nil, toStringBlock(c.Dependencies), toPtr(c.ServiceStartName), + toPtr(c.Password), toPtr(c.DisplayName)) + if err != nil { + return err + } + return updateDescription(s.Handle, c.Description) +} diff --git a/vendor/golang.org/x/sys/windows/svc/mgr/mgr.go b/vendor/golang.org/x/sys/windows/svc/mgr/mgr.go new file mode 100644 index 0000000..4d7e72e --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/mgr/mgr.go @@ -0,0 +1,116 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +// Package mgr can be used to manage Windows service programs. +// It can be used to install and remove them. It can also start, +// stop and pause them. The package can query / change current +// service state and config parameters. +// +package mgr + +import ( + "syscall" + "unicode/utf16" + + "golang.org/x/sys/windows" +) + +// Mgr is used to manage Windows service. +type Mgr struct { + Handle windows.Handle +} + +// Connect establishes a connection to the service control manager. +func Connect() (*Mgr, error) { + return ConnectRemote("") +} + +// ConnectRemote establishes a connection to the +// service control manager on computer named host. +func ConnectRemote(host string) (*Mgr, error) { + var s *uint16 + if host != "" { + s = syscall.StringToUTF16Ptr(host) + } + h, err := windows.OpenSCManager(s, nil, windows.SC_MANAGER_ALL_ACCESS) + if err != nil { + return nil, err + } + return &Mgr{Handle: h}, nil +} + +// Disconnect closes connection to the service control manager m. +func (m *Mgr) Disconnect() error { + return windows.CloseServiceHandle(m.Handle) +} + +func toPtr(s string) *uint16 { + if len(s) == 0 { + return nil + } + return syscall.StringToUTF16Ptr(s) +} + +// toStringBlock terminates strings in ss with 0, and then +// concatenates them together. It also adds extra 0 at the end. +func toStringBlock(ss []string) *uint16 { + if len(ss) == 0 { + return nil + } + t := "" + for _, s := range ss { + if s != "" { + t += s + "\x00" + } + } + if t == "" { + return nil + } + t += "\x00" + return &utf16.Encode([]rune(t))[0] +} + +// CreateService installs new service name on the system. +// The service will be executed by running exepath binary. +// Use config c to specify service parameters. +// If service StartType is set to StartAutomatic, +// args will be passed to svc.Handle.Execute. +func (m *Mgr) CreateService(name, exepath string, c Config, args ...string) (*Service, error) { + if c.StartType == 0 { + c.StartType = StartManual + } + if c.ErrorControl == 0 { + c.ErrorControl = ErrorNormal + } + s := syscall.EscapeArg(exepath) + for _, v := range args { + s += " " + syscall.EscapeArg(v) + } + h, err := windows.CreateService(m.Handle, toPtr(name), toPtr(c.DisplayName), + windows.SERVICE_ALL_ACCESS, windows.SERVICE_WIN32_OWN_PROCESS, + c.StartType, c.ErrorControl, toPtr(s), toPtr(c.LoadOrderGroup), + nil, toStringBlock(c.Dependencies), toPtr(c.ServiceStartName), toPtr(c.Password)) + if err != nil { + return nil, err + } + if c.Description != "" { + err = updateDescription(h, c.Description) + if err != nil { + return nil, err + } + } + return &Service{Name: name, Handle: h}, nil +} + +// OpenService retrieves access to service name, so it can +// be interrogated and controlled. +func (m *Mgr) OpenService(name string) (*Service, error) { + h, err := windows.OpenService(m.Handle, syscall.StringToUTF16Ptr(name), windows.SERVICE_ALL_ACCESS) + if err != nil { + return nil, err + } + return &Service{Name: name, Handle: h}, nil +} diff --git a/vendor/golang.org/x/sys/windows/svc/mgr/mgr_test.go b/vendor/golang.org/x/sys/windows/svc/mgr/mgr_test.go new file mode 100644 index 0000000..78be970 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/mgr/mgr_test.go @@ -0,0 +1,154 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package mgr_test + +import ( + "os" + "path/filepath" + "sort" + "strings" + "syscall" + "testing" + "time" + + "golang.org/x/sys/windows/svc/mgr" +) + +func TestOpenLanManServer(t *testing.T) { + m, err := mgr.Connect() + if err != nil { + if errno, ok := err.(syscall.Errno); ok && errno == syscall.ERROR_ACCESS_DENIED { + t.Skip("Skipping test: we don't have rights to manage services.") + } + t.Fatalf("SCM connection failed: %s", err) + } + defer m.Disconnect() + + s, err := m.OpenService("LanmanServer") + if err != nil { + t.Fatalf("OpenService(lanmanserver) failed: %s", err) + } + defer s.Close() + + _, err = s.Config() + if err != nil { + t.Fatalf("Config failed: %s", err) + } +} + +func install(t *testing.T, m *mgr.Mgr, name, exepath string, c mgr.Config) { + // Sometimes it takes a while for the service to get + // removed after previous test run. + for i := 0; ; i++ { + s, err := m.OpenService(name) + if err != nil { + break + } + s.Close() + + if i > 10 { + t.Fatalf("service %s already exists", name) + } + time.Sleep(300 * time.Millisecond) + } + + s, err := m.CreateService(name, exepath, c) + if err != nil { + t.Fatalf("CreateService(%s) failed: %v", name, err) + } + defer s.Close() +} + +func depString(d []string) string { + if len(d) == 0 { + return "" + } + for i := range d { + d[i] = strings.ToLower(d[i]) + } + ss := sort.StringSlice(d) + ss.Sort() + return strings.Join([]string(ss), " ") +} + +func testConfig(t *testing.T, s *mgr.Service, should mgr.Config) mgr.Config { + is, err := s.Config() + if err != nil { + t.Fatalf("Config failed: %s", err) + } + if should.DisplayName != is.DisplayName { + t.Fatalf("config mismatch: DisplayName is %q, but should have %q", is.DisplayName, should.DisplayName) + } + if should.StartType != is.StartType { + t.Fatalf("config mismatch: StartType is %v, but should have %v", is.StartType, should.StartType) + } + if should.Description != is.Description { + t.Fatalf("config mismatch: Description is %q, but should have %q", is.Description, should.Description) + } + if depString(should.Dependencies) != depString(is.Dependencies) { + t.Fatalf("config mismatch: Dependencies is %v, but should have %v", is.Dependencies, should.Dependencies) + } + return is +} + +func remove(t *testing.T, s *mgr.Service) { + err := s.Delete() + if err != nil { + t.Fatalf("Delete failed: %s", err) + } +} + +func TestMyService(t *testing.T) { + if testing.Short() { + t.Skip("skipping test in short mode - it modifies system services") + } + + const name = "myservice" + + m, err := mgr.Connect() + if err != nil { + if errno, ok := err.(syscall.Errno); ok && errno == syscall.ERROR_ACCESS_DENIED { + t.Skip("Skipping test: we don't have rights to manage services.") + } + t.Fatalf("SCM connection failed: %s", err) + } + defer m.Disconnect() + + c := mgr.Config{ + StartType: mgr.StartDisabled, + DisplayName: "my service", + Description: "my service is just a test", + Dependencies: []string{"LanmanServer", "W32Time"}, + } + + exename := os.Args[0] + exepath, err := filepath.Abs(exename) + if err != nil { + t.Fatalf("filepath.Abs(%s) failed: %s", exename, err) + } + + install(t, m, name, exepath, c) + + s, err := m.OpenService(name) + if err != nil { + t.Fatalf("service %s is not installed", name) + } + defer s.Close() + + c.BinaryPathName = exepath + c = testConfig(t, s, c) + + c.StartType = mgr.StartManual + err = s.UpdateConfig(c) + if err != nil { + t.Fatalf("UpdateConfig failed: %v", err) + } + + testConfig(t, s, c) + + remove(t, s) +} diff --git a/vendor/golang.org/x/sys/windows/svc/mgr/service.go b/vendor/golang.org/x/sys/windows/svc/mgr/service.go new file mode 100644 index 0000000..465f3c3 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/mgr/service.go @@ -0,0 +1,74 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package mgr + +import ( + "syscall" + + "golang.org/x/sys/windows" + "golang.org/x/sys/windows/svc" +) + +// TODO(brainman): Use EnumDependentServices to enumerate dependent services. + +// TODO(brainman): Use EnumServicesStatus to enumerate services in the specified service control manager database. + +// Service is used to access Windows service. +type Service struct { + Name string + Handle windows.Handle +} + +// Delete marks service s for deletion from the service control manager database. +func (s *Service) Delete() error { + return windows.DeleteService(s.Handle) +} + +// Close relinquish access to the service s. +func (s *Service) Close() error { + return windows.CloseServiceHandle(s.Handle) +} + +// Start starts service s. +// args will be passed to svc.Handler.Execute. +func (s *Service) Start(args ...string) error { + var p **uint16 + if len(args) > 0 { + vs := make([]*uint16, len(args)) + for i, _ := range vs { + vs[i] = syscall.StringToUTF16Ptr(args[i]) + } + p = &vs[0] + } + return windows.StartService(s.Handle, uint32(len(args)), p) +} + +// Control sends state change request c to the servce s. +func (s *Service) Control(c svc.Cmd) (svc.Status, error) { + var t windows.SERVICE_STATUS + err := windows.ControlService(s.Handle, uint32(c), &t) + if err != nil { + return svc.Status{}, err + } + return svc.Status{ + State: svc.State(t.CurrentState), + Accepts: svc.Accepted(t.ControlsAccepted), + }, nil +} + +// Query returns current status of service s. +func (s *Service) Query() (svc.Status, error) { + var t windows.SERVICE_STATUS + err := windows.QueryServiceStatus(s.Handle, &t) + if err != nil { + return svc.Status{}, err + } + return svc.Status{ + State: svc.State(t.CurrentState), + Accepts: svc.Accepted(t.ControlsAccepted), + }, nil +} diff --git a/vendor/golang.org/x/sys/windows/svc/security.go b/vendor/golang.org/x/sys/windows/svc/security.go new file mode 100644 index 0000000..6fbc923 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/security.go @@ -0,0 +1,62 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package svc + +import ( + "unsafe" + + "golang.org/x/sys/windows" +) + +func allocSid(subAuth0 uint32) (*windows.SID, error) { + var sid *windows.SID + err := windows.AllocateAndInitializeSid(&windows.SECURITY_NT_AUTHORITY, + 1, subAuth0, 0, 0, 0, 0, 0, 0, 0, &sid) + if err != nil { + return nil, err + } + return sid, nil +} + +// IsAnInteractiveSession determines if calling process is running interactively. +// It queries the process token for membership in the Interactive group. +// http://stackoverflow.com/questions/2668851/how-do-i-detect-that-my-application-is-running-as-service-or-in-an-interactive-s +func IsAnInteractiveSession() (bool, error) { + interSid, err := allocSid(windows.SECURITY_INTERACTIVE_RID) + if err != nil { + return false, err + } + defer windows.FreeSid(interSid) + + serviceSid, err := allocSid(windows.SECURITY_SERVICE_RID) + if err != nil { + return false, err + } + defer windows.FreeSid(serviceSid) + + t, err := windows.OpenCurrentProcessToken() + if err != nil { + return false, err + } + defer t.Close() + + gs, err := t.GetTokenGroups() + if err != nil { + return false, err + } + p := unsafe.Pointer(&gs.Groups[0]) + groups := (*[2 << 20]windows.SIDAndAttributes)(p)[:gs.GroupCount] + for _, g := range groups { + if windows.EqualSid(g.Sid, interSid) { + return true, nil + } + if windows.EqualSid(g.Sid, serviceSid) { + return false, nil + } + } + return false, nil +} diff --git a/vendor/golang.org/x/sys/windows/svc/service.go b/vendor/golang.org/x/sys/windows/svc/service.go new file mode 100644 index 0000000..9864f7a --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/service.go @@ -0,0 +1,316 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +// Package svc provides everything required to build Windows service. +// +package svc + +import ( + "errors" + "runtime" + "syscall" + "unsafe" + + "golang.org/x/sys/windows" +) + +// State describes service execution state (Stopped, Running and so on). +type State uint32 + +const ( + Stopped = State(windows.SERVICE_STOPPED) + StartPending = State(windows.SERVICE_START_PENDING) + StopPending = State(windows.SERVICE_STOP_PENDING) + Running = State(windows.SERVICE_RUNNING) + ContinuePending = State(windows.SERVICE_CONTINUE_PENDING) + PausePending = State(windows.SERVICE_PAUSE_PENDING) + Paused = State(windows.SERVICE_PAUSED) +) + +// Cmd represents service state change request. It is sent to a service +// by the service manager, and should be actioned upon by the service. +type Cmd uint32 + +const ( + Stop = Cmd(windows.SERVICE_CONTROL_STOP) + Pause = Cmd(windows.SERVICE_CONTROL_PAUSE) + Continue = Cmd(windows.SERVICE_CONTROL_CONTINUE) + Interrogate = Cmd(windows.SERVICE_CONTROL_INTERROGATE) + Shutdown = Cmd(windows.SERVICE_CONTROL_SHUTDOWN) +) + +// Accepted is used to describe commands accepted by the service. +// Note that Interrogate is always accepted. +type Accepted uint32 + +const ( + AcceptStop = Accepted(windows.SERVICE_ACCEPT_STOP) + AcceptShutdown = Accepted(windows.SERVICE_ACCEPT_SHUTDOWN) + AcceptPauseAndContinue = Accepted(windows.SERVICE_ACCEPT_PAUSE_CONTINUE) +) + +// Status combines State and Accepted commands to fully describe running service. +type Status struct { + State State + Accepts Accepted + CheckPoint uint32 // used to report progress during a lengthy operation + WaitHint uint32 // estimated time required for a pending operation, in milliseconds +} + +// ChangeRequest is sent to the service Handler to request service status change. +type ChangeRequest struct { + Cmd Cmd + CurrentStatus Status +} + +// Handler is the interface that must be implemented to build Windows service. +type Handler interface { + + // Execute will be called by the package code at the start of + // the service, and the service will exit once Execute completes. + // Inside Execute you must read service change requests from r and + // act accordingly. You must keep service control manager up to date + // about state of your service by writing into s as required. + // args contains service name followed by argument strings passed + // to the service. + // You can provide service exit code in exitCode return parameter, + // with 0 being "no error". You can also indicate if exit code, + // if any, is service specific or not by using svcSpecificEC + // parameter. + Execute(args []string, r <-chan ChangeRequest, s chan<- Status) (svcSpecificEC bool, exitCode uint32) +} + +var ( + // These are used by asm code. + goWaitsH uintptr + cWaitsH uintptr + ssHandle uintptr + sName *uint16 + sArgc uintptr + sArgv **uint16 + ctlHandlerProc uintptr + cSetEvent uintptr + cWaitForSingleObject uintptr + cRegisterServiceCtrlHandlerW uintptr +) + +func init() { + k := syscall.MustLoadDLL("kernel32.dll") + cSetEvent = k.MustFindProc("SetEvent").Addr() + cWaitForSingleObject = k.MustFindProc("WaitForSingleObject").Addr() + a := syscall.MustLoadDLL("advapi32.dll") + cRegisterServiceCtrlHandlerW = a.MustFindProc("RegisterServiceCtrlHandlerW").Addr() +} + +type ctlEvent struct { + cmd Cmd + errno uint32 +} + +// service provides access to windows service api. +type service struct { + name string + h windows.Handle + cWaits *event + goWaits *event + c chan ctlEvent + handler Handler +} + +func newService(name string, handler Handler) (*service, error) { + var s service + var err error + s.name = name + s.c = make(chan ctlEvent) + s.handler = handler + s.cWaits, err = newEvent() + if err != nil { + return nil, err + } + s.goWaits, err = newEvent() + if err != nil { + s.cWaits.Close() + return nil, err + } + return &s, nil +} + +func (s *service) close() error { + s.cWaits.Close() + s.goWaits.Close() + return nil +} + +type exitCode struct { + isSvcSpecific bool + errno uint32 +} + +func (s *service) updateStatus(status *Status, ec *exitCode) error { + if s.h == 0 { + return errors.New("updateStatus with no service status handle") + } + var t windows.SERVICE_STATUS + t.ServiceType = windows.SERVICE_WIN32_OWN_PROCESS + t.CurrentState = uint32(status.State) + if status.Accepts&AcceptStop != 0 { + t.ControlsAccepted |= windows.SERVICE_ACCEPT_STOP + } + if status.Accepts&AcceptShutdown != 0 { + t.ControlsAccepted |= windows.SERVICE_ACCEPT_SHUTDOWN + } + if status.Accepts&AcceptPauseAndContinue != 0 { + t.ControlsAccepted |= windows.SERVICE_ACCEPT_PAUSE_CONTINUE + } + if ec.errno == 0 { + t.Win32ExitCode = windows.NO_ERROR + t.ServiceSpecificExitCode = windows.NO_ERROR + } else if ec.isSvcSpecific { + t.Win32ExitCode = uint32(windows.ERROR_SERVICE_SPECIFIC_ERROR) + t.ServiceSpecificExitCode = ec.errno + } else { + t.Win32ExitCode = ec.errno + t.ServiceSpecificExitCode = windows.NO_ERROR + } + t.CheckPoint = status.CheckPoint + t.WaitHint = status.WaitHint + return windows.SetServiceStatus(s.h, &t) +} + +const ( + sysErrSetServiceStatusFailed = uint32(syscall.APPLICATION_ERROR) + iota + sysErrNewThreadInCallback +) + +func (s *service) run() { + s.goWaits.Wait() + s.h = windows.Handle(ssHandle) + argv := (*[100]*int16)(unsafe.Pointer(sArgv))[:sArgc] + args := make([]string, len(argv)) + for i, a := range argv { + args[i] = syscall.UTF16ToString((*[1 << 20]uint16)(unsafe.Pointer(a))[:]) + } + + cmdsToHandler := make(chan ChangeRequest) + changesFromHandler := make(chan Status) + exitFromHandler := make(chan exitCode) + + go func() { + ss, errno := s.handler.Execute(args, cmdsToHandler, changesFromHandler) + exitFromHandler <- exitCode{ss, errno} + }() + + status := Status{State: Stopped} + ec := exitCode{isSvcSpecific: true, errno: 0} + var outch chan ChangeRequest + inch := s.c + var cmd Cmd +loop: + for { + select { + case r := <-inch: + if r.errno != 0 { + ec.errno = r.errno + break loop + } + inch = nil + outch = cmdsToHandler + cmd = r.cmd + case outch <- ChangeRequest{cmd, status}: + inch = s.c + outch = nil + case c := <-changesFromHandler: + err := s.updateStatus(&c, &ec) + if err != nil { + // best suitable error number + ec.errno = sysErrSetServiceStatusFailed + if err2, ok := err.(syscall.Errno); ok { + ec.errno = uint32(err2) + } + break loop + } + status = c + case ec = <-exitFromHandler: + break loop + } + } + + s.updateStatus(&Status{State: Stopped}, &ec) + s.cWaits.Set() +} + +func newCallback(fn interface{}) (cb uintptr, err error) { + defer func() { + r := recover() + if r == nil { + return + } + cb = 0 + switch v := r.(type) { + case string: + err = errors.New(v) + case error: + err = v + default: + err = errors.New("unexpected panic in syscall.NewCallback") + } + }() + return syscall.NewCallback(fn), nil +} + +// BUG(brainman): There is no mechanism to run multiple services +// inside one single executable. Perhaps, it can be overcome by +// using RegisterServiceCtrlHandlerEx Windows api. + +// Run executes service name by calling appropriate handler function. +func Run(name string, handler Handler) error { + runtime.LockOSThread() + + tid := windows.GetCurrentThreadId() + + s, err := newService(name, handler) + if err != nil { + return err + } + + ctlHandler := func(ctl uint32) uintptr { + e := ctlEvent{cmd: Cmd(ctl)} + // We assume that this callback function is running on + // the same thread as Run. Nowhere in MS documentation + // I could find statement to guarantee that. So putting + // check here to verify, otherwise things will go bad + // quickly, if ignored. + i := windows.GetCurrentThreadId() + if i != tid { + e.errno = sysErrNewThreadInCallback + } + s.c <- e + return 0 + } + + var svcmain uintptr + getServiceMain(&svcmain) + t := []windows.SERVICE_TABLE_ENTRY{ + {syscall.StringToUTF16Ptr(s.name), svcmain}, + {nil, 0}, + } + + goWaitsH = uintptr(s.goWaits.h) + cWaitsH = uintptr(s.cWaits.h) + sName = t[0].ServiceName + ctlHandlerProc, err = newCallback(ctlHandler) + if err != nil { + return err + } + + go s.run() + + err = windows.StartServiceCtrlDispatcher(&t[0]) + if err != nil { + return err + } + return nil +} diff --git a/vendor/golang.org/x/sys/windows/svc/svc_test.go b/vendor/golang.org/x/sys/windows/svc/svc_test.go new file mode 100644 index 0000000..764da54 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/svc_test.go @@ -0,0 +1,118 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package svc_test + +import ( + "io/ioutil" + "os" + "os/exec" + "path/filepath" + "testing" + "time" + + "golang.org/x/sys/windows/svc" + "golang.org/x/sys/windows/svc/mgr" +) + +func getState(t *testing.T, s *mgr.Service) svc.State { + status, err := s.Query() + if err != nil { + t.Fatalf("Query(%s) failed: %s", s.Name, err) + } + return status.State +} + +func testState(t *testing.T, s *mgr.Service, want svc.State) { + have := getState(t, s) + if have != want { + t.Fatalf("%s state is=%d want=%d", s.Name, have, want) + } +} + +func waitState(t *testing.T, s *mgr.Service, want svc.State) { + for i := 0; ; i++ { + have := getState(t, s) + if have == want { + return + } + if i > 10 { + t.Fatalf("%s state is=%d, waiting timeout", s.Name, have) + } + time.Sleep(300 * time.Millisecond) + } +} + +func TestExample(t *testing.T) { + if testing.Short() { + t.Skip("skipping test in short mode - it modifies system services") + } + + const name = "myservice" + + m, err := mgr.Connect() + if err != nil { + t.Fatalf("SCM connection failed: %s", err) + } + defer m.Disconnect() + + dir, err := ioutil.TempDir("", "svc") + if err != nil { + t.Fatalf("failed to create temp directory: %v", err) + } + defer os.RemoveAll(dir) + + exepath := filepath.Join(dir, "a.exe") + o, err := exec.Command("go", "build", "-o", exepath, "golang.org/x/sys/windows/svc/example").CombinedOutput() + if err != nil { + t.Fatalf("failed to build service program: %v\n%v", err, string(o)) + } + + s, err := m.OpenService(name) + if err == nil { + err = s.Delete() + if err != nil { + s.Close() + t.Fatalf("Delete failed: %s", err) + } + s.Close() + } + s, err = m.CreateService(name, exepath, mgr.Config{DisplayName: "my service"}, "is", "auto-started") + if err != nil { + t.Fatalf("CreateService(%s) failed: %v", name, err) + } + defer s.Close() + + testState(t, s, svc.Stopped) + err = s.Start("is", "manual-started") + if err != nil { + t.Fatalf("Start(%s) failed: %s", s.Name, err) + } + waitState(t, s, svc.Running) + time.Sleep(1 * time.Second) + + // testing deadlock from issues 4. + _, err = s.Control(svc.Interrogate) + if err != nil { + t.Fatalf("Control(%s) failed: %s", s.Name, err) + } + _, err = s.Control(svc.Interrogate) + if err != nil { + t.Fatalf("Control(%s) failed: %s", s.Name, err) + } + time.Sleep(1 * time.Second) + + _, err = s.Control(svc.Stop) + if err != nil { + t.Fatalf("Control(%s) failed: %s", s.Name, err) + } + waitState(t, s, svc.Stopped) + + err = s.Delete() + if err != nil { + t.Fatalf("Delete failed: %s", err) + } +} diff --git a/vendor/golang.org/x/sys/windows/svc/sys_386.s b/vendor/golang.org/x/sys/windows/svc/sys_386.s new file mode 100644 index 0000000..5e11bfa --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/sys_386.s @@ -0,0 +1,67 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +// func servicemain(argc uint32, argv **uint16) +TEXT ·servicemain(SB),7,$0 + MOVL argc+0(FP), AX + MOVL AX, ·sArgc(SB) + MOVL argv+4(FP), AX + MOVL AX, ·sArgv(SB) + + PUSHL BP + PUSHL BX + PUSHL SI + PUSHL DI + + SUBL $12, SP + + MOVL ·sName(SB), AX + MOVL AX, (SP) + MOVL $·servicectlhandler(SB), AX + MOVL AX, 4(SP) + MOVL ·cRegisterServiceCtrlHandlerW(SB), AX + MOVL SP, BP + CALL AX + MOVL BP, SP + CMPL AX, $0 + JE exit + MOVL AX, ·ssHandle(SB) + + MOVL ·goWaitsH(SB), AX + MOVL AX, (SP) + MOVL ·cSetEvent(SB), AX + MOVL SP, BP + CALL AX + MOVL BP, SP + + MOVL ·cWaitsH(SB), AX + MOVL AX, (SP) + MOVL $-1, AX + MOVL AX, 4(SP) + MOVL ·cWaitForSingleObject(SB), AX + MOVL SP, BP + CALL AX + MOVL BP, SP + +exit: + ADDL $12, SP + + POPL DI + POPL SI + POPL BX + POPL BP + + MOVL 0(SP), CX + ADDL $12, SP + JMP CX + +// I do not know why, but this seems to be the only way to call +// ctlHandlerProc on Windows 7. + +// func servicectlhandler(ctl uint32) uintptr +TEXT ·servicectlhandler(SB),7,$0 + MOVL ·ctlHandlerProc(SB), CX + JMP CX diff --git a/vendor/golang.org/x/sys/windows/svc/sys_amd64.s b/vendor/golang.org/x/sys/windows/svc/sys_amd64.s new file mode 100644 index 0000000..87dbec8 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/sys_amd64.s @@ -0,0 +1,41 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +// func servicemain(argc uint32, argv **uint16) +TEXT ·servicemain(SB),7,$0 + MOVL CX, ·sArgc(SB) + MOVL DX, ·sArgv(SB) + + SUBQ $32, SP // stack for the first 4 syscall params + + MOVQ ·sName(SB), CX + MOVQ $·servicectlhandler(SB), DX + MOVQ ·cRegisterServiceCtrlHandlerW(SB), AX + CALL AX + CMPQ AX, $0 + JE exit + MOVQ AX, ·ssHandle(SB) + + MOVQ ·goWaitsH(SB), CX + MOVQ ·cSetEvent(SB), AX + CALL AX + + MOVQ ·cWaitsH(SB), CX + MOVQ $4294967295, DX + MOVQ ·cWaitForSingleObject(SB), AX + CALL AX + +exit: + ADDQ $32, SP + RET + +// I do not know why, but this seems to be the only way to call +// ctlHandlerProc on Windows 7. + +// func servicectlhandler(ctl uint32) uintptr +TEXT ·servicectlhandler(SB),7,$0 + MOVQ ·ctlHandlerProc(SB), AX + JMP AX diff --git a/vendor/golang.org/x/sys/windows/syscall.go b/vendor/golang.org/x/sys/windows/syscall.go new file mode 100644 index 0000000..a8cc609 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/syscall.go @@ -0,0 +1,77 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +// Package windows contains an interface to the low-level operating system +// primitives. OS details vary depending on the underlying system, and +// by default, godoc will display the OS-specific documentation for the current +// system. If you want godoc to display syscall documentation for another +// system, set $GOOS and $GOARCH to the desired system. For example, if +// you want to view documentation for freebsd/arm on linux/amd64, set $GOOS +// to freebsd and $GOARCH to arm. +// The primary use of this package is inside other packages that provide a more +// portable interface to the system, such as "os", "time" and "net". Use +// those packages rather than this one if you can. +// For details of the functions and data types in this package consult +// the manuals for the appropriate operating system. +// These calls return err == nil to indicate success; otherwise +// err represents an operating system error describing the failure and +// holds a value of type syscall.Errno. +package windows // import "golang.org/x/sys/windows" + +import ( + "syscall" + "unsafe" +) + +// ByteSliceFromString returns a NUL-terminated slice of bytes +// containing the text of s. If s contains a NUL byte at any +// location, it returns (nil, syscall.EINVAL). +func ByteSliceFromString(s string) ([]byte, error) { + for i := 0; i < len(s); i++ { + if s[i] == 0 { + return nil, syscall.EINVAL + } + } + a := make([]byte, len(s)+1) + copy(a, s) + return a, nil +} + +// BytePtrFromString returns a pointer to a NUL-terminated array of +// bytes containing the text of s. If s contains a NUL byte at any +// location, it returns (nil, syscall.EINVAL). +func BytePtrFromString(s string) (*byte, error) { + a, err := ByteSliceFromString(s) + if err != nil { + return nil, err + } + return &a[0], nil +} + +// Single-word zero for use when we need a valid pointer to 0 bytes. +// See mksyscall.pl. +var _zero uintptr + +func (ts *Timespec) Unix() (sec int64, nsec int64) { + return int64(ts.Sec), int64(ts.Nsec) +} + +func (tv *Timeval) Unix() (sec int64, nsec int64) { + return int64(tv.Sec), int64(tv.Usec) * 1000 +} + +func (ts *Timespec) Nano() int64 { + return int64(ts.Sec)*1e9 + int64(ts.Nsec) +} + +func (tv *Timeval) Nano() int64 { + return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000 +} + +// use is a no-op, but the compiler cannot see that it is. +// Calling use(p) ensures that p is kept live until that point. +//go:noescape +func use(p unsafe.Pointer) diff --git a/vendor/golang.org/x/sys/windows/syscall_test.go b/vendor/golang.org/x/sys/windows/syscall_test.go new file mode 100644 index 0000000..62588b9 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/syscall_test.go @@ -0,0 +1,33 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package windows_test + +import ( + "testing" + + "golang.org/x/sys/windows" +) + +func testSetGetenv(t *testing.T, key, value string) { + err := windows.Setenv(key, value) + if err != nil { + t.Fatalf("Setenv failed to set %q: %v", value, err) + } + newvalue, found := windows.Getenv(key) + if !found { + t.Fatalf("Getenv failed to find %v variable (want value %q)", key, value) + } + if newvalue != value { + t.Fatalf("Getenv(%v) = %q; want %q", key, newvalue, value) + } +} + +func TestEnv(t *testing.T) { + testSetGetenv(t, "TESTENV", "AVALUE") + // make sure TESTENV gets set to "", not deleted + testSetGetenv(t, "TESTENV", "") +} diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go new file mode 100644 index 0000000..441c193 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -0,0 +1,986 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Windows system calls. + +package windows + +import ( + errorspkg "errors" + "sync" + "syscall" + "unicode/utf16" + "unsafe" +) + +//go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go + +type Handle uintptr + +const InvalidHandle = ^Handle(0) + +// StringToUTF16 is deprecated. Use UTF16FromString instead. +// If s contains a NUL byte this function panics instead of +// returning an error. +func StringToUTF16(s string) []uint16 { + a, err := UTF16FromString(s) + if err != nil { + panic("windows: string with NUL passed to StringToUTF16") + } + return a +} + +// UTF16FromString returns the UTF-16 encoding of the UTF-8 string +// s, with a terminating NUL added. If s contains a NUL byte at any +// location, it returns (nil, syscall.EINVAL). +func UTF16FromString(s string) ([]uint16, error) { + for i := 0; i < len(s); i++ { + if s[i] == 0 { + return nil, syscall.EINVAL + } + } + return utf16.Encode([]rune(s + "\x00")), nil +} + +// UTF16ToString returns the UTF-8 encoding of the UTF-16 sequence s, +// with a terminating NUL removed. +func UTF16ToString(s []uint16) string { + for i, v := range s { + if v == 0 { + s = s[0:i] + break + } + } + return string(utf16.Decode(s)) +} + +// StringToUTF16Ptr is deprecated. Use UTF16PtrFromString instead. +// If s contains a NUL byte this function panics instead of +// returning an error. +func StringToUTF16Ptr(s string) *uint16 { return &StringToUTF16(s)[0] } + +// UTF16PtrFromString returns pointer to the UTF-16 encoding of +// the UTF-8 string s, with a terminating NUL added. If s +// contains a NUL byte at any location, it returns (nil, syscall.EINVAL). +func UTF16PtrFromString(s string) (*uint16, error) { + a, err := UTF16FromString(s) + if err != nil { + return nil, err + } + return &a[0], nil +} + +func Getpagesize() int { return 4096 } + +// Converts a Go function to a function pointer conforming +// to the stdcall or cdecl calling convention. This is useful when +// interoperating with Windows code requiring callbacks. +// Implemented in runtime/syscall_windows.goc +func NewCallback(fn interface{}) uintptr +func NewCallbackCDecl(fn interface{}) uintptr + +// windows api calls + +//sys GetLastError() (lasterr error) +//sys LoadLibrary(libname string) (handle Handle, err error) = LoadLibraryW +//sys FreeLibrary(handle Handle) (err error) +//sys GetProcAddress(module Handle, procname string) (proc uintptr, err error) +//sys GetVersion() (ver uint32, err error) +//sys FormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, buf []uint16, args *byte) (n uint32, err error) = FormatMessageW +//sys ExitProcess(exitcode uint32) +//sys CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile int32) (handle Handle, err error) [failretval==InvalidHandle] = CreateFileW +//sys ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) +//sys WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) +//sys SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) [failretval==0xffffffff] +//sys CloseHandle(handle Handle) (err error) +//sys GetStdHandle(stdhandle int) (handle Handle, err error) [failretval==InvalidHandle] +//sys findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err error) [failretval==InvalidHandle] = FindFirstFileW +//sys findNextFile1(handle Handle, data *win32finddata1) (err error) = FindNextFileW +//sys FindClose(handle Handle) (err error) +//sys GetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (err error) +//sys GetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) = GetCurrentDirectoryW +//sys SetCurrentDirectory(path *uint16) (err error) = SetCurrentDirectoryW +//sys CreateDirectory(path *uint16, sa *SecurityAttributes) (err error) = CreateDirectoryW +//sys RemoveDirectory(path *uint16) (err error) = RemoveDirectoryW +//sys DeleteFile(path *uint16) (err error) = DeleteFileW +//sys MoveFile(from *uint16, to *uint16) (err error) = MoveFileW +//sys GetComputerName(buf *uint16, n *uint32) (err error) = GetComputerNameW +//sys GetComputerNameEx(nametype uint32, buf *uint16, n *uint32) (err error) = GetComputerNameExW +//sys SetEndOfFile(handle Handle) (err error) +//sys GetSystemTimeAsFileTime(time *Filetime) +//sys GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) [failretval==0xffffffff] +//sys CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uint32, threadcnt uint32) (handle Handle, err error) +//sys GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uint32, overlapped **Overlapped, timeout uint32) (err error) +//sys PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uint32, overlapped *Overlapped) (err error) +//sys CancelIo(s Handle) (err error) +//sys CancelIoEx(s Handle, o *Overlapped) (err error) +//sys CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) = CreateProcessW +//sys OpenProcess(da uint32, inheritHandle bool, pid uint32) (handle Handle, err error) +//sys TerminateProcess(handle Handle, exitcode uint32) (err error) +//sys GetExitCodeProcess(handle Handle, exitcode *uint32) (err error) +//sys GetStartupInfo(startupInfo *StartupInfo) (err error) = GetStartupInfoW +//sys GetCurrentProcess() (pseudoHandle Handle, err error) +//sys GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, kernelTime *Filetime, userTime *Filetime) (err error) +//sys DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetProcessHandle Handle, lpTargetHandle *Handle, dwDesiredAccess uint32, bInheritHandle bool, dwOptions uint32) (err error) +//sys WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32, err error) [failretval==0xffffffff] +//sys GetTempPath(buflen uint32, buf *uint16) (n uint32, err error) = GetTempPathW +//sys CreatePipe(readhandle *Handle, writehandle *Handle, sa *SecurityAttributes, size uint32) (err error) +//sys GetFileType(filehandle Handle) (n uint32, err error) +//sys CryptAcquireContext(provhandle *Handle, container *uint16, provider *uint16, provtype uint32, flags uint32) (err error) = advapi32.CryptAcquireContextW +//sys CryptReleaseContext(provhandle Handle, flags uint32) (err error) = advapi32.CryptReleaseContext +//sys CryptGenRandom(provhandle Handle, buflen uint32, buf *byte) (err error) = advapi32.CryptGenRandom +//sys GetEnvironmentStrings() (envs *uint16, err error) [failretval==nil] = kernel32.GetEnvironmentStringsW +//sys FreeEnvironmentStrings(envs *uint16) (err error) = kernel32.FreeEnvironmentStringsW +//sys GetEnvironmentVariable(name *uint16, buffer *uint16, size uint32) (n uint32, err error) = kernel32.GetEnvironmentVariableW +//sys SetEnvironmentVariable(name *uint16, value *uint16) (err error) = kernel32.SetEnvironmentVariableW +//sys SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) +//sys GetFileAttributes(name *uint16) (attrs uint32, err error) [failretval==INVALID_FILE_ATTRIBUTES] = kernel32.GetFileAttributesW +//sys SetFileAttributes(name *uint16, attrs uint32) (err error) = kernel32.SetFileAttributesW +//sys GetFileAttributesEx(name *uint16, level uint32, info *byte) (err error) = kernel32.GetFileAttributesExW +//sys GetCommandLine() (cmd *uint16) = kernel32.GetCommandLineW +//sys CommandLineToArgv(cmd *uint16, argc *int32) (argv *[8192]*[8192]uint16, err error) [failretval==nil] = shell32.CommandLineToArgvW +//sys LocalFree(hmem Handle) (handle Handle, err error) [failretval!=0] +//sys SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error) +//sys FlushFileBuffers(handle Handle) (err error) +//sys GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (n uint32, err error) = kernel32.GetFullPathNameW +//sys GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err error) = kernel32.GetLongPathNameW +//sys GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uint32, err error) = kernel32.GetShortPathNameW +//sys CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) = kernel32.CreateFileMappingW +//sys MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow uint32, length uintptr) (addr uintptr, err error) +//sys UnmapViewOfFile(addr uintptr) (err error) +//sys FlushViewOfFile(addr uintptr, length uintptr) (err error) +//sys VirtualLock(addr uintptr, length uintptr) (err error) +//sys VirtualUnlock(addr uintptr, length uintptr) (err error) +//sys TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint32, overlapped *Overlapped, transmitFileBuf *TransmitFileBuffers, flags uint32) (err error) = mswsock.TransmitFile +//sys ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree bool, mask uint32, retlen *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) = kernel32.ReadDirectoryChangesW +//sys CertOpenSystemStore(hprov Handle, name *uint16) (store Handle, err error) = crypt32.CertOpenSystemStoreW +//sys CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) [failretval==InvalidHandle] = crypt32.CertOpenStore +//sys CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (context *CertContext, err error) [failretval==nil] = crypt32.CertEnumCertificatesInStore +//sys CertAddCertificateContextToStore(store Handle, certContext *CertContext, addDisposition uint32, storeContext **CertContext) (err error) = crypt32.CertAddCertificateContextToStore +//sys CertCloseStore(store Handle, flags uint32) (err error) = crypt32.CertCloseStore +//sys CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, additionalStore Handle, para *CertChainPara, flags uint32, reserved uintptr, chainCtx **CertChainContext) (err error) = crypt32.CertGetCertificateChain +//sys CertFreeCertificateChain(ctx *CertChainContext) = crypt32.CertFreeCertificateChain +//sys CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, encodedLen uint32) (context *CertContext, err error) [failretval==nil] = crypt32.CertCreateCertificateContext +//sys CertFreeCertificateContext(ctx *CertContext) (err error) = crypt32.CertFreeCertificateContext +//sys CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) = crypt32.CertVerifyCertificateChainPolicy +//sys RegOpenKeyEx(key Handle, subkey *uint16, options uint32, desiredAccess uint32, result *Handle) (regerrno error) = advapi32.RegOpenKeyExW +//sys RegCloseKey(key Handle) (regerrno error) = advapi32.RegCloseKey +//sys RegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint32, subkeysLen *uint32, maxSubkeyLen *uint32, maxClassLen *uint32, valuesLen *uint32, maxValueNameLen *uint32, maxValueLen *uint32, saLen *uint32, lastWriteTime *Filetime) (regerrno error) = advapi32.RegQueryInfoKeyW +//sys RegEnumKeyEx(key Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, classLen *uint32, lastWriteTime *Filetime) (regerrno error) = advapi32.RegEnumKeyExW +//sys RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) = advapi32.RegQueryValueExW +//sys getCurrentProcessId() (pid uint32) = kernel32.GetCurrentProcessId +//sys GetConsoleMode(console Handle, mode *uint32) (err error) = kernel32.GetConsoleMode +//sys WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) = kernel32.WriteConsoleW +//sys ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) = kernel32.ReadConsoleW +//sys CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.CreateToolhelp32Snapshot +//sys Process32First(snapshot Handle, procEntry *ProcessEntry32) (err error) = kernel32.Process32FirstW +//sys Process32Next(snapshot Handle, procEntry *ProcessEntry32) (err error) = kernel32.Process32NextW +//sys DeviceIoControl(handle Handle, ioControlCode uint32, inBuffer *byte, inBufferSize uint32, outBuffer *byte, outBufferSize uint32, bytesReturned *uint32, overlapped *Overlapped) (err error) +// This function returns 1 byte BOOLEAN rather than the 4 byte BOOL. +//sys CreateSymbolicLink(symlinkfilename *uint16, targetfilename *uint16, flags uint32) (err error) [failretval&0xff==0] = CreateSymbolicLinkW +//sys CreateHardLink(filename *uint16, existingfilename *uint16, reserved uintptr) (err error) [failretval&0xff==0] = CreateHardLinkW +//sys GetCurrentThreadId() (id uint32) +//sys CreateEvent(eventAttrs *syscall.SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) = kernel32.CreateEventW +//sys SetEvent(event Handle) (err error) = kernel32.SetEvent + +// syscall interface implementation for other packages + +func Exit(code int) { ExitProcess(uint32(code)) } + +func makeInheritSa() *SecurityAttributes { + var sa SecurityAttributes + sa.Length = uint32(unsafe.Sizeof(sa)) + sa.InheritHandle = 1 + return &sa +} + +func Open(path string, mode int, perm uint32) (fd Handle, err error) { + if len(path) == 0 { + return InvalidHandle, ERROR_FILE_NOT_FOUND + } + pathp, err := UTF16PtrFromString(path) + if err != nil { + return InvalidHandle, err + } + var access uint32 + switch mode & (O_RDONLY | O_WRONLY | O_RDWR) { + case O_RDONLY: + access = GENERIC_READ + case O_WRONLY: + access = GENERIC_WRITE + case O_RDWR: + access = GENERIC_READ | GENERIC_WRITE + } + if mode&O_CREAT != 0 { + access |= GENERIC_WRITE + } + if mode&O_APPEND != 0 { + access &^= GENERIC_WRITE + access |= FILE_APPEND_DATA + } + sharemode := uint32(FILE_SHARE_READ | FILE_SHARE_WRITE) + var sa *SecurityAttributes + if mode&O_CLOEXEC == 0 { + sa = makeInheritSa() + } + var createmode uint32 + switch { + case mode&(O_CREAT|O_EXCL) == (O_CREAT | O_EXCL): + createmode = CREATE_NEW + case mode&(O_CREAT|O_TRUNC) == (O_CREAT | O_TRUNC): + createmode = CREATE_ALWAYS + case mode&O_CREAT == O_CREAT: + createmode = OPEN_ALWAYS + case mode&O_TRUNC == O_TRUNC: + createmode = TRUNCATE_EXISTING + default: + createmode = OPEN_EXISTING + } + h, e := CreateFile(pathp, access, sharemode, sa, createmode, FILE_ATTRIBUTE_NORMAL, 0) + return h, e +} + +func Read(fd Handle, p []byte) (n int, err error) { + var done uint32 + e := ReadFile(fd, p, &done, nil) + if e != nil { + if e == ERROR_BROKEN_PIPE { + // NOTE(brainman): work around ERROR_BROKEN_PIPE is returned on reading EOF from stdin + return 0, nil + } + return 0, e + } + if raceenabled { + if done > 0 { + raceWriteRange(unsafe.Pointer(&p[0]), int(done)) + } + raceAcquire(unsafe.Pointer(&ioSync)) + } + return int(done), nil +} + +func Write(fd Handle, p []byte) (n int, err error) { + if raceenabled { + raceReleaseMerge(unsafe.Pointer(&ioSync)) + } + var done uint32 + e := WriteFile(fd, p, &done, nil) + if e != nil { + return 0, e + } + if raceenabled && done > 0 { + raceReadRange(unsafe.Pointer(&p[0]), int(done)) + } + return int(done), nil +} + +var ioSync int64 + +func Seek(fd Handle, offset int64, whence int) (newoffset int64, err error) { + var w uint32 + switch whence { + case 0: + w = FILE_BEGIN + case 1: + w = FILE_CURRENT + case 2: + w = FILE_END + } + hi := int32(offset >> 32) + lo := int32(offset) + // use GetFileType to check pipe, pipe can't do seek + ft, _ := GetFileType(fd) + if ft == FILE_TYPE_PIPE { + return 0, syscall.EPIPE + } + rlo, e := SetFilePointer(fd, lo, &hi, w) + if e != nil { + return 0, e + } + return int64(hi)<<32 + int64(rlo), nil +} + +func Close(fd Handle) (err error) { + return CloseHandle(fd) +} + +var ( + Stdin = getStdHandle(STD_INPUT_HANDLE) + Stdout = getStdHandle(STD_OUTPUT_HANDLE) + Stderr = getStdHandle(STD_ERROR_HANDLE) +) + +func getStdHandle(h int) (fd Handle) { + r, _ := GetStdHandle(h) + CloseOnExec(r) + return r +} + +const ImplementsGetwd = true + +func Getwd() (wd string, err error) { + b := make([]uint16, 300) + n, e := GetCurrentDirectory(uint32(len(b)), &b[0]) + if e != nil { + return "", e + } + return string(utf16.Decode(b[0:n])), nil +} + +func Chdir(path string) (err error) { + pathp, err := UTF16PtrFromString(path) + if err != nil { + return err + } + return SetCurrentDirectory(pathp) +} + +func Mkdir(path string, mode uint32) (err error) { + pathp, err := UTF16PtrFromString(path) + if err != nil { + return err + } + return CreateDirectory(pathp, nil) +} + +func Rmdir(path string) (err error) { + pathp, err := UTF16PtrFromString(path) + if err != nil { + return err + } + return RemoveDirectory(pathp) +} + +func Unlink(path string) (err error) { + pathp, err := UTF16PtrFromString(path) + if err != nil { + return err + } + return DeleteFile(pathp) +} + +func Rename(oldpath, newpath string) (err error) { + from, err := UTF16PtrFromString(oldpath) + if err != nil { + return err + } + to, err := UTF16PtrFromString(newpath) + if err != nil { + return err + } + return MoveFile(from, to) +} + +func ComputerName() (name string, err error) { + var n uint32 = MAX_COMPUTERNAME_LENGTH + 1 + b := make([]uint16, n) + e := GetComputerName(&b[0], &n) + if e != nil { + return "", e + } + return string(utf16.Decode(b[0:n])), nil +} + +func Ftruncate(fd Handle, length int64) (err error) { + curoffset, e := Seek(fd, 0, 1) + if e != nil { + return e + } + defer Seek(fd, curoffset, 0) + _, e = Seek(fd, length, 0) + if e != nil { + return e + } + e = SetEndOfFile(fd) + if e != nil { + return e + } + return nil +} + +func Gettimeofday(tv *Timeval) (err error) { + var ft Filetime + GetSystemTimeAsFileTime(&ft) + *tv = NsecToTimeval(ft.Nanoseconds()) + return nil +} + +func Pipe(p []Handle) (err error) { + if len(p) != 2 { + return syscall.EINVAL + } + var r, w Handle + e := CreatePipe(&r, &w, makeInheritSa(), 0) + if e != nil { + return e + } + p[0] = r + p[1] = w + return nil +} + +func Utimes(path string, tv []Timeval) (err error) { + if len(tv) != 2 { + return syscall.EINVAL + } + pathp, e := UTF16PtrFromString(path) + if e != nil { + return e + } + h, e := CreateFile(pathp, + FILE_WRITE_ATTRIBUTES, FILE_SHARE_WRITE, nil, + OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0) + if e != nil { + return e + } + defer Close(h) + a := NsecToFiletime(tv[0].Nanoseconds()) + w := NsecToFiletime(tv[1].Nanoseconds()) + return SetFileTime(h, nil, &a, &w) +} + +func UtimesNano(path string, ts []Timespec) (err error) { + if len(ts) != 2 { + return syscall.EINVAL + } + pathp, e := UTF16PtrFromString(path) + if e != nil { + return e + } + h, e := CreateFile(pathp, + FILE_WRITE_ATTRIBUTES, FILE_SHARE_WRITE, nil, + OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0) + if e != nil { + return e + } + defer Close(h) + a := NsecToFiletime(TimespecToNsec(ts[0])) + w := NsecToFiletime(TimespecToNsec(ts[1])) + return SetFileTime(h, nil, &a, &w) +} + +func Fsync(fd Handle) (err error) { + return FlushFileBuffers(fd) +} + +func Chmod(path string, mode uint32) (err error) { + if mode == 0 { + return syscall.EINVAL + } + p, e := UTF16PtrFromString(path) + if e != nil { + return e + } + attrs, e := GetFileAttributes(p) + if e != nil { + return e + } + if mode&S_IWRITE != 0 { + attrs &^= FILE_ATTRIBUTE_READONLY + } else { + attrs |= FILE_ATTRIBUTE_READONLY + } + return SetFileAttributes(p, attrs) +} + +func LoadCancelIoEx() error { + return procCancelIoEx.Find() +} + +func LoadSetFileCompletionNotificationModes() error { + return procSetFileCompletionNotificationModes.Find() +} + +// net api calls + +const socket_error = uintptr(^uint32(0)) + +//sys WSAStartup(verreq uint32, data *WSAData) (sockerr error) = ws2_32.WSAStartup +//sys WSACleanup() (err error) [failretval==socket_error] = ws2_32.WSACleanup +//sys WSAIoctl(s Handle, iocc uint32, inbuf *byte, cbif uint32, outbuf *byte, cbob uint32, cbbr *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) [failretval==socket_error] = ws2_32.WSAIoctl +//sys socket(af int32, typ int32, protocol int32) (handle Handle, err error) [failretval==InvalidHandle] = ws2_32.socket +//sys Setsockopt(s Handle, level int32, optname int32, optval *byte, optlen int32) (err error) [failretval==socket_error] = ws2_32.setsockopt +//sys Getsockopt(s Handle, level int32, optname int32, optval *byte, optlen *int32) (err error) [failretval==socket_error] = ws2_32.getsockopt +//sys bind(s Handle, name unsafe.Pointer, namelen int32) (err error) [failretval==socket_error] = ws2_32.bind +//sys connect(s Handle, name unsafe.Pointer, namelen int32) (err error) [failretval==socket_error] = ws2_32.connect +//sys getsockname(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) [failretval==socket_error] = ws2_32.getsockname +//sys getpeername(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) [failretval==socket_error] = ws2_32.getpeername +//sys listen(s Handle, backlog int32) (err error) [failretval==socket_error] = ws2_32.listen +//sys shutdown(s Handle, how int32) (err error) [failretval==socket_error] = ws2_32.shutdown +//sys Closesocket(s Handle) (err error) [failretval==socket_error] = ws2_32.closesocket +//sys AcceptEx(ls Handle, as Handle, buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, recvd *uint32, overlapped *Overlapped) (err error) = mswsock.AcceptEx +//sys GetAcceptExSockaddrs(buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, lrsa **RawSockaddrAny, lrsalen *int32, rrsa **RawSockaddrAny, rrsalen *int32) = mswsock.GetAcceptExSockaddrs +//sys WSARecv(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSARecv +//sys WSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSASend +//sys WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, from *RawSockaddrAny, fromlen *int32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSARecvFrom +//sys WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *RawSockaddrAny, tolen int32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSASendTo +//sys GetHostByName(name string) (h *Hostent, err error) [failretval==nil] = ws2_32.gethostbyname +//sys GetServByName(name string, proto string) (s *Servent, err error) [failretval==nil] = ws2_32.getservbyname +//sys Ntohs(netshort uint16) (u uint16) = ws2_32.ntohs +//sys GetProtoByName(name string) (p *Protoent, err error) [failretval==nil] = ws2_32.getprotobyname +//sys DnsQuery(name string, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) = dnsapi.DnsQuery_W +//sys DnsRecordListFree(rl *DNSRecord, freetype uint32) = dnsapi.DnsRecordListFree +//sys DnsNameCompare(name1 *uint16, name2 *uint16) (same bool) = dnsapi.DnsNameCompare_W +//sys GetAddrInfoW(nodename *uint16, servicename *uint16, hints *AddrinfoW, result **AddrinfoW) (sockerr error) = ws2_32.GetAddrInfoW +//sys FreeAddrInfoW(addrinfo *AddrinfoW) = ws2_32.FreeAddrInfoW +//sys GetIfEntry(pIfRow *MibIfRow) (errcode error) = iphlpapi.GetIfEntry +//sys GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) = iphlpapi.GetAdaptersInfo +//sys SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error) = kernel32.SetFileCompletionNotificationModes +//sys WSAEnumProtocols(protocols *int32, protocolBuffer *WSAProtocolInfo, bufferLength *uint32) (n int32, err error) [failretval==-1] = ws2_32.WSAEnumProtocolsW + +// For testing: clients can set this flag to force +// creation of IPv6 sockets to return EAFNOSUPPORT. +var SocketDisableIPv6 bool + +type RawSockaddrInet4 struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]uint8 +} + +type RawSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddr struct { + Family uint16 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [96]int8 +} + +type Sockaddr interface { + sockaddr() (ptr unsafe.Pointer, len int32, err error) // lowercase; only we can define Sockaddrs +} + +type SockaddrInet4 struct { + Port int + Addr [4]byte + raw RawSockaddrInet4 +} + +func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, int32, error) { + if sa.Port < 0 || sa.Port > 0xFFFF { + return nil, 0, syscall.EINVAL + } + sa.raw.Family = AF_INET + p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) + p[0] = byte(sa.Port >> 8) + p[1] = byte(sa.Port) + for i := 0; i < len(sa.Addr); i++ { + sa.raw.Addr[i] = sa.Addr[i] + } + return unsafe.Pointer(&sa.raw), int32(unsafe.Sizeof(sa.raw)), nil +} + +type SockaddrInet6 struct { + Port int + ZoneId uint32 + Addr [16]byte + raw RawSockaddrInet6 +} + +func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, int32, error) { + if sa.Port < 0 || sa.Port > 0xFFFF { + return nil, 0, syscall.EINVAL + } + sa.raw.Family = AF_INET6 + p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) + p[0] = byte(sa.Port >> 8) + p[1] = byte(sa.Port) + sa.raw.Scope_id = sa.ZoneId + for i := 0; i < len(sa.Addr); i++ { + sa.raw.Addr[i] = sa.Addr[i] + } + return unsafe.Pointer(&sa.raw), int32(unsafe.Sizeof(sa.raw)), nil +} + +type SockaddrUnix struct { + Name string +} + +func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, int32, error) { + // TODO(brainman): implement SockaddrUnix.sockaddr() + return nil, 0, syscall.EWINDOWS +} + +func (rsa *RawSockaddrAny) Sockaddr() (Sockaddr, error) { + switch rsa.Addr.Family { + case AF_UNIX: + return nil, syscall.EWINDOWS + + case AF_INET: + pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa)) + sa := new(SockaddrInet4) + p := (*[2]byte)(unsafe.Pointer(&pp.Port)) + sa.Port = int(p[0])<<8 + int(p[1]) + for i := 0; i < len(sa.Addr); i++ { + sa.Addr[i] = pp.Addr[i] + } + return sa, nil + + case AF_INET6: + pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa)) + sa := new(SockaddrInet6) + p := (*[2]byte)(unsafe.Pointer(&pp.Port)) + sa.Port = int(p[0])<<8 + int(p[1]) + sa.ZoneId = pp.Scope_id + for i := 0; i < len(sa.Addr); i++ { + sa.Addr[i] = pp.Addr[i] + } + return sa, nil + } + return nil, syscall.EAFNOSUPPORT +} + +func Socket(domain, typ, proto int) (fd Handle, err error) { + if domain == AF_INET6 && SocketDisableIPv6 { + return InvalidHandle, syscall.EAFNOSUPPORT + } + return socket(int32(domain), int32(typ), int32(proto)) +} + +func SetsockoptInt(fd Handle, level, opt int, value int) (err error) { + v := int32(value) + return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&v)), int32(unsafe.Sizeof(v))) +} + +func Bind(fd Handle, sa Sockaddr) (err error) { + ptr, n, err := sa.sockaddr() + if err != nil { + return err + } + return bind(fd, ptr, n) +} + +func Connect(fd Handle, sa Sockaddr) (err error) { + ptr, n, err := sa.sockaddr() + if err != nil { + return err + } + return connect(fd, ptr, n) +} + +func Getsockname(fd Handle) (sa Sockaddr, err error) { + var rsa RawSockaddrAny + l := int32(unsafe.Sizeof(rsa)) + if err = getsockname(fd, &rsa, &l); err != nil { + return + } + return rsa.Sockaddr() +} + +func Getpeername(fd Handle) (sa Sockaddr, err error) { + var rsa RawSockaddrAny + l := int32(unsafe.Sizeof(rsa)) + if err = getpeername(fd, &rsa, &l); err != nil { + return + } + return rsa.Sockaddr() +} + +func Listen(s Handle, n int) (err error) { + return listen(s, int32(n)) +} + +func Shutdown(fd Handle, how int) (err error) { + return shutdown(fd, int32(how)) +} + +func WSASendto(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to Sockaddr, overlapped *Overlapped, croutine *byte) (err error) { + rsa, l, err := to.sockaddr() + if err != nil { + return err + } + return WSASendTo(s, bufs, bufcnt, sent, flags, (*RawSockaddrAny)(unsafe.Pointer(rsa)), l, overlapped, croutine) +} + +func LoadGetAddrInfo() error { + return procGetAddrInfoW.Find() +} + +var connectExFunc struct { + once sync.Once + addr uintptr + err error +} + +func LoadConnectEx() error { + connectExFunc.once.Do(func() { + var s Handle + s, connectExFunc.err = Socket(AF_INET, SOCK_STREAM, IPPROTO_TCP) + if connectExFunc.err != nil { + return + } + defer CloseHandle(s) + var n uint32 + connectExFunc.err = WSAIoctl(s, + SIO_GET_EXTENSION_FUNCTION_POINTER, + (*byte)(unsafe.Pointer(&WSAID_CONNECTEX)), + uint32(unsafe.Sizeof(WSAID_CONNECTEX)), + (*byte)(unsafe.Pointer(&connectExFunc.addr)), + uint32(unsafe.Sizeof(connectExFunc.addr)), + &n, nil, 0) + }) + return connectExFunc.err +} + +func connectEx(s Handle, name unsafe.Pointer, namelen int32, sendBuf *byte, sendDataLen uint32, bytesSent *uint32, overlapped *Overlapped) (err error) { + r1, _, e1 := syscall.Syscall9(connectExFunc.addr, 7, uintptr(s), uintptr(name), uintptr(namelen), uintptr(unsafe.Pointer(sendBuf)), uintptr(sendDataLen), uintptr(unsafe.Pointer(bytesSent)), uintptr(unsafe.Pointer(overlapped)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func ConnectEx(fd Handle, sa Sockaddr, sendBuf *byte, sendDataLen uint32, bytesSent *uint32, overlapped *Overlapped) error { + err := LoadConnectEx() + if err != nil { + return errorspkg.New("failed to find ConnectEx: " + err.Error()) + } + ptr, n, err := sa.sockaddr() + if err != nil { + return err + } + return connectEx(fd, ptr, n, sendBuf, sendDataLen, bytesSent, overlapped) +} + +// Invented structures to support what package os expects. +type Rusage struct { + CreationTime Filetime + ExitTime Filetime + KernelTime Filetime + UserTime Filetime +} + +type WaitStatus struct { + ExitCode uint32 +} + +func (w WaitStatus) Exited() bool { return true } + +func (w WaitStatus) ExitStatus() int { return int(w.ExitCode) } + +func (w WaitStatus) Signal() Signal { return -1 } + +func (w WaitStatus) CoreDump() bool { return false } + +func (w WaitStatus) Stopped() bool { return false } + +func (w WaitStatus) Continued() bool { return false } + +func (w WaitStatus) StopSignal() Signal { return -1 } + +func (w WaitStatus) Signaled() bool { return false } + +func (w WaitStatus) TrapCause() int { return -1 } + +// Timespec is an invented structure on Windows, but here for +// consistency with the corresponding package for other operating systems. +type Timespec struct { + Sec int64 + Nsec int64 +} + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = nsec / 1e9 + ts.Nsec = nsec % 1e9 + return +} + +// TODO(brainman): fix all needed for net + +func Accept(fd Handle) (nfd Handle, sa Sockaddr, err error) { return 0, nil, syscall.EWINDOWS } +func Recvfrom(fd Handle, p []byte, flags int) (n int, from Sockaddr, err error) { + return 0, nil, syscall.EWINDOWS +} +func Sendto(fd Handle, p []byte, flags int, to Sockaddr) (err error) { return syscall.EWINDOWS } +func SetsockoptTimeval(fd Handle, level, opt int, tv *Timeval) (err error) { return syscall.EWINDOWS } + +// The Linger struct is wrong but we only noticed after Go 1. +// sysLinger is the real system call structure. + +// BUG(brainman): The definition of Linger is not appropriate for direct use +// with Setsockopt and Getsockopt. +// Use SetsockoptLinger instead. + +type Linger struct { + Onoff int32 + Linger int32 +} + +type sysLinger struct { + Onoff uint16 + Linger uint16 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +func GetsockoptInt(fd Handle, level, opt int) (int, error) { return -1, syscall.EWINDOWS } + +func SetsockoptLinger(fd Handle, level, opt int, l *Linger) (err error) { + sys := sysLinger{Onoff: uint16(l.Onoff), Linger: uint16(l.Linger)} + return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&sys)), int32(unsafe.Sizeof(sys))) +} + +func SetsockoptInet4Addr(fd Handle, level, opt int, value [4]byte) (err error) { + return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&value[0])), 4) +} +func SetsockoptIPMreq(fd Handle, level, opt int, mreq *IPMreq) (err error) { + return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(mreq)), int32(unsafe.Sizeof(*mreq))) +} +func SetsockoptIPv6Mreq(fd Handle, level, opt int, mreq *IPv6Mreq) (err error) { + return syscall.EWINDOWS +} + +func Getpid() (pid int) { return int(getCurrentProcessId()) } + +func FindFirstFile(name *uint16, data *Win32finddata) (handle Handle, err error) { + // NOTE(rsc): The Win32finddata struct is wrong for the system call: + // the two paths are each one uint16 short. Use the correct struct, + // a win32finddata1, and then copy the results out. + // There is no loss of expressivity here, because the final + // uint16, if it is used, is supposed to be a NUL, and Go doesn't need that. + // For Go 1.1, we might avoid the allocation of win32finddata1 here + // by adding a final Bug [2]uint16 field to the struct and then + // adjusting the fields in the result directly. + var data1 win32finddata1 + handle, err = findFirstFile1(name, &data1) + if err == nil { + copyFindData(data, &data1) + } + return +} + +func FindNextFile(handle Handle, data *Win32finddata) (err error) { + var data1 win32finddata1 + err = findNextFile1(handle, &data1) + if err == nil { + copyFindData(data, &data1) + } + return +} + +func getProcessEntry(pid int) (*ProcessEntry32, error) { + snapshot, err := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0) + if err != nil { + return nil, err + } + defer CloseHandle(snapshot) + var procEntry ProcessEntry32 + procEntry.Size = uint32(unsafe.Sizeof(procEntry)) + if err = Process32First(snapshot, &procEntry); err != nil { + return nil, err + } + for { + if procEntry.ProcessID == uint32(pid) { + return &procEntry, nil + } + err = Process32Next(snapshot, &procEntry) + if err != nil { + return nil, err + } + } +} + +func Getppid() (ppid int) { + pe, err := getProcessEntry(Getpid()) + if err != nil { + return -1 + } + return int(pe.ParentProcessID) +} + +// TODO(brainman): fix all needed for os +func Fchdir(fd Handle) (err error) { return syscall.EWINDOWS } +func Link(oldpath, newpath string) (err error) { return syscall.EWINDOWS } +func Symlink(path, link string) (err error) { return syscall.EWINDOWS } + +func Fchmod(fd Handle, mode uint32) (err error) { return syscall.EWINDOWS } +func Chown(path string, uid int, gid int) (err error) { return syscall.EWINDOWS } +func Lchown(path string, uid int, gid int) (err error) { return syscall.EWINDOWS } +func Fchown(fd Handle, uid int, gid int) (err error) { return syscall.EWINDOWS } + +func Getuid() (uid int) { return -1 } +func Geteuid() (euid int) { return -1 } +func Getgid() (gid int) { return -1 } +func Getegid() (egid int) { return -1 } +func Getgroups() (gids []int, err error) { return nil, syscall.EWINDOWS } + +type Signal int + +func (s Signal) Signal() {} + +func (s Signal) String() string { + if 0 <= s && int(s) < len(signals) { + str := signals[s] + if str != "" { + return str + } + } + return "signal " + itoa(int(s)) +} + +func LoadCreateSymbolicLink() error { + return procCreateSymbolicLinkW.Find() +} + +// Readlink returns the destination of the named symbolic link. +func Readlink(path string, buf []byte) (n int, err error) { + fd, err := CreateFile(StringToUTF16Ptr(path), GENERIC_READ, 0, nil, OPEN_EXISTING, + FILE_FLAG_OPEN_REPARSE_POINT|FILE_FLAG_BACKUP_SEMANTICS, 0) + if err != nil { + return -1, err + } + defer CloseHandle(fd) + + rdbbuf := make([]byte, MAXIMUM_REPARSE_DATA_BUFFER_SIZE) + var bytesReturned uint32 + err = DeviceIoControl(fd, FSCTL_GET_REPARSE_POINT, nil, 0, &rdbbuf[0], uint32(len(rdbbuf)), &bytesReturned, nil) + if err != nil { + return -1, err + } + + rdb := (*reparseDataBuffer)(unsafe.Pointer(&rdbbuf[0])) + var s string + switch rdb.ReparseTag { + case IO_REPARSE_TAG_SYMLINK: + data := (*symbolicLinkReparseBuffer)(unsafe.Pointer(&rdb.reparseBuffer)) + p := (*[0xffff]uint16)(unsafe.Pointer(&data.PathBuffer[0])) + s = UTF16ToString(p[data.PrintNameOffset/2 : (data.PrintNameLength-data.PrintNameOffset)/2]) + case IO_REPARSE_TAG_MOUNT_POINT: + data := (*mountPointReparseBuffer)(unsafe.Pointer(&rdb.reparseBuffer)) + p := (*[0xffff]uint16)(unsafe.Pointer(&data.PathBuffer[0])) + s = UTF16ToString(p[data.PrintNameOffset/2 : (data.PrintNameLength-data.PrintNameOffset)/2]) + default: + // the path is not a symlink or junction but another type of reparse + // point + return -1, syscall.ENOENT + } + n = copy(buf, []byte(s)) + + return n, nil +} diff --git a/vendor/golang.org/x/sys/windows/syscall_windows_test.go b/vendor/golang.org/x/sys/windows/syscall_windows_test.go new file mode 100644 index 0000000..0f73c11 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/syscall_windows_test.go @@ -0,0 +1,107 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package windows_test + +import ( + "io/ioutil" + "os" + "path/filepath" + "syscall" + "testing" + "unsafe" + + "golang.org/x/sys/windows" +) + +func TestWin32finddata(t *testing.T) { + dir, err := ioutil.TempDir("", "go-build") + if err != nil { + t.Fatalf("failed to create temp directory: %v", err) + } + defer os.RemoveAll(dir) + + path := filepath.Join(dir, "long_name.and_extension") + f, err := os.Create(path) + if err != nil { + t.Fatalf("failed to create %v: %v", path, err) + } + f.Close() + + type X struct { + fd windows.Win32finddata + got byte + pad [10]byte // to protect ourselves + + } + var want byte = 2 // it is unlikely to have this character in the filename + x := X{got: want} + + pathp, _ := windows.UTF16PtrFromString(path) + h, err := windows.FindFirstFile(pathp, &(x.fd)) + if err != nil { + t.Fatalf("FindFirstFile failed: %v", err) + } + err = windows.FindClose(h) + if err != nil { + t.Fatalf("FindClose failed: %v", err) + } + + if x.got != want { + t.Fatalf("memory corruption: want=%d got=%d", want, x.got) + } +} + +func TestFormatMessage(t *testing.T) { + dll := windows.MustLoadDLL("pdh.dll") + + pdhOpenQuery := func(datasrc *uint16, userdata uint32, query *windows.Handle) (errno uintptr) { + r0, _, _ := syscall.Syscall(dll.MustFindProc("PdhOpenQueryW").Addr(), 3, uintptr(unsafe.Pointer(datasrc)), uintptr(userdata), uintptr(unsafe.Pointer(query))) + return r0 + } + + pdhCloseQuery := func(query windows.Handle) (errno uintptr) { + r0, _, _ := syscall.Syscall(dll.MustFindProc("PdhCloseQuery").Addr(), 1, uintptr(query), 0, 0) + return r0 + } + + var q windows.Handle + name, err := windows.UTF16PtrFromString("no_such_source") + if err != nil { + t.Fatal(err) + } + errno := pdhOpenQuery(name, 0, &q) + if errno == 0 { + pdhCloseQuery(q) + t.Fatal("PdhOpenQuery succeeded, but expected to fail.") + } + + const flags uint32 = syscall.FORMAT_MESSAGE_FROM_HMODULE | syscall.FORMAT_MESSAGE_ARGUMENT_ARRAY | syscall.FORMAT_MESSAGE_IGNORE_INSERTS + buf := make([]uint16, 300) + _, err = windows.FormatMessage(flags, uintptr(dll.Handle), uint32(errno), 0, buf, nil) + if err != nil { + t.Fatal("FormatMessage for handle=%x and errno=%x failed: %v", dll.Handle, errno, err) + } +} + +func abort(funcname string, err error) { + panic(funcname + " failed: " + err.Error()) +} + +func ExampleLoadLibrary() { + h, err := windows.LoadLibrary("kernel32.dll") + if err != nil { + abort("LoadLibrary", err) + } + defer windows.FreeLibrary(h) + proc, err := windows.GetProcAddress(h, "GetVersion") + if err != nil { + abort("GetProcAddress", err) + } + r, _, _ := syscall.Syscall(uintptr(proc), 0, 0, 0, 0) + major := byte(r) + minor := uint8(r >> 8) + build := uint16(r >> 16) + print("windows version ", major, ".", minor, " (Build ", build, ")\n") +} diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go new file mode 100644 index 0000000..e130ddd --- /dev/null +++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -0,0 +1,2177 @@ +// MACHINE GENERATED BY 'go generate' COMMAND; DO NOT EDIT + +package windows + +import "unsafe" +import "syscall" + +var _ unsafe.Pointer + +var ( + modadvapi32 = syscall.NewLazyDLL("advapi32.dll") + modkernel32 = syscall.NewLazyDLL("kernel32.dll") + modshell32 = syscall.NewLazyDLL("shell32.dll") + modmswsock = syscall.NewLazyDLL("mswsock.dll") + modcrypt32 = syscall.NewLazyDLL("crypt32.dll") + modws2_32 = syscall.NewLazyDLL("ws2_32.dll") + moddnsapi = syscall.NewLazyDLL("dnsapi.dll") + modiphlpapi = syscall.NewLazyDLL("iphlpapi.dll") + modsecur32 = syscall.NewLazyDLL("secur32.dll") + modnetapi32 = syscall.NewLazyDLL("netapi32.dll") + moduserenv = syscall.NewLazyDLL("userenv.dll") + + procRegisterEventSourceW = modadvapi32.NewProc("RegisterEventSourceW") + procDeregisterEventSource = modadvapi32.NewProc("DeregisterEventSource") + procReportEventW = modadvapi32.NewProc("ReportEventW") + procOpenSCManagerW = modadvapi32.NewProc("OpenSCManagerW") + procCloseServiceHandle = modadvapi32.NewProc("CloseServiceHandle") + procCreateServiceW = modadvapi32.NewProc("CreateServiceW") + procOpenServiceW = modadvapi32.NewProc("OpenServiceW") + procDeleteService = modadvapi32.NewProc("DeleteService") + procStartServiceW = modadvapi32.NewProc("StartServiceW") + procQueryServiceStatus = modadvapi32.NewProc("QueryServiceStatus") + procControlService = modadvapi32.NewProc("ControlService") + procStartServiceCtrlDispatcherW = modadvapi32.NewProc("StartServiceCtrlDispatcherW") + procSetServiceStatus = modadvapi32.NewProc("SetServiceStatus") + procChangeServiceConfigW = modadvapi32.NewProc("ChangeServiceConfigW") + procQueryServiceConfigW = modadvapi32.NewProc("QueryServiceConfigW") + procChangeServiceConfig2W = modadvapi32.NewProc("ChangeServiceConfig2W") + procQueryServiceConfig2W = modadvapi32.NewProc("QueryServiceConfig2W") + procGetLastError = modkernel32.NewProc("GetLastError") + procLoadLibraryW = modkernel32.NewProc("LoadLibraryW") + procFreeLibrary = modkernel32.NewProc("FreeLibrary") + procGetProcAddress = modkernel32.NewProc("GetProcAddress") + procGetVersion = modkernel32.NewProc("GetVersion") + procFormatMessageW = modkernel32.NewProc("FormatMessageW") + procExitProcess = modkernel32.NewProc("ExitProcess") + procCreateFileW = modkernel32.NewProc("CreateFileW") + procReadFile = modkernel32.NewProc("ReadFile") + procWriteFile = modkernel32.NewProc("WriteFile") + procSetFilePointer = modkernel32.NewProc("SetFilePointer") + procCloseHandle = modkernel32.NewProc("CloseHandle") + procGetStdHandle = modkernel32.NewProc("GetStdHandle") + procFindFirstFileW = modkernel32.NewProc("FindFirstFileW") + procFindNextFileW = modkernel32.NewProc("FindNextFileW") + procFindClose = modkernel32.NewProc("FindClose") + procGetFileInformationByHandle = modkernel32.NewProc("GetFileInformationByHandle") + procGetCurrentDirectoryW = modkernel32.NewProc("GetCurrentDirectoryW") + procSetCurrentDirectoryW = modkernel32.NewProc("SetCurrentDirectoryW") + procCreateDirectoryW = modkernel32.NewProc("CreateDirectoryW") + procRemoveDirectoryW = modkernel32.NewProc("RemoveDirectoryW") + procDeleteFileW = modkernel32.NewProc("DeleteFileW") + procMoveFileW = modkernel32.NewProc("MoveFileW") + procGetComputerNameW = modkernel32.NewProc("GetComputerNameW") + procGetComputerNameExW = modkernel32.NewProc("GetComputerNameExW") + procSetEndOfFile = modkernel32.NewProc("SetEndOfFile") + procGetSystemTimeAsFileTime = modkernel32.NewProc("GetSystemTimeAsFileTime") + procGetTimeZoneInformation = modkernel32.NewProc("GetTimeZoneInformation") + procCreateIoCompletionPort = modkernel32.NewProc("CreateIoCompletionPort") + procGetQueuedCompletionStatus = modkernel32.NewProc("GetQueuedCompletionStatus") + procPostQueuedCompletionStatus = modkernel32.NewProc("PostQueuedCompletionStatus") + procCancelIo = modkernel32.NewProc("CancelIo") + procCancelIoEx = modkernel32.NewProc("CancelIoEx") + procCreateProcessW = modkernel32.NewProc("CreateProcessW") + procOpenProcess = modkernel32.NewProc("OpenProcess") + procTerminateProcess = modkernel32.NewProc("TerminateProcess") + procGetExitCodeProcess = modkernel32.NewProc("GetExitCodeProcess") + procGetStartupInfoW = modkernel32.NewProc("GetStartupInfoW") + procGetCurrentProcess = modkernel32.NewProc("GetCurrentProcess") + procGetProcessTimes = modkernel32.NewProc("GetProcessTimes") + procDuplicateHandle = modkernel32.NewProc("DuplicateHandle") + procWaitForSingleObject = modkernel32.NewProc("WaitForSingleObject") + procGetTempPathW = modkernel32.NewProc("GetTempPathW") + procCreatePipe = modkernel32.NewProc("CreatePipe") + procGetFileType = modkernel32.NewProc("GetFileType") + procCryptAcquireContextW = modadvapi32.NewProc("CryptAcquireContextW") + procCryptReleaseContext = modadvapi32.NewProc("CryptReleaseContext") + procCryptGenRandom = modadvapi32.NewProc("CryptGenRandom") + procGetEnvironmentStringsW = modkernel32.NewProc("GetEnvironmentStringsW") + procFreeEnvironmentStringsW = modkernel32.NewProc("FreeEnvironmentStringsW") + procGetEnvironmentVariableW = modkernel32.NewProc("GetEnvironmentVariableW") + procSetEnvironmentVariableW = modkernel32.NewProc("SetEnvironmentVariableW") + procSetFileTime = modkernel32.NewProc("SetFileTime") + procGetFileAttributesW = modkernel32.NewProc("GetFileAttributesW") + procSetFileAttributesW = modkernel32.NewProc("SetFileAttributesW") + procGetFileAttributesExW = modkernel32.NewProc("GetFileAttributesExW") + procGetCommandLineW = modkernel32.NewProc("GetCommandLineW") + procCommandLineToArgvW = modshell32.NewProc("CommandLineToArgvW") + procLocalFree = modkernel32.NewProc("LocalFree") + procSetHandleInformation = modkernel32.NewProc("SetHandleInformation") + procFlushFileBuffers = modkernel32.NewProc("FlushFileBuffers") + procGetFullPathNameW = modkernel32.NewProc("GetFullPathNameW") + procGetLongPathNameW = modkernel32.NewProc("GetLongPathNameW") + procGetShortPathNameW = modkernel32.NewProc("GetShortPathNameW") + procCreateFileMappingW = modkernel32.NewProc("CreateFileMappingW") + procMapViewOfFile = modkernel32.NewProc("MapViewOfFile") + procUnmapViewOfFile = modkernel32.NewProc("UnmapViewOfFile") + procFlushViewOfFile = modkernel32.NewProc("FlushViewOfFile") + procVirtualLock = modkernel32.NewProc("VirtualLock") + procVirtualUnlock = modkernel32.NewProc("VirtualUnlock") + procTransmitFile = modmswsock.NewProc("TransmitFile") + procReadDirectoryChangesW = modkernel32.NewProc("ReadDirectoryChangesW") + procCertOpenSystemStoreW = modcrypt32.NewProc("CertOpenSystemStoreW") + procCertOpenStore = modcrypt32.NewProc("CertOpenStore") + procCertEnumCertificatesInStore = modcrypt32.NewProc("CertEnumCertificatesInStore") + procCertAddCertificateContextToStore = modcrypt32.NewProc("CertAddCertificateContextToStore") + procCertCloseStore = modcrypt32.NewProc("CertCloseStore") + procCertGetCertificateChain = modcrypt32.NewProc("CertGetCertificateChain") + procCertFreeCertificateChain = modcrypt32.NewProc("CertFreeCertificateChain") + procCertCreateCertificateContext = modcrypt32.NewProc("CertCreateCertificateContext") + procCertFreeCertificateContext = modcrypt32.NewProc("CertFreeCertificateContext") + procCertVerifyCertificateChainPolicy = modcrypt32.NewProc("CertVerifyCertificateChainPolicy") + procRegOpenKeyExW = modadvapi32.NewProc("RegOpenKeyExW") + procRegCloseKey = modadvapi32.NewProc("RegCloseKey") + procRegQueryInfoKeyW = modadvapi32.NewProc("RegQueryInfoKeyW") + procRegEnumKeyExW = modadvapi32.NewProc("RegEnumKeyExW") + procRegQueryValueExW = modadvapi32.NewProc("RegQueryValueExW") + procGetCurrentProcessId = modkernel32.NewProc("GetCurrentProcessId") + procGetConsoleMode = modkernel32.NewProc("GetConsoleMode") + procWriteConsoleW = modkernel32.NewProc("WriteConsoleW") + procReadConsoleW = modkernel32.NewProc("ReadConsoleW") + procCreateToolhelp32Snapshot = modkernel32.NewProc("CreateToolhelp32Snapshot") + procProcess32FirstW = modkernel32.NewProc("Process32FirstW") + procProcess32NextW = modkernel32.NewProc("Process32NextW") + procDeviceIoControl = modkernel32.NewProc("DeviceIoControl") + procCreateSymbolicLinkW = modkernel32.NewProc("CreateSymbolicLinkW") + procCreateHardLinkW = modkernel32.NewProc("CreateHardLinkW") + procGetCurrentThreadId = modkernel32.NewProc("GetCurrentThreadId") + procCreateEventW = modkernel32.NewProc("CreateEventW") + procSetEvent = modkernel32.NewProc("SetEvent") + procWSAStartup = modws2_32.NewProc("WSAStartup") + procWSACleanup = modws2_32.NewProc("WSACleanup") + procWSAIoctl = modws2_32.NewProc("WSAIoctl") + procsocket = modws2_32.NewProc("socket") + procsetsockopt = modws2_32.NewProc("setsockopt") + procgetsockopt = modws2_32.NewProc("getsockopt") + procbind = modws2_32.NewProc("bind") + procconnect = modws2_32.NewProc("connect") + procgetsockname = modws2_32.NewProc("getsockname") + procgetpeername = modws2_32.NewProc("getpeername") + proclisten = modws2_32.NewProc("listen") + procshutdown = modws2_32.NewProc("shutdown") + procclosesocket = modws2_32.NewProc("closesocket") + procAcceptEx = modmswsock.NewProc("AcceptEx") + procGetAcceptExSockaddrs = modmswsock.NewProc("GetAcceptExSockaddrs") + procWSARecv = modws2_32.NewProc("WSARecv") + procWSASend = modws2_32.NewProc("WSASend") + procWSARecvFrom = modws2_32.NewProc("WSARecvFrom") + procWSASendTo = modws2_32.NewProc("WSASendTo") + procgethostbyname = modws2_32.NewProc("gethostbyname") + procgetservbyname = modws2_32.NewProc("getservbyname") + procntohs = modws2_32.NewProc("ntohs") + procgetprotobyname = modws2_32.NewProc("getprotobyname") + procDnsQuery_W = moddnsapi.NewProc("DnsQuery_W") + procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListFree") + procDnsNameCompare_W = moddnsapi.NewProc("DnsNameCompare_W") + procGetAddrInfoW = modws2_32.NewProc("GetAddrInfoW") + procFreeAddrInfoW = modws2_32.NewProc("FreeAddrInfoW") + procGetIfEntry = modiphlpapi.NewProc("GetIfEntry") + procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo") + procSetFileCompletionNotificationModes = modkernel32.NewProc("SetFileCompletionNotificationModes") + procWSAEnumProtocolsW = modws2_32.NewProc("WSAEnumProtocolsW") + procTranslateNameW = modsecur32.NewProc("TranslateNameW") + procGetUserNameExW = modsecur32.NewProc("GetUserNameExW") + procNetUserGetInfo = modnetapi32.NewProc("NetUserGetInfo") + procNetGetJoinInformation = modnetapi32.NewProc("NetGetJoinInformation") + procNetApiBufferFree = modnetapi32.NewProc("NetApiBufferFree") + procLookupAccountSidW = modadvapi32.NewProc("LookupAccountSidW") + procLookupAccountNameW = modadvapi32.NewProc("LookupAccountNameW") + procConvertSidToStringSidW = modadvapi32.NewProc("ConvertSidToStringSidW") + procConvertStringSidToSidW = modadvapi32.NewProc("ConvertStringSidToSidW") + procGetLengthSid = modadvapi32.NewProc("GetLengthSid") + procCopySid = modadvapi32.NewProc("CopySid") + procAllocateAndInitializeSid = modadvapi32.NewProc("AllocateAndInitializeSid") + procFreeSid = modadvapi32.NewProc("FreeSid") + procEqualSid = modadvapi32.NewProc("EqualSid") + procOpenProcessToken = modadvapi32.NewProc("OpenProcessToken") + procGetTokenInformation = modadvapi32.NewProc("GetTokenInformation") + procGetUserProfileDirectoryW = moduserenv.NewProc("GetUserProfileDirectoryW") +) + +func RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall(procRegisterEventSourceW.Addr(), 2, uintptr(unsafe.Pointer(uncServerName)), uintptr(unsafe.Pointer(sourceName)), 0) + handle = Handle(r0) + if handle == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func DeregisterEventSource(handle Handle) (err error) { + r1, _, e1 := syscall.Syscall(procDeregisterEventSource.Addr(), 1, uintptr(handle), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) { + r1, _, e1 := syscall.Syscall9(procReportEventW.Addr(), 9, uintptr(log), uintptr(etype), uintptr(category), uintptr(eventId), uintptr(usrSId), uintptr(numStrings), uintptr(dataSize), uintptr(unsafe.Pointer(strings)), uintptr(unsafe.Pointer(rawData))) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall(procOpenSCManagerW.Addr(), 3, uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(databaseName)), uintptr(access)) + handle = Handle(r0) + if handle == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CloseServiceHandle(handle Handle) (err error) { + r1, _, e1 := syscall.Syscall(procCloseServiceHandle.Addr(), 1, uintptr(handle), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CreateService(mgr Handle, serviceName *uint16, displayName *uint16, access uint32, srvType uint32, startType uint32, errCtl uint32, pathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall15(procCreateServiceW.Addr(), 13, uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(unsafe.Pointer(displayName)), uintptr(access), uintptr(srvType), uintptr(startType), uintptr(errCtl), uintptr(unsafe.Pointer(pathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password)), 0, 0) + handle = Handle(r0) + if handle == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func OpenService(mgr Handle, serviceName *uint16, access uint32) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall(procOpenServiceW.Addr(), 3, uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(access)) + handle = Handle(r0) + if handle == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func DeleteService(service Handle) (err error) { + r1, _, e1 := syscall.Syscall(procDeleteService.Addr(), 1, uintptr(service), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func StartService(service Handle, numArgs uint32, argVectors **uint16) (err error) { + r1, _, e1 := syscall.Syscall(procStartServiceW.Addr(), 3, uintptr(service), uintptr(numArgs), uintptr(unsafe.Pointer(argVectors))) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func QueryServiceStatus(service Handle, status *SERVICE_STATUS) (err error) { + r1, _, e1 := syscall.Syscall(procQueryServiceStatus.Addr(), 2, uintptr(service), uintptr(unsafe.Pointer(status)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func ControlService(service Handle, control uint32, status *SERVICE_STATUS) (err error) { + r1, _, e1 := syscall.Syscall(procControlService.Addr(), 3, uintptr(service), uintptr(control), uintptr(unsafe.Pointer(status))) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func StartServiceCtrlDispatcher(serviceTable *SERVICE_TABLE_ENTRY) (err error) { + r1, _, e1 := syscall.Syscall(procStartServiceCtrlDispatcherW.Addr(), 1, uintptr(unsafe.Pointer(serviceTable)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func SetServiceStatus(service Handle, serviceStatus *SERVICE_STATUS) (err error) { + r1, _, e1 := syscall.Syscall(procSetServiceStatus.Addr(), 2, uintptr(service), uintptr(unsafe.Pointer(serviceStatus)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func ChangeServiceConfig(service Handle, serviceType uint32, startType uint32, errorControl uint32, binaryPathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16, displayName *uint16) (err error) { + r1, _, e1 := syscall.Syscall12(procChangeServiceConfigW.Addr(), 11, uintptr(service), uintptr(serviceType), uintptr(startType), uintptr(errorControl), uintptr(unsafe.Pointer(binaryPathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password)), uintptr(unsafe.Pointer(displayName)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func QueryServiceConfig(service Handle, serviceConfig *QUERY_SERVICE_CONFIG, bufSize uint32, bytesNeeded *uint32) (err error) { + r1, _, e1 := syscall.Syscall6(procQueryServiceConfigW.Addr(), 4, uintptr(service), uintptr(unsafe.Pointer(serviceConfig)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func ChangeServiceConfig2(service Handle, infoLevel uint32, info *byte) (err error) { + r1, _, e1 := syscall.Syscall(procChangeServiceConfig2W.Addr(), 3, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(info))) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func QueryServiceConfig2(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) { + r1, _, e1 := syscall.Syscall6(procQueryServiceConfig2W.Addr(), 5, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetLastError() (lasterr error) { + r0, _, _ := syscall.Syscall(procGetLastError.Addr(), 0, 0, 0, 0) + if r0 != 0 { + lasterr = syscall.Errno(r0) + } + return +} + +func LoadLibrary(libname string) (handle Handle, err error) { + var _p0 *uint16 + _p0, err = syscall.UTF16PtrFromString(libname) + if err != nil { + return + } + return _LoadLibrary(_p0) +} + +func _LoadLibrary(libname *uint16) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall(procLoadLibraryW.Addr(), 1, uintptr(unsafe.Pointer(libname)), 0, 0) + handle = Handle(r0) + if handle == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func FreeLibrary(handle Handle) (err error) { + r1, _, e1 := syscall.Syscall(procFreeLibrary.Addr(), 1, uintptr(handle), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetProcAddress(module Handle, procname string) (proc uintptr, err error) { + var _p0 *byte + _p0, err = syscall.BytePtrFromString(procname) + if err != nil { + return + } + return _GetProcAddress(module, _p0) +} + +func _GetProcAddress(module Handle, procname *byte) (proc uintptr, err error) { + r0, _, e1 := syscall.Syscall(procGetProcAddress.Addr(), 2, uintptr(module), uintptr(unsafe.Pointer(procname)), 0) + proc = uintptr(r0) + if proc == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetVersion() (ver uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetVersion.Addr(), 0, 0, 0, 0) + ver = uint32(r0) + if ver == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func FormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, buf []uint16, args *byte) (n uint32, err error) { + var _p0 *uint16 + if len(buf) > 0 { + _p0 = &buf[0] + } + r0, _, e1 := syscall.Syscall9(procFormatMessageW.Addr(), 7, uintptr(flags), uintptr(msgsrc), uintptr(msgid), uintptr(langid), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(args)), 0, 0) + n = uint32(r0) + if n == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func ExitProcess(exitcode uint32) { + syscall.Syscall(procExitProcess.Addr(), 1, uintptr(exitcode), 0, 0) + return +} + +func CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile int32) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall9(procCreateFileW.Addr(), 7, uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile), 0, 0) + handle = Handle(r0) + if handle == InvalidHandle { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) { + var _p0 *byte + if len(buf) > 0 { + _p0 = &buf[0] + } + r1, _, e1 := syscall.Syscall6(procReadFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) { + var _p0 *byte + if len(buf) > 0 { + _p0 = &buf[0] + } + r1, _, e1 := syscall.Syscall6(procWriteFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) { + r0, _, e1 := syscall.Syscall6(procSetFilePointer.Addr(), 4, uintptr(handle), uintptr(lowoffset), uintptr(unsafe.Pointer(highoffsetptr)), uintptr(whence), 0, 0) + newlowoffset = uint32(r0) + if newlowoffset == 0xffffffff { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CloseHandle(handle Handle) (err error) { + r1, _, e1 := syscall.Syscall(procCloseHandle.Addr(), 1, uintptr(handle), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetStdHandle(stdhandle int) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall(procGetStdHandle.Addr(), 1, uintptr(stdhandle), 0, 0) + handle = Handle(r0) + if handle == InvalidHandle { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall(procFindFirstFileW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(data)), 0) + handle = Handle(r0) + if handle == InvalidHandle { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func findNextFile1(handle Handle, data *win32finddata1) (err error) { + r1, _, e1 := syscall.Syscall(procFindNextFileW.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(data)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func FindClose(handle Handle) (err error) { + r1, _, e1 := syscall.Syscall(procFindClose.Addr(), 1, uintptr(handle), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (err error) { + r1, _, e1 := syscall.Syscall(procGetFileInformationByHandle.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(data)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetCurrentDirectoryW.Addr(), 2, uintptr(buflen), uintptr(unsafe.Pointer(buf)), 0) + n = uint32(r0) + if n == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func SetCurrentDirectory(path *uint16) (err error) { + r1, _, e1 := syscall.Syscall(procSetCurrentDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CreateDirectory(path *uint16, sa *SecurityAttributes) (err error) { + r1, _, e1 := syscall.Syscall(procCreateDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(sa)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func RemoveDirectory(path *uint16) (err error) { + r1, _, e1 := syscall.Syscall(procRemoveDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func DeleteFile(path *uint16) (err error) { + r1, _, e1 := syscall.Syscall(procDeleteFileW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func MoveFile(from *uint16, to *uint16) (err error) { + r1, _, e1 := syscall.Syscall(procMoveFileW.Addr(), 2, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetComputerName(buf *uint16, n *uint32) (err error) { + r1, _, e1 := syscall.Syscall(procGetComputerNameW.Addr(), 2, uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetComputerNameEx(nametype uint32, buf *uint16, n *uint32) (err error) { + r1, _, e1 := syscall.Syscall(procGetComputerNameExW.Addr(), 3, uintptr(nametype), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n))) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func SetEndOfFile(handle Handle) (err error) { + r1, _, e1 := syscall.Syscall(procSetEndOfFile.Addr(), 1, uintptr(handle), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetSystemTimeAsFileTime(time *Filetime) { + syscall.Syscall(procGetSystemTimeAsFileTime.Addr(), 1, uintptr(unsafe.Pointer(time)), 0, 0) + return +} + +func GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetTimeZoneInformation.Addr(), 1, uintptr(unsafe.Pointer(tzi)), 0, 0) + rc = uint32(r0) + if rc == 0xffffffff { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uint32, threadcnt uint32) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall6(procCreateIoCompletionPort.Addr(), 4, uintptr(filehandle), uintptr(cphandle), uintptr(key), uintptr(threadcnt), 0, 0) + handle = Handle(r0) + if handle == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uint32, overlapped **Overlapped, timeout uint32) (err error) { + r1, _, e1 := syscall.Syscall6(procGetQueuedCompletionStatus.Addr(), 5, uintptr(cphandle), uintptr(unsafe.Pointer(qty)), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(overlapped)), uintptr(timeout), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uint32, overlapped *Overlapped) (err error) { + r1, _, e1 := syscall.Syscall6(procPostQueuedCompletionStatus.Addr(), 4, uintptr(cphandle), uintptr(qty), uintptr(key), uintptr(unsafe.Pointer(overlapped)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CancelIo(s Handle) (err error) { + r1, _, e1 := syscall.Syscall(procCancelIo.Addr(), 1, uintptr(s), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CancelIoEx(s Handle, o *Overlapped) (err error) { + r1, _, e1 := syscall.Syscall(procCancelIoEx.Addr(), 2, uintptr(s), uintptr(unsafe.Pointer(o)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) { + var _p0 uint32 + if inheritHandles { + _p0 = 1 + } else { + _p0 = 0 + } + r1, _, e1 := syscall.Syscall12(procCreateProcessW.Addr(), 10, uintptr(unsafe.Pointer(appName)), uintptr(unsafe.Pointer(commandLine)), uintptr(unsafe.Pointer(procSecurity)), uintptr(unsafe.Pointer(threadSecurity)), uintptr(_p0), uintptr(creationFlags), uintptr(unsafe.Pointer(env)), uintptr(unsafe.Pointer(currentDir)), uintptr(unsafe.Pointer(startupInfo)), uintptr(unsafe.Pointer(outProcInfo)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func OpenProcess(da uint32, inheritHandle bool, pid uint32) (handle Handle, err error) { + var _p0 uint32 + if inheritHandle { + _p0 = 1 + } else { + _p0 = 0 + } + r0, _, e1 := syscall.Syscall(procOpenProcess.Addr(), 3, uintptr(da), uintptr(_p0), uintptr(pid)) + handle = Handle(r0) + if handle == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func TerminateProcess(handle Handle, exitcode uint32) (err error) { + r1, _, e1 := syscall.Syscall(procTerminateProcess.Addr(), 2, uintptr(handle), uintptr(exitcode), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetExitCodeProcess(handle Handle, exitcode *uint32) (err error) { + r1, _, e1 := syscall.Syscall(procGetExitCodeProcess.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(exitcode)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetStartupInfo(startupInfo *StartupInfo) (err error) { + r1, _, e1 := syscall.Syscall(procGetStartupInfoW.Addr(), 1, uintptr(unsafe.Pointer(startupInfo)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetCurrentProcess() (pseudoHandle Handle, err error) { + r0, _, e1 := syscall.Syscall(procGetCurrentProcess.Addr(), 0, 0, 0, 0) + pseudoHandle = Handle(r0) + if pseudoHandle == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, kernelTime *Filetime, userTime *Filetime) (err error) { + r1, _, e1 := syscall.Syscall6(procGetProcessTimes.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(creationTime)), uintptr(unsafe.Pointer(exitTime)), uintptr(unsafe.Pointer(kernelTime)), uintptr(unsafe.Pointer(userTime)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetProcessHandle Handle, lpTargetHandle *Handle, dwDesiredAccess uint32, bInheritHandle bool, dwOptions uint32) (err error) { + var _p0 uint32 + if bInheritHandle { + _p0 = 1 + } else { + _p0 = 0 + } + r1, _, e1 := syscall.Syscall9(procDuplicateHandle.Addr(), 7, uintptr(hSourceProcessHandle), uintptr(hSourceHandle), uintptr(hTargetProcessHandle), uintptr(unsafe.Pointer(lpTargetHandle)), uintptr(dwDesiredAccess), uintptr(_p0), uintptr(dwOptions), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32, err error) { + r0, _, e1 := syscall.Syscall(procWaitForSingleObject.Addr(), 2, uintptr(handle), uintptr(waitMilliseconds), 0) + event = uint32(r0) + if event == 0xffffffff { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetTempPath(buflen uint32, buf *uint16) (n uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetTempPathW.Addr(), 2, uintptr(buflen), uintptr(unsafe.Pointer(buf)), 0) + n = uint32(r0) + if n == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CreatePipe(readhandle *Handle, writehandle *Handle, sa *SecurityAttributes, size uint32) (err error) { + r1, _, e1 := syscall.Syscall6(procCreatePipe.Addr(), 4, uintptr(unsafe.Pointer(readhandle)), uintptr(unsafe.Pointer(writehandle)), uintptr(unsafe.Pointer(sa)), uintptr(size), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetFileType(filehandle Handle) (n uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetFileType.Addr(), 1, uintptr(filehandle), 0, 0) + n = uint32(r0) + if n == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CryptAcquireContext(provhandle *Handle, container *uint16, provider *uint16, provtype uint32, flags uint32) (err error) { + r1, _, e1 := syscall.Syscall6(procCryptAcquireContextW.Addr(), 5, uintptr(unsafe.Pointer(provhandle)), uintptr(unsafe.Pointer(container)), uintptr(unsafe.Pointer(provider)), uintptr(provtype), uintptr(flags), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CryptReleaseContext(provhandle Handle, flags uint32) (err error) { + r1, _, e1 := syscall.Syscall(procCryptReleaseContext.Addr(), 2, uintptr(provhandle), uintptr(flags), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CryptGenRandom(provhandle Handle, buflen uint32, buf *byte) (err error) { + r1, _, e1 := syscall.Syscall(procCryptGenRandom.Addr(), 3, uintptr(provhandle), uintptr(buflen), uintptr(unsafe.Pointer(buf))) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetEnvironmentStrings() (envs *uint16, err error) { + r0, _, e1 := syscall.Syscall(procGetEnvironmentStringsW.Addr(), 0, 0, 0, 0) + envs = (*uint16)(unsafe.Pointer(r0)) + if envs == nil { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func FreeEnvironmentStrings(envs *uint16) (err error) { + r1, _, e1 := syscall.Syscall(procFreeEnvironmentStringsW.Addr(), 1, uintptr(unsafe.Pointer(envs)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetEnvironmentVariable(name *uint16, buffer *uint16, size uint32) (n uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetEnvironmentVariableW.Addr(), 3, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buffer)), uintptr(size)) + n = uint32(r0) + if n == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func SetEnvironmentVariable(name *uint16, value *uint16) (err error) { + r1, _, e1 := syscall.Syscall(procSetEnvironmentVariableW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) { + r1, _, e1 := syscall.Syscall6(procSetFileTime.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetFileAttributes(name *uint16) (attrs uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetFileAttributesW.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0) + attrs = uint32(r0) + if attrs == INVALID_FILE_ATTRIBUTES { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func SetFileAttributes(name *uint16, attrs uint32) (err error) { + r1, _, e1 := syscall.Syscall(procSetFileAttributesW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(attrs), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetFileAttributesEx(name *uint16, level uint32, info *byte) (err error) { + r1, _, e1 := syscall.Syscall(procGetFileAttributesExW.Addr(), 3, uintptr(unsafe.Pointer(name)), uintptr(level), uintptr(unsafe.Pointer(info))) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetCommandLine() (cmd *uint16) { + r0, _, _ := syscall.Syscall(procGetCommandLineW.Addr(), 0, 0, 0, 0) + cmd = (*uint16)(unsafe.Pointer(r0)) + return +} + +func CommandLineToArgv(cmd *uint16, argc *int32) (argv *[8192]*[8192]uint16, err error) { + r0, _, e1 := syscall.Syscall(procCommandLineToArgvW.Addr(), 2, uintptr(unsafe.Pointer(cmd)), uintptr(unsafe.Pointer(argc)), 0) + argv = (*[8192]*[8192]uint16)(unsafe.Pointer(r0)) + if argv == nil { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func LocalFree(hmem Handle) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall(procLocalFree.Addr(), 1, uintptr(hmem), 0, 0) + handle = Handle(r0) + if handle != 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error) { + r1, _, e1 := syscall.Syscall(procSetHandleInformation.Addr(), 3, uintptr(handle), uintptr(mask), uintptr(flags)) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func FlushFileBuffers(handle Handle) (err error) { + r1, _, e1 := syscall.Syscall(procFlushFileBuffers.Addr(), 1, uintptr(handle), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (n uint32, err error) { + r0, _, e1 := syscall.Syscall6(procGetFullPathNameW.Addr(), 4, uintptr(unsafe.Pointer(path)), uintptr(buflen), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(fname)), 0, 0) + n = uint32(r0) + if n == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetLongPathNameW.Addr(), 3, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(buf)), uintptr(buflen)) + n = uint32(r0) + if n == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetShortPathNameW.Addr(), 3, uintptr(unsafe.Pointer(longpath)), uintptr(unsafe.Pointer(shortpath)), uintptr(buflen)) + n = uint32(r0) + if n == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall6(procCreateFileMappingW.Addr(), 6, uintptr(fhandle), uintptr(unsafe.Pointer(sa)), uintptr(prot), uintptr(maxSizeHigh), uintptr(maxSizeLow), uintptr(unsafe.Pointer(name))) + handle = Handle(r0) + if handle == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow uint32, length uintptr) (addr uintptr, err error) { + r0, _, e1 := syscall.Syscall6(procMapViewOfFile.Addr(), 5, uintptr(handle), uintptr(access), uintptr(offsetHigh), uintptr(offsetLow), uintptr(length), 0) + addr = uintptr(r0) + if addr == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func UnmapViewOfFile(addr uintptr) (err error) { + r1, _, e1 := syscall.Syscall(procUnmapViewOfFile.Addr(), 1, uintptr(addr), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func FlushViewOfFile(addr uintptr, length uintptr) (err error) { + r1, _, e1 := syscall.Syscall(procFlushViewOfFile.Addr(), 2, uintptr(addr), uintptr(length), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func VirtualLock(addr uintptr, length uintptr) (err error) { + r1, _, e1 := syscall.Syscall(procVirtualLock.Addr(), 2, uintptr(addr), uintptr(length), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func VirtualUnlock(addr uintptr, length uintptr) (err error) { + r1, _, e1 := syscall.Syscall(procVirtualUnlock.Addr(), 2, uintptr(addr), uintptr(length), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint32, overlapped *Overlapped, transmitFileBuf *TransmitFileBuffers, flags uint32) (err error) { + r1, _, e1 := syscall.Syscall9(procTransmitFile.Addr(), 7, uintptr(s), uintptr(handle), uintptr(bytesToWrite), uintptr(bytsPerSend), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(transmitFileBuf)), uintptr(flags), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree bool, mask uint32, retlen *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) { + var _p0 uint32 + if watchSubTree { + _p0 = 1 + } else { + _p0 = 0 + } + r1, _, e1 := syscall.Syscall9(procReadDirectoryChangesW.Addr(), 8, uintptr(handle), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(_p0), uintptr(mask), uintptr(unsafe.Pointer(retlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CertOpenSystemStore(hprov Handle, name *uint16) (store Handle, err error) { + r0, _, e1 := syscall.Syscall(procCertOpenSystemStoreW.Addr(), 2, uintptr(hprov), uintptr(unsafe.Pointer(name)), 0) + store = Handle(r0) + if store == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall6(procCertOpenStore.Addr(), 5, uintptr(storeProvider), uintptr(msgAndCertEncodingType), uintptr(cryptProv), uintptr(flags), uintptr(para), 0) + handle = Handle(r0) + if handle == InvalidHandle { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (context *CertContext, err error) { + r0, _, e1 := syscall.Syscall(procCertEnumCertificatesInStore.Addr(), 2, uintptr(store), uintptr(unsafe.Pointer(prevContext)), 0) + context = (*CertContext)(unsafe.Pointer(r0)) + if context == nil { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CertAddCertificateContextToStore(store Handle, certContext *CertContext, addDisposition uint32, storeContext **CertContext) (err error) { + r1, _, e1 := syscall.Syscall6(procCertAddCertificateContextToStore.Addr(), 4, uintptr(store), uintptr(unsafe.Pointer(certContext)), uintptr(addDisposition), uintptr(unsafe.Pointer(storeContext)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CertCloseStore(store Handle, flags uint32) (err error) { + r1, _, e1 := syscall.Syscall(procCertCloseStore.Addr(), 2, uintptr(store), uintptr(flags), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, additionalStore Handle, para *CertChainPara, flags uint32, reserved uintptr, chainCtx **CertChainContext) (err error) { + r1, _, e1 := syscall.Syscall9(procCertGetCertificateChain.Addr(), 8, uintptr(engine), uintptr(unsafe.Pointer(leaf)), uintptr(unsafe.Pointer(time)), uintptr(additionalStore), uintptr(unsafe.Pointer(para)), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(chainCtx)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CertFreeCertificateChain(ctx *CertChainContext) { + syscall.Syscall(procCertFreeCertificateChain.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0) + return +} + +func CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, encodedLen uint32) (context *CertContext, err error) { + r0, _, e1 := syscall.Syscall(procCertCreateCertificateContext.Addr(), 3, uintptr(certEncodingType), uintptr(unsafe.Pointer(certEncoded)), uintptr(encodedLen)) + context = (*CertContext)(unsafe.Pointer(r0)) + if context == nil { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CertFreeCertificateContext(ctx *CertContext) (err error) { + r1, _, e1 := syscall.Syscall(procCertFreeCertificateContext.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) { + r1, _, e1 := syscall.Syscall6(procCertVerifyCertificateChainPolicy.Addr(), 4, uintptr(policyOID), uintptr(unsafe.Pointer(chain)), uintptr(unsafe.Pointer(para)), uintptr(unsafe.Pointer(status)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func RegOpenKeyEx(key Handle, subkey *uint16, options uint32, desiredAccess uint32, result *Handle) (regerrno error) { + r0, _, _ := syscall.Syscall6(procRegOpenKeyExW.Addr(), 5, uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(options), uintptr(desiredAccess), uintptr(unsafe.Pointer(result)), 0) + if r0 != 0 { + regerrno = syscall.Errno(r0) + } + return +} + +func RegCloseKey(key Handle) (regerrno error) { + r0, _, _ := syscall.Syscall(procRegCloseKey.Addr(), 1, uintptr(key), 0, 0) + if r0 != 0 { + regerrno = syscall.Errno(r0) + } + return +} + +func RegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint32, subkeysLen *uint32, maxSubkeyLen *uint32, maxClassLen *uint32, valuesLen *uint32, maxValueNameLen *uint32, maxValueLen *uint32, saLen *uint32, lastWriteTime *Filetime) (regerrno error) { + r0, _, _ := syscall.Syscall12(procRegQueryInfoKeyW.Addr(), 12, uintptr(key), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(subkeysLen)), uintptr(unsafe.Pointer(maxSubkeyLen)), uintptr(unsafe.Pointer(maxClassLen)), uintptr(unsafe.Pointer(valuesLen)), uintptr(unsafe.Pointer(maxValueNameLen)), uintptr(unsafe.Pointer(maxValueLen)), uintptr(unsafe.Pointer(saLen)), uintptr(unsafe.Pointer(lastWriteTime))) + if r0 != 0 { + regerrno = syscall.Errno(r0) + } + return +} + +func RegEnumKeyEx(key Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, classLen *uint32, lastWriteTime *Filetime) (regerrno error) { + r0, _, _ := syscall.Syscall9(procRegEnumKeyExW.Addr(), 8, uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(lastWriteTime)), 0) + if r0 != 0 { + regerrno = syscall.Errno(r0) + } + return +} + +func RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) { + r0, _, _ := syscall.Syscall6(procRegQueryValueExW.Addr(), 6, uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen))) + if r0 != 0 { + regerrno = syscall.Errno(r0) + } + return +} + +func getCurrentProcessId() (pid uint32) { + r0, _, _ := syscall.Syscall(procGetCurrentProcessId.Addr(), 0, 0, 0, 0) + pid = uint32(r0) + return +} + +func GetConsoleMode(console Handle, mode *uint32) (err error) { + r1, _, e1 := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(mode)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) { + r1, _, e1 := syscall.Syscall6(procWriteConsoleW.Addr(), 5, uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(towrite), uintptr(unsafe.Pointer(written)), uintptr(unsafe.Pointer(reserved)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) { + r1, _, e1 := syscall.Syscall6(procReadConsoleW.Addr(), 5, uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(toread), uintptr(unsafe.Pointer(read)), uintptr(unsafe.Pointer(inputControl)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall(procCreateToolhelp32Snapshot.Addr(), 2, uintptr(flags), uintptr(processId), 0) + handle = Handle(r0) + if handle == InvalidHandle { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func Process32First(snapshot Handle, procEntry *ProcessEntry32) (err error) { + r1, _, e1 := syscall.Syscall(procProcess32FirstW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(procEntry)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func Process32Next(snapshot Handle, procEntry *ProcessEntry32) (err error) { + r1, _, e1 := syscall.Syscall(procProcess32NextW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(procEntry)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func DeviceIoControl(handle Handle, ioControlCode uint32, inBuffer *byte, inBufferSize uint32, outBuffer *byte, outBufferSize uint32, bytesReturned *uint32, overlapped *Overlapped) (err error) { + r1, _, e1 := syscall.Syscall9(procDeviceIoControl.Addr(), 8, uintptr(handle), uintptr(ioControlCode), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferSize), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferSize), uintptr(unsafe.Pointer(bytesReturned)), uintptr(unsafe.Pointer(overlapped)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CreateSymbolicLink(symlinkfilename *uint16, targetfilename *uint16, flags uint32) (err error) { + r1, _, e1 := syscall.Syscall(procCreateSymbolicLinkW.Addr(), 3, uintptr(unsafe.Pointer(symlinkfilename)), uintptr(unsafe.Pointer(targetfilename)), uintptr(flags)) + if r1&0xff == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CreateHardLink(filename *uint16, existingfilename *uint16, reserved uintptr) (err error) { + r1, _, e1 := syscall.Syscall(procCreateHardLinkW.Addr(), 3, uintptr(unsafe.Pointer(filename)), uintptr(unsafe.Pointer(existingfilename)), uintptr(reserved)) + if r1&0xff == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetCurrentThreadId() (id uint32) { + r0, _, _ := syscall.Syscall(procGetCurrentThreadId.Addr(), 0, 0, 0, 0) + id = uint32(r0) + return +} + +func CreateEvent(eventAttrs *syscall.SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall6(procCreateEventW.Addr(), 4, uintptr(unsafe.Pointer(eventAttrs)), uintptr(manualReset), uintptr(initialState), uintptr(unsafe.Pointer(name)), 0, 0) + handle = Handle(r0) + if handle == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func SetEvent(event Handle) (err error) { + r1, _, e1 := syscall.Syscall(procSetEvent.Addr(), 1, uintptr(event), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func WSAStartup(verreq uint32, data *WSAData) (sockerr error) { + r0, _, _ := syscall.Syscall(procWSAStartup.Addr(), 2, uintptr(verreq), uintptr(unsafe.Pointer(data)), 0) + if r0 != 0 { + sockerr = syscall.Errno(r0) + } + return +} + +func WSACleanup() (err error) { + r1, _, e1 := syscall.Syscall(procWSACleanup.Addr(), 0, 0, 0, 0) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func WSAIoctl(s Handle, iocc uint32, inbuf *byte, cbif uint32, outbuf *byte, cbob uint32, cbbr *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) { + r1, _, e1 := syscall.Syscall9(procWSAIoctl.Addr(), 9, uintptr(s), uintptr(iocc), uintptr(unsafe.Pointer(inbuf)), uintptr(cbif), uintptr(unsafe.Pointer(outbuf)), uintptr(cbob), uintptr(unsafe.Pointer(cbbr)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine)) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func socket(af int32, typ int32, protocol int32) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall(procsocket.Addr(), 3, uintptr(af), uintptr(typ), uintptr(protocol)) + handle = Handle(r0) + if handle == InvalidHandle { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func Setsockopt(s Handle, level int32, optname int32, optval *byte, optlen int32) (err error) { + r1, _, e1 := syscall.Syscall6(procsetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(optlen), 0) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func Getsockopt(s Handle, level int32, optname int32, optval *byte, optlen *int32) (err error) { + r1, _, e1 := syscall.Syscall6(procgetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(unsafe.Pointer(optlen)), 0) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func bind(s Handle, name unsafe.Pointer, namelen int32) (err error) { + r1, _, e1 := syscall.Syscall(procbind.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen)) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func connect(s Handle, name unsafe.Pointer, namelen int32) (err error) { + r1, _, e1 := syscall.Syscall(procconnect.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen)) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func getsockname(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) { + r1, _, e1 := syscall.Syscall(procgetsockname.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func getpeername(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) { + r1, _, e1 := syscall.Syscall(procgetpeername.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func listen(s Handle, backlog int32) (err error) { + r1, _, e1 := syscall.Syscall(proclisten.Addr(), 2, uintptr(s), uintptr(backlog), 0) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func shutdown(s Handle, how int32) (err error) { + r1, _, e1 := syscall.Syscall(procshutdown.Addr(), 2, uintptr(s), uintptr(how), 0) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func Closesocket(s Handle) (err error) { + r1, _, e1 := syscall.Syscall(procclosesocket.Addr(), 1, uintptr(s), 0, 0) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func AcceptEx(ls Handle, as Handle, buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, recvd *uint32, overlapped *Overlapped) (err error) { + r1, _, e1 := syscall.Syscall9(procAcceptEx.Addr(), 8, uintptr(ls), uintptr(as), uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(overlapped)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetAcceptExSockaddrs(buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, lrsa **RawSockaddrAny, lrsalen *int32, rrsa **RawSockaddrAny, rrsalen *int32) { + syscall.Syscall9(procGetAcceptExSockaddrs.Addr(), 8, uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(lrsa)), uintptr(unsafe.Pointer(lrsalen)), uintptr(unsafe.Pointer(rrsa)), uintptr(unsafe.Pointer(rrsalen)), 0) + return +} + +func WSARecv(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, overlapped *Overlapped, croutine *byte) (err error) { + r1, _, e1 := syscall.Syscall9(procWSARecv.Addr(), 7, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0, 0) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func WSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, overlapped *Overlapped, croutine *byte) (err error) { + r1, _, e1 := syscall.Syscall9(procWSASend.Addr(), 7, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0, 0) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, from *RawSockaddrAny, fromlen *int32, overlapped *Overlapped, croutine *byte) (err error) { + r1, _, e1 := syscall.Syscall9(procWSARecvFrom.Addr(), 9, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine))) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *RawSockaddrAny, tolen int32, overlapped *Overlapped, croutine *byte) (err error) { + r1, _, e1 := syscall.Syscall9(procWSASendTo.Addr(), 9, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(to)), uintptr(tolen), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine))) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetHostByName(name string) (h *Hostent, err error) { + var _p0 *byte + _p0, err = syscall.BytePtrFromString(name) + if err != nil { + return + } + return _GetHostByName(_p0) +} + +func _GetHostByName(name *byte) (h *Hostent, err error) { + r0, _, e1 := syscall.Syscall(procgethostbyname.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0) + h = (*Hostent)(unsafe.Pointer(r0)) + if h == nil { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetServByName(name string, proto string) (s *Servent, err error) { + var _p0 *byte + _p0, err = syscall.BytePtrFromString(name) + if err != nil { + return + } + var _p1 *byte + _p1, err = syscall.BytePtrFromString(proto) + if err != nil { + return + } + return _GetServByName(_p0, _p1) +} + +func _GetServByName(name *byte, proto *byte) (s *Servent, err error) { + r0, _, e1 := syscall.Syscall(procgetservbyname.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(proto)), 0) + s = (*Servent)(unsafe.Pointer(r0)) + if s == nil { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func Ntohs(netshort uint16) (u uint16) { + r0, _, _ := syscall.Syscall(procntohs.Addr(), 1, uintptr(netshort), 0, 0) + u = uint16(r0) + return +} + +func GetProtoByName(name string) (p *Protoent, err error) { + var _p0 *byte + _p0, err = syscall.BytePtrFromString(name) + if err != nil { + return + } + return _GetProtoByName(_p0) +} + +func _GetProtoByName(name *byte) (p *Protoent, err error) { + r0, _, e1 := syscall.Syscall(procgetprotobyname.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0) + p = (*Protoent)(unsafe.Pointer(r0)) + if p == nil { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func DnsQuery(name string, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) { + var _p0 *uint16 + _p0, status = syscall.UTF16PtrFromString(name) + if status != nil { + return + } + return _DnsQuery(_p0, qtype, options, extra, qrs, pr) +} + +func _DnsQuery(name *uint16, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) { + r0, _, _ := syscall.Syscall6(procDnsQuery_W.Addr(), 6, uintptr(unsafe.Pointer(name)), uintptr(qtype), uintptr(options), uintptr(unsafe.Pointer(extra)), uintptr(unsafe.Pointer(qrs)), uintptr(unsafe.Pointer(pr))) + if r0 != 0 { + status = syscall.Errno(r0) + } + return +} + +func DnsRecordListFree(rl *DNSRecord, freetype uint32) { + syscall.Syscall(procDnsRecordListFree.Addr(), 2, uintptr(unsafe.Pointer(rl)), uintptr(freetype), 0) + return +} + +func DnsNameCompare(name1 *uint16, name2 *uint16) (same bool) { + r0, _, _ := syscall.Syscall(procDnsNameCompare_W.Addr(), 2, uintptr(unsafe.Pointer(name1)), uintptr(unsafe.Pointer(name2)), 0) + same = r0 != 0 + return +} + +func GetAddrInfoW(nodename *uint16, servicename *uint16, hints *AddrinfoW, result **AddrinfoW) (sockerr error) { + r0, _, _ := syscall.Syscall6(procGetAddrInfoW.Addr(), 4, uintptr(unsafe.Pointer(nodename)), uintptr(unsafe.Pointer(servicename)), uintptr(unsafe.Pointer(hints)), uintptr(unsafe.Pointer(result)), 0, 0) + if r0 != 0 { + sockerr = syscall.Errno(r0) + } + return +} + +func FreeAddrInfoW(addrinfo *AddrinfoW) { + syscall.Syscall(procFreeAddrInfoW.Addr(), 1, uintptr(unsafe.Pointer(addrinfo)), 0, 0) + return +} + +func GetIfEntry(pIfRow *MibIfRow) (errcode error) { + r0, _, _ := syscall.Syscall(procGetIfEntry.Addr(), 1, uintptr(unsafe.Pointer(pIfRow)), 0, 0) + if r0 != 0 { + errcode = syscall.Errno(r0) + } + return +} + +func GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) { + r0, _, _ := syscall.Syscall(procGetAdaptersInfo.Addr(), 2, uintptr(unsafe.Pointer(ai)), uintptr(unsafe.Pointer(ol)), 0) + if r0 != 0 { + errcode = syscall.Errno(r0) + } + return +} + +func SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error) { + r1, _, e1 := syscall.Syscall(procSetFileCompletionNotificationModes.Addr(), 2, uintptr(handle), uintptr(flags), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func WSAEnumProtocols(protocols *int32, protocolBuffer *WSAProtocolInfo, bufferLength *uint32) (n int32, err error) { + r0, _, e1 := syscall.Syscall(procWSAEnumProtocolsW.Addr(), 3, uintptr(unsafe.Pointer(protocols)), uintptr(unsafe.Pointer(protocolBuffer)), uintptr(unsafe.Pointer(bufferLength))) + n = int32(r0) + if n == -1 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func TranslateName(accName *uint16, accNameFormat uint32, desiredNameFormat uint32, translatedName *uint16, nSize *uint32) (err error) { + r1, _, e1 := syscall.Syscall6(procTranslateNameW.Addr(), 5, uintptr(unsafe.Pointer(accName)), uintptr(accNameFormat), uintptr(desiredNameFormat), uintptr(unsafe.Pointer(translatedName)), uintptr(unsafe.Pointer(nSize)), 0) + if r1&0xff == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetUserNameEx(nameFormat uint32, nameBuffre *uint16, nSize *uint32) (err error) { + r1, _, e1 := syscall.Syscall(procGetUserNameExW.Addr(), 3, uintptr(nameFormat), uintptr(unsafe.Pointer(nameBuffre)), uintptr(unsafe.Pointer(nSize))) + if r1&0xff == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) { + r0, _, _ := syscall.Syscall6(procNetUserGetInfo.Addr(), 4, uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(userName)), uintptr(level), uintptr(unsafe.Pointer(buf)), 0, 0) + if r0 != 0 { + neterr = syscall.Errno(r0) + } + return +} + +func NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (neterr error) { + r0, _, _ := syscall.Syscall(procNetGetJoinInformation.Addr(), 3, uintptr(unsafe.Pointer(server)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(bufType))) + if r0 != 0 { + neterr = syscall.Errno(r0) + } + return +} + +func NetApiBufferFree(buf *byte) (neterr error) { + r0, _, _ := syscall.Syscall(procNetApiBufferFree.Addr(), 1, uintptr(unsafe.Pointer(buf)), 0, 0) + if r0 != 0 { + neterr = syscall.Errno(r0) + } + return +} + +func LookupAccountSid(systemName *uint16, sid *SID, name *uint16, nameLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) { + r1, _, e1 := syscall.Syscall9(procLookupAccountSidW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func LookupAccountName(systemName *uint16, accountName *uint16, sid *SID, sidLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) { + r1, _, e1 := syscall.Syscall9(procLookupAccountNameW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(accountName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sidLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func ConvertSidToStringSid(sid *SID, stringSid **uint16) (err error) { + r1, _, e1 := syscall.Syscall(procConvertSidToStringSidW.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(stringSid)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func ConvertStringSidToSid(stringSid *uint16, sid **SID) (err error) { + r1, _, e1 := syscall.Syscall(procConvertStringSidToSidW.Addr(), 2, uintptr(unsafe.Pointer(stringSid)), uintptr(unsafe.Pointer(sid)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetLengthSid(sid *SID) (len uint32) { + r0, _, _ := syscall.Syscall(procGetLengthSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0) + len = uint32(r0) + return +} + +func CopySid(destSidLen uint32, destSid *SID, srcSid *SID) (err error) { + r1, _, e1 := syscall.Syscall(procCopySid.Addr(), 3, uintptr(destSidLen), uintptr(unsafe.Pointer(destSid)), uintptr(unsafe.Pointer(srcSid))) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func AllocateAndInitializeSid(identAuth *SidIdentifierAuthority, subAuth byte, subAuth0 uint32, subAuth1 uint32, subAuth2 uint32, subAuth3 uint32, subAuth4 uint32, subAuth5 uint32, subAuth6 uint32, subAuth7 uint32, sid **SID) (err error) { + r1, _, e1 := syscall.Syscall12(procAllocateAndInitializeSid.Addr(), 11, uintptr(unsafe.Pointer(identAuth)), uintptr(subAuth), uintptr(subAuth0), uintptr(subAuth1), uintptr(subAuth2), uintptr(subAuth3), uintptr(subAuth4), uintptr(subAuth5), uintptr(subAuth6), uintptr(subAuth7), uintptr(unsafe.Pointer(sid)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func FreeSid(sid *SID) (err error) { + r1, _, e1 := syscall.Syscall(procFreeSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0) + if r1 != 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func EqualSid(sid1 *SID, sid2 *SID) (isEqual bool) { + r0, _, _ := syscall.Syscall(procEqualSid.Addr(), 2, uintptr(unsafe.Pointer(sid1)), uintptr(unsafe.Pointer(sid2)), 0) + isEqual = r0 != 0 + return +} + +func OpenProcessToken(h Handle, access uint32, token *Token) (err error) { + r1, _, e1 := syscall.Syscall(procOpenProcessToken.Addr(), 3, uintptr(h), uintptr(access), uintptr(unsafe.Pointer(token))) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetTokenInformation(t Token, infoClass uint32, info *byte, infoLen uint32, returnedLen *uint32) (err error) { + r1, _, e1 := syscall.Syscall6(procGetTokenInformation.Addr(), 5, uintptr(t), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen), uintptr(unsafe.Pointer(returnedLen)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) { + r1, _, e1 := syscall.Syscall(procGetUserProfileDirectoryW.Addr(), 3, uintptr(t), uintptr(unsafe.Pointer(dir)), uintptr(unsafe.Pointer(dirLen))) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} diff --git a/vendor/golang.org/x/sys/windows/ztypes_windows.go b/vendor/golang.org/x/sys/windows/ztypes_windows.go new file mode 100644 index 0000000..ea600f6 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/ztypes_windows.go @@ -0,0 +1,1137 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package windows + +import "syscall" + +const ( + // Windows errors. + ERROR_FILE_NOT_FOUND syscall.Errno = 2 + ERROR_PATH_NOT_FOUND syscall.Errno = 3 + ERROR_ACCESS_DENIED syscall.Errno = 5 + ERROR_NO_MORE_FILES syscall.Errno = 18 + ERROR_HANDLE_EOF syscall.Errno = 38 + ERROR_NETNAME_DELETED syscall.Errno = 64 + ERROR_FILE_EXISTS syscall.Errno = 80 + ERROR_BROKEN_PIPE syscall.Errno = 109 + ERROR_BUFFER_OVERFLOW syscall.Errno = 111 + ERROR_INSUFFICIENT_BUFFER syscall.Errno = 122 + ERROR_MOD_NOT_FOUND syscall.Errno = 126 + ERROR_PROC_NOT_FOUND syscall.Errno = 127 + ERROR_ALREADY_EXISTS syscall.Errno = 183 + ERROR_ENVVAR_NOT_FOUND syscall.Errno = 203 + ERROR_MORE_DATA syscall.Errno = 234 + ERROR_OPERATION_ABORTED syscall.Errno = 995 + ERROR_IO_PENDING syscall.Errno = 997 + ERROR_SERVICE_SPECIFIC_ERROR syscall.Errno = 1066 + ERROR_NOT_FOUND syscall.Errno = 1168 + ERROR_PRIVILEGE_NOT_HELD syscall.Errno = 1314 + WSAEACCES syscall.Errno = 10013 + WSAECONNRESET syscall.Errno = 10054 +) + +const ( + // Invented values to support what package os expects. + O_RDONLY = 0x00000 + O_WRONLY = 0x00001 + O_RDWR = 0x00002 + O_CREAT = 0x00040 + O_EXCL = 0x00080 + O_NOCTTY = 0x00100 + O_TRUNC = 0x00200 + O_NONBLOCK = 0x00800 + O_APPEND = 0x00400 + O_SYNC = 0x01000 + O_ASYNC = 0x02000 + O_CLOEXEC = 0x80000 +) + +const ( + // More invented values for signals + SIGHUP = Signal(0x1) + SIGINT = Signal(0x2) + SIGQUIT = Signal(0x3) + SIGILL = Signal(0x4) + SIGTRAP = Signal(0x5) + SIGABRT = Signal(0x6) + SIGBUS = Signal(0x7) + SIGFPE = Signal(0x8) + SIGKILL = Signal(0x9) + SIGSEGV = Signal(0xb) + SIGPIPE = Signal(0xd) + SIGALRM = Signal(0xe) + SIGTERM = Signal(0xf) +) + +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/breakpoint trap", + 6: "aborted", + 7: "bus error", + 8: "floating point exception", + 9: "killed", + 10: "user defined signal 1", + 11: "segmentation fault", + 12: "user defined signal 2", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", +} + +const ( + GENERIC_READ = 0x80000000 + GENERIC_WRITE = 0x40000000 + GENERIC_EXECUTE = 0x20000000 + GENERIC_ALL = 0x10000000 + + FILE_LIST_DIRECTORY = 0x00000001 + FILE_APPEND_DATA = 0x00000004 + FILE_WRITE_ATTRIBUTES = 0x00000100 + + FILE_SHARE_READ = 0x00000001 + FILE_SHARE_WRITE = 0x00000002 + FILE_SHARE_DELETE = 0x00000004 + FILE_ATTRIBUTE_READONLY = 0x00000001 + FILE_ATTRIBUTE_HIDDEN = 0x00000002 + FILE_ATTRIBUTE_SYSTEM = 0x00000004 + FILE_ATTRIBUTE_DIRECTORY = 0x00000010 + FILE_ATTRIBUTE_ARCHIVE = 0x00000020 + FILE_ATTRIBUTE_NORMAL = 0x00000080 + FILE_ATTRIBUTE_REPARSE_POINT = 0x00000400 + + INVALID_FILE_ATTRIBUTES = 0xffffffff + + CREATE_NEW = 1 + CREATE_ALWAYS = 2 + OPEN_EXISTING = 3 + OPEN_ALWAYS = 4 + TRUNCATE_EXISTING = 5 + + FILE_FLAG_OPEN_REPARSE_POINT = 0x00200000 + FILE_FLAG_BACKUP_SEMANTICS = 0x02000000 + FILE_FLAG_OVERLAPPED = 0x40000000 + + HANDLE_FLAG_INHERIT = 0x00000001 + STARTF_USESTDHANDLES = 0x00000100 + STARTF_USESHOWWINDOW = 0x00000001 + DUPLICATE_CLOSE_SOURCE = 0x00000001 + DUPLICATE_SAME_ACCESS = 0x00000002 + + STD_INPUT_HANDLE = -10 + STD_OUTPUT_HANDLE = -11 + STD_ERROR_HANDLE = -12 + + FILE_BEGIN = 0 + FILE_CURRENT = 1 + FILE_END = 2 + + LANG_ENGLISH = 0x09 + SUBLANG_ENGLISH_US = 0x01 + + FORMAT_MESSAGE_ALLOCATE_BUFFER = 256 + FORMAT_MESSAGE_IGNORE_INSERTS = 512 + FORMAT_MESSAGE_FROM_STRING = 1024 + FORMAT_MESSAGE_FROM_HMODULE = 2048 + FORMAT_MESSAGE_FROM_SYSTEM = 4096 + FORMAT_MESSAGE_ARGUMENT_ARRAY = 8192 + FORMAT_MESSAGE_MAX_WIDTH_MASK = 255 + + MAX_PATH = 260 + MAX_LONG_PATH = 32768 + + MAX_COMPUTERNAME_LENGTH = 15 + + TIME_ZONE_ID_UNKNOWN = 0 + TIME_ZONE_ID_STANDARD = 1 + + TIME_ZONE_ID_DAYLIGHT = 2 + IGNORE = 0 + INFINITE = 0xffffffff + + WAIT_TIMEOUT = 258 + WAIT_ABANDONED = 0x00000080 + WAIT_OBJECT_0 = 0x00000000 + WAIT_FAILED = 0xFFFFFFFF + + CREATE_NEW_PROCESS_GROUP = 0x00000200 + CREATE_UNICODE_ENVIRONMENT = 0x00000400 + + PROCESS_TERMINATE = 1 + PROCESS_QUERY_INFORMATION = 0x00000400 + SYNCHRONIZE = 0x00100000 + + PAGE_READONLY = 0x02 + PAGE_READWRITE = 0x04 + PAGE_WRITECOPY = 0x08 + PAGE_EXECUTE_READ = 0x20 + PAGE_EXECUTE_READWRITE = 0x40 + PAGE_EXECUTE_WRITECOPY = 0x80 + + FILE_MAP_COPY = 0x01 + FILE_MAP_WRITE = 0x02 + FILE_MAP_READ = 0x04 + FILE_MAP_EXECUTE = 0x20 + + CTRL_C_EVENT = 0 + CTRL_BREAK_EVENT = 1 + + // Windows reserves errors >= 1<<29 for application use. + APPLICATION_ERROR = 1 << 29 +) + +const ( + // flags for CreateToolhelp32Snapshot + TH32CS_SNAPHEAPLIST = 0x01 + TH32CS_SNAPPROCESS = 0x02 + TH32CS_SNAPTHREAD = 0x04 + TH32CS_SNAPMODULE = 0x08 + TH32CS_SNAPMODULE32 = 0x10 + TH32CS_SNAPALL = TH32CS_SNAPHEAPLIST | TH32CS_SNAPMODULE | TH32CS_SNAPPROCESS | TH32CS_SNAPTHREAD + TH32CS_INHERIT = 0x80000000 +) + +const ( + // filters for ReadDirectoryChangesW + FILE_NOTIFY_CHANGE_FILE_NAME = 0x001 + FILE_NOTIFY_CHANGE_DIR_NAME = 0x002 + FILE_NOTIFY_CHANGE_ATTRIBUTES = 0x004 + FILE_NOTIFY_CHANGE_SIZE = 0x008 + FILE_NOTIFY_CHANGE_LAST_WRITE = 0x010 + FILE_NOTIFY_CHANGE_LAST_ACCESS = 0x020 + FILE_NOTIFY_CHANGE_CREATION = 0x040 + FILE_NOTIFY_CHANGE_SECURITY = 0x100 +) + +const ( + // do not reorder + FILE_ACTION_ADDED = iota + 1 + FILE_ACTION_REMOVED + FILE_ACTION_MODIFIED + FILE_ACTION_RENAMED_OLD_NAME + FILE_ACTION_RENAMED_NEW_NAME +) + +const ( + // wincrypt.h + PROV_RSA_FULL = 1 + PROV_RSA_SIG = 2 + PROV_DSS = 3 + PROV_FORTEZZA = 4 + PROV_MS_EXCHANGE = 5 + PROV_SSL = 6 + PROV_RSA_SCHANNEL = 12 + PROV_DSS_DH = 13 + PROV_EC_ECDSA_SIG = 14 + PROV_EC_ECNRA_SIG = 15 + PROV_EC_ECDSA_FULL = 16 + PROV_EC_ECNRA_FULL = 17 + PROV_DH_SCHANNEL = 18 + PROV_SPYRUS_LYNKS = 20 + PROV_RNG = 21 + PROV_INTEL_SEC = 22 + PROV_REPLACE_OWF = 23 + PROV_RSA_AES = 24 + CRYPT_VERIFYCONTEXT = 0xF0000000 + CRYPT_NEWKEYSET = 0x00000008 + CRYPT_DELETEKEYSET = 0x00000010 + CRYPT_MACHINE_KEYSET = 0x00000020 + CRYPT_SILENT = 0x00000040 + CRYPT_DEFAULT_CONTAINER_OPTIONAL = 0x00000080 + + USAGE_MATCH_TYPE_AND = 0 + USAGE_MATCH_TYPE_OR = 1 + + X509_ASN_ENCODING = 0x00000001 + PKCS_7_ASN_ENCODING = 0x00010000 + + CERT_STORE_PROV_MEMORY = 2 + + CERT_STORE_ADD_ALWAYS = 4 + + CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG = 0x00000004 + + CERT_TRUST_NO_ERROR = 0x00000000 + CERT_TRUST_IS_NOT_TIME_VALID = 0x00000001 + CERT_TRUST_IS_REVOKED = 0x00000004 + CERT_TRUST_IS_NOT_SIGNATURE_VALID = 0x00000008 + CERT_TRUST_IS_NOT_VALID_FOR_USAGE = 0x00000010 + CERT_TRUST_IS_UNTRUSTED_ROOT = 0x00000020 + CERT_TRUST_REVOCATION_STATUS_UNKNOWN = 0x00000040 + CERT_TRUST_IS_CYCLIC = 0x00000080 + CERT_TRUST_INVALID_EXTENSION = 0x00000100 + CERT_TRUST_INVALID_POLICY_CONSTRAINTS = 0x00000200 + CERT_TRUST_INVALID_BASIC_CONSTRAINTS = 0x00000400 + CERT_TRUST_INVALID_NAME_CONSTRAINTS = 0x00000800 + CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT = 0x00001000 + CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT = 0x00002000 + CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT = 0x00004000 + CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT = 0x00008000 + CERT_TRUST_IS_OFFLINE_REVOCATION = 0x01000000 + CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY = 0x02000000 + CERT_TRUST_IS_EXPLICIT_DISTRUST = 0x04000000 + CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT = 0x08000000 + + CERT_CHAIN_POLICY_BASE = 1 + CERT_CHAIN_POLICY_AUTHENTICODE = 2 + CERT_CHAIN_POLICY_AUTHENTICODE_TS = 3 + CERT_CHAIN_POLICY_SSL = 4 + CERT_CHAIN_POLICY_BASIC_CONSTRAINTS = 5 + CERT_CHAIN_POLICY_NT_AUTH = 6 + CERT_CHAIN_POLICY_MICROSOFT_ROOT = 7 + CERT_CHAIN_POLICY_EV = 8 + + CERT_E_EXPIRED = 0x800B0101 + CERT_E_ROLE = 0x800B0103 + CERT_E_PURPOSE = 0x800B0106 + CERT_E_UNTRUSTEDROOT = 0x800B0109 + CERT_E_CN_NO_MATCH = 0x800B010F + + AUTHTYPE_CLIENT = 1 + AUTHTYPE_SERVER = 2 +) + +var ( + OID_PKIX_KP_SERVER_AUTH = []byte("1.3.6.1.5.5.7.3.1\x00") + OID_SERVER_GATED_CRYPTO = []byte("1.3.6.1.4.1.311.10.3.3\x00") + OID_SGC_NETSCAPE = []byte("2.16.840.1.113730.4.1\x00") +) + +// Invented values to support what package os expects. +type Timeval struct { + Sec int32 + Usec int32 +} + +func (tv *Timeval) Nanoseconds() int64 { + return (int64(tv.Sec)*1e6 + int64(tv.Usec)) * 1e3 +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + tv.Sec = int32(nsec / 1e9) + tv.Usec = int32(nsec % 1e9 / 1e3) + return +} + +type SecurityAttributes struct { + Length uint32 + SecurityDescriptor uintptr + InheritHandle uint32 +} + +type Overlapped struct { + Internal uintptr + InternalHigh uintptr + Offset uint32 + OffsetHigh uint32 + HEvent Handle +} + +type FileNotifyInformation struct { + NextEntryOffset uint32 + Action uint32 + FileNameLength uint32 + FileName uint16 +} + +type Filetime struct { + LowDateTime uint32 + HighDateTime uint32 +} + +// Nanoseconds returns Filetime ft in nanoseconds +// since Epoch (00:00:00 UTC, January 1, 1970). +func (ft *Filetime) Nanoseconds() int64 { + // 100-nanosecond intervals since January 1, 1601 + nsec := int64(ft.HighDateTime)<<32 + int64(ft.LowDateTime) + // change starting time to the Epoch (00:00:00 UTC, January 1, 1970) + nsec -= 116444736000000000 + // convert into nanoseconds + nsec *= 100 + return nsec +} + +func NsecToFiletime(nsec int64) (ft Filetime) { + // convert into 100-nanosecond + nsec /= 100 + // change starting time to January 1, 1601 + nsec += 116444736000000000 + // split into high / low + ft.LowDateTime = uint32(nsec & 0xffffffff) + ft.HighDateTime = uint32(nsec >> 32 & 0xffffffff) + return ft +} + +type Win32finddata struct { + FileAttributes uint32 + CreationTime Filetime + LastAccessTime Filetime + LastWriteTime Filetime + FileSizeHigh uint32 + FileSizeLow uint32 + Reserved0 uint32 + Reserved1 uint32 + FileName [MAX_PATH - 1]uint16 + AlternateFileName [13]uint16 +} + +// This is the actual system call structure. +// Win32finddata is what we committed to in Go 1. +type win32finddata1 struct { + FileAttributes uint32 + CreationTime Filetime + LastAccessTime Filetime + LastWriteTime Filetime + FileSizeHigh uint32 + FileSizeLow uint32 + Reserved0 uint32 + Reserved1 uint32 + FileName [MAX_PATH]uint16 + AlternateFileName [14]uint16 +} + +func copyFindData(dst *Win32finddata, src *win32finddata1) { + dst.FileAttributes = src.FileAttributes + dst.CreationTime = src.CreationTime + dst.LastAccessTime = src.LastAccessTime + dst.LastWriteTime = src.LastWriteTime + dst.FileSizeHigh = src.FileSizeHigh + dst.FileSizeLow = src.FileSizeLow + dst.Reserved0 = src.Reserved0 + dst.Reserved1 = src.Reserved1 + + // The src is 1 element bigger than dst, but it must be NUL. + copy(dst.FileName[:], src.FileName[:]) + copy(dst.AlternateFileName[:], src.AlternateFileName[:]) +} + +type ByHandleFileInformation struct { + FileAttributes uint32 + CreationTime Filetime + LastAccessTime Filetime + LastWriteTime Filetime + VolumeSerialNumber uint32 + FileSizeHigh uint32 + FileSizeLow uint32 + NumberOfLinks uint32 + FileIndexHigh uint32 + FileIndexLow uint32 +} + +const ( + GetFileExInfoStandard = 0 + GetFileExMaxInfoLevel = 1 +) + +type Win32FileAttributeData struct { + FileAttributes uint32 + CreationTime Filetime + LastAccessTime Filetime + LastWriteTime Filetime + FileSizeHigh uint32 + FileSizeLow uint32 +} + +// ShowWindow constants +const ( + // winuser.h + SW_HIDE = 0 + SW_NORMAL = 1 + SW_SHOWNORMAL = 1 + SW_SHOWMINIMIZED = 2 + SW_SHOWMAXIMIZED = 3 + SW_MAXIMIZE = 3 + SW_SHOWNOACTIVATE = 4 + SW_SHOW = 5 + SW_MINIMIZE = 6 + SW_SHOWMINNOACTIVE = 7 + SW_SHOWNA = 8 + SW_RESTORE = 9 + SW_SHOWDEFAULT = 10 + SW_FORCEMINIMIZE = 11 +) + +type StartupInfo struct { + Cb uint32 + _ *uint16 + Desktop *uint16 + Title *uint16 + X uint32 + Y uint32 + XSize uint32 + YSize uint32 + XCountChars uint32 + YCountChars uint32 + FillAttribute uint32 + Flags uint32 + ShowWindow uint16 + _ uint16 + _ *byte + StdInput Handle + StdOutput Handle + StdErr Handle +} + +type ProcessInformation struct { + Process Handle + Thread Handle + ProcessId uint32 + ThreadId uint32 +} + +type ProcessEntry32 struct { + Size uint32 + Usage uint32 + ProcessID uint32 + DefaultHeapID uintptr + ModuleID uint32 + Threads uint32 + ParentProcessID uint32 + PriClassBase int32 + Flags uint32 + ExeFile [MAX_PATH]uint16 +} + +type Systemtime struct { + Year uint16 + Month uint16 + DayOfWeek uint16 + Day uint16 + Hour uint16 + Minute uint16 + Second uint16 + Milliseconds uint16 +} + +type Timezoneinformation struct { + Bias int32 + StandardName [32]uint16 + StandardDate Systemtime + StandardBias int32 + DaylightName [32]uint16 + DaylightDate Systemtime + DaylightBias int32 +} + +// Socket related. + +const ( + AF_UNSPEC = 0 + AF_UNIX = 1 + AF_INET = 2 + AF_INET6 = 23 + AF_NETBIOS = 17 + + SOCK_STREAM = 1 + SOCK_DGRAM = 2 + SOCK_RAW = 3 + SOCK_SEQPACKET = 5 + + IPPROTO_IP = 0 + IPPROTO_IPV6 = 0x29 + IPPROTO_TCP = 6 + IPPROTO_UDP = 17 + + SOL_SOCKET = 0xffff + SO_REUSEADDR = 4 + SO_KEEPALIVE = 8 + SO_DONTROUTE = 16 + SO_BROADCAST = 32 + SO_LINGER = 128 + SO_RCVBUF = 0x1002 + SO_SNDBUF = 0x1001 + SO_UPDATE_ACCEPT_CONTEXT = 0x700b + SO_UPDATE_CONNECT_CONTEXT = 0x7010 + + IOC_OUT = 0x40000000 + IOC_IN = 0x80000000 + IOC_VENDOR = 0x18000000 + IOC_INOUT = IOC_IN | IOC_OUT + IOC_WS2 = 0x08000000 + SIO_GET_EXTENSION_FUNCTION_POINTER = IOC_INOUT | IOC_WS2 | 6 + SIO_KEEPALIVE_VALS = IOC_IN | IOC_VENDOR | 4 + SIO_UDP_CONNRESET = IOC_IN | IOC_VENDOR | 12 + + // cf. http://support.microsoft.com/default.aspx?scid=kb;en-us;257460 + + IP_TOS = 0x3 + IP_TTL = 0x4 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_TTL = 0xa + IP_MULTICAST_LOOP = 0xb + IP_ADD_MEMBERSHIP = 0xc + IP_DROP_MEMBERSHIP = 0xd + + IPV6_V6ONLY = 0x1b + IPV6_UNICAST_HOPS = 0x4 + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_LOOP = 0xb + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + + SOMAXCONN = 0x7fffffff + + TCP_NODELAY = 1 + + SHUT_RD = 0 + SHUT_WR = 1 + SHUT_RDWR = 2 + + WSADESCRIPTION_LEN = 256 + WSASYS_STATUS_LEN = 128 +) + +type WSABuf struct { + Len uint32 + Buf *byte +} + +// Invented values to support what package os expects. +const ( + S_IFMT = 0x1f000 + S_IFIFO = 0x1000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFBLK = 0x6000 + S_IFREG = 0x8000 + S_IFLNK = 0xa000 + S_IFSOCK = 0xc000 + S_ISUID = 0x800 + S_ISGID = 0x400 + S_ISVTX = 0x200 + S_IRUSR = 0x100 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXUSR = 0x40 +) + +const ( + FILE_TYPE_CHAR = 0x0002 + FILE_TYPE_DISK = 0x0001 + FILE_TYPE_PIPE = 0x0003 + FILE_TYPE_REMOTE = 0x8000 + FILE_TYPE_UNKNOWN = 0x0000 +) + +type Hostent struct { + Name *byte + Aliases **byte + AddrType uint16 + Length uint16 + AddrList **byte +} + +type Protoent struct { + Name *byte + Aliases **byte + Proto uint16 +} + +const ( + DNS_TYPE_A = 0x0001 + DNS_TYPE_NS = 0x0002 + DNS_TYPE_MD = 0x0003 + DNS_TYPE_MF = 0x0004 + DNS_TYPE_CNAME = 0x0005 + DNS_TYPE_SOA = 0x0006 + DNS_TYPE_MB = 0x0007 + DNS_TYPE_MG = 0x0008 + DNS_TYPE_MR = 0x0009 + DNS_TYPE_NULL = 0x000a + DNS_TYPE_WKS = 0x000b + DNS_TYPE_PTR = 0x000c + DNS_TYPE_HINFO = 0x000d + DNS_TYPE_MINFO = 0x000e + DNS_TYPE_MX = 0x000f + DNS_TYPE_TEXT = 0x0010 + DNS_TYPE_RP = 0x0011 + DNS_TYPE_AFSDB = 0x0012 + DNS_TYPE_X25 = 0x0013 + DNS_TYPE_ISDN = 0x0014 + DNS_TYPE_RT = 0x0015 + DNS_TYPE_NSAP = 0x0016 + DNS_TYPE_NSAPPTR = 0x0017 + DNS_TYPE_SIG = 0x0018 + DNS_TYPE_KEY = 0x0019 + DNS_TYPE_PX = 0x001a + DNS_TYPE_GPOS = 0x001b + DNS_TYPE_AAAA = 0x001c + DNS_TYPE_LOC = 0x001d + DNS_TYPE_NXT = 0x001e + DNS_TYPE_EID = 0x001f + DNS_TYPE_NIMLOC = 0x0020 + DNS_TYPE_SRV = 0x0021 + DNS_TYPE_ATMA = 0x0022 + DNS_TYPE_NAPTR = 0x0023 + DNS_TYPE_KX = 0x0024 + DNS_TYPE_CERT = 0x0025 + DNS_TYPE_A6 = 0x0026 + DNS_TYPE_DNAME = 0x0027 + DNS_TYPE_SINK = 0x0028 + DNS_TYPE_OPT = 0x0029 + DNS_TYPE_DS = 0x002B + DNS_TYPE_RRSIG = 0x002E + DNS_TYPE_NSEC = 0x002F + DNS_TYPE_DNSKEY = 0x0030 + DNS_TYPE_DHCID = 0x0031 + DNS_TYPE_UINFO = 0x0064 + DNS_TYPE_UID = 0x0065 + DNS_TYPE_GID = 0x0066 + DNS_TYPE_UNSPEC = 0x0067 + DNS_TYPE_ADDRS = 0x00f8 + DNS_TYPE_TKEY = 0x00f9 + DNS_TYPE_TSIG = 0x00fa + DNS_TYPE_IXFR = 0x00fb + DNS_TYPE_AXFR = 0x00fc + DNS_TYPE_MAILB = 0x00fd + DNS_TYPE_MAILA = 0x00fe + DNS_TYPE_ALL = 0x00ff + DNS_TYPE_ANY = 0x00ff + DNS_TYPE_WINS = 0xff01 + DNS_TYPE_WINSR = 0xff02 + DNS_TYPE_NBSTAT = 0xff01 +) + +const ( + DNS_INFO_NO_RECORDS = 0x251D +) + +const ( + // flags inside DNSRecord.Dw + DnsSectionQuestion = 0x0000 + DnsSectionAnswer = 0x0001 + DnsSectionAuthority = 0x0002 + DnsSectionAdditional = 0x0003 +) + +type DNSSRVData struct { + Target *uint16 + Priority uint16 + Weight uint16 + Port uint16 + Pad uint16 +} + +type DNSPTRData struct { + Host *uint16 +} + +type DNSMXData struct { + NameExchange *uint16 + Preference uint16 + Pad uint16 +} + +type DNSTXTData struct { + StringCount uint16 + StringArray [1]*uint16 +} + +type DNSRecord struct { + Next *DNSRecord + Name *uint16 + Type uint16 + Length uint16 + Dw uint32 + Ttl uint32 + Reserved uint32 + Data [40]byte +} + +const ( + TF_DISCONNECT = 1 + TF_REUSE_SOCKET = 2 + TF_WRITE_BEHIND = 4 + TF_USE_DEFAULT_WORKER = 0 + TF_USE_SYSTEM_THREAD = 16 + TF_USE_KERNEL_APC = 32 +) + +type TransmitFileBuffers struct { + Head uintptr + HeadLength uint32 + Tail uintptr + TailLength uint32 +} + +const ( + IFF_UP = 1 + IFF_BROADCAST = 2 + IFF_LOOPBACK = 4 + IFF_POINTTOPOINT = 8 + IFF_MULTICAST = 16 +) + +const SIO_GET_INTERFACE_LIST = 0x4004747F + +// TODO(mattn): SockaddrGen is union of sockaddr/sockaddr_in/sockaddr_in6_old. +// will be fixed to change variable type as suitable. + +type SockaddrGen [24]byte + +type InterfaceInfo struct { + Flags uint32 + Address SockaddrGen + BroadcastAddress SockaddrGen + Netmask SockaddrGen +} + +type IpAddressString struct { + String [16]byte +} + +type IpMaskString IpAddressString + +type IpAddrString struct { + Next *IpAddrString + IpAddress IpAddressString + IpMask IpMaskString + Context uint32 +} + +const MAX_ADAPTER_NAME_LENGTH = 256 +const MAX_ADAPTER_DESCRIPTION_LENGTH = 128 +const MAX_ADAPTER_ADDRESS_LENGTH = 8 + +type IpAdapterInfo struct { + Next *IpAdapterInfo + ComboIndex uint32 + AdapterName [MAX_ADAPTER_NAME_LENGTH + 4]byte + Description [MAX_ADAPTER_DESCRIPTION_LENGTH + 4]byte + AddressLength uint32 + Address [MAX_ADAPTER_ADDRESS_LENGTH]byte + Index uint32 + Type uint32 + DhcpEnabled uint32 + CurrentIpAddress *IpAddrString + IpAddressList IpAddrString + GatewayList IpAddrString + DhcpServer IpAddrString + HaveWins bool + PrimaryWinsServer IpAddrString + SecondaryWinsServer IpAddrString + LeaseObtained int64 + LeaseExpires int64 +} + +const MAXLEN_PHYSADDR = 8 +const MAX_INTERFACE_NAME_LEN = 256 +const MAXLEN_IFDESCR = 256 + +type MibIfRow struct { + Name [MAX_INTERFACE_NAME_LEN]uint16 + Index uint32 + Type uint32 + Mtu uint32 + Speed uint32 + PhysAddrLen uint32 + PhysAddr [MAXLEN_PHYSADDR]byte + AdminStatus uint32 + OperStatus uint32 + LastChange uint32 + InOctets uint32 + InUcastPkts uint32 + InNUcastPkts uint32 + InDiscards uint32 + InErrors uint32 + InUnknownProtos uint32 + OutOctets uint32 + OutUcastPkts uint32 + OutNUcastPkts uint32 + OutDiscards uint32 + OutErrors uint32 + OutQLen uint32 + DescrLen uint32 + Descr [MAXLEN_IFDESCR]byte +} + +type CertContext struct { + EncodingType uint32 + EncodedCert *byte + Length uint32 + CertInfo uintptr + Store Handle +} + +type CertChainContext struct { + Size uint32 + TrustStatus CertTrustStatus + ChainCount uint32 + Chains **CertSimpleChain + LowerQualityChainCount uint32 + LowerQualityChains **CertChainContext + HasRevocationFreshnessTime uint32 + RevocationFreshnessTime uint32 +} + +type CertSimpleChain struct { + Size uint32 + TrustStatus CertTrustStatus + NumElements uint32 + Elements **CertChainElement + TrustListInfo uintptr + HasRevocationFreshnessTime uint32 + RevocationFreshnessTime uint32 +} + +type CertChainElement struct { + Size uint32 + CertContext *CertContext + TrustStatus CertTrustStatus + RevocationInfo *CertRevocationInfo + IssuanceUsage *CertEnhKeyUsage + ApplicationUsage *CertEnhKeyUsage + ExtendedErrorInfo *uint16 +} + +type CertRevocationInfo struct { + Size uint32 + RevocationResult uint32 + RevocationOid *byte + OidSpecificInfo uintptr + HasFreshnessTime uint32 + FreshnessTime uint32 + CrlInfo uintptr // *CertRevocationCrlInfo +} + +type CertTrustStatus struct { + ErrorStatus uint32 + InfoStatus uint32 +} + +type CertUsageMatch struct { + Type uint32 + Usage CertEnhKeyUsage +} + +type CertEnhKeyUsage struct { + Length uint32 + UsageIdentifiers **byte +} + +type CertChainPara struct { + Size uint32 + RequestedUsage CertUsageMatch + RequstedIssuancePolicy CertUsageMatch + URLRetrievalTimeout uint32 + CheckRevocationFreshnessTime uint32 + RevocationFreshnessTime uint32 + CacheResync *Filetime +} + +type CertChainPolicyPara struct { + Size uint32 + Flags uint32 + ExtraPolicyPara uintptr +} + +type SSLExtraCertChainPolicyPara struct { + Size uint32 + AuthType uint32 + Checks uint32 + ServerName *uint16 +} + +type CertChainPolicyStatus struct { + Size uint32 + Error uint32 + ChainIndex uint32 + ElementIndex uint32 + ExtraPolicyStatus uintptr +} + +const ( + // do not reorder + HKEY_CLASSES_ROOT = 0x80000000 + iota + HKEY_CURRENT_USER + HKEY_LOCAL_MACHINE + HKEY_USERS + HKEY_PERFORMANCE_DATA + HKEY_CURRENT_CONFIG + HKEY_DYN_DATA + + KEY_QUERY_VALUE = 1 + KEY_SET_VALUE = 2 + KEY_CREATE_SUB_KEY = 4 + KEY_ENUMERATE_SUB_KEYS = 8 + KEY_NOTIFY = 16 + KEY_CREATE_LINK = 32 + KEY_WRITE = 0x20006 + KEY_EXECUTE = 0x20019 + KEY_READ = 0x20019 + KEY_WOW64_64KEY = 0x0100 + KEY_WOW64_32KEY = 0x0200 + KEY_ALL_ACCESS = 0xf003f +) + +const ( + // do not reorder + REG_NONE = iota + REG_SZ + REG_EXPAND_SZ + REG_BINARY + REG_DWORD_LITTLE_ENDIAN + REG_DWORD_BIG_ENDIAN + REG_LINK + REG_MULTI_SZ + REG_RESOURCE_LIST + REG_FULL_RESOURCE_DESCRIPTOR + REG_RESOURCE_REQUIREMENTS_LIST + REG_QWORD_LITTLE_ENDIAN + REG_DWORD = REG_DWORD_LITTLE_ENDIAN + REG_QWORD = REG_QWORD_LITTLE_ENDIAN +) + +type AddrinfoW struct { + Flags int32 + Family int32 + Socktype int32 + Protocol int32 + Addrlen uintptr + Canonname *uint16 + Addr uintptr + Next *AddrinfoW +} + +const ( + AI_PASSIVE = 1 + AI_CANONNAME = 2 + AI_NUMERICHOST = 4 +) + +type GUID struct { + Data1 uint32 + Data2 uint16 + Data3 uint16 + Data4 [8]byte +} + +var WSAID_CONNECTEX = GUID{ + 0x25a207b9, + 0xddf3, + 0x4660, + [8]byte{0x8e, 0xe9, 0x76, 0xe5, 0x8c, 0x74, 0x06, 0x3e}, +} + +const ( + FILE_SKIP_COMPLETION_PORT_ON_SUCCESS = 1 + FILE_SKIP_SET_EVENT_ON_HANDLE = 2 +) + +const ( + WSAPROTOCOL_LEN = 255 + MAX_PROTOCOL_CHAIN = 7 + BASE_PROTOCOL = 1 + LAYERED_PROTOCOL = 0 + + XP1_CONNECTIONLESS = 0x00000001 + XP1_GUARANTEED_DELIVERY = 0x00000002 + XP1_GUARANTEED_ORDER = 0x00000004 + XP1_MESSAGE_ORIENTED = 0x00000008 + XP1_PSEUDO_STREAM = 0x00000010 + XP1_GRACEFUL_CLOSE = 0x00000020 + XP1_EXPEDITED_DATA = 0x00000040 + XP1_CONNECT_DATA = 0x00000080 + XP1_DISCONNECT_DATA = 0x00000100 + XP1_SUPPORT_BROADCAST = 0x00000200 + XP1_SUPPORT_MULTIPOINT = 0x00000400 + XP1_MULTIPOINT_CONTROL_PLANE = 0x00000800 + XP1_MULTIPOINT_DATA_PLANE = 0x00001000 + XP1_QOS_SUPPORTED = 0x00002000 + XP1_UNI_SEND = 0x00008000 + XP1_UNI_RECV = 0x00010000 + XP1_IFS_HANDLES = 0x00020000 + XP1_PARTIAL_MESSAGE = 0x00040000 + XP1_SAN_SUPPORT_SDP = 0x00080000 + + PFL_MULTIPLE_PROTO_ENTRIES = 0x00000001 + PFL_RECOMMENDED_PROTO_ENTRY = 0x00000002 + PFL_HIDDEN = 0x00000004 + PFL_MATCHES_PROTOCOL_ZERO = 0x00000008 + PFL_NETWORKDIRECT_PROVIDER = 0x00000010 +) + +type WSAProtocolInfo struct { + ServiceFlags1 uint32 + ServiceFlags2 uint32 + ServiceFlags3 uint32 + ServiceFlags4 uint32 + ProviderFlags uint32 + ProviderId GUID + CatalogEntryId uint32 + ProtocolChain WSAProtocolChain + Version int32 + AddressFamily int32 + MaxSockAddr int32 + MinSockAddr int32 + SocketType int32 + Protocol int32 + ProtocolMaxOffset int32 + NetworkByteOrder int32 + SecurityScheme int32 + MessageSize uint32 + ProviderReserved uint32 + ProtocolName [WSAPROTOCOL_LEN + 1]uint16 +} + +type WSAProtocolChain struct { + ChainLen int32 + ChainEntries [MAX_PROTOCOL_CHAIN]uint32 +} + +type TCPKeepalive struct { + OnOff uint32 + Time uint32 + Interval uint32 +} + +type symbolicLinkReparseBuffer struct { + SubstituteNameOffset uint16 + SubstituteNameLength uint16 + PrintNameOffset uint16 + PrintNameLength uint16 + Flags uint32 + PathBuffer [1]uint16 +} + +type mountPointReparseBuffer struct { + SubstituteNameOffset uint16 + SubstituteNameLength uint16 + PrintNameOffset uint16 + PrintNameLength uint16 + PathBuffer [1]uint16 +} + +type reparseDataBuffer struct { + ReparseTag uint32 + ReparseDataLength uint16 + Reserved uint16 + + // GenericReparseBuffer + reparseBuffer byte +} + +const ( + FSCTL_GET_REPARSE_POINT = 0x900A8 + MAXIMUM_REPARSE_DATA_BUFFER_SIZE = 16 * 1024 + IO_REPARSE_TAG_MOUNT_POINT = 0xA0000003 + IO_REPARSE_TAG_SYMLINK = 0xA000000C + SYMBOLIC_LINK_FLAG_DIRECTORY = 0x1 +) + +const ( + ComputerNameNetBIOS = 0 + ComputerNameDnsHostname = 1 + ComputerNameDnsDomain = 2 + ComputerNameDnsFullyQualified = 3 + ComputerNamePhysicalNetBIOS = 4 + ComputerNamePhysicalDnsHostname = 5 + ComputerNamePhysicalDnsDomain = 6 + ComputerNamePhysicalDnsFullyQualified = 7 + ComputerNameMax = 8 +) diff --git a/vendor/golang.org/x/sys/windows/ztypes_windows_386.go b/vendor/golang.org/x/sys/windows/ztypes_windows_386.go new file mode 100644 index 0000000..10f33be --- /dev/null +++ b/vendor/golang.org/x/sys/windows/ztypes_windows_386.go @@ -0,0 +1,22 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package windows + +type WSAData struct { + Version uint16 + HighVersion uint16 + Description [WSADESCRIPTION_LEN + 1]byte + SystemStatus [WSASYS_STATUS_LEN + 1]byte + MaxSockets uint16 + MaxUdpDg uint16 + VendorInfo *byte +} + +type Servent struct { + Name *byte + Aliases **byte + Port uint16 + Proto *byte +} diff --git a/vendor/golang.org/x/sys/windows/ztypes_windows_amd64.go b/vendor/golang.org/x/sys/windows/ztypes_windows_amd64.go new file mode 100644 index 0000000..3f272c2 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/ztypes_windows_amd64.go @@ -0,0 +1,22 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package windows + +type WSAData struct { + Version uint16 + HighVersion uint16 + MaxSockets uint16 + MaxUdpDg uint16 + VendorInfo *byte + Description [WSADESCRIPTION_LEN + 1]byte + SystemStatus [WSASYS_STATUS_LEN + 1]byte +} + +type Servent struct { + Name *byte + Aliases **byte + Proto *byte + Port uint16 +} From 46c1aed2b970eec75a9ba1bbbe34c365c2ea988f Mon Sep 17 00:00:00 2001 From: Alexey Mochkin Date: Fri, 18 Dec 2015 16:41:24 +0300 Subject: [PATCH 5/5] Version bump Signed-off-by: Alexey Mochkin --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 846c693..a8c20bc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +svirtnet (0.0.28-1) stable; urgency=high + + * Version bump + + -- Alexey Mochkin Fri, 18 Dec 2015 16:41:06 +0300 + svirtnet (0.0.27-1) stable; urgency=high * Autobuild.